eaiovnaovbqoebvqoeavibavo PKZYlibpng16/pnglibconf.hnu[/* pnglibconf.h - library build configuration */ /* libpng version 1.6.34, September 29, 2017 */ /* Copyright (c) 1998-2017 Glenn Randers-Pehrson */ /* This code is released under the libpng license. */ /* For conditions of distribution and use, see the disclaimer */ /* and license in png.h */ /* pnglibconf.h */ /* Machine generated file: DO NOT EDIT */ /* Derived from: scripts/pnglibconf.dfa */ #ifndef PNGLCONF_H #define PNGLCONF_H /* options */ #define PNG_16BIT_SUPPORTED #define PNG_ALIGNED_MEMORY_SUPPORTED /*#undef PNG_ARM_NEON_API_SUPPORTED*/ /*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ #define PNG_BENIGN_ERRORS_SUPPORTED #define PNG_BENIGN_READ_ERRORS_SUPPORTED /*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ #define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED #define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED #define PNG_COLORSPACE_SUPPORTED #define PNG_CONSOLE_IO_SUPPORTED #define PNG_CONVERT_tIME_SUPPORTED #define PNG_EASY_ACCESS_SUPPORTED /*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ #define PNG_ERROR_TEXT_SUPPORTED #define PNG_FIXED_POINT_SUPPORTED #define PNG_FLOATING_ARITHMETIC_SUPPORTED #define PNG_FLOATING_POINT_SUPPORTED #define PNG_FORMAT_AFIRST_SUPPORTED #define PNG_FORMAT_BGR_SUPPORTED #define PNG_GAMMA_SUPPORTED #define PNG_GET_PALETTE_MAX_SUPPORTED #define PNG_HANDLE_AS_UNKNOWN_SUPPORTED #define PNG_INCH_CONVERSIONS_SUPPORTED #define PNG_INFO_IMAGE_SUPPORTED #define PNG_IO_STATE_SUPPORTED #define PNG_MNG_FEATURES_SUPPORTED #define PNG_POINTER_INDEXING_SUPPORTED /*#undef PNG_POWERPC_VSX_API_SUPPORTED*/ /*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/ #define PNG_PROGRESSIVE_READ_SUPPORTED #define PNG_READ_16BIT_SUPPORTED #define PNG_READ_ALPHA_MODE_SUPPORTED #define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED #define PNG_READ_BACKGROUND_SUPPORTED #define PNG_READ_BGR_SUPPORTED #define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED #define PNG_READ_COMPOSITE_NODIV_SUPPORTED #define PNG_READ_COMPRESSED_TEXT_SUPPORTED #define PNG_READ_EXPAND_16_SUPPORTED #define PNG_READ_EXPAND_SUPPORTED #define PNG_READ_FILLER_SUPPORTED #define PNG_READ_GAMMA_SUPPORTED #define PNG_READ_GET_PALETTE_MAX_SUPPORTED #define PNG_READ_GRAY_TO_RGB_SUPPORTED #define PNG_READ_INTERLACING_SUPPORTED #define PNG_READ_INT_FUNCTIONS_SUPPORTED #define PNG_READ_INVERT_ALPHA_SUPPORTED #define PNG_READ_INVERT_SUPPORTED #define PNG_READ_OPT_PLTE_SUPPORTED #define PNG_READ_PACKSWAP_SUPPORTED #define PNG_READ_PACK_SUPPORTED #define PNG_READ_QUANTIZE_SUPPORTED #define PNG_READ_RGB_TO_GRAY_SUPPORTED #define PNG_READ_SCALE_16_TO_8_SUPPORTED #define PNG_READ_SHIFT_SUPPORTED #define PNG_READ_STRIP_16_TO_8_SUPPORTED #define PNG_READ_STRIP_ALPHA_SUPPORTED #define PNG_READ_SUPPORTED #define PNG_READ_SWAP_ALPHA_SUPPORTED #define PNG_READ_SWAP_SUPPORTED #define PNG_READ_TEXT_SUPPORTED #define PNG_READ_TRANSFORMS_SUPPORTED #define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED #define PNG_READ_USER_CHUNKS_SUPPORTED #define PNG_READ_USER_TRANSFORM_SUPPORTED #define PNG_READ_bKGD_SUPPORTED #define PNG_READ_cHRM_SUPPORTED #define PNG_READ_eXIf_SUPPORTED #define PNG_READ_gAMA_SUPPORTED #define PNG_READ_hIST_SUPPORTED #define PNG_READ_iCCP_SUPPORTED #define PNG_READ_iTXt_SUPPORTED #define PNG_READ_oFFs_SUPPORTED #define PNG_READ_pCAL_SUPPORTED #define PNG_READ_pHYs_SUPPORTED #define PNG_READ_sBIT_SUPPORTED #define PNG_READ_sCAL_SUPPORTED #define PNG_READ_sPLT_SUPPORTED #define PNG_READ_sRGB_SUPPORTED #define PNG_READ_tEXt_SUPPORTED #define PNG_READ_tIME_SUPPORTED #define PNG_READ_tRNS_SUPPORTED #define PNG_READ_zTXt_SUPPORTED #define PNG_SAVE_INT_32_SUPPORTED #define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED #define PNG_SEQUENTIAL_READ_SUPPORTED #define PNG_SETJMP_SUPPORTED #define PNG_SET_OPTION_SUPPORTED #define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED #define PNG_SET_USER_LIMITS_SUPPORTED #define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED #define PNG_SIMPLIFIED_READ_BGR_SUPPORTED #define PNG_SIMPLIFIED_READ_SUPPORTED #define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED #define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED #define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED #define PNG_SIMPLIFIED_WRITE_SUPPORTED #define PNG_STDIO_SUPPORTED #define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED #define PNG_TEXT_SUPPORTED #define PNG_TIME_RFC1123_SUPPORTED #define PNG_UNKNOWN_CHUNKS_SUPPORTED #define PNG_USER_CHUNKS_SUPPORTED #define PNG_USER_LIMITS_SUPPORTED #define PNG_USER_MEM_SUPPORTED #define PNG_USER_TRANSFORM_INFO_SUPPORTED #define PNG_USER_TRANSFORM_PTR_SUPPORTED #define PNG_WARNINGS_SUPPORTED #define PNG_WRITE_16BIT_SUPPORTED #define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED #define PNG_WRITE_BGR_SUPPORTED #define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED #define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED #define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED #define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED #define PNG_WRITE_FILLER_SUPPORTED #define PNG_WRITE_FILTER_SUPPORTED #define PNG_WRITE_FLUSH_SUPPORTED #define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED #define PNG_WRITE_INTERLACING_SUPPORTED #define PNG_WRITE_INT_FUNCTIONS_SUPPORTED #define PNG_WRITE_INVERT_ALPHA_SUPPORTED #define PNG_WRITE_INVERT_SUPPORTED #define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED #define PNG_WRITE_PACKSWAP_SUPPORTED #define PNG_WRITE_PACK_SUPPORTED #define PNG_WRITE_SHIFT_SUPPORTED #define PNG_WRITE_SUPPORTED #define PNG_WRITE_SWAP_ALPHA_SUPPORTED #define PNG_WRITE_SWAP_SUPPORTED #define PNG_WRITE_TEXT_SUPPORTED #define PNG_WRITE_TRANSFORMS_SUPPORTED #define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED #define PNG_WRITE_USER_TRANSFORM_SUPPORTED #define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED #define PNG_WRITE_bKGD_SUPPORTED #define PNG_WRITE_cHRM_SUPPORTED #define PNG_WRITE_eXIf_SUPPORTED #define PNG_WRITE_gAMA_SUPPORTED #define PNG_WRITE_hIST_SUPPORTED #define PNG_WRITE_iCCP_SUPPORTED #define PNG_WRITE_iTXt_SUPPORTED #define PNG_WRITE_oFFs_SUPPORTED #define PNG_WRITE_pCAL_SUPPORTED #define PNG_WRITE_pHYs_SUPPORTED #define PNG_WRITE_sBIT_SUPPORTED #define PNG_WRITE_sCAL_SUPPORTED #define PNG_WRITE_sPLT_SUPPORTED #define PNG_WRITE_sRGB_SUPPORTED #define PNG_WRITE_tEXt_SUPPORTED #define PNG_WRITE_tIME_SUPPORTED #define PNG_WRITE_tRNS_SUPPORTED #define PNG_WRITE_zTXt_SUPPORTED #define PNG_bKGD_SUPPORTED #define PNG_cHRM_SUPPORTED #define PNG_eXIf_SUPPORTED #define PNG_gAMA_SUPPORTED #define PNG_hIST_SUPPORTED #define PNG_iCCP_SUPPORTED #define PNG_iTXt_SUPPORTED #define PNG_oFFs_SUPPORTED #define PNG_pCAL_SUPPORTED #define PNG_pHYs_SUPPORTED #define PNG_sBIT_SUPPORTED #define PNG_sCAL_SUPPORTED #define PNG_sPLT_SUPPORTED #define PNG_sRGB_SUPPORTED #define PNG_tEXt_SUPPORTED #define PNG_tIME_SUPPORTED #define PNG_tRNS_SUPPORTED #define PNG_zTXt_SUPPORTED /* end of options */ /* settings */ #define PNG_API_RULE 0 #define PNG_DEFAULT_READ_MACROS 1 #define PNG_GAMMA_THRESHOLD_FIXED 5000 #define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE #define PNG_INFLATE_BUF_SIZE 1024 #define PNG_LINKAGE_API extern #define PNG_LINKAGE_CALLBACK extern #define PNG_LINKAGE_DATA extern #define PNG_LINKAGE_FUNCTION extern #define PNG_MAX_GAMMA_8 11 #define PNG_QUANTIZE_BLUE_BITS 5 #define PNG_QUANTIZE_GREEN_BITS 5 #define PNG_QUANTIZE_RED_BITS 5 #define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) #define PNG_TEXT_Z_DEFAULT_STRATEGY 0 #define PNG_USER_CHUNK_CACHE_MAX 1000 #define PNG_USER_CHUNK_MALLOC_MAX 1000000000 #define PNG_USER_HEIGHT_MAX 1000000 #define PNG_USER_WIDTH_MAX 1000000 #define PNG_ZBUF_SIZE 8192 #define PNG_ZLIB_VERNUM 0x12b0 #define PNG_Z_DEFAULT_COMPRESSION (-1) #define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 #define PNG_Z_DEFAULT_STRATEGY 1 #define PNG_sCAL_PRECISION 5 #define PNG_sRGB_PROFILE_CHECKS 2 /* end of settings */ #endif /* PNGLCONF_H */ PKZC+?33libpng16/png.hnu[ /* png.h - header file for PNG reference library * * libpng version 1.6.34, September 29, 2017 * * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This code is released under the libpng license (See LICENSE, below) * * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.97, January 1998, through 1.6.34, September 29, 2017: * Glenn Randers-Pehrson. * See also "Contributing Authors", below. */ /* * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: * * If you modify libpng you may insert additional notices immediately following * this sentence. * * This code is released under the libpng license. * * libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are * Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are * derived from libpng-1.0.6, and are distributed according to the same * disclaimer and license as libpng-1.0.6 with the following individuals * added to the list of Contributing Authors: * * Simon-Pierre Cadieux * Eric S. Raymond * Mans Rullgard * Cosmin Truta * Gilles Vollant * James Yu * Mandar Sahastrabuddhe * Google Inc. * Vadim Barkov * * and with the following additions to the disclaimer: * * There is no warranty against interference with your enjoyment of the * library or against infringement. There is no warranty that our * efforts or the library will fulfill any of your particular purposes * or needs. This library is provided with all faults, and the entire * risk of satisfactory quality, performance, accuracy, and effort is with * the user. * * Some files in the "contrib" directory and some configure-generated * files that are distributed with libpng have other copyright owners and * are released under other open source licenses. * * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from * libpng-0.96, and are distributed according to the same disclaimer and * license as libpng-0.96, with the following individuals added to the list * of Contributing Authors: * * Tom Lane * Glenn Randers-Pehrson * Willem van Schaik * * libpng versions 0.89, June 1996, through 0.96, May 1997, are * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, * and are distributed according to the same disclaimer and license as * libpng-0.88, with the following individuals added to the list of * Contributing Authors: * * John Bowler * Kevin Bracey * Sam Bushell * Magnus Holmgren * Greg Roelofs * Tom Tanner * * Some files in the "scripts" directory have other copyright owners * but are released under this license. * * libpng versions 0.5, May 1995, through 0.88, January 1996, are * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. * * For the purposes of this copyright and license, "Contributing Authors" * is defined as the following set of individuals: * * Andreas Dilger * Dave Martindale * Guy Eric Schalnat * Paul Schmidt * Tim Wegner * * The PNG Reference Library is supplied "AS IS". The Contributing Authors * and Group 42, Inc. disclaim all warranties, expressed or implied, * including, without limitation, the warranties of merchantability and of * fitness for any purpose. The Contributing Authors and Group 42, Inc. * assume no liability for direct, indirect, incidental, special, exemplary, * or consequential damages, which may result from the use of the PNG * Reference Library, even if advised of the possibility of such damage. * * Permission is hereby granted to use, copy, modify, and distribute this * source code, or portions hereof, for any purpose, without fee, subject * to the following restrictions: * * 1. The origin of this source code must not be misrepresented. * * 2. Altered versions must be plainly marked as such and must not * be misrepresented as being the original source. * * 3. This Copyright notice may not be removed or altered from any * source or altered source distribution. * * The Contributing Authors and Group 42, Inc. specifically permit, without * fee, and encourage the use of this source code as a component to * supporting the PNG file format in commercial products. If you use this * source code in a product, acknowledgment is not required but would be * appreciated. * * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. * * TRADEMARK: * * The name "libpng" has not been registered by the Copyright owner * as a trademark in any jurisdiction. However, because libpng has * been distributed and maintained world-wide, continually since 1995, * the Copyright owner claims "common-law trademark protection" in any * jurisdiction where common-law trademark is recognized. * * OSI CERTIFICATION: * * Libpng is OSI Certified Open Source Software. OSI Certified Open Source is * a certification mark of the Open Source Initiative. OSI has not addressed * the additional disclaimers inserted at version 1.0.7. * * EXPORT CONTROL: * * The Copyright owner believes that the Export Control Classification * Number (ECCN) for libpng is EAR99, which means not subject to export * controls or International Traffic in Arms Regulations (ITAR) because * it is open source, publicly available software, that does not contain * any encryption software. See the EAR, paragraphs 734.3(b)(3) and * 734.7(b). */ /* * A "png_get_copyright" function is available, for convenient use in "about" * boxes and the like: * * printf("%s", png_get_copyright(NULL)); * * Also, the PNG logo (in PNG format, of course) is supplied in the * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). */ /* * The contributing authors would like to thank all those who helped * with testing, bug fixes, and patience. This wouldn't have been * possible without all of you. * * Thanks to Frank J. T. Wojcik for helping with the documentation. */ /* Note about libpng version numbers: * * Due to various miscommunications, unforeseen code incompatibilities * and occasional factors outside the authors' control, version numbering * on the library has not always been consistent and straightforward. * The following table summarizes matters since version 0.89c, which was * the first widely used release: * * source png.h png.h shared-lib * version string int version * ------- ------ ----- ---------- * 0.89c "1.0 beta 3" 0.89 89 1.0.89 * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] * 0.97c 0.97 97 2.0.97 * 0.98 0.98 98 2.0.98 * 0.99 0.99 98 2.0.99 * 0.99a-m 0.99 99 2.0.99 * 1.00 1.00 100 2.1.0 [100 should be 10000] * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] * 1.0.1 png.h string is 10001 2.1.0 * 1.0.1a-e identical to the 10002 from here on, the shared library * 1.0.2 source version) 10002 is 2.V where V is the source code * 1.0.2a-b 10003 version, except as noted. * 1.0.3 10003 * 1.0.3a-d 10004 * 1.0.4 10004 * 1.0.4a-f 10005 * 1.0.5 (+ 2 patches) 10005 * 1.0.5a-d 10006 * 1.0.5e-r 10100 (not source compatible) * 1.0.5s-v 10006 (not binary compatible) * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) * 1.0.6d-f 10007 (still binary incompatible) * 1.0.6g 10007 * 1.0.6h 10007 10.6h (testing xy.z so-numbering) * 1.0.6i 10007 10.6i * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) * 1.0.7 1 10007 (still compatible) * ... * 1.0.19 10 10019 10.so.0.19[.0] * ... * 1.2.59 13 10257 12.so.0.59[.0] * ... * 1.5.30 15 10527 15.so.15.30[.0] * ... * 1.6.34 16 10633 16.so.16.34[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be * used for changes in backward compatibility, as it is intended. The * PNG_LIBPNG_VER macro, which is not used within libpng but is available * for applications, is an unsigned integer of the form xyyzz corresponding * to the source version x.y.z (leading zeros in y and z). Beta versions * were given the previous public release number plus a letter, until * version 1.0.6j; from then on they were given the upcoming public * release number plus "betaNN" or "rcNN". * * Binary incompatibility exists only when applications make direct access * to the info_ptr or png_ptr members through png.h, and the compiled * application is loaded with a different version of the library. * * DLLNUM will change each time there are forward or backward changes * in binary compatibility (e.g., when a new feature is added). * * See libpng.txt or libpng.3 for more information. The PNG specification * is available as a W3C Recommendation and as an ISO Specification, * * * If you just need to read a PNG file and don't want to read the documentation * skip to the end of this file and read the section entitled 'simplified API'. */ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.6.34" #define PNG_HEADER_VERSION_STRING " libpng version 1.6.34 - September 29, 2017\n" #define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 6 #define PNG_LIBPNG_VER_RELEASE 34 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ #define PNG_LIBPNG_VER_BUILD 0 /* Release Status */ #define PNG_LIBPNG_BUILD_ALPHA 1 #define PNG_LIBPNG_BUILD_BETA 2 #define PNG_LIBPNG_BUILD_RC 3 #define PNG_LIBPNG_BUILD_STABLE 4 #define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 /* Release-Specific Flags */ #define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with PNG_LIBPNG_BUILD_STABLE only */ #define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with PNG_LIBPNG_BUILD_SPECIAL */ #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with PNG_LIBPNG_BUILD_PRIVATE */ #define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE /* Careful here. At one time, Guy wanted to use 082, but that would be octal. * We must not include leading zeros. * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ #define PNG_LIBPNG_VER 10634 /* 1.6.34 */ /* Library configuration: these options cannot be changed after * the library has been built. */ #ifndef PNGLCONF_H /* If pnglibconf.h is missing, you can * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h */ # include "pnglibconf.h" #endif #ifndef PNG_VERSION_INFO_ONLY /* Machine specific configuration. */ # include "pngconf.h" #endif /* * Added at libpng-1.2.8 * * Ref MSDN: Private as priority over Special * VS_FF_PRIVATEBUILD File *was not* built using standard release * procedures. If this value is given, the StringFileInfo block must * contain a PrivateBuild string. * * VS_FF_SPECIALBUILD File *was* built by the original company using * standard release procedures but is a variation of the standard * file of the same version number. If this value is given, the * StringFileInfo block must contain a SpecialBuild string. */ #ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ # define PNG_LIBPNG_BUILD_TYPE \ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) #else # ifdef PNG_LIBPNG_SPECIALBUILD # define PNG_LIBPNG_BUILD_TYPE \ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) # else # define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) # endif #endif #ifndef PNG_VERSION_INFO_ONLY /* Inhibit C++ name-mangling for libpng functions but not for system calls. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Version information for C files, stored in png.c. This had better match * the version above. */ #define png_libpng_ver png_get_header_ver(NULL) /* This file is arranged in several sections: * * 1. [omitted] * 2. Any configuration options that can be specified by for the application * code when it is built. (Build time configuration is in pnglibconf.h) * 3. Type definitions (base types are defined in pngconf.h), structure * definitions. * 4. Exported library functions. * 5. Simplified API. * 6. Implementation options. * * The library source code has additional files (principally pngpriv.h) that * allow configuration of the library. */ /* Section 1: [omitted] */ /* Section 2: run time configuration * See pnglibconf.h for build time configuration * * Run time configuration allows the application to choose between * implementations of certain arithmetic APIs. The default is set * at build time and recorded in pnglibconf.h, but it is safe to * override these (and only these) settings. Note that this won't * change what the library does, only application code, and the * settings can (and probably should) be made on a per-file basis * by setting the #defines before including png.h * * Use macros to read integers from PNG data or use the exported * functions? * PNG_USE_READ_MACROS: use the macros (see below) Note that * the macros evaluate their argument multiple times. * PNG_NO_USE_READ_MACROS: call the relevant library function. * * Use the alternative algorithm for compositing alpha samples that * does not use division? * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' * algorithm. * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. * * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is * false? * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error * APIs to png_warning. * Otherwise the calls are mapped to png_error. */ /* Section 3: type definitions, including structures and compile time * constants. * See pngconf.h for base types that vary by machine/system */ /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ typedef char* png_libpng_version_1_6_34; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * * png_struct is the cache of information used while reading or writing a single * PNG file. One of these is always required, although the simplified API * (below) hides the creation and destruction of it. */ typedef struct png_struct_def png_struct; typedef const png_struct * png_const_structp; typedef png_struct * png_structp; typedef png_struct * * png_structpp; /* png_info contains information read from or to be written to a PNG file. One * or more of these must exist while reading or creating a PNG file. The * information is not used by libpng during read but is used to control what * gets written when a PNG file is created. "png_get_" function calls read * information during read and "png_set_" functions calls write information * when creating a PNG. * been moved into a separate header file that is not accessible to * applications. Read libpng-manual.txt or libpng.3 for more info. */ typedef struct png_info_def png_info; typedef png_info * png_infop; typedef const png_info * png_const_infop; typedef png_info * * png_infopp; /* Types with names ending 'p' are pointer types. The corresponding types with * names ending 'rp' are identical pointer types except that the pointer is * marked 'restrict', which means that it is the only pointer to the object * passed to the function. Applications should not use the 'restrict' types; * it is always valid to pass 'p' to a pointer with a function argument of the * corresponding 'rp' type. Different compilers have different rules with * regard to type matching in the presence of 'restrict'. For backward * compatibility libpng callbacks never have 'restrict' in their parameters and, * consequentially, writing portable application code is extremely difficult if * an attempt is made to use 'restrict'. */ typedef png_struct * PNG_RESTRICT png_structrp; typedef const png_struct * PNG_RESTRICT png_const_structrp; typedef png_info * PNG_RESTRICT png_inforp; typedef const png_info * PNG_RESTRICT png_const_inforp; /* Three color definitions. The order of the red, green, and blue, (and the * exact size) is not important, although the size of the fields need to * be png_byte or png_uint_16 (as defined below). */ typedef struct png_color_struct { png_byte red; png_byte green; png_byte blue; } png_color; typedef png_color * png_colorp; typedef const png_color * png_const_colorp; typedef png_color * * png_colorpp; typedef struct png_color_16_struct { png_byte index; /* used for palette files */ png_uint_16 red; /* for use in red green blue files */ png_uint_16 green; png_uint_16 blue; png_uint_16 gray; /* for use in grayscale files */ } png_color_16; typedef png_color_16 * png_color_16p; typedef const png_color_16 * png_const_color_16p; typedef png_color_16 * * png_color_16pp; typedef struct png_color_8_struct { png_byte red; /* for use in red green blue files */ png_byte green; png_byte blue; png_byte gray; /* for use in grayscale files */ png_byte alpha; /* for alpha channel files */ } png_color_8; typedef png_color_8 * png_color_8p; typedef const png_color_8 * png_const_color_8p; typedef png_color_8 * * png_color_8pp; /* * The following two structures are used for the in-core representation * of sPLT chunks. */ typedef struct png_sPLT_entry_struct { png_uint_16 red; png_uint_16 green; png_uint_16 blue; png_uint_16 alpha; png_uint_16 frequency; } png_sPLT_entry; typedef png_sPLT_entry * png_sPLT_entryp; typedef const png_sPLT_entry * png_const_sPLT_entryp; typedef png_sPLT_entry * * png_sPLT_entrypp; /* When the depth of the sPLT palette is 8 bits, the color and alpha samples * occupy the LSB of their respective members, and the MSB of each member * is zero-filled. The frequency member always occupies the full 16 bits. */ typedef struct png_sPLT_struct { png_charp name; /* palette name */ png_byte depth; /* depth of palette samples */ png_sPLT_entryp entries; /* palette entries */ png_int_32 nentries; /* number of palette entries */ } png_sPLT_t; typedef png_sPLT_t * png_sPLT_tp; typedef const png_sPLT_t * png_const_sPLT_tp; typedef png_sPLT_t * * png_sPLT_tpp; #ifdef PNG_TEXT_SUPPORTED /* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, * and whether that contents is compressed or not. The "key" field * points to a regular zero-terminated C string. The "text" fields can be a * regular C string, an empty string, or a NULL pointer. * However, the structure returned by png_get_text() will always contain * the "text" field as a regular zero-terminated C string (possibly * empty), never a NULL pointer, so it can be safely used in printf() and * other string-handling functions. Note that the "itxt_length", "lang", and * "lang_key" members of the structure only exist when the library is built * with iTXt chunk support. Prior to libpng-1.4.0 the library was built by * default without iTXt support. Also note that when iTXt *is* supported, * the "lang" and "lang_key" fields contain NULL pointers when the * "compression" field contains * PNG_TEXT_COMPRESSION_NONE or * PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the * same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag" * which is always 0 or 1, or its "compression method" which is always 0. */ typedef struct png_text_struct { int compression; /* compression value: -1: tEXt, none 0: zTXt, deflate 1: iTXt, none 2: iTXt, deflate */ png_charp key; /* keyword, 1-79 character description of "text" */ png_charp text; /* comment, may be an empty string (ie "") or a NULL pointer */ png_size_t text_length; /* length of the text string */ png_size_t itxt_length; /* length of the itxt string */ png_charp lang; /* language code, 0-79 characters or a NULL pointer */ png_charp lang_key; /* keyword translated UTF-8 string, 0 or more chars or a NULL pointer */ } png_text; typedef png_text * png_textp; typedef const png_text * png_const_textp; typedef png_text * * png_textpp; #endif /* Supported compression types for text in PNG files (tEXt, and zTXt). * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ #define PNG_TEXT_COMPRESSION_NONE_WR -3 #define PNG_TEXT_COMPRESSION_zTXt_WR -2 #define PNG_TEXT_COMPRESSION_NONE -1 #define PNG_TEXT_COMPRESSION_zTXt 0 #define PNG_ITXT_COMPRESSION_NONE 1 #define PNG_ITXT_COMPRESSION_zTXt 2 #define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ /* png_time is a way to hold the time in an machine independent way. * Two conversions are provided, both from time_t and struct tm. There * is no portable way to convert to either of these structures, as far * as I know. If you know of a portable way, send it to me. As a side * note - PNG has always been Year 2000 compliant! */ typedef struct png_time_struct { png_uint_16 year; /* full year, as in, 1995 */ png_byte month; /* month of year, 1 - 12 */ png_byte day; /* day of month, 1 - 31 */ png_byte hour; /* hour of day, 0 - 23 */ png_byte minute; /* minute of hour, 0 - 59 */ png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ } png_time; typedef png_time * png_timep; typedef const png_time * png_const_timep; typedef png_time * * png_timepp; #if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) ||\ defined(PNG_USER_CHUNKS_SUPPORTED) /* png_unknown_chunk is a structure to hold queued chunks for which there is * no specific support. The idea is that we can use this to queue * up private chunks for output even though the library doesn't actually * know about their semantics. * * The data in the structure is set by libpng on read and used on write. */ typedef struct png_unknown_chunk_t { png_byte name[5]; /* Textual chunk name with '\0' terminator */ png_byte *data; /* Data, should not be modified on read! */ png_size_t size; /* On write 'location' must be set using the flag values listed below. * Notice that on read it is set by libpng however the values stored have * more bits set than are listed below. Always treat the value as a * bitmask. On write set only one bit - setting multiple bits may cause the * chunk to be written in multiple places. */ png_byte location; /* mode of operation at read time */ } png_unknown_chunk; typedef png_unknown_chunk * png_unknown_chunkp; typedef const png_unknown_chunk * png_const_unknown_chunkp; typedef png_unknown_chunk * * png_unknown_chunkpp; #endif /* Flag values for the unknown chunk location byte. */ #define PNG_HAVE_IHDR 0x01 #define PNG_HAVE_PLTE 0x02 #define PNG_AFTER_IDAT 0x08 /* Maximum positive integer used in PNG is (2^31)-1 */ #define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) #define PNG_UINT_32_MAX ((png_uint_32)(-1)) #define PNG_SIZE_MAX ((png_size_t)(-1)) /* These are constants for fixed point values encoded in the * PNG specification manner (x100000) */ #define PNG_FP_1 100000 #define PNG_FP_HALF 50000 #define PNG_FP_MAX ((png_fixed_point)0x7fffffffL) #define PNG_FP_MIN (-PNG_FP_MAX) /* These describe the color_type field in png_info. */ /* color type masks */ #define PNG_COLOR_MASK_PALETTE 1 #define PNG_COLOR_MASK_COLOR 2 #define PNG_COLOR_MASK_ALPHA 4 /* color types. Note that not all combinations are legal */ #define PNG_COLOR_TYPE_GRAY 0 #define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) #define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) #define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) #define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) /* aliases */ #define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA #define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA /* This is for compression type. PNG 1.0-1.2 only define the single type. */ #define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ #define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE /* This is for filter type. PNG 1.0-1.2 only define the single type. */ #define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ #define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ #define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE /* These are for the interlacing type. These values should NOT be changed. */ #define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ #define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ #define PNG_INTERLACE_LAST 2 /* Not a valid value */ /* These are for the oFFs chunk. These values should NOT be changed. */ #define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ #define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ #define PNG_OFFSET_LAST 2 /* Not a valid value */ /* These are for the pCAL chunk. These values should NOT be changed. */ #define PNG_EQUATION_LINEAR 0 /* Linear transformation */ #define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ #define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ #define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ #define PNG_EQUATION_LAST 4 /* Not a valid value */ /* These are for the sCAL chunk. These values should NOT be changed. */ #define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ #define PNG_SCALE_METER 1 /* meters per pixel */ #define PNG_SCALE_RADIAN 2 /* radians per pixel */ #define PNG_SCALE_LAST 3 /* Not a valid value */ /* These are for the pHYs chunk. These values should NOT be changed. */ #define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ #define PNG_RESOLUTION_METER 1 /* pixels/meter */ #define PNG_RESOLUTION_LAST 2 /* Not a valid value */ /* These are for the sRGB chunk. These values should NOT be changed. */ #define PNG_sRGB_INTENT_PERCEPTUAL 0 #define PNG_sRGB_INTENT_RELATIVE 1 #define PNG_sRGB_INTENT_SATURATION 2 #define PNG_sRGB_INTENT_ABSOLUTE 3 #define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ /* This is for text chunks */ #define PNG_KEYWORD_MAX_LENGTH 79 /* Maximum number of entries in PLTE/sPLT/tRNS arrays */ #define PNG_MAX_PALETTE_LENGTH 256 /* These determine if an ancillary chunk's data has been successfully read * from the PNG header, or if the application has filled in the corresponding * data in the info_struct to be written into the output file. The values * of the PNG_INFO_ defines should NOT be changed. */ #define PNG_INFO_gAMA 0x0001U #define PNG_INFO_sBIT 0x0002U #define PNG_INFO_cHRM 0x0004U #define PNG_INFO_PLTE 0x0008U #define PNG_INFO_tRNS 0x0010U #define PNG_INFO_bKGD 0x0020U #define PNG_INFO_hIST 0x0040U #define PNG_INFO_pHYs 0x0080U #define PNG_INFO_oFFs 0x0100U #define PNG_INFO_tIME 0x0200U #define PNG_INFO_pCAL 0x0400U #define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */ #define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */ #define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */ #define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */ #define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */ #define PNG_INFO_eXIf 0x10000U /* GR-P, 1.6.31 */ /* This is used for the transformation routines, as some of them * change these values for the row. It also should enable using * the routines for other purposes. */ typedef struct png_row_info_struct { png_uint_32 width; /* width of row */ png_size_t rowbytes; /* number of bytes in row */ png_byte color_type; /* color type of row */ png_byte bit_depth; /* bit depth of row */ png_byte channels; /* number of channels (1, 2, 3, or 4) */ png_byte pixel_depth; /* bits per pixel (depth * channels) */ } png_row_info; typedef png_row_info * png_row_infop; typedef png_row_info * * png_row_infopp; /* These are the function types for the I/O functions and for the functions * that allow the user to override the default I/O functions with his or her * own. The png_error_ptr type should match that of user-supplied warning * and error functions, while the png_rw_ptr type should match that of the * user read/write data functions. Note that the 'write' function must not * modify the buffer it is passed. The 'read' function, on the other hand, is * expected to return the read data in the buffer. */ typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t)); typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, int)); typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); /* The following callback receives png_uint_32 row_number, int pass for the * png_bytep data of the row. When transforming an interlaced image the * row number is the row number within the sub-image of the interlace pass, so * the value will increase to the height of the sub-image (not the full image) * then reset to 0 for the next pass. * * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to * find the output pixel (x,y) given an interlaced sub-image pixel * (row,col,pass). (See below for these macros.) */ typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, png_uint_32, int)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, png_bytep)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, png_unknown_chunkp)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED /* not used anywhere */ /* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */ #endif #ifdef PNG_SETJMP_SUPPORTED /* This must match the function definition in , and the application * must include this before png.h to obtain the definition of jmp_buf. The * function is required to be PNG_NORETURN, but this is not checked. If the * function does return the application will crash via an abort() or similar * system level call. * * If you get a warning here while building the library you may need to make * changes to ensure that pnglibconf.h records the calling convention used by * your compiler. This may be very difficult - try using a different compiler * to build the library! */ PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); #endif /* Transform masks for the high-level interface */ #define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ #define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ #define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ #define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ #define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ #define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ #define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ #define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ #define PNG_TRANSFORM_BGR 0x0080 /* read and write */ #define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ #define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ #define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ #define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ /* Added to libpng-1.2.34 */ #define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER #define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ /* Added to libpng-1.4.0 */ #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ /* Added to libpng-1.5.4 */ #define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ #if INT_MAX >= 0x8000 /* else this might break */ #define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ #endif /* Flags for MNG supported features */ #define PNG_FLAG_MNG_EMPTY_PLTE 0x01 #define PNG_FLAG_MNG_FILTER_64 0x04 #define PNG_ALL_MNG_FEATURES 0x05 /* NOTE: prior to 1.5 these functions had no 'API' style declaration, * this allowed the zlib default functions to be used on Windows * platforms. In 1.5 the zlib default malloc (which just calls malloc and * ignores the first argument) should be completely compatible with the * following. */ typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, png_alloc_size_t)); typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); /* Section 4: exported functions * Here are the function definitions most commonly used. This is not * the place to find out how to use libpng. See libpng-manual.txt for the * full explanation, see example.c for the summary. This just provides * a simple one line description of the use of each function. * * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in * pngconf.h and in the *.dfn files in the scripts directory. * * PNG_EXPORT(ordinal, type, name, (args)); * * ordinal: ordinal that is used while building * *.def files. The ordinal value is only * relevant when preprocessing png.h with * the *.dfn files for building symbol table * entries, and are removed by pngconf.h. * type: return type of the function * name: function name * args: function arguments, with types * * When we wish to append attributes to a function prototype we use * the PNG_EXPORTA() macro instead. * * PNG_EXPORTA(ordinal, type, name, (args), attributes); * * ordinal, type, name, and args: same as in PNG_EXPORT(). * attributes: function attributes */ /* Returns the version number of the library */ PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); /* Tell lib we have already handled the first magic bytes. * Handling more than 8 bytes from the beginning of the file is an error. */ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a * PNG file. Returns zero if the supplied bytes match the 8-byte PNG * signature, and non-zero otherwise. Having num_to_check == 0 or * start > 7 will always fail (ie return non-zero). */ PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, png_size_t num_to_check)); /* Simple signature checking function. This is the same as calling * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). */ #define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) /* Allocate and initialize png_ptr struct for reading, and any other memory. */ PNG_EXPORTA(4, png_structp, png_create_read_struct, (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn), PNG_ALLOCATED); /* Allocate and initialize png_ptr struct for writing, and any other memory */ PNG_EXPORTA(5, png_structp, png_create_write_struct, (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn), PNG_ALLOCATED); PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size, (png_const_structrp png_ptr)); PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, png_size_t size)); /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp * match up. */ #ifdef PNG_SETJMP_SUPPORTED /* This function returns the jmp_buf built in to *png_ptr. It must be * supplied with an appropriate 'longjmp' function to use on that jmp_buf * unless the default error function is overridden in which case NULL is * acceptable. The size of the jmp_buf is checked against the actual size * allocated by the library - the call will return NULL on a mismatch * indicating an ABI mismatch. */ PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); # define png_jmpbuf(png_ptr) \ (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) #else # define png_jmpbuf(png_ptr) \ (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) #endif /* This function should be used by libpng applications in place of * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it * will use it; otherwise it will call PNG_ABORT(). This function was * added in libpng-1.5.0. */ PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), PNG_NORETURN); #ifdef PNG_READ_SUPPORTED /* Reset the compression stream */ PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); #endif /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ #ifdef PNG_USER_MEM_SUPPORTED PNG_EXPORTA(11, png_structp, png_create_read_struct_2, (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), PNG_ALLOCATED); PNG_EXPORTA(12, png_structp, png_create_write_struct_2, (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), PNG_ALLOCATED); #endif /* Write the PNG file signature. */ PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); /* Write a PNG chunk - size, type, (optional) data, CRC. */ PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep chunk_name, png_const_bytep data, png_size_t length)); /* Write the start of a PNG chunk - length and chunk name. */ PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr, png_const_bytep chunk_name, png_uint_32 length)); /* Write the data of a PNG chunk started with png_write_chunk_start(). */ PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr, png_const_bytep data, png_size_t length)); /* Finish a chunk started with png_write_chunk_start() (includes CRC). */ PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr)); /* Allocate and initialize the info structure */ PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr), PNG_ALLOCATED); /* DEPRECATED: this function allowed init structures to be created using the * default allocation method (typically malloc). Use is deprecated in 1.6.0 and * the API will be removed in the future. */ PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, png_size_t png_info_struct_size), PNG_DEPRECATED); /* Writes all the PNG information before the image. */ PNG_EXPORT(20, void, png_write_info_before_PLTE, (png_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(21, void, png_write_info, (png_structrp png_ptr, png_const_inforp info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the information before the actual image data. */ PNG_EXPORT(22, void, png_read_info, (png_structrp png_ptr, png_inforp info_ptr)); #endif #ifdef PNG_TIME_RFC1123_SUPPORTED /* Convert to a US string format: there is no localization support in this * routine. The original implementation used a 29 character buffer in * png_struct, this will be removed in future versions. */ #if PNG_LIBPNG_VER < 10700 /* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */ PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, png_const_timep ptime),PNG_DEPRECATED); #endif PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29], png_const_timep ptime)); #endif #ifdef PNG_CONVERT_tIME_SUPPORTED /* Convert from a struct tm to png_time */ PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, const struct tm * ttime)); /* Convert from time_t to png_time. Uses gmtime() */ PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime)); #endif /* CONVERT_tIME */ #ifdef PNG_READ_EXPAND_SUPPORTED /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr)); PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr)); PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr)); PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr)); #endif #ifdef PNG_READ_EXPAND_16_SUPPORTED /* Expand to 16-bit channels, forces conversion of palette to RGB and expansion * of a tRNS chunk if present. */ PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr)); #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* Use blue, green, red order for pixels. */ PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr)); #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Expand the grayscale to 24-bit RGB if necessary. */ PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* Reduce RGB to grayscale. */ #define PNG_ERROR_ACTION_NONE 1 #define PNG_ERROR_ACTION_WARN 2 #define PNG_ERROR_ACTION_ERROR 3 #define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/ PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr, int error_action, double red, double green)) PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr, int error_action, png_fixed_point red, png_fixed_point green)) PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp png_ptr)); #endif #ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, png_colorp palette)); #endif #ifdef PNG_READ_ALPHA_MODE_SUPPORTED /* How the alpha channel is interpreted - this affects how the color channels * of a PNG file are returned to the calling application when an alpha channel, * or a tRNS chunk in a palette file, is present. * * This has no effect on the way pixels are written into a PNG output * datastream. The color samples in a PNG datastream are never premultiplied * with the alpha samples. * * The default is to return data according to the PNG specification: the alpha * channel is a linear measure of the contribution of the pixel to the * corresponding composited pixel, and the color channels are unassociated * (not premultiplied). The gamma encoded color channels must be scaled * according to the contribution and to do this it is necessary to undo * the encoding, scale the color values, perform the composition and reencode * the values. This is the 'PNG' mode. * * The alternative is to 'associate' the alpha with the color information by * storing color channel values that have been scaled by the alpha. * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes * (the latter being the two common names for associated alpha color channels). * * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha * value is equal to the maximum value. * * The final choice is to gamma encode the alpha channel as well. This is * broken because, in practice, no implementation that uses this choice * correctly undoes the encoding before handling alpha composition. Use this * choice only if other serious errors in the software or hardware you use * mandate it; the typical serious error is for dark halos to appear around * opaque areas of the composited PNG image because of arithmetic overflow. * * The API function png_set_alpha_mode specifies which of these choices to use * with an enumerated 'mode' value and the gamma of the required output: */ #define PNG_ALPHA_PNG 0 /* according to the PNG standard */ #define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ #define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ #define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ #define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ #define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode, double output_gamma)) PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, int mode, png_fixed_point output_gamma)) #endif #if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) /* The output_gamma value is a screen gamma in libpng terminology: it expresses * how to decode the output values, not how they are encoded. */ #define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ #define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ #define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ #define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ #endif /* The following are examples of calls to png_set_alpha_mode to achieve the * required overall gamma correction and, where necessary, alpha * premultiplication. * * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); * This is the default libpng handling of the alpha channel - it is not * pre-multiplied into the color components. In addition the call states * that the output is for a sRGB system and causes all PNG files without gAMA * chunks to be assumed to be encoded using sRGB. * * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); * In this case the output is assumed to be something like an sRGB conformant * display preceeded by a power-law lookup table of power 1.45. This is how * early Mac systems behaved. * * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); * This is the classic Jim Blinn approach and will work in academic * environments where everything is done by the book. It has the shortcoming * of assuming that input PNG data with no gamma information is linear - this * is unlikely to be correct unless the PNG files where generated locally. * Most of the time the output precision will be so low as to show * significant banding in dark areas of the image. * * png_set_expand_16(pp); * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); * This is a somewhat more realistic Jim Blinn inspired approach. PNG files * are assumed to have the sRGB encoding if not marked with a gamma value and * the output is always 16 bits per component. This permits accurate scaling * and processing of the data. If you know that your input PNG files were * generated locally you might need to replace PNG_DEFAULT_sRGB with the * correct value for your system. * * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); * If you just need to composite the PNG image onto an existing background * and if you control the code that does this you can use the optimization * setting. In this case you just copy completely opaque pixels to the * output. For pixels that are not completely transparent (you just skip * those) you do the composition math using png_composite or png_composite_16 * below then encode the resultant 8-bit or 16-bit values to match the output * encoding. * * Other cases * If neither the PNG nor the standard linear encoding work for you because * of the software or hardware you use then you have a big problem. The PNG * case will probably result in halos around the image. The linear encoding * will probably result in a washed out, too bright, image (it's actually too * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably * substantially reduce the halos. Alternatively try: * * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); * This option will also reduce the halos, but there will be slight dark * halos round the opaque parts of the image where the background is light. * In the OPTIMIZED mode the halos will be light halos where the background * is dark. Take your pick - the halos are unavoidable unless you can get * your hardware/software fixed! (The OPTIMIZED approach is slightly * faster.) * * When the default gamma of PNG files doesn't match the output gamma. * If you have PNG files with no gamma information png_set_alpha_mode allows * you to provide a default gamma, but it also sets the ouput gamma to the * matching value. If you know your PNG files have a gamma that doesn't * match the output you can take advantage of the fact that * png_set_alpha_mode always sets the output gamma but only sets the PNG * default if it is not already set: * * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); * The first call sets both the default and the output gamma values, the * second call overrides the output gamma without changing the default. This * is easier than achieving the same effect with png_set_gamma. You must use * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will * fire if more than one call to png_set_alpha_mode and png_set_background is * made in the same read operation, however multiple calls with PNG_ALPHA_PNG * are ignored. */ #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr)); #endif #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr)); #endif #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); #endif #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) /* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, int flags)); /* The values of the PNG_FILLER_ defines should NOT be changed */ # define PNG_FILLER_BEFORE 0 # define PNG_FILLER_AFTER 1 /* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, png_uint_32 filler, int flags)); #endif /* READ_FILLER || WRITE_FILLER */ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) /* Swap bytes in 16-bit depth files. */ PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr)); #endif #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr)); #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr)); #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) /* Converts files to legal bit depths. */ PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p true_bits)); #endif #if defined(PNG_READ_INTERLACING_SUPPORTED) || \ defined(PNG_WRITE_INTERLACING_SUPPORTED) /* Have the code handle the interlacing. Returns the number of passes. * MUST be called before png_read_update_info or png_start_read_image, * otherwise it will not have the desired effect. Note that it is still * necessary to call png_read_row or png_read_rows png_get_image_height * times for each pass. */ PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr)); #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) /* Invert monochrome files */ PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED /* Handle alpha and tRNS by replacing with a background color. Prior to * libpng-1.5.4 this API must not be called before the PNG file header has been * read. Doing so will result in unexpected behavior and possible warnings or * errors if the PNG file contains a bKGD chunk. */ PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr, png_const_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma)) PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr, png_const_color_16p background_color, int background_gamma_code, int need_expand, png_fixed_point background_gamma)) #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED # define PNG_BACKGROUND_GAMMA_UNKNOWN 0 # define PNG_BACKGROUND_GAMMA_SCREEN 1 # define PNG_BACKGROUND_GAMMA_FILE 2 # define PNG_BACKGROUND_GAMMA_UNIQUE 3 #endif #ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED /* Scale a 16-bit depth file down to 8-bit, accurately. */ PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr)); #endif #ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED #define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */ /* Strip the second byte of information from a 16-bit depth file. */ PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr)); #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED /* Turn on quantizing, and reduce the palette to the number of colors * available. */ PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_const_uint_16p histogram, int full_quantize)); #endif #ifdef PNG_READ_GAMMA_SUPPORTED /* The threshold on gamma processing is configurable but hard-wired into the * library. The following is the floating point variant. */ #define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) /* Handle gamma correction. Screen_gamma=(display_exponent). * NOTE: this API simply sets the screen and file gamma values. It will * therefore override the value for gamma in a PNG file if it is called after * the file header has been read - use with care - call before reading the PNG * file for best results! * * These routines accept the same gamma values as png_set_alpha_mode (described * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either * API (floating point or fixed.) Notice, however, that the 'file_gamma' value * is the inverse of a 'screen gamma' value. */ PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr, double screen_gamma, double override_file_gamma)) PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr, png_fixed_point screen_gamma, png_fixed_point override_file_gamma)) #endif #ifdef PNG_WRITE_FLUSH_SUPPORTED /* Set how many lines between output flushes - 0 for no flushing */ PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows)); /* Flush the current PNG output buffer */ PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr)); #endif /* Optional update palette with requested transformations */ PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr)); /* Optional call to update the users info structure */ PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr, png_inforp info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. */ PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read a row of data. */ PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row, png_bytep display_row)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the whole image into memory at once. */ PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image)); #endif /* Write a row of image data */ PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr, png_const_bytep row)); /* Write a few rows of image data: (*row) is not written; however, the type * is declared as writeable to maintain compatibility with previous versions * of libpng and to allow the 'display_row' array from read_rows to be passed * unchanged to write_rows. */ PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row, png_uint_32 num_rows)); /* Write the image data */ PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image)); /* Write the end of the PNG file. */ PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr, png_inforp info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the end of the PNG file. */ PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); #endif /* Free any memory associated with the png_info_struct */ PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr, png_infopp info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); /* Set the libpng method of handling chunk CRC errors */ PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, int ancil_action)); /* Values for png_set_crc_action() say how to handle CRC errors in * ancillary and critical chunks, and whether to use the data contained * therein. Note that it is impossible to "discard" data in a critical * chunk. For versions prior to 0.90, the action was always error/quit, * whereas in version 0.90 and later, the action for CRC errors in ancillary * chunks is warn/discard. These values should NOT be changed. * * value action:critical action:ancillary */ #define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ #define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ #define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ #define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ #define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ #define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ #ifdef PNG_WRITE_SUPPORTED /* These functions give the user control over the scan-line filtering in * libpng and the compression methods used by zlib. These functions are * mainly useful for testing, as the defaults should work with most users. * Those users who are tight on memory or want faster performance at the * expense of compression can modify them. See the compression library * header file (zlib.h) for an explination of the compression functions. */ /* Set the filtering method(s) used by libpng. Currently, the only valid * value for "method" is 0. */ PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method, int filters)); #endif /* WRITE */ /* Flags for png_set_filter() to say which filters to use. The flags * are chosen so that they don't conflict with real filter types * below, in case they are supplied instead of the #defined constants. * These values should NOT be changed. */ #define PNG_NO_FILTERS 0x00 #define PNG_FILTER_NONE 0x08 #define PNG_FILTER_SUB 0x10 #define PNG_FILTER_UP 0x20 #define PNG_FILTER_AVG 0x40 #define PNG_FILTER_PAETH 0x80 #define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP) #define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH) /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. * These defines should NOT be changed. */ #define PNG_FILTER_VALUE_NONE 0 #define PNG_FILTER_VALUE_SUB 1 #define PNG_FILTER_VALUE_UP 2 #define PNG_FILTER_VALUE_AVG 3 #define PNG_FILTER_VALUE_PAETH 4 #define PNG_FILTER_VALUE_LAST 5 #ifdef PNG_WRITE_SUPPORTED #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr, int heuristic_method, int num_weights, png_const_doublep filter_weights, png_const_doublep filter_costs)) PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, (png_structrp png_ptr, int heuristic_method, int num_weights, png_const_fixed_point_p filter_weights, png_const_fixed_point_p filter_costs)) #endif /* WRITE_WEIGHTED_FILTER */ /* The following are no longer used and will be removed from libpng-1.7: */ #define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ #define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ #define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ #define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ /* Set the library compression level. Currently, valid values range from * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 * (0 - no compression, 9 - "maximal" compression). Note that tests have * shown that zlib compression levels 3-6 usually perform as well as level 9 * for PNG images, and do considerably fewer caclulations. In the future, * these values may not correspond directly to the zlib compression levels. */ #ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, int level)); PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr, int mem_level)); PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr, int strategy)); /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a * smaller value of window_bits if it can do so safely. */ PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, int window_bits)); PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, int method)); #endif /* WRITE_CUSTOMIZE_COMPRESSION */ #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED /* Also set zlib parameters for compressing non-IDAT chunks */ PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr, int level)); PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr, int mem_level)); PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr, int strategy)); /* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a * smaller value of window_bits if it can do so safely. */ PNG_EXPORT(225, void, png_set_text_compression_window_bits, (png_structrp png_ptr, int window_bits)); PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr, int method)); #endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */ #endif /* WRITE */ /* These next functions are called for input/output, memory, and error * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, * and call standard C I/O routines such as fread(), fwrite(), and * fprintf(). These functions can be made to use other I/O routines * at run time for those applications that need to handle I/O in a * different manner by calling png_set_???_fn(). See libpng-manual.txt for * more information. */ #ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp)); #endif /* Replace the (error and abort), and warning functions with user * supplied functions. If no messages are to be printed you must still * write and use replacement functions. The replacement error_fn should * still do a longjmp to the last setjmp location if you are using this * method of error handling. If error_fn or warning_fn is NULL, the * default function will be used. */ PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); /* Return the user pointer associated with the error functions */ PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr)); /* Replace the default data output functions with a user supplied one(s). * If buffered output is not used, then output_flush_fn can be set to NULL. * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time * output_flush_fn will be ignored (and thus can be NULL). * It is probably a mistake to use NULL for output_flush_fn if * write_data_fn is not also NULL unless you have built libpng with * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's * default flush function, which uses the standard *FILE structure, will * be used. */ PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); /* Replace the default data input function with a user supplied one. */ PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn)); /* Return the user pointer associated with the I/O functions */ PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr)); PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr, png_read_status_ptr read_row_fn)); PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr, png_write_status_ptr write_row_fn)); #ifdef PNG_USER_MEM_SUPPORTED /* Replace the default memory allocation functions with user supplied one(s). */ PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* Return the user pointer associated with the memory functions */ PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr)); #endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr, png_user_transform_ptr read_user_transform_fn)); #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr, png_user_transform_ptr write_user_transform_fn)); #endif #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels)); /* Return the user pointer associated with the user transform functions */ PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, (png_const_structrp png_ptr)); #endif #ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED /* Return information about the row currently being processed. Note that these * APIs do not fail but will return unexpected results if called outside a user * transform callback. Also note that when transforming an interlaced image the * row number is the row number within the sub-image of the interlace pass, so * the value will increase to the height of the sub-image (not the full image) * then reset to 0 for the next pass. * * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to * find the output pixel (x,y) given an interlaced sub-image pixel * (row,col,pass). (See below for these macros.) */ PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp)); PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp)); #endif #ifdef PNG_READ_USER_CHUNKS_SUPPORTED /* This callback is called only for *unknown* chunks. If * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known * chunks to be treated as unknown, however in this case the callback must do * any processing required by the chunk (e.g. by calling the appropriate * png_set_ APIs.) * * There is no write support - on write, by default, all the chunks in the * 'unknown' list are written in the specified position. * * The integer return from the callback function is interpreted thus: * * negative: An error occurred; png_chunk_error will be called. * zero: The chunk was not handled, the chunk will be saved. A critical * chunk will cause an error at this point unless it is to be saved. * positive: The chunk was handled, libpng will ignore/discard it. * * See "INTERACTION WTIH USER CHUNK CALLBACKS" below for important notes about * how this behavior will change in libpng 1.7 */ PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr)); #endif #ifdef PNG_PROGRESSIVE_READ_SUPPORTED /* Sets the function callbacks for the push reader, and a pointer to a * user-defined structure available to the callback functions. */ PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); /* Returns the user pointer associated with the push read functions */ PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (png_const_structrp png_ptr)); /* Function to be called when data becomes available */ PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr, png_inforp info_ptr, png_bytep buffer, png_size_t buffer_size)); /* A function which may be called *only* within png_process_data to stop the * processing of any more data. The function returns the number of bytes * remaining, excluding any that libpng has cached internally. A subsequent * call to png_process_data must supply these bytes again. If the argument * 'save' is set to true the routine will first save all the pending data and * will always return 0. */ PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structrp, int save)); /* A function which may be called *only* outside (after) a call to * png_process_data. It returns the number of bytes of data to skip in the * input. Normally it will return 0, but if it returns a non-zero value the * application must skip than number of bytes of input data and pass the * following data to the next call to png_process_data. */ PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp)); /* Function that combines rows. 'new_row' is a flag that should come from * the callback and be non-NULL if anything needs to be done; the library * stores its own version of the new data internally and ignores the passed * in value. */ PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr, png_bytep old_row, png_const_bytep new_row)); #endif /* PROGRESSIVE_READ */ PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr, png_alloc_size_t size), PNG_ALLOCATED); /* Added at libpng version 1.4.0 */ PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr, png_alloc_size_t size), PNG_ALLOCATED); /* Added at libpng version 1.2.4 */ PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr, png_alloc_size_t size), PNG_ALLOCATED); /* Frees a pointer allocated by png_malloc() */ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); /* Free data that was allocated internally */ PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 free_me, int num)); /* Reassign responsibility for freeing existing data, whether allocated * by libpng or by the application; this works on the png_info structure passed * in, it does not change the state for other png_info structures. * * It is unlikely that this function works correctly as of 1.6.0 and using it * may result either in memory leaks or double free of allocated data. */ PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr, png_inforp info_ptr, int freer, png_uint_32 mask)); /* Assignments for png_data_freer */ #define PNG_DESTROY_WILL_FREE_DATA 1 #define PNG_SET_WILL_FREE_DATA 1 #define PNG_USER_WILL_FREE_DATA 2 /* Flags for png_ptr->free_me and info_ptr->free_me */ #define PNG_FREE_HIST 0x0008U #define PNG_FREE_ICCP 0x0010U #define PNG_FREE_SPLT 0x0020U #define PNG_FREE_ROWS 0x0040U #define PNG_FREE_PCAL 0x0080U #define PNG_FREE_SCAL 0x0100U #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED # define PNG_FREE_UNKN 0x0200U #endif /* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */ #define PNG_FREE_PLTE 0x1000U #define PNG_FREE_TRNS 0x2000U #define PNG_FREE_TEXT 0x4000U #define PNG_FREE_EXIF 0x8000U /* Added at libpng-1.6.31 */ #define PNG_FREE_ALL 0xffffU #define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ #ifdef PNG_USER_MEM_SUPPORTED PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, png_voidp ptr), PNG_DEPRECATED); #endif #ifdef PNG_ERROR_TEXT_SUPPORTED /* Fatal error in PNG image of libpng - can't continue */ PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr, png_const_charp error_message), PNG_NORETURN); /* The same, but the chunk name is prepended to the error string. */ PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr, png_const_charp error_message), PNG_NORETURN); #else /* Fatal error in PNG image of libpng - can't continue */ PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN); # define png_error(s1,s2) png_err(s1) # define png_chunk_error(s1,s2) png_err(s1) #endif #ifdef PNG_WARNINGS_SUPPORTED /* Non-fatal error in libpng. Can continue, but may have a problem. */ PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr, png_const_charp warning_message)); /* Non-fatal error in libpng, chunk name is prepended to message. */ PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr, png_const_charp warning_message)); #else # define png_warning(s1,s2) ((void)(s1)) # define png_chunk_warning(s1,s2) ((void)(s1)) #endif #ifdef PNG_BENIGN_ERRORS_SUPPORTED /* Benign error in libpng. Can continue, but may have a problem. * User can choose whether to handle as a fatal error or as a warning. */ PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr, png_const_charp warning_message)); #ifdef PNG_READ_SUPPORTED /* Same, chunk name is prepended to message (only during read) */ PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr, png_const_charp warning_message)); #endif PNG_EXPORT(109, void, png_set_benign_errors, (png_structrp png_ptr, int allowed)); #else # ifdef PNG_ALLOW_BENIGN_ERRORS # define png_benign_error png_warning # define png_chunk_benign_error png_chunk_warning # else # define png_benign_error png_error # define png_chunk_benign_error png_chunk_error # endif #endif /* The png_set_ functions are for storing values in the png_info_struct. * Similarly, the png_get_ calls are used to read values from the * png_info_struct, either storing the parameters in the passed variables, or * setting pointers into the png_info_struct where the data is stored. The * png_get_ functions return a non-zero value if the data was available * in info_ptr, or return zero and do not change any of the parameters if the * data was not available. * * These functions should be used instead of directly accessing png_info * to avoid problems with future changes in the size and internal layout of * png_info_struct. */ /* Returns "flag" if chunk data is valid in info_ptr. */ PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 flag)); /* Returns number of bytes needed to hold a transformed row. */ PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structrp png_ptr, png_const_inforp info_ptr)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* Returns row_pointers, which is an array of pointers to scanlines that was * returned from png_read_png(). */ PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Set row_pointers, which is an array of pointers to scanlines for use * by png_write_png(). */ PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr, png_inforp info_ptr, png_bytepp row_pointers)); #endif /* Returns number of color channels in image. */ PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr, png_const_inforp info_ptr)); #ifdef PNG_EASY_ACCESS_SUPPORTED /* Returns image width in pixels. */ PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns image height in pixels. */ PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns image bit_depth. */ PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns image color_type. */ PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns image filter_type. */ PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns image interlace_type. */ PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns image compression_type. */ PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns image resolution in pixels per meter, from pHYs chunk data. */ PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, (png_const_structrp png_ptr, png_const_inforp info_ptr)); /* Returns pixel aspect ratio, computed from pHYs chunk data. */ PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, (png_const_structrp png_ptr, png_const_inforp info_ptr)) PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, (png_const_structrp png_ptr, png_const_inforp info_ptr)) /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, (png_const_structrp png_ptr, png_const_inforp info_ptr)); #endif /* EASY_ACCESS */ #ifdef PNG_READ_SUPPORTED /* Returns pointer to signature string read from PNG header */ PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr, png_const_inforp info_ptr)); #endif #ifdef PNG_bKGD_SUPPORTED PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr, png_inforp info_ptr, png_color_16p *background)); #endif #ifdef PNG_bKGD_SUPPORTED PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_color_16p background)); #endif #ifdef PNG_cHRM_SUPPORTED PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr, png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x, double *red_y, double *green_x, double *green_y, double *blue_x, double *blue_y)) PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr, png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z, double *green_X, double *green_Y, double *green_Z, double *blue_X, double *blue_Y, double *blue_Z)) PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_fixed_point *int_white_x, png_fixed_point *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)) PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_fixed_point *int_red_X, png_fixed_point *int_red_Y, png_fixed_point *int_red_Z, png_fixed_point *int_green_X, png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, png_fixed_point *int_blue_Z)) #endif #ifdef PNG_cHRM_SUPPORTED PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr, png_inforp info_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)) PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr, png_inforp info_ptr, double red_X, double red_Y, double red_Z, double green_X, double green_Y, double green_Z, double blue_X, double blue_Y, double blue_Z)) PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr, png_inforp info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)) PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, png_fixed_point int_red_Z, png_fixed_point int_green_X, png_fixed_point int_green_Y, png_fixed_point int_green_Z, png_fixed_point int_blue_X, png_fixed_point int_blue_Y, png_fixed_point int_blue_Z)) #endif #ifdef PNG_eXIf_SUPPORTED PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, png_inforp info_ptr, png_bytep *exif)); PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, png_inforp info_ptr, const png_bytep exif)); PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif)); PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr, png_inforp info_ptr, const png_uint_32 num_exif, const png_bytep exif)); #endif #ifdef PNG_gAMA_SUPPORTED PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr, png_const_inforp info_ptr, double *file_gamma)) PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_fixed_point *int_file_gamma)) #endif #ifdef PNG_gAMA_SUPPORTED PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr, png_inforp info_ptr, double file_gamma)) PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr, png_inforp info_ptr, png_fixed_point int_file_gamma)) #endif #ifdef PNG_hIST_SUPPORTED PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_16p *hist)); PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_uint_16p hist)); #endif PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method)); PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_method, int compression_method, int filter_method)); #ifdef PNG_oFFs_SUPPORTED PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)); #endif #ifdef PNG_oFFs_SUPPORTED PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr, png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)); #endif #ifdef PNG_pCAL_SUPPORTED PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr, png_inforp info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params)); #endif #ifdef PNG_pCAL_SUPPORTED PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_const_charp units, png_charpp params)); #endif #ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif #ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); #endif PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr, png_inforp info_ptr, png_colorp *palette, int *num_palette)); PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr, png_inforp info_ptr, png_const_colorp palette, int num_palette)); #ifdef PNG_sBIT_SUPPORTED PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr, png_inforp info_ptr, png_color_8p *sig_bit)); #endif #ifdef PNG_sBIT_SUPPORTED PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_color_8p sig_bit)); #endif #ifdef PNG_sRGB_SUPPORTED PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr, png_const_inforp info_ptr, int *file_srgb_intent)); #endif #ifdef PNG_sRGB_SUPPORTED PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent)); PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent)); #endif #ifdef PNG_iCCP_SUPPORTED PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr, png_inforp info_ptr, png_charpp name, int *compression_type, png_bytepp profile, png_uint_32 *proflen)); #endif #ifdef PNG_iCCP_SUPPORTED PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_charp name, int compression_type, png_const_bytep profile, png_uint_32 proflen)); #endif #ifdef PNG_sPLT_SUPPORTED PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr, png_inforp info_ptr, png_sPLT_tpp entries)); #endif #ifdef PNG_sPLT_SUPPORTED PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)); #endif #ifdef PNG_TEXT_SUPPORTED /* png_get_text also returns the number of text chunks in *num_text */ PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr, png_inforp info_ptr, png_textp *text_ptr, int *num_text)); #endif /* Note while png_set_text() will accept a structure whose text, * language, and translated keywords are NULL pointers, the structure * returned by png_get_text will always contain regular * zero-terminated C strings. They might be empty strings but * they will never be NULL pointers. */ #ifdef PNG_TEXT_SUPPORTED PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_textp text_ptr, int num_text)); #endif #ifdef PNG_tIME_SUPPORTED PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr, png_inforp info_ptr, png_timep *mod_time)); #endif #ifdef PNG_tIME_SUPPORTED PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_timep mod_time)); #endif #ifdef PNG_tRNS_SUPPORTED PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr, png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)); #endif #ifdef PNG_tRNS_SUPPORTED PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr, png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color)); #endif #ifdef PNG_sCAL_SUPPORTED PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, double *width, double *height)) #if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ defined(PNG_FLOATING_POINT_SUPPORTED) /* NOTE: this API is currently implemented using floating point arithmetic, * consequently it can only be used on systems with floating point support. * In any case the range of values supported by png_fixed_point is small and it * is highly recommended that png_get_sCAL_s be used instead. */ PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, png_fixed_point *width, png_fixed_point *height)) #endif PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr, png_inforp info_ptr, int unit, double width, double height)) PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr, png_inforp info_ptr, int unit, png_fixed_point width, png_fixed_point height)) PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr, png_inforp info_ptr, int unit, png_const_charp swidth, png_const_charp sheight)); #endif /* sCAL */ #ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED /* Provide the default handling for all unknown chunks or, optionally, for * specific unknown chunks. * * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was * ignored and the default was used, the per-chunk setting only had an effect on * write. If you wish to have chunk-specific handling on read in code that must * work on earlier versions you must use a user chunk callback to specify the * desired handling (keep or discard.) * * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The * parameter is interpreted as follows: * * READ: * PNG_HANDLE_CHUNK_AS_DEFAULT: * Known chunks: do normal libpng processing, do not keep the chunk (but * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED) * Unknown chunks: for a specific chunk use the global default, when used * as the default discard the chunk data. * PNG_HANDLE_CHUNK_NEVER: * Discard the chunk data. * PNG_HANDLE_CHUNK_IF_SAFE: * Keep the chunk data if the chunk is not critical else raise a chunk * error. * PNG_HANDLE_CHUNK_ALWAYS: * Keep the chunk data. * * If the chunk data is saved it can be retrieved using png_get_unknown_chunks, * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks * it simply resets the behavior to the libpng default. * * INTERACTION WTIH USER CHUNK CALLBACKS: * The per-chunk handling is always used when there is a png_user_chunk_ptr * callback and the callback returns 0; the chunk is then always stored *unless* * it is critical and the per-chunk setting is other than ALWAYS. Notice that * the global default is *not* used in this case. (In effect the per-chunk * value is incremented to at least IF_SAFE.) * * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and * per-chunk defaults will be honored. If you want to preserve the current * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE * as the default - if you don't do this libpng 1.6 will issue a warning. * * If you want unhandled unknown chunks to be discarded in libpng 1.6 and * earlier simply return '1' (handled). * * PNG_HANDLE_AS_UNKNOWN_SUPPORTED: * If this is *not* set known chunks will always be handled by libpng and * will never be stored in the unknown chunk list. Known chunks listed to * png_set_keep_unknown_chunks will have no effect. If it is set then known * chunks listed with a keep other than AS_DEFAULT will *never* be processed * by libpng, in addition critical chunks must either be processed by the * callback or saved. * * The IHDR and IEND chunks must not be listed. Because this turns off the * default handling for chunks that would otherwise be recognized the * behavior of libpng transformations may well become incorrect! * * WRITE: * When writing chunks the options only apply to the chunks specified by * png_set_unknown_chunks (below), libpng will *always* write known chunks * required by png_set_ calls and will always write the core critical chunks * (as required for PLTE). * * Each chunk in the png_set_unknown_chunks list is looked up in the * png_set_keep_unknown_chunks list to find the keep setting, this is then * interpreted as follows: * * PNG_HANDLE_CHUNK_AS_DEFAULT: * Write safe-to-copy chunks and write other chunks if the global * default is set to _ALWAYS, otherwise don't write this chunk. * PNG_HANDLE_CHUNK_NEVER: * Do not write the chunk. * PNG_HANDLE_CHUNK_IF_SAFE: * Write the chunk if it is safe-to-copy, otherwise do not write it. * PNG_HANDLE_CHUNK_ALWAYS: * Write the chunk. * * Note that the default behavior is effectively the opposite of the read case - * in read unknown chunks are not stored by default, in write they are written * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different * - on write the safe-to-copy bit is checked, on read the critical bit is * checked and on read if the chunk is critical an error will be raised. * * num_chunks: * =========== * If num_chunks is positive, then the "keep" parameter specifies the manner * for handling only those chunks appearing in the chunk_list array, * otherwise the chunk list array is ignored. * * If num_chunks is 0 the "keep" parameter specifies the default behavior for * unknown chunks, as described above. * * If num_chunks is negative, then the "keep" parameter specifies the manner * for handling all unknown chunks plus all chunks recognized by libpng * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to * be processed by libpng. */ #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr, int keep, png_const_bytep chunk_list, int num_chunks)); #endif /* HANDLE_AS_UNKNOWN */ /* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned; * the result is therefore true (non-zero) if special handling is required, * false for the default handling. */ PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr, png_const_bytep chunk_name)); #endif /* SET_UNKNOWN_CHUNKS */ #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr, png_inforp info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns)); /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added * unknowns to the location currently stored in the png_struct. This is * invariably the wrong value on write. To fix this call the following API * for each chunk in the list with the correct location. If you know your * code won't be compiled on earlier versions you can rely on * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing * the correct thing. */ PNG_EXPORT(175, void, png_set_unknown_chunk_location, (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)); PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr, png_inforp info_ptr, png_unknown_chunkpp entries)); #endif /* Png_free_data() will turn off the "valid" flag for anything it frees. * If you need to turn it off for a chunk that your application has freed, * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, png_inforp info_ptr, int mask)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ #ifdef PNG_SEQUENTIAL_READ_SUPPORTED PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, int transforms, png_voidp params)); #endif #ifdef PNG_WRITE_SUPPORTED PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, int transforms, png_voidp params)); #endif #endif PNG_EXPORT(180, png_const_charp, png_get_copyright, (png_const_structrp png_ptr)); PNG_EXPORT(181, png_const_charp, png_get_header_ver, (png_const_structrp png_ptr)); PNG_EXPORT(182, png_const_charp, png_get_header_version, (png_const_structrp png_ptr)); PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, (png_const_structrp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr, png_uint_32 mng_features_permitted)); #endif /* For use in png_set_keep_unknown, added to version 1.2.6 */ #define PNG_HANDLE_CHUNK_AS_DEFAULT 0 #define PNG_HANDLE_CHUNK_NEVER 1 #define PNG_HANDLE_CHUNK_IF_SAFE 2 #define PNG_HANDLE_CHUNK_ALWAYS 3 #define PNG_HANDLE_CHUNK_LAST 4 /* Strip the prepended error numbers ("#nnn ") from error and warning * messages before passing them to the error or warning handler. */ #ifdef PNG_ERROR_NUMBERS_SUPPORTED PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr, png_uint_32 strip_mode)); #endif /* Added in libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); PNG_EXPORT(187, png_uint_32, png_get_user_width_max, (png_const_structrp png_ptr)); PNG_EXPORT(188, png_uint_32, png_get_user_height_max, (png_const_structrp png_ptr)); /* Added in libpng-1.4.0 */ PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr, png_uint_32 user_chunk_cache_max)); PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, (png_const_structrp png_ptr)); /* Added in libpng-1.4.1 */ PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr, png_alloc_size_t user_chunk_cache_max)); PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, (png_const_structrp png_ptr)); #endif #if defined(PNG_INCH_CONVERSIONS_SUPPORTED) PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, (png_const_structrp png_ptr, png_const_inforp info_ptr)); PNG_FP_EXPORT(196, float, png_get_x_offset_inches, (png_const_structrp png_ptr, png_const_inforp info_ptr)) #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, (png_const_structrp png_ptr, png_const_inforp info_ptr)) #endif PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr, png_const_inforp info_ptr)) #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, (png_const_structrp png_ptr, png_const_inforp info_ptr)) #endif # ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr, png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); # endif /* pHYs */ #endif /* INCH_CONVERSIONS */ /* Added in libpng-1.4.0 */ #ifdef PNG_IO_STATE_SUPPORTED PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr)); /* Removed from libpng 1.6; use png_get_io_chunk_type. */ PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr), PNG_DEPRECATED) PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, (png_const_structrp png_ptr)); /* The flags returned by png_get_io_state() are the following: */ # define PNG_IO_NONE 0x0000 /* no I/O at this moment */ # define PNG_IO_READING 0x0001 /* currently reading */ # define PNG_IO_WRITING 0x0002 /* currently writing */ # define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ # define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ # define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ # define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ # define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ # define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ #endif /* IO_STATE */ /* Interlace support. The following macros are always defined so that if * libpng interlace handling is turned off the macros may be used to handle * interlaced images within the application. */ #define PNG_INTERLACE_ADAM7_PASSES 7 /* Two macros to return the first row and first column of the original, * full, image which appears in a given pass. 'pass' is in the range 0 * to 6 and the result is in the range 0 to 7. */ #define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7) #define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7) /* A macro to return the offset between pixels in the output row for a pair of * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that * follows. Note that ROW_OFFSET is the offset from one row to the next whereas * COL_OFFSET is from one column to the next, within a row. */ #define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8) #define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1)) /* Two macros to help evaluate the number of rows or columns in each * pass. This is expressed as a shift - effectively log2 of the number or * rows or columns in each 8x8 tile of the original image. */ #define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) #define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) /* Hence two macros to determine the number of rows or columns in a given * pass of an image given its height or width. In fact these macros may * return non-zero even though the sub-image is empty, because the other * dimension may be empty for a small image. */ #define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) #define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) /* For the reader row callbacks (both progressive and sequential) it is * necessary to find the row in the output image given a row in an interlaced * image, so two more macros: */ #define PNG_ROW_FROM_PASS_ROW(y_in, pass) \ (((y_in)<>(((7-(off))-(pass))<<2)) & 0xF) | \ ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0)) #define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) #define PNG_COL_IN_INTERLACE_PASS(x, pass) \ ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED /* With these routines we avoid an integer divide, which will be slower on * most machines. However, it does take more operations than the corresponding * divide method, so it may be slower on a few RISC systems. There are two * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. * * Note that the rounding factors are NOT supposed to be the same! 128 and * 32768 are correct for the NODIV code; 127 and 32767 are correct for the * standard method. * * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] */ /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ # define png_composite(composite, fg, alpha, bg) \ { \ png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ * (png_uint_16)(alpha) \ + (png_uint_16)(bg)*(png_uint_16)(255 \ - (png_uint_16)(alpha)) + 128); \ (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); \ } # define png_composite_16(composite, fg, alpha, bg) \ { \ png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ * (png_uint_32)(alpha) \ + (png_uint_32)(bg)*(65535 \ - (png_uint_32)(alpha)) + 32768); \ (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); \ } #else /* Standard method using integer division */ # define png_composite(composite, fg, alpha, bg) \ (composite) = \ (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \ (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ 127) / 255)) # define png_composite_16(composite, fg, alpha, bg) \ (composite) = \ (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \ (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ 32767) / 65535)) #endif /* READ_COMPOSITE_NODIV */ #ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); #endif PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr, png_const_bytep buf)); /* No png_get_int_16 -- may be added if there's a real need for it. */ /* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ #ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); #endif #ifdef PNG_SAVE_INT_32_SUPPORTED PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); #endif /* Place a 16-bit number into a buffer in PNG byte order. * The parameter is declared unsigned int, not png_uint_16, * just to avoid potential problems on pre-ANSI C compilers. */ #ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); /* No png_save_int_16 -- may be added if there's a real need for it. */ #endif #ifdef PNG_USE_READ_MACROS /* Inline macros to do direct reads of bytes from the input buffer. * The png_get_int_32() routine assumes we are using two's complement * format for negative values, which is almost certainly true. */ # define PNG_get_uint_32(buf) \ (((png_uint_32)(*(buf)) << 24) + \ ((png_uint_32)(*((buf) + 1)) << 16) + \ ((png_uint_32)(*((buf) + 2)) << 8) + \ ((png_uint_32)(*((buf) + 3)))) /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the * function) incorrectly returned a value of type png_uint_32. */ # define PNG_get_uint_16(buf) \ ((png_uint_16) \ (((unsigned int)(*(buf)) << 8) + \ ((unsigned int)(*((buf) + 1))))) # define PNG_get_int_32(buf) \ ((png_int_32)((*(buf) & 0x80) \ ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \ : (png_int_32)png_get_uint_32(buf))) /* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, * but defining a macro name prefixed with PNG_PREFIX. */ # ifndef PNG_PREFIX # define png_get_uint_32(buf) PNG_get_uint_32(buf) # define png_get_uint_16(buf) PNG_get_uint_16(buf) # define png_get_int_32(buf) PNG_get_int_32(buf) # endif #else # ifdef PNG_PREFIX /* No macros; revert to the (redefined) function */ # define PNG_get_uint_32 (png_get_uint_32) # define PNG_get_uint_16 (png_get_uint_16) # define PNG_get_int_32 (png_get_int_32) # endif #endif #ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED PNG_EXPORT(242, void, png_set_check_for_invalid_index, (png_structrp png_ptr, int allowed)); # ifdef PNG_GET_PALETTE_MAX_SUPPORTED PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, png_const_infop info_ptr)); # endif #endif /* CHECK_FOR_INVALID_INDEX */ /******************************************************************************* * Section 5: SIMPLIFIED API ******************************************************************************* * * Please read the documentation in libpng-manual.txt (TODO: write said * documentation) if you don't understand what follows. * * The simplified API hides the details of both libpng and the PNG file format * itself. It allows PNG files to be read into a very limited number of * in-memory bitmap formats or to be written from the same formats. If these * formats do not accomodate your needs then you can, and should, use the more * sophisticated APIs above - these support a wide variety of in-memory formats * and a wide variety of sophisticated transformations to those formats as well * as a wide variety of APIs to manipulate ancillary information. * * To read a PNG file using the simplified API: * * 1) Declare a 'png_image' structure (see below) on the stack, set the * version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL * (this is REQUIRED, your program may crash if you don't do it.) * 2) Call the appropriate png_image_begin_read... function. * 3) Set the png_image 'format' member to the required sample format. * 4) Allocate a buffer for the image and, if required, the color-map. * 5) Call png_image_finish_read to read the image and, if required, the * color-map into your buffers. * * There are no restrictions on the format of the PNG input itself; all valid * color types, bit depths, and interlace methods are acceptable, and the * input image is transformed as necessary to the requested in-memory format * during the png_image_finish_read() step. The only caveat is that if you * request a color-mapped image from a PNG that is full-color or makes * complex use of an alpha channel the transformation is extremely lossy and the * result may look terrible. * * To write a PNG file using the simplified API: * * 1) Declare a 'png_image' structure on the stack and memset() it to all zero. * 2) Initialize the members of the structure that describe the image, setting * the 'format' member to the format of the image samples. * 3) Call the appropriate png_image_write... function with a pointer to the * image and, if necessary, the color-map to write the PNG data. * * png_image is a structure that describes the in-memory format of an image * when it is being read or defines the in-memory format of an image that you * need to write: */ #if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) #define PNG_IMAGE_VERSION 1 typedef struct png_control *png_controlp; typedef struct { png_controlp opaque; /* Initialize to NULL, free with png_image_free */ png_uint_32 version; /* Set to PNG_IMAGE_VERSION */ png_uint_32 width; /* Image width in pixels (columns) */ png_uint_32 height; /* Image height in pixels (rows) */ png_uint_32 format; /* Image format as defined below */ png_uint_32 flags; /* A bit mask containing informational flags */ png_uint_32 colormap_entries; /* Number of entries in the color-map */ /* In the event of an error or warning the following field will be set to a * non-zero value and the 'message' field will contain a '\0' terminated * string with the libpng error or warning message. If both warnings and * an error were encountered, only the error is recorded. If there * are multiple warnings, only the first one is recorded. * * The upper 30 bits of this value are reserved, the low two bits contain * a value as follows: */ # define PNG_IMAGE_WARNING 1 # define PNG_IMAGE_ERROR 2 /* * The result is a two-bit code such that a value more than 1 indicates * a failure in the API just called: * * 0 - no warning or error * 1 - warning * 2 - error * 3 - error preceded by warning */ # define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1) png_uint_32 warning_or_error; char message[64]; } png_image, *png_imagep; /* The samples of the image have one to four channels whose components have * original values in the range 0 to 1.0: * * 1: A single gray or luminance channel (G). * 2: A gray/luminance channel and an alpha channel (GA). * 3: Three red, green, blue color channels (RGB). * 4: Three color channels and an alpha channel (RGBA). * * The components are encoded in one of two ways: * * a) As a small integer, value 0..255, contained in a single byte. For the * alpha channel the original value is simply value/255. For the color or * luminance channels the value is encoded according to the sRGB specification * and matches the 8-bit format expected by typical display devices. * * The color/gray channels are not scaled (pre-multiplied) by the alpha * channel and are suitable for passing to color management software. * * b) As a value in the range 0..65535, contained in a 2-byte integer. All * channels can be converted to the original value by dividing by 65535; all * channels are linear. Color channels use the RGB encoding (RGB end-points) of * the sRGB specification. This encoding is identified by the * PNG_FORMAT_FLAG_LINEAR flag below. * * When the simplified API needs to convert between sRGB and linear colorspaces, * the actual sRGB transfer curve defined in the sRGB specification (see the * article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2 * approximation used elsewhere in libpng. * * When an alpha channel is present it is expected to denote pixel coverage * of the color or luminance channels and is returned as an associated alpha * channel: the color/gray channels are scaled (pre-multiplied) by the alpha * value. * * The samples are either contained directly in the image data, between 1 and 8 * bytes per pixel according to the encoding, or are held in a color-map indexed * by bytes in the image data. In the case of a color-map the color-map entries * are individual samples, encoded as above, and the image data has one byte per * pixel to select the relevant sample from the color-map. */ /* PNG_FORMAT_* * * #defines to be used in png_image::format. Each #define identifies a * particular layout of sample data and, if present, alpha values. There are * separate defines for each of the two component encodings. * * A format is built up using single bit flag values. All combinations are * valid. Formats can be built up from the flag values or you can use one of * the predefined values below. When testing formats always use the FORMAT_FLAG * macros to test for individual features - future versions of the library may * add new flags. * * When reading or writing color-mapped images the format should be set to the * format of the entries in the color-map then png_image_{read,write}_colormap * called to read or write the color-map and set the format correctly for the * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! * * NOTE: libpng can be built with particular features disabled. If you see * compiler errors because the definition of one of the following flags has been * compiled out it is because libpng does not have the required support. It is * possible, however, for the libpng configuration to enable the format on just * read or just write; in that case you may see an error at run time. You can * guard against this by checking for the definition of the appropriate * "_SUPPORTED" macro, one of: * * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED */ #define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ #define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ #define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */ #define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ #ifdef PNG_FORMAT_BGR_SUPPORTED # define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */ #endif #ifdef PNG_FORMAT_AFIRST_SUPPORTED # define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */ #endif #define PNG_FORMAT_FLAG_ASSOCIATED_ALPHA 0x40U /* alpha channel is associated */ /* Commonly used formats have predefined macros. * * First the single byte (sRGB) formats: */ #define PNG_FORMAT_GRAY 0 #define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA #define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) #define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR #define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) #define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) #define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) #define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) #define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) /* Then the linear 2-byte formats. When naming these "Y" is used to * indicate a luminance (gray) channel. */ #define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR #define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) #define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) #define PNG_FORMAT_LINEAR_RGB_ALPHA \ (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA) /* With color-mapped formats the image data is one byte for each pixel, the byte * is an index into the color-map which is formatted as above. To obtain a * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP * to one of the above definitions, or you can use one of the definitions below. */ #define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP) #define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP) #define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP) #define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP) #define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP) #define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP) /* PNG_IMAGE macros * * These are convenience macros to derive information from a png_image * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the * actual image sample values - either the entries in the color-map or the * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values * for the pixels and will always return 1 for color-mapped formats. The * remaining macros return information about the rows in the image and the * complete image. * * NOTE: All the macros that take a png_image::format parameter are compile time * constants if the format parameter is, itself, a constant. Therefore these * macros can be used in array declarations and case labels where required. * Similarly the macros are also pre-processor constants (sizeof is not used) so * they can be used in #if tests. * * First the information about the samples. */ #define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\ (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1) /* Return the total number of channels in a given format: 1..4 */ #define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\ ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1) /* Return the size in bytes of a single component of a pixel or color-map * entry (as appropriate) in the image: 1 or 2. */ #define PNG_IMAGE_SAMPLE_SIZE(fmt)\ (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)) /* This is the size of the sample data for one sample. If the image is * color-mapped it is the size of one color-map entry (and image pixels are * one byte in size), otherwise it is the size of one image pixel. */ #define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) /* The maximum size of the color-map required by the format expressed in a * count of components. This can be used to compile-time allocate a * color-map: * * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; * * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; * * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the * information from one of the png_image_begin_read_ APIs and dynamically * allocate the required memory. */ /* Corresponding information about the pixels */ #define PNG_IMAGE_PIXEL_(test,fmt)\ (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt)) #define PNG_IMAGE_PIXEL_CHANNELS(fmt)\ PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt) /* The number of separate channels (components) in a pixel; 1 for a * color-mapped image. */ #define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt) /* The size, in bytes, of each component in a pixel; 1 for a color-mapped * image. */ #define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt) /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */ /* Information about the whole row, or whole image */ #define PNG_IMAGE_ROW_STRIDE(image)\ (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width) /* Return the total number of components in a single row of the image; this * is the minimum 'row stride', the minimum count of components between each * row. For a color-mapped image this is the minimum number of bytes in a * row. * * WARNING: this macro overflows for some images with more than one component * and very large image widths. libpng will refuse to process an image where * this macro would overflow. */ #define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride)) /* Return the size, in bytes, of an image buffer given a png_image and a row * stride - the number of components to leave space for in each row. * * WARNING: this macro overflows a 32-bit integer for some large PNG images, * libpng will refuse to process an image where such an overflow would occur. */ #define PNG_IMAGE_SIZE(image)\ PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image)) /* Return the size, in bytes, of the image in memory given just a png_image; * the row stride is the minimum stride required for the image. */ #define PNG_IMAGE_COLORMAP_SIZE(image)\ (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries) /* Return the size, in bytes, of the color-map of this image. If the image * format is not a color-map format this will return a size sufficient for * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if * you don't want to allocate a color-map in this case. */ /* PNG_IMAGE_FLAG_* * * Flags containing additional information about the image are held in the * 'flags' field of png_image. */ #define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01 /* This indicates the the RGB values of the in-memory bitmap do not * correspond to the red, green and blue end-points defined by sRGB. */ #define PNG_IMAGE_FLAG_FAST 0x02 /* On write emphasise speed over compression; the resultant PNG file will be * larger but will be produced significantly faster, particular for large * images. Do not use this option for images which will be distributed, only * used it when producing intermediate files that will be read back in * repeatedly. For a typical 24-bit image the option will double the read * speed at the cost of increasing the image size by 25%, however for many * more compressible images the PNG file can be 10 times larger with only a * slight speed gain. */ #define PNG_IMAGE_FLAG_16BIT_sRGB 0x04 /* On read if the image is a 16-bit per component image and there is no gAMA * or sRGB chunk assume that the components are sRGB encoded. Notice that * images output by the simplified API always have gamma information; setting * this flag only affects the interpretation of 16-bit images from an * external source. It is recommended that the application expose this flag * to the user; the user can normally easily recognize the difference between * linear and sRGB encoding. This flag has no effect on write - the data * passed to the write APIs must have the correct encoding (as defined * above.) * * If the flag is not set (the default) input 16-bit per component data is * assumed to be linear. * * NOTE: the flag can only be set after the png_image_begin_read_ call, * because that call initializes the 'flags' field. */ #ifdef PNG_SIMPLIFIED_READ_SUPPORTED /* READ APIs * --------- * * The png_image passed to the read APIs must have been initialized by setting * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.) */ #ifdef PNG_STDIO_SUPPORTED PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, const char *file_name)); /* The named file is opened for read and the image header is filled in * from the PNG header in the file. */ PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, FILE* file)); /* The PNG header is read from the stdio FILE object. */ #endif /* STDIO */ PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image, png_const_voidp memory, png_size_t size)); /* The PNG header is read from the given memory buffer. */ PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image, png_const_colorp background, void *buffer, png_int_32 row_stride, void *colormap)); /* Finish reading the image into the supplied buffer and clean up the * png_image structure. * * row_stride is the step, in byte or 2-byte units as appropriate, * between adjacent rows. A positive stride indicates that the top-most row * is first in the buffer - the normal top-down arrangement. A negative * stride indicates that the bottom-most row is first in the buffer. * * background need only be supplied if an alpha channel must be removed from * a png_byte format and the removal is to be done by compositing on a solid * color; otherwise it may be NULL and any composition will be done directly * onto the buffer. The value is an sRGB color to use for the background, * for grayscale output the green channel is used. * * background must be supplied when an alpha channel must be removed from a * single byte color-mapped output format, in other words if: * * 1) The original format from png_image_begin_read_from_* had * PNG_FORMAT_FLAG_ALPHA set. * 2) The format set by the application does not. * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and * PNG_FORMAT_FLAG_LINEAR *not* set. * * For linear output removing the alpha channel is always done by compositing * on black and background is ignored. * * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE. * image->colormap_entries will be updated to the actual number of entries * written to the colormap; this may be less than the original value. */ PNG_EXPORT(238, void, png_image_free, (png_imagep image)); /* Free any data allocated by libpng in image->opaque, setting the pointer to * NULL. May be called at any time after the structure is initialized. */ #endif /* SIMPLIFIED_READ */ #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED /* WRITE APIS * ---------- * For write you must initialize a png_image structure to describe the image to * be written. To do this use memset to set the whole structure to 0 then * initialize fields describing your image. * * version: must be set to PNG_IMAGE_VERSION * opaque: must be initialized to NULL * width: image width in pixels * height: image height in rows * format: the format of the data (image and color-map) you wish to write * flags: set to 0 unless one of the defined flags applies; set * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB * values do not correspond to the colors in sRGB. * colormap_entries: set to the number of entries in the color-map (0 to 256) */ #ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image, const char *file, int convert_to_8bit, const void *buffer, png_int_32 row_stride, const void *colormap)); /* Write the image to the named file. */ PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, int convert_to_8_bit, const void *buffer, png_int_32 row_stride, const void *colormap)); /* Write the image to the given (FILE*). */ #endif /* SIMPLIFIED_WRITE_STDIO */ /* With all write APIs if image is in one of the linear formats with 16-bit * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG * gamma encoded according to the sRGB specification, otherwise a 16-bit linear * encoded PNG file is written. * * With color-mapped data formats the colormap parameter point to a color-map * with at least image->colormap_entries encoded in the specified format. If * the format is linear the written PNG color-map will be converted to sRGB * regardless of the convert_to_8_bit flag. * * With all APIs row_stride is handled as in the read APIs - it is the spacing * from one row to the next in component sized units (1 or 2 bytes) and if * negative indicates a bottom-up row layout in the buffer. If row_stride is * zero, libpng will calculate it for you from the image width and number of * channels. * * Note that the write API does not support interlacing, sub-8-bit pixels or * most ancillary chunks. If you need to write text chunks (e.g. for copyright * notices) you need to use one of the other APIs. */ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit, const void *buffer, png_int_32 row_stride, const void *colormap)); /* Write the image to the given memory buffer. The function both writes the * whole PNG data stream to *memory and updates *memory_bytes with the count * of bytes written. * * 'memory' may be NULL. In this case *memory_bytes is not read however on * success the number of bytes which would have been written will still be * stored in *memory_bytes. On failure *memory_bytes will contain 0. * * If 'memory' is not NULL it must point to memory[*memory_bytes] of * writeable memory. * * If the function returns success memory[*memory_bytes] (if 'memory' is not * NULL) contains the written PNG data. *memory_bytes will always be less * than or equal to the original value. * * If the function returns false and *memory_bytes was not changed an error * occured during write. If *memory_bytes was changed, or is not 0 if * 'memory' was NULL, the write would have succeeded but for the memory * buffer being too small. *memory_bytes contains the required number of * bytes and will be bigger that the original value. */ #define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\ row_stride, colormap)\ png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\ row_stride, colormap) /* Return the amount of memory in 'size' required to compress this image. * The png_image structure 'image' must be filled in as in the above * function and must not be changed before the actual write call, the buffer * and all other parameters must also be identical to that in the final * write call. The 'size' variable need not be initialized. * * NOTE: the macro returns true/false, if false is returned 'size' will be * set to zero and the write failed and probably will fail if tried again. */ /* You can pre-allocate the buffer by making sure it is of sufficient size * regardless of the amount of compression achieved. The buffer size will * always be bigger than the original image and it will never be filled. The * following macros are provided to assist in allocating the buffer. */ #define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height) /* The number of uncompressed bytes in the PNG byte encoding of the image; * uncompressing the PNG IDAT data will give this number of bytes. * * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this * macro can because of the extra bytes used in the PNG byte encoding. You * need to avoid this macro if your image size approaches 2^30 in width or * height. The same goes for the remainder of these macros; they all produce * bigger numbers than the actual in-memory image size. */ #ifndef PNG_ZLIB_MAX_SIZE # define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U) /* An upper bound on the number of compressed bytes given 'b' uncompressed * bytes. This is based on deflateBounds() in zlib; different * implementations of zlib compression may conceivably produce more data so * if your zlib implementation is not zlib itself redefine this macro * appropriately. */ #endif #define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\ PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image)) /* An upper bound on the size of the data in the PNG IDAT chunks. */ #define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\ ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\ (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\ 12U+3U*(image).colormap_entries/*PLTE data*/+\ (((image).format&PNG_FORMAT_FLAG_ALPHA)?\ 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\ 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size)) /* A helper for the following macro; if your compiler cannot handle the * following macro use this one with the result of * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most * compilers should handle this just fine.) */ #define PNG_IMAGE_PNG_SIZE_MAX(image)\ PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image)) /* An upper bound on the total length of the PNG data stream for 'image'. * The result is of type png_alloc_size_t, on 32-bit systems this may * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will * run out of buffer space but return a corrected size which should work. */ #endif /* SIMPLIFIED_WRITE */ /******************************************************************************* * END OF SIMPLIFIED API ******************************************************************************/ #endif /* SIMPLIFIED_{READ|WRITE} */ /******************************************************************************* * Section 6: IMPLEMENTATION OPTIONS ******************************************************************************* * * Support for arbitrary implementation-specific optimizations. The API allows * particular options to be turned on or off. 'Option' is the number of the * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given * by the PNG_OPTION_ defines below. * * HARDWARE: normally hardware capabilites, such as the Intel SSE instructions, * are detected at run time, however sometimes it may be impossible * to do this in user mode, in which case it is necessary to discover * the capabilities in an OS specific way. Such capabilities are * listed here when libpng has support for them and must be turned * ON by the application if present. * * SOFTWARE: sometimes software optimizations actually result in performance * decrease on some architectures or systems, or with some sets of * PNG images. 'Software' options allow such optimizations to be * selected at run time. */ #ifdef PNG_SET_OPTION_SUPPORTED #ifdef PNG_ARM_NEON_API_SUPPORTED # define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */ #endif #define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */ #define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */ #ifdef PNG_MIPS_MSA_API_SUPPORTED # define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ #endif #define PNG_IGNORE_ADLER32 8 #ifdef PNG_POWERPC_VSX_API_SUPPORTED # define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */ #endif #define PNG_OPTION_NEXT 12 /* Next option - numbers must be even */ /* Return values: NOTE: there are four values and 'off' is *not* zero */ #define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ #define PNG_OPTION_INVALID 1 /* Option number out of range */ #define PNG_OPTION_OFF 2 #define PNG_OPTION_ON 3 PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, int onoff)); #endif /* SET_OPTION */ /******************************************************************************* * END OF HARDWARE AND SOFTWARE OPTIONS ******************************************************************************/ /* Maintainer: Put new public prototypes here ^, in libpng.3, in project * defs, and in scripts/symbols.def. */ /* The last ordinal number (this is the *last* one already used; the next * one to use is one more than this.) */ #ifdef PNG_EXPORT_LAST_ORDINAL PNG_EXPORT_LAST_ORDINAL(249); #endif #ifdef __cplusplus } #endif #endif /* PNG_VERSION_INFO_ONLY */ /* Do not put anything past this line */ #endif /* PNG_H */ PKZ/.=Y=Ylibpng16/pngconf.hnu[ /* pngconf.h - machine configurable file for libpng * * libpng version 1.6.34, September 29, 2017 * * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h * * Any machine specific code is near the front of this file, so if you * are configuring libpng for a machine, you may want to read the section * starting here down to where it starts to typedef png_color, png_text, * and png_info. */ #ifndef PNGCONF_H #define PNGCONF_H #ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */ /* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C * compiler for correct compilation. The following header files are required by * the standard. If your compiler doesn't provide these header files, or they * do not match the standard, you will need to provide/improve them. */ #include #include /* Library header files. These header files are all defined by ISOC90; libpng * expects conformant implementations, however, an ISOC90 conformant system need * not provide these header files if the functionality cannot be implemented. * In this case it will be necessary to disable the relevant parts of libpng in * the build of pnglibconf.h. * * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not * include this unnecessary header file. */ #ifdef PNG_STDIO_SUPPORTED /* Required for the definition of FILE: */ # include #endif #ifdef PNG_SETJMP_SUPPORTED /* Required for the definition of jmp_buf and the declaration of longjmp: */ # include #endif #ifdef PNG_CONVERT_tIME_SUPPORTED /* Required for struct tm: */ # include #endif #endif /* PNG_BUILDING_SYMBOL_TABLE */ /* Prior to 1.6.0 it was possible to turn off 'const' in declarations using * PNG_NO_CONST; this is no longer supported except for data declarations which * apparently still cause problems in 2011 on some compilers. */ #define PNG_CONST const /* backward compatibility only */ /* This controls optimization of the reading of 16-bit and 32-bit values * from PNG files. It can be set on a per-app-file basis - it * just changes whether a macro is used when the function is called. * The library builder sets the default; if read functions are not * built into the library the macro implementation is forced on. */ #ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED # define PNG_USE_READ_MACROS #endif #if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) # if PNG_DEFAULT_READ_MACROS # define PNG_USE_READ_MACROS # endif #endif /* COMPILER SPECIFIC OPTIONS. * * These options are provided so that a variety of difficult compilers * can be used. Some are fixed at build time (e.g. PNG_API_RULE * below) but still have compiler specific implementations, others * may be changed on a per-file basis when compiling against libpng. */ /* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect * against legacy (pre ISOC90) compilers that did not understand function * prototypes. It is not required for modern C compilers. */ #ifndef PNGARG # define PNGARG(arglist) arglist #endif /* Function calling conventions. * ============================= * Normally it is not necessary to specify to the compiler how to call * a function - it just does it - however on x86 systems derived from * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems * and some others) there are multiple ways to call a function and the * default can be changed on the compiler command line. For this reason * libpng specifies the calling convention of every exported function and * every function called via a user supplied function pointer. This is * done in this file by defining the following macros: * * PNGAPI Calling convention for exported functions. * PNGCBAPI Calling convention for user provided (callback) functions. * PNGCAPI Calling convention used by the ANSI-C library (required * for longjmp callbacks and sometimes used internally to * specify the calling convention for zlib). * * These macros should never be overridden. If it is necessary to * change calling convention in a private build this can be done * by setting PNG_API_RULE (which defaults to 0) to one of the values * below to select the correct 'API' variants. * * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. * This is correct in every known environment. * PNG_API_RULE=1 Use the operating system convention for PNGAPI and * the 'C' calling convention (from PNGCAPI) for * callbacks (PNGCBAPI). This is no longer required * in any known environment - if it has to be used * please post an explanation of the problem to the * libpng mailing list. * * These cases only differ if the operating system does not use the C * calling convention, at present this just means the above cases * (x86 DOS/Windows sytems) and, even then, this does not apply to * Cygwin running on those systems. * * Note that the value must be defined in pnglibconf.h so that what * the application uses to call the library matches the conventions * set when building the library. */ /* Symbol export * ============= * When building a shared library it is almost always necessary to tell * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' * is used to mark the symbols. On some systems these symbols can be * extracted at link time and need no special processing by the compiler, * on other systems the symbols are flagged by the compiler and just * the declaration requires a special tag applied (unfortunately) in a * compiler dependent way. Some systems can do either. * * A small number of older systems also require a symbol from a DLL to * be flagged to the program that calls it. This is a problem because * we do not know in the header file included by application code that * the symbol will come from a shared library, as opposed to a statically * linked one. For this reason the application must tell us by setting * the magic flag PNG_USE_DLL to turn on the special processing before * it includes png.h. * * Four additional macros are used to make this happen: * * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from * the build or imported if PNG_USE_DLL is set - compiler * and system specific. * * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to * 'type', compiler specific. * * PNG_DLL_EXPORT Set to the magic to use during a libpng build to * make a symbol exported from the DLL. Not used in the * public header files; see pngpriv.h for how it is used * in the libpng build. * * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come * from a DLL - used to define PNG_IMPEXP when * PNG_USE_DLL is set. */ /* System specific discovery. * ========================== * This code is used at build time to find PNG_IMPEXP, the API settings * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL * import processing is possible. On Windows systems it also sets * compiler-specific macros to the values required to change the calling * conventions of the various functions. */ #if defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\ defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or * MinGW on any architecture currently supported by Windows. Also includes * Watcom builds but these need special treatment because they are not * compatible with GCC or Visual C because of different calling conventions. */ # if PNG_API_RULE == 2 /* If this line results in an error, either because __watcall is not * understood or because of a redefine just below you cannot use *this* * build of the library with the compiler you are using. *This* build was * build using Watcom and applications must also be built using Watcom! */ # define PNGCAPI __watcall # endif # if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800)) # define PNGCAPI __cdecl # if PNG_API_RULE == 1 /* If this line results in an error __stdcall is not understood and * PNG_API_RULE should not have been set to '1'. */ # define PNGAPI __stdcall # endif # else /* An older compiler, or one not detected (erroneously) above, * if necessary override on the command line to get the correct * variants for the compiler. */ # ifndef PNGCAPI # define PNGCAPI _cdecl # endif # if PNG_API_RULE == 1 && !defined(PNGAPI) # define PNGAPI _stdcall # endif # endif /* compiler/api */ /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ # if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) # error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed" # endif # if (defined(_MSC_VER) && _MSC_VER < 800) ||\ (defined(__BORLANDC__) && __BORLANDC__ < 0x500) /* older Borland and MSC * compilers used '__export' and required this to be after * the type. */ # ifndef PNG_EXPORT_TYPE # define PNG_EXPORT_TYPE(type) type PNG_IMPEXP # endif # define PNG_DLL_EXPORT __export # else /* newer compiler */ # define PNG_DLL_EXPORT __declspec(dllexport) # ifndef PNG_DLL_IMPORT # define PNG_DLL_IMPORT __declspec(dllimport) # endif # endif /* compiler */ #else /* !Windows */ # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) # define PNGAPI _System # else /* !Windows/x86 && !OS/2 */ /* Use the defaults, or define PNG*API on the command line (but * this will have to be done for every compile!) */ # endif /* other system, !OS/2 */ #endif /* !Windows/x86 */ /* Now do all the defaulting . */ #ifndef PNGCAPI # define PNGCAPI #endif #ifndef PNGCBAPI # define PNGCBAPI PNGCAPI #endif #ifndef PNGAPI # define PNGAPI PNGCAPI #endif /* PNG_IMPEXP may be set on the compilation system command line or (if not set) * then in an internal header file when building the library, otherwise (when * using the library) it is set here. */ #ifndef PNG_IMPEXP # if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) /* This forces use of a DLL, disallowing static linking */ # define PNG_IMPEXP PNG_DLL_IMPORT # endif # ifndef PNG_IMPEXP # define PNG_IMPEXP # endif #endif /* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat * 'attributes' as a storage class - the attributes go at the start of the * function definition, and attributes are always appended regardless of the * compiler. This considerably simplifies these macros but may cause problems * if any compilers both need function attributes and fail to handle them as * a storage class (this is unlikely.) */ #ifndef PNG_FUNCTION # define PNG_FUNCTION(type, name, args, attributes) attributes type name args #endif #ifndef PNG_EXPORT_TYPE # define PNG_EXPORT_TYPE(type) PNG_IMPEXP type #endif /* The ordinal value is only relevant when preprocessing png.h for symbol * table entries, so we discard it here. See the .dfn files in the * scripts directory. */ #ifndef PNG_EXPORTA # define PNG_EXPORTA(ordinal, type, name, args, attributes) \ PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \ PNG_LINKAGE_API attributes) #endif /* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, * so make something non-empty to satisfy the requirement: */ #define PNG_EMPTY /*empty list*/ #define PNG_EXPORT(ordinal, type, name, args) \ PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) /* Use PNG_REMOVED to comment out a removed interface. */ #ifndef PNG_REMOVED # define PNG_REMOVED(ordinal, type, name, args, attributes) #endif #ifndef PNG_CALLBACK # define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) #endif /* Support for compiler specific function attributes. These are used * so that where compiler support is available incorrect use of API * functions in png.h will generate compiler warnings. * * Added at libpng-1.2.41. */ #ifndef PNG_NO_PEDANTIC_WARNINGS # ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED # define PNG_PEDANTIC_WARNINGS_SUPPORTED # endif #endif #ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED /* Support for compiler specific function attributes. These are used * so that where compiler support is available, incorrect use of API * functions in png.h will generate compiler warnings. Added at libpng * version 1.2.41. Disabling these removes the warnings but may also produce * less efficient code. */ # if defined(__clang__) && defined(__has_attribute) /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ # if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) # define PNG_USE_RESULT __attribute__((__warn_unused_result__)) # endif # if !defined(PNG_NORETURN) && __has_attribute(__noreturn__) # define PNG_NORETURN __attribute__((__noreturn__)) # endif # if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__) # define PNG_ALLOCATED __attribute__((__malloc__)) # endif # if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__) # define PNG_DEPRECATED __attribute__((__deprecated__)) # endif # if !defined(PNG_PRIVATE) # ifdef __has_extension # if __has_extension(attribute_unavailable_with_message) # define PNG_PRIVATE __attribute__((__unavailable__(\ "This function is not exported by libpng."))) # endif # endif # endif # ifndef PNG_RESTRICT # define PNG_RESTRICT __restrict # endif # elif defined(__GNUC__) # ifndef PNG_USE_RESULT # define PNG_USE_RESULT __attribute__((__warn_unused_result__)) # endif # ifndef PNG_NORETURN # define PNG_NORETURN __attribute__((__noreturn__)) # endif # if __GNUC__ >= 3 # ifndef PNG_ALLOCATED # define PNG_ALLOCATED __attribute__((__malloc__)) # endif # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __attribute__((__deprecated__)) # endif # ifndef PNG_PRIVATE # if 0 /* Doesn't work so we use deprecated instead*/ # define PNG_PRIVATE \ __attribute__((warning("This function is not exported by libpng."))) # else # define PNG_PRIVATE \ __attribute__((__deprecated__)) # endif # endif # if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1)) # ifndef PNG_RESTRICT # define PNG_RESTRICT __restrict # endif # endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */ # endif /* __GNUC__ >= 3 */ # elif defined(_MSC_VER) && (_MSC_VER >= 1300) # ifndef PNG_USE_RESULT # define PNG_USE_RESULT /* not supported */ # endif # ifndef PNG_NORETURN # define PNG_NORETURN __declspec(noreturn) # endif # ifndef PNG_ALLOCATED # if (_MSC_VER >= 1400) # define PNG_ALLOCATED __declspec(restrict) # endif # endif # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __declspec(deprecated) # endif # ifndef PNG_PRIVATE # define PNG_PRIVATE __declspec(deprecated) # endif # ifndef PNG_RESTRICT # if (_MSC_VER >= 1400) # define PNG_RESTRICT __restrict # endif # endif # elif defined(__WATCOMC__) # ifndef PNG_RESTRICT # define PNG_RESTRICT __restrict # endif # endif #endif /* PNG_PEDANTIC_WARNINGS */ #ifndef PNG_DEPRECATED # define PNG_DEPRECATED /* Use of this function is deprecated */ #endif #ifndef PNG_USE_RESULT # define PNG_USE_RESULT /* The result of this function must be checked */ #endif #ifndef PNG_NORETURN # define PNG_NORETURN /* This function does not return */ #endif #ifndef PNG_ALLOCATED # define PNG_ALLOCATED /* The result of the function is new memory */ #endif #ifndef PNG_PRIVATE # define PNG_PRIVATE /* This is a private libpng function */ #endif #ifndef PNG_RESTRICT # define PNG_RESTRICT /* The C99 "restrict" feature */ #endif #ifndef PNG_FP_EXPORT /* A floating point API. */ # ifdef PNG_FLOATING_POINT_SUPPORTED # define PNG_FP_EXPORT(ordinal, type, name, args)\ PNG_EXPORT(ordinal, type, name, args); # else /* No floating point APIs */ # define PNG_FP_EXPORT(ordinal, type, name, args) # endif #endif #ifndef PNG_FIXED_EXPORT /* A fixed point API. */ # ifdef PNG_FIXED_POINT_SUPPORTED # define PNG_FIXED_EXPORT(ordinal, type, name, args)\ PNG_EXPORT(ordinal, type, name, args); # else /* No fixed point APIs */ # define PNG_FIXED_EXPORT(ordinal, type, name, args) # endif #endif #ifndef PNG_BUILDING_SYMBOL_TABLE /* Some typedefs to get us started. These should be safe on most of the common * platforms. * * png_uint_32 and png_int_32 may, currently, be larger than required to hold a * 32-bit value however this is not normally advisable. * * png_uint_16 and png_int_16 should always be two bytes in size - this is * verified at library build time. * * png_byte must always be one byte in size. * * The checks below use constants from limits.h, as defined by the ISOC90 * standard. */ #if CHAR_BIT == 8 && UCHAR_MAX == 255 typedef unsigned char png_byte; #else # error "libpng requires 8-bit bytes" #endif #if INT_MIN == -32768 && INT_MAX == 32767 typedef int png_int_16; #elif SHRT_MIN == -32768 && SHRT_MAX == 32767 typedef short png_int_16; #else # error "libpng requires a signed 16-bit type" #endif #if UINT_MAX == 65535 typedef unsigned int png_uint_16; #elif USHRT_MAX == 65535 typedef unsigned short png_uint_16; #else # error "libpng requires an unsigned 16-bit type" #endif #if INT_MIN < -2147483646 && INT_MAX > 2147483646 typedef int png_int_32; #elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 typedef long int png_int_32; #else # error "libpng requires a signed 32-bit (or more) type" #endif #if UINT_MAX > 4294967294U typedef unsigned int png_uint_32; #elif ULONG_MAX > 4294967294U typedef unsigned long int png_uint_32; #else # error "libpng requires an unsigned 32-bit (or more) type" #endif /* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however, * requires an ISOC90 compiler and relies on consistent behavior of sizeof. */ typedef size_t png_size_t; typedef ptrdiff_t png_ptrdiff_t; /* libpng needs to know the maximum value of 'size_t' and this controls the * definition of png_alloc_size_t, below. This maximum value of size_t limits * but does not control the maximum allocations the library makes - there is * direct application control of this through png_set_user_limits(). */ #ifndef PNG_SMALL_SIZE_T /* Compiler specific tests for systems where size_t is known to be less than * 32 bits (some of these systems may no longer work because of the lack of * 'far' support; see above.) */ # if (defined(__TURBOC__) && !defined(__FLAT__)) ||\ (defined(_MSC_VER) && defined(MAXSEG_64K)) # define PNG_SMALL_SIZE_T # endif #endif /* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no * smaller than png_uint_32. Casts from png_size_t or png_uint_32 to * png_alloc_size_t are not necessary; in fact, it is recommended not to use * them at all so that the compiler can complain when something turns out to be * problematic. * * Casts in the other direction (from png_alloc_size_t to png_size_t or * png_uint_32) should be explicitly applied; however, we do not expect to * encounter practical situations that require such conversions. * * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than * 4294967295 - i.e. less than the maximum value of png_uint_32. */ #ifdef PNG_SMALL_SIZE_T typedef png_uint_32 png_alloc_size_t; #else typedef png_size_t png_alloc_size_t; #endif /* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler * implementations of Intel CPU specific support of user-mode segmented address * spaces, where 16-bit pointers address more than 65536 bytes of memory using * separate 'segment' registers. The implementation requires two different * types of pointer (only one of which includes the segment value.) * * If required this support is available in version 1.2 of libpng and may be * available in versions through 1.5, although the correctness of the code has * not been verified recently. */ /* Typedef for floating-point numbers that are converted to fixed-point with a * multiple of 100,000, e.g., gamma */ typedef png_int_32 png_fixed_point; /* Add typedefs for pointers */ typedef void * png_voidp; typedef const void * png_const_voidp; typedef png_byte * png_bytep; typedef const png_byte * png_const_bytep; typedef png_uint_32 * png_uint_32p; typedef const png_uint_32 * png_const_uint_32p; typedef png_int_32 * png_int_32p; typedef const png_int_32 * png_const_int_32p; typedef png_uint_16 * png_uint_16p; typedef const png_uint_16 * png_const_uint_16p; typedef png_int_16 * png_int_16p; typedef const png_int_16 * png_const_int_16p; typedef char * png_charp; typedef const char * png_const_charp; typedef png_fixed_point * png_fixed_point_p; typedef const png_fixed_point * png_const_fixed_point_p; typedef png_size_t * png_size_tp; typedef const png_size_t * png_const_size_tp; #ifdef PNG_STDIO_SUPPORTED typedef FILE * png_FILE_p; #endif #ifdef PNG_FLOATING_POINT_SUPPORTED typedef double * png_doublep; typedef const double * png_const_doublep; #endif /* Pointers to pointers; i.e. arrays */ typedef png_byte * * png_bytepp; typedef png_uint_32 * * png_uint_32pp; typedef png_int_32 * * png_int_32pp; typedef png_uint_16 * * png_uint_16pp; typedef png_int_16 * * png_int_16pp; typedef const char * * png_const_charpp; typedef char * * png_charpp; typedef png_fixed_point * * png_fixed_point_pp; #ifdef PNG_FLOATING_POINT_SUPPORTED typedef double * * png_doublepp; #endif /* Pointers to pointers to pointers; i.e., pointer to array */ typedef char * * * png_charppp; #endif /* PNG_BUILDING_SYMBOL_TABLE */ #endif /* PNGCONF_H */ PKZs4jQ Q rpc/netdb.hnu[/* @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC */ /* * Copyright (c) 2010, Oracle America, Inc. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the "Oracle America, Inc." nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Cleaned up for GNU C library roland@gnu.ai.mit.edu: added multiple inclusion protection and use of . In GNU this file is #include'd by . */ #ifndef _RPC_NETDB_H #define _RPC_NETDB_H 1 #include #define __need_size_t #include __BEGIN_DECLS struct rpcent { char *r_name; /* Name of server for this rpc program. */ char **r_aliases; /* Alias list. */ int r_number; /* RPC program number. */ }; extern void setrpcent (int __stayopen) __THROW; extern void endrpcent (void) __THROW; extern struct rpcent *getrpcbyname (const char *__name) __THROW; extern struct rpcent *getrpcbynumber (int __number) __THROW; extern struct rpcent *getrpcent (void) __THROW; #ifdef __USE_MISC extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __THROW; extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __THROW; extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __THROW; #endif __END_DECLS #endif /* rpc/netdb.h */ PKZF xcb/xtest.hnu[/* * This file generated automatically from xtest.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Test_API XCB Test API * @brief Test XCB Protocol Implementation. * @{ **/ #ifndef __XTEST_H #define __XTEST_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_TEST_MAJOR_VERSION 2 #define XCB_TEST_MINOR_VERSION 2 extern xcb_extension_t xcb_test_id; /** * @brief xcb_test_get_version_cookie_t **/ typedef struct xcb_test_get_version_cookie_t { unsigned int sequence; } xcb_test_get_version_cookie_t; /** Opcode for xcb_test_get_version. */ #define XCB_TEST_GET_VERSION 0 /** * @brief xcb_test_get_version_request_t **/ typedef struct xcb_test_get_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t major_version; uint8_t pad0; uint16_t minor_version; } xcb_test_get_version_request_t; /** * @brief xcb_test_get_version_reply_t **/ typedef struct xcb_test_get_version_reply_t { uint8_t response_type; uint8_t major_version; uint16_t sequence; uint32_t length; uint16_t minor_version; } xcb_test_get_version_reply_t; typedef enum xcb_test_cursor_t { XCB_TEST_CURSOR_NONE = 0, XCB_TEST_CURSOR_CURRENT = 1 } xcb_test_cursor_t; /** * @brief xcb_test_compare_cursor_cookie_t **/ typedef struct xcb_test_compare_cursor_cookie_t { unsigned int sequence; } xcb_test_compare_cursor_cookie_t; /** Opcode for xcb_test_compare_cursor. */ #define XCB_TEST_COMPARE_CURSOR 1 /** * @brief xcb_test_compare_cursor_request_t **/ typedef struct xcb_test_compare_cursor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_cursor_t cursor; } xcb_test_compare_cursor_request_t; /** * @brief xcb_test_compare_cursor_reply_t **/ typedef struct xcb_test_compare_cursor_reply_t { uint8_t response_type; uint8_t same; uint16_t sequence; uint32_t length; } xcb_test_compare_cursor_reply_t; /** Opcode for xcb_test_fake_input. */ #define XCB_TEST_FAKE_INPUT 2 /** * @brief xcb_test_fake_input_request_t **/ typedef struct xcb_test_fake_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t type; uint8_t detail; uint8_t pad0[2]; uint32_t time; xcb_window_t root; uint8_t pad1[8]; int16_t rootX; int16_t rootY; uint8_t pad2[7]; uint8_t deviceid; } xcb_test_fake_input_request_t; /** Opcode for xcb_test_grab_control. */ #define XCB_TEST_GRAB_CONTROL 3 /** * @brief xcb_test_grab_control_request_t **/ typedef struct xcb_test_grab_control_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t impervious; uint8_t pad0[3]; } xcb_test_grab_control_request_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_test_get_version_cookie_t xcb_test_get_version (xcb_connection_t *c, uint8_t major_version, uint16_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_test_get_version_cookie_t xcb_test_get_version_unchecked (xcb_connection_t *c, uint8_t major_version, uint16_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_test_get_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_test_get_version_reply_t * xcb_test_get_version_reply (xcb_connection_t *c, xcb_test_get_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_test_compare_cursor_cookie_t xcb_test_compare_cursor (xcb_connection_t *c, xcb_window_t window, xcb_cursor_t cursor); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_test_compare_cursor_cookie_t xcb_test_compare_cursor_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_cursor_t cursor); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_test_compare_cursor_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_test_compare_cursor_reply_t * xcb_test_compare_cursor_reply (xcb_connection_t *c, xcb_test_compare_cursor_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_test_fake_input_checked (xcb_connection_t *c, uint8_t type, uint8_t detail, uint32_t time, xcb_window_t root, int16_t rootX, int16_t rootY, uint8_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_test_fake_input (xcb_connection_t *c, uint8_t type, uint8_t detail, uint32_t time, xcb_window_t root, int16_t rootX, int16_t rootY, uint8_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_test_grab_control_checked (xcb_connection_t *c, uint8_t impervious); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_test_grab_control (xcb_connection_t *c, uint8_t impervious); #ifdef __cplusplus } #endif #endif /** * @} */ PKZY) xcb/xkb.hnu[/* * This file generated automatically from xkb.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_xkb_API XCB xkb API * @brief xkb XCB Protocol Implementation. * @{ **/ #ifndef __XKB_H #define __XKB_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XKB_MAJOR_VERSION 1 #define XCB_XKB_MINOR_VERSION 0 extern xcb_extension_t xcb_xkb_id; typedef enum xcb_xkb_const_t { XCB_XKB_CONST_MAX_LEGAL_KEY_CODE = 255, XCB_XKB_CONST_PER_KEY_BIT_ARRAY_SIZE = 32, XCB_XKB_CONST_KEY_NAME_LENGTH = 4 } xcb_xkb_const_t; typedef enum xcb_xkb_event_type_t { XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY = 1, XCB_XKB_EVENT_TYPE_MAP_NOTIFY = 2, XCB_XKB_EVENT_TYPE_STATE_NOTIFY = 4, XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY = 8, XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY = 16, XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY = 32, XCB_XKB_EVENT_TYPE_NAMES_NOTIFY = 64, XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY = 128, XCB_XKB_EVENT_TYPE_BELL_NOTIFY = 256, XCB_XKB_EVENT_TYPE_ACTION_MESSAGE = 512, XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY = 1024, XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY = 2048 } xcb_xkb_event_type_t; typedef enum xcb_xkb_nkn_detail_t { XCB_XKB_NKN_DETAIL_KEYCODES = 1, XCB_XKB_NKN_DETAIL_GEOMETRY = 2, XCB_XKB_NKN_DETAIL_DEVICE_ID = 4 } xcb_xkb_nkn_detail_t; typedef enum xcb_xkb_axn_detail_t { XCB_XKB_AXN_DETAIL_SK_PRESS = 1, XCB_XKB_AXN_DETAIL_SK_ACCEPT = 2, XCB_XKB_AXN_DETAIL_SK_REJECT = 4, XCB_XKB_AXN_DETAIL_SK_RELEASE = 8, XCB_XKB_AXN_DETAIL_BK_ACCEPT = 16, XCB_XKB_AXN_DETAIL_BK_REJECT = 32, XCB_XKB_AXN_DETAIL_AXK_WARNING = 64 } xcb_xkb_axn_detail_t; typedef enum xcb_xkb_map_part_t { XCB_XKB_MAP_PART_KEY_TYPES = 1, XCB_XKB_MAP_PART_KEY_SYMS = 2, XCB_XKB_MAP_PART_MODIFIER_MAP = 4, XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS = 8, XCB_XKB_MAP_PART_KEY_ACTIONS = 16, XCB_XKB_MAP_PART_KEY_BEHAVIORS = 32, XCB_XKB_MAP_PART_VIRTUAL_MODS = 64, XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP = 128 } xcb_xkb_map_part_t; typedef enum xcb_xkb_set_map_flags_t { XCB_XKB_SET_MAP_FLAGS_RESIZE_TYPES = 1, XCB_XKB_SET_MAP_FLAGS_RECOMPUTE_ACTIONS = 2 } xcb_xkb_set_map_flags_t; typedef enum xcb_xkb_state_part_t { XCB_XKB_STATE_PART_MODIFIER_STATE = 1, XCB_XKB_STATE_PART_MODIFIER_BASE = 2, XCB_XKB_STATE_PART_MODIFIER_LATCH = 4, XCB_XKB_STATE_PART_MODIFIER_LOCK = 8, XCB_XKB_STATE_PART_GROUP_STATE = 16, XCB_XKB_STATE_PART_GROUP_BASE = 32, XCB_XKB_STATE_PART_GROUP_LATCH = 64, XCB_XKB_STATE_PART_GROUP_LOCK = 128, XCB_XKB_STATE_PART_COMPAT_STATE = 256, XCB_XKB_STATE_PART_GRAB_MODS = 512, XCB_XKB_STATE_PART_COMPAT_GRAB_MODS = 1024, XCB_XKB_STATE_PART_LOOKUP_MODS = 2048, XCB_XKB_STATE_PART_COMPAT_LOOKUP_MODS = 4096, XCB_XKB_STATE_PART_POINTER_BUTTONS = 8192 } xcb_xkb_state_part_t; typedef enum xcb_xkb_bool_ctrl_t { XCB_XKB_BOOL_CTRL_REPEAT_KEYS = 1, XCB_XKB_BOOL_CTRL_SLOW_KEYS = 2, XCB_XKB_BOOL_CTRL_BOUNCE_KEYS = 4, XCB_XKB_BOOL_CTRL_STICKY_KEYS = 8, XCB_XKB_BOOL_CTRL_MOUSE_KEYS = 16, XCB_XKB_BOOL_CTRL_MOUSE_KEYS_ACCEL = 32, XCB_XKB_BOOL_CTRL_ACCESS_X_KEYS = 64, XCB_XKB_BOOL_CTRL_ACCESS_X_TIMEOUT_MASK = 128, XCB_XKB_BOOL_CTRL_ACCESS_X_FEEDBACK_MASK = 256, XCB_XKB_BOOL_CTRL_AUDIBLE_BELL_MASK = 512, XCB_XKB_BOOL_CTRL_OVERLAY_1_MASK = 1024, XCB_XKB_BOOL_CTRL_OVERLAY_2_MASK = 2048, XCB_XKB_BOOL_CTRL_IGNORE_GROUP_LOCK_MASK = 4096 } xcb_xkb_bool_ctrl_t; typedef enum xcb_xkb_control_t { XCB_XKB_CONTROL_GROUPS_WRAP = 134217728, XCB_XKB_CONTROL_INTERNAL_MODS = 268435456, XCB_XKB_CONTROL_IGNORE_LOCK_MODS = 536870912, XCB_XKB_CONTROL_PER_KEY_REPEAT = 1073741824, XCB_XKB_CONTROL_CONTROLS_ENABLED = 2147483648 } xcb_xkb_control_t; typedef enum xcb_xkb_ax_option_t { XCB_XKB_AX_OPTION_SK_PRESS_FB = 1, XCB_XKB_AX_OPTION_SK_ACCEPT_FB = 2, XCB_XKB_AX_OPTION_FEATURE_FB = 4, XCB_XKB_AX_OPTION_SLOW_WARN_FB = 8, XCB_XKB_AX_OPTION_INDICATOR_FB = 16, XCB_XKB_AX_OPTION_STICKY_KEYS_FB = 32, XCB_XKB_AX_OPTION_TWO_KEYS = 64, XCB_XKB_AX_OPTION_LATCH_TO_LOCK = 128, XCB_XKB_AX_OPTION_SK_RELEASE_FB = 256, XCB_XKB_AX_OPTION_SK_REJECT_FB = 512, XCB_XKB_AX_OPTION_BK_REJECT_FB = 1024, XCB_XKB_AX_OPTION_DUMB_BELL = 2048 } xcb_xkb_ax_option_t; typedef uint16_t xcb_xkb_device_spec_t; /** * @brief xcb_xkb_device_spec_iterator_t **/ typedef struct xcb_xkb_device_spec_iterator_t { xcb_xkb_device_spec_t *data; int rem; int index; } xcb_xkb_device_spec_iterator_t; typedef enum xcb_xkb_led_class_result_t { XCB_XKB_LED_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0, XCB_XKB_LED_CLASS_RESULT_LED_FEEDBACK_CLASS = 4 } xcb_xkb_led_class_result_t; typedef enum xcb_xkb_led_class_t { XCB_XKB_LED_CLASS_KBD_FEEDBACK_CLASS = 0, XCB_XKB_LED_CLASS_LED_FEEDBACK_CLASS = 4, XCB_XKB_LED_CLASS_DFLT_XI_CLASS = 768, XCB_XKB_LED_CLASS_ALL_XI_CLASSES = 1280 } xcb_xkb_led_class_t; typedef uint16_t xcb_xkb_led_class_spec_t; /** * @brief xcb_xkb_led_class_spec_iterator_t **/ typedef struct xcb_xkb_led_class_spec_iterator_t { xcb_xkb_led_class_spec_t *data; int rem; int index; } xcb_xkb_led_class_spec_iterator_t; typedef enum xcb_xkb_bell_class_result_t { XCB_XKB_BELL_CLASS_RESULT_KBD_FEEDBACK_CLASS = 0, XCB_XKB_BELL_CLASS_RESULT_BELL_FEEDBACK_CLASS = 5 } xcb_xkb_bell_class_result_t; typedef enum xcb_xkb_bell_class_t { XCB_XKB_BELL_CLASS_KBD_FEEDBACK_CLASS = 0, XCB_XKB_BELL_CLASS_BELL_FEEDBACK_CLASS = 5, XCB_XKB_BELL_CLASS_DFLT_XI_CLASS = 768 } xcb_xkb_bell_class_t; typedef uint16_t xcb_xkb_bell_class_spec_t; /** * @brief xcb_xkb_bell_class_spec_iterator_t **/ typedef struct xcb_xkb_bell_class_spec_iterator_t { xcb_xkb_bell_class_spec_t *data; int rem; int index; } xcb_xkb_bell_class_spec_iterator_t; typedef enum xcb_xkb_id_t { XCB_XKB_ID_USE_CORE_KBD = 256, XCB_XKB_ID_USE_CORE_PTR = 512, XCB_XKB_ID_DFLT_XI_CLASS = 768, XCB_XKB_ID_DFLT_XI_ID = 1024, XCB_XKB_ID_ALL_XI_CLASS = 1280, XCB_XKB_ID_ALL_XI_ID = 1536, XCB_XKB_ID_XI_NONE = 65280 } xcb_xkb_id_t; typedef uint16_t xcb_xkb_id_spec_t; /** * @brief xcb_xkb_id_spec_iterator_t **/ typedef struct xcb_xkb_id_spec_iterator_t { xcb_xkb_id_spec_t *data; int rem; int index; } xcb_xkb_id_spec_iterator_t; typedef enum xcb_xkb_group_t { XCB_XKB_GROUP_1 = 0, XCB_XKB_GROUP_2 = 1, XCB_XKB_GROUP_3 = 2, XCB_XKB_GROUP_4 = 3 } xcb_xkb_group_t; typedef enum xcb_xkb_groups_t { XCB_XKB_GROUPS_ANY = 254, XCB_XKB_GROUPS_ALL = 255 } xcb_xkb_groups_t; typedef enum xcb_xkb_set_of_group_t { XCB_XKB_SET_OF_GROUP_GROUP_1 = 1, XCB_XKB_SET_OF_GROUP_GROUP_2 = 2, XCB_XKB_SET_OF_GROUP_GROUP_3 = 4, XCB_XKB_SET_OF_GROUP_GROUP_4 = 8 } xcb_xkb_set_of_group_t; typedef enum xcb_xkb_set_of_groups_t { XCB_XKB_SET_OF_GROUPS_ANY = 128 } xcb_xkb_set_of_groups_t; typedef enum xcb_xkb_groups_wrap_t { XCB_XKB_GROUPS_WRAP_WRAP_INTO_RANGE = 0, XCB_XKB_GROUPS_WRAP_CLAMP_INTO_RANGE = 64, XCB_XKB_GROUPS_WRAP_REDIRECT_INTO_RANGE = 128 } xcb_xkb_groups_wrap_t; typedef enum xcb_xkb_v_mods_high_t { XCB_XKB_V_MODS_HIGH_15 = 128, XCB_XKB_V_MODS_HIGH_14 = 64, XCB_XKB_V_MODS_HIGH_13 = 32, XCB_XKB_V_MODS_HIGH_12 = 16, XCB_XKB_V_MODS_HIGH_11 = 8, XCB_XKB_V_MODS_HIGH_10 = 4, XCB_XKB_V_MODS_HIGH_9 = 2, XCB_XKB_V_MODS_HIGH_8 = 1 } xcb_xkb_v_mods_high_t; typedef enum xcb_xkb_v_mods_low_t { XCB_XKB_V_MODS_LOW_7 = 128, XCB_XKB_V_MODS_LOW_6 = 64, XCB_XKB_V_MODS_LOW_5 = 32, XCB_XKB_V_MODS_LOW_4 = 16, XCB_XKB_V_MODS_LOW_3 = 8, XCB_XKB_V_MODS_LOW_2 = 4, XCB_XKB_V_MODS_LOW_1 = 2, XCB_XKB_V_MODS_LOW_0 = 1 } xcb_xkb_v_mods_low_t; typedef enum xcb_xkb_v_mod_t { XCB_XKB_V_MOD_15 = 32768, XCB_XKB_V_MOD_14 = 16384, XCB_XKB_V_MOD_13 = 8192, XCB_XKB_V_MOD_12 = 4096, XCB_XKB_V_MOD_11 = 2048, XCB_XKB_V_MOD_10 = 1024, XCB_XKB_V_MOD_9 = 512, XCB_XKB_V_MOD_8 = 256, XCB_XKB_V_MOD_7 = 128, XCB_XKB_V_MOD_6 = 64, XCB_XKB_V_MOD_5 = 32, XCB_XKB_V_MOD_4 = 16, XCB_XKB_V_MOD_3 = 8, XCB_XKB_V_MOD_2 = 4, XCB_XKB_V_MOD_1 = 2, XCB_XKB_V_MOD_0 = 1 } xcb_xkb_v_mod_t; typedef enum xcb_xkb_explicit_t { XCB_XKB_EXPLICIT_V_MOD_MAP = 128, XCB_XKB_EXPLICIT_BEHAVIOR = 64, XCB_XKB_EXPLICIT_AUTO_REPEAT = 32, XCB_XKB_EXPLICIT_INTERPRET = 16, XCB_XKB_EXPLICIT_KEY_TYPE_4 = 8, XCB_XKB_EXPLICIT_KEY_TYPE_3 = 4, XCB_XKB_EXPLICIT_KEY_TYPE_2 = 2, XCB_XKB_EXPLICIT_KEY_TYPE_1 = 1 } xcb_xkb_explicit_t; typedef enum xcb_xkb_sym_interpret_match_t { XCB_XKB_SYM_INTERPRET_MATCH_NONE_OF = 0, XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF_OR_NONE = 1, XCB_XKB_SYM_INTERPRET_MATCH_ANY_OF = 2, XCB_XKB_SYM_INTERPRET_MATCH_ALL_OF = 3, XCB_XKB_SYM_INTERPRET_MATCH_EXACTLY = 4 } xcb_xkb_sym_interpret_match_t; typedef enum xcb_xkb_sym_interp_match_t { XCB_XKB_SYM_INTERP_MATCH_LEVEL_ONE_ONLY = 128, XCB_XKB_SYM_INTERP_MATCH_OP_MASK = 127 } xcb_xkb_sym_interp_match_t; typedef enum xcb_xkb_im_flag_t { XCB_XKB_IM_FLAG_NO_EXPLICIT = 128, XCB_XKB_IM_FLAG_NO_AUTOMATIC = 64, XCB_XKB_IM_FLAG_LED_DRIVES_KB = 32 } xcb_xkb_im_flag_t; typedef enum xcb_xkb_im_mods_which_t { XCB_XKB_IM_MODS_WHICH_USE_COMPAT = 16, XCB_XKB_IM_MODS_WHICH_USE_EFFECTIVE = 8, XCB_XKB_IM_MODS_WHICH_USE_LOCKED = 4, XCB_XKB_IM_MODS_WHICH_USE_LATCHED = 2, XCB_XKB_IM_MODS_WHICH_USE_BASE = 1 } xcb_xkb_im_mods_which_t; typedef enum xcb_xkb_im_groups_which_t { XCB_XKB_IM_GROUPS_WHICH_USE_COMPAT = 16, XCB_XKB_IM_GROUPS_WHICH_USE_EFFECTIVE = 8, XCB_XKB_IM_GROUPS_WHICH_USE_LOCKED = 4, XCB_XKB_IM_GROUPS_WHICH_USE_LATCHED = 2, XCB_XKB_IM_GROUPS_WHICH_USE_BASE = 1 } xcb_xkb_im_groups_which_t; /** * @brief xcb_xkb_indicator_map_t **/ typedef struct xcb_xkb_indicator_map_t { uint8_t flags; uint8_t whichGroups; uint8_t groups; uint8_t whichMods; uint8_t mods; uint8_t realMods; uint16_t vmods; uint32_t ctrls; } xcb_xkb_indicator_map_t; /** * @brief xcb_xkb_indicator_map_iterator_t **/ typedef struct xcb_xkb_indicator_map_iterator_t { xcb_xkb_indicator_map_t *data; int rem; int index; } xcb_xkb_indicator_map_iterator_t; typedef enum xcb_xkb_cm_detail_t { XCB_XKB_CM_DETAIL_SYM_INTERP = 1, XCB_XKB_CM_DETAIL_GROUP_COMPAT = 2 } xcb_xkb_cm_detail_t; typedef enum xcb_xkb_name_detail_t { XCB_XKB_NAME_DETAIL_KEYCODES = 1, XCB_XKB_NAME_DETAIL_GEOMETRY = 2, XCB_XKB_NAME_DETAIL_SYMBOLS = 4, XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS = 8, XCB_XKB_NAME_DETAIL_TYPES = 16, XCB_XKB_NAME_DETAIL_COMPAT = 32, XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES = 64, XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES = 128, XCB_XKB_NAME_DETAIL_INDICATOR_NAMES = 256, XCB_XKB_NAME_DETAIL_KEY_NAMES = 512, XCB_XKB_NAME_DETAIL_KEY_ALIASES = 1024, XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES = 2048, XCB_XKB_NAME_DETAIL_GROUP_NAMES = 4096, XCB_XKB_NAME_DETAIL_RG_NAMES = 8192 } xcb_xkb_name_detail_t; typedef enum xcb_xkb_gbn_detail_t { XCB_XKB_GBN_DETAIL_TYPES = 1, XCB_XKB_GBN_DETAIL_COMPAT_MAP = 2, XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS = 4, XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS = 8, XCB_XKB_GBN_DETAIL_INDICATOR_MAPS = 16, XCB_XKB_GBN_DETAIL_KEY_NAMES = 32, XCB_XKB_GBN_DETAIL_GEOMETRY = 64, XCB_XKB_GBN_DETAIL_OTHER_NAMES = 128 } xcb_xkb_gbn_detail_t; typedef enum xcb_xkb_xi_feature_t { XCB_XKB_XI_FEATURE_KEYBOARDS = 1, XCB_XKB_XI_FEATURE_BUTTON_ACTIONS = 2, XCB_XKB_XI_FEATURE_INDICATOR_NAMES = 4, XCB_XKB_XI_FEATURE_INDICATOR_MAPS = 8, XCB_XKB_XI_FEATURE_INDICATOR_STATE = 16 } xcb_xkb_xi_feature_t; typedef enum xcb_xkb_per_client_flag_t { XCB_XKB_PER_CLIENT_FLAG_DETECTABLE_AUTO_REPEAT = 1, XCB_XKB_PER_CLIENT_FLAG_GRABS_USE_XKB_STATE = 2, XCB_XKB_PER_CLIENT_FLAG_AUTO_RESET_CONTROLS = 4, XCB_XKB_PER_CLIENT_FLAG_LOOKUP_STATE_WHEN_GRABBED = 8, XCB_XKB_PER_CLIENT_FLAG_SEND_EVENT_USES_XKB_STATE = 16 } xcb_xkb_per_client_flag_t; /** * @brief xcb_xkb_mod_def_t **/ typedef struct xcb_xkb_mod_def_t { uint8_t mask; uint8_t realMods; uint16_t vmods; } xcb_xkb_mod_def_t; /** * @brief xcb_xkb_mod_def_iterator_t **/ typedef struct xcb_xkb_mod_def_iterator_t { xcb_xkb_mod_def_t *data; int rem; int index; } xcb_xkb_mod_def_iterator_t; /** * @brief xcb_xkb_key_name_t **/ typedef struct xcb_xkb_key_name_t { char name[4]; } xcb_xkb_key_name_t; /** * @brief xcb_xkb_key_name_iterator_t **/ typedef struct xcb_xkb_key_name_iterator_t { xcb_xkb_key_name_t *data; int rem; int index; } xcb_xkb_key_name_iterator_t; /** * @brief xcb_xkb_key_alias_t **/ typedef struct xcb_xkb_key_alias_t { char real[4]; char alias[4]; } xcb_xkb_key_alias_t; /** * @brief xcb_xkb_key_alias_iterator_t **/ typedef struct xcb_xkb_key_alias_iterator_t { xcb_xkb_key_alias_t *data; int rem; int index; } xcb_xkb_key_alias_iterator_t; /** * @brief xcb_xkb_counted_string_16_t **/ typedef struct xcb_xkb_counted_string_16_t { uint16_t length; } xcb_xkb_counted_string_16_t; /** * @brief xcb_xkb_counted_string_16_iterator_t **/ typedef struct xcb_xkb_counted_string_16_iterator_t { xcb_xkb_counted_string_16_t *data; int rem; int index; } xcb_xkb_counted_string_16_iterator_t; /** * @brief xcb_xkb_kt_map_entry_t **/ typedef struct xcb_xkb_kt_map_entry_t { uint8_t active; uint8_t mods_mask; uint8_t level; uint8_t mods_mods; uint16_t mods_vmods; uint8_t pad0[2]; } xcb_xkb_kt_map_entry_t; /** * @brief xcb_xkb_kt_map_entry_iterator_t **/ typedef struct xcb_xkb_kt_map_entry_iterator_t { xcb_xkb_kt_map_entry_t *data; int rem; int index; } xcb_xkb_kt_map_entry_iterator_t; /** * @brief xcb_xkb_key_type_t **/ typedef struct xcb_xkb_key_type_t { uint8_t mods_mask; uint8_t mods_mods; uint16_t mods_vmods; uint8_t numLevels; uint8_t nMapEntries; uint8_t hasPreserve; uint8_t pad0; } xcb_xkb_key_type_t; /** * @brief xcb_xkb_key_type_iterator_t **/ typedef struct xcb_xkb_key_type_iterator_t { xcb_xkb_key_type_t *data; int rem; int index; } xcb_xkb_key_type_iterator_t; /** * @brief xcb_xkb_key_sym_map_t **/ typedef struct xcb_xkb_key_sym_map_t { uint8_t kt_index[4]; uint8_t groupInfo; uint8_t width; uint16_t nSyms; } xcb_xkb_key_sym_map_t; /** * @brief xcb_xkb_key_sym_map_iterator_t **/ typedef struct xcb_xkb_key_sym_map_iterator_t { xcb_xkb_key_sym_map_t *data; int rem; int index; } xcb_xkb_key_sym_map_iterator_t; /** * @brief xcb_xkb_common_behavior_t **/ typedef struct xcb_xkb_common_behavior_t { uint8_t type; uint8_t data; } xcb_xkb_common_behavior_t; /** * @brief xcb_xkb_common_behavior_iterator_t **/ typedef struct xcb_xkb_common_behavior_iterator_t { xcb_xkb_common_behavior_t *data; int rem; int index; } xcb_xkb_common_behavior_iterator_t; /** * @brief xcb_xkb_default_behavior_t **/ typedef struct xcb_xkb_default_behavior_t { uint8_t type; uint8_t pad0; } xcb_xkb_default_behavior_t; /** * @brief xcb_xkb_default_behavior_iterator_t **/ typedef struct xcb_xkb_default_behavior_iterator_t { xcb_xkb_default_behavior_t *data; int rem; int index; } xcb_xkb_default_behavior_iterator_t; /** * @brief xcb_xkb_lock_behavior_t **/ typedef struct xcb_xkb_lock_behavior_t { uint8_t type; uint8_t pad0; } xcb_xkb_lock_behavior_t; /** * @brief xcb_xkb_lock_behavior_iterator_t **/ typedef struct xcb_xkb_lock_behavior_iterator_t { xcb_xkb_lock_behavior_t *data; int rem; int index; } xcb_xkb_lock_behavior_iterator_t; /** * @brief xcb_xkb_radio_group_behavior_t **/ typedef struct xcb_xkb_radio_group_behavior_t { uint8_t type; uint8_t group; } xcb_xkb_radio_group_behavior_t; /** * @brief xcb_xkb_radio_group_behavior_iterator_t **/ typedef struct xcb_xkb_radio_group_behavior_iterator_t { xcb_xkb_radio_group_behavior_t *data; int rem; int index; } xcb_xkb_radio_group_behavior_iterator_t; /** * @brief xcb_xkb_overlay_behavior_t **/ typedef struct xcb_xkb_overlay_behavior_t { uint8_t type; xcb_keycode_t key; } xcb_xkb_overlay_behavior_t; /** * @brief xcb_xkb_overlay_behavior_iterator_t **/ typedef struct xcb_xkb_overlay_behavior_iterator_t { xcb_xkb_overlay_behavior_t *data; int rem; int index; } xcb_xkb_overlay_behavior_iterator_t; /** * @brief xcb_xkb_permament_lock_behavior_t **/ typedef struct xcb_xkb_permament_lock_behavior_t { uint8_t type; uint8_t pad0; } xcb_xkb_permament_lock_behavior_t; /** * @brief xcb_xkb_permament_lock_behavior_iterator_t **/ typedef struct xcb_xkb_permament_lock_behavior_iterator_t { xcb_xkb_permament_lock_behavior_t *data; int rem; int index; } xcb_xkb_permament_lock_behavior_iterator_t; /** * @brief xcb_xkb_permament_radio_group_behavior_t **/ typedef struct xcb_xkb_permament_radio_group_behavior_t { uint8_t type; uint8_t group; } xcb_xkb_permament_radio_group_behavior_t; /** * @brief xcb_xkb_permament_radio_group_behavior_iterator_t **/ typedef struct xcb_xkb_permament_radio_group_behavior_iterator_t { xcb_xkb_permament_radio_group_behavior_t *data; int rem; int index; } xcb_xkb_permament_radio_group_behavior_iterator_t; /** * @brief xcb_xkb_permament_overlay_behavior_t **/ typedef struct xcb_xkb_permament_overlay_behavior_t { uint8_t type; xcb_keycode_t key; } xcb_xkb_permament_overlay_behavior_t; /** * @brief xcb_xkb_permament_overlay_behavior_iterator_t **/ typedef struct xcb_xkb_permament_overlay_behavior_iterator_t { xcb_xkb_permament_overlay_behavior_t *data; int rem; int index; } xcb_xkb_permament_overlay_behavior_iterator_t; /** * @brief xcb_xkb_behavior_t **/ typedef union xcb_xkb_behavior_t { xcb_xkb_common_behavior_t common; xcb_xkb_default_behavior_t _default; xcb_xkb_lock_behavior_t lock; xcb_xkb_radio_group_behavior_t radioGroup; xcb_xkb_overlay_behavior_t overlay1; xcb_xkb_overlay_behavior_t overlay2; xcb_xkb_permament_lock_behavior_t permamentLock; xcb_xkb_permament_radio_group_behavior_t permamentRadioGroup; xcb_xkb_permament_overlay_behavior_t permamentOverlay1; xcb_xkb_permament_overlay_behavior_t permamentOverlay2; uint8_t type; } xcb_xkb_behavior_t; /** * @brief xcb_xkb_behavior_iterator_t **/ typedef struct xcb_xkb_behavior_iterator_t { xcb_xkb_behavior_t *data; int rem; int index; } xcb_xkb_behavior_iterator_t; typedef enum xcb_xkb_behavior_type_t { XCB_XKB_BEHAVIOR_TYPE_DEFAULT = 0, XCB_XKB_BEHAVIOR_TYPE_LOCK = 1, XCB_XKB_BEHAVIOR_TYPE_RADIO_GROUP = 2, XCB_XKB_BEHAVIOR_TYPE_OVERLAY_1 = 3, XCB_XKB_BEHAVIOR_TYPE_OVERLAY_2 = 4, XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_LOCK = 129, XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_RADIO_GROUP = 130, XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_1 = 131, XCB_XKB_BEHAVIOR_TYPE_PERMAMENT_OVERLAY_2 = 132 } xcb_xkb_behavior_type_t; /** * @brief xcb_xkb_set_behavior_t **/ typedef struct xcb_xkb_set_behavior_t { xcb_keycode_t keycode; xcb_xkb_behavior_t behavior; uint8_t pad0; } xcb_xkb_set_behavior_t; /** * @brief xcb_xkb_set_behavior_iterator_t **/ typedef struct xcb_xkb_set_behavior_iterator_t { xcb_xkb_set_behavior_t *data; int rem; int index; } xcb_xkb_set_behavior_iterator_t; /** * @brief xcb_xkb_set_explicit_t **/ typedef struct xcb_xkb_set_explicit_t { xcb_keycode_t keycode; uint8_t explicit; } xcb_xkb_set_explicit_t; /** * @brief xcb_xkb_set_explicit_iterator_t **/ typedef struct xcb_xkb_set_explicit_iterator_t { xcb_xkb_set_explicit_t *data; int rem; int index; } xcb_xkb_set_explicit_iterator_t; /** * @brief xcb_xkb_key_mod_map_t **/ typedef struct xcb_xkb_key_mod_map_t { xcb_keycode_t keycode; uint8_t mods; } xcb_xkb_key_mod_map_t; /** * @brief xcb_xkb_key_mod_map_iterator_t **/ typedef struct xcb_xkb_key_mod_map_iterator_t { xcb_xkb_key_mod_map_t *data; int rem; int index; } xcb_xkb_key_mod_map_iterator_t; /** * @brief xcb_xkb_key_v_mod_map_t **/ typedef struct xcb_xkb_key_v_mod_map_t { xcb_keycode_t keycode; uint8_t pad0; uint16_t vmods; } xcb_xkb_key_v_mod_map_t; /** * @brief xcb_xkb_key_v_mod_map_iterator_t **/ typedef struct xcb_xkb_key_v_mod_map_iterator_t { xcb_xkb_key_v_mod_map_t *data; int rem; int index; } xcb_xkb_key_v_mod_map_iterator_t; /** * @brief xcb_xkb_kt_set_map_entry_t **/ typedef struct xcb_xkb_kt_set_map_entry_t { uint8_t level; uint8_t realMods; uint16_t virtualMods; } xcb_xkb_kt_set_map_entry_t; /** * @brief xcb_xkb_kt_set_map_entry_iterator_t **/ typedef struct xcb_xkb_kt_set_map_entry_iterator_t { xcb_xkb_kt_set_map_entry_t *data; int rem; int index; } xcb_xkb_kt_set_map_entry_iterator_t; /** * @brief xcb_xkb_set_key_type_t **/ typedef struct xcb_xkb_set_key_type_t { uint8_t mask; uint8_t realMods; uint16_t virtualMods; uint8_t numLevels; uint8_t nMapEntries; uint8_t preserve; uint8_t pad0; } xcb_xkb_set_key_type_t; /** * @brief xcb_xkb_set_key_type_iterator_t **/ typedef struct xcb_xkb_set_key_type_iterator_t { xcb_xkb_set_key_type_t *data; int rem; int index; } xcb_xkb_set_key_type_iterator_t; typedef char xcb_xkb_string8_t; /** * @brief xcb_xkb_string8_iterator_t **/ typedef struct xcb_xkb_string8_iterator_t { xcb_xkb_string8_t *data; int rem; int index; } xcb_xkb_string8_iterator_t; /** * @brief xcb_xkb_outline_t **/ typedef struct xcb_xkb_outline_t { uint8_t nPoints; uint8_t cornerRadius; uint8_t pad0[2]; } xcb_xkb_outline_t; /** * @brief xcb_xkb_outline_iterator_t **/ typedef struct xcb_xkb_outline_iterator_t { xcb_xkb_outline_t *data; int rem; int index; } xcb_xkb_outline_iterator_t; /** * @brief xcb_xkb_shape_t **/ typedef struct xcb_xkb_shape_t { xcb_atom_t name; uint8_t nOutlines; uint8_t primaryNdx; uint8_t approxNdx; uint8_t pad0; } xcb_xkb_shape_t; /** * @brief xcb_xkb_shape_iterator_t **/ typedef struct xcb_xkb_shape_iterator_t { xcb_xkb_shape_t *data; int rem; int index; } xcb_xkb_shape_iterator_t; /** * @brief xcb_xkb_key_t **/ typedef struct xcb_xkb_key_t { xcb_xkb_string8_t name[4]; int16_t gap; uint8_t shapeNdx; uint8_t colorNdx; } xcb_xkb_key_t; /** * @brief xcb_xkb_key_iterator_t **/ typedef struct xcb_xkb_key_iterator_t { xcb_xkb_key_t *data; int rem; int index; } xcb_xkb_key_iterator_t; /** * @brief xcb_xkb_overlay_key_t **/ typedef struct xcb_xkb_overlay_key_t { xcb_xkb_string8_t over[4]; xcb_xkb_string8_t under[4]; } xcb_xkb_overlay_key_t; /** * @brief xcb_xkb_overlay_key_iterator_t **/ typedef struct xcb_xkb_overlay_key_iterator_t { xcb_xkb_overlay_key_t *data; int rem; int index; } xcb_xkb_overlay_key_iterator_t; /** * @brief xcb_xkb_overlay_row_t **/ typedef struct xcb_xkb_overlay_row_t { uint8_t rowUnder; uint8_t nKeys; uint8_t pad0[2]; } xcb_xkb_overlay_row_t; /** * @brief xcb_xkb_overlay_row_iterator_t **/ typedef struct xcb_xkb_overlay_row_iterator_t { xcb_xkb_overlay_row_t *data; int rem; int index; } xcb_xkb_overlay_row_iterator_t; /** * @brief xcb_xkb_overlay_t **/ typedef struct xcb_xkb_overlay_t { xcb_atom_t name; uint8_t nRows; uint8_t pad0[3]; } xcb_xkb_overlay_t; /** * @brief xcb_xkb_overlay_iterator_t **/ typedef struct xcb_xkb_overlay_iterator_t { xcb_xkb_overlay_t *data; int rem; int index; } xcb_xkb_overlay_iterator_t; /** * @brief xcb_xkb_row_t **/ typedef struct xcb_xkb_row_t { int16_t top; int16_t left; uint8_t nKeys; uint8_t vertical; uint8_t pad0[2]; } xcb_xkb_row_t; /** * @brief xcb_xkb_row_iterator_t **/ typedef struct xcb_xkb_row_iterator_t { xcb_xkb_row_t *data; int rem; int index; } xcb_xkb_row_iterator_t; typedef enum xcb_xkb_doodad_type_t { XCB_XKB_DOODAD_TYPE_OUTLINE = 1, XCB_XKB_DOODAD_TYPE_SOLID = 2, XCB_XKB_DOODAD_TYPE_TEXT = 3, XCB_XKB_DOODAD_TYPE_INDICATOR = 4, XCB_XKB_DOODAD_TYPE_LOGO = 5 } xcb_xkb_doodad_type_t; /** * @brief xcb_xkb_listing_t **/ typedef struct xcb_xkb_listing_t { uint16_t flags; uint16_t length; } xcb_xkb_listing_t; /** * @brief xcb_xkb_listing_iterator_t **/ typedef struct xcb_xkb_listing_iterator_t { xcb_xkb_listing_t *data; int rem; int index; } xcb_xkb_listing_iterator_t; /** * @brief xcb_xkb_device_led_info_t **/ typedef struct xcb_xkb_device_led_info_t { xcb_xkb_led_class_spec_t ledClass; xcb_xkb_id_spec_t ledID; uint32_t namesPresent; uint32_t mapsPresent; uint32_t physIndicators; uint32_t state; } xcb_xkb_device_led_info_t; /** * @brief xcb_xkb_device_led_info_iterator_t **/ typedef struct xcb_xkb_device_led_info_iterator_t { xcb_xkb_device_led_info_t *data; int rem; int index; } xcb_xkb_device_led_info_iterator_t; typedef enum xcb_xkb_error_t { XCB_XKB_ERROR_BAD_DEVICE = 255, XCB_XKB_ERROR_BAD_CLASS = 254, XCB_XKB_ERROR_BAD_ID = 253 } xcb_xkb_error_t; /** Opcode for xcb_xkb_keyboard. */ #define XCB_XKB_KEYBOARD 0 /** * @brief xcb_xkb_keyboard_error_t **/ typedef struct xcb_xkb_keyboard_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; uint32_t value; uint16_t minorOpcode; uint8_t majorOpcode; uint8_t pad0[21]; } xcb_xkb_keyboard_error_t; typedef enum xcb_xkb_sa_t { XCB_XKB_SA_CLEAR_LOCKS = 1, XCB_XKB_SA_LATCH_TO_LOCK = 2, XCB_XKB_SA_USE_MOD_MAP_MODS = 4, XCB_XKB_SA_GROUP_ABSOLUTE = 4 } xcb_xkb_sa_t; typedef enum xcb_xkb_sa_type_t { XCB_XKB_SA_TYPE_NO_ACTION = 0, XCB_XKB_SA_TYPE_SET_MODS = 1, XCB_XKB_SA_TYPE_LATCH_MODS = 2, XCB_XKB_SA_TYPE_LOCK_MODS = 3, XCB_XKB_SA_TYPE_SET_GROUP = 4, XCB_XKB_SA_TYPE_LATCH_GROUP = 5, XCB_XKB_SA_TYPE_LOCK_GROUP = 6, XCB_XKB_SA_TYPE_MOVE_PTR = 7, XCB_XKB_SA_TYPE_PTR_BTN = 8, XCB_XKB_SA_TYPE_LOCK_PTR_BTN = 9, XCB_XKB_SA_TYPE_SET_PTR_DFLT = 10, XCB_XKB_SA_TYPE_ISO_LOCK = 11, XCB_XKB_SA_TYPE_TERMINATE = 12, XCB_XKB_SA_TYPE_SWITCH_SCREEN = 13, XCB_XKB_SA_TYPE_SET_CONTROLS = 14, XCB_XKB_SA_TYPE_LOCK_CONTROLS = 15, XCB_XKB_SA_TYPE_ACTION_MESSAGE = 16, XCB_XKB_SA_TYPE_REDIRECT_KEY = 17, XCB_XKB_SA_TYPE_DEVICE_BTN = 18, XCB_XKB_SA_TYPE_LOCK_DEVICE_BTN = 19, XCB_XKB_SA_TYPE_DEVICE_VALUATOR = 20 } xcb_xkb_sa_type_t; /** * @brief xcb_xkb_sa_no_action_t **/ typedef struct xcb_xkb_sa_no_action_t { uint8_t type; uint8_t pad0[7]; } xcb_xkb_sa_no_action_t; /** * @brief xcb_xkb_sa_no_action_iterator_t **/ typedef struct xcb_xkb_sa_no_action_iterator_t { xcb_xkb_sa_no_action_t *data; int rem; int index; } xcb_xkb_sa_no_action_iterator_t; /** * @brief xcb_xkb_sa_set_mods_t **/ typedef struct xcb_xkb_sa_set_mods_t { uint8_t type; uint8_t flags; uint8_t mask; uint8_t realMods; uint8_t vmodsHigh; uint8_t vmodsLow; uint8_t pad0[2]; } xcb_xkb_sa_set_mods_t; /** * @brief xcb_xkb_sa_set_mods_iterator_t **/ typedef struct xcb_xkb_sa_set_mods_iterator_t { xcb_xkb_sa_set_mods_t *data; int rem; int index; } xcb_xkb_sa_set_mods_iterator_t; /** * @brief xcb_xkb_sa_latch_mods_t **/ typedef struct xcb_xkb_sa_latch_mods_t { uint8_t type; uint8_t flags; uint8_t mask; uint8_t realMods; uint8_t vmodsHigh; uint8_t vmodsLow; uint8_t pad0[2]; } xcb_xkb_sa_latch_mods_t; /** * @brief xcb_xkb_sa_latch_mods_iterator_t **/ typedef struct xcb_xkb_sa_latch_mods_iterator_t { xcb_xkb_sa_latch_mods_t *data; int rem; int index; } xcb_xkb_sa_latch_mods_iterator_t; /** * @brief xcb_xkb_sa_lock_mods_t **/ typedef struct xcb_xkb_sa_lock_mods_t { uint8_t type; uint8_t flags; uint8_t mask; uint8_t realMods; uint8_t vmodsHigh; uint8_t vmodsLow; uint8_t pad0[2]; } xcb_xkb_sa_lock_mods_t; /** * @brief xcb_xkb_sa_lock_mods_iterator_t **/ typedef struct xcb_xkb_sa_lock_mods_iterator_t { xcb_xkb_sa_lock_mods_t *data; int rem; int index; } xcb_xkb_sa_lock_mods_iterator_t; /** * @brief xcb_xkb_sa_set_group_t **/ typedef struct xcb_xkb_sa_set_group_t { uint8_t type; uint8_t flags; int8_t group; uint8_t pad0[5]; } xcb_xkb_sa_set_group_t; /** * @brief xcb_xkb_sa_set_group_iterator_t **/ typedef struct xcb_xkb_sa_set_group_iterator_t { xcb_xkb_sa_set_group_t *data; int rem; int index; } xcb_xkb_sa_set_group_iterator_t; /** * @brief xcb_xkb_sa_latch_group_t **/ typedef struct xcb_xkb_sa_latch_group_t { uint8_t type; uint8_t flags; int8_t group; uint8_t pad0[5]; } xcb_xkb_sa_latch_group_t; /** * @brief xcb_xkb_sa_latch_group_iterator_t **/ typedef struct xcb_xkb_sa_latch_group_iterator_t { xcb_xkb_sa_latch_group_t *data; int rem; int index; } xcb_xkb_sa_latch_group_iterator_t; /** * @brief xcb_xkb_sa_lock_group_t **/ typedef struct xcb_xkb_sa_lock_group_t { uint8_t type; uint8_t flags; int8_t group; uint8_t pad0[5]; } xcb_xkb_sa_lock_group_t; /** * @brief xcb_xkb_sa_lock_group_iterator_t **/ typedef struct xcb_xkb_sa_lock_group_iterator_t { xcb_xkb_sa_lock_group_t *data; int rem; int index; } xcb_xkb_sa_lock_group_iterator_t; typedef enum xcb_xkb_sa_move_ptr_flag_t { XCB_XKB_SA_MOVE_PTR_FLAG_NO_ACCELERATION = 1, XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_X = 2, XCB_XKB_SA_MOVE_PTR_FLAG_MOVE_ABSOLUTE_Y = 4 } xcb_xkb_sa_move_ptr_flag_t; /** * @brief xcb_xkb_sa_move_ptr_t **/ typedef struct xcb_xkb_sa_move_ptr_t { uint8_t type; uint8_t flags; int8_t xHigh; uint8_t xLow; int8_t yHigh; uint8_t yLow; uint8_t pad0[2]; } xcb_xkb_sa_move_ptr_t; /** * @brief xcb_xkb_sa_move_ptr_iterator_t **/ typedef struct xcb_xkb_sa_move_ptr_iterator_t { xcb_xkb_sa_move_ptr_t *data; int rem; int index; } xcb_xkb_sa_move_ptr_iterator_t; /** * @brief xcb_xkb_sa_ptr_btn_t **/ typedef struct xcb_xkb_sa_ptr_btn_t { uint8_t type; uint8_t flags; uint8_t count; uint8_t button; uint8_t pad0[4]; } xcb_xkb_sa_ptr_btn_t; /** * @brief xcb_xkb_sa_ptr_btn_iterator_t **/ typedef struct xcb_xkb_sa_ptr_btn_iterator_t { xcb_xkb_sa_ptr_btn_t *data; int rem; int index; } xcb_xkb_sa_ptr_btn_iterator_t; /** * @brief xcb_xkb_sa_lock_ptr_btn_t **/ typedef struct xcb_xkb_sa_lock_ptr_btn_t { uint8_t type; uint8_t flags; uint8_t pad0; uint8_t button; uint8_t pad1[4]; } xcb_xkb_sa_lock_ptr_btn_t; /** * @brief xcb_xkb_sa_lock_ptr_btn_iterator_t **/ typedef struct xcb_xkb_sa_lock_ptr_btn_iterator_t { xcb_xkb_sa_lock_ptr_btn_t *data; int rem; int index; } xcb_xkb_sa_lock_ptr_btn_iterator_t; typedef enum xcb_xkb_sa_set_ptr_dflt_flag_t { XCB_XKB_SA_SET_PTR_DFLT_FLAG_DFLT_BTN_ABSOLUTE = 4, XCB_XKB_SA_SET_PTR_DFLT_FLAG_AFFECT_DFLT_BUTTON = 1 } xcb_xkb_sa_set_ptr_dflt_flag_t; /** * @brief xcb_xkb_sa_set_ptr_dflt_t **/ typedef struct xcb_xkb_sa_set_ptr_dflt_t { uint8_t type; uint8_t flags; uint8_t affect; int8_t value; uint8_t pad0[4]; } xcb_xkb_sa_set_ptr_dflt_t; /** * @brief xcb_xkb_sa_set_ptr_dflt_iterator_t **/ typedef struct xcb_xkb_sa_set_ptr_dflt_iterator_t { xcb_xkb_sa_set_ptr_dflt_t *data; int rem; int index; } xcb_xkb_sa_set_ptr_dflt_iterator_t; typedef enum xcb_xkb_sa_iso_lock_flag_t { XCB_XKB_SA_ISO_LOCK_FLAG_NO_LOCK = 1, XCB_XKB_SA_ISO_LOCK_FLAG_NO_UNLOCK = 2, XCB_XKB_SA_ISO_LOCK_FLAG_USE_MOD_MAP_MODS = 4, XCB_XKB_SA_ISO_LOCK_FLAG_GROUP_ABSOLUTE = 4, XCB_XKB_SA_ISO_LOCK_FLAG_ISO_DFLT_IS_GROUP = 8 } xcb_xkb_sa_iso_lock_flag_t; typedef enum xcb_xkb_sa_iso_lock_no_affect_t { XCB_XKB_SA_ISO_LOCK_NO_AFFECT_CTRLS = 8, XCB_XKB_SA_ISO_LOCK_NO_AFFECT_PTR = 16, XCB_XKB_SA_ISO_LOCK_NO_AFFECT_GROUP = 32, XCB_XKB_SA_ISO_LOCK_NO_AFFECT_MODS = 64 } xcb_xkb_sa_iso_lock_no_affect_t; /** * @brief xcb_xkb_sa_iso_lock_t **/ typedef struct xcb_xkb_sa_iso_lock_t { uint8_t type; uint8_t flags; uint8_t mask; uint8_t realMods; int8_t group; uint8_t affect; uint8_t vmodsHigh; uint8_t vmodsLow; } xcb_xkb_sa_iso_lock_t; /** * @brief xcb_xkb_sa_iso_lock_iterator_t **/ typedef struct xcb_xkb_sa_iso_lock_iterator_t { xcb_xkb_sa_iso_lock_t *data; int rem; int index; } xcb_xkb_sa_iso_lock_iterator_t; /** * @brief xcb_xkb_sa_terminate_t **/ typedef struct xcb_xkb_sa_terminate_t { uint8_t type; uint8_t pad0[7]; } xcb_xkb_sa_terminate_t; /** * @brief xcb_xkb_sa_terminate_iterator_t **/ typedef struct xcb_xkb_sa_terminate_iterator_t { xcb_xkb_sa_terminate_t *data; int rem; int index; } xcb_xkb_sa_terminate_iterator_t; typedef enum xcb_xkb_switch_screen_flag_t { XCB_XKB_SWITCH_SCREEN_FLAG_APPLICATION = 1, XCB_XKB_SWITCH_SCREEN_FLAG_ABSOLUTE = 4 } xcb_xkb_switch_screen_flag_t; /** * @brief xcb_xkb_sa_switch_screen_t **/ typedef struct xcb_xkb_sa_switch_screen_t { uint8_t type; uint8_t flags; int8_t newScreen; uint8_t pad0[5]; } xcb_xkb_sa_switch_screen_t; /** * @brief xcb_xkb_sa_switch_screen_iterator_t **/ typedef struct xcb_xkb_sa_switch_screen_iterator_t { xcb_xkb_sa_switch_screen_t *data; int rem; int index; } xcb_xkb_sa_switch_screen_iterator_t; typedef enum xcb_xkb_bool_ctrls_high_t { XCB_XKB_BOOL_CTRLS_HIGH_ACCESS_X_FEEDBACK = 1, XCB_XKB_BOOL_CTRLS_HIGH_AUDIBLE_BELL = 2, XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_1 = 4, XCB_XKB_BOOL_CTRLS_HIGH_OVERLAY_2 = 8, XCB_XKB_BOOL_CTRLS_HIGH_IGNORE_GROUP_LOCK = 16 } xcb_xkb_bool_ctrls_high_t; typedef enum xcb_xkb_bool_ctrls_low_t { XCB_XKB_BOOL_CTRLS_LOW_REPEAT_KEYS = 1, XCB_XKB_BOOL_CTRLS_LOW_SLOW_KEYS = 2, XCB_XKB_BOOL_CTRLS_LOW_BOUNCE_KEYS = 4, XCB_XKB_BOOL_CTRLS_LOW_STICKY_KEYS = 8, XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS = 16, XCB_XKB_BOOL_CTRLS_LOW_MOUSE_KEYS_ACCEL = 32, XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_KEYS = 64, XCB_XKB_BOOL_CTRLS_LOW_ACCESS_X_TIMEOUT = 128 } xcb_xkb_bool_ctrls_low_t; /** * @brief xcb_xkb_sa_set_controls_t **/ typedef struct xcb_xkb_sa_set_controls_t { uint8_t type; uint8_t pad0[3]; uint8_t boolCtrlsHigh; uint8_t boolCtrlsLow; uint8_t pad1[2]; } xcb_xkb_sa_set_controls_t; /** * @brief xcb_xkb_sa_set_controls_iterator_t **/ typedef struct xcb_xkb_sa_set_controls_iterator_t { xcb_xkb_sa_set_controls_t *data; int rem; int index; } xcb_xkb_sa_set_controls_iterator_t; /** * @brief xcb_xkb_sa_lock_controls_t **/ typedef struct xcb_xkb_sa_lock_controls_t { uint8_t type; uint8_t pad0[3]; uint8_t boolCtrlsHigh; uint8_t boolCtrlsLow; uint8_t pad1[2]; } xcb_xkb_sa_lock_controls_t; /** * @brief xcb_xkb_sa_lock_controls_iterator_t **/ typedef struct xcb_xkb_sa_lock_controls_iterator_t { xcb_xkb_sa_lock_controls_t *data; int rem; int index; } xcb_xkb_sa_lock_controls_iterator_t; typedef enum xcb_xkb_action_message_flag_t { XCB_XKB_ACTION_MESSAGE_FLAG_ON_PRESS = 1, XCB_XKB_ACTION_MESSAGE_FLAG_ON_RELEASE = 2, XCB_XKB_ACTION_MESSAGE_FLAG_GEN_KEY_EVENT = 4 } xcb_xkb_action_message_flag_t; /** * @brief xcb_xkb_sa_action_message_t **/ typedef struct xcb_xkb_sa_action_message_t { uint8_t type; uint8_t flags; uint8_t message[6]; } xcb_xkb_sa_action_message_t; /** * @brief xcb_xkb_sa_action_message_iterator_t **/ typedef struct xcb_xkb_sa_action_message_iterator_t { xcb_xkb_sa_action_message_t *data; int rem; int index; } xcb_xkb_sa_action_message_iterator_t; /** * @brief xcb_xkb_sa_redirect_key_t **/ typedef struct xcb_xkb_sa_redirect_key_t { uint8_t type; xcb_keycode_t newkey; uint8_t mask; uint8_t realModifiers; uint8_t vmodsMaskHigh; uint8_t vmodsMaskLow; uint8_t vmodsHigh; uint8_t vmodsLow; } xcb_xkb_sa_redirect_key_t; /** * @brief xcb_xkb_sa_redirect_key_iterator_t **/ typedef struct xcb_xkb_sa_redirect_key_iterator_t { xcb_xkb_sa_redirect_key_t *data; int rem; int index; } xcb_xkb_sa_redirect_key_iterator_t; /** * @brief xcb_xkb_sa_device_btn_t **/ typedef struct xcb_xkb_sa_device_btn_t { uint8_t type; uint8_t flags; uint8_t count; uint8_t button; uint8_t device; uint8_t pad0[3]; } xcb_xkb_sa_device_btn_t; /** * @brief xcb_xkb_sa_device_btn_iterator_t **/ typedef struct xcb_xkb_sa_device_btn_iterator_t { xcb_xkb_sa_device_btn_t *data; int rem; int index; } xcb_xkb_sa_device_btn_iterator_t; typedef enum xcb_xkb_lock_device_flags_t { XCB_XKB_LOCK_DEVICE_FLAGS_NO_LOCK = 1, XCB_XKB_LOCK_DEVICE_FLAGS_NO_UNLOCK = 2 } xcb_xkb_lock_device_flags_t; /** * @brief xcb_xkb_sa_lock_device_btn_t **/ typedef struct xcb_xkb_sa_lock_device_btn_t { uint8_t type; uint8_t flags; uint8_t pad0; uint8_t button; uint8_t device; uint8_t pad1[3]; } xcb_xkb_sa_lock_device_btn_t; /** * @brief xcb_xkb_sa_lock_device_btn_iterator_t **/ typedef struct xcb_xkb_sa_lock_device_btn_iterator_t { xcb_xkb_sa_lock_device_btn_t *data; int rem; int index; } xcb_xkb_sa_lock_device_btn_iterator_t; typedef enum xcb_xkb_sa_val_what_t { XCB_XKB_SA_VAL_WHAT_IGNORE_VAL = 0, XCB_XKB_SA_VAL_WHAT_SET_VAL_MIN = 1, XCB_XKB_SA_VAL_WHAT_SET_VAL_CENTER = 2, XCB_XKB_SA_VAL_WHAT_SET_VAL_MAX = 3, XCB_XKB_SA_VAL_WHAT_SET_VAL_RELATIVE = 4, XCB_XKB_SA_VAL_WHAT_SET_VAL_ABSOLUTE = 5 } xcb_xkb_sa_val_what_t; /** * @brief xcb_xkb_sa_device_valuator_t **/ typedef struct xcb_xkb_sa_device_valuator_t { uint8_t type; uint8_t device; uint8_t val1what; uint8_t val1index; uint8_t val1value; uint8_t val2what; uint8_t val2index; uint8_t val2value; } xcb_xkb_sa_device_valuator_t; /** * @brief xcb_xkb_sa_device_valuator_iterator_t **/ typedef struct xcb_xkb_sa_device_valuator_iterator_t { xcb_xkb_sa_device_valuator_t *data; int rem; int index; } xcb_xkb_sa_device_valuator_iterator_t; /** * @brief xcb_xkb_si_action_t **/ typedef struct xcb_xkb_si_action_t { uint8_t type; uint8_t data[7]; } xcb_xkb_si_action_t; /** * @brief xcb_xkb_si_action_iterator_t **/ typedef struct xcb_xkb_si_action_iterator_t { xcb_xkb_si_action_t *data; int rem; int index; } xcb_xkb_si_action_iterator_t; /** * @brief xcb_xkb_sym_interpret_t **/ typedef struct xcb_xkb_sym_interpret_t { xcb_keysym_t sym; uint8_t mods; uint8_t match; uint8_t virtualMod; uint8_t flags; xcb_xkb_si_action_t action; } xcb_xkb_sym_interpret_t; /** * @brief xcb_xkb_sym_interpret_iterator_t **/ typedef struct xcb_xkb_sym_interpret_iterator_t { xcb_xkb_sym_interpret_t *data; int rem; int index; } xcb_xkb_sym_interpret_iterator_t; /** * @brief xcb_xkb_action_t **/ typedef union xcb_xkb_action_t { xcb_xkb_sa_no_action_t noaction; xcb_xkb_sa_set_mods_t setmods; xcb_xkb_sa_latch_mods_t latchmods; xcb_xkb_sa_lock_mods_t lockmods; xcb_xkb_sa_set_group_t setgroup; xcb_xkb_sa_latch_group_t latchgroup; xcb_xkb_sa_lock_group_t lockgroup; xcb_xkb_sa_move_ptr_t moveptr; xcb_xkb_sa_ptr_btn_t ptrbtn; xcb_xkb_sa_lock_ptr_btn_t lockptrbtn; xcb_xkb_sa_set_ptr_dflt_t setptrdflt; xcb_xkb_sa_iso_lock_t isolock; xcb_xkb_sa_terminate_t terminate; xcb_xkb_sa_switch_screen_t switchscreen; xcb_xkb_sa_set_controls_t setcontrols; xcb_xkb_sa_lock_controls_t lockcontrols; xcb_xkb_sa_action_message_t message; xcb_xkb_sa_redirect_key_t redirect; xcb_xkb_sa_device_btn_t devbtn; xcb_xkb_sa_lock_device_btn_t lockdevbtn; xcb_xkb_sa_device_valuator_t devval; uint8_t type; } xcb_xkb_action_t; /** * @brief xcb_xkb_action_iterator_t **/ typedef struct xcb_xkb_action_iterator_t { xcb_xkb_action_t *data; int rem; int index; } xcb_xkb_action_iterator_t; /** * @brief xcb_xkb_use_extension_cookie_t **/ typedef struct xcb_xkb_use_extension_cookie_t { unsigned int sequence; } xcb_xkb_use_extension_cookie_t; /** Opcode for xcb_xkb_use_extension. */ #define XCB_XKB_USE_EXTENSION 0 /** * @brief xcb_xkb_use_extension_request_t **/ typedef struct xcb_xkb_use_extension_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t wantedMajor; uint16_t wantedMinor; } xcb_xkb_use_extension_request_t; /** * @brief xcb_xkb_use_extension_reply_t **/ typedef struct xcb_xkb_use_extension_reply_t { uint8_t response_type; uint8_t supported; uint16_t sequence; uint32_t length; uint16_t serverMajor; uint16_t serverMinor; uint8_t pad0[20]; } xcb_xkb_use_extension_reply_t; /** * @brief xcb_xkb_select_events_details_t **/ typedef struct xcb_xkb_select_events_details_t { uint16_t affectNewKeyboard; uint16_t newKeyboardDetails; uint16_t affectState; uint16_t stateDetails; uint32_t affectCtrls; uint32_t ctrlDetails; uint32_t affectIndicatorState; uint32_t indicatorStateDetails; uint32_t affectIndicatorMap; uint32_t indicatorMapDetails; uint16_t affectNames; uint16_t namesDetails; uint8_t affectCompat; uint8_t compatDetails; uint8_t affectBell; uint8_t bellDetails; uint8_t affectMsgDetails; uint8_t msgDetails; uint16_t affectAccessX; uint16_t accessXDetails; uint16_t affectExtDev; uint16_t extdevDetails; } xcb_xkb_select_events_details_t; /** Opcode for xcb_xkb_select_events. */ #define XCB_XKB_SELECT_EVENTS 1 /** * @brief xcb_xkb_select_events_request_t **/ typedef struct xcb_xkb_select_events_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint16_t affectWhich; uint16_t clear; uint16_t selectAll; uint16_t affectMap; uint16_t map; } xcb_xkb_select_events_request_t; /** Opcode for xcb_xkb_bell. */ #define XCB_XKB_BELL 3 /** * @brief xcb_xkb_bell_request_t **/ typedef struct xcb_xkb_bell_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; xcb_xkb_bell_class_spec_t bellClass; xcb_xkb_id_spec_t bellID; int8_t percent; uint8_t forceSound; uint8_t eventOnly; uint8_t pad0; int16_t pitch; int16_t duration; uint8_t pad1[2]; xcb_atom_t name; xcb_window_t window; } xcb_xkb_bell_request_t; /** * @brief xcb_xkb_get_state_cookie_t **/ typedef struct xcb_xkb_get_state_cookie_t { unsigned int sequence; } xcb_xkb_get_state_cookie_t; /** Opcode for xcb_xkb_get_state. */ #define XCB_XKB_GET_STATE 4 /** * @brief xcb_xkb_get_state_request_t **/ typedef struct xcb_xkb_get_state_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0[2]; } xcb_xkb_get_state_request_t; /** * @brief xcb_xkb_get_state_reply_t **/ typedef struct xcb_xkb_get_state_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint8_t mods; uint8_t baseMods; uint8_t latchedMods; uint8_t lockedMods; uint8_t group; uint8_t lockedGroup; int16_t baseGroup; int16_t latchedGroup; uint8_t compatState; uint8_t grabMods; uint8_t compatGrabMods; uint8_t lookupMods; uint8_t compatLookupMods; uint8_t pad0; uint16_t ptrBtnState; uint8_t pad1[6]; } xcb_xkb_get_state_reply_t; /** Opcode for xcb_xkb_latch_lock_state. */ #define XCB_XKB_LATCH_LOCK_STATE 5 /** * @brief xcb_xkb_latch_lock_state_request_t **/ typedef struct xcb_xkb_latch_lock_state_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t affectModLocks; uint8_t modLocks; uint8_t lockGroup; uint8_t groupLock; uint8_t affectModLatches; uint8_t pad0; uint8_t pad1; uint8_t latchGroup; uint16_t groupLatch; } xcb_xkb_latch_lock_state_request_t; /** * @brief xcb_xkb_get_controls_cookie_t **/ typedef struct xcb_xkb_get_controls_cookie_t { unsigned int sequence; } xcb_xkb_get_controls_cookie_t; /** Opcode for xcb_xkb_get_controls. */ #define XCB_XKB_GET_CONTROLS 6 /** * @brief xcb_xkb_get_controls_request_t **/ typedef struct xcb_xkb_get_controls_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0[2]; } xcb_xkb_get_controls_request_t; /** * @brief xcb_xkb_get_controls_reply_t **/ typedef struct xcb_xkb_get_controls_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint8_t mouseKeysDfltBtn; uint8_t numGroups; uint8_t groupsWrap; uint8_t internalModsMask; uint8_t ignoreLockModsMask; uint8_t internalModsRealMods; uint8_t ignoreLockModsRealMods; uint8_t pad0; uint16_t internalModsVmods; uint16_t ignoreLockModsVmods; uint16_t repeatDelay; uint16_t repeatInterval; uint16_t slowKeysDelay; uint16_t debounceDelay; uint16_t mouseKeysDelay; uint16_t mouseKeysInterval; uint16_t mouseKeysTimeToMax; uint16_t mouseKeysMaxSpeed; int16_t mouseKeysCurve; uint16_t accessXOption; uint16_t accessXTimeout; uint16_t accessXTimeoutOptionsMask; uint16_t accessXTimeoutOptionsValues; uint8_t pad1[2]; uint32_t accessXTimeoutMask; uint32_t accessXTimeoutValues; uint32_t enabledControls; uint8_t perKeyRepeat[32]; } xcb_xkb_get_controls_reply_t; /** Opcode for xcb_xkb_set_controls. */ #define XCB_XKB_SET_CONTROLS 7 /** * @brief xcb_xkb_set_controls_request_t **/ typedef struct xcb_xkb_set_controls_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t affectInternalRealMods; uint8_t internalRealMods; uint8_t affectIgnoreLockRealMods; uint8_t ignoreLockRealMods; uint16_t affectInternalVirtualMods; uint16_t internalVirtualMods; uint16_t affectIgnoreLockVirtualMods; uint16_t ignoreLockVirtualMods; uint8_t mouseKeysDfltBtn; uint8_t groupsWrap; uint16_t accessXOptions; uint8_t pad0[2]; uint32_t affectEnabledControls; uint32_t enabledControls; uint32_t changeControls; uint16_t repeatDelay; uint16_t repeatInterval; uint16_t slowKeysDelay; uint16_t debounceDelay; uint16_t mouseKeysDelay; uint16_t mouseKeysInterval; uint16_t mouseKeysTimeToMax; uint16_t mouseKeysMaxSpeed; int16_t mouseKeysCurve; uint16_t accessXTimeout; uint32_t accessXTimeoutMask; uint32_t accessXTimeoutValues; uint16_t accessXTimeoutOptionsMask; uint16_t accessXTimeoutOptionsValues; uint8_t perKeyRepeat[32]; } xcb_xkb_set_controls_request_t; /** * @brief xcb_xkb_get_map_cookie_t **/ typedef struct xcb_xkb_get_map_cookie_t { unsigned int sequence; } xcb_xkb_get_map_cookie_t; /** Opcode for xcb_xkb_get_map. */ #define XCB_XKB_GET_MAP 8 /** * @brief xcb_xkb_get_map_request_t **/ typedef struct xcb_xkb_get_map_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint16_t full; uint16_t partial; uint8_t firstType; uint8_t nTypes; xcb_keycode_t firstKeySym; uint8_t nKeySyms; xcb_keycode_t firstKeyAction; uint8_t nKeyActions; xcb_keycode_t firstKeyBehavior; uint8_t nKeyBehaviors; uint16_t virtualMods; xcb_keycode_t firstKeyExplicit; uint8_t nKeyExplicit; xcb_keycode_t firstModMapKey; uint8_t nModMapKeys; xcb_keycode_t firstVModMapKey; uint8_t nVModMapKeys; uint8_t pad0[2]; } xcb_xkb_get_map_request_t; /** * @brief xcb_xkb_get_map_map_t **/ typedef struct xcb_xkb_get_map_map_t { xcb_xkb_key_type_t *types_rtrn; xcb_xkb_key_sym_map_t *syms_rtrn; uint8_t *acts_rtrn_count; uint8_t *pad2; xcb_xkb_action_t *acts_rtrn_acts; xcb_xkb_set_behavior_t *behaviors_rtrn; uint8_t *vmods_rtrn; uint8_t *pad3; xcb_xkb_set_explicit_t *explicit_rtrn; uint8_t *pad4; xcb_xkb_key_mod_map_t *modmap_rtrn; uint8_t *pad5; xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; } xcb_xkb_get_map_map_t; /** * @brief xcb_xkb_get_map_reply_t **/ typedef struct xcb_xkb_get_map_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint8_t pad0[2]; xcb_keycode_t minKeyCode; xcb_keycode_t maxKeyCode; uint16_t present; uint8_t firstType; uint8_t nTypes; uint8_t totalTypes; xcb_keycode_t firstKeySym; uint16_t totalSyms; uint8_t nKeySyms; xcb_keycode_t firstKeyAction; uint16_t totalActions; uint8_t nKeyActions; xcb_keycode_t firstKeyBehavior; uint8_t nKeyBehaviors; uint8_t totalKeyBehaviors; xcb_keycode_t firstKeyExplicit; uint8_t nKeyExplicit; uint8_t totalKeyExplicit; xcb_keycode_t firstModMapKey; uint8_t nModMapKeys; uint8_t totalModMapKeys; xcb_keycode_t firstVModMapKey; uint8_t nVModMapKeys; uint8_t totalVModMapKeys; uint8_t pad1; uint16_t virtualMods; } xcb_xkb_get_map_reply_t; /** * @brief xcb_xkb_set_map_values_t **/ typedef struct xcb_xkb_set_map_values_t { xcb_xkb_set_key_type_t *types; xcb_xkb_key_sym_map_t *syms; uint8_t *actionsCount; xcb_xkb_action_t *actions; xcb_xkb_set_behavior_t *behaviors; uint8_t *vmods; xcb_xkb_set_explicit_t *explicit; xcb_xkb_key_mod_map_t *modmap; xcb_xkb_key_v_mod_map_t *vmodmap; } xcb_xkb_set_map_values_t; /** Opcode for xcb_xkb_set_map. */ #define XCB_XKB_SET_MAP 9 /** * @brief xcb_xkb_set_map_request_t **/ typedef struct xcb_xkb_set_map_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint16_t present; uint16_t flags; xcb_keycode_t minKeyCode; xcb_keycode_t maxKeyCode; uint8_t firstType; uint8_t nTypes; xcb_keycode_t firstKeySym; uint8_t nKeySyms; uint16_t totalSyms; xcb_keycode_t firstKeyAction; uint8_t nKeyActions; uint16_t totalActions; xcb_keycode_t firstKeyBehavior; uint8_t nKeyBehaviors; uint8_t totalKeyBehaviors; xcb_keycode_t firstKeyExplicit; uint8_t nKeyExplicit; uint8_t totalKeyExplicit; xcb_keycode_t firstModMapKey; uint8_t nModMapKeys; uint8_t totalModMapKeys; xcb_keycode_t firstVModMapKey; uint8_t nVModMapKeys; uint8_t totalVModMapKeys; uint16_t virtualMods; } xcb_xkb_set_map_request_t; /** * @brief xcb_xkb_get_compat_map_cookie_t **/ typedef struct xcb_xkb_get_compat_map_cookie_t { unsigned int sequence; } xcb_xkb_get_compat_map_cookie_t; /** Opcode for xcb_xkb_get_compat_map. */ #define XCB_XKB_GET_COMPAT_MAP 10 /** * @brief xcb_xkb_get_compat_map_request_t **/ typedef struct xcb_xkb_get_compat_map_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t groups; uint8_t getAllSI; uint16_t firstSI; uint16_t nSI; } xcb_xkb_get_compat_map_request_t; /** * @brief xcb_xkb_get_compat_map_reply_t **/ typedef struct xcb_xkb_get_compat_map_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint8_t groupsRtrn; uint8_t pad0; uint16_t firstSIRtrn; uint16_t nSIRtrn; uint16_t nTotalSI; uint8_t pad1[16]; } xcb_xkb_get_compat_map_reply_t; /** Opcode for xcb_xkb_set_compat_map. */ #define XCB_XKB_SET_COMPAT_MAP 11 /** * @brief xcb_xkb_set_compat_map_request_t **/ typedef struct xcb_xkb_set_compat_map_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0; uint8_t recomputeActions; uint8_t truncateSI; uint8_t groups; uint16_t firstSI; uint16_t nSI; uint8_t pad1[2]; } xcb_xkb_set_compat_map_request_t; /** * @brief xcb_xkb_get_indicator_state_cookie_t **/ typedef struct xcb_xkb_get_indicator_state_cookie_t { unsigned int sequence; } xcb_xkb_get_indicator_state_cookie_t; /** Opcode for xcb_xkb_get_indicator_state. */ #define XCB_XKB_GET_INDICATOR_STATE 12 /** * @brief xcb_xkb_get_indicator_state_request_t **/ typedef struct xcb_xkb_get_indicator_state_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0[2]; } xcb_xkb_get_indicator_state_request_t; /** * @brief xcb_xkb_get_indicator_state_reply_t **/ typedef struct xcb_xkb_get_indicator_state_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint32_t state; uint8_t pad0[20]; } xcb_xkb_get_indicator_state_reply_t; /** * @brief xcb_xkb_get_indicator_map_cookie_t **/ typedef struct xcb_xkb_get_indicator_map_cookie_t { unsigned int sequence; } xcb_xkb_get_indicator_map_cookie_t; /** Opcode for xcb_xkb_get_indicator_map. */ #define XCB_XKB_GET_INDICATOR_MAP 13 /** * @brief xcb_xkb_get_indicator_map_request_t **/ typedef struct xcb_xkb_get_indicator_map_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0[2]; uint32_t which; } xcb_xkb_get_indicator_map_request_t; /** * @brief xcb_xkb_get_indicator_map_reply_t **/ typedef struct xcb_xkb_get_indicator_map_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint32_t which; uint32_t realIndicators; uint8_t nIndicators; uint8_t pad0[15]; } xcb_xkb_get_indicator_map_reply_t; /** Opcode for xcb_xkb_set_indicator_map. */ #define XCB_XKB_SET_INDICATOR_MAP 14 /** * @brief xcb_xkb_set_indicator_map_request_t **/ typedef struct xcb_xkb_set_indicator_map_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0[2]; uint32_t which; } xcb_xkb_set_indicator_map_request_t; /** * @brief xcb_xkb_get_named_indicator_cookie_t **/ typedef struct xcb_xkb_get_named_indicator_cookie_t { unsigned int sequence; } xcb_xkb_get_named_indicator_cookie_t; /** Opcode for xcb_xkb_get_named_indicator. */ #define XCB_XKB_GET_NAMED_INDICATOR 15 /** * @brief xcb_xkb_get_named_indicator_request_t **/ typedef struct xcb_xkb_get_named_indicator_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; xcb_xkb_led_class_spec_t ledClass; xcb_xkb_id_spec_t ledID; uint8_t pad0[2]; xcb_atom_t indicator; } xcb_xkb_get_named_indicator_request_t; /** * @brief xcb_xkb_get_named_indicator_reply_t **/ typedef struct xcb_xkb_get_named_indicator_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; xcb_atom_t indicator; uint8_t found; uint8_t on; uint8_t realIndicator; uint8_t ndx; uint8_t map_flags; uint8_t map_whichGroups; uint8_t map_groups; uint8_t map_whichMods; uint8_t map_mods; uint8_t map_realMods; uint16_t map_vmod; uint32_t map_ctrls; uint8_t supported; uint8_t pad0[3]; } xcb_xkb_get_named_indicator_reply_t; /** Opcode for xcb_xkb_set_named_indicator. */ #define XCB_XKB_SET_NAMED_INDICATOR 16 /** * @brief xcb_xkb_set_named_indicator_request_t **/ typedef struct xcb_xkb_set_named_indicator_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; xcb_xkb_led_class_spec_t ledClass; xcb_xkb_id_spec_t ledID; uint8_t pad0[2]; xcb_atom_t indicator; uint8_t setState; uint8_t on; uint8_t setMap; uint8_t createMap; uint8_t pad1; uint8_t map_flags; uint8_t map_whichGroups; uint8_t map_groups; uint8_t map_whichMods; uint8_t map_realMods; uint16_t map_vmods; uint32_t map_ctrls; } xcb_xkb_set_named_indicator_request_t; /** * @brief xcb_xkb_get_names_cookie_t **/ typedef struct xcb_xkb_get_names_cookie_t { unsigned int sequence; } xcb_xkb_get_names_cookie_t; /** Opcode for xcb_xkb_get_names. */ #define XCB_XKB_GET_NAMES 17 /** * @brief xcb_xkb_get_names_request_t **/ typedef struct xcb_xkb_get_names_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0[2]; uint32_t which; } xcb_xkb_get_names_request_t; /** * @brief xcb_xkb_get_names_value_list_t **/ typedef struct xcb_xkb_get_names_value_list_t { xcb_atom_t keycodesName; xcb_atom_t geometryName; xcb_atom_t symbolsName; xcb_atom_t physSymbolsName; xcb_atom_t typesName; xcb_atom_t compatName; xcb_atom_t *typeNames; uint8_t *nLevelsPerType; uint8_t *pad1; xcb_atom_t *ktLevelNames; xcb_atom_t *indicatorNames; xcb_atom_t *virtualModNames; xcb_atom_t *groups; xcb_xkb_key_name_t *keyNames; xcb_xkb_key_alias_t *keyAliases; xcb_atom_t *radioGroupNames; } xcb_xkb_get_names_value_list_t; /** * @brief xcb_xkb_get_names_reply_t **/ typedef struct xcb_xkb_get_names_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint32_t which; xcb_keycode_t minKeyCode; xcb_keycode_t maxKeyCode; uint8_t nTypes; uint8_t groupNames; uint16_t virtualMods; xcb_keycode_t firstKey; uint8_t nKeys; uint32_t indicators; uint8_t nRadioGroups; uint8_t nKeyAliases; uint16_t nKTLevels; uint8_t pad0[4]; } xcb_xkb_get_names_reply_t; /** * @brief xcb_xkb_set_names_values_t **/ typedef struct xcb_xkb_set_names_values_t { xcb_atom_t keycodesName; xcb_atom_t geometryName; xcb_atom_t symbolsName; xcb_atom_t physSymbolsName; xcb_atom_t typesName; xcb_atom_t compatName; xcb_atom_t *typeNames; uint8_t *nLevelsPerType; xcb_atom_t *ktLevelNames; xcb_atom_t *indicatorNames; xcb_atom_t *virtualModNames; xcb_atom_t *groups; xcb_xkb_key_name_t *keyNames; xcb_xkb_key_alias_t *keyAliases; xcb_atom_t *radioGroupNames; } xcb_xkb_set_names_values_t; /** Opcode for xcb_xkb_set_names. */ #define XCB_XKB_SET_NAMES 18 /** * @brief xcb_xkb_set_names_request_t **/ typedef struct xcb_xkb_set_names_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint16_t virtualMods; uint32_t which; uint8_t firstType; uint8_t nTypes; uint8_t firstKTLevelt; uint8_t nKTLevels; uint32_t indicators; uint8_t groupNames; uint8_t nRadioGroups; xcb_keycode_t firstKey; uint8_t nKeys; uint8_t nKeyAliases; uint8_t pad0; uint16_t totalKTLevelNames; } xcb_xkb_set_names_request_t; /** * @brief xcb_xkb_per_client_flags_cookie_t **/ typedef struct xcb_xkb_per_client_flags_cookie_t { unsigned int sequence; } xcb_xkb_per_client_flags_cookie_t; /** Opcode for xcb_xkb_per_client_flags. */ #define XCB_XKB_PER_CLIENT_FLAGS 21 /** * @brief xcb_xkb_per_client_flags_request_t **/ typedef struct xcb_xkb_per_client_flags_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t pad0[2]; uint32_t change; uint32_t value; uint32_t ctrlsToChange; uint32_t autoCtrls; uint32_t autoCtrlsValues; } xcb_xkb_per_client_flags_request_t; /** * @brief xcb_xkb_per_client_flags_reply_t **/ typedef struct xcb_xkb_per_client_flags_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint32_t supported; uint32_t value; uint32_t autoCtrls; uint32_t autoCtrlsValues; uint8_t pad0[8]; } xcb_xkb_per_client_flags_reply_t; /** * @brief xcb_xkb_list_components_cookie_t **/ typedef struct xcb_xkb_list_components_cookie_t { unsigned int sequence; } xcb_xkb_list_components_cookie_t; /** Opcode for xcb_xkb_list_components. */ #define XCB_XKB_LIST_COMPONENTS 22 /** * @brief xcb_xkb_list_components_request_t **/ typedef struct xcb_xkb_list_components_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint16_t maxNames; } xcb_xkb_list_components_request_t; /** * @brief xcb_xkb_list_components_reply_t **/ typedef struct xcb_xkb_list_components_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint16_t nKeymaps; uint16_t nKeycodes; uint16_t nTypes; uint16_t nCompatMaps; uint16_t nSymbols; uint16_t nGeometries; uint16_t extra; uint8_t pad0[10]; } xcb_xkb_list_components_reply_t; /** * @brief xcb_xkb_get_kbd_by_name_cookie_t **/ typedef struct xcb_xkb_get_kbd_by_name_cookie_t { unsigned int sequence; } xcb_xkb_get_kbd_by_name_cookie_t; /** Opcode for xcb_xkb_get_kbd_by_name. */ #define XCB_XKB_GET_KBD_BY_NAME 23 /** * @brief xcb_xkb_get_kbd_by_name_request_t **/ typedef struct xcb_xkb_get_kbd_by_name_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint16_t need; uint16_t want; uint8_t load; uint8_t pad0; } xcb_xkb_get_kbd_by_name_request_t; /** * @brief xcb_xkb_get_kbd_by_name_replies_types_map_t **/ typedef struct xcb_xkb_get_kbd_by_name_replies_types_map_t { xcb_xkb_key_type_t *types_rtrn; xcb_xkb_key_sym_map_t *syms_rtrn; uint8_t *acts_rtrn_count; xcb_xkb_action_t *acts_rtrn_acts; xcb_xkb_set_behavior_t *behaviors_rtrn; uint8_t *vmods_rtrn; xcb_xkb_set_explicit_t *explicit_rtrn; xcb_xkb_key_mod_map_t *modmap_rtrn; xcb_xkb_key_v_mod_map_t *vmodmap_rtrn; } xcb_xkb_get_kbd_by_name_replies_types_map_t; /** * @brief xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t **/ typedef struct xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t { xcb_atom_t keycodesName; xcb_atom_t geometryName; xcb_atom_t symbolsName; xcb_atom_t physSymbolsName; xcb_atom_t typesName; xcb_atom_t compatName; xcb_atom_t *typeNames; uint8_t *nLevelsPerType; xcb_atom_t *ktLevelNames; xcb_atom_t *indicatorNames; xcb_atom_t *virtualModNames; xcb_atom_t *groups; xcb_xkb_key_name_t *keyNames; xcb_xkb_key_alias_t *keyAliases; xcb_atom_t *radioGroupNames; } xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t; /** * @brief xcb_xkb_get_kbd_by_name_replies_t **/ typedef struct xcb_xkb_get_kbd_by_name_replies_t { struct { uint8_t getmap_type; uint8_t typeDeviceID; uint16_t getmap_sequence; uint32_t getmap_length; uint8_t pad1[2]; xcb_keycode_t typeMinKeyCode; xcb_keycode_t typeMaxKeyCode; uint16_t present; uint8_t firstType; uint8_t nTypes; uint8_t totalTypes; xcb_keycode_t firstKeySym; uint16_t totalSyms; uint8_t nKeySyms; xcb_keycode_t firstKeyAction; uint16_t totalActions; uint8_t nKeyActions; xcb_keycode_t firstKeyBehavior; uint8_t nKeyBehaviors; uint8_t totalKeyBehaviors; xcb_keycode_t firstKeyExplicit; uint8_t nKeyExplicit; uint8_t totalKeyExplicit; xcb_keycode_t firstModMapKey; uint8_t nModMapKeys; uint8_t totalModMapKeys; xcb_keycode_t firstVModMapKey; uint8_t nVModMapKeys; uint8_t totalVModMapKeys; uint8_t pad2; uint16_t virtualMods; xcb_xkb_get_kbd_by_name_replies_types_map_t map; } types; struct { uint8_t compatmap_type; uint8_t compatDeviceID; uint16_t compatmap_sequence; uint32_t compatmap_length; uint8_t groupsRtrn; uint8_t pad7; uint16_t firstSIRtrn; uint16_t nSIRtrn; uint16_t nTotalSI; uint8_t pad8[16]; xcb_xkb_sym_interpret_t *si_rtrn; xcb_xkb_mod_def_t *group_rtrn; } compat_map; struct { uint8_t indicatormap_type; uint8_t indicatorDeviceID; uint16_t indicatormap_sequence; uint32_t indicatormap_length; uint32_t which; uint32_t realIndicators; uint8_t nIndicators; uint8_t pad9[15]; xcb_xkb_indicator_map_t *maps; } indicator_maps; struct { uint8_t keyname_type; uint8_t keyDeviceID; uint16_t keyname_sequence; uint32_t keyname_length; uint32_t which; xcb_keycode_t keyMinKeyCode; xcb_keycode_t keyMaxKeyCode; uint8_t nTypes; uint8_t groupNames; uint16_t virtualMods; xcb_keycode_t firstKey; uint8_t nKeys; uint32_t indicators; uint8_t nRadioGroups; uint8_t nKeyAliases; uint16_t nKTLevels; uint8_t pad10[4]; xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t valueList; } key_names; struct { uint8_t geometry_type; uint8_t geometryDeviceID; uint16_t geometry_sequence; uint32_t geometry_length; xcb_atom_t name; uint8_t geometryFound; uint8_t pad12; uint16_t widthMM; uint16_t heightMM; uint16_t nProperties; uint16_t nColors; uint16_t nShapes; uint16_t nSections; uint16_t nDoodads; uint16_t nKeyAliases; uint8_t baseColorNdx; uint8_t labelColorNdx; xcb_xkb_counted_string_16_t *labelFont; } geometry; } xcb_xkb_get_kbd_by_name_replies_t; xcb_xkb_get_kbd_by_name_replies_types_map_t * xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R); /** * @brief xcb_xkb_get_kbd_by_name_reply_t **/ typedef struct xcb_xkb_get_kbd_by_name_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; xcb_keycode_t minKeyCode; xcb_keycode_t maxKeyCode; uint8_t loaded; uint8_t newKeyboard; uint16_t found; uint16_t reported; uint8_t pad0[16]; } xcb_xkb_get_kbd_by_name_reply_t; /** * @brief xcb_xkb_get_device_info_cookie_t **/ typedef struct xcb_xkb_get_device_info_cookie_t { unsigned int sequence; } xcb_xkb_get_device_info_cookie_t; /** Opcode for xcb_xkb_get_device_info. */ #define XCB_XKB_GET_DEVICE_INFO 24 /** * @brief xcb_xkb_get_device_info_request_t **/ typedef struct xcb_xkb_get_device_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint16_t wanted; uint8_t allButtons; uint8_t firstButton; uint8_t nButtons; uint8_t pad0; xcb_xkb_led_class_spec_t ledClass; xcb_xkb_id_spec_t ledID; } xcb_xkb_get_device_info_request_t; /** * @brief xcb_xkb_get_device_info_reply_t **/ typedef struct xcb_xkb_get_device_info_reply_t { uint8_t response_type; uint8_t deviceID; uint16_t sequence; uint32_t length; uint16_t present; uint16_t supported; uint16_t unsupported; uint16_t nDeviceLedFBs; uint8_t firstBtnWanted; uint8_t nBtnsWanted; uint8_t firstBtnRtrn; uint8_t nBtnsRtrn; uint8_t totalBtns; uint8_t hasOwnState; uint16_t dfltKbdFB; uint16_t dfltLedFB; uint8_t pad0[2]; xcb_atom_t devType; uint16_t nameLen; } xcb_xkb_get_device_info_reply_t; /** Opcode for xcb_xkb_set_device_info. */ #define XCB_XKB_SET_DEVICE_INFO 25 /** * @brief xcb_xkb_set_device_info_request_t **/ typedef struct xcb_xkb_set_device_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xkb_device_spec_t deviceSpec; uint8_t firstBtn; uint8_t nBtns; uint16_t change; uint16_t nDeviceLedFBs; } xcb_xkb_set_device_info_request_t; /** * @brief xcb_xkb_set_debugging_flags_cookie_t **/ typedef struct xcb_xkb_set_debugging_flags_cookie_t { unsigned int sequence; } xcb_xkb_set_debugging_flags_cookie_t; /** Opcode for xcb_xkb_set_debugging_flags. */ #define XCB_XKB_SET_DEBUGGING_FLAGS 101 /** * @brief xcb_xkb_set_debugging_flags_request_t **/ typedef struct xcb_xkb_set_debugging_flags_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t msgLength; uint8_t pad0[2]; uint32_t affectFlags; uint32_t flags; uint32_t affectCtrls; uint32_t ctrls; } xcb_xkb_set_debugging_flags_request_t; /** * @brief xcb_xkb_set_debugging_flags_reply_t **/ typedef struct xcb_xkb_set_debugging_flags_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t currentFlags; uint32_t currentCtrls; uint32_t supportedFlags; uint32_t supportedCtrls; uint8_t pad1[8]; } xcb_xkb_set_debugging_flags_reply_t; /** Opcode for xcb_xkb_new_keyboard_notify. */ #define XCB_XKB_NEW_KEYBOARD_NOTIFY 0 /** * @brief xcb_xkb_new_keyboard_notify_event_t **/ typedef struct xcb_xkb_new_keyboard_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t oldDeviceID; xcb_keycode_t minKeyCode; xcb_keycode_t maxKeyCode; xcb_keycode_t oldMinKeyCode; xcb_keycode_t oldMaxKeyCode; uint8_t requestMajor; uint8_t requestMinor; uint16_t changed; uint8_t pad0[14]; } xcb_xkb_new_keyboard_notify_event_t; /** Opcode for xcb_xkb_map_notify. */ #define XCB_XKB_MAP_NOTIFY 1 /** * @brief xcb_xkb_map_notify_event_t **/ typedef struct xcb_xkb_map_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t ptrBtnActions; uint16_t changed; xcb_keycode_t minKeyCode; xcb_keycode_t maxKeyCode; uint8_t firstType; uint8_t nTypes; xcb_keycode_t firstKeySym; uint8_t nKeySyms; xcb_keycode_t firstKeyAct; uint8_t nKeyActs; xcb_keycode_t firstKeyBehavior; uint8_t nKeyBehavior; xcb_keycode_t firstKeyExplicit; uint8_t nKeyExplicit; xcb_keycode_t firstModMapKey; uint8_t nModMapKeys; xcb_keycode_t firstVModMapKey; uint8_t nVModMapKeys; uint16_t virtualMods; uint8_t pad0[2]; } xcb_xkb_map_notify_event_t; /** Opcode for xcb_xkb_state_notify. */ #define XCB_XKB_STATE_NOTIFY 2 /** * @brief xcb_xkb_state_notify_event_t **/ typedef struct xcb_xkb_state_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t mods; uint8_t baseMods; uint8_t latchedMods; uint8_t lockedMods; uint8_t group; int16_t baseGroup; int16_t latchedGroup; uint8_t lockedGroup; uint8_t compatState; uint8_t grabMods; uint8_t compatGrabMods; uint8_t lookupMods; uint8_t compatLoockupMods; uint16_t ptrBtnState; uint16_t changed; xcb_keycode_t keycode; uint8_t eventType; uint8_t requestMajor; uint8_t requestMinor; } xcb_xkb_state_notify_event_t; /** Opcode for xcb_xkb_controls_notify. */ #define XCB_XKB_CONTROLS_NOTIFY 3 /** * @brief xcb_xkb_controls_notify_event_t **/ typedef struct xcb_xkb_controls_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t numGroups; uint8_t pad0[2]; uint32_t changedControls; uint32_t enabledControls; uint32_t enabledControlChanges; xcb_keycode_t keycode; uint8_t eventType; uint8_t requestMajor; uint8_t requestMinor; uint8_t pad1[4]; } xcb_xkb_controls_notify_event_t; /** Opcode for xcb_xkb_indicator_state_notify. */ #define XCB_XKB_INDICATOR_STATE_NOTIFY 4 /** * @brief xcb_xkb_indicator_state_notify_event_t **/ typedef struct xcb_xkb_indicator_state_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t pad0[3]; uint32_t state; uint32_t stateChanged; uint8_t pad1[12]; } xcb_xkb_indicator_state_notify_event_t; /** Opcode for xcb_xkb_indicator_map_notify. */ #define XCB_XKB_INDICATOR_MAP_NOTIFY 5 /** * @brief xcb_xkb_indicator_map_notify_event_t **/ typedef struct xcb_xkb_indicator_map_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t pad0[3]; uint32_t state; uint32_t mapChanged; uint8_t pad1[12]; } xcb_xkb_indicator_map_notify_event_t; /** Opcode for xcb_xkb_names_notify. */ #define XCB_XKB_NAMES_NOTIFY 6 /** * @brief xcb_xkb_names_notify_event_t **/ typedef struct xcb_xkb_names_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t pad0; uint16_t changed; uint8_t firstType; uint8_t nTypes; uint8_t firstLevelName; uint8_t nLevelNames; uint8_t pad1; uint8_t nRadioGroups; uint8_t nKeyAliases; uint8_t changedGroupNames; uint16_t changedVirtualMods; xcb_keycode_t firstKey; uint8_t nKeys; uint32_t changedIndicators; uint8_t pad2[4]; } xcb_xkb_names_notify_event_t; /** Opcode for xcb_xkb_compat_map_notify. */ #define XCB_XKB_COMPAT_MAP_NOTIFY 7 /** * @brief xcb_xkb_compat_map_notify_event_t **/ typedef struct xcb_xkb_compat_map_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t changedGroups; uint16_t firstSI; uint16_t nSI; uint16_t nTotalSI; uint8_t pad0[16]; } xcb_xkb_compat_map_notify_event_t; /** Opcode for xcb_xkb_bell_notify. */ #define XCB_XKB_BELL_NOTIFY 8 /** * @brief xcb_xkb_bell_notify_event_t **/ typedef struct xcb_xkb_bell_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t bellClass; uint8_t bellID; uint8_t percent; uint16_t pitch; uint16_t duration; xcb_atom_t name; xcb_window_t window; uint8_t eventOnly; uint8_t pad0[7]; } xcb_xkb_bell_notify_event_t; /** Opcode for xcb_xkb_action_message. */ #define XCB_XKB_ACTION_MESSAGE 9 /** * @brief xcb_xkb_action_message_event_t **/ typedef struct xcb_xkb_action_message_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; xcb_keycode_t keycode; uint8_t press; uint8_t keyEventFollows; uint8_t mods; uint8_t group; xcb_xkb_string8_t message[8]; uint8_t pad0[10]; } xcb_xkb_action_message_event_t; /** Opcode for xcb_xkb_access_x_notify. */ #define XCB_XKB_ACCESS_X_NOTIFY 10 /** * @brief xcb_xkb_access_x_notify_event_t **/ typedef struct xcb_xkb_access_x_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; xcb_keycode_t keycode; uint16_t detailt; uint16_t slowKeysDelay; uint16_t debounceDelay; uint8_t pad0[16]; } xcb_xkb_access_x_notify_event_t; /** Opcode for xcb_xkb_extension_device_notify. */ #define XCB_XKB_EXTENSION_DEVICE_NOTIFY 11 /** * @brief xcb_xkb_extension_device_notify_event_t **/ typedef struct xcb_xkb_extension_device_notify_event_t { uint8_t response_type; uint8_t xkbType; uint16_t sequence; xcb_timestamp_t time; uint8_t deviceID; uint8_t pad0; uint16_t reason; uint16_t ledClass; uint16_t ledID; uint32_t ledsDefined; uint32_t ledState; uint8_t firstButton; uint8_t nButtons; uint16_t supported; uint16_t unsupported; uint8_t pad1[2]; } xcb_xkb_extension_device_notify_event_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_device_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_device_spec_t) */ void xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_device_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_device_spec_end (xcb_xkb_device_spec_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_led_class_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_led_class_spec_t) */ void xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_led_class_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_led_class_spec_end (xcb_xkb_led_class_spec_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_bell_class_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_bell_class_spec_t) */ void xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_bell_class_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_id_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_id_spec_t) */ void xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_id_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_indicator_map_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_indicator_map_t) */ void xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_indicator_map_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_mod_def_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_mod_def_t) */ void xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_mod_def_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_key_name_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_key_name_t) */ void xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_key_name_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_key_alias_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_key_alias_t) */ void xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_key_alias_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i); int xcb_xkb_counted_string_16_sizeof (const void *_buffer); char * xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R); int xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R); xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R); void * xcb_xkb_counted_string_16_alignment_pad (const xcb_xkb_counted_string_16_t *R); int xcb_xkb_counted_string_16_alignment_pad_length (const xcb_xkb_counted_string_16_t *R); xcb_generic_iterator_t xcb_xkb_counted_string_16_alignment_pad_end (const xcb_xkb_counted_string_16_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_counted_string_16_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_counted_string_16_t) */ void xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_counted_string_16_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_kt_map_entry_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_kt_map_entry_t) */ void xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_kt_map_entry_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i); int xcb_xkb_key_type_sizeof (const void *_buffer); xcb_xkb_kt_map_entry_t * xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R); int xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R); xcb_xkb_kt_map_entry_iterator_t xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R); xcb_xkb_mod_def_t * xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R); int xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R); xcb_xkb_mod_def_iterator_t xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_key_type_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_key_type_t) */ void xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_key_type_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i); int xcb_xkb_key_sym_map_sizeof (const void *_buffer); xcb_keysym_t * xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R); int xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R); xcb_generic_iterator_t xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_key_sym_map_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_key_sym_map_t) */ void xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_key_sym_map_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_common_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_common_behavior_t) */ void xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_common_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_default_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_default_behavior_t) */ void xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_default_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_lock_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_lock_behavior_t) */ void xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_lock_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_radio_group_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_radio_group_behavior_t) */ void xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_radio_group_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_overlay_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_overlay_behavior_t) */ void xcb_xkb_overlay_behavior_next (xcb_xkb_overlay_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_overlay_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_overlay_behavior_end (xcb_xkb_overlay_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_permament_lock_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_permament_lock_behavior_t) */ void xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_permament_lock_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_permament_radio_group_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_permament_radio_group_behavior_t) */ void xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_permament_radio_group_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_permament_overlay_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_permament_overlay_behavior_t) */ void xcb_xkb_permament_overlay_behavior_next (xcb_xkb_permament_overlay_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_permament_overlay_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_permament_overlay_behavior_end (xcb_xkb_permament_overlay_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_behavior_t) */ void xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_set_behavior_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_set_behavior_t) */ void xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_set_behavior_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_set_explicit_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_set_explicit_t) */ void xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_set_explicit_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_key_mod_map_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_key_mod_map_t) */ void xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_key_mod_map_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_key_v_mod_map_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_key_v_mod_map_t) */ void xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_key_v_mod_map_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_kt_set_map_entry_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_kt_set_map_entry_t) */ void xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_kt_set_map_entry_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i); int xcb_xkb_set_key_type_sizeof (const void *_buffer); xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R); int xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R); xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R); xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R); int xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R); xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_set_key_type_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_set_key_type_t) */ void xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_set_key_type_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_string8_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_string8_t) */ void xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_string8_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i); int xcb_xkb_outline_sizeof (const void *_buffer); xcb_point_t * xcb_xkb_outline_points (const xcb_xkb_outline_t *R); int xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R); xcb_point_iterator_t xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_outline_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_outline_t) */ void xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_outline_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i); int xcb_xkb_shape_sizeof (const void *_buffer); int xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R); xcb_xkb_outline_iterator_t xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_shape_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_shape_t) */ void xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_shape_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_key_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_key_t) */ void xcb_xkb_key_next (xcb_xkb_key_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_key_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_key_end (xcb_xkb_key_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_overlay_key_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_overlay_key_t) */ void xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_overlay_key_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i); int xcb_xkb_overlay_row_sizeof (const void *_buffer); xcb_xkb_overlay_key_t * xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R); int xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R); xcb_xkb_overlay_key_iterator_t xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_overlay_row_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_overlay_row_t) */ void xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_overlay_row_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i); int xcb_xkb_overlay_sizeof (const void *_buffer); int xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R); xcb_xkb_overlay_row_iterator_t xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_overlay_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_overlay_t) */ void xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_overlay_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i); int xcb_xkb_row_sizeof (const void *_buffer); xcb_xkb_key_t * xcb_xkb_row_keys (const xcb_xkb_row_t *R); int xcb_xkb_row_keys_length (const xcb_xkb_row_t *R); xcb_xkb_key_iterator_t xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_row_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_row_t) */ void xcb_xkb_row_next (xcb_xkb_row_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_row_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_row_end (xcb_xkb_row_iterator_t i); int xcb_xkb_listing_sizeof (const void *_buffer); xcb_xkb_string8_t * xcb_xkb_listing_string (const xcb_xkb_listing_t *R); int xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R); xcb_generic_iterator_t xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_listing_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_listing_t) */ void xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_listing_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i); int xcb_xkb_device_led_info_sizeof (const void *_buffer); xcb_atom_t * xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R); int xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R); xcb_generic_iterator_t xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R); xcb_xkb_indicator_map_t * xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R); int xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R); xcb_xkb_indicator_map_iterator_t xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_device_led_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_device_led_info_t) */ void xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_device_led_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_no_action_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_no_action_t) */ void xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_no_action_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_set_mods_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_set_mods_t) */ void xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_set_mods_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_latch_mods_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_latch_mods_t) */ void xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_latch_mods_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_lock_mods_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_lock_mods_t) */ void xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_lock_mods_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_set_group_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_set_group_t) */ void xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_set_group_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_latch_group_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_latch_group_t) */ void xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_latch_group_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_lock_group_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_lock_group_t) */ void xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_lock_group_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_move_ptr_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_move_ptr_t) */ void xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_move_ptr_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_ptr_btn_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_ptr_btn_t) */ void xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_ptr_btn_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_lock_ptr_btn_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_lock_ptr_btn_t) */ void xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_lock_ptr_btn_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_set_ptr_dflt_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_set_ptr_dflt_t) */ void xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_set_ptr_dflt_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_iso_lock_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_iso_lock_t) */ void xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_iso_lock_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_terminate_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_terminate_t) */ void xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_terminate_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_switch_screen_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_switch_screen_t) */ void xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_switch_screen_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_set_controls_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_set_controls_t) */ void xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_set_controls_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_lock_controls_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_lock_controls_t) */ void xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_lock_controls_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_action_message_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_action_message_t) */ void xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_action_message_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_redirect_key_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_redirect_key_t) */ void xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_redirect_key_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_device_btn_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_device_btn_t) */ void xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_device_btn_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_lock_device_btn_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_lock_device_btn_t) */ void xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_lock_device_btn_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sa_device_valuator_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sa_device_valuator_t) */ void xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sa_device_valuator_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_si_action_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_si_action_t) */ void xcb_xkb_si_action_next (xcb_xkb_si_action_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_si_action_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_si_action_end (xcb_xkb_si_action_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_sym_interpret_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_sym_interpret_t) */ void xcb_xkb_sym_interpret_next (xcb_xkb_sym_interpret_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_sym_interpret_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_sym_interpret_end (xcb_xkb_sym_interpret_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xkb_action_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xkb_action_t) */ void xcb_xkb_action_next (xcb_xkb_action_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xkb_action_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xkb_action_end (xcb_xkb_action_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension (xcb_connection_t *c, uint16_t wantedMajor, uint16_t wantedMinor); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension_unchecked (xcb_connection_t *c, uint16_t wantedMajor, uint16_t wantedMinor); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_use_extension_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_use_extension_reply_t * xcb_xkb_use_extension_reply (xcb_connection_t *c, xcb_xkb_use_extension_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_select_events_details_serialize (void **_buffer, uint16_t affectWhich, uint16_t clear, uint16_t selectAll, const xcb_xkb_select_events_details_t *_aux); int xcb_xkb_select_events_details_unpack (const void *_buffer, uint16_t affectWhich, uint16_t clear, uint16_t selectAll, xcb_xkb_select_events_details_t *_aux); int xcb_xkb_select_events_details_sizeof (const void *_buffer, uint16_t affectWhich, uint16_t clear, uint16_t selectAll); int xcb_xkb_select_events_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_select_events_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t affectWhich, uint16_t clear, uint16_t selectAll, uint16_t affectMap, uint16_t map, const void *details); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_select_events (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t affectWhich, uint16_t clear, uint16_t selectAll, uint16_t affectMap, uint16_t map, const void *details); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_select_events_aux_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t affectWhich, uint16_t clear, uint16_t selectAll, uint16_t affectMap, uint16_t map, const xcb_xkb_select_events_details_t *details); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_select_events_aux (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t affectWhich, uint16_t clear, uint16_t selectAll, uint16_t affectMap, uint16_t map, const xcb_xkb_select_events_details_t *details); void * xcb_xkb_select_events_details (const xcb_xkb_select_events_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_bell_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, xcb_xkb_bell_class_spec_t bellClass, xcb_xkb_id_spec_t bellID, int8_t percent, uint8_t forceSound, uint8_t eventOnly, int16_t pitch, int16_t duration, xcb_atom_t name, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_bell (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, xcb_xkb_bell_class_spec_t bellClass, xcb_xkb_id_spec_t bellID, int8_t percent, uint8_t forceSound, uint8_t eventOnly, int16_t pitch, int16_t duration, xcb_atom_t name, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_state_cookie_t xcb_xkb_get_state (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_state_cookie_t xcb_xkb_get_state_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_state_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_state_reply_t * xcb_xkb_get_state_reply (xcb_connection_t *c, xcb_xkb_get_state_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_latch_lock_state_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t affectModLocks, uint8_t modLocks, uint8_t lockGroup, uint8_t groupLock, uint8_t affectModLatches, uint8_t latchGroup, uint16_t groupLatch); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_latch_lock_state (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t affectModLocks, uint8_t modLocks, uint8_t lockGroup, uint8_t groupLock, uint8_t affectModLatches, uint8_t latchGroup, uint16_t groupLatch); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_controls_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_controls_reply_t * xcb_xkb_get_controls_reply (xcb_connection_t *c, xcb_xkb_get_controls_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_controls_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t affectInternalRealMods, uint8_t internalRealMods, uint8_t affectIgnoreLockRealMods, uint8_t ignoreLockRealMods, uint16_t affectInternalVirtualMods, uint16_t internalVirtualMods, uint16_t affectIgnoreLockVirtualMods, uint16_t ignoreLockVirtualMods, uint8_t mouseKeysDfltBtn, uint8_t groupsWrap, uint16_t accessXOptions, uint32_t affectEnabledControls, uint32_t enabledControls, uint32_t changeControls, uint16_t repeatDelay, uint16_t repeatInterval, uint16_t slowKeysDelay, uint16_t debounceDelay, uint16_t mouseKeysDelay, uint16_t mouseKeysInterval, uint16_t mouseKeysTimeToMax, uint16_t mouseKeysMaxSpeed, int16_t mouseKeysCurve, uint16_t accessXTimeout, uint32_t accessXTimeoutMask, uint32_t accessXTimeoutValues, uint16_t accessXTimeoutOptionsMask, uint16_t accessXTimeoutOptionsValues, const uint8_t *perKeyRepeat); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_controls (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t affectInternalRealMods, uint8_t internalRealMods, uint8_t affectIgnoreLockRealMods, uint8_t ignoreLockRealMods, uint16_t affectInternalVirtualMods, uint16_t internalVirtualMods, uint16_t affectIgnoreLockVirtualMods, uint16_t ignoreLockVirtualMods, uint8_t mouseKeysDfltBtn, uint8_t groupsWrap, uint16_t accessXOptions, uint32_t affectEnabledControls, uint32_t enabledControls, uint32_t changeControls, uint16_t repeatDelay, uint16_t repeatInterval, uint16_t slowKeysDelay, uint16_t debounceDelay, uint16_t mouseKeysDelay, uint16_t mouseKeysInterval, uint16_t mouseKeysTimeToMax, uint16_t mouseKeysMaxSpeed, int16_t mouseKeysCurve, uint16_t accessXTimeout, uint32_t accessXTimeoutMask, uint32_t accessXTimeoutValues, uint16_t accessXTimeoutOptionsMask, uint16_t accessXTimeoutOptionsValues, const uint8_t *perKeyRepeat); int xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_key_type_iterator_t xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); uint8_t * xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_generic_iterator_t xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_action_t * xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_action_iterator_t xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_set_behavior_t * xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_set_behavior_iterator_t xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); uint8_t * xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_generic_iterator_t xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_set_explicit_t * xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_set_explicit_iterator_t xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_key_mod_map_t * xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_key_v_mod_map_t * xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R, const xcb_xkb_get_map_map_t *S); int xcb_xkb_get_map_map_serialize (void **_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present, const xcb_xkb_get_map_map_t *_aux); int xcb_xkb_get_map_map_unpack (const void *_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present, xcb_xkb_get_map_map_t *_aux); int xcb_xkb_get_map_map_sizeof (const void *_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present); int xcb_xkb_get_map_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_map_cookie_t xcb_xkb_get_map (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t full, uint16_t partial, uint8_t firstType, uint8_t nTypes, xcb_keycode_t firstKeySym, uint8_t nKeySyms, xcb_keycode_t firstKeyAction, uint8_t nKeyActions, xcb_keycode_t firstKeyBehavior, uint8_t nKeyBehaviors, uint16_t virtualMods, xcb_keycode_t firstKeyExplicit, uint8_t nKeyExplicit, xcb_keycode_t firstModMapKey, uint8_t nModMapKeys, xcb_keycode_t firstVModMapKey, uint8_t nVModMapKeys); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_map_cookie_t xcb_xkb_get_map_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t full, uint16_t partial, uint8_t firstType, uint8_t nTypes, xcb_keycode_t firstKeySym, uint8_t nKeySyms, xcb_keycode_t firstKeyAction, uint8_t nKeyActions, xcb_keycode_t firstKeyBehavior, uint8_t nKeyBehaviors, uint16_t virtualMods, xcb_keycode_t firstKeyExplicit, uint8_t nKeyExplicit, xcb_keycode_t firstModMapKey, uint8_t nModMapKeys, xcb_keycode_t firstVModMapKey, uint8_t nVModMapKeys); void * xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_map_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_map_reply_t * xcb_xkb_get_map_reply (xcb_connection_t *c, xcb_xkb_get_map_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_set_key_type_iterator_t xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_key_sym_map_iterator_t xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); uint8_t * xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_generic_iterator_t xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_action_t * xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_action_iterator_t xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_set_behavior_t * xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_set_behavior_iterator_t xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); uint8_t * xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_generic_iterator_t xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_set_explicit_t * xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_set_explicit_iterator_t xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_key_mod_map_t * xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_key_mod_map_iterator_t xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_key_v_mod_map_t * xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R, const xcb_xkb_set_map_values_t *S); int xcb_xkb_set_map_values_serialize (void **_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present, const xcb_xkb_set_map_values_t *_aux); int xcb_xkb_set_map_values_unpack (const void *_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present, xcb_xkb_set_map_values_t *_aux); int xcb_xkb_set_map_values_sizeof (const void *_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present); int xcb_xkb_set_map_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_map_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t present, uint16_t flags, xcb_keycode_t minKeyCode, xcb_keycode_t maxKeyCode, uint8_t firstType, uint8_t nTypes, xcb_keycode_t firstKeySym, uint8_t nKeySyms, uint16_t totalSyms, xcb_keycode_t firstKeyAction, uint8_t nKeyActions, uint16_t totalActions, xcb_keycode_t firstKeyBehavior, uint8_t nKeyBehaviors, uint8_t totalKeyBehaviors, xcb_keycode_t firstKeyExplicit, uint8_t nKeyExplicit, uint8_t totalKeyExplicit, xcb_keycode_t firstModMapKey, uint8_t nModMapKeys, uint8_t totalModMapKeys, xcb_keycode_t firstVModMapKey, uint8_t nVModMapKeys, uint8_t totalVModMapKeys, uint16_t virtualMods, const void *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_map (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t present, uint16_t flags, xcb_keycode_t minKeyCode, xcb_keycode_t maxKeyCode, uint8_t firstType, uint8_t nTypes, xcb_keycode_t firstKeySym, uint8_t nKeySyms, uint16_t totalSyms, xcb_keycode_t firstKeyAction, uint8_t nKeyActions, uint16_t totalActions, xcb_keycode_t firstKeyBehavior, uint8_t nKeyBehaviors, uint8_t totalKeyBehaviors, xcb_keycode_t firstKeyExplicit, uint8_t nKeyExplicit, uint8_t totalKeyExplicit, xcb_keycode_t firstModMapKey, uint8_t nModMapKeys, uint8_t totalModMapKeys, xcb_keycode_t firstVModMapKey, uint8_t nVModMapKeys, uint8_t totalVModMapKeys, uint16_t virtualMods, const void *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_map_aux_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t present, uint16_t flags, xcb_keycode_t minKeyCode, xcb_keycode_t maxKeyCode, uint8_t firstType, uint8_t nTypes, xcb_keycode_t firstKeySym, uint8_t nKeySyms, uint16_t totalSyms, xcb_keycode_t firstKeyAction, uint8_t nKeyActions, uint16_t totalActions, xcb_keycode_t firstKeyBehavior, uint8_t nKeyBehaviors, uint8_t totalKeyBehaviors, xcb_keycode_t firstKeyExplicit, uint8_t nKeyExplicit, uint8_t totalKeyExplicit, xcb_keycode_t firstModMapKey, uint8_t nModMapKeys, uint8_t totalModMapKeys, xcb_keycode_t firstVModMapKey, uint8_t nVModMapKeys, uint8_t totalVModMapKeys, uint16_t virtualMods, const xcb_xkb_set_map_values_t *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_map_aux (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t present, uint16_t flags, xcb_keycode_t minKeyCode, xcb_keycode_t maxKeyCode, uint8_t firstType, uint8_t nTypes, xcb_keycode_t firstKeySym, uint8_t nKeySyms, uint16_t totalSyms, xcb_keycode_t firstKeyAction, uint8_t nKeyActions, uint16_t totalActions, xcb_keycode_t firstKeyBehavior, uint8_t nKeyBehaviors, uint8_t totalKeyBehaviors, xcb_keycode_t firstKeyExplicit, uint8_t nKeyExplicit, uint8_t totalKeyExplicit, xcb_keycode_t firstModMapKey, uint8_t nModMapKeys, uint8_t totalModMapKeys, xcb_keycode_t firstVModMapKey, uint8_t nVModMapKeys, uint8_t totalVModMapKeys, uint16_t virtualMods, const xcb_xkb_set_map_values_t *values); void * xcb_xkb_set_map_values (const xcb_xkb_set_map_request_t *R); int xcb_xkb_get_compat_map_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t groups, uint8_t getAllSI, uint16_t firstSI, uint16_t nSI); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t groups, uint8_t getAllSI, uint16_t firstSI, uint16_t nSI); xcb_xkb_sym_interpret_t * xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R); int xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R); xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_compat_map_si_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R); xcb_xkb_mod_def_t * xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R); int xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R); xcb_xkb_mod_def_iterator_t xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_compat_map_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_compat_map_reply_t * xcb_xkb_get_compat_map_reply (xcb_connection_t *c, xcb_xkb_get_compat_map_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_set_compat_map_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_compat_map_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t recomputeActions, uint8_t truncateSI, uint8_t groups, uint16_t firstSI, uint16_t nSI, const xcb_xkb_sym_interpret_t *si, const xcb_xkb_mod_def_t *groupMaps); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_compat_map (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t recomputeActions, uint8_t truncateSI, uint8_t groups, uint16_t firstSI, uint16_t nSI, const xcb_xkb_sym_interpret_t *si, const xcb_xkb_mod_def_t *groupMaps); xcb_xkb_sym_interpret_t * xcb_xkb_set_compat_map_si (const xcb_xkb_set_compat_map_request_t *R); int xcb_xkb_set_compat_map_si_length (const xcb_xkb_set_compat_map_request_t *R); xcb_xkb_sym_interpret_iterator_t xcb_xkb_set_compat_map_si_iterator (const xcb_xkb_set_compat_map_request_t *R); xcb_xkb_mod_def_t * xcb_xkb_set_compat_map_group_maps (const xcb_xkb_set_compat_map_request_t *R); int xcb_xkb_set_compat_map_group_maps_length (const xcb_xkb_set_compat_map_request_t *R); xcb_xkb_mod_def_iterator_t xcb_xkb_set_compat_map_group_maps_iterator (const xcb_xkb_set_compat_map_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_indicator_state_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_indicator_state_reply_t * xcb_xkb_get_indicator_state_reply (xcb_connection_t *c, xcb_xkb_get_indicator_state_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_get_indicator_map_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t which); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t which); xcb_xkb_indicator_map_t * xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R); int xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R); xcb_xkb_indicator_map_iterator_t xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_indicator_map_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_indicator_map_reply_t * xcb_xkb_get_indicator_map_reply (xcb_connection_t *c, xcb_xkb_get_indicator_map_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_set_indicator_map_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_indicator_map_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t which, const xcb_xkb_indicator_map_t *maps); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_indicator_map (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t which, const xcb_xkb_indicator_map_t *maps); xcb_xkb_indicator_map_t * xcb_xkb_set_indicator_map_maps (const xcb_xkb_set_indicator_map_request_t *R); int xcb_xkb_set_indicator_map_maps_length (const xcb_xkb_set_indicator_map_request_t *R); xcb_xkb_indicator_map_iterator_t xcb_xkb_set_indicator_map_maps_iterator (const xcb_xkb_set_indicator_map_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, xcb_xkb_led_class_spec_t ledClass, xcb_xkb_id_spec_t ledID, xcb_atom_t indicator); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, xcb_xkb_led_class_spec_t ledClass, xcb_xkb_id_spec_t ledID, xcb_atom_t indicator); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_named_indicator_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_named_indicator_reply_t * xcb_xkb_get_named_indicator_reply (xcb_connection_t *c, xcb_xkb_get_named_indicator_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_named_indicator_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, xcb_xkb_led_class_spec_t ledClass, xcb_xkb_id_spec_t ledID, xcb_atom_t indicator, uint8_t setState, uint8_t on, uint8_t setMap, uint8_t createMap, uint8_t map_flags, uint8_t map_whichGroups, uint8_t map_groups, uint8_t map_whichMods, uint8_t map_realMods, uint16_t map_vmods, uint32_t map_ctrls); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_named_indicator (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, xcb_xkb_led_class_spec_t ledClass, xcb_xkb_id_spec_t ledID, xcb_atom_t indicator, uint8_t setState, uint8_t on, uint8_t setMap, uint8_t createMap, uint8_t map_flags, uint8_t map_whichGroups, uint8_t map_groups, uint8_t map_whichMods, uint8_t map_realMods, uint16_t map_vmods, uint32_t map_ctrls); xcb_atom_t * xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_generic_iterator_t xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); uint8_t * xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_generic_iterator_t xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_atom_t * xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_generic_iterator_t xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_atom_t * xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_generic_iterator_t xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_atom_t * xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_generic_iterator_t xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_atom_t * xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_generic_iterator_t xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_xkb_key_name_t * xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_xkb_key_name_iterator_t xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_xkb_key_alias_t * xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_xkb_key_alias_iterator_t xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_atom_t * xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); xcb_generic_iterator_t xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R, const xcb_xkb_get_names_value_list_t *S); int xcb_xkb_get_names_value_list_serialize (void **_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which, const xcb_xkb_get_names_value_list_t *_aux); int xcb_xkb_get_names_value_list_unpack (const void *_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which, xcb_xkb_get_names_value_list_t *_aux); int xcb_xkb_get_names_value_list_sizeof (const void *_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which); int xcb_xkb_get_names_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_names_cookie_t xcb_xkb_get_names (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t which); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_names_cookie_t xcb_xkb_get_names_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t which); void * xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_names_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_names_reply_t * xcb_xkb_get_names_reply (xcb_connection_t *c, xcb_xkb_get_names_cookie_t cookie /**< */, xcb_generic_error_t **e); xcb_atom_t * xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_generic_iterator_t xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); uint8_t * xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_generic_iterator_t xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_atom_t * xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_generic_iterator_t xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_atom_t * xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_generic_iterator_t xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_atom_t * xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_generic_iterator_t xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_atom_t * xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_generic_iterator_t xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_xkb_key_name_t * xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_xkb_key_name_iterator_t xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_xkb_key_alias_t * xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_xkb_key_alias_iterator_t xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_atom_t * xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); xcb_generic_iterator_t xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R, const xcb_xkb_set_names_values_t *S); int xcb_xkb_set_names_values_serialize (void **_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which, const xcb_xkb_set_names_values_t *_aux); int xcb_xkb_set_names_values_unpack (const void *_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which, xcb_xkb_set_names_values_t *_aux); int xcb_xkb_set_names_values_sizeof (const void *_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which); int xcb_xkb_set_names_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_names_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t virtualMods, uint32_t which, uint8_t firstType, uint8_t nTypes, uint8_t firstKTLevelt, uint8_t nKTLevels, uint32_t indicators, uint8_t groupNames, uint8_t nRadioGroups, xcb_keycode_t firstKey, uint8_t nKeys, uint8_t nKeyAliases, uint16_t totalKTLevelNames, const void *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_names (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t virtualMods, uint32_t which, uint8_t firstType, uint8_t nTypes, uint8_t firstKTLevelt, uint8_t nKTLevels, uint32_t indicators, uint8_t groupNames, uint8_t nRadioGroups, xcb_keycode_t firstKey, uint8_t nKeys, uint8_t nKeyAliases, uint16_t totalKTLevelNames, const void *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_names_aux_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t virtualMods, uint32_t which, uint8_t firstType, uint8_t nTypes, uint8_t firstKTLevelt, uint8_t nKTLevels, uint32_t indicators, uint8_t groupNames, uint8_t nRadioGroups, xcb_keycode_t firstKey, uint8_t nKeys, uint8_t nKeyAliases, uint16_t totalKTLevelNames, const xcb_xkb_set_names_values_t *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_names_aux (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t virtualMods, uint32_t which, uint8_t firstType, uint8_t nTypes, uint8_t firstKTLevelt, uint8_t nKTLevels, uint32_t indicators, uint8_t groupNames, uint8_t nRadioGroups, xcb_keycode_t firstKey, uint8_t nKeys, uint8_t nKeyAliases, uint16_t totalKTLevelNames, const xcb_xkb_set_names_values_t *values); void * xcb_xkb_set_names_values (const xcb_xkb_set_names_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t change, uint32_t value, uint32_t ctrlsToChange, uint32_t autoCtrls, uint32_t autoCtrlsValues); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint32_t change, uint32_t value, uint32_t ctrlsToChange, uint32_t autoCtrls, uint32_t autoCtrlsValues); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_per_client_flags_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_per_client_flags_reply_t * xcb_xkb_per_client_flags_reply (xcb_connection_t *c, xcb_xkb_per_client_flags_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_list_components_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_list_components_cookie_t xcb_xkb_list_components (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t maxNames); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_list_components_cookie_t xcb_xkb_list_components_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t maxNames); int xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R); xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R); int xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R); xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R); int xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R); xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R); int xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R); xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R); int xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R); xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R); int xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R); xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_list_components_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_list_components_reply_t * xcb_xkb_list_components_reply (xcb_connection_t *c, xcb_xkb_list_components_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void **_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present, const xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux); int xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void *_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present, xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux); int xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer, uint8_t nTypes, uint8_t nKeySyms, uint8_t nKeyActions, uint16_t totalActions, uint8_t totalKeyBehaviors, uint16_t virtualMods, uint8_t totalKeyExplicit, uint8_t totalModMapKeys, uint8_t totalVModMapKeys, uint16_t present); xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); uint8_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void **_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which, const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void *_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which, xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux); int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffer, uint8_t nTypes, uint32_t indicators, uint16_t virtualMods, uint8_t groupNames, uint8_t nKeys, uint8_t nKeyAliases, uint8_t nRadioGroups, uint32_t which); xcb_xkb_sym_interpret_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_sym_interpret_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_mod_def_t * xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_mod_def_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_indicator_map_t * xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S); int xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_indicator_map_iterator_t xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R, const xcb_xkb_get_kbd_by_name_replies_t *S); xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R); xcb_xkb_counted_string_16_t * xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R); int xcb_xkb_get_kbd_by_name_replies_serialize (void **_buffer, uint16_t reported, const xcb_xkb_get_kbd_by_name_replies_t *_aux); int xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buffer, uint16_t reported, xcb_xkb_get_kbd_by_name_replies_t *_aux); int xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer, uint16_t reported); int xcb_xkb_get_kbd_by_name_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t need, uint16_t want, uint8_t load); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t need, uint16_t want, uint8_t load); void * xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_kbd_by_name_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_kbd_by_name_reply_t * xcb_xkb_get_kbd_by_name_reply (xcb_connection_t *c, xcb_xkb_get_kbd_by_name_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_get_device_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t wanted, uint8_t allButtons, uint8_t firstButton, uint8_t nButtons, xcb_xkb_led_class_spec_t ledClass, xcb_xkb_id_spec_t ledID); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info_unchecked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint16_t wanted, uint8_t allButtons, uint8_t firstButton, uint8_t nButtons, xcb_xkb_led_class_spec_t ledClass, xcb_xkb_id_spec_t ledID); xcb_xkb_string8_t * xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R); int xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R); xcb_generic_iterator_t xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R); xcb_xkb_action_t * xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R); int xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R); xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R); int xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R); xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_get_device_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_get_device_info_reply_t * xcb_xkb_get_device_info_reply (xcb_connection_t *c, xcb_xkb_get_device_info_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xkb_set_device_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xkb_set_device_info_checked (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t firstBtn, uint8_t nBtns, uint16_t change, uint16_t nDeviceLedFBs, const xcb_xkb_action_t *btnActions, const xcb_xkb_device_led_info_t *leds); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xkb_set_device_info (xcb_connection_t *c, xcb_xkb_device_spec_t deviceSpec, uint8_t firstBtn, uint8_t nBtns, uint16_t change, uint16_t nDeviceLedFBs, const xcb_xkb_action_t *btnActions, const xcb_xkb_device_led_info_t *leds); xcb_xkb_action_t * xcb_xkb_set_device_info_btn_actions (const xcb_xkb_set_device_info_request_t *R); int xcb_xkb_set_device_info_btn_actions_length (const xcb_xkb_set_device_info_request_t *R); xcb_xkb_action_iterator_t xcb_xkb_set_device_info_btn_actions_iterator (const xcb_xkb_set_device_info_request_t *R); int xcb_xkb_set_device_info_leds_length (const xcb_xkb_set_device_info_request_t *R); xcb_xkb_device_led_info_iterator_t xcb_xkb_set_device_info_leds_iterator (const xcb_xkb_set_device_info_request_t *R); int xcb_xkb_set_debugging_flags_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags (xcb_connection_t *c, uint16_t msgLength, uint32_t affectFlags, uint32_t flags, uint32_t affectCtrls, uint32_t ctrls, const xcb_xkb_string8_t *message); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t *c, uint16_t msgLength, uint32_t affectFlags, uint32_t flags, uint32_t affectCtrls, uint32_t ctrls, const xcb_xkb_string8_t *message); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xkb_set_debugging_flags_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xkb_set_debugging_flags_reply_t * xcb_xkb_set_debugging_flags_reply (xcb_connection_t *c, xcb_xkb_set_debugging_flags_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ..xcb/xselinux.hnu[/* * This file generated automatically from xselinux.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_SELinux_API XCB SELinux API * @brief SELinux XCB Protocol Implementation. * @{ **/ #ifndef __XSELINUX_H #define __XSELINUX_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_SELINUX_MAJOR_VERSION 1 #define XCB_SELINUX_MINOR_VERSION 0 extern xcb_extension_t xcb_selinux_id; /** * @brief xcb_selinux_query_version_cookie_t **/ typedef struct xcb_selinux_query_version_cookie_t { unsigned int sequence; } xcb_selinux_query_version_cookie_t; /** Opcode for xcb_selinux_query_version. */ #define XCB_SELINUX_QUERY_VERSION 0 /** * @brief xcb_selinux_query_version_request_t **/ typedef struct xcb_selinux_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t client_major; uint8_t client_minor; } xcb_selinux_query_version_request_t; /** * @brief xcb_selinux_query_version_reply_t **/ typedef struct xcb_selinux_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t server_major; uint16_t server_minor; } xcb_selinux_query_version_reply_t; /** Opcode for xcb_selinux_set_device_create_context. */ #define XCB_SELINUX_SET_DEVICE_CREATE_CONTEXT 1 /** * @brief xcb_selinux_set_device_create_context_request_t **/ typedef struct xcb_selinux_set_device_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context_len; } xcb_selinux_set_device_create_context_request_t; /** * @brief xcb_selinux_get_device_create_context_cookie_t **/ typedef struct xcb_selinux_get_device_create_context_cookie_t { unsigned int sequence; } xcb_selinux_get_device_create_context_cookie_t; /** Opcode for xcb_selinux_get_device_create_context. */ #define XCB_SELINUX_GET_DEVICE_CREATE_CONTEXT 2 /** * @brief xcb_selinux_get_device_create_context_request_t **/ typedef struct xcb_selinux_get_device_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_selinux_get_device_create_context_request_t; /** * @brief xcb_selinux_get_device_create_context_reply_t **/ typedef struct xcb_selinux_get_device_create_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_device_create_context_reply_t; /** Opcode for xcb_selinux_set_device_context. */ #define XCB_SELINUX_SET_DEVICE_CONTEXT 3 /** * @brief xcb_selinux_set_device_context_request_t **/ typedef struct xcb_selinux_set_device_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t device; uint32_t context_len; } xcb_selinux_set_device_context_request_t; /** * @brief xcb_selinux_get_device_context_cookie_t **/ typedef struct xcb_selinux_get_device_context_cookie_t { unsigned int sequence; } xcb_selinux_get_device_context_cookie_t; /** Opcode for xcb_selinux_get_device_context. */ #define XCB_SELINUX_GET_DEVICE_CONTEXT 4 /** * @brief xcb_selinux_get_device_context_request_t **/ typedef struct xcb_selinux_get_device_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t device; } xcb_selinux_get_device_context_request_t; /** * @brief xcb_selinux_get_device_context_reply_t **/ typedef struct xcb_selinux_get_device_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_device_context_reply_t; /** Opcode for xcb_selinux_set_window_create_context. */ #define XCB_SELINUX_SET_WINDOW_CREATE_CONTEXT 5 /** * @brief xcb_selinux_set_window_create_context_request_t **/ typedef struct xcb_selinux_set_window_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context_len; } xcb_selinux_set_window_create_context_request_t; /** * @brief xcb_selinux_get_window_create_context_cookie_t **/ typedef struct xcb_selinux_get_window_create_context_cookie_t { unsigned int sequence; } xcb_selinux_get_window_create_context_cookie_t; /** Opcode for xcb_selinux_get_window_create_context. */ #define XCB_SELINUX_GET_WINDOW_CREATE_CONTEXT 6 /** * @brief xcb_selinux_get_window_create_context_request_t **/ typedef struct xcb_selinux_get_window_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_selinux_get_window_create_context_request_t; /** * @brief xcb_selinux_get_window_create_context_reply_t **/ typedef struct xcb_selinux_get_window_create_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_window_create_context_reply_t; /** * @brief xcb_selinux_get_window_context_cookie_t **/ typedef struct xcb_selinux_get_window_context_cookie_t { unsigned int sequence; } xcb_selinux_get_window_context_cookie_t; /** Opcode for xcb_selinux_get_window_context. */ #define XCB_SELINUX_GET_WINDOW_CONTEXT 7 /** * @brief xcb_selinux_get_window_context_request_t **/ typedef struct xcb_selinux_get_window_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_selinux_get_window_context_request_t; /** * @brief xcb_selinux_get_window_context_reply_t **/ typedef struct xcb_selinux_get_window_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_window_context_reply_t; /** * @brief xcb_selinux_list_item_t **/ typedef struct xcb_selinux_list_item_t { xcb_atom_t name; uint32_t object_context_len; uint32_t data_context_len; } xcb_selinux_list_item_t; /** * @brief xcb_selinux_list_item_iterator_t **/ typedef struct xcb_selinux_list_item_iterator_t { xcb_selinux_list_item_t *data; int rem; int index; } xcb_selinux_list_item_iterator_t; /** Opcode for xcb_selinux_set_property_create_context. */ #define XCB_SELINUX_SET_PROPERTY_CREATE_CONTEXT 8 /** * @brief xcb_selinux_set_property_create_context_request_t **/ typedef struct xcb_selinux_set_property_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context_len; } xcb_selinux_set_property_create_context_request_t; /** * @brief xcb_selinux_get_property_create_context_cookie_t **/ typedef struct xcb_selinux_get_property_create_context_cookie_t { unsigned int sequence; } xcb_selinux_get_property_create_context_cookie_t; /** Opcode for xcb_selinux_get_property_create_context. */ #define XCB_SELINUX_GET_PROPERTY_CREATE_CONTEXT 9 /** * @brief xcb_selinux_get_property_create_context_request_t **/ typedef struct xcb_selinux_get_property_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_selinux_get_property_create_context_request_t; /** * @brief xcb_selinux_get_property_create_context_reply_t **/ typedef struct xcb_selinux_get_property_create_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_property_create_context_reply_t; /** Opcode for xcb_selinux_set_property_use_context. */ #define XCB_SELINUX_SET_PROPERTY_USE_CONTEXT 10 /** * @brief xcb_selinux_set_property_use_context_request_t **/ typedef struct xcb_selinux_set_property_use_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context_len; } xcb_selinux_set_property_use_context_request_t; /** * @brief xcb_selinux_get_property_use_context_cookie_t **/ typedef struct xcb_selinux_get_property_use_context_cookie_t { unsigned int sequence; } xcb_selinux_get_property_use_context_cookie_t; /** Opcode for xcb_selinux_get_property_use_context. */ #define XCB_SELINUX_GET_PROPERTY_USE_CONTEXT 11 /** * @brief xcb_selinux_get_property_use_context_request_t **/ typedef struct xcb_selinux_get_property_use_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_selinux_get_property_use_context_request_t; /** * @brief xcb_selinux_get_property_use_context_reply_t **/ typedef struct xcb_selinux_get_property_use_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_property_use_context_reply_t; /** * @brief xcb_selinux_get_property_context_cookie_t **/ typedef struct xcb_selinux_get_property_context_cookie_t { unsigned int sequence; } xcb_selinux_get_property_context_cookie_t; /** Opcode for xcb_selinux_get_property_context. */ #define XCB_SELINUX_GET_PROPERTY_CONTEXT 12 /** * @brief xcb_selinux_get_property_context_request_t **/ typedef struct xcb_selinux_get_property_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_atom_t property; } xcb_selinux_get_property_context_request_t; /** * @brief xcb_selinux_get_property_context_reply_t **/ typedef struct xcb_selinux_get_property_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_property_context_reply_t; /** * @brief xcb_selinux_get_property_data_context_cookie_t **/ typedef struct xcb_selinux_get_property_data_context_cookie_t { unsigned int sequence; } xcb_selinux_get_property_data_context_cookie_t; /** Opcode for xcb_selinux_get_property_data_context. */ #define XCB_SELINUX_GET_PROPERTY_DATA_CONTEXT 13 /** * @brief xcb_selinux_get_property_data_context_request_t **/ typedef struct xcb_selinux_get_property_data_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_atom_t property; } xcb_selinux_get_property_data_context_request_t; /** * @brief xcb_selinux_get_property_data_context_reply_t **/ typedef struct xcb_selinux_get_property_data_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_property_data_context_reply_t; /** * @brief xcb_selinux_list_properties_cookie_t **/ typedef struct xcb_selinux_list_properties_cookie_t { unsigned int sequence; } xcb_selinux_list_properties_cookie_t; /** Opcode for xcb_selinux_list_properties. */ #define XCB_SELINUX_LIST_PROPERTIES 14 /** * @brief xcb_selinux_list_properties_request_t **/ typedef struct xcb_selinux_list_properties_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_selinux_list_properties_request_t; /** * @brief xcb_selinux_list_properties_reply_t **/ typedef struct xcb_selinux_list_properties_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t properties_len; uint8_t pad1[20]; } xcb_selinux_list_properties_reply_t; /** Opcode for xcb_selinux_set_selection_create_context. */ #define XCB_SELINUX_SET_SELECTION_CREATE_CONTEXT 15 /** * @brief xcb_selinux_set_selection_create_context_request_t **/ typedef struct xcb_selinux_set_selection_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context_len; } xcb_selinux_set_selection_create_context_request_t; /** * @brief xcb_selinux_get_selection_create_context_cookie_t **/ typedef struct xcb_selinux_get_selection_create_context_cookie_t { unsigned int sequence; } xcb_selinux_get_selection_create_context_cookie_t; /** Opcode for xcb_selinux_get_selection_create_context. */ #define XCB_SELINUX_GET_SELECTION_CREATE_CONTEXT 16 /** * @brief xcb_selinux_get_selection_create_context_request_t **/ typedef struct xcb_selinux_get_selection_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_selinux_get_selection_create_context_request_t; /** * @brief xcb_selinux_get_selection_create_context_reply_t **/ typedef struct xcb_selinux_get_selection_create_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_selection_create_context_reply_t; /** Opcode for xcb_selinux_set_selection_use_context. */ #define XCB_SELINUX_SET_SELECTION_USE_CONTEXT 17 /** * @brief xcb_selinux_set_selection_use_context_request_t **/ typedef struct xcb_selinux_set_selection_use_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context_len; } xcb_selinux_set_selection_use_context_request_t; /** * @brief xcb_selinux_get_selection_use_context_cookie_t **/ typedef struct xcb_selinux_get_selection_use_context_cookie_t { unsigned int sequence; } xcb_selinux_get_selection_use_context_cookie_t; /** Opcode for xcb_selinux_get_selection_use_context. */ #define XCB_SELINUX_GET_SELECTION_USE_CONTEXT 18 /** * @brief xcb_selinux_get_selection_use_context_request_t **/ typedef struct xcb_selinux_get_selection_use_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_selinux_get_selection_use_context_request_t; /** * @brief xcb_selinux_get_selection_use_context_reply_t **/ typedef struct xcb_selinux_get_selection_use_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_selection_use_context_reply_t; /** * @brief xcb_selinux_get_selection_context_cookie_t **/ typedef struct xcb_selinux_get_selection_context_cookie_t { unsigned int sequence; } xcb_selinux_get_selection_context_cookie_t; /** Opcode for xcb_selinux_get_selection_context. */ #define XCB_SELINUX_GET_SELECTION_CONTEXT 19 /** * @brief xcb_selinux_get_selection_context_request_t **/ typedef struct xcb_selinux_get_selection_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_atom_t selection; } xcb_selinux_get_selection_context_request_t; /** * @brief xcb_selinux_get_selection_context_reply_t **/ typedef struct xcb_selinux_get_selection_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_selection_context_reply_t; /** * @brief xcb_selinux_get_selection_data_context_cookie_t **/ typedef struct xcb_selinux_get_selection_data_context_cookie_t { unsigned int sequence; } xcb_selinux_get_selection_data_context_cookie_t; /** Opcode for xcb_selinux_get_selection_data_context. */ #define XCB_SELINUX_GET_SELECTION_DATA_CONTEXT 20 /** * @brief xcb_selinux_get_selection_data_context_request_t **/ typedef struct xcb_selinux_get_selection_data_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_atom_t selection; } xcb_selinux_get_selection_data_context_request_t; /** * @brief xcb_selinux_get_selection_data_context_reply_t **/ typedef struct xcb_selinux_get_selection_data_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_selection_data_context_reply_t; /** * @brief xcb_selinux_list_selections_cookie_t **/ typedef struct xcb_selinux_list_selections_cookie_t { unsigned int sequence; } xcb_selinux_list_selections_cookie_t; /** Opcode for xcb_selinux_list_selections. */ #define XCB_SELINUX_LIST_SELECTIONS 21 /** * @brief xcb_selinux_list_selections_request_t **/ typedef struct xcb_selinux_list_selections_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_selinux_list_selections_request_t; /** * @brief xcb_selinux_list_selections_reply_t **/ typedef struct xcb_selinux_list_selections_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t selections_len; uint8_t pad1[20]; } xcb_selinux_list_selections_reply_t; /** * @brief xcb_selinux_get_client_context_cookie_t **/ typedef struct xcb_selinux_get_client_context_cookie_t { unsigned int sequence; } xcb_selinux_get_client_context_cookie_t; /** Opcode for xcb_selinux_get_client_context. */ #define XCB_SELINUX_GET_CLIENT_CONTEXT 22 /** * @brief xcb_selinux_get_client_context_request_t **/ typedef struct xcb_selinux_get_client_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t resource; } xcb_selinux_get_client_context_request_t; /** * @brief xcb_selinux_get_client_context_reply_t **/ typedef struct xcb_selinux_get_client_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context_len; uint8_t pad1[20]; } xcb_selinux_get_client_context_reply_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_query_version_cookie_t xcb_selinux_query_version (xcb_connection_t *c, uint8_t client_major, uint8_t client_minor); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_query_version_cookie_t xcb_selinux_query_version_unchecked (xcb_connection_t *c, uint8_t client_major, uint8_t client_minor); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_query_version_reply_t * xcb_selinux_query_version_reply (xcb_connection_t *c, xcb_selinux_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_set_device_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_selinux_set_device_create_context_checked (xcb_connection_t *c, uint32_t context_len, const char *context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_selinux_set_device_create_context (xcb_connection_t *c, uint32_t context_len, const char *context); char * xcb_selinux_set_device_create_context_context (const xcb_selinux_set_device_create_context_request_t *R); int xcb_selinux_set_device_create_context_context_length (const xcb_selinux_set_device_create_context_request_t *R); xcb_generic_iterator_t xcb_selinux_set_device_create_context_context_end (const xcb_selinux_set_device_create_context_request_t *R); int xcb_selinux_get_device_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_device_create_context_cookie_t xcb_selinux_get_device_create_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_device_create_context_cookie_t xcb_selinux_get_device_create_context_unchecked (xcb_connection_t *c); char * xcb_selinux_get_device_create_context_context (const xcb_selinux_get_device_create_context_reply_t *R); int xcb_selinux_get_device_create_context_context_length (const xcb_selinux_get_device_create_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_device_create_context_context_end (const xcb_selinux_get_device_create_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_device_create_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_device_create_context_reply_t * xcb_selinux_get_device_create_context_reply (xcb_connection_t *c, xcb_selinux_get_device_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_set_device_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_selinux_set_device_context_checked (xcb_connection_t *c, uint32_t device, uint32_t context_len, const char *context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_selinux_set_device_context (xcb_connection_t *c, uint32_t device, uint32_t context_len, const char *context); char * xcb_selinux_set_device_context_context (const xcb_selinux_set_device_context_request_t *R); int xcb_selinux_set_device_context_context_length (const xcb_selinux_set_device_context_request_t *R); xcb_generic_iterator_t xcb_selinux_set_device_context_context_end (const xcb_selinux_set_device_context_request_t *R); int xcb_selinux_get_device_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_device_context_cookie_t xcb_selinux_get_device_context (xcb_connection_t *c, uint32_t device); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_device_context_cookie_t xcb_selinux_get_device_context_unchecked (xcb_connection_t *c, uint32_t device); char * xcb_selinux_get_device_context_context (const xcb_selinux_get_device_context_reply_t *R); int xcb_selinux_get_device_context_context_length (const xcb_selinux_get_device_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_device_context_context_end (const xcb_selinux_get_device_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_device_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_device_context_reply_t * xcb_selinux_get_device_context_reply (xcb_connection_t *c, xcb_selinux_get_device_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_set_window_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_selinux_set_window_create_context_checked (xcb_connection_t *c, uint32_t context_len, const char *context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_selinux_set_window_create_context (xcb_connection_t *c, uint32_t context_len, const char *context); char * xcb_selinux_set_window_create_context_context (const xcb_selinux_set_window_create_context_request_t *R); int xcb_selinux_set_window_create_context_context_length (const xcb_selinux_set_window_create_context_request_t *R); xcb_generic_iterator_t xcb_selinux_set_window_create_context_context_end (const xcb_selinux_set_window_create_context_request_t *R); int xcb_selinux_get_window_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_window_create_context_cookie_t xcb_selinux_get_window_create_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_window_create_context_cookie_t xcb_selinux_get_window_create_context_unchecked (xcb_connection_t *c); char * xcb_selinux_get_window_create_context_context (const xcb_selinux_get_window_create_context_reply_t *R); int xcb_selinux_get_window_create_context_context_length (const xcb_selinux_get_window_create_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_window_create_context_context_end (const xcb_selinux_get_window_create_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_window_create_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_window_create_context_reply_t * xcb_selinux_get_window_create_context_reply (xcb_connection_t *c, xcb_selinux_get_window_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_get_window_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_window_context_cookie_t xcb_selinux_get_window_context (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_window_context_cookie_t xcb_selinux_get_window_context_unchecked (xcb_connection_t *c, xcb_window_t window); char * xcb_selinux_get_window_context_context (const xcb_selinux_get_window_context_reply_t *R); int xcb_selinux_get_window_context_context_length (const xcb_selinux_get_window_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_window_context_context_end (const xcb_selinux_get_window_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_window_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_window_context_reply_t * xcb_selinux_get_window_context_reply (xcb_connection_t *c, xcb_selinux_get_window_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_list_item_sizeof (const void *_buffer); char * xcb_selinux_list_item_object_context (const xcb_selinux_list_item_t *R); int xcb_selinux_list_item_object_context_length (const xcb_selinux_list_item_t *R); xcb_generic_iterator_t xcb_selinux_list_item_object_context_end (const xcb_selinux_list_item_t *R); char * xcb_selinux_list_item_data_context (const xcb_selinux_list_item_t *R); int xcb_selinux_list_item_data_context_length (const xcb_selinux_list_item_t *R); xcb_generic_iterator_t xcb_selinux_list_item_data_context_end (const xcb_selinux_list_item_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_selinux_list_item_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_selinux_list_item_t) */ void xcb_selinux_list_item_next (xcb_selinux_list_item_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_selinux_list_item_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_selinux_list_item_end (xcb_selinux_list_item_iterator_t i); int xcb_selinux_set_property_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_selinux_set_property_create_context_checked (xcb_connection_t *c, uint32_t context_len, const char *context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_selinux_set_property_create_context (xcb_connection_t *c, uint32_t context_len, const char *context); char * xcb_selinux_set_property_create_context_context (const xcb_selinux_set_property_create_context_request_t *R); int xcb_selinux_set_property_create_context_context_length (const xcb_selinux_set_property_create_context_request_t *R); xcb_generic_iterator_t xcb_selinux_set_property_create_context_context_end (const xcb_selinux_set_property_create_context_request_t *R); int xcb_selinux_get_property_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_property_create_context_cookie_t xcb_selinux_get_property_create_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_property_create_context_cookie_t xcb_selinux_get_property_create_context_unchecked (xcb_connection_t *c); char * xcb_selinux_get_property_create_context_context (const xcb_selinux_get_property_create_context_reply_t *R); int xcb_selinux_get_property_create_context_context_length (const xcb_selinux_get_property_create_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_property_create_context_context_end (const xcb_selinux_get_property_create_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_property_create_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_property_create_context_reply_t * xcb_selinux_get_property_create_context_reply (xcb_connection_t *c, xcb_selinux_get_property_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_set_property_use_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_selinux_set_property_use_context_checked (xcb_connection_t *c, uint32_t context_len, const char *context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_selinux_set_property_use_context (xcb_connection_t *c, uint32_t context_len, const char *context); char * xcb_selinux_set_property_use_context_context (const xcb_selinux_set_property_use_context_request_t *R); int xcb_selinux_set_property_use_context_context_length (const xcb_selinux_set_property_use_context_request_t *R); xcb_generic_iterator_t xcb_selinux_set_property_use_context_context_end (const xcb_selinux_set_property_use_context_request_t *R); int xcb_selinux_get_property_use_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_property_use_context_cookie_t xcb_selinux_get_property_use_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_property_use_context_cookie_t xcb_selinux_get_property_use_context_unchecked (xcb_connection_t *c); char * xcb_selinux_get_property_use_context_context (const xcb_selinux_get_property_use_context_reply_t *R); int xcb_selinux_get_property_use_context_context_length (const xcb_selinux_get_property_use_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_property_use_context_context_end (const xcb_selinux_get_property_use_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_property_use_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_property_use_context_reply_t * xcb_selinux_get_property_use_context_reply (xcb_connection_t *c, xcb_selinux_get_property_use_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_get_property_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_property_context_cookie_t xcb_selinux_get_property_context (xcb_connection_t *c, xcb_window_t window, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_property_context_cookie_t xcb_selinux_get_property_context_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_atom_t property); char * xcb_selinux_get_property_context_context (const xcb_selinux_get_property_context_reply_t *R); int xcb_selinux_get_property_context_context_length (const xcb_selinux_get_property_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_property_context_context_end (const xcb_selinux_get_property_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_property_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_property_context_reply_t * xcb_selinux_get_property_context_reply (xcb_connection_t *c, xcb_selinux_get_property_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_get_property_data_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_property_data_context_cookie_t xcb_selinux_get_property_data_context (xcb_connection_t *c, xcb_window_t window, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_property_data_context_cookie_t xcb_selinux_get_property_data_context_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_atom_t property); char * xcb_selinux_get_property_data_context_context (const xcb_selinux_get_property_data_context_reply_t *R); int xcb_selinux_get_property_data_context_context_length (const xcb_selinux_get_property_data_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_property_data_context_context_end (const xcb_selinux_get_property_data_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_property_data_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_property_data_context_reply_t * xcb_selinux_get_property_data_context_reply (xcb_connection_t *c, xcb_selinux_get_property_data_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_list_properties_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_list_properties_cookie_t xcb_selinux_list_properties (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_list_properties_cookie_t xcb_selinux_list_properties_unchecked (xcb_connection_t *c, xcb_window_t window); int xcb_selinux_list_properties_properties_length (const xcb_selinux_list_properties_reply_t *R); xcb_selinux_list_item_iterator_t xcb_selinux_list_properties_properties_iterator (const xcb_selinux_list_properties_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_list_properties_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_list_properties_reply_t * xcb_selinux_list_properties_reply (xcb_connection_t *c, xcb_selinux_list_properties_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_set_selection_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_selinux_set_selection_create_context_checked (xcb_connection_t *c, uint32_t context_len, const char *context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_selinux_set_selection_create_context (xcb_connection_t *c, uint32_t context_len, const char *context); char * xcb_selinux_set_selection_create_context_context (const xcb_selinux_set_selection_create_context_request_t *R); int xcb_selinux_set_selection_create_context_context_length (const xcb_selinux_set_selection_create_context_request_t *R); xcb_generic_iterator_t xcb_selinux_set_selection_create_context_context_end (const xcb_selinux_set_selection_create_context_request_t *R); int xcb_selinux_get_selection_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_selection_create_context_cookie_t xcb_selinux_get_selection_create_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_selection_create_context_cookie_t xcb_selinux_get_selection_create_context_unchecked (xcb_connection_t *c); char * xcb_selinux_get_selection_create_context_context (const xcb_selinux_get_selection_create_context_reply_t *R); int xcb_selinux_get_selection_create_context_context_length (const xcb_selinux_get_selection_create_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_selection_create_context_context_end (const xcb_selinux_get_selection_create_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_selection_create_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_selection_create_context_reply_t * xcb_selinux_get_selection_create_context_reply (xcb_connection_t *c, xcb_selinux_get_selection_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_set_selection_use_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_selinux_set_selection_use_context_checked (xcb_connection_t *c, uint32_t context_len, const char *context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_selinux_set_selection_use_context (xcb_connection_t *c, uint32_t context_len, const char *context); char * xcb_selinux_set_selection_use_context_context (const xcb_selinux_set_selection_use_context_request_t *R); int xcb_selinux_set_selection_use_context_context_length (const xcb_selinux_set_selection_use_context_request_t *R); xcb_generic_iterator_t xcb_selinux_set_selection_use_context_context_end (const xcb_selinux_set_selection_use_context_request_t *R); int xcb_selinux_get_selection_use_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_selection_use_context_cookie_t xcb_selinux_get_selection_use_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_selection_use_context_cookie_t xcb_selinux_get_selection_use_context_unchecked (xcb_connection_t *c); char * xcb_selinux_get_selection_use_context_context (const xcb_selinux_get_selection_use_context_reply_t *R); int xcb_selinux_get_selection_use_context_context_length (const xcb_selinux_get_selection_use_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_selection_use_context_context_end (const xcb_selinux_get_selection_use_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_selection_use_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_selection_use_context_reply_t * xcb_selinux_get_selection_use_context_reply (xcb_connection_t *c, xcb_selinux_get_selection_use_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_get_selection_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_selection_context_cookie_t xcb_selinux_get_selection_context (xcb_connection_t *c, xcb_atom_t selection); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_selection_context_cookie_t xcb_selinux_get_selection_context_unchecked (xcb_connection_t *c, xcb_atom_t selection); char * xcb_selinux_get_selection_context_context (const xcb_selinux_get_selection_context_reply_t *R); int xcb_selinux_get_selection_context_context_length (const xcb_selinux_get_selection_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_selection_context_context_end (const xcb_selinux_get_selection_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_selection_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_selection_context_reply_t * xcb_selinux_get_selection_context_reply (xcb_connection_t *c, xcb_selinux_get_selection_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_get_selection_data_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_selection_data_context_cookie_t xcb_selinux_get_selection_data_context (xcb_connection_t *c, xcb_atom_t selection); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_selection_data_context_cookie_t xcb_selinux_get_selection_data_context_unchecked (xcb_connection_t *c, xcb_atom_t selection); char * xcb_selinux_get_selection_data_context_context (const xcb_selinux_get_selection_data_context_reply_t *R); int xcb_selinux_get_selection_data_context_context_length (const xcb_selinux_get_selection_data_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_selection_data_context_context_end (const xcb_selinux_get_selection_data_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_selection_data_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_selection_data_context_reply_t * xcb_selinux_get_selection_data_context_reply (xcb_connection_t *c, xcb_selinux_get_selection_data_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_list_selections_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_list_selections_cookie_t xcb_selinux_list_selections (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_list_selections_cookie_t xcb_selinux_list_selections_unchecked (xcb_connection_t *c); int xcb_selinux_list_selections_selections_length (const xcb_selinux_list_selections_reply_t *R); xcb_selinux_list_item_iterator_t xcb_selinux_list_selections_selections_iterator (const xcb_selinux_list_selections_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_list_selections_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_list_selections_reply_t * xcb_selinux_list_selections_reply (xcb_connection_t *c, xcb_selinux_list_selections_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_selinux_get_client_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_selinux_get_client_context_cookie_t xcb_selinux_get_client_context (xcb_connection_t *c, uint32_t resource); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_selinux_get_client_context_cookie_t xcb_selinux_get_client_context_unchecked (xcb_connection_t *c, uint32_t resource); char * xcb_selinux_get_client_context_context (const xcb_selinux_get_client_context_reply_t *R); int xcb_selinux_get_client_context_context_length (const xcb_selinux_get_client_context_reply_t *R); xcb_generic_iterator_t xcb_selinux_get_client_context_context_end (const xcb_selinux_get_client_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_selinux_get_client_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_selinux_get_client_context_reply_t * xcb_selinux_get_client_context_reply (xcb_connection_t *c, xcb_selinux_get_client_context_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZiAG xcb/xproto.hnu[/* * This file generated automatically from xproto.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB__API XCB API * @brief XCB Protocol Implementation. * @{ **/ #ifndef __XPROTO_H #define __XPROTO_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif /** * @brief xcb_char2b_t **/ typedef struct xcb_char2b_t { uint8_t byte1; uint8_t byte2; } xcb_char2b_t; /** * @brief xcb_char2b_iterator_t **/ typedef struct xcb_char2b_iterator_t { xcb_char2b_t *data; int rem; int index; } xcb_char2b_iterator_t; typedef uint32_t xcb_window_t; /** * @brief xcb_window_iterator_t **/ typedef struct xcb_window_iterator_t { xcb_window_t *data; int rem; int index; } xcb_window_iterator_t; typedef uint32_t xcb_pixmap_t; /** * @brief xcb_pixmap_iterator_t **/ typedef struct xcb_pixmap_iterator_t { xcb_pixmap_t *data; int rem; int index; } xcb_pixmap_iterator_t; typedef uint32_t xcb_cursor_t; /** * @brief xcb_cursor_iterator_t **/ typedef struct xcb_cursor_iterator_t { xcb_cursor_t *data; int rem; int index; } xcb_cursor_iterator_t; typedef uint32_t xcb_font_t; /** * @brief xcb_font_iterator_t **/ typedef struct xcb_font_iterator_t { xcb_font_t *data; int rem; int index; } xcb_font_iterator_t; typedef uint32_t xcb_gcontext_t; /** * @brief xcb_gcontext_iterator_t **/ typedef struct xcb_gcontext_iterator_t { xcb_gcontext_t *data; int rem; int index; } xcb_gcontext_iterator_t; typedef uint32_t xcb_colormap_t; /** * @brief xcb_colormap_iterator_t **/ typedef struct xcb_colormap_iterator_t { xcb_colormap_t *data; int rem; int index; } xcb_colormap_iterator_t; typedef uint32_t xcb_atom_t; /** * @brief xcb_atom_iterator_t **/ typedef struct xcb_atom_iterator_t { xcb_atom_t *data; int rem; int index; } xcb_atom_iterator_t; typedef uint32_t xcb_drawable_t; /** * @brief xcb_drawable_iterator_t **/ typedef struct xcb_drawable_iterator_t { xcb_drawable_t *data; int rem; int index; } xcb_drawable_iterator_t; typedef uint32_t xcb_fontable_t; /** * @brief xcb_fontable_iterator_t **/ typedef struct xcb_fontable_iterator_t { xcb_fontable_t *data; int rem; int index; } xcb_fontable_iterator_t; typedef uint32_t xcb_bool32_t; /** * @brief xcb_bool32_iterator_t **/ typedef struct xcb_bool32_iterator_t { xcb_bool32_t *data; int rem; int index; } xcb_bool32_iterator_t; typedef uint32_t xcb_visualid_t; /** * @brief xcb_visualid_iterator_t **/ typedef struct xcb_visualid_iterator_t { xcb_visualid_t *data; int rem; int index; } xcb_visualid_iterator_t; typedef uint32_t xcb_timestamp_t; /** * @brief xcb_timestamp_iterator_t **/ typedef struct xcb_timestamp_iterator_t { xcb_timestamp_t *data; int rem; int index; } xcb_timestamp_iterator_t; typedef uint32_t xcb_keysym_t; /** * @brief xcb_keysym_iterator_t **/ typedef struct xcb_keysym_iterator_t { xcb_keysym_t *data; int rem; int index; } xcb_keysym_iterator_t; typedef uint8_t xcb_keycode_t; /** * @brief xcb_keycode_iterator_t **/ typedef struct xcb_keycode_iterator_t { xcb_keycode_t *data; int rem; int index; } xcb_keycode_iterator_t; typedef uint32_t xcb_keycode32_t; /** * @brief xcb_keycode32_iterator_t **/ typedef struct xcb_keycode32_iterator_t { xcb_keycode32_t *data; int rem; int index; } xcb_keycode32_iterator_t; typedef uint8_t xcb_button_t; /** * @brief xcb_button_iterator_t **/ typedef struct xcb_button_iterator_t { xcb_button_t *data; int rem; int index; } xcb_button_iterator_t; /** * @brief xcb_point_t **/ typedef struct xcb_point_t { int16_t x; int16_t y; } xcb_point_t; /** * @brief xcb_point_iterator_t **/ typedef struct xcb_point_iterator_t { xcb_point_t *data; int rem; int index; } xcb_point_iterator_t; /** * @brief xcb_rectangle_t **/ typedef struct xcb_rectangle_t { int16_t x; int16_t y; uint16_t width; uint16_t height; } xcb_rectangle_t; /** * @brief xcb_rectangle_iterator_t **/ typedef struct xcb_rectangle_iterator_t { xcb_rectangle_t *data; int rem; int index; } xcb_rectangle_iterator_t; /** * @brief xcb_arc_t **/ typedef struct xcb_arc_t { int16_t x; int16_t y; uint16_t width; uint16_t height; int16_t angle1; int16_t angle2; } xcb_arc_t; /** * @brief xcb_arc_iterator_t **/ typedef struct xcb_arc_iterator_t { xcb_arc_t *data; int rem; int index; } xcb_arc_iterator_t; /** * @brief xcb_format_t **/ typedef struct xcb_format_t { uint8_t depth; uint8_t bits_per_pixel; uint8_t scanline_pad; uint8_t pad0[5]; } xcb_format_t; /** * @brief xcb_format_iterator_t **/ typedef struct xcb_format_iterator_t { xcb_format_t *data; int rem; int index; } xcb_format_iterator_t; typedef enum xcb_visual_class_t { XCB_VISUAL_CLASS_STATIC_GRAY = 0, XCB_VISUAL_CLASS_GRAY_SCALE = 1, XCB_VISUAL_CLASS_STATIC_COLOR = 2, XCB_VISUAL_CLASS_PSEUDO_COLOR = 3, XCB_VISUAL_CLASS_TRUE_COLOR = 4, XCB_VISUAL_CLASS_DIRECT_COLOR = 5 } xcb_visual_class_t; /** * @brief xcb_visualtype_t **/ typedef struct xcb_visualtype_t { xcb_visualid_t visual_id; uint8_t _class; uint8_t bits_per_rgb_value; uint16_t colormap_entries; uint32_t red_mask; uint32_t green_mask; uint32_t blue_mask; uint8_t pad0[4]; } xcb_visualtype_t; /** * @brief xcb_visualtype_iterator_t **/ typedef struct xcb_visualtype_iterator_t { xcb_visualtype_t *data; int rem; int index; } xcb_visualtype_iterator_t; /** * @brief xcb_depth_t **/ typedef struct xcb_depth_t { uint8_t depth; uint8_t pad0; uint16_t visuals_len; uint8_t pad1[4]; } xcb_depth_t; /** * @brief xcb_depth_iterator_t **/ typedef struct xcb_depth_iterator_t { xcb_depth_t *data; int rem; int index; } xcb_depth_iterator_t; typedef enum xcb_event_mask_t { XCB_EVENT_MASK_NO_EVENT = 0, XCB_EVENT_MASK_KEY_PRESS = 1, XCB_EVENT_MASK_KEY_RELEASE = 2, XCB_EVENT_MASK_BUTTON_PRESS = 4, XCB_EVENT_MASK_BUTTON_RELEASE = 8, XCB_EVENT_MASK_ENTER_WINDOW = 16, XCB_EVENT_MASK_LEAVE_WINDOW = 32, XCB_EVENT_MASK_POINTER_MOTION = 64, XCB_EVENT_MASK_POINTER_MOTION_HINT = 128, XCB_EVENT_MASK_BUTTON_1_MOTION = 256, XCB_EVENT_MASK_BUTTON_2_MOTION = 512, XCB_EVENT_MASK_BUTTON_3_MOTION = 1024, XCB_EVENT_MASK_BUTTON_4_MOTION = 2048, XCB_EVENT_MASK_BUTTON_5_MOTION = 4096, XCB_EVENT_MASK_BUTTON_MOTION = 8192, XCB_EVENT_MASK_KEYMAP_STATE = 16384, XCB_EVENT_MASK_EXPOSURE = 32768, XCB_EVENT_MASK_VISIBILITY_CHANGE = 65536, XCB_EVENT_MASK_STRUCTURE_NOTIFY = 131072, XCB_EVENT_MASK_RESIZE_REDIRECT = 262144, XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY = 524288, XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT = 1048576, XCB_EVENT_MASK_FOCUS_CHANGE = 2097152, XCB_EVENT_MASK_PROPERTY_CHANGE = 4194304, XCB_EVENT_MASK_COLOR_MAP_CHANGE = 8388608, XCB_EVENT_MASK_OWNER_GRAB_BUTTON = 16777216 } xcb_event_mask_t; typedef enum xcb_backing_store_t { XCB_BACKING_STORE_NOT_USEFUL = 0, XCB_BACKING_STORE_WHEN_MAPPED = 1, XCB_BACKING_STORE_ALWAYS = 2 } xcb_backing_store_t; /** * @brief xcb_screen_t **/ typedef struct xcb_screen_t { xcb_window_t root; xcb_colormap_t default_colormap; uint32_t white_pixel; uint32_t black_pixel; uint32_t current_input_masks; uint16_t width_in_pixels; uint16_t height_in_pixels; uint16_t width_in_millimeters; uint16_t height_in_millimeters; uint16_t min_installed_maps; uint16_t max_installed_maps; xcb_visualid_t root_visual; uint8_t backing_stores; uint8_t save_unders; uint8_t root_depth; uint8_t allowed_depths_len; } xcb_screen_t; /** * @brief xcb_screen_iterator_t **/ typedef struct xcb_screen_iterator_t { xcb_screen_t *data; int rem; int index; } xcb_screen_iterator_t; /** * @brief xcb_setup_request_t **/ typedef struct xcb_setup_request_t { uint8_t byte_order; uint8_t pad0; uint16_t protocol_major_version; uint16_t protocol_minor_version; uint16_t authorization_protocol_name_len; uint16_t authorization_protocol_data_len; uint8_t pad1[2]; } xcb_setup_request_t; /** * @brief xcb_setup_request_iterator_t **/ typedef struct xcb_setup_request_iterator_t { xcb_setup_request_t *data; int rem; int index; } xcb_setup_request_iterator_t; /** * @brief xcb_setup_failed_t **/ typedef struct xcb_setup_failed_t { uint8_t status; uint8_t reason_len; uint16_t protocol_major_version; uint16_t protocol_minor_version; uint16_t length; } xcb_setup_failed_t; /** * @brief xcb_setup_failed_iterator_t **/ typedef struct xcb_setup_failed_iterator_t { xcb_setup_failed_t *data; int rem; int index; } xcb_setup_failed_iterator_t; /** * @brief xcb_setup_authenticate_t **/ typedef struct xcb_setup_authenticate_t { uint8_t status; uint8_t pad0[5]; uint16_t length; } xcb_setup_authenticate_t; /** * @brief xcb_setup_authenticate_iterator_t **/ typedef struct xcb_setup_authenticate_iterator_t { xcb_setup_authenticate_t *data; int rem; int index; } xcb_setup_authenticate_iterator_t; typedef enum xcb_image_order_t { XCB_IMAGE_ORDER_LSB_FIRST = 0, XCB_IMAGE_ORDER_MSB_FIRST = 1 } xcb_image_order_t; /** * @brief xcb_setup_t **/ typedef struct xcb_setup_t { uint8_t status; uint8_t pad0; uint16_t protocol_major_version; uint16_t protocol_minor_version; uint16_t length; uint32_t release_number; uint32_t resource_id_base; uint32_t resource_id_mask; uint32_t motion_buffer_size; uint16_t vendor_len; uint16_t maximum_request_length; uint8_t roots_len; uint8_t pixmap_formats_len; uint8_t image_byte_order; uint8_t bitmap_format_bit_order; uint8_t bitmap_format_scanline_unit; uint8_t bitmap_format_scanline_pad; xcb_keycode_t min_keycode; xcb_keycode_t max_keycode; uint8_t pad1[4]; } xcb_setup_t; /** * @brief xcb_setup_iterator_t **/ typedef struct xcb_setup_iterator_t { xcb_setup_t *data; int rem; int index; } xcb_setup_iterator_t; typedef enum xcb_mod_mask_t { XCB_MOD_MASK_SHIFT = 1, XCB_MOD_MASK_LOCK = 2, XCB_MOD_MASK_CONTROL = 4, XCB_MOD_MASK_1 = 8, XCB_MOD_MASK_2 = 16, XCB_MOD_MASK_3 = 32, XCB_MOD_MASK_4 = 64, XCB_MOD_MASK_5 = 128, XCB_MOD_MASK_ANY = 32768 } xcb_mod_mask_t; typedef enum xcb_key_but_mask_t { XCB_KEY_BUT_MASK_SHIFT = 1, XCB_KEY_BUT_MASK_LOCK = 2, XCB_KEY_BUT_MASK_CONTROL = 4, XCB_KEY_BUT_MASK_MOD_1 = 8, XCB_KEY_BUT_MASK_MOD_2 = 16, XCB_KEY_BUT_MASK_MOD_3 = 32, XCB_KEY_BUT_MASK_MOD_4 = 64, XCB_KEY_BUT_MASK_MOD_5 = 128, XCB_KEY_BUT_MASK_BUTTON_1 = 256, XCB_KEY_BUT_MASK_BUTTON_2 = 512, XCB_KEY_BUT_MASK_BUTTON_3 = 1024, XCB_KEY_BUT_MASK_BUTTON_4 = 2048, XCB_KEY_BUT_MASK_BUTTON_5 = 4096 } xcb_key_but_mask_t; typedef enum xcb_window_enum_t { XCB_WINDOW_NONE = 0 } xcb_window_enum_t; /** Opcode for xcb_key_press. */ #define XCB_KEY_PRESS 2 /** * @brief xcb_key_press_event_t **/ typedef struct xcb_key_press_event_t { uint8_t response_type; xcb_keycode_t detail; uint16_t sequence; xcb_timestamp_t time; xcb_window_t root; xcb_window_t event; xcb_window_t child; int16_t root_x; int16_t root_y; int16_t event_x; int16_t event_y; uint16_t state; uint8_t same_screen; uint8_t pad0; } xcb_key_press_event_t; /** Opcode for xcb_key_release. */ #define XCB_KEY_RELEASE 3 typedef xcb_key_press_event_t xcb_key_release_event_t; typedef enum xcb_button_mask_t { XCB_BUTTON_MASK_1 = 256, XCB_BUTTON_MASK_2 = 512, XCB_BUTTON_MASK_3 = 1024, XCB_BUTTON_MASK_4 = 2048, XCB_BUTTON_MASK_5 = 4096, XCB_BUTTON_MASK_ANY = 32768 } xcb_button_mask_t; /** Opcode for xcb_button_press. */ #define XCB_BUTTON_PRESS 4 /** * @brief xcb_button_press_event_t **/ typedef struct xcb_button_press_event_t { uint8_t response_type; xcb_button_t detail; uint16_t sequence; xcb_timestamp_t time; xcb_window_t root; xcb_window_t event; xcb_window_t child; int16_t root_x; int16_t root_y; int16_t event_x; int16_t event_y; uint16_t state; uint8_t same_screen; uint8_t pad0; } xcb_button_press_event_t; /** Opcode for xcb_button_release. */ #define XCB_BUTTON_RELEASE 5 typedef xcb_button_press_event_t xcb_button_release_event_t; typedef enum xcb_motion_t { XCB_MOTION_NORMAL = 0, XCB_MOTION_HINT = 1 } xcb_motion_t; /** Opcode for xcb_motion_notify. */ #define XCB_MOTION_NOTIFY 6 /** * @brief xcb_motion_notify_event_t **/ typedef struct xcb_motion_notify_event_t { uint8_t response_type; uint8_t detail; uint16_t sequence; xcb_timestamp_t time; xcb_window_t root; xcb_window_t event; xcb_window_t child; int16_t root_x; int16_t root_y; int16_t event_x; int16_t event_y; uint16_t state; uint8_t same_screen; uint8_t pad0; } xcb_motion_notify_event_t; typedef enum xcb_notify_detail_t { XCB_NOTIFY_DETAIL_ANCESTOR = 0, XCB_NOTIFY_DETAIL_VIRTUAL = 1, XCB_NOTIFY_DETAIL_INFERIOR = 2, XCB_NOTIFY_DETAIL_NONLINEAR = 3, XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4, XCB_NOTIFY_DETAIL_POINTER = 5, XCB_NOTIFY_DETAIL_POINTER_ROOT = 6, XCB_NOTIFY_DETAIL_NONE = 7 } xcb_notify_detail_t; typedef enum xcb_notify_mode_t { XCB_NOTIFY_MODE_NORMAL = 0, XCB_NOTIFY_MODE_GRAB = 1, XCB_NOTIFY_MODE_UNGRAB = 2, XCB_NOTIFY_MODE_WHILE_GRABBED = 3 } xcb_notify_mode_t; /** Opcode for xcb_enter_notify. */ #define XCB_ENTER_NOTIFY 7 /** * @brief xcb_enter_notify_event_t **/ typedef struct xcb_enter_notify_event_t { uint8_t response_type; uint8_t detail; uint16_t sequence; xcb_timestamp_t time; xcb_window_t root; xcb_window_t event; xcb_window_t child; int16_t root_x; int16_t root_y; int16_t event_x; int16_t event_y; uint16_t state; uint8_t mode; uint8_t same_screen_focus; } xcb_enter_notify_event_t; /** Opcode for xcb_leave_notify. */ #define XCB_LEAVE_NOTIFY 8 typedef xcb_enter_notify_event_t xcb_leave_notify_event_t; /** Opcode for xcb_focus_in. */ #define XCB_FOCUS_IN 9 /** * @brief xcb_focus_in_event_t **/ typedef struct xcb_focus_in_event_t { uint8_t response_type; uint8_t detail; uint16_t sequence; xcb_window_t event; uint8_t mode; uint8_t pad0[3]; } xcb_focus_in_event_t; /** Opcode for xcb_focus_out. */ #define XCB_FOCUS_OUT 10 typedef xcb_focus_in_event_t xcb_focus_out_event_t; /** Opcode for xcb_keymap_notify. */ #define XCB_KEYMAP_NOTIFY 11 /** * @brief xcb_keymap_notify_event_t **/ typedef struct xcb_keymap_notify_event_t { uint8_t response_type; uint8_t keys[31]; } xcb_keymap_notify_event_t; /** Opcode for xcb_expose. */ #define XCB_EXPOSE 12 /** * @brief xcb_expose_event_t **/ typedef struct xcb_expose_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t window; uint16_t x; uint16_t y; uint16_t width; uint16_t height; uint16_t count; uint8_t pad1[2]; } xcb_expose_event_t; /** Opcode for xcb_graphics_exposure. */ #define XCB_GRAPHICS_EXPOSURE 13 /** * @brief xcb_graphics_exposure_event_t **/ typedef struct xcb_graphics_exposure_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_drawable_t drawable; uint16_t x; uint16_t y; uint16_t width; uint16_t height; uint16_t minor_opcode; uint16_t count; uint8_t major_opcode; uint8_t pad1[3]; } xcb_graphics_exposure_event_t; /** Opcode for xcb_no_exposure. */ #define XCB_NO_EXPOSURE 14 /** * @brief xcb_no_exposure_event_t **/ typedef struct xcb_no_exposure_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_drawable_t drawable; uint16_t minor_opcode; uint8_t major_opcode; uint8_t pad1; } xcb_no_exposure_event_t; typedef enum xcb_visibility_t { XCB_VISIBILITY_UNOBSCURED = 0, XCB_VISIBILITY_PARTIALLY_OBSCURED = 1, XCB_VISIBILITY_FULLY_OBSCURED = 2 } xcb_visibility_t; /** Opcode for xcb_visibility_notify. */ #define XCB_VISIBILITY_NOTIFY 15 /** * @brief xcb_visibility_notify_event_t **/ typedef struct xcb_visibility_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t window; uint8_t state; uint8_t pad1[3]; } xcb_visibility_notify_event_t; /** Opcode for xcb_create_notify. */ #define XCB_CREATE_NOTIFY 16 /** * @brief xcb_create_notify_event_t **/ typedef struct xcb_create_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t parent; xcb_window_t window; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t border_width; uint8_t override_redirect; uint8_t pad1; } xcb_create_notify_event_t; /** Opcode for xcb_destroy_notify. */ #define XCB_DESTROY_NOTIFY 17 /** * @brief xcb_destroy_notify_event_t **/ typedef struct xcb_destroy_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t event; xcb_window_t window; } xcb_destroy_notify_event_t; /** Opcode for xcb_unmap_notify. */ #define XCB_UNMAP_NOTIFY 18 /** * @brief xcb_unmap_notify_event_t **/ typedef struct xcb_unmap_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t event; xcb_window_t window; uint8_t from_configure; uint8_t pad1[3]; } xcb_unmap_notify_event_t; /** Opcode for xcb_map_notify. */ #define XCB_MAP_NOTIFY 19 /** * @brief xcb_map_notify_event_t **/ typedef struct xcb_map_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t event; xcb_window_t window; uint8_t override_redirect; uint8_t pad1[3]; } xcb_map_notify_event_t; /** Opcode for xcb_map_request. */ #define XCB_MAP_REQUEST 20 /** * @brief xcb_map_request_event_t **/ typedef struct xcb_map_request_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t parent; xcb_window_t window; } xcb_map_request_event_t; /** Opcode for xcb_reparent_notify. */ #define XCB_REPARENT_NOTIFY 21 /** * @brief xcb_reparent_notify_event_t **/ typedef struct xcb_reparent_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t event; xcb_window_t window; xcb_window_t parent; int16_t x; int16_t y; uint8_t override_redirect; uint8_t pad1[3]; } xcb_reparent_notify_event_t; /** Opcode for xcb_configure_notify. */ #define XCB_CONFIGURE_NOTIFY 22 /** * @brief xcb_configure_notify_event_t **/ typedef struct xcb_configure_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t event; xcb_window_t window; xcb_window_t above_sibling; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t border_width; uint8_t override_redirect; uint8_t pad1; } xcb_configure_notify_event_t; /** Opcode for xcb_configure_request. */ #define XCB_CONFIGURE_REQUEST 23 /** * @brief xcb_configure_request_event_t **/ typedef struct xcb_configure_request_event_t { uint8_t response_type; uint8_t stack_mode; uint16_t sequence; xcb_window_t parent; xcb_window_t window; xcb_window_t sibling; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t border_width; uint16_t value_mask; } xcb_configure_request_event_t; /** Opcode for xcb_gravity_notify. */ #define XCB_GRAVITY_NOTIFY 24 /** * @brief xcb_gravity_notify_event_t **/ typedef struct xcb_gravity_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t event; xcb_window_t window; int16_t x; int16_t y; } xcb_gravity_notify_event_t; /** Opcode for xcb_resize_request. */ #define XCB_RESIZE_REQUEST 25 /** * @brief xcb_resize_request_event_t **/ typedef struct xcb_resize_request_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t window; uint16_t width; uint16_t height; } xcb_resize_request_event_t; typedef enum xcb_place_t { XCB_PLACE_ON_TOP = 0, /**< The window is now on top of all siblings. */ XCB_PLACE_ON_BOTTOM = 1 /**< The window is now below all siblings. */ } xcb_place_t; /** Opcode for xcb_circulate_notify. */ #define XCB_CIRCULATE_NOTIFY 26 /** * @brief xcb_circulate_notify_event_t **/ typedef struct xcb_circulate_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t event; xcb_window_t window; uint8_t pad1[4]; uint8_t place; uint8_t pad2[3]; } xcb_circulate_notify_event_t; /** Opcode for xcb_circulate_request. */ #define XCB_CIRCULATE_REQUEST 27 typedef xcb_circulate_notify_event_t xcb_circulate_request_event_t; typedef enum xcb_property_t { XCB_PROPERTY_NEW_VALUE = 0, XCB_PROPERTY_DELETE = 1 } xcb_property_t; /** Opcode for xcb_property_notify. */ #define XCB_PROPERTY_NOTIFY 28 /** * @brief xcb_property_notify_event_t **/ typedef struct xcb_property_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t window; xcb_atom_t atom; xcb_timestamp_t time; uint8_t state; uint8_t pad1[3]; } xcb_property_notify_event_t; /** Opcode for xcb_selection_clear. */ #define XCB_SELECTION_CLEAR 29 /** * @brief xcb_selection_clear_event_t **/ typedef struct xcb_selection_clear_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_timestamp_t time; xcb_window_t owner; xcb_atom_t selection; } xcb_selection_clear_event_t; typedef enum xcb_time_t { XCB_TIME_CURRENT_TIME = 0 } xcb_time_t; typedef enum xcb_atom_enum_t { XCB_ATOM_NONE = 0, XCB_ATOM_ANY = 0, XCB_ATOM_PRIMARY = 1, XCB_ATOM_SECONDARY = 2, XCB_ATOM_ARC = 3, XCB_ATOM_ATOM = 4, XCB_ATOM_BITMAP = 5, XCB_ATOM_CARDINAL = 6, XCB_ATOM_COLORMAP = 7, XCB_ATOM_CURSOR = 8, XCB_ATOM_CUT_BUFFER0 = 9, XCB_ATOM_CUT_BUFFER1 = 10, XCB_ATOM_CUT_BUFFER2 = 11, XCB_ATOM_CUT_BUFFER3 = 12, XCB_ATOM_CUT_BUFFER4 = 13, XCB_ATOM_CUT_BUFFER5 = 14, XCB_ATOM_CUT_BUFFER6 = 15, XCB_ATOM_CUT_BUFFER7 = 16, XCB_ATOM_DRAWABLE = 17, XCB_ATOM_FONT = 18, XCB_ATOM_INTEGER = 19, XCB_ATOM_PIXMAP = 20, XCB_ATOM_POINT = 21, XCB_ATOM_RECTANGLE = 22, XCB_ATOM_RESOURCE_MANAGER = 23, XCB_ATOM_RGB_COLOR_MAP = 24, XCB_ATOM_RGB_BEST_MAP = 25, XCB_ATOM_RGB_BLUE_MAP = 26, XCB_ATOM_RGB_DEFAULT_MAP = 27, XCB_ATOM_RGB_GRAY_MAP = 28, XCB_ATOM_RGB_GREEN_MAP = 29, XCB_ATOM_RGB_RED_MAP = 30, XCB_ATOM_STRING = 31, XCB_ATOM_VISUALID = 32, XCB_ATOM_WINDOW = 33, XCB_ATOM_WM_COMMAND = 34, XCB_ATOM_WM_HINTS = 35, XCB_ATOM_WM_CLIENT_MACHINE = 36, XCB_ATOM_WM_ICON_NAME = 37, XCB_ATOM_WM_ICON_SIZE = 38, XCB_ATOM_WM_NAME = 39, XCB_ATOM_WM_NORMAL_HINTS = 40, XCB_ATOM_WM_SIZE_HINTS = 41, XCB_ATOM_WM_ZOOM_HINTS = 42, XCB_ATOM_MIN_SPACE = 43, XCB_ATOM_NORM_SPACE = 44, XCB_ATOM_MAX_SPACE = 45, XCB_ATOM_END_SPACE = 46, XCB_ATOM_SUPERSCRIPT_X = 47, XCB_ATOM_SUPERSCRIPT_Y = 48, XCB_ATOM_SUBSCRIPT_X = 49, XCB_ATOM_SUBSCRIPT_Y = 50, XCB_ATOM_UNDERLINE_POSITION = 51, XCB_ATOM_UNDERLINE_THICKNESS = 52, XCB_ATOM_STRIKEOUT_ASCENT = 53, XCB_ATOM_STRIKEOUT_DESCENT = 54, XCB_ATOM_ITALIC_ANGLE = 55, XCB_ATOM_X_HEIGHT = 56, XCB_ATOM_QUAD_WIDTH = 57, XCB_ATOM_WEIGHT = 58, XCB_ATOM_POINT_SIZE = 59, XCB_ATOM_RESOLUTION = 60, XCB_ATOM_COPYRIGHT = 61, XCB_ATOM_NOTICE = 62, XCB_ATOM_FONT_NAME = 63, XCB_ATOM_FAMILY_NAME = 64, XCB_ATOM_FULL_NAME = 65, XCB_ATOM_CAP_HEIGHT = 66, XCB_ATOM_WM_CLASS = 67, XCB_ATOM_WM_TRANSIENT_FOR = 68 } xcb_atom_enum_t; /** Opcode for xcb_selection_request. */ #define XCB_SELECTION_REQUEST 30 /** * @brief xcb_selection_request_event_t **/ typedef struct xcb_selection_request_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_timestamp_t time; xcb_window_t owner; xcb_window_t requestor; xcb_atom_t selection; xcb_atom_t target; xcb_atom_t property; } xcb_selection_request_event_t; /** Opcode for xcb_selection_notify. */ #define XCB_SELECTION_NOTIFY 31 /** * @brief xcb_selection_notify_event_t **/ typedef struct xcb_selection_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_timestamp_t time; xcb_window_t requestor; xcb_atom_t selection; xcb_atom_t target; xcb_atom_t property; } xcb_selection_notify_event_t; typedef enum xcb_colormap_state_t { XCB_COLORMAP_STATE_UNINSTALLED = 0, /**< The colormap was uninstalled. */ XCB_COLORMAP_STATE_INSTALLED = 1 /**< The colormap was installed. */ } xcb_colormap_state_t; typedef enum xcb_colormap_enum_t { XCB_COLORMAP_NONE = 0 } xcb_colormap_enum_t; /** Opcode for xcb_colormap_notify. */ #define XCB_COLORMAP_NOTIFY 32 /** * @brief xcb_colormap_notify_event_t **/ typedef struct xcb_colormap_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_window_t window; xcb_colormap_t colormap; uint8_t _new; uint8_t state; uint8_t pad1[2]; } xcb_colormap_notify_event_t; /** * @brief xcb_client_message_data_t **/ typedef union xcb_client_message_data_t { uint8_t data8[20]; uint16_t data16[10]; uint32_t data32[5]; } xcb_client_message_data_t; /** * @brief xcb_client_message_data_iterator_t **/ typedef struct xcb_client_message_data_iterator_t { xcb_client_message_data_t *data; int rem; int index; } xcb_client_message_data_iterator_t; /** Opcode for xcb_client_message. */ #define XCB_CLIENT_MESSAGE 33 /** * @brief xcb_client_message_event_t **/ typedef struct xcb_client_message_event_t { uint8_t response_type; uint8_t format; uint16_t sequence; xcb_window_t window; xcb_atom_t type; xcb_client_message_data_t data; } xcb_client_message_event_t; typedef enum xcb_mapping_t { XCB_MAPPING_MODIFIER = 0, XCB_MAPPING_KEYBOARD = 1, XCB_MAPPING_POINTER = 2 } xcb_mapping_t; /** Opcode for xcb_mapping_notify. */ #define XCB_MAPPING_NOTIFY 34 /** * @brief xcb_mapping_notify_event_t **/ typedef struct xcb_mapping_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint8_t request; xcb_keycode_t first_keycode; uint8_t count; uint8_t pad1; } xcb_mapping_notify_event_t; /** Opcode for xcb_ge_generic. */ #define XCB_GE_GENERIC 35 /** * @brief xcb_ge_generic_event_t **/ typedef struct xcb_ge_generic_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; uint8_t pad0[22]; uint32_t full_sequence; } xcb_ge_generic_event_t; /** Opcode for xcb_request. */ #define XCB_REQUEST 1 /** * @brief xcb_request_error_t **/ typedef struct xcb_request_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; uint32_t bad_value; uint16_t minor_opcode; uint8_t major_opcode; uint8_t pad0; } xcb_request_error_t; /** Opcode for xcb_value. */ #define XCB_VALUE 2 /** * @brief xcb_value_error_t **/ typedef struct xcb_value_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; uint32_t bad_value; uint16_t minor_opcode; uint8_t major_opcode; uint8_t pad0; } xcb_value_error_t; /** Opcode for xcb_window. */ #define XCB_WINDOW 3 typedef xcb_value_error_t xcb_window_error_t; /** Opcode for xcb_pixmap. */ #define XCB_PIXMAP 4 typedef xcb_value_error_t xcb_pixmap_error_t; /** Opcode for xcb_atom. */ #define XCB_ATOM 5 typedef xcb_value_error_t xcb_atom_error_t; /** Opcode for xcb_cursor. */ #define XCB_CURSOR 6 typedef xcb_value_error_t xcb_cursor_error_t; /** Opcode for xcb_font. */ #define XCB_FONT 7 typedef xcb_value_error_t xcb_font_error_t; /** Opcode for xcb_match. */ #define XCB_MATCH 8 typedef xcb_request_error_t xcb_match_error_t; /** Opcode for xcb_drawable. */ #define XCB_DRAWABLE 9 typedef xcb_value_error_t xcb_drawable_error_t; /** Opcode for xcb_access. */ #define XCB_ACCESS 10 typedef xcb_request_error_t xcb_access_error_t; /** Opcode for xcb_alloc. */ #define XCB_ALLOC 11 typedef xcb_request_error_t xcb_alloc_error_t; /** Opcode for xcb_colormap. */ #define XCB_COLORMAP 12 typedef xcb_value_error_t xcb_colormap_error_t; /** Opcode for xcb_g_context. */ #define XCB_G_CONTEXT 13 typedef xcb_value_error_t xcb_g_context_error_t; /** Opcode for xcb_id_choice. */ #define XCB_ID_CHOICE 14 typedef xcb_value_error_t xcb_id_choice_error_t; /** Opcode for xcb_name. */ #define XCB_NAME 15 typedef xcb_request_error_t xcb_name_error_t; /** Opcode for xcb_length. */ #define XCB_LENGTH 16 typedef xcb_request_error_t xcb_length_error_t; /** Opcode for xcb_implementation. */ #define XCB_IMPLEMENTATION 17 typedef xcb_request_error_t xcb_implementation_error_t; typedef enum xcb_window_class_t { XCB_WINDOW_CLASS_COPY_FROM_PARENT = 0, XCB_WINDOW_CLASS_INPUT_OUTPUT = 1, XCB_WINDOW_CLASS_INPUT_ONLY = 2 } xcb_window_class_t; typedef enum xcb_cw_t { XCB_CW_BACK_PIXMAP = 1, /**< Overrides the default background-pixmap. The background pixmap and window must have the same root and same depth. Any size pixmap can be used, although some sizes may be faster than others. If `XCB_BACK_PIXMAP_NONE` is specified, the window has no defined background. The server may fill the contents with the previous screen contents or with contents of its own choosing. If `XCB_BACK_PIXMAP_PARENT_RELATIVE` is specified, the parent's background is used, but the window must have the same depth as the parent (or a Match error results). The parent's background is tracked, and the current version is used each time the window background is required. */ XCB_CW_BACK_PIXEL = 2, /**< Overrides `BackPixmap`. A pixmap of undefined size filled with the specified background pixel is used for the background. Range-checking is not performed, the background pixel is truncated to the appropriate number of bits. */ XCB_CW_BORDER_PIXMAP = 4, /**< Overrides the default border-pixmap. The border pixmap and window must have the same root and the same depth. Any size pixmap can be used, although some sizes may be faster than others. The special value `XCB_COPY_FROM_PARENT` means the parent's border pixmap is copied (subsequent changes to the parent's border attribute do not affect the child), but the window must have the same depth as the parent. */ XCB_CW_BORDER_PIXEL = 8, /**< Overrides `BorderPixmap`. A pixmap of undefined size filled with the specified border pixel is used for the border. Range checking is not performed on the border-pixel value, it is truncated to the appropriate number of bits. */ XCB_CW_BIT_GRAVITY = 16, /**< Defines which region of the window should be retained if the window is resized. */ XCB_CW_WIN_GRAVITY = 32, /**< Defines how the window should be repositioned if the parent is resized (see `ConfigureWindow`). */ XCB_CW_BACKING_STORE = 64, /**< A backing-store of `WhenMapped` advises the server that maintaining contents of obscured regions when the window is mapped would be beneficial. A backing-store of `Always` advises the server that maintaining contents even when the window is unmapped would be beneficial. In this case, the server may generate an exposure event when the window is created. A value of `NotUseful` advises the server that maintaining contents is unnecessary, although a server may still choose to maintain contents while the window is mapped. Note that if the server maintains contents, then the server should maintain complete contents not just the region within the parent boundaries, even if the window is larger than its parent. While the server maintains contents, exposure events will not normally be generated, but the server may stop maintaining contents at any time. */ XCB_CW_BACKING_PLANES = 128, /**< The backing-planes indicates (with bits set to 1) which bit planes of the window hold dynamic data that must be preserved in backing-stores and during save-unders. */ XCB_CW_BACKING_PIXEL = 256, /**< The backing-pixel specifies what value to use in planes not covered by backing-planes. The server is free to save only the specified bit planes in the backing-store or save-under and regenerate the remaining planes with the specified pixel value. Any bits beyond the specified depth of the window in these values are simply ignored. */ XCB_CW_OVERRIDE_REDIRECT = 512, /**< The override-redirect specifies whether map and configure requests on this window should override a SubstructureRedirect on the parent, typically to inform a window manager not to tamper with the window. */ XCB_CW_SAVE_UNDER = 1024, /**< If 1, the server is advised that when this window is mapped, saving the contents of windows it obscures would be beneficial. */ XCB_CW_EVENT_MASK = 2048, /**< The event-mask defines which events the client is interested in for this window (or for some event types, inferiors of the window). */ XCB_CW_DONT_PROPAGATE = 4096, /**< The do-not-propagate-mask defines which events should not be propagated to ancestor windows when no client has the event type selected in this window. */ XCB_CW_COLORMAP = 8192, /**< The colormap specifies the colormap that best reflects the true colors of the window. Servers capable of supporting multiple hardware colormaps may use this information, and window man- agers may use it for InstallColormap requests. The colormap must have the same visual type and root as the window (or a Match error results). If CopyFromParent is specified, the parent's colormap is copied (subsequent changes to the parent's colormap attribute do not affect the child). However, the window must have the same visual type as the parent (or a Match error results), and the parent must not have a colormap of None (or a Match error results). For an explanation of None, see FreeColormap request. The colormap is copied by sharing the colormap object between the child and the parent, not by making a complete copy of the colormap contents. */ XCB_CW_CURSOR = 16384 /**< If a cursor is specified, it will be used whenever the pointer is in the window. If None is speci- fied, the parent's cursor will be used when the pointer is in the window, and any change in the parent's cursor will cause an immediate change in the displayed cursor. */ } xcb_cw_t; typedef enum xcb_back_pixmap_t { XCB_BACK_PIXMAP_NONE = 0, XCB_BACK_PIXMAP_PARENT_RELATIVE = 1 } xcb_back_pixmap_t; typedef enum xcb_gravity_t { XCB_GRAVITY_BIT_FORGET = 0, XCB_GRAVITY_WIN_UNMAP = 0, XCB_GRAVITY_NORTH_WEST = 1, XCB_GRAVITY_NORTH = 2, XCB_GRAVITY_NORTH_EAST = 3, XCB_GRAVITY_WEST = 4, XCB_GRAVITY_CENTER = 5, XCB_GRAVITY_EAST = 6, XCB_GRAVITY_SOUTH_WEST = 7, XCB_GRAVITY_SOUTH = 8, XCB_GRAVITY_SOUTH_EAST = 9, XCB_GRAVITY_STATIC = 10 } xcb_gravity_t; /** * @brief xcb_create_window_value_list_t **/ typedef struct xcb_create_window_value_list_t { xcb_pixmap_t background_pixmap; uint32_t background_pixel; xcb_pixmap_t border_pixmap; uint32_t border_pixel; uint32_t bit_gravity; uint32_t win_gravity; uint32_t backing_store; uint32_t backing_planes; uint32_t backing_pixel; xcb_bool32_t override_redirect; xcb_bool32_t save_under; uint32_t event_mask; uint32_t do_not_propogate_mask; xcb_colormap_t colormap; xcb_cursor_t cursor; } xcb_create_window_value_list_t; /** Opcode for xcb_create_window. */ #define XCB_CREATE_WINDOW 1 /** * @brief xcb_create_window_request_t **/ typedef struct xcb_create_window_request_t { uint8_t major_opcode; uint8_t depth; uint16_t length; xcb_window_t wid; xcb_window_t parent; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t border_width; uint16_t _class; xcb_visualid_t visual; uint32_t value_mask; } xcb_create_window_request_t; /** * @brief xcb_change_window_attributes_value_list_t **/ typedef struct xcb_change_window_attributes_value_list_t { xcb_pixmap_t background_pixmap; uint32_t background_pixel; xcb_pixmap_t border_pixmap; uint32_t border_pixel; uint32_t bit_gravity; uint32_t win_gravity; uint32_t backing_store; uint32_t backing_planes; uint32_t backing_pixel; xcb_bool32_t override_redirect; xcb_bool32_t save_under; uint32_t event_mask; uint32_t do_not_propogate_mask; xcb_colormap_t colormap; xcb_cursor_t cursor; } xcb_change_window_attributes_value_list_t; /** Opcode for xcb_change_window_attributes. */ #define XCB_CHANGE_WINDOW_ATTRIBUTES 2 /** * @brief xcb_change_window_attributes_request_t **/ typedef struct xcb_change_window_attributes_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; uint32_t value_mask; } xcb_change_window_attributes_request_t; typedef enum xcb_map_state_t { XCB_MAP_STATE_UNMAPPED = 0, XCB_MAP_STATE_UNVIEWABLE = 1, XCB_MAP_STATE_VIEWABLE = 2 } xcb_map_state_t; /** * @brief xcb_get_window_attributes_cookie_t **/ typedef struct xcb_get_window_attributes_cookie_t { unsigned int sequence; } xcb_get_window_attributes_cookie_t; /** Opcode for xcb_get_window_attributes. */ #define XCB_GET_WINDOW_ATTRIBUTES 3 /** * @brief xcb_get_window_attributes_request_t **/ typedef struct xcb_get_window_attributes_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_get_window_attributes_request_t; /** * @brief xcb_get_window_attributes_reply_t **/ typedef struct xcb_get_window_attributes_reply_t { uint8_t response_type; uint8_t backing_store; uint16_t sequence; uint32_t length; xcb_visualid_t visual; uint16_t _class; uint8_t bit_gravity; uint8_t win_gravity; uint32_t backing_planes; uint32_t backing_pixel; uint8_t save_under; uint8_t map_is_installed; uint8_t map_state; uint8_t override_redirect; xcb_colormap_t colormap; uint32_t all_event_masks; uint32_t your_event_mask; uint16_t do_not_propagate_mask; uint8_t pad0[2]; } xcb_get_window_attributes_reply_t; /** Opcode for xcb_destroy_window. */ #define XCB_DESTROY_WINDOW 4 /** * @brief xcb_destroy_window_request_t **/ typedef struct xcb_destroy_window_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_destroy_window_request_t; /** Opcode for xcb_destroy_subwindows. */ #define XCB_DESTROY_SUBWINDOWS 5 /** * @brief xcb_destroy_subwindows_request_t **/ typedef struct xcb_destroy_subwindows_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_destroy_subwindows_request_t; typedef enum xcb_set_mode_t { XCB_SET_MODE_INSERT = 0, XCB_SET_MODE_DELETE = 1 } xcb_set_mode_t; /** Opcode for xcb_change_save_set. */ #define XCB_CHANGE_SAVE_SET 6 /** * @brief xcb_change_save_set_request_t **/ typedef struct xcb_change_save_set_request_t { uint8_t major_opcode; uint8_t mode; uint16_t length; xcb_window_t window; } xcb_change_save_set_request_t; /** Opcode for xcb_reparent_window. */ #define XCB_REPARENT_WINDOW 7 /** * @brief xcb_reparent_window_request_t **/ typedef struct xcb_reparent_window_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; xcb_window_t parent; int16_t x; int16_t y; } xcb_reparent_window_request_t; /** Opcode for xcb_map_window. */ #define XCB_MAP_WINDOW 8 /** * @brief xcb_map_window_request_t **/ typedef struct xcb_map_window_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_map_window_request_t; /** Opcode for xcb_map_subwindows. */ #define XCB_MAP_SUBWINDOWS 9 /** * @brief xcb_map_subwindows_request_t **/ typedef struct xcb_map_subwindows_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_map_subwindows_request_t; /** Opcode for xcb_unmap_window. */ #define XCB_UNMAP_WINDOW 10 /** * @brief xcb_unmap_window_request_t **/ typedef struct xcb_unmap_window_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_unmap_window_request_t; /** Opcode for xcb_unmap_subwindows. */ #define XCB_UNMAP_SUBWINDOWS 11 /** * @brief xcb_unmap_subwindows_request_t **/ typedef struct xcb_unmap_subwindows_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_unmap_subwindows_request_t; typedef enum xcb_config_window_t { XCB_CONFIG_WINDOW_X = 1, XCB_CONFIG_WINDOW_Y = 2, XCB_CONFIG_WINDOW_WIDTH = 4, XCB_CONFIG_WINDOW_HEIGHT = 8, XCB_CONFIG_WINDOW_BORDER_WIDTH = 16, XCB_CONFIG_WINDOW_SIBLING = 32, XCB_CONFIG_WINDOW_STACK_MODE = 64 } xcb_config_window_t; typedef enum xcb_stack_mode_t { XCB_STACK_MODE_ABOVE = 0, XCB_STACK_MODE_BELOW = 1, XCB_STACK_MODE_TOP_IF = 2, XCB_STACK_MODE_BOTTOM_IF = 3, XCB_STACK_MODE_OPPOSITE = 4 } xcb_stack_mode_t; /** * @brief xcb_configure_window_value_list_t **/ typedef struct xcb_configure_window_value_list_t { int32_t x; int32_t y; uint32_t width; uint32_t height; uint32_t border_width; xcb_window_t sibling; uint32_t stack_mode; } xcb_configure_window_value_list_t; /** Opcode for xcb_configure_window. */ #define XCB_CONFIGURE_WINDOW 12 /** * @brief xcb_configure_window_request_t **/ typedef struct xcb_configure_window_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; uint16_t value_mask; uint8_t pad1[2]; } xcb_configure_window_request_t; typedef enum xcb_circulate_t { XCB_CIRCULATE_RAISE_LOWEST = 0, XCB_CIRCULATE_LOWER_HIGHEST = 1 } xcb_circulate_t; /** Opcode for xcb_circulate_window. */ #define XCB_CIRCULATE_WINDOW 13 /** * @brief xcb_circulate_window_request_t **/ typedef struct xcb_circulate_window_request_t { uint8_t major_opcode; uint8_t direction; uint16_t length; xcb_window_t window; } xcb_circulate_window_request_t; /** * @brief xcb_get_geometry_cookie_t **/ typedef struct xcb_get_geometry_cookie_t { unsigned int sequence; } xcb_get_geometry_cookie_t; /** Opcode for xcb_get_geometry. */ #define XCB_GET_GEOMETRY 14 /** * @brief xcb_get_geometry_request_t **/ typedef struct xcb_get_geometry_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; } xcb_get_geometry_request_t; /** * @brief xcb_get_geometry_reply_t **/ typedef struct xcb_get_geometry_reply_t { uint8_t response_type; uint8_t depth; uint16_t sequence; uint32_t length; xcb_window_t root; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t border_width; uint8_t pad0[2]; } xcb_get_geometry_reply_t; /** * @brief xcb_query_tree_cookie_t **/ typedef struct xcb_query_tree_cookie_t { unsigned int sequence; } xcb_query_tree_cookie_t; /** Opcode for xcb_query_tree. */ #define XCB_QUERY_TREE 15 /** * @brief xcb_query_tree_request_t **/ typedef struct xcb_query_tree_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_query_tree_request_t; /** * @brief xcb_query_tree_reply_t **/ typedef struct xcb_query_tree_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_window_t root; xcb_window_t parent; uint16_t children_len; uint8_t pad1[14]; } xcb_query_tree_reply_t; /** * @brief xcb_intern_atom_cookie_t **/ typedef struct xcb_intern_atom_cookie_t { unsigned int sequence; } xcb_intern_atom_cookie_t; /** Opcode for xcb_intern_atom. */ #define XCB_INTERN_ATOM 16 /** * @brief xcb_intern_atom_request_t **/ typedef struct xcb_intern_atom_request_t { uint8_t major_opcode; uint8_t only_if_exists; uint16_t length; uint16_t name_len; uint8_t pad0[2]; } xcb_intern_atom_request_t; /** * @brief xcb_intern_atom_reply_t **/ typedef struct xcb_intern_atom_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_atom_t atom; } xcb_intern_atom_reply_t; /** * @brief xcb_get_atom_name_cookie_t **/ typedef struct xcb_get_atom_name_cookie_t { unsigned int sequence; } xcb_get_atom_name_cookie_t; /** Opcode for xcb_get_atom_name. */ #define XCB_GET_ATOM_NAME 17 /** * @brief xcb_get_atom_name_request_t **/ typedef struct xcb_get_atom_name_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_atom_t atom; } xcb_get_atom_name_request_t; /** * @brief xcb_get_atom_name_reply_t **/ typedef struct xcb_get_atom_name_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t name_len; uint8_t pad1[22]; } xcb_get_atom_name_reply_t; typedef enum xcb_prop_mode_t { XCB_PROP_MODE_REPLACE = 0, /**< Discard the previous property value and store the new data. */ XCB_PROP_MODE_PREPEND = 1, /**< Insert the new data before the beginning of existing data. The `format` must match existing property value. If the property is undefined, it is treated as defined with the correct type and format with zero-length data. */ XCB_PROP_MODE_APPEND = 2 /**< Insert the new data after the beginning of existing data. The `format` must match existing property value. If the property is undefined, it is treated as defined with the correct type and format with zero-length data. */ } xcb_prop_mode_t; /** Opcode for xcb_change_property. */ #define XCB_CHANGE_PROPERTY 18 /** * @brief xcb_change_property_request_t **/ typedef struct xcb_change_property_request_t { uint8_t major_opcode; uint8_t mode; uint16_t length; xcb_window_t window; xcb_atom_t property; xcb_atom_t type; uint8_t format; uint8_t pad0[3]; uint32_t data_len; } xcb_change_property_request_t; /** Opcode for xcb_delete_property. */ #define XCB_DELETE_PROPERTY 19 /** * @brief xcb_delete_property_request_t **/ typedef struct xcb_delete_property_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; xcb_atom_t property; } xcb_delete_property_request_t; typedef enum xcb_get_property_type_t { XCB_GET_PROPERTY_TYPE_ANY = 0 } xcb_get_property_type_t; /** * @brief xcb_get_property_cookie_t **/ typedef struct xcb_get_property_cookie_t { unsigned int sequence; } xcb_get_property_cookie_t; /** Opcode for xcb_get_property. */ #define XCB_GET_PROPERTY 20 /** * @brief xcb_get_property_request_t **/ typedef struct xcb_get_property_request_t { uint8_t major_opcode; uint8_t _delete; uint16_t length; xcb_window_t window; xcb_atom_t property; xcb_atom_t type; uint32_t long_offset; uint32_t long_length; } xcb_get_property_request_t; /** * @brief xcb_get_property_reply_t **/ typedef struct xcb_get_property_reply_t { uint8_t response_type; uint8_t format; uint16_t sequence; uint32_t length; xcb_atom_t type; uint32_t bytes_after; uint32_t value_len; uint8_t pad0[12]; } xcb_get_property_reply_t; /** * @brief xcb_list_properties_cookie_t **/ typedef struct xcb_list_properties_cookie_t { unsigned int sequence; } xcb_list_properties_cookie_t; /** Opcode for xcb_list_properties. */ #define XCB_LIST_PROPERTIES 21 /** * @brief xcb_list_properties_request_t **/ typedef struct xcb_list_properties_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_list_properties_request_t; /** * @brief xcb_list_properties_reply_t **/ typedef struct xcb_list_properties_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t atoms_len; uint8_t pad1[22]; } xcb_list_properties_reply_t; /** Opcode for xcb_set_selection_owner. */ #define XCB_SET_SELECTION_OWNER 22 /** * @brief xcb_set_selection_owner_request_t **/ typedef struct xcb_set_selection_owner_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t owner; xcb_atom_t selection; xcb_timestamp_t time; } xcb_set_selection_owner_request_t; /** * @brief xcb_get_selection_owner_cookie_t **/ typedef struct xcb_get_selection_owner_cookie_t { unsigned int sequence; } xcb_get_selection_owner_cookie_t; /** Opcode for xcb_get_selection_owner. */ #define XCB_GET_SELECTION_OWNER 23 /** * @brief xcb_get_selection_owner_request_t **/ typedef struct xcb_get_selection_owner_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_atom_t selection; } xcb_get_selection_owner_request_t; /** * @brief xcb_get_selection_owner_reply_t **/ typedef struct xcb_get_selection_owner_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_window_t owner; } xcb_get_selection_owner_reply_t; /** Opcode for xcb_convert_selection. */ #define XCB_CONVERT_SELECTION 24 /** * @brief xcb_convert_selection_request_t **/ typedef struct xcb_convert_selection_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t requestor; xcb_atom_t selection; xcb_atom_t target; xcb_atom_t property; xcb_timestamp_t time; } xcb_convert_selection_request_t; typedef enum xcb_send_event_dest_t { XCB_SEND_EVENT_DEST_POINTER_WINDOW = 0, XCB_SEND_EVENT_DEST_ITEM_FOCUS = 1 } xcb_send_event_dest_t; /** Opcode for xcb_send_event. */ #define XCB_SEND_EVENT 25 /** * @brief xcb_send_event_request_t **/ typedef struct xcb_send_event_request_t { uint8_t major_opcode; uint8_t propagate; uint16_t length; xcb_window_t destination; uint32_t event_mask; char event[32]; } xcb_send_event_request_t; typedef enum xcb_grab_mode_t { XCB_GRAB_MODE_SYNC = 0, /**< The state of the keyboard appears to freeze: No further keyboard events are generated by the server until the grabbing client issues a releasing `AllowEvents` request or until the keyboard grab is released. */ XCB_GRAB_MODE_ASYNC = 1 /**< Keyboard event processing continues normally. */ } xcb_grab_mode_t; typedef enum xcb_grab_status_t { XCB_GRAB_STATUS_SUCCESS = 0, XCB_GRAB_STATUS_ALREADY_GRABBED = 1, XCB_GRAB_STATUS_INVALID_TIME = 2, XCB_GRAB_STATUS_NOT_VIEWABLE = 3, XCB_GRAB_STATUS_FROZEN = 4 } xcb_grab_status_t; typedef enum xcb_cursor_enum_t { XCB_CURSOR_NONE = 0 } xcb_cursor_enum_t; /** * @brief xcb_grab_pointer_cookie_t **/ typedef struct xcb_grab_pointer_cookie_t { unsigned int sequence; } xcb_grab_pointer_cookie_t; /** Opcode for xcb_grab_pointer. */ #define XCB_GRAB_POINTER 26 /** * @brief xcb_grab_pointer_request_t **/ typedef struct xcb_grab_pointer_request_t { uint8_t major_opcode; uint8_t owner_events; uint16_t length; xcb_window_t grab_window; uint16_t event_mask; uint8_t pointer_mode; uint8_t keyboard_mode; xcb_window_t confine_to; xcb_cursor_t cursor; xcb_timestamp_t time; } xcb_grab_pointer_request_t; /** * @brief xcb_grab_pointer_reply_t **/ typedef struct xcb_grab_pointer_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; } xcb_grab_pointer_reply_t; /** Opcode for xcb_ungrab_pointer. */ #define XCB_UNGRAB_POINTER 27 /** * @brief xcb_ungrab_pointer_request_t **/ typedef struct xcb_ungrab_pointer_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_timestamp_t time; } xcb_ungrab_pointer_request_t; typedef enum xcb_button_index_t { XCB_BUTTON_INDEX_ANY = 0, /**< Any of the following (or none): */ XCB_BUTTON_INDEX_1 = 1, /**< The left mouse button. */ XCB_BUTTON_INDEX_2 = 2, /**< The right mouse button. */ XCB_BUTTON_INDEX_3 = 3, /**< The middle mouse button. */ XCB_BUTTON_INDEX_4 = 4, /**< Scroll wheel. TODO: direction? */ XCB_BUTTON_INDEX_5 = 5 /**< Scroll wheel. TODO: direction? */ } xcb_button_index_t; /** Opcode for xcb_grab_button. */ #define XCB_GRAB_BUTTON 28 /** * @brief xcb_grab_button_request_t **/ typedef struct xcb_grab_button_request_t { uint8_t major_opcode; uint8_t owner_events; uint16_t length; xcb_window_t grab_window; uint16_t event_mask; uint8_t pointer_mode; uint8_t keyboard_mode; xcb_window_t confine_to; xcb_cursor_t cursor; uint8_t button; uint8_t pad0; uint16_t modifiers; } xcb_grab_button_request_t; /** Opcode for xcb_ungrab_button. */ #define XCB_UNGRAB_BUTTON 29 /** * @brief xcb_ungrab_button_request_t **/ typedef struct xcb_ungrab_button_request_t { uint8_t major_opcode; uint8_t button; uint16_t length; xcb_window_t grab_window; uint16_t modifiers; uint8_t pad0[2]; } xcb_ungrab_button_request_t; /** Opcode for xcb_change_active_pointer_grab. */ #define XCB_CHANGE_ACTIVE_POINTER_GRAB 30 /** * @brief xcb_change_active_pointer_grab_request_t **/ typedef struct xcb_change_active_pointer_grab_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_cursor_t cursor; xcb_timestamp_t time; uint16_t event_mask; uint8_t pad1[2]; } xcb_change_active_pointer_grab_request_t; /** * @brief xcb_grab_keyboard_cookie_t **/ typedef struct xcb_grab_keyboard_cookie_t { unsigned int sequence; } xcb_grab_keyboard_cookie_t; /** Opcode for xcb_grab_keyboard. */ #define XCB_GRAB_KEYBOARD 31 /** * @brief xcb_grab_keyboard_request_t **/ typedef struct xcb_grab_keyboard_request_t { uint8_t major_opcode; uint8_t owner_events; uint16_t length; xcb_window_t grab_window; xcb_timestamp_t time; uint8_t pointer_mode; uint8_t keyboard_mode; uint8_t pad0[2]; } xcb_grab_keyboard_request_t; /** * @brief xcb_grab_keyboard_reply_t **/ typedef struct xcb_grab_keyboard_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; } xcb_grab_keyboard_reply_t; /** Opcode for xcb_ungrab_keyboard. */ #define XCB_UNGRAB_KEYBOARD 32 /** * @brief xcb_ungrab_keyboard_request_t **/ typedef struct xcb_ungrab_keyboard_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_timestamp_t time; } xcb_ungrab_keyboard_request_t; typedef enum xcb_grab_t { XCB_GRAB_ANY = 0 } xcb_grab_t; /** Opcode for xcb_grab_key. */ #define XCB_GRAB_KEY 33 /** * @brief xcb_grab_key_request_t **/ typedef struct xcb_grab_key_request_t { uint8_t major_opcode; uint8_t owner_events; uint16_t length; xcb_window_t grab_window; uint16_t modifiers; xcb_keycode_t key; uint8_t pointer_mode; uint8_t keyboard_mode; uint8_t pad0[3]; } xcb_grab_key_request_t; /** Opcode for xcb_ungrab_key. */ #define XCB_UNGRAB_KEY 34 /** * @brief xcb_ungrab_key_request_t **/ typedef struct xcb_ungrab_key_request_t { uint8_t major_opcode; xcb_keycode_t key; uint16_t length; xcb_window_t grab_window; uint16_t modifiers; uint8_t pad0[2]; } xcb_ungrab_key_request_t; typedef enum xcb_allow_t { XCB_ALLOW_ASYNC_POINTER = 0, /**< For AsyncPointer, if the pointer is frozen by the client, pointer event processing continues normally. If the pointer is frozen twice by the client on behalf of two separate grabs, AsyncPointer thaws for both. AsyncPointer has no effect if the pointer is not frozen by the client, but the pointer need not be grabbed by the client. TODO: rewrite this in more understandable terms. */ XCB_ALLOW_SYNC_POINTER = 1, /**< For SyncPointer, if the pointer is frozen and actively grabbed by the client, pointer event processing continues normally until the next ButtonPress or ButtonRelease event is reported to the client, at which time the pointer again appears to freeze. However, if the reported event causes the pointer grab to be released, then the pointer does not freeze. SyncPointer has no effect if the pointer is not frozen by the client or if the pointer is not grabbed by the client. */ XCB_ALLOW_REPLAY_POINTER = 2, /**< For ReplayPointer, if the pointer is actively grabbed by the client and is frozen as the result of an event having been sent to the client (either from the activation of a GrabButton or from a previous AllowEvents with mode SyncPointer but not from a GrabPointer), then the pointer grab is released and that event is completely reprocessed, this time ignoring any passive grabs at or above (towards the root) the grab-window of the grab just released. The request has no effect if the pointer is not grabbed by the client or if the pointer is not frozen as the result of an event. */ XCB_ALLOW_ASYNC_KEYBOARD = 3, /**< For AsyncKeyboard, if the keyboard is frozen by the client, keyboard event processing continues normally. If the keyboard is frozen twice by the client on behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has no effect if the keyboard is not frozen by the client, but the keyboard need not be grabbed by the client. */ XCB_ALLOW_SYNC_KEYBOARD = 4, /**< For SyncKeyboard, if the keyboard is frozen and actively grabbed by the client, keyboard event processing continues normally until the next KeyPress or KeyRelease event is reported to the client, at which time the keyboard again appears to freeze. However, if the reported event causes the keyboard grab to be released, then the keyboard does not freeze. SyncKeyboard has no effect if the keyboard is not frozen by the client or if the keyboard is not grabbed by the client. */ XCB_ALLOW_REPLAY_KEYBOARD = 5, /**< For ReplayKeyboard, if the keyboard is actively grabbed by the client and is frozen as the result of an event having been sent to the client (either from the activation of a GrabKey or from a previous AllowEvents with mode SyncKeyboard but not from a GrabKeyboard), then the keyboard grab is released and that event is completely reprocessed, this time ignoring any passive grabs at or above (towards the root) the grab-window of the grab just released. The request has no effect if the keyboard is not grabbed by the client or if the keyboard is not frozen as the result of an event. */ XCB_ALLOW_ASYNC_BOTH = 6, /**< For AsyncBoth, if the pointer and the keyboard are frozen by the client, event processing for both devices continues normally. If a device is frozen twice by the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth has no effect unless both pointer and keyboard are frozen by the client. */ XCB_ALLOW_SYNC_BOTH = 7 /**< For SyncBoth, if both pointer and keyboard are frozen by the client, event processing (for both devices) continues normally until the next ButtonPress, ButtonRelease, KeyPress, or KeyRelease event is reported to the client for a grabbed device (button event for the pointer, key event for the keyboard), at which time the devices again appear to freeze. However, if the reported event causes the grab to be released, then the devices do not freeze (but if the other device is still grabbed, then a subsequent event for it will still cause both devices to freeze). SyncBoth has no effect unless both pointer and keyboard are frozen by the client. If the pointer or keyboard is frozen twice by the client on behalf of two separate grabs, SyncBoth thaws for both (but a subsequent freeze for SyncBoth will only freeze each device once). */ } xcb_allow_t; /** Opcode for xcb_allow_events. */ #define XCB_ALLOW_EVENTS 35 /** * @brief xcb_allow_events_request_t **/ typedef struct xcb_allow_events_request_t { uint8_t major_opcode; uint8_t mode; uint16_t length; xcb_timestamp_t time; } xcb_allow_events_request_t; /** Opcode for xcb_grab_server. */ #define XCB_GRAB_SERVER 36 /** * @brief xcb_grab_server_request_t **/ typedef struct xcb_grab_server_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_grab_server_request_t; /** Opcode for xcb_ungrab_server. */ #define XCB_UNGRAB_SERVER 37 /** * @brief xcb_ungrab_server_request_t **/ typedef struct xcb_ungrab_server_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_ungrab_server_request_t; /** * @brief xcb_query_pointer_cookie_t **/ typedef struct xcb_query_pointer_cookie_t { unsigned int sequence; } xcb_query_pointer_cookie_t; /** Opcode for xcb_query_pointer. */ #define XCB_QUERY_POINTER 38 /** * @brief xcb_query_pointer_request_t **/ typedef struct xcb_query_pointer_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_query_pointer_request_t; /** * @brief xcb_query_pointer_reply_t **/ typedef struct xcb_query_pointer_reply_t { uint8_t response_type; uint8_t same_screen; uint16_t sequence; uint32_t length; xcb_window_t root; xcb_window_t child; int16_t root_x; int16_t root_y; int16_t win_x; int16_t win_y; uint16_t mask; uint8_t pad0[2]; } xcb_query_pointer_reply_t; /** * @brief xcb_timecoord_t **/ typedef struct xcb_timecoord_t { xcb_timestamp_t time; int16_t x; int16_t y; } xcb_timecoord_t; /** * @brief xcb_timecoord_iterator_t **/ typedef struct xcb_timecoord_iterator_t { xcb_timecoord_t *data; int rem; int index; } xcb_timecoord_iterator_t; /** * @brief xcb_get_motion_events_cookie_t **/ typedef struct xcb_get_motion_events_cookie_t { unsigned int sequence; } xcb_get_motion_events_cookie_t; /** Opcode for xcb_get_motion_events. */ #define XCB_GET_MOTION_EVENTS 39 /** * @brief xcb_get_motion_events_request_t **/ typedef struct xcb_get_motion_events_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; xcb_timestamp_t start; xcb_timestamp_t stop; } xcb_get_motion_events_request_t; /** * @brief xcb_get_motion_events_reply_t **/ typedef struct xcb_get_motion_events_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t events_len; uint8_t pad1[20]; } xcb_get_motion_events_reply_t; /** * @brief xcb_translate_coordinates_cookie_t **/ typedef struct xcb_translate_coordinates_cookie_t { unsigned int sequence; } xcb_translate_coordinates_cookie_t; /** Opcode for xcb_translate_coordinates. */ #define XCB_TRANSLATE_COORDINATES 40 /** * @brief xcb_translate_coordinates_request_t **/ typedef struct xcb_translate_coordinates_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t src_window; xcb_window_t dst_window; int16_t src_x; int16_t src_y; } xcb_translate_coordinates_request_t; /** * @brief xcb_translate_coordinates_reply_t **/ typedef struct xcb_translate_coordinates_reply_t { uint8_t response_type; uint8_t same_screen; uint16_t sequence; uint32_t length; xcb_window_t child; int16_t dst_x; int16_t dst_y; } xcb_translate_coordinates_reply_t; /** Opcode for xcb_warp_pointer. */ #define XCB_WARP_POINTER 41 /** * @brief xcb_warp_pointer_request_t **/ typedef struct xcb_warp_pointer_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t src_window; xcb_window_t dst_window; int16_t src_x; int16_t src_y; uint16_t src_width; uint16_t src_height; int16_t dst_x; int16_t dst_y; } xcb_warp_pointer_request_t; typedef enum xcb_input_focus_t { XCB_INPUT_FOCUS_NONE = 0, /**< The focus reverts to `XCB_NONE`, so no window will have the input focus. */ XCB_INPUT_FOCUS_POINTER_ROOT = 1, /**< The focus reverts to `XCB_POINTER_ROOT` respectively. When the focus reverts, FocusIn and FocusOut events are generated, but the last-focus-change time is not changed. */ XCB_INPUT_FOCUS_PARENT = 2, /**< The focus reverts to the parent (or closest viewable ancestor) and the new revert_to value is `XCB_INPUT_FOCUS_NONE`. */ XCB_INPUT_FOCUS_FOLLOW_KEYBOARD = 3 /**< NOT YET DOCUMENTED. Only relevant for the xinput extension. */ } xcb_input_focus_t; /** Opcode for xcb_set_input_focus. */ #define XCB_SET_INPUT_FOCUS 42 /** * @brief xcb_set_input_focus_request_t **/ typedef struct xcb_set_input_focus_request_t { uint8_t major_opcode; uint8_t revert_to; uint16_t length; xcb_window_t focus; xcb_timestamp_t time; } xcb_set_input_focus_request_t; /** * @brief xcb_get_input_focus_cookie_t **/ typedef struct xcb_get_input_focus_cookie_t { unsigned int sequence; } xcb_get_input_focus_cookie_t; /** Opcode for xcb_get_input_focus. */ #define XCB_GET_INPUT_FOCUS 43 /** * @brief xcb_get_input_focus_request_t **/ typedef struct xcb_get_input_focus_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_get_input_focus_request_t; /** * @brief xcb_get_input_focus_reply_t **/ typedef struct xcb_get_input_focus_reply_t { uint8_t response_type; uint8_t revert_to; uint16_t sequence; uint32_t length; xcb_window_t focus; } xcb_get_input_focus_reply_t; /** * @brief xcb_query_keymap_cookie_t **/ typedef struct xcb_query_keymap_cookie_t { unsigned int sequence; } xcb_query_keymap_cookie_t; /** Opcode for xcb_query_keymap. */ #define XCB_QUERY_KEYMAP 44 /** * @brief xcb_query_keymap_request_t **/ typedef struct xcb_query_keymap_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_query_keymap_request_t; /** * @brief xcb_query_keymap_reply_t **/ typedef struct xcb_query_keymap_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t keys[32]; } xcb_query_keymap_reply_t; /** Opcode for xcb_open_font. */ #define XCB_OPEN_FONT 45 /** * @brief xcb_open_font_request_t **/ typedef struct xcb_open_font_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_font_t fid; uint16_t name_len; uint8_t pad1[2]; } xcb_open_font_request_t; /** Opcode for xcb_close_font. */ #define XCB_CLOSE_FONT 46 /** * @brief xcb_close_font_request_t **/ typedef struct xcb_close_font_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_font_t font; } xcb_close_font_request_t; typedef enum xcb_font_draw_t { XCB_FONT_DRAW_LEFT_TO_RIGHT = 0, XCB_FONT_DRAW_RIGHT_TO_LEFT = 1 } xcb_font_draw_t; /** * @brief xcb_fontprop_t **/ typedef struct xcb_fontprop_t { xcb_atom_t name; uint32_t value; } xcb_fontprop_t; /** * @brief xcb_fontprop_iterator_t **/ typedef struct xcb_fontprop_iterator_t { xcb_fontprop_t *data; int rem; int index; } xcb_fontprop_iterator_t; /** * @brief xcb_charinfo_t **/ typedef struct xcb_charinfo_t { int16_t left_side_bearing; int16_t right_side_bearing; int16_t character_width; int16_t ascent; int16_t descent; uint16_t attributes; } xcb_charinfo_t; /** * @brief xcb_charinfo_iterator_t **/ typedef struct xcb_charinfo_iterator_t { xcb_charinfo_t *data; int rem; int index; } xcb_charinfo_iterator_t; /** * @brief xcb_query_font_cookie_t **/ typedef struct xcb_query_font_cookie_t { unsigned int sequence; } xcb_query_font_cookie_t; /** Opcode for xcb_query_font. */ #define XCB_QUERY_FONT 47 /** * @brief xcb_query_font_request_t **/ typedef struct xcb_query_font_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_fontable_t font; } xcb_query_font_request_t; /** * @brief xcb_query_font_reply_t **/ typedef struct xcb_query_font_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_charinfo_t min_bounds; uint8_t pad1[4]; xcb_charinfo_t max_bounds; uint8_t pad2[4]; uint16_t min_char_or_byte2; uint16_t max_char_or_byte2; uint16_t default_char; uint16_t properties_len; uint8_t draw_direction; uint8_t min_byte1; uint8_t max_byte1; uint8_t all_chars_exist; int16_t font_ascent; int16_t font_descent; uint32_t char_infos_len; } xcb_query_font_reply_t; /** * @brief xcb_query_text_extents_cookie_t **/ typedef struct xcb_query_text_extents_cookie_t { unsigned int sequence; } xcb_query_text_extents_cookie_t; /** Opcode for xcb_query_text_extents. */ #define XCB_QUERY_TEXT_EXTENTS 48 /** * @brief xcb_query_text_extents_request_t **/ typedef struct xcb_query_text_extents_request_t { uint8_t major_opcode; uint8_t odd_length; uint16_t length; xcb_fontable_t font; } xcb_query_text_extents_request_t; /** * @brief xcb_query_text_extents_reply_t **/ typedef struct xcb_query_text_extents_reply_t { uint8_t response_type; uint8_t draw_direction; uint16_t sequence; uint32_t length; int16_t font_ascent; int16_t font_descent; int16_t overall_ascent; int16_t overall_descent; int32_t overall_width; int32_t overall_left; int32_t overall_right; } xcb_query_text_extents_reply_t; /** * @brief xcb_str_t **/ typedef struct xcb_str_t { uint8_t name_len; } xcb_str_t; /** * @brief xcb_str_iterator_t **/ typedef struct xcb_str_iterator_t { xcb_str_t *data; int rem; int index; } xcb_str_iterator_t; /** * @brief xcb_list_fonts_cookie_t **/ typedef struct xcb_list_fonts_cookie_t { unsigned int sequence; } xcb_list_fonts_cookie_t; /** Opcode for xcb_list_fonts. */ #define XCB_LIST_FONTS 49 /** * @brief xcb_list_fonts_request_t **/ typedef struct xcb_list_fonts_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; uint16_t max_names; uint16_t pattern_len; } xcb_list_fonts_request_t; /** * @brief xcb_list_fonts_reply_t **/ typedef struct xcb_list_fonts_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t names_len; uint8_t pad1[22]; } xcb_list_fonts_reply_t; /** * @brief xcb_list_fonts_with_info_cookie_t **/ typedef struct xcb_list_fonts_with_info_cookie_t { unsigned int sequence; } xcb_list_fonts_with_info_cookie_t; /** Opcode for xcb_list_fonts_with_info. */ #define XCB_LIST_FONTS_WITH_INFO 50 /** * @brief xcb_list_fonts_with_info_request_t **/ typedef struct xcb_list_fonts_with_info_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; uint16_t max_names; uint16_t pattern_len; } xcb_list_fonts_with_info_request_t; /** * @brief xcb_list_fonts_with_info_reply_t **/ typedef struct xcb_list_fonts_with_info_reply_t { uint8_t response_type; uint8_t name_len; uint16_t sequence; uint32_t length; xcb_charinfo_t min_bounds; uint8_t pad0[4]; xcb_charinfo_t max_bounds; uint8_t pad1[4]; uint16_t min_char_or_byte2; uint16_t max_char_or_byte2; uint16_t default_char; uint16_t properties_len; uint8_t draw_direction; uint8_t min_byte1; uint8_t max_byte1; uint8_t all_chars_exist; int16_t font_ascent; int16_t font_descent; uint32_t replies_hint; } xcb_list_fonts_with_info_reply_t; /** Opcode for xcb_set_font_path. */ #define XCB_SET_FONT_PATH 51 /** * @brief xcb_set_font_path_request_t **/ typedef struct xcb_set_font_path_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; uint16_t font_qty; uint8_t pad1[2]; } xcb_set_font_path_request_t; /** * @brief xcb_get_font_path_cookie_t **/ typedef struct xcb_get_font_path_cookie_t { unsigned int sequence; } xcb_get_font_path_cookie_t; /** Opcode for xcb_get_font_path. */ #define XCB_GET_FONT_PATH 52 /** * @brief xcb_get_font_path_request_t **/ typedef struct xcb_get_font_path_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_get_font_path_request_t; /** * @brief xcb_get_font_path_reply_t **/ typedef struct xcb_get_font_path_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t path_len; uint8_t pad1[22]; } xcb_get_font_path_reply_t; /** Opcode for xcb_create_pixmap. */ #define XCB_CREATE_PIXMAP 53 /** * @brief xcb_create_pixmap_request_t **/ typedef struct xcb_create_pixmap_request_t { uint8_t major_opcode; uint8_t depth; uint16_t length; xcb_pixmap_t pid; xcb_drawable_t drawable; uint16_t width; uint16_t height; } xcb_create_pixmap_request_t; /** Opcode for xcb_free_pixmap. */ #define XCB_FREE_PIXMAP 54 /** * @brief xcb_free_pixmap_request_t **/ typedef struct xcb_free_pixmap_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_pixmap_t pixmap; } xcb_free_pixmap_request_t; typedef enum xcb_gc_t { XCB_GC_FUNCTION = 1, /**< TODO: Refer to GX */ XCB_GC_PLANE_MASK = 2, /**< In graphics operations, given a source and destination pixel, the result is computed bitwise on corresponding bits of the pixels; that is, a Boolean operation is performed in each bit plane. The plane-mask restricts the operation to a subset of planes, so the result is: ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask)) */ XCB_GC_FOREGROUND = 4, /**< Foreground colorpixel. */ XCB_GC_BACKGROUND = 8, /**< Background colorpixel. */ XCB_GC_LINE_WIDTH = 16, /**< The line-width is measured in pixels and can be greater than or equal to one, a wide line, or the special value zero, a thin line. */ XCB_GC_LINE_STYLE = 32, /**< The line-style defines which sections of a line are drawn: Solid The full path of the line is drawn. DoubleDash The full path of the line is drawn, but the even dashes are filled differently than the odd dashes (see fill-style), with Butt cap-style used where even and odd dashes meet. OnOffDash Only the even dashes are drawn, and cap-style applies to all internal ends of the individual dashes (except NotLast is treated as Butt). */ XCB_GC_CAP_STYLE = 64, /**< The cap-style defines how the endpoints of a path are drawn: NotLast The result is equivalent to Butt, except that for a line-width of zero the final endpoint is not drawn. Butt The result is square at the endpoint (perpendicular to the slope of the line) with no projection beyond. Round The result is a circular arc with its diameter equal to the line-width, centered on the endpoint; it is equivalent to Butt for line-width zero. Projecting The result is square at the end, but the path continues beyond the endpoint for a distance equal to half the line-width; it is equivalent to Butt for line-width zero. */ XCB_GC_JOIN_STYLE = 128, /**< The join-style defines how corners are drawn for wide lines: Miter The outer edges of the two lines extend to meet at an angle. However, if the angle is less than 11 degrees, a Bevel join-style is used instead. Round The result is a circular arc with a diameter equal to the line-width, centered on the joinpoint. Bevel The result is Butt endpoint styles, and then the triangular notch is filled. */ XCB_GC_FILL_STYLE = 256, /**< The fill-style defines the contents of the source for line, text, and fill requests. For all text and fill requests (for example, PolyText8, PolyText16, PolyFillRectangle, FillPoly, and PolyFillArc) as well as for line requests with line-style Solid, (for example, PolyLine, PolySegment, PolyRectangle, PolyArc) and for the even dashes for line requests with line-style OnOffDash or DoubleDash: Solid Foreground Tiled Tile OpaqueStippled A tile with the same width and height as stipple but with background everywhere stipple has a zero and with foreground everywhere stipple has a one Stippled Foreground masked by stipple For the odd dashes for line requests with line-style DoubleDash: Solid Background Tiled Same as for even dashes OpaqueStippled Same as for even dashes Stippled Background masked by stipple */ XCB_GC_FILL_RULE = 512, /**< */ XCB_GC_TILE = 1024, /**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all dimensions. When that plane is superimposed on the drawable for use in a graphics operation, the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the origin of whatever destination drawable is specified in a graphics request. The tile pixmap must have the same root and depth as the gcontext (or a Match error results). The stipple pixmap must have depth one and must have the same root as the gcontext (or a Match error results). For fill-style Stippled (but not fill-style OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an additional clip mask to be ANDed with the clip-mask. Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than others. */ XCB_GC_STIPPLE = 2048, /**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all dimensions. When that plane is superimposed on the drawable for use in a graphics operation, the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the origin of whatever destination drawable is specified in a graphics request. The tile pixmap must have the same root and depth as the gcontext (or a Match error results). The stipple pixmap must have depth one and must have the same root as the gcontext (or a Match error results). For fill-style Stippled (but not fill-style OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an additional clip mask to be ANDed with the clip-mask. Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than others. */ XCB_GC_TILE_STIPPLE_ORIGIN_X = 4096, /**< TODO */ XCB_GC_TILE_STIPPLE_ORIGIN_Y = 8192, /**< TODO */ XCB_GC_FONT = 16384, /**< Which font to use for the `ImageText8` and `ImageText16` requests. */ XCB_GC_SUBWINDOW_MODE = 32768, /**< For ClipByChildren, both source and destination windows are additionally clipped by all viewable InputOutput children. For IncludeInferiors, neither source nor destination window is clipped by inferiors. This will result in including subwindow contents in the source and drawing through subwindow boundaries of the destination. The use of IncludeInferiors with a source or destination window of one depth with mapped inferiors of differing depth is not illegal, but the semantics is undefined by the core protocol. */ XCB_GC_GRAPHICS_EXPOSURES = 65536, /**< Whether ExposureEvents should be generated (1) or not (0). The default is 1. */ XCB_GC_CLIP_ORIGIN_X = 131072, /**< TODO */ XCB_GC_CLIP_ORIGIN_Y = 262144, /**< TODO */ XCB_GC_CLIP_MASK = 524288, /**< The clip-mask restricts writes to the destination drawable. Only pixels where the clip-mask has bits set to 1 are drawn. Pixels are not drawn outside the area covered by the clip-mask or where the clip-mask has bits set to 0. The clip-mask affects all graphics requests, but it does not clip sources. The clip-mask origin is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. If a pixmap is specified as the clip-mask, it must have depth 1 and have the same root as the gcontext (or a Match error results). If clip-mask is None, then pixels are always drawn, regardless of the clip origin. The clip-mask can also be set with the SetClipRectangles request. */ XCB_GC_DASH_OFFSET = 1048576, /**< TODO */ XCB_GC_DASH_LIST = 2097152, /**< TODO */ XCB_GC_ARC_MODE = 4194304 /**< TODO */ } xcb_gc_t; typedef enum xcb_gx_t { XCB_GX_CLEAR = 0, XCB_GX_AND = 1, XCB_GX_AND_REVERSE = 2, XCB_GX_COPY = 3, XCB_GX_AND_INVERTED = 4, XCB_GX_NOOP = 5, XCB_GX_XOR = 6, XCB_GX_OR = 7, XCB_GX_NOR = 8, XCB_GX_EQUIV = 9, XCB_GX_INVERT = 10, XCB_GX_OR_REVERSE = 11, XCB_GX_COPY_INVERTED = 12, XCB_GX_OR_INVERTED = 13, XCB_GX_NAND = 14, XCB_GX_SET = 15 } xcb_gx_t; typedef enum xcb_line_style_t { XCB_LINE_STYLE_SOLID = 0, XCB_LINE_STYLE_ON_OFF_DASH = 1, XCB_LINE_STYLE_DOUBLE_DASH = 2 } xcb_line_style_t; typedef enum xcb_cap_style_t { XCB_CAP_STYLE_NOT_LAST = 0, XCB_CAP_STYLE_BUTT = 1, XCB_CAP_STYLE_ROUND = 2, XCB_CAP_STYLE_PROJECTING = 3 } xcb_cap_style_t; typedef enum xcb_join_style_t { XCB_JOIN_STYLE_MITER = 0, XCB_JOIN_STYLE_ROUND = 1, XCB_JOIN_STYLE_BEVEL = 2 } xcb_join_style_t; typedef enum xcb_fill_style_t { XCB_FILL_STYLE_SOLID = 0, XCB_FILL_STYLE_TILED = 1, XCB_FILL_STYLE_STIPPLED = 2, XCB_FILL_STYLE_OPAQUE_STIPPLED = 3 } xcb_fill_style_t; typedef enum xcb_fill_rule_t { XCB_FILL_RULE_EVEN_ODD = 0, XCB_FILL_RULE_WINDING = 1 } xcb_fill_rule_t; typedef enum xcb_subwindow_mode_t { XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN = 0, XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS = 1 } xcb_subwindow_mode_t; typedef enum xcb_arc_mode_t { XCB_ARC_MODE_CHORD = 0, XCB_ARC_MODE_PIE_SLICE = 1 } xcb_arc_mode_t; /** * @brief xcb_create_gc_value_list_t **/ typedef struct xcb_create_gc_value_list_t { uint32_t function; uint32_t plane_mask; uint32_t foreground; uint32_t background; uint32_t line_width; uint32_t line_style; uint32_t cap_style; uint32_t join_style; uint32_t fill_style; uint32_t fill_rule; xcb_pixmap_t tile; xcb_pixmap_t stipple; int32_t tile_stipple_x_origin; int32_t tile_stipple_y_origin; xcb_font_t font; uint32_t subwindow_mode; xcb_bool32_t graphics_exposures; int32_t clip_x_origin; int32_t clip_y_origin; xcb_pixmap_t clip_mask; uint32_t dash_offset; uint32_t dashes; uint32_t arc_mode; } xcb_create_gc_value_list_t; /** Opcode for xcb_create_gc. */ #define XCB_CREATE_GC 55 /** * @brief xcb_create_gc_request_t **/ typedef struct xcb_create_gc_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_gcontext_t cid; xcb_drawable_t drawable; uint32_t value_mask; } xcb_create_gc_request_t; /** * @brief xcb_change_gc_value_list_t **/ typedef struct xcb_change_gc_value_list_t { uint32_t function; uint32_t plane_mask; uint32_t foreground; uint32_t background; uint32_t line_width; uint32_t line_style; uint32_t cap_style; uint32_t join_style; uint32_t fill_style; uint32_t fill_rule; xcb_pixmap_t tile; xcb_pixmap_t stipple; int32_t tile_stipple_x_origin; int32_t tile_stipple_y_origin; xcb_font_t font; uint32_t subwindow_mode; xcb_bool32_t graphics_exposures; int32_t clip_x_origin; int32_t clip_y_origin; xcb_pixmap_t clip_mask; uint32_t dash_offset; uint32_t dashes; uint32_t arc_mode; } xcb_change_gc_value_list_t; /** Opcode for xcb_change_gc. */ #define XCB_CHANGE_GC 56 /** * @brief xcb_change_gc_request_t **/ typedef struct xcb_change_gc_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_gcontext_t gc; uint32_t value_mask; } xcb_change_gc_request_t; /** Opcode for xcb_copy_gc. */ #define XCB_COPY_GC 57 /** * @brief xcb_copy_gc_request_t **/ typedef struct xcb_copy_gc_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_gcontext_t src_gc; xcb_gcontext_t dst_gc; uint32_t value_mask; } xcb_copy_gc_request_t; /** Opcode for xcb_set_dashes. */ #define XCB_SET_DASHES 58 /** * @brief xcb_set_dashes_request_t **/ typedef struct xcb_set_dashes_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_gcontext_t gc; uint16_t dash_offset; uint16_t dashes_len; } xcb_set_dashes_request_t; typedef enum xcb_clip_ordering_t { XCB_CLIP_ORDERING_UNSORTED = 0, XCB_CLIP_ORDERING_Y_SORTED = 1, XCB_CLIP_ORDERING_YX_SORTED = 2, XCB_CLIP_ORDERING_YX_BANDED = 3 } xcb_clip_ordering_t; /** Opcode for xcb_set_clip_rectangles. */ #define XCB_SET_CLIP_RECTANGLES 59 /** * @brief xcb_set_clip_rectangles_request_t **/ typedef struct xcb_set_clip_rectangles_request_t { uint8_t major_opcode; uint8_t ordering; uint16_t length; xcb_gcontext_t gc; int16_t clip_x_origin; int16_t clip_y_origin; } xcb_set_clip_rectangles_request_t; /** Opcode for xcb_free_gc. */ #define XCB_FREE_GC 60 /** * @brief xcb_free_gc_request_t **/ typedef struct xcb_free_gc_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_gcontext_t gc; } xcb_free_gc_request_t; /** Opcode for xcb_clear_area. */ #define XCB_CLEAR_AREA 61 /** * @brief xcb_clear_area_request_t **/ typedef struct xcb_clear_area_request_t { uint8_t major_opcode; uint8_t exposures; uint16_t length; xcb_window_t window; int16_t x; int16_t y; uint16_t width; uint16_t height; } xcb_clear_area_request_t; /** Opcode for xcb_copy_area. */ #define XCB_COPY_AREA 62 /** * @brief xcb_copy_area_request_t **/ typedef struct xcb_copy_area_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t src_drawable; xcb_drawable_t dst_drawable; xcb_gcontext_t gc; int16_t src_x; int16_t src_y; int16_t dst_x; int16_t dst_y; uint16_t width; uint16_t height; } xcb_copy_area_request_t; /** Opcode for xcb_copy_plane. */ #define XCB_COPY_PLANE 63 /** * @brief xcb_copy_plane_request_t **/ typedef struct xcb_copy_plane_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t src_drawable; xcb_drawable_t dst_drawable; xcb_gcontext_t gc; int16_t src_x; int16_t src_y; int16_t dst_x; int16_t dst_y; uint16_t width; uint16_t height; uint32_t bit_plane; } xcb_copy_plane_request_t; typedef enum xcb_coord_mode_t { XCB_COORD_MODE_ORIGIN = 0, /**< Treats all coordinates as relative to the origin. */ XCB_COORD_MODE_PREVIOUS = 1 /**< Treats all coordinates after the first as relative to the previous coordinate. */ } xcb_coord_mode_t; /** Opcode for xcb_poly_point. */ #define XCB_POLY_POINT 64 /** * @brief xcb_poly_point_request_t **/ typedef struct xcb_poly_point_request_t { uint8_t major_opcode; uint8_t coordinate_mode; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; } xcb_poly_point_request_t; /** Opcode for xcb_poly_line. */ #define XCB_POLY_LINE 65 /** * @brief xcb_poly_line_request_t **/ typedef struct xcb_poly_line_request_t { uint8_t major_opcode; uint8_t coordinate_mode; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; } xcb_poly_line_request_t; /** * @brief xcb_segment_t **/ typedef struct xcb_segment_t { int16_t x1; int16_t y1; int16_t x2; int16_t y2; } xcb_segment_t; /** * @brief xcb_segment_iterator_t **/ typedef struct xcb_segment_iterator_t { xcb_segment_t *data; int rem; int index; } xcb_segment_iterator_t; /** Opcode for xcb_poly_segment. */ #define XCB_POLY_SEGMENT 66 /** * @brief xcb_poly_segment_request_t **/ typedef struct xcb_poly_segment_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; } xcb_poly_segment_request_t; /** Opcode for xcb_poly_rectangle. */ #define XCB_POLY_RECTANGLE 67 /** * @brief xcb_poly_rectangle_request_t **/ typedef struct xcb_poly_rectangle_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; } xcb_poly_rectangle_request_t; /** Opcode for xcb_poly_arc. */ #define XCB_POLY_ARC 68 /** * @brief xcb_poly_arc_request_t **/ typedef struct xcb_poly_arc_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; } xcb_poly_arc_request_t; typedef enum xcb_poly_shape_t { XCB_POLY_SHAPE_COMPLEX = 0, XCB_POLY_SHAPE_NONCONVEX = 1, XCB_POLY_SHAPE_CONVEX = 2 } xcb_poly_shape_t; /** Opcode for xcb_fill_poly. */ #define XCB_FILL_POLY 69 /** * @brief xcb_fill_poly_request_t **/ typedef struct xcb_fill_poly_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; uint8_t shape; uint8_t coordinate_mode; uint8_t pad1[2]; } xcb_fill_poly_request_t; /** Opcode for xcb_poly_fill_rectangle. */ #define XCB_POLY_FILL_RECTANGLE 70 /** * @brief xcb_poly_fill_rectangle_request_t **/ typedef struct xcb_poly_fill_rectangle_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; } xcb_poly_fill_rectangle_request_t; /** Opcode for xcb_poly_fill_arc. */ #define XCB_POLY_FILL_ARC 71 /** * @brief xcb_poly_fill_arc_request_t **/ typedef struct xcb_poly_fill_arc_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; } xcb_poly_fill_arc_request_t; typedef enum xcb_image_format_t { XCB_IMAGE_FORMAT_XY_BITMAP = 0, XCB_IMAGE_FORMAT_XY_PIXMAP = 1, XCB_IMAGE_FORMAT_Z_PIXMAP = 2 } xcb_image_format_t; /** Opcode for xcb_put_image. */ #define XCB_PUT_IMAGE 72 /** * @brief xcb_put_image_request_t **/ typedef struct xcb_put_image_request_t { uint8_t major_opcode; uint8_t format; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; uint16_t width; uint16_t height; int16_t dst_x; int16_t dst_y; uint8_t left_pad; uint8_t depth; uint8_t pad0[2]; } xcb_put_image_request_t; /** * @brief xcb_get_image_cookie_t **/ typedef struct xcb_get_image_cookie_t { unsigned int sequence; } xcb_get_image_cookie_t; /** Opcode for xcb_get_image. */ #define XCB_GET_IMAGE 73 /** * @brief xcb_get_image_request_t **/ typedef struct xcb_get_image_request_t { uint8_t major_opcode; uint8_t format; uint16_t length; xcb_drawable_t drawable; int16_t x; int16_t y; uint16_t width; uint16_t height; uint32_t plane_mask; } xcb_get_image_request_t; /** * @brief xcb_get_image_reply_t **/ typedef struct xcb_get_image_reply_t { uint8_t response_type; uint8_t depth; uint16_t sequence; uint32_t length; xcb_visualid_t visual; uint8_t pad0[20]; } xcb_get_image_reply_t; /** Opcode for xcb_poly_text_8. */ #define XCB_POLY_TEXT_8 74 /** * @brief xcb_poly_text_8_request_t **/ typedef struct xcb_poly_text_8_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t x; int16_t y; } xcb_poly_text_8_request_t; /** Opcode for xcb_poly_text_16. */ #define XCB_POLY_TEXT_16 75 /** * @brief xcb_poly_text_16_request_t **/ typedef struct xcb_poly_text_16_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t x; int16_t y; } xcb_poly_text_16_request_t; /** Opcode for xcb_image_text_8. */ #define XCB_IMAGE_TEXT_8 76 /** * @brief xcb_image_text_8_request_t **/ typedef struct xcb_image_text_8_request_t { uint8_t major_opcode; uint8_t string_len; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t x; int16_t y; } xcb_image_text_8_request_t; /** Opcode for xcb_image_text_16. */ #define XCB_IMAGE_TEXT_16 77 /** * @brief xcb_image_text_16_request_t **/ typedef struct xcb_image_text_16_request_t { uint8_t major_opcode; uint8_t string_len; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t x; int16_t y; } xcb_image_text_16_request_t; typedef enum xcb_colormap_alloc_t { XCB_COLORMAP_ALLOC_NONE = 0, XCB_COLORMAP_ALLOC_ALL = 1 } xcb_colormap_alloc_t; /** Opcode for xcb_create_colormap. */ #define XCB_CREATE_COLORMAP 78 /** * @brief xcb_create_colormap_request_t **/ typedef struct xcb_create_colormap_request_t { uint8_t major_opcode; uint8_t alloc; uint16_t length; xcb_colormap_t mid; xcb_window_t window; xcb_visualid_t visual; } xcb_create_colormap_request_t; /** Opcode for xcb_free_colormap. */ #define XCB_FREE_COLORMAP 79 /** * @brief xcb_free_colormap_request_t **/ typedef struct xcb_free_colormap_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; } xcb_free_colormap_request_t; /** Opcode for xcb_copy_colormap_and_free. */ #define XCB_COPY_COLORMAP_AND_FREE 80 /** * @brief xcb_copy_colormap_and_free_request_t **/ typedef struct xcb_copy_colormap_and_free_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t mid; xcb_colormap_t src_cmap; } xcb_copy_colormap_and_free_request_t; /** Opcode for xcb_install_colormap. */ #define XCB_INSTALL_COLORMAP 81 /** * @brief xcb_install_colormap_request_t **/ typedef struct xcb_install_colormap_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; } xcb_install_colormap_request_t; /** Opcode for xcb_uninstall_colormap. */ #define XCB_UNINSTALL_COLORMAP 82 /** * @brief xcb_uninstall_colormap_request_t **/ typedef struct xcb_uninstall_colormap_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; } xcb_uninstall_colormap_request_t; /** * @brief xcb_list_installed_colormaps_cookie_t **/ typedef struct xcb_list_installed_colormaps_cookie_t { unsigned int sequence; } xcb_list_installed_colormaps_cookie_t; /** Opcode for xcb_list_installed_colormaps. */ #define XCB_LIST_INSTALLED_COLORMAPS 83 /** * @brief xcb_list_installed_colormaps_request_t **/ typedef struct xcb_list_installed_colormaps_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; } xcb_list_installed_colormaps_request_t; /** * @brief xcb_list_installed_colormaps_reply_t **/ typedef struct xcb_list_installed_colormaps_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t cmaps_len; uint8_t pad1[22]; } xcb_list_installed_colormaps_reply_t; /** * @brief xcb_alloc_color_cookie_t **/ typedef struct xcb_alloc_color_cookie_t { unsigned int sequence; } xcb_alloc_color_cookie_t; /** Opcode for xcb_alloc_color. */ #define XCB_ALLOC_COLOR 84 /** * @brief xcb_alloc_color_request_t **/ typedef struct xcb_alloc_color_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; uint16_t red; uint16_t green; uint16_t blue; uint8_t pad1[2]; } xcb_alloc_color_request_t; /** * @brief xcb_alloc_color_reply_t **/ typedef struct xcb_alloc_color_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t red; uint16_t green; uint16_t blue; uint8_t pad1[2]; uint32_t pixel; } xcb_alloc_color_reply_t; /** * @brief xcb_alloc_named_color_cookie_t **/ typedef struct xcb_alloc_named_color_cookie_t { unsigned int sequence; } xcb_alloc_named_color_cookie_t; /** Opcode for xcb_alloc_named_color. */ #define XCB_ALLOC_NAMED_COLOR 85 /** * @brief xcb_alloc_named_color_request_t **/ typedef struct xcb_alloc_named_color_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; uint16_t name_len; uint8_t pad1[2]; } xcb_alloc_named_color_request_t; /** * @brief xcb_alloc_named_color_reply_t **/ typedef struct xcb_alloc_named_color_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t pixel; uint16_t exact_red; uint16_t exact_green; uint16_t exact_blue; uint16_t visual_red; uint16_t visual_green; uint16_t visual_blue; } xcb_alloc_named_color_reply_t; /** * @brief xcb_alloc_color_cells_cookie_t **/ typedef struct xcb_alloc_color_cells_cookie_t { unsigned int sequence; } xcb_alloc_color_cells_cookie_t; /** Opcode for xcb_alloc_color_cells. */ #define XCB_ALLOC_COLOR_CELLS 86 /** * @brief xcb_alloc_color_cells_request_t **/ typedef struct xcb_alloc_color_cells_request_t { uint8_t major_opcode; uint8_t contiguous; uint16_t length; xcb_colormap_t cmap; uint16_t colors; uint16_t planes; } xcb_alloc_color_cells_request_t; /** * @brief xcb_alloc_color_cells_reply_t **/ typedef struct xcb_alloc_color_cells_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t pixels_len; uint16_t masks_len; uint8_t pad1[20]; } xcb_alloc_color_cells_reply_t; /** * @brief xcb_alloc_color_planes_cookie_t **/ typedef struct xcb_alloc_color_planes_cookie_t { unsigned int sequence; } xcb_alloc_color_planes_cookie_t; /** Opcode for xcb_alloc_color_planes. */ #define XCB_ALLOC_COLOR_PLANES 87 /** * @brief xcb_alloc_color_planes_request_t **/ typedef struct xcb_alloc_color_planes_request_t { uint8_t major_opcode; uint8_t contiguous; uint16_t length; xcb_colormap_t cmap; uint16_t colors; uint16_t reds; uint16_t greens; uint16_t blues; } xcb_alloc_color_planes_request_t; /** * @brief xcb_alloc_color_planes_reply_t **/ typedef struct xcb_alloc_color_planes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t pixels_len; uint8_t pad1[2]; uint32_t red_mask; uint32_t green_mask; uint32_t blue_mask; uint8_t pad2[8]; } xcb_alloc_color_planes_reply_t; /** Opcode for xcb_free_colors. */ #define XCB_FREE_COLORS 88 /** * @brief xcb_free_colors_request_t **/ typedef struct xcb_free_colors_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; uint32_t plane_mask; } xcb_free_colors_request_t; typedef enum xcb_color_flag_t { XCB_COLOR_FLAG_RED = 1, XCB_COLOR_FLAG_GREEN = 2, XCB_COLOR_FLAG_BLUE = 4 } xcb_color_flag_t; /** * @brief xcb_coloritem_t **/ typedef struct xcb_coloritem_t { uint32_t pixel; uint16_t red; uint16_t green; uint16_t blue; uint8_t flags; uint8_t pad0; } xcb_coloritem_t; /** * @brief xcb_coloritem_iterator_t **/ typedef struct xcb_coloritem_iterator_t { xcb_coloritem_t *data; int rem; int index; } xcb_coloritem_iterator_t; /** Opcode for xcb_store_colors. */ #define XCB_STORE_COLORS 89 /** * @brief xcb_store_colors_request_t **/ typedef struct xcb_store_colors_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; } xcb_store_colors_request_t; /** Opcode for xcb_store_named_color. */ #define XCB_STORE_NAMED_COLOR 90 /** * @brief xcb_store_named_color_request_t **/ typedef struct xcb_store_named_color_request_t { uint8_t major_opcode; uint8_t flags; uint16_t length; xcb_colormap_t cmap; uint32_t pixel; uint16_t name_len; uint8_t pad0[2]; } xcb_store_named_color_request_t; /** * @brief xcb_rgb_t **/ typedef struct xcb_rgb_t { uint16_t red; uint16_t green; uint16_t blue; uint8_t pad0[2]; } xcb_rgb_t; /** * @brief xcb_rgb_iterator_t **/ typedef struct xcb_rgb_iterator_t { xcb_rgb_t *data; int rem; int index; } xcb_rgb_iterator_t; /** * @brief xcb_query_colors_cookie_t **/ typedef struct xcb_query_colors_cookie_t { unsigned int sequence; } xcb_query_colors_cookie_t; /** Opcode for xcb_query_colors. */ #define XCB_QUERY_COLORS 91 /** * @brief xcb_query_colors_request_t **/ typedef struct xcb_query_colors_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; } xcb_query_colors_request_t; /** * @brief xcb_query_colors_reply_t **/ typedef struct xcb_query_colors_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t colors_len; uint8_t pad1[22]; } xcb_query_colors_reply_t; /** * @brief xcb_lookup_color_cookie_t **/ typedef struct xcb_lookup_color_cookie_t { unsigned int sequence; } xcb_lookup_color_cookie_t; /** Opcode for xcb_lookup_color. */ #define XCB_LOOKUP_COLOR 92 /** * @brief xcb_lookup_color_request_t **/ typedef struct xcb_lookup_color_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_colormap_t cmap; uint16_t name_len; uint8_t pad1[2]; } xcb_lookup_color_request_t; /** * @brief xcb_lookup_color_reply_t **/ typedef struct xcb_lookup_color_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t exact_red; uint16_t exact_green; uint16_t exact_blue; uint16_t visual_red; uint16_t visual_green; uint16_t visual_blue; } xcb_lookup_color_reply_t; typedef enum xcb_pixmap_enum_t { XCB_PIXMAP_NONE = 0 } xcb_pixmap_enum_t; /** Opcode for xcb_create_cursor. */ #define XCB_CREATE_CURSOR 93 /** * @brief xcb_create_cursor_request_t **/ typedef struct xcb_create_cursor_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_cursor_t cid; xcb_pixmap_t source; xcb_pixmap_t mask; uint16_t fore_red; uint16_t fore_green; uint16_t fore_blue; uint16_t back_red; uint16_t back_green; uint16_t back_blue; uint16_t x; uint16_t y; } xcb_create_cursor_request_t; typedef enum xcb_font_enum_t { XCB_FONT_NONE = 0 } xcb_font_enum_t; /** Opcode for xcb_create_glyph_cursor. */ #define XCB_CREATE_GLYPH_CURSOR 94 /** * @brief xcb_create_glyph_cursor_request_t **/ typedef struct xcb_create_glyph_cursor_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_cursor_t cid; xcb_font_t source_font; xcb_font_t mask_font; uint16_t source_char; uint16_t mask_char; uint16_t fore_red; uint16_t fore_green; uint16_t fore_blue; uint16_t back_red; uint16_t back_green; uint16_t back_blue; } xcb_create_glyph_cursor_request_t; /** Opcode for xcb_free_cursor. */ #define XCB_FREE_CURSOR 95 /** * @brief xcb_free_cursor_request_t **/ typedef struct xcb_free_cursor_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_cursor_t cursor; } xcb_free_cursor_request_t; /** Opcode for xcb_recolor_cursor. */ #define XCB_RECOLOR_CURSOR 96 /** * @brief xcb_recolor_cursor_request_t **/ typedef struct xcb_recolor_cursor_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_cursor_t cursor; uint16_t fore_red; uint16_t fore_green; uint16_t fore_blue; uint16_t back_red; uint16_t back_green; uint16_t back_blue; } xcb_recolor_cursor_request_t; typedef enum xcb_query_shape_of_t { XCB_QUERY_SHAPE_OF_LARGEST_CURSOR = 0, XCB_QUERY_SHAPE_OF_FASTEST_TILE = 1, XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE = 2 } xcb_query_shape_of_t; /** * @brief xcb_query_best_size_cookie_t **/ typedef struct xcb_query_best_size_cookie_t { unsigned int sequence; } xcb_query_best_size_cookie_t; /** Opcode for xcb_query_best_size. */ #define XCB_QUERY_BEST_SIZE 97 /** * @brief xcb_query_best_size_request_t **/ typedef struct xcb_query_best_size_request_t { uint8_t major_opcode; uint8_t _class; uint16_t length; xcb_drawable_t drawable; uint16_t width; uint16_t height; } xcb_query_best_size_request_t; /** * @brief xcb_query_best_size_reply_t **/ typedef struct xcb_query_best_size_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t width; uint16_t height; } xcb_query_best_size_reply_t; /** * @brief xcb_query_extension_cookie_t **/ typedef struct xcb_query_extension_cookie_t { unsigned int sequence; } xcb_query_extension_cookie_t; /** Opcode for xcb_query_extension. */ #define XCB_QUERY_EXTENSION 98 /** * @brief xcb_query_extension_request_t **/ typedef struct xcb_query_extension_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; uint16_t name_len; uint8_t pad1[2]; } xcb_query_extension_request_t; /** * @brief xcb_query_extension_reply_t **/ typedef struct xcb_query_extension_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t present; uint8_t major_opcode; uint8_t first_event; uint8_t first_error; } xcb_query_extension_reply_t; /** * @brief xcb_list_extensions_cookie_t **/ typedef struct xcb_list_extensions_cookie_t { unsigned int sequence; } xcb_list_extensions_cookie_t; /** Opcode for xcb_list_extensions. */ #define XCB_LIST_EXTENSIONS 99 /** * @brief xcb_list_extensions_request_t **/ typedef struct xcb_list_extensions_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_list_extensions_request_t; /** * @brief xcb_list_extensions_reply_t **/ typedef struct xcb_list_extensions_reply_t { uint8_t response_type; uint8_t names_len; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_list_extensions_reply_t; /** Opcode for xcb_change_keyboard_mapping. */ #define XCB_CHANGE_KEYBOARD_MAPPING 100 /** * @brief xcb_change_keyboard_mapping_request_t **/ typedef struct xcb_change_keyboard_mapping_request_t { uint8_t major_opcode; uint8_t keycode_count; uint16_t length; xcb_keycode_t first_keycode; uint8_t keysyms_per_keycode; uint8_t pad0[2]; } xcb_change_keyboard_mapping_request_t; /** * @brief xcb_get_keyboard_mapping_cookie_t **/ typedef struct xcb_get_keyboard_mapping_cookie_t { unsigned int sequence; } xcb_get_keyboard_mapping_cookie_t; /** Opcode for xcb_get_keyboard_mapping. */ #define XCB_GET_KEYBOARD_MAPPING 101 /** * @brief xcb_get_keyboard_mapping_request_t **/ typedef struct xcb_get_keyboard_mapping_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_keycode_t first_keycode; uint8_t count; } xcb_get_keyboard_mapping_request_t; /** * @brief xcb_get_keyboard_mapping_reply_t **/ typedef struct xcb_get_keyboard_mapping_reply_t { uint8_t response_type; uint8_t keysyms_per_keycode; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_get_keyboard_mapping_reply_t; typedef enum xcb_kb_t { XCB_KB_KEY_CLICK_PERCENT = 1, XCB_KB_BELL_PERCENT = 2, XCB_KB_BELL_PITCH = 4, XCB_KB_BELL_DURATION = 8, XCB_KB_LED = 16, XCB_KB_LED_MODE = 32, XCB_KB_KEY = 64, XCB_KB_AUTO_REPEAT_MODE = 128 } xcb_kb_t; typedef enum xcb_led_mode_t { XCB_LED_MODE_OFF = 0, XCB_LED_MODE_ON = 1 } xcb_led_mode_t; typedef enum xcb_auto_repeat_mode_t { XCB_AUTO_REPEAT_MODE_OFF = 0, XCB_AUTO_REPEAT_MODE_ON = 1, XCB_AUTO_REPEAT_MODE_DEFAULT = 2 } xcb_auto_repeat_mode_t; /** * @brief xcb_change_keyboard_control_value_list_t **/ typedef struct xcb_change_keyboard_control_value_list_t { int32_t key_click_percent; int32_t bell_percent; int32_t bell_pitch; int32_t bell_duration; uint32_t led; uint32_t led_mode; xcb_keycode32_t key; uint32_t auto_repeat_mode; } xcb_change_keyboard_control_value_list_t; /** Opcode for xcb_change_keyboard_control. */ #define XCB_CHANGE_KEYBOARD_CONTROL 102 /** * @brief xcb_change_keyboard_control_request_t **/ typedef struct xcb_change_keyboard_control_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; uint32_t value_mask; } xcb_change_keyboard_control_request_t; /** * @brief xcb_get_keyboard_control_cookie_t **/ typedef struct xcb_get_keyboard_control_cookie_t { unsigned int sequence; } xcb_get_keyboard_control_cookie_t; /** Opcode for xcb_get_keyboard_control. */ #define XCB_GET_KEYBOARD_CONTROL 103 /** * @brief xcb_get_keyboard_control_request_t **/ typedef struct xcb_get_keyboard_control_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_get_keyboard_control_request_t; /** * @brief xcb_get_keyboard_control_reply_t **/ typedef struct xcb_get_keyboard_control_reply_t { uint8_t response_type; uint8_t global_auto_repeat; uint16_t sequence; uint32_t length; uint32_t led_mask; uint8_t key_click_percent; uint8_t bell_percent; uint16_t bell_pitch; uint16_t bell_duration; uint8_t pad0[2]; uint8_t auto_repeats[32]; } xcb_get_keyboard_control_reply_t; /** Opcode for xcb_bell. */ #define XCB_BELL 104 /** * @brief xcb_bell_request_t **/ typedef struct xcb_bell_request_t { uint8_t major_opcode; int8_t percent; uint16_t length; } xcb_bell_request_t; /** Opcode for xcb_change_pointer_control. */ #define XCB_CHANGE_POINTER_CONTROL 105 /** * @brief xcb_change_pointer_control_request_t **/ typedef struct xcb_change_pointer_control_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; int16_t acceleration_numerator; int16_t acceleration_denominator; int16_t threshold; uint8_t do_acceleration; uint8_t do_threshold; } xcb_change_pointer_control_request_t; /** * @brief xcb_get_pointer_control_cookie_t **/ typedef struct xcb_get_pointer_control_cookie_t { unsigned int sequence; } xcb_get_pointer_control_cookie_t; /** Opcode for xcb_get_pointer_control. */ #define XCB_GET_POINTER_CONTROL 106 /** * @brief xcb_get_pointer_control_request_t **/ typedef struct xcb_get_pointer_control_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_get_pointer_control_request_t; /** * @brief xcb_get_pointer_control_reply_t **/ typedef struct xcb_get_pointer_control_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t acceleration_numerator; uint16_t acceleration_denominator; uint16_t threshold; uint8_t pad1[18]; } xcb_get_pointer_control_reply_t; typedef enum xcb_blanking_t { XCB_BLANKING_NOT_PREFERRED = 0, XCB_BLANKING_PREFERRED = 1, XCB_BLANKING_DEFAULT = 2 } xcb_blanking_t; typedef enum xcb_exposures_t { XCB_EXPOSURES_NOT_ALLOWED = 0, XCB_EXPOSURES_ALLOWED = 1, XCB_EXPOSURES_DEFAULT = 2 } xcb_exposures_t; /** Opcode for xcb_set_screen_saver. */ #define XCB_SET_SCREEN_SAVER 107 /** * @brief xcb_set_screen_saver_request_t **/ typedef struct xcb_set_screen_saver_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; int16_t timeout; int16_t interval; uint8_t prefer_blanking; uint8_t allow_exposures; } xcb_set_screen_saver_request_t; /** * @brief xcb_get_screen_saver_cookie_t **/ typedef struct xcb_get_screen_saver_cookie_t { unsigned int sequence; } xcb_get_screen_saver_cookie_t; /** Opcode for xcb_get_screen_saver. */ #define XCB_GET_SCREEN_SAVER 108 /** * @brief xcb_get_screen_saver_request_t **/ typedef struct xcb_get_screen_saver_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_get_screen_saver_request_t; /** * @brief xcb_get_screen_saver_reply_t **/ typedef struct xcb_get_screen_saver_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t timeout; uint16_t interval; uint8_t prefer_blanking; uint8_t allow_exposures; uint8_t pad1[18]; } xcb_get_screen_saver_reply_t; typedef enum xcb_host_mode_t { XCB_HOST_MODE_INSERT = 0, XCB_HOST_MODE_DELETE = 1 } xcb_host_mode_t; typedef enum xcb_family_t { XCB_FAMILY_INTERNET = 0, XCB_FAMILY_DECNET = 1, XCB_FAMILY_CHAOS = 2, XCB_FAMILY_SERVER_INTERPRETED = 5, XCB_FAMILY_INTERNET_6 = 6 } xcb_family_t; /** Opcode for xcb_change_hosts. */ #define XCB_CHANGE_HOSTS 109 /** * @brief xcb_change_hosts_request_t **/ typedef struct xcb_change_hosts_request_t { uint8_t major_opcode; uint8_t mode; uint16_t length; uint8_t family; uint8_t pad0; uint16_t address_len; } xcb_change_hosts_request_t; /** * @brief xcb_host_t **/ typedef struct xcb_host_t { uint8_t family; uint8_t pad0; uint16_t address_len; } xcb_host_t; /** * @brief xcb_host_iterator_t **/ typedef struct xcb_host_iterator_t { xcb_host_t *data; int rem; int index; } xcb_host_iterator_t; /** * @brief xcb_list_hosts_cookie_t **/ typedef struct xcb_list_hosts_cookie_t { unsigned int sequence; } xcb_list_hosts_cookie_t; /** Opcode for xcb_list_hosts. */ #define XCB_LIST_HOSTS 110 /** * @brief xcb_list_hosts_request_t **/ typedef struct xcb_list_hosts_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_list_hosts_request_t; /** * @brief xcb_list_hosts_reply_t **/ typedef struct xcb_list_hosts_reply_t { uint8_t response_type; uint8_t mode; uint16_t sequence; uint32_t length; uint16_t hosts_len; uint8_t pad0[22]; } xcb_list_hosts_reply_t; typedef enum xcb_access_control_t { XCB_ACCESS_CONTROL_DISABLE = 0, XCB_ACCESS_CONTROL_ENABLE = 1 } xcb_access_control_t; /** Opcode for xcb_set_access_control. */ #define XCB_SET_ACCESS_CONTROL 111 /** * @brief xcb_set_access_control_request_t **/ typedef struct xcb_set_access_control_request_t { uint8_t major_opcode; uint8_t mode; uint16_t length; } xcb_set_access_control_request_t; typedef enum xcb_close_down_t { XCB_CLOSE_DOWN_DESTROY_ALL = 0, XCB_CLOSE_DOWN_RETAIN_PERMANENT = 1, XCB_CLOSE_DOWN_RETAIN_TEMPORARY = 2 } xcb_close_down_t; /** Opcode for xcb_set_close_down_mode. */ #define XCB_SET_CLOSE_DOWN_MODE 112 /** * @brief xcb_set_close_down_mode_request_t **/ typedef struct xcb_set_close_down_mode_request_t { uint8_t major_opcode; uint8_t mode; uint16_t length; } xcb_set_close_down_mode_request_t; typedef enum xcb_kill_t { XCB_KILL_ALL_TEMPORARY = 0 } xcb_kill_t; /** Opcode for xcb_kill_client. */ #define XCB_KILL_CLIENT 113 /** * @brief xcb_kill_client_request_t **/ typedef struct xcb_kill_client_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; uint32_t resource; } xcb_kill_client_request_t; /** Opcode for xcb_rotate_properties. */ #define XCB_ROTATE_PROPERTIES 114 /** * @brief xcb_rotate_properties_request_t **/ typedef struct xcb_rotate_properties_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; xcb_window_t window; uint16_t atoms_len; int16_t delta; } xcb_rotate_properties_request_t; typedef enum xcb_screen_saver_t { XCB_SCREEN_SAVER_RESET = 0, XCB_SCREEN_SAVER_ACTIVE = 1 } xcb_screen_saver_t; /** Opcode for xcb_force_screen_saver. */ #define XCB_FORCE_SCREEN_SAVER 115 /** * @brief xcb_force_screen_saver_request_t **/ typedef struct xcb_force_screen_saver_request_t { uint8_t major_opcode; uint8_t mode; uint16_t length; } xcb_force_screen_saver_request_t; typedef enum xcb_mapping_status_t { XCB_MAPPING_STATUS_SUCCESS = 0, XCB_MAPPING_STATUS_BUSY = 1, XCB_MAPPING_STATUS_FAILURE = 2 } xcb_mapping_status_t; /** * @brief xcb_set_pointer_mapping_cookie_t **/ typedef struct xcb_set_pointer_mapping_cookie_t { unsigned int sequence; } xcb_set_pointer_mapping_cookie_t; /** Opcode for xcb_set_pointer_mapping. */ #define XCB_SET_POINTER_MAPPING 116 /** * @brief xcb_set_pointer_mapping_request_t **/ typedef struct xcb_set_pointer_mapping_request_t { uint8_t major_opcode; uint8_t map_len; uint16_t length; } xcb_set_pointer_mapping_request_t; /** * @brief xcb_set_pointer_mapping_reply_t **/ typedef struct xcb_set_pointer_mapping_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; } xcb_set_pointer_mapping_reply_t; /** * @brief xcb_get_pointer_mapping_cookie_t **/ typedef struct xcb_get_pointer_mapping_cookie_t { unsigned int sequence; } xcb_get_pointer_mapping_cookie_t; /** Opcode for xcb_get_pointer_mapping. */ #define XCB_GET_POINTER_MAPPING 117 /** * @brief xcb_get_pointer_mapping_request_t **/ typedef struct xcb_get_pointer_mapping_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_get_pointer_mapping_request_t; /** * @brief xcb_get_pointer_mapping_reply_t **/ typedef struct xcb_get_pointer_mapping_reply_t { uint8_t response_type; uint8_t map_len; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_get_pointer_mapping_reply_t; typedef enum xcb_map_index_t { XCB_MAP_INDEX_SHIFT = 0, XCB_MAP_INDEX_LOCK = 1, XCB_MAP_INDEX_CONTROL = 2, XCB_MAP_INDEX_1 = 3, XCB_MAP_INDEX_2 = 4, XCB_MAP_INDEX_3 = 5, XCB_MAP_INDEX_4 = 6, XCB_MAP_INDEX_5 = 7 } xcb_map_index_t; /** * @brief xcb_set_modifier_mapping_cookie_t **/ typedef struct xcb_set_modifier_mapping_cookie_t { unsigned int sequence; } xcb_set_modifier_mapping_cookie_t; /** Opcode for xcb_set_modifier_mapping. */ #define XCB_SET_MODIFIER_MAPPING 118 /** * @brief xcb_set_modifier_mapping_request_t **/ typedef struct xcb_set_modifier_mapping_request_t { uint8_t major_opcode; uint8_t keycodes_per_modifier; uint16_t length; } xcb_set_modifier_mapping_request_t; /** * @brief xcb_set_modifier_mapping_reply_t **/ typedef struct xcb_set_modifier_mapping_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; } xcb_set_modifier_mapping_reply_t; /** * @brief xcb_get_modifier_mapping_cookie_t **/ typedef struct xcb_get_modifier_mapping_cookie_t { unsigned int sequence; } xcb_get_modifier_mapping_cookie_t; /** Opcode for xcb_get_modifier_mapping. */ #define XCB_GET_MODIFIER_MAPPING 119 /** * @brief xcb_get_modifier_mapping_request_t **/ typedef struct xcb_get_modifier_mapping_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_get_modifier_mapping_request_t; /** * @brief xcb_get_modifier_mapping_reply_t **/ typedef struct xcb_get_modifier_mapping_reply_t { uint8_t response_type; uint8_t keycodes_per_modifier; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_get_modifier_mapping_reply_t; /** Opcode for xcb_no_operation. */ #define XCB_NO_OPERATION 127 /** * @brief xcb_no_operation_request_t **/ typedef struct xcb_no_operation_request_t { uint8_t major_opcode; uint8_t pad0; uint16_t length; } xcb_no_operation_request_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_char2b_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_char2b_t) */ void xcb_char2b_next (xcb_char2b_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_char2b_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_char2b_end (xcb_char2b_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_window_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_window_t) */ void xcb_window_next (xcb_window_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_window_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_window_end (xcb_window_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_pixmap_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_pixmap_t) */ void xcb_pixmap_next (xcb_pixmap_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_pixmap_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_pixmap_end (xcb_pixmap_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_cursor_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_cursor_t) */ void xcb_cursor_next (xcb_cursor_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_cursor_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_cursor_end (xcb_cursor_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_font_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_font_t) */ void xcb_font_next (xcb_font_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_font_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_font_end (xcb_font_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_gcontext_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_gcontext_t) */ void xcb_gcontext_next (xcb_gcontext_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_gcontext_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_gcontext_end (xcb_gcontext_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_colormap_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_colormap_t) */ void xcb_colormap_next (xcb_colormap_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_colormap_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_colormap_end (xcb_colormap_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_atom_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_atom_t) */ void xcb_atom_next (xcb_atom_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_atom_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_atom_end (xcb_atom_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_drawable_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_drawable_t) */ void xcb_drawable_next (xcb_drawable_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_drawable_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_drawable_end (xcb_drawable_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_fontable_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_fontable_t) */ void xcb_fontable_next (xcb_fontable_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_fontable_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_fontable_end (xcb_fontable_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_bool32_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_bool32_t) */ void xcb_bool32_next (xcb_bool32_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_bool32_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_bool32_end (xcb_bool32_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_visualid_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_visualid_t) */ void xcb_visualid_next (xcb_visualid_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_visualid_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_visualid_end (xcb_visualid_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_timestamp_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_timestamp_t) */ void xcb_timestamp_next (xcb_timestamp_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_timestamp_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_timestamp_end (xcb_timestamp_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_keysym_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_keysym_t) */ void xcb_keysym_next (xcb_keysym_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_keysym_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_keysym_end (xcb_keysym_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_keycode_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_keycode_t) */ void xcb_keycode_next (xcb_keycode_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_keycode_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_keycode_end (xcb_keycode_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_keycode32_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_keycode32_t) */ void xcb_keycode32_next (xcb_keycode32_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_keycode32_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_keycode32_end (xcb_keycode32_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_button_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_button_t) */ void xcb_button_next (xcb_button_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_button_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_button_end (xcb_button_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_point_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_point_t) */ void xcb_point_next (xcb_point_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_point_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_point_end (xcb_point_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_rectangle_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_rectangle_t) */ void xcb_rectangle_next (xcb_rectangle_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_rectangle_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_rectangle_end (xcb_rectangle_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_arc_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_arc_t) */ void xcb_arc_next (xcb_arc_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_arc_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_arc_end (xcb_arc_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_format_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_format_t) */ void xcb_format_next (xcb_format_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_format_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_format_end (xcb_format_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_visualtype_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_visualtype_t) */ void xcb_visualtype_next (xcb_visualtype_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_visualtype_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_visualtype_end (xcb_visualtype_iterator_t i); int xcb_depth_sizeof (const void *_buffer); xcb_visualtype_t * xcb_depth_visuals (const xcb_depth_t *R); int xcb_depth_visuals_length (const xcb_depth_t *R); xcb_visualtype_iterator_t xcb_depth_visuals_iterator (const xcb_depth_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_depth_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_depth_t) */ void xcb_depth_next (xcb_depth_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_depth_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_depth_end (xcb_depth_iterator_t i); int xcb_screen_sizeof (const void *_buffer); int xcb_screen_allowed_depths_length (const xcb_screen_t *R); xcb_depth_iterator_t xcb_screen_allowed_depths_iterator (const xcb_screen_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_screen_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_screen_t) */ void xcb_screen_next (xcb_screen_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_screen_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_screen_end (xcb_screen_iterator_t i); int xcb_setup_request_sizeof (const void *_buffer); char * xcb_setup_request_authorization_protocol_name (const xcb_setup_request_t *R); int xcb_setup_request_authorization_protocol_name_length (const xcb_setup_request_t *R); xcb_generic_iterator_t xcb_setup_request_authorization_protocol_name_end (const xcb_setup_request_t *R); char * xcb_setup_request_authorization_protocol_data (const xcb_setup_request_t *R); int xcb_setup_request_authorization_protocol_data_length (const xcb_setup_request_t *R); xcb_generic_iterator_t xcb_setup_request_authorization_protocol_data_end (const xcb_setup_request_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_setup_request_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_setup_request_t) */ void xcb_setup_request_next (xcb_setup_request_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_setup_request_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_setup_request_end (xcb_setup_request_iterator_t i); int xcb_setup_failed_sizeof (const void *_buffer); char * xcb_setup_failed_reason (const xcb_setup_failed_t *R); int xcb_setup_failed_reason_length (const xcb_setup_failed_t *R); xcb_generic_iterator_t xcb_setup_failed_reason_end (const xcb_setup_failed_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_setup_failed_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_setup_failed_t) */ void xcb_setup_failed_next (xcb_setup_failed_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_setup_failed_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_setup_failed_end (xcb_setup_failed_iterator_t i); int xcb_setup_authenticate_sizeof (const void *_buffer); char * xcb_setup_authenticate_reason (const xcb_setup_authenticate_t *R); int xcb_setup_authenticate_reason_length (const xcb_setup_authenticate_t *R); xcb_generic_iterator_t xcb_setup_authenticate_reason_end (const xcb_setup_authenticate_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_setup_authenticate_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_setup_authenticate_t) */ void xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_setup_authenticate_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i); int xcb_setup_sizeof (const void *_buffer); char * xcb_setup_vendor (const xcb_setup_t *R); int xcb_setup_vendor_length (const xcb_setup_t *R); xcb_generic_iterator_t xcb_setup_vendor_end (const xcb_setup_t *R); xcb_format_t * xcb_setup_pixmap_formats (const xcb_setup_t *R); int xcb_setup_pixmap_formats_length (const xcb_setup_t *R); xcb_format_iterator_t xcb_setup_pixmap_formats_iterator (const xcb_setup_t *R); int xcb_setup_roots_length (const xcb_setup_t *R); xcb_screen_iterator_t xcb_setup_roots_iterator (const xcb_setup_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_setup_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_setup_t) */ void xcb_setup_next (xcb_setup_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_setup_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_setup_end (xcb_setup_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_client_message_data_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_client_message_data_t) */ void xcb_client_message_data_next (xcb_client_message_data_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_client_message_data_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_client_message_data_end (xcb_client_message_data_iterator_t i); int xcb_create_window_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_create_window_value_list_t *_aux); int xcb_create_window_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_create_window_value_list_t *_aux); int xcb_create_window_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_create_window_sizeof (const void *_buffer); /** * @brief Creates a window * * @param c The connection * @param depth Specifies the new window's depth (TODO: what unit?). * \n * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the * \a parent window. * @param wid The ID with which you will refer to the new window, created by * `xcb_generate_id`. * @param parent The parent window of the new window. * @param x The X coordinate of the new window. * @param y The Y coordinate of the new window. * @param width The width of the new window. * @param height The height of the new window. * @param border_width TODO: * \n * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. * @param _class A bitmask of #xcb_window_class_t values. * @param _class \n * @param visual Specifies the id for the new window's visual. * \n * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the * \a parent window. * @param value_mask A bitmask of #xcb_cw_t values. * @return A cookie * * Creates an unmapped window as child of the specified \a parent window. A * CreateNotify event will be generated. The new window is placed on top in the * stacking order with respect to siblings. * * The coordinate system has the X axis horizontal and the Y axis vertical with * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms * of pixels, and coincide with pixel centers. Each window and pixmap has its own * coordinate system. For a window, the origin is inside the border at the inside, * upper-left corner. * * The created window is not yet displayed (mapped), call `xcb_map_window` to * display it. * * The created window will initially use the same cursor as its parent. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_window_checked (xcb_connection_t *c, uint8_t depth, xcb_window_t wid, xcb_window_t parent, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint16_t _class, xcb_visualid_t visual, uint32_t value_mask, const void *value_list); /** * @brief Creates a window * * @param c The connection * @param depth Specifies the new window's depth (TODO: what unit?). * \n * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the * \a parent window. * @param wid The ID with which you will refer to the new window, created by * `xcb_generate_id`. * @param parent The parent window of the new window. * @param x The X coordinate of the new window. * @param y The Y coordinate of the new window. * @param width The width of the new window. * @param height The height of the new window. * @param border_width TODO: * \n * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. * @param _class A bitmask of #xcb_window_class_t values. * @param _class \n * @param visual Specifies the id for the new window's visual. * \n * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the * \a parent window. * @param value_mask A bitmask of #xcb_cw_t values. * @return A cookie * * Creates an unmapped window as child of the specified \a parent window. A * CreateNotify event will be generated. The new window is placed on top in the * stacking order with respect to siblings. * * The coordinate system has the X axis horizontal and the Y axis vertical with * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms * of pixels, and coincide with pixel centers. Each window and pixmap has its own * coordinate system. For a window, the origin is inside the border at the inside, * upper-left corner. * * The created window is not yet displayed (mapped), call `xcb_map_window` to * display it. * * The created window will initially use the same cursor as its parent. * */ xcb_void_cookie_t xcb_create_window (xcb_connection_t *c, uint8_t depth, xcb_window_t wid, xcb_window_t parent, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint16_t _class, xcb_visualid_t visual, uint32_t value_mask, const void *value_list); /** * @brief Creates a window * * @param c The connection * @param depth Specifies the new window's depth (TODO: what unit?). * \n * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the * \a parent window. * @param wid The ID with which you will refer to the new window, created by * `xcb_generate_id`. * @param parent The parent window of the new window. * @param x The X coordinate of the new window. * @param y The Y coordinate of the new window. * @param width The width of the new window. * @param height The height of the new window. * @param border_width TODO: * \n * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. * @param _class A bitmask of #xcb_window_class_t values. * @param _class \n * @param visual Specifies the id for the new window's visual. * \n * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the * \a parent window. * @param value_mask A bitmask of #xcb_cw_t values. * @return A cookie * * Creates an unmapped window as child of the specified \a parent window. A * CreateNotify event will be generated. The new window is placed on top in the * stacking order with respect to siblings. * * The coordinate system has the X axis horizontal and the Y axis vertical with * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms * of pixels, and coincide with pixel centers. Each window and pixmap has its own * coordinate system. For a window, the origin is inside the border at the inside, * upper-left corner. * * The created window is not yet displayed (mapped), call `xcb_map_window` to * display it. * * The created window will initially use the same cursor as its parent. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_window_aux_checked (xcb_connection_t *c, uint8_t depth, xcb_window_t wid, xcb_window_t parent, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint16_t _class, xcb_visualid_t visual, uint32_t value_mask, const xcb_create_window_value_list_t *value_list); /** * @brief Creates a window * * @param c The connection * @param depth Specifies the new window's depth (TODO: what unit?). * \n * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the * \a parent window. * @param wid The ID with which you will refer to the new window, created by * `xcb_generate_id`. * @param parent The parent window of the new window. * @param x The X coordinate of the new window. * @param y The Y coordinate of the new window. * @param width The width of the new window. * @param height The height of the new window. * @param border_width TODO: * \n * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. * @param _class A bitmask of #xcb_window_class_t values. * @param _class \n * @param visual Specifies the id for the new window's visual. * \n * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the * \a parent window. * @param value_mask A bitmask of #xcb_cw_t values. * @return A cookie * * Creates an unmapped window as child of the specified \a parent window. A * CreateNotify event will be generated. The new window is placed on top in the * stacking order with respect to siblings. * * The coordinate system has the X axis horizontal and the Y axis vertical with * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms * of pixels, and coincide with pixel centers. Each window and pixmap has its own * coordinate system. For a window, the origin is inside the border at the inside, * upper-left corner. * * The created window is not yet displayed (mapped), call `xcb_map_window` to * display it. * * The created window will initially use the same cursor as its parent. * */ xcb_void_cookie_t xcb_create_window_aux (xcb_connection_t *c, uint8_t depth, xcb_window_t wid, xcb_window_t parent, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint16_t _class, xcb_visualid_t visual, uint32_t value_mask, const xcb_create_window_value_list_t *value_list); void * xcb_create_window_value_list (const xcb_create_window_request_t *R); int xcb_change_window_attributes_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_change_window_attributes_value_list_t *_aux); int xcb_change_window_attributes_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_change_window_attributes_value_list_t *_aux); int xcb_change_window_attributes_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_change_window_attributes_sizeof (const void *_buffer); /** * @brief change window attributes * * @param c The connection * @param window The window to change. * @param value_mask A bitmask of #xcb_cw_t values. * @param value_mask \n * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the attributes specified by \a value_mask for the specified \a window. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_window_attributes_checked (xcb_connection_t *c, xcb_window_t window, uint32_t value_mask, const void *value_list); /** * @brief change window attributes * * @param c The connection * @param window The window to change. * @param value_mask A bitmask of #xcb_cw_t values. * @param value_mask \n * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the attributes specified by \a value_mask for the specified \a window. * */ xcb_void_cookie_t xcb_change_window_attributes (xcb_connection_t *c, xcb_window_t window, uint32_t value_mask, const void *value_list); /** * @brief change window attributes * * @param c The connection * @param window The window to change. * @param value_mask A bitmask of #xcb_cw_t values. * @param value_mask \n * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the attributes specified by \a value_mask for the specified \a window. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_window_attributes_aux_checked (xcb_connection_t *c, xcb_window_t window, uint32_t value_mask, const xcb_change_window_attributes_value_list_t *value_list); /** * @brief change window attributes * * @param c The connection * @param window The window to change. * @param value_mask A bitmask of #xcb_cw_t values. * @param value_mask \n * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the attributes specified by \a value_mask for the specified \a window. * */ xcb_void_cookie_t xcb_change_window_attributes_aux (xcb_connection_t *c, xcb_window_t window, uint32_t value_mask, const xcb_change_window_attributes_value_list_t *value_list); void * xcb_change_window_attributes_value_list (const xcb_change_window_attributes_request_t *R); /** * @brief Gets window attributes * * @param c The connection * @param window The window to get the attributes from. * @return A cookie * * Gets the current attributes for the specified \a window. * */ xcb_get_window_attributes_cookie_t xcb_get_window_attributes (xcb_connection_t *c, xcb_window_t window); /** * @brief Gets window attributes * * @param c The connection * @param window The window to get the attributes from. * @return A cookie * * Gets the current attributes for the specified \a window. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_window_attributes_cookie_t xcb_get_window_attributes_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_window_attributes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_window_attributes_reply_t * xcb_get_window_attributes_reply (xcb_connection_t *c, xcb_get_window_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * @brief Destroys a window * * @param c The connection * @param window The window to destroy. * @return A cookie * * Destroys the specified window and all of its subwindows. A DestroyNotify event * is generated for each destroyed window (a DestroyNotify event is first generated * for any given window's inferiors). If the window was mapped, it will be * automatically unmapped before destroying. * * Calling DestroyWindow on the root window will do nothing. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_destroy_window_checked (xcb_connection_t *c, xcb_window_t window); /** * @brief Destroys a window * * @param c The connection * @param window The window to destroy. * @return A cookie * * Destroys the specified window and all of its subwindows. A DestroyNotify event * is generated for each destroyed window (a DestroyNotify event is first generated * for any given window's inferiors). If the window was mapped, it will be * automatically unmapped before destroying. * * Calling DestroyWindow on the root window will do nothing. * */ xcb_void_cookie_t xcb_destroy_window (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_destroy_subwindows_checked (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_destroy_subwindows (xcb_connection_t *c, xcb_window_t window); /** * @brief Changes a client's save set * * @param c The connection * @param mode A bitmask of #xcb_set_mode_t values. * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set. * @param window The window to add or delete to/from your save set. * @return A cookie * * TODO: explain what the save set is for. * * This function either adds or removes the specified window to the client's (your * application's) save set. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_save_set_checked (xcb_connection_t *c, uint8_t mode, xcb_window_t window); /** * @brief Changes a client's save set * * @param c The connection * @param mode A bitmask of #xcb_set_mode_t values. * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set. * @param window The window to add or delete to/from your save set. * @return A cookie * * TODO: explain what the save set is for. * * This function either adds or removes the specified window to the client's (your * application's) save set. * */ xcb_void_cookie_t xcb_change_save_set (xcb_connection_t *c, uint8_t mode, xcb_window_t window); /** * @brief Reparents a window * * @param c The connection * @param window The window to reparent. * @param parent The new parent of the window. * @param x The X position of the window within its new parent. * @param y The Y position of the window within its new parent. * @return A cookie * * Makes the specified window a child of the specified parent window. If the * window is mapped, it will automatically be unmapped before reparenting and * re-mapped after reparenting. The window is placed in the stacking order on top * with respect to sibling windows. * * After reparenting, a ReparentNotify event is generated. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_reparent_window_checked (xcb_connection_t *c, xcb_window_t window, xcb_window_t parent, int16_t x, int16_t y); /** * @brief Reparents a window * * @param c The connection * @param window The window to reparent. * @param parent The new parent of the window. * @param x The X position of the window within its new parent. * @param y The Y position of the window within its new parent. * @return A cookie * * Makes the specified window a child of the specified parent window. If the * window is mapped, it will automatically be unmapped before reparenting and * re-mapped after reparenting. The window is placed in the stacking order on top * with respect to sibling windows. * * After reparenting, a ReparentNotify event is generated. * */ xcb_void_cookie_t xcb_reparent_window (xcb_connection_t *c, xcb_window_t window, xcb_window_t parent, int16_t x, int16_t y); /** * @brief Makes a window visible * * @param c The connection * @param window The window to make visible. * @return A cookie * * Maps the specified window. This means making the window visible (as long as its * parent is visible). * * This MapWindow request will be translated to a MapRequest request if a window * manager is running. The window manager then decides to either map the window or * not. Set the override-redirect window attribute to true if you want to bypass * this mechanism. * * If the window manager decides to map the window (or if no window manager is * running), a MapNotify event is generated. * * If the window becomes viewable and no earlier contents for it are remembered, * the X server tiles the window with its background. If the window's background * is undefined, the existing screen contents are not altered, and the X server * generates zero or more Expose events. * * If the window type is InputOutput, an Expose event will be generated when the * window becomes visible. The normal response to an Expose event should be to * repaint the window. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_map_window_checked (xcb_connection_t *c, xcb_window_t window); /** * @brief Makes a window visible * * @param c The connection * @param window The window to make visible. * @return A cookie * * Maps the specified window. This means making the window visible (as long as its * parent is visible). * * This MapWindow request will be translated to a MapRequest request if a window * manager is running. The window manager then decides to either map the window or * not. Set the override-redirect window attribute to true if you want to bypass * this mechanism. * * If the window manager decides to map the window (or if no window manager is * running), a MapNotify event is generated. * * If the window becomes viewable and no earlier contents for it are remembered, * the X server tiles the window with its background. If the window's background * is undefined, the existing screen contents are not altered, and the X server * generates zero or more Expose events. * * If the window type is InputOutput, an Expose event will be generated when the * window becomes visible. The normal response to an Expose event should be to * repaint the window. * */ xcb_void_cookie_t xcb_map_window (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_map_subwindows_checked (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_map_subwindows (xcb_connection_t *c, xcb_window_t window); /** * @brief Makes a window invisible * * @param c The connection * @param window The window to make invisible. * @return A cookie * * Unmaps the specified window. This means making the window invisible (and all * its child windows). * * Unmapping a window leads to the `UnmapNotify` event being generated. Also, * `Expose` events are generated for formerly obscured windows. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_unmap_window_checked (xcb_connection_t *c, xcb_window_t window); /** * @brief Makes a window invisible * * @param c The connection * @param window The window to make invisible. * @return A cookie * * Unmaps the specified window. This means making the window invisible (and all * its child windows). * * Unmapping a window leads to the `UnmapNotify` event being generated. Also, * `Expose` events are generated for formerly obscured windows. * */ xcb_void_cookie_t xcb_unmap_window (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_unmap_subwindows_checked (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_unmap_subwindows (xcb_connection_t *c, xcb_window_t window); int xcb_configure_window_value_list_serialize (void **_buffer, uint16_t value_mask, const xcb_configure_window_value_list_t *_aux); int xcb_configure_window_value_list_unpack (const void *_buffer, uint16_t value_mask, xcb_configure_window_value_list_t *_aux); int xcb_configure_window_value_list_sizeof (const void *_buffer, uint16_t value_mask); int xcb_configure_window_sizeof (const void *_buffer); /** * @brief Configures window attributes * * @param c The connection * @param window The window to configure. * @param value_mask Bitmask of attributes to change. * @param value_list New values, corresponding to the attributes in value_mask. The order has to * correspond to the order of possible \a value_mask bits. See the example. * @return A cookie * * Configures a window's size, position, border width and stacking order. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_configure_window_checked (xcb_connection_t *c, xcb_window_t window, uint16_t value_mask, const void *value_list); /** * @brief Configures window attributes * * @param c The connection * @param window The window to configure. * @param value_mask Bitmask of attributes to change. * @param value_list New values, corresponding to the attributes in value_mask. The order has to * correspond to the order of possible \a value_mask bits. See the example. * @return A cookie * * Configures a window's size, position, border width and stacking order. * */ xcb_void_cookie_t xcb_configure_window (xcb_connection_t *c, xcb_window_t window, uint16_t value_mask, const void *value_list); /** * @brief Configures window attributes * * @param c The connection * @param window The window to configure. * @param value_mask Bitmask of attributes to change. * @param value_list New values, corresponding to the attributes in value_mask. The order has to * correspond to the order of possible \a value_mask bits. See the example. * @return A cookie * * Configures a window's size, position, border width and stacking order. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_configure_window_aux_checked (xcb_connection_t *c, xcb_window_t window, uint16_t value_mask, const xcb_configure_window_value_list_t *value_list); /** * @brief Configures window attributes * * @param c The connection * @param window The window to configure. * @param value_mask Bitmask of attributes to change. * @param value_list New values, corresponding to the attributes in value_mask. The order has to * correspond to the order of possible \a value_mask bits. See the example. * @return A cookie * * Configures a window's size, position, border width and stacking order. * */ xcb_void_cookie_t xcb_configure_window_aux (xcb_connection_t *c, xcb_window_t window, uint16_t value_mask, const xcb_configure_window_value_list_t *value_list); void * xcb_configure_window_value_list (const xcb_configure_window_request_t *R); /** * @brief Change window stacking order * * @param c The connection * @param direction A bitmask of #xcb_circulate_t values. * @param direction \n * @param window The window to raise/lower (depending on \a direction). * @return A cookie * * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if * any) will be raised to the top of the stack. * * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will * be lowered to the bottom of the stack. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_circulate_window_checked (xcb_connection_t *c, uint8_t direction, xcb_window_t window); /** * @brief Change window stacking order * * @param c The connection * @param direction A bitmask of #xcb_circulate_t values. * @param direction \n * @param window The window to raise/lower (depending on \a direction). * @return A cookie * * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if * any) will be raised to the top of the stack. * * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will * be lowered to the bottom of the stack. * */ xcb_void_cookie_t xcb_circulate_window (xcb_connection_t *c, uint8_t direction, xcb_window_t window); /** * @brief Get current window geometry * * @param c The connection * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received. * @return A cookie * * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`). * */ xcb_get_geometry_cookie_t xcb_get_geometry (xcb_connection_t *c, xcb_drawable_t drawable); /** * @brief Get current window geometry * * @param c The connection * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received. * @return A cookie * * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`). * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_geometry_cookie_t xcb_get_geometry_unchecked (xcb_connection_t *c, xcb_drawable_t drawable); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_geometry_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_geometry_reply_t * xcb_get_geometry_reply (xcb_connection_t *c, xcb_get_geometry_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_query_tree_sizeof (const void *_buffer); /** * @brief query the window tree * * @param c The connection * @param window The \a window to query. * @return A cookie * * Gets the root window ID, parent window ID and list of children windows for the * specified \a window. The children are listed in bottom-to-top stacking order. * */ xcb_query_tree_cookie_t xcb_query_tree (xcb_connection_t *c, xcb_window_t window); /** * @brief query the window tree * * @param c The connection * @param window The \a window to query. * @return A cookie * * Gets the root window ID, parent window ID and list of children windows for the * specified \a window. The children are listed in bottom-to-top stacking order. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_tree_cookie_t xcb_query_tree_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_window_t * xcb_query_tree_children (const xcb_query_tree_reply_t *R); int xcb_query_tree_children_length (const xcb_query_tree_reply_t *R); xcb_generic_iterator_t xcb_query_tree_children_end (const xcb_query_tree_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_tree_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_tree_reply_t * xcb_query_tree_reply (xcb_connection_t *c, xcb_query_tree_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_intern_atom_sizeof (const void *_buffer); /** * @brief Get atom identifier by name * * @param c The connection * @param only_if_exists Return a valid atom id only if the atom already exists. * @param name_len The length of the following \a name. * @param name The name of the atom. * @return A cookie * * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified * name. Atoms are used in protocols like EWMH, for example to store window titles * (`_NET_WM_NAME` atom) as property of a window. * * If \a only_if_exists is 0, the atom will be created if it does not already exist. * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does * not yet exist. * */ xcb_intern_atom_cookie_t xcb_intern_atom (xcb_connection_t *c, uint8_t only_if_exists, uint16_t name_len, const char *name); /** * @brief Get atom identifier by name * * @param c The connection * @param only_if_exists Return a valid atom id only if the atom already exists. * @param name_len The length of the following \a name. * @param name The name of the atom. * @return A cookie * * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified * name. Atoms are used in protocols like EWMH, for example to store window titles * (`_NET_WM_NAME` atom) as property of a window. * * If \a only_if_exists is 0, the atom will be created if it does not already exist. * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does * not yet exist. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_intern_atom_cookie_t xcb_intern_atom_unchecked (xcb_connection_t *c, uint8_t only_if_exists, uint16_t name_len, const char *name); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_intern_atom_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_intern_atom_reply_t * xcb_intern_atom_reply (xcb_connection_t *c, xcb_intern_atom_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_get_atom_name_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_atom_name_cookie_t xcb_get_atom_name (xcb_connection_t *c, xcb_atom_t atom); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_atom_name_cookie_t xcb_get_atom_name_unchecked (xcb_connection_t *c, xcb_atom_t atom); char * xcb_get_atom_name_name (const xcb_get_atom_name_reply_t *R); int xcb_get_atom_name_name_length (const xcb_get_atom_name_reply_t *R); xcb_generic_iterator_t xcb_get_atom_name_name_end (const xcb_get_atom_name_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_atom_name_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_atom_name_reply_t * xcb_get_atom_name_reply (xcb_connection_t *c, xcb_get_atom_name_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_change_property_sizeof (const void *_buffer); /** * @brief Changes a window property * * @param c The connection * @param mode A bitmask of #xcb_prop_mode_t values. * @param mode \n * @param window The window whose property you want to change. * @param property The property you want to change (an atom). * @param type The type of the property you want to change (an atom). * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or * 32-bit quantities. Possible values are 8, 16 and 32. This information allows * the X server to correctly perform byte-swap operations as necessary. * @param data_len Specifies the number of elements (see \a format). * @param data The property data. * @return A cookie * * Sets or updates a property on the specified \a window. Properties are for * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). * Protocols such as EWMH also use properties - for example EWMH defines the * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_property_checked (xcb_connection_t *c, uint8_t mode, xcb_window_t window, xcb_atom_t property, xcb_atom_t type, uint8_t format, uint32_t data_len, const void *data); /** * @brief Changes a window property * * @param c The connection * @param mode A bitmask of #xcb_prop_mode_t values. * @param mode \n * @param window The window whose property you want to change. * @param property The property you want to change (an atom). * @param type The type of the property you want to change (an atom). * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or * 32-bit quantities. Possible values are 8, 16 and 32. This information allows * the X server to correctly perform byte-swap operations as necessary. * @param data_len Specifies the number of elements (see \a format). * @param data The property data. * @return A cookie * * Sets or updates a property on the specified \a window. Properties are for * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). * Protocols such as EWMH also use properties - for example EWMH defines the * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. * */ xcb_void_cookie_t xcb_change_property (xcb_connection_t *c, uint8_t mode, xcb_window_t window, xcb_atom_t property, xcb_atom_t type, uint8_t format, uint32_t data_len, const void *data); void * xcb_change_property_data (const xcb_change_property_request_t *R); int xcb_change_property_data_length (const xcb_change_property_request_t *R); xcb_generic_iterator_t xcb_change_property_data_end (const xcb_change_property_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_delete_property_checked (xcb_connection_t *c, xcb_window_t window, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_delete_property (xcb_connection_t *c, xcb_window_t window, xcb_atom_t property); int xcb_get_property_sizeof (const void *_buffer); /** * @brief Gets a window property * * @param c The connection * @param _delete Whether the property should actually be deleted. For deleting a property, the * specified \a type has to match the actual property type. * @param window The window whose property you want to get. * @param property The property you want to get (an atom). * @param type The type of the property you want to get (an atom). * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the * data is to be retrieved. * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you * set \a long_length to 4, you will receive 16 bytes of data). * @return A cookie * * Gets the specified \a property from the specified \a window. Properties are for * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). * Protocols such as EWMH also use properties - for example EWMH defines the * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. * * TODO: talk about \a type * * TODO: talk about `delete` * * TODO: talk about the offset/length thing. what's a valid use case? * */ xcb_get_property_cookie_t xcb_get_property (xcb_connection_t *c, uint8_t _delete, xcb_window_t window, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length); /** * @brief Gets a window property * * @param c The connection * @param _delete Whether the property should actually be deleted. For deleting a property, the * specified \a type has to match the actual property type. * @param window The window whose property you want to get. * @param property The property you want to get (an atom). * @param type The type of the property you want to get (an atom). * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the * data is to be retrieved. * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you * set \a long_length to 4, you will receive 16 bytes of data). * @return A cookie * * Gets the specified \a property from the specified \a window. Properties are for * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). * Protocols such as EWMH also use properties - for example EWMH defines the * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. * * TODO: talk about \a type * * TODO: talk about `delete` * * TODO: talk about the offset/length thing. what's a valid use case? * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_property_cookie_t xcb_get_property_unchecked (xcb_connection_t *c, uint8_t _delete, xcb_window_t window, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length); void * xcb_get_property_value (const xcb_get_property_reply_t *R); int xcb_get_property_value_length (const xcb_get_property_reply_t *R); xcb_generic_iterator_t xcb_get_property_value_end (const xcb_get_property_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_property_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_property_reply_t * xcb_get_property_reply (xcb_connection_t *c, xcb_get_property_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_list_properties_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_list_properties_cookie_t xcb_list_properties (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_list_properties_cookie_t xcb_list_properties_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_atom_t * xcb_list_properties_atoms (const xcb_list_properties_reply_t *R); int xcb_list_properties_atoms_length (const xcb_list_properties_reply_t *R); xcb_generic_iterator_t xcb_list_properties_atoms_end (const xcb_list_properties_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_list_properties_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_list_properties_reply_t * xcb_list_properties_reply (xcb_connection_t *c, xcb_list_properties_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * @brief Sets the owner of a selection * * @param c The connection * @param owner The new owner of the selection. * \n * The special value `XCB_NONE` means that the selection will have no owner. * @param selection The selection. * @param time Timestamp to avoid race conditions when running X over the network. * \n * The selection will not be changed if \a time is earlier than the current * last-change time of the \a selection or is later than the current X server time. * Otherwise, the last-change time is set to the specified time. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Makes `window` the owner of the selection \a selection and updates the * last-change time of the specified selection. * * TODO: briefly explain what a selection is. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_selection_owner_checked (xcb_connection_t *c, xcb_window_t owner, xcb_atom_t selection, xcb_timestamp_t time); /** * @brief Sets the owner of a selection * * @param c The connection * @param owner The new owner of the selection. * \n * The special value `XCB_NONE` means that the selection will have no owner. * @param selection The selection. * @param time Timestamp to avoid race conditions when running X over the network. * \n * The selection will not be changed if \a time is earlier than the current * last-change time of the \a selection or is later than the current X server time. * Otherwise, the last-change time is set to the specified time. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Makes `window` the owner of the selection \a selection and updates the * last-change time of the specified selection. * * TODO: briefly explain what a selection is. * */ xcb_void_cookie_t xcb_set_selection_owner (xcb_connection_t *c, xcb_window_t owner, xcb_atom_t selection, xcb_timestamp_t time); /** * @brief Gets the owner of a selection * * @param c The connection * @param selection The selection. * @return A cookie * * Gets the owner of the specified selection. * * TODO: briefly explain what a selection is. * */ xcb_get_selection_owner_cookie_t xcb_get_selection_owner (xcb_connection_t *c, xcb_atom_t selection); /** * @brief Gets the owner of a selection * * @param c The connection * @param selection The selection. * @return A cookie * * Gets the owner of the specified selection. * * TODO: briefly explain what a selection is. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_selection_owner_cookie_t xcb_get_selection_owner_unchecked (xcb_connection_t *c, xcb_atom_t selection); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_selection_owner_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_selection_owner_reply_t * xcb_get_selection_owner_reply (xcb_connection_t *c, xcb_get_selection_owner_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_convert_selection_checked (xcb_connection_t *c, xcb_window_t requestor, xcb_atom_t selection, xcb_atom_t target, xcb_atom_t property, xcb_timestamp_t time); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_convert_selection (xcb_connection_t *c, xcb_window_t requestor, xcb_atom_t selection, xcb_atom_t target, xcb_atom_t property, xcb_timestamp_t time); /** * @brief send an event * * @param c The connection * @param propagate If \a propagate is true and no clients have selected any event on \a destination, * the destination is replaced with the closest ancestor of \a destination for * which some client has selected a type in \a event_mask and for which no * intervening window has that type in its do-not-propagate-mask. If no such * window exists or if the window is an ancestor of the focus window and * `InputFocus` was originally specified as the destination, the event is not sent * to any clients. Otherwise, the event is reported to every client selecting on * the final destination any of the types specified in \a event_mask. * @param destination The window to send this event to. Every client which selects any event within * \a event_mask on \a destination will get the event. * \n * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window * that contains the mouse pointer. * \n * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which * has the keyboard focus. * @param event_mask Event_mask for determining which clients should receive the specified event. * See \a destination and \a propagate. * @param event The event to send to the specified \a destination. * @return A cookie * * Identifies the \a destination window, determines which clients should receive * the specified event and ignores any active grabs. * * The \a event must be one of the core events or an event defined by an extension, * so that the X server can correctly byte-swap the contents as necessary. The * contents of \a event are otherwise unaltered and unchecked except for the * `send_event` field which is forced to 'true'. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_send_event_checked (xcb_connection_t *c, uint8_t propagate, xcb_window_t destination, uint32_t event_mask, const char *event); /** * @brief send an event * * @param c The connection * @param propagate If \a propagate is true and no clients have selected any event on \a destination, * the destination is replaced with the closest ancestor of \a destination for * which some client has selected a type in \a event_mask and for which no * intervening window has that type in its do-not-propagate-mask. If no such * window exists or if the window is an ancestor of the focus window and * `InputFocus` was originally specified as the destination, the event is not sent * to any clients. Otherwise, the event is reported to every client selecting on * the final destination any of the types specified in \a event_mask. * @param destination The window to send this event to. Every client which selects any event within * \a event_mask on \a destination will get the event. * \n * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window * that contains the mouse pointer. * \n * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which * has the keyboard focus. * @param event_mask Event_mask for determining which clients should receive the specified event. * See \a destination and \a propagate. * @param event The event to send to the specified \a destination. * @return A cookie * * Identifies the \a destination window, determines which clients should receive * the specified event and ignores any active grabs. * * The \a event must be one of the core events or an event defined by an extension, * so that the X server can correctly byte-swap the contents as necessary. The * contents of \a event are otherwise unaltered and unchecked except for the * `send_event` field which is forced to 'true'. * */ xcb_void_cookie_t xcb_send_event (xcb_connection_t *c, uint8_t propagate, xcb_window_t destination, uint32_t event_mask, const char *event); /** * @brief Grab the pointer * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param event_mask Specifies which pointer events are reported to the client. * \n * TODO: which values? * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @param confine_to Specifies the window to confine the pointer in (the user will not be able to * move the pointer out of that window). * \n * The special value `XCB_NONE` means don't confine the pointer. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the * cursor. * @param time The time argument allows you to avoid certain circumstances that come up if * applications take a long time to respond or if there are long network delays. * Consider a situation where you have two applications, both of which normally * grab the pointer when clicked on. If both applications specify the timestamp * from the event, the second application may wake up faster and successfully grab * the pointer before the first application. The first application then will get * an indication that the other application grabbed the pointer before its request * was processed. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. * */ xcb_grab_pointer_cookie_t xcb_grab_pointer (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, uint16_t event_mask, uint8_t pointer_mode, uint8_t keyboard_mode, xcb_window_t confine_to, xcb_cursor_t cursor, xcb_timestamp_t time); /** * @brief Grab the pointer * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param event_mask Specifies which pointer events are reported to the client. * \n * TODO: which values? * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @param confine_to Specifies the window to confine the pointer in (the user will not be able to * move the pointer out of that window). * \n * The special value `XCB_NONE` means don't confine the pointer. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the * cursor. * @param time The time argument allows you to avoid certain circumstances that come up if * applications take a long time to respond or if there are long network delays. * Consider a situation where you have two applications, both of which normally * grab the pointer when clicked on. If both applications specify the timestamp * from the event, the second application may wake up faster and successfully grab * the pointer before the first application. The first application then will get * an indication that the other application grabbed the pointer before its request * was processed. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_grab_pointer_cookie_t xcb_grab_pointer_unchecked (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, uint16_t event_mask, uint8_t pointer_mode, uint8_t keyboard_mode, xcb_window_t confine_to, xcb_cursor_t cursor, xcb_timestamp_t time); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_grab_pointer_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_grab_pointer_reply_t * xcb_grab_pointer_reply (xcb_connection_t *c, xcb_grab_pointer_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * @brief release the pointer * * @param c The connection * @param time Timestamp to avoid race conditions when running X over the network. * \n * The pointer will not be released if \a time is earlier than the * last-pointer-grab time or later than the current X server time. * @return A cookie * * Releases the pointer and any queued events if you actively grabbed the pointer * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button * press. * * EnterNotify and LeaveNotify events are generated. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_ungrab_pointer_checked (xcb_connection_t *c, xcb_timestamp_t time); /** * @brief release the pointer * * @param c The connection * @param time Timestamp to avoid race conditions when running X over the network. * \n * The pointer will not be released if \a time is earlier than the * last-pointer-grab time or later than the current X server time. * @return A cookie * * Releases the pointer and any queued events if you actively grabbed the pointer * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button * press. * * EnterNotify and LeaveNotify events are generated. * */ xcb_void_cookie_t xcb_ungrab_pointer (xcb_connection_t *c, xcb_timestamp_t time); /** * @brief Grab pointer button(s) * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param event_mask Specifies which pointer events are reported to the client. * \n * TODO: which values? * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @param confine_to Specifies the window to confine the pointer in (the user will not be able to * move the pointer out of that window). * \n * The special value `XCB_NONE` means don't confine the pointer. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the * cursor. * @param button A bitmask of #xcb_button_index_t values. * @param button \n * @param modifiers The modifiers to grab. * \n * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all * possible modifier combinations. * @return A cookie * * This request establishes a passive grab. The pointer is actively grabbed as * described in GrabPointer, the last-pointer-grab time is set to the time at * which the button was pressed (as transmitted in the ButtonPress event), and the * ButtonPress event is reported if all of the following conditions are true: * * The pointer is not grabbed and the specified button is logically pressed when * the specified modifier keys are logically down, and no other buttons or * modifier keys are logically down. * * The grab-window contains the pointer. * * The confine-to window (if any) is viewable. * * A passive grab on the same button/key combination does not exist on any * ancestor of grab-window. * * The interpretation of the remaining arguments is the same as for GrabPointer. * The active grab is terminated automatically when the logical state of the * pointer has all buttons released, independent of the logical state of modifier * keys. Note that the logical state of a device (as seen by means of the * protocol) may lag the physical state if device event processing is frozen. This * request overrides all previous passive grabs by the same client on the same * button/key combinations on the same window. A modifier of AnyModifier is * equivalent to issuing the request for all possible modifier combinations * (including the combination of no modifiers). It is not required that all * specified modifiers have currently assigned keycodes. A button of AnyButton is * equivalent to issuing the request for all possible buttons. Otherwise, it is * not required that the button specified currently be assigned to a physical * button. * * An Access error is generated if some other client has already issued a * GrabButton request with the same button/key combination on the same window. * When using AnyModifier or AnyButton, the request fails completely (no grabs are * established), and an Access error is generated if there is a conflicting grab * for any combination. The request has no effect on an active grab. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_grab_button_checked (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, uint16_t event_mask, uint8_t pointer_mode, uint8_t keyboard_mode, xcb_window_t confine_to, xcb_cursor_t cursor, uint8_t button, uint16_t modifiers); /** * @brief Grab pointer button(s) * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param event_mask Specifies which pointer events are reported to the client. * \n * TODO: which values? * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @param confine_to Specifies the window to confine the pointer in (the user will not be able to * move the pointer out of that window). * \n * The special value `XCB_NONE` means don't confine the pointer. * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the * cursor. * @param button A bitmask of #xcb_button_index_t values. * @param button \n * @param modifiers The modifiers to grab. * \n * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all * possible modifier combinations. * @return A cookie * * This request establishes a passive grab. The pointer is actively grabbed as * described in GrabPointer, the last-pointer-grab time is set to the time at * which the button was pressed (as transmitted in the ButtonPress event), and the * ButtonPress event is reported if all of the following conditions are true: * * The pointer is not grabbed and the specified button is logically pressed when * the specified modifier keys are logically down, and no other buttons or * modifier keys are logically down. * * The grab-window contains the pointer. * * The confine-to window (if any) is viewable. * * A passive grab on the same button/key combination does not exist on any * ancestor of grab-window. * * The interpretation of the remaining arguments is the same as for GrabPointer. * The active grab is terminated automatically when the logical state of the * pointer has all buttons released, independent of the logical state of modifier * keys. Note that the logical state of a device (as seen by means of the * protocol) may lag the physical state if device event processing is frozen. This * request overrides all previous passive grabs by the same client on the same * button/key combinations on the same window. A modifier of AnyModifier is * equivalent to issuing the request for all possible modifier combinations * (including the combination of no modifiers). It is not required that all * specified modifiers have currently assigned keycodes. A button of AnyButton is * equivalent to issuing the request for all possible buttons. Otherwise, it is * not required that the button specified currently be assigned to a physical * button. * * An Access error is generated if some other client has already issued a * GrabButton request with the same button/key combination on the same window. * When using AnyModifier or AnyButton, the request fails completely (no grabs are * established), and an Access error is generated if there is a conflicting grab * for any combination. The request has no effect on an active grab. * */ xcb_void_cookie_t xcb_grab_button (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, uint16_t event_mask, uint8_t pointer_mode, uint8_t keyboard_mode, xcb_window_t confine_to, xcb_cursor_t cursor, uint8_t button, uint16_t modifiers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_ungrab_button_checked (xcb_connection_t *c, uint8_t button, xcb_window_t grab_window, uint16_t modifiers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_ungrab_button (xcb_connection_t *c, uint8_t button, xcb_window_t grab_window, uint16_t modifiers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_active_pointer_grab_checked (xcb_connection_t *c, xcb_cursor_t cursor, xcb_timestamp_t time, uint16_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_change_active_pointer_grab (xcb_connection_t *c, xcb_cursor_t cursor, xcb_timestamp_t time, uint16_t event_mask); /** * @brief Grab the keyboard * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param time Timestamp to avoid race conditions when running X over the network. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @return A cookie * * Actively grabs control of the keyboard and generates FocusIn and FocusOut * events. Further key events are reported only to the grabbing client. * * Any active keyboard grab by this client is overridden. If the keyboard is * actively grabbed by some other client, `AlreadyGrabbed` is returned. If * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard * is frozen by an active grab of another client, `GrabFrozen` is returned. If the * specified \a time is earlier than the last-keyboard-grab time or later than the * current X server time, `GrabInvalidTime` is returned. Otherwise, the * last-keyboard-grab time is set to the specified time. * */ xcb_grab_keyboard_cookie_t xcb_grab_keyboard (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, xcb_timestamp_t time, uint8_t pointer_mode, uint8_t keyboard_mode); /** * @brief Grab the keyboard * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param time Timestamp to avoid race conditions when running X over the network. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @return A cookie * * Actively grabs control of the keyboard and generates FocusIn and FocusOut * events. Further key events are reported only to the grabbing client. * * Any active keyboard grab by this client is overridden. If the keyboard is * actively grabbed by some other client, `AlreadyGrabbed` is returned. If * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard * is frozen by an active grab of another client, `GrabFrozen` is returned. If the * specified \a time is earlier than the last-keyboard-grab time or later than the * current X server time, `GrabInvalidTime` is returned. Otherwise, the * last-keyboard-grab time is set to the specified time. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_grab_keyboard_cookie_t xcb_grab_keyboard_unchecked (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, xcb_timestamp_t time, uint8_t pointer_mode, uint8_t keyboard_mode); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_grab_keyboard_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_grab_keyboard_reply_t * xcb_grab_keyboard_reply (xcb_connection_t *c, xcb_grab_keyboard_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_ungrab_keyboard_checked (xcb_connection_t *c, xcb_timestamp_t time); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_ungrab_keyboard (xcb_connection_t *c, xcb_timestamp_t time); /** * @brief Grab keyboard key(s) * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param modifiers The modifiers to grab. * \n * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all * possible modifier combinations. * @param key The keycode of the key to grab. * \n * The special value `XCB_GRAB_ANY` means grab any key. * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @return A cookie * * Establishes a passive grab on the keyboard. In the future, the keyboard is * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to * the time at which the key was pressed (as transmitted in the KeyPress event), * and the KeyPress event is reported if all of the following conditions are true: * * The keyboard is not grabbed and the specified key (which can itself be a * modifier key) is logically pressed when the specified modifier keys are * logically down, and no other modifier keys are logically down. * * Either the grab_window is an ancestor of (or is) the focus window, or the * grab_window is a descendant of the focus window and contains the pointer. * * A passive grab on the same key combination does not exist on any ancestor of * grab_window. * * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated * automatically when the logical state of the keyboard has the specified key released (independent of the * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. * * Note that the logical state of a device (as seen by client applications) may lag the physical state if * device event processing is frozen. * * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode * and max_keycode in the connection setup, or a BadValue error results. * * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error * results (no grabs are established) if there is a conflicting grab for any combination. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_grab_key_checked (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, uint16_t modifiers, xcb_keycode_t key, uint8_t pointer_mode, uint8_t keyboard_mode); /** * @brief Grab keyboard key(s) * * @param c The connection * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not * reported to the \a grab_window. * @param grab_window Specifies the window on which the pointer should be grabbed. * @param modifiers The modifiers to grab. * \n * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all * possible modifier combinations. * @param key The keycode of the key to grab. * \n * The special value `XCB_GRAB_ANY` means grab any key. * @param pointer_mode A bitmask of #xcb_grab_mode_t values. * @param pointer_mode \n * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. * @param keyboard_mode \n * @return A cookie * * Establishes a passive grab on the keyboard. In the future, the keyboard is * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to * the time at which the key was pressed (as transmitted in the KeyPress event), * and the KeyPress event is reported if all of the following conditions are true: * * The keyboard is not grabbed and the specified key (which can itself be a * modifier key) is logically pressed when the specified modifier keys are * logically down, and no other modifier keys are logically down. * * Either the grab_window is an ancestor of (or is) the focus window, or the * grab_window is a descendant of the focus window and contains the pointer. * * A passive grab on the same key combination does not exist on any ancestor of * grab_window. * * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated * automatically when the logical state of the keyboard has the specified key released (independent of the * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. * * Note that the logical state of a device (as seen by client applications) may lag the physical state if * device event processing is frozen. * * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode * and max_keycode in the connection setup, or a BadValue error results. * * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error * results (no grabs are established) if there is a conflicting grab for any combination. * */ xcb_void_cookie_t xcb_grab_key (xcb_connection_t *c, uint8_t owner_events, xcb_window_t grab_window, uint16_t modifiers, xcb_keycode_t key, uint8_t pointer_mode, uint8_t keyboard_mode); /** * @brief release a key combination * * @param c The connection * @param key The keycode of the specified key combination. * \n * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes. * @param grab_window The window on which the grabbed key combination will be released. * @param modifiers The modifiers of the specified key combination. * \n * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination * with every possible modifier combination. * @return A cookie * * Releases the key combination on \a grab_window if you grabbed it using * `xcb_grab_key` before. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_ungrab_key_checked (xcb_connection_t *c, xcb_keycode_t key, xcb_window_t grab_window, uint16_t modifiers); /** * @brief release a key combination * * @param c The connection * @param key The keycode of the specified key combination. * \n * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes. * @param grab_window The window on which the grabbed key combination will be released. * @param modifiers The modifiers of the specified key combination. * \n * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination * with every possible modifier combination. * @return A cookie * * Releases the key combination on \a grab_window if you grabbed it using * `xcb_grab_key` before. * */ xcb_void_cookie_t xcb_ungrab_key (xcb_connection_t *c, xcb_keycode_t key, xcb_window_t grab_window, uint16_t modifiers); /** * @brief release queued events * * @param c The connection * @param mode A bitmask of #xcb_allow_t values. * @param mode \n * @param time Timestamp to avoid race conditions when running X over the network. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Releases queued events if the client has caused a device (pointer/keyboard) to * freeze due to grabbing it actively. This request has no effect if \a time is * earlier than the last-grab time of the most recent active grab for this client * or if \a time is later than the current X server time. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_allow_events_checked (xcb_connection_t *c, uint8_t mode, xcb_timestamp_t time); /** * @brief release queued events * * @param c The connection * @param mode A bitmask of #xcb_allow_t values. * @param mode \n * @param time Timestamp to avoid race conditions when running X over the network. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Releases queued events if the client has caused a device (pointer/keyboard) to * freeze due to grabbing it actively. This request has no effect if \a time is * earlier than the last-grab time of the most recent active grab for this client * or if \a time is later than the current X server time. * */ xcb_void_cookie_t xcb_allow_events (xcb_connection_t *c, uint8_t mode, xcb_timestamp_t time); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_grab_server_checked (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_grab_server (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_ungrab_server_checked (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_ungrab_server (xcb_connection_t *c); /** * @brief get pointer coordinates * * @param c The connection * @param window A window to check if the pointer is on the same screen as \a window (see the * `same_screen` field in the reply). * @return A cookie * * Gets the root window the pointer is logically on and the pointer coordinates * relative to the root window's origin. * */ xcb_query_pointer_cookie_t xcb_query_pointer (xcb_connection_t *c, xcb_window_t window); /** * @brief get pointer coordinates * * @param c The connection * @param window A window to check if the pointer is on the same screen as \a window (see the * `same_screen` field in the reply). * @return A cookie * * Gets the root window the pointer is logically on and the pointer coordinates * relative to the root window's origin. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_pointer_cookie_t xcb_query_pointer_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_pointer_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_pointer_reply_t * xcb_query_pointer_reply (xcb_connection_t *c, xcb_query_pointer_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_timecoord_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_timecoord_t) */ void xcb_timecoord_next (xcb_timecoord_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_timecoord_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_timecoord_end (xcb_timecoord_iterator_t i); int xcb_get_motion_events_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_motion_events_cookie_t xcb_get_motion_events (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t start, xcb_timestamp_t stop); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_motion_events_cookie_t xcb_get_motion_events_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t start, xcb_timestamp_t stop); xcb_timecoord_t * xcb_get_motion_events_events (const xcb_get_motion_events_reply_t *R); int xcb_get_motion_events_events_length (const xcb_get_motion_events_reply_t *R); xcb_timecoord_iterator_t xcb_get_motion_events_events_iterator (const xcb_get_motion_events_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_motion_events_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_motion_events_reply_t * xcb_get_motion_events_reply (xcb_connection_t *c, xcb_get_motion_events_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_translate_coordinates_cookie_t xcb_translate_coordinates (xcb_connection_t *c, xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x, int16_t src_y); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_translate_coordinates_cookie_t xcb_translate_coordinates_unchecked (xcb_connection_t *c, xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x, int16_t src_y); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_translate_coordinates_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_translate_coordinates_reply_t * xcb_translate_coordinates_reply (xcb_connection_t *c, xcb_translate_coordinates_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * @brief move mouse pointer * * @param c The connection * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the * pointer is inside \a src_window and within the rectangle specified by (\a src_x, * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to * \a src_window. * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) * relative to the current position of the pointer. * @return A cookie * * Moves the mouse pointer to the specified position. * * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the * pointer is inside \a src_window and within the rectangle specified by (\a src_x, * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to * \a src_window. * * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) * relative to the current position of the pointer. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_warp_pointer_checked (xcb_connection_t *c, xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x, int16_t src_y, uint16_t src_width, uint16_t src_height, int16_t dst_x, int16_t dst_y); /** * @brief move mouse pointer * * @param c The connection * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the * pointer is inside \a src_window and within the rectangle specified by (\a src_x, * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to * \a src_window. * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) * relative to the current position of the pointer. * @return A cookie * * Moves the mouse pointer to the specified position. * * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the * pointer is inside \a src_window and within the rectangle specified by (\a src_x, * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to * \a src_window. * * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) * relative to the current position of the pointer. * */ xcb_void_cookie_t xcb_warp_pointer (xcb_connection_t *c, xcb_window_t src_window, xcb_window_t dst_window, int16_t src_x, int16_t src_y, uint16_t src_width, uint16_t src_height, int16_t dst_x, int16_t dst_y); /** * @brief Sets input focus * * @param c The connection * @param revert_to A bitmask of #xcb_input_focus_t values. * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`). * @param focus The window to focus. All keyboard events will be reported to this window. The * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO). * \n * If \a focus is `XCB_NONE` (TODO), all keyboard events are * discarded until a new focus window is set. * \n * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the * screen on which the pointer is on currently. * @param time Timestamp to avoid race conditions when running X over the network. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Changes the input focus and the last-focus-change time. If the specified \a time * is earlier than the current last-focus-change time, the request is ignored (to * avoid race conditions when running X over the network). * * A FocusIn and FocusOut event is generated when focus is changed. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_input_focus_checked (xcb_connection_t *c, uint8_t revert_to, xcb_window_t focus, xcb_timestamp_t time); /** * @brief Sets input focus * * @param c The connection * @param revert_to A bitmask of #xcb_input_focus_t values. * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`). * @param focus The window to focus. All keyboard events will be reported to this window. The * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO). * \n * If \a focus is `XCB_NONE` (TODO), all keyboard events are * discarded until a new focus window is set. * \n * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the * screen on which the pointer is on currently. * @param time Timestamp to avoid race conditions when running X over the network. * \n * The special value `XCB_CURRENT_TIME` will be replaced with the current server * time. * @return A cookie * * Changes the input focus and the last-focus-change time. If the specified \a time * is earlier than the current last-focus-change time, the request is ignored (to * avoid race conditions when running X over the network). * * A FocusIn and FocusOut event is generated when focus is changed. * */ xcb_void_cookie_t xcb_set_input_focus (xcb_connection_t *c, uint8_t revert_to, xcb_window_t focus, xcb_timestamp_t time); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_input_focus_cookie_t xcb_get_input_focus (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_input_focus_cookie_t xcb_get_input_focus_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_input_focus_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_input_focus_reply_t * xcb_get_input_focus_reply (xcb_connection_t *c, xcb_get_input_focus_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_query_keymap_cookie_t xcb_query_keymap (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_keymap_cookie_t xcb_query_keymap_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_keymap_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_keymap_reply_t * xcb_query_keymap_reply (xcb_connection_t *c, xcb_query_keymap_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_open_font_sizeof (const void *_buffer); /** * @brief opens a font * * @param c The connection * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`. * @param name_len Length (in bytes) of \a name. * @param name A pattern describing an X core font. * @return A cookie * * Opens any X core font matching the given \a name (for example "-misc-fixed-*"). * * Note that X core fonts are deprecated (but still supported) in favor of * client-side rendering using Xft. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_open_font_checked (xcb_connection_t *c, xcb_font_t fid, uint16_t name_len, const char *name); /** * @brief opens a font * * @param c The connection * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`. * @param name_len Length (in bytes) of \a name. * @param name A pattern describing an X core font. * @return A cookie * * Opens any X core font matching the given \a name (for example "-misc-fixed-*"). * * Note that X core fonts are deprecated (but still supported) in favor of * client-side rendering using Xft. * */ xcb_void_cookie_t xcb_open_font (xcb_connection_t *c, xcb_font_t fid, uint16_t name_len, const char *name); char * xcb_open_font_name (const xcb_open_font_request_t *R); int xcb_open_font_name_length (const xcb_open_font_request_t *R); xcb_generic_iterator_t xcb_open_font_name_end (const xcb_open_font_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_close_font_checked (xcb_connection_t *c, xcb_font_t font); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_close_font (xcb_connection_t *c, xcb_font_t font); /** * Get the next element of the iterator * @param i Pointer to a xcb_fontprop_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_fontprop_t) */ void xcb_fontprop_next (xcb_fontprop_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_fontprop_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_fontprop_end (xcb_fontprop_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_charinfo_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_charinfo_t) */ void xcb_charinfo_next (xcb_charinfo_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_charinfo_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_charinfo_end (xcb_charinfo_iterator_t i); int xcb_query_font_sizeof (const void *_buffer); /** * @brief query font metrics * * @param c The connection * @param font The fontable (Font or Graphics Context) to query. * @return A cookie * * Queries information associated with the font. * */ xcb_query_font_cookie_t xcb_query_font (xcb_connection_t *c, xcb_fontable_t font); /** * @brief query font metrics * * @param c The connection * @param font The fontable (Font or Graphics Context) to query. * @return A cookie * * Queries information associated with the font. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_font_cookie_t xcb_query_font_unchecked (xcb_connection_t *c, xcb_fontable_t font); xcb_fontprop_t * xcb_query_font_properties (const xcb_query_font_reply_t *R); int xcb_query_font_properties_length (const xcb_query_font_reply_t *R); xcb_fontprop_iterator_t xcb_query_font_properties_iterator (const xcb_query_font_reply_t *R); xcb_charinfo_t * xcb_query_font_char_infos (const xcb_query_font_reply_t *R); int xcb_query_font_char_infos_length (const xcb_query_font_reply_t *R); xcb_charinfo_iterator_t xcb_query_font_char_infos_iterator (const xcb_query_font_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_font_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_font_reply_t * xcb_query_font_reply (xcb_connection_t *c, xcb_query_font_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_query_text_extents_sizeof (const void *_buffer, uint32_t string_len); /** * @brief get text extents * * @param c The connection * @param font The \a font to calculate text extents in. You can also pass a graphics context. * @param string_len The number of characters in \a string. * @param string The text to get text extents for. * @return A cookie * * Query text extents from the X11 server. This request returns the bounding box * of the specified 16-bit character string in the specified \a font or the font * contained in the specified graphics context. * * `font_ascent` is set to the maximum of the ascent metrics of all characters in * the string. `font_descent` is set to the maximum of the descent metrics. * `overall_width` is set to the sum of the character-width metrics of all * characters in the string. For each character in the string, let W be the sum of * the character-width metrics of all characters preceding it in the string. Let L * be the left-side-bearing metric of the character plus W. Let R be the * right-side-bearing metric of the character plus W. The lbearing member is set * to the minimum L of all characters in the string. The rbearing member is set to * the maximum R. * * For fonts defined with linear indexing rather than 2-byte matrix indexing, each * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the * most significant byte. If the font has no defined default character, undefined * characters in the string are taken to have all zero metrics. * * Characters with all zero metrics are ignored. If the font has no defined * default_char, the undefined characters in the string are also ignored. * */ xcb_query_text_extents_cookie_t xcb_query_text_extents (xcb_connection_t *c, xcb_fontable_t font, uint32_t string_len, const xcb_char2b_t *string); /** * @brief get text extents * * @param c The connection * @param font The \a font to calculate text extents in. You can also pass a graphics context. * @param string_len The number of characters in \a string. * @param string The text to get text extents for. * @return A cookie * * Query text extents from the X11 server. This request returns the bounding box * of the specified 16-bit character string in the specified \a font or the font * contained in the specified graphics context. * * `font_ascent` is set to the maximum of the ascent metrics of all characters in * the string. `font_descent` is set to the maximum of the descent metrics. * `overall_width` is set to the sum of the character-width metrics of all * characters in the string. For each character in the string, let W be the sum of * the character-width metrics of all characters preceding it in the string. Let L * be the left-side-bearing metric of the character plus W. Let R be the * right-side-bearing metric of the character plus W. The lbearing member is set * to the minimum L of all characters in the string. The rbearing member is set to * the maximum R. * * For fonts defined with linear indexing rather than 2-byte matrix indexing, each * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the * most significant byte. If the font has no defined default character, undefined * characters in the string are taken to have all zero metrics. * * Characters with all zero metrics are ignored. If the font has no defined * default_char, the undefined characters in the string are also ignored. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_text_extents_cookie_t xcb_query_text_extents_unchecked (xcb_connection_t *c, xcb_fontable_t font, uint32_t string_len, const xcb_char2b_t *string); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_text_extents_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_text_extents_reply_t * xcb_query_text_extents_reply (xcb_connection_t *c, xcb_query_text_extents_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_str_sizeof (const void *_buffer); char * xcb_str_name (const xcb_str_t *R); int xcb_str_name_length (const xcb_str_t *R); xcb_generic_iterator_t xcb_str_name_end (const xcb_str_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_str_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_str_t) */ void xcb_str_next (xcb_str_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_str_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_str_end (xcb_str_iterator_t i); int xcb_list_fonts_sizeof (const void *_buffer); /** * @brief get matching font names * * @param c The connection * @param max_names The maximum number of fonts to be returned. * @param pattern_len The length (in bytes) of \a pattern. * @param pattern A font pattern, for example "-misc-fixed-*". * \n * The asterisk (*) is a wildcard for any number of characters. The question mark * (?) is a wildcard for a single character. Use of uppercase or lowercase does * not matter. * @return A cookie * * Gets a list of available font names which match the given \a pattern. * */ xcb_list_fonts_cookie_t xcb_list_fonts (xcb_connection_t *c, uint16_t max_names, uint16_t pattern_len, const char *pattern); /** * @brief get matching font names * * @param c The connection * @param max_names The maximum number of fonts to be returned. * @param pattern_len The length (in bytes) of \a pattern. * @param pattern A font pattern, for example "-misc-fixed-*". * \n * The asterisk (*) is a wildcard for any number of characters. The question mark * (?) is a wildcard for a single character. Use of uppercase or lowercase does * not matter. * @return A cookie * * Gets a list of available font names which match the given \a pattern. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_list_fonts_cookie_t xcb_list_fonts_unchecked (xcb_connection_t *c, uint16_t max_names, uint16_t pattern_len, const char *pattern); int xcb_list_fonts_names_length (const xcb_list_fonts_reply_t *R); xcb_str_iterator_t xcb_list_fonts_names_iterator (const xcb_list_fonts_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_list_fonts_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_list_fonts_reply_t * xcb_list_fonts_reply (xcb_connection_t *c, xcb_list_fonts_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_list_fonts_with_info_sizeof (const void *_buffer); /** * @brief get matching font names and information * * @param c The connection * @param max_names The maximum number of fonts to be returned. * @param pattern_len The length (in bytes) of \a pattern. * @param pattern A font pattern, for example "-misc-fixed-*". * \n * The asterisk (*) is a wildcard for any number of characters. The question mark * (?) is a wildcard for a single character. Use of uppercase or lowercase does * not matter. * @return A cookie * * Gets a list of available font names which match the given \a pattern. * */ xcb_list_fonts_with_info_cookie_t xcb_list_fonts_with_info (xcb_connection_t *c, uint16_t max_names, uint16_t pattern_len, const char *pattern); /** * @brief get matching font names and information * * @param c The connection * @param max_names The maximum number of fonts to be returned. * @param pattern_len The length (in bytes) of \a pattern. * @param pattern A font pattern, for example "-misc-fixed-*". * \n * The asterisk (*) is a wildcard for any number of characters. The question mark * (?) is a wildcard for a single character. Use of uppercase or lowercase does * not matter. * @return A cookie * * Gets a list of available font names which match the given \a pattern. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_list_fonts_with_info_cookie_t xcb_list_fonts_with_info_unchecked (xcb_connection_t *c, uint16_t max_names, uint16_t pattern_len, const char *pattern); xcb_fontprop_t * xcb_list_fonts_with_info_properties (const xcb_list_fonts_with_info_reply_t *R); int xcb_list_fonts_with_info_properties_length (const xcb_list_fonts_with_info_reply_t *R); xcb_fontprop_iterator_t xcb_list_fonts_with_info_properties_iterator (const xcb_list_fonts_with_info_reply_t *R); char * xcb_list_fonts_with_info_name (const xcb_list_fonts_with_info_reply_t *R); int xcb_list_fonts_with_info_name_length (const xcb_list_fonts_with_info_reply_t *R); xcb_generic_iterator_t xcb_list_fonts_with_info_name_end (const xcb_list_fonts_with_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_list_fonts_with_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_list_fonts_with_info_reply_t * xcb_list_fonts_with_info_reply (xcb_connection_t *c, xcb_list_fonts_with_info_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_set_font_path_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_font_path_checked (xcb_connection_t *c, uint16_t font_qty, const xcb_str_t *font); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_set_font_path (xcb_connection_t *c, uint16_t font_qty, const xcb_str_t *font); int xcb_set_font_path_font_length (const xcb_set_font_path_request_t *R); xcb_str_iterator_t xcb_set_font_path_font_iterator (const xcb_set_font_path_request_t *R); int xcb_get_font_path_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_font_path_cookie_t xcb_get_font_path (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_font_path_cookie_t xcb_get_font_path_unchecked (xcb_connection_t *c); int xcb_get_font_path_path_length (const xcb_get_font_path_reply_t *R); xcb_str_iterator_t xcb_get_font_path_path_iterator (const xcb_get_font_path_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_font_path_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_font_path_reply_t * xcb_get_font_path_reply (xcb_connection_t *c, xcb_get_font_path_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * @brief Creates a pixmap * * @param c The connection * @param depth TODO * @param pid The ID with which you will refer to the new pixmap, created by * `xcb_generate_id`. * @param drawable Drawable to get the screen from. * @param width The width of the new pixmap. * @param height The height of the new pixmap. * @return A cookie * * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable * is on and only with drawables of the same \a depth. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_pixmap_checked (xcb_connection_t *c, uint8_t depth, xcb_pixmap_t pid, xcb_drawable_t drawable, uint16_t width, uint16_t height); /** * @brief Creates a pixmap * * @param c The connection * @param depth TODO * @param pid The ID with which you will refer to the new pixmap, created by * `xcb_generate_id`. * @param drawable Drawable to get the screen from. * @param width The width of the new pixmap. * @param height The height of the new pixmap. * @return A cookie * * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable * is on and only with drawables of the same \a depth. * */ xcb_void_cookie_t xcb_create_pixmap (xcb_connection_t *c, uint8_t depth, xcb_pixmap_t pid, xcb_drawable_t drawable, uint16_t width, uint16_t height); /** * @brief Destroys a pixmap * * @param c The connection * @param pixmap The pixmap to destroy. * @return A cookie * * Deletes the association between the pixmap ID and the pixmap. The pixmap * storage will be freed when there are no more references to it. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_free_pixmap_checked (xcb_connection_t *c, xcb_pixmap_t pixmap); /** * @brief Destroys a pixmap * * @param c The connection * @param pixmap The pixmap to destroy. * @return A cookie * * Deletes the association between the pixmap ID and the pixmap. The pixmap * storage will be freed when there are no more references to it. * */ xcb_void_cookie_t xcb_free_pixmap (xcb_connection_t *c, xcb_pixmap_t pixmap); int xcb_create_gc_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_create_gc_value_list_t *_aux); int xcb_create_gc_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_create_gc_value_list_t *_aux); int xcb_create_gc_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_create_gc_sizeof (const void *_buffer); /** * @brief Creates a graphics context * * @param c The connection * @param cid The ID with which you will refer to the graphics context, created by * `xcb_generate_id`. * @param drawable Drawable to get the root/depth from. * @return A cookie * * Creates a graphics context. The graphics context can be used with any drawable * that has the same root and depth as the specified drawable. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_gc_checked (xcb_connection_t *c, xcb_gcontext_t cid, xcb_drawable_t drawable, uint32_t value_mask, const void *value_list); /** * @brief Creates a graphics context * * @param c The connection * @param cid The ID with which you will refer to the graphics context, created by * `xcb_generate_id`. * @param drawable Drawable to get the root/depth from. * @return A cookie * * Creates a graphics context. The graphics context can be used with any drawable * that has the same root and depth as the specified drawable. * */ xcb_void_cookie_t xcb_create_gc (xcb_connection_t *c, xcb_gcontext_t cid, xcb_drawable_t drawable, uint32_t value_mask, const void *value_list); /** * @brief Creates a graphics context * * @param c The connection * @param cid The ID with which you will refer to the graphics context, created by * `xcb_generate_id`. * @param drawable Drawable to get the root/depth from. * @return A cookie * * Creates a graphics context. The graphics context can be used with any drawable * that has the same root and depth as the specified drawable. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_gc_aux_checked (xcb_connection_t *c, xcb_gcontext_t cid, xcb_drawable_t drawable, uint32_t value_mask, const xcb_create_gc_value_list_t *value_list); /** * @brief Creates a graphics context * * @param c The connection * @param cid The ID with which you will refer to the graphics context, created by * `xcb_generate_id`. * @param drawable Drawable to get the root/depth from. * @return A cookie * * Creates a graphics context. The graphics context can be used with any drawable * that has the same root and depth as the specified drawable. * */ xcb_void_cookie_t xcb_create_gc_aux (xcb_connection_t *c, xcb_gcontext_t cid, xcb_drawable_t drawable, uint32_t value_mask, const xcb_create_gc_value_list_t *value_list); void * xcb_create_gc_value_list (const xcb_create_gc_request_t *R); int xcb_change_gc_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_change_gc_value_list_t *_aux); int xcb_change_gc_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_change_gc_value_list_t *_aux); int xcb_change_gc_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_change_gc_sizeof (const void *_buffer); /** * @brief change graphics context components * * @param c The connection * @param gc The graphics context to change. * @param value_mask A bitmask of #xcb_gc_t values. * @param value_mask \n * @param value_list Values for each of the components specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the components specified by \a value_mask for the specified graphics context. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_gc_checked (xcb_connection_t *c, xcb_gcontext_t gc, uint32_t value_mask, const void *value_list); /** * @brief change graphics context components * * @param c The connection * @param gc The graphics context to change. * @param value_mask A bitmask of #xcb_gc_t values. * @param value_mask \n * @param value_list Values for each of the components specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the components specified by \a value_mask for the specified graphics context. * */ xcb_void_cookie_t xcb_change_gc (xcb_connection_t *c, xcb_gcontext_t gc, uint32_t value_mask, const void *value_list); /** * @brief change graphics context components * * @param c The connection * @param gc The graphics context to change. * @param value_mask A bitmask of #xcb_gc_t values. * @param value_mask \n * @param value_list Values for each of the components specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the components specified by \a value_mask for the specified graphics context. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_gc_aux_checked (xcb_connection_t *c, xcb_gcontext_t gc, uint32_t value_mask, const xcb_change_gc_value_list_t *value_list); /** * @brief change graphics context components * * @param c The connection * @param gc The graphics context to change. * @param value_mask A bitmask of #xcb_gc_t values. * @param value_mask \n * @param value_list Values for each of the components specified in the bitmask \a value_mask. The * order has to correspond to the order of possible \a value_mask bits. See the * example. * @return A cookie * * Changes the components specified by \a value_mask for the specified graphics context. * */ xcb_void_cookie_t xcb_change_gc_aux (xcb_connection_t *c, xcb_gcontext_t gc, uint32_t value_mask, const xcb_change_gc_value_list_t *value_list); void * xcb_change_gc_value_list (const xcb_change_gc_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_copy_gc_checked (xcb_connection_t *c, xcb_gcontext_t src_gc, xcb_gcontext_t dst_gc, uint32_t value_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_copy_gc (xcb_connection_t *c, xcb_gcontext_t src_gc, xcb_gcontext_t dst_gc, uint32_t value_mask); int xcb_set_dashes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_dashes_checked (xcb_connection_t *c, xcb_gcontext_t gc, uint16_t dash_offset, uint16_t dashes_len, const uint8_t *dashes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_set_dashes (xcb_connection_t *c, xcb_gcontext_t gc, uint16_t dash_offset, uint16_t dashes_len, const uint8_t *dashes); uint8_t * xcb_set_dashes_dashes (const xcb_set_dashes_request_t *R); int xcb_set_dashes_dashes_length (const xcb_set_dashes_request_t *R); xcb_generic_iterator_t xcb_set_dashes_dashes_end (const xcb_set_dashes_request_t *R); int xcb_set_clip_rectangles_sizeof (const void *_buffer, uint32_t rectangles_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_clip_rectangles_checked (xcb_connection_t *c, uint8_t ordering, xcb_gcontext_t gc, int16_t clip_x_origin, int16_t clip_y_origin, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_set_clip_rectangles (xcb_connection_t *c, uint8_t ordering, xcb_gcontext_t gc, int16_t clip_x_origin, int16_t clip_y_origin, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); xcb_rectangle_t * xcb_set_clip_rectangles_rectangles (const xcb_set_clip_rectangles_request_t *R); int xcb_set_clip_rectangles_rectangles_length (const xcb_set_clip_rectangles_request_t *R); xcb_rectangle_iterator_t xcb_set_clip_rectangles_rectangles_iterator (const xcb_set_clip_rectangles_request_t *R); /** * @brief Destroys a graphics context * * @param c The connection * @param gc The graphics context to destroy. * @return A cookie * * Destroys the specified \a gc and all associated storage. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_free_gc_checked (xcb_connection_t *c, xcb_gcontext_t gc); /** * @brief Destroys a graphics context * * @param c The connection * @param gc The graphics context to destroy. * @return A cookie * * Destroys the specified \a gc and all associated storage. * */ xcb_void_cookie_t xcb_free_gc (xcb_connection_t *c, xcb_gcontext_t gc); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_clear_area_checked (xcb_connection_t *c, uint8_t exposures, xcb_window_t window, int16_t x, int16_t y, uint16_t width, uint16_t height); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_clear_area (xcb_connection_t *c, uint8_t exposures, xcb_window_t window, int16_t x, int16_t y, uint16_t width, uint16_t height); /** * @brief copy areas * * @param c The connection * @param src_drawable The source drawable (Window or Pixmap). * @param dst_drawable The destination drawable (Window or Pixmap). * @param gc The graphics context to use. * @param src_x The source X coordinate. * @param src_y The source Y coordinate. * @param dst_x The destination X coordinate. * @param dst_y The destination Y coordinate. * @param width The width of the area to copy (in pixels). * @param height The height of the area to copy (in pixels). * @return A cookie * * Copies the specified rectangle from \a src_drawable to \a dst_drawable. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_copy_area_checked (xcb_connection_t *c, xcb_drawable_t src_drawable, xcb_drawable_t dst_drawable, xcb_gcontext_t gc, int16_t src_x, int16_t src_y, int16_t dst_x, int16_t dst_y, uint16_t width, uint16_t height); /** * @brief copy areas * * @param c The connection * @param src_drawable The source drawable (Window or Pixmap). * @param dst_drawable The destination drawable (Window or Pixmap). * @param gc The graphics context to use. * @param src_x The source X coordinate. * @param src_y The source Y coordinate. * @param dst_x The destination X coordinate. * @param dst_y The destination Y coordinate. * @param width The width of the area to copy (in pixels). * @param height The height of the area to copy (in pixels). * @return A cookie * * Copies the specified rectangle from \a src_drawable to \a dst_drawable. * */ xcb_void_cookie_t xcb_copy_area (xcb_connection_t *c, xcb_drawable_t src_drawable, xcb_drawable_t dst_drawable, xcb_gcontext_t gc, int16_t src_x, int16_t src_y, int16_t dst_x, int16_t dst_y, uint16_t width, uint16_t height); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_copy_plane_checked (xcb_connection_t *c, xcb_drawable_t src_drawable, xcb_drawable_t dst_drawable, xcb_gcontext_t gc, int16_t src_x, int16_t src_y, int16_t dst_x, int16_t dst_y, uint16_t width, uint16_t height, uint32_t bit_plane); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_copy_plane (xcb_connection_t *c, xcb_drawable_t src_drawable, xcb_drawable_t dst_drawable, xcb_gcontext_t gc, int16_t src_x, int16_t src_y, int16_t dst_x, int16_t dst_y, uint16_t width, uint16_t height, uint32_t bit_plane); int xcb_poly_point_sizeof (const void *_buffer, uint32_t points_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_point_checked (xcb_connection_t *c, uint8_t coordinate_mode, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t points_len, const xcb_point_t *points); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_poly_point (xcb_connection_t *c, uint8_t coordinate_mode, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t points_len, const xcb_point_t *points); xcb_point_t * xcb_poly_point_points (const xcb_poly_point_request_t *R); int xcb_poly_point_points_length (const xcb_poly_point_request_t *R); xcb_point_iterator_t xcb_poly_point_points_iterator (const xcb_poly_point_request_t *R); int xcb_poly_line_sizeof (const void *_buffer, uint32_t points_len); /** * @brief draw lines * * @param c The connection * @param coordinate_mode A bitmask of #xcb_coord_mode_t values. * @param coordinate_mode \n * @param drawable The drawable to draw the line(s) on. * @param gc The graphics context to use. * @param points_len The number of `xcb_point_t` structures in \a points. * @param points An array of points. * @return A cookie * * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1]) * in the \a points array. The lines are drawn in the order listed in the array. * They join correctly at all intermediate points, and if the first and last * points coincide, the first and last lines also join correctly. For any given * line, a pixel is not drawn more than once. If thin (zero line-width) lines * intersect, the intersecting pixels are drawn multiple times. If wide lines * intersect, the intersecting pixels are drawn only once, as though the entire * request were a single, filled shape. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_line_checked (xcb_connection_t *c, uint8_t coordinate_mode, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t points_len, const xcb_point_t *points); /** * @brief draw lines * * @param c The connection * @param coordinate_mode A bitmask of #xcb_coord_mode_t values. * @param coordinate_mode \n * @param drawable The drawable to draw the line(s) on. * @param gc The graphics context to use. * @param points_len The number of `xcb_point_t` structures in \a points. * @param points An array of points. * @return A cookie * * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1]) * in the \a points array. The lines are drawn in the order listed in the array. * They join correctly at all intermediate points, and if the first and last * points coincide, the first and last lines also join correctly. For any given * line, a pixel is not drawn more than once. If thin (zero line-width) lines * intersect, the intersecting pixels are drawn multiple times. If wide lines * intersect, the intersecting pixels are drawn only once, as though the entire * request were a single, filled shape. * */ xcb_void_cookie_t xcb_poly_line (xcb_connection_t *c, uint8_t coordinate_mode, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t points_len, const xcb_point_t *points); xcb_point_t * xcb_poly_line_points (const xcb_poly_line_request_t *R); int xcb_poly_line_points_length (const xcb_poly_line_request_t *R); xcb_point_iterator_t xcb_poly_line_points_iterator (const xcb_poly_line_request_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_segment_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_segment_t) */ void xcb_segment_next (xcb_segment_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_segment_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_segment_end (xcb_segment_iterator_t i); int xcb_poly_segment_sizeof (const void *_buffer, uint32_t segments_len); /** * @brief draw lines * * @param c The connection * @param drawable A drawable (Window or Pixmap) to draw on. * @param gc The graphics context to use. * \n * TODO: document which attributes of a gc are used * @param segments_len The number of `xcb_segment_t` structures in \a segments. * @param segments An array of `xcb_segment_t` structures. * @return A cookie * * Draws multiple, unconnected lines. For each segment, a line is drawn between * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of * `xcb_segment_t` structures and does not perform joining at coincident * endpoints. For any given line, a pixel is not drawn more than once. If lines * intersect, the intersecting pixels are drawn multiple times. * * TODO: include the xcb_segment_t data structure * * TODO: an example * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_segment_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t segments_len, const xcb_segment_t *segments); /** * @brief draw lines * * @param c The connection * @param drawable A drawable (Window or Pixmap) to draw on. * @param gc The graphics context to use. * \n * TODO: document which attributes of a gc are used * @param segments_len The number of `xcb_segment_t` structures in \a segments. * @param segments An array of `xcb_segment_t` structures. * @return A cookie * * Draws multiple, unconnected lines. For each segment, a line is drawn between * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of * `xcb_segment_t` structures and does not perform joining at coincident * endpoints. For any given line, a pixel is not drawn more than once. If lines * intersect, the intersecting pixels are drawn multiple times. * * TODO: include the xcb_segment_t data structure * * TODO: an example * */ xcb_void_cookie_t xcb_poly_segment (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t segments_len, const xcb_segment_t *segments); xcb_segment_t * xcb_poly_segment_segments (const xcb_poly_segment_request_t *R); int xcb_poly_segment_segments_length (const xcb_poly_segment_request_t *R); xcb_segment_iterator_t xcb_poly_segment_segments_iterator (const xcb_poly_segment_request_t *R); int xcb_poly_rectangle_sizeof (const void *_buffer, uint32_t rectangles_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_rectangle_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_poly_rectangle (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); xcb_rectangle_t * xcb_poly_rectangle_rectangles (const xcb_poly_rectangle_request_t *R); int xcb_poly_rectangle_rectangles_length (const xcb_poly_rectangle_request_t *R); xcb_rectangle_iterator_t xcb_poly_rectangle_rectangles_iterator (const xcb_poly_rectangle_request_t *R); int xcb_poly_arc_sizeof (const void *_buffer, uint32_t arcs_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_arc_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t arcs_len, const xcb_arc_t *arcs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_poly_arc (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t arcs_len, const xcb_arc_t *arcs); xcb_arc_t * xcb_poly_arc_arcs (const xcb_poly_arc_request_t *R); int xcb_poly_arc_arcs_length (const xcb_poly_arc_request_t *R); xcb_arc_iterator_t xcb_poly_arc_arcs_iterator (const xcb_poly_arc_request_t *R); int xcb_fill_poly_sizeof (const void *_buffer, uint32_t points_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_fill_poly_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint8_t shape, uint8_t coordinate_mode, uint32_t points_len, const xcb_point_t *points); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_fill_poly (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint8_t shape, uint8_t coordinate_mode, uint32_t points_len, const xcb_point_t *points); xcb_point_t * xcb_fill_poly_points (const xcb_fill_poly_request_t *R); int xcb_fill_poly_points_length (const xcb_fill_poly_request_t *R); xcb_point_iterator_t xcb_fill_poly_points_iterator (const xcb_fill_poly_request_t *R); int xcb_poly_fill_rectangle_sizeof (const void *_buffer, uint32_t rectangles_len); /** * @brief Fills rectangles * * @param c The connection * @param drawable The drawable (Window or Pixmap) to draw on. * @param gc The graphics context to use. * \n * The following graphics context components are used: function, plane-mask, * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. * \n * The following graphics context mode-dependent components are used: * foreground, background, tile, stipple, tile-stipple-x-origin, and * tile-stipple-y-origin. * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles. * @param rectangles The rectangles to fill. * @return A cookie * * Fills the specified rectangle(s) in the order listed in the array. For any * given rectangle, each pixel is not drawn more than once. If rectangles * intersect, the intersecting pixels are drawn multiple times. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_fill_rectangle_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); /** * @brief Fills rectangles * * @param c The connection * @param drawable The drawable (Window or Pixmap) to draw on. * @param gc The graphics context to use. * \n * The following graphics context components are used: function, plane-mask, * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. * \n * The following graphics context mode-dependent components are used: * foreground, background, tile, stipple, tile-stipple-x-origin, and * tile-stipple-y-origin. * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles. * @param rectangles The rectangles to fill. * @return A cookie * * Fills the specified rectangle(s) in the order listed in the array. For any * given rectangle, each pixel is not drawn more than once. If rectangles * intersect, the intersecting pixels are drawn multiple times. * */ xcb_void_cookie_t xcb_poly_fill_rectangle (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); xcb_rectangle_t * xcb_poly_fill_rectangle_rectangles (const xcb_poly_fill_rectangle_request_t *R); int xcb_poly_fill_rectangle_rectangles_length (const xcb_poly_fill_rectangle_request_t *R); xcb_rectangle_iterator_t xcb_poly_fill_rectangle_rectangles_iterator (const xcb_poly_fill_rectangle_request_t *R); int xcb_poly_fill_arc_sizeof (const void *_buffer, uint32_t arcs_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_fill_arc_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t arcs_len, const xcb_arc_t *arcs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_poly_fill_arc (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t arcs_len, const xcb_arc_t *arcs); xcb_arc_t * xcb_poly_fill_arc_arcs (const xcb_poly_fill_arc_request_t *R); int xcb_poly_fill_arc_arcs_length (const xcb_poly_fill_arc_request_t *R); xcb_arc_iterator_t xcb_poly_fill_arc_arcs_iterator (const xcb_poly_fill_arc_request_t *R); int xcb_put_image_sizeof (const void *_buffer, uint32_t data_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_put_image_checked (xcb_connection_t *c, uint8_t format, xcb_drawable_t drawable, xcb_gcontext_t gc, uint16_t width, uint16_t height, int16_t dst_x, int16_t dst_y, uint8_t left_pad, uint8_t depth, uint32_t data_len, const uint8_t *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_put_image (xcb_connection_t *c, uint8_t format, xcb_drawable_t drawable, xcb_gcontext_t gc, uint16_t width, uint16_t height, int16_t dst_x, int16_t dst_y, uint8_t left_pad, uint8_t depth, uint32_t data_len, const uint8_t *data); uint8_t * xcb_put_image_data (const xcb_put_image_request_t *R); int xcb_put_image_data_length (const xcb_put_image_request_t *R); xcb_generic_iterator_t xcb_put_image_data_end (const xcb_put_image_request_t *R); int xcb_get_image_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_image_cookie_t xcb_get_image (xcb_connection_t *c, uint8_t format, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t plane_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_image_cookie_t xcb_get_image_unchecked (xcb_connection_t *c, uint8_t format, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t plane_mask); uint8_t * xcb_get_image_data (const xcb_get_image_reply_t *R); int xcb_get_image_data_length (const xcb_get_image_reply_t *R); xcb_generic_iterator_t xcb_get_image_data_end (const xcb_get_image_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_image_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_image_reply_t * xcb_get_image_reply (xcb_connection_t *c, xcb_get_image_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_poly_text_8_sizeof (const void *_buffer, uint32_t items_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_text_8_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, uint32_t items_len, const uint8_t *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_poly_text_8 (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, uint32_t items_len, const uint8_t *items); uint8_t * xcb_poly_text_8_items (const xcb_poly_text_8_request_t *R); int xcb_poly_text_8_items_length (const xcb_poly_text_8_request_t *R); xcb_generic_iterator_t xcb_poly_text_8_items_end (const xcb_poly_text_8_request_t *R); int xcb_poly_text_16_sizeof (const void *_buffer, uint32_t items_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_poly_text_16_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, uint32_t items_len, const uint8_t *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_poly_text_16 (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, uint32_t items_len, const uint8_t *items); uint8_t * xcb_poly_text_16_items (const xcb_poly_text_16_request_t *R); int xcb_poly_text_16_items_length (const xcb_poly_text_16_request_t *R); xcb_generic_iterator_t xcb_poly_text_16_items_end (const xcb_poly_text_16_request_t *R); int xcb_image_text_8_sizeof (const void *_buffer); /** * @brief Draws text * * @param c The connection * @param string_len The length of the \a string. Note that this parameter limited by 255 due to * using 8 bits! * @param drawable The drawable (Window or Pixmap) to draw text on. * @param gc The graphics context to use. * \n * The following graphics context components are used: plane-mask, foreground, * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. * @param x The x coordinate of the first character, relative to the origin of \a drawable. * @param y The y coordinate of the first character, relative to the origin of \a drawable. * @param string The string to draw. Only the first 255 characters are relevant due to the data * type of \a string_len. * @return A cookie * * Fills the destination rectangle with the background pixel from \a gc, then * paints the text with the foreground pixel from \a gc. The upper-left corner of * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, * the height is font-ascent + font-descent. The overall-width, font-ascent and * font-descent are as returned by `xcb_query_text_extents` (TODO). * * Note that using X core fonts is deprecated (but still supported) in favor of * client-side rendering using Xft. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_image_text_8_checked (xcb_connection_t *c, uint8_t string_len, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, const char *string); /** * @brief Draws text * * @param c The connection * @param string_len The length of the \a string. Note that this parameter limited by 255 due to * using 8 bits! * @param drawable The drawable (Window or Pixmap) to draw text on. * @param gc The graphics context to use. * \n * The following graphics context components are used: plane-mask, foreground, * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. * @param x The x coordinate of the first character, relative to the origin of \a drawable. * @param y The y coordinate of the first character, relative to the origin of \a drawable. * @param string The string to draw. Only the first 255 characters are relevant due to the data * type of \a string_len. * @return A cookie * * Fills the destination rectangle with the background pixel from \a gc, then * paints the text with the foreground pixel from \a gc. The upper-left corner of * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, * the height is font-ascent + font-descent. The overall-width, font-ascent and * font-descent are as returned by `xcb_query_text_extents` (TODO). * * Note that using X core fonts is deprecated (but still supported) in favor of * client-side rendering using Xft. * */ xcb_void_cookie_t xcb_image_text_8 (xcb_connection_t *c, uint8_t string_len, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, const char *string); char * xcb_image_text_8_string (const xcb_image_text_8_request_t *R); int xcb_image_text_8_string_length (const xcb_image_text_8_request_t *R); xcb_generic_iterator_t xcb_image_text_8_string_end (const xcb_image_text_8_request_t *R); int xcb_image_text_16_sizeof (const void *_buffer); /** * @brief Draws text * * @param c The connection * @param string_len The length of the \a string in characters. Note that this parameter limited by * 255 due to using 8 bits! * @param drawable The drawable (Window or Pixmap) to draw text on. * @param gc The graphics context to use. * \n * The following graphics context components are used: plane-mask, foreground, * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. * @param x The x coordinate of the first character, relative to the origin of \a drawable. * @param y The y coordinate of the first character, relative to the origin of \a drawable. * @param string The string to draw. Only the first 255 characters are relevant due to the data * type of \a string_len. Every character uses 2 bytes (hence the 16 in this * request's name). * @return A cookie * * Fills the destination rectangle with the background pixel from \a gc, then * paints the text with the foreground pixel from \a gc. The upper-left corner of * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, * the height is font-ascent + font-descent. The overall-width, font-ascent and * font-descent are as returned by `xcb_query_text_extents` (TODO). * * Note that using X core fonts is deprecated (but still supported) in favor of * client-side rendering using Xft. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_image_text_16_checked (xcb_connection_t *c, uint8_t string_len, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, const xcb_char2b_t *string); /** * @brief Draws text * * @param c The connection * @param string_len The length of the \a string in characters. Note that this parameter limited by * 255 due to using 8 bits! * @param drawable The drawable (Window or Pixmap) to draw text on. * @param gc The graphics context to use. * \n * The following graphics context components are used: plane-mask, foreground, * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. * @param x The x coordinate of the first character, relative to the origin of \a drawable. * @param y The y coordinate of the first character, relative to the origin of \a drawable. * @param string The string to draw. Only the first 255 characters are relevant due to the data * type of \a string_len. Every character uses 2 bytes (hence the 16 in this * request's name). * @return A cookie * * Fills the destination rectangle with the background pixel from \a gc, then * paints the text with the foreground pixel from \a gc. The upper-left corner of * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, * the height is font-ascent + font-descent. The overall-width, font-ascent and * font-descent are as returned by `xcb_query_text_extents` (TODO). * * Note that using X core fonts is deprecated (but still supported) in favor of * client-side rendering using Xft. * */ xcb_void_cookie_t xcb_image_text_16 (xcb_connection_t *c, uint8_t string_len, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t x, int16_t y, const xcb_char2b_t *string); xcb_char2b_t * xcb_image_text_16_string (const xcb_image_text_16_request_t *R); int xcb_image_text_16_string_length (const xcb_image_text_16_request_t *R); xcb_char2b_iterator_t xcb_image_text_16_string_iterator (const xcb_image_text_16_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_colormap_checked (xcb_connection_t *c, uint8_t alloc, xcb_colormap_t mid, xcb_window_t window, xcb_visualid_t visual); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_create_colormap (xcb_connection_t *c, uint8_t alloc, xcb_colormap_t mid, xcb_window_t window, xcb_visualid_t visual); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_free_colormap_checked (xcb_connection_t *c, xcb_colormap_t cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_free_colormap (xcb_connection_t *c, xcb_colormap_t cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_copy_colormap_and_free_checked (xcb_connection_t *c, xcb_colormap_t mid, xcb_colormap_t src_cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_copy_colormap_and_free (xcb_connection_t *c, xcb_colormap_t mid, xcb_colormap_t src_cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_install_colormap_checked (xcb_connection_t *c, xcb_colormap_t cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_install_colormap (xcb_connection_t *c, xcb_colormap_t cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_uninstall_colormap_checked (xcb_connection_t *c, xcb_colormap_t cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_uninstall_colormap (xcb_connection_t *c, xcb_colormap_t cmap); int xcb_list_installed_colormaps_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_list_installed_colormaps_cookie_t xcb_list_installed_colormaps (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_list_installed_colormaps_cookie_t xcb_list_installed_colormaps_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_colormap_t * xcb_list_installed_colormaps_cmaps (const xcb_list_installed_colormaps_reply_t *R); int xcb_list_installed_colormaps_cmaps_length (const xcb_list_installed_colormaps_reply_t *R); xcb_generic_iterator_t xcb_list_installed_colormaps_cmaps_end (const xcb_list_installed_colormaps_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_list_installed_colormaps_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_list_installed_colormaps_reply_t * xcb_list_installed_colormaps_reply (xcb_connection_t *c, xcb_list_installed_colormaps_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * @brief Allocate a color * * @param c The connection * @param cmap TODO * @param red The red value of your color. * @param green The green value of your color. * @param blue The blue value of your color. * @return A cookie * * Allocates a read-only colormap entry corresponding to the closest RGB value * supported by the hardware. If you are using TrueColor, you can take a shortcut * and directly calculate the color pixel value to avoid the round trip. But, for * example, on 16-bit color setups (VNC), you can easily get the closest supported * RGB value to the RGB value you are specifying. * */ xcb_alloc_color_cookie_t xcb_alloc_color (xcb_connection_t *c, xcb_colormap_t cmap, uint16_t red, uint16_t green, uint16_t blue); /** * @brief Allocate a color * * @param c The connection * @param cmap TODO * @param red The red value of your color. * @param green The green value of your color. * @param blue The blue value of your color. * @return A cookie * * Allocates a read-only colormap entry corresponding to the closest RGB value * supported by the hardware. If you are using TrueColor, you can take a shortcut * and directly calculate the color pixel value to avoid the round trip. But, for * example, on 16-bit color setups (VNC), you can easily get the closest supported * RGB value to the RGB value you are specifying. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_alloc_color_cookie_t xcb_alloc_color_unchecked (xcb_connection_t *c, xcb_colormap_t cmap, uint16_t red, uint16_t green, uint16_t blue); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_alloc_color_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_alloc_color_reply_t * xcb_alloc_color_reply (xcb_connection_t *c, xcb_alloc_color_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_alloc_named_color_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_alloc_named_color_cookie_t xcb_alloc_named_color (xcb_connection_t *c, xcb_colormap_t cmap, uint16_t name_len, const char *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_alloc_named_color_cookie_t xcb_alloc_named_color_unchecked (xcb_connection_t *c, xcb_colormap_t cmap, uint16_t name_len, const char *name); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_alloc_named_color_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_alloc_named_color_reply_t * xcb_alloc_named_color_reply (xcb_connection_t *c, xcb_alloc_named_color_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_alloc_color_cells_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_alloc_color_cells_cookie_t xcb_alloc_color_cells (xcb_connection_t *c, uint8_t contiguous, xcb_colormap_t cmap, uint16_t colors, uint16_t planes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_alloc_color_cells_cookie_t xcb_alloc_color_cells_unchecked (xcb_connection_t *c, uint8_t contiguous, xcb_colormap_t cmap, uint16_t colors, uint16_t planes); uint32_t * xcb_alloc_color_cells_pixels (const xcb_alloc_color_cells_reply_t *R); int xcb_alloc_color_cells_pixels_length (const xcb_alloc_color_cells_reply_t *R); xcb_generic_iterator_t xcb_alloc_color_cells_pixels_end (const xcb_alloc_color_cells_reply_t *R); uint32_t * xcb_alloc_color_cells_masks (const xcb_alloc_color_cells_reply_t *R); int xcb_alloc_color_cells_masks_length (const xcb_alloc_color_cells_reply_t *R); xcb_generic_iterator_t xcb_alloc_color_cells_masks_end (const xcb_alloc_color_cells_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_alloc_color_cells_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_alloc_color_cells_reply_t * xcb_alloc_color_cells_reply (xcb_connection_t *c, xcb_alloc_color_cells_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_alloc_color_planes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_alloc_color_planes_cookie_t xcb_alloc_color_planes (xcb_connection_t *c, uint8_t contiguous, xcb_colormap_t cmap, uint16_t colors, uint16_t reds, uint16_t greens, uint16_t blues); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_alloc_color_planes_cookie_t xcb_alloc_color_planes_unchecked (xcb_connection_t *c, uint8_t contiguous, xcb_colormap_t cmap, uint16_t colors, uint16_t reds, uint16_t greens, uint16_t blues); uint32_t * xcb_alloc_color_planes_pixels (const xcb_alloc_color_planes_reply_t *R); int xcb_alloc_color_planes_pixels_length (const xcb_alloc_color_planes_reply_t *R); xcb_generic_iterator_t xcb_alloc_color_planes_pixels_end (const xcb_alloc_color_planes_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_alloc_color_planes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_alloc_color_planes_reply_t * xcb_alloc_color_planes_reply (xcb_connection_t *c, xcb_alloc_color_planes_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_free_colors_sizeof (const void *_buffer, uint32_t pixels_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_free_colors_checked (xcb_connection_t *c, xcb_colormap_t cmap, uint32_t plane_mask, uint32_t pixels_len, const uint32_t *pixels); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_free_colors (xcb_connection_t *c, xcb_colormap_t cmap, uint32_t plane_mask, uint32_t pixels_len, const uint32_t *pixels); uint32_t * xcb_free_colors_pixels (const xcb_free_colors_request_t *R); int xcb_free_colors_pixels_length (const xcb_free_colors_request_t *R); xcb_generic_iterator_t xcb_free_colors_pixels_end (const xcb_free_colors_request_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_coloritem_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_coloritem_t) */ void xcb_coloritem_next (xcb_coloritem_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_coloritem_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_coloritem_end (xcb_coloritem_iterator_t i); int xcb_store_colors_sizeof (const void *_buffer, uint32_t items_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_store_colors_checked (xcb_connection_t *c, xcb_colormap_t cmap, uint32_t items_len, const xcb_coloritem_t *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_store_colors (xcb_connection_t *c, xcb_colormap_t cmap, uint32_t items_len, const xcb_coloritem_t *items); xcb_coloritem_t * xcb_store_colors_items (const xcb_store_colors_request_t *R); int xcb_store_colors_items_length (const xcb_store_colors_request_t *R); xcb_coloritem_iterator_t xcb_store_colors_items_iterator (const xcb_store_colors_request_t *R); int xcb_store_named_color_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_store_named_color_checked (xcb_connection_t *c, uint8_t flags, xcb_colormap_t cmap, uint32_t pixel, uint16_t name_len, const char *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_store_named_color (xcb_connection_t *c, uint8_t flags, xcb_colormap_t cmap, uint32_t pixel, uint16_t name_len, const char *name); char * xcb_store_named_color_name (const xcb_store_named_color_request_t *R); int xcb_store_named_color_name_length (const xcb_store_named_color_request_t *R); xcb_generic_iterator_t xcb_store_named_color_name_end (const xcb_store_named_color_request_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_rgb_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_rgb_t) */ void xcb_rgb_next (xcb_rgb_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_rgb_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_rgb_end (xcb_rgb_iterator_t i); int xcb_query_colors_sizeof (const void *_buffer, uint32_t pixels_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_query_colors_cookie_t xcb_query_colors (xcb_connection_t *c, xcb_colormap_t cmap, uint32_t pixels_len, const uint32_t *pixels); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_colors_cookie_t xcb_query_colors_unchecked (xcb_connection_t *c, xcb_colormap_t cmap, uint32_t pixels_len, const uint32_t *pixels); xcb_rgb_t * xcb_query_colors_colors (const xcb_query_colors_reply_t *R); int xcb_query_colors_colors_length (const xcb_query_colors_reply_t *R); xcb_rgb_iterator_t xcb_query_colors_colors_iterator (const xcb_query_colors_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_colors_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_colors_reply_t * xcb_query_colors_reply (xcb_connection_t *c, xcb_query_colors_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_lookup_color_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_lookup_color_cookie_t xcb_lookup_color (xcb_connection_t *c, xcb_colormap_t cmap, uint16_t name_len, const char *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_lookup_color_cookie_t xcb_lookup_color_unchecked (xcb_connection_t *c, xcb_colormap_t cmap, uint16_t name_len, const char *name); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_lookup_color_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_lookup_color_reply_t * xcb_lookup_color_reply (xcb_connection_t *c, xcb_lookup_color_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_cursor_checked (xcb_connection_t *c, xcb_cursor_t cid, xcb_pixmap_t source, xcb_pixmap_t mask, uint16_t fore_red, uint16_t fore_green, uint16_t fore_blue, uint16_t back_red, uint16_t back_green, uint16_t back_blue, uint16_t x, uint16_t y); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_create_cursor (xcb_connection_t *c, xcb_cursor_t cid, xcb_pixmap_t source, xcb_pixmap_t mask, uint16_t fore_red, uint16_t fore_green, uint16_t fore_blue, uint16_t back_red, uint16_t back_green, uint16_t back_blue, uint16_t x, uint16_t y); /** * @brief create cursor * * @param c The connection * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`. * @param source_font In which font to look for the cursor glyph. * @param mask_font In which font to look for the mask glyph. * @param source_char The glyph of \a source_font to use. * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define * which source pixels are displayed. All pixels which are set to 0 are not * displayed. * @param fore_red The red value of the foreground color. * @param fore_green The green value of the foreground color. * @param fore_blue The blue value of the foreground color. * @param back_red The red value of the background color. * @param back_green The green value of the background color. * @param back_blue The blue value of the background color. * @return A cookie * * Creates a cursor from a font glyph. X provides a set of standard cursor shapes * in a special font named cursor. Applications are encouraged to use this * interface for their cursors because the font can be customized for the * individual display type. * * All pixels which are set to 1 in the source will use the foreground color (as * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0 * will use the background color (as specified by \a back_red, \a back_green and * \a back_blue). * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_create_glyph_cursor_checked (xcb_connection_t *c, xcb_cursor_t cid, xcb_font_t source_font, xcb_font_t mask_font, uint16_t source_char, uint16_t mask_char, uint16_t fore_red, uint16_t fore_green, uint16_t fore_blue, uint16_t back_red, uint16_t back_green, uint16_t back_blue); /** * @brief create cursor * * @param c The connection * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`. * @param source_font In which font to look for the cursor glyph. * @param mask_font In which font to look for the mask glyph. * @param source_char The glyph of \a source_font to use. * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define * which source pixels are displayed. All pixels which are set to 0 are not * displayed. * @param fore_red The red value of the foreground color. * @param fore_green The green value of the foreground color. * @param fore_blue The blue value of the foreground color. * @param back_red The red value of the background color. * @param back_green The green value of the background color. * @param back_blue The blue value of the background color. * @return A cookie * * Creates a cursor from a font glyph. X provides a set of standard cursor shapes * in a special font named cursor. Applications are encouraged to use this * interface for their cursors because the font can be customized for the * individual display type. * * All pixels which are set to 1 in the source will use the foreground color (as * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0 * will use the background color (as specified by \a back_red, \a back_green and * \a back_blue). * */ xcb_void_cookie_t xcb_create_glyph_cursor (xcb_connection_t *c, xcb_cursor_t cid, xcb_font_t source_font, xcb_font_t mask_font, uint16_t source_char, uint16_t mask_char, uint16_t fore_red, uint16_t fore_green, uint16_t fore_blue, uint16_t back_red, uint16_t back_green, uint16_t back_blue); /** * @brief Deletes a cursor * * @param c The connection * @param cursor The cursor to destroy. * @return A cookie * * Deletes the association between the cursor resource ID and the specified * cursor. The cursor is freed when no other resource references it. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_free_cursor_checked (xcb_connection_t *c, xcb_cursor_t cursor); /** * @brief Deletes a cursor * * @param c The connection * @param cursor The cursor to destroy. * @return A cookie * * Deletes the association between the cursor resource ID and the specified * cursor. The cursor is freed when no other resource references it. * */ xcb_void_cookie_t xcb_free_cursor (xcb_connection_t *c, xcb_cursor_t cursor); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_recolor_cursor_checked (xcb_connection_t *c, xcb_cursor_t cursor, uint16_t fore_red, uint16_t fore_green, uint16_t fore_blue, uint16_t back_red, uint16_t back_green, uint16_t back_blue); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_recolor_cursor (xcb_connection_t *c, xcb_cursor_t cursor, uint16_t fore_red, uint16_t fore_green, uint16_t fore_blue, uint16_t back_red, uint16_t back_green, uint16_t back_blue); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_query_best_size_cookie_t xcb_query_best_size (xcb_connection_t *c, uint8_t _class, xcb_drawable_t drawable, uint16_t width, uint16_t height); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_best_size_cookie_t xcb_query_best_size_unchecked (xcb_connection_t *c, uint8_t _class, xcb_drawable_t drawable, uint16_t width, uint16_t height); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_best_size_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_best_size_reply_t * xcb_query_best_size_reply (xcb_connection_t *c, xcb_query_best_size_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_query_extension_sizeof (const void *_buffer); /** * @brief check if extension is present * * @param c The connection * @param name_len The length of \a name in bytes. * @param name The name of the extension to query, for example "RANDR". This is case * sensitive! * @return A cookie * * Determines if the specified extension is present on this X11 server. * * Every extension has a unique `major_opcode` to identify requests, the minor * opcodes and request formats are extension-specific. If the extension provides * events and errors, the `first_event` and `first_error` fields in the reply are * set accordingly. * * There should rarely be a need to use this request directly, XCB provides the * `xcb_get_extension_data` function instead. * */ xcb_query_extension_cookie_t xcb_query_extension (xcb_connection_t *c, uint16_t name_len, const char *name); /** * @brief check if extension is present * * @param c The connection * @param name_len The length of \a name in bytes. * @param name The name of the extension to query, for example "RANDR". This is case * sensitive! * @return A cookie * * Determines if the specified extension is present on this X11 server. * * Every extension has a unique `major_opcode` to identify requests, the minor * opcodes and request formats are extension-specific. If the extension provides * events and errors, the `first_event` and `first_error` fields in the reply are * set accordingly. * * There should rarely be a need to use this request directly, XCB provides the * `xcb_get_extension_data` function instead. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_query_extension_cookie_t xcb_query_extension_unchecked (xcb_connection_t *c, uint16_t name_len, const char *name); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_query_extension_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_query_extension_reply_t * xcb_query_extension_reply (xcb_connection_t *c, xcb_query_extension_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_list_extensions_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_list_extensions_cookie_t xcb_list_extensions (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_list_extensions_cookie_t xcb_list_extensions_unchecked (xcb_connection_t *c); int xcb_list_extensions_names_length (const xcb_list_extensions_reply_t *R); xcb_str_iterator_t xcb_list_extensions_names_iterator (const xcb_list_extensions_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_list_extensions_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_list_extensions_reply_t * xcb_list_extensions_reply (xcb_connection_t *c, xcb_list_extensions_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_change_keyboard_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_keyboard_mapping_checked (xcb_connection_t *c, uint8_t keycode_count, xcb_keycode_t first_keycode, uint8_t keysyms_per_keycode, const xcb_keysym_t *keysyms); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_change_keyboard_mapping (xcb_connection_t *c, uint8_t keycode_count, xcb_keycode_t first_keycode, uint8_t keysyms_per_keycode, const xcb_keysym_t *keysyms); xcb_keysym_t * xcb_change_keyboard_mapping_keysyms (const xcb_change_keyboard_mapping_request_t *R); int xcb_change_keyboard_mapping_keysyms_length (const xcb_change_keyboard_mapping_request_t *R); xcb_generic_iterator_t xcb_change_keyboard_mapping_keysyms_end (const xcb_change_keyboard_mapping_request_t *R); int xcb_get_keyboard_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_keyboard_mapping_cookie_t xcb_get_keyboard_mapping (xcb_connection_t *c, xcb_keycode_t first_keycode, uint8_t count); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_keyboard_mapping_cookie_t xcb_get_keyboard_mapping_unchecked (xcb_connection_t *c, xcb_keycode_t first_keycode, uint8_t count); xcb_keysym_t * xcb_get_keyboard_mapping_keysyms (const xcb_get_keyboard_mapping_reply_t *R); int xcb_get_keyboard_mapping_keysyms_length (const xcb_get_keyboard_mapping_reply_t *R); xcb_generic_iterator_t xcb_get_keyboard_mapping_keysyms_end (const xcb_get_keyboard_mapping_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_keyboard_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_keyboard_mapping_reply_t * xcb_get_keyboard_mapping_reply (xcb_connection_t *c, xcb_get_keyboard_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_change_keyboard_control_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_change_keyboard_control_value_list_t *_aux); int xcb_change_keyboard_control_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_change_keyboard_control_value_list_t *_aux); int xcb_change_keyboard_control_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_change_keyboard_control_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_keyboard_control_checked (xcb_connection_t *c, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_change_keyboard_control (xcb_connection_t *c, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_keyboard_control_aux_checked (xcb_connection_t *c, uint32_t value_mask, const xcb_change_keyboard_control_value_list_t *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_change_keyboard_control_aux (xcb_connection_t *c, uint32_t value_mask, const xcb_change_keyboard_control_value_list_t *value_list); void * xcb_change_keyboard_control_value_list (const xcb_change_keyboard_control_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_keyboard_control_cookie_t xcb_get_keyboard_control (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_keyboard_control_cookie_t xcb_get_keyboard_control_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_keyboard_control_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_keyboard_control_reply_t * xcb_get_keyboard_control_reply (xcb_connection_t *c, xcb_get_keyboard_control_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_bell_checked (xcb_connection_t *c, int8_t percent); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_bell (xcb_connection_t *c, int8_t percent); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_pointer_control_checked (xcb_connection_t *c, int16_t acceleration_numerator, int16_t acceleration_denominator, int16_t threshold, uint8_t do_acceleration, uint8_t do_threshold); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_change_pointer_control (xcb_connection_t *c, int16_t acceleration_numerator, int16_t acceleration_denominator, int16_t threshold, uint8_t do_acceleration, uint8_t do_threshold); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_pointer_control_cookie_t xcb_get_pointer_control (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_pointer_control_cookie_t xcb_get_pointer_control_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_pointer_control_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_pointer_control_reply_t * xcb_get_pointer_control_reply (xcb_connection_t *c, xcb_get_pointer_control_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_screen_saver_checked (xcb_connection_t *c, int16_t timeout, int16_t interval, uint8_t prefer_blanking, uint8_t allow_exposures); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_set_screen_saver (xcb_connection_t *c, int16_t timeout, int16_t interval, uint8_t prefer_blanking, uint8_t allow_exposures); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_screen_saver_cookie_t xcb_get_screen_saver (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_screen_saver_cookie_t xcb_get_screen_saver_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_screen_saver_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_screen_saver_reply_t * xcb_get_screen_saver_reply (xcb_connection_t *c, xcb_get_screen_saver_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_change_hosts_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_change_hosts_checked (xcb_connection_t *c, uint8_t mode, uint8_t family, uint16_t address_len, const uint8_t *address); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_change_hosts (xcb_connection_t *c, uint8_t mode, uint8_t family, uint16_t address_len, const uint8_t *address); uint8_t * xcb_change_hosts_address (const xcb_change_hosts_request_t *R); int xcb_change_hosts_address_length (const xcb_change_hosts_request_t *R); xcb_generic_iterator_t xcb_change_hosts_address_end (const xcb_change_hosts_request_t *R); int xcb_host_sizeof (const void *_buffer); uint8_t * xcb_host_address (const xcb_host_t *R); int xcb_host_address_length (const xcb_host_t *R); xcb_generic_iterator_t xcb_host_address_end (const xcb_host_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_host_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_host_t) */ void xcb_host_next (xcb_host_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_host_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_host_end (xcb_host_iterator_t i); int xcb_list_hosts_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_list_hosts_cookie_t xcb_list_hosts (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_list_hosts_cookie_t xcb_list_hosts_unchecked (xcb_connection_t *c); int xcb_list_hosts_hosts_length (const xcb_list_hosts_reply_t *R); xcb_host_iterator_t xcb_list_hosts_hosts_iterator (const xcb_list_hosts_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_list_hosts_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_list_hosts_reply_t * xcb_list_hosts_reply (xcb_connection_t *c, xcb_list_hosts_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_access_control_checked (xcb_connection_t *c, uint8_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_set_access_control (xcb_connection_t *c, uint8_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_set_close_down_mode_checked (xcb_connection_t *c, uint8_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_set_close_down_mode (xcb_connection_t *c, uint8_t mode); /** * @brief kills a client * * @param c The connection * @param resource Any resource belonging to the client (for example a Window), used to identify * the client connection. * \n * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients * that have terminated in `RetainTemporary` (TODO) are destroyed. * @return A cookie * * Forces a close down of the client that created the specified \a resource. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_kill_client_checked (xcb_connection_t *c, uint32_t resource); /** * @brief kills a client * * @param c The connection * @param resource Any resource belonging to the client (for example a Window), used to identify * the client connection. * \n * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients * that have terminated in `RetainTemporary` (TODO) are destroyed. * @return A cookie * * Forces a close down of the client that created the specified \a resource. * */ xcb_void_cookie_t xcb_kill_client (xcb_connection_t *c, uint32_t resource); int xcb_rotate_properties_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_rotate_properties_checked (xcb_connection_t *c, xcb_window_t window, uint16_t atoms_len, int16_t delta, const xcb_atom_t *atoms); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_rotate_properties (xcb_connection_t *c, xcb_window_t window, uint16_t atoms_len, int16_t delta, const xcb_atom_t *atoms); xcb_atom_t * xcb_rotate_properties_atoms (const xcb_rotate_properties_request_t *R); int xcb_rotate_properties_atoms_length (const xcb_rotate_properties_request_t *R); xcb_generic_iterator_t xcb_rotate_properties_atoms_end (const xcb_rotate_properties_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_force_screen_saver_checked (xcb_connection_t *c, uint8_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_force_screen_saver (xcb_connection_t *c, uint8_t mode); int xcb_set_pointer_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_set_pointer_mapping_cookie_t xcb_set_pointer_mapping (xcb_connection_t *c, uint8_t map_len, const uint8_t *map); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_set_pointer_mapping_cookie_t xcb_set_pointer_mapping_unchecked (xcb_connection_t *c, uint8_t map_len, const uint8_t *map); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_set_pointer_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_set_pointer_mapping_reply_t * xcb_set_pointer_mapping_reply (xcb_connection_t *c, xcb_set_pointer_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_get_pointer_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_pointer_mapping_cookie_t xcb_get_pointer_mapping (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_pointer_mapping_cookie_t xcb_get_pointer_mapping_unchecked (xcb_connection_t *c); uint8_t * xcb_get_pointer_mapping_map (const xcb_get_pointer_mapping_reply_t *R); int xcb_get_pointer_mapping_map_length (const xcb_get_pointer_mapping_reply_t *R); xcb_generic_iterator_t xcb_get_pointer_mapping_map_end (const xcb_get_pointer_mapping_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_pointer_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_pointer_mapping_reply_t * xcb_get_pointer_mapping_reply (xcb_connection_t *c, xcb_get_pointer_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_set_modifier_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_set_modifier_mapping_cookie_t xcb_set_modifier_mapping (xcb_connection_t *c, uint8_t keycodes_per_modifier, const xcb_keycode_t *keycodes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_set_modifier_mapping_cookie_t xcb_set_modifier_mapping_unchecked (xcb_connection_t *c, uint8_t keycodes_per_modifier, const xcb_keycode_t *keycodes); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_set_modifier_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_set_modifier_mapping_reply_t * xcb_set_modifier_mapping_reply (xcb_connection_t *c, xcb_set_modifier_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_get_modifier_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_get_modifier_mapping_cookie_t xcb_get_modifier_mapping (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_get_modifier_mapping_cookie_t xcb_get_modifier_mapping_unchecked (xcb_connection_t *c); xcb_keycode_t * xcb_get_modifier_mapping_keycodes (const xcb_get_modifier_mapping_reply_t *R); int xcb_get_modifier_mapping_keycodes_length (const xcb_get_modifier_mapping_reply_t *R); xcb_generic_iterator_t xcb_get_modifier_mapping_keycodes_end (const xcb_get_modifier_mapping_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_get_modifier_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_get_modifier_mapping_reply_t * xcb_get_modifier_mapping_reply (xcb_connection_t *c, xcb_get_modifier_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_no_operation_checked (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_no_operation (xcb_connection_t *c); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ 4 xcb/xfixes.hnu[/* * This file generated automatically from xfixes.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_XFixes_API XCB XFixes API * @brief XFixes XCB Protocol Implementation. * @{ **/ #ifndef __XFIXES_H #define __XFIXES_H #include "xcb.h" #include "xproto.h" #include "render.h" #include "shape.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XFIXES_MAJOR_VERSION 5 #define XCB_XFIXES_MINOR_VERSION 0 extern xcb_extension_t xcb_xfixes_id; /** * @brief xcb_xfixes_query_version_cookie_t **/ typedef struct xcb_xfixes_query_version_cookie_t { unsigned int sequence; } xcb_xfixes_query_version_cookie_t; /** Opcode for xcb_xfixes_query_version. */ #define XCB_XFIXES_QUERY_VERSION 0 /** * @brief xcb_xfixes_query_version_request_t **/ typedef struct xcb_xfixes_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t client_major_version; uint32_t client_minor_version; } xcb_xfixes_query_version_request_t; /** * @brief xcb_xfixes_query_version_reply_t **/ typedef struct xcb_xfixes_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; uint8_t pad1[16]; } xcb_xfixes_query_version_reply_t; typedef enum xcb_xfixes_save_set_mode_t { XCB_XFIXES_SAVE_SET_MODE_INSERT = 0, XCB_XFIXES_SAVE_SET_MODE_DELETE = 1 } xcb_xfixes_save_set_mode_t; typedef enum xcb_xfixes_save_set_target_t { XCB_XFIXES_SAVE_SET_TARGET_NEAREST = 0, XCB_XFIXES_SAVE_SET_TARGET_ROOT = 1 } xcb_xfixes_save_set_target_t; typedef enum xcb_xfixes_save_set_mapping_t { XCB_XFIXES_SAVE_SET_MAPPING_MAP = 0, XCB_XFIXES_SAVE_SET_MAPPING_UNMAP = 1 } xcb_xfixes_save_set_mapping_t; /** Opcode for xcb_xfixes_change_save_set. */ #define XCB_XFIXES_CHANGE_SAVE_SET 1 /** * @brief xcb_xfixes_change_save_set_request_t **/ typedef struct xcb_xfixes_change_save_set_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t mode; uint8_t target; uint8_t map; uint8_t pad0; xcb_window_t window; } xcb_xfixes_change_save_set_request_t; typedef enum xcb_xfixes_selection_event_t { XCB_XFIXES_SELECTION_EVENT_SET_SELECTION_OWNER = 0, XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY = 1, XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE = 2 } xcb_xfixes_selection_event_t; typedef enum xcb_xfixes_selection_event_mask_t { XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER = 1, XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY = 2, XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE = 4 } xcb_xfixes_selection_event_mask_t; /** Opcode for xcb_xfixes_selection_notify. */ #define XCB_XFIXES_SELECTION_NOTIFY 0 /** * @brief xcb_xfixes_selection_notify_event_t **/ typedef struct xcb_xfixes_selection_notify_event_t { uint8_t response_type; uint8_t subtype; uint16_t sequence; xcb_window_t window; xcb_window_t owner; xcb_atom_t selection; xcb_timestamp_t timestamp; xcb_timestamp_t selection_timestamp; uint8_t pad0[8]; } xcb_xfixes_selection_notify_event_t; /** Opcode for xcb_xfixes_select_selection_input. */ #define XCB_XFIXES_SELECT_SELECTION_INPUT 2 /** * @brief xcb_xfixes_select_selection_input_request_t **/ typedef struct xcb_xfixes_select_selection_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_atom_t selection; uint32_t event_mask; } xcb_xfixes_select_selection_input_request_t; typedef enum xcb_xfixes_cursor_notify_t { XCB_XFIXES_CURSOR_NOTIFY_DISPLAY_CURSOR = 0 } xcb_xfixes_cursor_notify_t; typedef enum xcb_xfixes_cursor_notify_mask_t { XCB_XFIXES_CURSOR_NOTIFY_MASK_DISPLAY_CURSOR = 1 } xcb_xfixes_cursor_notify_mask_t; /** Opcode for xcb_xfixes_cursor_notify. */ #define XCB_XFIXES_CURSOR_NOTIFY 1 /** * @brief xcb_xfixes_cursor_notify_event_t **/ typedef struct xcb_xfixes_cursor_notify_event_t { uint8_t response_type; uint8_t subtype; uint16_t sequence; xcb_window_t window; uint32_t cursor_serial; xcb_timestamp_t timestamp; xcb_atom_t name; uint8_t pad0[12]; } xcb_xfixes_cursor_notify_event_t; /** Opcode for xcb_xfixes_select_cursor_input. */ #define XCB_XFIXES_SELECT_CURSOR_INPUT 3 /** * @brief xcb_xfixes_select_cursor_input_request_t **/ typedef struct xcb_xfixes_select_cursor_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint32_t event_mask; } xcb_xfixes_select_cursor_input_request_t; /** * @brief xcb_xfixes_get_cursor_image_cookie_t **/ typedef struct xcb_xfixes_get_cursor_image_cookie_t { unsigned int sequence; } xcb_xfixes_get_cursor_image_cookie_t; /** Opcode for xcb_xfixes_get_cursor_image. */ #define XCB_XFIXES_GET_CURSOR_IMAGE 4 /** * @brief xcb_xfixes_get_cursor_image_request_t **/ typedef struct xcb_xfixes_get_cursor_image_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xfixes_get_cursor_image_request_t; /** * @brief xcb_xfixes_get_cursor_image_reply_t **/ typedef struct xcb_xfixes_get_cursor_image_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t xhot; uint16_t yhot; uint32_t cursor_serial; uint8_t pad1[8]; } xcb_xfixes_get_cursor_image_reply_t; typedef uint32_t xcb_xfixes_region_t; /** * @brief xcb_xfixes_region_iterator_t **/ typedef struct xcb_xfixes_region_iterator_t { xcb_xfixes_region_t *data; int rem; int index; } xcb_xfixes_region_iterator_t; /** Opcode for xcb_xfixes_bad_region. */ #define XCB_XFIXES_BAD_REGION 0 /** * @brief xcb_xfixes_bad_region_error_t **/ typedef struct xcb_xfixes_bad_region_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_xfixes_bad_region_error_t; typedef enum xcb_xfixes_region_enum_t { XCB_XFIXES_REGION_NONE = 0 } xcb_xfixes_region_enum_t; /** Opcode for xcb_xfixes_create_region. */ #define XCB_XFIXES_CREATE_REGION 5 /** * @brief xcb_xfixes_create_region_request_t **/ typedef struct xcb_xfixes_create_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; } xcb_xfixes_create_region_request_t; /** Opcode for xcb_xfixes_create_region_from_bitmap. */ #define XCB_XFIXES_CREATE_REGION_FROM_BITMAP 6 /** * @brief xcb_xfixes_create_region_from_bitmap_request_t **/ typedef struct xcb_xfixes_create_region_from_bitmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; xcb_pixmap_t bitmap; } xcb_xfixes_create_region_from_bitmap_request_t; /** Opcode for xcb_xfixes_create_region_from_window. */ #define XCB_XFIXES_CREATE_REGION_FROM_WINDOW 7 /** * @brief xcb_xfixes_create_region_from_window_request_t **/ typedef struct xcb_xfixes_create_region_from_window_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; xcb_window_t window; xcb_shape_kind_t kind; uint8_t pad0[3]; } xcb_xfixes_create_region_from_window_request_t; /** Opcode for xcb_xfixes_create_region_from_gc. */ #define XCB_XFIXES_CREATE_REGION_FROM_GC 8 /** * @brief xcb_xfixes_create_region_from_gc_request_t **/ typedef struct xcb_xfixes_create_region_from_gc_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; xcb_gcontext_t gc; } xcb_xfixes_create_region_from_gc_request_t; /** Opcode for xcb_xfixes_create_region_from_picture. */ #define XCB_XFIXES_CREATE_REGION_FROM_PICTURE 9 /** * @brief xcb_xfixes_create_region_from_picture_request_t **/ typedef struct xcb_xfixes_create_region_from_picture_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; xcb_render_picture_t picture; } xcb_xfixes_create_region_from_picture_request_t; /** Opcode for xcb_xfixes_destroy_region. */ #define XCB_XFIXES_DESTROY_REGION 10 /** * @brief xcb_xfixes_destroy_region_request_t **/ typedef struct xcb_xfixes_destroy_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; } xcb_xfixes_destroy_region_request_t; /** Opcode for xcb_xfixes_set_region. */ #define XCB_XFIXES_SET_REGION 11 /** * @brief xcb_xfixes_set_region_request_t **/ typedef struct xcb_xfixes_set_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; } xcb_xfixes_set_region_request_t; /** Opcode for xcb_xfixes_copy_region. */ #define XCB_XFIXES_COPY_REGION 12 /** * @brief xcb_xfixes_copy_region_request_t **/ typedef struct xcb_xfixes_copy_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t source; xcb_xfixes_region_t destination; } xcb_xfixes_copy_region_request_t; /** Opcode for xcb_xfixes_union_region. */ #define XCB_XFIXES_UNION_REGION 13 /** * @brief xcb_xfixes_union_region_request_t **/ typedef struct xcb_xfixes_union_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t source1; xcb_xfixes_region_t source2; xcb_xfixes_region_t destination; } xcb_xfixes_union_region_request_t; /** Opcode for xcb_xfixes_intersect_region. */ #define XCB_XFIXES_INTERSECT_REGION 14 /** * @brief xcb_xfixes_intersect_region_request_t **/ typedef struct xcb_xfixes_intersect_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t source1; xcb_xfixes_region_t source2; xcb_xfixes_region_t destination; } xcb_xfixes_intersect_region_request_t; /** Opcode for xcb_xfixes_subtract_region. */ #define XCB_XFIXES_SUBTRACT_REGION 15 /** * @brief xcb_xfixes_subtract_region_request_t **/ typedef struct xcb_xfixes_subtract_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t source1; xcb_xfixes_region_t source2; xcb_xfixes_region_t destination; } xcb_xfixes_subtract_region_request_t; /** Opcode for xcb_xfixes_invert_region. */ #define XCB_XFIXES_INVERT_REGION 16 /** * @brief xcb_xfixes_invert_region_request_t **/ typedef struct xcb_xfixes_invert_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t source; xcb_rectangle_t bounds; xcb_xfixes_region_t destination; } xcb_xfixes_invert_region_request_t; /** Opcode for xcb_xfixes_translate_region. */ #define XCB_XFIXES_TRANSLATE_REGION 17 /** * @brief xcb_xfixes_translate_region_request_t **/ typedef struct xcb_xfixes_translate_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; int16_t dx; int16_t dy; } xcb_xfixes_translate_region_request_t; /** Opcode for xcb_xfixes_region_extents. */ #define XCB_XFIXES_REGION_EXTENTS 18 /** * @brief xcb_xfixes_region_extents_request_t **/ typedef struct xcb_xfixes_region_extents_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t source; xcb_xfixes_region_t destination; } xcb_xfixes_region_extents_request_t; /** * @brief xcb_xfixes_fetch_region_cookie_t **/ typedef struct xcb_xfixes_fetch_region_cookie_t { unsigned int sequence; } xcb_xfixes_fetch_region_cookie_t; /** Opcode for xcb_xfixes_fetch_region. */ #define XCB_XFIXES_FETCH_REGION 19 /** * @brief xcb_xfixes_fetch_region_request_t **/ typedef struct xcb_xfixes_fetch_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; } xcb_xfixes_fetch_region_request_t; /** * @brief xcb_xfixes_fetch_region_reply_t **/ typedef struct xcb_xfixes_fetch_region_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_rectangle_t extents; uint8_t pad1[16]; } xcb_xfixes_fetch_region_reply_t; /** Opcode for xcb_xfixes_set_gc_clip_region. */ #define XCB_XFIXES_SET_GC_CLIP_REGION 20 /** * @brief xcb_xfixes_set_gc_clip_region_request_t **/ typedef struct xcb_xfixes_set_gc_clip_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_gcontext_t gc; xcb_xfixes_region_t region; int16_t x_origin; int16_t y_origin; } xcb_xfixes_set_gc_clip_region_request_t; /** Opcode for xcb_xfixes_set_window_shape_region. */ #define XCB_XFIXES_SET_WINDOW_SHAPE_REGION 21 /** * @brief xcb_xfixes_set_window_shape_region_request_t **/ typedef struct xcb_xfixes_set_window_shape_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t dest; xcb_shape_kind_t dest_kind; uint8_t pad0[3]; int16_t x_offset; int16_t y_offset; xcb_xfixes_region_t region; } xcb_xfixes_set_window_shape_region_request_t; /** Opcode for xcb_xfixes_set_picture_clip_region. */ #define XCB_XFIXES_SET_PICTURE_CLIP_REGION 22 /** * @brief xcb_xfixes_set_picture_clip_region_request_t **/ typedef struct xcb_xfixes_set_picture_clip_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; xcb_xfixes_region_t region; int16_t x_origin; int16_t y_origin; } xcb_xfixes_set_picture_clip_region_request_t; /** Opcode for xcb_xfixes_set_cursor_name. */ #define XCB_XFIXES_SET_CURSOR_NAME 23 /** * @brief xcb_xfixes_set_cursor_name_request_t **/ typedef struct xcb_xfixes_set_cursor_name_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_cursor_t cursor; uint16_t nbytes; uint8_t pad0[2]; } xcb_xfixes_set_cursor_name_request_t; /** * @brief xcb_xfixes_get_cursor_name_cookie_t **/ typedef struct xcb_xfixes_get_cursor_name_cookie_t { unsigned int sequence; } xcb_xfixes_get_cursor_name_cookie_t; /** Opcode for xcb_xfixes_get_cursor_name. */ #define XCB_XFIXES_GET_CURSOR_NAME 24 /** * @brief xcb_xfixes_get_cursor_name_request_t **/ typedef struct xcb_xfixes_get_cursor_name_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_cursor_t cursor; } xcb_xfixes_get_cursor_name_request_t; /** * @brief xcb_xfixes_get_cursor_name_reply_t **/ typedef struct xcb_xfixes_get_cursor_name_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_atom_t atom; uint16_t nbytes; uint8_t pad1[18]; } xcb_xfixes_get_cursor_name_reply_t; /** * @brief xcb_xfixes_get_cursor_image_and_name_cookie_t **/ typedef struct xcb_xfixes_get_cursor_image_and_name_cookie_t { unsigned int sequence; } xcb_xfixes_get_cursor_image_and_name_cookie_t; /** Opcode for xcb_xfixes_get_cursor_image_and_name. */ #define XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME 25 /** * @brief xcb_xfixes_get_cursor_image_and_name_request_t **/ typedef struct xcb_xfixes_get_cursor_image_and_name_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xfixes_get_cursor_image_and_name_request_t; /** * @brief xcb_xfixes_get_cursor_image_and_name_reply_t **/ typedef struct xcb_xfixes_get_cursor_image_and_name_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t xhot; uint16_t yhot; uint32_t cursor_serial; xcb_atom_t cursor_atom; uint16_t nbytes; uint8_t pad1[2]; } xcb_xfixes_get_cursor_image_and_name_reply_t; /** Opcode for xcb_xfixes_change_cursor. */ #define XCB_XFIXES_CHANGE_CURSOR 26 /** * @brief xcb_xfixes_change_cursor_request_t **/ typedef struct xcb_xfixes_change_cursor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_cursor_t source; xcb_cursor_t destination; } xcb_xfixes_change_cursor_request_t; /** Opcode for xcb_xfixes_change_cursor_by_name. */ #define XCB_XFIXES_CHANGE_CURSOR_BY_NAME 27 /** * @brief xcb_xfixes_change_cursor_by_name_request_t **/ typedef struct xcb_xfixes_change_cursor_by_name_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_cursor_t src; uint16_t nbytes; uint8_t pad0[2]; } xcb_xfixes_change_cursor_by_name_request_t; /** Opcode for xcb_xfixes_expand_region. */ #define XCB_XFIXES_EXPAND_REGION 28 /** * @brief xcb_xfixes_expand_region_request_t **/ typedef struct xcb_xfixes_expand_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t source; xcb_xfixes_region_t destination; uint16_t left; uint16_t right; uint16_t top; uint16_t bottom; } xcb_xfixes_expand_region_request_t; /** Opcode for xcb_xfixes_hide_cursor. */ #define XCB_XFIXES_HIDE_CURSOR 29 /** * @brief xcb_xfixes_hide_cursor_request_t **/ typedef struct xcb_xfixes_hide_cursor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_xfixes_hide_cursor_request_t; /** Opcode for xcb_xfixes_show_cursor. */ #define XCB_XFIXES_SHOW_CURSOR 30 /** * @brief xcb_xfixes_show_cursor_request_t **/ typedef struct xcb_xfixes_show_cursor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_xfixes_show_cursor_request_t; typedef uint32_t xcb_xfixes_barrier_t; /** * @brief xcb_xfixes_barrier_iterator_t **/ typedef struct xcb_xfixes_barrier_iterator_t { xcb_xfixes_barrier_t *data; int rem; int index; } xcb_xfixes_barrier_iterator_t; typedef enum xcb_xfixes_barrier_directions_t { XCB_XFIXES_BARRIER_DIRECTIONS_POSITIVE_X = 1, XCB_XFIXES_BARRIER_DIRECTIONS_POSITIVE_Y = 2, XCB_XFIXES_BARRIER_DIRECTIONS_NEGATIVE_X = 4, XCB_XFIXES_BARRIER_DIRECTIONS_NEGATIVE_Y = 8 } xcb_xfixes_barrier_directions_t; /** Opcode for xcb_xfixes_create_pointer_barrier. */ #define XCB_XFIXES_CREATE_POINTER_BARRIER 31 /** * @brief xcb_xfixes_create_pointer_barrier_request_t **/ typedef struct xcb_xfixes_create_pointer_barrier_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_barrier_t barrier; xcb_window_t window; uint16_t x1; uint16_t y1; uint16_t x2; uint16_t y2; uint32_t directions; uint8_t pad0[2]; uint16_t num_devices; } xcb_xfixes_create_pointer_barrier_request_t; /** Opcode for xcb_xfixes_delete_pointer_barrier. */ #define XCB_XFIXES_DELETE_POINTER_BARRIER 32 /** * @brief xcb_xfixes_delete_pointer_barrier_request_t **/ typedef struct xcb_xfixes_delete_pointer_barrier_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_barrier_t barrier; } xcb_xfixes_delete_pointer_barrier_request_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version_unchecked (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xfixes_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xfixes_query_version_reply_t * xcb_xfixes_query_version_reply (xcb_connection_t *c, xcb_xfixes_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_change_save_set_checked (xcb_connection_t *c, uint8_t mode, uint8_t target, uint8_t map, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_change_save_set (xcb_connection_t *c, uint8_t mode, uint8_t target, uint8_t map, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_select_selection_input_checked (xcb_connection_t *c, xcb_window_t window, xcb_atom_t selection, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_select_selection_input (xcb_connection_t *c, xcb_window_t window, xcb_atom_t selection, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c, xcb_window_t window, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_select_cursor_input (xcb_connection_t *c, xcb_window_t window, uint32_t event_mask); int xcb_xfixes_get_cursor_image_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c); uint32_t * xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R); int xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R); xcb_generic_iterator_t xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xfixes_get_cursor_image_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xfixes_get_cursor_image_reply_t * xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c, xcb_xfixes_get_cursor_image_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_xfixes_region_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xfixes_region_t) */ void xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xfixes_region_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i); int xcb_xfixes_create_region_sizeof (const void *_buffer, uint32_t rectangles_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_create_region_checked (xcb_connection_t *c, xcb_xfixes_region_t region, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_create_region (xcb_connection_t *c, xcb_xfixes_region_t region, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); xcb_rectangle_t * xcb_xfixes_create_region_rectangles (const xcb_xfixes_create_region_request_t *R); int xcb_xfixes_create_region_rectangles_length (const xcb_xfixes_create_region_request_t *R); xcb_rectangle_iterator_t xcb_xfixes_create_region_rectangles_iterator (const xcb_xfixes_create_region_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_pixmap_t bitmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_pixmap_t bitmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_window_t window, xcb_shape_kind_t kind); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_create_region_from_window (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_window_t window, xcb_shape_kind_t kind); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_gcontext_t gc); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_create_region_from_gc (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_gcontext_t gc); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_render_picture_t picture); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_create_region_from_picture (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_render_picture_t picture); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_destroy_region_checked (xcb_connection_t *c, xcb_xfixes_region_t region); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_destroy_region (xcb_connection_t *c, xcb_xfixes_region_t region); int xcb_xfixes_set_region_sizeof (const void *_buffer, uint32_t rectangles_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_set_region_checked (xcb_connection_t *c, xcb_xfixes_region_t region, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_set_region (xcb_connection_t *c, xcb_xfixes_region_t region, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); xcb_rectangle_t * xcb_xfixes_set_region_rectangles (const xcb_xfixes_set_region_request_t *R); int xcb_xfixes_set_region_rectangles_length (const xcb_xfixes_set_region_request_t *R); xcb_rectangle_iterator_t xcb_xfixes_set_region_rectangles_iterator (const xcb_xfixes_set_region_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_copy_region_checked (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_copy_region (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_union_region_checked (xcb_connection_t *c, xcb_xfixes_region_t source1, xcb_xfixes_region_t source2, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_union_region (xcb_connection_t *c, xcb_xfixes_region_t source1, xcb_xfixes_region_t source2, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_intersect_region_checked (xcb_connection_t *c, xcb_xfixes_region_t source1, xcb_xfixes_region_t source2, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_intersect_region (xcb_connection_t *c, xcb_xfixes_region_t source1, xcb_xfixes_region_t source2, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_subtract_region_checked (xcb_connection_t *c, xcb_xfixes_region_t source1, xcb_xfixes_region_t source2, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_subtract_region (xcb_connection_t *c, xcb_xfixes_region_t source1, xcb_xfixes_region_t source2, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_invert_region_checked (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_rectangle_t bounds, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_invert_region (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_rectangle_t bounds, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_translate_region_checked (xcb_connection_t *c, xcb_xfixes_region_t region, int16_t dx, int16_t dy); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_translate_region (xcb_connection_t *c, xcb_xfixes_region_t region, int16_t dx, int16_t dy); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_region_extents_checked (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_xfixes_region_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_region_extents (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_xfixes_region_t destination); int xcb_xfixes_fetch_region_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region (xcb_connection_t *c, xcb_xfixes_region_t region); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c, xcb_xfixes_region_t region); xcb_rectangle_t * xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R); int xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R); xcb_rectangle_iterator_t xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xfixes_fetch_region_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xfixes_fetch_region_reply_t * xcb_xfixes_fetch_region_reply (xcb_connection_t *c, xcb_xfixes_fetch_region_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c, xcb_gcontext_t gc, xcb_xfixes_region_t region, int16_t x_origin, int16_t y_origin); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_set_gc_clip_region (xcb_connection_t *c, xcb_gcontext_t gc, xcb_xfixes_region_t region, int16_t x_origin, int16_t y_origin); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c, xcb_window_t dest, xcb_shape_kind_t dest_kind, int16_t x_offset, int16_t y_offset, xcb_xfixes_region_t region); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_set_window_shape_region (xcb_connection_t *c, xcb_window_t dest, xcb_shape_kind_t dest_kind, int16_t x_offset, int16_t y_offset, xcb_xfixes_region_t region); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c, xcb_render_picture_t picture, xcb_xfixes_region_t region, int16_t x_origin, int16_t y_origin); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_set_picture_clip_region (xcb_connection_t *c, xcb_render_picture_t picture, xcb_xfixes_region_t region, int16_t x_origin, int16_t y_origin); int xcb_xfixes_set_cursor_name_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c, xcb_cursor_t cursor, uint16_t nbytes, const char *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_set_cursor_name (xcb_connection_t *c, xcb_cursor_t cursor, uint16_t nbytes, const char *name); char * xcb_xfixes_set_cursor_name_name (const xcb_xfixes_set_cursor_name_request_t *R); int xcb_xfixes_set_cursor_name_name_length (const xcb_xfixes_set_cursor_name_request_t *R); xcb_generic_iterator_t xcb_xfixes_set_cursor_name_name_end (const xcb_xfixes_set_cursor_name_request_t *R); int xcb_xfixes_get_cursor_name_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name (xcb_connection_t *c, xcb_cursor_t cursor); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c, xcb_cursor_t cursor); char * xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R); int xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R); xcb_generic_iterator_t xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xfixes_get_cursor_name_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xfixes_get_cursor_name_reply_t * xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c, xcb_xfixes_get_cursor_name_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c); uint32_t * xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); int xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); char * xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); int xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xfixes_get_cursor_image_and_name_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xfixes_get_cursor_image_and_name_reply_t * xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c, xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_change_cursor_checked (xcb_connection_t *c, xcb_cursor_t source, xcb_cursor_t destination); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_change_cursor (xcb_connection_t *c, xcb_cursor_t source, xcb_cursor_t destination); int xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c, xcb_cursor_t src, uint16_t nbytes, const char *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_change_cursor_by_name (xcb_connection_t *c, xcb_cursor_t src, uint16_t nbytes, const char *name); char * xcb_xfixes_change_cursor_by_name_name (const xcb_xfixes_change_cursor_by_name_request_t *R); int xcb_xfixes_change_cursor_by_name_name_length (const xcb_xfixes_change_cursor_by_name_request_t *R); xcb_generic_iterator_t xcb_xfixes_change_cursor_by_name_name_end (const xcb_xfixes_change_cursor_by_name_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_expand_region_checked (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_xfixes_region_t destination, uint16_t left, uint16_t right, uint16_t top, uint16_t bottom); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_expand_region (xcb_connection_t *c, xcb_xfixes_region_t source, xcb_xfixes_region_t destination, uint16_t left, uint16_t right, uint16_t top, uint16_t bottom); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_hide_cursor_checked (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_hide_cursor (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_show_cursor_checked (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_show_cursor (xcb_connection_t *c, xcb_window_t window); /** * Get the next element of the iterator * @param i Pointer to a xcb_xfixes_barrier_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xfixes_barrier_t) */ void xcb_xfixes_barrier_next (xcb_xfixes_barrier_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xfixes_barrier_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xfixes_barrier_end (xcb_xfixes_barrier_iterator_t i); int xcb_xfixes_create_pointer_barrier_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_create_pointer_barrier_checked (xcb_connection_t *c, xcb_xfixes_barrier_t barrier, xcb_window_t window, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint32_t directions, uint16_t num_devices, const uint16_t *devices); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_create_pointer_barrier (xcb_connection_t *c, xcb_xfixes_barrier_t barrier, xcb_window_t window, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint32_t directions, uint16_t num_devices, const uint16_t *devices); uint16_t * xcb_xfixes_create_pointer_barrier_devices (const xcb_xfixes_create_pointer_barrier_request_t *R); int xcb_xfixes_create_pointer_barrier_devices_length (const xcb_xfixes_create_pointer_barrier_request_t *R); xcb_generic_iterator_t xcb_xfixes_create_pointer_barrier_devices_end (const xcb_xfixes_create_pointer_barrier_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xfixes_delete_pointer_barrier_checked (xcb_connection_t *c, xcb_xfixes_barrier_t barrier); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xfixes_delete_pointer_barrier (xcb_connection_t *c, xcb_xfixes_barrier_t barrier); #ifdef __cplusplus } #endif #endif /** * @} */ PKZMFQFQ xcb/shape.hnu[/* * This file generated automatically from shape.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Shape_API XCB Shape API * @brief Shape XCB Protocol Implementation. * @{ **/ #ifndef __SHAPE_H #define __SHAPE_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_SHAPE_MAJOR_VERSION 1 #define XCB_SHAPE_MINOR_VERSION 1 extern xcb_extension_t xcb_shape_id; typedef uint8_t xcb_shape_op_t; /** * @brief xcb_shape_op_iterator_t **/ typedef struct xcb_shape_op_iterator_t { xcb_shape_op_t *data; int rem; int index; } xcb_shape_op_iterator_t; typedef uint8_t xcb_shape_kind_t; /** * @brief xcb_shape_kind_iterator_t **/ typedef struct xcb_shape_kind_iterator_t { xcb_shape_kind_t *data; int rem; int index; } xcb_shape_kind_iterator_t; typedef enum xcb_shape_so_t { XCB_SHAPE_SO_SET = 0, XCB_SHAPE_SO_UNION = 1, XCB_SHAPE_SO_INTERSECT = 2, XCB_SHAPE_SO_SUBTRACT = 3, XCB_SHAPE_SO_INVERT = 4 } xcb_shape_so_t; typedef enum xcb_shape_sk_t { XCB_SHAPE_SK_BOUNDING = 0, XCB_SHAPE_SK_CLIP = 1, XCB_SHAPE_SK_INPUT = 2 } xcb_shape_sk_t; /** Opcode for xcb_shape_notify. */ #define XCB_SHAPE_NOTIFY 0 /** * @brief xcb_shape_notify_event_t **/ typedef struct xcb_shape_notify_event_t { uint8_t response_type; xcb_shape_kind_t shape_kind; uint16_t sequence; xcb_window_t affected_window; int16_t extents_x; int16_t extents_y; uint16_t extents_width; uint16_t extents_height; xcb_timestamp_t server_time; uint8_t shaped; uint8_t pad0[11]; } xcb_shape_notify_event_t; /** * @brief xcb_shape_query_version_cookie_t **/ typedef struct xcb_shape_query_version_cookie_t { unsigned int sequence; } xcb_shape_query_version_cookie_t; /** Opcode for xcb_shape_query_version. */ #define XCB_SHAPE_QUERY_VERSION 0 /** * @brief xcb_shape_query_version_request_t **/ typedef struct xcb_shape_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_shape_query_version_request_t; /** * @brief xcb_shape_query_version_reply_t **/ typedef struct xcb_shape_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t major_version; uint16_t minor_version; } xcb_shape_query_version_reply_t; /** Opcode for xcb_shape_rectangles. */ #define XCB_SHAPE_RECTANGLES 1 /** * @brief xcb_shape_rectangles_request_t **/ typedef struct xcb_shape_rectangles_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shape_op_t operation; xcb_shape_kind_t destination_kind; uint8_t ordering; uint8_t pad0; xcb_window_t destination_window; int16_t x_offset; int16_t y_offset; } xcb_shape_rectangles_request_t; /** Opcode for xcb_shape_mask. */ #define XCB_SHAPE_MASK 2 /** * @brief xcb_shape_mask_request_t **/ typedef struct xcb_shape_mask_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shape_op_t operation; xcb_shape_kind_t destination_kind; uint8_t pad0[2]; xcb_window_t destination_window; int16_t x_offset; int16_t y_offset; xcb_pixmap_t source_bitmap; } xcb_shape_mask_request_t; /** Opcode for xcb_shape_combine. */ #define XCB_SHAPE_COMBINE 3 /** * @brief xcb_shape_combine_request_t **/ typedef struct xcb_shape_combine_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shape_op_t operation; xcb_shape_kind_t destination_kind; xcb_shape_kind_t source_kind; uint8_t pad0; xcb_window_t destination_window; int16_t x_offset; int16_t y_offset; xcb_window_t source_window; } xcb_shape_combine_request_t; /** Opcode for xcb_shape_offset. */ #define XCB_SHAPE_OFFSET 4 /** * @brief xcb_shape_offset_request_t **/ typedef struct xcb_shape_offset_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shape_kind_t destination_kind; uint8_t pad0[3]; xcb_window_t destination_window; int16_t x_offset; int16_t y_offset; } xcb_shape_offset_request_t; /** * @brief xcb_shape_query_extents_cookie_t **/ typedef struct xcb_shape_query_extents_cookie_t { unsigned int sequence; } xcb_shape_query_extents_cookie_t; /** Opcode for xcb_shape_query_extents. */ #define XCB_SHAPE_QUERY_EXTENTS 5 /** * @brief xcb_shape_query_extents_request_t **/ typedef struct xcb_shape_query_extents_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t destination_window; } xcb_shape_query_extents_request_t; /** * @brief xcb_shape_query_extents_reply_t **/ typedef struct xcb_shape_query_extents_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t bounding_shaped; uint8_t clip_shaped; uint8_t pad1[2]; int16_t bounding_shape_extents_x; int16_t bounding_shape_extents_y; uint16_t bounding_shape_extents_width; uint16_t bounding_shape_extents_height; int16_t clip_shape_extents_x; int16_t clip_shape_extents_y; uint16_t clip_shape_extents_width; uint16_t clip_shape_extents_height; } xcb_shape_query_extents_reply_t; /** Opcode for xcb_shape_select_input. */ #define XCB_SHAPE_SELECT_INPUT 6 /** * @brief xcb_shape_select_input_request_t **/ typedef struct xcb_shape_select_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t destination_window; uint8_t enable; uint8_t pad0[3]; } xcb_shape_select_input_request_t; /** * @brief xcb_shape_input_selected_cookie_t **/ typedef struct xcb_shape_input_selected_cookie_t { unsigned int sequence; } xcb_shape_input_selected_cookie_t; /** Opcode for xcb_shape_input_selected. */ #define XCB_SHAPE_INPUT_SELECTED 7 /** * @brief xcb_shape_input_selected_request_t **/ typedef struct xcb_shape_input_selected_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t destination_window; } xcb_shape_input_selected_request_t; /** * @brief xcb_shape_input_selected_reply_t **/ typedef struct xcb_shape_input_selected_reply_t { uint8_t response_type; uint8_t enabled; uint16_t sequence; uint32_t length; } xcb_shape_input_selected_reply_t; /** * @brief xcb_shape_get_rectangles_cookie_t **/ typedef struct xcb_shape_get_rectangles_cookie_t { unsigned int sequence; } xcb_shape_get_rectangles_cookie_t; /** Opcode for xcb_shape_get_rectangles. */ #define XCB_SHAPE_GET_RECTANGLES 8 /** * @brief xcb_shape_get_rectangles_request_t **/ typedef struct xcb_shape_get_rectangles_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_shape_kind_t source_kind; uint8_t pad0[3]; } xcb_shape_get_rectangles_request_t; /** * @brief xcb_shape_get_rectangles_reply_t **/ typedef struct xcb_shape_get_rectangles_reply_t { uint8_t response_type; uint8_t ordering; uint16_t sequence; uint32_t length; uint32_t rectangles_len; uint8_t pad0[20]; } xcb_shape_get_rectangles_reply_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_shape_op_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_shape_op_t) */ void xcb_shape_op_next (xcb_shape_op_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_shape_op_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_shape_op_end (xcb_shape_op_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_shape_kind_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_shape_kind_t) */ void xcb_shape_kind_next (xcb_shape_kind_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_shape_kind_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_shape_kind_end (xcb_shape_kind_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_shape_query_version_cookie_t xcb_shape_query_version (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_shape_query_version_cookie_t xcb_shape_query_version_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_shape_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_shape_query_version_reply_t * xcb_shape_query_version_reply (xcb_connection_t *c, xcb_shape_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_shape_rectangles_sizeof (const void *_buffer, uint32_t rectangles_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shape_rectangles_checked (xcb_connection_t *c, xcb_shape_op_t operation, xcb_shape_kind_t destination_kind, uint8_t ordering, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shape_rectangles (xcb_connection_t *c, xcb_shape_op_t operation, xcb_shape_kind_t destination_kind, uint8_t ordering, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); xcb_rectangle_t * xcb_shape_rectangles_rectangles (const xcb_shape_rectangles_request_t *R); int xcb_shape_rectangles_rectangles_length (const xcb_shape_rectangles_request_t *R); xcb_rectangle_iterator_t xcb_shape_rectangles_rectangles_iterator (const xcb_shape_rectangles_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shape_mask_checked (xcb_connection_t *c, xcb_shape_op_t operation, xcb_shape_kind_t destination_kind, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset, xcb_pixmap_t source_bitmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shape_mask (xcb_connection_t *c, xcb_shape_op_t operation, xcb_shape_kind_t destination_kind, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset, xcb_pixmap_t source_bitmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shape_combine_checked (xcb_connection_t *c, xcb_shape_op_t operation, xcb_shape_kind_t destination_kind, xcb_shape_kind_t source_kind, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset, xcb_window_t source_window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shape_combine (xcb_connection_t *c, xcb_shape_op_t operation, xcb_shape_kind_t destination_kind, xcb_shape_kind_t source_kind, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset, xcb_window_t source_window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shape_offset_checked (xcb_connection_t *c, xcb_shape_kind_t destination_kind, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shape_offset (xcb_connection_t *c, xcb_shape_kind_t destination_kind, xcb_window_t destination_window, int16_t x_offset, int16_t y_offset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_shape_query_extents_cookie_t xcb_shape_query_extents (xcb_connection_t *c, xcb_window_t destination_window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked (xcb_connection_t *c, xcb_window_t destination_window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_shape_query_extents_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_shape_query_extents_reply_t * xcb_shape_query_extents_reply (xcb_connection_t *c, xcb_shape_query_extents_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shape_select_input_checked (xcb_connection_t *c, xcb_window_t destination_window, uint8_t enable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shape_select_input (xcb_connection_t *c, xcb_window_t destination_window, uint8_t enable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_shape_input_selected_cookie_t xcb_shape_input_selected (xcb_connection_t *c, xcb_window_t destination_window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked (xcb_connection_t *c, xcb_window_t destination_window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_shape_input_selected_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_shape_input_selected_reply_t * xcb_shape_input_selected_reply (xcb_connection_t *c, xcb_shape_input_selected_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_shape_get_rectangles_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles (xcb_connection_t *c, xcb_window_t window, xcb_shape_kind_t source_kind); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_shape_kind_t source_kind); xcb_rectangle_t * xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R); int xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R); xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_shape_get_rectangles_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply (xcb_connection_t *c, xcb_shape_get_rectangles_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZQSS xcb/xcb.hnu[/* * Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the names of the authors or their * institutions shall not be used in advertising or otherwise to promote the * sale, use or other dealings in this Software without prior written * authorization from the authors. */ #ifndef __XCB_H__ #define __XCB_H__ #include #if defined(__solaris__) #include #else #include #endif #ifndef _WIN32 #include #else #include "xcb_windefs.h" #endif #include #ifdef __cplusplus extern "C" { #endif /** * @file xcb.h */ #define XCB_PACKED __attribute__((__packed__)) /** * @defgroup XCB_Core_API XCB Core API * @brief Core API of the XCB library. * * @{ */ /* Pre-defined constants */ /** Current protocol version */ #define X_PROTOCOL 11 /** Current minor version */ #define X_PROTOCOL_REVISION 0 /** X_TCP_PORT + display number = server port for TCP transport */ #define X_TCP_PORT 6000 /** xcb connection errors because of socket, pipe and other stream errors. */ #define XCB_CONN_ERROR 1 /** xcb connection shutdown because of extension not supported */ #define XCB_CONN_CLOSED_EXT_NOTSUPPORTED 2 /** malloc(), calloc() and realloc() error upon failure, for eg ENOMEM */ #define XCB_CONN_CLOSED_MEM_INSUFFICIENT 3 /** Connection closed, exceeding request length that server accepts. */ #define XCB_CONN_CLOSED_REQ_LEN_EXCEED 4 /** Connection closed, error during parsing display string. */ #define XCB_CONN_CLOSED_PARSE_ERR 5 /** Connection closed because the server does not have a screen matching the display. */ #define XCB_CONN_CLOSED_INVALID_SCREEN 6 /** Connection closed because some FD passing operation failed */ #define XCB_CONN_CLOSED_FDPASSING_FAILED 7 #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1)) /* Opaque structures */ /** * @brief XCB Connection structure. * * A structure that contain all data that XCB needs to communicate with an X server. */ typedef struct xcb_connection_t xcb_connection_t; /**< Opaque structure containing all data that XCB needs to communicate with an X server. */ /* Other types */ /** * @brief Generic iterator. * * A generic iterator structure. */ typedef struct { void *data; /**< Data of the current iterator */ int rem; /**< remaining elements */ int index; /**< index of the current iterator */ } xcb_generic_iterator_t; /** * @brief Generic reply. * * A generic reply structure. */ typedef struct { uint8_t response_type; /**< Type of the response */ uint8_t pad0; /**< Padding */ uint16_t sequence; /**< Sequence number */ uint32_t length; /**< Length of the response */ } xcb_generic_reply_t; /** * @brief Generic event. * * A generic event structure. */ typedef struct { uint8_t response_type; /**< Type of the response */ uint8_t pad0; /**< Padding */ uint16_t sequence; /**< Sequence number */ uint32_t pad[7]; /**< Padding */ uint32_t full_sequence; /**< full sequence */ } xcb_generic_event_t; /** * @brief Raw Generic event. * * A generic event structure as used on the wire, i.e., without the full_sequence field */ typedef struct { uint8_t response_type; /**< Type of the response */ uint8_t pad0; /**< Padding */ uint16_t sequence; /**< Sequence number */ uint32_t pad[7]; /**< Padding */ } xcb_raw_generic_event_t; /** * @brief GE event * * An event as sent by the XGE extension. The length field specifies the * number of 4-byte blocks trailing the struct. * * @deprecated Since some fields in this struct have unfortunate names, it is * recommended to use xcb_ge_generic_event_t instead. */ typedef struct { uint8_t response_type; /**< Type of the response */ uint8_t pad0; /**< Padding */ uint16_t sequence; /**< Sequence number */ uint32_t length; uint16_t event_type; uint16_t pad1; uint32_t pad[5]; /**< Padding */ uint32_t full_sequence; /**< full sequence */ } xcb_ge_event_t; /** * @brief Generic error. * * A generic error structure. */ typedef struct { uint8_t response_type; /**< Type of the response */ uint8_t error_code; /**< Error code */ uint16_t sequence; /**< Sequence number */ uint32_t resource_id; /** < Resource ID for requests with side effects only */ uint16_t minor_code; /** < Minor opcode of the failed request */ uint8_t major_code; /** < Major opcode of the failed request */ uint8_t pad0; uint32_t pad[5]; /**< Padding */ uint32_t full_sequence; /**< full sequence */ } xcb_generic_error_t; /** * @brief Generic cookie. * * A generic cookie structure. */ typedef struct { unsigned int sequence; /**< Sequence number */ } xcb_void_cookie_t; /* Include the generated xproto header. */ #include "xproto.h" /** XCB_NONE is the universal null resource or null atom parameter value for many core X requests */ #define XCB_NONE 0L /** XCB_COPY_FROM_PARENT can be used for many xcb_create_window parameters */ #define XCB_COPY_FROM_PARENT 0L /** XCB_CURRENT_TIME can be used in most requests that take an xcb_timestamp_t */ #define XCB_CURRENT_TIME 0L /** XCB_NO_SYMBOL fills in unused entries in xcb_keysym_t tables */ #define XCB_NO_SYMBOL 0L /* xcb_auth.c */ /** * @brief Container for authorization information. * * A container for authorization information to be sent to the X server. */ typedef struct xcb_auth_info_t { int namelen; /**< Length of the string name (as returned by strlen). */ char *name; /**< String containing the authentication protocol name, such as "MIT-MAGIC-COOKIE-1" or "XDM-AUTHORIZATION-1". */ int datalen; /**< Length of the data member. */ char *data; /**< Data interpreted in a protocol-specific manner. */ } xcb_auth_info_t; /* xcb_out.c */ /** * @brief Forces any buffered output to be written to the server. * @param c The connection to the X server. * @return > @c 0 on success, <= @c 0 otherwise. * * Forces any buffered output to be written to the server. Blocks * until the write is complete. */ int xcb_flush(xcb_connection_t *c); /** * @brief Returns the maximum request length that this server accepts. * @param c The connection to the X server. * @return The maximum request length field. * * In the absence of the BIG-REQUESTS extension, returns the * maximum request length field from the connection setup data, which * may be as much as 65535. If the server supports BIG-REQUESTS, then * the maximum request length field from the reply to the * BigRequestsEnable request will be returned instead. * * Note that this length is measured in four-byte units, making the * theoretical maximum lengths roughly 256kB without BIG-REQUESTS and * 16GB with. */ uint32_t xcb_get_maximum_request_length(xcb_connection_t *c); /** * @brief Prefetch the maximum request length without blocking. * @param c The connection to the X server. * * Without blocking, does as much work as possible toward computing * the maximum request length accepted by the X server. * * Invoking this function may cause a call to xcb_big_requests_enable, * but will not block waiting for the reply. * xcb_get_maximum_request_length will return the prefetched data * after possibly blocking while the reply is retrieved. * * Note that in order for this function to be fully non-blocking, the * application must previously have called * xcb_prefetch_extension_data(c, &xcb_big_requests_id) and the reply * must have already arrived. */ void xcb_prefetch_maximum_request_length(xcb_connection_t *c); /* xcb_in.c */ /** * @brief Returns the next event or error from the server. * @param c The connection to the X server. * @return The next event from the server. * * Returns the next event or error from the server, or returns null in * the event of an I/O error. Blocks until either an event or error * arrive, or an I/O error occurs. */ xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c); /** * @brief Returns the next event or error from the server. * @param c The connection to the X server. * @return The next event from the server. * * Returns the next event or error from the server, if one is * available, or returns @c NULL otherwise. If no event is available, that * might be because an I/O error like connection close occurred while * attempting to read the next event, in which case the connection is * shut down when this function returns. */ xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c); /** * @brief Returns the next event without reading from the connection. * @param c The connection to the X server. * @return The next already queued event from the server. * * This is a version of xcb_poll_for_event that only examines the * event queue for new events. The function doesn't try to read new * events from the connection if no queued events are found. * * This function is useful for callers that know in advance that all * interesting events have already been read from the connection. For * example, callers might use xcb_wait_for_reply and be interested * only of events that preceded a specific reply. */ xcb_generic_event_t *xcb_poll_for_queued_event(xcb_connection_t *c); typedef struct xcb_special_event xcb_special_event_t; /** * @brief Returns the next event from a special queue */ xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c, xcb_special_event_t *se); /** * @brief Returns the next event from a special queue, blocking until one arrives */ xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c, xcb_special_event_t *se); /** * @typedef typedef struct xcb_extension_t xcb_extension_t */ typedef struct xcb_extension_t xcb_extension_t; /**< Opaque structure used as key for xcb_get_extension_data_t. */ /** * @brief Listen for a special event */ xcb_special_event_t *xcb_register_for_special_xge(xcb_connection_t *c, xcb_extension_t *ext, uint32_t eid, uint32_t *stamp); /** * @brief Stop listening for a special event */ void xcb_unregister_for_special_event(xcb_connection_t *c, xcb_special_event_t *se); /** * @brief Return the error for a request, or NULL if none can ever arrive. * @param c The connection to the X server. * @param cookie The request cookie. * @return The error for the request, or NULL if none can ever arrive. * * The xcb_void_cookie_t cookie supplied to this function must have resulted * from a call to xcb_[request_name]_checked(). This function will block * until one of two conditions happens. If an error is received, it will be * returned. If a reply to a subsequent request has already arrived, no error * can arrive for this request, so this function will return NULL. * * Note that this function will perform a sync if needed to ensure that the * sequence number will advance beyond that provided in cookie; this is a * convenience to avoid races in determining whether the sync is needed. */ xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t cookie); /** * @brief Discards the reply for a request. * @param c The connection to the X server. * @param sequence The request sequence number from a cookie. * * Discards the reply for a request. Additionally, any error generated * by the request is also discarded (unless it was an _unchecked request * and the error has already arrived). * * This function will not block even if the reply is not yet available. * * Note that the sequence really does have to come from an xcb cookie; * this function is not designed to operate on socket-handoff replies. */ void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence); /** * @brief Discards the reply for a request, given by a 64bit sequence number * @param c The connection to the X server. * @param sequence 64-bit sequence number as returned by xcb_send_request64(). * * Discards the reply for a request. Additionally, any error generated * by the request is also discarded (unless it was an _unchecked request * and the error has already arrived). * * This function will not block even if the reply is not yet available. * * Note that the sequence really does have to come from xcb_send_request64(); * the cookie sequence number is defined as "unsigned" int and therefore * not 64-bit on all platforms. * This function is not designed to operate on socket-handoff replies. * * Unlike its xcb_discard_reply() counterpart, the given sequence number is not * automatically "widened" to 64-bit. */ void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence); /* xcb_ext.c */ /** * @brief Caches reply information from QueryExtension requests. * @param c The connection. * @param ext The extension data. * @return A pointer to the xcb_query_extension_reply_t for the extension. * * This function is the primary interface to the "extension cache", * which caches reply information from QueryExtension * requests. Invoking this function may cause a call to * xcb_query_extension to retrieve extension information from the * server, and may block until extension data is received from the * server. * * The result must not be freed. This storage is managed by the cache * itself. */ const struct xcb_query_extension_reply_t *xcb_get_extension_data(xcb_connection_t *c, xcb_extension_t *ext); /** * @brief Prefetch of extension data into the extension cache * @param c The connection. * @param ext The extension data. * * This function allows a "prefetch" of extension data into the * extension cache. Invoking the function may cause a call to * xcb_query_extension, but will not block waiting for the * reply. xcb_get_extension_data will return the prefetched data after * possibly blocking while it is retrieved. */ void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext); /* xcb_conn.c */ /** * @brief Access the data returned by the server. * @param c The connection. * @return A pointer to an xcb_setup_t structure. * * Accessor for the data returned by the server when the xcb_connection_t * was initialized. This data includes * - the server's required format for images, * - a list of available visuals, * - a list of available screens, * - the server's maximum request length (in the absence of the * BIG-REQUESTS extension), * - and other assorted information. * * See the X protocol specification for more details. * * The result must not be freed. */ const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c); /** * @brief Access the file descriptor of the connection. * @param c The connection. * @return The file descriptor. * * Accessor for the file descriptor that was passed to the * xcb_connect_to_fd call that returned @p c. */ int xcb_get_file_descriptor(xcb_connection_t *c); /** * @brief Test whether the connection has shut down due to a fatal error. * @param c The connection. * @return > 0 if the connection is in an error state; 0 otherwise. * * Some errors that occur in the context of an xcb_connection_t * are unrecoverable. When such an error occurs, the * connection is shut down and further operations on the * xcb_connection_t have no effect, but memory will not be freed until * xcb_disconnect() is called on the xcb_connection_t. * * @return XCB_CONN_ERROR, because of socket errors, pipe errors or other stream errors. * @return XCB_CONN_CLOSED_EXT_NOTSUPPORTED, when extension not supported. * @return XCB_CONN_CLOSED_MEM_INSUFFICIENT, when memory not available. * @return XCB_CONN_CLOSED_REQ_LEN_EXCEED, exceeding request length that server accepts. * @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string. * @return XCB_CONN_CLOSED_INVALID_SCREEN, because the server does not have a screen matching the display. */ int xcb_connection_has_error(xcb_connection_t *c); /** * @brief Connects to the X server. * @param fd The file descriptor. * @param auth_info Authentication data. * @return A newly allocated xcb_connection_t structure. * * Connects to an X server, given the open socket @p fd and the * xcb_auth_info_t @p auth_info. The file descriptor @p fd is * bidirectionally connected to an X server. If the connection * should be unauthenticated, @p auth_info must be @c * NULL. * * Always returns a non-NULL pointer to a xcb_connection_t, even on failure. * Callers need to use xcb_connection_has_error() to check for failure. * When finished, use xcb_disconnect() to close the connection and free * the structure. */ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info); /** * @brief Closes the connection. * @param c The connection. * * Closes the file descriptor and frees all memory associated with the * connection @c c. If @p c is @c NULL, nothing is done. */ void xcb_disconnect(xcb_connection_t *c); /* xcb_util.c */ /** * @brief Parses a display string name in the form documented by X(7x). * @param name The name of the display. * @param host A pointer to a malloc'd copy of the hostname. * @param display A pointer to the display number. * @param screen A pointer to the screen number. * @return 0 on failure, non 0 otherwise. * * Parses the display string name @p display_name in the form * documented by X(7x). Has no side effects on failure. If * @p displayname is @c NULL or empty, it uses the environment * variable DISPLAY. @p hostp is a pointer to a newly allocated string * that contain the host name. @p displayp is set to the display * number and @p screenp to the preferred screen number. @p screenp * can be @c NULL. If @p displayname does not contain a screen number, * it is set to @c 0. */ int xcb_parse_display(const char *name, char **host, int *display, int *screen); /** * @brief Connects to the X server. * @param displayname The name of the display. * @param screenp A pointer to a preferred screen number. * @return A newly allocated xcb_connection_t structure. * * Connects to the X server specified by @p displayname. If @p * displayname is @c NULL, uses the value of the DISPLAY environment * variable. If a particular screen on that server is preferred, the * int pointed to by @p screenp (if not @c NULL) will be set to that * screen; otherwise the screen will be set to 0. * * Always returns a non-NULL pointer to a xcb_connection_t, even on failure. * Callers need to use xcb_connection_has_error() to check for failure. * When finished, use xcb_disconnect() to close the connection and free * the structure. */ xcb_connection_t *xcb_connect(const char *displayname, int *screenp); /** * @brief Connects to the X server, using an authorization information. * @param display The name of the display. * @param auth The authorization information. * @param screen A pointer to a preferred screen number. * @return A newly allocated xcb_connection_t structure. * * Connects to the X server specified by @p displayname, using the * authorization @p auth. If a particular screen on that server is * preferred, the int pointed to by @p screenp (if not @c NULL) will * be set to that screen; otherwise @p screenp will be set to 0. * * Always returns a non-NULL pointer to a xcb_connection_t, even on failure. * Callers need to use xcb_connection_has_error() to check for failure. * When finished, use xcb_disconnect() to close the connection and free * the structure. */ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb_auth_info_t *auth, int *screen); /* xcb_xid.c */ /** * @brief Allocates an XID for a new object. * @param c The connection. * @return A newly allocated XID. * * Allocates an XID for a new object. Typically used just prior to * various object creation functions, such as xcb_create_window. */ uint32_t xcb_generate_id(xcb_connection_t *c); /** * @} */ #ifdef __cplusplus } #endif #endif /* __XCB_H__ */ PKZj__ xcb/xvmc.hnu[/* * This file generated automatically from xvmc.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_XvMC_API XCB XvMC API * @brief XvMC XCB Protocol Implementation. * @{ **/ #ifndef __XVMC_H #define __XVMC_H #include "xcb.h" #include "xv.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XVMC_MAJOR_VERSION 1 #define XCB_XVMC_MINOR_VERSION 1 extern xcb_extension_t xcb_xvmc_id; typedef uint32_t xcb_xvmc_context_t; /** * @brief xcb_xvmc_context_iterator_t **/ typedef struct xcb_xvmc_context_iterator_t { xcb_xvmc_context_t *data; int rem; int index; } xcb_xvmc_context_iterator_t; typedef uint32_t xcb_xvmc_surface_t; /** * @brief xcb_xvmc_surface_iterator_t **/ typedef struct xcb_xvmc_surface_iterator_t { xcb_xvmc_surface_t *data; int rem; int index; } xcb_xvmc_surface_iterator_t; typedef uint32_t xcb_xvmc_subpicture_t; /** * @brief xcb_xvmc_subpicture_iterator_t **/ typedef struct xcb_xvmc_subpicture_iterator_t { xcb_xvmc_subpicture_t *data; int rem; int index; } xcb_xvmc_subpicture_iterator_t; /** * @brief xcb_xvmc_surface_info_t **/ typedef struct xcb_xvmc_surface_info_t { xcb_xvmc_surface_t id; uint16_t chroma_format; uint16_t pad0; uint16_t max_width; uint16_t max_height; uint16_t subpicture_max_width; uint16_t subpicture_max_height; uint32_t mc_type; uint32_t flags; } xcb_xvmc_surface_info_t; /** * @brief xcb_xvmc_surface_info_iterator_t **/ typedef struct xcb_xvmc_surface_info_iterator_t { xcb_xvmc_surface_info_t *data; int rem; int index; } xcb_xvmc_surface_info_iterator_t; /** * @brief xcb_xvmc_query_version_cookie_t **/ typedef struct xcb_xvmc_query_version_cookie_t { unsigned int sequence; } xcb_xvmc_query_version_cookie_t; /** Opcode for xcb_xvmc_query_version. */ #define XCB_XVMC_QUERY_VERSION 0 /** * @brief xcb_xvmc_query_version_request_t **/ typedef struct xcb_xvmc_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xvmc_query_version_request_t; /** * @brief xcb_xvmc_query_version_reply_t **/ typedef struct xcb_xvmc_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major; uint32_t minor; } xcb_xvmc_query_version_reply_t; /** * @brief xcb_xvmc_list_surface_types_cookie_t **/ typedef struct xcb_xvmc_list_surface_types_cookie_t { unsigned int sequence; } xcb_xvmc_list_surface_types_cookie_t; /** Opcode for xcb_xvmc_list_surface_types. */ #define XCB_XVMC_LIST_SURFACE_TYPES 1 /** * @brief xcb_xvmc_list_surface_types_request_t **/ typedef struct xcb_xvmc_list_surface_types_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port_id; } xcb_xvmc_list_surface_types_request_t; /** * @brief xcb_xvmc_list_surface_types_reply_t **/ typedef struct xcb_xvmc_list_surface_types_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num; uint8_t pad1[20]; } xcb_xvmc_list_surface_types_reply_t; /** * @brief xcb_xvmc_create_context_cookie_t **/ typedef struct xcb_xvmc_create_context_cookie_t { unsigned int sequence; } xcb_xvmc_create_context_cookie_t; /** Opcode for xcb_xvmc_create_context. */ #define XCB_XVMC_CREATE_CONTEXT 2 /** * @brief xcb_xvmc_create_context_request_t **/ typedef struct xcb_xvmc_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xvmc_context_t context_id; xcb_xv_port_t port_id; xcb_xvmc_surface_t surface_id; uint16_t width; uint16_t height; uint32_t flags; } xcb_xvmc_create_context_request_t; /** * @brief xcb_xvmc_create_context_reply_t **/ typedef struct xcb_xvmc_create_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t width_actual; uint16_t height_actual; uint32_t flags_return; uint8_t pad1[20]; } xcb_xvmc_create_context_reply_t; /** Opcode for xcb_xvmc_destroy_context. */ #define XCB_XVMC_DESTROY_CONTEXT 3 /** * @brief xcb_xvmc_destroy_context_request_t **/ typedef struct xcb_xvmc_destroy_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xvmc_context_t context_id; } xcb_xvmc_destroy_context_request_t; /** * @brief xcb_xvmc_create_surface_cookie_t **/ typedef struct xcb_xvmc_create_surface_cookie_t { unsigned int sequence; } xcb_xvmc_create_surface_cookie_t; /** Opcode for xcb_xvmc_create_surface. */ #define XCB_XVMC_CREATE_SURFACE 4 /** * @brief xcb_xvmc_create_surface_request_t **/ typedef struct xcb_xvmc_create_surface_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xvmc_surface_t surface_id; xcb_xvmc_context_t context_id; } xcb_xvmc_create_surface_request_t; /** * @brief xcb_xvmc_create_surface_reply_t **/ typedef struct xcb_xvmc_create_surface_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_xvmc_create_surface_reply_t; /** Opcode for xcb_xvmc_destroy_surface. */ #define XCB_XVMC_DESTROY_SURFACE 5 /** * @brief xcb_xvmc_destroy_surface_request_t **/ typedef struct xcb_xvmc_destroy_surface_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xvmc_surface_t surface_id; } xcb_xvmc_destroy_surface_request_t; /** * @brief xcb_xvmc_create_subpicture_cookie_t **/ typedef struct xcb_xvmc_create_subpicture_cookie_t { unsigned int sequence; } xcb_xvmc_create_subpicture_cookie_t; /** Opcode for xcb_xvmc_create_subpicture. */ #define XCB_XVMC_CREATE_SUBPICTURE 6 /** * @brief xcb_xvmc_create_subpicture_request_t **/ typedef struct xcb_xvmc_create_subpicture_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xvmc_subpicture_t subpicture_id; xcb_xvmc_context_t context; uint32_t xvimage_id; uint16_t width; uint16_t height; } xcb_xvmc_create_subpicture_request_t; /** * @brief xcb_xvmc_create_subpicture_reply_t **/ typedef struct xcb_xvmc_create_subpicture_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t width_actual; uint16_t height_actual; uint16_t num_palette_entries; uint16_t entry_bytes; uint8_t component_order[4]; uint8_t pad1[12]; } xcb_xvmc_create_subpicture_reply_t; /** Opcode for xcb_xvmc_destroy_subpicture. */ #define XCB_XVMC_DESTROY_SUBPICTURE 7 /** * @brief xcb_xvmc_destroy_subpicture_request_t **/ typedef struct xcb_xvmc_destroy_subpicture_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xvmc_subpicture_t subpicture_id; } xcb_xvmc_destroy_subpicture_request_t; /** * @brief xcb_xvmc_list_subpicture_types_cookie_t **/ typedef struct xcb_xvmc_list_subpicture_types_cookie_t { unsigned int sequence; } xcb_xvmc_list_subpicture_types_cookie_t; /** Opcode for xcb_xvmc_list_subpicture_types. */ #define XCB_XVMC_LIST_SUBPICTURE_TYPES 8 /** * @brief xcb_xvmc_list_subpicture_types_request_t **/ typedef struct xcb_xvmc_list_subpicture_types_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port_id; xcb_xvmc_surface_t surface_id; } xcb_xvmc_list_subpicture_types_request_t; /** * @brief xcb_xvmc_list_subpicture_types_reply_t **/ typedef struct xcb_xvmc_list_subpicture_types_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num; uint8_t pad1[20]; } xcb_xvmc_list_subpicture_types_reply_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_xvmc_context_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xvmc_context_t) */ void xcb_xvmc_context_next (xcb_xvmc_context_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xvmc_context_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xvmc_context_end (xcb_xvmc_context_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xvmc_surface_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xvmc_surface_t) */ void xcb_xvmc_surface_next (xcb_xvmc_surface_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xvmc_surface_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xvmc_surface_end (xcb_xvmc_surface_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xvmc_subpicture_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xvmc_subpicture_t) */ void xcb_xvmc_subpicture_next (xcb_xvmc_subpicture_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xvmc_subpicture_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xvmc_subpicture_end (xcb_xvmc_subpicture_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xvmc_surface_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xvmc_surface_info_t) */ void xcb_xvmc_surface_info_next (xcb_xvmc_surface_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xvmc_surface_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xvmc_query_version_cookie_t xcb_xvmc_query_version (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xvmc_query_version_cookie_t xcb_xvmc_query_version_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xvmc_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xvmc_query_version_reply_t * xcb_xvmc_query_version_reply (xcb_connection_t *c, xcb_xvmc_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xvmc_list_surface_types_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xvmc_list_surface_types_cookie_t xcb_xvmc_list_surface_types (xcb_connection_t *c, xcb_xv_port_t port_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xvmc_list_surface_types_cookie_t xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c, xcb_xv_port_t port_id); xcb_xvmc_surface_info_t * xcb_xvmc_list_surface_types_surfaces (const xcb_xvmc_list_surface_types_reply_t *R); int xcb_xvmc_list_surface_types_surfaces_length (const xcb_xvmc_list_surface_types_reply_t *R); xcb_xvmc_surface_info_iterator_t xcb_xvmc_list_surface_types_surfaces_iterator (const xcb_xvmc_list_surface_types_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xvmc_list_surface_types_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xvmc_list_surface_types_reply_t * xcb_xvmc_list_surface_types_reply (xcb_connection_t *c, xcb_xvmc_list_surface_types_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xvmc_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xvmc_create_context_cookie_t xcb_xvmc_create_context (xcb_connection_t *c, xcb_xvmc_context_t context_id, xcb_xv_port_t port_id, xcb_xvmc_surface_t surface_id, uint16_t width, uint16_t height, uint32_t flags); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xvmc_create_context_cookie_t xcb_xvmc_create_context_unchecked (xcb_connection_t *c, xcb_xvmc_context_t context_id, xcb_xv_port_t port_id, xcb_xvmc_surface_t surface_id, uint16_t width, uint16_t height, uint32_t flags); uint32_t * xcb_xvmc_create_context_priv_data (const xcb_xvmc_create_context_reply_t *R); int xcb_xvmc_create_context_priv_data_length (const xcb_xvmc_create_context_reply_t *R); xcb_generic_iterator_t xcb_xvmc_create_context_priv_data_end (const xcb_xvmc_create_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xvmc_create_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xvmc_create_context_reply_t * xcb_xvmc_create_context_reply (xcb_connection_t *c, xcb_xvmc_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xvmc_destroy_context_checked (xcb_connection_t *c, xcb_xvmc_context_t context_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xvmc_destroy_context (xcb_connection_t *c, xcb_xvmc_context_t context_id); int xcb_xvmc_create_surface_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xvmc_create_surface_cookie_t xcb_xvmc_create_surface (xcb_connection_t *c, xcb_xvmc_surface_t surface_id, xcb_xvmc_context_t context_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xvmc_create_surface_cookie_t xcb_xvmc_create_surface_unchecked (xcb_connection_t *c, xcb_xvmc_surface_t surface_id, xcb_xvmc_context_t context_id); uint32_t * xcb_xvmc_create_surface_priv_data (const xcb_xvmc_create_surface_reply_t *R); int xcb_xvmc_create_surface_priv_data_length (const xcb_xvmc_create_surface_reply_t *R); xcb_generic_iterator_t xcb_xvmc_create_surface_priv_data_end (const xcb_xvmc_create_surface_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xvmc_create_surface_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xvmc_create_surface_reply_t * xcb_xvmc_create_surface_reply (xcb_connection_t *c, xcb_xvmc_create_surface_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xvmc_destroy_surface_checked (xcb_connection_t *c, xcb_xvmc_surface_t surface_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xvmc_destroy_surface (xcb_connection_t *c, xcb_xvmc_surface_t surface_id); int xcb_xvmc_create_subpicture_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xvmc_create_subpicture_cookie_t xcb_xvmc_create_subpicture (xcb_connection_t *c, xcb_xvmc_subpicture_t subpicture_id, xcb_xvmc_context_t context, uint32_t xvimage_id, uint16_t width, uint16_t height); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xvmc_create_subpicture_cookie_t xcb_xvmc_create_subpicture_unchecked (xcb_connection_t *c, xcb_xvmc_subpicture_t subpicture_id, xcb_xvmc_context_t context, uint32_t xvimage_id, uint16_t width, uint16_t height); uint32_t * xcb_xvmc_create_subpicture_priv_data (const xcb_xvmc_create_subpicture_reply_t *R); int xcb_xvmc_create_subpicture_priv_data_length (const xcb_xvmc_create_subpicture_reply_t *R); xcb_generic_iterator_t xcb_xvmc_create_subpicture_priv_data_end (const xcb_xvmc_create_subpicture_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xvmc_create_subpicture_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xvmc_create_subpicture_reply_t * xcb_xvmc_create_subpicture_reply (xcb_connection_t *c, xcb_xvmc_create_subpicture_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xvmc_destroy_subpicture_checked (xcb_connection_t *c, xcb_xvmc_subpicture_t subpicture_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xvmc_destroy_subpicture (xcb_connection_t *c, xcb_xvmc_subpicture_t subpicture_id); int xcb_xvmc_list_subpicture_types_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xvmc_list_subpicture_types_cookie_t xcb_xvmc_list_subpicture_types (xcb_connection_t *c, xcb_xv_port_t port_id, xcb_xvmc_surface_t surface_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xvmc_list_subpicture_types_cookie_t xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t *c, xcb_xv_port_t port_id, xcb_xvmc_surface_t surface_id); xcb_xv_image_format_info_t * xcb_xvmc_list_subpicture_types_types (const xcb_xvmc_list_subpicture_types_reply_t *R); int xcb_xvmc_list_subpicture_types_types_length (const xcb_xvmc_list_subpicture_types_reply_t *R); xcb_xv_image_format_info_iterator_t xcb_xvmc_list_subpicture_types_types_iterator (const xcb_xvmc_list_subpicture_types_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xvmc_list_subpicture_types_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xvmc_list_subpicture_types_reply_t * xcb_xvmc_list_subpicture_types_reply (xcb_connection_t *c, xcb_xvmc_list_subpicture_types_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZU%ig g xcb/bigreq.hnu[/* * This file generated automatically from bigreq.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_BigRequests_API XCB BigRequests API * @brief BigRequests XCB Protocol Implementation. * @{ **/ #ifndef __BIGREQ_H #define __BIGREQ_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif #define XCB_BIGREQUESTS_MAJOR_VERSION 0 #define XCB_BIGREQUESTS_MINOR_VERSION 0 extern xcb_extension_t xcb_big_requests_id; /** * @brief xcb_big_requests_enable_cookie_t **/ typedef struct xcb_big_requests_enable_cookie_t { unsigned int sequence; } xcb_big_requests_enable_cookie_t; /** Opcode for xcb_big_requests_enable. */ #define XCB_BIG_REQUESTS_ENABLE 0 /** * @brief xcb_big_requests_enable_request_t **/ typedef struct xcb_big_requests_enable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_big_requests_enable_request_t; /** * @brief xcb_big_requests_enable_reply_t **/ typedef struct xcb_big_requests_enable_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t maximum_request_length; } xcb_big_requests_enable_reply_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_big_requests_enable_cookie_t xcb_big_requests_enable (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_big_requests_enable_cookie_t xcb_big_requests_enable_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_big_requests_enable_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_big_requests_enable_reply_t * xcb_big_requests_enable_reply (xcb_connection_t *c, xcb_big_requests_enable_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ!:w xcb/glx.hnu[/* * This file generated automatically from glx.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Glx_API XCB Glx API * @brief Glx XCB Protocol Implementation. * @{ **/ #ifndef __GLX_H #define __GLX_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_GLX_MAJOR_VERSION 1 #define XCB_GLX_MINOR_VERSION 4 extern xcb_extension_t xcb_glx_id; typedef uint32_t xcb_glx_pixmap_t; /** * @brief xcb_glx_pixmap_iterator_t **/ typedef struct xcb_glx_pixmap_iterator_t { xcb_glx_pixmap_t *data; int rem; int index; } xcb_glx_pixmap_iterator_t; typedef uint32_t xcb_glx_context_t; /** * @brief xcb_glx_context_iterator_t **/ typedef struct xcb_glx_context_iterator_t { xcb_glx_context_t *data; int rem; int index; } xcb_glx_context_iterator_t; typedef uint32_t xcb_glx_pbuffer_t; /** * @brief xcb_glx_pbuffer_iterator_t **/ typedef struct xcb_glx_pbuffer_iterator_t { xcb_glx_pbuffer_t *data; int rem; int index; } xcb_glx_pbuffer_iterator_t; typedef uint32_t xcb_glx_window_t; /** * @brief xcb_glx_window_iterator_t **/ typedef struct xcb_glx_window_iterator_t { xcb_glx_window_t *data; int rem; int index; } xcb_glx_window_iterator_t; typedef uint32_t xcb_glx_fbconfig_t; /** * @brief xcb_glx_fbconfig_iterator_t **/ typedef struct xcb_glx_fbconfig_iterator_t { xcb_glx_fbconfig_t *data; int rem; int index; } xcb_glx_fbconfig_iterator_t; typedef uint32_t xcb_glx_drawable_t; /** * @brief xcb_glx_drawable_iterator_t **/ typedef struct xcb_glx_drawable_iterator_t { xcb_glx_drawable_t *data; int rem; int index; } xcb_glx_drawable_iterator_t; typedef float xcb_glx_float32_t; /** * @brief xcb_glx_float32_iterator_t **/ typedef struct xcb_glx_float32_iterator_t { xcb_glx_float32_t *data; int rem; int index; } xcb_glx_float32_iterator_t; typedef double xcb_glx_float64_t; /** * @brief xcb_glx_float64_iterator_t **/ typedef struct xcb_glx_float64_iterator_t { xcb_glx_float64_t *data; int rem; int index; } xcb_glx_float64_iterator_t; typedef uint32_t xcb_glx_bool32_t; /** * @brief xcb_glx_bool32_iterator_t **/ typedef struct xcb_glx_bool32_iterator_t { xcb_glx_bool32_t *data; int rem; int index; } xcb_glx_bool32_iterator_t; typedef uint32_t xcb_glx_context_tag_t; /** * @brief xcb_glx_context_tag_iterator_t **/ typedef struct xcb_glx_context_tag_iterator_t { xcb_glx_context_tag_t *data; int rem; int index; } xcb_glx_context_tag_iterator_t; /** Opcode for xcb_glx_generic. */ #define XCB_GLX_GENERIC -1 /** * @brief xcb_glx_generic_error_t **/ typedef struct xcb_glx_generic_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; uint32_t bad_value; uint16_t minor_opcode; uint8_t major_opcode; uint8_t pad0[21]; } xcb_glx_generic_error_t; /** Opcode for xcb_glx_bad_context. */ #define XCB_GLX_BAD_CONTEXT 0 typedef xcb_glx_generic_error_t xcb_glx_bad_context_error_t; /** Opcode for xcb_glx_bad_context_state. */ #define XCB_GLX_BAD_CONTEXT_STATE 1 typedef xcb_glx_generic_error_t xcb_glx_bad_context_state_error_t; /** Opcode for xcb_glx_bad_drawable. */ #define XCB_GLX_BAD_DRAWABLE 2 typedef xcb_glx_generic_error_t xcb_glx_bad_drawable_error_t; /** Opcode for xcb_glx_bad_pixmap. */ #define XCB_GLX_BAD_PIXMAP 3 typedef xcb_glx_generic_error_t xcb_glx_bad_pixmap_error_t; /** Opcode for xcb_glx_bad_context_tag. */ #define XCB_GLX_BAD_CONTEXT_TAG 4 typedef xcb_glx_generic_error_t xcb_glx_bad_context_tag_error_t; /** Opcode for xcb_glx_bad_current_window. */ #define XCB_GLX_BAD_CURRENT_WINDOW 5 typedef xcb_glx_generic_error_t xcb_glx_bad_current_window_error_t; /** Opcode for xcb_glx_bad_render_request. */ #define XCB_GLX_BAD_RENDER_REQUEST 6 typedef xcb_glx_generic_error_t xcb_glx_bad_render_request_error_t; /** Opcode for xcb_glx_bad_large_request. */ #define XCB_GLX_BAD_LARGE_REQUEST 7 typedef xcb_glx_generic_error_t xcb_glx_bad_large_request_error_t; /** Opcode for xcb_glx_unsupported_private_request. */ #define XCB_GLX_UNSUPPORTED_PRIVATE_REQUEST 8 typedef xcb_glx_generic_error_t xcb_glx_unsupported_private_request_error_t; /** Opcode for xcb_glx_bad_fb_config. */ #define XCB_GLX_BAD_FB_CONFIG 9 typedef xcb_glx_generic_error_t xcb_glx_bad_fb_config_error_t; /** Opcode for xcb_glx_bad_pbuffer. */ #define XCB_GLX_BAD_PBUFFER 10 typedef xcb_glx_generic_error_t xcb_glx_bad_pbuffer_error_t; /** Opcode for xcb_glx_bad_current_drawable. */ #define XCB_GLX_BAD_CURRENT_DRAWABLE 11 typedef xcb_glx_generic_error_t xcb_glx_bad_current_drawable_error_t; /** Opcode for xcb_glx_bad_window. */ #define XCB_GLX_BAD_WINDOW 12 typedef xcb_glx_generic_error_t xcb_glx_bad_window_error_t; /** Opcode for xcb_glx_glx_bad_profile_arb. */ #define XCB_GLX_GLX_BAD_PROFILE_ARB 13 typedef xcb_glx_generic_error_t xcb_glx_glx_bad_profile_arb_error_t; /** Opcode for xcb_glx_pbuffer_clobber. */ #define XCB_GLX_PBUFFER_CLOBBER 0 /** * @brief xcb_glx_pbuffer_clobber_event_t **/ typedef struct xcb_glx_pbuffer_clobber_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint16_t event_type; uint16_t draw_type; xcb_glx_drawable_t drawable; uint32_t b_mask; uint16_t aux_buffer; uint16_t x; uint16_t y; uint16_t width; uint16_t height; uint16_t count; uint8_t pad1[4]; } xcb_glx_pbuffer_clobber_event_t; /** Opcode for xcb_glx_buffer_swap_complete. */ #define XCB_GLX_BUFFER_SWAP_COMPLETE 1 /** * @brief xcb_glx_buffer_swap_complete_event_t **/ typedef struct xcb_glx_buffer_swap_complete_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint16_t event_type; uint8_t pad1[2]; xcb_glx_drawable_t drawable; uint32_t ust_hi; uint32_t ust_lo; uint32_t msc_hi; uint32_t msc_lo; uint32_t sbc; } xcb_glx_buffer_swap_complete_event_t; typedef enum xcb_glx_pbcet_t { XCB_GLX_PBCET_DAMAGED = 32791, XCB_GLX_PBCET_SAVED = 32792 } xcb_glx_pbcet_t; typedef enum xcb_glx_pbcdt_t { XCB_GLX_PBCDT_WINDOW = 32793, XCB_GLX_PBCDT_PBUFFER = 32794 } xcb_glx_pbcdt_t; /** Opcode for xcb_glx_render. */ #define XCB_GLX_RENDER 1 /** * @brief xcb_glx_render_request_t **/ typedef struct xcb_glx_render_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; } xcb_glx_render_request_t; /** Opcode for xcb_glx_render_large. */ #define XCB_GLX_RENDER_LARGE 2 /** * @brief xcb_glx_render_large_request_t **/ typedef struct xcb_glx_render_large_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint16_t request_num; uint16_t request_total; uint32_t data_len; } xcb_glx_render_large_request_t; /** Opcode for xcb_glx_create_context. */ #define XCB_GLX_CREATE_CONTEXT 3 /** * @brief xcb_glx_create_context_request_t **/ typedef struct xcb_glx_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_t context; xcb_visualid_t visual; uint32_t screen; xcb_glx_context_t share_list; uint8_t is_direct; uint8_t pad0[3]; } xcb_glx_create_context_request_t; /** Opcode for xcb_glx_destroy_context. */ #define XCB_GLX_DESTROY_CONTEXT 4 /** * @brief xcb_glx_destroy_context_request_t **/ typedef struct xcb_glx_destroy_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_t context; } xcb_glx_destroy_context_request_t; /** * @brief xcb_glx_make_current_cookie_t **/ typedef struct xcb_glx_make_current_cookie_t { unsigned int sequence; } xcb_glx_make_current_cookie_t; /** Opcode for xcb_glx_make_current. */ #define XCB_GLX_MAKE_CURRENT 5 /** * @brief xcb_glx_make_current_request_t **/ typedef struct xcb_glx_make_current_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_drawable_t drawable; xcb_glx_context_t context; xcb_glx_context_tag_t old_context_tag; } xcb_glx_make_current_request_t; /** * @brief xcb_glx_make_current_reply_t **/ typedef struct xcb_glx_make_current_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_glx_context_tag_t context_tag; uint8_t pad1[20]; } xcb_glx_make_current_reply_t; /** * @brief xcb_glx_is_direct_cookie_t **/ typedef struct xcb_glx_is_direct_cookie_t { unsigned int sequence; } xcb_glx_is_direct_cookie_t; /** Opcode for xcb_glx_is_direct. */ #define XCB_GLX_IS_DIRECT 6 /** * @brief xcb_glx_is_direct_request_t **/ typedef struct xcb_glx_is_direct_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_t context; } xcb_glx_is_direct_request_t; /** * @brief xcb_glx_is_direct_reply_t **/ typedef struct xcb_glx_is_direct_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t is_direct; uint8_t pad1[23]; } xcb_glx_is_direct_reply_t; /** * @brief xcb_glx_query_version_cookie_t **/ typedef struct xcb_glx_query_version_cookie_t { unsigned int sequence; } xcb_glx_query_version_cookie_t; /** Opcode for xcb_glx_query_version. */ #define XCB_GLX_QUERY_VERSION 7 /** * @brief xcb_glx_query_version_request_t **/ typedef struct xcb_glx_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; } xcb_glx_query_version_request_t; /** * @brief xcb_glx_query_version_reply_t **/ typedef struct xcb_glx_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; uint8_t pad1[16]; } xcb_glx_query_version_reply_t; /** Opcode for xcb_glx_wait_gl. */ #define XCB_GLX_WAIT_GL 8 /** * @brief xcb_glx_wait_gl_request_t **/ typedef struct xcb_glx_wait_gl_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; } xcb_glx_wait_gl_request_t; /** Opcode for xcb_glx_wait_x. */ #define XCB_GLX_WAIT_X 9 /** * @brief xcb_glx_wait_x_request_t **/ typedef struct xcb_glx_wait_x_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; } xcb_glx_wait_x_request_t; /** Opcode for xcb_glx_copy_context. */ #define XCB_GLX_COPY_CONTEXT 10 /** * @brief xcb_glx_copy_context_request_t **/ typedef struct xcb_glx_copy_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_t src; xcb_glx_context_t dest; uint32_t mask; xcb_glx_context_tag_t src_context_tag; } xcb_glx_copy_context_request_t; typedef enum xcb_glx_gc_t { XCB_GLX_GC_GL_CURRENT_BIT = 1, XCB_GLX_GC_GL_POINT_BIT = 2, XCB_GLX_GC_GL_LINE_BIT = 4, XCB_GLX_GC_GL_POLYGON_BIT = 8, XCB_GLX_GC_GL_POLYGON_STIPPLE_BIT = 16, XCB_GLX_GC_GL_PIXEL_MODE_BIT = 32, XCB_GLX_GC_GL_LIGHTING_BIT = 64, XCB_GLX_GC_GL_FOG_BIT = 128, XCB_GLX_GC_GL_DEPTH_BUFFER_BIT = 256, XCB_GLX_GC_GL_ACCUM_BUFFER_BIT = 512, XCB_GLX_GC_GL_STENCIL_BUFFER_BIT = 1024, XCB_GLX_GC_GL_VIEWPORT_BIT = 2048, XCB_GLX_GC_GL_TRANSFORM_BIT = 4096, XCB_GLX_GC_GL_ENABLE_BIT = 8192, XCB_GLX_GC_GL_COLOR_BUFFER_BIT = 16384, XCB_GLX_GC_GL_HINT_BIT = 32768, XCB_GLX_GC_GL_EVAL_BIT = 65536, XCB_GLX_GC_GL_LIST_BIT = 131072, XCB_GLX_GC_GL_TEXTURE_BIT = 262144, XCB_GLX_GC_GL_SCISSOR_BIT = 524288, XCB_GLX_GC_GL_ALL_ATTRIB_BITS = 16777215 } xcb_glx_gc_t; /** Opcode for xcb_glx_swap_buffers. */ #define XCB_GLX_SWAP_BUFFERS 11 /** * @brief xcb_glx_swap_buffers_request_t **/ typedef struct xcb_glx_swap_buffers_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; xcb_glx_drawable_t drawable; } xcb_glx_swap_buffers_request_t; /** Opcode for xcb_glx_use_x_font. */ #define XCB_GLX_USE_X_FONT 12 /** * @brief xcb_glx_use_x_font_request_t **/ typedef struct xcb_glx_use_x_font_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; xcb_font_t font; uint32_t first; uint32_t count; uint32_t list_base; } xcb_glx_use_x_font_request_t; /** Opcode for xcb_glx_create_glx_pixmap. */ #define XCB_GLX_CREATE_GLX_PIXMAP 13 /** * @brief xcb_glx_create_glx_pixmap_request_t **/ typedef struct xcb_glx_create_glx_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; xcb_visualid_t visual; xcb_pixmap_t pixmap; xcb_glx_pixmap_t glx_pixmap; } xcb_glx_create_glx_pixmap_request_t; /** * @brief xcb_glx_get_visual_configs_cookie_t **/ typedef struct xcb_glx_get_visual_configs_cookie_t { unsigned int sequence; } xcb_glx_get_visual_configs_cookie_t; /** Opcode for xcb_glx_get_visual_configs. */ #define XCB_GLX_GET_VISUAL_CONFIGS 14 /** * @brief xcb_glx_get_visual_configs_request_t **/ typedef struct xcb_glx_get_visual_configs_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_glx_get_visual_configs_request_t; /** * @brief xcb_glx_get_visual_configs_reply_t **/ typedef struct xcb_glx_get_visual_configs_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_visuals; uint32_t num_properties; uint8_t pad1[16]; } xcb_glx_get_visual_configs_reply_t; /** Opcode for xcb_glx_destroy_glx_pixmap. */ #define XCB_GLX_DESTROY_GLX_PIXMAP 15 /** * @brief xcb_glx_destroy_glx_pixmap_request_t **/ typedef struct xcb_glx_destroy_glx_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_pixmap_t glx_pixmap; } xcb_glx_destroy_glx_pixmap_request_t; /** Opcode for xcb_glx_vendor_private. */ #define XCB_GLX_VENDOR_PRIVATE 16 /** * @brief xcb_glx_vendor_private_request_t **/ typedef struct xcb_glx_vendor_private_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t vendor_code; xcb_glx_context_tag_t context_tag; } xcb_glx_vendor_private_request_t; /** * @brief xcb_glx_vendor_private_with_reply_cookie_t **/ typedef struct xcb_glx_vendor_private_with_reply_cookie_t { unsigned int sequence; } xcb_glx_vendor_private_with_reply_cookie_t; /** Opcode for xcb_glx_vendor_private_with_reply. */ #define XCB_GLX_VENDOR_PRIVATE_WITH_REPLY 17 /** * @brief xcb_glx_vendor_private_with_reply_request_t **/ typedef struct xcb_glx_vendor_private_with_reply_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t vendor_code; xcb_glx_context_tag_t context_tag; } xcb_glx_vendor_private_with_reply_request_t; /** * @brief xcb_glx_vendor_private_with_reply_reply_t **/ typedef struct xcb_glx_vendor_private_with_reply_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t retval; uint8_t data1[24]; } xcb_glx_vendor_private_with_reply_reply_t; /** * @brief xcb_glx_query_extensions_string_cookie_t **/ typedef struct xcb_glx_query_extensions_string_cookie_t { unsigned int sequence; } xcb_glx_query_extensions_string_cookie_t; /** Opcode for xcb_glx_query_extensions_string. */ #define XCB_GLX_QUERY_EXTENSIONS_STRING 18 /** * @brief xcb_glx_query_extensions_string_request_t **/ typedef struct xcb_glx_query_extensions_string_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_glx_query_extensions_string_request_t; /** * @brief xcb_glx_query_extensions_string_reply_t **/ typedef struct xcb_glx_query_extensions_string_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; uint8_t pad2[16]; } xcb_glx_query_extensions_string_reply_t; /** * @brief xcb_glx_query_server_string_cookie_t **/ typedef struct xcb_glx_query_server_string_cookie_t { unsigned int sequence; } xcb_glx_query_server_string_cookie_t; /** Opcode for xcb_glx_query_server_string. */ #define XCB_GLX_QUERY_SERVER_STRING 19 /** * @brief xcb_glx_query_server_string_request_t **/ typedef struct xcb_glx_query_server_string_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; uint32_t name; } xcb_glx_query_server_string_request_t; /** * @brief xcb_glx_query_server_string_reply_t **/ typedef struct xcb_glx_query_server_string_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t str_len; uint8_t pad2[16]; } xcb_glx_query_server_string_reply_t; /** Opcode for xcb_glx_client_info. */ #define XCB_GLX_CLIENT_INFO 20 /** * @brief xcb_glx_client_info_request_t **/ typedef struct xcb_glx_client_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; uint32_t str_len; } xcb_glx_client_info_request_t; /** * @brief xcb_glx_get_fb_configs_cookie_t **/ typedef struct xcb_glx_get_fb_configs_cookie_t { unsigned int sequence; } xcb_glx_get_fb_configs_cookie_t; /** Opcode for xcb_glx_get_fb_configs. */ #define XCB_GLX_GET_FB_CONFIGS 21 /** * @brief xcb_glx_get_fb_configs_request_t **/ typedef struct xcb_glx_get_fb_configs_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_glx_get_fb_configs_request_t; /** * @brief xcb_glx_get_fb_configs_reply_t **/ typedef struct xcb_glx_get_fb_configs_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_FB_configs; uint32_t num_properties; uint8_t pad1[16]; } xcb_glx_get_fb_configs_reply_t; /** Opcode for xcb_glx_create_pixmap. */ #define XCB_GLX_CREATE_PIXMAP 22 /** * @brief xcb_glx_create_pixmap_request_t **/ typedef struct xcb_glx_create_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; xcb_glx_fbconfig_t fbconfig; xcb_pixmap_t pixmap; xcb_glx_pixmap_t glx_pixmap; uint32_t num_attribs; } xcb_glx_create_pixmap_request_t; /** Opcode for xcb_glx_destroy_pixmap. */ #define XCB_GLX_DESTROY_PIXMAP 23 /** * @brief xcb_glx_destroy_pixmap_request_t **/ typedef struct xcb_glx_destroy_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_pixmap_t glx_pixmap; } xcb_glx_destroy_pixmap_request_t; /** Opcode for xcb_glx_create_new_context. */ #define XCB_GLX_CREATE_NEW_CONTEXT 24 /** * @brief xcb_glx_create_new_context_request_t **/ typedef struct xcb_glx_create_new_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_t context; xcb_glx_fbconfig_t fbconfig; uint32_t screen; uint32_t render_type; xcb_glx_context_t share_list; uint8_t is_direct; uint8_t pad0[3]; } xcb_glx_create_new_context_request_t; /** * @brief xcb_glx_query_context_cookie_t **/ typedef struct xcb_glx_query_context_cookie_t { unsigned int sequence; } xcb_glx_query_context_cookie_t; /** Opcode for xcb_glx_query_context. */ #define XCB_GLX_QUERY_CONTEXT 25 /** * @brief xcb_glx_query_context_request_t **/ typedef struct xcb_glx_query_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_t context; } xcb_glx_query_context_request_t; /** * @brief xcb_glx_query_context_reply_t **/ typedef struct xcb_glx_query_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_attribs; uint8_t pad1[20]; } xcb_glx_query_context_reply_t; /** * @brief xcb_glx_make_context_current_cookie_t **/ typedef struct xcb_glx_make_context_current_cookie_t { unsigned int sequence; } xcb_glx_make_context_current_cookie_t; /** Opcode for xcb_glx_make_context_current. */ #define XCB_GLX_MAKE_CONTEXT_CURRENT 26 /** * @brief xcb_glx_make_context_current_request_t **/ typedef struct xcb_glx_make_context_current_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t old_context_tag; xcb_glx_drawable_t drawable; xcb_glx_drawable_t read_drawable; xcb_glx_context_t context; } xcb_glx_make_context_current_request_t; /** * @brief xcb_glx_make_context_current_reply_t **/ typedef struct xcb_glx_make_context_current_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_glx_context_tag_t context_tag; uint8_t pad1[20]; } xcb_glx_make_context_current_reply_t; /** Opcode for xcb_glx_create_pbuffer. */ #define XCB_GLX_CREATE_PBUFFER 27 /** * @brief xcb_glx_create_pbuffer_request_t **/ typedef struct xcb_glx_create_pbuffer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; xcb_glx_fbconfig_t fbconfig; xcb_glx_pbuffer_t pbuffer; uint32_t num_attribs; } xcb_glx_create_pbuffer_request_t; /** Opcode for xcb_glx_destroy_pbuffer. */ #define XCB_GLX_DESTROY_PBUFFER 28 /** * @brief xcb_glx_destroy_pbuffer_request_t **/ typedef struct xcb_glx_destroy_pbuffer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_pbuffer_t pbuffer; } xcb_glx_destroy_pbuffer_request_t; /** * @brief xcb_glx_get_drawable_attributes_cookie_t **/ typedef struct xcb_glx_get_drawable_attributes_cookie_t { unsigned int sequence; } xcb_glx_get_drawable_attributes_cookie_t; /** Opcode for xcb_glx_get_drawable_attributes. */ #define XCB_GLX_GET_DRAWABLE_ATTRIBUTES 29 /** * @brief xcb_glx_get_drawable_attributes_request_t **/ typedef struct xcb_glx_get_drawable_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_drawable_t drawable; } xcb_glx_get_drawable_attributes_request_t; /** * @brief xcb_glx_get_drawable_attributes_reply_t **/ typedef struct xcb_glx_get_drawable_attributes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_attribs; uint8_t pad1[20]; } xcb_glx_get_drawable_attributes_reply_t; /** Opcode for xcb_glx_change_drawable_attributes. */ #define XCB_GLX_CHANGE_DRAWABLE_ATTRIBUTES 30 /** * @brief xcb_glx_change_drawable_attributes_request_t **/ typedef struct xcb_glx_change_drawable_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_drawable_t drawable; uint32_t num_attribs; } xcb_glx_change_drawable_attributes_request_t; /** Opcode for xcb_glx_create_window. */ #define XCB_GLX_CREATE_WINDOW 31 /** * @brief xcb_glx_create_window_request_t **/ typedef struct xcb_glx_create_window_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; xcb_glx_fbconfig_t fbconfig; xcb_window_t window; xcb_glx_window_t glx_window; uint32_t num_attribs; } xcb_glx_create_window_request_t; /** Opcode for xcb_glx_delete_window. */ #define XCB_GLX_DELETE_WINDOW 32 /** * @brief xcb_glx_delete_window_request_t **/ typedef struct xcb_glx_delete_window_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_window_t glxwindow; } xcb_glx_delete_window_request_t; /** Opcode for xcb_glx_set_client_info_arb. */ #define XCB_GLX_SET_CLIENT_INFO_ARB 33 /** * @brief xcb_glx_set_client_info_arb_request_t **/ typedef struct xcb_glx_set_client_info_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; uint32_t num_versions; uint32_t gl_str_len; uint32_t glx_str_len; } xcb_glx_set_client_info_arb_request_t; /** Opcode for xcb_glx_create_context_attribs_arb. */ #define XCB_GLX_CREATE_CONTEXT_ATTRIBS_ARB 34 /** * @brief xcb_glx_create_context_attribs_arb_request_t **/ typedef struct xcb_glx_create_context_attribs_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_t context; xcb_glx_fbconfig_t fbconfig; uint32_t screen; xcb_glx_context_t share_list; uint8_t is_direct; uint8_t pad0[3]; uint32_t num_attribs; } xcb_glx_create_context_attribs_arb_request_t; /** Opcode for xcb_glx_set_client_info_2arb. */ #define XCB_GLX_SET_CLIENT_INFO_2ARB 35 /** * @brief xcb_glx_set_client_info_2arb_request_t **/ typedef struct xcb_glx_set_client_info_2arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; uint32_t num_versions; uint32_t gl_str_len; uint32_t glx_str_len; } xcb_glx_set_client_info_2arb_request_t; /** Opcode for xcb_glx_new_list. */ #define XCB_GLX_NEW_LIST 101 /** * @brief xcb_glx_new_list_request_t **/ typedef struct xcb_glx_new_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t list; uint32_t mode; } xcb_glx_new_list_request_t; /** Opcode for xcb_glx_end_list. */ #define XCB_GLX_END_LIST 102 /** * @brief xcb_glx_end_list_request_t **/ typedef struct xcb_glx_end_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; } xcb_glx_end_list_request_t; /** Opcode for xcb_glx_delete_lists. */ #define XCB_GLX_DELETE_LISTS 103 /** * @brief xcb_glx_delete_lists_request_t **/ typedef struct xcb_glx_delete_lists_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t list; int32_t range; } xcb_glx_delete_lists_request_t; /** * @brief xcb_glx_gen_lists_cookie_t **/ typedef struct xcb_glx_gen_lists_cookie_t { unsigned int sequence; } xcb_glx_gen_lists_cookie_t; /** Opcode for xcb_glx_gen_lists. */ #define XCB_GLX_GEN_LISTS 104 /** * @brief xcb_glx_gen_lists_request_t **/ typedef struct xcb_glx_gen_lists_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t range; } xcb_glx_gen_lists_request_t; /** * @brief xcb_glx_gen_lists_reply_t **/ typedef struct xcb_glx_gen_lists_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t ret_val; } xcb_glx_gen_lists_reply_t; /** Opcode for xcb_glx_feedback_buffer. */ #define XCB_GLX_FEEDBACK_BUFFER 105 /** * @brief xcb_glx_feedback_buffer_request_t **/ typedef struct xcb_glx_feedback_buffer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t size; int32_t type; } xcb_glx_feedback_buffer_request_t; /** Opcode for xcb_glx_select_buffer. */ #define XCB_GLX_SELECT_BUFFER 106 /** * @brief xcb_glx_select_buffer_request_t **/ typedef struct xcb_glx_select_buffer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t size; } xcb_glx_select_buffer_request_t; /** * @brief xcb_glx_render_mode_cookie_t **/ typedef struct xcb_glx_render_mode_cookie_t { unsigned int sequence; } xcb_glx_render_mode_cookie_t; /** Opcode for xcb_glx_render_mode. */ #define XCB_GLX_RENDER_MODE 107 /** * @brief xcb_glx_render_mode_request_t **/ typedef struct xcb_glx_render_mode_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t mode; } xcb_glx_render_mode_request_t; /** * @brief xcb_glx_render_mode_reply_t **/ typedef struct xcb_glx_render_mode_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t ret_val; uint32_t n; uint32_t new_mode; uint8_t pad1[12]; } xcb_glx_render_mode_reply_t; typedef enum xcb_glx_rm_t { XCB_GLX_RM_GL_RENDER = 7168, XCB_GLX_RM_GL_FEEDBACK = 7169, XCB_GLX_RM_GL_SELECT = 7170 } xcb_glx_rm_t; /** * @brief xcb_glx_finish_cookie_t **/ typedef struct xcb_glx_finish_cookie_t { unsigned int sequence; } xcb_glx_finish_cookie_t; /** Opcode for xcb_glx_finish. */ #define XCB_GLX_FINISH 108 /** * @brief xcb_glx_finish_request_t **/ typedef struct xcb_glx_finish_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; } xcb_glx_finish_request_t; /** * @brief xcb_glx_finish_reply_t **/ typedef struct xcb_glx_finish_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; } xcb_glx_finish_reply_t; /** Opcode for xcb_glx_pixel_storef. */ #define XCB_GLX_PIXEL_STOREF 109 /** * @brief xcb_glx_pixel_storef_request_t **/ typedef struct xcb_glx_pixel_storef_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t pname; xcb_glx_float32_t datum; } xcb_glx_pixel_storef_request_t; /** Opcode for xcb_glx_pixel_storei. */ #define XCB_GLX_PIXEL_STOREI 110 /** * @brief xcb_glx_pixel_storei_request_t **/ typedef struct xcb_glx_pixel_storei_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t pname; int32_t datum; } xcb_glx_pixel_storei_request_t; /** * @brief xcb_glx_read_pixels_cookie_t **/ typedef struct xcb_glx_read_pixels_cookie_t { unsigned int sequence; } xcb_glx_read_pixels_cookie_t; /** Opcode for xcb_glx_read_pixels. */ #define XCB_GLX_READ_PIXELS 111 /** * @brief xcb_glx_read_pixels_request_t **/ typedef struct xcb_glx_read_pixels_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t x; int32_t y; int32_t width; int32_t height; uint32_t format; uint32_t type; uint8_t swap_bytes; uint8_t lsb_first; } xcb_glx_read_pixels_request_t; /** * @brief xcb_glx_read_pixels_reply_t **/ typedef struct xcb_glx_read_pixels_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_glx_read_pixels_reply_t; /** * @brief xcb_glx_get_booleanv_cookie_t **/ typedef struct xcb_glx_get_booleanv_cookie_t { unsigned int sequence; } xcb_glx_get_booleanv_cookie_t; /** Opcode for xcb_glx_get_booleanv. */ #define XCB_GLX_GET_BOOLEANV 112 /** * @brief xcb_glx_get_booleanv_request_t **/ typedef struct xcb_glx_get_booleanv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t pname; } xcb_glx_get_booleanv_request_t; /** * @brief xcb_glx_get_booleanv_reply_t **/ typedef struct xcb_glx_get_booleanv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; uint8_t datum; uint8_t pad2[15]; } xcb_glx_get_booleanv_reply_t; /** * @brief xcb_glx_get_clip_plane_cookie_t **/ typedef struct xcb_glx_get_clip_plane_cookie_t { unsigned int sequence; } xcb_glx_get_clip_plane_cookie_t; /** Opcode for xcb_glx_get_clip_plane. */ #define XCB_GLX_GET_CLIP_PLANE 113 /** * @brief xcb_glx_get_clip_plane_request_t **/ typedef struct xcb_glx_get_clip_plane_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t plane; } xcb_glx_get_clip_plane_request_t; /** * @brief xcb_glx_get_clip_plane_reply_t **/ typedef struct xcb_glx_get_clip_plane_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_glx_get_clip_plane_reply_t; /** * @brief xcb_glx_get_doublev_cookie_t **/ typedef struct xcb_glx_get_doublev_cookie_t { unsigned int sequence; } xcb_glx_get_doublev_cookie_t; /** Opcode for xcb_glx_get_doublev. */ #define XCB_GLX_GET_DOUBLEV 114 /** * @brief xcb_glx_get_doublev_request_t **/ typedef struct xcb_glx_get_doublev_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t pname; } xcb_glx_get_doublev_request_t; /** * @brief xcb_glx_get_doublev_reply_t **/ typedef struct xcb_glx_get_doublev_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float64_t datum; uint8_t pad2[8]; } xcb_glx_get_doublev_reply_t; /** * @brief xcb_glx_get_error_cookie_t **/ typedef struct xcb_glx_get_error_cookie_t { unsigned int sequence; } xcb_glx_get_error_cookie_t; /** Opcode for xcb_glx_get_error. */ #define XCB_GLX_GET_ERROR 115 /** * @brief xcb_glx_get_error_request_t **/ typedef struct xcb_glx_get_error_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; } xcb_glx_get_error_request_t; /** * @brief xcb_glx_get_error_reply_t **/ typedef struct xcb_glx_get_error_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; int32_t error; } xcb_glx_get_error_reply_t; /** * @brief xcb_glx_get_floatv_cookie_t **/ typedef struct xcb_glx_get_floatv_cookie_t { unsigned int sequence; } xcb_glx_get_floatv_cookie_t; /** Opcode for xcb_glx_get_floatv. */ #define XCB_GLX_GET_FLOATV 116 /** * @brief xcb_glx_get_floatv_request_t **/ typedef struct xcb_glx_get_floatv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t pname; } xcb_glx_get_floatv_request_t; /** * @brief xcb_glx_get_floatv_reply_t **/ typedef struct xcb_glx_get_floatv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_floatv_reply_t; /** * @brief xcb_glx_get_integerv_cookie_t **/ typedef struct xcb_glx_get_integerv_cookie_t { unsigned int sequence; } xcb_glx_get_integerv_cookie_t; /** Opcode for xcb_glx_get_integerv. */ #define XCB_GLX_GET_INTEGERV 117 /** * @brief xcb_glx_get_integerv_request_t **/ typedef struct xcb_glx_get_integerv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t pname; } xcb_glx_get_integerv_request_t; /** * @brief xcb_glx_get_integerv_reply_t **/ typedef struct xcb_glx_get_integerv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_integerv_reply_t; /** * @brief xcb_glx_get_lightfv_cookie_t **/ typedef struct xcb_glx_get_lightfv_cookie_t { unsigned int sequence; } xcb_glx_get_lightfv_cookie_t; /** Opcode for xcb_glx_get_lightfv. */ #define XCB_GLX_GET_LIGHTFV 118 /** * @brief xcb_glx_get_lightfv_request_t **/ typedef struct xcb_glx_get_lightfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t light; uint32_t pname; } xcb_glx_get_lightfv_request_t; /** * @brief xcb_glx_get_lightfv_reply_t **/ typedef struct xcb_glx_get_lightfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_lightfv_reply_t; /** * @brief xcb_glx_get_lightiv_cookie_t **/ typedef struct xcb_glx_get_lightiv_cookie_t { unsigned int sequence; } xcb_glx_get_lightiv_cookie_t; /** Opcode for xcb_glx_get_lightiv. */ #define XCB_GLX_GET_LIGHTIV 119 /** * @brief xcb_glx_get_lightiv_request_t **/ typedef struct xcb_glx_get_lightiv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t light; uint32_t pname; } xcb_glx_get_lightiv_request_t; /** * @brief xcb_glx_get_lightiv_reply_t **/ typedef struct xcb_glx_get_lightiv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_lightiv_reply_t; /** * @brief xcb_glx_get_mapdv_cookie_t **/ typedef struct xcb_glx_get_mapdv_cookie_t { unsigned int sequence; } xcb_glx_get_mapdv_cookie_t; /** Opcode for xcb_glx_get_mapdv. */ #define XCB_GLX_GET_MAPDV 120 /** * @brief xcb_glx_get_mapdv_request_t **/ typedef struct xcb_glx_get_mapdv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t query; } xcb_glx_get_mapdv_request_t; /** * @brief xcb_glx_get_mapdv_reply_t **/ typedef struct xcb_glx_get_mapdv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float64_t datum; uint8_t pad2[8]; } xcb_glx_get_mapdv_reply_t; /** * @brief xcb_glx_get_mapfv_cookie_t **/ typedef struct xcb_glx_get_mapfv_cookie_t { unsigned int sequence; } xcb_glx_get_mapfv_cookie_t; /** Opcode for xcb_glx_get_mapfv. */ #define XCB_GLX_GET_MAPFV 121 /** * @brief xcb_glx_get_mapfv_request_t **/ typedef struct xcb_glx_get_mapfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t query; } xcb_glx_get_mapfv_request_t; /** * @brief xcb_glx_get_mapfv_reply_t **/ typedef struct xcb_glx_get_mapfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_mapfv_reply_t; /** * @brief xcb_glx_get_mapiv_cookie_t **/ typedef struct xcb_glx_get_mapiv_cookie_t { unsigned int sequence; } xcb_glx_get_mapiv_cookie_t; /** Opcode for xcb_glx_get_mapiv. */ #define XCB_GLX_GET_MAPIV 122 /** * @brief xcb_glx_get_mapiv_request_t **/ typedef struct xcb_glx_get_mapiv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t query; } xcb_glx_get_mapiv_request_t; /** * @brief xcb_glx_get_mapiv_reply_t **/ typedef struct xcb_glx_get_mapiv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_mapiv_reply_t; /** * @brief xcb_glx_get_materialfv_cookie_t **/ typedef struct xcb_glx_get_materialfv_cookie_t { unsigned int sequence; } xcb_glx_get_materialfv_cookie_t; /** Opcode for xcb_glx_get_materialfv. */ #define XCB_GLX_GET_MATERIALFV 123 /** * @brief xcb_glx_get_materialfv_request_t **/ typedef struct xcb_glx_get_materialfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t face; uint32_t pname; } xcb_glx_get_materialfv_request_t; /** * @brief xcb_glx_get_materialfv_reply_t **/ typedef struct xcb_glx_get_materialfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_materialfv_reply_t; /** * @brief xcb_glx_get_materialiv_cookie_t **/ typedef struct xcb_glx_get_materialiv_cookie_t { unsigned int sequence; } xcb_glx_get_materialiv_cookie_t; /** Opcode for xcb_glx_get_materialiv. */ #define XCB_GLX_GET_MATERIALIV 124 /** * @brief xcb_glx_get_materialiv_request_t **/ typedef struct xcb_glx_get_materialiv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t face; uint32_t pname; } xcb_glx_get_materialiv_request_t; /** * @brief xcb_glx_get_materialiv_reply_t **/ typedef struct xcb_glx_get_materialiv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_materialiv_reply_t; /** * @brief xcb_glx_get_pixel_mapfv_cookie_t **/ typedef struct xcb_glx_get_pixel_mapfv_cookie_t { unsigned int sequence; } xcb_glx_get_pixel_mapfv_cookie_t; /** Opcode for xcb_glx_get_pixel_mapfv. */ #define XCB_GLX_GET_PIXEL_MAPFV 125 /** * @brief xcb_glx_get_pixel_mapfv_request_t **/ typedef struct xcb_glx_get_pixel_mapfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t map; } xcb_glx_get_pixel_mapfv_request_t; /** * @brief xcb_glx_get_pixel_mapfv_reply_t **/ typedef struct xcb_glx_get_pixel_mapfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_pixel_mapfv_reply_t; /** * @brief xcb_glx_get_pixel_mapuiv_cookie_t **/ typedef struct xcb_glx_get_pixel_mapuiv_cookie_t { unsigned int sequence; } xcb_glx_get_pixel_mapuiv_cookie_t; /** Opcode for xcb_glx_get_pixel_mapuiv. */ #define XCB_GLX_GET_PIXEL_MAPUIV 126 /** * @brief xcb_glx_get_pixel_mapuiv_request_t **/ typedef struct xcb_glx_get_pixel_mapuiv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t map; } xcb_glx_get_pixel_mapuiv_request_t; /** * @brief xcb_glx_get_pixel_mapuiv_reply_t **/ typedef struct xcb_glx_get_pixel_mapuiv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; uint32_t datum; uint8_t pad2[12]; } xcb_glx_get_pixel_mapuiv_reply_t; /** * @brief xcb_glx_get_pixel_mapusv_cookie_t **/ typedef struct xcb_glx_get_pixel_mapusv_cookie_t { unsigned int sequence; } xcb_glx_get_pixel_mapusv_cookie_t; /** Opcode for xcb_glx_get_pixel_mapusv. */ #define XCB_GLX_GET_PIXEL_MAPUSV 127 /** * @brief xcb_glx_get_pixel_mapusv_request_t **/ typedef struct xcb_glx_get_pixel_mapusv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t map; } xcb_glx_get_pixel_mapusv_request_t; /** * @brief xcb_glx_get_pixel_mapusv_reply_t **/ typedef struct xcb_glx_get_pixel_mapusv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; uint16_t datum; uint8_t pad2[16]; } xcb_glx_get_pixel_mapusv_reply_t; /** * @brief xcb_glx_get_polygon_stipple_cookie_t **/ typedef struct xcb_glx_get_polygon_stipple_cookie_t { unsigned int sequence; } xcb_glx_get_polygon_stipple_cookie_t; /** Opcode for xcb_glx_get_polygon_stipple. */ #define XCB_GLX_GET_POLYGON_STIPPLE 128 /** * @brief xcb_glx_get_polygon_stipple_request_t **/ typedef struct xcb_glx_get_polygon_stipple_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint8_t lsb_first; } xcb_glx_get_polygon_stipple_request_t; /** * @brief xcb_glx_get_polygon_stipple_reply_t **/ typedef struct xcb_glx_get_polygon_stipple_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_glx_get_polygon_stipple_reply_t; /** * @brief xcb_glx_get_string_cookie_t **/ typedef struct xcb_glx_get_string_cookie_t { unsigned int sequence; } xcb_glx_get_string_cookie_t; /** Opcode for xcb_glx_get_string. */ #define XCB_GLX_GET_STRING 129 /** * @brief xcb_glx_get_string_request_t **/ typedef struct xcb_glx_get_string_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t name; } xcb_glx_get_string_request_t; /** * @brief xcb_glx_get_string_reply_t **/ typedef struct xcb_glx_get_string_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; uint8_t pad2[16]; } xcb_glx_get_string_reply_t; /** * @brief xcb_glx_get_tex_envfv_cookie_t **/ typedef struct xcb_glx_get_tex_envfv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_envfv_cookie_t; /** Opcode for xcb_glx_get_tex_envfv. */ #define XCB_GLX_GET_TEX_ENVFV 130 /** * @brief xcb_glx_get_tex_envfv_request_t **/ typedef struct xcb_glx_get_tex_envfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_tex_envfv_request_t; /** * @brief xcb_glx_get_tex_envfv_reply_t **/ typedef struct xcb_glx_get_tex_envfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_envfv_reply_t; /** * @brief xcb_glx_get_tex_enviv_cookie_t **/ typedef struct xcb_glx_get_tex_enviv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_enviv_cookie_t; /** Opcode for xcb_glx_get_tex_enviv. */ #define XCB_GLX_GET_TEX_ENVIV 131 /** * @brief xcb_glx_get_tex_enviv_request_t **/ typedef struct xcb_glx_get_tex_enviv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_tex_enviv_request_t; /** * @brief xcb_glx_get_tex_enviv_reply_t **/ typedef struct xcb_glx_get_tex_enviv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_enviv_reply_t; /** * @brief xcb_glx_get_tex_gendv_cookie_t **/ typedef struct xcb_glx_get_tex_gendv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_gendv_cookie_t; /** Opcode for xcb_glx_get_tex_gendv. */ #define XCB_GLX_GET_TEX_GENDV 132 /** * @brief xcb_glx_get_tex_gendv_request_t **/ typedef struct xcb_glx_get_tex_gendv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t coord; uint32_t pname; } xcb_glx_get_tex_gendv_request_t; /** * @brief xcb_glx_get_tex_gendv_reply_t **/ typedef struct xcb_glx_get_tex_gendv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float64_t datum; uint8_t pad2[8]; } xcb_glx_get_tex_gendv_reply_t; /** * @brief xcb_glx_get_tex_genfv_cookie_t **/ typedef struct xcb_glx_get_tex_genfv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_genfv_cookie_t; /** Opcode for xcb_glx_get_tex_genfv. */ #define XCB_GLX_GET_TEX_GENFV 133 /** * @brief xcb_glx_get_tex_genfv_request_t **/ typedef struct xcb_glx_get_tex_genfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t coord; uint32_t pname; } xcb_glx_get_tex_genfv_request_t; /** * @brief xcb_glx_get_tex_genfv_reply_t **/ typedef struct xcb_glx_get_tex_genfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_genfv_reply_t; /** * @brief xcb_glx_get_tex_geniv_cookie_t **/ typedef struct xcb_glx_get_tex_geniv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_geniv_cookie_t; /** Opcode for xcb_glx_get_tex_geniv. */ #define XCB_GLX_GET_TEX_GENIV 134 /** * @brief xcb_glx_get_tex_geniv_request_t **/ typedef struct xcb_glx_get_tex_geniv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t coord; uint32_t pname; } xcb_glx_get_tex_geniv_request_t; /** * @brief xcb_glx_get_tex_geniv_reply_t **/ typedef struct xcb_glx_get_tex_geniv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_geniv_reply_t; /** * @brief xcb_glx_get_tex_image_cookie_t **/ typedef struct xcb_glx_get_tex_image_cookie_t { unsigned int sequence; } xcb_glx_get_tex_image_cookie_t; /** Opcode for xcb_glx_get_tex_image. */ #define XCB_GLX_GET_TEX_IMAGE 135 /** * @brief xcb_glx_get_tex_image_request_t **/ typedef struct xcb_glx_get_tex_image_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; int32_t level; uint32_t format; uint32_t type; uint8_t swap_bytes; } xcb_glx_get_tex_image_request_t; /** * @brief xcb_glx_get_tex_image_reply_t **/ typedef struct xcb_glx_get_tex_image_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[8]; int32_t width; int32_t height; int32_t depth; uint8_t pad2[4]; } xcb_glx_get_tex_image_reply_t; /** * @brief xcb_glx_get_tex_parameterfv_cookie_t **/ typedef struct xcb_glx_get_tex_parameterfv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_parameterfv_cookie_t; /** Opcode for xcb_glx_get_tex_parameterfv. */ #define XCB_GLX_GET_TEX_PARAMETERFV 136 /** * @brief xcb_glx_get_tex_parameterfv_request_t **/ typedef struct xcb_glx_get_tex_parameterfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_tex_parameterfv_request_t; /** * @brief xcb_glx_get_tex_parameterfv_reply_t **/ typedef struct xcb_glx_get_tex_parameterfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_parameterfv_reply_t; /** * @brief xcb_glx_get_tex_parameteriv_cookie_t **/ typedef struct xcb_glx_get_tex_parameteriv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_parameteriv_cookie_t; /** Opcode for xcb_glx_get_tex_parameteriv. */ #define XCB_GLX_GET_TEX_PARAMETERIV 137 /** * @brief xcb_glx_get_tex_parameteriv_request_t **/ typedef struct xcb_glx_get_tex_parameteriv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_tex_parameteriv_request_t; /** * @brief xcb_glx_get_tex_parameteriv_reply_t **/ typedef struct xcb_glx_get_tex_parameteriv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_parameteriv_reply_t; /** * @brief xcb_glx_get_tex_level_parameterfv_cookie_t **/ typedef struct xcb_glx_get_tex_level_parameterfv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_level_parameterfv_cookie_t; /** Opcode for xcb_glx_get_tex_level_parameterfv. */ #define XCB_GLX_GET_TEX_LEVEL_PARAMETERFV 138 /** * @brief xcb_glx_get_tex_level_parameterfv_request_t **/ typedef struct xcb_glx_get_tex_level_parameterfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; int32_t level; uint32_t pname; } xcb_glx_get_tex_level_parameterfv_request_t; /** * @brief xcb_glx_get_tex_level_parameterfv_reply_t **/ typedef struct xcb_glx_get_tex_level_parameterfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_level_parameterfv_reply_t; /** * @brief xcb_glx_get_tex_level_parameteriv_cookie_t **/ typedef struct xcb_glx_get_tex_level_parameteriv_cookie_t { unsigned int sequence; } xcb_glx_get_tex_level_parameteriv_cookie_t; /** Opcode for xcb_glx_get_tex_level_parameteriv. */ #define XCB_GLX_GET_TEX_LEVEL_PARAMETERIV 139 /** * @brief xcb_glx_get_tex_level_parameteriv_request_t **/ typedef struct xcb_glx_get_tex_level_parameteriv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; int32_t level; uint32_t pname; } xcb_glx_get_tex_level_parameteriv_request_t; /** * @brief xcb_glx_get_tex_level_parameteriv_reply_t **/ typedef struct xcb_glx_get_tex_level_parameteriv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_tex_level_parameteriv_reply_t; /** * @brief xcb_glx_is_enabled_cookie_t **/ typedef struct xcb_glx_is_enabled_cookie_t { unsigned int sequence; } xcb_glx_is_enabled_cookie_t; /** Opcode for xcb_glx_is_enabled. */ #define XCB_GLX_IS_ENABLED 140 /** * @brief xcb_glx_is_enabled_request_t **/ typedef struct xcb_glx_is_enabled_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t capability; } xcb_glx_is_enabled_request_t; /** * @brief xcb_glx_is_enabled_reply_t **/ typedef struct xcb_glx_is_enabled_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_glx_bool32_t ret_val; } xcb_glx_is_enabled_reply_t; /** * @brief xcb_glx_is_list_cookie_t **/ typedef struct xcb_glx_is_list_cookie_t { unsigned int sequence; } xcb_glx_is_list_cookie_t; /** Opcode for xcb_glx_is_list. */ #define XCB_GLX_IS_LIST 141 /** * @brief xcb_glx_is_list_request_t **/ typedef struct xcb_glx_is_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t list; } xcb_glx_is_list_request_t; /** * @brief xcb_glx_is_list_reply_t **/ typedef struct xcb_glx_is_list_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_glx_bool32_t ret_val; } xcb_glx_is_list_reply_t; /** Opcode for xcb_glx_flush. */ #define XCB_GLX_FLUSH 142 /** * @brief xcb_glx_flush_request_t **/ typedef struct xcb_glx_flush_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; } xcb_glx_flush_request_t; /** * @brief xcb_glx_are_textures_resident_cookie_t **/ typedef struct xcb_glx_are_textures_resident_cookie_t { unsigned int sequence; } xcb_glx_are_textures_resident_cookie_t; /** Opcode for xcb_glx_are_textures_resident. */ #define XCB_GLX_ARE_TEXTURES_RESIDENT 143 /** * @brief xcb_glx_are_textures_resident_request_t **/ typedef struct xcb_glx_are_textures_resident_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t n; } xcb_glx_are_textures_resident_request_t; /** * @brief xcb_glx_are_textures_resident_reply_t **/ typedef struct xcb_glx_are_textures_resident_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_glx_bool32_t ret_val; uint8_t pad1[20]; } xcb_glx_are_textures_resident_reply_t; /** Opcode for xcb_glx_delete_textures. */ #define XCB_GLX_DELETE_TEXTURES 144 /** * @brief xcb_glx_delete_textures_request_t **/ typedef struct xcb_glx_delete_textures_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t n; } xcb_glx_delete_textures_request_t; /** * @brief xcb_glx_gen_textures_cookie_t **/ typedef struct xcb_glx_gen_textures_cookie_t { unsigned int sequence; } xcb_glx_gen_textures_cookie_t; /** Opcode for xcb_glx_gen_textures. */ #define XCB_GLX_GEN_TEXTURES 145 /** * @brief xcb_glx_gen_textures_request_t **/ typedef struct xcb_glx_gen_textures_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t n; } xcb_glx_gen_textures_request_t; /** * @brief xcb_glx_gen_textures_reply_t **/ typedef struct xcb_glx_gen_textures_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_glx_gen_textures_reply_t; /** * @brief xcb_glx_is_texture_cookie_t **/ typedef struct xcb_glx_is_texture_cookie_t { unsigned int sequence; } xcb_glx_is_texture_cookie_t; /** Opcode for xcb_glx_is_texture. */ #define XCB_GLX_IS_TEXTURE 146 /** * @brief xcb_glx_is_texture_request_t **/ typedef struct xcb_glx_is_texture_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t texture; } xcb_glx_is_texture_request_t; /** * @brief xcb_glx_is_texture_reply_t **/ typedef struct xcb_glx_is_texture_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_glx_bool32_t ret_val; } xcb_glx_is_texture_reply_t; /** * @brief xcb_glx_get_color_table_cookie_t **/ typedef struct xcb_glx_get_color_table_cookie_t { unsigned int sequence; } xcb_glx_get_color_table_cookie_t; /** Opcode for xcb_glx_get_color_table. */ #define XCB_GLX_GET_COLOR_TABLE 147 /** * @brief xcb_glx_get_color_table_request_t **/ typedef struct xcb_glx_get_color_table_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t format; uint32_t type; uint8_t swap_bytes; } xcb_glx_get_color_table_request_t; /** * @brief xcb_glx_get_color_table_reply_t **/ typedef struct xcb_glx_get_color_table_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[8]; int32_t width; uint8_t pad2[12]; } xcb_glx_get_color_table_reply_t; /** * @brief xcb_glx_get_color_table_parameterfv_cookie_t **/ typedef struct xcb_glx_get_color_table_parameterfv_cookie_t { unsigned int sequence; } xcb_glx_get_color_table_parameterfv_cookie_t; /** Opcode for xcb_glx_get_color_table_parameterfv. */ #define XCB_GLX_GET_COLOR_TABLE_PARAMETERFV 148 /** * @brief xcb_glx_get_color_table_parameterfv_request_t **/ typedef struct xcb_glx_get_color_table_parameterfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_color_table_parameterfv_request_t; /** * @brief xcb_glx_get_color_table_parameterfv_reply_t **/ typedef struct xcb_glx_get_color_table_parameterfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_color_table_parameterfv_reply_t; /** * @brief xcb_glx_get_color_table_parameteriv_cookie_t **/ typedef struct xcb_glx_get_color_table_parameteriv_cookie_t { unsigned int sequence; } xcb_glx_get_color_table_parameteriv_cookie_t; /** Opcode for xcb_glx_get_color_table_parameteriv. */ #define XCB_GLX_GET_COLOR_TABLE_PARAMETERIV 149 /** * @brief xcb_glx_get_color_table_parameteriv_request_t **/ typedef struct xcb_glx_get_color_table_parameteriv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_color_table_parameteriv_request_t; /** * @brief xcb_glx_get_color_table_parameteriv_reply_t **/ typedef struct xcb_glx_get_color_table_parameteriv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_color_table_parameteriv_reply_t; /** * @brief xcb_glx_get_convolution_filter_cookie_t **/ typedef struct xcb_glx_get_convolution_filter_cookie_t { unsigned int sequence; } xcb_glx_get_convolution_filter_cookie_t; /** Opcode for xcb_glx_get_convolution_filter. */ #define XCB_GLX_GET_CONVOLUTION_FILTER 150 /** * @brief xcb_glx_get_convolution_filter_request_t **/ typedef struct xcb_glx_get_convolution_filter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t format; uint32_t type; uint8_t swap_bytes; } xcb_glx_get_convolution_filter_request_t; /** * @brief xcb_glx_get_convolution_filter_reply_t **/ typedef struct xcb_glx_get_convolution_filter_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[8]; int32_t width; int32_t height; uint8_t pad2[8]; } xcb_glx_get_convolution_filter_reply_t; /** * @brief xcb_glx_get_convolution_parameterfv_cookie_t **/ typedef struct xcb_glx_get_convolution_parameterfv_cookie_t { unsigned int sequence; } xcb_glx_get_convolution_parameterfv_cookie_t; /** Opcode for xcb_glx_get_convolution_parameterfv. */ #define XCB_GLX_GET_CONVOLUTION_PARAMETERFV 151 /** * @brief xcb_glx_get_convolution_parameterfv_request_t **/ typedef struct xcb_glx_get_convolution_parameterfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_convolution_parameterfv_request_t; /** * @brief xcb_glx_get_convolution_parameterfv_reply_t **/ typedef struct xcb_glx_get_convolution_parameterfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_convolution_parameterfv_reply_t; /** * @brief xcb_glx_get_convolution_parameteriv_cookie_t **/ typedef struct xcb_glx_get_convolution_parameteriv_cookie_t { unsigned int sequence; } xcb_glx_get_convolution_parameteriv_cookie_t; /** Opcode for xcb_glx_get_convolution_parameteriv. */ #define XCB_GLX_GET_CONVOLUTION_PARAMETERIV 152 /** * @brief xcb_glx_get_convolution_parameteriv_request_t **/ typedef struct xcb_glx_get_convolution_parameteriv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_convolution_parameteriv_request_t; /** * @brief xcb_glx_get_convolution_parameteriv_reply_t **/ typedef struct xcb_glx_get_convolution_parameteriv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_convolution_parameteriv_reply_t; /** * @brief xcb_glx_get_separable_filter_cookie_t **/ typedef struct xcb_glx_get_separable_filter_cookie_t { unsigned int sequence; } xcb_glx_get_separable_filter_cookie_t; /** Opcode for xcb_glx_get_separable_filter. */ #define XCB_GLX_GET_SEPARABLE_FILTER 153 /** * @brief xcb_glx_get_separable_filter_request_t **/ typedef struct xcb_glx_get_separable_filter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t format; uint32_t type; uint8_t swap_bytes; } xcb_glx_get_separable_filter_request_t; /** * @brief xcb_glx_get_separable_filter_reply_t **/ typedef struct xcb_glx_get_separable_filter_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[8]; int32_t row_w; int32_t col_h; uint8_t pad2[8]; } xcb_glx_get_separable_filter_reply_t; /** * @brief xcb_glx_get_histogram_cookie_t **/ typedef struct xcb_glx_get_histogram_cookie_t { unsigned int sequence; } xcb_glx_get_histogram_cookie_t; /** Opcode for xcb_glx_get_histogram. */ #define XCB_GLX_GET_HISTOGRAM 154 /** * @brief xcb_glx_get_histogram_request_t **/ typedef struct xcb_glx_get_histogram_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t format; uint32_t type; uint8_t swap_bytes; uint8_t reset; } xcb_glx_get_histogram_request_t; /** * @brief xcb_glx_get_histogram_reply_t **/ typedef struct xcb_glx_get_histogram_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[8]; int32_t width; uint8_t pad2[12]; } xcb_glx_get_histogram_reply_t; /** * @brief xcb_glx_get_histogram_parameterfv_cookie_t **/ typedef struct xcb_glx_get_histogram_parameterfv_cookie_t { unsigned int sequence; } xcb_glx_get_histogram_parameterfv_cookie_t; /** Opcode for xcb_glx_get_histogram_parameterfv. */ #define XCB_GLX_GET_HISTOGRAM_PARAMETERFV 155 /** * @brief xcb_glx_get_histogram_parameterfv_request_t **/ typedef struct xcb_glx_get_histogram_parameterfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_histogram_parameterfv_request_t; /** * @brief xcb_glx_get_histogram_parameterfv_reply_t **/ typedef struct xcb_glx_get_histogram_parameterfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_histogram_parameterfv_reply_t; /** * @brief xcb_glx_get_histogram_parameteriv_cookie_t **/ typedef struct xcb_glx_get_histogram_parameteriv_cookie_t { unsigned int sequence; } xcb_glx_get_histogram_parameteriv_cookie_t; /** Opcode for xcb_glx_get_histogram_parameteriv. */ #define XCB_GLX_GET_HISTOGRAM_PARAMETERIV 156 /** * @brief xcb_glx_get_histogram_parameteriv_request_t **/ typedef struct xcb_glx_get_histogram_parameteriv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_histogram_parameteriv_request_t; /** * @brief xcb_glx_get_histogram_parameteriv_reply_t **/ typedef struct xcb_glx_get_histogram_parameteriv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_histogram_parameteriv_reply_t; /** * @brief xcb_glx_get_minmax_cookie_t **/ typedef struct xcb_glx_get_minmax_cookie_t { unsigned int sequence; } xcb_glx_get_minmax_cookie_t; /** Opcode for xcb_glx_get_minmax. */ #define XCB_GLX_GET_MINMAX 157 /** * @brief xcb_glx_get_minmax_request_t **/ typedef struct xcb_glx_get_minmax_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t format; uint32_t type; uint8_t swap_bytes; uint8_t reset; } xcb_glx_get_minmax_request_t; /** * @brief xcb_glx_get_minmax_reply_t **/ typedef struct xcb_glx_get_minmax_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_glx_get_minmax_reply_t; /** * @brief xcb_glx_get_minmax_parameterfv_cookie_t **/ typedef struct xcb_glx_get_minmax_parameterfv_cookie_t { unsigned int sequence; } xcb_glx_get_minmax_parameterfv_cookie_t; /** Opcode for xcb_glx_get_minmax_parameterfv. */ #define XCB_GLX_GET_MINMAX_PARAMETERFV 158 /** * @brief xcb_glx_get_minmax_parameterfv_request_t **/ typedef struct xcb_glx_get_minmax_parameterfv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_minmax_parameterfv_request_t; /** * @brief xcb_glx_get_minmax_parameterfv_reply_t **/ typedef struct xcb_glx_get_minmax_parameterfv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; xcb_glx_float32_t datum; uint8_t pad2[12]; } xcb_glx_get_minmax_parameterfv_reply_t; /** * @brief xcb_glx_get_minmax_parameteriv_cookie_t **/ typedef struct xcb_glx_get_minmax_parameteriv_cookie_t { unsigned int sequence; } xcb_glx_get_minmax_parameteriv_cookie_t; /** Opcode for xcb_glx_get_minmax_parameteriv. */ #define XCB_GLX_GET_MINMAX_PARAMETERIV 159 /** * @brief xcb_glx_get_minmax_parameteriv_request_t **/ typedef struct xcb_glx_get_minmax_parameteriv_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_minmax_parameteriv_request_t; /** * @brief xcb_glx_get_minmax_parameteriv_reply_t **/ typedef struct xcb_glx_get_minmax_parameteriv_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_minmax_parameteriv_reply_t; /** * @brief xcb_glx_get_compressed_tex_image_arb_cookie_t **/ typedef struct xcb_glx_get_compressed_tex_image_arb_cookie_t { unsigned int sequence; } xcb_glx_get_compressed_tex_image_arb_cookie_t; /** Opcode for xcb_glx_get_compressed_tex_image_arb. */ #define XCB_GLX_GET_COMPRESSED_TEX_IMAGE_ARB 160 /** * @brief xcb_glx_get_compressed_tex_image_arb_request_t **/ typedef struct xcb_glx_get_compressed_tex_image_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; int32_t level; } xcb_glx_get_compressed_tex_image_arb_request_t; /** * @brief xcb_glx_get_compressed_tex_image_arb_reply_t **/ typedef struct xcb_glx_get_compressed_tex_image_arb_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[8]; int32_t size; uint8_t pad2[12]; } xcb_glx_get_compressed_tex_image_arb_reply_t; /** Opcode for xcb_glx_delete_queries_arb. */ #define XCB_GLX_DELETE_QUERIES_ARB 161 /** * @brief xcb_glx_delete_queries_arb_request_t **/ typedef struct xcb_glx_delete_queries_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t n; } xcb_glx_delete_queries_arb_request_t; /** * @brief xcb_glx_gen_queries_arb_cookie_t **/ typedef struct xcb_glx_gen_queries_arb_cookie_t { unsigned int sequence; } xcb_glx_gen_queries_arb_cookie_t; /** Opcode for xcb_glx_gen_queries_arb. */ #define XCB_GLX_GEN_QUERIES_ARB 162 /** * @brief xcb_glx_gen_queries_arb_request_t **/ typedef struct xcb_glx_gen_queries_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; int32_t n; } xcb_glx_gen_queries_arb_request_t; /** * @brief xcb_glx_gen_queries_arb_reply_t **/ typedef struct xcb_glx_gen_queries_arb_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_glx_gen_queries_arb_reply_t; /** * @brief xcb_glx_is_query_arb_cookie_t **/ typedef struct xcb_glx_is_query_arb_cookie_t { unsigned int sequence; } xcb_glx_is_query_arb_cookie_t; /** Opcode for xcb_glx_is_query_arb. */ #define XCB_GLX_IS_QUERY_ARB 163 /** * @brief xcb_glx_is_query_arb_request_t **/ typedef struct xcb_glx_is_query_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t id; } xcb_glx_is_query_arb_request_t; /** * @brief xcb_glx_is_query_arb_reply_t **/ typedef struct xcb_glx_is_query_arb_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_glx_bool32_t ret_val; } xcb_glx_is_query_arb_reply_t; /** * @brief xcb_glx_get_queryiv_arb_cookie_t **/ typedef struct xcb_glx_get_queryiv_arb_cookie_t { unsigned int sequence; } xcb_glx_get_queryiv_arb_cookie_t; /** Opcode for xcb_glx_get_queryiv_arb. */ #define XCB_GLX_GET_QUERYIV_ARB 164 /** * @brief xcb_glx_get_queryiv_arb_request_t **/ typedef struct xcb_glx_get_queryiv_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t target; uint32_t pname; } xcb_glx_get_queryiv_arb_request_t; /** * @brief xcb_glx_get_queryiv_arb_reply_t **/ typedef struct xcb_glx_get_queryiv_arb_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_queryiv_arb_reply_t; /** * @brief xcb_glx_get_query_objectiv_arb_cookie_t **/ typedef struct xcb_glx_get_query_objectiv_arb_cookie_t { unsigned int sequence; } xcb_glx_get_query_objectiv_arb_cookie_t; /** Opcode for xcb_glx_get_query_objectiv_arb. */ #define XCB_GLX_GET_QUERY_OBJECTIV_ARB 165 /** * @brief xcb_glx_get_query_objectiv_arb_request_t **/ typedef struct xcb_glx_get_query_objectiv_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t id; uint32_t pname; } xcb_glx_get_query_objectiv_arb_request_t; /** * @brief xcb_glx_get_query_objectiv_arb_reply_t **/ typedef struct xcb_glx_get_query_objectiv_arb_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; int32_t datum; uint8_t pad2[12]; } xcb_glx_get_query_objectiv_arb_reply_t; /** * @brief xcb_glx_get_query_objectuiv_arb_cookie_t **/ typedef struct xcb_glx_get_query_objectuiv_arb_cookie_t { unsigned int sequence; } xcb_glx_get_query_objectuiv_arb_cookie_t; /** Opcode for xcb_glx_get_query_objectuiv_arb. */ #define XCB_GLX_GET_QUERY_OBJECTUIV_ARB 166 /** * @brief xcb_glx_get_query_objectuiv_arb_request_t **/ typedef struct xcb_glx_get_query_objectuiv_arb_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_glx_context_tag_t context_tag; uint32_t id; uint32_t pname; } xcb_glx_get_query_objectuiv_arb_request_t; /** * @brief xcb_glx_get_query_objectuiv_arb_reply_t **/ typedef struct xcb_glx_get_query_objectuiv_arb_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[4]; uint32_t n; uint32_t datum; uint8_t pad2[12]; } xcb_glx_get_query_objectuiv_arb_reply_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_pixmap_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_pixmap_t) */ void xcb_glx_pixmap_next (xcb_glx_pixmap_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_pixmap_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_pixmap_end (xcb_glx_pixmap_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_context_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_context_t) */ void xcb_glx_context_next (xcb_glx_context_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_context_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_context_end (xcb_glx_context_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_pbuffer_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_pbuffer_t) */ void xcb_glx_pbuffer_next (xcb_glx_pbuffer_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_pbuffer_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_pbuffer_end (xcb_glx_pbuffer_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_window_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_window_t) */ void xcb_glx_window_next (xcb_glx_window_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_window_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_window_end (xcb_glx_window_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_fbconfig_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_fbconfig_t) */ void xcb_glx_fbconfig_next (xcb_glx_fbconfig_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_fbconfig_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_fbconfig_end (xcb_glx_fbconfig_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_drawable_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_drawable_t) */ void xcb_glx_drawable_next (xcb_glx_drawable_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_drawable_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_drawable_end (xcb_glx_drawable_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_float32_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_float32_t) */ void xcb_glx_float32_next (xcb_glx_float32_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_float32_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_float32_end (xcb_glx_float32_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_float64_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_float64_t) */ void xcb_glx_float64_next (xcb_glx_float64_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_float64_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_float64_end (xcb_glx_float64_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_bool32_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_bool32_t) */ void xcb_glx_bool32_next (xcb_glx_bool32_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_bool32_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_bool32_end (xcb_glx_bool32_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_glx_context_tag_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_glx_context_tag_t) */ void xcb_glx_context_tag_next (xcb_glx_context_tag_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_glx_context_tag_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_glx_context_tag_end (xcb_glx_context_tag_iterator_t i); int xcb_glx_render_sizeof (const void *_buffer, uint32_t data_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_render_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t data_len, const uint8_t *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_render (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t data_len, const uint8_t *data); uint8_t * xcb_glx_render_data (const xcb_glx_render_request_t *R); int xcb_glx_render_data_length (const xcb_glx_render_request_t *R); xcb_generic_iterator_t xcb_glx_render_data_end (const xcb_glx_render_request_t *R); int xcb_glx_render_large_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_render_large_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint16_t request_num, uint16_t request_total, uint32_t data_len, const uint8_t *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_render_large (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint16_t request_num, uint16_t request_total, uint32_t data_len, const uint8_t *data); uint8_t * xcb_glx_render_large_data (const xcb_glx_render_large_request_t *R); int xcb_glx_render_large_data_length (const xcb_glx_render_large_request_t *R); xcb_generic_iterator_t xcb_glx_render_large_data_end (const xcb_glx_render_large_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_create_context_checked (xcb_connection_t *c, xcb_glx_context_t context, xcb_visualid_t visual, uint32_t screen, xcb_glx_context_t share_list, uint8_t is_direct); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_create_context (xcb_connection_t *c, xcb_glx_context_t context, xcb_visualid_t visual, uint32_t screen, xcb_glx_context_t share_list, uint8_t is_direct); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_destroy_context_checked (xcb_connection_t *c, xcb_glx_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_destroy_context (xcb_connection_t *c, xcb_glx_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_make_current_cookie_t xcb_glx_make_current (xcb_connection_t *c, xcb_glx_drawable_t drawable, xcb_glx_context_t context, xcb_glx_context_tag_t old_context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_make_current_cookie_t xcb_glx_make_current_unchecked (xcb_connection_t *c, xcb_glx_drawable_t drawable, xcb_glx_context_t context, xcb_glx_context_tag_t old_context_tag); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_make_current_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_make_current_reply_t * xcb_glx_make_current_reply (xcb_connection_t *c, xcb_glx_make_current_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_is_direct_cookie_t xcb_glx_is_direct (xcb_connection_t *c, xcb_glx_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_is_direct_cookie_t xcb_glx_is_direct_unchecked (xcb_connection_t *c, xcb_glx_context_t context); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_is_direct_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_is_direct_reply_t * xcb_glx_is_direct_reply (xcb_connection_t *c, xcb_glx_is_direct_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_query_version_cookie_t xcb_glx_query_version (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_query_version_cookie_t xcb_glx_query_version_unchecked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_query_version_reply_t * xcb_glx_query_version_reply (xcb_connection_t *c, xcb_glx_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_wait_gl_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_wait_gl (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_wait_x_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_wait_x (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_copy_context_checked (xcb_connection_t *c, xcb_glx_context_t src, xcb_glx_context_t dest, uint32_t mask, xcb_glx_context_tag_t src_context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_copy_context (xcb_connection_t *c, xcb_glx_context_t src, xcb_glx_context_t dest, uint32_t mask, xcb_glx_context_tag_t src_context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_swap_buffers_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, xcb_glx_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_swap_buffers (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, xcb_glx_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_use_x_font_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, xcb_font_t font, uint32_t first, uint32_t count, uint32_t list_base); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_use_x_font (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, xcb_font_t font, uint32_t first, uint32_t count, uint32_t list_base); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_create_glx_pixmap_checked (xcb_connection_t *c, uint32_t screen, xcb_visualid_t visual, xcb_pixmap_t pixmap, xcb_glx_pixmap_t glx_pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_create_glx_pixmap (xcb_connection_t *c, uint32_t screen, xcb_visualid_t visual, xcb_pixmap_t pixmap, xcb_glx_pixmap_t glx_pixmap); int xcb_glx_get_visual_configs_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_visual_configs_cookie_t xcb_glx_get_visual_configs (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_visual_configs_cookie_t xcb_glx_get_visual_configs_unchecked (xcb_connection_t *c, uint32_t screen); uint32_t * xcb_glx_get_visual_configs_property_list (const xcb_glx_get_visual_configs_reply_t *R); int xcb_glx_get_visual_configs_property_list_length (const xcb_glx_get_visual_configs_reply_t *R); xcb_generic_iterator_t xcb_glx_get_visual_configs_property_list_end (const xcb_glx_get_visual_configs_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_visual_configs_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_visual_configs_reply_t * xcb_glx_get_visual_configs_reply (xcb_connection_t *c, xcb_glx_get_visual_configs_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_destroy_glx_pixmap_checked (xcb_connection_t *c, xcb_glx_pixmap_t glx_pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_destroy_glx_pixmap (xcb_connection_t *c, xcb_glx_pixmap_t glx_pixmap); int xcb_glx_vendor_private_sizeof (const void *_buffer, uint32_t data_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_vendor_private_checked (xcb_connection_t *c, uint32_t vendor_code, xcb_glx_context_tag_t context_tag, uint32_t data_len, const uint8_t *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_vendor_private (xcb_connection_t *c, uint32_t vendor_code, xcb_glx_context_tag_t context_tag, uint32_t data_len, const uint8_t *data); uint8_t * xcb_glx_vendor_private_data (const xcb_glx_vendor_private_request_t *R); int xcb_glx_vendor_private_data_length (const xcb_glx_vendor_private_request_t *R); xcb_generic_iterator_t xcb_glx_vendor_private_data_end (const xcb_glx_vendor_private_request_t *R); int xcb_glx_vendor_private_with_reply_sizeof (const void *_buffer, uint32_t data_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_vendor_private_with_reply_cookie_t xcb_glx_vendor_private_with_reply (xcb_connection_t *c, uint32_t vendor_code, xcb_glx_context_tag_t context_tag, uint32_t data_len, const uint8_t *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_vendor_private_with_reply_cookie_t xcb_glx_vendor_private_with_reply_unchecked (xcb_connection_t *c, uint32_t vendor_code, xcb_glx_context_tag_t context_tag, uint32_t data_len, const uint8_t *data); uint8_t * xcb_glx_vendor_private_with_reply_data_2 (const xcb_glx_vendor_private_with_reply_reply_t *R); int xcb_glx_vendor_private_with_reply_data_2_length (const xcb_glx_vendor_private_with_reply_reply_t *R); xcb_generic_iterator_t xcb_glx_vendor_private_with_reply_data_2_end (const xcb_glx_vendor_private_with_reply_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_vendor_private_with_reply_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_vendor_private_with_reply_reply_t * xcb_glx_vendor_private_with_reply_reply (xcb_connection_t *c, xcb_glx_vendor_private_with_reply_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_query_extensions_string_cookie_t xcb_glx_query_extensions_string (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_query_extensions_string_cookie_t xcb_glx_query_extensions_string_unchecked (xcb_connection_t *c, uint32_t screen); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_query_extensions_string_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_query_extensions_string_reply_t * xcb_glx_query_extensions_string_reply (xcb_connection_t *c, xcb_glx_query_extensions_string_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_query_server_string_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_query_server_string_cookie_t xcb_glx_query_server_string (xcb_connection_t *c, uint32_t screen, uint32_t name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_query_server_string_cookie_t xcb_glx_query_server_string_unchecked (xcb_connection_t *c, uint32_t screen, uint32_t name); char * xcb_glx_query_server_string_string (const xcb_glx_query_server_string_reply_t *R); int xcb_glx_query_server_string_string_length (const xcb_glx_query_server_string_reply_t *R); xcb_generic_iterator_t xcb_glx_query_server_string_string_end (const xcb_glx_query_server_string_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_query_server_string_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_query_server_string_reply_t * xcb_glx_query_server_string_reply (xcb_connection_t *c, xcb_glx_query_server_string_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_client_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_client_info_checked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version, uint32_t str_len, const char *string); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_client_info (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version, uint32_t str_len, const char *string); char * xcb_glx_client_info_string (const xcb_glx_client_info_request_t *R); int xcb_glx_client_info_string_length (const xcb_glx_client_info_request_t *R); xcb_generic_iterator_t xcb_glx_client_info_string_end (const xcb_glx_client_info_request_t *R); int xcb_glx_get_fb_configs_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_fb_configs_cookie_t xcb_glx_get_fb_configs (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_fb_configs_cookie_t xcb_glx_get_fb_configs_unchecked (xcb_connection_t *c, uint32_t screen); uint32_t * xcb_glx_get_fb_configs_property_list (const xcb_glx_get_fb_configs_reply_t *R); int xcb_glx_get_fb_configs_property_list_length (const xcb_glx_get_fb_configs_reply_t *R); xcb_generic_iterator_t xcb_glx_get_fb_configs_property_list_end (const xcb_glx_get_fb_configs_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_fb_configs_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_fb_configs_reply_t * xcb_glx_get_fb_configs_reply (xcb_connection_t *c, xcb_glx_get_fb_configs_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_create_pixmap_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_create_pixmap_checked (xcb_connection_t *c, uint32_t screen, xcb_glx_fbconfig_t fbconfig, xcb_pixmap_t pixmap, xcb_glx_pixmap_t glx_pixmap, uint32_t num_attribs, const uint32_t *attribs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_create_pixmap (xcb_connection_t *c, uint32_t screen, xcb_glx_fbconfig_t fbconfig, xcb_pixmap_t pixmap, xcb_glx_pixmap_t glx_pixmap, uint32_t num_attribs, const uint32_t *attribs); uint32_t * xcb_glx_create_pixmap_attribs (const xcb_glx_create_pixmap_request_t *R); int xcb_glx_create_pixmap_attribs_length (const xcb_glx_create_pixmap_request_t *R); xcb_generic_iterator_t xcb_glx_create_pixmap_attribs_end (const xcb_glx_create_pixmap_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_destroy_pixmap_checked (xcb_connection_t *c, xcb_glx_pixmap_t glx_pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_destroy_pixmap (xcb_connection_t *c, xcb_glx_pixmap_t glx_pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_create_new_context_checked (xcb_connection_t *c, xcb_glx_context_t context, xcb_glx_fbconfig_t fbconfig, uint32_t screen, uint32_t render_type, xcb_glx_context_t share_list, uint8_t is_direct); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_create_new_context (xcb_connection_t *c, xcb_glx_context_t context, xcb_glx_fbconfig_t fbconfig, uint32_t screen, uint32_t render_type, xcb_glx_context_t share_list, uint8_t is_direct); int xcb_glx_query_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_query_context_cookie_t xcb_glx_query_context (xcb_connection_t *c, xcb_glx_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_query_context_cookie_t xcb_glx_query_context_unchecked (xcb_connection_t *c, xcb_glx_context_t context); uint32_t * xcb_glx_query_context_attribs (const xcb_glx_query_context_reply_t *R); int xcb_glx_query_context_attribs_length (const xcb_glx_query_context_reply_t *R); xcb_generic_iterator_t xcb_glx_query_context_attribs_end (const xcb_glx_query_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_query_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_query_context_reply_t * xcb_glx_query_context_reply (xcb_connection_t *c, xcb_glx_query_context_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_make_context_current_cookie_t xcb_glx_make_context_current (xcb_connection_t *c, xcb_glx_context_tag_t old_context_tag, xcb_glx_drawable_t drawable, xcb_glx_drawable_t read_drawable, xcb_glx_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_make_context_current_cookie_t xcb_glx_make_context_current_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t old_context_tag, xcb_glx_drawable_t drawable, xcb_glx_drawable_t read_drawable, xcb_glx_context_t context); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_make_context_current_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_make_context_current_reply_t * xcb_glx_make_context_current_reply (xcb_connection_t *c, xcb_glx_make_context_current_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_create_pbuffer_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_create_pbuffer_checked (xcb_connection_t *c, uint32_t screen, xcb_glx_fbconfig_t fbconfig, xcb_glx_pbuffer_t pbuffer, uint32_t num_attribs, const uint32_t *attribs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_create_pbuffer (xcb_connection_t *c, uint32_t screen, xcb_glx_fbconfig_t fbconfig, xcb_glx_pbuffer_t pbuffer, uint32_t num_attribs, const uint32_t *attribs); uint32_t * xcb_glx_create_pbuffer_attribs (const xcb_glx_create_pbuffer_request_t *R); int xcb_glx_create_pbuffer_attribs_length (const xcb_glx_create_pbuffer_request_t *R); xcb_generic_iterator_t xcb_glx_create_pbuffer_attribs_end (const xcb_glx_create_pbuffer_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_destroy_pbuffer_checked (xcb_connection_t *c, xcb_glx_pbuffer_t pbuffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_destroy_pbuffer (xcb_connection_t *c, xcb_glx_pbuffer_t pbuffer); int xcb_glx_get_drawable_attributes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_drawable_attributes_cookie_t xcb_glx_get_drawable_attributes (xcb_connection_t *c, xcb_glx_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_drawable_attributes_cookie_t xcb_glx_get_drawable_attributes_unchecked (xcb_connection_t *c, xcb_glx_drawable_t drawable); uint32_t * xcb_glx_get_drawable_attributes_attribs (const xcb_glx_get_drawable_attributes_reply_t *R); int xcb_glx_get_drawable_attributes_attribs_length (const xcb_glx_get_drawable_attributes_reply_t *R); xcb_generic_iterator_t xcb_glx_get_drawable_attributes_attribs_end (const xcb_glx_get_drawable_attributes_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_drawable_attributes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_drawable_attributes_reply_t * xcb_glx_get_drawable_attributes_reply (xcb_connection_t *c, xcb_glx_get_drawable_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_change_drawable_attributes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_change_drawable_attributes_checked (xcb_connection_t *c, xcb_glx_drawable_t drawable, uint32_t num_attribs, const uint32_t *attribs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_change_drawable_attributes (xcb_connection_t *c, xcb_glx_drawable_t drawable, uint32_t num_attribs, const uint32_t *attribs); uint32_t * xcb_glx_change_drawable_attributes_attribs (const xcb_glx_change_drawable_attributes_request_t *R); int xcb_glx_change_drawable_attributes_attribs_length (const xcb_glx_change_drawable_attributes_request_t *R); xcb_generic_iterator_t xcb_glx_change_drawable_attributes_attribs_end (const xcb_glx_change_drawable_attributes_request_t *R); int xcb_glx_create_window_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_create_window_checked (xcb_connection_t *c, uint32_t screen, xcb_glx_fbconfig_t fbconfig, xcb_window_t window, xcb_glx_window_t glx_window, uint32_t num_attribs, const uint32_t *attribs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_create_window (xcb_connection_t *c, uint32_t screen, xcb_glx_fbconfig_t fbconfig, xcb_window_t window, xcb_glx_window_t glx_window, uint32_t num_attribs, const uint32_t *attribs); uint32_t * xcb_glx_create_window_attribs (const xcb_glx_create_window_request_t *R); int xcb_glx_create_window_attribs_length (const xcb_glx_create_window_request_t *R); xcb_generic_iterator_t xcb_glx_create_window_attribs_end (const xcb_glx_create_window_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_delete_window_checked (xcb_connection_t *c, xcb_glx_window_t glxwindow); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_delete_window (xcb_connection_t *c, xcb_glx_window_t glxwindow); int xcb_glx_set_client_info_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_set_client_info_arb_checked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version, uint32_t num_versions, uint32_t gl_str_len, uint32_t glx_str_len, const uint32_t *gl_versions, const char *gl_extension_string, const char *glx_extension_string); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_set_client_info_arb (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version, uint32_t num_versions, uint32_t gl_str_len, uint32_t glx_str_len, const uint32_t *gl_versions, const char *gl_extension_string, const char *glx_extension_string); uint32_t * xcb_glx_set_client_info_arb_gl_versions (const xcb_glx_set_client_info_arb_request_t *R); int xcb_glx_set_client_info_arb_gl_versions_length (const xcb_glx_set_client_info_arb_request_t *R); xcb_generic_iterator_t xcb_glx_set_client_info_arb_gl_versions_end (const xcb_glx_set_client_info_arb_request_t *R); char * xcb_glx_set_client_info_arb_gl_extension_string (const xcb_glx_set_client_info_arb_request_t *R); int xcb_glx_set_client_info_arb_gl_extension_string_length (const xcb_glx_set_client_info_arb_request_t *R); xcb_generic_iterator_t xcb_glx_set_client_info_arb_gl_extension_string_end (const xcb_glx_set_client_info_arb_request_t *R); char * xcb_glx_set_client_info_arb_glx_extension_string (const xcb_glx_set_client_info_arb_request_t *R); int xcb_glx_set_client_info_arb_glx_extension_string_length (const xcb_glx_set_client_info_arb_request_t *R); xcb_generic_iterator_t xcb_glx_set_client_info_arb_glx_extension_string_end (const xcb_glx_set_client_info_arb_request_t *R); int xcb_glx_create_context_attribs_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_create_context_attribs_arb_checked (xcb_connection_t *c, xcb_glx_context_t context, xcb_glx_fbconfig_t fbconfig, uint32_t screen, xcb_glx_context_t share_list, uint8_t is_direct, uint32_t num_attribs, const uint32_t *attribs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_create_context_attribs_arb (xcb_connection_t *c, xcb_glx_context_t context, xcb_glx_fbconfig_t fbconfig, uint32_t screen, xcb_glx_context_t share_list, uint8_t is_direct, uint32_t num_attribs, const uint32_t *attribs); uint32_t * xcb_glx_create_context_attribs_arb_attribs (const xcb_glx_create_context_attribs_arb_request_t *R); int xcb_glx_create_context_attribs_arb_attribs_length (const xcb_glx_create_context_attribs_arb_request_t *R); xcb_generic_iterator_t xcb_glx_create_context_attribs_arb_attribs_end (const xcb_glx_create_context_attribs_arb_request_t *R); int xcb_glx_set_client_info_2arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_set_client_info_2arb_checked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version, uint32_t num_versions, uint32_t gl_str_len, uint32_t glx_str_len, const uint32_t *gl_versions, const char *gl_extension_string, const char *glx_extension_string); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_set_client_info_2arb (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version, uint32_t num_versions, uint32_t gl_str_len, uint32_t glx_str_len, const uint32_t *gl_versions, const char *gl_extension_string, const char *glx_extension_string); uint32_t * xcb_glx_set_client_info_2arb_gl_versions (const xcb_glx_set_client_info_2arb_request_t *R); int xcb_glx_set_client_info_2arb_gl_versions_length (const xcb_glx_set_client_info_2arb_request_t *R); xcb_generic_iterator_t xcb_glx_set_client_info_2arb_gl_versions_end (const xcb_glx_set_client_info_2arb_request_t *R); char * xcb_glx_set_client_info_2arb_gl_extension_string (const xcb_glx_set_client_info_2arb_request_t *R); int xcb_glx_set_client_info_2arb_gl_extension_string_length (const xcb_glx_set_client_info_2arb_request_t *R); xcb_generic_iterator_t xcb_glx_set_client_info_2arb_gl_extension_string_end (const xcb_glx_set_client_info_2arb_request_t *R); char * xcb_glx_set_client_info_2arb_glx_extension_string (const xcb_glx_set_client_info_2arb_request_t *R); int xcb_glx_set_client_info_2arb_glx_extension_string_length (const xcb_glx_set_client_info_2arb_request_t *R); xcb_generic_iterator_t xcb_glx_set_client_info_2arb_glx_extension_string_end (const xcb_glx_set_client_info_2arb_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_new_list_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t list, uint32_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_new_list (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t list, uint32_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_end_list_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_end_list (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_delete_lists_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t list, int32_t range); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_delete_lists (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t list, int32_t range); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_gen_lists_cookie_t xcb_glx_gen_lists (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t range); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_gen_lists_cookie_t xcb_glx_gen_lists_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t range); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_gen_lists_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_gen_lists_reply_t * xcb_glx_gen_lists_reply (xcb_connection_t *c, xcb_glx_gen_lists_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_feedback_buffer_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t size, int32_t type); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_feedback_buffer (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t size, int32_t type); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_select_buffer_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t size); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_select_buffer (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t size); int xcb_glx_render_mode_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_render_mode_cookie_t xcb_glx_render_mode (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_render_mode_cookie_t xcb_glx_render_mode_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t mode); uint32_t * xcb_glx_render_mode_data (const xcb_glx_render_mode_reply_t *R); int xcb_glx_render_mode_data_length (const xcb_glx_render_mode_reply_t *R); xcb_generic_iterator_t xcb_glx_render_mode_data_end (const xcb_glx_render_mode_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_render_mode_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_render_mode_reply_t * xcb_glx_render_mode_reply (xcb_connection_t *c, xcb_glx_render_mode_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_finish_cookie_t xcb_glx_finish (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_finish_cookie_t xcb_glx_finish_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_finish_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_finish_reply_t * xcb_glx_finish_reply (xcb_connection_t *c, xcb_glx_finish_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_pixel_storef_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname, xcb_glx_float32_t datum); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_pixel_storef (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname, xcb_glx_float32_t datum); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_pixel_storei_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname, int32_t datum); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_pixel_storei (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname, int32_t datum); int xcb_glx_read_pixels_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_read_pixels_cookie_t xcb_glx_read_pixels (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t x, int32_t y, int32_t width, int32_t height, uint32_t format, uint32_t type, uint8_t swap_bytes, uint8_t lsb_first); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_read_pixels_cookie_t xcb_glx_read_pixels_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t x, int32_t y, int32_t width, int32_t height, uint32_t format, uint32_t type, uint8_t swap_bytes, uint8_t lsb_first); uint8_t * xcb_glx_read_pixels_data (const xcb_glx_read_pixels_reply_t *R); int xcb_glx_read_pixels_data_length (const xcb_glx_read_pixels_reply_t *R); xcb_generic_iterator_t xcb_glx_read_pixels_data_end (const xcb_glx_read_pixels_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_read_pixels_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_read_pixels_reply_t * xcb_glx_read_pixels_reply (xcb_connection_t *c, xcb_glx_read_pixels_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_booleanv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_booleanv_cookie_t xcb_glx_get_booleanv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_booleanv_cookie_t xcb_glx_get_booleanv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t pname); uint8_t * xcb_glx_get_booleanv_data (const xcb_glx_get_booleanv_reply_t *R); int xcb_glx_get_booleanv_data_length (const xcb_glx_get_booleanv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_booleanv_data_end (const xcb_glx_get_booleanv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_booleanv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_booleanv_reply_t * xcb_glx_get_booleanv_reply (xcb_connection_t *c, xcb_glx_get_booleanv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_clip_plane_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_clip_plane_cookie_t xcb_glx_get_clip_plane (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t plane); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_clip_plane_cookie_t xcb_glx_get_clip_plane_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t plane); xcb_glx_float64_t * xcb_glx_get_clip_plane_data (const xcb_glx_get_clip_plane_reply_t *R); int xcb_glx_get_clip_plane_data_length (const xcb_glx_get_clip_plane_reply_t *R); xcb_generic_iterator_t xcb_glx_get_clip_plane_data_end (const xcb_glx_get_clip_plane_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_clip_plane_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_clip_plane_reply_t * xcb_glx_get_clip_plane_reply (xcb_connection_t *c, xcb_glx_get_clip_plane_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_doublev_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_doublev_cookie_t xcb_glx_get_doublev (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_doublev_cookie_t xcb_glx_get_doublev_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname); xcb_glx_float64_t * xcb_glx_get_doublev_data (const xcb_glx_get_doublev_reply_t *R); int xcb_glx_get_doublev_data_length (const xcb_glx_get_doublev_reply_t *R); xcb_generic_iterator_t xcb_glx_get_doublev_data_end (const xcb_glx_get_doublev_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_doublev_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_doublev_reply_t * xcb_glx_get_doublev_reply (xcb_connection_t *c, xcb_glx_get_doublev_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_error_cookie_t xcb_glx_get_error (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_error_cookie_t xcb_glx_get_error_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_error_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_error_reply_t * xcb_glx_get_error_reply (xcb_connection_t *c, xcb_glx_get_error_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_floatv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_floatv_cookie_t xcb_glx_get_floatv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_floatv_cookie_t xcb_glx_get_floatv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_floatv_data (const xcb_glx_get_floatv_reply_t *R); int xcb_glx_get_floatv_data_length (const xcb_glx_get_floatv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_floatv_data_end (const xcb_glx_get_floatv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_floatv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_floatv_reply_t * xcb_glx_get_floatv_reply (xcb_connection_t *c, xcb_glx_get_floatv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_integerv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_integerv_cookie_t xcb_glx_get_integerv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_integerv_cookie_t xcb_glx_get_integerv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t pname); int32_t * xcb_glx_get_integerv_data (const xcb_glx_get_integerv_reply_t *R); int xcb_glx_get_integerv_data_length (const xcb_glx_get_integerv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_integerv_data_end (const xcb_glx_get_integerv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_integerv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_integerv_reply_t * xcb_glx_get_integerv_reply (xcb_connection_t *c, xcb_glx_get_integerv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_lightfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_lightfv_cookie_t xcb_glx_get_lightfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t light, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_lightfv_cookie_t xcb_glx_get_lightfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t light, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_lightfv_data (const xcb_glx_get_lightfv_reply_t *R); int xcb_glx_get_lightfv_data_length (const xcb_glx_get_lightfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_lightfv_data_end (const xcb_glx_get_lightfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_lightfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_lightfv_reply_t * xcb_glx_get_lightfv_reply (xcb_connection_t *c, xcb_glx_get_lightfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_lightiv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_lightiv_cookie_t xcb_glx_get_lightiv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t light, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_lightiv_cookie_t xcb_glx_get_lightiv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t light, uint32_t pname); int32_t * xcb_glx_get_lightiv_data (const xcb_glx_get_lightiv_reply_t *R); int xcb_glx_get_lightiv_data_length (const xcb_glx_get_lightiv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_lightiv_data_end (const xcb_glx_get_lightiv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_lightiv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_lightiv_reply_t * xcb_glx_get_lightiv_reply (xcb_connection_t *c, xcb_glx_get_lightiv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_mapdv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_mapdv_cookie_t xcb_glx_get_mapdv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t query); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_mapdv_cookie_t xcb_glx_get_mapdv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t query); xcb_glx_float64_t * xcb_glx_get_mapdv_data (const xcb_glx_get_mapdv_reply_t *R); int xcb_glx_get_mapdv_data_length (const xcb_glx_get_mapdv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_mapdv_data_end (const xcb_glx_get_mapdv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_mapdv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_mapdv_reply_t * xcb_glx_get_mapdv_reply (xcb_connection_t *c, xcb_glx_get_mapdv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_mapfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_mapfv_cookie_t xcb_glx_get_mapfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t query); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_mapfv_cookie_t xcb_glx_get_mapfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t query); xcb_glx_float32_t * xcb_glx_get_mapfv_data (const xcb_glx_get_mapfv_reply_t *R); int xcb_glx_get_mapfv_data_length (const xcb_glx_get_mapfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_mapfv_data_end (const xcb_glx_get_mapfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_mapfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_mapfv_reply_t * xcb_glx_get_mapfv_reply (xcb_connection_t *c, xcb_glx_get_mapfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_mapiv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_mapiv_cookie_t xcb_glx_get_mapiv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t query); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_mapiv_cookie_t xcb_glx_get_mapiv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t query); int32_t * xcb_glx_get_mapiv_data (const xcb_glx_get_mapiv_reply_t *R); int xcb_glx_get_mapiv_data_length (const xcb_glx_get_mapiv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_mapiv_data_end (const xcb_glx_get_mapiv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_mapiv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_mapiv_reply_t * xcb_glx_get_mapiv_reply (xcb_connection_t *c, xcb_glx_get_mapiv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_materialfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_materialfv_cookie_t xcb_glx_get_materialfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t face, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_materialfv_cookie_t xcb_glx_get_materialfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t face, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_materialfv_data (const xcb_glx_get_materialfv_reply_t *R); int xcb_glx_get_materialfv_data_length (const xcb_glx_get_materialfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_materialfv_data_end (const xcb_glx_get_materialfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_materialfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_materialfv_reply_t * xcb_glx_get_materialfv_reply (xcb_connection_t *c, xcb_glx_get_materialfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_materialiv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_materialiv_cookie_t xcb_glx_get_materialiv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t face, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_materialiv_cookie_t xcb_glx_get_materialiv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t face, uint32_t pname); int32_t * xcb_glx_get_materialiv_data (const xcb_glx_get_materialiv_reply_t *R); int xcb_glx_get_materialiv_data_length (const xcb_glx_get_materialiv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_materialiv_data_end (const xcb_glx_get_materialiv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_materialiv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_materialiv_reply_t * xcb_glx_get_materialiv_reply (xcb_connection_t *c, xcb_glx_get_materialiv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_pixel_mapfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_pixel_mapfv_cookie_t xcb_glx_get_pixel_mapfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t map); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_pixel_mapfv_cookie_t xcb_glx_get_pixel_mapfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t map); xcb_glx_float32_t * xcb_glx_get_pixel_mapfv_data (const xcb_glx_get_pixel_mapfv_reply_t *R); int xcb_glx_get_pixel_mapfv_data_length (const xcb_glx_get_pixel_mapfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_pixel_mapfv_data_end (const xcb_glx_get_pixel_mapfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_pixel_mapfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_pixel_mapfv_reply_t * xcb_glx_get_pixel_mapfv_reply (xcb_connection_t *c, xcb_glx_get_pixel_mapfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_pixel_mapuiv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_pixel_mapuiv_cookie_t xcb_glx_get_pixel_mapuiv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t map); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_pixel_mapuiv_cookie_t xcb_glx_get_pixel_mapuiv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t map); uint32_t * xcb_glx_get_pixel_mapuiv_data (const xcb_glx_get_pixel_mapuiv_reply_t *R); int xcb_glx_get_pixel_mapuiv_data_length (const xcb_glx_get_pixel_mapuiv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_pixel_mapuiv_data_end (const xcb_glx_get_pixel_mapuiv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_pixel_mapuiv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_pixel_mapuiv_reply_t * xcb_glx_get_pixel_mapuiv_reply (xcb_connection_t *c, xcb_glx_get_pixel_mapuiv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_pixel_mapusv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_pixel_mapusv_cookie_t xcb_glx_get_pixel_mapusv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t map); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_pixel_mapusv_cookie_t xcb_glx_get_pixel_mapusv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t map); uint16_t * xcb_glx_get_pixel_mapusv_data (const xcb_glx_get_pixel_mapusv_reply_t *R); int xcb_glx_get_pixel_mapusv_data_length (const xcb_glx_get_pixel_mapusv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_pixel_mapusv_data_end (const xcb_glx_get_pixel_mapusv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_pixel_mapusv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_pixel_mapusv_reply_t * xcb_glx_get_pixel_mapusv_reply (xcb_connection_t *c, xcb_glx_get_pixel_mapusv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_polygon_stipple_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_polygon_stipple_cookie_t xcb_glx_get_polygon_stipple (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint8_t lsb_first); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_polygon_stipple_cookie_t xcb_glx_get_polygon_stipple_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint8_t lsb_first); uint8_t * xcb_glx_get_polygon_stipple_data (const xcb_glx_get_polygon_stipple_reply_t *R); int xcb_glx_get_polygon_stipple_data_length (const xcb_glx_get_polygon_stipple_reply_t *R); xcb_generic_iterator_t xcb_glx_get_polygon_stipple_data_end (const xcb_glx_get_polygon_stipple_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_polygon_stipple_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_polygon_stipple_reply_t * xcb_glx_get_polygon_stipple_reply (xcb_connection_t *c, xcb_glx_get_polygon_stipple_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_string_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_string_cookie_t xcb_glx_get_string (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_string_cookie_t xcb_glx_get_string_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t name); char * xcb_glx_get_string_string (const xcb_glx_get_string_reply_t *R); int xcb_glx_get_string_string_length (const xcb_glx_get_string_reply_t *R); xcb_generic_iterator_t xcb_glx_get_string_string_end (const xcb_glx_get_string_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_string_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_string_reply_t * xcb_glx_get_string_reply (xcb_connection_t *c, xcb_glx_get_string_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_envfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_envfv_cookie_t xcb_glx_get_tex_envfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_envfv_cookie_t xcb_glx_get_tex_envfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_tex_envfv_data (const xcb_glx_get_tex_envfv_reply_t *R); int xcb_glx_get_tex_envfv_data_length (const xcb_glx_get_tex_envfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_envfv_data_end (const xcb_glx_get_tex_envfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_envfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_envfv_reply_t * xcb_glx_get_tex_envfv_reply (xcb_connection_t *c, xcb_glx_get_tex_envfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_enviv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_enviv_cookie_t xcb_glx_get_tex_enviv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_enviv_cookie_t xcb_glx_get_tex_enviv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); int32_t * xcb_glx_get_tex_enviv_data (const xcb_glx_get_tex_enviv_reply_t *R); int xcb_glx_get_tex_enviv_data_length (const xcb_glx_get_tex_enviv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_enviv_data_end (const xcb_glx_get_tex_enviv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_enviv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_enviv_reply_t * xcb_glx_get_tex_enviv_reply (xcb_connection_t *c, xcb_glx_get_tex_enviv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_gendv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_gendv_cookie_t xcb_glx_get_tex_gendv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t coord, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_gendv_cookie_t xcb_glx_get_tex_gendv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t coord, uint32_t pname); xcb_glx_float64_t * xcb_glx_get_tex_gendv_data (const xcb_glx_get_tex_gendv_reply_t *R); int xcb_glx_get_tex_gendv_data_length (const xcb_glx_get_tex_gendv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_gendv_data_end (const xcb_glx_get_tex_gendv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_gendv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_gendv_reply_t * xcb_glx_get_tex_gendv_reply (xcb_connection_t *c, xcb_glx_get_tex_gendv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_genfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_genfv_cookie_t xcb_glx_get_tex_genfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t coord, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_genfv_cookie_t xcb_glx_get_tex_genfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t coord, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_tex_genfv_data (const xcb_glx_get_tex_genfv_reply_t *R); int xcb_glx_get_tex_genfv_data_length (const xcb_glx_get_tex_genfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_genfv_data_end (const xcb_glx_get_tex_genfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_genfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_genfv_reply_t * xcb_glx_get_tex_genfv_reply (xcb_connection_t *c, xcb_glx_get_tex_genfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_geniv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_geniv_cookie_t xcb_glx_get_tex_geniv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t coord, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_geniv_cookie_t xcb_glx_get_tex_geniv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t coord, uint32_t pname); int32_t * xcb_glx_get_tex_geniv_data (const xcb_glx_get_tex_geniv_reply_t *R); int xcb_glx_get_tex_geniv_data_length (const xcb_glx_get_tex_geniv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_geniv_data_end (const xcb_glx_get_tex_geniv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_geniv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_geniv_reply_t * xcb_glx_get_tex_geniv_reply (xcb_connection_t *c, xcb_glx_get_tex_geniv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_image_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_image_cookie_t xcb_glx_get_tex_image (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level, uint32_t format, uint32_t type, uint8_t swap_bytes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_image_cookie_t xcb_glx_get_tex_image_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level, uint32_t format, uint32_t type, uint8_t swap_bytes); uint8_t * xcb_glx_get_tex_image_data (const xcb_glx_get_tex_image_reply_t *R); int xcb_glx_get_tex_image_data_length (const xcb_glx_get_tex_image_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_image_data_end (const xcb_glx_get_tex_image_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_image_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_image_reply_t * xcb_glx_get_tex_image_reply (xcb_connection_t *c, xcb_glx_get_tex_image_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_parameterfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_parameterfv_cookie_t xcb_glx_get_tex_parameterfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_parameterfv_cookie_t xcb_glx_get_tex_parameterfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_tex_parameterfv_data (const xcb_glx_get_tex_parameterfv_reply_t *R); int xcb_glx_get_tex_parameterfv_data_length (const xcb_glx_get_tex_parameterfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_parameterfv_data_end (const xcb_glx_get_tex_parameterfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_parameterfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_parameterfv_reply_t * xcb_glx_get_tex_parameterfv_reply (xcb_connection_t *c, xcb_glx_get_tex_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_parameteriv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_parameteriv_cookie_t xcb_glx_get_tex_parameteriv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_parameteriv_cookie_t xcb_glx_get_tex_parameteriv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); int32_t * xcb_glx_get_tex_parameteriv_data (const xcb_glx_get_tex_parameteriv_reply_t *R); int xcb_glx_get_tex_parameteriv_data_length (const xcb_glx_get_tex_parameteriv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_parameteriv_data_end (const xcb_glx_get_tex_parameteriv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_parameteriv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_parameteriv_reply_t * xcb_glx_get_tex_parameteriv_reply (xcb_connection_t *c, xcb_glx_get_tex_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_level_parameterfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_level_parameterfv_cookie_t xcb_glx_get_tex_level_parameterfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_level_parameterfv_cookie_t xcb_glx_get_tex_level_parameterfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_tex_level_parameterfv_data (const xcb_glx_get_tex_level_parameterfv_reply_t *R); int xcb_glx_get_tex_level_parameterfv_data_length (const xcb_glx_get_tex_level_parameterfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_level_parameterfv_data_end (const xcb_glx_get_tex_level_parameterfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_level_parameterfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_level_parameterfv_reply_t * xcb_glx_get_tex_level_parameterfv_reply (xcb_connection_t *c, xcb_glx_get_tex_level_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_tex_level_parameteriv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_tex_level_parameteriv_cookie_t xcb_glx_get_tex_level_parameteriv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_tex_level_parameteriv_cookie_t xcb_glx_get_tex_level_parameteriv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level, uint32_t pname); int32_t * xcb_glx_get_tex_level_parameteriv_data (const xcb_glx_get_tex_level_parameteriv_reply_t *R); int xcb_glx_get_tex_level_parameteriv_data_length (const xcb_glx_get_tex_level_parameteriv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_tex_level_parameteriv_data_end (const xcb_glx_get_tex_level_parameteriv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_tex_level_parameteriv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_tex_level_parameteriv_reply_t * xcb_glx_get_tex_level_parameteriv_reply (xcb_connection_t *c, xcb_glx_get_tex_level_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_is_enabled_cookie_t xcb_glx_is_enabled (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t capability); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_is_enabled_cookie_t xcb_glx_is_enabled_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t capability); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_is_enabled_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_is_enabled_reply_t * xcb_glx_is_enabled_reply (xcb_connection_t *c, xcb_glx_is_enabled_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_is_list_cookie_t xcb_glx_is_list (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_is_list_cookie_t xcb_glx_is_list_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t list); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_is_list_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_is_list_reply_t * xcb_glx_is_list_reply (xcb_connection_t *c, xcb_glx_is_list_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_flush_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_flush (xcb_connection_t *c, xcb_glx_context_tag_t context_tag); int xcb_glx_are_textures_resident_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_are_textures_resident_cookie_t xcb_glx_are_textures_resident (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n, const uint32_t *textures); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_are_textures_resident_cookie_t xcb_glx_are_textures_resident_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n, const uint32_t *textures); uint8_t * xcb_glx_are_textures_resident_data (const xcb_glx_are_textures_resident_reply_t *R); int xcb_glx_are_textures_resident_data_length (const xcb_glx_are_textures_resident_reply_t *R); xcb_generic_iterator_t xcb_glx_are_textures_resident_data_end (const xcb_glx_are_textures_resident_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_are_textures_resident_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_are_textures_resident_reply_t * xcb_glx_are_textures_resident_reply (xcb_connection_t *c, xcb_glx_are_textures_resident_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_delete_textures_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_delete_textures_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n, const uint32_t *textures); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_delete_textures (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n, const uint32_t *textures); uint32_t * xcb_glx_delete_textures_textures (const xcb_glx_delete_textures_request_t *R); int xcb_glx_delete_textures_textures_length (const xcb_glx_delete_textures_request_t *R); xcb_generic_iterator_t xcb_glx_delete_textures_textures_end (const xcb_glx_delete_textures_request_t *R); int xcb_glx_gen_textures_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_gen_textures_cookie_t xcb_glx_gen_textures (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_gen_textures_cookie_t xcb_glx_gen_textures_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n); uint32_t * xcb_glx_gen_textures_data (const xcb_glx_gen_textures_reply_t *R); int xcb_glx_gen_textures_data_length (const xcb_glx_gen_textures_reply_t *R); xcb_generic_iterator_t xcb_glx_gen_textures_data_end (const xcb_glx_gen_textures_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_gen_textures_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_gen_textures_reply_t * xcb_glx_gen_textures_reply (xcb_connection_t *c, xcb_glx_gen_textures_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_is_texture_cookie_t xcb_glx_is_texture (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t texture); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_is_texture_cookie_t xcb_glx_is_texture_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t texture); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_is_texture_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_is_texture_reply_t * xcb_glx_is_texture_reply (xcb_connection_t *c, xcb_glx_is_texture_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_color_table_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_color_table_cookie_t xcb_glx_get_color_table (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_color_table_cookie_t xcb_glx_get_color_table_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes); uint8_t * xcb_glx_get_color_table_data (const xcb_glx_get_color_table_reply_t *R); int xcb_glx_get_color_table_data_length (const xcb_glx_get_color_table_reply_t *R); xcb_generic_iterator_t xcb_glx_get_color_table_data_end (const xcb_glx_get_color_table_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_color_table_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_color_table_reply_t * xcb_glx_get_color_table_reply (xcb_connection_t *c, xcb_glx_get_color_table_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_color_table_parameterfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_color_table_parameterfv_cookie_t xcb_glx_get_color_table_parameterfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_color_table_parameterfv_cookie_t xcb_glx_get_color_table_parameterfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_color_table_parameterfv_data (const xcb_glx_get_color_table_parameterfv_reply_t *R); int xcb_glx_get_color_table_parameterfv_data_length (const xcb_glx_get_color_table_parameterfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_color_table_parameterfv_data_end (const xcb_glx_get_color_table_parameterfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_color_table_parameterfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_color_table_parameterfv_reply_t * xcb_glx_get_color_table_parameterfv_reply (xcb_connection_t *c, xcb_glx_get_color_table_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_color_table_parameteriv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_color_table_parameteriv_cookie_t xcb_glx_get_color_table_parameteriv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_color_table_parameteriv_cookie_t xcb_glx_get_color_table_parameteriv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); int32_t * xcb_glx_get_color_table_parameteriv_data (const xcb_glx_get_color_table_parameteriv_reply_t *R); int xcb_glx_get_color_table_parameteriv_data_length (const xcb_glx_get_color_table_parameteriv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_color_table_parameteriv_data_end (const xcb_glx_get_color_table_parameteriv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_color_table_parameteriv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_color_table_parameteriv_reply_t * xcb_glx_get_color_table_parameteriv_reply (xcb_connection_t *c, xcb_glx_get_color_table_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_convolution_filter_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_convolution_filter_cookie_t xcb_glx_get_convolution_filter (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_convolution_filter_cookie_t xcb_glx_get_convolution_filter_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes); uint8_t * xcb_glx_get_convolution_filter_data (const xcb_glx_get_convolution_filter_reply_t *R); int xcb_glx_get_convolution_filter_data_length (const xcb_glx_get_convolution_filter_reply_t *R); xcb_generic_iterator_t xcb_glx_get_convolution_filter_data_end (const xcb_glx_get_convolution_filter_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_convolution_filter_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_convolution_filter_reply_t * xcb_glx_get_convolution_filter_reply (xcb_connection_t *c, xcb_glx_get_convolution_filter_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_convolution_parameterfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_convolution_parameterfv_cookie_t xcb_glx_get_convolution_parameterfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_convolution_parameterfv_cookie_t xcb_glx_get_convolution_parameterfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_convolution_parameterfv_data (const xcb_glx_get_convolution_parameterfv_reply_t *R); int xcb_glx_get_convolution_parameterfv_data_length (const xcb_glx_get_convolution_parameterfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_convolution_parameterfv_data_end (const xcb_glx_get_convolution_parameterfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_convolution_parameterfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_convolution_parameterfv_reply_t * xcb_glx_get_convolution_parameterfv_reply (xcb_connection_t *c, xcb_glx_get_convolution_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_convolution_parameteriv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_convolution_parameteriv_cookie_t xcb_glx_get_convolution_parameteriv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_convolution_parameteriv_cookie_t xcb_glx_get_convolution_parameteriv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); int32_t * xcb_glx_get_convolution_parameteriv_data (const xcb_glx_get_convolution_parameteriv_reply_t *R); int xcb_glx_get_convolution_parameteriv_data_length (const xcb_glx_get_convolution_parameteriv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_convolution_parameteriv_data_end (const xcb_glx_get_convolution_parameteriv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_convolution_parameteriv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_convolution_parameteriv_reply_t * xcb_glx_get_convolution_parameteriv_reply (xcb_connection_t *c, xcb_glx_get_convolution_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_separable_filter_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_separable_filter_cookie_t xcb_glx_get_separable_filter (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_separable_filter_cookie_t xcb_glx_get_separable_filter_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes); uint8_t * xcb_glx_get_separable_filter_rows_and_cols (const xcb_glx_get_separable_filter_reply_t *R); int xcb_glx_get_separable_filter_rows_and_cols_length (const xcb_glx_get_separable_filter_reply_t *R); xcb_generic_iterator_t xcb_glx_get_separable_filter_rows_and_cols_end (const xcb_glx_get_separable_filter_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_separable_filter_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_separable_filter_reply_t * xcb_glx_get_separable_filter_reply (xcb_connection_t *c, xcb_glx_get_separable_filter_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_histogram_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_histogram_cookie_t xcb_glx_get_histogram (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes, uint8_t reset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_histogram_cookie_t xcb_glx_get_histogram_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes, uint8_t reset); uint8_t * xcb_glx_get_histogram_data (const xcb_glx_get_histogram_reply_t *R); int xcb_glx_get_histogram_data_length (const xcb_glx_get_histogram_reply_t *R); xcb_generic_iterator_t xcb_glx_get_histogram_data_end (const xcb_glx_get_histogram_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_histogram_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_histogram_reply_t * xcb_glx_get_histogram_reply (xcb_connection_t *c, xcb_glx_get_histogram_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_histogram_parameterfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_histogram_parameterfv_cookie_t xcb_glx_get_histogram_parameterfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_histogram_parameterfv_cookie_t xcb_glx_get_histogram_parameterfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_histogram_parameterfv_data (const xcb_glx_get_histogram_parameterfv_reply_t *R); int xcb_glx_get_histogram_parameterfv_data_length (const xcb_glx_get_histogram_parameterfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_histogram_parameterfv_data_end (const xcb_glx_get_histogram_parameterfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_histogram_parameterfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_histogram_parameterfv_reply_t * xcb_glx_get_histogram_parameterfv_reply (xcb_connection_t *c, xcb_glx_get_histogram_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_histogram_parameteriv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_histogram_parameteriv_cookie_t xcb_glx_get_histogram_parameteriv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_histogram_parameteriv_cookie_t xcb_glx_get_histogram_parameteriv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); int32_t * xcb_glx_get_histogram_parameteriv_data (const xcb_glx_get_histogram_parameteriv_reply_t *R); int xcb_glx_get_histogram_parameteriv_data_length (const xcb_glx_get_histogram_parameteriv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_histogram_parameteriv_data_end (const xcb_glx_get_histogram_parameteriv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_histogram_parameteriv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_histogram_parameteriv_reply_t * xcb_glx_get_histogram_parameteriv_reply (xcb_connection_t *c, xcb_glx_get_histogram_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_minmax_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_minmax_cookie_t xcb_glx_get_minmax (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes, uint8_t reset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_minmax_cookie_t xcb_glx_get_minmax_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t format, uint32_t type, uint8_t swap_bytes, uint8_t reset); uint8_t * xcb_glx_get_minmax_data (const xcb_glx_get_minmax_reply_t *R); int xcb_glx_get_minmax_data_length (const xcb_glx_get_minmax_reply_t *R); xcb_generic_iterator_t xcb_glx_get_minmax_data_end (const xcb_glx_get_minmax_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_minmax_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_minmax_reply_t * xcb_glx_get_minmax_reply (xcb_connection_t *c, xcb_glx_get_minmax_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_minmax_parameterfv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_minmax_parameterfv_cookie_t xcb_glx_get_minmax_parameterfv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_minmax_parameterfv_cookie_t xcb_glx_get_minmax_parameterfv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); xcb_glx_float32_t * xcb_glx_get_minmax_parameterfv_data (const xcb_glx_get_minmax_parameterfv_reply_t *R); int xcb_glx_get_minmax_parameterfv_data_length (const xcb_glx_get_minmax_parameterfv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_minmax_parameterfv_data_end (const xcb_glx_get_minmax_parameterfv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_minmax_parameterfv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_minmax_parameterfv_reply_t * xcb_glx_get_minmax_parameterfv_reply (xcb_connection_t *c, xcb_glx_get_minmax_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_minmax_parameteriv_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_minmax_parameteriv_cookie_t xcb_glx_get_minmax_parameteriv (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_minmax_parameteriv_cookie_t xcb_glx_get_minmax_parameteriv_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); int32_t * xcb_glx_get_minmax_parameteriv_data (const xcb_glx_get_minmax_parameteriv_reply_t *R); int xcb_glx_get_minmax_parameteriv_data_length (const xcb_glx_get_minmax_parameteriv_reply_t *R); xcb_generic_iterator_t xcb_glx_get_minmax_parameteriv_data_end (const xcb_glx_get_minmax_parameteriv_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_minmax_parameteriv_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_minmax_parameteriv_reply_t * xcb_glx_get_minmax_parameteriv_reply (xcb_connection_t *c, xcb_glx_get_minmax_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_compressed_tex_image_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_compressed_tex_image_arb_cookie_t xcb_glx_get_compressed_tex_image_arb (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_compressed_tex_image_arb_cookie_t xcb_glx_get_compressed_tex_image_arb_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, int32_t level); uint8_t * xcb_glx_get_compressed_tex_image_arb_data (const xcb_glx_get_compressed_tex_image_arb_reply_t *R); int xcb_glx_get_compressed_tex_image_arb_data_length (const xcb_glx_get_compressed_tex_image_arb_reply_t *R); xcb_generic_iterator_t xcb_glx_get_compressed_tex_image_arb_data_end (const xcb_glx_get_compressed_tex_image_arb_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_compressed_tex_image_arb_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_compressed_tex_image_arb_reply_t * xcb_glx_get_compressed_tex_image_arb_reply (xcb_connection_t *c, xcb_glx_get_compressed_tex_image_arb_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_delete_queries_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_glx_delete_queries_arb_checked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n, const uint32_t *ids); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_glx_delete_queries_arb (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n, const uint32_t *ids); uint32_t * xcb_glx_delete_queries_arb_ids (const xcb_glx_delete_queries_arb_request_t *R); int xcb_glx_delete_queries_arb_ids_length (const xcb_glx_delete_queries_arb_request_t *R); xcb_generic_iterator_t xcb_glx_delete_queries_arb_ids_end (const xcb_glx_delete_queries_arb_request_t *R); int xcb_glx_gen_queries_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_gen_queries_arb_cookie_t xcb_glx_gen_queries_arb (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_gen_queries_arb_cookie_t xcb_glx_gen_queries_arb_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, int32_t n); uint32_t * xcb_glx_gen_queries_arb_data (const xcb_glx_gen_queries_arb_reply_t *R); int xcb_glx_gen_queries_arb_data_length (const xcb_glx_gen_queries_arb_reply_t *R); xcb_generic_iterator_t xcb_glx_gen_queries_arb_data_end (const xcb_glx_gen_queries_arb_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_gen_queries_arb_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_gen_queries_arb_reply_t * xcb_glx_gen_queries_arb_reply (xcb_connection_t *c, xcb_glx_gen_queries_arb_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_is_query_arb_cookie_t xcb_glx_is_query_arb (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_is_query_arb_cookie_t xcb_glx_is_query_arb_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t id); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_is_query_arb_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_is_query_arb_reply_t * xcb_glx_is_query_arb_reply (xcb_connection_t *c, xcb_glx_is_query_arb_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_queryiv_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_queryiv_arb_cookie_t xcb_glx_get_queryiv_arb (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_queryiv_arb_cookie_t xcb_glx_get_queryiv_arb_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t target, uint32_t pname); int32_t * xcb_glx_get_queryiv_arb_data (const xcb_glx_get_queryiv_arb_reply_t *R); int xcb_glx_get_queryiv_arb_data_length (const xcb_glx_get_queryiv_arb_reply_t *R); xcb_generic_iterator_t xcb_glx_get_queryiv_arb_data_end (const xcb_glx_get_queryiv_arb_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_queryiv_arb_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_queryiv_arb_reply_t * xcb_glx_get_queryiv_arb_reply (xcb_connection_t *c, xcb_glx_get_queryiv_arb_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_query_objectiv_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_query_objectiv_arb_cookie_t xcb_glx_get_query_objectiv_arb (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t id, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_query_objectiv_arb_cookie_t xcb_glx_get_query_objectiv_arb_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t id, uint32_t pname); int32_t * xcb_glx_get_query_objectiv_arb_data (const xcb_glx_get_query_objectiv_arb_reply_t *R); int xcb_glx_get_query_objectiv_arb_data_length (const xcb_glx_get_query_objectiv_arb_reply_t *R); xcb_generic_iterator_t xcb_glx_get_query_objectiv_arb_data_end (const xcb_glx_get_query_objectiv_arb_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_query_objectiv_arb_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_query_objectiv_arb_reply_t * xcb_glx_get_query_objectiv_arb_reply (xcb_connection_t *c, xcb_glx_get_query_objectiv_arb_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_glx_get_query_objectuiv_arb_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_glx_get_query_objectuiv_arb_cookie_t xcb_glx_get_query_objectuiv_arb (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t id, uint32_t pname); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_glx_get_query_objectuiv_arb_cookie_t xcb_glx_get_query_objectuiv_arb_unchecked (xcb_connection_t *c, xcb_glx_context_tag_t context_tag, uint32_t id, uint32_t pname); uint32_t * xcb_glx_get_query_objectuiv_arb_data (const xcb_glx_get_query_objectuiv_arb_reply_t *R); int xcb_glx_get_query_objectuiv_arb_data_length (const xcb_glx_get_query_objectuiv_arb_reply_t *R); xcb_generic_iterator_t xcb_glx_get_query_objectuiv_arb_data_end (const xcb_glx_get_query_objectuiv_arb_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_glx_get_query_objectuiv_arb_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_glx_get_query_objectuiv_arb_reply_t * xcb_glx_get_query_objectuiv_arb_reply (xcb_connection_t *c, xcb_glx_get_query_objectuiv_arb_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZpKcc xcb/xprint.hnu[/* * This file generated automatically from xprint.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_XPrint_API XCB XPrint API * @brief XPrint XCB Protocol Implementation. * @{ **/ #ifndef __XPRINT_H #define __XPRINT_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XPRINT_MAJOR_VERSION 1 #define XCB_XPRINT_MINOR_VERSION 0 extern xcb_extension_t xcb_x_print_id; typedef char xcb_x_print_string8_t; /** * @brief xcb_x_print_string8_iterator_t **/ typedef struct xcb_x_print_string8_iterator_t { xcb_x_print_string8_t *data; int rem; int index; } xcb_x_print_string8_iterator_t; /** * @brief xcb_x_print_printer_t **/ typedef struct xcb_x_print_printer_t { uint32_t nameLen; uint32_t descLen; } xcb_x_print_printer_t; /** * @brief xcb_x_print_printer_iterator_t **/ typedef struct xcb_x_print_printer_iterator_t { xcb_x_print_printer_t *data; int rem; int index; } xcb_x_print_printer_iterator_t; typedef uint32_t xcb_x_print_pcontext_t; /** * @brief xcb_x_print_pcontext_iterator_t **/ typedef struct xcb_x_print_pcontext_iterator_t { xcb_x_print_pcontext_t *data; int rem; int index; } xcb_x_print_pcontext_iterator_t; typedef enum xcb_x_print_get_doc_t { XCB_X_PRINT_GET_DOC_FINISHED = 0, XCB_X_PRINT_GET_DOC_SECOND_CONSUMER = 1 } xcb_x_print_get_doc_t; typedef enum xcb_x_print_ev_mask_t { XCB_X_PRINT_EV_MASK_NO_EVENT_MASK = 0, XCB_X_PRINT_EV_MASK_PRINT_MASK = 1, XCB_X_PRINT_EV_MASK_ATTRIBUTE_MASK = 2 } xcb_x_print_ev_mask_t; typedef enum xcb_x_print_detail_t { XCB_X_PRINT_DETAIL_START_JOB_NOTIFY = 1, XCB_X_PRINT_DETAIL_END_JOB_NOTIFY = 2, XCB_X_PRINT_DETAIL_START_DOC_NOTIFY = 3, XCB_X_PRINT_DETAIL_END_DOC_NOTIFY = 4, XCB_X_PRINT_DETAIL_START_PAGE_NOTIFY = 5, XCB_X_PRINT_DETAIL_END_PAGE_NOTIFY = 6 } xcb_x_print_detail_t; typedef enum xcb_x_print_attr_t { XCB_X_PRINT_ATTR_JOB_ATTR = 1, XCB_X_PRINT_ATTR_DOC_ATTR = 2, XCB_X_PRINT_ATTR_PAGE_ATTR = 3, XCB_X_PRINT_ATTR_PRINTER_ATTR = 4, XCB_X_PRINT_ATTR_SERVER_ATTR = 5, XCB_X_PRINT_ATTR_MEDIUM_ATTR = 6, XCB_X_PRINT_ATTR_SPOOLER_ATTR = 7 } xcb_x_print_attr_t; /** * @brief xcb_x_print_print_query_version_cookie_t **/ typedef struct xcb_x_print_print_query_version_cookie_t { unsigned int sequence; } xcb_x_print_print_query_version_cookie_t; /** Opcode for xcb_x_print_print_query_version. */ #define XCB_X_PRINT_PRINT_QUERY_VERSION 0 /** * @brief xcb_x_print_print_query_version_request_t **/ typedef struct xcb_x_print_print_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_x_print_print_query_version_request_t; /** * @brief xcb_x_print_print_query_version_reply_t **/ typedef struct xcb_x_print_print_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t major_version; uint16_t minor_version; } xcb_x_print_print_query_version_reply_t; /** * @brief xcb_x_print_print_get_printer_list_cookie_t **/ typedef struct xcb_x_print_print_get_printer_list_cookie_t { unsigned int sequence; } xcb_x_print_print_get_printer_list_cookie_t; /** Opcode for xcb_x_print_print_get_printer_list. */ #define XCB_X_PRINT_PRINT_GET_PRINTER_LIST 1 /** * @brief xcb_x_print_print_get_printer_list_request_t **/ typedef struct xcb_x_print_print_get_printer_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t printerNameLen; uint32_t localeLen; } xcb_x_print_print_get_printer_list_request_t; /** * @brief xcb_x_print_print_get_printer_list_reply_t **/ typedef struct xcb_x_print_print_get_printer_list_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t listCount; uint8_t pad1[20]; } xcb_x_print_print_get_printer_list_reply_t; /** Opcode for xcb_x_print_print_rehash_printer_list. */ #define XCB_X_PRINT_PRINT_REHASH_PRINTER_LIST 20 /** * @brief xcb_x_print_print_rehash_printer_list_request_t **/ typedef struct xcb_x_print_print_rehash_printer_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_x_print_print_rehash_printer_list_request_t; /** Opcode for xcb_x_print_create_context. */ #define XCB_X_PRINT_CREATE_CONTEXT 2 /** * @brief xcb_x_print_create_context_request_t **/ typedef struct xcb_x_print_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context_id; uint32_t printerNameLen; uint32_t localeLen; } xcb_x_print_create_context_request_t; /** Opcode for xcb_x_print_print_set_context. */ #define XCB_X_PRINT_PRINT_SET_CONTEXT 3 /** * @brief xcb_x_print_print_set_context_request_t **/ typedef struct xcb_x_print_print_set_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context; } xcb_x_print_print_set_context_request_t; /** * @brief xcb_x_print_print_get_context_cookie_t **/ typedef struct xcb_x_print_print_get_context_cookie_t { unsigned int sequence; } xcb_x_print_print_get_context_cookie_t; /** Opcode for xcb_x_print_print_get_context. */ #define XCB_X_PRINT_PRINT_GET_CONTEXT 4 /** * @brief xcb_x_print_print_get_context_request_t **/ typedef struct xcb_x_print_print_get_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_x_print_print_get_context_request_t; /** * @brief xcb_x_print_print_get_context_reply_t **/ typedef struct xcb_x_print_print_get_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t context; } xcb_x_print_print_get_context_reply_t; /** Opcode for xcb_x_print_print_destroy_context. */ #define XCB_X_PRINT_PRINT_DESTROY_CONTEXT 5 /** * @brief xcb_x_print_print_destroy_context_request_t **/ typedef struct xcb_x_print_print_destroy_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t context; } xcb_x_print_print_destroy_context_request_t; /** * @brief xcb_x_print_print_get_screen_of_context_cookie_t **/ typedef struct xcb_x_print_print_get_screen_of_context_cookie_t { unsigned int sequence; } xcb_x_print_print_get_screen_of_context_cookie_t; /** Opcode for xcb_x_print_print_get_screen_of_context. */ #define XCB_X_PRINT_PRINT_GET_SCREEN_OF_CONTEXT 6 /** * @brief xcb_x_print_print_get_screen_of_context_request_t **/ typedef struct xcb_x_print_print_get_screen_of_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_x_print_print_get_screen_of_context_request_t; /** * @brief xcb_x_print_print_get_screen_of_context_reply_t **/ typedef struct xcb_x_print_print_get_screen_of_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_window_t root; } xcb_x_print_print_get_screen_of_context_reply_t; /** Opcode for xcb_x_print_print_start_job. */ #define XCB_X_PRINT_PRINT_START_JOB 7 /** * @brief xcb_x_print_print_start_job_request_t **/ typedef struct xcb_x_print_print_start_job_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t output_mode; } xcb_x_print_print_start_job_request_t; /** Opcode for xcb_x_print_print_end_job. */ #define XCB_X_PRINT_PRINT_END_JOB 8 /** * @brief xcb_x_print_print_end_job_request_t **/ typedef struct xcb_x_print_print_end_job_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t cancel; } xcb_x_print_print_end_job_request_t; /** Opcode for xcb_x_print_print_start_doc. */ #define XCB_X_PRINT_PRINT_START_DOC 9 /** * @brief xcb_x_print_print_start_doc_request_t **/ typedef struct xcb_x_print_print_start_doc_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t driver_mode; } xcb_x_print_print_start_doc_request_t; /** Opcode for xcb_x_print_print_end_doc. */ #define XCB_X_PRINT_PRINT_END_DOC 10 /** * @brief xcb_x_print_print_end_doc_request_t **/ typedef struct xcb_x_print_print_end_doc_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t cancel; } xcb_x_print_print_end_doc_request_t; /** Opcode for xcb_x_print_print_put_document_data. */ #define XCB_X_PRINT_PRINT_PUT_DOCUMENT_DATA 11 /** * @brief xcb_x_print_print_put_document_data_request_t **/ typedef struct xcb_x_print_print_put_document_data_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t len_data; uint16_t len_fmt; uint16_t len_options; } xcb_x_print_print_put_document_data_request_t; /** * @brief xcb_x_print_print_get_document_data_cookie_t **/ typedef struct xcb_x_print_print_get_document_data_cookie_t { unsigned int sequence; } xcb_x_print_print_get_document_data_cookie_t; /** Opcode for xcb_x_print_print_get_document_data. */ #define XCB_X_PRINT_PRINT_GET_DOCUMENT_DATA 12 /** * @brief xcb_x_print_print_get_document_data_request_t **/ typedef struct xcb_x_print_print_get_document_data_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; uint32_t max_bytes; } xcb_x_print_print_get_document_data_request_t; /** * @brief xcb_x_print_print_get_document_data_reply_t **/ typedef struct xcb_x_print_print_get_document_data_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t status_code; uint32_t finished_flag; uint32_t dataLen; uint8_t pad1[12]; } xcb_x_print_print_get_document_data_reply_t; /** Opcode for xcb_x_print_print_start_page. */ #define XCB_X_PRINT_PRINT_START_PAGE 13 /** * @brief xcb_x_print_print_start_page_request_t **/ typedef struct xcb_x_print_print_start_page_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_x_print_print_start_page_request_t; /** Opcode for xcb_x_print_print_end_page. */ #define XCB_X_PRINT_PRINT_END_PAGE 14 /** * @brief xcb_x_print_print_end_page_request_t **/ typedef struct xcb_x_print_print_end_page_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t cancel; uint8_t pad0[3]; } xcb_x_print_print_end_page_request_t; /** Opcode for xcb_x_print_print_select_input. */ #define XCB_X_PRINT_PRINT_SELECT_INPUT 15 /** * @brief xcb_x_print_print_select_input_request_t **/ typedef struct xcb_x_print_print_select_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; uint32_t event_mask; } xcb_x_print_print_select_input_request_t; /** * @brief xcb_x_print_print_input_selected_cookie_t **/ typedef struct xcb_x_print_print_input_selected_cookie_t { unsigned int sequence; } xcb_x_print_print_input_selected_cookie_t; /** Opcode for xcb_x_print_print_input_selected. */ #define XCB_X_PRINT_PRINT_INPUT_SELECTED 16 /** * @brief xcb_x_print_print_input_selected_request_t **/ typedef struct xcb_x_print_print_input_selected_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; } xcb_x_print_print_input_selected_request_t; /** * @brief xcb_x_print_print_input_selected_reply_t **/ typedef struct xcb_x_print_print_input_selected_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t event_mask; uint32_t all_events_mask; } xcb_x_print_print_input_selected_reply_t; /** * @brief xcb_x_print_print_get_attributes_cookie_t **/ typedef struct xcb_x_print_print_get_attributes_cookie_t { unsigned int sequence; } xcb_x_print_print_get_attributes_cookie_t; /** Opcode for xcb_x_print_print_get_attributes. */ #define XCB_X_PRINT_PRINT_GET_ATTRIBUTES 17 /** * @brief xcb_x_print_print_get_attributes_request_t **/ typedef struct xcb_x_print_print_get_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; uint8_t pool; uint8_t pad0[3]; } xcb_x_print_print_get_attributes_request_t; /** * @brief xcb_x_print_print_get_attributes_reply_t **/ typedef struct xcb_x_print_print_get_attributes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t stringLen; uint8_t pad1[20]; } xcb_x_print_print_get_attributes_reply_t; /** * @brief xcb_x_print_print_get_one_attributes_cookie_t **/ typedef struct xcb_x_print_print_get_one_attributes_cookie_t { unsigned int sequence; } xcb_x_print_print_get_one_attributes_cookie_t; /** Opcode for xcb_x_print_print_get_one_attributes. */ #define XCB_X_PRINT_PRINT_GET_ONE_ATTRIBUTES 19 /** * @brief xcb_x_print_print_get_one_attributes_request_t **/ typedef struct xcb_x_print_print_get_one_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; uint32_t nameLen; uint8_t pool; uint8_t pad0[3]; } xcb_x_print_print_get_one_attributes_request_t; /** * @brief xcb_x_print_print_get_one_attributes_reply_t **/ typedef struct xcb_x_print_print_get_one_attributes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t valueLen; uint8_t pad1[20]; } xcb_x_print_print_get_one_attributes_reply_t; /** Opcode for xcb_x_print_print_set_attributes. */ #define XCB_X_PRINT_PRINT_SET_ATTRIBUTES 18 /** * @brief xcb_x_print_print_set_attributes_request_t **/ typedef struct xcb_x_print_print_set_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; uint32_t stringLen; uint8_t pool; uint8_t rule; uint8_t pad0[2]; } xcb_x_print_print_set_attributes_request_t; /** * @brief xcb_x_print_print_get_page_dimensions_cookie_t **/ typedef struct xcb_x_print_print_get_page_dimensions_cookie_t { unsigned int sequence; } xcb_x_print_print_get_page_dimensions_cookie_t; /** Opcode for xcb_x_print_print_get_page_dimensions. */ #define XCB_X_PRINT_PRINT_GET_PAGE_DIMENSIONS 21 /** * @brief xcb_x_print_print_get_page_dimensions_request_t **/ typedef struct xcb_x_print_print_get_page_dimensions_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; } xcb_x_print_print_get_page_dimensions_request_t; /** * @brief xcb_x_print_print_get_page_dimensions_reply_t **/ typedef struct xcb_x_print_print_get_page_dimensions_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t width; uint16_t height; uint16_t offset_x; uint16_t offset_y; uint16_t reproducible_width; uint16_t reproducible_height; } xcb_x_print_print_get_page_dimensions_reply_t; /** * @brief xcb_x_print_print_query_screens_cookie_t **/ typedef struct xcb_x_print_print_query_screens_cookie_t { unsigned int sequence; } xcb_x_print_print_query_screens_cookie_t; /** Opcode for xcb_x_print_print_query_screens. */ #define XCB_X_PRINT_PRINT_QUERY_SCREENS 22 /** * @brief xcb_x_print_print_query_screens_request_t **/ typedef struct xcb_x_print_print_query_screens_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_x_print_print_query_screens_request_t; /** * @brief xcb_x_print_print_query_screens_reply_t **/ typedef struct xcb_x_print_print_query_screens_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t listCount; uint8_t pad1[20]; } xcb_x_print_print_query_screens_reply_t; /** * @brief xcb_x_print_print_set_image_resolution_cookie_t **/ typedef struct xcb_x_print_print_set_image_resolution_cookie_t { unsigned int sequence; } xcb_x_print_print_set_image_resolution_cookie_t; /** Opcode for xcb_x_print_print_set_image_resolution. */ #define XCB_X_PRINT_PRINT_SET_IMAGE_RESOLUTION 23 /** * @brief xcb_x_print_print_set_image_resolution_request_t **/ typedef struct xcb_x_print_print_set_image_resolution_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; uint16_t image_resolution; } xcb_x_print_print_set_image_resolution_request_t; /** * @brief xcb_x_print_print_set_image_resolution_reply_t **/ typedef struct xcb_x_print_print_set_image_resolution_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; uint16_t previous_resolutions; } xcb_x_print_print_set_image_resolution_reply_t; /** * @brief xcb_x_print_print_get_image_resolution_cookie_t **/ typedef struct xcb_x_print_print_get_image_resolution_cookie_t { unsigned int sequence; } xcb_x_print_print_get_image_resolution_cookie_t; /** Opcode for xcb_x_print_print_get_image_resolution. */ #define XCB_X_PRINT_PRINT_GET_IMAGE_RESOLUTION 24 /** * @brief xcb_x_print_print_get_image_resolution_request_t **/ typedef struct xcb_x_print_print_get_image_resolution_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_x_print_pcontext_t context; } xcb_x_print_print_get_image_resolution_request_t; /** * @brief xcb_x_print_print_get_image_resolution_reply_t **/ typedef struct xcb_x_print_print_get_image_resolution_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t image_resolution; } xcb_x_print_print_get_image_resolution_reply_t; /** Opcode for xcb_x_print_notify. */ #define XCB_X_PRINT_NOTIFY 0 /** * @brief xcb_x_print_notify_event_t **/ typedef struct xcb_x_print_notify_event_t { uint8_t response_type; uint8_t detail; uint16_t sequence; xcb_x_print_pcontext_t context; uint8_t cancel; } xcb_x_print_notify_event_t; /** Opcode for xcb_x_print_attribut_notify. */ #define XCB_X_PRINT_ATTRIBUT_NOTIFY 1 /** * @brief xcb_x_print_attribut_notify_event_t **/ typedef struct xcb_x_print_attribut_notify_event_t { uint8_t response_type; uint8_t detail; uint16_t sequence; xcb_x_print_pcontext_t context; } xcb_x_print_attribut_notify_event_t; /** Opcode for xcb_x_print_bad_context. */ #define XCB_X_PRINT_BAD_CONTEXT 0 /** * @brief xcb_x_print_bad_context_error_t **/ typedef struct xcb_x_print_bad_context_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_x_print_bad_context_error_t; /** Opcode for xcb_x_print_bad_sequence. */ #define XCB_X_PRINT_BAD_SEQUENCE 1 /** * @brief xcb_x_print_bad_sequence_error_t **/ typedef struct xcb_x_print_bad_sequence_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_x_print_bad_sequence_error_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_x_print_string8_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_x_print_string8_t) */ void xcb_x_print_string8_next (xcb_x_print_string8_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_x_print_string8_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_x_print_string8_end (xcb_x_print_string8_iterator_t i); int xcb_x_print_printer_serialize (void **_buffer, const xcb_x_print_printer_t *_aux, const xcb_x_print_string8_t *name, const xcb_x_print_string8_t *description); int xcb_x_print_printer_unserialize (const void *_buffer, xcb_x_print_printer_t **_aux); int xcb_x_print_printer_sizeof (const void *_buffer); xcb_x_print_string8_t * xcb_x_print_printer_name (const xcb_x_print_printer_t *R); int xcb_x_print_printer_name_length (const xcb_x_print_printer_t *R); xcb_generic_iterator_t xcb_x_print_printer_name_end (const xcb_x_print_printer_t *R); xcb_x_print_string8_t * xcb_x_print_printer_description (const xcb_x_print_printer_t *R); int xcb_x_print_printer_description_length (const xcb_x_print_printer_t *R); xcb_generic_iterator_t xcb_x_print_printer_description_end (const xcb_x_print_printer_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_x_print_printer_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_x_print_printer_t) */ void xcb_x_print_printer_next (xcb_x_print_printer_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_x_print_printer_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_x_print_printer_end (xcb_x_print_printer_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_x_print_pcontext_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_x_print_pcontext_t) */ void xcb_x_print_pcontext_next (xcb_x_print_pcontext_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_x_print_pcontext_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_x_print_pcontext_end (xcb_x_print_pcontext_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_query_version_cookie_t xcb_x_print_print_query_version (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_query_version_cookie_t xcb_x_print_print_query_version_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_query_version_reply_t * xcb_x_print_print_query_version_reply (xcb_connection_t *c, xcb_x_print_print_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_x_print_print_get_printer_list_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_printer_list_cookie_t xcb_x_print_print_get_printer_list (xcb_connection_t *c, uint32_t printerNameLen, uint32_t localeLen, const xcb_x_print_string8_t *printer_name, const xcb_x_print_string8_t *locale); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_printer_list_cookie_t xcb_x_print_print_get_printer_list_unchecked (xcb_connection_t *c, uint32_t printerNameLen, uint32_t localeLen, const xcb_x_print_string8_t *printer_name, const xcb_x_print_string8_t *locale); int xcb_x_print_print_get_printer_list_printers_length (const xcb_x_print_print_get_printer_list_reply_t *R); xcb_x_print_printer_iterator_t xcb_x_print_print_get_printer_list_printers_iterator (const xcb_x_print_print_get_printer_list_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_printer_list_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_printer_list_reply_t * xcb_x_print_print_get_printer_list_reply (xcb_connection_t *c, xcb_x_print_print_get_printer_list_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_rehash_printer_list_checked (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_rehash_printer_list (xcb_connection_t *c); int xcb_x_print_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_create_context_checked (xcb_connection_t *c, uint32_t context_id, uint32_t printerNameLen, uint32_t localeLen, const xcb_x_print_string8_t *printerName, const xcb_x_print_string8_t *locale); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_create_context (xcb_connection_t *c, uint32_t context_id, uint32_t printerNameLen, uint32_t localeLen, const xcb_x_print_string8_t *printerName, const xcb_x_print_string8_t *locale); xcb_x_print_string8_t * xcb_x_print_create_context_printer_name (const xcb_x_print_create_context_request_t *R); int xcb_x_print_create_context_printer_name_length (const xcb_x_print_create_context_request_t *R); xcb_generic_iterator_t xcb_x_print_create_context_printer_name_end (const xcb_x_print_create_context_request_t *R); xcb_x_print_string8_t * xcb_x_print_create_context_locale (const xcb_x_print_create_context_request_t *R); int xcb_x_print_create_context_locale_length (const xcb_x_print_create_context_request_t *R); xcb_generic_iterator_t xcb_x_print_create_context_locale_end (const xcb_x_print_create_context_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_set_context_checked (xcb_connection_t *c, uint32_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_set_context (xcb_connection_t *c, uint32_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_context_cookie_t xcb_x_print_print_get_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_context_cookie_t xcb_x_print_print_get_context_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_context_reply_t * xcb_x_print_print_get_context_reply (xcb_connection_t *c, xcb_x_print_print_get_context_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_destroy_context_checked (xcb_connection_t *c, uint32_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_destroy_context (xcb_connection_t *c, uint32_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_screen_of_context_cookie_t xcb_x_print_print_get_screen_of_context (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_screen_of_context_cookie_t xcb_x_print_print_get_screen_of_context_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_screen_of_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_screen_of_context_reply_t * xcb_x_print_print_get_screen_of_context_reply (xcb_connection_t *c, xcb_x_print_print_get_screen_of_context_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_start_job_checked (xcb_connection_t *c, uint8_t output_mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_start_job (xcb_connection_t *c, uint8_t output_mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_end_job_checked (xcb_connection_t *c, uint8_t cancel); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_end_job (xcb_connection_t *c, uint8_t cancel); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_start_doc_checked (xcb_connection_t *c, uint8_t driver_mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_start_doc (xcb_connection_t *c, uint8_t driver_mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_end_doc_checked (xcb_connection_t *c, uint8_t cancel); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_end_doc (xcb_connection_t *c, uint8_t cancel); int xcb_x_print_print_put_document_data_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_put_document_data_checked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t len_data, uint16_t len_fmt, uint16_t len_options, const uint8_t *data, const xcb_x_print_string8_t *doc_format, const xcb_x_print_string8_t *options); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_put_document_data (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t len_data, uint16_t len_fmt, uint16_t len_options, const uint8_t *data, const xcb_x_print_string8_t *doc_format, const xcb_x_print_string8_t *options); uint8_t * xcb_x_print_print_put_document_data_data (const xcb_x_print_print_put_document_data_request_t *R); int xcb_x_print_print_put_document_data_data_length (const xcb_x_print_print_put_document_data_request_t *R); xcb_generic_iterator_t xcb_x_print_print_put_document_data_data_end (const xcb_x_print_print_put_document_data_request_t *R); xcb_x_print_string8_t * xcb_x_print_print_put_document_data_doc_format (const xcb_x_print_print_put_document_data_request_t *R); int xcb_x_print_print_put_document_data_doc_format_length (const xcb_x_print_print_put_document_data_request_t *R); xcb_generic_iterator_t xcb_x_print_print_put_document_data_doc_format_end (const xcb_x_print_print_put_document_data_request_t *R); xcb_x_print_string8_t * xcb_x_print_print_put_document_data_options (const xcb_x_print_print_put_document_data_request_t *R); int xcb_x_print_print_put_document_data_options_length (const xcb_x_print_print_put_document_data_request_t *R); xcb_generic_iterator_t xcb_x_print_print_put_document_data_options_end (const xcb_x_print_print_put_document_data_request_t *R); int xcb_x_print_print_get_document_data_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_document_data_cookie_t xcb_x_print_print_get_document_data (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t max_bytes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_document_data_cookie_t xcb_x_print_print_get_document_data_unchecked (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t max_bytes); uint8_t * xcb_x_print_print_get_document_data_data (const xcb_x_print_print_get_document_data_reply_t *R); int xcb_x_print_print_get_document_data_data_length (const xcb_x_print_print_get_document_data_reply_t *R); xcb_generic_iterator_t xcb_x_print_print_get_document_data_data_end (const xcb_x_print_print_get_document_data_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_document_data_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_document_data_reply_t * xcb_x_print_print_get_document_data_reply (xcb_connection_t *c, xcb_x_print_print_get_document_data_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_start_page_checked (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_start_page (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_end_page_checked (xcb_connection_t *c, uint8_t cancel); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_end_page (xcb_connection_t *c, uint8_t cancel); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_select_input_checked (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_select_input (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_input_selected_cookie_t xcb_x_print_print_input_selected (xcb_connection_t *c, xcb_x_print_pcontext_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_input_selected_cookie_t xcb_x_print_print_input_selected_unchecked (xcb_connection_t *c, xcb_x_print_pcontext_t context); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_input_selected_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_input_selected_reply_t * xcb_x_print_print_input_selected_reply (xcb_connection_t *c, xcb_x_print_print_input_selected_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_x_print_print_get_attributes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_attributes_cookie_t xcb_x_print_print_get_attributes (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint8_t pool); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_attributes_cookie_t xcb_x_print_print_get_attributes_unchecked (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint8_t pool); xcb_x_print_string8_t * xcb_x_print_print_get_attributes_attributes (const xcb_x_print_print_get_attributes_reply_t *R); int xcb_x_print_print_get_attributes_attributes_length (const xcb_x_print_print_get_attributes_reply_t *R); xcb_generic_iterator_t xcb_x_print_print_get_attributes_attributes_end (const xcb_x_print_print_get_attributes_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_attributes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_attributes_reply_t * xcb_x_print_print_get_attributes_reply (xcb_connection_t *c, xcb_x_print_print_get_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_x_print_print_get_one_attributes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_one_attributes_cookie_t xcb_x_print_print_get_one_attributes (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t nameLen, uint8_t pool, const xcb_x_print_string8_t *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_one_attributes_cookie_t xcb_x_print_print_get_one_attributes_unchecked (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t nameLen, uint8_t pool, const xcb_x_print_string8_t *name); xcb_x_print_string8_t * xcb_x_print_print_get_one_attributes_value (const xcb_x_print_print_get_one_attributes_reply_t *R); int xcb_x_print_print_get_one_attributes_value_length (const xcb_x_print_print_get_one_attributes_reply_t *R); xcb_generic_iterator_t xcb_x_print_print_get_one_attributes_value_end (const xcb_x_print_print_get_one_attributes_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_one_attributes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_one_attributes_reply_t * xcb_x_print_print_get_one_attributes_reply (xcb_connection_t *c, xcb_x_print_print_get_one_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_x_print_print_set_attributes_sizeof (const void *_buffer, uint32_t attributes_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_x_print_print_set_attributes_checked (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t stringLen, uint8_t pool, uint8_t rule, uint32_t attributes_len, const xcb_x_print_string8_t *attributes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_x_print_print_set_attributes (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint32_t stringLen, uint8_t pool, uint8_t rule, uint32_t attributes_len, const xcb_x_print_string8_t *attributes); xcb_x_print_string8_t * xcb_x_print_print_set_attributes_attributes (const xcb_x_print_print_set_attributes_request_t *R); int xcb_x_print_print_set_attributes_attributes_length (const xcb_x_print_print_set_attributes_request_t *R); xcb_generic_iterator_t xcb_x_print_print_set_attributes_attributes_end (const xcb_x_print_print_set_attributes_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_page_dimensions_cookie_t xcb_x_print_print_get_page_dimensions (xcb_connection_t *c, xcb_x_print_pcontext_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_page_dimensions_cookie_t xcb_x_print_print_get_page_dimensions_unchecked (xcb_connection_t *c, xcb_x_print_pcontext_t context); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_page_dimensions_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_page_dimensions_reply_t * xcb_x_print_print_get_page_dimensions_reply (xcb_connection_t *c, xcb_x_print_print_get_page_dimensions_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_x_print_print_query_screens_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_query_screens_cookie_t xcb_x_print_print_query_screens (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_query_screens_cookie_t xcb_x_print_print_query_screens_unchecked (xcb_connection_t *c); xcb_window_t * xcb_x_print_print_query_screens_roots (const xcb_x_print_print_query_screens_reply_t *R); int xcb_x_print_print_query_screens_roots_length (const xcb_x_print_print_query_screens_reply_t *R); xcb_generic_iterator_t xcb_x_print_print_query_screens_roots_end (const xcb_x_print_print_query_screens_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_query_screens_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_query_screens_reply_t * xcb_x_print_print_query_screens_reply (xcb_connection_t *c, xcb_x_print_print_query_screens_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_set_image_resolution_cookie_t xcb_x_print_print_set_image_resolution (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint16_t image_resolution); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_set_image_resolution_cookie_t xcb_x_print_print_set_image_resolution_unchecked (xcb_connection_t *c, xcb_x_print_pcontext_t context, uint16_t image_resolution); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_set_image_resolution_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_set_image_resolution_reply_t * xcb_x_print_print_set_image_resolution_reply (xcb_connection_t *c, xcb_x_print_print_set_image_resolution_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_x_print_print_get_image_resolution_cookie_t xcb_x_print_print_get_image_resolution (xcb_connection_t *c, xcb_x_print_pcontext_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_x_print_print_get_image_resolution_cookie_t xcb_x_print_print_get_image_resolution_unchecked (xcb_connection_t *c, xcb_x_print_pcontext_t context); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_x_print_print_get_image_resolution_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_x_print_print_get_image_resolution_reply_t * xcb_x_print_print_get_image_resolution_reply (xcb_connection_t *c, xcb_x_print_print_get_image_resolution_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ7!! xcb/randr.hnu[/* * This file generated automatically from randr.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_RandR_API XCB RandR API * @brief RandR XCB Protocol Implementation. * @{ **/ #ifndef __RANDR_H #define __RANDR_H #include "xcb.h" #include "xproto.h" #include "render.h" #ifdef __cplusplus extern "C" { #endif #define XCB_RANDR_MAJOR_VERSION 1 #define XCB_RANDR_MINOR_VERSION 6 extern xcb_extension_t xcb_randr_id; typedef uint32_t xcb_randr_mode_t; /** * @brief xcb_randr_mode_iterator_t **/ typedef struct xcb_randr_mode_iterator_t { xcb_randr_mode_t *data; int rem; int index; } xcb_randr_mode_iterator_t; typedef uint32_t xcb_randr_crtc_t; /** * @brief xcb_randr_crtc_iterator_t **/ typedef struct xcb_randr_crtc_iterator_t { xcb_randr_crtc_t *data; int rem; int index; } xcb_randr_crtc_iterator_t; typedef uint32_t xcb_randr_output_t; /** * @brief xcb_randr_output_iterator_t **/ typedef struct xcb_randr_output_iterator_t { xcb_randr_output_t *data; int rem; int index; } xcb_randr_output_iterator_t; typedef uint32_t xcb_randr_provider_t; /** * @brief xcb_randr_provider_iterator_t **/ typedef struct xcb_randr_provider_iterator_t { xcb_randr_provider_t *data; int rem; int index; } xcb_randr_provider_iterator_t; typedef uint32_t xcb_randr_lease_t; /** * @brief xcb_randr_lease_iterator_t **/ typedef struct xcb_randr_lease_iterator_t { xcb_randr_lease_t *data; int rem; int index; } xcb_randr_lease_iterator_t; /** Opcode for xcb_randr_bad_output. */ #define XCB_RANDR_BAD_OUTPUT 0 /** * @brief xcb_randr_bad_output_error_t **/ typedef struct xcb_randr_bad_output_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_randr_bad_output_error_t; /** Opcode for xcb_randr_bad_crtc. */ #define XCB_RANDR_BAD_CRTC 1 /** * @brief xcb_randr_bad_crtc_error_t **/ typedef struct xcb_randr_bad_crtc_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_randr_bad_crtc_error_t; /** Opcode for xcb_randr_bad_mode. */ #define XCB_RANDR_BAD_MODE 2 /** * @brief xcb_randr_bad_mode_error_t **/ typedef struct xcb_randr_bad_mode_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_randr_bad_mode_error_t; /** Opcode for xcb_randr_bad_provider. */ #define XCB_RANDR_BAD_PROVIDER 3 /** * @brief xcb_randr_bad_provider_error_t **/ typedef struct xcb_randr_bad_provider_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_randr_bad_provider_error_t; typedef enum xcb_randr_rotation_t { XCB_RANDR_ROTATION_ROTATE_0 = 1, XCB_RANDR_ROTATION_ROTATE_90 = 2, XCB_RANDR_ROTATION_ROTATE_180 = 4, XCB_RANDR_ROTATION_ROTATE_270 = 8, XCB_RANDR_ROTATION_REFLECT_X = 16, XCB_RANDR_ROTATION_REFLECT_Y = 32 } xcb_randr_rotation_t; /** * @brief xcb_randr_screen_size_t **/ typedef struct xcb_randr_screen_size_t { uint16_t width; uint16_t height; uint16_t mwidth; uint16_t mheight; } xcb_randr_screen_size_t; /** * @brief xcb_randr_screen_size_iterator_t **/ typedef struct xcb_randr_screen_size_iterator_t { xcb_randr_screen_size_t *data; int rem; int index; } xcb_randr_screen_size_iterator_t; /** * @brief xcb_randr_refresh_rates_t **/ typedef struct xcb_randr_refresh_rates_t { uint16_t nRates; } xcb_randr_refresh_rates_t; /** * @brief xcb_randr_refresh_rates_iterator_t **/ typedef struct xcb_randr_refresh_rates_iterator_t { xcb_randr_refresh_rates_t *data; int rem; int index; } xcb_randr_refresh_rates_iterator_t; /** * @brief xcb_randr_query_version_cookie_t **/ typedef struct xcb_randr_query_version_cookie_t { unsigned int sequence; } xcb_randr_query_version_cookie_t; /** Opcode for xcb_randr_query_version. */ #define XCB_RANDR_QUERY_VERSION 0 /** * @brief xcb_randr_query_version_request_t **/ typedef struct xcb_randr_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; } xcb_randr_query_version_request_t; /** * @brief xcb_randr_query_version_reply_t **/ typedef struct xcb_randr_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; uint8_t pad1[16]; } xcb_randr_query_version_reply_t; typedef enum xcb_randr_set_config_t { XCB_RANDR_SET_CONFIG_SUCCESS = 0, XCB_RANDR_SET_CONFIG_INVALID_CONFIG_TIME = 1, XCB_RANDR_SET_CONFIG_INVALID_TIME = 2, XCB_RANDR_SET_CONFIG_FAILED = 3 } xcb_randr_set_config_t; /** * @brief xcb_randr_set_screen_config_cookie_t **/ typedef struct xcb_randr_set_screen_config_cookie_t { unsigned int sequence; } xcb_randr_set_screen_config_cookie_t; /** Opcode for xcb_randr_set_screen_config. */ #define XCB_RANDR_SET_SCREEN_CONFIG 2 /** * @brief xcb_randr_set_screen_config_request_t **/ typedef struct xcb_randr_set_screen_config_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_timestamp_t timestamp; xcb_timestamp_t config_timestamp; uint16_t sizeID; uint16_t rotation; uint16_t rate; uint8_t pad0[2]; } xcb_randr_set_screen_config_request_t; /** * @brief xcb_randr_set_screen_config_reply_t **/ typedef struct xcb_randr_set_screen_config_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; xcb_timestamp_t new_timestamp; xcb_timestamp_t config_timestamp; xcb_window_t root; uint16_t subpixel_order; uint8_t pad0[10]; } xcb_randr_set_screen_config_reply_t; typedef enum xcb_randr_notify_mask_t { XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE = 1, XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE = 2, XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE = 4, XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY = 8, XCB_RANDR_NOTIFY_MASK_PROVIDER_CHANGE = 16, XCB_RANDR_NOTIFY_MASK_PROVIDER_PROPERTY = 32, XCB_RANDR_NOTIFY_MASK_RESOURCE_CHANGE = 64, XCB_RANDR_NOTIFY_MASK_LEASE = 128 } xcb_randr_notify_mask_t; /** Opcode for xcb_randr_select_input. */ #define XCB_RANDR_SELECT_INPUT 4 /** * @brief xcb_randr_select_input_request_t **/ typedef struct xcb_randr_select_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint16_t enable; uint8_t pad0[2]; } xcb_randr_select_input_request_t; /** * @brief xcb_randr_get_screen_info_cookie_t **/ typedef struct xcb_randr_get_screen_info_cookie_t { unsigned int sequence; } xcb_randr_get_screen_info_cookie_t; /** Opcode for xcb_randr_get_screen_info. */ #define XCB_RANDR_GET_SCREEN_INFO 5 /** * @brief xcb_randr_get_screen_info_request_t **/ typedef struct xcb_randr_get_screen_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_randr_get_screen_info_request_t; /** * @brief xcb_randr_get_screen_info_reply_t **/ typedef struct xcb_randr_get_screen_info_reply_t { uint8_t response_type; uint8_t rotations; uint16_t sequence; uint32_t length; xcb_window_t root; xcb_timestamp_t timestamp; xcb_timestamp_t config_timestamp; uint16_t nSizes; uint16_t sizeID; uint16_t rotation; uint16_t rate; uint16_t nInfo; uint8_t pad0[2]; } xcb_randr_get_screen_info_reply_t; /** * @brief xcb_randr_get_screen_size_range_cookie_t **/ typedef struct xcb_randr_get_screen_size_range_cookie_t { unsigned int sequence; } xcb_randr_get_screen_size_range_cookie_t; /** Opcode for xcb_randr_get_screen_size_range. */ #define XCB_RANDR_GET_SCREEN_SIZE_RANGE 6 /** * @brief xcb_randr_get_screen_size_range_request_t **/ typedef struct xcb_randr_get_screen_size_range_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_randr_get_screen_size_range_request_t; /** * @brief xcb_randr_get_screen_size_range_reply_t **/ typedef struct xcb_randr_get_screen_size_range_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t min_width; uint16_t min_height; uint16_t max_width; uint16_t max_height; uint8_t pad1[16]; } xcb_randr_get_screen_size_range_reply_t; /** Opcode for xcb_randr_set_screen_size. */ #define XCB_RANDR_SET_SCREEN_SIZE 7 /** * @brief xcb_randr_set_screen_size_request_t **/ typedef struct xcb_randr_set_screen_size_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint16_t width; uint16_t height; uint32_t mm_width; uint32_t mm_height; } xcb_randr_set_screen_size_request_t; typedef enum xcb_randr_mode_flag_t { XCB_RANDR_MODE_FLAG_HSYNC_POSITIVE = 1, XCB_RANDR_MODE_FLAG_HSYNC_NEGATIVE = 2, XCB_RANDR_MODE_FLAG_VSYNC_POSITIVE = 4, XCB_RANDR_MODE_FLAG_VSYNC_NEGATIVE = 8, XCB_RANDR_MODE_FLAG_INTERLACE = 16, XCB_RANDR_MODE_FLAG_DOUBLE_SCAN = 32, XCB_RANDR_MODE_FLAG_CSYNC = 64, XCB_RANDR_MODE_FLAG_CSYNC_POSITIVE = 128, XCB_RANDR_MODE_FLAG_CSYNC_NEGATIVE = 256, XCB_RANDR_MODE_FLAG_HSKEW_PRESENT = 512, XCB_RANDR_MODE_FLAG_BCAST = 1024, XCB_RANDR_MODE_FLAG_PIXEL_MULTIPLEX = 2048, XCB_RANDR_MODE_FLAG_DOUBLE_CLOCK = 4096, XCB_RANDR_MODE_FLAG_HALVE_CLOCK = 8192 } xcb_randr_mode_flag_t; /** * @brief xcb_randr_mode_info_t **/ typedef struct xcb_randr_mode_info_t { uint32_t id; uint16_t width; uint16_t height; uint32_t dot_clock; uint16_t hsync_start; uint16_t hsync_end; uint16_t htotal; uint16_t hskew; uint16_t vsync_start; uint16_t vsync_end; uint16_t vtotal; uint16_t name_len; uint32_t mode_flags; } xcb_randr_mode_info_t; /** * @brief xcb_randr_mode_info_iterator_t **/ typedef struct xcb_randr_mode_info_iterator_t { xcb_randr_mode_info_t *data; int rem; int index; } xcb_randr_mode_info_iterator_t; /** * @brief xcb_randr_get_screen_resources_cookie_t **/ typedef struct xcb_randr_get_screen_resources_cookie_t { unsigned int sequence; } xcb_randr_get_screen_resources_cookie_t; /** Opcode for xcb_randr_get_screen_resources. */ #define XCB_RANDR_GET_SCREEN_RESOURCES 8 /** * @brief xcb_randr_get_screen_resources_request_t **/ typedef struct xcb_randr_get_screen_resources_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_randr_get_screen_resources_request_t; /** * @brief xcb_randr_get_screen_resources_reply_t **/ typedef struct xcb_randr_get_screen_resources_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; xcb_timestamp_t config_timestamp; uint16_t num_crtcs; uint16_t num_outputs; uint16_t num_modes; uint16_t names_len; uint8_t pad1[8]; } xcb_randr_get_screen_resources_reply_t; typedef enum xcb_randr_connection_t { XCB_RANDR_CONNECTION_CONNECTED = 0, XCB_RANDR_CONNECTION_DISCONNECTED = 1, XCB_RANDR_CONNECTION_UNKNOWN = 2 } xcb_randr_connection_t; /** * @brief xcb_randr_get_output_info_cookie_t **/ typedef struct xcb_randr_get_output_info_cookie_t { unsigned int sequence; } xcb_randr_get_output_info_cookie_t; /** Opcode for xcb_randr_get_output_info. */ #define XCB_RANDR_GET_OUTPUT_INFO 9 /** * @brief xcb_randr_get_output_info_request_t **/ typedef struct xcb_randr_get_output_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_timestamp_t config_timestamp; } xcb_randr_get_output_info_request_t; /** * @brief xcb_randr_get_output_info_reply_t **/ typedef struct xcb_randr_get_output_info_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; xcb_randr_crtc_t crtc; uint32_t mm_width; uint32_t mm_height; uint8_t connection; uint8_t subpixel_order; uint16_t num_crtcs; uint16_t num_modes; uint16_t num_preferred; uint16_t num_clones; uint16_t name_len; } xcb_randr_get_output_info_reply_t; /** * @brief xcb_randr_list_output_properties_cookie_t **/ typedef struct xcb_randr_list_output_properties_cookie_t { unsigned int sequence; } xcb_randr_list_output_properties_cookie_t; /** Opcode for xcb_randr_list_output_properties. */ #define XCB_RANDR_LIST_OUTPUT_PROPERTIES 10 /** * @brief xcb_randr_list_output_properties_request_t **/ typedef struct xcb_randr_list_output_properties_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; } xcb_randr_list_output_properties_request_t; /** * @brief xcb_randr_list_output_properties_reply_t **/ typedef struct xcb_randr_list_output_properties_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_atoms; uint8_t pad1[22]; } xcb_randr_list_output_properties_reply_t; /** * @brief xcb_randr_query_output_property_cookie_t **/ typedef struct xcb_randr_query_output_property_cookie_t { unsigned int sequence; } xcb_randr_query_output_property_cookie_t; /** Opcode for xcb_randr_query_output_property. */ #define XCB_RANDR_QUERY_OUTPUT_PROPERTY 11 /** * @brief xcb_randr_query_output_property_request_t **/ typedef struct xcb_randr_query_output_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_atom_t property; } xcb_randr_query_output_property_request_t; /** * @brief xcb_randr_query_output_property_reply_t **/ typedef struct xcb_randr_query_output_property_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pending; uint8_t range; uint8_t immutable; uint8_t pad1[21]; } xcb_randr_query_output_property_reply_t; /** Opcode for xcb_randr_configure_output_property. */ #define XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY 12 /** * @brief xcb_randr_configure_output_property_request_t **/ typedef struct xcb_randr_configure_output_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_atom_t property; uint8_t pending; uint8_t range; uint8_t pad0[2]; } xcb_randr_configure_output_property_request_t; /** Opcode for xcb_randr_change_output_property. */ #define XCB_RANDR_CHANGE_OUTPUT_PROPERTY 13 /** * @brief xcb_randr_change_output_property_request_t **/ typedef struct xcb_randr_change_output_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_atom_t property; xcb_atom_t type; uint8_t format; uint8_t mode; uint8_t pad0[2]; uint32_t num_units; } xcb_randr_change_output_property_request_t; /** Opcode for xcb_randr_delete_output_property. */ #define XCB_RANDR_DELETE_OUTPUT_PROPERTY 14 /** * @brief xcb_randr_delete_output_property_request_t **/ typedef struct xcb_randr_delete_output_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_atom_t property; } xcb_randr_delete_output_property_request_t; /** * @brief xcb_randr_get_output_property_cookie_t **/ typedef struct xcb_randr_get_output_property_cookie_t { unsigned int sequence; } xcb_randr_get_output_property_cookie_t; /** Opcode for xcb_randr_get_output_property. */ #define XCB_RANDR_GET_OUTPUT_PROPERTY 15 /** * @brief xcb_randr_get_output_property_request_t **/ typedef struct xcb_randr_get_output_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_atom_t property; xcb_atom_t type; uint32_t long_offset; uint32_t long_length; uint8_t _delete; uint8_t pending; uint8_t pad0[2]; } xcb_randr_get_output_property_request_t; /** * @brief xcb_randr_get_output_property_reply_t **/ typedef struct xcb_randr_get_output_property_reply_t { uint8_t response_type; uint8_t format; uint16_t sequence; uint32_t length; xcb_atom_t type; uint32_t bytes_after; uint32_t num_items; uint8_t pad0[12]; } xcb_randr_get_output_property_reply_t; /** * @brief xcb_randr_create_mode_cookie_t **/ typedef struct xcb_randr_create_mode_cookie_t { unsigned int sequence; } xcb_randr_create_mode_cookie_t; /** Opcode for xcb_randr_create_mode. */ #define XCB_RANDR_CREATE_MODE 16 /** * @brief xcb_randr_create_mode_request_t **/ typedef struct xcb_randr_create_mode_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_randr_mode_info_t mode_info; } xcb_randr_create_mode_request_t; /** * @brief xcb_randr_create_mode_reply_t **/ typedef struct xcb_randr_create_mode_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_randr_mode_t mode; uint8_t pad1[20]; } xcb_randr_create_mode_reply_t; /** Opcode for xcb_randr_destroy_mode. */ #define XCB_RANDR_DESTROY_MODE 17 /** * @brief xcb_randr_destroy_mode_request_t **/ typedef struct xcb_randr_destroy_mode_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_mode_t mode; } xcb_randr_destroy_mode_request_t; /** Opcode for xcb_randr_add_output_mode. */ #define XCB_RANDR_ADD_OUTPUT_MODE 18 /** * @brief xcb_randr_add_output_mode_request_t **/ typedef struct xcb_randr_add_output_mode_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_randr_mode_t mode; } xcb_randr_add_output_mode_request_t; /** Opcode for xcb_randr_delete_output_mode. */ #define XCB_RANDR_DELETE_OUTPUT_MODE 19 /** * @brief xcb_randr_delete_output_mode_request_t **/ typedef struct xcb_randr_delete_output_mode_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_output_t output; xcb_randr_mode_t mode; } xcb_randr_delete_output_mode_request_t; /** * @brief xcb_randr_get_crtc_info_cookie_t **/ typedef struct xcb_randr_get_crtc_info_cookie_t { unsigned int sequence; } xcb_randr_get_crtc_info_cookie_t; /** Opcode for xcb_randr_get_crtc_info. */ #define XCB_RANDR_GET_CRTC_INFO 20 /** * @brief xcb_randr_get_crtc_info_request_t **/ typedef struct xcb_randr_get_crtc_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; xcb_timestamp_t config_timestamp; } xcb_randr_get_crtc_info_request_t; /** * @brief xcb_randr_get_crtc_info_reply_t **/ typedef struct xcb_randr_get_crtc_info_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; int16_t x; int16_t y; uint16_t width; uint16_t height; xcb_randr_mode_t mode; uint16_t rotation; uint16_t rotations; uint16_t num_outputs; uint16_t num_possible_outputs; } xcb_randr_get_crtc_info_reply_t; /** * @brief xcb_randr_set_crtc_config_cookie_t **/ typedef struct xcb_randr_set_crtc_config_cookie_t { unsigned int sequence; } xcb_randr_set_crtc_config_cookie_t; /** Opcode for xcb_randr_set_crtc_config. */ #define XCB_RANDR_SET_CRTC_CONFIG 21 /** * @brief xcb_randr_set_crtc_config_request_t **/ typedef struct xcb_randr_set_crtc_config_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; xcb_timestamp_t timestamp; xcb_timestamp_t config_timestamp; int16_t x; int16_t y; xcb_randr_mode_t mode; uint16_t rotation; uint8_t pad0[2]; } xcb_randr_set_crtc_config_request_t; /** * @brief xcb_randr_set_crtc_config_reply_t **/ typedef struct xcb_randr_set_crtc_config_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; uint8_t pad0[20]; } xcb_randr_set_crtc_config_reply_t; /** * @brief xcb_randr_get_crtc_gamma_size_cookie_t **/ typedef struct xcb_randr_get_crtc_gamma_size_cookie_t { unsigned int sequence; } xcb_randr_get_crtc_gamma_size_cookie_t; /** Opcode for xcb_randr_get_crtc_gamma_size. */ #define XCB_RANDR_GET_CRTC_GAMMA_SIZE 22 /** * @brief xcb_randr_get_crtc_gamma_size_request_t **/ typedef struct xcb_randr_get_crtc_gamma_size_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; } xcb_randr_get_crtc_gamma_size_request_t; /** * @brief xcb_randr_get_crtc_gamma_size_reply_t **/ typedef struct xcb_randr_get_crtc_gamma_size_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t size; uint8_t pad1[22]; } xcb_randr_get_crtc_gamma_size_reply_t; /** * @brief xcb_randr_get_crtc_gamma_cookie_t **/ typedef struct xcb_randr_get_crtc_gamma_cookie_t { unsigned int sequence; } xcb_randr_get_crtc_gamma_cookie_t; /** Opcode for xcb_randr_get_crtc_gamma. */ #define XCB_RANDR_GET_CRTC_GAMMA 23 /** * @brief xcb_randr_get_crtc_gamma_request_t **/ typedef struct xcb_randr_get_crtc_gamma_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; } xcb_randr_get_crtc_gamma_request_t; /** * @brief xcb_randr_get_crtc_gamma_reply_t **/ typedef struct xcb_randr_get_crtc_gamma_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t size; uint8_t pad1[22]; } xcb_randr_get_crtc_gamma_reply_t; /** Opcode for xcb_randr_set_crtc_gamma. */ #define XCB_RANDR_SET_CRTC_GAMMA 24 /** * @brief xcb_randr_set_crtc_gamma_request_t **/ typedef struct xcb_randr_set_crtc_gamma_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; uint16_t size; uint8_t pad0[2]; } xcb_randr_set_crtc_gamma_request_t; /** * @brief xcb_randr_get_screen_resources_current_cookie_t **/ typedef struct xcb_randr_get_screen_resources_current_cookie_t { unsigned int sequence; } xcb_randr_get_screen_resources_current_cookie_t; /** Opcode for xcb_randr_get_screen_resources_current. */ #define XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT 25 /** * @brief xcb_randr_get_screen_resources_current_request_t **/ typedef struct xcb_randr_get_screen_resources_current_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_randr_get_screen_resources_current_request_t; /** * @brief xcb_randr_get_screen_resources_current_reply_t **/ typedef struct xcb_randr_get_screen_resources_current_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; xcb_timestamp_t config_timestamp; uint16_t num_crtcs; uint16_t num_outputs; uint16_t num_modes; uint16_t names_len; uint8_t pad1[8]; } xcb_randr_get_screen_resources_current_reply_t; typedef enum xcb_randr_transform_t { XCB_RANDR_TRANSFORM_UNIT = 1, XCB_RANDR_TRANSFORM_SCALE_UP = 2, XCB_RANDR_TRANSFORM_SCALE_DOWN = 4, XCB_RANDR_TRANSFORM_PROJECTIVE = 8 } xcb_randr_transform_t; /** Opcode for xcb_randr_set_crtc_transform. */ #define XCB_RANDR_SET_CRTC_TRANSFORM 26 /** * @brief xcb_randr_set_crtc_transform_request_t **/ typedef struct xcb_randr_set_crtc_transform_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; xcb_render_transform_t transform; uint16_t filter_len; uint8_t pad0[2]; } xcb_randr_set_crtc_transform_request_t; /** * @brief xcb_randr_get_crtc_transform_cookie_t **/ typedef struct xcb_randr_get_crtc_transform_cookie_t { unsigned int sequence; } xcb_randr_get_crtc_transform_cookie_t; /** Opcode for xcb_randr_get_crtc_transform. */ #define XCB_RANDR_GET_CRTC_TRANSFORM 27 /** * @brief xcb_randr_get_crtc_transform_request_t **/ typedef struct xcb_randr_get_crtc_transform_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; } xcb_randr_get_crtc_transform_request_t; /** * @brief xcb_randr_get_crtc_transform_reply_t **/ typedef struct xcb_randr_get_crtc_transform_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_render_transform_t pending_transform; uint8_t has_transforms; uint8_t pad1[3]; xcb_render_transform_t current_transform; uint8_t pad2[4]; uint16_t pending_len; uint16_t pending_nparams; uint16_t current_len; uint16_t current_nparams; } xcb_randr_get_crtc_transform_reply_t; /** * @brief xcb_randr_get_panning_cookie_t **/ typedef struct xcb_randr_get_panning_cookie_t { unsigned int sequence; } xcb_randr_get_panning_cookie_t; /** Opcode for xcb_randr_get_panning. */ #define XCB_RANDR_GET_PANNING 28 /** * @brief xcb_randr_get_panning_request_t **/ typedef struct xcb_randr_get_panning_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; } xcb_randr_get_panning_request_t; /** * @brief xcb_randr_get_panning_reply_t **/ typedef struct xcb_randr_get_panning_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; uint16_t left; uint16_t top; uint16_t width; uint16_t height; uint16_t track_left; uint16_t track_top; uint16_t track_width; uint16_t track_height; int16_t border_left; int16_t border_top; int16_t border_right; int16_t border_bottom; } xcb_randr_get_panning_reply_t; /** * @brief xcb_randr_set_panning_cookie_t **/ typedef struct xcb_randr_set_panning_cookie_t { unsigned int sequence; } xcb_randr_set_panning_cookie_t; /** Opcode for xcb_randr_set_panning. */ #define XCB_RANDR_SET_PANNING 29 /** * @brief xcb_randr_set_panning_request_t **/ typedef struct xcb_randr_set_panning_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_crtc_t crtc; xcb_timestamp_t timestamp; uint16_t left; uint16_t top; uint16_t width; uint16_t height; uint16_t track_left; uint16_t track_top; uint16_t track_width; uint16_t track_height; int16_t border_left; int16_t border_top; int16_t border_right; int16_t border_bottom; } xcb_randr_set_panning_request_t; /** * @brief xcb_randr_set_panning_reply_t **/ typedef struct xcb_randr_set_panning_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; } xcb_randr_set_panning_reply_t; /** Opcode for xcb_randr_set_output_primary. */ #define XCB_RANDR_SET_OUTPUT_PRIMARY 30 /** * @brief xcb_randr_set_output_primary_request_t **/ typedef struct xcb_randr_set_output_primary_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_randr_output_t output; } xcb_randr_set_output_primary_request_t; /** * @brief xcb_randr_get_output_primary_cookie_t **/ typedef struct xcb_randr_get_output_primary_cookie_t { unsigned int sequence; } xcb_randr_get_output_primary_cookie_t; /** Opcode for xcb_randr_get_output_primary. */ #define XCB_RANDR_GET_OUTPUT_PRIMARY 31 /** * @brief xcb_randr_get_output_primary_request_t **/ typedef struct xcb_randr_get_output_primary_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_randr_get_output_primary_request_t; /** * @brief xcb_randr_get_output_primary_reply_t **/ typedef struct xcb_randr_get_output_primary_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_randr_output_t output; } xcb_randr_get_output_primary_reply_t; /** * @brief xcb_randr_get_providers_cookie_t **/ typedef struct xcb_randr_get_providers_cookie_t { unsigned int sequence; } xcb_randr_get_providers_cookie_t; /** Opcode for xcb_randr_get_providers. */ #define XCB_RANDR_GET_PROVIDERS 32 /** * @brief xcb_randr_get_providers_request_t **/ typedef struct xcb_randr_get_providers_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_randr_get_providers_request_t; /** * @brief xcb_randr_get_providers_reply_t **/ typedef struct xcb_randr_get_providers_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; uint16_t num_providers; uint8_t pad1[18]; } xcb_randr_get_providers_reply_t; typedef enum xcb_randr_provider_capability_t { XCB_RANDR_PROVIDER_CAPABILITY_SOURCE_OUTPUT = 1, XCB_RANDR_PROVIDER_CAPABILITY_SINK_OUTPUT = 2, XCB_RANDR_PROVIDER_CAPABILITY_SOURCE_OFFLOAD = 4, XCB_RANDR_PROVIDER_CAPABILITY_SINK_OFFLOAD = 8 } xcb_randr_provider_capability_t; /** * @brief xcb_randr_get_provider_info_cookie_t **/ typedef struct xcb_randr_get_provider_info_cookie_t { unsigned int sequence; } xcb_randr_get_provider_info_cookie_t; /** Opcode for xcb_randr_get_provider_info. */ #define XCB_RANDR_GET_PROVIDER_INFO 33 /** * @brief xcb_randr_get_provider_info_request_t **/ typedef struct xcb_randr_get_provider_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_timestamp_t config_timestamp; } xcb_randr_get_provider_info_request_t; /** * @brief xcb_randr_get_provider_info_reply_t **/ typedef struct xcb_randr_get_provider_info_reply_t { uint8_t response_type; uint8_t status; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; uint32_t capabilities; uint16_t num_crtcs; uint16_t num_outputs; uint16_t num_associated_providers; uint16_t name_len; uint8_t pad0[8]; } xcb_randr_get_provider_info_reply_t; /** Opcode for xcb_randr_set_provider_offload_sink. */ #define XCB_RANDR_SET_PROVIDER_OFFLOAD_SINK 34 /** * @brief xcb_randr_set_provider_offload_sink_request_t **/ typedef struct xcb_randr_set_provider_offload_sink_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_randr_provider_t sink_provider; xcb_timestamp_t config_timestamp; } xcb_randr_set_provider_offload_sink_request_t; /** Opcode for xcb_randr_set_provider_output_source. */ #define XCB_RANDR_SET_PROVIDER_OUTPUT_SOURCE 35 /** * @brief xcb_randr_set_provider_output_source_request_t **/ typedef struct xcb_randr_set_provider_output_source_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_randr_provider_t source_provider; xcb_timestamp_t config_timestamp; } xcb_randr_set_provider_output_source_request_t; /** * @brief xcb_randr_list_provider_properties_cookie_t **/ typedef struct xcb_randr_list_provider_properties_cookie_t { unsigned int sequence; } xcb_randr_list_provider_properties_cookie_t; /** Opcode for xcb_randr_list_provider_properties. */ #define XCB_RANDR_LIST_PROVIDER_PROPERTIES 36 /** * @brief xcb_randr_list_provider_properties_request_t **/ typedef struct xcb_randr_list_provider_properties_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; } xcb_randr_list_provider_properties_request_t; /** * @brief xcb_randr_list_provider_properties_reply_t **/ typedef struct xcb_randr_list_provider_properties_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_atoms; uint8_t pad1[22]; } xcb_randr_list_provider_properties_reply_t; /** * @brief xcb_randr_query_provider_property_cookie_t **/ typedef struct xcb_randr_query_provider_property_cookie_t { unsigned int sequence; } xcb_randr_query_provider_property_cookie_t; /** Opcode for xcb_randr_query_provider_property. */ #define XCB_RANDR_QUERY_PROVIDER_PROPERTY 37 /** * @brief xcb_randr_query_provider_property_request_t **/ typedef struct xcb_randr_query_provider_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_atom_t property; } xcb_randr_query_provider_property_request_t; /** * @brief xcb_randr_query_provider_property_reply_t **/ typedef struct xcb_randr_query_provider_property_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pending; uint8_t range; uint8_t immutable; uint8_t pad1[21]; } xcb_randr_query_provider_property_reply_t; /** Opcode for xcb_randr_configure_provider_property. */ #define XCB_RANDR_CONFIGURE_PROVIDER_PROPERTY 38 /** * @brief xcb_randr_configure_provider_property_request_t **/ typedef struct xcb_randr_configure_provider_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_atom_t property; uint8_t pending; uint8_t range; uint8_t pad0[2]; } xcb_randr_configure_provider_property_request_t; /** Opcode for xcb_randr_change_provider_property. */ #define XCB_RANDR_CHANGE_PROVIDER_PROPERTY 39 /** * @brief xcb_randr_change_provider_property_request_t **/ typedef struct xcb_randr_change_provider_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_atom_t property; xcb_atom_t type; uint8_t format; uint8_t mode; uint8_t pad0[2]; uint32_t num_items; } xcb_randr_change_provider_property_request_t; /** Opcode for xcb_randr_delete_provider_property. */ #define XCB_RANDR_DELETE_PROVIDER_PROPERTY 40 /** * @brief xcb_randr_delete_provider_property_request_t **/ typedef struct xcb_randr_delete_provider_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_atom_t property; } xcb_randr_delete_provider_property_request_t; /** * @brief xcb_randr_get_provider_property_cookie_t **/ typedef struct xcb_randr_get_provider_property_cookie_t { unsigned int sequence; } xcb_randr_get_provider_property_cookie_t; /** Opcode for xcb_randr_get_provider_property. */ #define XCB_RANDR_GET_PROVIDER_PROPERTY 41 /** * @brief xcb_randr_get_provider_property_request_t **/ typedef struct xcb_randr_get_provider_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_provider_t provider; xcb_atom_t property; xcb_atom_t type; uint32_t long_offset; uint32_t long_length; uint8_t _delete; uint8_t pending; uint8_t pad0[2]; } xcb_randr_get_provider_property_request_t; /** * @brief xcb_randr_get_provider_property_reply_t **/ typedef struct xcb_randr_get_provider_property_reply_t { uint8_t response_type; uint8_t format; uint16_t sequence; uint32_t length; xcb_atom_t type; uint32_t bytes_after; uint32_t num_items; uint8_t pad0[12]; } xcb_randr_get_provider_property_reply_t; /** Opcode for xcb_randr_screen_change_notify. */ #define XCB_RANDR_SCREEN_CHANGE_NOTIFY 0 /** * @brief xcb_randr_screen_change_notify_event_t **/ typedef struct xcb_randr_screen_change_notify_event_t { uint8_t response_type; uint8_t rotation; uint16_t sequence; xcb_timestamp_t timestamp; xcb_timestamp_t config_timestamp; xcb_window_t root; xcb_window_t request_window; uint16_t sizeID; uint16_t subpixel_order; uint16_t width; uint16_t height; uint16_t mwidth; uint16_t mheight; } xcb_randr_screen_change_notify_event_t; typedef enum xcb_randr_notify_t { XCB_RANDR_NOTIFY_CRTC_CHANGE = 0, XCB_RANDR_NOTIFY_OUTPUT_CHANGE = 1, XCB_RANDR_NOTIFY_OUTPUT_PROPERTY = 2, XCB_RANDR_NOTIFY_PROVIDER_CHANGE = 3, XCB_RANDR_NOTIFY_PROVIDER_PROPERTY = 4, XCB_RANDR_NOTIFY_RESOURCE_CHANGE = 5, XCB_RANDR_NOTIFY_LEASE = 6 } xcb_randr_notify_t; /** * @brief xcb_randr_crtc_change_t **/ typedef struct xcb_randr_crtc_change_t { xcb_timestamp_t timestamp; xcb_window_t window; xcb_randr_crtc_t crtc; xcb_randr_mode_t mode; uint16_t rotation; uint8_t pad0[2]; int16_t x; int16_t y; uint16_t width; uint16_t height; } xcb_randr_crtc_change_t; /** * @brief xcb_randr_crtc_change_iterator_t **/ typedef struct xcb_randr_crtc_change_iterator_t { xcb_randr_crtc_change_t *data; int rem; int index; } xcb_randr_crtc_change_iterator_t; /** * @brief xcb_randr_output_change_t **/ typedef struct xcb_randr_output_change_t { xcb_timestamp_t timestamp; xcb_timestamp_t config_timestamp; xcb_window_t window; xcb_randr_output_t output; xcb_randr_crtc_t crtc; xcb_randr_mode_t mode; uint16_t rotation; uint8_t connection; uint8_t subpixel_order; } xcb_randr_output_change_t; /** * @brief xcb_randr_output_change_iterator_t **/ typedef struct xcb_randr_output_change_iterator_t { xcb_randr_output_change_t *data; int rem; int index; } xcb_randr_output_change_iterator_t; /** * @brief xcb_randr_output_property_t **/ typedef struct xcb_randr_output_property_t { xcb_window_t window; xcb_randr_output_t output; xcb_atom_t atom; xcb_timestamp_t timestamp; uint8_t status; uint8_t pad0[11]; } xcb_randr_output_property_t; /** * @brief xcb_randr_output_property_iterator_t **/ typedef struct xcb_randr_output_property_iterator_t { xcb_randr_output_property_t *data; int rem; int index; } xcb_randr_output_property_iterator_t; /** * @brief xcb_randr_provider_change_t **/ typedef struct xcb_randr_provider_change_t { xcb_timestamp_t timestamp; xcb_window_t window; xcb_randr_provider_t provider; uint8_t pad0[16]; } xcb_randr_provider_change_t; /** * @brief xcb_randr_provider_change_iterator_t **/ typedef struct xcb_randr_provider_change_iterator_t { xcb_randr_provider_change_t *data; int rem; int index; } xcb_randr_provider_change_iterator_t; /** * @brief xcb_randr_provider_property_t **/ typedef struct xcb_randr_provider_property_t { xcb_window_t window; xcb_randr_provider_t provider; xcb_atom_t atom; xcb_timestamp_t timestamp; uint8_t state; uint8_t pad0[11]; } xcb_randr_provider_property_t; /** * @brief xcb_randr_provider_property_iterator_t **/ typedef struct xcb_randr_provider_property_iterator_t { xcb_randr_provider_property_t *data; int rem; int index; } xcb_randr_provider_property_iterator_t; /** * @brief xcb_randr_resource_change_t **/ typedef struct xcb_randr_resource_change_t { xcb_timestamp_t timestamp; xcb_window_t window; uint8_t pad0[20]; } xcb_randr_resource_change_t; /** * @brief xcb_randr_resource_change_iterator_t **/ typedef struct xcb_randr_resource_change_iterator_t { xcb_randr_resource_change_t *data; int rem; int index; } xcb_randr_resource_change_iterator_t; /** * @brief xcb_randr_monitor_info_t **/ typedef struct xcb_randr_monitor_info_t { xcb_atom_t name; uint8_t primary; uint8_t automatic; uint16_t nOutput; int16_t x; int16_t y; uint16_t width; uint16_t height; uint32_t width_in_millimeters; uint32_t height_in_millimeters; } xcb_randr_monitor_info_t; /** * @brief xcb_randr_monitor_info_iterator_t **/ typedef struct xcb_randr_monitor_info_iterator_t { xcb_randr_monitor_info_t *data; int rem; int index; } xcb_randr_monitor_info_iterator_t; /** * @brief xcb_randr_get_monitors_cookie_t **/ typedef struct xcb_randr_get_monitors_cookie_t { unsigned int sequence; } xcb_randr_get_monitors_cookie_t; /** Opcode for xcb_randr_get_monitors. */ #define XCB_RANDR_GET_MONITORS 42 /** * @brief xcb_randr_get_monitors_request_t **/ typedef struct xcb_randr_get_monitors_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint8_t get_active; } xcb_randr_get_monitors_request_t; /** * @brief xcb_randr_get_monitors_reply_t **/ typedef struct xcb_randr_get_monitors_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_timestamp_t timestamp; uint32_t nMonitors; uint32_t nOutputs; uint8_t pad1[12]; } xcb_randr_get_monitors_reply_t; /** Opcode for xcb_randr_set_monitor. */ #define XCB_RANDR_SET_MONITOR 43 /** * @brief xcb_randr_set_monitor_request_t **/ typedef struct xcb_randr_set_monitor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_randr_set_monitor_request_t; /** Opcode for xcb_randr_delete_monitor. */ #define XCB_RANDR_DELETE_MONITOR 44 /** * @brief xcb_randr_delete_monitor_request_t **/ typedef struct xcb_randr_delete_monitor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_atom_t name; } xcb_randr_delete_monitor_request_t; /** * @brief xcb_randr_create_lease_cookie_t **/ typedef struct xcb_randr_create_lease_cookie_t { unsigned int sequence; } xcb_randr_create_lease_cookie_t; /** Opcode for xcb_randr_create_lease. */ #define XCB_RANDR_CREATE_LEASE 45 /** * @brief xcb_randr_create_lease_request_t **/ typedef struct xcb_randr_create_lease_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_randr_lease_t lid; uint16_t num_crtcs; uint16_t num_outputs; } xcb_randr_create_lease_request_t; /** * @brief xcb_randr_create_lease_reply_t **/ typedef struct xcb_randr_create_lease_reply_t { uint8_t response_type; uint8_t nfd; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_randr_create_lease_reply_t; /** Opcode for xcb_randr_free_lease. */ #define XCB_RANDR_FREE_LEASE 46 /** * @brief xcb_randr_free_lease_request_t **/ typedef struct xcb_randr_free_lease_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_randr_lease_t lid; uint8_t terminate; } xcb_randr_free_lease_request_t; /** * @brief xcb_randr_lease_notify_t **/ typedef struct xcb_randr_lease_notify_t { xcb_timestamp_t timestamp; xcb_window_t window; xcb_randr_lease_t lease; uint8_t created; uint8_t pad0[15]; } xcb_randr_lease_notify_t; /** * @brief xcb_randr_lease_notify_iterator_t **/ typedef struct xcb_randr_lease_notify_iterator_t { xcb_randr_lease_notify_t *data; int rem; int index; } xcb_randr_lease_notify_iterator_t; /** * @brief xcb_randr_notify_data_t **/ typedef union xcb_randr_notify_data_t { xcb_randr_crtc_change_t cc; xcb_randr_output_change_t oc; xcb_randr_output_property_t op; xcb_randr_provider_change_t pc; xcb_randr_provider_property_t pp; xcb_randr_resource_change_t rc; xcb_randr_lease_notify_t lc; } xcb_randr_notify_data_t; /** * @brief xcb_randr_notify_data_iterator_t **/ typedef struct xcb_randr_notify_data_iterator_t { xcb_randr_notify_data_t *data; int rem; int index; } xcb_randr_notify_data_iterator_t; /** Opcode for xcb_randr_notify. */ #define XCB_RANDR_NOTIFY 1 /** * @brief xcb_randr_notify_event_t **/ typedef struct xcb_randr_notify_event_t { uint8_t response_type; uint8_t subCode; uint16_t sequence; xcb_randr_notify_data_t u; } xcb_randr_notify_event_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_mode_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_mode_t) */ void xcb_randr_mode_next (xcb_randr_mode_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_mode_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_mode_end (xcb_randr_mode_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_crtc_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_crtc_t) */ void xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_crtc_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_output_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_output_t) */ void xcb_randr_output_next (xcb_randr_output_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_output_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_output_end (xcb_randr_output_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_provider_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_provider_t) */ void xcb_randr_provider_next (xcb_randr_provider_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_provider_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_provider_end (xcb_randr_provider_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_lease_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_lease_t) */ void xcb_randr_lease_next (xcb_randr_lease_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_lease_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_lease_end (xcb_randr_lease_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_screen_size_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_screen_size_t) */ void xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_screen_size_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i); int xcb_randr_refresh_rates_sizeof (const void *_buffer); uint16_t * xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R); int xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R); xcb_generic_iterator_t xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_refresh_rates_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_refresh_rates_t) */ void xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_refresh_rates_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_query_version_cookie_t xcb_randr_query_version (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_query_version_cookie_t xcb_randr_query_version_unchecked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_query_version_reply_t * xcb_randr_query_version_reply (xcb_connection_t *c, xcb_randr_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t timestamp, xcb_timestamp_t config_timestamp, uint16_t sizeID, uint16_t rotation, uint16_t rate); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t timestamp, xcb_timestamp_t config_timestamp, uint16_t sizeID, uint16_t rotation, uint16_t rate); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_set_screen_config_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_set_screen_config_reply_t * xcb_randr_set_screen_config_reply (xcb_connection_t *c, xcb_randr_set_screen_config_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_select_input_checked (xcb_connection_t *c, xcb_window_t window, uint16_t enable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_select_input (xcb_connection_t *c, xcb_window_t window, uint16_t enable); int xcb_randr_get_screen_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_randr_screen_size_t * xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R); int xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R); xcb_randr_screen_size_iterator_t xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R); int xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R); xcb_randr_refresh_rates_iterator_t xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_screen_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_screen_info_reply_t * xcb_randr_get_screen_info_reply (xcb_connection_t *c, xcb_randr_get_screen_info_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_screen_size_range_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_screen_size_range_reply_t * xcb_randr_get_screen_size_range_reply (xcb_connection_t *c, xcb_randr_get_screen_size_range_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_set_screen_size_checked (xcb_connection_t *c, xcb_window_t window, uint16_t width, uint16_t height, uint32_t mm_width, uint32_t mm_height); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_set_screen_size (xcb_connection_t *c, xcb_window_t window, uint16_t width, uint16_t height, uint32_t mm_width, uint32_t mm_height); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_mode_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_mode_info_t) */ void xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_mode_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i); int xcb_randr_get_screen_resources_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_randr_crtc_t * xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R); int xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R); xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R); xcb_randr_output_t * xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R); int xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R); xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R); xcb_randr_mode_info_t * xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R); int xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R); xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R); uint8_t * xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R); int xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R); xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_screen_resources_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_screen_resources_reply_t * xcb_randr_get_screen_resources_reply (xcb_connection_t *c, xcb_randr_get_screen_resources_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_get_output_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info (xcb_connection_t *c, xcb_randr_output_t output, xcb_timestamp_t config_timestamp); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info_unchecked (xcb_connection_t *c, xcb_randr_output_t output, xcb_timestamp_t config_timestamp); xcb_randr_crtc_t * xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R); int xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R); xcb_randr_mode_t * xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R); int xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R); xcb_randr_output_t * xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R); int xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R); uint8_t * xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R); int xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_output_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_output_info_reply_t * xcb_randr_get_output_info_reply (xcb_connection_t *c, xcb_randr_get_output_info_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_list_output_properties_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties (xcb_connection_t *c, xcb_randr_output_t output); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties_unchecked (xcb_connection_t *c, xcb_randr_output_t output); xcb_atom_t * xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R); int xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R); xcb_generic_iterator_t xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_properties_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_list_output_properties_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_list_output_properties_reply_t * xcb_randr_list_output_properties_reply (xcb_connection_t *c, xcb_randr_list_output_properties_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_query_output_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property_unchecked (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property); int32_t * xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R); int xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R); xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_query_output_property_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_query_output_property_reply_t * xcb_randr_query_output_property_reply (xcb_connection_t *c, xcb_randr_query_output_property_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_configure_output_property_sizeof (const void *_buffer, uint32_t values_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_configure_output_property_checked (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property, uint8_t pending, uint8_t range, uint32_t values_len, const int32_t *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_configure_output_property (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property, uint8_t pending, uint8_t range, uint32_t values_len, const int32_t *values); int32_t * xcb_randr_configure_output_property_values (const xcb_randr_configure_output_property_request_t *R); int xcb_randr_configure_output_property_values_length (const xcb_randr_configure_output_property_request_t *R); xcb_generic_iterator_t xcb_randr_configure_output_property_values_end (const xcb_randr_configure_output_property_request_t *R); int xcb_randr_change_output_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_change_output_property_checked (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property, xcb_atom_t type, uint8_t format, uint8_t mode, uint32_t num_units, const void *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_change_output_property (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property, xcb_atom_t type, uint8_t format, uint8_t mode, uint32_t num_units, const void *data); void * xcb_randr_change_output_property_data (const xcb_randr_change_output_property_request_t *R); int xcb_randr_change_output_property_data_length (const xcb_randr_change_output_property_request_t *R); xcb_generic_iterator_t xcb_randr_change_output_property_data_end (const xcb_randr_change_output_property_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_delete_output_property_checked (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_delete_output_property (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property); int xcb_randr_get_output_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length, uint8_t _delete, uint8_t pending); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property_unchecked (xcb_connection_t *c, xcb_randr_output_t output, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length, uint8_t _delete, uint8_t pending); uint8_t * xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R); int xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R); xcb_generic_iterator_t xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_output_property_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_output_property_reply_t * xcb_randr_get_output_property_reply (xcb_connection_t *c, xcb_randr_get_output_property_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_create_mode_sizeof (const void *_buffer, uint32_t name_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_create_mode_cookie_t xcb_randr_create_mode (xcb_connection_t *c, xcb_window_t window, xcb_randr_mode_info_t mode_info, uint32_t name_len, const char *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_create_mode_cookie_t xcb_randr_create_mode_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_randr_mode_info_t mode_info, uint32_t name_len, const char *name); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_create_mode_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_create_mode_reply_t * xcb_randr_create_mode_reply (xcb_connection_t *c, xcb_randr_create_mode_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_destroy_mode_checked (xcb_connection_t *c, xcb_randr_mode_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_destroy_mode (xcb_connection_t *c, xcb_randr_mode_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_add_output_mode_checked (xcb_connection_t *c, xcb_randr_output_t output, xcb_randr_mode_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_add_output_mode (xcb_connection_t *c, xcb_randr_output_t output, xcb_randr_mode_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_delete_output_mode_checked (xcb_connection_t *c, xcb_randr_output_t output, xcb_randr_mode_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_delete_output_mode (xcb_connection_t *c, xcb_randr_output_t output, xcb_randr_mode_t mode); int xcb_randr_get_crtc_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_timestamp_t config_timestamp); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_timestamp_t config_timestamp); xcb_randr_output_t * xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R); int xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R); xcb_randr_output_t * xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R); int xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_crtc_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_crtc_info_reply_t * xcb_randr_get_crtc_info_reply (xcb_connection_t *c, xcb_randr_get_crtc_info_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_set_crtc_config_sizeof (const void *_buffer, uint32_t outputs_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_timestamp_t timestamp, xcb_timestamp_t config_timestamp, int16_t x, int16_t y, xcb_randr_mode_t mode, uint16_t rotation, uint32_t outputs_len, const xcb_randr_output_t *outputs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_timestamp_t timestamp, xcb_timestamp_t config_timestamp, int16_t x, int16_t y, xcb_randr_mode_t mode, uint16_t rotation, uint32_t outputs_len, const xcb_randr_output_t *outputs); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_set_crtc_config_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_set_crtc_config_reply_t * xcb_randr_set_crtc_config_reply (xcb_connection_t *c, xcb_randr_set_crtc_config_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size (xcb_connection_t *c, xcb_randr_crtc_t crtc); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c, xcb_randr_crtc_t crtc); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_crtc_gamma_size_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_crtc_gamma_size_reply_t * xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t *c, xcb_randr_get_crtc_gamma_size_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_get_crtc_gamma_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma (xcb_connection_t *c, xcb_randr_crtc_t crtc); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c, xcb_randr_crtc_t crtc); uint16_t * xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R); int xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R); uint16_t * xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R); int xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R); uint16_t * xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R); int xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_crtc_gamma_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_crtc_gamma_reply_t * xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c, xcb_randr_get_crtc_gamma_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_set_crtc_gamma_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c, xcb_randr_crtc_t crtc, uint16_t size, const uint16_t *red, const uint16_t *green, const uint16_t *blue); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_set_crtc_gamma (xcb_connection_t *c, xcb_randr_crtc_t crtc, uint16_t size, const uint16_t *red, const uint16_t *green, const uint16_t *blue); uint16_t * xcb_randr_set_crtc_gamma_red (const xcb_randr_set_crtc_gamma_request_t *R); int xcb_randr_set_crtc_gamma_red_length (const xcb_randr_set_crtc_gamma_request_t *R); xcb_generic_iterator_t xcb_randr_set_crtc_gamma_red_end (const xcb_randr_set_crtc_gamma_request_t *R); uint16_t * xcb_randr_set_crtc_gamma_green (const xcb_randr_set_crtc_gamma_request_t *R); int xcb_randr_set_crtc_gamma_green_length (const xcb_randr_set_crtc_gamma_request_t *R); xcb_generic_iterator_t xcb_randr_set_crtc_gamma_green_end (const xcb_randr_set_crtc_gamma_request_t *R); uint16_t * xcb_randr_set_crtc_gamma_blue (const xcb_randr_set_crtc_gamma_request_t *R); int xcb_randr_set_crtc_gamma_blue_length (const xcb_randr_set_crtc_gamma_request_t *R); xcb_generic_iterator_t xcb_randr_set_crtc_gamma_blue_end (const xcb_randr_set_crtc_gamma_request_t *R); int xcb_randr_get_screen_resources_current_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_randr_crtc_t * xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R); int xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R); xcb_generic_iterator_t xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R); xcb_randr_output_t * xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R); int xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R); xcb_generic_iterator_t xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R); xcb_randr_mode_info_t * xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R); int xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R); xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R); uint8_t * xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R); int xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R); xcb_generic_iterator_t xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_screen_resources_current_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_screen_resources_current_reply_t * xcb_randr_get_screen_resources_current_reply (xcb_connection_t *c, xcb_randr_get_screen_resources_current_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_set_crtc_transform_sizeof (const void *_buffer, uint32_t filter_params_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_set_crtc_transform_checked (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_render_transform_t transform, uint16_t filter_len, const char *filter_name, uint32_t filter_params_len, const xcb_render_fixed_t *filter_params); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_set_crtc_transform (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_render_transform_t transform, uint16_t filter_len, const char *filter_name, uint32_t filter_params_len, const xcb_render_fixed_t *filter_params); char * xcb_randr_set_crtc_transform_filter_name (const xcb_randr_set_crtc_transform_request_t *R); int xcb_randr_set_crtc_transform_filter_name_length (const xcb_randr_set_crtc_transform_request_t *R); xcb_generic_iterator_t xcb_randr_set_crtc_transform_filter_name_end (const xcb_randr_set_crtc_transform_request_t *R); xcb_render_fixed_t * xcb_randr_set_crtc_transform_filter_params (const xcb_randr_set_crtc_transform_request_t *R); int xcb_randr_set_crtc_transform_filter_params_length (const xcb_randr_set_crtc_transform_request_t *R); xcb_generic_iterator_t xcb_randr_set_crtc_transform_filter_params_end (const xcb_randr_set_crtc_transform_request_t *R); int xcb_randr_get_crtc_transform_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform (xcb_connection_t *c, xcb_randr_crtc_t crtc); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c, xcb_randr_crtc_t crtc); char * xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R); int xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R); xcb_render_fixed_t * xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R); int xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R); char * xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R); int xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R); xcb_render_fixed_t * xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R); int xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R); xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_crtc_transform_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_crtc_transform_reply_t * xcb_randr_get_crtc_transform_reply (xcb_connection_t *c, xcb_randr_get_crtc_transform_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_panning_cookie_t xcb_randr_get_panning (xcb_connection_t *c, xcb_randr_crtc_t crtc); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_panning_cookie_t xcb_randr_get_panning_unchecked (xcb_connection_t *c, xcb_randr_crtc_t crtc); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_panning_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_panning_reply_t * xcb_randr_get_panning_reply (xcb_connection_t *c, xcb_randr_get_panning_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_set_panning_cookie_t xcb_randr_set_panning (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_timestamp_t timestamp, uint16_t left, uint16_t top, uint16_t width, uint16_t height, uint16_t track_left, uint16_t track_top, uint16_t track_width, uint16_t track_height, int16_t border_left, int16_t border_top, int16_t border_right, int16_t border_bottom); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_set_panning_cookie_t xcb_randr_set_panning_unchecked (xcb_connection_t *c, xcb_randr_crtc_t crtc, xcb_timestamp_t timestamp, uint16_t left, uint16_t top, uint16_t width, uint16_t height, uint16_t track_left, uint16_t track_top, uint16_t track_width, uint16_t track_height, int16_t border_left, int16_t border_top, int16_t border_right, int16_t border_bottom); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_set_panning_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_set_panning_reply_t * xcb_randr_set_panning_reply (xcb_connection_t *c, xcb_randr_set_panning_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_set_output_primary_checked (xcb_connection_t *c, xcb_window_t window, xcb_randr_output_t output); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_set_output_primary (xcb_connection_t *c, xcb_window_t window, xcb_randr_output_t output); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_output_primary_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_output_primary_reply_t * xcb_randr_get_output_primary_reply (xcb_connection_t *c, xcb_randr_get_output_primary_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_get_providers_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_providers_cookie_t xcb_randr_get_providers (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_providers_cookie_t xcb_randr_get_providers_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_randr_provider_t * xcb_randr_get_providers_providers (const xcb_randr_get_providers_reply_t *R); int xcb_randr_get_providers_providers_length (const xcb_randr_get_providers_reply_t *R); xcb_generic_iterator_t xcb_randr_get_providers_providers_end (const xcb_randr_get_providers_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_providers_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_providers_reply_t * xcb_randr_get_providers_reply (xcb_connection_t *c, xcb_randr_get_providers_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_get_provider_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_provider_info_cookie_t xcb_randr_get_provider_info (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_timestamp_t config_timestamp); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_provider_info_cookie_t xcb_randr_get_provider_info_unchecked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_timestamp_t config_timestamp); xcb_randr_crtc_t * xcb_randr_get_provider_info_crtcs (const xcb_randr_get_provider_info_reply_t *R); int xcb_randr_get_provider_info_crtcs_length (const xcb_randr_get_provider_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_provider_info_crtcs_end (const xcb_randr_get_provider_info_reply_t *R); xcb_randr_output_t * xcb_randr_get_provider_info_outputs (const xcb_randr_get_provider_info_reply_t *R); int xcb_randr_get_provider_info_outputs_length (const xcb_randr_get_provider_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_provider_info_outputs_end (const xcb_randr_get_provider_info_reply_t *R); xcb_randr_provider_t * xcb_randr_get_provider_info_associated_providers (const xcb_randr_get_provider_info_reply_t *R); int xcb_randr_get_provider_info_associated_providers_length (const xcb_randr_get_provider_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_provider_info_associated_providers_end (const xcb_randr_get_provider_info_reply_t *R); uint32_t * xcb_randr_get_provider_info_associated_capability (const xcb_randr_get_provider_info_reply_t *R); int xcb_randr_get_provider_info_associated_capability_length (const xcb_randr_get_provider_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_provider_info_associated_capability_end (const xcb_randr_get_provider_info_reply_t *R); char * xcb_randr_get_provider_info_name (const xcb_randr_get_provider_info_reply_t *R); int xcb_randr_get_provider_info_name_length (const xcb_randr_get_provider_info_reply_t *R); xcb_generic_iterator_t xcb_randr_get_provider_info_name_end (const xcb_randr_get_provider_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_provider_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_provider_info_reply_t * xcb_randr_get_provider_info_reply (xcb_connection_t *c, xcb_randr_get_provider_info_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_set_provider_offload_sink_checked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_randr_provider_t sink_provider, xcb_timestamp_t config_timestamp); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_set_provider_offload_sink (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_randr_provider_t sink_provider, xcb_timestamp_t config_timestamp); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_set_provider_output_source_checked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_randr_provider_t source_provider, xcb_timestamp_t config_timestamp); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_set_provider_output_source (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_randr_provider_t source_provider, xcb_timestamp_t config_timestamp); int xcb_randr_list_provider_properties_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_list_provider_properties_cookie_t xcb_randr_list_provider_properties (xcb_connection_t *c, xcb_randr_provider_t provider); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_list_provider_properties_cookie_t xcb_randr_list_provider_properties_unchecked (xcb_connection_t *c, xcb_randr_provider_t provider); xcb_atom_t * xcb_randr_list_provider_properties_atoms (const xcb_randr_list_provider_properties_reply_t *R); int xcb_randr_list_provider_properties_atoms_length (const xcb_randr_list_provider_properties_reply_t *R); xcb_generic_iterator_t xcb_randr_list_provider_properties_atoms_end (const xcb_randr_list_provider_properties_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_list_provider_properties_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_list_provider_properties_reply_t * xcb_randr_list_provider_properties_reply (xcb_connection_t *c, xcb_randr_list_provider_properties_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_query_provider_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_query_provider_property_cookie_t xcb_randr_query_provider_property (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_query_provider_property_cookie_t xcb_randr_query_provider_property_unchecked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property); int32_t * xcb_randr_query_provider_property_valid_values (const xcb_randr_query_provider_property_reply_t *R); int xcb_randr_query_provider_property_valid_values_length (const xcb_randr_query_provider_property_reply_t *R); xcb_generic_iterator_t xcb_randr_query_provider_property_valid_values_end (const xcb_randr_query_provider_property_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_query_provider_property_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_query_provider_property_reply_t * xcb_randr_query_provider_property_reply (xcb_connection_t *c, xcb_randr_query_provider_property_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_configure_provider_property_sizeof (const void *_buffer, uint32_t values_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_configure_provider_property_checked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property, uint8_t pending, uint8_t range, uint32_t values_len, const int32_t *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_configure_provider_property (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property, uint8_t pending, uint8_t range, uint32_t values_len, const int32_t *values); int32_t * xcb_randr_configure_provider_property_values (const xcb_randr_configure_provider_property_request_t *R); int xcb_randr_configure_provider_property_values_length (const xcb_randr_configure_provider_property_request_t *R); xcb_generic_iterator_t xcb_randr_configure_provider_property_values_end (const xcb_randr_configure_provider_property_request_t *R); int xcb_randr_change_provider_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_change_provider_property_checked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property, xcb_atom_t type, uint8_t format, uint8_t mode, uint32_t num_items, const void *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_change_provider_property (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property, xcb_atom_t type, uint8_t format, uint8_t mode, uint32_t num_items, const void *data); void * xcb_randr_change_provider_property_data (const xcb_randr_change_provider_property_request_t *R); int xcb_randr_change_provider_property_data_length (const xcb_randr_change_provider_property_request_t *R); xcb_generic_iterator_t xcb_randr_change_provider_property_data_end (const xcb_randr_change_provider_property_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_delete_provider_property_checked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_delete_provider_property (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property); int xcb_randr_get_provider_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_provider_property_cookie_t xcb_randr_get_provider_property (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length, uint8_t _delete, uint8_t pending); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_provider_property_cookie_t xcb_randr_get_provider_property_unchecked (xcb_connection_t *c, xcb_randr_provider_t provider, xcb_atom_t property, xcb_atom_t type, uint32_t long_offset, uint32_t long_length, uint8_t _delete, uint8_t pending); void * xcb_randr_get_provider_property_data (const xcb_randr_get_provider_property_reply_t *R); int xcb_randr_get_provider_property_data_length (const xcb_randr_get_provider_property_reply_t *R); xcb_generic_iterator_t xcb_randr_get_provider_property_data_end (const xcb_randr_get_provider_property_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_provider_property_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_provider_property_reply_t * xcb_randr_get_provider_property_reply (xcb_connection_t *c, xcb_randr_get_provider_property_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_crtc_change_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_crtc_change_t) */ void xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_crtc_change_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_output_change_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_output_change_t) */ void xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_output_change_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_output_property_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_output_property_t) */ void xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_output_property_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_provider_change_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_provider_change_t) */ void xcb_randr_provider_change_next (xcb_randr_provider_change_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_provider_change_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_provider_change_end (xcb_randr_provider_change_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_provider_property_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_provider_property_t) */ void xcb_randr_provider_property_next (xcb_randr_provider_property_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_provider_property_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_provider_property_end (xcb_randr_provider_property_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_resource_change_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_resource_change_t) */ void xcb_randr_resource_change_next (xcb_randr_resource_change_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_resource_change_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_resource_change_end (xcb_randr_resource_change_iterator_t i); int xcb_randr_monitor_info_sizeof (const void *_buffer); xcb_randr_output_t * xcb_randr_monitor_info_outputs (const xcb_randr_monitor_info_t *R); int xcb_randr_monitor_info_outputs_length (const xcb_randr_monitor_info_t *R); xcb_generic_iterator_t xcb_randr_monitor_info_outputs_end (const xcb_randr_monitor_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_monitor_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_monitor_info_t) */ void xcb_randr_monitor_info_next (xcb_randr_monitor_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_monitor_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_monitor_info_end (xcb_randr_monitor_info_iterator_t i); int xcb_randr_get_monitors_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_get_monitors_cookie_t xcb_randr_get_monitors (xcb_connection_t *c, xcb_window_t window, uint8_t get_active); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_get_monitors_cookie_t xcb_randr_get_monitors_unchecked (xcb_connection_t *c, xcb_window_t window, uint8_t get_active); int xcb_randr_get_monitors_monitors_length (const xcb_randr_get_monitors_reply_t *R); xcb_randr_monitor_info_iterator_t xcb_randr_get_monitors_monitors_iterator (const xcb_randr_get_monitors_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_get_monitors_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_get_monitors_reply_t * xcb_randr_get_monitors_reply (xcb_connection_t *c, xcb_randr_get_monitors_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_randr_set_monitor_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_set_monitor_checked (xcb_connection_t *c, xcb_window_t window, xcb_randr_monitor_info_t *monitorinfo); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_set_monitor (xcb_connection_t *c, xcb_window_t window, xcb_randr_monitor_info_t *monitorinfo); xcb_randr_monitor_info_t * xcb_randr_set_monitor_monitorinfo (const xcb_randr_set_monitor_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_delete_monitor_checked (xcb_connection_t *c, xcb_window_t window, xcb_atom_t name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_delete_monitor (xcb_connection_t *c, xcb_window_t window, xcb_atom_t name); int xcb_randr_create_lease_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_randr_create_lease_cookie_t xcb_randr_create_lease (xcb_connection_t *c, xcb_window_t window, xcb_randr_lease_t lid, uint16_t num_crtcs, uint16_t num_outputs, const xcb_randr_crtc_t *crtcs, const xcb_randr_output_t *outputs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_randr_create_lease_cookie_t xcb_randr_create_lease_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_randr_lease_t lid, uint16_t num_crtcs, uint16_t num_outputs, const xcb_randr_crtc_t *crtcs, const xcb_randr_output_t *outputs); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_randr_create_lease_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_randr_create_lease_reply_t * xcb_randr_create_lease_reply (xcb_connection_t *c, xcb_randr_create_lease_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Return the reply fds * @param c The connection * @param reply The reply * * Returns the array of reply fds of the request asked by * * The returned value must be freed by the caller using free(). */ int * xcb_randr_create_lease_reply_fds (xcb_connection_t *c /**< */, xcb_randr_create_lease_reply_t *reply); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_randr_free_lease_checked (xcb_connection_t *c, xcb_randr_lease_t lid, uint8_t terminate); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_randr_free_lease (xcb_connection_t *c, xcb_randr_lease_t lid, uint8_t terminate); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_lease_notify_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_lease_notify_t) */ void xcb_randr_lease_notify_next (xcb_randr_lease_notify_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_lease_notify_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_lease_notify_end (xcb_randr_lease_notify_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_randr_notify_data_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_randr_notify_data_t) */ void xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_randr_notify_data_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ}Tgk:k:xcb/xinerama.hnu[/* * This file generated automatically from xinerama.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Xinerama_API XCB Xinerama API * @brief Xinerama XCB Protocol Implementation. * @{ **/ #ifndef __XINERAMA_H #define __XINERAMA_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XINERAMA_MAJOR_VERSION 1 #define XCB_XINERAMA_MINOR_VERSION 1 extern xcb_extension_t xcb_xinerama_id; /** * @brief xcb_xinerama_screen_info_t **/ typedef struct xcb_xinerama_screen_info_t { int16_t x_org; int16_t y_org; uint16_t width; uint16_t height; } xcb_xinerama_screen_info_t; /** * @brief xcb_xinerama_screen_info_iterator_t **/ typedef struct xcb_xinerama_screen_info_iterator_t { xcb_xinerama_screen_info_t *data; int rem; int index; } xcb_xinerama_screen_info_iterator_t; /** * @brief xcb_xinerama_query_version_cookie_t **/ typedef struct xcb_xinerama_query_version_cookie_t { unsigned int sequence; } xcb_xinerama_query_version_cookie_t; /** Opcode for xcb_xinerama_query_version. */ #define XCB_XINERAMA_QUERY_VERSION 0 /** * @brief xcb_xinerama_query_version_request_t **/ typedef struct xcb_xinerama_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t major; uint8_t minor; } xcb_xinerama_query_version_request_t; /** * @brief xcb_xinerama_query_version_reply_t **/ typedef struct xcb_xinerama_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t major; uint16_t minor; } xcb_xinerama_query_version_reply_t; /** * @brief xcb_xinerama_get_state_cookie_t **/ typedef struct xcb_xinerama_get_state_cookie_t { unsigned int sequence; } xcb_xinerama_get_state_cookie_t; /** Opcode for xcb_xinerama_get_state. */ #define XCB_XINERAMA_GET_STATE 1 /** * @brief xcb_xinerama_get_state_request_t **/ typedef struct xcb_xinerama_get_state_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_xinerama_get_state_request_t; /** * @brief xcb_xinerama_get_state_reply_t **/ typedef struct xcb_xinerama_get_state_reply_t { uint8_t response_type; uint8_t state; uint16_t sequence; uint32_t length; xcb_window_t window; } xcb_xinerama_get_state_reply_t; /** * @brief xcb_xinerama_get_screen_count_cookie_t **/ typedef struct xcb_xinerama_get_screen_count_cookie_t { unsigned int sequence; } xcb_xinerama_get_screen_count_cookie_t; /** Opcode for xcb_xinerama_get_screen_count. */ #define XCB_XINERAMA_GET_SCREEN_COUNT 2 /** * @brief xcb_xinerama_get_screen_count_request_t **/ typedef struct xcb_xinerama_get_screen_count_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_xinerama_get_screen_count_request_t; /** * @brief xcb_xinerama_get_screen_count_reply_t **/ typedef struct xcb_xinerama_get_screen_count_reply_t { uint8_t response_type; uint8_t screen_count; uint16_t sequence; uint32_t length; xcb_window_t window; } xcb_xinerama_get_screen_count_reply_t; /** * @brief xcb_xinerama_get_screen_size_cookie_t **/ typedef struct xcb_xinerama_get_screen_size_cookie_t { unsigned int sequence; } xcb_xinerama_get_screen_size_cookie_t; /** Opcode for xcb_xinerama_get_screen_size. */ #define XCB_XINERAMA_GET_SCREEN_SIZE 3 /** * @brief xcb_xinerama_get_screen_size_request_t **/ typedef struct xcb_xinerama_get_screen_size_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint32_t screen; } xcb_xinerama_get_screen_size_request_t; /** * @brief xcb_xinerama_get_screen_size_reply_t **/ typedef struct xcb_xinerama_get_screen_size_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t width; uint32_t height; xcb_window_t window; uint32_t screen; } xcb_xinerama_get_screen_size_reply_t; /** * @brief xcb_xinerama_is_active_cookie_t **/ typedef struct xcb_xinerama_is_active_cookie_t { unsigned int sequence; } xcb_xinerama_is_active_cookie_t; /** Opcode for xcb_xinerama_is_active. */ #define XCB_XINERAMA_IS_ACTIVE 4 /** * @brief xcb_xinerama_is_active_request_t **/ typedef struct xcb_xinerama_is_active_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xinerama_is_active_request_t; /** * @brief xcb_xinerama_is_active_reply_t **/ typedef struct xcb_xinerama_is_active_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t state; } xcb_xinerama_is_active_reply_t; /** * @brief xcb_xinerama_query_screens_cookie_t **/ typedef struct xcb_xinerama_query_screens_cookie_t { unsigned int sequence; } xcb_xinerama_query_screens_cookie_t; /** Opcode for xcb_xinerama_query_screens. */ #define XCB_XINERAMA_QUERY_SCREENS 5 /** * @brief xcb_xinerama_query_screens_request_t **/ typedef struct xcb_xinerama_query_screens_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xinerama_query_screens_request_t; /** * @brief xcb_xinerama_query_screens_reply_t **/ typedef struct xcb_xinerama_query_screens_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t number; uint8_t pad1[20]; } xcb_xinerama_query_screens_reply_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_xinerama_screen_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xinerama_screen_info_t) */ void xcb_xinerama_screen_info_next (xcb_xinerama_screen_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xinerama_screen_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xinerama_screen_info_end (xcb_xinerama_screen_info_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version (xcb_connection_t *c, uint8_t major, uint8_t minor); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version_unchecked (xcb_connection_t *c, uint8_t major, uint8_t minor); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xinerama_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xinerama_query_version_reply_t * xcb_xinerama_query_version_reply (xcb_connection_t *c, xcb_xinerama_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xinerama_get_state_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xinerama_get_state_reply_t * xcb_xinerama_get_state_reply (xcb_connection_t *c, xcb_xinerama_get_state_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xinerama_get_screen_count_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xinerama_get_screen_count_reply_t * xcb_xinerama_get_screen_count_reply (xcb_connection_t *c, xcb_xinerama_get_screen_count_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size (xcb_connection_t *c, xcb_window_t window, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c, xcb_window_t window, uint32_t screen); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xinerama_get_screen_size_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xinerama_get_screen_size_reply_t * xcb_xinerama_get_screen_size_reply (xcb_connection_t *c, xcb_xinerama_get_screen_size_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xinerama_is_active_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xinerama_is_active_reply_t * xcb_xinerama_is_active_reply (xcb_connection_t *c, xcb_xinerama_is_active_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xinerama_query_screens_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens_unchecked (xcb_connection_t *c); xcb_xinerama_screen_info_t * xcb_xinerama_query_screens_screen_info (const xcb_xinerama_query_screens_reply_t *R); int xcb_xinerama_query_screens_screen_info_length (const xcb_xinerama_query_screens_reply_t *R); xcb_xinerama_screen_info_iterator_t xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screens_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xinerama_query_screens_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xinerama_query_screens_reply_t * xcb_xinerama_query_screens_reply (xcb_connection_t *c, xcb_xinerama_query_screens_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ^[mm xcb/xf86dri.hnu[/* * This file generated automatically from xf86dri.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_XF86Dri_API XCB XF86Dri API * @brief XF86Dri XCB Protocol Implementation. * @{ **/ #ifndef __XF86DRI_H #define __XF86DRI_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XF86DRI_MAJOR_VERSION 4 #define XCB_XF86DRI_MINOR_VERSION 1 extern xcb_extension_t xcb_xf86dri_id; /** * @brief xcb_xf86dri_drm_clip_rect_t **/ typedef struct xcb_xf86dri_drm_clip_rect_t { int16_t x1; int16_t y1; int16_t x2; int16_t x3; } xcb_xf86dri_drm_clip_rect_t; /** * @brief xcb_xf86dri_drm_clip_rect_iterator_t **/ typedef struct xcb_xf86dri_drm_clip_rect_iterator_t { xcb_xf86dri_drm_clip_rect_t *data; int rem; int index; } xcb_xf86dri_drm_clip_rect_iterator_t; /** * @brief xcb_xf86dri_query_version_cookie_t **/ typedef struct xcb_xf86dri_query_version_cookie_t { unsigned int sequence; } xcb_xf86dri_query_version_cookie_t; /** Opcode for xcb_xf86dri_query_version. */ #define XCB_XF86DRI_QUERY_VERSION 0 /** * @brief xcb_xf86dri_query_version_request_t **/ typedef struct xcb_xf86dri_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xf86dri_query_version_request_t; /** * @brief xcb_xf86dri_query_version_reply_t **/ typedef struct xcb_xf86dri_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t dri_major_version; uint16_t dri_minor_version; uint32_t dri_minor_patch; } xcb_xf86dri_query_version_reply_t; /** * @brief xcb_xf86dri_query_direct_rendering_capable_cookie_t **/ typedef struct xcb_xf86dri_query_direct_rendering_capable_cookie_t { unsigned int sequence; } xcb_xf86dri_query_direct_rendering_capable_cookie_t; /** Opcode for xcb_xf86dri_query_direct_rendering_capable. */ #define XCB_XF86DRI_QUERY_DIRECT_RENDERING_CAPABLE 1 /** * @brief xcb_xf86dri_query_direct_rendering_capable_request_t **/ typedef struct xcb_xf86dri_query_direct_rendering_capable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_xf86dri_query_direct_rendering_capable_request_t; /** * @brief xcb_xf86dri_query_direct_rendering_capable_reply_t **/ typedef struct xcb_xf86dri_query_direct_rendering_capable_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t is_capable; } xcb_xf86dri_query_direct_rendering_capable_reply_t; /** * @brief xcb_xf86dri_open_connection_cookie_t **/ typedef struct xcb_xf86dri_open_connection_cookie_t { unsigned int sequence; } xcb_xf86dri_open_connection_cookie_t; /** Opcode for xcb_xf86dri_open_connection. */ #define XCB_XF86DRI_OPEN_CONNECTION 2 /** * @brief xcb_xf86dri_open_connection_request_t **/ typedef struct xcb_xf86dri_open_connection_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_xf86dri_open_connection_request_t; /** * @brief xcb_xf86dri_open_connection_reply_t **/ typedef struct xcb_xf86dri_open_connection_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t sarea_handle_low; uint32_t sarea_handle_high; uint32_t bus_id_len; uint8_t pad1[12]; } xcb_xf86dri_open_connection_reply_t; /** Opcode for xcb_xf86dri_close_connection. */ #define XCB_XF86DRI_CLOSE_CONNECTION 3 /** * @brief xcb_xf86dri_close_connection_request_t **/ typedef struct xcb_xf86dri_close_connection_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_xf86dri_close_connection_request_t; /** * @brief xcb_xf86dri_get_client_driver_name_cookie_t **/ typedef struct xcb_xf86dri_get_client_driver_name_cookie_t { unsigned int sequence; } xcb_xf86dri_get_client_driver_name_cookie_t; /** Opcode for xcb_xf86dri_get_client_driver_name. */ #define XCB_XF86DRI_GET_CLIENT_DRIVER_NAME 4 /** * @brief xcb_xf86dri_get_client_driver_name_request_t **/ typedef struct xcb_xf86dri_get_client_driver_name_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_xf86dri_get_client_driver_name_request_t; /** * @brief xcb_xf86dri_get_client_driver_name_reply_t **/ typedef struct xcb_xf86dri_get_client_driver_name_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t client_driver_major_version; uint32_t client_driver_minor_version; uint32_t client_driver_patch_version; uint32_t client_driver_name_len; uint8_t pad1[8]; } xcb_xf86dri_get_client_driver_name_reply_t; /** * @brief xcb_xf86dri_create_context_cookie_t **/ typedef struct xcb_xf86dri_create_context_cookie_t { unsigned int sequence; } xcb_xf86dri_create_context_cookie_t; /** Opcode for xcb_xf86dri_create_context. */ #define XCB_XF86DRI_CREATE_CONTEXT 5 /** * @brief xcb_xf86dri_create_context_request_t **/ typedef struct xcb_xf86dri_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; uint32_t visual; uint32_t context; } xcb_xf86dri_create_context_request_t; /** * @brief xcb_xf86dri_create_context_reply_t **/ typedef struct xcb_xf86dri_create_context_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t hw_context; } xcb_xf86dri_create_context_reply_t; /** Opcode for xcb_xf86dri_destroy_context. */ #define XCB_XF86DRI_DESTROY_CONTEXT 6 /** * @brief xcb_xf86dri_destroy_context_request_t **/ typedef struct xcb_xf86dri_destroy_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; uint32_t context; } xcb_xf86dri_destroy_context_request_t; /** * @brief xcb_xf86dri_create_drawable_cookie_t **/ typedef struct xcb_xf86dri_create_drawable_cookie_t { unsigned int sequence; } xcb_xf86dri_create_drawable_cookie_t; /** Opcode for xcb_xf86dri_create_drawable. */ #define XCB_XF86DRI_CREATE_DRAWABLE 7 /** * @brief xcb_xf86dri_create_drawable_request_t **/ typedef struct xcb_xf86dri_create_drawable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; uint32_t drawable; } xcb_xf86dri_create_drawable_request_t; /** * @brief xcb_xf86dri_create_drawable_reply_t **/ typedef struct xcb_xf86dri_create_drawable_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t hw_drawable_handle; } xcb_xf86dri_create_drawable_reply_t; /** Opcode for xcb_xf86dri_destroy_drawable. */ #define XCB_XF86DRI_DESTROY_DRAWABLE 8 /** * @brief xcb_xf86dri_destroy_drawable_request_t **/ typedef struct xcb_xf86dri_destroy_drawable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; uint32_t drawable; } xcb_xf86dri_destroy_drawable_request_t; /** * @brief xcb_xf86dri_get_drawable_info_cookie_t **/ typedef struct xcb_xf86dri_get_drawable_info_cookie_t { unsigned int sequence; } xcb_xf86dri_get_drawable_info_cookie_t; /** Opcode for xcb_xf86dri_get_drawable_info. */ #define XCB_XF86DRI_GET_DRAWABLE_INFO 9 /** * @brief xcb_xf86dri_get_drawable_info_request_t **/ typedef struct xcb_xf86dri_get_drawable_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; uint32_t drawable; } xcb_xf86dri_get_drawable_info_request_t; /** * @brief xcb_xf86dri_get_drawable_info_reply_t **/ typedef struct xcb_xf86dri_get_drawable_info_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t drawable_table_index; uint32_t drawable_table_stamp; int16_t drawable_origin_X; int16_t drawable_origin_Y; int16_t drawable_size_W; int16_t drawable_size_H; uint32_t num_clip_rects; int16_t back_x; int16_t back_y; uint32_t num_back_clip_rects; } xcb_xf86dri_get_drawable_info_reply_t; /** * @brief xcb_xf86dri_get_device_info_cookie_t **/ typedef struct xcb_xf86dri_get_device_info_cookie_t { unsigned int sequence; } xcb_xf86dri_get_device_info_cookie_t; /** Opcode for xcb_xf86dri_get_device_info. */ #define XCB_XF86DRI_GET_DEVICE_INFO 10 /** * @brief xcb_xf86dri_get_device_info_request_t **/ typedef struct xcb_xf86dri_get_device_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_xf86dri_get_device_info_request_t; /** * @brief xcb_xf86dri_get_device_info_reply_t **/ typedef struct xcb_xf86dri_get_device_info_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t framebuffer_handle_low; uint32_t framebuffer_handle_high; uint32_t framebuffer_origin_offset; uint32_t framebuffer_size; uint32_t framebuffer_stride; uint32_t device_private_size; } xcb_xf86dri_get_device_info_reply_t; /** * @brief xcb_xf86dri_auth_connection_cookie_t **/ typedef struct xcb_xf86dri_auth_connection_cookie_t { unsigned int sequence; } xcb_xf86dri_auth_connection_cookie_t; /** Opcode for xcb_xf86dri_auth_connection. */ #define XCB_XF86DRI_AUTH_CONNECTION 11 /** * @brief xcb_xf86dri_auth_connection_request_t **/ typedef struct xcb_xf86dri_auth_connection_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; uint32_t magic; } xcb_xf86dri_auth_connection_request_t; /** * @brief xcb_xf86dri_auth_connection_reply_t **/ typedef struct xcb_xf86dri_auth_connection_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t authenticated; } xcb_xf86dri_auth_connection_reply_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_xf86dri_drm_clip_rect_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xf86dri_drm_clip_rect_t) */ void xcb_xf86dri_drm_clip_rect_next (xcb_xf86dri_drm_clip_rect_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xf86dri_drm_clip_rect_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xf86dri_drm_clip_rect_end (xcb_xf86dri_drm_clip_rect_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_query_version_cookie_t xcb_xf86dri_query_version (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_query_version_cookie_t xcb_xf86dri_query_version_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_query_version_reply_t * xcb_xf86dri_query_version_reply (xcb_connection_t *c, xcb_xf86dri_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_query_direct_rendering_capable_cookie_t xcb_xf86dri_query_direct_rendering_capable (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_query_direct_rendering_capable_cookie_t xcb_xf86dri_query_direct_rendering_capable_unchecked (xcb_connection_t *c, uint32_t screen); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_query_direct_rendering_capable_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_query_direct_rendering_capable_reply_t * xcb_xf86dri_query_direct_rendering_capable_reply (xcb_connection_t *c, xcb_xf86dri_query_direct_rendering_capable_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xf86dri_open_connection_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_open_connection_cookie_t xcb_xf86dri_open_connection (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_open_connection_cookie_t xcb_xf86dri_open_connection_unchecked (xcb_connection_t *c, uint32_t screen); char * xcb_xf86dri_open_connection_bus_id (const xcb_xf86dri_open_connection_reply_t *R); int xcb_xf86dri_open_connection_bus_id_length (const xcb_xf86dri_open_connection_reply_t *R); xcb_generic_iterator_t xcb_xf86dri_open_connection_bus_id_end (const xcb_xf86dri_open_connection_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_open_connection_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_open_connection_reply_t * xcb_xf86dri_open_connection_reply (xcb_connection_t *c, xcb_xf86dri_open_connection_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xf86dri_close_connection_checked (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xf86dri_close_connection (xcb_connection_t *c, uint32_t screen); int xcb_xf86dri_get_client_driver_name_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_get_client_driver_name_cookie_t xcb_xf86dri_get_client_driver_name (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_get_client_driver_name_cookie_t xcb_xf86dri_get_client_driver_name_unchecked (xcb_connection_t *c, uint32_t screen); char * xcb_xf86dri_get_client_driver_name_client_driver_name (const xcb_xf86dri_get_client_driver_name_reply_t *R); int xcb_xf86dri_get_client_driver_name_client_driver_name_length (const xcb_xf86dri_get_client_driver_name_reply_t *R); xcb_generic_iterator_t xcb_xf86dri_get_client_driver_name_client_driver_name_end (const xcb_xf86dri_get_client_driver_name_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_get_client_driver_name_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_get_client_driver_name_reply_t * xcb_xf86dri_get_client_driver_name_reply (xcb_connection_t *c, xcb_xf86dri_get_client_driver_name_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_create_context_cookie_t xcb_xf86dri_create_context (xcb_connection_t *c, uint32_t screen, uint32_t visual, uint32_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_create_context_cookie_t xcb_xf86dri_create_context_unchecked (xcb_connection_t *c, uint32_t screen, uint32_t visual, uint32_t context); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_create_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_create_context_reply_t * xcb_xf86dri_create_context_reply (xcb_connection_t *c, xcb_xf86dri_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xf86dri_destroy_context_checked (xcb_connection_t *c, uint32_t screen, uint32_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xf86dri_destroy_context (xcb_connection_t *c, uint32_t screen, uint32_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_create_drawable_cookie_t xcb_xf86dri_create_drawable (xcb_connection_t *c, uint32_t screen, uint32_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_create_drawable_cookie_t xcb_xf86dri_create_drawable_unchecked (xcb_connection_t *c, uint32_t screen, uint32_t drawable); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_create_drawable_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_create_drawable_reply_t * xcb_xf86dri_create_drawable_reply (xcb_connection_t *c, xcb_xf86dri_create_drawable_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xf86dri_destroy_drawable_checked (xcb_connection_t *c, uint32_t screen, uint32_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xf86dri_destroy_drawable (xcb_connection_t *c, uint32_t screen, uint32_t drawable); int xcb_xf86dri_get_drawable_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_get_drawable_info_cookie_t xcb_xf86dri_get_drawable_info (xcb_connection_t *c, uint32_t screen, uint32_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_get_drawable_info_cookie_t xcb_xf86dri_get_drawable_info_unchecked (xcb_connection_t *c, uint32_t screen, uint32_t drawable); xcb_xf86dri_drm_clip_rect_t * xcb_xf86dri_get_drawable_info_clip_rects (const xcb_xf86dri_get_drawable_info_reply_t *R); int xcb_xf86dri_get_drawable_info_clip_rects_length (const xcb_xf86dri_get_drawable_info_reply_t *R); xcb_xf86dri_drm_clip_rect_iterator_t xcb_xf86dri_get_drawable_info_clip_rects_iterator (const xcb_xf86dri_get_drawable_info_reply_t *R); xcb_xf86dri_drm_clip_rect_t * xcb_xf86dri_get_drawable_info_back_clip_rects (const xcb_xf86dri_get_drawable_info_reply_t *R); int xcb_xf86dri_get_drawable_info_back_clip_rects_length (const xcb_xf86dri_get_drawable_info_reply_t *R); xcb_xf86dri_drm_clip_rect_iterator_t xcb_xf86dri_get_drawable_info_back_clip_rects_iterator (const xcb_xf86dri_get_drawable_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_get_drawable_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_get_drawable_info_reply_t * xcb_xf86dri_get_drawable_info_reply (xcb_connection_t *c, xcb_xf86dri_get_drawable_info_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xf86dri_get_device_info_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_get_device_info_cookie_t xcb_xf86dri_get_device_info (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_get_device_info_cookie_t xcb_xf86dri_get_device_info_unchecked (xcb_connection_t *c, uint32_t screen); uint32_t * xcb_xf86dri_get_device_info_device_private (const xcb_xf86dri_get_device_info_reply_t *R); int xcb_xf86dri_get_device_info_device_private_length (const xcb_xf86dri_get_device_info_reply_t *R); xcb_generic_iterator_t xcb_xf86dri_get_device_info_device_private_end (const xcb_xf86dri_get_device_info_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_get_device_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_get_device_info_reply_t * xcb_xf86dri_get_device_info_reply (xcb_connection_t *c, xcb_xf86dri_get_device_info_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xf86dri_auth_connection_cookie_t xcb_xf86dri_auth_connection (xcb_connection_t *c, uint32_t screen, uint32_t magic); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xf86dri_auth_connection_cookie_t xcb_xf86dri_auth_connection_unchecked (xcb_connection_t *c, uint32_t screen, uint32_t magic); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xf86dri_auth_connection_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xf86dri_auth_connection_reply_t * xcb_xf86dri_auth_connection_reply (xcb_connection_t *c, xcb_xf86dri_auth_connection_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZxmCmC xcb/shm.hnu[/* * This file generated automatically from shm.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Shm_API XCB Shm API * @brief Shm XCB Protocol Implementation. * @{ **/ #ifndef __SHM_H #define __SHM_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_SHM_MAJOR_VERSION 1 #define XCB_SHM_MINOR_VERSION 2 extern xcb_extension_t xcb_shm_id; typedef uint32_t xcb_shm_seg_t; /** * @brief xcb_shm_seg_iterator_t **/ typedef struct xcb_shm_seg_iterator_t { xcb_shm_seg_t *data; int rem; int index; } xcb_shm_seg_iterator_t; /** Opcode for xcb_shm_completion. */ #define XCB_SHM_COMPLETION 0 /** * @brief xcb_shm_completion_event_t **/ typedef struct xcb_shm_completion_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_drawable_t drawable; uint16_t minor_event; uint8_t major_event; uint8_t pad1; xcb_shm_seg_t shmseg; uint32_t offset; } xcb_shm_completion_event_t; /** Opcode for xcb_shm_bad_seg. */ #define XCB_SHM_BAD_SEG 0 typedef xcb_value_error_t xcb_shm_bad_seg_error_t; /** * @brief xcb_shm_query_version_cookie_t **/ typedef struct xcb_shm_query_version_cookie_t { unsigned int sequence; } xcb_shm_query_version_cookie_t; /** Opcode for xcb_shm_query_version. */ #define XCB_SHM_QUERY_VERSION 0 /** * @brief xcb_shm_query_version_request_t **/ typedef struct xcb_shm_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_shm_query_version_request_t; /** * @brief xcb_shm_query_version_reply_t **/ typedef struct xcb_shm_query_version_reply_t { uint8_t response_type; uint8_t shared_pixmaps; uint16_t sequence; uint32_t length; uint16_t major_version; uint16_t minor_version; uint16_t uid; uint16_t gid; uint8_t pixmap_format; uint8_t pad0[15]; } xcb_shm_query_version_reply_t; /** Opcode for xcb_shm_attach. */ #define XCB_SHM_ATTACH 1 /** * @brief xcb_shm_attach_request_t **/ typedef struct xcb_shm_attach_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shm_seg_t shmseg; uint32_t shmid; uint8_t read_only; uint8_t pad0[3]; } xcb_shm_attach_request_t; /** Opcode for xcb_shm_detach. */ #define XCB_SHM_DETACH 2 /** * @brief xcb_shm_detach_request_t **/ typedef struct xcb_shm_detach_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shm_seg_t shmseg; } xcb_shm_detach_request_t; /** Opcode for xcb_shm_put_image. */ #define XCB_SHM_PUT_IMAGE 3 /** * @brief xcb_shm_put_image_request_t **/ typedef struct xcb_shm_put_image_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; xcb_gcontext_t gc; uint16_t total_width; uint16_t total_height; uint16_t src_x; uint16_t src_y; uint16_t src_width; uint16_t src_height; int16_t dst_x; int16_t dst_y; uint8_t depth; uint8_t format; uint8_t send_event; uint8_t pad0; xcb_shm_seg_t shmseg; uint32_t offset; } xcb_shm_put_image_request_t; /** * @brief xcb_shm_get_image_cookie_t **/ typedef struct xcb_shm_get_image_cookie_t { unsigned int sequence; } xcb_shm_get_image_cookie_t; /** Opcode for xcb_shm_get_image. */ #define XCB_SHM_GET_IMAGE 4 /** * @brief xcb_shm_get_image_request_t **/ typedef struct xcb_shm_get_image_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; int16_t x; int16_t y; uint16_t width; uint16_t height; uint32_t plane_mask; uint8_t format; uint8_t pad0[3]; xcb_shm_seg_t shmseg; uint32_t offset; } xcb_shm_get_image_request_t; /** * @brief xcb_shm_get_image_reply_t **/ typedef struct xcb_shm_get_image_reply_t { uint8_t response_type; uint8_t depth; uint16_t sequence; uint32_t length; xcb_visualid_t visual; uint32_t size; } xcb_shm_get_image_reply_t; /** Opcode for xcb_shm_create_pixmap. */ #define XCB_SHM_CREATE_PIXMAP 5 /** * @brief xcb_shm_create_pixmap_request_t **/ typedef struct xcb_shm_create_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_pixmap_t pid; xcb_drawable_t drawable; uint16_t width; uint16_t height; uint8_t depth; uint8_t pad0[3]; xcb_shm_seg_t shmseg; uint32_t offset; } xcb_shm_create_pixmap_request_t; /** Opcode for xcb_shm_attach_fd. */ #define XCB_SHM_ATTACH_FD 6 /** * @brief xcb_shm_attach_fd_request_t **/ typedef struct xcb_shm_attach_fd_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shm_seg_t shmseg; uint8_t read_only; uint8_t pad0[3]; } xcb_shm_attach_fd_request_t; /** * @brief xcb_shm_create_segment_cookie_t **/ typedef struct xcb_shm_create_segment_cookie_t { unsigned int sequence; } xcb_shm_create_segment_cookie_t; /** Opcode for xcb_shm_create_segment. */ #define XCB_SHM_CREATE_SEGMENT 7 /** * @brief xcb_shm_create_segment_request_t **/ typedef struct xcb_shm_create_segment_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_shm_seg_t shmseg; uint32_t size; uint8_t read_only; uint8_t pad0[3]; } xcb_shm_create_segment_request_t; /** * @brief xcb_shm_create_segment_reply_t **/ typedef struct xcb_shm_create_segment_reply_t { uint8_t response_type; uint8_t nfd; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_shm_create_segment_reply_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_shm_seg_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_shm_seg_t) */ void xcb_shm_seg_next (xcb_shm_seg_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_shm_seg_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_shm_seg_end (xcb_shm_seg_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_shm_query_version_cookie_t xcb_shm_query_version (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_shm_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_shm_query_version_reply_t * xcb_shm_query_version_reply (xcb_connection_t *c, xcb_shm_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shm_attach_checked (xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t shmid, uint8_t read_only); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shm_attach (xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t shmid, uint8_t read_only); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shm_detach_checked (xcb_connection_t *c, xcb_shm_seg_t shmseg); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shm_detach (xcb_connection_t *c, xcb_shm_seg_t shmseg); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shm_put_image_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint16_t total_width, uint16_t total_height, uint16_t src_x, uint16_t src_y, uint16_t src_width, uint16_t src_height, int16_t dst_x, int16_t dst_y, uint8_t depth, uint8_t format, uint8_t send_event, xcb_shm_seg_t shmseg, uint32_t offset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shm_put_image (xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint16_t total_width, uint16_t total_height, uint16_t src_x, uint16_t src_y, uint16_t src_width, uint16_t src_height, int16_t dst_x, int16_t dst_y, uint8_t depth, uint8_t format, uint8_t send_event, xcb_shm_seg_t shmseg, uint32_t offset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_shm_get_image_cookie_t xcb_shm_get_image (xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t plane_mask, uint8_t format, xcb_shm_seg_t shmseg, uint32_t offset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_shm_get_image_cookie_t xcb_shm_get_image_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t plane_mask, uint8_t format, xcb_shm_seg_t shmseg, uint32_t offset); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_shm_get_image_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_shm_get_image_reply_t * xcb_shm_get_image_reply (xcb_connection_t *c, xcb_shm_get_image_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shm_create_pixmap_checked (xcb_connection_t *c, xcb_pixmap_t pid, xcb_drawable_t drawable, uint16_t width, uint16_t height, uint8_t depth, xcb_shm_seg_t shmseg, uint32_t offset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shm_create_pixmap (xcb_connection_t *c, xcb_pixmap_t pid, xcb_drawable_t drawable, uint16_t width, uint16_t height, uint8_t depth, xcb_shm_seg_t shmseg, uint32_t offset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_shm_attach_fd_checked (xcb_connection_t *c, xcb_shm_seg_t shmseg, int32_t shm_fd, uint8_t read_only); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_shm_attach_fd (xcb_connection_t *c, xcb_shm_seg_t shmseg, int32_t shm_fd, uint8_t read_only); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_shm_create_segment_cookie_t xcb_shm_create_segment (xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t size, uint8_t read_only); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_shm_create_segment_cookie_t xcb_shm_create_segment_unchecked (xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t size, uint8_t read_only); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_shm_create_segment_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_shm_create_segment_reply_t * xcb_shm_create_segment_reply (xcb_connection_t *c, xcb_shm_create_segment_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Return the reply fds * @param c The connection * @param reply The reply * * Returns the array of reply fds of the request asked by * * The returned value must be freed by the caller using free(). */ int * xcb_shm_create_segment_reply_fds (xcb_connection_t *c /**< */, xcb_shm_create_segment_reply_t *reply); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ5_H xcb/dri2.hnu[/* * This file generated automatically from dri2.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_DRI2_API XCB DRI2 API * @brief DRI2 XCB Protocol Implementation. * @{ **/ #ifndef __DRI2_H #define __DRI2_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_DRI2_MAJOR_VERSION 1 #define XCB_DRI2_MINOR_VERSION 4 extern xcb_extension_t xcb_dri2_id; typedef enum xcb_dri2_attachment_t { XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT = 0, XCB_DRI2_ATTACHMENT_BUFFER_BACK_LEFT = 1, XCB_DRI2_ATTACHMENT_BUFFER_FRONT_RIGHT = 2, XCB_DRI2_ATTACHMENT_BUFFER_BACK_RIGHT = 3, XCB_DRI2_ATTACHMENT_BUFFER_DEPTH = 4, XCB_DRI2_ATTACHMENT_BUFFER_STENCIL = 5, XCB_DRI2_ATTACHMENT_BUFFER_ACCUM = 6, XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT = 7, XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_RIGHT = 8, XCB_DRI2_ATTACHMENT_BUFFER_DEPTH_STENCIL = 9, XCB_DRI2_ATTACHMENT_BUFFER_HIZ = 10 } xcb_dri2_attachment_t; typedef enum xcb_dri2_driver_type_t { XCB_DRI2_DRIVER_TYPE_DRI = 0, XCB_DRI2_DRIVER_TYPE_VDPAU = 1 } xcb_dri2_driver_type_t; typedef enum xcb_dri2_event_type_t { XCB_DRI2_EVENT_TYPE_EXCHANGE_COMPLETE = 1, XCB_DRI2_EVENT_TYPE_BLIT_COMPLETE = 2, XCB_DRI2_EVENT_TYPE_FLIP_COMPLETE = 3 } xcb_dri2_event_type_t; /** * @brief xcb_dri2_dri2_buffer_t **/ typedef struct xcb_dri2_dri2_buffer_t { uint32_t attachment; uint32_t name; uint32_t pitch; uint32_t cpp; uint32_t flags; } xcb_dri2_dri2_buffer_t; /** * @brief xcb_dri2_dri2_buffer_iterator_t **/ typedef struct xcb_dri2_dri2_buffer_iterator_t { xcb_dri2_dri2_buffer_t *data; int rem; int index; } xcb_dri2_dri2_buffer_iterator_t; /** * @brief xcb_dri2_attach_format_t **/ typedef struct xcb_dri2_attach_format_t { uint32_t attachment; uint32_t format; } xcb_dri2_attach_format_t; /** * @brief xcb_dri2_attach_format_iterator_t **/ typedef struct xcb_dri2_attach_format_iterator_t { xcb_dri2_attach_format_t *data; int rem; int index; } xcb_dri2_attach_format_iterator_t; /** * @brief xcb_dri2_query_version_cookie_t **/ typedef struct xcb_dri2_query_version_cookie_t { unsigned int sequence; } xcb_dri2_query_version_cookie_t; /** Opcode for xcb_dri2_query_version. */ #define XCB_DRI2_QUERY_VERSION 0 /** * @brief xcb_dri2_query_version_request_t **/ typedef struct xcb_dri2_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; } xcb_dri2_query_version_request_t; /** * @brief xcb_dri2_query_version_reply_t **/ typedef struct xcb_dri2_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; } xcb_dri2_query_version_reply_t; /** * @brief xcb_dri2_connect_cookie_t **/ typedef struct xcb_dri2_connect_cookie_t { unsigned int sequence; } xcb_dri2_connect_cookie_t; /** Opcode for xcb_dri2_connect. */ #define XCB_DRI2_CONNECT 1 /** * @brief xcb_dri2_connect_request_t **/ typedef struct xcb_dri2_connect_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint32_t driver_type; } xcb_dri2_connect_request_t; /** * @brief xcb_dri2_connect_reply_t **/ typedef struct xcb_dri2_connect_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t driver_name_length; uint32_t device_name_length; uint8_t pad1[16]; } xcb_dri2_connect_reply_t; /** * @brief xcb_dri2_authenticate_cookie_t **/ typedef struct xcb_dri2_authenticate_cookie_t { unsigned int sequence; } xcb_dri2_authenticate_cookie_t; /** Opcode for xcb_dri2_authenticate. */ #define XCB_DRI2_AUTHENTICATE 2 /** * @brief xcb_dri2_authenticate_request_t **/ typedef struct xcb_dri2_authenticate_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint32_t magic; } xcb_dri2_authenticate_request_t; /** * @brief xcb_dri2_authenticate_reply_t **/ typedef struct xcb_dri2_authenticate_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t authenticated; } xcb_dri2_authenticate_reply_t; /** Opcode for xcb_dri2_create_drawable. */ #define XCB_DRI2_CREATE_DRAWABLE 3 /** * @brief xcb_dri2_create_drawable_request_t **/ typedef struct xcb_dri2_create_drawable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; } xcb_dri2_create_drawable_request_t; /** Opcode for xcb_dri2_destroy_drawable. */ #define XCB_DRI2_DESTROY_DRAWABLE 4 /** * @brief xcb_dri2_destroy_drawable_request_t **/ typedef struct xcb_dri2_destroy_drawable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; } xcb_dri2_destroy_drawable_request_t; /** * @brief xcb_dri2_get_buffers_cookie_t **/ typedef struct xcb_dri2_get_buffers_cookie_t { unsigned int sequence; } xcb_dri2_get_buffers_cookie_t; /** Opcode for xcb_dri2_get_buffers. */ #define XCB_DRI2_GET_BUFFERS 5 /** * @brief xcb_dri2_get_buffers_request_t **/ typedef struct xcb_dri2_get_buffers_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t count; } xcb_dri2_get_buffers_request_t; /** * @brief xcb_dri2_get_buffers_reply_t **/ typedef struct xcb_dri2_get_buffers_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t width; uint32_t height; uint32_t count; uint8_t pad1[12]; } xcb_dri2_get_buffers_reply_t; /** * @brief xcb_dri2_copy_region_cookie_t **/ typedef struct xcb_dri2_copy_region_cookie_t { unsigned int sequence; } xcb_dri2_copy_region_cookie_t; /** Opcode for xcb_dri2_copy_region. */ #define XCB_DRI2_COPY_REGION 6 /** * @brief xcb_dri2_copy_region_request_t **/ typedef struct xcb_dri2_copy_region_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t region; uint32_t dest; uint32_t src; } xcb_dri2_copy_region_request_t; /** * @brief xcb_dri2_copy_region_reply_t **/ typedef struct xcb_dri2_copy_region_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; } xcb_dri2_copy_region_reply_t; /** * @brief xcb_dri2_get_buffers_with_format_cookie_t **/ typedef struct xcb_dri2_get_buffers_with_format_cookie_t { unsigned int sequence; } xcb_dri2_get_buffers_with_format_cookie_t; /** Opcode for xcb_dri2_get_buffers_with_format. */ #define XCB_DRI2_GET_BUFFERS_WITH_FORMAT 7 /** * @brief xcb_dri2_get_buffers_with_format_request_t **/ typedef struct xcb_dri2_get_buffers_with_format_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t count; } xcb_dri2_get_buffers_with_format_request_t; /** * @brief xcb_dri2_get_buffers_with_format_reply_t **/ typedef struct xcb_dri2_get_buffers_with_format_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t width; uint32_t height; uint32_t count; uint8_t pad1[12]; } xcb_dri2_get_buffers_with_format_reply_t; /** * @brief xcb_dri2_swap_buffers_cookie_t **/ typedef struct xcb_dri2_swap_buffers_cookie_t { unsigned int sequence; } xcb_dri2_swap_buffers_cookie_t; /** Opcode for xcb_dri2_swap_buffers. */ #define XCB_DRI2_SWAP_BUFFERS 8 /** * @brief xcb_dri2_swap_buffers_request_t **/ typedef struct xcb_dri2_swap_buffers_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t target_msc_hi; uint32_t target_msc_lo; uint32_t divisor_hi; uint32_t divisor_lo; uint32_t remainder_hi; uint32_t remainder_lo; } xcb_dri2_swap_buffers_request_t; /** * @brief xcb_dri2_swap_buffers_reply_t **/ typedef struct xcb_dri2_swap_buffers_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t swap_hi; uint32_t swap_lo; } xcb_dri2_swap_buffers_reply_t; /** * @brief xcb_dri2_get_msc_cookie_t **/ typedef struct xcb_dri2_get_msc_cookie_t { unsigned int sequence; } xcb_dri2_get_msc_cookie_t; /** Opcode for xcb_dri2_get_msc. */ #define XCB_DRI2_GET_MSC 9 /** * @brief xcb_dri2_get_msc_request_t **/ typedef struct xcb_dri2_get_msc_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; } xcb_dri2_get_msc_request_t; /** * @brief xcb_dri2_get_msc_reply_t **/ typedef struct xcb_dri2_get_msc_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t ust_hi; uint32_t ust_lo; uint32_t msc_hi; uint32_t msc_lo; uint32_t sbc_hi; uint32_t sbc_lo; } xcb_dri2_get_msc_reply_t; /** * @brief xcb_dri2_wait_msc_cookie_t **/ typedef struct xcb_dri2_wait_msc_cookie_t { unsigned int sequence; } xcb_dri2_wait_msc_cookie_t; /** Opcode for xcb_dri2_wait_msc. */ #define XCB_DRI2_WAIT_MSC 10 /** * @brief xcb_dri2_wait_msc_request_t **/ typedef struct xcb_dri2_wait_msc_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t target_msc_hi; uint32_t target_msc_lo; uint32_t divisor_hi; uint32_t divisor_lo; uint32_t remainder_hi; uint32_t remainder_lo; } xcb_dri2_wait_msc_request_t; /** * @brief xcb_dri2_wait_msc_reply_t **/ typedef struct xcb_dri2_wait_msc_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t ust_hi; uint32_t ust_lo; uint32_t msc_hi; uint32_t msc_lo; uint32_t sbc_hi; uint32_t sbc_lo; } xcb_dri2_wait_msc_reply_t; /** * @brief xcb_dri2_wait_sbc_cookie_t **/ typedef struct xcb_dri2_wait_sbc_cookie_t { unsigned int sequence; } xcb_dri2_wait_sbc_cookie_t; /** Opcode for xcb_dri2_wait_sbc. */ #define XCB_DRI2_WAIT_SBC 11 /** * @brief xcb_dri2_wait_sbc_request_t **/ typedef struct xcb_dri2_wait_sbc_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t target_sbc_hi; uint32_t target_sbc_lo; } xcb_dri2_wait_sbc_request_t; /** * @brief xcb_dri2_wait_sbc_reply_t **/ typedef struct xcb_dri2_wait_sbc_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t ust_hi; uint32_t ust_lo; uint32_t msc_hi; uint32_t msc_lo; uint32_t sbc_hi; uint32_t sbc_lo; } xcb_dri2_wait_sbc_reply_t; /** Opcode for xcb_dri2_swap_interval. */ #define XCB_DRI2_SWAP_INTERVAL 12 /** * @brief xcb_dri2_swap_interval_request_t **/ typedef struct xcb_dri2_swap_interval_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t interval; } xcb_dri2_swap_interval_request_t; /** * @brief xcb_dri2_get_param_cookie_t **/ typedef struct xcb_dri2_get_param_cookie_t { unsigned int sequence; } xcb_dri2_get_param_cookie_t; /** Opcode for xcb_dri2_get_param. */ #define XCB_DRI2_GET_PARAM 13 /** * @brief xcb_dri2_get_param_request_t **/ typedef struct xcb_dri2_get_param_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t param; } xcb_dri2_get_param_request_t; /** * @brief xcb_dri2_get_param_reply_t **/ typedef struct xcb_dri2_get_param_reply_t { uint8_t response_type; uint8_t is_param_recognized; uint16_t sequence; uint32_t length; uint32_t value_hi; uint32_t value_lo; } xcb_dri2_get_param_reply_t; /** Opcode for xcb_dri2_buffer_swap_complete. */ #define XCB_DRI2_BUFFER_SWAP_COMPLETE 0 /** * @brief xcb_dri2_buffer_swap_complete_event_t **/ typedef struct xcb_dri2_buffer_swap_complete_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint16_t event_type; uint8_t pad1[2]; xcb_drawable_t drawable; uint32_t ust_hi; uint32_t ust_lo; uint32_t msc_hi; uint32_t msc_lo; uint32_t sbc; } xcb_dri2_buffer_swap_complete_event_t; /** Opcode for xcb_dri2_invalidate_buffers. */ #define XCB_DRI2_INVALIDATE_BUFFERS 1 /** * @brief xcb_dri2_invalidate_buffers_event_t **/ typedef struct xcb_dri2_invalidate_buffers_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_drawable_t drawable; } xcb_dri2_invalidate_buffers_event_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_dri2_dri2_buffer_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_dri2_dri2_buffer_t) */ void xcb_dri2_dri2_buffer_next (xcb_dri2_dri2_buffer_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_dri2_dri2_buffer_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_dri2_dri2_buffer_end (xcb_dri2_dri2_buffer_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_dri2_attach_format_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_dri2_attach_format_t) */ void xcb_dri2_attach_format_next (xcb_dri2_attach_format_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_dri2_attach_format_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_dri2_attach_format_end (xcb_dri2_attach_format_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_query_version_cookie_t xcb_dri2_query_version (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_query_version_cookie_t xcb_dri2_query_version_unchecked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_query_version_reply_t * xcb_dri2_query_version_reply (xcb_connection_t *c, xcb_dri2_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_dri2_connect_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_connect_cookie_t xcb_dri2_connect (xcb_connection_t *c, xcb_window_t window, uint32_t driver_type); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_connect_cookie_t xcb_dri2_connect_unchecked (xcb_connection_t *c, xcb_window_t window, uint32_t driver_type); char * xcb_dri2_connect_driver_name (const xcb_dri2_connect_reply_t *R); int xcb_dri2_connect_driver_name_length (const xcb_dri2_connect_reply_t *R); xcb_generic_iterator_t xcb_dri2_connect_driver_name_end (const xcb_dri2_connect_reply_t *R); void * xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t *R); int xcb_dri2_connect_alignment_pad_length (const xcb_dri2_connect_reply_t *R); xcb_generic_iterator_t xcb_dri2_connect_alignment_pad_end (const xcb_dri2_connect_reply_t *R); char * xcb_dri2_connect_device_name (const xcb_dri2_connect_reply_t *R); int xcb_dri2_connect_device_name_length (const xcb_dri2_connect_reply_t *R); xcb_generic_iterator_t xcb_dri2_connect_device_name_end (const xcb_dri2_connect_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_connect_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_connect_reply_t * xcb_dri2_connect_reply (xcb_connection_t *c, xcb_dri2_connect_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_authenticate_cookie_t xcb_dri2_authenticate (xcb_connection_t *c, xcb_window_t window, uint32_t magic); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_authenticate_cookie_t xcb_dri2_authenticate_unchecked (xcb_connection_t *c, xcb_window_t window, uint32_t magic); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_authenticate_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_authenticate_reply_t * xcb_dri2_authenticate_reply (xcb_connection_t *c, xcb_dri2_authenticate_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dri2_create_drawable_checked (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dri2_create_drawable (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dri2_destroy_drawable_checked (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dri2_destroy_drawable (xcb_connection_t *c, xcb_drawable_t drawable); int xcb_dri2_get_buffers_sizeof (const void *_buffer, uint32_t attachments_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_get_buffers_cookie_t xcb_dri2_get_buffers (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t count, uint32_t attachments_len, const uint32_t *attachments); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_get_buffers_cookie_t xcb_dri2_get_buffers_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t count, uint32_t attachments_len, const uint32_t *attachments); xcb_dri2_dri2_buffer_t * xcb_dri2_get_buffers_buffers (const xcb_dri2_get_buffers_reply_t *R); int xcb_dri2_get_buffers_buffers_length (const xcb_dri2_get_buffers_reply_t *R); xcb_dri2_dri2_buffer_iterator_t xcb_dri2_get_buffers_buffers_iterator (const xcb_dri2_get_buffers_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_get_buffers_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_get_buffers_reply_t * xcb_dri2_get_buffers_reply (xcb_connection_t *c, xcb_dri2_get_buffers_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_copy_region_cookie_t xcb_dri2_copy_region (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t region, uint32_t dest, uint32_t src); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_copy_region_cookie_t xcb_dri2_copy_region_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t region, uint32_t dest, uint32_t src); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_copy_region_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_copy_region_reply_t * xcb_dri2_copy_region_reply (xcb_connection_t *c, xcb_dri2_copy_region_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_dri2_get_buffers_with_format_sizeof (const void *_buffer, uint32_t attachments_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_get_buffers_with_format_cookie_t xcb_dri2_get_buffers_with_format (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t count, uint32_t attachments_len, const xcb_dri2_attach_format_t *attachments); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_get_buffers_with_format_cookie_t xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t count, uint32_t attachments_len, const xcb_dri2_attach_format_t *attachments); xcb_dri2_dri2_buffer_t * xcb_dri2_get_buffers_with_format_buffers (const xcb_dri2_get_buffers_with_format_reply_t *R); int xcb_dri2_get_buffers_with_format_buffers_length (const xcb_dri2_get_buffers_with_format_reply_t *R); xcb_dri2_dri2_buffer_iterator_t xcb_dri2_get_buffers_with_format_buffers_iterator (const xcb_dri2_get_buffers_with_format_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_get_buffers_with_format_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_get_buffers_with_format_reply_t * xcb_dri2_get_buffers_with_format_reply (xcb_connection_t *c, xcb_dri2_get_buffers_with_format_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_swap_buffers_cookie_t xcb_dri2_swap_buffers (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t target_msc_hi, uint32_t target_msc_lo, uint32_t divisor_hi, uint32_t divisor_lo, uint32_t remainder_hi, uint32_t remainder_lo); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_swap_buffers_cookie_t xcb_dri2_swap_buffers_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t target_msc_hi, uint32_t target_msc_lo, uint32_t divisor_hi, uint32_t divisor_lo, uint32_t remainder_hi, uint32_t remainder_lo); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_swap_buffers_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_swap_buffers_reply_t * xcb_dri2_swap_buffers_reply (xcb_connection_t *c, xcb_dri2_swap_buffers_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_get_msc_cookie_t xcb_dri2_get_msc (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_get_msc_cookie_t xcb_dri2_get_msc_unchecked (xcb_connection_t *c, xcb_drawable_t drawable); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_get_msc_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_get_msc_reply_t * xcb_dri2_get_msc_reply (xcb_connection_t *c, xcb_dri2_get_msc_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_wait_msc_cookie_t xcb_dri2_wait_msc (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t target_msc_hi, uint32_t target_msc_lo, uint32_t divisor_hi, uint32_t divisor_lo, uint32_t remainder_hi, uint32_t remainder_lo); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_wait_msc_cookie_t xcb_dri2_wait_msc_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t target_msc_hi, uint32_t target_msc_lo, uint32_t divisor_hi, uint32_t divisor_lo, uint32_t remainder_hi, uint32_t remainder_lo); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_wait_msc_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_wait_msc_reply_t * xcb_dri2_wait_msc_reply (xcb_connection_t *c, xcb_dri2_wait_msc_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_wait_sbc_cookie_t xcb_dri2_wait_sbc (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t target_sbc_hi, uint32_t target_sbc_lo); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_wait_sbc_cookie_t xcb_dri2_wait_sbc_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t target_sbc_hi, uint32_t target_sbc_lo); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_wait_sbc_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_wait_sbc_reply_t * xcb_dri2_wait_sbc_reply (xcb_connection_t *c, xcb_dri2_wait_sbc_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dri2_swap_interval_checked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t interval); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dri2_swap_interval (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t interval); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri2_get_param_cookie_t xcb_dri2_get_param (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t param); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri2_get_param_cookie_t xcb_dri2_get_param_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t param); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri2_get_param_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri2_get_param_reply_t * xcb_dri2_get_param_reply (xcb_connection_t *c, xcb_dri2_get_param_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ' xcb/xinput.hnu[/* * This file generated automatically from xinput.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Input_API XCB Input API * @brief Input XCB Protocol Implementation. * @{ **/ #ifndef __XINPUT_H #define __XINPUT_H #include "xcb.h" #include "xfixes.h" #ifdef __cplusplus extern "C" { #endif #define XCB_INPUT_MAJOR_VERSION 2 #define XCB_INPUT_MINOR_VERSION 3 extern xcb_extension_t xcb_input_id; typedef uint32_t xcb_input_event_class_t; /** * @brief xcb_input_event_class_iterator_t **/ typedef struct xcb_input_event_class_iterator_t { xcb_input_event_class_t *data; int rem; int index; } xcb_input_event_class_iterator_t; typedef uint8_t xcb_input_key_code_t; /** * @brief xcb_input_key_code_iterator_t **/ typedef struct xcb_input_key_code_iterator_t { xcb_input_key_code_t *data; int rem; int index; } xcb_input_key_code_iterator_t; typedef uint16_t xcb_input_device_id_t; /** * @brief xcb_input_device_id_iterator_t **/ typedef struct xcb_input_device_id_iterator_t { xcb_input_device_id_t *data; int rem; int index; } xcb_input_device_id_iterator_t; typedef int32_t xcb_input_fp1616_t; /** * @brief xcb_input_fp1616_iterator_t **/ typedef struct xcb_input_fp1616_iterator_t { xcb_input_fp1616_t *data; int rem; int index; } xcb_input_fp1616_iterator_t; /** * @brief xcb_input_fp3232_t **/ typedef struct xcb_input_fp3232_t { int32_t integral; uint32_t frac; } xcb_input_fp3232_t; /** * @brief xcb_input_fp3232_iterator_t **/ typedef struct xcb_input_fp3232_iterator_t { xcb_input_fp3232_t *data; int rem; int index; } xcb_input_fp3232_iterator_t; /** * @brief xcb_input_get_extension_version_cookie_t **/ typedef struct xcb_input_get_extension_version_cookie_t { unsigned int sequence; } xcb_input_get_extension_version_cookie_t; /** Opcode for xcb_input_get_extension_version. */ #define XCB_INPUT_GET_EXTENSION_VERSION 1 /** * @brief xcb_input_get_extension_version_request_t **/ typedef struct xcb_input_get_extension_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t name_len; uint8_t pad0[2]; } xcb_input_get_extension_version_request_t; /** * @brief xcb_input_get_extension_version_reply_t **/ typedef struct xcb_input_get_extension_version_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint16_t server_major; uint16_t server_minor; uint8_t present; uint8_t pad0[19]; } xcb_input_get_extension_version_reply_t; typedef enum xcb_input_device_use_t { XCB_INPUT_DEVICE_USE_IS_X_POINTER = 0, XCB_INPUT_DEVICE_USE_IS_X_KEYBOARD = 1, XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_DEVICE = 2, XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_KEYBOARD = 3, XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_POINTER = 4 } xcb_input_device_use_t; typedef enum xcb_input_input_class_t { XCB_INPUT_INPUT_CLASS_KEY = 0, XCB_INPUT_INPUT_CLASS_BUTTON = 1, XCB_INPUT_INPUT_CLASS_VALUATOR = 2, XCB_INPUT_INPUT_CLASS_FEEDBACK = 3, XCB_INPUT_INPUT_CLASS_PROXIMITY = 4, XCB_INPUT_INPUT_CLASS_FOCUS = 5, XCB_INPUT_INPUT_CLASS_OTHER = 6 } xcb_input_input_class_t; typedef enum xcb_input_valuator_mode_t { XCB_INPUT_VALUATOR_MODE_RELATIVE = 0, XCB_INPUT_VALUATOR_MODE_ABSOLUTE = 1 } xcb_input_valuator_mode_t; /** * @brief xcb_input_device_info_t **/ typedef struct xcb_input_device_info_t { xcb_atom_t device_type; uint8_t device_id; uint8_t num_class_info; uint8_t device_use; uint8_t pad0; } xcb_input_device_info_t; /** * @brief xcb_input_device_info_iterator_t **/ typedef struct xcb_input_device_info_iterator_t { xcb_input_device_info_t *data; int rem; int index; } xcb_input_device_info_iterator_t; /** * @brief xcb_input_key_info_t **/ typedef struct xcb_input_key_info_t { uint8_t class_id; uint8_t len; xcb_input_key_code_t min_keycode; xcb_input_key_code_t max_keycode; uint16_t num_keys; uint8_t pad0[2]; } xcb_input_key_info_t; /** * @brief xcb_input_key_info_iterator_t **/ typedef struct xcb_input_key_info_iterator_t { xcb_input_key_info_t *data; int rem; int index; } xcb_input_key_info_iterator_t; /** * @brief xcb_input_button_info_t **/ typedef struct xcb_input_button_info_t { uint8_t class_id; uint8_t len; uint16_t num_buttons; } xcb_input_button_info_t; /** * @brief xcb_input_button_info_iterator_t **/ typedef struct xcb_input_button_info_iterator_t { xcb_input_button_info_t *data; int rem; int index; } xcb_input_button_info_iterator_t; /** * @brief xcb_input_axis_info_t **/ typedef struct xcb_input_axis_info_t { uint32_t resolution; int32_t minimum; int32_t maximum; } xcb_input_axis_info_t; /** * @brief xcb_input_axis_info_iterator_t **/ typedef struct xcb_input_axis_info_iterator_t { xcb_input_axis_info_t *data; int rem; int index; } xcb_input_axis_info_iterator_t; /** * @brief xcb_input_valuator_info_t **/ typedef struct xcb_input_valuator_info_t { uint8_t class_id; uint8_t len; uint8_t axes_len; uint8_t mode; uint32_t motion_size; } xcb_input_valuator_info_t; /** * @brief xcb_input_valuator_info_iterator_t **/ typedef struct xcb_input_valuator_info_iterator_t { xcb_input_valuator_info_t *data; int rem; int index; } xcb_input_valuator_info_iterator_t; /** * @brief xcb_input_input_info_info_t **/ typedef struct xcb_input_input_info_info_t { struct { xcb_input_key_code_t min_keycode; xcb_input_key_code_t max_keycode; uint16_t num_keys; uint8_t pad0[2]; } key; struct { uint16_t num_buttons; } button; struct { uint8_t axes_len; uint8_t mode; uint32_t motion_size; xcb_input_axis_info_t *axes; } valuator; } xcb_input_input_info_info_t; /** * @brief xcb_input_input_info_t **/ typedef struct xcb_input_input_info_t { uint8_t class_id; uint8_t len; } xcb_input_input_info_t; void * xcb_input_input_info_info (const xcb_input_input_info_t *R); /** * @brief xcb_input_input_info_iterator_t **/ typedef struct xcb_input_input_info_iterator_t { xcb_input_input_info_t *data; int rem; int index; } xcb_input_input_info_iterator_t; /** * @brief xcb_input_device_name_t **/ typedef struct xcb_input_device_name_t { uint8_t len; } xcb_input_device_name_t; /** * @brief xcb_input_device_name_iterator_t **/ typedef struct xcb_input_device_name_iterator_t { xcb_input_device_name_t *data; int rem; int index; } xcb_input_device_name_iterator_t; /** * @brief xcb_input_list_input_devices_cookie_t **/ typedef struct xcb_input_list_input_devices_cookie_t { unsigned int sequence; } xcb_input_list_input_devices_cookie_t; /** Opcode for xcb_input_list_input_devices. */ #define XCB_INPUT_LIST_INPUT_DEVICES 2 /** * @brief xcb_input_list_input_devices_request_t **/ typedef struct xcb_input_list_input_devices_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_input_list_input_devices_request_t; /** * @brief xcb_input_list_input_devices_reply_t **/ typedef struct xcb_input_list_input_devices_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t devices_len; uint8_t pad0[23]; } xcb_input_list_input_devices_reply_t; typedef uint8_t xcb_input_event_type_base_t; /** * @brief xcb_input_event_type_base_iterator_t **/ typedef struct xcb_input_event_type_base_iterator_t { xcb_input_event_type_base_t *data; int rem; int index; } xcb_input_event_type_base_iterator_t; /** * @brief xcb_input_input_class_info_t **/ typedef struct xcb_input_input_class_info_t { uint8_t class_id; xcb_input_event_type_base_t event_type_base; } xcb_input_input_class_info_t; /** * @brief xcb_input_input_class_info_iterator_t **/ typedef struct xcb_input_input_class_info_iterator_t { xcb_input_input_class_info_t *data; int rem; int index; } xcb_input_input_class_info_iterator_t; /** * @brief xcb_input_open_device_cookie_t **/ typedef struct xcb_input_open_device_cookie_t { unsigned int sequence; } xcb_input_open_device_cookie_t; /** Opcode for xcb_input_open_device. */ #define XCB_INPUT_OPEN_DEVICE 3 /** * @brief xcb_input_open_device_request_t **/ typedef struct xcb_input_open_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_open_device_request_t; /** * @brief xcb_input_open_device_reply_t **/ typedef struct xcb_input_open_device_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t num_classes; uint8_t pad0[23]; } xcb_input_open_device_reply_t; /** Opcode for xcb_input_close_device. */ #define XCB_INPUT_CLOSE_DEVICE 4 /** * @brief xcb_input_close_device_request_t **/ typedef struct xcb_input_close_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_close_device_request_t; /** * @brief xcb_input_set_device_mode_cookie_t **/ typedef struct xcb_input_set_device_mode_cookie_t { unsigned int sequence; } xcb_input_set_device_mode_cookie_t; /** Opcode for xcb_input_set_device_mode. */ #define XCB_INPUT_SET_DEVICE_MODE 5 /** * @brief xcb_input_set_device_mode_request_t **/ typedef struct xcb_input_set_device_mode_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t mode; uint8_t pad0[2]; } xcb_input_set_device_mode_request_t; /** * @brief xcb_input_set_device_mode_reply_t **/ typedef struct xcb_input_set_device_mode_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_set_device_mode_reply_t; /** Opcode for xcb_input_select_extension_event. */ #define XCB_INPUT_SELECT_EXTENSION_EVENT 6 /** * @brief xcb_input_select_extension_event_request_t **/ typedef struct xcb_input_select_extension_event_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint16_t num_classes; uint8_t pad0[2]; } xcb_input_select_extension_event_request_t; /** * @brief xcb_input_get_selected_extension_events_cookie_t **/ typedef struct xcb_input_get_selected_extension_events_cookie_t { unsigned int sequence; } xcb_input_get_selected_extension_events_cookie_t; /** Opcode for xcb_input_get_selected_extension_events. */ #define XCB_INPUT_GET_SELECTED_EXTENSION_EVENTS 7 /** * @brief xcb_input_get_selected_extension_events_request_t **/ typedef struct xcb_input_get_selected_extension_events_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_input_get_selected_extension_events_request_t; /** * @brief xcb_input_get_selected_extension_events_reply_t **/ typedef struct xcb_input_get_selected_extension_events_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint16_t num_this_classes; uint16_t num_all_classes; uint8_t pad0[20]; } xcb_input_get_selected_extension_events_reply_t; typedef enum xcb_input_propagate_mode_t { XCB_INPUT_PROPAGATE_MODE_ADD_TO_LIST = 0, XCB_INPUT_PROPAGATE_MODE_DELETE_FROM_LIST = 1 } xcb_input_propagate_mode_t; /** Opcode for xcb_input_change_device_dont_propagate_list. */ #define XCB_INPUT_CHANGE_DEVICE_DONT_PROPAGATE_LIST 8 /** * @brief xcb_input_change_device_dont_propagate_list_request_t **/ typedef struct xcb_input_change_device_dont_propagate_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint16_t num_classes; uint8_t mode; uint8_t pad0; } xcb_input_change_device_dont_propagate_list_request_t; /** * @brief xcb_input_get_device_dont_propagate_list_cookie_t **/ typedef struct xcb_input_get_device_dont_propagate_list_cookie_t { unsigned int sequence; } xcb_input_get_device_dont_propagate_list_cookie_t; /** Opcode for xcb_input_get_device_dont_propagate_list. */ #define XCB_INPUT_GET_DEVICE_DONT_PROPAGATE_LIST 9 /** * @brief xcb_input_get_device_dont_propagate_list_request_t **/ typedef struct xcb_input_get_device_dont_propagate_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_input_get_device_dont_propagate_list_request_t; /** * @brief xcb_input_get_device_dont_propagate_list_reply_t **/ typedef struct xcb_input_get_device_dont_propagate_list_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint16_t num_classes; uint8_t pad0[22]; } xcb_input_get_device_dont_propagate_list_reply_t; /** * @brief xcb_input_device_time_coord_t **/ typedef struct xcb_input_device_time_coord_t { xcb_timestamp_t time; } xcb_input_device_time_coord_t; /** * @brief xcb_input_device_time_coord_iterator_t **/ typedef struct xcb_input_device_time_coord_iterator_t { xcb_input_device_time_coord_t *data; int rem; int index; uint8_t num_axes; /**< */ } xcb_input_device_time_coord_iterator_t; /** * @brief xcb_input_get_device_motion_events_cookie_t **/ typedef struct xcb_input_get_device_motion_events_cookie_t { unsigned int sequence; } xcb_input_get_device_motion_events_cookie_t; /** Opcode for xcb_input_get_device_motion_events. */ #define XCB_INPUT_GET_DEVICE_MOTION_EVENTS 10 /** * @brief xcb_input_get_device_motion_events_request_t **/ typedef struct xcb_input_get_device_motion_events_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_timestamp_t start; xcb_timestamp_t stop; uint8_t device_id; uint8_t pad0[3]; } xcb_input_get_device_motion_events_request_t; /** * @brief xcb_input_get_device_motion_events_reply_t **/ typedef struct xcb_input_get_device_motion_events_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint32_t num_events; uint8_t num_axes; uint8_t device_mode; uint8_t pad0[18]; } xcb_input_get_device_motion_events_reply_t; /** * @brief xcb_input_change_keyboard_device_cookie_t **/ typedef struct xcb_input_change_keyboard_device_cookie_t { unsigned int sequence; } xcb_input_change_keyboard_device_cookie_t; /** Opcode for xcb_input_change_keyboard_device. */ #define XCB_INPUT_CHANGE_KEYBOARD_DEVICE 11 /** * @brief xcb_input_change_keyboard_device_request_t **/ typedef struct xcb_input_change_keyboard_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_change_keyboard_device_request_t; /** * @brief xcb_input_change_keyboard_device_reply_t **/ typedef struct xcb_input_change_keyboard_device_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_change_keyboard_device_reply_t; /** * @brief xcb_input_change_pointer_device_cookie_t **/ typedef struct xcb_input_change_pointer_device_cookie_t { unsigned int sequence; } xcb_input_change_pointer_device_cookie_t; /** Opcode for xcb_input_change_pointer_device. */ #define XCB_INPUT_CHANGE_POINTER_DEVICE 12 /** * @brief xcb_input_change_pointer_device_request_t **/ typedef struct xcb_input_change_pointer_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t x_axis; uint8_t y_axis; uint8_t device_id; uint8_t pad0; } xcb_input_change_pointer_device_request_t; /** * @brief xcb_input_change_pointer_device_reply_t **/ typedef struct xcb_input_change_pointer_device_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_change_pointer_device_reply_t; /** * @brief xcb_input_grab_device_cookie_t **/ typedef struct xcb_input_grab_device_cookie_t { unsigned int sequence; } xcb_input_grab_device_cookie_t; /** Opcode for xcb_input_grab_device. */ #define XCB_INPUT_GRAB_DEVICE 13 /** * @brief xcb_input_grab_device_request_t **/ typedef struct xcb_input_grab_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t grab_window; xcb_timestamp_t time; uint16_t num_classes; uint8_t this_device_mode; uint8_t other_device_mode; uint8_t owner_events; uint8_t device_id; uint8_t pad0[2]; } xcb_input_grab_device_request_t; /** * @brief xcb_input_grab_device_reply_t **/ typedef struct xcb_input_grab_device_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_grab_device_reply_t; /** Opcode for xcb_input_ungrab_device. */ #define XCB_INPUT_UNGRAB_DEVICE 14 /** * @brief xcb_input_ungrab_device_request_t **/ typedef struct xcb_input_ungrab_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_timestamp_t time; uint8_t device_id; uint8_t pad0[3]; } xcb_input_ungrab_device_request_t; typedef enum xcb_input_modifier_device_t { XCB_INPUT_MODIFIER_DEVICE_USE_X_KEYBOARD = 255 } xcb_input_modifier_device_t; /** Opcode for xcb_input_grab_device_key. */ #define XCB_INPUT_GRAB_DEVICE_KEY 15 /** * @brief xcb_input_grab_device_key_request_t **/ typedef struct xcb_input_grab_device_key_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t grab_window; uint16_t num_classes; uint16_t modifiers; uint8_t modifier_device; uint8_t grabbed_device; uint8_t key; uint8_t this_device_mode; uint8_t other_device_mode; uint8_t owner_events; uint8_t pad0[2]; } xcb_input_grab_device_key_request_t; /** Opcode for xcb_input_ungrab_device_key. */ #define XCB_INPUT_UNGRAB_DEVICE_KEY 16 /** * @brief xcb_input_ungrab_device_key_request_t **/ typedef struct xcb_input_ungrab_device_key_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t grabWindow; uint16_t modifiers; uint8_t modifier_device; uint8_t key; uint8_t grabbed_device; } xcb_input_ungrab_device_key_request_t; /** Opcode for xcb_input_grab_device_button. */ #define XCB_INPUT_GRAB_DEVICE_BUTTON 17 /** * @brief xcb_input_grab_device_button_request_t **/ typedef struct xcb_input_grab_device_button_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t grab_window; uint8_t grabbed_device; uint8_t modifier_device; uint16_t num_classes; uint16_t modifiers; uint8_t this_device_mode; uint8_t other_device_mode; uint8_t button; uint8_t owner_events; uint8_t pad0[2]; } xcb_input_grab_device_button_request_t; /** Opcode for xcb_input_ungrab_device_button. */ #define XCB_INPUT_UNGRAB_DEVICE_BUTTON 18 /** * @brief xcb_input_ungrab_device_button_request_t **/ typedef struct xcb_input_ungrab_device_button_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t grab_window; uint16_t modifiers; uint8_t modifier_device; uint8_t button; uint8_t grabbed_device; uint8_t pad0[3]; } xcb_input_ungrab_device_button_request_t; typedef enum xcb_input_device_input_mode_t { XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_THIS_DEVICE = 0, XCB_INPUT_DEVICE_INPUT_MODE_SYNC_THIS_DEVICE = 1, XCB_INPUT_DEVICE_INPUT_MODE_REPLAY_THIS_DEVICE = 2, XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_OTHER_DEVICES = 3, XCB_INPUT_DEVICE_INPUT_MODE_ASYNC_ALL = 4, XCB_INPUT_DEVICE_INPUT_MODE_SYNC_ALL = 5 } xcb_input_device_input_mode_t; /** Opcode for xcb_input_allow_device_events. */ #define XCB_INPUT_ALLOW_DEVICE_EVENTS 19 /** * @brief xcb_input_allow_device_events_request_t **/ typedef struct xcb_input_allow_device_events_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_timestamp_t time; uint8_t mode; uint8_t device_id; uint8_t pad0[2]; } xcb_input_allow_device_events_request_t; /** * @brief xcb_input_get_device_focus_cookie_t **/ typedef struct xcb_input_get_device_focus_cookie_t { unsigned int sequence; } xcb_input_get_device_focus_cookie_t; /** Opcode for xcb_input_get_device_focus. */ #define XCB_INPUT_GET_DEVICE_FOCUS 20 /** * @brief xcb_input_get_device_focus_request_t **/ typedef struct xcb_input_get_device_focus_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_get_device_focus_request_t; /** * @brief xcb_input_get_device_focus_reply_t **/ typedef struct xcb_input_get_device_focus_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; xcb_window_t focus; xcb_timestamp_t time; uint8_t revert_to; uint8_t pad0[15]; } xcb_input_get_device_focus_reply_t; /** Opcode for xcb_input_set_device_focus. */ #define XCB_INPUT_SET_DEVICE_FOCUS 21 /** * @brief xcb_input_set_device_focus_request_t **/ typedef struct xcb_input_set_device_focus_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t focus; xcb_timestamp_t time; uint8_t revert_to; uint8_t device_id; uint8_t pad0[2]; } xcb_input_set_device_focus_request_t; typedef enum xcb_input_feedback_class_t { XCB_INPUT_FEEDBACK_CLASS_KEYBOARD = 0, XCB_INPUT_FEEDBACK_CLASS_POINTER = 1, XCB_INPUT_FEEDBACK_CLASS_STRING = 2, XCB_INPUT_FEEDBACK_CLASS_INTEGER = 3, XCB_INPUT_FEEDBACK_CLASS_LED = 4, XCB_INPUT_FEEDBACK_CLASS_BELL = 5 } xcb_input_feedback_class_t; /** * @brief xcb_input_kbd_feedback_state_t **/ typedef struct xcb_input_kbd_feedback_state_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint16_t pitch; uint16_t duration; uint32_t led_mask; uint32_t led_values; uint8_t global_auto_repeat; uint8_t click; uint8_t percent; uint8_t pad0; uint8_t auto_repeats[32]; } xcb_input_kbd_feedback_state_t; /** * @brief xcb_input_kbd_feedback_state_iterator_t **/ typedef struct xcb_input_kbd_feedback_state_iterator_t { xcb_input_kbd_feedback_state_t *data; int rem; int index; } xcb_input_kbd_feedback_state_iterator_t; /** * @brief xcb_input_ptr_feedback_state_t **/ typedef struct xcb_input_ptr_feedback_state_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint8_t pad0[2]; uint16_t accel_num; uint16_t accel_denom; uint16_t threshold; } xcb_input_ptr_feedback_state_t; /** * @brief xcb_input_ptr_feedback_state_iterator_t **/ typedef struct xcb_input_ptr_feedback_state_iterator_t { xcb_input_ptr_feedback_state_t *data; int rem; int index; } xcb_input_ptr_feedback_state_iterator_t; /** * @brief xcb_input_integer_feedback_state_t **/ typedef struct xcb_input_integer_feedback_state_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint32_t resolution; int32_t min_value; int32_t max_value; } xcb_input_integer_feedback_state_t; /** * @brief xcb_input_integer_feedback_state_iterator_t **/ typedef struct xcb_input_integer_feedback_state_iterator_t { xcb_input_integer_feedback_state_t *data; int rem; int index; } xcb_input_integer_feedback_state_iterator_t; /** * @brief xcb_input_string_feedback_state_t **/ typedef struct xcb_input_string_feedback_state_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint16_t max_symbols; uint16_t num_keysyms; } xcb_input_string_feedback_state_t; /** * @brief xcb_input_string_feedback_state_iterator_t **/ typedef struct xcb_input_string_feedback_state_iterator_t { xcb_input_string_feedback_state_t *data; int rem; int index; } xcb_input_string_feedback_state_iterator_t; /** * @brief xcb_input_bell_feedback_state_t **/ typedef struct xcb_input_bell_feedback_state_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint8_t percent; uint8_t pad0[3]; uint16_t pitch; uint16_t duration; } xcb_input_bell_feedback_state_t; /** * @brief xcb_input_bell_feedback_state_iterator_t **/ typedef struct xcb_input_bell_feedback_state_iterator_t { xcb_input_bell_feedback_state_t *data; int rem; int index; } xcb_input_bell_feedback_state_iterator_t; /** * @brief xcb_input_led_feedback_state_t **/ typedef struct xcb_input_led_feedback_state_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint32_t led_mask; uint32_t led_values; } xcb_input_led_feedback_state_t; /** * @brief xcb_input_led_feedback_state_iterator_t **/ typedef struct xcb_input_led_feedback_state_iterator_t { xcb_input_led_feedback_state_t *data; int rem; int index; } xcb_input_led_feedback_state_iterator_t; /** * @brief xcb_input_feedback_state_data_t **/ typedef struct xcb_input_feedback_state_data_t { struct { uint16_t pitch; uint16_t duration; uint32_t led_mask; uint32_t led_values; uint8_t global_auto_repeat; uint8_t click; uint8_t percent; uint8_t pad0; uint8_t auto_repeats[32]; } keyboard; struct { uint8_t pad1[2]; uint16_t accel_num; uint16_t accel_denom; uint16_t threshold; } pointer; struct { uint16_t max_symbols; uint16_t num_keysyms; xcb_keysym_t *keysyms; } string; struct { uint32_t resolution; int32_t min_value; int32_t max_value; } integer; struct { uint32_t led_mask; uint32_t led_values; } led; struct { uint8_t percent; uint8_t pad2[3]; uint16_t pitch; uint16_t duration; } bell; } xcb_input_feedback_state_data_t; /** * @brief xcb_input_feedback_state_t **/ typedef struct xcb_input_feedback_state_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; } xcb_input_feedback_state_t; void * xcb_input_feedback_state_data (const xcb_input_feedback_state_t *R); /** * @brief xcb_input_feedback_state_iterator_t **/ typedef struct xcb_input_feedback_state_iterator_t { xcb_input_feedback_state_t *data; int rem; int index; } xcb_input_feedback_state_iterator_t; /** * @brief xcb_input_get_feedback_control_cookie_t **/ typedef struct xcb_input_get_feedback_control_cookie_t { unsigned int sequence; } xcb_input_get_feedback_control_cookie_t; /** Opcode for xcb_input_get_feedback_control. */ #define XCB_INPUT_GET_FEEDBACK_CONTROL 22 /** * @brief xcb_input_get_feedback_control_request_t **/ typedef struct xcb_input_get_feedback_control_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_get_feedback_control_request_t; /** * @brief xcb_input_get_feedback_control_reply_t **/ typedef struct xcb_input_get_feedback_control_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint16_t num_feedbacks; uint8_t pad0[22]; } xcb_input_get_feedback_control_reply_t; /** * @brief xcb_input_kbd_feedback_ctl_t **/ typedef struct xcb_input_kbd_feedback_ctl_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; xcb_input_key_code_t key; uint8_t auto_repeat_mode; int8_t key_click_percent; int8_t bell_percent; int16_t bell_pitch; int16_t bell_duration; uint32_t led_mask; uint32_t led_values; } xcb_input_kbd_feedback_ctl_t; /** * @brief xcb_input_kbd_feedback_ctl_iterator_t **/ typedef struct xcb_input_kbd_feedback_ctl_iterator_t { xcb_input_kbd_feedback_ctl_t *data; int rem; int index; } xcb_input_kbd_feedback_ctl_iterator_t; /** * @brief xcb_input_ptr_feedback_ctl_t **/ typedef struct xcb_input_ptr_feedback_ctl_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint8_t pad0[2]; int16_t num; int16_t denom; int16_t threshold; } xcb_input_ptr_feedback_ctl_t; /** * @brief xcb_input_ptr_feedback_ctl_iterator_t **/ typedef struct xcb_input_ptr_feedback_ctl_iterator_t { xcb_input_ptr_feedback_ctl_t *data; int rem; int index; } xcb_input_ptr_feedback_ctl_iterator_t; /** * @brief xcb_input_integer_feedback_ctl_t **/ typedef struct xcb_input_integer_feedback_ctl_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; int32_t int_to_display; } xcb_input_integer_feedback_ctl_t; /** * @brief xcb_input_integer_feedback_ctl_iterator_t **/ typedef struct xcb_input_integer_feedback_ctl_iterator_t { xcb_input_integer_feedback_ctl_t *data; int rem; int index; } xcb_input_integer_feedback_ctl_iterator_t; /** * @brief xcb_input_string_feedback_ctl_t **/ typedef struct xcb_input_string_feedback_ctl_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint8_t pad0[2]; uint16_t num_keysyms; } xcb_input_string_feedback_ctl_t; /** * @brief xcb_input_string_feedback_ctl_iterator_t **/ typedef struct xcb_input_string_feedback_ctl_iterator_t { xcb_input_string_feedback_ctl_t *data; int rem; int index; } xcb_input_string_feedback_ctl_iterator_t; /** * @brief xcb_input_bell_feedback_ctl_t **/ typedef struct xcb_input_bell_feedback_ctl_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; int8_t percent; uint8_t pad0[3]; int16_t pitch; int16_t duration; } xcb_input_bell_feedback_ctl_t; /** * @brief xcb_input_bell_feedback_ctl_iterator_t **/ typedef struct xcb_input_bell_feedback_ctl_iterator_t { xcb_input_bell_feedback_ctl_t *data; int rem; int index; } xcb_input_bell_feedback_ctl_iterator_t; /** * @brief xcb_input_led_feedback_ctl_t **/ typedef struct xcb_input_led_feedback_ctl_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; uint32_t led_mask; uint32_t led_values; } xcb_input_led_feedback_ctl_t; /** * @brief xcb_input_led_feedback_ctl_iterator_t **/ typedef struct xcb_input_led_feedback_ctl_iterator_t { xcb_input_led_feedback_ctl_t *data; int rem; int index; } xcb_input_led_feedback_ctl_iterator_t; /** * @brief xcb_input_feedback_ctl_data_t **/ typedef struct xcb_input_feedback_ctl_data_t { struct { xcb_input_key_code_t key; uint8_t auto_repeat_mode; int8_t key_click_percent; int8_t bell_percent; int16_t bell_pitch; int16_t bell_duration; uint32_t led_mask; uint32_t led_values; } keyboard; struct { uint8_t pad0[2]; int16_t num; int16_t denom; int16_t threshold; } pointer; struct { uint8_t pad1[2]; uint16_t num_keysyms; xcb_keysym_t *keysyms; } string; struct { int32_t int_to_display; } integer; struct { uint32_t led_mask; uint32_t led_values; } led; struct { int8_t percent; uint8_t pad2[3]; int16_t pitch; int16_t duration; } bell; } xcb_input_feedback_ctl_data_t; /** * @brief xcb_input_feedback_ctl_t **/ typedef struct xcb_input_feedback_ctl_t { uint8_t class_id; uint8_t feedback_id; uint16_t len; } xcb_input_feedback_ctl_t; void * xcb_input_feedback_ctl_data (const xcb_input_feedback_ctl_t *R); /** * @brief xcb_input_feedback_ctl_iterator_t **/ typedef struct xcb_input_feedback_ctl_iterator_t { xcb_input_feedback_ctl_t *data; int rem; int index; } xcb_input_feedback_ctl_iterator_t; typedef enum xcb_input_change_feedback_control_mask_t { XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_KEY_CLICK_PERCENT = 1, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_PERCENT = 2, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_PITCH = 4, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_DURATION = 8, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_LED = 16, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_LED_MODE = 32, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_KEY = 64, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_AUTO_REPEAT_MODE = 128, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_STRING = 1, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_INTEGER = 1, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_ACCEL_NUM = 1, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_ACCEL_DENOM = 2, XCB_INPUT_CHANGE_FEEDBACK_CONTROL_MASK_THRESHOLD = 4 } xcb_input_change_feedback_control_mask_t; /** Opcode for xcb_input_change_feedback_control. */ #define XCB_INPUT_CHANGE_FEEDBACK_CONTROL 23 /** * @brief xcb_input_change_feedback_control_request_t **/ typedef struct xcb_input_change_feedback_control_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t mask; uint8_t device_id; uint8_t feedback_id; uint8_t pad0[2]; } xcb_input_change_feedback_control_request_t; /** * @brief xcb_input_get_device_key_mapping_cookie_t **/ typedef struct xcb_input_get_device_key_mapping_cookie_t { unsigned int sequence; } xcb_input_get_device_key_mapping_cookie_t; /** Opcode for xcb_input_get_device_key_mapping. */ #define XCB_INPUT_GET_DEVICE_KEY_MAPPING 24 /** * @brief xcb_input_get_device_key_mapping_request_t **/ typedef struct xcb_input_get_device_key_mapping_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; xcb_input_key_code_t first_keycode; uint8_t count; uint8_t pad0; } xcb_input_get_device_key_mapping_request_t; /** * @brief xcb_input_get_device_key_mapping_reply_t **/ typedef struct xcb_input_get_device_key_mapping_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t keysyms_per_keycode; uint8_t pad0[23]; } xcb_input_get_device_key_mapping_reply_t; /** Opcode for xcb_input_change_device_key_mapping. */ #define XCB_INPUT_CHANGE_DEVICE_KEY_MAPPING 25 /** * @brief xcb_input_change_device_key_mapping_request_t **/ typedef struct xcb_input_change_device_key_mapping_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; xcb_input_key_code_t first_keycode; uint8_t keysyms_per_keycode; uint8_t keycode_count; } xcb_input_change_device_key_mapping_request_t; /** * @brief xcb_input_get_device_modifier_mapping_cookie_t **/ typedef struct xcb_input_get_device_modifier_mapping_cookie_t { unsigned int sequence; } xcb_input_get_device_modifier_mapping_cookie_t; /** Opcode for xcb_input_get_device_modifier_mapping. */ #define XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING 26 /** * @brief xcb_input_get_device_modifier_mapping_request_t **/ typedef struct xcb_input_get_device_modifier_mapping_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_get_device_modifier_mapping_request_t; /** * @brief xcb_input_get_device_modifier_mapping_reply_t **/ typedef struct xcb_input_get_device_modifier_mapping_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t keycodes_per_modifier; uint8_t pad0[23]; } xcb_input_get_device_modifier_mapping_reply_t; /** * @brief xcb_input_set_device_modifier_mapping_cookie_t **/ typedef struct xcb_input_set_device_modifier_mapping_cookie_t { unsigned int sequence; } xcb_input_set_device_modifier_mapping_cookie_t; /** Opcode for xcb_input_set_device_modifier_mapping. */ #define XCB_INPUT_SET_DEVICE_MODIFIER_MAPPING 27 /** * @brief xcb_input_set_device_modifier_mapping_request_t **/ typedef struct xcb_input_set_device_modifier_mapping_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t keycodes_per_modifier; uint8_t pad0[2]; } xcb_input_set_device_modifier_mapping_request_t; /** * @brief xcb_input_set_device_modifier_mapping_reply_t **/ typedef struct xcb_input_set_device_modifier_mapping_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_set_device_modifier_mapping_reply_t; /** * @brief xcb_input_get_device_button_mapping_cookie_t **/ typedef struct xcb_input_get_device_button_mapping_cookie_t { unsigned int sequence; } xcb_input_get_device_button_mapping_cookie_t; /** Opcode for xcb_input_get_device_button_mapping. */ #define XCB_INPUT_GET_DEVICE_BUTTON_MAPPING 28 /** * @brief xcb_input_get_device_button_mapping_request_t **/ typedef struct xcb_input_get_device_button_mapping_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_get_device_button_mapping_request_t; /** * @brief xcb_input_get_device_button_mapping_reply_t **/ typedef struct xcb_input_get_device_button_mapping_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t map_size; uint8_t pad0[23]; } xcb_input_get_device_button_mapping_reply_t; /** * @brief xcb_input_set_device_button_mapping_cookie_t **/ typedef struct xcb_input_set_device_button_mapping_cookie_t { unsigned int sequence; } xcb_input_set_device_button_mapping_cookie_t; /** Opcode for xcb_input_set_device_button_mapping. */ #define XCB_INPUT_SET_DEVICE_BUTTON_MAPPING 29 /** * @brief xcb_input_set_device_button_mapping_request_t **/ typedef struct xcb_input_set_device_button_mapping_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t map_size; uint8_t pad0[2]; } xcb_input_set_device_button_mapping_request_t; /** * @brief xcb_input_set_device_button_mapping_reply_t **/ typedef struct xcb_input_set_device_button_mapping_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_set_device_button_mapping_reply_t; /** * @brief xcb_input_key_state_t **/ typedef struct xcb_input_key_state_t { uint8_t class_id; uint8_t len; uint8_t num_keys; uint8_t pad0; uint8_t keys[32]; } xcb_input_key_state_t; /** * @brief xcb_input_key_state_iterator_t **/ typedef struct xcb_input_key_state_iterator_t { xcb_input_key_state_t *data; int rem; int index; } xcb_input_key_state_iterator_t; /** * @brief xcb_input_button_state_t **/ typedef struct xcb_input_button_state_t { uint8_t class_id; uint8_t len; uint8_t num_buttons; uint8_t pad0; uint8_t buttons[32]; } xcb_input_button_state_t; /** * @brief xcb_input_button_state_iterator_t **/ typedef struct xcb_input_button_state_iterator_t { xcb_input_button_state_t *data; int rem; int index; } xcb_input_button_state_iterator_t; typedef enum xcb_input_valuator_state_mode_mask_t { XCB_INPUT_VALUATOR_STATE_MODE_MASK_DEVICE_MODE_ABSOLUTE = 1, XCB_INPUT_VALUATOR_STATE_MODE_MASK_OUT_OF_PROXIMITY = 2 } xcb_input_valuator_state_mode_mask_t; /** * @brief xcb_input_valuator_state_t **/ typedef struct xcb_input_valuator_state_t { uint8_t class_id; uint8_t len; uint8_t num_valuators; uint8_t mode; } xcb_input_valuator_state_t; /** * @brief xcb_input_valuator_state_iterator_t **/ typedef struct xcb_input_valuator_state_iterator_t { xcb_input_valuator_state_t *data; int rem; int index; } xcb_input_valuator_state_iterator_t; /** * @brief xcb_input_input_state_data_t **/ typedef struct xcb_input_input_state_data_t { struct { uint8_t num_keys; uint8_t pad0; uint8_t keys[32]; } key; struct { uint8_t num_buttons; uint8_t pad1; uint8_t buttons[32]; } button; struct { uint8_t num_valuators; uint8_t mode; int32_t *valuators; } valuator; } xcb_input_input_state_data_t; /** * @brief xcb_input_input_state_t **/ typedef struct xcb_input_input_state_t { uint8_t class_id; uint8_t len; } xcb_input_input_state_t; void * xcb_input_input_state_data (const xcb_input_input_state_t *R); /** * @brief xcb_input_input_state_iterator_t **/ typedef struct xcb_input_input_state_iterator_t { xcb_input_input_state_t *data; int rem; int index; } xcb_input_input_state_iterator_t; /** * @brief xcb_input_query_device_state_cookie_t **/ typedef struct xcb_input_query_device_state_cookie_t { unsigned int sequence; } xcb_input_query_device_state_cookie_t; /** Opcode for xcb_input_query_device_state. */ #define XCB_INPUT_QUERY_DEVICE_STATE 30 /** * @brief xcb_input_query_device_state_request_t **/ typedef struct xcb_input_query_device_state_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_query_device_state_request_t; /** * @brief xcb_input_query_device_state_reply_t **/ typedef struct xcb_input_query_device_state_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t num_classes; uint8_t pad0[23]; } xcb_input_query_device_state_reply_t; /** Opcode for xcb_input_device_bell. */ #define XCB_INPUT_DEVICE_BELL 32 /** * @brief xcb_input_device_bell_request_t **/ typedef struct xcb_input_device_bell_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t feedback_id; uint8_t feedback_class; int8_t percent; } xcb_input_device_bell_request_t; /** * @brief xcb_input_set_device_valuators_cookie_t **/ typedef struct xcb_input_set_device_valuators_cookie_t { unsigned int sequence; } xcb_input_set_device_valuators_cookie_t; /** Opcode for xcb_input_set_device_valuators. */ #define XCB_INPUT_SET_DEVICE_VALUATORS 33 /** * @brief xcb_input_set_device_valuators_request_t **/ typedef struct xcb_input_set_device_valuators_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t first_valuator; uint8_t num_valuators; uint8_t pad0; } xcb_input_set_device_valuators_request_t; /** * @brief xcb_input_set_device_valuators_reply_t **/ typedef struct xcb_input_set_device_valuators_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_set_device_valuators_reply_t; typedef enum xcb_input_device_control_t { XCB_INPUT_DEVICE_CONTROL_RESOLUTION = 1, XCB_INPUT_DEVICE_CONTROL_ABS_CALIB = 2, XCB_INPUT_DEVICE_CONTROL_CORE = 3, XCB_INPUT_DEVICE_CONTROL_ENABLE = 4, XCB_INPUT_DEVICE_CONTROL_ABS_AREA = 5 } xcb_input_device_control_t; /** * @brief xcb_input_device_resolution_state_t **/ typedef struct xcb_input_device_resolution_state_t { uint16_t control_id; uint16_t len; uint32_t num_valuators; } xcb_input_device_resolution_state_t; /** * @brief xcb_input_device_resolution_state_iterator_t **/ typedef struct xcb_input_device_resolution_state_iterator_t { xcb_input_device_resolution_state_t *data; int rem; int index; } xcb_input_device_resolution_state_iterator_t; /** * @brief xcb_input_device_abs_calib_state_t **/ typedef struct xcb_input_device_abs_calib_state_t { uint16_t control_id; uint16_t len; int32_t min_x; int32_t max_x; int32_t min_y; int32_t max_y; uint32_t flip_x; uint32_t flip_y; uint32_t rotation; uint32_t button_threshold; } xcb_input_device_abs_calib_state_t; /** * @brief xcb_input_device_abs_calib_state_iterator_t **/ typedef struct xcb_input_device_abs_calib_state_iterator_t { xcb_input_device_abs_calib_state_t *data; int rem; int index; } xcb_input_device_abs_calib_state_iterator_t; /** * @brief xcb_input_device_abs_area_state_t **/ typedef struct xcb_input_device_abs_area_state_t { uint16_t control_id; uint16_t len; uint32_t offset_x; uint32_t offset_y; uint32_t width; uint32_t height; uint32_t screen; uint32_t following; } xcb_input_device_abs_area_state_t; /** * @brief xcb_input_device_abs_area_state_iterator_t **/ typedef struct xcb_input_device_abs_area_state_iterator_t { xcb_input_device_abs_area_state_t *data; int rem; int index; } xcb_input_device_abs_area_state_iterator_t; /** * @brief xcb_input_device_core_state_t **/ typedef struct xcb_input_device_core_state_t { uint16_t control_id; uint16_t len; uint8_t status; uint8_t iscore; uint8_t pad0[2]; } xcb_input_device_core_state_t; /** * @brief xcb_input_device_core_state_iterator_t **/ typedef struct xcb_input_device_core_state_iterator_t { xcb_input_device_core_state_t *data; int rem; int index; } xcb_input_device_core_state_iterator_t; /** * @brief xcb_input_device_enable_state_t **/ typedef struct xcb_input_device_enable_state_t { uint16_t control_id; uint16_t len; uint8_t enable; uint8_t pad0[3]; } xcb_input_device_enable_state_t; /** * @brief xcb_input_device_enable_state_iterator_t **/ typedef struct xcb_input_device_enable_state_iterator_t { xcb_input_device_enable_state_t *data; int rem; int index; } xcb_input_device_enable_state_iterator_t; /** * @brief xcb_input_device_state_data_t **/ typedef struct xcb_input_device_state_data_t { struct { uint32_t num_valuators; uint32_t *resolution_values; uint32_t *resolution_min; uint32_t *resolution_max; } resolution; struct { int32_t min_x; int32_t max_x; int32_t min_y; int32_t max_y; uint32_t flip_x; uint32_t flip_y; uint32_t rotation; uint32_t button_threshold; } abs_calib; struct { uint8_t status; uint8_t iscore; uint8_t pad0[2]; } core; struct { uint8_t enable; uint8_t pad1[3]; } enable; struct { uint32_t offset_x; uint32_t offset_y; uint32_t width; uint32_t height; uint32_t screen; uint32_t following; } abs_area; } xcb_input_device_state_data_t; /** * @brief xcb_input_device_state_t **/ typedef struct xcb_input_device_state_t { uint16_t control_id; uint16_t len; } xcb_input_device_state_t; void * xcb_input_device_state_data (const xcb_input_device_state_t *R); /** * @brief xcb_input_device_state_iterator_t **/ typedef struct xcb_input_device_state_iterator_t { xcb_input_device_state_t *data; int rem; int index; } xcb_input_device_state_iterator_t; /** * @brief xcb_input_get_device_control_cookie_t **/ typedef struct xcb_input_get_device_control_cookie_t { unsigned int sequence; } xcb_input_get_device_control_cookie_t; /** Opcode for xcb_input_get_device_control. */ #define XCB_INPUT_GET_DEVICE_CONTROL 34 /** * @brief xcb_input_get_device_control_request_t **/ typedef struct xcb_input_get_device_control_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t control_id; uint8_t device_id; uint8_t pad0; } xcb_input_get_device_control_request_t; /** * @brief xcb_input_get_device_control_reply_t **/ typedef struct xcb_input_get_device_control_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_get_device_control_reply_t; /** * @brief xcb_input_device_resolution_ctl_t **/ typedef struct xcb_input_device_resolution_ctl_t { uint16_t control_id; uint16_t len; uint8_t first_valuator; uint8_t num_valuators; uint8_t pad0[2]; } xcb_input_device_resolution_ctl_t; /** * @brief xcb_input_device_resolution_ctl_iterator_t **/ typedef struct xcb_input_device_resolution_ctl_iterator_t { xcb_input_device_resolution_ctl_t *data; int rem; int index; } xcb_input_device_resolution_ctl_iterator_t; /** * @brief xcb_input_device_abs_calib_ctl_t **/ typedef struct xcb_input_device_abs_calib_ctl_t { uint16_t control_id; uint16_t len; int32_t min_x; int32_t max_x; int32_t min_y; int32_t max_y; uint32_t flip_x; uint32_t flip_y; uint32_t rotation; uint32_t button_threshold; } xcb_input_device_abs_calib_ctl_t; /** * @brief xcb_input_device_abs_calib_ctl_iterator_t **/ typedef struct xcb_input_device_abs_calib_ctl_iterator_t { xcb_input_device_abs_calib_ctl_t *data; int rem; int index; } xcb_input_device_abs_calib_ctl_iterator_t; /** * @brief xcb_input_device_abs_area_ctrl_t **/ typedef struct xcb_input_device_abs_area_ctrl_t { uint16_t control_id; uint16_t len; uint32_t offset_x; uint32_t offset_y; int32_t width; int32_t height; int32_t screen; uint32_t following; } xcb_input_device_abs_area_ctrl_t; /** * @brief xcb_input_device_abs_area_ctrl_iterator_t **/ typedef struct xcb_input_device_abs_area_ctrl_iterator_t { xcb_input_device_abs_area_ctrl_t *data; int rem; int index; } xcb_input_device_abs_area_ctrl_iterator_t; /** * @brief xcb_input_device_core_ctrl_t **/ typedef struct xcb_input_device_core_ctrl_t { uint16_t control_id; uint16_t len; uint8_t status; uint8_t pad0[3]; } xcb_input_device_core_ctrl_t; /** * @brief xcb_input_device_core_ctrl_iterator_t **/ typedef struct xcb_input_device_core_ctrl_iterator_t { xcb_input_device_core_ctrl_t *data; int rem; int index; } xcb_input_device_core_ctrl_iterator_t; /** * @brief xcb_input_device_enable_ctrl_t **/ typedef struct xcb_input_device_enable_ctrl_t { uint16_t control_id; uint16_t len; uint8_t enable; uint8_t pad0[3]; } xcb_input_device_enable_ctrl_t; /** * @brief xcb_input_device_enable_ctrl_iterator_t **/ typedef struct xcb_input_device_enable_ctrl_iterator_t { xcb_input_device_enable_ctrl_t *data; int rem; int index; } xcb_input_device_enable_ctrl_iterator_t; /** * @brief xcb_input_device_ctl_data_t **/ typedef struct xcb_input_device_ctl_data_t { struct { uint8_t first_valuator; uint8_t num_valuators; uint8_t pad0[2]; uint32_t *resolution_values; } resolution; struct { int32_t min_x; int32_t max_x; int32_t min_y; int32_t max_y; uint32_t flip_x; uint32_t flip_y; uint32_t rotation; uint32_t button_threshold; } abs_calib; struct { uint8_t status; uint8_t pad1[3]; } core; struct { uint8_t enable; uint8_t pad2[3]; } enable; struct { uint32_t offset_x; uint32_t offset_y; int32_t width; int32_t height; int32_t screen; uint32_t following; } abs_area; } xcb_input_device_ctl_data_t; /** * @brief xcb_input_device_ctl_t **/ typedef struct xcb_input_device_ctl_t { uint16_t control_id; uint16_t len; } xcb_input_device_ctl_t; void * xcb_input_device_ctl_data (const xcb_input_device_ctl_t *R); /** * @brief xcb_input_device_ctl_iterator_t **/ typedef struct xcb_input_device_ctl_iterator_t { xcb_input_device_ctl_t *data; int rem; int index; } xcb_input_device_ctl_iterator_t; /** * @brief xcb_input_change_device_control_cookie_t **/ typedef struct xcb_input_change_device_control_cookie_t { unsigned int sequence; } xcb_input_change_device_control_cookie_t; /** Opcode for xcb_input_change_device_control. */ #define XCB_INPUT_CHANGE_DEVICE_CONTROL 35 /** * @brief xcb_input_change_device_control_request_t **/ typedef struct xcb_input_change_device_control_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t control_id; uint8_t device_id; uint8_t pad0; } xcb_input_change_device_control_request_t; /** * @brief xcb_input_change_device_control_reply_t **/ typedef struct xcb_input_change_device_control_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad0[23]; } xcb_input_change_device_control_reply_t; /** * @brief xcb_input_list_device_properties_cookie_t **/ typedef struct xcb_input_list_device_properties_cookie_t { unsigned int sequence; } xcb_input_list_device_properties_cookie_t; /** Opcode for xcb_input_list_device_properties. */ #define XCB_INPUT_LIST_DEVICE_PROPERTIES 36 /** * @brief xcb_input_list_device_properties_request_t **/ typedef struct xcb_input_list_device_properties_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t device_id; uint8_t pad0[3]; } xcb_input_list_device_properties_request_t; /** * @brief xcb_input_list_device_properties_reply_t **/ typedef struct xcb_input_list_device_properties_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; uint16_t num_atoms; uint8_t pad0[22]; } xcb_input_list_device_properties_reply_t; typedef enum xcb_input_property_format_t { XCB_INPUT_PROPERTY_FORMAT_8_BITS = 8, XCB_INPUT_PROPERTY_FORMAT_16_BITS = 16, XCB_INPUT_PROPERTY_FORMAT_32_BITS = 32 } xcb_input_property_format_t; /** * @brief xcb_input_change_device_property_items_t **/ typedef struct xcb_input_change_device_property_items_t { uint8_t *data8; uint16_t *data16; uint32_t *data32; } xcb_input_change_device_property_items_t; /** Opcode for xcb_input_change_device_property. */ #define XCB_INPUT_CHANGE_DEVICE_PROPERTY 37 /** * @brief xcb_input_change_device_property_request_t **/ typedef struct xcb_input_change_device_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_atom_t property; xcb_atom_t type; uint8_t device_id; uint8_t format; uint8_t mode; uint8_t pad0; uint32_t num_items; } xcb_input_change_device_property_request_t; /** Opcode for xcb_input_delete_device_property. */ #define XCB_INPUT_DELETE_DEVICE_PROPERTY 38 /** * @brief xcb_input_delete_device_property_request_t **/ typedef struct xcb_input_delete_device_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_atom_t property; uint8_t device_id; uint8_t pad0[3]; } xcb_input_delete_device_property_request_t; /** * @brief xcb_input_get_device_property_cookie_t **/ typedef struct xcb_input_get_device_property_cookie_t { unsigned int sequence; } xcb_input_get_device_property_cookie_t; /** Opcode for xcb_input_get_device_property. */ #define XCB_INPUT_GET_DEVICE_PROPERTY 39 /** * @brief xcb_input_get_device_property_request_t **/ typedef struct xcb_input_get_device_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_atom_t property; xcb_atom_t type; uint32_t offset; uint32_t len; uint8_t device_id; uint8_t _delete; uint8_t pad0[2]; } xcb_input_get_device_property_request_t; /** * @brief xcb_input_get_device_property_items_t **/ typedef struct xcb_input_get_device_property_items_t { uint8_t *data8; uint16_t *data16; uint32_t *data32; } xcb_input_get_device_property_items_t; /** * @brief xcb_input_get_device_property_reply_t **/ typedef struct xcb_input_get_device_property_reply_t { uint8_t response_type; uint8_t xi_reply_type; uint16_t sequence; uint32_t length; xcb_atom_t type; uint32_t bytes_after; uint32_t num_items; uint8_t format; uint8_t device_id; uint8_t pad0[10]; } xcb_input_get_device_property_reply_t; typedef enum xcb_input_device_t { XCB_INPUT_DEVICE_ALL = 0, XCB_INPUT_DEVICE_ALL_MASTER = 1 } xcb_input_device_t; /** * @brief xcb_input_group_info_t **/ typedef struct xcb_input_group_info_t { uint8_t base; uint8_t latched; uint8_t locked; uint8_t effective; } xcb_input_group_info_t; /** * @brief xcb_input_group_info_iterator_t **/ typedef struct xcb_input_group_info_iterator_t { xcb_input_group_info_t *data; int rem; int index; } xcb_input_group_info_iterator_t; /** * @brief xcb_input_modifier_info_t **/ typedef struct xcb_input_modifier_info_t { uint32_t base; uint32_t latched; uint32_t locked; uint32_t effective; } xcb_input_modifier_info_t; /** * @brief xcb_input_modifier_info_iterator_t **/ typedef struct xcb_input_modifier_info_iterator_t { xcb_input_modifier_info_t *data; int rem; int index; } xcb_input_modifier_info_iterator_t; /** * @brief xcb_input_xi_query_pointer_cookie_t **/ typedef struct xcb_input_xi_query_pointer_cookie_t { unsigned int sequence; } xcb_input_xi_query_pointer_cookie_t; /** Opcode for xcb_input_xi_query_pointer. */ #define XCB_INPUT_XI_QUERY_POINTER 40 /** * @brief xcb_input_xi_query_pointer_request_t **/ typedef struct xcb_input_xi_query_pointer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_query_pointer_request_t; /** * @brief xcb_input_xi_query_pointer_reply_t **/ typedef struct xcb_input_xi_query_pointer_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_window_t root; xcb_window_t child; xcb_input_fp1616_t root_x; xcb_input_fp1616_t root_y; xcb_input_fp1616_t win_x; xcb_input_fp1616_t win_y; uint8_t same_screen; uint8_t pad1; uint16_t buttons_len; xcb_input_modifier_info_t mods; xcb_input_group_info_t group; } xcb_input_xi_query_pointer_reply_t; /** Opcode for xcb_input_xi_warp_pointer. */ #define XCB_INPUT_XI_WARP_POINTER 41 /** * @brief xcb_input_xi_warp_pointer_request_t **/ typedef struct xcb_input_xi_warp_pointer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t src_win; xcb_window_t dst_win; xcb_input_fp1616_t src_x; xcb_input_fp1616_t src_y; uint16_t src_width; uint16_t src_height; xcb_input_fp1616_t dst_x; xcb_input_fp1616_t dst_y; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_warp_pointer_request_t; /** Opcode for xcb_input_xi_change_cursor. */ #define XCB_INPUT_XI_CHANGE_CURSOR 42 /** * @brief xcb_input_xi_change_cursor_request_t **/ typedef struct xcb_input_xi_change_cursor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_cursor_t cursor; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_change_cursor_request_t; typedef enum xcb_input_hierarchy_change_type_t { XCB_INPUT_HIERARCHY_CHANGE_TYPE_ADD_MASTER = 1, XCB_INPUT_HIERARCHY_CHANGE_TYPE_REMOVE_MASTER = 2, XCB_INPUT_HIERARCHY_CHANGE_TYPE_ATTACH_SLAVE = 3, XCB_INPUT_HIERARCHY_CHANGE_TYPE_DETACH_SLAVE = 4 } xcb_input_hierarchy_change_type_t; typedef enum xcb_input_change_mode_t { XCB_INPUT_CHANGE_MODE_ATTACH = 1, XCB_INPUT_CHANGE_MODE_FLOAT = 2 } xcb_input_change_mode_t; /** * @brief xcb_input_add_master_t **/ typedef struct xcb_input_add_master_t { uint16_t type; uint16_t len; uint16_t name_len; uint8_t send_core; uint8_t enable; } xcb_input_add_master_t; /** * @brief xcb_input_add_master_iterator_t **/ typedef struct xcb_input_add_master_iterator_t { xcb_input_add_master_t *data; int rem; int index; } xcb_input_add_master_iterator_t; /** * @brief xcb_input_remove_master_t **/ typedef struct xcb_input_remove_master_t { uint16_t type; uint16_t len; xcb_input_device_id_t deviceid; uint8_t return_mode; uint8_t pad0; xcb_input_device_id_t return_pointer; xcb_input_device_id_t return_keyboard; } xcb_input_remove_master_t; /** * @brief xcb_input_remove_master_iterator_t **/ typedef struct xcb_input_remove_master_iterator_t { xcb_input_remove_master_t *data; int rem; int index; } xcb_input_remove_master_iterator_t; /** * @brief xcb_input_attach_slave_t **/ typedef struct xcb_input_attach_slave_t { uint16_t type; uint16_t len; xcb_input_device_id_t deviceid; xcb_input_device_id_t master; } xcb_input_attach_slave_t; /** * @brief xcb_input_attach_slave_iterator_t **/ typedef struct xcb_input_attach_slave_iterator_t { xcb_input_attach_slave_t *data; int rem; int index; } xcb_input_attach_slave_iterator_t; /** * @brief xcb_input_detach_slave_t **/ typedef struct xcb_input_detach_slave_t { uint16_t type; uint16_t len; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_detach_slave_t; /** * @brief xcb_input_detach_slave_iterator_t **/ typedef struct xcb_input_detach_slave_iterator_t { xcb_input_detach_slave_t *data; int rem; int index; } xcb_input_detach_slave_iterator_t; /** * @brief xcb_input_hierarchy_change_data_t **/ typedef struct xcb_input_hierarchy_change_data_t { struct { uint16_t name_len; uint8_t send_core; uint8_t enable; char *name; } add_master; struct { xcb_input_device_id_t deviceid; uint8_t return_mode; uint8_t pad1; xcb_input_device_id_t return_pointer; xcb_input_device_id_t return_keyboard; } remove_master; struct { xcb_input_device_id_t deviceid; xcb_input_device_id_t master; } attach_slave; struct { xcb_input_device_id_t deviceid; uint8_t pad2[2]; } detach_slave; } xcb_input_hierarchy_change_data_t; /** * @brief xcb_input_hierarchy_change_t **/ typedef struct xcb_input_hierarchy_change_t { uint16_t type; uint16_t len; } xcb_input_hierarchy_change_t; void * xcb_input_hierarchy_change_data (const xcb_input_hierarchy_change_t *R); /** * @brief xcb_input_hierarchy_change_iterator_t **/ typedef struct xcb_input_hierarchy_change_iterator_t { xcb_input_hierarchy_change_t *data; int rem; int index; } xcb_input_hierarchy_change_iterator_t; /** Opcode for xcb_input_xi_change_hierarchy. */ #define XCB_INPUT_XI_CHANGE_HIERARCHY 43 /** * @brief xcb_input_xi_change_hierarchy_request_t **/ typedef struct xcb_input_xi_change_hierarchy_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t num_changes; uint8_t pad0[3]; } xcb_input_xi_change_hierarchy_request_t; /** Opcode for xcb_input_xi_set_client_pointer. */ #define XCB_INPUT_XI_SET_CLIENT_POINTER 44 /** * @brief xcb_input_xi_set_client_pointer_request_t **/ typedef struct xcb_input_xi_set_client_pointer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_set_client_pointer_request_t; /** * @brief xcb_input_xi_get_client_pointer_cookie_t **/ typedef struct xcb_input_xi_get_client_pointer_cookie_t { unsigned int sequence; } xcb_input_xi_get_client_pointer_cookie_t; /** Opcode for xcb_input_xi_get_client_pointer. */ #define XCB_INPUT_XI_GET_CLIENT_POINTER 45 /** * @brief xcb_input_xi_get_client_pointer_request_t **/ typedef struct xcb_input_xi_get_client_pointer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_input_xi_get_client_pointer_request_t; /** * @brief xcb_input_xi_get_client_pointer_reply_t **/ typedef struct xcb_input_xi_get_client_pointer_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t set; uint8_t pad1; xcb_input_device_id_t deviceid; uint8_t pad2[20]; } xcb_input_xi_get_client_pointer_reply_t; typedef enum xcb_input_xi_event_mask_t { XCB_INPUT_XI_EVENT_MASK_DEVICE_CHANGED = 2, XCB_INPUT_XI_EVENT_MASK_KEY_PRESS = 4, XCB_INPUT_XI_EVENT_MASK_KEY_RELEASE = 8, XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS = 16, XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE = 32, XCB_INPUT_XI_EVENT_MASK_MOTION = 64, XCB_INPUT_XI_EVENT_MASK_ENTER = 128, XCB_INPUT_XI_EVENT_MASK_LEAVE = 256, XCB_INPUT_XI_EVENT_MASK_FOCUS_IN = 512, XCB_INPUT_XI_EVENT_MASK_FOCUS_OUT = 1024, XCB_INPUT_XI_EVENT_MASK_HIERARCHY = 2048, XCB_INPUT_XI_EVENT_MASK_PROPERTY = 4096, XCB_INPUT_XI_EVENT_MASK_RAW_KEY_PRESS = 8192, XCB_INPUT_XI_EVENT_MASK_RAW_KEY_RELEASE = 16384, XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_PRESS = 32768, XCB_INPUT_XI_EVENT_MASK_RAW_BUTTON_RELEASE = 65536, XCB_INPUT_XI_EVENT_MASK_RAW_MOTION = 131072, XCB_INPUT_XI_EVENT_MASK_TOUCH_BEGIN = 262144, XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE = 524288, XCB_INPUT_XI_EVENT_MASK_TOUCH_END = 1048576, XCB_INPUT_XI_EVENT_MASK_TOUCH_OWNERSHIP = 2097152, XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_BEGIN = 4194304, XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_UPDATE = 8388608, XCB_INPUT_XI_EVENT_MASK_RAW_TOUCH_END = 16777216, XCB_INPUT_XI_EVENT_MASK_BARRIER_HIT = 33554432, XCB_INPUT_XI_EVENT_MASK_BARRIER_LEAVE = 67108864 } xcb_input_xi_event_mask_t; /** * @brief xcb_input_event_mask_t **/ typedef struct xcb_input_event_mask_t { xcb_input_device_id_t deviceid; uint16_t mask_len; } xcb_input_event_mask_t; /** * @brief xcb_input_event_mask_iterator_t **/ typedef struct xcb_input_event_mask_iterator_t { xcb_input_event_mask_t *data; int rem; int index; } xcb_input_event_mask_iterator_t; /** Opcode for xcb_input_xi_select_events. */ #define XCB_INPUT_XI_SELECT_EVENTS 46 /** * @brief xcb_input_xi_select_events_request_t **/ typedef struct xcb_input_xi_select_events_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint16_t num_mask; uint8_t pad0[2]; } xcb_input_xi_select_events_request_t; /** * @brief xcb_input_xi_query_version_cookie_t **/ typedef struct xcb_input_xi_query_version_cookie_t { unsigned int sequence; } xcb_input_xi_query_version_cookie_t; /** Opcode for xcb_input_xi_query_version. */ #define XCB_INPUT_XI_QUERY_VERSION 47 /** * @brief xcb_input_xi_query_version_request_t **/ typedef struct xcb_input_xi_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t major_version; uint16_t minor_version; } xcb_input_xi_query_version_request_t; /** * @brief xcb_input_xi_query_version_reply_t **/ typedef struct xcb_input_xi_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t major_version; uint16_t minor_version; uint8_t pad1[20]; } xcb_input_xi_query_version_reply_t; typedef enum xcb_input_device_class_type_t { XCB_INPUT_DEVICE_CLASS_TYPE_KEY = 0, XCB_INPUT_DEVICE_CLASS_TYPE_BUTTON = 1, XCB_INPUT_DEVICE_CLASS_TYPE_VALUATOR = 2, XCB_INPUT_DEVICE_CLASS_TYPE_SCROLL = 3, XCB_INPUT_DEVICE_CLASS_TYPE_TOUCH = 8 } xcb_input_device_class_type_t; typedef enum xcb_input_device_type_t { XCB_INPUT_DEVICE_TYPE_MASTER_POINTER = 1, XCB_INPUT_DEVICE_TYPE_MASTER_KEYBOARD = 2, XCB_INPUT_DEVICE_TYPE_SLAVE_POINTER = 3, XCB_INPUT_DEVICE_TYPE_SLAVE_KEYBOARD = 4, XCB_INPUT_DEVICE_TYPE_FLOATING_SLAVE = 5 } xcb_input_device_type_t; typedef enum xcb_input_scroll_flags_t { XCB_INPUT_SCROLL_FLAGS_NO_EMULATION = 1, XCB_INPUT_SCROLL_FLAGS_PREFERRED = 2 } xcb_input_scroll_flags_t; typedef enum xcb_input_scroll_type_t { XCB_INPUT_SCROLL_TYPE_VERTICAL = 1, XCB_INPUT_SCROLL_TYPE_HORIZONTAL = 2 } xcb_input_scroll_type_t; typedef enum xcb_input_touch_mode_t { XCB_INPUT_TOUCH_MODE_DIRECT = 1, XCB_INPUT_TOUCH_MODE_DEPENDENT = 2 } xcb_input_touch_mode_t; /** * @brief xcb_input_button_class_t **/ typedef struct xcb_input_button_class_t { uint16_t type; uint16_t len; xcb_input_device_id_t sourceid; uint16_t num_buttons; } xcb_input_button_class_t; /** * @brief xcb_input_button_class_iterator_t **/ typedef struct xcb_input_button_class_iterator_t { xcb_input_button_class_t *data; int rem; int index; } xcb_input_button_class_iterator_t; /** * @brief xcb_input_key_class_t **/ typedef struct xcb_input_key_class_t { uint16_t type; uint16_t len; xcb_input_device_id_t sourceid; uint16_t num_keys; } xcb_input_key_class_t; /** * @brief xcb_input_key_class_iterator_t **/ typedef struct xcb_input_key_class_iterator_t { xcb_input_key_class_t *data; int rem; int index; } xcb_input_key_class_iterator_t; /** * @brief xcb_input_scroll_class_t **/ typedef struct xcb_input_scroll_class_t { uint16_t type; uint16_t len; xcb_input_device_id_t sourceid; uint16_t number; uint16_t scroll_type; uint8_t pad0[2]; uint32_t flags; xcb_input_fp3232_t increment; } xcb_input_scroll_class_t; /** * @brief xcb_input_scroll_class_iterator_t **/ typedef struct xcb_input_scroll_class_iterator_t { xcb_input_scroll_class_t *data; int rem; int index; } xcb_input_scroll_class_iterator_t; /** * @brief xcb_input_touch_class_t **/ typedef struct xcb_input_touch_class_t { uint16_t type; uint16_t len; xcb_input_device_id_t sourceid; uint8_t mode; uint8_t num_touches; } xcb_input_touch_class_t; /** * @brief xcb_input_touch_class_iterator_t **/ typedef struct xcb_input_touch_class_iterator_t { xcb_input_touch_class_t *data; int rem; int index; } xcb_input_touch_class_iterator_t; /** * @brief xcb_input_valuator_class_t **/ typedef struct xcb_input_valuator_class_t { uint16_t type; uint16_t len; xcb_input_device_id_t sourceid; uint16_t number; xcb_atom_t label; xcb_input_fp3232_t min; xcb_input_fp3232_t max; xcb_input_fp3232_t value; uint32_t resolution; uint8_t mode; uint8_t pad0[3]; } xcb_input_valuator_class_t; /** * @brief xcb_input_valuator_class_iterator_t **/ typedef struct xcb_input_valuator_class_iterator_t { xcb_input_valuator_class_t *data; int rem; int index; } xcb_input_valuator_class_iterator_t; /** * @brief xcb_input_device_class_data_t **/ typedef struct xcb_input_device_class_data_t { struct { uint16_t num_keys; uint32_t *keys; } key; struct { uint16_t num_buttons; uint32_t *state; xcb_atom_t *labels; } button; struct { uint16_t number; xcb_atom_t label; xcb_input_fp3232_t min; xcb_input_fp3232_t max; xcb_input_fp3232_t value; uint32_t resolution; uint8_t mode; uint8_t pad0[3]; } valuator; struct { uint16_t number; uint16_t scroll_type; uint8_t pad1[2]; uint32_t flags; xcb_input_fp3232_t increment; } scroll; struct { uint8_t mode; uint8_t num_touches; } touch; } xcb_input_device_class_data_t; /** * @brief xcb_input_device_class_t **/ typedef struct xcb_input_device_class_t { uint16_t type; uint16_t len; xcb_input_device_id_t sourceid; } xcb_input_device_class_t; void * xcb_input_device_class_data (const xcb_input_device_class_t *R); /** * @brief xcb_input_device_class_iterator_t **/ typedef struct xcb_input_device_class_iterator_t { xcb_input_device_class_t *data; int rem; int index; } xcb_input_device_class_iterator_t; /** * @brief xcb_input_xi_device_info_t **/ typedef struct xcb_input_xi_device_info_t { xcb_input_device_id_t deviceid; uint16_t type; xcb_input_device_id_t attachment; uint16_t num_classes; uint16_t name_len; uint8_t enabled; uint8_t pad0; } xcb_input_xi_device_info_t; /** * @brief xcb_input_xi_device_info_iterator_t **/ typedef struct xcb_input_xi_device_info_iterator_t { xcb_input_xi_device_info_t *data; int rem; int index; } xcb_input_xi_device_info_iterator_t; /** * @brief xcb_input_xi_query_device_cookie_t **/ typedef struct xcb_input_xi_query_device_cookie_t { unsigned int sequence; } xcb_input_xi_query_device_cookie_t; /** Opcode for xcb_input_xi_query_device. */ #define XCB_INPUT_XI_QUERY_DEVICE 48 /** * @brief xcb_input_xi_query_device_request_t **/ typedef struct xcb_input_xi_query_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_query_device_request_t; /** * @brief xcb_input_xi_query_device_reply_t **/ typedef struct xcb_input_xi_query_device_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_infos; uint8_t pad1[22]; } xcb_input_xi_query_device_reply_t; /** Opcode for xcb_input_xi_set_focus. */ #define XCB_INPUT_XI_SET_FOCUS 49 /** * @brief xcb_input_xi_set_focus_request_t **/ typedef struct xcb_input_xi_set_focus_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_timestamp_t time; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_set_focus_request_t; /** * @brief xcb_input_xi_get_focus_cookie_t **/ typedef struct xcb_input_xi_get_focus_cookie_t { unsigned int sequence; } xcb_input_xi_get_focus_cookie_t; /** Opcode for xcb_input_xi_get_focus. */ #define XCB_INPUT_XI_GET_FOCUS 50 /** * @brief xcb_input_xi_get_focus_request_t **/ typedef struct xcb_input_xi_get_focus_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_get_focus_request_t; /** * @brief xcb_input_xi_get_focus_reply_t **/ typedef struct xcb_input_xi_get_focus_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_window_t focus; uint8_t pad1[20]; } xcb_input_xi_get_focus_reply_t; typedef enum xcb_input_grab_owner_t { XCB_INPUT_GRAB_OWNER_NO_OWNER = 0, XCB_INPUT_GRAB_OWNER_OWNER = 1 } xcb_input_grab_owner_t; /** * @brief xcb_input_xi_grab_device_cookie_t **/ typedef struct xcb_input_xi_grab_device_cookie_t { unsigned int sequence; } xcb_input_xi_grab_device_cookie_t; /** Opcode for xcb_input_xi_grab_device. */ #define XCB_INPUT_XI_GRAB_DEVICE 51 /** * @brief xcb_input_xi_grab_device_request_t **/ typedef struct xcb_input_xi_grab_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_timestamp_t time; xcb_cursor_t cursor; xcb_input_device_id_t deviceid; uint8_t mode; uint8_t paired_device_mode; uint8_t owner_events; uint8_t pad0; uint16_t mask_len; } xcb_input_xi_grab_device_request_t; /** * @brief xcb_input_xi_grab_device_reply_t **/ typedef struct xcb_input_xi_grab_device_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t status; uint8_t pad1[23]; } xcb_input_xi_grab_device_reply_t; /** Opcode for xcb_input_xi_ungrab_device. */ #define XCB_INPUT_XI_UNGRAB_DEVICE 52 /** * @brief xcb_input_xi_ungrab_device_request_t **/ typedef struct xcb_input_xi_ungrab_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_timestamp_t time; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_ungrab_device_request_t; typedef enum xcb_input_event_mode_t { XCB_INPUT_EVENT_MODE_ASYNC_DEVICE = 0, XCB_INPUT_EVENT_MODE_SYNC_DEVICE = 1, XCB_INPUT_EVENT_MODE_REPLAY_DEVICE = 2, XCB_INPUT_EVENT_MODE_ASYNC_PAIRED_DEVICE = 3, XCB_INPUT_EVENT_MODE_ASYNC_PAIR = 4, XCB_INPUT_EVENT_MODE_SYNC_PAIR = 5, XCB_INPUT_EVENT_MODE_ACCEPT_TOUCH = 6, XCB_INPUT_EVENT_MODE_REJECT_TOUCH = 7 } xcb_input_event_mode_t; /** Opcode for xcb_input_xi_allow_events. */ #define XCB_INPUT_XI_ALLOW_EVENTS 53 /** * @brief xcb_input_xi_allow_events_request_t **/ typedef struct xcb_input_xi_allow_events_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_timestamp_t time; xcb_input_device_id_t deviceid; uint8_t event_mode; uint8_t pad0; uint32_t touchid; xcb_window_t grab_window; } xcb_input_xi_allow_events_request_t; typedef enum xcb_input_grab_mode_22_t { XCB_INPUT_GRAB_MODE_22_SYNC = 0, XCB_INPUT_GRAB_MODE_22_ASYNC = 1, XCB_INPUT_GRAB_MODE_22_TOUCH = 2 } xcb_input_grab_mode_22_t; typedef enum xcb_input_grab_type_t { XCB_INPUT_GRAB_TYPE_BUTTON = 0, XCB_INPUT_GRAB_TYPE_KEYCODE = 1, XCB_INPUT_GRAB_TYPE_ENTER = 2, XCB_INPUT_GRAB_TYPE_FOCUS_IN = 3, XCB_INPUT_GRAB_TYPE_TOUCH_BEGIN = 4 } xcb_input_grab_type_t; typedef enum xcb_input_modifier_mask_t { XCB_INPUT_MODIFIER_MASK_ANY = 2147483648 } xcb_input_modifier_mask_t; /** * @brief xcb_input_grab_modifier_info_t **/ typedef struct xcb_input_grab_modifier_info_t { uint32_t modifiers; uint8_t status; uint8_t pad0[3]; } xcb_input_grab_modifier_info_t; /** * @brief xcb_input_grab_modifier_info_iterator_t **/ typedef struct xcb_input_grab_modifier_info_iterator_t { xcb_input_grab_modifier_info_t *data; int rem; int index; } xcb_input_grab_modifier_info_iterator_t; /** * @brief xcb_input_xi_passive_grab_device_cookie_t **/ typedef struct xcb_input_xi_passive_grab_device_cookie_t { unsigned int sequence; } xcb_input_xi_passive_grab_device_cookie_t; /** Opcode for xcb_input_xi_passive_grab_device. */ #define XCB_INPUT_XI_PASSIVE_GRAB_DEVICE 54 /** * @brief xcb_input_xi_passive_grab_device_request_t **/ typedef struct xcb_input_xi_passive_grab_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_timestamp_t time; xcb_window_t grab_window; xcb_cursor_t cursor; uint32_t detail; xcb_input_device_id_t deviceid; uint16_t num_modifiers; uint16_t mask_len; uint8_t grab_type; uint8_t grab_mode; uint8_t paired_device_mode; uint8_t owner_events; uint8_t pad0[2]; } xcb_input_xi_passive_grab_device_request_t; /** * @brief xcb_input_xi_passive_grab_device_reply_t **/ typedef struct xcb_input_xi_passive_grab_device_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_modifiers; uint8_t pad1[22]; } xcb_input_xi_passive_grab_device_reply_t; /** Opcode for xcb_input_xi_passive_ungrab_device. */ #define XCB_INPUT_XI_PASSIVE_UNGRAB_DEVICE 55 /** * @brief xcb_input_xi_passive_ungrab_device_request_t **/ typedef struct xcb_input_xi_passive_ungrab_device_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t grab_window; uint32_t detail; xcb_input_device_id_t deviceid; uint16_t num_modifiers; uint8_t grab_type; uint8_t pad0[3]; } xcb_input_xi_passive_ungrab_device_request_t; /** * @brief xcb_input_xi_list_properties_cookie_t **/ typedef struct xcb_input_xi_list_properties_cookie_t { unsigned int sequence; } xcb_input_xi_list_properties_cookie_t; /** Opcode for xcb_input_xi_list_properties. */ #define XCB_INPUT_XI_LIST_PROPERTIES 56 /** * @brief xcb_input_xi_list_properties_request_t **/ typedef struct xcb_input_xi_list_properties_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_input_device_id_t deviceid; uint8_t pad0[2]; } xcb_input_xi_list_properties_request_t; /** * @brief xcb_input_xi_list_properties_reply_t **/ typedef struct xcb_input_xi_list_properties_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_properties; uint8_t pad1[22]; } xcb_input_xi_list_properties_reply_t; /** * @brief xcb_input_xi_change_property_items_t **/ typedef struct xcb_input_xi_change_property_items_t { uint8_t *data8; uint16_t *data16; uint32_t *data32; } xcb_input_xi_change_property_items_t; /** Opcode for xcb_input_xi_change_property. */ #define XCB_INPUT_XI_CHANGE_PROPERTY 57 /** * @brief xcb_input_xi_change_property_request_t **/ typedef struct xcb_input_xi_change_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_input_device_id_t deviceid; uint8_t mode; uint8_t format; xcb_atom_t property; xcb_atom_t type; uint32_t num_items; } xcb_input_xi_change_property_request_t; /** Opcode for xcb_input_xi_delete_property. */ #define XCB_INPUT_XI_DELETE_PROPERTY 58 /** * @brief xcb_input_xi_delete_property_request_t **/ typedef struct xcb_input_xi_delete_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_input_device_id_t deviceid; uint8_t pad0[2]; xcb_atom_t property; } xcb_input_xi_delete_property_request_t; /** * @brief xcb_input_xi_get_property_cookie_t **/ typedef struct xcb_input_xi_get_property_cookie_t { unsigned int sequence; } xcb_input_xi_get_property_cookie_t; /** Opcode for xcb_input_xi_get_property. */ #define XCB_INPUT_XI_GET_PROPERTY 59 /** * @brief xcb_input_xi_get_property_request_t **/ typedef struct xcb_input_xi_get_property_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_input_device_id_t deviceid; uint8_t _delete; uint8_t pad0; xcb_atom_t property; xcb_atom_t type; uint32_t offset; uint32_t len; } xcb_input_xi_get_property_request_t; /** * @brief xcb_input_xi_get_property_items_t **/ typedef struct xcb_input_xi_get_property_items_t { uint8_t *data8; uint16_t *data16; uint32_t *data32; } xcb_input_xi_get_property_items_t; /** * @brief xcb_input_xi_get_property_reply_t **/ typedef struct xcb_input_xi_get_property_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_atom_t type; uint32_t bytes_after; uint32_t num_items; uint8_t format; uint8_t pad1[11]; } xcb_input_xi_get_property_reply_t; /** * @brief xcb_input_xi_get_selected_events_cookie_t **/ typedef struct xcb_input_xi_get_selected_events_cookie_t { unsigned int sequence; } xcb_input_xi_get_selected_events_cookie_t; /** Opcode for xcb_input_xi_get_selected_events. */ #define XCB_INPUT_XI_GET_SELECTED_EVENTS 60 /** * @brief xcb_input_xi_get_selected_events_request_t **/ typedef struct xcb_input_xi_get_selected_events_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_input_xi_get_selected_events_request_t; /** * @brief xcb_input_xi_get_selected_events_reply_t **/ typedef struct xcb_input_xi_get_selected_events_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_masks; uint8_t pad1[22]; } xcb_input_xi_get_selected_events_reply_t; /** * @brief xcb_input_barrier_release_pointer_info_t **/ typedef struct xcb_input_barrier_release_pointer_info_t { xcb_input_device_id_t deviceid; uint8_t pad0[2]; xcb_xfixes_barrier_t barrier; uint32_t eventid; } xcb_input_barrier_release_pointer_info_t; /** * @brief xcb_input_barrier_release_pointer_info_iterator_t **/ typedef struct xcb_input_barrier_release_pointer_info_iterator_t { xcb_input_barrier_release_pointer_info_t *data; int rem; int index; } xcb_input_barrier_release_pointer_info_iterator_t; /** Opcode for xcb_input_xi_barrier_release_pointer. */ #define XCB_INPUT_XI_BARRIER_RELEASE_POINTER 61 /** * @brief xcb_input_xi_barrier_release_pointer_request_t **/ typedef struct xcb_input_xi_barrier_release_pointer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t num_barriers; } xcb_input_xi_barrier_release_pointer_request_t; /** Opcode for xcb_input_device_valuator. */ #define XCB_INPUT_DEVICE_VALUATOR 0 /** * @brief xcb_input_device_valuator_event_t **/ typedef struct xcb_input_device_valuator_event_t { uint8_t response_type; uint8_t device_id; uint16_t sequence; uint16_t device_state; uint8_t num_valuators; uint8_t first_valuator; int32_t valuators[6]; } xcb_input_device_valuator_event_t; typedef enum xcb_input_more_events_mask_t { XCB_INPUT_MORE_EVENTS_MASK_MORE_EVENTS = 128 } xcb_input_more_events_mask_t; /** Opcode for xcb_input_device_key_press. */ #define XCB_INPUT_DEVICE_KEY_PRESS 1 /** * @brief xcb_input_device_key_press_event_t **/ typedef struct xcb_input_device_key_press_event_t { uint8_t response_type; uint8_t detail; uint16_t sequence; xcb_timestamp_t time; xcb_window_t root; xcb_window_t event; xcb_window_t child; int16_t root_x; int16_t root_y; int16_t event_x; int16_t event_y; uint16_t state; uint8_t same_screen; uint8_t device_id; } xcb_input_device_key_press_event_t; /** Opcode for xcb_input_device_key_release. */ #define XCB_INPUT_DEVICE_KEY_RELEASE 2 typedef xcb_input_device_key_press_event_t xcb_input_device_key_release_event_t; /** Opcode for xcb_input_device_button_press. */ #define XCB_INPUT_DEVICE_BUTTON_PRESS 3 typedef xcb_input_device_key_press_event_t xcb_input_device_button_press_event_t; /** Opcode for xcb_input_device_button_release. */ #define XCB_INPUT_DEVICE_BUTTON_RELEASE 4 typedef xcb_input_device_key_press_event_t xcb_input_device_button_release_event_t; /** Opcode for xcb_input_device_motion_notify. */ #define XCB_INPUT_DEVICE_MOTION_NOTIFY 5 typedef xcb_input_device_key_press_event_t xcb_input_device_motion_notify_event_t; /** Opcode for xcb_input_device_focus_in. */ #define XCB_INPUT_DEVICE_FOCUS_IN 6 /** * @brief xcb_input_device_focus_in_event_t **/ typedef struct xcb_input_device_focus_in_event_t { uint8_t response_type; uint8_t detail; uint16_t sequence; xcb_timestamp_t time; xcb_window_t window; uint8_t mode; uint8_t device_id; uint8_t pad0[18]; } xcb_input_device_focus_in_event_t; /** Opcode for xcb_input_device_focus_out. */ #define XCB_INPUT_DEVICE_FOCUS_OUT 7 typedef xcb_input_device_focus_in_event_t xcb_input_device_focus_out_event_t; /** Opcode for xcb_input_proximity_in. */ #define XCB_INPUT_PROXIMITY_IN 8 typedef xcb_input_device_key_press_event_t xcb_input_proximity_in_event_t; /** Opcode for xcb_input_proximity_out. */ #define XCB_INPUT_PROXIMITY_OUT 9 typedef xcb_input_device_key_press_event_t xcb_input_proximity_out_event_t; typedef enum xcb_input_classes_reported_mask_t { XCB_INPUT_CLASSES_REPORTED_MASK_OUT_OF_PROXIMITY = 128, XCB_INPUT_CLASSES_REPORTED_MASK_DEVICE_MODE_ABSOLUTE = 64, XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_VALUATORS = 4, XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_BUTTONS = 2, XCB_INPUT_CLASSES_REPORTED_MASK_REPORTING_KEYS = 1 } xcb_input_classes_reported_mask_t; /** Opcode for xcb_input_device_state_notify. */ #define XCB_INPUT_DEVICE_STATE_NOTIFY 10 /** * @brief xcb_input_device_state_notify_event_t **/ typedef struct xcb_input_device_state_notify_event_t { uint8_t response_type; uint8_t device_id; uint16_t sequence; xcb_timestamp_t time; uint8_t num_keys; uint8_t num_buttons; uint8_t num_valuators; uint8_t classes_reported; uint8_t buttons[4]; uint8_t keys[4]; uint32_t valuators[3]; } xcb_input_device_state_notify_event_t; /** Opcode for xcb_input_device_mapping_notify. */ #define XCB_INPUT_DEVICE_MAPPING_NOTIFY 11 /** * @brief xcb_input_device_mapping_notify_event_t **/ typedef struct xcb_input_device_mapping_notify_event_t { uint8_t response_type; uint8_t device_id; uint16_t sequence; uint8_t request; xcb_input_key_code_t first_keycode; uint8_t count; uint8_t pad0; xcb_timestamp_t time; uint8_t pad1[20]; } xcb_input_device_mapping_notify_event_t; typedef enum xcb_input_change_device_t { XCB_INPUT_CHANGE_DEVICE_NEW_POINTER = 0, XCB_INPUT_CHANGE_DEVICE_NEW_KEYBOARD = 1 } xcb_input_change_device_t; /** Opcode for xcb_input_change_device_notify. */ #define XCB_INPUT_CHANGE_DEVICE_NOTIFY 12 /** * @brief xcb_input_change_device_notify_event_t **/ typedef struct xcb_input_change_device_notify_event_t { uint8_t response_type; uint8_t device_id; uint16_t sequence; xcb_timestamp_t time; uint8_t request; uint8_t pad0[23]; } xcb_input_change_device_notify_event_t; /** Opcode for xcb_input_device_key_state_notify. */ #define XCB_INPUT_DEVICE_KEY_STATE_NOTIFY 13 /** * @brief xcb_input_device_key_state_notify_event_t **/ typedef struct xcb_input_device_key_state_notify_event_t { uint8_t response_type; uint8_t device_id; uint16_t sequence; uint8_t keys[28]; } xcb_input_device_key_state_notify_event_t; /** Opcode for xcb_input_device_button_state_notify. */ #define XCB_INPUT_DEVICE_BUTTON_STATE_NOTIFY 14 /** * @brief xcb_input_device_button_state_notify_event_t **/ typedef struct xcb_input_device_button_state_notify_event_t { uint8_t response_type; uint8_t device_id; uint16_t sequence; uint8_t buttons[28]; } xcb_input_device_button_state_notify_event_t; typedef enum xcb_input_device_change_t { XCB_INPUT_DEVICE_CHANGE_ADDED = 0, XCB_INPUT_DEVICE_CHANGE_REMOVED = 1, XCB_INPUT_DEVICE_CHANGE_ENABLED = 2, XCB_INPUT_DEVICE_CHANGE_DISABLED = 3, XCB_INPUT_DEVICE_CHANGE_UNRECOVERABLE = 4, XCB_INPUT_DEVICE_CHANGE_CONTROL_CHANGED = 5 } xcb_input_device_change_t; /** Opcode for xcb_input_device_presence_notify. */ #define XCB_INPUT_DEVICE_PRESENCE_NOTIFY 15 /** * @brief xcb_input_device_presence_notify_event_t **/ typedef struct xcb_input_device_presence_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_timestamp_t time; uint8_t devchange; uint8_t device_id; uint16_t control; uint8_t pad1[20]; } xcb_input_device_presence_notify_event_t; /** Opcode for xcb_input_device_property_notify. */ #define XCB_INPUT_DEVICE_PROPERTY_NOTIFY 16 /** * @brief xcb_input_device_property_notify_event_t **/ typedef struct xcb_input_device_property_notify_event_t { uint8_t response_type; uint8_t state; uint16_t sequence; xcb_timestamp_t time; xcb_atom_t property; uint8_t pad0[19]; uint8_t device_id; } xcb_input_device_property_notify_event_t; typedef enum xcb_input_change_reason_t { XCB_INPUT_CHANGE_REASON_SLAVE_SWITCH = 1, XCB_INPUT_CHANGE_REASON_DEVICE_CHANGE = 2 } xcb_input_change_reason_t; /** Opcode for xcb_input_device_changed. */ #define XCB_INPUT_DEVICE_CHANGED 1 /** * @brief xcb_input_device_changed_event_t **/ typedef struct xcb_input_device_changed_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint16_t num_classes; xcb_input_device_id_t sourceid; uint8_t reason; uint8_t pad0[11]; uint32_t full_sequence; } xcb_input_device_changed_event_t; typedef enum xcb_input_key_event_flags_t { XCB_INPUT_KEY_EVENT_FLAGS_KEY_REPEAT = 65536 } xcb_input_key_event_flags_t; /** Opcode for xcb_input_key_press. */ #define XCB_INPUT_KEY_PRESS 2 /** * @brief xcb_input_key_press_event_t **/ typedef struct xcb_input_key_press_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t detail; xcb_window_t root; xcb_window_t event; xcb_window_t child; uint32_t full_sequence; xcb_input_fp1616_t root_x; xcb_input_fp1616_t root_y; xcb_input_fp1616_t event_x; xcb_input_fp1616_t event_y; uint16_t buttons_len; uint16_t valuators_len; xcb_input_device_id_t sourceid; uint8_t pad0[2]; uint32_t flags; xcb_input_modifier_info_t mods; xcb_input_group_info_t group; } xcb_input_key_press_event_t; /** Opcode for xcb_input_key_release. */ #define XCB_INPUT_KEY_RELEASE 3 typedef xcb_input_key_press_event_t xcb_input_key_release_event_t; typedef enum xcb_input_pointer_event_flags_t { XCB_INPUT_POINTER_EVENT_FLAGS_POINTER_EMULATED = 65536 } xcb_input_pointer_event_flags_t; /** Opcode for xcb_input_button_press. */ #define XCB_INPUT_BUTTON_PRESS 4 /** * @brief xcb_input_button_press_event_t **/ typedef struct xcb_input_button_press_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t detail; xcb_window_t root; xcb_window_t event; xcb_window_t child; uint32_t full_sequence; xcb_input_fp1616_t root_x; xcb_input_fp1616_t root_y; xcb_input_fp1616_t event_x; xcb_input_fp1616_t event_y; uint16_t buttons_len; uint16_t valuators_len; xcb_input_device_id_t sourceid; uint8_t pad0[2]; uint32_t flags; xcb_input_modifier_info_t mods; xcb_input_group_info_t group; } xcb_input_button_press_event_t; /** Opcode for xcb_input_button_release. */ #define XCB_INPUT_BUTTON_RELEASE 5 typedef xcb_input_button_press_event_t xcb_input_button_release_event_t; /** Opcode for xcb_input_motion. */ #define XCB_INPUT_MOTION 6 typedef xcb_input_button_press_event_t xcb_input_motion_event_t; typedef enum xcb_input_notify_mode_t { XCB_INPUT_NOTIFY_MODE_NORMAL = 0, XCB_INPUT_NOTIFY_MODE_GRAB = 1, XCB_INPUT_NOTIFY_MODE_UNGRAB = 2, XCB_INPUT_NOTIFY_MODE_WHILE_GRABBED = 3, XCB_INPUT_NOTIFY_MODE_PASSIVE_GRAB = 4, XCB_INPUT_NOTIFY_MODE_PASSIVE_UNGRAB = 5 } xcb_input_notify_mode_t; typedef enum xcb_input_notify_detail_t { XCB_INPUT_NOTIFY_DETAIL_ANCESTOR = 0, XCB_INPUT_NOTIFY_DETAIL_VIRTUAL = 1, XCB_INPUT_NOTIFY_DETAIL_INFERIOR = 2, XCB_INPUT_NOTIFY_DETAIL_NONLINEAR = 3, XCB_INPUT_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4, XCB_INPUT_NOTIFY_DETAIL_POINTER = 5, XCB_INPUT_NOTIFY_DETAIL_POINTER_ROOT = 6, XCB_INPUT_NOTIFY_DETAIL_NONE = 7 } xcb_input_notify_detail_t; /** Opcode for xcb_input_enter. */ #define XCB_INPUT_ENTER 7 /** * @brief xcb_input_enter_event_t **/ typedef struct xcb_input_enter_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; xcb_input_device_id_t sourceid; uint8_t mode; uint8_t detail; xcb_window_t root; xcb_window_t event; xcb_window_t child; uint32_t full_sequence; xcb_input_fp1616_t root_x; xcb_input_fp1616_t root_y; xcb_input_fp1616_t event_x; xcb_input_fp1616_t event_y; uint8_t same_screen; uint8_t focus; uint16_t buttons_len; xcb_input_modifier_info_t mods; xcb_input_group_info_t group; } xcb_input_enter_event_t; /** Opcode for xcb_input_leave. */ #define XCB_INPUT_LEAVE 8 typedef xcb_input_enter_event_t xcb_input_leave_event_t; /** Opcode for xcb_input_focus_in. */ #define XCB_INPUT_FOCUS_IN 9 typedef xcb_input_enter_event_t xcb_input_focus_in_event_t; /** Opcode for xcb_input_focus_out. */ #define XCB_INPUT_FOCUS_OUT 10 typedef xcb_input_enter_event_t xcb_input_focus_out_event_t; typedef enum xcb_input_hierarchy_mask_t { XCB_INPUT_HIERARCHY_MASK_MASTER_ADDED = 1, XCB_INPUT_HIERARCHY_MASK_MASTER_REMOVED = 2, XCB_INPUT_HIERARCHY_MASK_SLAVE_ADDED = 4, XCB_INPUT_HIERARCHY_MASK_SLAVE_REMOVED = 8, XCB_INPUT_HIERARCHY_MASK_SLAVE_ATTACHED = 16, XCB_INPUT_HIERARCHY_MASK_SLAVE_DETACHED = 32, XCB_INPUT_HIERARCHY_MASK_DEVICE_ENABLED = 64, XCB_INPUT_HIERARCHY_MASK_DEVICE_DISABLED = 128 } xcb_input_hierarchy_mask_t; /** * @brief xcb_input_hierarchy_info_t **/ typedef struct xcb_input_hierarchy_info_t { xcb_input_device_id_t deviceid; xcb_input_device_id_t attachment; uint8_t type; uint8_t enabled; uint8_t pad0[2]; uint32_t flags; } xcb_input_hierarchy_info_t; /** * @brief xcb_input_hierarchy_info_iterator_t **/ typedef struct xcb_input_hierarchy_info_iterator_t { xcb_input_hierarchy_info_t *data; int rem; int index; } xcb_input_hierarchy_info_iterator_t; /** Opcode for xcb_input_hierarchy. */ #define XCB_INPUT_HIERARCHY 11 /** * @brief xcb_input_hierarchy_event_t **/ typedef struct xcb_input_hierarchy_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t flags; uint16_t num_infos; uint8_t pad0[10]; uint32_t full_sequence; } xcb_input_hierarchy_event_t; typedef enum xcb_input_property_flag_t { XCB_INPUT_PROPERTY_FLAG_DELETED = 0, XCB_INPUT_PROPERTY_FLAG_CREATED = 1, XCB_INPUT_PROPERTY_FLAG_MODIFIED = 2 } xcb_input_property_flag_t; /** Opcode for xcb_input_property. */ #define XCB_INPUT_PROPERTY 12 /** * @brief xcb_input_property_event_t **/ typedef struct xcb_input_property_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; xcb_atom_t property; uint8_t what; uint8_t pad0[11]; uint32_t full_sequence; } xcb_input_property_event_t; /** Opcode for xcb_input_raw_key_press. */ #define XCB_INPUT_RAW_KEY_PRESS 13 /** * @brief xcb_input_raw_key_press_event_t **/ typedef struct xcb_input_raw_key_press_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t detail; xcb_input_device_id_t sourceid; uint16_t valuators_len; uint32_t flags; uint8_t pad0[4]; uint32_t full_sequence; } xcb_input_raw_key_press_event_t; /** Opcode for xcb_input_raw_key_release. */ #define XCB_INPUT_RAW_KEY_RELEASE 14 typedef xcb_input_raw_key_press_event_t xcb_input_raw_key_release_event_t; /** Opcode for xcb_input_raw_button_press. */ #define XCB_INPUT_RAW_BUTTON_PRESS 15 /** * @brief xcb_input_raw_button_press_event_t **/ typedef struct xcb_input_raw_button_press_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t detail; xcb_input_device_id_t sourceid; uint16_t valuators_len; uint32_t flags; uint8_t pad0[4]; uint32_t full_sequence; } xcb_input_raw_button_press_event_t; /** Opcode for xcb_input_raw_button_release. */ #define XCB_INPUT_RAW_BUTTON_RELEASE 16 typedef xcb_input_raw_button_press_event_t xcb_input_raw_button_release_event_t; /** Opcode for xcb_input_raw_motion. */ #define XCB_INPUT_RAW_MOTION 17 typedef xcb_input_raw_button_press_event_t xcb_input_raw_motion_event_t; typedef enum xcb_input_touch_event_flags_t { XCB_INPUT_TOUCH_EVENT_FLAGS_TOUCH_PENDING_END = 65536, XCB_INPUT_TOUCH_EVENT_FLAGS_TOUCH_EMULATING_POINTER = 131072 } xcb_input_touch_event_flags_t; /** Opcode for xcb_input_touch_begin. */ #define XCB_INPUT_TOUCH_BEGIN 18 /** * @brief xcb_input_touch_begin_event_t **/ typedef struct xcb_input_touch_begin_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t detail; xcb_window_t root; xcb_window_t event; xcb_window_t child; uint32_t full_sequence; xcb_input_fp1616_t root_x; xcb_input_fp1616_t root_y; xcb_input_fp1616_t event_x; xcb_input_fp1616_t event_y; uint16_t buttons_len; uint16_t valuators_len; xcb_input_device_id_t sourceid; uint8_t pad0[2]; uint32_t flags; xcb_input_modifier_info_t mods; xcb_input_group_info_t group; } xcb_input_touch_begin_event_t; /** Opcode for xcb_input_touch_update. */ #define XCB_INPUT_TOUCH_UPDATE 19 typedef xcb_input_touch_begin_event_t xcb_input_touch_update_event_t; /** Opcode for xcb_input_touch_end. */ #define XCB_INPUT_TOUCH_END 20 typedef xcb_input_touch_begin_event_t xcb_input_touch_end_event_t; typedef enum xcb_input_touch_ownership_flags_t { XCB_INPUT_TOUCH_OWNERSHIP_FLAGS_NONE = 0 } xcb_input_touch_ownership_flags_t; /** Opcode for xcb_input_touch_ownership. */ #define XCB_INPUT_TOUCH_OWNERSHIP 21 /** * @brief xcb_input_touch_ownership_event_t **/ typedef struct xcb_input_touch_ownership_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t touchid; xcb_window_t root; xcb_window_t event; xcb_window_t child; uint32_t full_sequence; xcb_input_device_id_t sourceid; uint8_t pad0[2]; uint32_t flags; uint8_t pad1[8]; } xcb_input_touch_ownership_event_t; /** Opcode for xcb_input_raw_touch_begin. */ #define XCB_INPUT_RAW_TOUCH_BEGIN 22 /** * @brief xcb_input_raw_touch_begin_event_t **/ typedef struct xcb_input_raw_touch_begin_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t detail; xcb_input_device_id_t sourceid; uint16_t valuators_len; uint32_t flags; uint8_t pad0[4]; uint32_t full_sequence; } xcb_input_raw_touch_begin_event_t; /** Opcode for xcb_input_raw_touch_update. */ #define XCB_INPUT_RAW_TOUCH_UPDATE 23 typedef xcb_input_raw_touch_begin_event_t xcb_input_raw_touch_update_event_t; /** Opcode for xcb_input_raw_touch_end. */ #define XCB_INPUT_RAW_TOUCH_END 24 typedef xcb_input_raw_touch_begin_event_t xcb_input_raw_touch_end_event_t; typedef enum xcb_input_barrier_flags_t { XCB_INPUT_BARRIER_FLAGS_POINTER_RELEASED = 1, XCB_INPUT_BARRIER_FLAGS_DEVICE_IS_GRABBED = 2 } xcb_input_barrier_flags_t; /** Opcode for xcb_input_barrier_hit. */ #define XCB_INPUT_BARRIER_HIT 25 /** * @brief xcb_input_barrier_hit_event_t **/ typedef struct xcb_input_barrier_hit_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; xcb_input_device_id_t deviceid; xcb_timestamp_t time; uint32_t eventid; xcb_window_t root; xcb_window_t event; xcb_xfixes_barrier_t barrier; uint32_t full_sequence; uint32_t dtime; uint32_t flags; xcb_input_device_id_t sourceid; uint8_t pad0[2]; xcb_input_fp1616_t root_x; xcb_input_fp1616_t root_y; xcb_input_fp3232_t dx; xcb_input_fp3232_t dy; } xcb_input_barrier_hit_event_t; /** Opcode for xcb_input_barrier_leave. */ #define XCB_INPUT_BARRIER_LEAVE 26 typedef xcb_input_barrier_hit_event_t xcb_input_barrier_leave_event_t; /** * @brief xcb_input_event_for_send_t **/ typedef union xcb_input_event_for_send_t { xcb_input_device_valuator_event_t device_valuator; xcb_input_device_key_press_event_t device_key_press; xcb_input_device_key_release_event_t device_key_release; xcb_input_device_button_press_event_t device_button_press; xcb_input_device_button_release_event_t device_button_release; xcb_input_device_motion_notify_event_t device_motion_notify; xcb_input_device_focus_in_event_t device_focus_in; xcb_input_device_focus_out_event_t device_focus_out; xcb_input_proximity_in_event_t proximity_in; xcb_input_proximity_out_event_t proximity_out; xcb_input_device_state_notify_event_t device_state_notify; xcb_input_device_mapping_notify_event_t device_mapping_notify; xcb_input_change_device_notify_event_t change_device_notify; xcb_input_device_key_state_notify_event_t device_key_state_notify; xcb_input_device_button_state_notify_event_t device_button_state_notify; xcb_input_device_presence_notify_event_t device_presence_notify; xcb_raw_generic_event_t event_header; } xcb_input_event_for_send_t; /** * @brief xcb_input_event_for_send_iterator_t **/ typedef struct xcb_input_event_for_send_iterator_t { xcb_input_event_for_send_t *data; int rem; int index; } xcb_input_event_for_send_iterator_t; /** Opcode for xcb_input_send_extension_event. */ #define XCB_INPUT_SEND_EXTENSION_EVENT 31 /** * @brief xcb_input_send_extension_event_request_t **/ typedef struct xcb_input_send_extension_event_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t destination; uint8_t device_id; uint8_t propagate; uint16_t num_classes; uint8_t num_events; uint8_t pad0[3]; } xcb_input_send_extension_event_request_t; /** Opcode for xcb_input_device. */ #define XCB_INPUT_DEVICE 0 /** * @brief xcb_input_device_error_t **/ typedef struct xcb_input_device_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_input_device_error_t; /** Opcode for xcb_input_event. */ #define XCB_INPUT_EVENT 1 /** * @brief xcb_input_event_error_t **/ typedef struct xcb_input_event_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_input_event_error_t; /** Opcode for xcb_input_mode. */ #define XCB_INPUT_MODE 2 /** * @brief xcb_input_mode_error_t **/ typedef struct xcb_input_mode_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_input_mode_error_t; /** Opcode for xcb_input_device_busy. */ #define XCB_INPUT_DEVICE_BUSY 3 /** * @brief xcb_input_device_busy_error_t **/ typedef struct xcb_input_device_busy_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_input_device_busy_error_t; /** Opcode for xcb_input_class. */ #define XCB_INPUT_CLASS 4 /** * @brief xcb_input_class_error_t **/ typedef struct xcb_input_class_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_input_class_error_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_input_event_class_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_event_class_t) */ void xcb_input_event_class_next (xcb_input_event_class_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_event_class_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_event_class_end (xcb_input_event_class_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_key_code_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_key_code_t) */ void xcb_input_key_code_next (xcb_input_key_code_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_key_code_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_key_code_end (xcb_input_key_code_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_id_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_id_t) */ void xcb_input_device_id_next (xcb_input_device_id_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_id_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_id_end (xcb_input_device_id_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_fp1616_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_fp1616_t) */ void xcb_input_fp1616_next (xcb_input_fp1616_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_fp1616_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_fp1616_end (xcb_input_fp1616_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_fp3232_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_fp3232_t) */ void xcb_input_fp3232_next (xcb_input_fp3232_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_fp3232_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_fp3232_end (xcb_input_fp3232_iterator_t i); int xcb_input_get_extension_version_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_extension_version_cookie_t xcb_input_get_extension_version (xcb_connection_t *c, uint16_t name_len, const char *name); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_extension_version_cookie_t xcb_input_get_extension_version_unchecked (xcb_connection_t *c, uint16_t name_len, const char *name); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_extension_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_extension_version_reply_t * xcb_input_get_extension_version_reply (xcb_connection_t *c, xcb_input_get_extension_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_info_t) */ void xcb_input_device_info_next (xcb_input_device_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_info_end (xcb_input_device_info_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_key_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_key_info_t) */ void xcb_input_key_info_next (xcb_input_key_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_key_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_key_info_end (xcb_input_key_info_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_button_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_button_info_t) */ void xcb_input_button_info_next (xcb_input_button_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_button_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_button_info_end (xcb_input_button_info_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_axis_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_axis_info_t) */ void xcb_input_axis_info_next (xcb_input_axis_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_axis_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_axis_info_end (xcb_input_axis_info_iterator_t i); int xcb_input_valuator_info_sizeof (const void *_buffer); xcb_input_axis_info_t * xcb_input_valuator_info_axes (const xcb_input_valuator_info_t *R); int xcb_input_valuator_info_axes_length (const xcb_input_valuator_info_t *R); xcb_input_axis_info_iterator_t xcb_input_valuator_info_axes_iterator (const xcb_input_valuator_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_valuator_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_valuator_info_t) */ void xcb_input_valuator_info_next (xcb_input_valuator_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_valuator_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_valuator_info_end (xcb_input_valuator_info_iterator_t i); xcb_input_axis_info_t * xcb_input_input_info_info_valuator_axes (const xcb_input_input_info_info_t *S); int xcb_input_input_info_info_valuator_axes_length (const xcb_input_input_info_t *R, const xcb_input_input_info_info_t *S); xcb_input_axis_info_iterator_t xcb_input_input_info_info_valuator_axes_iterator (const xcb_input_input_info_t *R, const xcb_input_input_info_info_t *S); int xcb_input_input_info_info_serialize (void **_buffer, uint8_t class_id, const xcb_input_input_info_info_t *_aux); int xcb_input_input_info_info_unpack (const void *_buffer, uint8_t class_id, xcb_input_input_info_info_t *_aux); int xcb_input_input_info_info_sizeof (const void *_buffer, uint8_t class_id); int xcb_input_input_info_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_input_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_input_info_t) */ void xcb_input_input_info_next (xcb_input_input_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_input_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_input_info_end (xcb_input_input_info_iterator_t i); int xcb_input_device_name_sizeof (const void *_buffer); char * xcb_input_device_name_string (const xcb_input_device_name_t *R); int xcb_input_device_name_string_length (const xcb_input_device_name_t *R); xcb_generic_iterator_t xcb_input_device_name_string_end (const xcb_input_device_name_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_name_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_name_t) */ void xcb_input_device_name_next (xcb_input_device_name_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_name_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_name_end (xcb_input_device_name_iterator_t i); int xcb_input_list_input_devices_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_list_input_devices_cookie_t xcb_input_list_input_devices (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_list_input_devices_cookie_t xcb_input_list_input_devices_unchecked (xcb_connection_t *c); xcb_input_device_info_t * xcb_input_list_input_devices_devices (const xcb_input_list_input_devices_reply_t *R); int xcb_input_list_input_devices_devices_length (const xcb_input_list_input_devices_reply_t *R); xcb_input_device_info_iterator_t xcb_input_list_input_devices_devices_iterator (const xcb_input_list_input_devices_reply_t *R); int xcb_input_list_input_devices_infos_length (const xcb_input_list_input_devices_reply_t *R); xcb_input_input_info_iterator_t xcb_input_list_input_devices_infos_iterator (const xcb_input_list_input_devices_reply_t *R); int xcb_input_list_input_devices_names_length (const xcb_input_list_input_devices_reply_t *R); xcb_str_iterator_t xcb_input_list_input_devices_names_iterator (const xcb_input_list_input_devices_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_list_input_devices_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_list_input_devices_reply_t * xcb_input_list_input_devices_reply (xcb_connection_t *c, xcb_input_list_input_devices_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_event_type_base_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_event_type_base_t) */ void xcb_input_event_type_base_next (xcb_input_event_type_base_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_event_type_base_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_event_type_base_end (xcb_input_event_type_base_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_input_class_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_input_class_info_t) */ void xcb_input_input_class_info_next (xcb_input_input_class_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_input_class_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_input_class_info_end (xcb_input_input_class_info_iterator_t i); int xcb_input_open_device_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_open_device_cookie_t xcb_input_open_device (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_open_device_cookie_t xcb_input_open_device_unchecked (xcb_connection_t *c, uint8_t device_id); xcb_input_input_class_info_t * xcb_input_open_device_class_info (const xcb_input_open_device_reply_t *R); int xcb_input_open_device_class_info_length (const xcb_input_open_device_reply_t *R); xcb_input_input_class_info_iterator_t xcb_input_open_device_class_info_iterator (const xcb_input_open_device_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_open_device_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_open_device_reply_t * xcb_input_open_device_reply (xcb_connection_t *c, xcb_input_open_device_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_close_device_checked (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_close_device (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_set_device_mode_cookie_t xcb_input_set_device_mode (xcb_connection_t *c, uint8_t device_id, uint8_t mode); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_set_device_mode_cookie_t xcb_input_set_device_mode_unchecked (xcb_connection_t *c, uint8_t device_id, uint8_t mode); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_set_device_mode_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_set_device_mode_reply_t * xcb_input_set_device_mode_reply (xcb_connection_t *c, xcb_input_set_device_mode_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_select_extension_event_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_select_extension_event_checked (xcb_connection_t *c, xcb_window_t window, uint16_t num_classes, const xcb_input_event_class_t *classes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_select_extension_event (xcb_connection_t *c, xcb_window_t window, uint16_t num_classes, const xcb_input_event_class_t *classes); xcb_input_event_class_t * xcb_input_select_extension_event_classes (const xcb_input_select_extension_event_request_t *R); int xcb_input_select_extension_event_classes_length (const xcb_input_select_extension_event_request_t *R); xcb_generic_iterator_t xcb_input_select_extension_event_classes_end (const xcb_input_select_extension_event_request_t *R); int xcb_input_get_selected_extension_events_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_selected_extension_events_cookie_t xcb_input_get_selected_extension_events (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_selected_extension_events_cookie_t xcb_input_get_selected_extension_events_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_input_event_class_t * xcb_input_get_selected_extension_events_this_classes (const xcb_input_get_selected_extension_events_reply_t *R); int xcb_input_get_selected_extension_events_this_classes_length (const xcb_input_get_selected_extension_events_reply_t *R); xcb_generic_iterator_t xcb_input_get_selected_extension_events_this_classes_end (const xcb_input_get_selected_extension_events_reply_t *R); xcb_input_event_class_t * xcb_input_get_selected_extension_events_all_classes (const xcb_input_get_selected_extension_events_reply_t *R); int xcb_input_get_selected_extension_events_all_classes_length (const xcb_input_get_selected_extension_events_reply_t *R); xcb_generic_iterator_t xcb_input_get_selected_extension_events_all_classes_end (const xcb_input_get_selected_extension_events_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_selected_extension_events_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_selected_extension_events_reply_t * xcb_input_get_selected_extension_events_reply (xcb_connection_t *c, xcb_input_get_selected_extension_events_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_change_device_dont_propagate_list_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_change_device_dont_propagate_list_checked (xcb_connection_t *c, xcb_window_t window, uint16_t num_classes, uint8_t mode, const xcb_input_event_class_t *classes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_change_device_dont_propagate_list (xcb_connection_t *c, xcb_window_t window, uint16_t num_classes, uint8_t mode, const xcb_input_event_class_t *classes); xcb_input_event_class_t * xcb_input_change_device_dont_propagate_list_classes (const xcb_input_change_device_dont_propagate_list_request_t *R); int xcb_input_change_device_dont_propagate_list_classes_length (const xcb_input_change_device_dont_propagate_list_request_t *R); xcb_generic_iterator_t xcb_input_change_device_dont_propagate_list_classes_end (const xcb_input_change_device_dont_propagate_list_request_t *R); int xcb_input_get_device_dont_propagate_list_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_dont_propagate_list_cookie_t xcb_input_get_device_dont_propagate_list (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_dont_propagate_list_cookie_t xcb_input_get_device_dont_propagate_list_unchecked (xcb_connection_t *c, xcb_window_t window); xcb_input_event_class_t * xcb_input_get_device_dont_propagate_list_classes (const xcb_input_get_device_dont_propagate_list_reply_t *R); int xcb_input_get_device_dont_propagate_list_classes_length (const xcb_input_get_device_dont_propagate_list_reply_t *R); xcb_generic_iterator_t xcb_input_get_device_dont_propagate_list_classes_end (const xcb_input_get_device_dont_propagate_list_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_dont_propagate_list_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_dont_propagate_list_reply_t * xcb_input_get_device_dont_propagate_list_reply (xcb_connection_t *c, xcb_input_get_device_dont_propagate_list_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_device_time_coord_sizeof (const void *_buffer, uint8_t num_axes); int32_t * xcb_input_device_time_coord_axisvalues (const xcb_input_device_time_coord_t *R); int xcb_input_device_time_coord_axisvalues_length (const xcb_input_device_time_coord_t *R, uint8_t num_axes); xcb_generic_iterator_t xcb_input_device_time_coord_axisvalues_end (const xcb_input_device_time_coord_t *R, uint8_t num_axes); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_time_coord_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_time_coord_t) */ void xcb_input_device_time_coord_next (xcb_input_device_time_coord_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_time_coord_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_time_coord_end (xcb_input_device_time_coord_iterator_t i); int xcb_input_get_device_motion_events_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_motion_events_cookie_t xcb_input_get_device_motion_events (xcb_connection_t *c, xcb_timestamp_t start, xcb_timestamp_t stop, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_motion_events_cookie_t xcb_input_get_device_motion_events_unchecked (xcb_connection_t *c, xcb_timestamp_t start, xcb_timestamp_t stop, uint8_t device_id); int xcb_input_get_device_motion_events_events_length (const xcb_input_get_device_motion_events_reply_t *R); xcb_input_device_time_coord_iterator_t xcb_input_get_device_motion_events_events_iterator (const xcb_input_get_device_motion_events_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_motion_events_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_motion_events_reply_t * xcb_input_get_device_motion_events_reply (xcb_connection_t *c, xcb_input_get_device_motion_events_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_change_keyboard_device_cookie_t xcb_input_change_keyboard_device (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_change_keyboard_device_cookie_t xcb_input_change_keyboard_device_unchecked (xcb_connection_t *c, uint8_t device_id); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_change_keyboard_device_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_change_keyboard_device_reply_t * xcb_input_change_keyboard_device_reply (xcb_connection_t *c, xcb_input_change_keyboard_device_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_change_pointer_device_cookie_t xcb_input_change_pointer_device (xcb_connection_t *c, uint8_t x_axis, uint8_t y_axis, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_change_pointer_device_cookie_t xcb_input_change_pointer_device_unchecked (xcb_connection_t *c, uint8_t x_axis, uint8_t y_axis, uint8_t device_id); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_change_pointer_device_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_change_pointer_device_reply_t * xcb_input_change_pointer_device_reply (xcb_connection_t *c, xcb_input_change_pointer_device_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_grab_device_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_grab_device_cookie_t xcb_input_grab_device (xcb_connection_t *c, xcb_window_t grab_window, xcb_timestamp_t time, uint16_t num_classes, uint8_t this_device_mode, uint8_t other_device_mode, uint8_t owner_events, uint8_t device_id, const xcb_input_event_class_t *classes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_grab_device_cookie_t xcb_input_grab_device_unchecked (xcb_connection_t *c, xcb_window_t grab_window, xcb_timestamp_t time, uint16_t num_classes, uint8_t this_device_mode, uint8_t other_device_mode, uint8_t owner_events, uint8_t device_id, const xcb_input_event_class_t *classes); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_grab_device_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_grab_device_reply_t * xcb_input_grab_device_reply (xcb_connection_t *c, xcb_input_grab_device_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_ungrab_device_checked (xcb_connection_t *c, xcb_timestamp_t time, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_ungrab_device (xcb_connection_t *c, xcb_timestamp_t time, uint8_t device_id); int xcb_input_grab_device_key_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_grab_device_key_checked (xcb_connection_t *c, xcb_window_t grab_window, uint16_t num_classes, uint16_t modifiers, uint8_t modifier_device, uint8_t grabbed_device, uint8_t key, uint8_t this_device_mode, uint8_t other_device_mode, uint8_t owner_events, const xcb_input_event_class_t *classes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_grab_device_key (xcb_connection_t *c, xcb_window_t grab_window, uint16_t num_classes, uint16_t modifiers, uint8_t modifier_device, uint8_t grabbed_device, uint8_t key, uint8_t this_device_mode, uint8_t other_device_mode, uint8_t owner_events, const xcb_input_event_class_t *classes); xcb_input_event_class_t * xcb_input_grab_device_key_classes (const xcb_input_grab_device_key_request_t *R); int xcb_input_grab_device_key_classes_length (const xcb_input_grab_device_key_request_t *R); xcb_generic_iterator_t xcb_input_grab_device_key_classes_end (const xcb_input_grab_device_key_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_ungrab_device_key_checked (xcb_connection_t *c, xcb_window_t grabWindow, uint16_t modifiers, uint8_t modifier_device, uint8_t key, uint8_t grabbed_device); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_ungrab_device_key (xcb_connection_t *c, xcb_window_t grabWindow, uint16_t modifiers, uint8_t modifier_device, uint8_t key, uint8_t grabbed_device); int xcb_input_grab_device_button_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_grab_device_button_checked (xcb_connection_t *c, xcb_window_t grab_window, uint8_t grabbed_device, uint8_t modifier_device, uint16_t num_classes, uint16_t modifiers, uint8_t this_device_mode, uint8_t other_device_mode, uint8_t button, uint8_t owner_events, const xcb_input_event_class_t *classes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_grab_device_button (xcb_connection_t *c, xcb_window_t grab_window, uint8_t grabbed_device, uint8_t modifier_device, uint16_t num_classes, uint16_t modifiers, uint8_t this_device_mode, uint8_t other_device_mode, uint8_t button, uint8_t owner_events, const xcb_input_event_class_t *classes); xcb_input_event_class_t * xcb_input_grab_device_button_classes (const xcb_input_grab_device_button_request_t *R); int xcb_input_grab_device_button_classes_length (const xcb_input_grab_device_button_request_t *R); xcb_generic_iterator_t xcb_input_grab_device_button_classes_end (const xcb_input_grab_device_button_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_ungrab_device_button_checked (xcb_connection_t *c, xcb_window_t grab_window, uint16_t modifiers, uint8_t modifier_device, uint8_t button, uint8_t grabbed_device); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_ungrab_device_button (xcb_connection_t *c, xcb_window_t grab_window, uint16_t modifiers, uint8_t modifier_device, uint8_t button, uint8_t grabbed_device); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_allow_device_events_checked (xcb_connection_t *c, xcb_timestamp_t time, uint8_t mode, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_allow_device_events (xcb_connection_t *c, xcb_timestamp_t time, uint8_t mode, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_focus_cookie_t xcb_input_get_device_focus (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_focus_cookie_t xcb_input_get_device_focus_unchecked (xcb_connection_t *c, uint8_t device_id); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_focus_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_focus_reply_t * xcb_input_get_device_focus_reply (xcb_connection_t *c, xcb_input_get_device_focus_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_set_device_focus_checked (xcb_connection_t *c, xcb_window_t focus, xcb_timestamp_t time, uint8_t revert_to, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_set_device_focus (xcb_connection_t *c, xcb_window_t focus, xcb_timestamp_t time, uint8_t revert_to, uint8_t device_id); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_kbd_feedback_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_kbd_feedback_state_t) */ void xcb_input_kbd_feedback_state_next (xcb_input_kbd_feedback_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_kbd_feedback_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_kbd_feedback_state_end (xcb_input_kbd_feedback_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_ptr_feedback_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_ptr_feedback_state_t) */ void xcb_input_ptr_feedback_state_next (xcb_input_ptr_feedback_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_ptr_feedback_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_ptr_feedback_state_end (xcb_input_ptr_feedback_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_integer_feedback_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_integer_feedback_state_t) */ void xcb_input_integer_feedback_state_next (xcb_input_integer_feedback_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_integer_feedback_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_integer_feedback_state_end (xcb_input_integer_feedback_state_iterator_t i); int xcb_input_string_feedback_state_sizeof (const void *_buffer); xcb_keysym_t * xcb_input_string_feedback_state_keysyms (const xcb_input_string_feedback_state_t *R); int xcb_input_string_feedback_state_keysyms_length (const xcb_input_string_feedback_state_t *R); xcb_generic_iterator_t xcb_input_string_feedback_state_keysyms_end (const xcb_input_string_feedback_state_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_string_feedback_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_string_feedback_state_t) */ void xcb_input_string_feedback_state_next (xcb_input_string_feedback_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_string_feedback_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_string_feedback_state_end (xcb_input_string_feedback_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_bell_feedback_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_bell_feedback_state_t) */ void xcb_input_bell_feedback_state_next (xcb_input_bell_feedback_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_bell_feedback_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_bell_feedback_state_end (xcb_input_bell_feedback_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_led_feedback_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_led_feedback_state_t) */ void xcb_input_led_feedback_state_next (xcb_input_led_feedback_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_led_feedback_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_led_feedback_state_end (xcb_input_led_feedback_state_iterator_t i); xcb_keysym_t * xcb_input_feedback_state_data_string_keysyms (const xcb_input_feedback_state_data_t *S); int xcb_input_feedback_state_data_string_keysyms_length (const xcb_input_feedback_state_t *R, const xcb_input_feedback_state_data_t *S); xcb_generic_iterator_t xcb_input_feedback_state_data_string_keysyms_end (const xcb_input_feedback_state_t *R, const xcb_input_feedback_state_data_t *S); int xcb_input_feedback_state_data_serialize (void **_buffer, uint8_t class_id, const xcb_input_feedback_state_data_t *_aux); int xcb_input_feedback_state_data_unpack (const void *_buffer, uint8_t class_id, xcb_input_feedback_state_data_t *_aux); int xcb_input_feedback_state_data_sizeof (const void *_buffer, uint8_t class_id); int xcb_input_feedback_state_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_feedback_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_feedback_state_t) */ void xcb_input_feedback_state_next (xcb_input_feedback_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_feedback_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_feedback_state_end (xcb_input_feedback_state_iterator_t i); int xcb_input_get_feedback_control_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_feedback_control_cookie_t xcb_input_get_feedback_control (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_feedback_control_cookie_t xcb_input_get_feedback_control_unchecked (xcb_connection_t *c, uint8_t device_id); int xcb_input_get_feedback_control_feedbacks_length (const xcb_input_get_feedback_control_reply_t *R); xcb_input_feedback_state_iterator_t xcb_input_get_feedback_control_feedbacks_iterator (const xcb_input_get_feedback_control_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_feedback_control_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_feedback_control_reply_t * xcb_input_get_feedback_control_reply (xcb_connection_t *c, xcb_input_get_feedback_control_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_kbd_feedback_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_kbd_feedback_ctl_t) */ void xcb_input_kbd_feedback_ctl_next (xcb_input_kbd_feedback_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_kbd_feedback_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_kbd_feedback_ctl_end (xcb_input_kbd_feedback_ctl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_ptr_feedback_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_ptr_feedback_ctl_t) */ void xcb_input_ptr_feedback_ctl_next (xcb_input_ptr_feedback_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_ptr_feedback_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_ptr_feedback_ctl_end (xcb_input_ptr_feedback_ctl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_integer_feedback_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_integer_feedback_ctl_t) */ void xcb_input_integer_feedback_ctl_next (xcb_input_integer_feedback_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_integer_feedback_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_integer_feedback_ctl_end (xcb_input_integer_feedback_ctl_iterator_t i); int xcb_input_string_feedback_ctl_sizeof (const void *_buffer); xcb_keysym_t * xcb_input_string_feedback_ctl_keysyms (const xcb_input_string_feedback_ctl_t *R); int xcb_input_string_feedback_ctl_keysyms_length (const xcb_input_string_feedback_ctl_t *R); xcb_generic_iterator_t xcb_input_string_feedback_ctl_keysyms_end (const xcb_input_string_feedback_ctl_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_string_feedback_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_string_feedback_ctl_t) */ void xcb_input_string_feedback_ctl_next (xcb_input_string_feedback_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_string_feedback_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_string_feedback_ctl_end (xcb_input_string_feedback_ctl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_bell_feedback_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_bell_feedback_ctl_t) */ void xcb_input_bell_feedback_ctl_next (xcb_input_bell_feedback_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_bell_feedback_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_bell_feedback_ctl_end (xcb_input_bell_feedback_ctl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_led_feedback_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_led_feedback_ctl_t) */ void xcb_input_led_feedback_ctl_next (xcb_input_led_feedback_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_led_feedback_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_led_feedback_ctl_end (xcb_input_led_feedback_ctl_iterator_t i); xcb_keysym_t * xcb_input_feedback_ctl_data_string_keysyms (const xcb_input_feedback_ctl_data_t *S); int xcb_input_feedback_ctl_data_string_keysyms_length (const xcb_input_feedback_ctl_t *R, const xcb_input_feedback_ctl_data_t *S); xcb_generic_iterator_t xcb_input_feedback_ctl_data_string_keysyms_end (const xcb_input_feedback_ctl_t *R, const xcb_input_feedback_ctl_data_t *S); int xcb_input_feedback_ctl_data_serialize (void **_buffer, uint8_t class_id, const xcb_input_feedback_ctl_data_t *_aux); int xcb_input_feedback_ctl_data_unpack (const void *_buffer, uint8_t class_id, xcb_input_feedback_ctl_data_t *_aux); int xcb_input_feedback_ctl_data_sizeof (const void *_buffer, uint8_t class_id); int xcb_input_feedback_ctl_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_feedback_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_feedback_ctl_t) */ void xcb_input_feedback_ctl_next (xcb_input_feedback_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_feedback_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_feedback_ctl_end (xcb_input_feedback_ctl_iterator_t i); int xcb_input_change_feedback_control_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_change_feedback_control_checked (xcb_connection_t *c, uint32_t mask, uint8_t device_id, uint8_t feedback_id, xcb_input_feedback_ctl_t *feedback); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_change_feedback_control (xcb_connection_t *c, uint32_t mask, uint8_t device_id, uint8_t feedback_id, xcb_input_feedback_ctl_t *feedback); xcb_input_feedback_ctl_t * xcb_input_change_feedback_control_feedback (const xcb_input_change_feedback_control_request_t *R); int xcb_input_get_device_key_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_key_mapping_cookie_t xcb_input_get_device_key_mapping (xcb_connection_t *c, uint8_t device_id, xcb_input_key_code_t first_keycode, uint8_t count); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_key_mapping_cookie_t xcb_input_get_device_key_mapping_unchecked (xcb_connection_t *c, uint8_t device_id, xcb_input_key_code_t first_keycode, uint8_t count); xcb_keysym_t * xcb_input_get_device_key_mapping_keysyms (const xcb_input_get_device_key_mapping_reply_t *R); int xcb_input_get_device_key_mapping_keysyms_length (const xcb_input_get_device_key_mapping_reply_t *R); xcb_generic_iterator_t xcb_input_get_device_key_mapping_keysyms_end (const xcb_input_get_device_key_mapping_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_key_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_key_mapping_reply_t * xcb_input_get_device_key_mapping_reply (xcb_connection_t *c, xcb_input_get_device_key_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_change_device_key_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_change_device_key_mapping_checked (xcb_connection_t *c, uint8_t device_id, xcb_input_key_code_t first_keycode, uint8_t keysyms_per_keycode, uint8_t keycode_count, const xcb_keysym_t *keysyms); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_change_device_key_mapping (xcb_connection_t *c, uint8_t device_id, xcb_input_key_code_t first_keycode, uint8_t keysyms_per_keycode, uint8_t keycode_count, const xcb_keysym_t *keysyms); xcb_keysym_t * xcb_input_change_device_key_mapping_keysyms (const xcb_input_change_device_key_mapping_request_t *R); int xcb_input_change_device_key_mapping_keysyms_length (const xcb_input_change_device_key_mapping_request_t *R); xcb_generic_iterator_t xcb_input_change_device_key_mapping_keysyms_end (const xcb_input_change_device_key_mapping_request_t *R); int xcb_input_get_device_modifier_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_modifier_mapping_cookie_t xcb_input_get_device_modifier_mapping (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_modifier_mapping_cookie_t xcb_input_get_device_modifier_mapping_unchecked (xcb_connection_t *c, uint8_t device_id); uint8_t * xcb_input_get_device_modifier_mapping_keymaps (const xcb_input_get_device_modifier_mapping_reply_t *R); int xcb_input_get_device_modifier_mapping_keymaps_length (const xcb_input_get_device_modifier_mapping_reply_t *R); xcb_generic_iterator_t xcb_input_get_device_modifier_mapping_keymaps_end (const xcb_input_get_device_modifier_mapping_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_modifier_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_modifier_mapping_reply_t * xcb_input_get_device_modifier_mapping_reply (xcb_connection_t *c, xcb_input_get_device_modifier_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_set_device_modifier_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_set_device_modifier_mapping_cookie_t xcb_input_set_device_modifier_mapping (xcb_connection_t *c, uint8_t device_id, uint8_t keycodes_per_modifier, const uint8_t *keymaps); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_set_device_modifier_mapping_cookie_t xcb_input_set_device_modifier_mapping_unchecked (xcb_connection_t *c, uint8_t device_id, uint8_t keycodes_per_modifier, const uint8_t *keymaps); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_set_device_modifier_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_set_device_modifier_mapping_reply_t * xcb_input_set_device_modifier_mapping_reply (xcb_connection_t *c, xcb_input_set_device_modifier_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_get_device_button_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_button_mapping_cookie_t xcb_input_get_device_button_mapping (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_button_mapping_cookie_t xcb_input_get_device_button_mapping_unchecked (xcb_connection_t *c, uint8_t device_id); uint8_t * xcb_input_get_device_button_mapping_map (const xcb_input_get_device_button_mapping_reply_t *R); int xcb_input_get_device_button_mapping_map_length (const xcb_input_get_device_button_mapping_reply_t *R); xcb_generic_iterator_t xcb_input_get_device_button_mapping_map_end (const xcb_input_get_device_button_mapping_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_button_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_button_mapping_reply_t * xcb_input_get_device_button_mapping_reply (xcb_connection_t *c, xcb_input_get_device_button_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_set_device_button_mapping_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_set_device_button_mapping_cookie_t xcb_input_set_device_button_mapping (xcb_connection_t *c, uint8_t device_id, uint8_t map_size, const uint8_t *map); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_set_device_button_mapping_cookie_t xcb_input_set_device_button_mapping_unchecked (xcb_connection_t *c, uint8_t device_id, uint8_t map_size, const uint8_t *map); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_set_device_button_mapping_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_set_device_button_mapping_reply_t * xcb_input_set_device_button_mapping_reply (xcb_connection_t *c, xcb_input_set_device_button_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_key_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_key_state_t) */ void xcb_input_key_state_next (xcb_input_key_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_key_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_key_state_end (xcb_input_key_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_button_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_button_state_t) */ void xcb_input_button_state_next (xcb_input_button_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_button_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_button_state_end (xcb_input_button_state_iterator_t i); int xcb_input_valuator_state_sizeof (const void *_buffer); int32_t * xcb_input_valuator_state_valuators (const xcb_input_valuator_state_t *R); int xcb_input_valuator_state_valuators_length (const xcb_input_valuator_state_t *R); xcb_generic_iterator_t xcb_input_valuator_state_valuators_end (const xcb_input_valuator_state_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_valuator_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_valuator_state_t) */ void xcb_input_valuator_state_next (xcb_input_valuator_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_valuator_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_valuator_state_end (xcb_input_valuator_state_iterator_t i); int32_t * xcb_input_input_state_data_valuator_valuators (const xcb_input_input_state_data_t *S); int xcb_input_input_state_data_valuator_valuators_length (const xcb_input_input_state_t *R, const xcb_input_input_state_data_t *S); xcb_generic_iterator_t xcb_input_input_state_data_valuator_valuators_end (const xcb_input_input_state_t *R, const xcb_input_input_state_data_t *S); int xcb_input_input_state_data_serialize (void **_buffer, uint8_t class_id, const xcb_input_input_state_data_t *_aux); int xcb_input_input_state_data_unpack (const void *_buffer, uint8_t class_id, xcb_input_input_state_data_t *_aux); int xcb_input_input_state_data_sizeof (const void *_buffer, uint8_t class_id); int xcb_input_input_state_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_input_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_input_state_t) */ void xcb_input_input_state_next (xcb_input_input_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_input_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_input_state_end (xcb_input_input_state_iterator_t i); int xcb_input_query_device_state_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_query_device_state_cookie_t xcb_input_query_device_state (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_query_device_state_cookie_t xcb_input_query_device_state_unchecked (xcb_connection_t *c, uint8_t device_id); int xcb_input_query_device_state_classes_length (const xcb_input_query_device_state_reply_t *R); xcb_input_input_state_iterator_t xcb_input_query_device_state_classes_iterator (const xcb_input_query_device_state_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_query_device_state_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_query_device_state_reply_t * xcb_input_query_device_state_reply (xcb_connection_t *c, xcb_input_query_device_state_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_device_bell_checked (xcb_connection_t *c, uint8_t device_id, uint8_t feedback_id, uint8_t feedback_class, int8_t percent); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_device_bell (xcb_connection_t *c, uint8_t device_id, uint8_t feedback_id, uint8_t feedback_class, int8_t percent); int xcb_input_set_device_valuators_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_set_device_valuators_cookie_t xcb_input_set_device_valuators (xcb_connection_t *c, uint8_t device_id, uint8_t first_valuator, uint8_t num_valuators, const int32_t *valuators); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_set_device_valuators_cookie_t xcb_input_set_device_valuators_unchecked (xcb_connection_t *c, uint8_t device_id, uint8_t first_valuator, uint8_t num_valuators, const int32_t *valuators); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_set_device_valuators_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_set_device_valuators_reply_t * xcb_input_set_device_valuators_reply (xcb_connection_t *c, xcb_input_set_device_valuators_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_device_resolution_state_sizeof (const void *_buffer); uint32_t * xcb_input_device_resolution_state_resolution_values (const xcb_input_device_resolution_state_t *R); int xcb_input_device_resolution_state_resolution_values_length (const xcb_input_device_resolution_state_t *R); xcb_generic_iterator_t xcb_input_device_resolution_state_resolution_values_end (const xcb_input_device_resolution_state_t *R); uint32_t * xcb_input_device_resolution_state_resolution_min (const xcb_input_device_resolution_state_t *R); int xcb_input_device_resolution_state_resolution_min_length (const xcb_input_device_resolution_state_t *R); xcb_generic_iterator_t xcb_input_device_resolution_state_resolution_min_end (const xcb_input_device_resolution_state_t *R); uint32_t * xcb_input_device_resolution_state_resolution_max (const xcb_input_device_resolution_state_t *R); int xcb_input_device_resolution_state_resolution_max_length (const xcb_input_device_resolution_state_t *R); xcb_generic_iterator_t xcb_input_device_resolution_state_resolution_max_end (const xcb_input_device_resolution_state_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_resolution_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_resolution_state_t) */ void xcb_input_device_resolution_state_next (xcb_input_device_resolution_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_resolution_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_resolution_state_end (xcb_input_device_resolution_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_abs_calib_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_abs_calib_state_t) */ void xcb_input_device_abs_calib_state_next (xcb_input_device_abs_calib_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_abs_calib_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_abs_calib_state_end (xcb_input_device_abs_calib_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_abs_area_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_abs_area_state_t) */ void xcb_input_device_abs_area_state_next (xcb_input_device_abs_area_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_abs_area_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_abs_area_state_end (xcb_input_device_abs_area_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_core_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_core_state_t) */ void xcb_input_device_core_state_next (xcb_input_device_core_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_core_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_core_state_end (xcb_input_device_core_state_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_enable_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_enable_state_t) */ void xcb_input_device_enable_state_next (xcb_input_device_enable_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_enable_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_enable_state_end (xcb_input_device_enable_state_iterator_t i); uint32_t * xcb_input_device_state_data_resolution_resolution_values (const xcb_input_device_state_data_t *S); int xcb_input_device_state_data_resolution_resolution_values_length (const xcb_input_device_state_t *R, const xcb_input_device_state_data_t *S); xcb_generic_iterator_t xcb_input_device_state_data_resolution_resolution_values_end (const xcb_input_device_state_t *R, const xcb_input_device_state_data_t *S); uint32_t * xcb_input_device_state_data_resolution_resolution_min (const xcb_input_device_state_data_t *S); int xcb_input_device_state_data_resolution_resolution_min_length (const xcb_input_device_state_t *R, const xcb_input_device_state_data_t *S); xcb_generic_iterator_t xcb_input_device_state_data_resolution_resolution_min_end (const xcb_input_device_state_t *R, const xcb_input_device_state_data_t *S); uint32_t * xcb_input_device_state_data_resolution_resolution_max (const xcb_input_device_state_data_t *S); int xcb_input_device_state_data_resolution_resolution_max_length (const xcb_input_device_state_t *R, const xcb_input_device_state_data_t *S); xcb_generic_iterator_t xcb_input_device_state_data_resolution_resolution_max_end (const xcb_input_device_state_t *R, const xcb_input_device_state_data_t *S); int xcb_input_device_state_data_serialize (void **_buffer, uint16_t control_id, const xcb_input_device_state_data_t *_aux); int xcb_input_device_state_data_unpack (const void *_buffer, uint16_t control_id, xcb_input_device_state_data_t *_aux); int xcb_input_device_state_data_sizeof (const void *_buffer, uint16_t control_id); int xcb_input_device_state_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_state_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_state_t) */ void xcb_input_device_state_next (xcb_input_device_state_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_state_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_state_end (xcb_input_device_state_iterator_t i); int xcb_input_get_device_control_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_control_cookie_t xcb_input_get_device_control (xcb_connection_t *c, uint16_t control_id, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_control_cookie_t xcb_input_get_device_control_unchecked (xcb_connection_t *c, uint16_t control_id, uint8_t device_id); xcb_input_device_state_t * xcb_input_get_device_control_control (const xcb_input_get_device_control_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_control_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_control_reply_t * xcb_input_get_device_control_reply (xcb_connection_t *c, xcb_input_get_device_control_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_device_resolution_ctl_sizeof (const void *_buffer); uint32_t * xcb_input_device_resolution_ctl_resolution_values (const xcb_input_device_resolution_ctl_t *R); int xcb_input_device_resolution_ctl_resolution_values_length (const xcb_input_device_resolution_ctl_t *R); xcb_generic_iterator_t xcb_input_device_resolution_ctl_resolution_values_end (const xcb_input_device_resolution_ctl_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_resolution_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_resolution_ctl_t) */ void xcb_input_device_resolution_ctl_next (xcb_input_device_resolution_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_resolution_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_resolution_ctl_end (xcb_input_device_resolution_ctl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_abs_calib_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_abs_calib_ctl_t) */ void xcb_input_device_abs_calib_ctl_next (xcb_input_device_abs_calib_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_abs_calib_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_abs_calib_ctl_end (xcb_input_device_abs_calib_ctl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_abs_area_ctrl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_abs_area_ctrl_t) */ void xcb_input_device_abs_area_ctrl_next (xcb_input_device_abs_area_ctrl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_abs_area_ctrl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_abs_area_ctrl_end (xcb_input_device_abs_area_ctrl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_core_ctrl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_core_ctrl_t) */ void xcb_input_device_core_ctrl_next (xcb_input_device_core_ctrl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_core_ctrl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_core_ctrl_end (xcb_input_device_core_ctrl_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_enable_ctrl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_enable_ctrl_t) */ void xcb_input_device_enable_ctrl_next (xcb_input_device_enable_ctrl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_enable_ctrl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_enable_ctrl_end (xcb_input_device_enable_ctrl_iterator_t i); uint32_t * xcb_input_device_ctl_data_resolution_resolution_values (const xcb_input_device_ctl_data_t *S); int xcb_input_device_ctl_data_resolution_resolution_values_length (const xcb_input_device_ctl_t *R, const xcb_input_device_ctl_data_t *S); xcb_generic_iterator_t xcb_input_device_ctl_data_resolution_resolution_values_end (const xcb_input_device_ctl_t *R, const xcb_input_device_ctl_data_t *S); int xcb_input_device_ctl_data_serialize (void **_buffer, uint16_t control_id, const xcb_input_device_ctl_data_t *_aux); int xcb_input_device_ctl_data_unpack (const void *_buffer, uint16_t control_id, xcb_input_device_ctl_data_t *_aux); int xcb_input_device_ctl_data_sizeof (const void *_buffer, uint16_t control_id); int xcb_input_device_ctl_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_ctl_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_ctl_t) */ void xcb_input_device_ctl_next (xcb_input_device_ctl_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_ctl_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_ctl_end (xcb_input_device_ctl_iterator_t i); int xcb_input_change_device_control_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_change_device_control_cookie_t xcb_input_change_device_control (xcb_connection_t *c, uint16_t control_id, uint8_t device_id, xcb_input_device_ctl_t *control); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_change_device_control_cookie_t xcb_input_change_device_control_unchecked (xcb_connection_t *c, uint16_t control_id, uint8_t device_id, xcb_input_device_ctl_t *control); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_change_device_control_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_change_device_control_reply_t * xcb_input_change_device_control_reply (xcb_connection_t *c, xcb_input_change_device_control_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_list_device_properties_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_list_device_properties_cookie_t xcb_input_list_device_properties (xcb_connection_t *c, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_list_device_properties_cookie_t xcb_input_list_device_properties_unchecked (xcb_connection_t *c, uint8_t device_id); xcb_atom_t * xcb_input_list_device_properties_atoms (const xcb_input_list_device_properties_reply_t *R); int xcb_input_list_device_properties_atoms_length (const xcb_input_list_device_properties_reply_t *R); xcb_generic_iterator_t xcb_input_list_device_properties_atoms_end (const xcb_input_list_device_properties_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_list_device_properties_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_list_device_properties_reply_t * xcb_input_list_device_properties_reply (xcb_connection_t *c, xcb_input_list_device_properties_cookie_t cookie /**< */, xcb_generic_error_t **e); uint8_t * xcb_input_change_device_property_items_data_8 (const xcb_input_change_device_property_items_t *S); int xcb_input_change_device_property_items_data_8_length (const xcb_input_change_device_property_request_t *R, const xcb_input_change_device_property_items_t *S); xcb_generic_iterator_t xcb_input_change_device_property_items_data_8_end (const xcb_input_change_device_property_request_t *R, const xcb_input_change_device_property_items_t *S); uint16_t * xcb_input_change_device_property_items_data_16 (const xcb_input_change_device_property_items_t *S); int xcb_input_change_device_property_items_data_16_length (const xcb_input_change_device_property_request_t *R, const xcb_input_change_device_property_items_t *S); xcb_generic_iterator_t xcb_input_change_device_property_items_data_16_end (const xcb_input_change_device_property_request_t *R, const xcb_input_change_device_property_items_t *S); uint32_t * xcb_input_change_device_property_items_data_32 (const xcb_input_change_device_property_items_t *S); int xcb_input_change_device_property_items_data_32_length (const xcb_input_change_device_property_request_t *R, const xcb_input_change_device_property_items_t *S); xcb_generic_iterator_t xcb_input_change_device_property_items_data_32_end (const xcb_input_change_device_property_request_t *R, const xcb_input_change_device_property_items_t *S); int xcb_input_change_device_property_items_serialize (void **_buffer, uint32_t num_items, uint8_t format, const xcb_input_change_device_property_items_t *_aux); int xcb_input_change_device_property_items_unpack (const void *_buffer, uint32_t num_items, uint8_t format, xcb_input_change_device_property_items_t *_aux); int xcb_input_change_device_property_items_sizeof (const void *_buffer, uint32_t num_items, uint8_t format); int xcb_input_change_device_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_change_device_property_checked (xcb_connection_t *c, xcb_atom_t property, xcb_atom_t type, uint8_t device_id, uint8_t format, uint8_t mode, uint32_t num_items, const void *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_change_device_property (xcb_connection_t *c, xcb_atom_t property, xcb_atom_t type, uint8_t device_id, uint8_t format, uint8_t mode, uint32_t num_items, const void *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_change_device_property_aux_checked (xcb_connection_t *c, xcb_atom_t property, xcb_atom_t type, uint8_t device_id, uint8_t format, uint8_t mode, uint32_t num_items, const xcb_input_change_device_property_items_t *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_change_device_property_aux (xcb_connection_t *c, xcb_atom_t property, xcb_atom_t type, uint8_t device_id, uint8_t format, uint8_t mode, uint32_t num_items, const xcb_input_change_device_property_items_t *items); void * xcb_input_change_device_property_items (const xcb_input_change_device_property_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_delete_device_property_checked (xcb_connection_t *c, xcb_atom_t property, uint8_t device_id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_delete_device_property (xcb_connection_t *c, xcb_atom_t property, uint8_t device_id); uint8_t * xcb_input_get_device_property_items_data_8 (const xcb_input_get_device_property_items_t *S); int xcb_input_get_device_property_items_data_8_length (const xcb_input_get_device_property_reply_t *R, const xcb_input_get_device_property_items_t *S); xcb_generic_iterator_t xcb_input_get_device_property_items_data_8_end (const xcb_input_get_device_property_reply_t *R, const xcb_input_get_device_property_items_t *S); uint16_t * xcb_input_get_device_property_items_data_16 (const xcb_input_get_device_property_items_t *S); int xcb_input_get_device_property_items_data_16_length (const xcb_input_get_device_property_reply_t *R, const xcb_input_get_device_property_items_t *S); xcb_generic_iterator_t xcb_input_get_device_property_items_data_16_end (const xcb_input_get_device_property_reply_t *R, const xcb_input_get_device_property_items_t *S); uint32_t * xcb_input_get_device_property_items_data_32 (const xcb_input_get_device_property_items_t *S); int xcb_input_get_device_property_items_data_32_length (const xcb_input_get_device_property_reply_t *R, const xcb_input_get_device_property_items_t *S); xcb_generic_iterator_t xcb_input_get_device_property_items_data_32_end (const xcb_input_get_device_property_reply_t *R, const xcb_input_get_device_property_items_t *S); int xcb_input_get_device_property_items_serialize (void **_buffer, uint32_t num_items, uint8_t format, const xcb_input_get_device_property_items_t *_aux); int xcb_input_get_device_property_items_unpack (const void *_buffer, uint32_t num_items, uint8_t format, xcb_input_get_device_property_items_t *_aux); int xcb_input_get_device_property_items_sizeof (const void *_buffer, uint32_t num_items, uint8_t format); int xcb_input_get_device_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_get_device_property_cookie_t xcb_input_get_device_property (xcb_connection_t *c, xcb_atom_t property, xcb_atom_t type, uint32_t offset, uint32_t len, uint8_t device_id, uint8_t _delete); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_get_device_property_cookie_t xcb_input_get_device_property_unchecked (xcb_connection_t *c, xcb_atom_t property, xcb_atom_t type, uint32_t offset, uint32_t len, uint8_t device_id, uint8_t _delete); void * xcb_input_get_device_property_items (const xcb_input_get_device_property_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_get_device_property_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_get_device_property_reply_t * xcb_input_get_device_property_reply (xcb_connection_t *c, xcb_input_get_device_property_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_group_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_group_info_t) */ void xcb_input_group_info_next (xcb_input_group_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_group_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_group_info_end (xcb_input_group_info_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_modifier_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_modifier_info_t) */ void xcb_input_modifier_info_next (xcb_input_modifier_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_modifier_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_modifier_info_end (xcb_input_modifier_info_iterator_t i); int xcb_input_xi_query_pointer_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_query_pointer_cookie_t xcb_input_xi_query_pointer (xcb_connection_t *c, xcb_window_t window, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_query_pointer_cookie_t xcb_input_xi_query_pointer_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_input_device_id_t deviceid); uint32_t * xcb_input_xi_query_pointer_buttons (const xcb_input_xi_query_pointer_reply_t *R); int xcb_input_xi_query_pointer_buttons_length (const xcb_input_xi_query_pointer_reply_t *R); xcb_generic_iterator_t xcb_input_xi_query_pointer_buttons_end (const xcb_input_xi_query_pointer_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_query_pointer_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_query_pointer_reply_t * xcb_input_xi_query_pointer_reply (xcb_connection_t *c, xcb_input_xi_query_pointer_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_warp_pointer_checked (xcb_connection_t *c, xcb_window_t src_win, xcb_window_t dst_win, xcb_input_fp1616_t src_x, xcb_input_fp1616_t src_y, uint16_t src_width, uint16_t src_height, xcb_input_fp1616_t dst_x, xcb_input_fp1616_t dst_y, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_warp_pointer (xcb_connection_t *c, xcb_window_t src_win, xcb_window_t dst_win, xcb_input_fp1616_t src_x, xcb_input_fp1616_t src_y, uint16_t src_width, uint16_t src_height, xcb_input_fp1616_t dst_x, xcb_input_fp1616_t dst_y, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_change_cursor_checked (xcb_connection_t *c, xcb_window_t window, xcb_cursor_t cursor, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_change_cursor (xcb_connection_t *c, xcb_window_t window, xcb_cursor_t cursor, xcb_input_device_id_t deviceid); int xcb_input_add_master_sizeof (const void *_buffer); char * xcb_input_add_master_name (const xcb_input_add_master_t *R); int xcb_input_add_master_name_length (const xcb_input_add_master_t *R); xcb_generic_iterator_t xcb_input_add_master_name_end (const xcb_input_add_master_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_add_master_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_add_master_t) */ void xcb_input_add_master_next (xcb_input_add_master_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_add_master_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_add_master_end (xcb_input_add_master_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_remove_master_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_remove_master_t) */ void xcb_input_remove_master_next (xcb_input_remove_master_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_remove_master_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_remove_master_end (xcb_input_remove_master_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_attach_slave_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_attach_slave_t) */ void xcb_input_attach_slave_next (xcb_input_attach_slave_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_attach_slave_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_attach_slave_end (xcb_input_attach_slave_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_detach_slave_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_detach_slave_t) */ void xcb_input_detach_slave_next (xcb_input_detach_slave_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_detach_slave_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_detach_slave_end (xcb_input_detach_slave_iterator_t i); char * xcb_input_hierarchy_change_data_add_master_name (const xcb_input_hierarchy_change_data_t *S); int xcb_input_hierarchy_change_data_add_master_name_length (const xcb_input_hierarchy_change_t *R, const xcb_input_hierarchy_change_data_t *S); xcb_generic_iterator_t xcb_input_hierarchy_change_data_add_master_name_end (const xcb_input_hierarchy_change_t *R, const xcb_input_hierarchy_change_data_t *S); int xcb_input_hierarchy_change_data_serialize (void **_buffer, uint16_t type, const xcb_input_hierarchy_change_data_t *_aux); int xcb_input_hierarchy_change_data_unpack (const void *_buffer, uint16_t type, xcb_input_hierarchy_change_data_t *_aux); int xcb_input_hierarchy_change_data_sizeof (const void *_buffer, uint16_t type); int xcb_input_hierarchy_change_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_hierarchy_change_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_hierarchy_change_t) */ void xcb_input_hierarchy_change_next (xcb_input_hierarchy_change_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_hierarchy_change_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_hierarchy_change_end (xcb_input_hierarchy_change_iterator_t i); int xcb_input_xi_change_hierarchy_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_change_hierarchy_checked (xcb_connection_t *c, uint8_t num_changes, const xcb_input_hierarchy_change_t *changes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_change_hierarchy (xcb_connection_t *c, uint8_t num_changes, const xcb_input_hierarchy_change_t *changes); int xcb_input_xi_change_hierarchy_changes_length (const xcb_input_xi_change_hierarchy_request_t *R); xcb_input_hierarchy_change_iterator_t xcb_input_xi_change_hierarchy_changes_iterator (const xcb_input_xi_change_hierarchy_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_set_client_pointer_checked (xcb_connection_t *c, xcb_window_t window, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_set_client_pointer (xcb_connection_t *c, xcb_window_t window, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_get_client_pointer_cookie_t xcb_input_xi_get_client_pointer (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_get_client_pointer_cookie_t xcb_input_xi_get_client_pointer_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_get_client_pointer_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_get_client_pointer_reply_t * xcb_input_xi_get_client_pointer_reply (xcb_connection_t *c, xcb_input_xi_get_client_pointer_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_event_mask_sizeof (const void *_buffer); uint32_t * xcb_input_event_mask_mask (const xcb_input_event_mask_t *R); int xcb_input_event_mask_mask_length (const xcb_input_event_mask_t *R); xcb_generic_iterator_t xcb_input_event_mask_mask_end (const xcb_input_event_mask_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_event_mask_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_event_mask_t) */ void xcb_input_event_mask_next (xcb_input_event_mask_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_event_mask_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_event_mask_end (xcb_input_event_mask_iterator_t i); int xcb_input_xi_select_events_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_select_events_checked (xcb_connection_t *c, xcb_window_t window, uint16_t num_mask, const xcb_input_event_mask_t *masks); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_select_events (xcb_connection_t *c, xcb_window_t window, uint16_t num_mask, const xcb_input_event_mask_t *masks); int xcb_input_xi_select_events_masks_length (const xcb_input_xi_select_events_request_t *R); xcb_input_event_mask_iterator_t xcb_input_xi_select_events_masks_iterator (const xcb_input_xi_select_events_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_query_version_cookie_t xcb_input_xi_query_version (xcb_connection_t *c, uint16_t major_version, uint16_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_query_version_cookie_t xcb_input_xi_query_version_unchecked (xcb_connection_t *c, uint16_t major_version, uint16_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_query_version_reply_t * xcb_input_xi_query_version_reply (xcb_connection_t *c, xcb_input_xi_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_button_class_sizeof (const void *_buffer); uint32_t * xcb_input_button_class_state (const xcb_input_button_class_t *R); int xcb_input_button_class_state_length (const xcb_input_button_class_t *R); xcb_generic_iterator_t xcb_input_button_class_state_end (const xcb_input_button_class_t *R); xcb_atom_t * xcb_input_button_class_labels (const xcb_input_button_class_t *R); int xcb_input_button_class_labels_length (const xcb_input_button_class_t *R); xcb_generic_iterator_t xcb_input_button_class_labels_end (const xcb_input_button_class_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_button_class_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_button_class_t) */ void xcb_input_button_class_next (xcb_input_button_class_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_button_class_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_button_class_end (xcb_input_button_class_iterator_t i); int xcb_input_key_class_sizeof (const void *_buffer); uint32_t * xcb_input_key_class_keys (const xcb_input_key_class_t *R); int xcb_input_key_class_keys_length (const xcb_input_key_class_t *R); xcb_generic_iterator_t xcb_input_key_class_keys_end (const xcb_input_key_class_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_key_class_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_key_class_t) */ void xcb_input_key_class_next (xcb_input_key_class_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_key_class_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_key_class_end (xcb_input_key_class_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_scroll_class_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_scroll_class_t) */ void xcb_input_scroll_class_next (xcb_input_scroll_class_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_scroll_class_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_scroll_class_end (xcb_input_scroll_class_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_touch_class_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_touch_class_t) */ void xcb_input_touch_class_next (xcb_input_touch_class_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_touch_class_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_touch_class_end (xcb_input_touch_class_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_valuator_class_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_valuator_class_t) */ void xcb_input_valuator_class_next (xcb_input_valuator_class_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_valuator_class_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_valuator_class_end (xcb_input_valuator_class_iterator_t i); uint32_t * xcb_input_device_class_data_key_keys (const xcb_input_device_class_data_t *S); int xcb_input_device_class_data_key_keys_length (const xcb_input_device_class_t *R, const xcb_input_device_class_data_t *S); xcb_generic_iterator_t xcb_input_device_class_data_key_keys_end (const xcb_input_device_class_t *R, const xcb_input_device_class_data_t *S); uint32_t * xcb_input_device_class_data_button_state (const xcb_input_device_class_data_t *S); int xcb_input_device_class_data_button_state_length (const xcb_input_device_class_t *R, const xcb_input_device_class_data_t *S); xcb_generic_iterator_t xcb_input_device_class_data_button_state_end (const xcb_input_device_class_t *R, const xcb_input_device_class_data_t *S); xcb_atom_t * xcb_input_device_class_data_button_labels (const xcb_input_device_class_data_t *S); int xcb_input_device_class_data_button_labels_length (const xcb_input_device_class_t *R, const xcb_input_device_class_data_t *S); xcb_generic_iterator_t xcb_input_device_class_data_button_labels_end (const xcb_input_device_class_t *R, const xcb_input_device_class_data_t *S); int xcb_input_device_class_data_serialize (void **_buffer, uint16_t type, const xcb_input_device_class_data_t *_aux); int xcb_input_device_class_data_unpack (const void *_buffer, uint16_t type, xcb_input_device_class_data_t *_aux); int xcb_input_device_class_data_sizeof (const void *_buffer, uint16_t type); int xcb_input_device_class_sizeof (const void *_buffer); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_device_class_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_device_class_t) */ void xcb_input_device_class_next (xcb_input_device_class_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_device_class_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_device_class_end (xcb_input_device_class_iterator_t i); int xcb_input_xi_device_info_sizeof (const void *_buffer); char * xcb_input_xi_device_info_name (const xcb_input_xi_device_info_t *R); int xcb_input_xi_device_info_name_length (const xcb_input_xi_device_info_t *R); xcb_generic_iterator_t xcb_input_xi_device_info_name_end (const xcb_input_xi_device_info_t *R); int xcb_input_xi_device_info_classes_length (const xcb_input_xi_device_info_t *R); xcb_input_device_class_iterator_t xcb_input_xi_device_info_classes_iterator (const xcb_input_xi_device_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_xi_device_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_xi_device_info_t) */ void xcb_input_xi_device_info_next (xcb_input_xi_device_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_xi_device_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_xi_device_info_end (xcb_input_xi_device_info_iterator_t i); int xcb_input_xi_query_device_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_query_device_cookie_t xcb_input_xi_query_device (xcb_connection_t *c, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_query_device_cookie_t xcb_input_xi_query_device_unchecked (xcb_connection_t *c, xcb_input_device_id_t deviceid); int xcb_input_xi_query_device_infos_length (const xcb_input_xi_query_device_reply_t *R); xcb_input_xi_device_info_iterator_t xcb_input_xi_query_device_infos_iterator (const xcb_input_xi_query_device_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_query_device_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_query_device_reply_t * xcb_input_xi_query_device_reply (xcb_connection_t *c, xcb_input_xi_query_device_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_set_focus_checked (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t time, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_set_focus (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t time, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_get_focus_cookie_t xcb_input_xi_get_focus (xcb_connection_t *c, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_get_focus_cookie_t xcb_input_xi_get_focus_unchecked (xcb_connection_t *c, xcb_input_device_id_t deviceid); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_get_focus_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_get_focus_reply_t * xcb_input_xi_get_focus_reply (xcb_connection_t *c, xcb_input_xi_get_focus_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_xi_grab_device_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_grab_device_cookie_t xcb_input_xi_grab_device (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t time, xcb_cursor_t cursor, xcb_input_device_id_t deviceid, uint8_t mode, uint8_t paired_device_mode, uint8_t owner_events, uint16_t mask_len, const uint32_t *mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_grab_device_cookie_t xcb_input_xi_grab_device_unchecked (xcb_connection_t *c, xcb_window_t window, xcb_timestamp_t time, xcb_cursor_t cursor, xcb_input_device_id_t deviceid, uint8_t mode, uint8_t paired_device_mode, uint8_t owner_events, uint16_t mask_len, const uint32_t *mask); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_grab_device_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_grab_device_reply_t * xcb_input_xi_grab_device_reply (xcb_connection_t *c, xcb_input_xi_grab_device_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_ungrab_device_checked (xcb_connection_t *c, xcb_timestamp_t time, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_ungrab_device (xcb_connection_t *c, xcb_timestamp_t time, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_allow_events_checked (xcb_connection_t *c, xcb_timestamp_t time, xcb_input_device_id_t deviceid, uint8_t event_mode, uint32_t touchid, xcb_window_t grab_window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_allow_events (xcb_connection_t *c, xcb_timestamp_t time, xcb_input_device_id_t deviceid, uint8_t event_mode, uint32_t touchid, xcb_window_t grab_window); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_grab_modifier_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_grab_modifier_info_t) */ void xcb_input_grab_modifier_info_next (xcb_input_grab_modifier_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_grab_modifier_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_grab_modifier_info_end (xcb_input_grab_modifier_info_iterator_t i); int xcb_input_xi_passive_grab_device_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_passive_grab_device_cookie_t xcb_input_xi_passive_grab_device (xcb_connection_t *c, xcb_timestamp_t time, xcb_window_t grab_window, xcb_cursor_t cursor, uint32_t detail, xcb_input_device_id_t deviceid, uint16_t num_modifiers, uint16_t mask_len, uint8_t grab_type, uint8_t grab_mode, uint8_t paired_device_mode, uint8_t owner_events, const uint32_t *mask, const uint32_t *modifiers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_passive_grab_device_cookie_t xcb_input_xi_passive_grab_device_unchecked (xcb_connection_t *c, xcb_timestamp_t time, xcb_window_t grab_window, xcb_cursor_t cursor, uint32_t detail, xcb_input_device_id_t deviceid, uint16_t num_modifiers, uint16_t mask_len, uint8_t grab_type, uint8_t grab_mode, uint8_t paired_device_mode, uint8_t owner_events, const uint32_t *mask, const uint32_t *modifiers); xcb_input_grab_modifier_info_t * xcb_input_xi_passive_grab_device_modifiers (const xcb_input_xi_passive_grab_device_reply_t *R); int xcb_input_xi_passive_grab_device_modifiers_length (const xcb_input_xi_passive_grab_device_reply_t *R); xcb_input_grab_modifier_info_iterator_t xcb_input_xi_passive_grab_device_modifiers_iterator (const xcb_input_xi_passive_grab_device_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_passive_grab_device_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_passive_grab_device_reply_t * xcb_input_xi_passive_grab_device_reply (xcb_connection_t *c, xcb_input_xi_passive_grab_device_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_xi_passive_ungrab_device_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_passive_ungrab_device_checked (xcb_connection_t *c, xcb_window_t grab_window, uint32_t detail, xcb_input_device_id_t deviceid, uint16_t num_modifiers, uint8_t grab_type, const uint32_t *modifiers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_passive_ungrab_device (xcb_connection_t *c, xcb_window_t grab_window, uint32_t detail, xcb_input_device_id_t deviceid, uint16_t num_modifiers, uint8_t grab_type, const uint32_t *modifiers); uint32_t * xcb_input_xi_passive_ungrab_device_modifiers (const xcb_input_xi_passive_ungrab_device_request_t *R); int xcb_input_xi_passive_ungrab_device_modifiers_length (const xcb_input_xi_passive_ungrab_device_request_t *R); xcb_generic_iterator_t xcb_input_xi_passive_ungrab_device_modifiers_end (const xcb_input_xi_passive_ungrab_device_request_t *R); int xcb_input_xi_list_properties_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_list_properties_cookie_t xcb_input_xi_list_properties (xcb_connection_t *c, xcb_input_device_id_t deviceid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_list_properties_cookie_t xcb_input_xi_list_properties_unchecked (xcb_connection_t *c, xcb_input_device_id_t deviceid); xcb_atom_t * xcb_input_xi_list_properties_properties (const xcb_input_xi_list_properties_reply_t *R); int xcb_input_xi_list_properties_properties_length (const xcb_input_xi_list_properties_reply_t *R); xcb_generic_iterator_t xcb_input_xi_list_properties_properties_end (const xcb_input_xi_list_properties_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_list_properties_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_list_properties_reply_t * xcb_input_xi_list_properties_reply (xcb_connection_t *c, xcb_input_xi_list_properties_cookie_t cookie /**< */, xcb_generic_error_t **e); uint8_t * xcb_input_xi_change_property_items_data_8 (const xcb_input_xi_change_property_items_t *S); int xcb_input_xi_change_property_items_data_8_length (const xcb_input_xi_change_property_request_t *R, const xcb_input_xi_change_property_items_t *S); xcb_generic_iterator_t xcb_input_xi_change_property_items_data_8_end (const xcb_input_xi_change_property_request_t *R, const xcb_input_xi_change_property_items_t *S); uint16_t * xcb_input_xi_change_property_items_data_16 (const xcb_input_xi_change_property_items_t *S); int xcb_input_xi_change_property_items_data_16_length (const xcb_input_xi_change_property_request_t *R, const xcb_input_xi_change_property_items_t *S); xcb_generic_iterator_t xcb_input_xi_change_property_items_data_16_end (const xcb_input_xi_change_property_request_t *R, const xcb_input_xi_change_property_items_t *S); uint32_t * xcb_input_xi_change_property_items_data_32 (const xcb_input_xi_change_property_items_t *S); int xcb_input_xi_change_property_items_data_32_length (const xcb_input_xi_change_property_request_t *R, const xcb_input_xi_change_property_items_t *S); xcb_generic_iterator_t xcb_input_xi_change_property_items_data_32_end (const xcb_input_xi_change_property_request_t *R, const xcb_input_xi_change_property_items_t *S); int xcb_input_xi_change_property_items_serialize (void **_buffer, uint32_t num_items, uint8_t format, const xcb_input_xi_change_property_items_t *_aux); int xcb_input_xi_change_property_items_unpack (const void *_buffer, uint32_t num_items, uint8_t format, xcb_input_xi_change_property_items_t *_aux); int xcb_input_xi_change_property_items_sizeof (const void *_buffer, uint32_t num_items, uint8_t format); int xcb_input_xi_change_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_change_property_checked (xcb_connection_t *c, xcb_input_device_id_t deviceid, uint8_t mode, uint8_t format, xcb_atom_t property, xcb_atom_t type, uint32_t num_items, const void *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_change_property (xcb_connection_t *c, xcb_input_device_id_t deviceid, uint8_t mode, uint8_t format, xcb_atom_t property, xcb_atom_t type, uint32_t num_items, const void *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_change_property_aux_checked (xcb_connection_t *c, xcb_input_device_id_t deviceid, uint8_t mode, uint8_t format, xcb_atom_t property, xcb_atom_t type, uint32_t num_items, const xcb_input_xi_change_property_items_t *items); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_change_property_aux (xcb_connection_t *c, xcb_input_device_id_t deviceid, uint8_t mode, uint8_t format, xcb_atom_t property, xcb_atom_t type, uint32_t num_items, const xcb_input_xi_change_property_items_t *items); void * xcb_input_xi_change_property_items (const xcb_input_xi_change_property_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_delete_property_checked (xcb_connection_t *c, xcb_input_device_id_t deviceid, xcb_atom_t property); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_delete_property (xcb_connection_t *c, xcb_input_device_id_t deviceid, xcb_atom_t property); uint8_t * xcb_input_xi_get_property_items_data_8 (const xcb_input_xi_get_property_items_t *S); int xcb_input_xi_get_property_items_data_8_length (const xcb_input_xi_get_property_reply_t *R, const xcb_input_xi_get_property_items_t *S); xcb_generic_iterator_t xcb_input_xi_get_property_items_data_8_end (const xcb_input_xi_get_property_reply_t *R, const xcb_input_xi_get_property_items_t *S); uint16_t * xcb_input_xi_get_property_items_data_16 (const xcb_input_xi_get_property_items_t *S); int xcb_input_xi_get_property_items_data_16_length (const xcb_input_xi_get_property_reply_t *R, const xcb_input_xi_get_property_items_t *S); xcb_generic_iterator_t xcb_input_xi_get_property_items_data_16_end (const xcb_input_xi_get_property_reply_t *R, const xcb_input_xi_get_property_items_t *S); uint32_t * xcb_input_xi_get_property_items_data_32 (const xcb_input_xi_get_property_items_t *S); int xcb_input_xi_get_property_items_data_32_length (const xcb_input_xi_get_property_reply_t *R, const xcb_input_xi_get_property_items_t *S); xcb_generic_iterator_t xcb_input_xi_get_property_items_data_32_end (const xcb_input_xi_get_property_reply_t *R, const xcb_input_xi_get_property_items_t *S); int xcb_input_xi_get_property_items_serialize (void **_buffer, uint32_t num_items, uint8_t format, const xcb_input_xi_get_property_items_t *_aux); int xcb_input_xi_get_property_items_unpack (const void *_buffer, uint32_t num_items, uint8_t format, xcb_input_xi_get_property_items_t *_aux); int xcb_input_xi_get_property_items_sizeof (const void *_buffer, uint32_t num_items, uint8_t format); int xcb_input_xi_get_property_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_get_property_cookie_t xcb_input_xi_get_property (xcb_connection_t *c, xcb_input_device_id_t deviceid, uint8_t _delete, xcb_atom_t property, xcb_atom_t type, uint32_t offset, uint32_t len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_get_property_cookie_t xcb_input_xi_get_property_unchecked (xcb_connection_t *c, xcb_input_device_id_t deviceid, uint8_t _delete, xcb_atom_t property, xcb_atom_t type, uint32_t offset, uint32_t len); void * xcb_input_xi_get_property_items (const xcb_input_xi_get_property_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_get_property_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_get_property_reply_t * xcb_input_xi_get_property_reply (xcb_connection_t *c, xcb_input_xi_get_property_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_input_xi_get_selected_events_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_input_xi_get_selected_events_cookie_t xcb_input_xi_get_selected_events (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_input_xi_get_selected_events_cookie_t xcb_input_xi_get_selected_events_unchecked (xcb_connection_t *c, xcb_window_t window); int xcb_input_xi_get_selected_events_masks_length (const xcb_input_xi_get_selected_events_reply_t *R); xcb_input_event_mask_iterator_t xcb_input_xi_get_selected_events_masks_iterator (const xcb_input_xi_get_selected_events_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_input_xi_get_selected_events_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_input_xi_get_selected_events_reply_t * xcb_input_xi_get_selected_events_reply (xcb_connection_t *c, xcb_input_xi_get_selected_events_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_barrier_release_pointer_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_barrier_release_pointer_info_t) */ void xcb_input_barrier_release_pointer_info_next (xcb_input_barrier_release_pointer_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_barrier_release_pointer_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_barrier_release_pointer_info_end (xcb_input_barrier_release_pointer_info_iterator_t i); int xcb_input_xi_barrier_release_pointer_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_xi_barrier_release_pointer_checked (xcb_connection_t *c, uint32_t num_barriers, const xcb_input_barrier_release_pointer_info_t *barriers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_xi_barrier_release_pointer (xcb_connection_t *c, uint32_t num_barriers, const xcb_input_barrier_release_pointer_info_t *barriers); xcb_input_barrier_release_pointer_info_t * xcb_input_xi_barrier_release_pointer_barriers (const xcb_input_xi_barrier_release_pointer_request_t *R); int xcb_input_xi_barrier_release_pointer_barriers_length (const xcb_input_xi_barrier_release_pointer_request_t *R); xcb_input_barrier_release_pointer_info_iterator_t xcb_input_xi_barrier_release_pointer_barriers_iterator (const xcb_input_xi_barrier_release_pointer_request_t *R); int xcb_input_device_changed_sizeof (const void *_buffer); int xcb_input_device_changed_classes_length (const xcb_input_device_changed_event_t *R); xcb_input_device_class_iterator_t xcb_input_device_changed_classes_iterator (const xcb_input_device_changed_event_t *R); int xcb_input_key_press_sizeof (const void *_buffer); uint32_t * xcb_input_key_press_button_mask (const xcb_input_key_press_event_t *R); int xcb_input_key_press_button_mask_length (const xcb_input_key_press_event_t *R); xcb_generic_iterator_t xcb_input_key_press_button_mask_end (const xcb_input_key_press_event_t *R); uint32_t * xcb_input_key_press_valuator_mask (const xcb_input_key_press_event_t *R); int xcb_input_key_press_valuator_mask_length (const xcb_input_key_press_event_t *R); xcb_generic_iterator_t xcb_input_key_press_valuator_mask_end (const xcb_input_key_press_event_t *R); xcb_input_fp3232_t * xcb_input_key_press_axisvalues (const xcb_input_key_press_event_t *R); int xcb_input_key_press_axisvalues_length (const xcb_input_key_press_event_t *R); xcb_input_fp3232_iterator_t xcb_input_key_press_axisvalues_iterator (const xcb_input_key_press_event_t *R); int xcb_input_key_release_sizeof (const void *_buffer /**< */); int xcb_input_button_press_sizeof (const void *_buffer); uint32_t * xcb_input_button_press_button_mask (const xcb_input_button_press_event_t *R); int xcb_input_button_press_button_mask_length (const xcb_input_button_press_event_t *R); xcb_generic_iterator_t xcb_input_button_press_button_mask_end (const xcb_input_button_press_event_t *R); uint32_t * xcb_input_button_press_valuator_mask (const xcb_input_button_press_event_t *R); int xcb_input_button_press_valuator_mask_length (const xcb_input_button_press_event_t *R); xcb_generic_iterator_t xcb_input_button_press_valuator_mask_end (const xcb_input_button_press_event_t *R); xcb_input_fp3232_t * xcb_input_button_press_axisvalues (const xcb_input_button_press_event_t *R); int xcb_input_button_press_axisvalues_length (const xcb_input_button_press_event_t *R); xcb_input_fp3232_iterator_t xcb_input_button_press_axisvalues_iterator (const xcb_input_button_press_event_t *R); int xcb_input_button_release_sizeof (const void *_buffer /**< */); int xcb_input_motion_sizeof (const void *_buffer /**< */); int xcb_input_enter_sizeof (const void *_buffer); uint32_t * xcb_input_enter_buttons (const xcb_input_enter_event_t *R); int xcb_input_enter_buttons_length (const xcb_input_enter_event_t *R); xcb_generic_iterator_t xcb_input_enter_buttons_end (const xcb_input_enter_event_t *R); int xcb_input_leave_sizeof (const void *_buffer /**< */); int xcb_input_focus_in_sizeof (const void *_buffer /**< */); int xcb_input_focus_out_sizeof (const void *_buffer /**< */); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_hierarchy_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_hierarchy_info_t) */ void xcb_input_hierarchy_info_next (xcb_input_hierarchy_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_hierarchy_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_hierarchy_info_end (xcb_input_hierarchy_info_iterator_t i); int xcb_input_hierarchy_sizeof (const void *_buffer); xcb_input_hierarchy_info_t * xcb_input_hierarchy_infos (const xcb_input_hierarchy_event_t *R); int xcb_input_hierarchy_infos_length (const xcb_input_hierarchy_event_t *R); xcb_input_hierarchy_info_iterator_t xcb_input_hierarchy_infos_iterator (const xcb_input_hierarchy_event_t *R); int xcb_input_raw_key_press_sizeof (const void *_buffer); uint32_t * xcb_input_raw_key_press_valuator_mask (const xcb_input_raw_key_press_event_t *R); int xcb_input_raw_key_press_valuator_mask_length (const xcb_input_raw_key_press_event_t *R); xcb_generic_iterator_t xcb_input_raw_key_press_valuator_mask_end (const xcb_input_raw_key_press_event_t *R); xcb_input_fp3232_t * xcb_input_raw_key_press_axisvalues (const xcb_input_raw_key_press_event_t *R); int xcb_input_raw_key_press_axisvalues_length (const xcb_input_raw_key_press_event_t *R); xcb_input_fp3232_iterator_t xcb_input_raw_key_press_axisvalues_iterator (const xcb_input_raw_key_press_event_t *R); xcb_input_fp3232_t * xcb_input_raw_key_press_axisvalues_raw (const xcb_input_raw_key_press_event_t *R); int xcb_input_raw_key_press_axisvalues_raw_length (const xcb_input_raw_key_press_event_t *R); xcb_input_fp3232_iterator_t xcb_input_raw_key_press_axisvalues_raw_iterator (const xcb_input_raw_key_press_event_t *R); int xcb_input_raw_key_release_sizeof (const void *_buffer /**< */); int xcb_input_raw_button_press_sizeof (const void *_buffer); uint32_t * xcb_input_raw_button_press_valuator_mask (const xcb_input_raw_button_press_event_t *R); int xcb_input_raw_button_press_valuator_mask_length (const xcb_input_raw_button_press_event_t *R); xcb_generic_iterator_t xcb_input_raw_button_press_valuator_mask_end (const xcb_input_raw_button_press_event_t *R); xcb_input_fp3232_t * xcb_input_raw_button_press_axisvalues (const xcb_input_raw_button_press_event_t *R); int xcb_input_raw_button_press_axisvalues_length (const xcb_input_raw_button_press_event_t *R); xcb_input_fp3232_iterator_t xcb_input_raw_button_press_axisvalues_iterator (const xcb_input_raw_button_press_event_t *R); xcb_input_fp3232_t * xcb_input_raw_button_press_axisvalues_raw (const xcb_input_raw_button_press_event_t *R); int xcb_input_raw_button_press_axisvalues_raw_length (const xcb_input_raw_button_press_event_t *R); xcb_input_fp3232_iterator_t xcb_input_raw_button_press_axisvalues_raw_iterator (const xcb_input_raw_button_press_event_t *R); int xcb_input_raw_button_release_sizeof (const void *_buffer /**< */); int xcb_input_raw_motion_sizeof (const void *_buffer /**< */); int xcb_input_touch_begin_sizeof (const void *_buffer); uint32_t * xcb_input_touch_begin_button_mask (const xcb_input_touch_begin_event_t *R); int xcb_input_touch_begin_button_mask_length (const xcb_input_touch_begin_event_t *R); xcb_generic_iterator_t xcb_input_touch_begin_button_mask_end (const xcb_input_touch_begin_event_t *R); uint32_t * xcb_input_touch_begin_valuator_mask (const xcb_input_touch_begin_event_t *R); int xcb_input_touch_begin_valuator_mask_length (const xcb_input_touch_begin_event_t *R); xcb_generic_iterator_t xcb_input_touch_begin_valuator_mask_end (const xcb_input_touch_begin_event_t *R); xcb_input_fp3232_t * xcb_input_touch_begin_axisvalues (const xcb_input_touch_begin_event_t *R); int xcb_input_touch_begin_axisvalues_length (const xcb_input_touch_begin_event_t *R); xcb_input_fp3232_iterator_t xcb_input_touch_begin_axisvalues_iterator (const xcb_input_touch_begin_event_t *R); int xcb_input_touch_update_sizeof (const void *_buffer /**< */); int xcb_input_touch_end_sizeof (const void *_buffer /**< */); int xcb_input_raw_touch_begin_sizeof (const void *_buffer); uint32_t * xcb_input_raw_touch_begin_valuator_mask (const xcb_input_raw_touch_begin_event_t *R); int xcb_input_raw_touch_begin_valuator_mask_length (const xcb_input_raw_touch_begin_event_t *R); xcb_generic_iterator_t xcb_input_raw_touch_begin_valuator_mask_end (const xcb_input_raw_touch_begin_event_t *R); xcb_input_fp3232_t * xcb_input_raw_touch_begin_axisvalues (const xcb_input_raw_touch_begin_event_t *R); int xcb_input_raw_touch_begin_axisvalues_length (const xcb_input_raw_touch_begin_event_t *R); xcb_input_fp3232_iterator_t xcb_input_raw_touch_begin_axisvalues_iterator (const xcb_input_raw_touch_begin_event_t *R); xcb_input_fp3232_t * xcb_input_raw_touch_begin_axisvalues_raw (const xcb_input_raw_touch_begin_event_t *R); int xcb_input_raw_touch_begin_axisvalues_raw_length (const xcb_input_raw_touch_begin_event_t *R); xcb_input_fp3232_iterator_t xcb_input_raw_touch_begin_axisvalues_raw_iterator (const xcb_input_raw_touch_begin_event_t *R); int xcb_input_raw_touch_update_sizeof (const void *_buffer /**< */); int xcb_input_raw_touch_end_sizeof (const void *_buffer /**< */); /** * Get the next element of the iterator * @param i Pointer to a xcb_input_event_for_send_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_input_event_for_send_t) */ void xcb_input_event_for_send_next (xcb_input_event_for_send_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_input_event_for_send_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_input_event_for_send_end (xcb_input_event_for_send_iterator_t i); int xcb_input_send_extension_event_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_input_send_extension_event_checked (xcb_connection_t *c, xcb_window_t destination, uint8_t device_id, uint8_t propagate, uint16_t num_classes, uint8_t num_events, const xcb_input_event_for_send_t *events, const xcb_input_event_class_t *classes); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_input_send_extension_event (xcb_connection_t *c, xcb_window_t destination, uint8_t device_id, uint8_t propagate, uint16_t num_classes, uint8_t num_events, const xcb_input_event_for_send_t *events, const xcb_input_event_class_t *classes); xcb_input_event_for_send_t * xcb_input_send_extension_event_events (const xcb_input_send_extension_event_request_t *R); int xcb_input_send_extension_event_events_length (const xcb_input_send_extension_event_request_t *R); xcb_input_event_for_send_iterator_t xcb_input_send_extension_event_events_iterator (const xcb_input_send_extension_event_request_t *R); xcb_input_event_class_t * xcb_input_send_extension_event_classes (const xcb_input_send_extension_event_request_t *R); int xcb_input_send_extension_event_classes_length (const xcb_input_send_extension_event_request_t *R); xcb_generic_iterator_t xcb_input_send_extension_event_classes_end (const xcb_input_send_extension_event_request_t *R); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ_% xcb/ge.hnu[/* * This file generated automatically from ge.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_GenericEvent_API XCB GenericEvent API * @brief GenericEvent XCB Protocol Implementation. * @{ **/ #ifndef __GE_H #define __GE_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif #define XCB_GENERICEVENT_MAJOR_VERSION 1 #define XCB_GENERICEVENT_MINOR_VERSION 0 extern xcb_extension_t xcb_genericevent_id; /** * @brief xcb_genericevent_query_version_cookie_t **/ typedef struct xcb_genericevent_query_version_cookie_t { unsigned int sequence; } xcb_genericevent_query_version_cookie_t; /** Opcode for xcb_genericevent_query_version. */ #define XCB_GENERICEVENT_QUERY_VERSION 0 /** * @brief xcb_genericevent_query_version_request_t **/ typedef struct xcb_genericevent_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t client_major_version; uint16_t client_minor_version; } xcb_genericevent_query_version_request_t; /** * @brief xcb_genericevent_query_version_reply_t **/ typedef struct xcb_genericevent_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t major_version; uint16_t minor_version; uint8_t pad1[20]; } xcb_genericevent_query_version_reply_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_genericevent_query_version_cookie_t xcb_genericevent_query_version (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_genericevent_query_version_cookie_t xcb_genericevent_query_version_unchecked (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_genericevent_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_genericevent_query_version_reply_t * xcb_genericevent_query_version_reply (xcb_connection_t *c, xcb_genericevent_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZE$E$ xcb/damage.hnu[/* * This file generated automatically from damage.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Damage_API XCB Damage API * @brief Damage XCB Protocol Implementation. * @{ **/ #ifndef __DAMAGE_H #define __DAMAGE_H #include "xcb.h" #include "xproto.h" #include "xfixes.h" #ifdef __cplusplus extern "C" { #endif #define XCB_DAMAGE_MAJOR_VERSION 1 #define XCB_DAMAGE_MINOR_VERSION 1 extern xcb_extension_t xcb_damage_id; typedef uint32_t xcb_damage_damage_t; /** * @brief xcb_damage_damage_iterator_t **/ typedef struct xcb_damage_damage_iterator_t { xcb_damage_damage_t *data; int rem; int index; } xcb_damage_damage_iterator_t; typedef enum xcb_damage_report_level_t { XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES = 0, XCB_DAMAGE_REPORT_LEVEL_DELTA_RECTANGLES = 1, XCB_DAMAGE_REPORT_LEVEL_BOUNDING_BOX = 2, XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY = 3 } xcb_damage_report_level_t; /** Opcode for xcb_damage_bad_damage. */ #define XCB_DAMAGE_BAD_DAMAGE 0 /** * @brief xcb_damage_bad_damage_error_t **/ typedef struct xcb_damage_bad_damage_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_damage_bad_damage_error_t; /** * @brief xcb_damage_query_version_cookie_t **/ typedef struct xcb_damage_query_version_cookie_t { unsigned int sequence; } xcb_damage_query_version_cookie_t; /** Opcode for xcb_damage_query_version. */ #define XCB_DAMAGE_QUERY_VERSION 0 /** * @brief xcb_damage_query_version_request_t **/ typedef struct xcb_damage_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t client_major_version; uint32_t client_minor_version; } xcb_damage_query_version_request_t; /** * @brief xcb_damage_query_version_reply_t **/ typedef struct xcb_damage_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; uint8_t pad1[16]; } xcb_damage_query_version_reply_t; /** Opcode for xcb_damage_create. */ #define XCB_DAMAGE_CREATE 1 /** * @brief xcb_damage_create_request_t **/ typedef struct xcb_damage_create_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_damage_damage_t damage; xcb_drawable_t drawable; uint8_t level; uint8_t pad0[3]; } xcb_damage_create_request_t; /** Opcode for xcb_damage_destroy. */ #define XCB_DAMAGE_DESTROY 2 /** * @brief xcb_damage_destroy_request_t **/ typedef struct xcb_damage_destroy_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_damage_damage_t damage; } xcb_damage_destroy_request_t; /** Opcode for xcb_damage_subtract. */ #define XCB_DAMAGE_SUBTRACT 3 /** * @brief xcb_damage_subtract_request_t **/ typedef struct xcb_damage_subtract_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_damage_damage_t damage; xcb_xfixes_region_t repair; xcb_xfixes_region_t parts; } xcb_damage_subtract_request_t; /** Opcode for xcb_damage_add. */ #define XCB_DAMAGE_ADD 4 /** * @brief xcb_damage_add_request_t **/ typedef struct xcb_damage_add_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; xcb_xfixes_region_t region; } xcb_damage_add_request_t; /** Opcode for xcb_damage_notify. */ #define XCB_DAMAGE_NOTIFY 0 /** * @brief xcb_damage_notify_event_t **/ typedef struct xcb_damage_notify_event_t { uint8_t response_type; uint8_t level; uint16_t sequence; xcb_drawable_t drawable; xcb_damage_damage_t damage; xcb_timestamp_t timestamp; xcb_rectangle_t area; xcb_rectangle_t geometry; } xcb_damage_notify_event_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_damage_damage_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_damage_damage_t) */ void xcb_damage_damage_next (xcb_damage_damage_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_damage_damage_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_damage_damage_end (xcb_damage_damage_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_damage_query_version_cookie_t xcb_damage_query_version (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_damage_query_version_cookie_t xcb_damage_query_version_unchecked (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_damage_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_damage_query_version_reply_t * xcb_damage_query_version_reply (xcb_connection_t *c, xcb_damage_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_damage_create_checked (xcb_connection_t *c, xcb_damage_damage_t damage, xcb_drawable_t drawable, uint8_t level); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_damage_create (xcb_connection_t *c, xcb_damage_damage_t damage, xcb_drawable_t drawable, uint8_t level); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_damage_destroy_checked (xcb_connection_t *c, xcb_damage_damage_t damage); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_damage_destroy (xcb_connection_t *c, xcb_damage_damage_t damage); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_damage_subtract_checked (xcb_connection_t *c, xcb_damage_damage_t damage, xcb_xfixes_region_t repair, xcb_xfixes_region_t parts); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_damage_subtract (xcb_connection_t *c, xcb_damage_damage_t damage, xcb_xfixes_region_t repair, xcb_xfixes_region_t parts); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_damage_add_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_xfixes_region_t region); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_damage_add (xcb_connection_t *c, xcb_drawable_t drawable, xcb_xfixes_region_t region); #ifdef __cplusplus } #endif #endif /** * @} */ PKZՈ  xcb/xc_misc.hnu[/* * This file generated automatically from xc_misc.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_XCMisc_API XCB XCMisc API * @brief XCMisc XCB Protocol Implementation. * @{ **/ #ifndef __XC_MISC_H #define __XC_MISC_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XCMISC_MAJOR_VERSION 1 #define XCB_XCMISC_MINOR_VERSION 1 extern xcb_extension_t xcb_xc_misc_id; /** * @brief xcb_xc_misc_get_version_cookie_t **/ typedef struct xcb_xc_misc_get_version_cookie_t { unsigned int sequence; } xcb_xc_misc_get_version_cookie_t; /** Opcode for xcb_xc_misc_get_version. */ #define XCB_XC_MISC_GET_VERSION 0 /** * @brief xcb_xc_misc_get_version_request_t **/ typedef struct xcb_xc_misc_get_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t client_major_version; uint16_t client_minor_version; } xcb_xc_misc_get_version_request_t; /** * @brief xcb_xc_misc_get_version_reply_t **/ typedef struct xcb_xc_misc_get_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t server_major_version; uint16_t server_minor_version; } xcb_xc_misc_get_version_reply_t; /** * @brief xcb_xc_misc_get_xid_range_cookie_t **/ typedef struct xcb_xc_misc_get_xid_range_cookie_t { unsigned int sequence; } xcb_xc_misc_get_xid_range_cookie_t; /** Opcode for xcb_xc_misc_get_xid_range. */ #define XCB_XC_MISC_GET_XID_RANGE 1 /** * @brief xcb_xc_misc_get_xid_range_request_t **/ typedef struct xcb_xc_misc_get_xid_range_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xc_misc_get_xid_range_request_t; /** * @brief xcb_xc_misc_get_xid_range_reply_t **/ typedef struct xcb_xc_misc_get_xid_range_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t start_id; uint32_t count; } xcb_xc_misc_get_xid_range_reply_t; /** * @brief xcb_xc_misc_get_xid_list_cookie_t **/ typedef struct xcb_xc_misc_get_xid_list_cookie_t { unsigned int sequence; } xcb_xc_misc_get_xid_list_cookie_t; /** Opcode for xcb_xc_misc_get_xid_list. */ #define XCB_XC_MISC_GET_XID_LIST 2 /** * @brief xcb_xc_misc_get_xid_list_request_t **/ typedef struct xcb_xc_misc_get_xid_list_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t count; } xcb_xc_misc_get_xid_list_request_t; /** * @brief xcb_xc_misc_get_xid_list_reply_t **/ typedef struct xcb_xc_misc_get_xid_list_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t ids_len; uint8_t pad1[20]; } xcb_xc_misc_get_xid_list_reply_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xc_misc_get_version_cookie_t xcb_xc_misc_get_version (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xc_misc_get_version_cookie_t xcb_xc_misc_get_version_unchecked (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xc_misc_get_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xc_misc_get_version_reply_t * xcb_xc_misc_get_version_reply (xcb_connection_t *c, xcb_xc_misc_get_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xc_misc_get_xid_range_cookie_t xcb_xc_misc_get_xid_range (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xc_misc_get_xid_range_cookie_t xcb_xc_misc_get_xid_range_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xc_misc_get_xid_range_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xc_misc_get_xid_range_reply_t * xcb_xc_misc_get_xid_range_reply (xcb_connection_t *c, xcb_xc_misc_get_xid_range_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xc_misc_get_xid_list_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xc_misc_get_xid_list_cookie_t xcb_xc_misc_get_xid_list (xcb_connection_t *c, uint32_t count); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xc_misc_get_xid_list_cookie_t xcb_xc_misc_get_xid_list_unchecked (xcb_connection_t *c, uint32_t count); uint32_t * xcb_xc_misc_get_xid_list_ids (const xcb_xc_misc_get_xid_list_reply_t *R); int xcb_xc_misc_get_xid_list_ids_length (const xcb_xc_misc_get_xid_list_reply_t *R); xcb_generic_iterator_t xcb_xc_misc_get_xid_list_ids_end (const xcb_xc_misc_get_xid_list_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xc_misc_get_xid_list_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xc_misc_get_xid_list_reply_t * xcb_xc_misc_get_xid_list_reply (xcb_connection_t *c, xcb_xc_misc_get_xid_list_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZU5I-I- xcb/xevie.hnu[/* * This file generated automatically from xevie.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Xevie_API XCB Xevie API * @brief Xevie XCB Protocol Implementation. * @{ **/ #ifndef __XEVIE_H #define __XEVIE_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XEVIE_MAJOR_VERSION 1 #define XCB_XEVIE_MINOR_VERSION 0 extern xcb_extension_t xcb_xevie_id; /** * @brief xcb_xevie_query_version_cookie_t **/ typedef struct xcb_xevie_query_version_cookie_t { unsigned int sequence; } xcb_xevie_query_version_cookie_t; /** Opcode for xcb_xevie_query_version. */ #define XCB_XEVIE_QUERY_VERSION 0 /** * @brief xcb_xevie_query_version_request_t **/ typedef struct xcb_xevie_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t client_major_version; uint16_t client_minor_version; } xcb_xevie_query_version_request_t; /** * @brief xcb_xevie_query_version_reply_t **/ typedef struct xcb_xevie_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t server_major_version; uint16_t server_minor_version; uint8_t pad1[20]; } xcb_xevie_query_version_reply_t; /** * @brief xcb_xevie_start_cookie_t **/ typedef struct xcb_xevie_start_cookie_t { unsigned int sequence; } xcb_xevie_start_cookie_t; /** Opcode for xcb_xevie_start. */ #define XCB_XEVIE_START 1 /** * @brief xcb_xevie_start_request_t **/ typedef struct xcb_xevie_start_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t screen; } xcb_xevie_start_request_t; /** * @brief xcb_xevie_start_reply_t **/ typedef struct xcb_xevie_start_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_xevie_start_reply_t; /** * @brief xcb_xevie_end_cookie_t **/ typedef struct xcb_xevie_end_cookie_t { unsigned int sequence; } xcb_xevie_end_cookie_t; /** Opcode for xcb_xevie_end. */ #define XCB_XEVIE_END 2 /** * @brief xcb_xevie_end_request_t **/ typedef struct xcb_xevie_end_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t cmap; } xcb_xevie_end_request_t; /** * @brief xcb_xevie_end_reply_t **/ typedef struct xcb_xevie_end_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_xevie_end_reply_t; typedef enum xcb_xevie_datatype_t { XCB_XEVIE_DATATYPE_UNMODIFIED = 0, XCB_XEVIE_DATATYPE_MODIFIED = 1 } xcb_xevie_datatype_t; /** * @brief xcb_xevie_event_t **/ typedef struct xcb_xevie_event_t { uint8_t pad0[32]; } xcb_xevie_event_t; /** * @brief xcb_xevie_event_iterator_t **/ typedef struct xcb_xevie_event_iterator_t { xcb_xevie_event_t *data; int rem; int index; } xcb_xevie_event_iterator_t; /** * @brief xcb_xevie_send_cookie_t **/ typedef struct xcb_xevie_send_cookie_t { unsigned int sequence; } xcb_xevie_send_cookie_t; /** Opcode for xcb_xevie_send. */ #define XCB_XEVIE_SEND 3 /** * @brief xcb_xevie_send_request_t **/ typedef struct xcb_xevie_send_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xevie_event_t event; uint32_t data_type; uint8_t pad0[64]; } xcb_xevie_send_request_t; /** * @brief xcb_xevie_send_reply_t **/ typedef struct xcb_xevie_send_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_xevie_send_reply_t; /** * @brief xcb_xevie_select_input_cookie_t **/ typedef struct xcb_xevie_select_input_cookie_t { unsigned int sequence; } xcb_xevie_select_input_cookie_t; /** Opcode for xcb_xevie_select_input. */ #define XCB_XEVIE_SELECT_INPUT 4 /** * @brief xcb_xevie_select_input_request_t **/ typedef struct xcb_xevie_select_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t event_mask; } xcb_xevie_select_input_request_t; /** * @brief xcb_xevie_select_input_reply_t **/ typedef struct xcb_xevie_select_input_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t pad1[24]; } xcb_xevie_select_input_reply_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xevie_query_version_cookie_t xcb_xevie_query_version (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xevie_query_version_cookie_t xcb_xevie_query_version_unchecked (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xevie_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xevie_query_version_reply_t * xcb_xevie_query_version_reply (xcb_connection_t *c, xcb_xevie_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xevie_start_cookie_t xcb_xevie_start (xcb_connection_t *c, uint32_t screen); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xevie_start_cookie_t xcb_xevie_start_unchecked (xcb_connection_t *c, uint32_t screen); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xevie_start_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xevie_start_reply_t * xcb_xevie_start_reply (xcb_connection_t *c, xcb_xevie_start_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xevie_end_cookie_t xcb_xevie_end (xcb_connection_t *c, uint32_t cmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xevie_end_cookie_t xcb_xevie_end_unchecked (xcb_connection_t *c, uint32_t cmap); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xevie_end_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xevie_end_reply_t * xcb_xevie_end_reply (xcb_connection_t *c, xcb_xevie_end_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Get the next element of the iterator * @param i Pointer to a xcb_xevie_event_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xevie_event_t) */ void xcb_xevie_event_next (xcb_xevie_event_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xevie_event_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xevie_event_end (xcb_xevie_event_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xevie_send_cookie_t xcb_xevie_send (xcb_connection_t *c, xcb_xevie_event_t event, uint32_t data_type); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xevie_send_cookie_t xcb_xevie_send_unchecked (xcb_connection_t *c, xcb_xevie_event_t event, uint32_t data_type); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xevie_send_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xevie_send_reply_t * xcb_xevie_send_reply (xcb_connection_t *c, xcb_xevie_send_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xevie_select_input_cookie_t xcb_xevie_select_input (xcb_connection_t *c, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xevie_select_input_cookie_t xcb_xevie_select_input_unchecked (xcb_connection_t *c, uint32_t event_mask); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xevie_select_input_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xevie_select_input_reply_t * xcb_xevie_select_input_reply (xcb_connection_t *c, xcb_xevie_select_input_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ8\ xcb/sync.hnu[/* * This file generated automatically from sync.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Sync_API XCB Sync API * @brief Sync XCB Protocol Implementation. * @{ **/ #ifndef __SYNC_H #define __SYNC_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_SYNC_MAJOR_VERSION 3 #define XCB_SYNC_MINOR_VERSION 1 extern xcb_extension_t xcb_sync_id; typedef uint32_t xcb_sync_alarm_t; /** * @brief xcb_sync_alarm_iterator_t **/ typedef struct xcb_sync_alarm_iterator_t { xcb_sync_alarm_t *data; int rem; int index; } xcb_sync_alarm_iterator_t; typedef enum xcb_sync_alarmstate_t { XCB_SYNC_ALARMSTATE_ACTIVE = 0, XCB_SYNC_ALARMSTATE_INACTIVE = 1, XCB_SYNC_ALARMSTATE_DESTROYED = 2 } xcb_sync_alarmstate_t; typedef uint32_t xcb_sync_counter_t; /** * @brief xcb_sync_counter_iterator_t **/ typedef struct xcb_sync_counter_iterator_t { xcb_sync_counter_t *data; int rem; int index; } xcb_sync_counter_iterator_t; typedef uint32_t xcb_sync_fence_t; /** * @brief xcb_sync_fence_iterator_t **/ typedef struct xcb_sync_fence_iterator_t { xcb_sync_fence_t *data; int rem; int index; } xcb_sync_fence_iterator_t; typedef enum xcb_sync_testtype_t { XCB_SYNC_TESTTYPE_POSITIVE_TRANSITION = 0, XCB_SYNC_TESTTYPE_NEGATIVE_TRANSITION = 1, XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON = 2, XCB_SYNC_TESTTYPE_NEGATIVE_COMPARISON = 3 } xcb_sync_testtype_t; typedef enum xcb_sync_valuetype_t { XCB_SYNC_VALUETYPE_ABSOLUTE = 0, XCB_SYNC_VALUETYPE_RELATIVE = 1 } xcb_sync_valuetype_t; typedef enum xcb_sync_ca_t { XCB_SYNC_CA_COUNTER = 1, XCB_SYNC_CA_VALUE_TYPE = 2, XCB_SYNC_CA_VALUE = 4, XCB_SYNC_CA_TEST_TYPE = 8, XCB_SYNC_CA_DELTA = 16, XCB_SYNC_CA_EVENTS = 32 } xcb_sync_ca_t; /** * @brief xcb_sync_int64_t **/ typedef struct xcb_sync_int64_t { int32_t hi; uint32_t lo; } xcb_sync_int64_t; /** * @brief xcb_sync_int64_iterator_t **/ typedef struct xcb_sync_int64_iterator_t { xcb_sync_int64_t *data; int rem; int index; } xcb_sync_int64_iterator_t; /** * @brief xcb_sync_systemcounter_t **/ typedef struct xcb_sync_systemcounter_t { xcb_sync_counter_t counter; xcb_sync_int64_t resolution; uint16_t name_len; } xcb_sync_systemcounter_t; /** * @brief xcb_sync_systemcounter_iterator_t **/ typedef struct xcb_sync_systemcounter_iterator_t { xcb_sync_systemcounter_t *data; int rem; int index; } xcb_sync_systemcounter_iterator_t; /** * @brief xcb_sync_trigger_t **/ typedef struct xcb_sync_trigger_t { xcb_sync_counter_t counter; uint32_t wait_type; xcb_sync_int64_t wait_value; uint32_t test_type; } xcb_sync_trigger_t; /** * @brief xcb_sync_trigger_iterator_t **/ typedef struct xcb_sync_trigger_iterator_t { xcb_sync_trigger_t *data; int rem; int index; } xcb_sync_trigger_iterator_t; /** * @brief xcb_sync_waitcondition_t **/ typedef struct xcb_sync_waitcondition_t { xcb_sync_trigger_t trigger; xcb_sync_int64_t event_threshold; } xcb_sync_waitcondition_t; /** * @brief xcb_sync_waitcondition_iterator_t **/ typedef struct xcb_sync_waitcondition_iterator_t { xcb_sync_waitcondition_t *data; int rem; int index; } xcb_sync_waitcondition_iterator_t; /** Opcode for xcb_sync_counter. */ #define XCB_SYNC_COUNTER 0 /** * @brief xcb_sync_counter_error_t **/ typedef struct xcb_sync_counter_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; uint32_t bad_counter; uint16_t minor_opcode; uint8_t major_opcode; } xcb_sync_counter_error_t; /** Opcode for xcb_sync_alarm. */ #define XCB_SYNC_ALARM 1 /** * @brief xcb_sync_alarm_error_t **/ typedef struct xcb_sync_alarm_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; uint32_t bad_alarm; uint16_t minor_opcode; uint8_t major_opcode; } xcb_sync_alarm_error_t; /** * @brief xcb_sync_initialize_cookie_t **/ typedef struct xcb_sync_initialize_cookie_t { unsigned int sequence; } xcb_sync_initialize_cookie_t; /** Opcode for xcb_sync_initialize. */ #define XCB_SYNC_INITIALIZE 0 /** * @brief xcb_sync_initialize_request_t **/ typedef struct xcb_sync_initialize_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t desired_major_version; uint8_t desired_minor_version; } xcb_sync_initialize_request_t; /** * @brief xcb_sync_initialize_reply_t **/ typedef struct xcb_sync_initialize_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t major_version; uint8_t minor_version; uint8_t pad1[22]; } xcb_sync_initialize_reply_t; /** * @brief xcb_sync_list_system_counters_cookie_t **/ typedef struct xcb_sync_list_system_counters_cookie_t { unsigned int sequence; } xcb_sync_list_system_counters_cookie_t; /** Opcode for xcb_sync_list_system_counters. */ #define XCB_SYNC_LIST_SYSTEM_COUNTERS 1 /** * @brief xcb_sync_list_system_counters_request_t **/ typedef struct xcb_sync_list_system_counters_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_sync_list_system_counters_request_t; /** * @brief xcb_sync_list_system_counters_reply_t **/ typedef struct xcb_sync_list_system_counters_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t counters_len; uint8_t pad1[20]; } xcb_sync_list_system_counters_reply_t; /** Opcode for xcb_sync_create_counter. */ #define XCB_SYNC_CREATE_COUNTER 2 /** * @brief xcb_sync_create_counter_request_t **/ typedef struct xcb_sync_create_counter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_counter_t id; xcb_sync_int64_t initial_value; } xcb_sync_create_counter_request_t; /** Opcode for xcb_sync_destroy_counter. */ #define XCB_SYNC_DESTROY_COUNTER 6 /** * @brief xcb_sync_destroy_counter_request_t **/ typedef struct xcb_sync_destroy_counter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_counter_t counter; } xcb_sync_destroy_counter_request_t; /** * @brief xcb_sync_query_counter_cookie_t **/ typedef struct xcb_sync_query_counter_cookie_t { unsigned int sequence; } xcb_sync_query_counter_cookie_t; /** Opcode for xcb_sync_query_counter. */ #define XCB_SYNC_QUERY_COUNTER 5 /** * @brief xcb_sync_query_counter_request_t **/ typedef struct xcb_sync_query_counter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_counter_t counter; } xcb_sync_query_counter_request_t; /** * @brief xcb_sync_query_counter_reply_t **/ typedef struct xcb_sync_query_counter_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_sync_int64_t counter_value; } xcb_sync_query_counter_reply_t; /** Opcode for xcb_sync_await. */ #define XCB_SYNC_AWAIT 7 /** * @brief xcb_sync_await_request_t **/ typedef struct xcb_sync_await_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_sync_await_request_t; /** Opcode for xcb_sync_change_counter. */ #define XCB_SYNC_CHANGE_COUNTER 4 /** * @brief xcb_sync_change_counter_request_t **/ typedef struct xcb_sync_change_counter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_counter_t counter; xcb_sync_int64_t amount; } xcb_sync_change_counter_request_t; /** Opcode for xcb_sync_set_counter. */ #define XCB_SYNC_SET_COUNTER 3 /** * @brief xcb_sync_set_counter_request_t **/ typedef struct xcb_sync_set_counter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_counter_t counter; xcb_sync_int64_t value; } xcb_sync_set_counter_request_t; /** * @brief xcb_sync_create_alarm_value_list_t **/ typedef struct xcb_sync_create_alarm_value_list_t { xcb_sync_counter_t counter; uint32_t valueType; xcb_sync_int64_t value; uint32_t testType; xcb_sync_int64_t delta; uint32_t events; } xcb_sync_create_alarm_value_list_t; /** Opcode for xcb_sync_create_alarm. */ #define XCB_SYNC_CREATE_ALARM 8 /** * @brief xcb_sync_create_alarm_request_t **/ typedef struct xcb_sync_create_alarm_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_alarm_t id; uint32_t value_mask; } xcb_sync_create_alarm_request_t; /** * @brief xcb_sync_change_alarm_value_list_t **/ typedef struct xcb_sync_change_alarm_value_list_t { xcb_sync_counter_t counter; uint32_t valueType; xcb_sync_int64_t value; uint32_t testType; xcb_sync_int64_t delta; uint32_t events; } xcb_sync_change_alarm_value_list_t; /** Opcode for xcb_sync_change_alarm. */ #define XCB_SYNC_CHANGE_ALARM 9 /** * @brief xcb_sync_change_alarm_request_t **/ typedef struct xcb_sync_change_alarm_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_alarm_t id; uint32_t value_mask; } xcb_sync_change_alarm_request_t; /** Opcode for xcb_sync_destroy_alarm. */ #define XCB_SYNC_DESTROY_ALARM 11 /** * @brief xcb_sync_destroy_alarm_request_t **/ typedef struct xcb_sync_destroy_alarm_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_alarm_t alarm; } xcb_sync_destroy_alarm_request_t; /** * @brief xcb_sync_query_alarm_cookie_t **/ typedef struct xcb_sync_query_alarm_cookie_t { unsigned int sequence; } xcb_sync_query_alarm_cookie_t; /** Opcode for xcb_sync_query_alarm. */ #define XCB_SYNC_QUERY_ALARM 10 /** * @brief xcb_sync_query_alarm_request_t **/ typedef struct xcb_sync_query_alarm_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_alarm_t alarm; } xcb_sync_query_alarm_request_t; /** * @brief xcb_sync_query_alarm_reply_t **/ typedef struct xcb_sync_query_alarm_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_sync_trigger_t trigger; xcb_sync_int64_t delta; uint8_t events; uint8_t state; uint8_t pad1[2]; } xcb_sync_query_alarm_reply_t; /** Opcode for xcb_sync_set_priority. */ #define XCB_SYNC_SET_PRIORITY 12 /** * @brief xcb_sync_set_priority_request_t **/ typedef struct xcb_sync_set_priority_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t id; int32_t priority; } xcb_sync_set_priority_request_t; /** * @brief xcb_sync_get_priority_cookie_t **/ typedef struct xcb_sync_get_priority_cookie_t { unsigned int sequence; } xcb_sync_get_priority_cookie_t; /** Opcode for xcb_sync_get_priority. */ #define XCB_SYNC_GET_PRIORITY 13 /** * @brief xcb_sync_get_priority_request_t **/ typedef struct xcb_sync_get_priority_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t id; } xcb_sync_get_priority_request_t; /** * @brief xcb_sync_get_priority_reply_t **/ typedef struct xcb_sync_get_priority_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; int32_t priority; } xcb_sync_get_priority_reply_t; /** Opcode for xcb_sync_create_fence. */ #define XCB_SYNC_CREATE_FENCE 14 /** * @brief xcb_sync_create_fence_request_t **/ typedef struct xcb_sync_create_fence_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; xcb_sync_fence_t fence; uint8_t initially_triggered; } xcb_sync_create_fence_request_t; /** Opcode for xcb_sync_trigger_fence. */ #define XCB_SYNC_TRIGGER_FENCE 15 /** * @brief xcb_sync_trigger_fence_request_t **/ typedef struct xcb_sync_trigger_fence_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_fence_t fence; } xcb_sync_trigger_fence_request_t; /** Opcode for xcb_sync_reset_fence. */ #define XCB_SYNC_RESET_FENCE 16 /** * @brief xcb_sync_reset_fence_request_t **/ typedef struct xcb_sync_reset_fence_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_fence_t fence; } xcb_sync_reset_fence_request_t; /** Opcode for xcb_sync_destroy_fence. */ #define XCB_SYNC_DESTROY_FENCE 17 /** * @brief xcb_sync_destroy_fence_request_t **/ typedef struct xcb_sync_destroy_fence_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_fence_t fence; } xcb_sync_destroy_fence_request_t; /** * @brief xcb_sync_query_fence_cookie_t **/ typedef struct xcb_sync_query_fence_cookie_t { unsigned int sequence; } xcb_sync_query_fence_cookie_t; /** Opcode for xcb_sync_query_fence. */ #define XCB_SYNC_QUERY_FENCE 18 /** * @brief xcb_sync_query_fence_request_t **/ typedef struct xcb_sync_query_fence_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_sync_fence_t fence; } xcb_sync_query_fence_request_t; /** * @brief xcb_sync_query_fence_reply_t **/ typedef struct xcb_sync_query_fence_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t triggered; uint8_t pad1[23]; } xcb_sync_query_fence_reply_t; /** Opcode for xcb_sync_await_fence. */ #define XCB_SYNC_AWAIT_FENCE 19 /** * @brief xcb_sync_await_fence_request_t **/ typedef struct xcb_sync_await_fence_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_sync_await_fence_request_t; /** Opcode for xcb_sync_counter_notify. */ #define XCB_SYNC_COUNTER_NOTIFY 0 /** * @brief xcb_sync_counter_notify_event_t **/ typedef struct xcb_sync_counter_notify_event_t { uint8_t response_type; uint8_t kind; uint16_t sequence; xcb_sync_counter_t counter; xcb_sync_int64_t wait_value; xcb_sync_int64_t counter_value; xcb_timestamp_t timestamp; uint16_t count; uint8_t destroyed; uint8_t pad0; } xcb_sync_counter_notify_event_t; /** Opcode for xcb_sync_alarm_notify. */ #define XCB_SYNC_ALARM_NOTIFY 1 /** * @brief xcb_sync_alarm_notify_event_t **/ typedef struct xcb_sync_alarm_notify_event_t { uint8_t response_type; uint8_t kind; uint16_t sequence; xcb_sync_alarm_t alarm; xcb_sync_int64_t counter_value; xcb_sync_int64_t alarm_value; xcb_timestamp_t timestamp; uint8_t state; uint8_t pad0[3]; } xcb_sync_alarm_notify_event_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_sync_alarm_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_sync_alarm_t) */ void xcb_sync_alarm_next (xcb_sync_alarm_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_sync_alarm_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_sync_alarm_end (xcb_sync_alarm_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_sync_counter_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_sync_counter_t) */ void xcb_sync_counter_next (xcb_sync_counter_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_sync_counter_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_sync_counter_end (xcb_sync_counter_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_sync_fence_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_sync_fence_t) */ void xcb_sync_fence_next (xcb_sync_fence_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_sync_fence_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_sync_fence_end (xcb_sync_fence_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_sync_int64_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_sync_int64_t) */ void xcb_sync_int64_next (xcb_sync_int64_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_sync_int64_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_sync_int64_end (xcb_sync_int64_iterator_t i); int xcb_sync_systemcounter_sizeof (const void *_buffer); char * xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t *R); int xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t *R); xcb_generic_iterator_t xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_sync_systemcounter_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_sync_systemcounter_t) */ void xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_sync_systemcounter_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_sync_trigger_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_sync_trigger_t) */ void xcb_sync_trigger_next (xcb_sync_trigger_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_sync_trigger_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_sync_trigger_end (xcb_sync_trigger_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_sync_waitcondition_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_sync_waitcondition_t) */ void xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_sync_waitcondition_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_sync_initialize_cookie_t xcb_sync_initialize (xcb_connection_t *c, uint8_t desired_major_version, uint8_t desired_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_sync_initialize_cookie_t xcb_sync_initialize_unchecked (xcb_connection_t *c, uint8_t desired_major_version, uint8_t desired_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_sync_initialize_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_sync_initialize_reply_t * xcb_sync_initialize_reply (xcb_connection_t *c, xcb_sync_initialize_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_sync_list_system_counters_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters_unchecked (xcb_connection_t *c); int xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t *R); xcb_sync_systemcounter_iterator_t xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_sync_list_system_counters_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_sync_list_system_counters_reply_t * xcb_sync_list_system_counters_reply (xcb_connection_t *c, xcb_sync_list_system_counters_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_create_counter_checked (xcb_connection_t *c, xcb_sync_counter_t id, xcb_sync_int64_t initial_value); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_create_counter (xcb_connection_t *c, xcb_sync_counter_t id, xcb_sync_int64_t initial_value); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_destroy_counter_checked (xcb_connection_t *c, xcb_sync_counter_t counter); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_destroy_counter (xcb_connection_t *c, xcb_sync_counter_t counter); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_sync_query_counter_cookie_t xcb_sync_query_counter (xcb_connection_t *c, xcb_sync_counter_t counter); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_sync_query_counter_cookie_t xcb_sync_query_counter_unchecked (xcb_connection_t *c, xcb_sync_counter_t counter); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_sync_query_counter_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_sync_query_counter_reply_t * xcb_sync_query_counter_reply (xcb_connection_t *c, xcb_sync_query_counter_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_sync_await_sizeof (const void *_buffer, uint32_t wait_list_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_await_checked (xcb_connection_t *c, uint32_t wait_list_len, const xcb_sync_waitcondition_t *wait_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_await (xcb_connection_t *c, uint32_t wait_list_len, const xcb_sync_waitcondition_t *wait_list); xcb_sync_waitcondition_t * xcb_sync_await_wait_list (const xcb_sync_await_request_t *R); int xcb_sync_await_wait_list_length (const xcb_sync_await_request_t *R); xcb_sync_waitcondition_iterator_t xcb_sync_await_wait_list_iterator (const xcb_sync_await_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_change_counter_checked (xcb_connection_t *c, xcb_sync_counter_t counter, xcb_sync_int64_t amount); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_change_counter (xcb_connection_t *c, xcb_sync_counter_t counter, xcb_sync_int64_t amount); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_set_counter_checked (xcb_connection_t *c, xcb_sync_counter_t counter, xcb_sync_int64_t value); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_set_counter (xcb_connection_t *c, xcb_sync_counter_t counter, xcb_sync_int64_t value); int xcb_sync_create_alarm_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_sync_create_alarm_value_list_t *_aux); int xcb_sync_create_alarm_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_sync_create_alarm_value_list_t *_aux); int xcb_sync_create_alarm_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_sync_create_alarm_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_create_alarm_checked (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_create_alarm (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_create_alarm_aux_checked (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const xcb_sync_create_alarm_value_list_t *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_create_alarm_aux (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const xcb_sync_create_alarm_value_list_t *value_list); void * xcb_sync_create_alarm_value_list (const xcb_sync_create_alarm_request_t *R); int xcb_sync_change_alarm_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_sync_change_alarm_value_list_t *_aux); int xcb_sync_change_alarm_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_sync_change_alarm_value_list_t *_aux); int xcb_sync_change_alarm_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_sync_change_alarm_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_change_alarm_checked (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_change_alarm (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_change_alarm_aux_checked (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const xcb_sync_change_alarm_value_list_t *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_change_alarm_aux (xcb_connection_t *c, xcb_sync_alarm_t id, uint32_t value_mask, const xcb_sync_change_alarm_value_list_t *value_list); void * xcb_sync_change_alarm_value_list (const xcb_sync_change_alarm_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_destroy_alarm_checked (xcb_connection_t *c, xcb_sync_alarm_t alarm); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_destroy_alarm (xcb_connection_t *c, xcb_sync_alarm_t alarm); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_sync_query_alarm_cookie_t xcb_sync_query_alarm (xcb_connection_t *c, xcb_sync_alarm_t alarm); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_sync_query_alarm_cookie_t xcb_sync_query_alarm_unchecked (xcb_connection_t *c, xcb_sync_alarm_t alarm); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_sync_query_alarm_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_sync_query_alarm_reply_t * xcb_sync_query_alarm_reply (xcb_connection_t *c, xcb_sync_query_alarm_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_set_priority_checked (xcb_connection_t *c, uint32_t id, int32_t priority); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_set_priority (xcb_connection_t *c, uint32_t id, int32_t priority); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_sync_get_priority_cookie_t xcb_sync_get_priority (xcb_connection_t *c, uint32_t id); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_sync_get_priority_cookie_t xcb_sync_get_priority_unchecked (xcb_connection_t *c, uint32_t id); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_sync_get_priority_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_sync_get_priority_reply_t * xcb_sync_get_priority_reply (xcb_connection_t *c, xcb_sync_get_priority_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_create_fence_checked (xcb_connection_t *c, xcb_drawable_t drawable, xcb_sync_fence_t fence, uint8_t initially_triggered); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_create_fence (xcb_connection_t *c, xcb_drawable_t drawable, xcb_sync_fence_t fence, uint8_t initially_triggered); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_trigger_fence_checked (xcb_connection_t *c, xcb_sync_fence_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_trigger_fence (xcb_connection_t *c, xcb_sync_fence_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_reset_fence_checked (xcb_connection_t *c, xcb_sync_fence_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_reset_fence (xcb_connection_t *c, xcb_sync_fence_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_destroy_fence_checked (xcb_connection_t *c, xcb_sync_fence_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_destroy_fence (xcb_connection_t *c, xcb_sync_fence_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_sync_query_fence_cookie_t xcb_sync_query_fence (xcb_connection_t *c, xcb_sync_fence_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_sync_query_fence_cookie_t xcb_sync_query_fence_unchecked (xcb_connection_t *c, xcb_sync_fence_t fence); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_sync_query_fence_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_sync_query_fence_reply_t * xcb_sync_query_fence_reply (xcb_connection_t *c, xcb_sync_query_fence_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_sync_await_fence_sizeof (const void *_buffer, uint32_t fence_list_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_sync_await_fence_checked (xcb_connection_t *c, uint32_t fence_list_len, const xcb_sync_fence_t *fence_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_sync_await_fence (xcb_connection_t *c, uint32_t fence_list_len, const xcb_sync_fence_t *fence_list); xcb_sync_fence_t * xcb_sync_await_fence_fence_list (const xcb_sync_await_fence_request_t *R); int xcb_sync_await_fence_fence_list_length (const xcb_sync_await_fence_request_t *R); xcb_generic_iterator_t xcb_sync_await_fence_fence_list_end (const xcb_sync_await_fence_request_t *R); #ifdef __cplusplus } #endif #endif /** * @} */ PKZSh__ xcb/res.hnu[/* * This file generated automatically from res.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Res_API XCB Res API * @brief Res XCB Protocol Implementation. * @{ **/ #ifndef __RES_H #define __RES_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_RES_MAJOR_VERSION 1 #define XCB_RES_MINOR_VERSION 2 extern xcb_extension_t xcb_res_id; /** * @brief xcb_res_client_t **/ typedef struct xcb_res_client_t { uint32_t resource_base; uint32_t resource_mask; } xcb_res_client_t; /** * @brief xcb_res_client_iterator_t **/ typedef struct xcb_res_client_iterator_t { xcb_res_client_t *data; int rem; int index; } xcb_res_client_iterator_t; /** * @brief xcb_res_type_t **/ typedef struct xcb_res_type_t { xcb_atom_t resource_type; uint32_t count; } xcb_res_type_t; /** * @brief xcb_res_type_iterator_t **/ typedef struct xcb_res_type_iterator_t { xcb_res_type_t *data; int rem; int index; } xcb_res_type_iterator_t; typedef enum xcb_res_client_id_mask_t { XCB_RES_CLIENT_ID_MASK_CLIENT_XID = 1, XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID = 2 } xcb_res_client_id_mask_t; /** * @brief xcb_res_client_id_spec_t **/ typedef struct xcb_res_client_id_spec_t { uint32_t client; uint32_t mask; } xcb_res_client_id_spec_t; /** * @brief xcb_res_client_id_spec_iterator_t **/ typedef struct xcb_res_client_id_spec_iterator_t { xcb_res_client_id_spec_t *data; int rem; int index; } xcb_res_client_id_spec_iterator_t; /** * @brief xcb_res_client_id_value_t **/ typedef struct xcb_res_client_id_value_t { xcb_res_client_id_spec_t spec; uint32_t length; } xcb_res_client_id_value_t; /** * @brief xcb_res_client_id_value_iterator_t **/ typedef struct xcb_res_client_id_value_iterator_t { xcb_res_client_id_value_t *data; int rem; int index; } xcb_res_client_id_value_iterator_t; /** * @brief xcb_res_resource_id_spec_t **/ typedef struct xcb_res_resource_id_spec_t { uint32_t resource; uint32_t type; } xcb_res_resource_id_spec_t; /** * @brief xcb_res_resource_id_spec_iterator_t **/ typedef struct xcb_res_resource_id_spec_iterator_t { xcb_res_resource_id_spec_t *data; int rem; int index; } xcb_res_resource_id_spec_iterator_t; /** * @brief xcb_res_resource_size_spec_t **/ typedef struct xcb_res_resource_size_spec_t { xcb_res_resource_id_spec_t spec; uint32_t bytes; uint32_t ref_count; uint32_t use_count; } xcb_res_resource_size_spec_t; /** * @brief xcb_res_resource_size_spec_iterator_t **/ typedef struct xcb_res_resource_size_spec_iterator_t { xcb_res_resource_size_spec_t *data; int rem; int index; } xcb_res_resource_size_spec_iterator_t; /** * @brief xcb_res_resource_size_value_t **/ typedef struct xcb_res_resource_size_value_t { xcb_res_resource_size_spec_t size; uint32_t num_cross_references; } xcb_res_resource_size_value_t; /** * @brief xcb_res_resource_size_value_iterator_t **/ typedef struct xcb_res_resource_size_value_iterator_t { xcb_res_resource_size_value_t *data; int rem; int index; } xcb_res_resource_size_value_iterator_t; /** * @brief xcb_res_query_version_cookie_t **/ typedef struct xcb_res_query_version_cookie_t { unsigned int sequence; } xcb_res_query_version_cookie_t; /** Opcode for xcb_res_query_version. */ #define XCB_RES_QUERY_VERSION 0 /** * @brief xcb_res_query_version_request_t **/ typedef struct xcb_res_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t client_major; uint8_t client_minor; } xcb_res_query_version_request_t; /** * @brief xcb_res_query_version_reply_t **/ typedef struct xcb_res_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t server_major; uint16_t server_minor; } xcb_res_query_version_reply_t; /** * @brief xcb_res_query_clients_cookie_t **/ typedef struct xcb_res_query_clients_cookie_t { unsigned int sequence; } xcb_res_query_clients_cookie_t; /** Opcode for xcb_res_query_clients. */ #define XCB_RES_QUERY_CLIENTS 1 /** * @brief xcb_res_query_clients_request_t **/ typedef struct xcb_res_query_clients_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_res_query_clients_request_t; /** * @brief xcb_res_query_clients_reply_t **/ typedef struct xcb_res_query_clients_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_clients; uint8_t pad1[20]; } xcb_res_query_clients_reply_t; /** * @brief xcb_res_query_client_resources_cookie_t **/ typedef struct xcb_res_query_client_resources_cookie_t { unsigned int sequence; } xcb_res_query_client_resources_cookie_t; /** Opcode for xcb_res_query_client_resources. */ #define XCB_RES_QUERY_CLIENT_RESOURCES 2 /** * @brief xcb_res_query_client_resources_request_t **/ typedef struct xcb_res_query_client_resources_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t xid; } xcb_res_query_client_resources_request_t; /** * @brief xcb_res_query_client_resources_reply_t **/ typedef struct xcb_res_query_client_resources_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_types; uint8_t pad1[20]; } xcb_res_query_client_resources_reply_t; /** * @brief xcb_res_query_client_pixmap_bytes_cookie_t **/ typedef struct xcb_res_query_client_pixmap_bytes_cookie_t { unsigned int sequence; } xcb_res_query_client_pixmap_bytes_cookie_t; /** Opcode for xcb_res_query_client_pixmap_bytes. */ #define XCB_RES_QUERY_CLIENT_PIXMAP_BYTES 3 /** * @brief xcb_res_query_client_pixmap_bytes_request_t **/ typedef struct xcb_res_query_client_pixmap_bytes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t xid; } xcb_res_query_client_pixmap_bytes_request_t; /** * @brief xcb_res_query_client_pixmap_bytes_reply_t **/ typedef struct xcb_res_query_client_pixmap_bytes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t bytes; uint32_t bytes_overflow; } xcb_res_query_client_pixmap_bytes_reply_t; /** * @brief xcb_res_query_client_ids_cookie_t **/ typedef struct xcb_res_query_client_ids_cookie_t { unsigned int sequence; } xcb_res_query_client_ids_cookie_t; /** Opcode for xcb_res_query_client_ids. */ #define XCB_RES_QUERY_CLIENT_IDS 4 /** * @brief xcb_res_query_client_ids_request_t **/ typedef struct xcb_res_query_client_ids_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t num_specs; } xcb_res_query_client_ids_request_t; /** * @brief xcb_res_query_client_ids_reply_t **/ typedef struct xcb_res_query_client_ids_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_ids; uint8_t pad1[20]; } xcb_res_query_client_ids_reply_t; /** * @brief xcb_res_query_resource_bytes_cookie_t **/ typedef struct xcb_res_query_resource_bytes_cookie_t { unsigned int sequence; } xcb_res_query_resource_bytes_cookie_t; /** Opcode for xcb_res_query_resource_bytes. */ #define XCB_RES_QUERY_RESOURCE_BYTES 5 /** * @brief xcb_res_query_resource_bytes_request_t **/ typedef struct xcb_res_query_resource_bytes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t client; uint32_t num_specs; } xcb_res_query_resource_bytes_request_t; /** * @brief xcb_res_query_resource_bytes_reply_t **/ typedef struct xcb_res_query_resource_bytes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_sizes; uint8_t pad1[20]; } xcb_res_query_resource_bytes_reply_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_res_client_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_res_client_t) */ void xcb_res_client_next (xcb_res_client_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_res_client_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_res_client_end (xcb_res_client_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_res_type_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_res_type_t) */ void xcb_res_type_next (xcb_res_type_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_res_type_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_res_type_end (xcb_res_type_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_res_client_id_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_res_client_id_spec_t) */ void xcb_res_client_id_spec_next (xcb_res_client_id_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_res_client_id_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_res_client_id_spec_end (xcb_res_client_id_spec_iterator_t i); int xcb_res_client_id_value_sizeof (const void *_buffer); uint32_t * xcb_res_client_id_value_value (const xcb_res_client_id_value_t *R); int xcb_res_client_id_value_value_length (const xcb_res_client_id_value_t *R); xcb_generic_iterator_t xcb_res_client_id_value_value_end (const xcb_res_client_id_value_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_res_client_id_value_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_res_client_id_value_t) */ void xcb_res_client_id_value_next (xcb_res_client_id_value_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_res_client_id_value_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_res_client_id_value_end (xcb_res_client_id_value_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_res_resource_id_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_res_resource_id_spec_t) */ void xcb_res_resource_id_spec_next (xcb_res_resource_id_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_res_resource_id_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_res_resource_id_spec_end (xcb_res_resource_id_spec_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_res_resource_size_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_res_resource_size_spec_t) */ void xcb_res_resource_size_spec_next (xcb_res_resource_size_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_res_resource_size_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_res_resource_size_spec_end (xcb_res_resource_size_spec_iterator_t i); int xcb_res_resource_size_value_sizeof (const void *_buffer); xcb_res_resource_size_spec_t * xcb_res_resource_size_value_cross_references (const xcb_res_resource_size_value_t *R); int xcb_res_resource_size_value_cross_references_length (const xcb_res_resource_size_value_t *R); xcb_res_resource_size_spec_iterator_t xcb_res_resource_size_value_cross_references_iterator (const xcb_res_resource_size_value_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_res_resource_size_value_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_res_resource_size_value_t) */ void xcb_res_resource_size_value_next (xcb_res_resource_size_value_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_res_resource_size_value_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_res_resource_size_value_end (xcb_res_resource_size_value_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_res_query_version_cookie_t xcb_res_query_version (xcb_connection_t *c, uint8_t client_major, uint8_t client_minor); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_res_query_version_cookie_t xcb_res_query_version_unchecked (xcb_connection_t *c, uint8_t client_major, uint8_t client_minor); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_res_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_res_query_version_reply_t * xcb_res_query_version_reply (xcb_connection_t *c, xcb_res_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_res_query_clients_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_res_query_clients_cookie_t xcb_res_query_clients (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_res_query_clients_cookie_t xcb_res_query_clients_unchecked (xcb_connection_t *c); xcb_res_client_t * xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R); int xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R); xcb_res_client_iterator_t xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_res_query_clients_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_res_query_clients_reply_t * xcb_res_query_clients_reply (xcb_connection_t *c, xcb_res_query_clients_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_res_query_client_resources_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_res_query_client_resources_cookie_t xcb_res_query_client_resources (xcb_connection_t *c, uint32_t xid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_res_query_client_resources_cookie_t xcb_res_query_client_resources_unchecked (xcb_connection_t *c, uint32_t xid); xcb_res_type_t * xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R); int xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R); xcb_res_type_iterator_t xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_res_query_client_resources_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_res_query_client_resources_reply_t * xcb_res_query_client_resources_reply (xcb_connection_t *c, xcb_res_query_client_resources_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_res_query_client_pixmap_bytes_cookie_t xcb_res_query_client_pixmap_bytes (xcb_connection_t *c, uint32_t xid); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_res_query_client_pixmap_bytes_cookie_t xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c, uint32_t xid); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_res_query_client_pixmap_bytes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_res_query_client_pixmap_bytes_reply_t * xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c, xcb_res_query_client_pixmap_bytes_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_res_query_client_ids_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_res_query_client_ids_cookie_t xcb_res_query_client_ids (xcb_connection_t *c, uint32_t num_specs, const xcb_res_client_id_spec_t *specs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_res_query_client_ids_cookie_t xcb_res_query_client_ids_unchecked (xcb_connection_t *c, uint32_t num_specs, const xcb_res_client_id_spec_t *specs); int xcb_res_query_client_ids_ids_length (const xcb_res_query_client_ids_reply_t *R); xcb_res_client_id_value_iterator_t xcb_res_query_client_ids_ids_iterator (const xcb_res_query_client_ids_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_res_query_client_ids_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_res_query_client_ids_reply_t * xcb_res_query_client_ids_reply (xcb_connection_t *c, xcb_res_query_client_ids_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_res_query_resource_bytes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_res_query_resource_bytes_cookie_t xcb_res_query_resource_bytes (xcb_connection_t *c, uint32_t client, uint32_t num_specs, const xcb_res_resource_id_spec_t *specs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_res_query_resource_bytes_cookie_t xcb_res_query_resource_bytes_unchecked (xcb_connection_t *c, uint32_t client, uint32_t num_specs, const xcb_res_resource_id_spec_t *specs); int xcb_res_query_resource_bytes_sizes_length (const xcb_res_query_resource_bytes_reply_t *R); xcb_res_resource_size_value_iterator_t xcb_res_query_resource_bytes_sizes_iterator (const xcb_res_query_resource_bytes_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_res_query_resource_bytes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_res_query_resource_bytes_reply_t * xcb_res_query_resource_bytes_reply (xcb_connection_t *c, xcb_res_query_resource_bytes_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ |_b@b@xcb/screensaver.hnu[/* * This file generated automatically from screensaver.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_ScreenSaver_API XCB ScreenSaver API * @brief ScreenSaver XCB Protocol Implementation. * @{ **/ #ifndef __SCREENSAVER_H #define __SCREENSAVER_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_SCREENSAVER_MAJOR_VERSION 1 #define XCB_SCREENSAVER_MINOR_VERSION 1 extern xcb_extension_t xcb_screensaver_id; typedef enum xcb_screensaver_kind_t { XCB_SCREENSAVER_KIND_BLANKED = 0, XCB_SCREENSAVER_KIND_INTERNAL = 1, XCB_SCREENSAVER_KIND_EXTERNAL = 2 } xcb_screensaver_kind_t; typedef enum xcb_screensaver_event_t { XCB_SCREENSAVER_EVENT_NOTIFY_MASK = 1, XCB_SCREENSAVER_EVENT_CYCLE_MASK = 2 } xcb_screensaver_event_t; typedef enum xcb_screensaver_state_t { XCB_SCREENSAVER_STATE_OFF = 0, XCB_SCREENSAVER_STATE_ON = 1, XCB_SCREENSAVER_STATE_CYCLE = 2, XCB_SCREENSAVER_STATE_DISABLED = 3 } xcb_screensaver_state_t; /** * @brief xcb_screensaver_query_version_cookie_t **/ typedef struct xcb_screensaver_query_version_cookie_t { unsigned int sequence; } xcb_screensaver_query_version_cookie_t; /** Opcode for xcb_screensaver_query_version. */ #define XCB_SCREENSAVER_QUERY_VERSION 0 /** * @brief xcb_screensaver_query_version_request_t **/ typedef struct xcb_screensaver_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t client_major_version; uint8_t client_minor_version; uint8_t pad0[2]; } xcb_screensaver_query_version_request_t; /** * @brief xcb_screensaver_query_version_reply_t **/ typedef struct xcb_screensaver_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t server_major_version; uint16_t server_minor_version; uint8_t pad1[20]; } xcb_screensaver_query_version_reply_t; /** * @brief xcb_screensaver_query_info_cookie_t **/ typedef struct xcb_screensaver_query_info_cookie_t { unsigned int sequence; } xcb_screensaver_query_info_cookie_t; /** Opcode for xcb_screensaver_query_info. */ #define XCB_SCREENSAVER_QUERY_INFO 1 /** * @brief xcb_screensaver_query_info_request_t **/ typedef struct xcb_screensaver_query_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; } xcb_screensaver_query_info_request_t; /** * @brief xcb_screensaver_query_info_reply_t **/ typedef struct xcb_screensaver_query_info_reply_t { uint8_t response_type; uint8_t state; uint16_t sequence; uint32_t length; xcb_window_t saver_window; uint32_t ms_until_server; uint32_t ms_since_user_input; uint32_t event_mask; uint8_t kind; uint8_t pad0[7]; } xcb_screensaver_query_info_reply_t; /** Opcode for xcb_screensaver_select_input. */ #define XCB_SCREENSAVER_SELECT_INPUT 2 /** * @brief xcb_screensaver_select_input_request_t **/ typedef struct xcb_screensaver_select_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t event_mask; } xcb_screensaver_select_input_request_t; /** * @brief xcb_screensaver_set_attributes_value_list_t **/ typedef struct xcb_screensaver_set_attributes_value_list_t { xcb_pixmap_t background_pixmap; uint32_t background_pixel; xcb_pixmap_t border_pixmap; uint32_t border_pixel; uint32_t bit_gravity; uint32_t win_gravity; uint32_t backing_store; uint32_t backing_planes; uint32_t backing_pixel; xcb_bool32_t override_redirect; xcb_bool32_t save_under; uint32_t event_mask; uint32_t do_not_propogate_mask; xcb_colormap_t colormap; xcb_cursor_t cursor; } xcb_screensaver_set_attributes_value_list_t; /** Opcode for xcb_screensaver_set_attributes. */ #define XCB_SCREENSAVER_SET_ATTRIBUTES 3 /** * @brief xcb_screensaver_set_attributes_request_t **/ typedef struct xcb_screensaver_set_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; int16_t x; int16_t y; uint16_t width; uint16_t height; uint16_t border_width; uint8_t _class; uint8_t depth; xcb_visualid_t visual; uint32_t value_mask; } xcb_screensaver_set_attributes_request_t; /** Opcode for xcb_screensaver_unset_attributes. */ #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4 /** * @brief xcb_screensaver_unset_attributes_request_t **/ typedef struct xcb_screensaver_unset_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; } xcb_screensaver_unset_attributes_request_t; /** Opcode for xcb_screensaver_suspend. */ #define XCB_SCREENSAVER_SUSPEND 5 /** * @brief xcb_screensaver_suspend_request_t **/ typedef struct xcb_screensaver_suspend_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t suspend; uint8_t pad0[3]; } xcb_screensaver_suspend_request_t; /** Opcode for xcb_screensaver_notify. */ #define XCB_SCREENSAVER_NOTIFY 0 /** * @brief xcb_screensaver_notify_event_t **/ typedef struct xcb_screensaver_notify_event_t { uint8_t response_type; uint8_t state; uint16_t sequence; xcb_timestamp_t time; xcb_window_t root; xcb_window_t window; uint8_t kind; uint8_t forced; uint8_t pad0[14]; } xcb_screensaver_notify_event_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_screensaver_query_version_cookie_t xcb_screensaver_query_version (xcb_connection_t *c, uint8_t client_major_version, uint8_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_screensaver_query_version_cookie_t xcb_screensaver_query_version_unchecked (xcb_connection_t *c, uint8_t client_major_version, uint8_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_screensaver_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_screensaver_query_version_reply_t * xcb_screensaver_query_version_reply (xcb_connection_t *c, xcb_screensaver_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_screensaver_query_info_cookie_t xcb_screensaver_query_info (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_screensaver_query_info_cookie_t xcb_screensaver_query_info_unchecked (xcb_connection_t *c, xcb_drawable_t drawable); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_screensaver_query_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_screensaver_query_info_reply_t * xcb_screensaver_query_info_reply (xcb_connection_t *c, xcb_screensaver_query_info_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_screensaver_select_input_checked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_screensaver_select_input (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t event_mask); int xcb_screensaver_set_attributes_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_screensaver_set_attributes_value_list_t *_aux); int xcb_screensaver_set_attributes_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_screensaver_set_attributes_value_list_t *_aux); int xcb_screensaver_set_attributes_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_screensaver_set_attributes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_screensaver_set_attributes_checked (xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint8_t _class, uint8_t depth, xcb_visualid_t visual, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_screensaver_set_attributes (xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint8_t _class, uint8_t depth, xcb_visualid_t visual, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_screensaver_set_attributes_aux_checked (xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint8_t _class, uint8_t depth, xcb_visualid_t visual, uint32_t value_mask, const xcb_screensaver_set_attributes_value_list_t *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_screensaver_set_attributes_aux (xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint16_t border_width, uint8_t _class, uint8_t depth, xcb_visualid_t visual, uint32_t value_mask, const xcb_screensaver_set_attributes_value_list_t *value_list); void * xcb_screensaver_set_attributes_value_list (const xcb_screensaver_set_attributes_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_screensaver_unset_attributes_checked (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_screensaver_unset_attributes (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_screensaver_suspend_checked (xcb_connection_t *c, uint8_t suspend); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_screensaver_suspend (xcb_connection_t *c, uint8_t suspend); #ifdef __cplusplus } #endif #endif /** * @} */ PKZȤ/<mm xcb/record.hnu[/* * This file generated automatically from record.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Record_API XCB Record API * @brief Record XCB Protocol Implementation. * @{ **/ #ifndef __RECORD_H #define __RECORD_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif #define XCB_RECORD_MAJOR_VERSION 1 #define XCB_RECORD_MINOR_VERSION 13 extern xcb_extension_t xcb_record_id; typedef uint32_t xcb_record_context_t; /** * @brief xcb_record_context_iterator_t **/ typedef struct xcb_record_context_iterator_t { xcb_record_context_t *data; int rem; int index; } xcb_record_context_iterator_t; /** * @brief xcb_record_range_8_t **/ typedef struct xcb_record_range_8_t { uint8_t first; uint8_t last; } xcb_record_range_8_t; /** * @brief xcb_record_range_8_iterator_t **/ typedef struct xcb_record_range_8_iterator_t { xcb_record_range_8_t *data; int rem; int index; } xcb_record_range_8_iterator_t; /** * @brief xcb_record_range_16_t **/ typedef struct xcb_record_range_16_t { uint16_t first; uint16_t last; } xcb_record_range_16_t; /** * @brief xcb_record_range_16_iterator_t **/ typedef struct xcb_record_range_16_iterator_t { xcb_record_range_16_t *data; int rem; int index; } xcb_record_range_16_iterator_t; /** * @brief xcb_record_ext_range_t **/ typedef struct xcb_record_ext_range_t { xcb_record_range_8_t major; xcb_record_range_16_t minor; } xcb_record_ext_range_t; /** * @brief xcb_record_ext_range_iterator_t **/ typedef struct xcb_record_ext_range_iterator_t { xcb_record_ext_range_t *data; int rem; int index; } xcb_record_ext_range_iterator_t; /** * @brief xcb_record_range_t **/ typedef struct xcb_record_range_t { xcb_record_range_8_t core_requests; xcb_record_range_8_t core_replies; xcb_record_ext_range_t ext_requests; xcb_record_ext_range_t ext_replies; xcb_record_range_8_t delivered_events; xcb_record_range_8_t device_events; xcb_record_range_8_t errors; uint8_t client_started; uint8_t client_died; } xcb_record_range_t; /** * @brief xcb_record_range_iterator_t **/ typedef struct xcb_record_range_iterator_t { xcb_record_range_t *data; int rem; int index; } xcb_record_range_iterator_t; typedef uint8_t xcb_record_element_header_t; /** * @brief xcb_record_element_header_iterator_t **/ typedef struct xcb_record_element_header_iterator_t { xcb_record_element_header_t *data; int rem; int index; } xcb_record_element_header_iterator_t; typedef enum xcb_record_h_type_t { XCB_RECORD_H_TYPE_FROM_SERVER_TIME = 1, XCB_RECORD_H_TYPE_FROM_CLIENT_TIME = 2, XCB_RECORD_H_TYPE_FROM_CLIENT_SEQUENCE = 4 } xcb_record_h_type_t; typedef uint32_t xcb_record_client_spec_t; /** * @brief xcb_record_client_spec_iterator_t **/ typedef struct xcb_record_client_spec_iterator_t { xcb_record_client_spec_t *data; int rem; int index; } xcb_record_client_spec_iterator_t; typedef enum xcb_record_cs_t { XCB_RECORD_CS_CURRENT_CLIENTS = 1, XCB_RECORD_CS_FUTURE_CLIENTS = 2, XCB_RECORD_CS_ALL_CLIENTS = 3 } xcb_record_cs_t; /** * @brief xcb_record_client_info_t **/ typedef struct xcb_record_client_info_t { xcb_record_client_spec_t client_resource; uint32_t num_ranges; } xcb_record_client_info_t; /** * @brief xcb_record_client_info_iterator_t **/ typedef struct xcb_record_client_info_iterator_t { xcb_record_client_info_t *data; int rem; int index; } xcb_record_client_info_iterator_t; /** Opcode for xcb_record_bad_context. */ #define XCB_RECORD_BAD_CONTEXT 0 /** * @brief xcb_record_bad_context_error_t **/ typedef struct xcb_record_bad_context_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; uint32_t invalid_record; } xcb_record_bad_context_error_t; /** * @brief xcb_record_query_version_cookie_t **/ typedef struct xcb_record_query_version_cookie_t { unsigned int sequence; } xcb_record_query_version_cookie_t; /** Opcode for xcb_record_query_version. */ #define XCB_RECORD_QUERY_VERSION 0 /** * @brief xcb_record_query_version_request_t **/ typedef struct xcb_record_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t major_version; uint16_t minor_version; } xcb_record_query_version_request_t; /** * @brief xcb_record_query_version_reply_t **/ typedef struct xcb_record_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t major_version; uint16_t minor_version; } xcb_record_query_version_reply_t; /** Opcode for xcb_record_create_context. */ #define XCB_RECORD_CREATE_CONTEXT 1 /** * @brief xcb_record_create_context_request_t **/ typedef struct xcb_record_create_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_record_context_t context; xcb_record_element_header_t element_header; uint8_t pad0[3]; uint32_t num_client_specs; uint32_t num_ranges; } xcb_record_create_context_request_t; /** Opcode for xcb_record_register_clients. */ #define XCB_RECORD_REGISTER_CLIENTS 2 /** * @brief xcb_record_register_clients_request_t **/ typedef struct xcb_record_register_clients_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_record_context_t context; xcb_record_element_header_t element_header; uint8_t pad0[3]; uint32_t num_client_specs; uint32_t num_ranges; } xcb_record_register_clients_request_t; /** Opcode for xcb_record_unregister_clients. */ #define XCB_RECORD_UNREGISTER_CLIENTS 3 /** * @brief xcb_record_unregister_clients_request_t **/ typedef struct xcb_record_unregister_clients_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_record_context_t context; uint32_t num_client_specs; } xcb_record_unregister_clients_request_t; /** * @brief xcb_record_get_context_cookie_t **/ typedef struct xcb_record_get_context_cookie_t { unsigned int sequence; } xcb_record_get_context_cookie_t; /** Opcode for xcb_record_get_context. */ #define XCB_RECORD_GET_CONTEXT 4 /** * @brief xcb_record_get_context_request_t **/ typedef struct xcb_record_get_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_record_context_t context; } xcb_record_get_context_request_t; /** * @brief xcb_record_get_context_reply_t **/ typedef struct xcb_record_get_context_reply_t { uint8_t response_type; uint8_t enabled; uint16_t sequence; uint32_t length; xcb_record_element_header_t element_header; uint8_t pad0[3]; uint32_t num_intercepted_clients; uint8_t pad1[16]; } xcb_record_get_context_reply_t; /** * @brief xcb_record_enable_context_cookie_t **/ typedef struct xcb_record_enable_context_cookie_t { unsigned int sequence; } xcb_record_enable_context_cookie_t; /** Opcode for xcb_record_enable_context. */ #define XCB_RECORD_ENABLE_CONTEXT 5 /** * @brief xcb_record_enable_context_request_t **/ typedef struct xcb_record_enable_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_record_context_t context; } xcb_record_enable_context_request_t; /** * @brief xcb_record_enable_context_reply_t **/ typedef struct xcb_record_enable_context_reply_t { uint8_t response_type; uint8_t category; uint16_t sequence; uint32_t length; xcb_record_element_header_t element_header; uint8_t client_swapped; uint8_t pad0[2]; uint32_t xid_base; uint32_t server_time; uint32_t rec_sequence_num; uint8_t pad1[8]; } xcb_record_enable_context_reply_t; /** Opcode for xcb_record_disable_context. */ #define XCB_RECORD_DISABLE_CONTEXT 6 /** * @brief xcb_record_disable_context_request_t **/ typedef struct xcb_record_disable_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_record_context_t context; } xcb_record_disable_context_request_t; /** Opcode for xcb_record_free_context. */ #define XCB_RECORD_FREE_CONTEXT 7 /** * @brief xcb_record_free_context_request_t **/ typedef struct xcb_record_free_context_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_record_context_t context; } xcb_record_free_context_request_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_record_context_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_context_t) */ void xcb_record_context_next (xcb_record_context_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_context_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_context_end (xcb_record_context_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_record_range_8_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_range_8_t) */ void xcb_record_range_8_next (xcb_record_range_8_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_range_8_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_range_8_end (xcb_record_range_8_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_record_range_16_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_range_16_t) */ void xcb_record_range_16_next (xcb_record_range_16_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_range_16_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_range_16_end (xcb_record_range_16_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_record_ext_range_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_ext_range_t) */ void xcb_record_ext_range_next (xcb_record_ext_range_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_ext_range_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_ext_range_end (xcb_record_ext_range_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_record_range_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_range_t) */ void xcb_record_range_next (xcb_record_range_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_range_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_range_end (xcb_record_range_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_record_element_header_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_element_header_t) */ void xcb_record_element_header_next (xcb_record_element_header_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_element_header_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_element_header_end (xcb_record_element_header_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_record_client_spec_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_client_spec_t) */ void xcb_record_client_spec_next (xcb_record_client_spec_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_client_spec_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_client_spec_end (xcb_record_client_spec_iterator_t i); int xcb_record_client_info_sizeof (const void *_buffer); xcb_record_range_t * xcb_record_client_info_ranges (const xcb_record_client_info_t *R); int xcb_record_client_info_ranges_length (const xcb_record_client_info_t *R); xcb_record_range_iterator_t xcb_record_client_info_ranges_iterator (const xcb_record_client_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_record_client_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_record_client_info_t) */ void xcb_record_client_info_next (xcb_record_client_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_record_client_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_record_client_info_end (xcb_record_client_info_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_record_query_version_cookie_t xcb_record_query_version (xcb_connection_t *c, uint16_t major_version, uint16_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_record_query_version_cookie_t xcb_record_query_version_unchecked (xcb_connection_t *c, uint16_t major_version, uint16_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_record_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_record_query_version_reply_t * xcb_record_query_version_reply (xcb_connection_t *c, xcb_record_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_record_create_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_record_create_context_checked (xcb_connection_t *c, xcb_record_context_t context, xcb_record_element_header_t element_header, uint32_t num_client_specs, uint32_t num_ranges, const xcb_record_client_spec_t *client_specs, const xcb_record_range_t *ranges); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_record_create_context (xcb_connection_t *c, xcb_record_context_t context, xcb_record_element_header_t element_header, uint32_t num_client_specs, uint32_t num_ranges, const xcb_record_client_spec_t *client_specs, const xcb_record_range_t *ranges); xcb_record_client_spec_t * xcb_record_create_context_client_specs (const xcb_record_create_context_request_t *R); int xcb_record_create_context_client_specs_length (const xcb_record_create_context_request_t *R); xcb_generic_iterator_t xcb_record_create_context_client_specs_end (const xcb_record_create_context_request_t *R); xcb_record_range_t * xcb_record_create_context_ranges (const xcb_record_create_context_request_t *R); int xcb_record_create_context_ranges_length (const xcb_record_create_context_request_t *R); xcb_record_range_iterator_t xcb_record_create_context_ranges_iterator (const xcb_record_create_context_request_t *R); int xcb_record_register_clients_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_record_register_clients_checked (xcb_connection_t *c, xcb_record_context_t context, xcb_record_element_header_t element_header, uint32_t num_client_specs, uint32_t num_ranges, const xcb_record_client_spec_t *client_specs, const xcb_record_range_t *ranges); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_record_register_clients (xcb_connection_t *c, xcb_record_context_t context, xcb_record_element_header_t element_header, uint32_t num_client_specs, uint32_t num_ranges, const xcb_record_client_spec_t *client_specs, const xcb_record_range_t *ranges); xcb_record_client_spec_t * xcb_record_register_clients_client_specs (const xcb_record_register_clients_request_t *R); int xcb_record_register_clients_client_specs_length (const xcb_record_register_clients_request_t *R); xcb_generic_iterator_t xcb_record_register_clients_client_specs_end (const xcb_record_register_clients_request_t *R); xcb_record_range_t * xcb_record_register_clients_ranges (const xcb_record_register_clients_request_t *R); int xcb_record_register_clients_ranges_length (const xcb_record_register_clients_request_t *R); xcb_record_range_iterator_t xcb_record_register_clients_ranges_iterator (const xcb_record_register_clients_request_t *R); int xcb_record_unregister_clients_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_record_unregister_clients_checked (xcb_connection_t *c, xcb_record_context_t context, uint32_t num_client_specs, const xcb_record_client_spec_t *client_specs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_record_unregister_clients (xcb_connection_t *c, xcb_record_context_t context, uint32_t num_client_specs, const xcb_record_client_spec_t *client_specs); xcb_record_client_spec_t * xcb_record_unregister_clients_client_specs (const xcb_record_unregister_clients_request_t *R); int xcb_record_unregister_clients_client_specs_length (const xcb_record_unregister_clients_request_t *R); xcb_generic_iterator_t xcb_record_unregister_clients_client_specs_end (const xcb_record_unregister_clients_request_t *R); int xcb_record_get_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_record_get_context_cookie_t xcb_record_get_context (xcb_connection_t *c, xcb_record_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_record_get_context_cookie_t xcb_record_get_context_unchecked (xcb_connection_t *c, xcb_record_context_t context); int xcb_record_get_context_intercepted_clients_length (const xcb_record_get_context_reply_t *R); xcb_record_client_info_iterator_t xcb_record_get_context_intercepted_clients_iterator (const xcb_record_get_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_record_get_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_record_get_context_reply_t * xcb_record_get_context_reply (xcb_connection_t *c, xcb_record_get_context_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_record_enable_context_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_record_enable_context_cookie_t xcb_record_enable_context (xcb_connection_t *c, xcb_record_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_record_enable_context_cookie_t xcb_record_enable_context_unchecked (xcb_connection_t *c, xcb_record_context_t context); uint8_t * xcb_record_enable_context_data (const xcb_record_enable_context_reply_t *R); int xcb_record_enable_context_data_length (const xcb_record_enable_context_reply_t *R); xcb_generic_iterator_t xcb_record_enable_context_data_end (const xcb_record_enable_context_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_record_enable_context_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_record_enable_context_reply_t * xcb_record_enable_context_reply (xcb_connection_t *c, xcb_record_enable_context_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_record_disable_context_checked (xcb_connection_t *c, xcb_record_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_record_disable_context (xcb_connection_t *c, xcb_record_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_record_free_context_checked (xcb_connection_t *c, xcb_record_context_t context); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_record_free_context (xcb_connection_t *c, xcb_record_context_t context); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ.. xcb/dpms.hnu[/* * This file generated automatically from dpms.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_DPMS_API XCB DPMS API * @brief DPMS XCB Protocol Implementation. * @{ **/ #ifndef __DPMS_H #define __DPMS_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif #define XCB_DPMS_MAJOR_VERSION 0 #define XCB_DPMS_MINOR_VERSION 0 extern xcb_extension_t xcb_dpms_id; /** * @brief xcb_dpms_get_version_cookie_t **/ typedef struct xcb_dpms_get_version_cookie_t { unsigned int sequence; } xcb_dpms_get_version_cookie_t; /** Opcode for xcb_dpms_get_version. */ #define XCB_DPMS_GET_VERSION 0 /** * @brief xcb_dpms_get_version_request_t **/ typedef struct xcb_dpms_get_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t client_major_version; uint16_t client_minor_version; } xcb_dpms_get_version_request_t; /** * @brief xcb_dpms_get_version_reply_t **/ typedef struct xcb_dpms_get_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t server_major_version; uint16_t server_minor_version; } xcb_dpms_get_version_reply_t; /** * @brief xcb_dpms_capable_cookie_t **/ typedef struct xcb_dpms_capable_cookie_t { unsigned int sequence; } xcb_dpms_capable_cookie_t; /** Opcode for xcb_dpms_capable. */ #define XCB_DPMS_CAPABLE 1 /** * @brief xcb_dpms_capable_request_t **/ typedef struct xcb_dpms_capable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_dpms_capable_request_t; /** * @brief xcb_dpms_capable_reply_t **/ typedef struct xcb_dpms_capable_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint8_t capable; uint8_t pad1[23]; } xcb_dpms_capable_reply_t; /** * @brief xcb_dpms_get_timeouts_cookie_t **/ typedef struct xcb_dpms_get_timeouts_cookie_t { unsigned int sequence; } xcb_dpms_get_timeouts_cookie_t; /** Opcode for xcb_dpms_get_timeouts. */ #define XCB_DPMS_GET_TIMEOUTS 2 /** * @brief xcb_dpms_get_timeouts_request_t **/ typedef struct xcb_dpms_get_timeouts_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_dpms_get_timeouts_request_t; /** * @brief xcb_dpms_get_timeouts_reply_t **/ typedef struct xcb_dpms_get_timeouts_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t standby_timeout; uint16_t suspend_timeout; uint16_t off_timeout; uint8_t pad1[18]; } xcb_dpms_get_timeouts_reply_t; /** Opcode for xcb_dpms_set_timeouts. */ #define XCB_DPMS_SET_TIMEOUTS 3 /** * @brief xcb_dpms_set_timeouts_request_t **/ typedef struct xcb_dpms_set_timeouts_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t standby_timeout; uint16_t suspend_timeout; uint16_t off_timeout; } xcb_dpms_set_timeouts_request_t; /** Opcode for xcb_dpms_enable. */ #define XCB_DPMS_ENABLE 4 /** * @brief xcb_dpms_enable_request_t **/ typedef struct xcb_dpms_enable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_dpms_enable_request_t; /** Opcode for xcb_dpms_disable. */ #define XCB_DPMS_DISABLE 5 /** * @brief xcb_dpms_disable_request_t **/ typedef struct xcb_dpms_disable_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_dpms_disable_request_t; typedef enum xcb_dpms_dpms_mode_t { XCB_DPMS_DPMS_MODE_ON = 0, XCB_DPMS_DPMS_MODE_STANDBY = 1, XCB_DPMS_DPMS_MODE_SUSPEND = 2, XCB_DPMS_DPMS_MODE_OFF = 3 } xcb_dpms_dpms_mode_t; /** Opcode for xcb_dpms_force_level. */ #define XCB_DPMS_FORCE_LEVEL 6 /** * @brief xcb_dpms_force_level_request_t **/ typedef struct xcb_dpms_force_level_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint16_t power_level; } xcb_dpms_force_level_request_t; /** * @brief xcb_dpms_info_cookie_t **/ typedef struct xcb_dpms_info_cookie_t { unsigned int sequence; } xcb_dpms_info_cookie_t; /** Opcode for xcb_dpms_info. */ #define XCB_DPMS_INFO 7 /** * @brief xcb_dpms_info_request_t **/ typedef struct xcb_dpms_info_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_dpms_info_request_t; /** * @brief xcb_dpms_info_reply_t **/ typedef struct xcb_dpms_info_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t power_level; uint8_t state; uint8_t pad1[21]; } xcb_dpms_info_reply_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dpms_get_version_cookie_t xcb_dpms_get_version (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dpms_get_version_cookie_t xcb_dpms_get_version_unchecked (xcb_connection_t *c, uint16_t client_major_version, uint16_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dpms_get_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dpms_get_version_reply_t * xcb_dpms_get_version_reply (xcb_connection_t *c, xcb_dpms_get_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dpms_capable_cookie_t xcb_dpms_capable (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dpms_capable_cookie_t xcb_dpms_capable_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dpms_capable_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dpms_capable_reply_t * xcb_dpms_capable_reply (xcb_connection_t *c, xcb_dpms_capable_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dpms_get_timeouts_cookie_t xcb_dpms_get_timeouts (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dpms_get_timeouts_cookie_t xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dpms_get_timeouts_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dpms_get_timeouts_reply_t * xcb_dpms_get_timeouts_reply (xcb_connection_t *c, xcb_dpms_get_timeouts_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dpms_set_timeouts_checked (xcb_connection_t *c, uint16_t standby_timeout, uint16_t suspend_timeout, uint16_t off_timeout); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dpms_set_timeouts (xcb_connection_t *c, uint16_t standby_timeout, uint16_t suspend_timeout, uint16_t off_timeout); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dpms_enable_checked (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dpms_enable (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dpms_disable_checked (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dpms_disable (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dpms_force_level_checked (xcb_connection_t *c, uint16_t power_level); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dpms_force_level (xcb_connection_t *c, uint16_t power_level); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dpms_info_cookie_t xcb_dpms_info (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dpms_info_cookie_t xcb_dpms_info_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dpms_info_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dpms_info_reply_t * xcb_dpms_info_reply (xcb_connection_t *c, xcb_dpms_info_cookie_t cookie /**< */, xcb_generic_error_t **e); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ#\K\K xcb/present.hnu[/* * This file generated automatically from present.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Present_API XCB Present API * @brief Present XCB Protocol Implementation. * @{ **/ #ifndef __PRESENT_H #define __PRESENT_H #include "xcb.h" #include "xproto.h" #include "randr.h" #include "xfixes.h" #include "sync.h" #ifdef __cplusplus extern "C" { #endif #define XCB_PRESENT_MAJOR_VERSION 1 #define XCB_PRESENT_MINOR_VERSION 2 extern xcb_extension_t xcb_present_id; typedef enum xcb_present_event_enum_t { XCB_PRESENT_EVENT_CONFIGURE_NOTIFY = 0, XCB_PRESENT_EVENT_COMPLETE_NOTIFY = 1, XCB_PRESENT_EVENT_IDLE_NOTIFY = 2, XCB_PRESENT_EVENT_REDIRECT_NOTIFY = 3 } xcb_present_event_enum_t; typedef enum xcb_present_event_mask_t { XCB_PRESENT_EVENT_MASK_NO_EVENT = 0, XCB_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY = 1, XCB_PRESENT_EVENT_MASK_COMPLETE_NOTIFY = 2, XCB_PRESENT_EVENT_MASK_IDLE_NOTIFY = 4, XCB_PRESENT_EVENT_MASK_REDIRECT_NOTIFY = 8 } xcb_present_event_mask_t; typedef enum xcb_present_option_t { XCB_PRESENT_OPTION_NONE = 0, XCB_PRESENT_OPTION_ASYNC = 1, XCB_PRESENT_OPTION_COPY = 2, XCB_PRESENT_OPTION_UST = 4, XCB_PRESENT_OPTION_SUBOPTIMAL = 8 } xcb_present_option_t; typedef enum xcb_present_capability_t { XCB_PRESENT_CAPABILITY_NONE = 0, XCB_PRESENT_CAPABILITY_ASYNC = 1, XCB_PRESENT_CAPABILITY_FENCE = 2, XCB_PRESENT_CAPABILITY_UST = 4 } xcb_present_capability_t; typedef enum xcb_present_complete_kind_t { XCB_PRESENT_COMPLETE_KIND_PIXMAP = 0, XCB_PRESENT_COMPLETE_KIND_NOTIFY_MSC = 1 } xcb_present_complete_kind_t; typedef enum xcb_present_complete_mode_t { XCB_PRESENT_COMPLETE_MODE_COPY = 0, XCB_PRESENT_COMPLETE_MODE_FLIP = 1, XCB_PRESENT_COMPLETE_MODE_SKIP = 2, XCB_PRESENT_COMPLETE_MODE_SUBOPTIMAL_COPY = 3 } xcb_present_complete_mode_t; /** * @brief xcb_present_notify_t **/ typedef struct xcb_present_notify_t { xcb_window_t window; uint32_t serial; } xcb_present_notify_t; /** * @brief xcb_present_notify_iterator_t **/ typedef struct xcb_present_notify_iterator_t { xcb_present_notify_t *data; int rem; int index; } xcb_present_notify_iterator_t; /** * @brief xcb_present_query_version_cookie_t **/ typedef struct xcb_present_query_version_cookie_t { unsigned int sequence; } xcb_present_query_version_cookie_t; /** Opcode for xcb_present_query_version. */ #define XCB_PRESENT_QUERY_VERSION 0 /** * @brief xcb_present_query_version_request_t **/ typedef struct xcb_present_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; } xcb_present_query_version_request_t; /** * @brief xcb_present_query_version_reply_t **/ typedef struct xcb_present_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; } xcb_present_query_version_reply_t; /** Opcode for xcb_present_pixmap. */ #define XCB_PRESENT_PIXMAP 1 /** * @brief xcb_present_pixmap_request_t **/ typedef struct xcb_present_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_pixmap_t pixmap; uint32_t serial; xcb_xfixes_region_t valid; xcb_xfixes_region_t update; int16_t x_off; int16_t y_off; xcb_randr_crtc_t target_crtc; xcb_sync_fence_t wait_fence; xcb_sync_fence_t idle_fence; uint32_t options; uint8_t pad0[4]; uint64_t target_msc; uint64_t divisor; uint64_t remainder; } xcb_present_pixmap_request_t; /** Opcode for xcb_present_notify_msc. */ #define XCB_PRESENT_NOTIFY_MSC 2 /** * @brief xcb_present_notify_msc_request_t **/ typedef struct xcb_present_notify_msc_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint32_t serial; uint8_t pad0[4]; uint64_t target_msc; uint64_t divisor; uint64_t remainder; } xcb_present_notify_msc_request_t; typedef uint32_t xcb_present_event_t; /** * @brief xcb_present_event_iterator_t **/ typedef struct xcb_present_event_iterator_t { xcb_present_event_t *data; int rem; int index; } xcb_present_event_iterator_t; /** Opcode for xcb_present_select_input. */ #define XCB_PRESENT_SELECT_INPUT 3 /** * @brief xcb_present_select_input_request_t **/ typedef struct xcb_present_select_input_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_present_event_t eid; xcb_window_t window; uint32_t event_mask; } xcb_present_select_input_request_t; /** * @brief xcb_present_query_capabilities_cookie_t **/ typedef struct xcb_present_query_capabilities_cookie_t { unsigned int sequence; } xcb_present_query_capabilities_cookie_t; /** Opcode for xcb_present_query_capabilities. */ #define XCB_PRESENT_QUERY_CAPABILITIES 4 /** * @brief xcb_present_query_capabilities_request_t **/ typedef struct xcb_present_query_capabilities_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t target; } xcb_present_query_capabilities_request_t; /** * @brief xcb_present_query_capabilities_reply_t **/ typedef struct xcb_present_query_capabilities_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t capabilities; } xcb_present_query_capabilities_reply_t; /** Opcode for xcb_present_generic. */ #define XCB_PRESENT_GENERIC 0 /** * @brief xcb_present_generic_event_t **/ typedef struct xcb_present_generic_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t evtype; uint8_t pad0[2]; xcb_present_event_t event; } xcb_present_generic_event_t; /** Opcode for xcb_present_configure_notify. */ #define XCB_PRESENT_CONFIGURE_NOTIFY 0 /** * @brief xcb_present_configure_notify_event_t **/ typedef struct xcb_present_configure_notify_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; uint8_t pad0[2]; xcb_present_event_t event; xcb_window_t window; int16_t x; int16_t y; uint16_t width; uint16_t height; int16_t off_x; int16_t off_y; uint32_t full_sequence; uint16_t pixmap_width; uint16_t pixmap_height; uint32_t pixmap_flags; } xcb_present_configure_notify_event_t; /** Opcode for xcb_present_complete_notify. */ #define XCB_PRESENT_COMPLETE_NOTIFY 1 /** * @brief xcb_present_complete_notify_event_t **/ typedef struct xcb_present_complete_notify_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; uint8_t kind; uint8_t mode; xcb_present_event_t event; xcb_window_t window; uint32_t serial; uint64_t ust; uint32_t full_sequence; uint64_t msc; } XCB_PACKED xcb_present_complete_notify_event_t; /** Opcode for xcb_present_idle_notify. */ #define XCB_PRESENT_IDLE_NOTIFY 2 /** * @brief xcb_present_idle_notify_event_t **/ typedef struct xcb_present_idle_notify_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; uint8_t pad0[2]; xcb_present_event_t event; xcb_window_t window; uint32_t serial; xcb_pixmap_t pixmap; xcb_sync_fence_t idle_fence; uint32_t full_sequence; } xcb_present_idle_notify_event_t; /** Opcode for xcb_present_redirect_notify. */ #define XCB_PRESENT_REDIRECT_NOTIFY 3 /** * @brief xcb_present_redirect_notify_event_t **/ typedef struct xcb_present_redirect_notify_event_t { uint8_t response_type; uint8_t extension; uint16_t sequence; uint32_t length; uint16_t event_type; uint8_t update_window; uint8_t pad0; xcb_present_event_t event; xcb_window_t event_window; xcb_window_t window; xcb_pixmap_t pixmap; uint32_t serial; uint32_t full_sequence; xcb_xfixes_region_t valid_region; xcb_xfixes_region_t update_region; xcb_rectangle_t valid_rect; xcb_rectangle_t update_rect; int16_t x_off; int16_t y_off; xcb_randr_crtc_t target_crtc; xcb_sync_fence_t wait_fence; xcb_sync_fence_t idle_fence; uint32_t options; uint8_t pad1[4]; uint64_t target_msc; uint64_t divisor; uint64_t remainder; } XCB_PACKED xcb_present_redirect_notify_event_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_present_notify_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_present_notify_t) */ void xcb_present_notify_next (xcb_present_notify_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_present_notify_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_present_notify_end (xcb_present_notify_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_present_query_version_cookie_t xcb_present_query_version (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_present_query_version_cookie_t xcb_present_query_version_unchecked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_present_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_present_query_version_reply_t * xcb_present_query_version_reply (xcb_connection_t *c, xcb_present_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_present_pixmap_sizeof (const void *_buffer, uint32_t notifies_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_present_pixmap_checked (xcb_connection_t *c, xcb_window_t window, xcb_pixmap_t pixmap, uint32_t serial, xcb_xfixes_region_t valid, xcb_xfixes_region_t update, int16_t x_off, int16_t y_off, xcb_randr_crtc_t target_crtc, xcb_sync_fence_t wait_fence, xcb_sync_fence_t idle_fence, uint32_t options, uint64_t target_msc, uint64_t divisor, uint64_t remainder, uint32_t notifies_len, const xcb_present_notify_t *notifies); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_present_pixmap (xcb_connection_t *c, xcb_window_t window, xcb_pixmap_t pixmap, uint32_t serial, xcb_xfixes_region_t valid, xcb_xfixes_region_t update, int16_t x_off, int16_t y_off, xcb_randr_crtc_t target_crtc, xcb_sync_fence_t wait_fence, xcb_sync_fence_t idle_fence, uint32_t options, uint64_t target_msc, uint64_t divisor, uint64_t remainder, uint32_t notifies_len, const xcb_present_notify_t *notifies); xcb_present_notify_t * xcb_present_pixmap_notifies (const xcb_present_pixmap_request_t *R); int xcb_present_pixmap_notifies_length (const xcb_present_pixmap_request_t *R); xcb_present_notify_iterator_t xcb_present_pixmap_notifies_iterator (const xcb_present_pixmap_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_present_notify_msc_checked (xcb_connection_t *c, xcb_window_t window, uint32_t serial, uint64_t target_msc, uint64_t divisor, uint64_t remainder); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_present_notify_msc (xcb_connection_t *c, xcb_window_t window, uint32_t serial, uint64_t target_msc, uint64_t divisor, uint64_t remainder); /** * Get the next element of the iterator * @param i Pointer to a xcb_present_event_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_present_event_t) */ void xcb_present_event_next (xcb_present_event_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_present_event_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_present_event_end (xcb_present_event_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_present_select_input_checked (xcb_connection_t *c, xcb_present_event_t eid, xcb_window_t window, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_present_select_input (xcb_connection_t *c, xcb_present_event_t eid, xcb_window_t window, uint32_t event_mask); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_present_query_capabilities_cookie_t xcb_present_query_capabilities (xcb_connection_t *c, uint32_t target); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_present_query_capabilities_cookie_t xcb_present_query_capabilities_unchecked (xcb_connection_t *c, uint32_t target); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_present_query_capabilities_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_present_query_capabilities_reply_t * xcb_present_query_capabilities_reply (xcb_connection_t *c, xcb_present_query_capabilities_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_present_redirect_notify_sizeof (const void *_buffer, uint32_t notifies_len); xcb_present_notify_t * xcb_present_redirect_notify_notifies (const xcb_present_redirect_notify_event_t *R); int xcb_present_redirect_notify_notifies_length (const xcb_present_redirect_notify_event_t *R); xcb_present_notify_iterator_t xcb_present_redirect_notify_notifies_iterator (const xcb_present_redirect_notify_event_t *R); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ {+6+6xcb/composite.hnu[/* * This file generated automatically from composite.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Composite_API XCB Composite API * @brief Composite XCB Protocol Implementation. * @{ **/ #ifndef __COMPOSITE_H #define __COMPOSITE_H #include "xcb.h" #include "xproto.h" #include "xfixes.h" #ifdef __cplusplus extern "C" { #endif #define XCB_COMPOSITE_MAJOR_VERSION 0 #define XCB_COMPOSITE_MINOR_VERSION 4 extern xcb_extension_t xcb_composite_id; typedef enum xcb_composite_redirect_t { XCB_COMPOSITE_REDIRECT_AUTOMATIC = 0, XCB_COMPOSITE_REDIRECT_MANUAL = 1 } xcb_composite_redirect_t; /** * @brief xcb_composite_query_version_cookie_t **/ typedef struct xcb_composite_query_version_cookie_t { unsigned int sequence; } xcb_composite_query_version_cookie_t; /** Opcode for xcb_composite_query_version. */ #define XCB_COMPOSITE_QUERY_VERSION 0 /** * @brief xcb_composite_query_version_request_t **/ typedef struct xcb_composite_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t client_major_version; uint32_t client_minor_version; } xcb_composite_query_version_request_t; /** * @brief xcb_composite_query_version_reply_t **/ typedef struct xcb_composite_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; uint8_t pad1[16]; } xcb_composite_query_version_reply_t; /** Opcode for xcb_composite_redirect_window. */ #define XCB_COMPOSITE_REDIRECT_WINDOW 1 /** * @brief xcb_composite_redirect_window_request_t **/ typedef struct xcb_composite_redirect_window_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint8_t update; uint8_t pad0[3]; } xcb_composite_redirect_window_request_t; /** Opcode for xcb_composite_redirect_subwindows. */ #define XCB_COMPOSITE_REDIRECT_SUBWINDOWS 2 /** * @brief xcb_composite_redirect_subwindows_request_t **/ typedef struct xcb_composite_redirect_subwindows_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint8_t update; uint8_t pad0[3]; } xcb_composite_redirect_subwindows_request_t; /** Opcode for xcb_composite_unredirect_window. */ #define XCB_COMPOSITE_UNREDIRECT_WINDOW 3 /** * @brief xcb_composite_unredirect_window_request_t **/ typedef struct xcb_composite_unredirect_window_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint8_t update; uint8_t pad0[3]; } xcb_composite_unredirect_window_request_t; /** Opcode for xcb_composite_unredirect_subwindows. */ #define XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS 4 /** * @brief xcb_composite_unredirect_subwindows_request_t **/ typedef struct xcb_composite_unredirect_subwindows_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; uint8_t update; uint8_t pad0[3]; } xcb_composite_unredirect_subwindows_request_t; /** Opcode for xcb_composite_create_region_from_border_clip. */ #define XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP 5 /** * @brief xcb_composite_create_region_from_border_clip_request_t **/ typedef struct xcb_composite_create_region_from_border_clip_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xfixes_region_t region; xcb_window_t window; } xcb_composite_create_region_from_border_clip_request_t; /** Opcode for xcb_composite_name_window_pixmap. */ #define XCB_COMPOSITE_NAME_WINDOW_PIXMAP 6 /** * @brief xcb_composite_name_window_pixmap_request_t **/ typedef struct xcb_composite_name_window_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; xcb_pixmap_t pixmap; } xcb_composite_name_window_pixmap_request_t; /** * @brief xcb_composite_get_overlay_window_cookie_t **/ typedef struct xcb_composite_get_overlay_window_cookie_t { unsigned int sequence; } xcb_composite_get_overlay_window_cookie_t; /** Opcode for xcb_composite_get_overlay_window. */ #define XCB_COMPOSITE_GET_OVERLAY_WINDOW 7 /** * @brief xcb_composite_get_overlay_window_request_t **/ typedef struct xcb_composite_get_overlay_window_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_composite_get_overlay_window_request_t; /** * @brief xcb_composite_get_overlay_window_reply_t **/ typedef struct xcb_composite_get_overlay_window_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; xcb_window_t overlay_win; uint8_t pad1[20]; } xcb_composite_get_overlay_window_reply_t; /** Opcode for xcb_composite_release_overlay_window. */ #define XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW 8 /** * @brief xcb_composite_release_overlay_window_request_t **/ typedef struct xcb_composite_release_overlay_window_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_composite_release_overlay_window_request_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_composite_query_version_cookie_t xcb_composite_query_version (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_composite_query_version_cookie_t xcb_composite_query_version_unchecked (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_composite_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_composite_query_version_reply_t * xcb_composite_query_version_reply (xcb_connection_t *c, xcb_composite_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_composite_redirect_window_checked (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_composite_redirect_window (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_composite_redirect_subwindows_checked (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_composite_redirect_subwindows (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_composite_unredirect_window_checked (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_composite_unredirect_window (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_composite_unredirect_subwindows (xcb_connection_t *c, xcb_window_t window, uint8_t update); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_composite_create_region_from_border_clip_checked (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_composite_create_region_from_border_clip (xcb_connection_t *c, xcb_xfixes_region_t region, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_composite_name_window_pixmap_checked (xcb_connection_t *c, xcb_window_t window, xcb_pixmap_t pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_composite_name_window_pixmap (xcb_connection_t *c, xcb_window_t window, xcb_pixmap_t pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_composite_get_overlay_window_cookie_t xcb_composite_get_overlay_window (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_composite_get_overlay_window_cookie_t xcb_composite_get_overlay_window_unchecked (xcb_connection_t *c, xcb_window_t window); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_composite_get_overlay_window_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_composite_get_overlay_window_reply_t * xcb_composite_get_overlay_window_reply (xcb_connection_t *c, xcb_composite_get_overlay_window_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_composite_release_overlay_window_checked (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_composite_release_overlay_window (xcb_connection_t *c, xcb_window_t window); #ifdef __cplusplus } #endif #endif /** * @} */ PKZiH^^ xcb/dri3.hnu[/* * This file generated automatically from dri3.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_DRI3_API XCB DRI3 API * @brief DRI3 XCB Protocol Implementation. * @{ **/ #ifndef __DRI3_H #define __DRI3_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_DRI3_MAJOR_VERSION 1 #define XCB_DRI3_MINOR_VERSION 2 extern xcb_extension_t xcb_dri3_id; /** * @brief xcb_dri3_query_version_cookie_t **/ typedef struct xcb_dri3_query_version_cookie_t { unsigned int sequence; } xcb_dri3_query_version_cookie_t; /** Opcode for xcb_dri3_query_version. */ #define XCB_DRI3_QUERY_VERSION 0 /** * @brief xcb_dri3_query_version_request_t **/ typedef struct xcb_dri3_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t major_version; uint32_t minor_version; } xcb_dri3_query_version_request_t; /** * @brief xcb_dri3_query_version_reply_t **/ typedef struct xcb_dri3_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; } xcb_dri3_query_version_reply_t; /** * @brief xcb_dri3_open_cookie_t **/ typedef struct xcb_dri3_open_cookie_t { unsigned int sequence; } xcb_dri3_open_cookie_t; /** Opcode for xcb_dri3_open. */ #define XCB_DRI3_OPEN 1 /** * @brief xcb_dri3_open_request_t **/ typedef struct xcb_dri3_open_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t provider; } xcb_dri3_open_request_t; /** * @brief xcb_dri3_open_reply_t **/ typedef struct xcb_dri3_open_reply_t { uint8_t response_type; uint8_t nfd; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_dri3_open_reply_t; /** Opcode for xcb_dri3_pixmap_from_buffer. */ #define XCB_DRI3_PIXMAP_FROM_BUFFER 2 /** * @brief xcb_dri3_pixmap_from_buffer_request_t **/ typedef struct xcb_dri3_pixmap_from_buffer_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_pixmap_t pixmap; xcb_drawable_t drawable; uint32_t size; uint16_t width; uint16_t height; uint16_t stride; uint8_t depth; uint8_t bpp; } xcb_dri3_pixmap_from_buffer_request_t; /** * @brief xcb_dri3_buffer_from_pixmap_cookie_t **/ typedef struct xcb_dri3_buffer_from_pixmap_cookie_t { unsigned int sequence; } xcb_dri3_buffer_from_pixmap_cookie_t; /** Opcode for xcb_dri3_buffer_from_pixmap. */ #define XCB_DRI3_BUFFER_FROM_PIXMAP 3 /** * @brief xcb_dri3_buffer_from_pixmap_request_t **/ typedef struct xcb_dri3_buffer_from_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_pixmap_t pixmap; } xcb_dri3_buffer_from_pixmap_request_t; /** * @brief xcb_dri3_buffer_from_pixmap_reply_t **/ typedef struct xcb_dri3_buffer_from_pixmap_reply_t { uint8_t response_type; uint8_t nfd; uint16_t sequence; uint32_t length; uint32_t size; uint16_t width; uint16_t height; uint16_t stride; uint8_t depth; uint8_t bpp; uint8_t pad0[12]; } xcb_dri3_buffer_from_pixmap_reply_t; /** Opcode for xcb_dri3_fence_from_fd. */ #define XCB_DRI3_FENCE_FROM_FD 4 /** * @brief xcb_dri3_fence_from_fd_request_t **/ typedef struct xcb_dri3_fence_from_fd_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t fence; uint8_t initially_triggered; uint8_t pad0[3]; } xcb_dri3_fence_from_fd_request_t; /** * @brief xcb_dri3_fd_from_fence_cookie_t **/ typedef struct xcb_dri3_fd_from_fence_cookie_t { unsigned int sequence; } xcb_dri3_fd_from_fence_cookie_t; /** Opcode for xcb_dri3_fd_from_fence. */ #define XCB_DRI3_FD_FROM_FENCE 5 /** * @brief xcb_dri3_fd_from_fence_request_t **/ typedef struct xcb_dri3_fd_from_fence_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint32_t fence; } xcb_dri3_fd_from_fence_request_t; /** * @brief xcb_dri3_fd_from_fence_reply_t **/ typedef struct xcb_dri3_fd_from_fence_reply_t { uint8_t response_type; uint8_t nfd; uint16_t sequence; uint32_t length; uint8_t pad0[24]; } xcb_dri3_fd_from_fence_reply_t; /** * @brief xcb_dri3_get_supported_modifiers_cookie_t **/ typedef struct xcb_dri3_get_supported_modifiers_cookie_t { unsigned int sequence; } xcb_dri3_get_supported_modifiers_cookie_t; /** Opcode for xcb_dri3_get_supported_modifiers. */ #define XCB_DRI3_GET_SUPPORTED_MODIFIERS 6 /** * @brief xcb_dri3_get_supported_modifiers_request_t **/ typedef struct xcb_dri3_get_supported_modifiers_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t window; uint8_t depth; uint8_t bpp; uint8_t pad0[2]; } xcb_dri3_get_supported_modifiers_request_t; /** * @brief xcb_dri3_get_supported_modifiers_reply_t **/ typedef struct xcb_dri3_get_supported_modifiers_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_window_modifiers; uint32_t num_screen_modifiers; uint8_t pad1[16]; } xcb_dri3_get_supported_modifiers_reply_t; /** Opcode for xcb_dri3_pixmap_from_buffers. */ #define XCB_DRI3_PIXMAP_FROM_BUFFERS 7 /** * @brief xcb_dri3_pixmap_from_buffers_request_t **/ typedef struct xcb_dri3_pixmap_from_buffers_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_pixmap_t pixmap; xcb_window_t window; uint8_t num_buffers; uint8_t pad0[3]; uint16_t width; uint16_t height; uint32_t stride0; uint32_t offset0; uint32_t stride1; uint32_t offset1; uint32_t stride2; uint32_t offset2; uint32_t stride3; uint32_t offset3; uint8_t depth; uint8_t bpp; uint8_t pad1[2]; uint64_t modifier; } xcb_dri3_pixmap_from_buffers_request_t; /** * @brief xcb_dri3_buffers_from_pixmap_cookie_t **/ typedef struct xcb_dri3_buffers_from_pixmap_cookie_t { unsigned int sequence; } xcb_dri3_buffers_from_pixmap_cookie_t; /** Opcode for xcb_dri3_buffers_from_pixmap. */ #define XCB_DRI3_BUFFERS_FROM_PIXMAP 8 /** * @brief xcb_dri3_buffers_from_pixmap_request_t **/ typedef struct xcb_dri3_buffers_from_pixmap_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_pixmap_t pixmap; } xcb_dri3_buffers_from_pixmap_request_t; /** * @brief xcb_dri3_buffers_from_pixmap_reply_t **/ typedef struct xcb_dri3_buffers_from_pixmap_reply_t { uint8_t response_type; uint8_t nfd; uint16_t sequence; uint32_t length; uint16_t width; uint16_t height; uint8_t pad0[4]; uint64_t modifier; uint8_t depth; uint8_t bpp; uint8_t pad1[6]; } xcb_dri3_buffers_from_pixmap_reply_t; /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri3_query_version_cookie_t xcb_dri3_query_version (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri3_query_version_cookie_t xcb_dri3_query_version_unchecked (xcb_connection_t *c, uint32_t major_version, uint32_t minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri3_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri3_query_version_reply_t * xcb_dri3_query_version_reply (xcb_connection_t *c, xcb_dri3_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri3_open_cookie_t xcb_dri3_open (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t provider); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri3_open_cookie_t xcb_dri3_open_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t provider); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri3_open_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri3_open_reply_t * xcb_dri3_open_reply (xcb_connection_t *c, xcb_dri3_open_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Return the reply fds * @param c The connection * @param reply The reply * * Returns the array of reply fds of the request asked by * * The returned value must be freed by the caller using free(). */ int * xcb_dri3_open_reply_fds (xcb_connection_t *c /**< */, xcb_dri3_open_reply_t *reply); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dri3_pixmap_from_buffer_checked (xcb_connection_t *c, xcb_pixmap_t pixmap, xcb_drawable_t drawable, uint32_t size, uint16_t width, uint16_t height, uint16_t stride, uint8_t depth, uint8_t bpp, int32_t pixmap_fd); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dri3_pixmap_from_buffer (xcb_connection_t *c, xcb_pixmap_t pixmap, xcb_drawable_t drawable, uint32_t size, uint16_t width, uint16_t height, uint16_t stride, uint8_t depth, uint8_t bpp, int32_t pixmap_fd); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri3_buffer_from_pixmap_cookie_t xcb_dri3_buffer_from_pixmap (xcb_connection_t *c, xcb_pixmap_t pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri3_buffer_from_pixmap_cookie_t xcb_dri3_buffer_from_pixmap_unchecked (xcb_connection_t *c, xcb_pixmap_t pixmap); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri3_buffer_from_pixmap_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri3_buffer_from_pixmap_reply_t * xcb_dri3_buffer_from_pixmap_reply (xcb_connection_t *c, xcb_dri3_buffer_from_pixmap_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Return the reply fds * @param c The connection * @param reply The reply * * Returns the array of reply fds of the request asked by * * The returned value must be freed by the caller using free(). */ int * xcb_dri3_buffer_from_pixmap_reply_fds (xcb_connection_t *c /**< */, xcb_dri3_buffer_from_pixmap_reply_t *reply); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dri3_fence_from_fd_checked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t fence, uint8_t initially_triggered, int32_t fence_fd); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dri3_fence_from_fd (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t fence, uint8_t initially_triggered, int32_t fence_fd); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri3_fd_from_fence_cookie_t xcb_dri3_fd_from_fence (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t fence); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri3_fd_from_fence_cookie_t xcb_dri3_fd_from_fence_unchecked (xcb_connection_t *c, xcb_drawable_t drawable, uint32_t fence); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri3_fd_from_fence_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri3_fd_from_fence_reply_t * xcb_dri3_fd_from_fence_reply (xcb_connection_t *c, xcb_dri3_fd_from_fence_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Return the reply fds * @param c The connection * @param reply The reply * * Returns the array of reply fds of the request asked by * * The returned value must be freed by the caller using free(). */ int * xcb_dri3_fd_from_fence_reply_fds (xcb_connection_t *c /**< */, xcb_dri3_fd_from_fence_reply_t *reply); int xcb_dri3_get_supported_modifiers_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri3_get_supported_modifiers_cookie_t xcb_dri3_get_supported_modifiers (xcb_connection_t *c, uint32_t window, uint8_t depth, uint8_t bpp); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri3_get_supported_modifiers_cookie_t xcb_dri3_get_supported_modifiers_unchecked (xcb_connection_t *c, uint32_t window, uint8_t depth, uint8_t bpp); uint64_t * xcb_dri3_get_supported_modifiers_window_modifiers (const xcb_dri3_get_supported_modifiers_reply_t *R); int xcb_dri3_get_supported_modifiers_window_modifiers_length (const xcb_dri3_get_supported_modifiers_reply_t *R); xcb_generic_iterator_t xcb_dri3_get_supported_modifiers_window_modifiers_end (const xcb_dri3_get_supported_modifiers_reply_t *R); uint64_t * xcb_dri3_get_supported_modifiers_screen_modifiers (const xcb_dri3_get_supported_modifiers_reply_t *R); int xcb_dri3_get_supported_modifiers_screen_modifiers_length (const xcb_dri3_get_supported_modifiers_reply_t *R); xcb_generic_iterator_t xcb_dri3_get_supported_modifiers_screen_modifiers_end (const xcb_dri3_get_supported_modifiers_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri3_get_supported_modifiers_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri3_get_supported_modifiers_reply_t * xcb_dri3_get_supported_modifiers_reply (xcb_connection_t *c, xcb_dri3_get_supported_modifiers_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_dri3_pixmap_from_buffers_checked (xcb_connection_t *c, xcb_pixmap_t pixmap, xcb_window_t window, uint8_t num_buffers, uint16_t width, uint16_t height, uint32_t stride0, uint32_t offset0, uint32_t stride1, uint32_t offset1, uint32_t stride2, uint32_t offset2, uint32_t stride3, uint32_t offset3, uint8_t depth, uint8_t bpp, uint64_t modifier, const int32_t *buffers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_dri3_pixmap_from_buffers (xcb_connection_t *c, xcb_pixmap_t pixmap, xcb_window_t window, uint8_t num_buffers, uint16_t width, uint16_t height, uint32_t stride0, uint32_t offset0, uint32_t stride1, uint32_t offset1, uint32_t stride2, uint32_t offset2, uint32_t stride3, uint32_t offset3, uint8_t depth, uint8_t bpp, uint64_t modifier, const int32_t *buffers); int xcb_dri3_buffers_from_pixmap_sizeof (const void *_buffer, int32_t buffers); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_dri3_buffers_from_pixmap_cookie_t xcb_dri3_buffers_from_pixmap (xcb_connection_t *c, xcb_pixmap_t pixmap); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_dri3_buffers_from_pixmap_cookie_t xcb_dri3_buffers_from_pixmap_unchecked (xcb_connection_t *c, xcb_pixmap_t pixmap); uint32_t * xcb_dri3_buffers_from_pixmap_strides (const xcb_dri3_buffers_from_pixmap_reply_t *R); int xcb_dri3_buffers_from_pixmap_strides_length (const xcb_dri3_buffers_from_pixmap_reply_t *R); xcb_generic_iterator_t xcb_dri3_buffers_from_pixmap_strides_end (const xcb_dri3_buffers_from_pixmap_reply_t *R); uint32_t * xcb_dri3_buffers_from_pixmap_offsets (const xcb_dri3_buffers_from_pixmap_reply_t *R); int xcb_dri3_buffers_from_pixmap_offsets_length (const xcb_dri3_buffers_from_pixmap_reply_t *R); xcb_generic_iterator_t xcb_dri3_buffers_from_pixmap_offsets_end (const xcb_dri3_buffers_from_pixmap_reply_t *R); int32_t * xcb_dri3_buffers_from_pixmap_buffers (const xcb_dri3_buffers_from_pixmap_reply_t *R); int xcb_dri3_buffers_from_pixmap_buffers_length (const xcb_dri3_buffers_from_pixmap_reply_t *R); xcb_generic_iterator_t xcb_dri3_buffers_from_pixmap_buffers_end (const xcb_dri3_buffers_from_pixmap_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_dri3_buffers_from_pixmap_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_dri3_buffers_from_pixmap_reply_t * xcb_dri3_buffers_from_pixmap_reply (xcb_connection_t *c, xcb_dri3_buffers_from_pixmap_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * Return the reply fds * @param c The connection * @param reply The reply * * Returns the array of reply fds of the request asked by * * The returned value must be freed by the caller using free(). */ int * xcb_dri3_buffers_from_pixmap_reply_fds (xcb_connection_t *c /**< */, xcb_dri3_buffers_from_pixmap_reply_t *reply); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ5xcb/xv.hnu[/* * This file generated automatically from xv.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Xv_API XCB Xv API * @brief Xv XCB Protocol Implementation. * @{ **/ #ifndef __XV_H #define __XV_H #include "xcb.h" #include "xproto.h" #include "shm.h" #ifdef __cplusplus extern "C" { #endif #define XCB_XV_MAJOR_VERSION 2 #define XCB_XV_MINOR_VERSION 2 extern xcb_extension_t xcb_xv_id; typedef uint32_t xcb_xv_port_t; /** * @brief xcb_xv_port_iterator_t **/ typedef struct xcb_xv_port_iterator_t { xcb_xv_port_t *data; int rem; int index; } xcb_xv_port_iterator_t; typedef uint32_t xcb_xv_encoding_t; /** * @brief xcb_xv_encoding_iterator_t **/ typedef struct xcb_xv_encoding_iterator_t { xcb_xv_encoding_t *data; int rem; int index; } xcb_xv_encoding_iterator_t; typedef enum xcb_xv_type_t { XCB_XV_TYPE_INPUT_MASK = 1, XCB_XV_TYPE_OUTPUT_MASK = 2, XCB_XV_TYPE_VIDEO_MASK = 4, XCB_XV_TYPE_STILL_MASK = 8, XCB_XV_TYPE_IMAGE_MASK = 16 } xcb_xv_type_t; typedef enum xcb_xv_image_format_info_type_t { XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB = 0, XCB_XV_IMAGE_FORMAT_INFO_TYPE_YUV = 1 } xcb_xv_image_format_info_type_t; typedef enum xcb_xv_image_format_info_format_t { XCB_XV_IMAGE_FORMAT_INFO_FORMAT_PACKED = 0, XCB_XV_IMAGE_FORMAT_INFO_FORMAT_PLANAR = 1 } xcb_xv_image_format_info_format_t; typedef enum xcb_xv_attribute_flag_t { XCB_XV_ATTRIBUTE_FLAG_GETTABLE = 1, XCB_XV_ATTRIBUTE_FLAG_SETTABLE = 2 } xcb_xv_attribute_flag_t; typedef enum xcb_xv_video_notify_reason_t { XCB_XV_VIDEO_NOTIFY_REASON_STARTED = 0, XCB_XV_VIDEO_NOTIFY_REASON_STOPPED = 1, XCB_XV_VIDEO_NOTIFY_REASON_BUSY = 2, XCB_XV_VIDEO_NOTIFY_REASON_PREEMPTED = 3, XCB_XV_VIDEO_NOTIFY_REASON_HARD_ERROR = 4 } xcb_xv_video_notify_reason_t; typedef enum xcb_xv_scanline_order_t { XCB_XV_SCANLINE_ORDER_TOP_TO_BOTTOM = 0, XCB_XV_SCANLINE_ORDER_BOTTOM_TO_TOP = 1 } xcb_xv_scanline_order_t; typedef enum xcb_xv_grab_port_status_t { XCB_XV_GRAB_PORT_STATUS_SUCCESS = 0, XCB_XV_GRAB_PORT_STATUS_BAD_EXTENSION = 1, XCB_XV_GRAB_PORT_STATUS_ALREADY_GRABBED = 2, XCB_XV_GRAB_PORT_STATUS_INVALID_TIME = 3, XCB_XV_GRAB_PORT_STATUS_BAD_REPLY = 4, XCB_XV_GRAB_PORT_STATUS_BAD_ALLOC = 5 } xcb_xv_grab_port_status_t; /** * @brief xcb_xv_rational_t **/ typedef struct xcb_xv_rational_t { int32_t numerator; int32_t denominator; } xcb_xv_rational_t; /** * @brief xcb_xv_rational_iterator_t **/ typedef struct xcb_xv_rational_iterator_t { xcb_xv_rational_t *data; int rem; int index; } xcb_xv_rational_iterator_t; /** * @brief xcb_xv_format_t **/ typedef struct xcb_xv_format_t { xcb_visualid_t visual; uint8_t depth; uint8_t pad0[3]; } xcb_xv_format_t; /** * @brief xcb_xv_format_iterator_t **/ typedef struct xcb_xv_format_iterator_t { xcb_xv_format_t *data; int rem; int index; } xcb_xv_format_iterator_t; /** * @brief xcb_xv_adaptor_info_t **/ typedef struct xcb_xv_adaptor_info_t { xcb_xv_port_t base_id; uint16_t name_size; uint16_t num_ports; uint16_t num_formats; uint8_t type; uint8_t pad0; } xcb_xv_adaptor_info_t; /** * @brief xcb_xv_adaptor_info_iterator_t **/ typedef struct xcb_xv_adaptor_info_iterator_t { xcb_xv_adaptor_info_t *data; int rem; int index; } xcb_xv_adaptor_info_iterator_t; /** * @brief xcb_xv_encoding_info_t **/ typedef struct xcb_xv_encoding_info_t { xcb_xv_encoding_t encoding; uint16_t name_size; uint16_t width; uint16_t height; uint8_t pad0[2]; xcb_xv_rational_t rate; } xcb_xv_encoding_info_t; /** * @brief xcb_xv_encoding_info_iterator_t **/ typedef struct xcb_xv_encoding_info_iterator_t { xcb_xv_encoding_info_t *data; int rem; int index; } xcb_xv_encoding_info_iterator_t; /** * @brief xcb_xv_image_t **/ typedef struct xcb_xv_image_t { uint32_t id; uint16_t width; uint16_t height; uint32_t data_size; uint32_t num_planes; } xcb_xv_image_t; /** * @brief xcb_xv_image_iterator_t **/ typedef struct xcb_xv_image_iterator_t { xcb_xv_image_t *data; int rem; int index; } xcb_xv_image_iterator_t; /** * @brief xcb_xv_attribute_info_t **/ typedef struct xcb_xv_attribute_info_t { uint32_t flags; int32_t min; int32_t max; uint32_t size; } xcb_xv_attribute_info_t; /** * @brief xcb_xv_attribute_info_iterator_t **/ typedef struct xcb_xv_attribute_info_iterator_t { xcb_xv_attribute_info_t *data; int rem; int index; } xcb_xv_attribute_info_iterator_t; /** * @brief xcb_xv_image_format_info_t **/ typedef struct xcb_xv_image_format_info_t { uint32_t id; uint8_t type; uint8_t byte_order; uint8_t pad0[2]; uint8_t guid[16]; uint8_t bpp; uint8_t num_planes; uint8_t pad1[2]; uint8_t depth; uint8_t pad2[3]; uint32_t red_mask; uint32_t green_mask; uint32_t blue_mask; uint8_t format; uint8_t pad3[3]; uint32_t y_sample_bits; uint32_t u_sample_bits; uint32_t v_sample_bits; uint32_t vhorz_y_period; uint32_t vhorz_u_period; uint32_t vhorz_v_period; uint32_t vvert_y_period; uint32_t vvert_u_period; uint32_t vvert_v_period; uint8_t vcomp_order[32]; uint8_t vscanline_order; uint8_t pad4[11]; } xcb_xv_image_format_info_t; /** * @brief xcb_xv_image_format_info_iterator_t **/ typedef struct xcb_xv_image_format_info_iterator_t { xcb_xv_image_format_info_t *data; int rem; int index; } xcb_xv_image_format_info_iterator_t; /** Opcode for xcb_xv_bad_port. */ #define XCB_XV_BAD_PORT 0 /** * @brief xcb_xv_bad_port_error_t **/ typedef struct xcb_xv_bad_port_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_xv_bad_port_error_t; /** Opcode for xcb_xv_bad_encoding. */ #define XCB_XV_BAD_ENCODING 1 /** * @brief xcb_xv_bad_encoding_error_t **/ typedef struct xcb_xv_bad_encoding_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_xv_bad_encoding_error_t; /** Opcode for xcb_xv_bad_control. */ #define XCB_XV_BAD_CONTROL 2 /** * @brief xcb_xv_bad_control_error_t **/ typedef struct xcb_xv_bad_control_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_xv_bad_control_error_t; /** Opcode for xcb_xv_video_notify. */ #define XCB_XV_VIDEO_NOTIFY 0 /** * @brief xcb_xv_video_notify_event_t **/ typedef struct xcb_xv_video_notify_event_t { uint8_t response_type; uint8_t reason; uint16_t sequence; xcb_timestamp_t time; xcb_drawable_t drawable; xcb_xv_port_t port; } xcb_xv_video_notify_event_t; /** Opcode for xcb_xv_port_notify. */ #define XCB_XV_PORT_NOTIFY 1 /** * @brief xcb_xv_port_notify_event_t **/ typedef struct xcb_xv_port_notify_event_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; xcb_timestamp_t time; xcb_xv_port_t port; xcb_atom_t attribute; int32_t value; } xcb_xv_port_notify_event_t; /** * @brief xcb_xv_query_extension_cookie_t **/ typedef struct xcb_xv_query_extension_cookie_t { unsigned int sequence; } xcb_xv_query_extension_cookie_t; /** Opcode for xcb_xv_query_extension. */ #define XCB_XV_QUERY_EXTENSION 0 /** * @brief xcb_xv_query_extension_request_t **/ typedef struct xcb_xv_query_extension_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_xv_query_extension_request_t; /** * @brief xcb_xv_query_extension_reply_t **/ typedef struct xcb_xv_query_extension_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t major; uint16_t minor; } xcb_xv_query_extension_reply_t; /** * @brief xcb_xv_query_adaptors_cookie_t **/ typedef struct xcb_xv_query_adaptors_cookie_t { unsigned int sequence; } xcb_xv_query_adaptors_cookie_t; /** Opcode for xcb_xv_query_adaptors. */ #define XCB_XV_QUERY_ADAPTORS 1 /** * @brief xcb_xv_query_adaptors_request_t **/ typedef struct xcb_xv_query_adaptors_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_window_t window; } xcb_xv_query_adaptors_request_t; /** * @brief xcb_xv_query_adaptors_reply_t **/ typedef struct xcb_xv_query_adaptors_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_adaptors; uint8_t pad1[22]; } xcb_xv_query_adaptors_reply_t; /** * @brief xcb_xv_query_encodings_cookie_t **/ typedef struct xcb_xv_query_encodings_cookie_t { unsigned int sequence; } xcb_xv_query_encodings_cookie_t; /** Opcode for xcb_xv_query_encodings. */ #define XCB_XV_QUERY_ENCODINGS 2 /** * @brief xcb_xv_query_encodings_request_t **/ typedef struct xcb_xv_query_encodings_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; } xcb_xv_query_encodings_request_t; /** * @brief xcb_xv_query_encodings_reply_t **/ typedef struct xcb_xv_query_encodings_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t num_encodings; uint8_t pad1[22]; } xcb_xv_query_encodings_reply_t; /** * @brief xcb_xv_grab_port_cookie_t **/ typedef struct xcb_xv_grab_port_cookie_t { unsigned int sequence; } xcb_xv_grab_port_cookie_t; /** Opcode for xcb_xv_grab_port. */ #define XCB_XV_GRAB_PORT 3 /** * @brief xcb_xv_grab_port_request_t **/ typedef struct xcb_xv_grab_port_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_timestamp_t time; } xcb_xv_grab_port_request_t; /** * @brief xcb_xv_grab_port_reply_t **/ typedef struct xcb_xv_grab_port_reply_t { uint8_t response_type; uint8_t result; uint16_t sequence; uint32_t length; } xcb_xv_grab_port_reply_t; /** Opcode for xcb_xv_ungrab_port. */ #define XCB_XV_UNGRAB_PORT 4 /** * @brief xcb_xv_ungrab_port_request_t **/ typedef struct xcb_xv_ungrab_port_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_timestamp_t time; } xcb_xv_ungrab_port_request_t; /** Opcode for xcb_xv_put_video. */ #define XCB_XV_PUT_VIDEO 5 /** * @brief xcb_xv_put_video_request_t **/ typedef struct xcb_xv_put_video_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t vid_x; int16_t vid_y; uint16_t vid_w; uint16_t vid_h; int16_t drw_x; int16_t drw_y; uint16_t drw_w; uint16_t drw_h; } xcb_xv_put_video_request_t; /** Opcode for xcb_xv_put_still. */ #define XCB_XV_PUT_STILL 6 /** * @brief xcb_xv_put_still_request_t **/ typedef struct xcb_xv_put_still_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t vid_x; int16_t vid_y; uint16_t vid_w; uint16_t vid_h; int16_t drw_x; int16_t drw_y; uint16_t drw_w; uint16_t drw_h; } xcb_xv_put_still_request_t; /** Opcode for xcb_xv_get_video. */ #define XCB_XV_GET_VIDEO 7 /** * @brief xcb_xv_get_video_request_t **/ typedef struct xcb_xv_get_video_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t vid_x; int16_t vid_y; uint16_t vid_w; uint16_t vid_h; int16_t drw_x; int16_t drw_y; uint16_t drw_w; uint16_t drw_h; } xcb_xv_get_video_request_t; /** Opcode for xcb_xv_get_still. */ #define XCB_XV_GET_STILL 8 /** * @brief xcb_xv_get_still_request_t **/ typedef struct xcb_xv_get_still_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_drawable_t drawable; xcb_gcontext_t gc; int16_t vid_x; int16_t vid_y; uint16_t vid_w; uint16_t vid_h; int16_t drw_x; int16_t drw_y; uint16_t drw_w; uint16_t drw_h; } xcb_xv_get_still_request_t; /** Opcode for xcb_xv_stop_video. */ #define XCB_XV_STOP_VIDEO 9 /** * @brief xcb_xv_stop_video_request_t **/ typedef struct xcb_xv_stop_video_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_drawable_t drawable; } xcb_xv_stop_video_request_t; /** Opcode for xcb_xv_select_video_notify. */ #define XCB_XV_SELECT_VIDEO_NOTIFY 10 /** * @brief xcb_xv_select_video_notify_request_t **/ typedef struct xcb_xv_select_video_notify_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; uint8_t onoff; uint8_t pad0[3]; } xcb_xv_select_video_notify_request_t; /** Opcode for xcb_xv_select_port_notify. */ #define XCB_XV_SELECT_PORT_NOTIFY 11 /** * @brief xcb_xv_select_port_notify_request_t **/ typedef struct xcb_xv_select_port_notify_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; uint8_t onoff; uint8_t pad0[3]; } xcb_xv_select_port_notify_request_t; /** * @brief xcb_xv_query_best_size_cookie_t **/ typedef struct xcb_xv_query_best_size_cookie_t { unsigned int sequence; } xcb_xv_query_best_size_cookie_t; /** Opcode for xcb_xv_query_best_size. */ #define XCB_XV_QUERY_BEST_SIZE 12 /** * @brief xcb_xv_query_best_size_request_t **/ typedef struct xcb_xv_query_best_size_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; uint16_t vid_w; uint16_t vid_h; uint16_t drw_w; uint16_t drw_h; uint8_t motion; uint8_t pad0[3]; } xcb_xv_query_best_size_request_t; /** * @brief xcb_xv_query_best_size_reply_t **/ typedef struct xcb_xv_query_best_size_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint16_t actual_width; uint16_t actual_height; } xcb_xv_query_best_size_reply_t; /** Opcode for xcb_xv_set_port_attribute. */ #define XCB_XV_SET_PORT_ATTRIBUTE 13 /** * @brief xcb_xv_set_port_attribute_request_t **/ typedef struct xcb_xv_set_port_attribute_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_atom_t attribute; int32_t value; } xcb_xv_set_port_attribute_request_t; /** * @brief xcb_xv_get_port_attribute_cookie_t **/ typedef struct xcb_xv_get_port_attribute_cookie_t { unsigned int sequence; } xcb_xv_get_port_attribute_cookie_t; /** Opcode for xcb_xv_get_port_attribute. */ #define XCB_XV_GET_PORT_ATTRIBUTE 14 /** * @brief xcb_xv_get_port_attribute_request_t **/ typedef struct xcb_xv_get_port_attribute_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_atom_t attribute; } xcb_xv_get_port_attribute_request_t; /** * @brief xcb_xv_get_port_attribute_reply_t **/ typedef struct xcb_xv_get_port_attribute_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; int32_t value; } xcb_xv_get_port_attribute_reply_t; /** * @brief xcb_xv_query_port_attributes_cookie_t **/ typedef struct xcb_xv_query_port_attributes_cookie_t { unsigned int sequence; } xcb_xv_query_port_attributes_cookie_t; /** Opcode for xcb_xv_query_port_attributes. */ #define XCB_XV_QUERY_PORT_ATTRIBUTES 15 /** * @brief xcb_xv_query_port_attributes_request_t **/ typedef struct xcb_xv_query_port_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; } xcb_xv_query_port_attributes_request_t; /** * @brief xcb_xv_query_port_attributes_reply_t **/ typedef struct xcb_xv_query_port_attributes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_attributes; uint32_t text_size; uint8_t pad1[16]; } xcb_xv_query_port_attributes_reply_t; /** * @brief xcb_xv_list_image_formats_cookie_t **/ typedef struct xcb_xv_list_image_formats_cookie_t { unsigned int sequence; } xcb_xv_list_image_formats_cookie_t; /** Opcode for xcb_xv_list_image_formats. */ #define XCB_XV_LIST_IMAGE_FORMATS 16 /** * @brief xcb_xv_list_image_formats_request_t **/ typedef struct xcb_xv_list_image_formats_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; } xcb_xv_list_image_formats_request_t; /** * @brief xcb_xv_list_image_formats_reply_t **/ typedef struct xcb_xv_list_image_formats_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_formats; uint8_t pad1[20]; } xcb_xv_list_image_formats_reply_t; /** * @brief xcb_xv_query_image_attributes_cookie_t **/ typedef struct xcb_xv_query_image_attributes_cookie_t { unsigned int sequence; } xcb_xv_query_image_attributes_cookie_t; /** Opcode for xcb_xv_query_image_attributes. */ #define XCB_XV_QUERY_IMAGE_ATTRIBUTES 17 /** * @brief xcb_xv_query_image_attributes_request_t **/ typedef struct xcb_xv_query_image_attributes_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; uint32_t id; uint16_t width; uint16_t height; } xcb_xv_query_image_attributes_request_t; /** * @brief xcb_xv_query_image_attributes_reply_t **/ typedef struct xcb_xv_query_image_attributes_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_planes; uint32_t data_size; uint16_t width; uint16_t height; uint8_t pad1[12]; } xcb_xv_query_image_attributes_reply_t; /** Opcode for xcb_xv_put_image. */ #define XCB_XV_PUT_IMAGE 18 /** * @brief xcb_xv_put_image_request_t **/ typedef struct xcb_xv_put_image_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_drawable_t drawable; xcb_gcontext_t gc; uint32_t id; int16_t src_x; int16_t src_y; uint16_t src_w; uint16_t src_h; int16_t drw_x; int16_t drw_y; uint16_t drw_w; uint16_t drw_h; uint16_t width; uint16_t height; } xcb_xv_put_image_request_t; /** Opcode for xcb_xv_shm_put_image. */ #define XCB_XV_SHM_PUT_IMAGE 19 /** * @brief xcb_xv_shm_put_image_request_t **/ typedef struct xcb_xv_shm_put_image_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_xv_port_t port; xcb_drawable_t drawable; xcb_gcontext_t gc; xcb_shm_seg_t shmseg; uint32_t id; uint32_t offset; int16_t src_x; int16_t src_y; uint16_t src_w; uint16_t src_h; int16_t drw_x; int16_t drw_y; uint16_t drw_w; uint16_t drw_h; uint16_t width; uint16_t height; uint8_t send_event; uint8_t pad0[3]; } xcb_xv_shm_put_image_request_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_port_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_port_t) */ void xcb_xv_port_next (xcb_xv_port_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_port_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_port_end (xcb_xv_port_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_encoding_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_encoding_t) */ void xcb_xv_encoding_next (xcb_xv_encoding_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_encoding_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_encoding_end (xcb_xv_encoding_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_rational_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_rational_t) */ void xcb_xv_rational_next (xcb_xv_rational_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_rational_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_rational_end (xcb_xv_rational_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_format_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_format_t) */ void xcb_xv_format_next (xcb_xv_format_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_format_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_format_end (xcb_xv_format_iterator_t i); int xcb_xv_adaptor_info_sizeof (const void *_buffer); char * xcb_xv_adaptor_info_name (const xcb_xv_adaptor_info_t *R); int xcb_xv_adaptor_info_name_length (const xcb_xv_adaptor_info_t *R); xcb_generic_iterator_t xcb_xv_adaptor_info_name_end (const xcb_xv_adaptor_info_t *R); xcb_xv_format_t * xcb_xv_adaptor_info_formats (const xcb_xv_adaptor_info_t *R); int xcb_xv_adaptor_info_formats_length (const xcb_xv_adaptor_info_t *R); xcb_xv_format_iterator_t xcb_xv_adaptor_info_formats_iterator (const xcb_xv_adaptor_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_adaptor_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_adaptor_info_t) */ void xcb_xv_adaptor_info_next (xcb_xv_adaptor_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_adaptor_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_adaptor_info_end (xcb_xv_adaptor_info_iterator_t i); int xcb_xv_encoding_info_sizeof (const void *_buffer); char * xcb_xv_encoding_info_name (const xcb_xv_encoding_info_t *R); int xcb_xv_encoding_info_name_length (const xcb_xv_encoding_info_t *R); xcb_generic_iterator_t xcb_xv_encoding_info_name_end (const xcb_xv_encoding_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_encoding_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_encoding_info_t) */ void xcb_xv_encoding_info_next (xcb_xv_encoding_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_encoding_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_encoding_info_end (xcb_xv_encoding_info_iterator_t i); int xcb_xv_image_sizeof (const void *_buffer); uint32_t * xcb_xv_image_pitches (const xcb_xv_image_t *R); int xcb_xv_image_pitches_length (const xcb_xv_image_t *R); xcb_generic_iterator_t xcb_xv_image_pitches_end (const xcb_xv_image_t *R); uint32_t * xcb_xv_image_offsets (const xcb_xv_image_t *R); int xcb_xv_image_offsets_length (const xcb_xv_image_t *R); xcb_generic_iterator_t xcb_xv_image_offsets_end (const xcb_xv_image_t *R); uint8_t * xcb_xv_image_data (const xcb_xv_image_t *R); int xcb_xv_image_data_length (const xcb_xv_image_t *R); xcb_generic_iterator_t xcb_xv_image_data_end (const xcb_xv_image_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_image_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_image_t) */ void xcb_xv_image_next (xcb_xv_image_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_image_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_image_end (xcb_xv_image_iterator_t i); int xcb_xv_attribute_info_sizeof (const void *_buffer); char * xcb_xv_attribute_info_name (const xcb_xv_attribute_info_t *R); int xcb_xv_attribute_info_name_length (const xcb_xv_attribute_info_t *R); xcb_generic_iterator_t xcb_xv_attribute_info_name_end (const xcb_xv_attribute_info_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_attribute_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_attribute_info_t) */ void xcb_xv_attribute_info_next (xcb_xv_attribute_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_attribute_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_attribute_info_end (xcb_xv_attribute_info_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_xv_image_format_info_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_xv_image_format_info_t) */ void xcb_xv_image_format_info_next (xcb_xv_image_format_info_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_xv_image_format_info_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_xv_image_format_info_end (xcb_xv_image_format_info_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_query_extension_cookie_t xcb_xv_query_extension (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_query_extension_cookie_t xcb_xv_query_extension_unchecked (xcb_connection_t *c); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_query_extension_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_query_extension_reply_t * xcb_xv_query_extension_reply (xcb_connection_t *c, xcb_xv_query_extension_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xv_query_adaptors_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_query_adaptors_cookie_t xcb_xv_query_adaptors (xcb_connection_t *c, xcb_window_t window); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_query_adaptors_cookie_t xcb_xv_query_adaptors_unchecked (xcb_connection_t *c, xcb_window_t window); int xcb_xv_query_adaptors_info_length (const xcb_xv_query_adaptors_reply_t *R); xcb_xv_adaptor_info_iterator_t xcb_xv_query_adaptors_info_iterator (const xcb_xv_query_adaptors_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_query_adaptors_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_query_adaptors_reply_t * xcb_xv_query_adaptors_reply (xcb_connection_t *c, xcb_xv_query_adaptors_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xv_query_encodings_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_query_encodings_cookie_t xcb_xv_query_encodings (xcb_connection_t *c, xcb_xv_port_t port); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_query_encodings_cookie_t xcb_xv_query_encodings_unchecked (xcb_connection_t *c, xcb_xv_port_t port); int xcb_xv_query_encodings_info_length (const xcb_xv_query_encodings_reply_t *R); xcb_xv_encoding_info_iterator_t xcb_xv_query_encodings_info_iterator (const xcb_xv_query_encodings_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_query_encodings_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_query_encodings_reply_t * xcb_xv_query_encodings_reply (xcb_connection_t *c, xcb_xv_query_encodings_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_grab_port_cookie_t xcb_xv_grab_port (xcb_connection_t *c, xcb_xv_port_t port, xcb_timestamp_t time); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_grab_port_cookie_t xcb_xv_grab_port_unchecked (xcb_connection_t *c, xcb_xv_port_t port, xcb_timestamp_t time); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_grab_port_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_grab_port_reply_t * xcb_xv_grab_port_reply (xcb_connection_t *c, xcb_xv_grab_port_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_ungrab_port_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_timestamp_t time); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_ungrab_port (xcb_connection_t *c, xcb_xv_port_t port, xcb_timestamp_t time); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_put_video_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_put_video (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_put_still_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_put_still (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_get_video_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_get_video (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_get_still_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_get_still (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, int16_t vid_x, int16_t vid_y, uint16_t vid_w, uint16_t vid_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_stop_video_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_stop_video (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_select_video_notify_checked (xcb_connection_t *c, xcb_drawable_t drawable, uint8_t onoff); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_select_video_notify (xcb_connection_t *c, xcb_drawable_t drawable, uint8_t onoff); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_select_port_notify_checked (xcb_connection_t *c, xcb_xv_port_t port, uint8_t onoff); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_select_port_notify (xcb_connection_t *c, xcb_xv_port_t port, uint8_t onoff); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_query_best_size_cookie_t xcb_xv_query_best_size (xcb_connection_t *c, xcb_xv_port_t port, uint16_t vid_w, uint16_t vid_h, uint16_t drw_w, uint16_t drw_h, uint8_t motion); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_query_best_size_cookie_t xcb_xv_query_best_size_unchecked (xcb_connection_t *c, xcb_xv_port_t port, uint16_t vid_w, uint16_t vid_h, uint16_t drw_w, uint16_t drw_h, uint8_t motion); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_query_best_size_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_query_best_size_reply_t * xcb_xv_query_best_size_reply (xcb_connection_t *c, xcb_xv_query_best_size_cookie_t cookie /**< */, xcb_generic_error_t **e); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_set_port_attribute_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_atom_t attribute, int32_t value); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_set_port_attribute (xcb_connection_t *c, xcb_xv_port_t port, xcb_atom_t attribute, int32_t value); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_get_port_attribute_cookie_t xcb_xv_get_port_attribute (xcb_connection_t *c, xcb_xv_port_t port, xcb_atom_t attribute); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_get_port_attribute_cookie_t xcb_xv_get_port_attribute_unchecked (xcb_connection_t *c, xcb_xv_port_t port, xcb_atom_t attribute); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_get_port_attribute_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_get_port_attribute_reply_t * xcb_xv_get_port_attribute_reply (xcb_connection_t *c, xcb_xv_get_port_attribute_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xv_query_port_attributes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_query_port_attributes_cookie_t xcb_xv_query_port_attributes (xcb_connection_t *c, xcb_xv_port_t port); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_query_port_attributes_cookie_t xcb_xv_query_port_attributes_unchecked (xcb_connection_t *c, xcb_xv_port_t port); int xcb_xv_query_port_attributes_attributes_length (const xcb_xv_query_port_attributes_reply_t *R); xcb_xv_attribute_info_iterator_t xcb_xv_query_port_attributes_attributes_iterator (const xcb_xv_query_port_attributes_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_query_port_attributes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_query_port_attributes_reply_t * xcb_xv_query_port_attributes_reply (xcb_connection_t *c, xcb_xv_query_port_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xv_list_image_formats_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_list_image_formats_cookie_t xcb_xv_list_image_formats (xcb_connection_t *c, xcb_xv_port_t port); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_list_image_formats_cookie_t xcb_xv_list_image_formats_unchecked (xcb_connection_t *c, xcb_xv_port_t port); xcb_xv_image_format_info_t * xcb_xv_list_image_formats_format (const xcb_xv_list_image_formats_reply_t *R); int xcb_xv_list_image_formats_format_length (const xcb_xv_list_image_formats_reply_t *R); xcb_xv_image_format_info_iterator_t xcb_xv_list_image_formats_format_iterator (const xcb_xv_list_image_formats_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_list_image_formats_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_list_image_formats_reply_t * xcb_xv_list_image_formats_reply (xcb_connection_t *c, xcb_xv_list_image_formats_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xv_query_image_attributes_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_xv_query_image_attributes_cookie_t xcb_xv_query_image_attributes (xcb_connection_t *c, xcb_xv_port_t port, uint32_t id, uint16_t width, uint16_t height); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_xv_query_image_attributes_cookie_t xcb_xv_query_image_attributes_unchecked (xcb_connection_t *c, xcb_xv_port_t port, uint32_t id, uint16_t width, uint16_t height); uint32_t * xcb_xv_query_image_attributes_pitches (const xcb_xv_query_image_attributes_reply_t *R); int xcb_xv_query_image_attributes_pitches_length (const xcb_xv_query_image_attributes_reply_t *R); xcb_generic_iterator_t xcb_xv_query_image_attributes_pitches_end (const xcb_xv_query_image_attributes_reply_t *R); uint32_t * xcb_xv_query_image_attributes_offsets (const xcb_xv_query_image_attributes_reply_t *R); int xcb_xv_query_image_attributes_offsets_length (const xcb_xv_query_image_attributes_reply_t *R); xcb_generic_iterator_t xcb_xv_query_image_attributes_offsets_end (const xcb_xv_query_image_attributes_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_xv_query_image_attributes_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_xv_query_image_attributes_reply_t * xcb_xv_query_image_attributes_reply (xcb_connection_t *c, xcb_xv_query_image_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_xv_put_image_sizeof (const void *_buffer, uint32_t data_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_put_image_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t id, int16_t src_x, int16_t src_y, uint16_t src_w, uint16_t src_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h, uint16_t width, uint16_t height, uint32_t data_len, const uint8_t *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_put_image (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, uint32_t id, int16_t src_x, int16_t src_y, uint16_t src_w, uint16_t src_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h, uint16_t width, uint16_t height, uint32_t data_len, const uint8_t *data); uint8_t * xcb_xv_put_image_data (const xcb_xv_put_image_request_t *R); int xcb_xv_put_image_data_length (const xcb_xv_put_image_request_t *R); xcb_generic_iterator_t xcb_xv_put_image_data_end (const xcb_xv_put_image_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_xv_shm_put_image_checked (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, xcb_shm_seg_t shmseg, uint32_t id, uint32_t offset, int16_t src_x, int16_t src_y, uint16_t src_w, uint16_t src_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h, uint16_t width, uint16_t height, uint8_t send_event); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_xv_shm_put_image (xcb_connection_t *c, xcb_xv_port_t port, xcb_drawable_t drawable, xcb_gcontext_t gc, xcb_shm_seg_t shmseg, uint32_t id, uint32_t offset, int16_t src_x, int16_t src_y, uint16_t src_w, uint16_t src_h, int16_t drw_x, int16_t drw_y, uint16_t drw_w, uint16_t drw_h, uint16_t width, uint16_t height, uint8_t send_event); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ̾.. xcb/render.hnu[/* * This file generated automatically from render.xml by c_client.py. * Edit at your peril. */ /** * @defgroup XCB_Render_API XCB Render API * @brief Render XCB Protocol Implementation. * @{ **/ #ifndef __RENDER_H #define __RENDER_H #include "xcb.h" #include "xproto.h" #ifdef __cplusplus extern "C" { #endif #define XCB_RENDER_MAJOR_VERSION 0 #define XCB_RENDER_MINOR_VERSION 11 extern xcb_extension_t xcb_render_id; typedef enum xcb_render_pict_type_t { XCB_RENDER_PICT_TYPE_INDEXED = 0, XCB_RENDER_PICT_TYPE_DIRECT = 1 } xcb_render_pict_type_t; typedef enum xcb_render_picture_enum_t { XCB_RENDER_PICTURE_NONE = 0 } xcb_render_picture_enum_t; typedef enum xcb_render_pict_op_t { XCB_RENDER_PICT_OP_CLEAR = 0, XCB_RENDER_PICT_OP_SRC = 1, XCB_RENDER_PICT_OP_DST = 2, XCB_RENDER_PICT_OP_OVER = 3, XCB_RENDER_PICT_OP_OVER_REVERSE = 4, XCB_RENDER_PICT_OP_IN = 5, XCB_RENDER_PICT_OP_IN_REVERSE = 6, XCB_RENDER_PICT_OP_OUT = 7, XCB_RENDER_PICT_OP_OUT_REVERSE = 8, XCB_RENDER_PICT_OP_ATOP = 9, XCB_RENDER_PICT_OP_ATOP_REVERSE = 10, XCB_RENDER_PICT_OP_XOR = 11, XCB_RENDER_PICT_OP_ADD = 12, XCB_RENDER_PICT_OP_SATURATE = 13, XCB_RENDER_PICT_OP_DISJOINT_CLEAR = 16, XCB_RENDER_PICT_OP_DISJOINT_SRC = 17, XCB_RENDER_PICT_OP_DISJOINT_DST = 18, XCB_RENDER_PICT_OP_DISJOINT_OVER = 19, XCB_RENDER_PICT_OP_DISJOINT_OVER_REVERSE = 20, XCB_RENDER_PICT_OP_DISJOINT_IN = 21, XCB_RENDER_PICT_OP_DISJOINT_IN_REVERSE = 22, XCB_RENDER_PICT_OP_DISJOINT_OUT = 23, XCB_RENDER_PICT_OP_DISJOINT_OUT_REVERSE = 24, XCB_RENDER_PICT_OP_DISJOINT_ATOP = 25, XCB_RENDER_PICT_OP_DISJOINT_ATOP_REVERSE = 26, XCB_RENDER_PICT_OP_DISJOINT_XOR = 27, XCB_RENDER_PICT_OP_CONJOINT_CLEAR = 32, XCB_RENDER_PICT_OP_CONJOINT_SRC = 33, XCB_RENDER_PICT_OP_CONJOINT_DST = 34, XCB_RENDER_PICT_OP_CONJOINT_OVER = 35, XCB_RENDER_PICT_OP_CONJOINT_OVER_REVERSE = 36, XCB_RENDER_PICT_OP_CONJOINT_IN = 37, XCB_RENDER_PICT_OP_CONJOINT_IN_REVERSE = 38, XCB_RENDER_PICT_OP_CONJOINT_OUT = 39, XCB_RENDER_PICT_OP_CONJOINT_OUT_REVERSE = 40, XCB_RENDER_PICT_OP_CONJOINT_ATOP = 41, XCB_RENDER_PICT_OP_CONJOINT_ATOP_REVERSE = 42, XCB_RENDER_PICT_OP_CONJOINT_XOR = 43, XCB_RENDER_PICT_OP_MULTIPLY = 48, XCB_RENDER_PICT_OP_SCREEN = 49, XCB_RENDER_PICT_OP_OVERLAY = 50, XCB_RENDER_PICT_OP_DARKEN = 51, XCB_RENDER_PICT_OP_LIGHTEN = 52, XCB_RENDER_PICT_OP_COLOR_DODGE = 53, XCB_RENDER_PICT_OP_COLOR_BURN = 54, XCB_RENDER_PICT_OP_HARD_LIGHT = 55, XCB_RENDER_PICT_OP_SOFT_LIGHT = 56, XCB_RENDER_PICT_OP_DIFFERENCE = 57, XCB_RENDER_PICT_OP_EXCLUSION = 58, XCB_RENDER_PICT_OP_HSL_HUE = 59, XCB_RENDER_PICT_OP_HSL_SATURATION = 60, XCB_RENDER_PICT_OP_HSL_COLOR = 61, XCB_RENDER_PICT_OP_HSL_LUMINOSITY = 62 } xcb_render_pict_op_t; typedef enum xcb_render_poly_edge_t { XCB_RENDER_POLY_EDGE_SHARP = 0, XCB_RENDER_POLY_EDGE_SMOOTH = 1 } xcb_render_poly_edge_t; typedef enum xcb_render_poly_mode_t { XCB_RENDER_POLY_MODE_PRECISE = 0, XCB_RENDER_POLY_MODE_IMPRECISE = 1 } xcb_render_poly_mode_t; typedef enum xcb_render_cp_t { XCB_RENDER_CP_REPEAT = 1, XCB_RENDER_CP_ALPHA_MAP = 2, XCB_RENDER_CP_ALPHA_X_ORIGIN = 4, XCB_RENDER_CP_ALPHA_Y_ORIGIN = 8, XCB_RENDER_CP_CLIP_X_ORIGIN = 16, XCB_RENDER_CP_CLIP_Y_ORIGIN = 32, XCB_RENDER_CP_CLIP_MASK = 64, XCB_RENDER_CP_GRAPHICS_EXPOSURE = 128, XCB_RENDER_CP_SUBWINDOW_MODE = 256, XCB_RENDER_CP_POLY_EDGE = 512, XCB_RENDER_CP_POLY_MODE = 1024, XCB_RENDER_CP_DITHER = 2048, XCB_RENDER_CP_COMPONENT_ALPHA = 4096 } xcb_render_cp_t; typedef enum xcb_render_sub_pixel_t { XCB_RENDER_SUB_PIXEL_UNKNOWN = 0, XCB_RENDER_SUB_PIXEL_HORIZONTAL_RGB = 1, XCB_RENDER_SUB_PIXEL_HORIZONTAL_BGR = 2, XCB_RENDER_SUB_PIXEL_VERTICAL_RGB = 3, XCB_RENDER_SUB_PIXEL_VERTICAL_BGR = 4, XCB_RENDER_SUB_PIXEL_NONE = 5 } xcb_render_sub_pixel_t; typedef enum xcb_render_repeat_t { XCB_RENDER_REPEAT_NONE = 0, XCB_RENDER_REPEAT_NORMAL = 1, XCB_RENDER_REPEAT_PAD = 2, XCB_RENDER_REPEAT_REFLECT = 3 } xcb_render_repeat_t; typedef uint32_t xcb_render_glyph_t; /** * @brief xcb_render_glyph_iterator_t **/ typedef struct xcb_render_glyph_iterator_t { xcb_render_glyph_t *data; int rem; int index; } xcb_render_glyph_iterator_t; typedef uint32_t xcb_render_glyphset_t; /** * @brief xcb_render_glyphset_iterator_t **/ typedef struct xcb_render_glyphset_iterator_t { xcb_render_glyphset_t *data; int rem; int index; } xcb_render_glyphset_iterator_t; typedef uint32_t xcb_render_picture_t; /** * @brief xcb_render_picture_iterator_t **/ typedef struct xcb_render_picture_iterator_t { xcb_render_picture_t *data; int rem; int index; } xcb_render_picture_iterator_t; typedef uint32_t xcb_render_pictformat_t; /** * @brief xcb_render_pictformat_iterator_t **/ typedef struct xcb_render_pictformat_iterator_t { xcb_render_pictformat_t *data; int rem; int index; } xcb_render_pictformat_iterator_t; typedef int32_t xcb_render_fixed_t; /** * @brief xcb_render_fixed_iterator_t **/ typedef struct xcb_render_fixed_iterator_t { xcb_render_fixed_t *data; int rem; int index; } xcb_render_fixed_iterator_t; /** Opcode for xcb_render_pict_format. */ #define XCB_RENDER_PICT_FORMAT 0 /** * @brief xcb_render_pict_format_error_t **/ typedef struct xcb_render_pict_format_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_render_pict_format_error_t; /** Opcode for xcb_render_picture. */ #define XCB_RENDER_PICTURE 1 /** * @brief xcb_render_picture_error_t **/ typedef struct xcb_render_picture_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_render_picture_error_t; /** Opcode for xcb_render_pict_op. */ #define XCB_RENDER_PICT_OP 2 /** * @brief xcb_render_pict_op_error_t **/ typedef struct xcb_render_pict_op_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_render_pict_op_error_t; /** Opcode for xcb_render_glyph_set. */ #define XCB_RENDER_GLYPH_SET 3 /** * @brief xcb_render_glyph_set_error_t **/ typedef struct xcb_render_glyph_set_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_render_glyph_set_error_t; /** Opcode for xcb_render_glyph. */ #define XCB_RENDER_GLYPH 4 /** * @brief xcb_render_glyph_error_t **/ typedef struct xcb_render_glyph_error_t { uint8_t response_type; uint8_t error_code; uint16_t sequence; } xcb_render_glyph_error_t; /** * @brief xcb_render_directformat_t **/ typedef struct xcb_render_directformat_t { uint16_t red_shift; uint16_t red_mask; uint16_t green_shift; uint16_t green_mask; uint16_t blue_shift; uint16_t blue_mask; uint16_t alpha_shift; uint16_t alpha_mask; } xcb_render_directformat_t; /** * @brief xcb_render_directformat_iterator_t **/ typedef struct xcb_render_directformat_iterator_t { xcb_render_directformat_t *data; int rem; int index; } xcb_render_directformat_iterator_t; /** * @brief xcb_render_pictforminfo_t **/ typedef struct xcb_render_pictforminfo_t { xcb_render_pictformat_t id; uint8_t type; uint8_t depth; uint8_t pad0[2]; xcb_render_directformat_t direct; xcb_colormap_t colormap; } xcb_render_pictforminfo_t; /** * @brief xcb_render_pictforminfo_iterator_t **/ typedef struct xcb_render_pictforminfo_iterator_t { xcb_render_pictforminfo_t *data; int rem; int index; } xcb_render_pictforminfo_iterator_t; /** * @brief xcb_render_pictvisual_t **/ typedef struct xcb_render_pictvisual_t { xcb_visualid_t visual; xcb_render_pictformat_t format; } xcb_render_pictvisual_t; /** * @brief xcb_render_pictvisual_iterator_t **/ typedef struct xcb_render_pictvisual_iterator_t { xcb_render_pictvisual_t *data; int rem; int index; } xcb_render_pictvisual_iterator_t; /** * @brief xcb_render_pictdepth_t **/ typedef struct xcb_render_pictdepth_t { uint8_t depth; uint8_t pad0; uint16_t num_visuals; uint8_t pad1[4]; } xcb_render_pictdepth_t; /** * @brief xcb_render_pictdepth_iterator_t **/ typedef struct xcb_render_pictdepth_iterator_t { xcb_render_pictdepth_t *data; int rem; int index; } xcb_render_pictdepth_iterator_t; /** * @brief xcb_render_pictscreen_t **/ typedef struct xcb_render_pictscreen_t { uint32_t num_depths; xcb_render_pictformat_t fallback; } xcb_render_pictscreen_t; /** * @brief xcb_render_pictscreen_iterator_t **/ typedef struct xcb_render_pictscreen_iterator_t { xcb_render_pictscreen_t *data; int rem; int index; } xcb_render_pictscreen_iterator_t; /** * @brief xcb_render_indexvalue_t **/ typedef struct xcb_render_indexvalue_t { uint32_t pixel; uint16_t red; uint16_t green; uint16_t blue; uint16_t alpha; } xcb_render_indexvalue_t; /** * @brief xcb_render_indexvalue_iterator_t **/ typedef struct xcb_render_indexvalue_iterator_t { xcb_render_indexvalue_t *data; int rem; int index; } xcb_render_indexvalue_iterator_t; /** * @brief xcb_render_color_t **/ typedef struct xcb_render_color_t { uint16_t red; uint16_t green; uint16_t blue; uint16_t alpha; } xcb_render_color_t; /** * @brief xcb_render_color_iterator_t **/ typedef struct xcb_render_color_iterator_t { xcb_render_color_t *data; int rem; int index; } xcb_render_color_iterator_t; /** * @brief xcb_render_pointfix_t **/ typedef struct xcb_render_pointfix_t { xcb_render_fixed_t x; xcb_render_fixed_t y; } xcb_render_pointfix_t; /** * @brief xcb_render_pointfix_iterator_t **/ typedef struct xcb_render_pointfix_iterator_t { xcb_render_pointfix_t *data; int rem; int index; } xcb_render_pointfix_iterator_t; /** * @brief xcb_render_linefix_t **/ typedef struct xcb_render_linefix_t { xcb_render_pointfix_t p1; xcb_render_pointfix_t p2; } xcb_render_linefix_t; /** * @brief xcb_render_linefix_iterator_t **/ typedef struct xcb_render_linefix_iterator_t { xcb_render_linefix_t *data; int rem; int index; } xcb_render_linefix_iterator_t; /** * @brief xcb_render_triangle_t **/ typedef struct xcb_render_triangle_t { xcb_render_pointfix_t p1; xcb_render_pointfix_t p2; xcb_render_pointfix_t p3; } xcb_render_triangle_t; /** * @brief xcb_render_triangle_iterator_t **/ typedef struct xcb_render_triangle_iterator_t { xcb_render_triangle_t *data; int rem; int index; } xcb_render_triangle_iterator_t; /** * @brief xcb_render_trapezoid_t **/ typedef struct xcb_render_trapezoid_t { xcb_render_fixed_t top; xcb_render_fixed_t bottom; xcb_render_linefix_t left; xcb_render_linefix_t right; } xcb_render_trapezoid_t; /** * @brief xcb_render_trapezoid_iterator_t **/ typedef struct xcb_render_trapezoid_iterator_t { xcb_render_trapezoid_t *data; int rem; int index; } xcb_render_trapezoid_iterator_t; /** * @brief xcb_render_glyphinfo_t **/ typedef struct xcb_render_glyphinfo_t { uint16_t width; uint16_t height; int16_t x; int16_t y; int16_t x_off; int16_t y_off; } xcb_render_glyphinfo_t; /** * @brief xcb_render_glyphinfo_iterator_t **/ typedef struct xcb_render_glyphinfo_iterator_t { xcb_render_glyphinfo_t *data; int rem; int index; } xcb_render_glyphinfo_iterator_t; /** * @brief xcb_render_query_version_cookie_t **/ typedef struct xcb_render_query_version_cookie_t { unsigned int sequence; } xcb_render_query_version_cookie_t; /** Opcode for xcb_render_query_version. */ #define XCB_RENDER_QUERY_VERSION 0 /** * @brief xcb_render_query_version_request_t **/ typedef struct xcb_render_query_version_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint32_t client_major_version; uint32_t client_minor_version; } xcb_render_query_version_request_t; /** * @brief xcb_render_query_version_reply_t **/ typedef struct xcb_render_query_version_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t major_version; uint32_t minor_version; uint8_t pad1[16]; } xcb_render_query_version_reply_t; /** * @brief xcb_render_query_pict_formats_cookie_t **/ typedef struct xcb_render_query_pict_formats_cookie_t { unsigned int sequence; } xcb_render_query_pict_formats_cookie_t; /** Opcode for xcb_render_query_pict_formats. */ #define XCB_RENDER_QUERY_PICT_FORMATS 1 /** * @brief xcb_render_query_pict_formats_request_t **/ typedef struct xcb_render_query_pict_formats_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; } xcb_render_query_pict_formats_request_t; /** * @brief xcb_render_query_pict_formats_reply_t **/ typedef struct xcb_render_query_pict_formats_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_formats; uint32_t num_screens; uint32_t num_depths; uint32_t num_visuals; uint32_t num_subpixel; uint8_t pad1[4]; } xcb_render_query_pict_formats_reply_t; /** * @brief xcb_render_query_pict_index_values_cookie_t **/ typedef struct xcb_render_query_pict_index_values_cookie_t { unsigned int sequence; } xcb_render_query_pict_index_values_cookie_t; /** Opcode for xcb_render_query_pict_index_values. */ #define XCB_RENDER_QUERY_PICT_INDEX_VALUES 2 /** * @brief xcb_render_query_pict_index_values_request_t **/ typedef struct xcb_render_query_pict_index_values_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_pictformat_t format; } xcb_render_query_pict_index_values_request_t; /** * @brief xcb_render_query_pict_index_values_reply_t **/ typedef struct xcb_render_query_pict_index_values_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_values; uint8_t pad1[20]; } xcb_render_query_pict_index_values_reply_t; /** * @brief xcb_render_create_picture_value_list_t **/ typedef struct xcb_render_create_picture_value_list_t { uint32_t repeat; xcb_render_picture_t alphamap; int32_t alphaxorigin; int32_t alphayorigin; int32_t clipxorigin; int32_t clipyorigin; xcb_pixmap_t clipmask; uint32_t graphicsexposure; uint32_t subwindowmode; uint32_t polyedge; uint32_t polymode; xcb_atom_t dither; uint32_t componentalpha; } xcb_render_create_picture_value_list_t; /** Opcode for xcb_render_create_picture. */ #define XCB_RENDER_CREATE_PICTURE 4 /** * @brief xcb_render_create_picture_request_t **/ typedef struct xcb_render_create_picture_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t pid; xcb_drawable_t drawable; xcb_render_pictformat_t format; uint32_t value_mask; } xcb_render_create_picture_request_t; /** * @brief xcb_render_change_picture_value_list_t **/ typedef struct xcb_render_change_picture_value_list_t { uint32_t repeat; xcb_render_picture_t alphamap; int32_t alphaxorigin; int32_t alphayorigin; int32_t clipxorigin; int32_t clipyorigin; xcb_pixmap_t clipmask; uint32_t graphicsexposure; uint32_t subwindowmode; uint32_t polyedge; uint32_t polymode; xcb_atom_t dither; uint32_t componentalpha; } xcb_render_change_picture_value_list_t; /** Opcode for xcb_render_change_picture. */ #define XCB_RENDER_CHANGE_PICTURE 5 /** * @brief xcb_render_change_picture_request_t **/ typedef struct xcb_render_change_picture_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; uint32_t value_mask; } xcb_render_change_picture_request_t; /** Opcode for xcb_render_set_picture_clip_rectangles. */ #define XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES 6 /** * @brief xcb_render_set_picture_clip_rectangles_request_t **/ typedef struct xcb_render_set_picture_clip_rectangles_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; int16_t clip_x_origin; int16_t clip_y_origin; } xcb_render_set_picture_clip_rectangles_request_t; /** Opcode for xcb_render_free_picture. */ #define XCB_RENDER_FREE_PICTURE 7 /** * @brief xcb_render_free_picture_request_t **/ typedef struct xcb_render_free_picture_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; } xcb_render_free_picture_request_t; /** Opcode for xcb_render_composite. */ #define XCB_RENDER_COMPOSITE 8 /** * @brief xcb_render_composite_request_t **/ typedef struct xcb_render_composite_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t mask; xcb_render_picture_t dst; int16_t src_x; int16_t src_y; int16_t mask_x; int16_t mask_y; int16_t dst_x; int16_t dst_y; uint16_t width; uint16_t height; } xcb_render_composite_request_t; /** Opcode for xcb_render_trapezoids. */ #define XCB_RENDER_TRAPEZOIDS 10 /** * @brief xcb_render_trapezoids_request_t **/ typedef struct xcb_render_trapezoids_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t dst; xcb_render_pictformat_t mask_format; int16_t src_x; int16_t src_y; } xcb_render_trapezoids_request_t; /** Opcode for xcb_render_triangles. */ #define XCB_RENDER_TRIANGLES 11 /** * @brief xcb_render_triangles_request_t **/ typedef struct xcb_render_triangles_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t dst; xcb_render_pictformat_t mask_format; int16_t src_x; int16_t src_y; } xcb_render_triangles_request_t; /** Opcode for xcb_render_tri_strip. */ #define XCB_RENDER_TRI_STRIP 12 /** * @brief xcb_render_tri_strip_request_t **/ typedef struct xcb_render_tri_strip_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t dst; xcb_render_pictformat_t mask_format; int16_t src_x; int16_t src_y; } xcb_render_tri_strip_request_t; /** Opcode for xcb_render_tri_fan. */ #define XCB_RENDER_TRI_FAN 13 /** * @brief xcb_render_tri_fan_request_t **/ typedef struct xcb_render_tri_fan_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t dst; xcb_render_pictformat_t mask_format; int16_t src_x; int16_t src_y; } xcb_render_tri_fan_request_t; /** Opcode for xcb_render_create_glyph_set. */ #define XCB_RENDER_CREATE_GLYPH_SET 17 /** * @brief xcb_render_create_glyph_set_request_t **/ typedef struct xcb_render_create_glyph_set_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_glyphset_t gsid; xcb_render_pictformat_t format; } xcb_render_create_glyph_set_request_t; /** Opcode for xcb_render_reference_glyph_set. */ #define XCB_RENDER_REFERENCE_GLYPH_SET 18 /** * @brief xcb_render_reference_glyph_set_request_t **/ typedef struct xcb_render_reference_glyph_set_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_glyphset_t gsid; xcb_render_glyphset_t existing; } xcb_render_reference_glyph_set_request_t; /** Opcode for xcb_render_free_glyph_set. */ #define XCB_RENDER_FREE_GLYPH_SET 19 /** * @brief xcb_render_free_glyph_set_request_t **/ typedef struct xcb_render_free_glyph_set_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_glyphset_t glyphset; } xcb_render_free_glyph_set_request_t; /** Opcode for xcb_render_add_glyphs. */ #define XCB_RENDER_ADD_GLYPHS 20 /** * @brief xcb_render_add_glyphs_request_t **/ typedef struct xcb_render_add_glyphs_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_glyphset_t glyphset; uint32_t glyphs_len; } xcb_render_add_glyphs_request_t; /** Opcode for xcb_render_free_glyphs. */ #define XCB_RENDER_FREE_GLYPHS 22 /** * @brief xcb_render_free_glyphs_request_t **/ typedef struct xcb_render_free_glyphs_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_glyphset_t glyphset; } xcb_render_free_glyphs_request_t; /** Opcode for xcb_render_composite_glyphs_8. */ #define XCB_RENDER_COMPOSITE_GLYPHS_8 23 /** * @brief xcb_render_composite_glyphs_8_request_t **/ typedef struct xcb_render_composite_glyphs_8_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t dst; xcb_render_pictformat_t mask_format; xcb_render_glyphset_t glyphset; int16_t src_x; int16_t src_y; } xcb_render_composite_glyphs_8_request_t; /** Opcode for xcb_render_composite_glyphs_16. */ #define XCB_RENDER_COMPOSITE_GLYPHS_16 24 /** * @brief xcb_render_composite_glyphs_16_request_t **/ typedef struct xcb_render_composite_glyphs_16_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t dst; xcb_render_pictformat_t mask_format; xcb_render_glyphset_t glyphset; int16_t src_x; int16_t src_y; } xcb_render_composite_glyphs_16_request_t; /** Opcode for xcb_render_composite_glyphs_32. */ #define XCB_RENDER_COMPOSITE_GLYPHS_32 25 /** * @brief xcb_render_composite_glyphs_32_request_t **/ typedef struct xcb_render_composite_glyphs_32_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t src; xcb_render_picture_t dst; xcb_render_pictformat_t mask_format; xcb_render_glyphset_t glyphset; int16_t src_x; int16_t src_y; } xcb_render_composite_glyphs_32_request_t; /** Opcode for xcb_render_fill_rectangles. */ #define XCB_RENDER_FILL_RECTANGLES 26 /** * @brief xcb_render_fill_rectangles_request_t **/ typedef struct xcb_render_fill_rectangles_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; uint8_t op; uint8_t pad0[3]; xcb_render_picture_t dst; xcb_render_color_t color; } xcb_render_fill_rectangles_request_t; /** Opcode for xcb_render_create_cursor. */ #define XCB_RENDER_CREATE_CURSOR 27 /** * @brief xcb_render_create_cursor_request_t **/ typedef struct xcb_render_create_cursor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_cursor_t cid; xcb_render_picture_t source; uint16_t x; uint16_t y; } xcb_render_create_cursor_request_t; /** * @brief xcb_render_transform_t **/ typedef struct xcb_render_transform_t { xcb_render_fixed_t matrix11; xcb_render_fixed_t matrix12; xcb_render_fixed_t matrix13; xcb_render_fixed_t matrix21; xcb_render_fixed_t matrix22; xcb_render_fixed_t matrix23; xcb_render_fixed_t matrix31; xcb_render_fixed_t matrix32; xcb_render_fixed_t matrix33; } xcb_render_transform_t; /** * @brief xcb_render_transform_iterator_t **/ typedef struct xcb_render_transform_iterator_t { xcb_render_transform_t *data; int rem; int index; } xcb_render_transform_iterator_t; /** Opcode for xcb_render_set_picture_transform. */ #define XCB_RENDER_SET_PICTURE_TRANSFORM 28 /** * @brief xcb_render_set_picture_transform_request_t **/ typedef struct xcb_render_set_picture_transform_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; xcb_render_transform_t transform; } xcb_render_set_picture_transform_request_t; /** * @brief xcb_render_query_filters_cookie_t **/ typedef struct xcb_render_query_filters_cookie_t { unsigned int sequence; } xcb_render_query_filters_cookie_t; /** Opcode for xcb_render_query_filters. */ #define XCB_RENDER_QUERY_FILTERS 29 /** * @brief xcb_render_query_filters_request_t **/ typedef struct xcb_render_query_filters_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_drawable_t drawable; } xcb_render_query_filters_request_t; /** * @brief xcb_render_query_filters_reply_t **/ typedef struct xcb_render_query_filters_reply_t { uint8_t response_type; uint8_t pad0; uint16_t sequence; uint32_t length; uint32_t num_aliases; uint32_t num_filters; uint8_t pad1[16]; } xcb_render_query_filters_reply_t; /** Opcode for xcb_render_set_picture_filter. */ #define XCB_RENDER_SET_PICTURE_FILTER 30 /** * @brief xcb_render_set_picture_filter_request_t **/ typedef struct xcb_render_set_picture_filter_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; uint16_t filter_len; uint8_t pad0[2]; } xcb_render_set_picture_filter_request_t; /** * @brief xcb_render_animcursorelt_t **/ typedef struct xcb_render_animcursorelt_t { xcb_cursor_t cursor; uint32_t delay; } xcb_render_animcursorelt_t; /** * @brief xcb_render_animcursorelt_iterator_t **/ typedef struct xcb_render_animcursorelt_iterator_t { xcb_render_animcursorelt_t *data; int rem; int index; } xcb_render_animcursorelt_iterator_t; /** Opcode for xcb_render_create_anim_cursor. */ #define XCB_RENDER_CREATE_ANIM_CURSOR 31 /** * @brief xcb_render_create_anim_cursor_request_t **/ typedef struct xcb_render_create_anim_cursor_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_cursor_t cid; } xcb_render_create_anim_cursor_request_t; /** * @brief xcb_render_spanfix_t **/ typedef struct xcb_render_spanfix_t { xcb_render_fixed_t l; xcb_render_fixed_t r; xcb_render_fixed_t y; } xcb_render_spanfix_t; /** * @brief xcb_render_spanfix_iterator_t **/ typedef struct xcb_render_spanfix_iterator_t { xcb_render_spanfix_t *data; int rem; int index; } xcb_render_spanfix_iterator_t; /** * @brief xcb_render_trap_t **/ typedef struct xcb_render_trap_t { xcb_render_spanfix_t top; xcb_render_spanfix_t bot; } xcb_render_trap_t; /** * @brief xcb_render_trap_iterator_t **/ typedef struct xcb_render_trap_iterator_t { xcb_render_trap_t *data; int rem; int index; } xcb_render_trap_iterator_t; /** Opcode for xcb_render_add_traps. */ #define XCB_RENDER_ADD_TRAPS 32 /** * @brief xcb_render_add_traps_request_t **/ typedef struct xcb_render_add_traps_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; int16_t x_off; int16_t y_off; } xcb_render_add_traps_request_t; /** Opcode for xcb_render_create_solid_fill. */ #define XCB_RENDER_CREATE_SOLID_FILL 33 /** * @brief xcb_render_create_solid_fill_request_t **/ typedef struct xcb_render_create_solid_fill_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; xcb_render_color_t color; } xcb_render_create_solid_fill_request_t; /** Opcode for xcb_render_create_linear_gradient. */ #define XCB_RENDER_CREATE_LINEAR_GRADIENT 34 /** * @brief xcb_render_create_linear_gradient_request_t **/ typedef struct xcb_render_create_linear_gradient_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; xcb_render_pointfix_t p1; xcb_render_pointfix_t p2; uint32_t num_stops; } xcb_render_create_linear_gradient_request_t; /** Opcode for xcb_render_create_radial_gradient. */ #define XCB_RENDER_CREATE_RADIAL_GRADIENT 35 /** * @brief xcb_render_create_radial_gradient_request_t **/ typedef struct xcb_render_create_radial_gradient_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; xcb_render_pointfix_t inner; xcb_render_pointfix_t outer; xcb_render_fixed_t inner_radius; xcb_render_fixed_t outer_radius; uint32_t num_stops; } xcb_render_create_radial_gradient_request_t; /** Opcode for xcb_render_create_conical_gradient. */ #define XCB_RENDER_CREATE_CONICAL_GRADIENT 36 /** * @brief xcb_render_create_conical_gradient_request_t **/ typedef struct xcb_render_create_conical_gradient_request_t { uint8_t major_opcode; uint8_t minor_opcode; uint16_t length; xcb_render_picture_t picture; xcb_render_pointfix_t center; xcb_render_fixed_t angle; uint32_t num_stops; } xcb_render_create_conical_gradient_request_t; /** * Get the next element of the iterator * @param i Pointer to a xcb_render_glyph_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_glyph_t) */ void xcb_render_glyph_next (xcb_render_glyph_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_glyph_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_glyph_end (xcb_render_glyph_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_glyphset_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_glyphset_t) */ void xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_glyphset_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_picture_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_picture_t) */ void xcb_render_picture_next (xcb_render_picture_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_picture_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_picture_end (xcb_render_picture_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_pictformat_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_pictformat_t) */ void xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_pictformat_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_fixed_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_fixed_t) */ void xcb_render_fixed_next (xcb_render_fixed_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_fixed_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_fixed_end (xcb_render_fixed_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_directformat_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_directformat_t) */ void xcb_render_directformat_next (xcb_render_directformat_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_directformat_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_directformat_end (xcb_render_directformat_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_pictforminfo_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_pictforminfo_t) */ void xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_pictforminfo_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_pictvisual_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_pictvisual_t) */ void xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_pictvisual_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i); int xcb_render_pictdepth_sizeof (const void *_buffer); xcb_render_pictvisual_t * xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R); int xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R); xcb_render_pictvisual_iterator_t xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_pictdepth_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_pictdepth_t) */ void xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_pictdepth_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i); int xcb_render_pictscreen_sizeof (const void *_buffer); int xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R); xcb_render_pictdepth_iterator_t xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_pictscreen_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_pictscreen_t) */ void xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_pictscreen_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_indexvalue_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_indexvalue_t) */ void xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_indexvalue_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_color_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_color_t) */ void xcb_render_color_next (xcb_render_color_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_color_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_color_end (xcb_render_color_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_pointfix_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_pointfix_t) */ void xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_pointfix_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_linefix_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_linefix_t) */ void xcb_render_linefix_next (xcb_render_linefix_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_linefix_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_linefix_end (xcb_render_linefix_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_triangle_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_triangle_t) */ void xcb_render_triangle_next (xcb_render_triangle_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_triangle_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_triangle_end (xcb_render_triangle_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_trapezoid_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_trapezoid_t) */ void xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_trapezoid_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_glyphinfo_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_glyphinfo_t) */ void xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_glyphinfo_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_render_query_version_cookie_t xcb_render_query_version (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_render_query_version_cookie_t xcb_render_query_version_unchecked (xcb_connection_t *c, uint32_t client_major_version, uint32_t client_minor_version); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_render_query_version_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_render_query_version_reply_t * xcb_render_query_version_reply (xcb_connection_t *c, xcb_render_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_render_query_pict_formats_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats (xcb_connection_t *c); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats_unchecked (xcb_connection_t *c); xcb_render_pictforminfo_t * xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R); int xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R); xcb_render_pictforminfo_iterator_t xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R); int xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R); xcb_render_pictscreen_iterator_t xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R); uint32_t * xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R); int xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R); xcb_generic_iterator_t xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_render_query_pict_formats_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_render_query_pict_formats_reply_t * xcb_render_query_pict_formats_reply (xcb_connection_t *c, xcb_render_query_pict_formats_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_render_query_pict_index_values_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values (xcb_connection_t *c, xcb_render_pictformat_t format); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c, xcb_render_pictformat_t format); xcb_render_indexvalue_t * xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R); int xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R); xcb_render_indexvalue_iterator_t xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_render_query_pict_index_values_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_render_query_pict_index_values_reply_t * xcb_render_query_pict_index_values_reply (xcb_connection_t *c, xcb_render_query_pict_index_values_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_render_create_picture_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_render_create_picture_value_list_t *_aux); int xcb_render_create_picture_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_render_create_picture_value_list_t *_aux); int xcb_render_create_picture_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_render_create_picture_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_picture_checked (xcb_connection_t *c, xcb_render_picture_t pid, xcb_drawable_t drawable, xcb_render_pictformat_t format, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_picture (xcb_connection_t *c, xcb_render_picture_t pid, xcb_drawable_t drawable, xcb_render_pictformat_t format, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_picture_aux_checked (xcb_connection_t *c, xcb_render_picture_t pid, xcb_drawable_t drawable, xcb_render_pictformat_t format, uint32_t value_mask, const xcb_render_create_picture_value_list_t *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_picture_aux (xcb_connection_t *c, xcb_render_picture_t pid, xcb_drawable_t drawable, xcb_render_pictformat_t format, uint32_t value_mask, const xcb_render_create_picture_value_list_t *value_list); void * xcb_render_create_picture_value_list (const xcb_render_create_picture_request_t *R); int xcb_render_change_picture_value_list_serialize (void **_buffer, uint32_t value_mask, const xcb_render_change_picture_value_list_t *_aux); int xcb_render_change_picture_value_list_unpack (const void *_buffer, uint32_t value_mask, xcb_render_change_picture_value_list_t *_aux); int xcb_render_change_picture_value_list_sizeof (const void *_buffer, uint32_t value_mask); int xcb_render_change_picture_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_change_picture_checked (xcb_connection_t *c, xcb_render_picture_t picture, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_change_picture (xcb_connection_t *c, xcb_render_picture_t picture, uint32_t value_mask, const void *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_change_picture_aux_checked (xcb_connection_t *c, xcb_render_picture_t picture, uint32_t value_mask, const xcb_render_change_picture_value_list_t *value_list); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_change_picture_aux (xcb_connection_t *c, xcb_render_picture_t picture, uint32_t value_mask, const xcb_render_change_picture_value_list_t *value_list); void * xcb_render_change_picture_value_list (const xcb_render_change_picture_request_t *R); int xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer, uint32_t rectangles_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c, xcb_render_picture_t picture, int16_t clip_x_origin, int16_t clip_y_origin, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_set_picture_clip_rectangles (xcb_connection_t *c, xcb_render_picture_t picture, int16_t clip_x_origin, int16_t clip_y_origin, uint32_t rectangles_len, const xcb_rectangle_t *rectangles); xcb_rectangle_t * xcb_render_set_picture_clip_rectangles_rectangles (const xcb_render_set_picture_clip_rectangles_request_t *R); int xcb_render_set_picture_clip_rectangles_rectangles_length (const xcb_render_set_picture_clip_rectangles_request_t *R); xcb_rectangle_iterator_t xcb_render_set_picture_clip_rectangles_rectangles_iterator (const xcb_render_set_picture_clip_rectangles_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_free_picture_checked (xcb_connection_t *c, xcb_render_picture_t picture); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_free_picture (xcb_connection_t *c, xcb_render_picture_t picture); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_composite_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t mask, xcb_render_picture_t dst, int16_t src_x, int16_t src_y, int16_t mask_x, int16_t mask_y, int16_t dst_x, int16_t dst_y, uint16_t width, uint16_t height); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_composite (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t mask, xcb_render_picture_t dst, int16_t src_x, int16_t src_y, int16_t mask_x, int16_t mask_y, int16_t dst_x, int16_t dst_y, uint16_t width, uint16_t height); int xcb_render_trapezoids_sizeof (const void *_buffer, uint32_t traps_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_trapezoids_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t traps_len, const xcb_render_trapezoid_t *traps); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_trapezoids (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t traps_len, const xcb_render_trapezoid_t *traps); xcb_render_trapezoid_t * xcb_render_trapezoids_traps (const xcb_render_trapezoids_request_t *R); int xcb_render_trapezoids_traps_length (const xcb_render_trapezoids_request_t *R); xcb_render_trapezoid_iterator_t xcb_render_trapezoids_traps_iterator (const xcb_render_trapezoids_request_t *R); int xcb_render_triangles_sizeof (const void *_buffer, uint32_t triangles_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_triangles_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t triangles_len, const xcb_render_triangle_t *triangles); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_triangles (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t triangles_len, const xcb_render_triangle_t *triangles); xcb_render_triangle_t * xcb_render_triangles_triangles (const xcb_render_triangles_request_t *R); int xcb_render_triangles_triangles_length (const xcb_render_triangles_request_t *R); xcb_render_triangle_iterator_t xcb_render_triangles_triangles_iterator (const xcb_render_triangles_request_t *R); int xcb_render_tri_strip_sizeof (const void *_buffer, uint32_t points_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_tri_strip_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t points_len, const xcb_render_pointfix_t *points); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_tri_strip (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t points_len, const xcb_render_pointfix_t *points); xcb_render_pointfix_t * xcb_render_tri_strip_points (const xcb_render_tri_strip_request_t *R); int xcb_render_tri_strip_points_length (const xcb_render_tri_strip_request_t *R); xcb_render_pointfix_iterator_t xcb_render_tri_strip_points_iterator (const xcb_render_tri_strip_request_t *R); int xcb_render_tri_fan_sizeof (const void *_buffer, uint32_t points_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_tri_fan_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t points_len, const xcb_render_pointfix_t *points); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_tri_fan (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, int16_t src_x, int16_t src_y, uint32_t points_len, const xcb_render_pointfix_t *points); xcb_render_pointfix_t * xcb_render_tri_fan_points (const xcb_render_tri_fan_request_t *R); int xcb_render_tri_fan_points_length (const xcb_render_tri_fan_request_t *R); xcb_render_pointfix_iterator_t xcb_render_tri_fan_points_iterator (const xcb_render_tri_fan_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_glyph_set_checked (xcb_connection_t *c, xcb_render_glyphset_t gsid, xcb_render_pictformat_t format); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_glyph_set (xcb_connection_t *c, xcb_render_glyphset_t gsid, xcb_render_pictformat_t format); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_reference_glyph_set_checked (xcb_connection_t *c, xcb_render_glyphset_t gsid, xcb_render_glyphset_t existing); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_reference_glyph_set (xcb_connection_t *c, xcb_render_glyphset_t gsid, xcb_render_glyphset_t existing); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_free_glyph_set_checked (xcb_connection_t *c, xcb_render_glyphset_t glyphset); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_free_glyph_set (xcb_connection_t *c, xcb_render_glyphset_t glyphset); int xcb_render_add_glyphs_sizeof (const void *_buffer, uint32_t data_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_add_glyphs_checked (xcb_connection_t *c, xcb_render_glyphset_t glyphset, uint32_t glyphs_len, const uint32_t *glyphids, const xcb_render_glyphinfo_t *glyphs, uint32_t data_len, const uint8_t *data); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_add_glyphs (xcb_connection_t *c, xcb_render_glyphset_t glyphset, uint32_t glyphs_len, const uint32_t *glyphids, const xcb_render_glyphinfo_t *glyphs, uint32_t data_len, const uint8_t *data); uint32_t * xcb_render_add_glyphs_glyphids (const xcb_render_add_glyphs_request_t *R); int xcb_render_add_glyphs_glyphids_length (const xcb_render_add_glyphs_request_t *R); xcb_generic_iterator_t xcb_render_add_glyphs_glyphids_end (const xcb_render_add_glyphs_request_t *R); xcb_render_glyphinfo_t * xcb_render_add_glyphs_glyphs (const xcb_render_add_glyphs_request_t *R); int xcb_render_add_glyphs_glyphs_length (const xcb_render_add_glyphs_request_t *R); xcb_render_glyphinfo_iterator_t xcb_render_add_glyphs_glyphs_iterator (const xcb_render_add_glyphs_request_t *R); uint8_t * xcb_render_add_glyphs_data (const xcb_render_add_glyphs_request_t *R); int xcb_render_add_glyphs_data_length (const xcb_render_add_glyphs_request_t *R); xcb_generic_iterator_t xcb_render_add_glyphs_data_end (const xcb_render_add_glyphs_request_t *R); int xcb_render_free_glyphs_sizeof (const void *_buffer, uint32_t glyphs_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_free_glyphs_checked (xcb_connection_t *c, xcb_render_glyphset_t glyphset, uint32_t glyphs_len, const xcb_render_glyph_t *glyphs); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_free_glyphs (xcb_connection_t *c, xcb_render_glyphset_t glyphset, uint32_t glyphs_len, const xcb_render_glyph_t *glyphs); xcb_render_glyph_t * xcb_render_free_glyphs_glyphs (const xcb_render_free_glyphs_request_t *R); int xcb_render_free_glyphs_glyphs_length (const xcb_render_free_glyphs_request_t *R); xcb_generic_iterator_t xcb_render_free_glyphs_glyphs_end (const xcb_render_free_glyphs_request_t *R); int xcb_render_composite_glyphs_8_sizeof (const void *_buffer, uint32_t glyphcmds_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_composite_glyphs_8_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, xcb_render_glyphset_t glyphset, int16_t src_x, int16_t src_y, uint32_t glyphcmds_len, const uint8_t *glyphcmds); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_composite_glyphs_8 (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, xcb_render_glyphset_t glyphset, int16_t src_x, int16_t src_y, uint32_t glyphcmds_len, const uint8_t *glyphcmds); uint8_t * xcb_render_composite_glyphs_8_glyphcmds (const xcb_render_composite_glyphs_8_request_t *R); int xcb_render_composite_glyphs_8_glyphcmds_length (const xcb_render_composite_glyphs_8_request_t *R); xcb_generic_iterator_t xcb_render_composite_glyphs_8_glyphcmds_end (const xcb_render_composite_glyphs_8_request_t *R); int xcb_render_composite_glyphs_16_sizeof (const void *_buffer, uint32_t glyphcmds_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_composite_glyphs_16_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, xcb_render_glyphset_t glyphset, int16_t src_x, int16_t src_y, uint32_t glyphcmds_len, const uint8_t *glyphcmds); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_composite_glyphs_16 (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, xcb_render_glyphset_t glyphset, int16_t src_x, int16_t src_y, uint32_t glyphcmds_len, const uint8_t *glyphcmds); uint8_t * xcb_render_composite_glyphs_16_glyphcmds (const xcb_render_composite_glyphs_16_request_t *R); int xcb_render_composite_glyphs_16_glyphcmds_length (const xcb_render_composite_glyphs_16_request_t *R); xcb_generic_iterator_t xcb_render_composite_glyphs_16_glyphcmds_end (const xcb_render_composite_glyphs_16_request_t *R); int xcb_render_composite_glyphs_32_sizeof (const void *_buffer, uint32_t glyphcmds_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_composite_glyphs_32_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, xcb_render_glyphset_t glyphset, int16_t src_x, int16_t src_y, uint32_t glyphcmds_len, const uint8_t *glyphcmds); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_composite_glyphs_32 (xcb_connection_t *c, uint8_t op, xcb_render_picture_t src, xcb_render_picture_t dst, xcb_render_pictformat_t mask_format, xcb_render_glyphset_t glyphset, int16_t src_x, int16_t src_y, uint32_t glyphcmds_len, const uint8_t *glyphcmds); uint8_t * xcb_render_composite_glyphs_32_glyphcmds (const xcb_render_composite_glyphs_32_request_t *R); int xcb_render_composite_glyphs_32_glyphcmds_length (const xcb_render_composite_glyphs_32_request_t *R); xcb_generic_iterator_t xcb_render_composite_glyphs_32_glyphcmds_end (const xcb_render_composite_glyphs_32_request_t *R); int xcb_render_fill_rectangles_sizeof (const void *_buffer, uint32_t rects_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_fill_rectangles_checked (xcb_connection_t *c, uint8_t op, xcb_render_picture_t dst, xcb_render_color_t color, uint32_t rects_len, const xcb_rectangle_t *rects); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_fill_rectangles (xcb_connection_t *c, uint8_t op, xcb_render_picture_t dst, xcb_render_color_t color, uint32_t rects_len, const xcb_rectangle_t *rects); xcb_rectangle_t * xcb_render_fill_rectangles_rects (const xcb_render_fill_rectangles_request_t *R); int xcb_render_fill_rectangles_rects_length (const xcb_render_fill_rectangles_request_t *R); xcb_rectangle_iterator_t xcb_render_fill_rectangles_rects_iterator (const xcb_render_fill_rectangles_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_cursor_checked (xcb_connection_t *c, xcb_cursor_t cid, xcb_render_picture_t source, uint16_t x, uint16_t y); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_cursor (xcb_connection_t *c, xcb_cursor_t cid, xcb_render_picture_t source, uint16_t x, uint16_t y); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_transform_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_transform_t) */ void xcb_render_transform_next (xcb_render_transform_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_transform_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_transform_end (xcb_render_transform_iterator_t i); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_set_picture_transform_checked (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_transform_t transform); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_set_picture_transform (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_transform_t transform); int xcb_render_query_filters_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_render_query_filters_cookie_t xcb_render_query_filters (xcb_connection_t *c, xcb_drawable_t drawable); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will cause * a reply to be generated. Any returned error will be * placed in the event queue. */ xcb_render_query_filters_cookie_t xcb_render_query_filters_unchecked (xcb_connection_t *c, xcb_drawable_t drawable); uint16_t * xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R); int xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R); xcb_generic_iterator_t xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R); int xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R); xcb_str_iterator_t xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R); /** * Return the reply * @param c The connection * @param cookie The cookie * @param e The xcb_generic_error_t supplied * * Returns the reply of the request asked by * * The parameter @p e supplied to this function must be NULL if * xcb_render_query_filters_unchecked(). is used. * Otherwise, it stores the error if any. * * The returned value must be freed by the caller using free(). */ xcb_render_query_filters_reply_t * xcb_render_query_filters_reply (xcb_connection_t *c, xcb_render_query_filters_cookie_t cookie /**< */, xcb_generic_error_t **e); int xcb_render_set_picture_filter_sizeof (const void *_buffer, uint32_t values_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_set_picture_filter_checked (xcb_connection_t *c, xcb_render_picture_t picture, uint16_t filter_len, const char *filter, uint32_t values_len, const xcb_render_fixed_t *values); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_set_picture_filter (xcb_connection_t *c, xcb_render_picture_t picture, uint16_t filter_len, const char *filter, uint32_t values_len, const xcb_render_fixed_t *values); char * xcb_render_set_picture_filter_filter (const xcb_render_set_picture_filter_request_t *R); int xcb_render_set_picture_filter_filter_length (const xcb_render_set_picture_filter_request_t *R); xcb_generic_iterator_t xcb_render_set_picture_filter_filter_end (const xcb_render_set_picture_filter_request_t *R); xcb_render_fixed_t * xcb_render_set_picture_filter_values (const xcb_render_set_picture_filter_request_t *R); int xcb_render_set_picture_filter_values_length (const xcb_render_set_picture_filter_request_t *R); xcb_generic_iterator_t xcb_render_set_picture_filter_values_end (const xcb_render_set_picture_filter_request_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_animcursorelt_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_animcursorelt_t) */ void xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_animcursorelt_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i); int xcb_render_create_anim_cursor_sizeof (const void *_buffer, uint32_t cursors_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_anim_cursor_checked (xcb_connection_t *c, xcb_cursor_t cid, uint32_t cursors_len, const xcb_render_animcursorelt_t *cursors); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_anim_cursor (xcb_connection_t *c, xcb_cursor_t cid, uint32_t cursors_len, const xcb_render_animcursorelt_t *cursors); xcb_render_animcursorelt_t * xcb_render_create_anim_cursor_cursors (const xcb_render_create_anim_cursor_request_t *R); int xcb_render_create_anim_cursor_cursors_length (const xcb_render_create_anim_cursor_request_t *R); xcb_render_animcursorelt_iterator_t xcb_render_create_anim_cursor_cursors_iterator (const xcb_render_create_anim_cursor_request_t *R); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_spanfix_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_spanfix_t) */ void xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_spanfix_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i); /** * Get the next element of the iterator * @param i Pointer to a xcb_render_trap_iterator_t * * Get the next element in the iterator. The member rem is * decreased by one. The member data points to the next * element. The member index is increased by sizeof(xcb_render_trap_t) */ void xcb_render_trap_next (xcb_render_trap_iterator_t *i); /** * Return the iterator pointing to the last element * @param i An xcb_render_trap_iterator_t * @return The iterator pointing to the last element * * Set the current element in the iterator to the last element. * The member rem is set to 0. The member data points to the * last element. */ xcb_generic_iterator_t xcb_render_trap_end (xcb_render_trap_iterator_t i); int xcb_render_add_traps_sizeof (const void *_buffer, uint32_t traps_len); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_add_traps_checked (xcb_connection_t *c, xcb_render_picture_t picture, int16_t x_off, int16_t y_off, uint32_t traps_len, const xcb_render_trap_t *traps); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_add_traps (xcb_connection_t *c, xcb_render_picture_t picture, int16_t x_off, int16_t y_off, uint32_t traps_len, const xcb_render_trap_t *traps); xcb_render_trap_t * xcb_render_add_traps_traps (const xcb_render_add_traps_request_t *R); int xcb_render_add_traps_traps_length (const xcb_render_add_traps_request_t *R); xcb_render_trap_iterator_t xcb_render_add_traps_traps_iterator (const xcb_render_add_traps_request_t *R); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_solid_fill_checked (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_color_t color); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_solid_fill (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_color_t color); int xcb_render_create_linear_gradient_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_linear_gradient_checked (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_pointfix_t p1, xcb_render_pointfix_t p2, uint32_t num_stops, const xcb_render_fixed_t *stops, const xcb_render_color_t *colors); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_linear_gradient (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_pointfix_t p1, xcb_render_pointfix_t p2, uint32_t num_stops, const xcb_render_fixed_t *stops, const xcb_render_color_t *colors); xcb_render_fixed_t * xcb_render_create_linear_gradient_stops (const xcb_render_create_linear_gradient_request_t *R); int xcb_render_create_linear_gradient_stops_length (const xcb_render_create_linear_gradient_request_t *R); xcb_generic_iterator_t xcb_render_create_linear_gradient_stops_end (const xcb_render_create_linear_gradient_request_t *R); xcb_render_color_t * xcb_render_create_linear_gradient_colors (const xcb_render_create_linear_gradient_request_t *R); int xcb_render_create_linear_gradient_colors_length (const xcb_render_create_linear_gradient_request_t *R); xcb_render_color_iterator_t xcb_render_create_linear_gradient_colors_iterator (const xcb_render_create_linear_gradient_request_t *R); int xcb_render_create_radial_gradient_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_radial_gradient_checked (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_pointfix_t inner, xcb_render_pointfix_t outer, xcb_render_fixed_t inner_radius, xcb_render_fixed_t outer_radius, uint32_t num_stops, const xcb_render_fixed_t *stops, const xcb_render_color_t *colors); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_radial_gradient (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_pointfix_t inner, xcb_render_pointfix_t outer, xcb_render_fixed_t inner_radius, xcb_render_fixed_t outer_radius, uint32_t num_stops, const xcb_render_fixed_t *stops, const xcb_render_color_t *colors); xcb_render_fixed_t * xcb_render_create_radial_gradient_stops (const xcb_render_create_radial_gradient_request_t *R); int xcb_render_create_radial_gradient_stops_length (const xcb_render_create_radial_gradient_request_t *R); xcb_generic_iterator_t xcb_render_create_radial_gradient_stops_end (const xcb_render_create_radial_gradient_request_t *R); xcb_render_color_t * xcb_render_create_radial_gradient_colors (const xcb_render_create_radial_gradient_request_t *R); int xcb_render_create_radial_gradient_colors_length (const xcb_render_create_radial_gradient_request_t *R); xcb_render_color_iterator_t xcb_render_create_radial_gradient_colors_iterator (const xcb_render_create_radial_gradient_request_t *R); int xcb_render_create_conical_gradient_sizeof (const void *_buffer); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * * This form can be used only if the request will not cause * a reply to be generated. Any returned error will be * saved for handling by xcb_request_check(). */ xcb_void_cookie_t xcb_render_create_conical_gradient_checked (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_pointfix_t center, xcb_render_fixed_t angle, uint32_t num_stops, const xcb_render_fixed_t *stops, const xcb_render_color_t *colors); /** * * @param c The connection * @return A cookie * * Delivers a request to the X server. * */ xcb_void_cookie_t xcb_render_create_conical_gradient (xcb_connection_t *c, xcb_render_picture_t picture, xcb_render_pointfix_t center, xcb_render_fixed_t angle, uint32_t num_stops, const xcb_render_fixed_t *stops, const xcb_render_color_t *colors); xcb_render_fixed_t * xcb_render_create_conical_gradient_stops (const xcb_render_create_conical_gradient_request_t *R); int xcb_render_create_conical_gradient_stops_length (const xcb_render_create_conical_gradient_request_t *R); xcb_generic_iterator_t xcb_render_create_conical_gradient_stops_end (const xcb_render_create_conical_gradient_request_t *R); xcb_render_color_t * xcb_render_create_conical_gradient_colors (const xcb_render_create_conical_gradient_request_t *R); int xcb_render_create_conical_gradient_colors_length (const xcb_render_create_conical_gradient_request_t *R); xcb_render_color_iterator_t xcb_render_create_conical_gradient_colors_iterator (const xcb_render_create_conical_gradient_request_t *R); #ifdef __cplusplus } #endif #endif /** * @} */ PKZ66 xcb/xcbext.hnu[/* * Copyright (C) 2001-2004 Bart Massey and Jamey Sharp. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the names of the authors or their * institutions shall not be used in advertising or otherwise to promote the * sale, use or other dealings in this Software without prior written * authorization from the authors. */ #ifndef __XCBEXT_H #define __XCBEXT_H #include "xcb.h" #ifdef __cplusplus extern "C" { #endif /* xcb_ext.c */ struct xcb_extension_t { const char *name; int global_id; }; /* xcb_out.c */ typedef struct { size_t count; xcb_extension_t *ext; uint8_t opcode; uint8_t isvoid; } xcb_protocol_request_t; enum xcb_send_request_flags_t { XCB_REQUEST_CHECKED = 1 << 0, XCB_REQUEST_RAW = 1 << 1, XCB_REQUEST_DISCARD_REPLY = 1 << 2, XCB_REQUEST_REPLY_FDS = 1 << 3 }; /** * @brief Send a request to the server. * @param c The connection to the X server. * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. * @param vector Data to send; must have two iovecs before start for internal use. * @param request Information about the request to be sent. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is * given as an array of @c iovecs in the @p vector argument. The length of that * array and the necessary management information are given in the @p request * argument. * * When this function returns, the request might or might not be sent already. * Use xcb_flush() to make sure that it really was sent. * * Please note that this function is not the preferred way for sending requests. * It's better to use the generated wrapper functions. * * Please note that xcb might use index -1 and -2 of the @p vector array internally, * so they must be valid! */ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); /** * @brief Send a request to the server. * @param c The connection to the X server. * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. * @param vector Data to send; must have two iovecs before start for internal use. * @param request Information about the request to be sent. * @param num_fds Number of additional file descriptors to send to the server * @param fds Additional file descriptors that should be send to the server. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is * given as an array of @c iovecs in the @p vector argument. The length of that * array and the necessary management information are given in the @p request * argument. * * If @p num_fds is non-zero, @p fds points to an array of file descriptors that * will be sent to the X server along with this request. After this function * returns, all file descriptors sent are owned by xcb and will be closed * eventually. * * When this function returns, the request might or might not be sent already. * Use xcb_flush() to make sure that it really was sent. * * Please note that this function is not the preferred way for sending requests. * * Please note that xcb might use index -1 and -2 of the @p vector array internally, * so they must be valid! */ unsigned int xcb_send_request_with_fds(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request, unsigned int num_fds, int *fds); /** * @brief Send a request to the server, with 64-bit sequence number returned. * @param c The connection to the X server. * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. * @param vector Data to send; must have two iovecs before start for internal use. * @param request Information about the request to be sent. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is * given as an array of @c iovecs in the @p vector argument. The length of that * array and the necessary management information are given in the @p request * argument. * * When this function returns, the request might or might not be sent already. * Use xcb_flush() to make sure that it really was sent. * * Please note that this function is not the preferred way for sending requests. * It's better to use the generated wrapper functions. * * Please note that xcb might use index -1 and -2 of the @p vector array internally, * so they must be valid! */ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request); /** * @brief Send a request to the server, with 64-bit sequence number returned. * @param c The connection to the X server. * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. * @param vector Data to send; must have two iovecs before start for internal use. * @param request Information about the request to be sent. * @param num_fds Number of additional file descriptors to send to the server * @param fds Additional file descriptors that should be send to the server. * @return The request's sequence number on success, 0 otherwise. * * This function sends a new request to the X server. The data of the request is * given as an array of @c iovecs in the @p vector argument. The length of that * array and the necessary management information are given in the @p request * argument. * * If @p num_fds is non-zero, @p fds points to an array of file descriptors that * will be sent to the X server along with this request. After this function * returns, all file descriptors sent are owned by xcb and will be closed * eventually. * * When this function returns, the request might or might not be sent already. * Use xcb_flush() to make sure that it really was sent. * * Please note that this function is not the preferred way for sending requests. * It's better to use the generated wrapper functions. * * Please note that xcb might use index -1 and -2 of the @p vector array internally, * so they must be valid! */ uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request, unsigned int num_fds, int *fds); /** * @brief Send a file descriptor to the server in the next call to xcb_send_request. * @param c The connection to the X server. * @param fd The file descriptor to send. * * After this function returns, the file descriptor given is owned by xcb and * will be closed eventually. * * @deprecated This function cannot be used in a thread-safe way. Two threads * that run xcb_send_fd(); xcb_send_request(); could mix up their file * descriptors. Instead, xcb_send_request_with_fds() should be used. */ void xcb_send_fd(xcb_connection_t *c, int fd); /** * @brief Take over the write side of the socket * @param c The connection to the X server. * @param return_socket Callback function that will be called when xcb wants * to use the socket again. * @param closure Argument to the callback function. * @param flags A combination of flags from the xcb_send_request_flags_t enumeration. * @param sent Location to the sequence number of the last sequence request. * Must not be NULL. * @return 1 on success, else 0. * * xcb_take_socket allows external code to ask XCB for permission to * take over the write side of the socket and send raw data with * xcb_writev. xcb_take_socket provides the sequence number of the last * request XCB sent. The caller of xcb_take_socket must supply a * callback which XCB can call when it wants the write side of the * socket back to make a request. This callback synchronizes with the * external socket owner and flushes any output queues if appropriate. * If you are sending requests which won't cause a reply, please note the * comment for xcb_writev which explains some sequence number wrap issues. * * All replies that are generated while the socket is owned externally have * @p flags applied to them. For example, use XCB_REQUEST_CHECK if you don't * want errors to go to xcb's normal error handling, but instead having to be * picked up via xcb_wait_for_reply(), xcb_poll_for_reply() or * xcb_request_check(). */ int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), void *closure, int flags, uint64_t *sent); /** * @brief Send raw data to the X server. * @param c The connection to the X server. * @param vector Array of data to be sent. * @param count Number of entries in @p vector. * @param requests Number of requests that are being sent. * @return 1 on success, else 0. * * You must own the write-side of the socket (you've called * xcb_take_socket, and haven't returned from return_socket yet) to call * xcb_writev. Also, the iovec must have at least 1 byte of data in it. * You have to make sure that xcb can detect sequence number wraps correctly. * This means that the first request you send after xcb_take_socket must cause a * reply (e.g. just insert a GetInputFocus request). After every (1 << 16) - 1 * requests without a reply, you have to insert a request which will cause a * reply. You can again use GetInputFocus for this. You do not have to wait for * any of the GetInputFocus replies, but can instead handle them via * xcb_discard_reply(). */ int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t requests); /* xcb_in.c */ /** * @brief Wait for the reply of a given request. * @param c The connection to the X server. * @param request Sequence number of the request as returned by xcb_send_request(). * @param e Location to store errors in, or NULL. Ignored for unchecked requests. * * Returns the reply to the given request or returns null in the event of * errors. Blocks until the reply or error for the request arrives, or an I/O * error occurs. */ void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_error_t **e); /** * @brief Wait for the reply of a given request, with 64-bit sequence number * @param c The connection to the X server. * @param request 64-bit sequence number of the request as returned by xcb_send_request64(). * @param e Location to store errors in, or NULL. Ignored for unchecked requests. * * Returns the reply to the given request or returns null in the event of * errors. Blocks until the reply or error for the request arrives, or an I/O * error occurs. * * Unlike its xcb_wait_for_reply() counterpart, the given sequence number is not * automatically "widened" to 64-bit. */ void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_error_t **e); /** * @brief Poll for the reply of a given request. * @param c The connection to the X server. * @param request Sequence number of the request as returned by xcb_send_request(). * @param reply Location to store the reply in, must not be NULL. * @param error Location to store errors in, or NULL. Ignored for unchecked requests. * @return 1 when the reply to the request was returned, else 0. * * Checks if the reply to the given request already received. Does not block. */ int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error); /** * @brief Poll for the reply of a given request, with 64-bit sequence number. * @param c The connection to the X server. * @param request 64-bit sequence number of the request as returned by xcb_send_request(). * @param reply Location to store the reply in, must not be NULL. * @param error Location to store errors in, or NULL. Ignored for unchecked requests. * @return 1 when the reply to the request was returned, else 0. * * Checks if the reply to the given request already received. Does not block. * * Unlike its xcb_poll_for_reply() counterpart, the given sequence number is not * automatically "widened" to 64-bit. */ int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xcb_generic_error_t **error); /** * @brief Don't use this, only needed by the generated code. * @param c The connection to the X server. * @param reply A reply that was received from the server * @param replylen The size of the reply. * @return Pointer to the location where received file descriptors are stored. */ int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen); /* xcb_util.c */ /** * @param mask The mask to check * @return The number of set bits in the mask */ int xcb_popcount(uint32_t mask); /** * @param list The base of an array * @param len The length of the array * @return The sum of all entries in the array. */ int xcb_sumof(uint8_t *list, int len); #ifdef __cplusplus } #endif #endif PKZV gd_errors.hnu[#ifndef GD_ERRORS_H #define GD_ERRORS_H #ifndef _WIN32 # include #else /* * priorities/facilities are encoded into a single 32-bit quantity, where the * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility * (0-big number). Both the priorities and the facilities map roughly * one-to-one to strings in the syslogd(8) source code. This mapping is * included in this file. * * priorities (these are ordered) */ # define LOG_EMERG 0 /* system is unusable */ # define LOG_ALERT 1 /* action must be taken immediately */ # define LOG_CRIT 2 /* critical conditions */ # define LOG_ERR 3 /* error conditions */ # define LOG_WARNING 4 /* warning conditions */ # define LOG_NOTICE 5 /* normal but significant condition */ # define LOG_INFO 6 /* informational */ # define LOG_DEBUG 7 /* debug-level messages */ #endif /* LOG_EMERG system is unusable LOG_ALERT action must be taken immediately LOG_CRIT critical conditions LOG_ERR error conditions LOG_WARNING warning conditions LOG_NOTICE normal, but significant, condition LOG_INFO informational message LOG_DEBUG debug-level message */ #define GD_ERROR LOG_ERR #define GD_WARNING LOG_WARNING #define GD_NOTICE LOG_NOTICE #define GD_INFO LOG_INFO #define GD_DEBUG LOG_DEBUG void gd_error(const char *format, ...); void gd_error_ex(int priority, const char *format, ...); #endif PKZ!tar.hnu[/* Extended tar format from POSIX.1. Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by David J. MacKenzie. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _TAR_H #define _TAR_H 1 #include /* A tar archive consists of 512-byte blocks. Each file in the archive has a header block followed by 0+ data blocks. Two blocks of NUL bytes indicate the end of the archive. */ /* The fields of header blocks: All strings are stored as ISO 646 (approximately ASCII) strings. Fields are numeric unless otherwise noted below; numbers are ISO 646 representations of octal numbers, with leading zeros as needed. linkname is only valid when typeflag==LNKTYPE. It doesn't use prefix; files that are links to pathnames >100 chars long can not be stored in a tar archive. If typeflag=={LNKTYPE,SYMTYPE,DIRTYPE} then size must be 0. devmajor and devminor are only valid for typeflag=={BLKTYPE,CHRTYPE}. chksum contains the sum of all 512 bytes in the header block, treating each byte as an 8-bit unsigned value and treating the 8 bytes of chksum as blank characters. uname and gname are used in preference to uid and gid, if those names exist locally. Field Name Byte Offset Length in Bytes Field Type name 0 100 NUL-terminated if NUL fits mode 100 8 uid 108 8 gid 116 8 size 124 12 mtime 136 12 chksum 148 8 typeflag 156 1 see below linkname 157 100 NUL-terminated if NUL fits magic 257 6 must be TMAGIC (NUL term.) version 263 2 must be TVERSION uname 265 32 NUL-terminated gname 297 32 NUL-terminated devmajor 329 8 devminor 337 8 prefix 345 155 NUL-terminated if NUL fits If the first character of prefix is '\0', the file name is name; otherwise, it is prefix/name. Files whose pathnames don't fit in that length can not be stored in a tar archive. */ /* The bits in mode: */ #define TSUID 04000 #define TSGID 02000 #if defined __USE_XOPEN || !defined __USE_XOPEN2K # define TSVTX 01000 #endif #define TUREAD 00400 #define TUWRITE 00200 #define TUEXEC 00100 #define TGREAD 00040 #define TGWRITE 00020 #define TGEXEC 00010 #define TOREAD 00004 #define TOWRITE 00002 #define TOEXEC 00001 /* The values for typeflag: Values 'A'-'Z' are reserved for custom implementations. All other values are reserved for future POSIX.1 revisions. */ #define REGTYPE '0' /* Regular file (preferred code). */ #define AREGTYPE '\0' /* Regular file (alternate code). */ #define LNKTYPE '1' /* Hard link. */ #define SYMTYPE '2' /* Symbolic link (hard if not supported). */ #define CHRTYPE '3' /* Character special. */ #define BLKTYPE '4' /* Block special. */ #define DIRTYPE '5' /* Directory. */ #define FIFOTYPE '6' /* Named pipe. */ #define CONTTYPE '7' /* Contiguous file */ /* (regular file if not supported). */ /* Contents of magic field and its length. */ #define TMAGIC "ustar" #define TMAGLEN 6 /* Contents of the version field and its length. */ #define TVERSION "00" #define TVERSLEN 2 #endif /* tar.h */ PKZS)\protobuf-c/protobuf-c.hnu[/* * Copyright (c) 2008-2017, Dave Benson and the protobuf-c authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! \file * \mainpage Introduction * * This is [protobuf-c], a C implementation of [Protocol Buffers]. * * This file defines the public API for the `libprotobuf-c` support library. * This API includes interfaces that can be used directly by client code as well * as the interfaces used by the code generated by the `protoc-c` compiler. * * The `libprotobuf-c` support library performs the actual serialization and * deserialization of Protocol Buffers messages. It interacts with structures, * definitions, and metadata generated by the `protoc-c` compiler from .proto * files. * * \authors Dave Benson and the `protobuf-c` authors. * * \copyright 2008-2014. Licensed under the terms of the [BSD-2-Clause] license. * * [protobuf-c]: https://github.com/protobuf-c/protobuf-c * [Protocol Buffers]: https://developers.google.com/protocol-buffers/ * [BSD-2-Clause]: http://opensource.org/licenses/BSD-2-Clause * * \page gencode Generated Code * * For each enum, we generate a C enum. For each message, we generate a C * structure which can be cast to a `ProtobufCMessage`. * * For each enum and message, we generate a descriptor object that allows us to * implement a kind of reflection on the structures. * * First, some naming conventions: * * - The name of the type for enums and messages and services is camel case * (meaning WordsAreCrammedTogether) except that double underscores are used * to delimit scopes. For example, the following `.proto` file: * ~~~{.proto} package foo.bar; message BazBah { optional int32 val = 1; } ~~~ * * would generate a C type `Foo__Bar__BazBah`. * * - Identifiers for functions and globals are all lowercase, with camel case * words separated by single underscores. For example, one of the function * prototypes generated by `protoc-c` for the above example: * ~~~{.c} Foo__Bar__BazBah * foo__bar__baz_bah__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); ~~~ * * - Identifiers for enum values contain an uppercase prefix which embeds the * package name and the enum type name. * * - A double underscore is used to separate further components of identifier * names. * * For example, in the name of the unpack function above, the package name * `foo.bar` has become `foo__bar`, the message name BazBah has become * `baz_bah`, and the method name is `unpack`. These are all joined with double * underscores to form the C identifier `foo__bar__baz_bah__unpack`. * * We also generate descriptor objects for messages and enums. These are * declared in the `.pb-c.h` files: * ~~~{.c} extern const ProtobufCMessageDescriptor foo__bar__baz_bah__descriptor; ~~~ * * The message structures all begin with `ProtobufCMessageDescriptor *` which is * sufficient to allow them to be cast to `ProtobufCMessage`. * * For each message defined in a `.proto` file, we generate a number of * functions and macros. Each function name contains a prefix based on the * package name and message name in order to make it a unique C identifier. * * - `INIT`. Statically initializes a message object, initializing its * descriptor and setting its fields to default values. Uninitialized * messages cannot be processed by the protobuf-c library. * ~~~{.c} #define FOO__BAR__BAZ_BAH__INIT \ { PROTOBUF_C_MESSAGE_INIT (&foo__bar__baz_bah__descriptor), 0 } ~~~ * - `init()`. Initializes a message object, initializing its descriptor and * setting its fields to default values. Uninitialized messages cannot be * processed by the protobuf-c library. * ~~~{.c} void foo__bar__baz_bah__init (Foo__Bar__BazBah *message); ~~~ * - `unpack()`. Unpacks data for a particular message format. Note that the * `allocator` parameter is usually `NULL` to indicate that the system's * `malloc()` and `free()` functions should be used for dynamically allocating * memory. * ~~~{.c} Foo__Bar__BazBah * foo__bar__baz_bah__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); ~~~ * * - `free_unpacked()`. Frees a message object obtained with the `unpack()` * method. Freeing `NULL` is allowed (the same as with `free()`). * ~~~{.c} void foo__bar__baz_bah__free_unpacked (Foo__Bar__BazBah *message, ProtobufCAllocator *allocator); ~~~ * * - `get_packed_size()`. Calculates the length in bytes of the serialized * representation of the message object. * ~~~{.c} size_t foo__bar__baz_bah__get_packed_size (const Foo__Bar__BazBah *message); ~~~ * * - `pack()`. Pack a message object into a preallocated buffer. Assumes that * the buffer is large enough. (Use `get_packed_size()` first.) * ~~~{.c} size_t foo__bar__baz_bah__pack (const Foo__Bar__BazBah *message, uint8_t *out); ~~~ * * - `pack_to_buffer()`. Packs a message into a "virtual buffer". This is an * object which defines an "append bytes" callback to consume data as it is * serialized. * ~~~{.c} size_t foo__bar__baz_bah__pack_to_buffer (const Foo__Bar__BazBah *message, ProtobufCBuffer *buffer); ~~~ * * \page pack Packing and unpacking messages * * To pack a message, first compute the packed size of the message with * protobuf_c_message_get_packed_size(), then allocate a buffer of at least * that size, then call protobuf_c_message_pack(). * * Alternatively, a message can be serialized without calculating the final size * first. Use the protobuf_c_message_pack_to_buffer() function and provide a * ProtobufCBuffer object which implements an "append" method that consumes * data. * * To unpack a message, call the protobuf_c_message_unpack() function. The * result can be cast to an object of the type that matches the descriptor for * the message. * * The result of unpacking a message should be freed with * protobuf_c_message_free_unpacked(). */ #ifndef PROTOBUF_C_H #define PROTOBUF_C_H #include #include #include #include #ifdef __cplusplus # define PROTOBUF_C__BEGIN_DECLS extern "C" { # define PROTOBUF_C__END_DECLS } #else # define PROTOBUF_C__BEGIN_DECLS # define PROTOBUF_C__END_DECLS #endif PROTOBUF_C__BEGIN_DECLS #if defined(_WIN32) && defined(PROTOBUF_C_USE_SHARED_LIB) # ifdef PROTOBUF_C_EXPORT # define PROTOBUF_C__API __declspec(dllexport) # else # define PROTOBUF_C__API __declspec(dllimport) # endif #else # define PROTOBUF_C__API #endif #if !defined(PROTOBUF_C__NO_DEPRECATED) && \ ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) # define PROTOBUF_C__DEPRECATED __attribute__((__deprecated__)) #else # define PROTOBUF_C__DEPRECATED #endif #ifndef PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE #define PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(enum_name) \ , _##enum_name##_IS_INT_SIZE = INT_MAX #endif #define PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC 0x14159bc3 #define PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC 0x28aaeef9 #define PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC 0x114315af /* Empty string used for initializers */ extern const char protobuf_c_empty_string[]; /** * \defgroup api Public API * * This is the public API for `libprotobuf-c`. These interfaces are stable and * subject to Semantic Versioning guarantees. * * @{ */ /** * Values for the `flags` word in `ProtobufCFieldDescriptor`. */ typedef enum { /** Set if the field is repeated and marked with the `packed` option. */ PROTOBUF_C_FIELD_FLAG_PACKED = (1 << 0), /** Set if the field is marked with the `deprecated` option. */ PROTOBUF_C_FIELD_FLAG_DEPRECATED = (1 << 1), /** Set if the field is a member of a oneof (union). */ PROTOBUF_C_FIELD_FLAG_ONEOF = (1 << 2), } ProtobufCFieldFlag; /** * Message field rules. * * \see [Defining A Message Type] in the Protocol Buffers documentation. * * [Defining A Message Type]: * https://developers.google.com/protocol-buffers/docs/proto#simple */ typedef enum { /** A well-formed message must have exactly one of this field. */ PROTOBUF_C_LABEL_REQUIRED, /** * A well-formed message can have zero or one of this field (but not * more than one). */ PROTOBUF_C_LABEL_OPTIONAL, /** * This field can be repeated any number of times (including zero) in a * well-formed message. The order of the repeated values will be * preserved. */ PROTOBUF_C_LABEL_REPEATED, /** * This field has no label. This is valid only in proto3 and is * equivalent to OPTIONAL but no "has" quantifier will be consulted. */ PROTOBUF_C_LABEL_NONE, } ProtobufCLabel; /** * Field value types. * * \see [Scalar Value Types] in the Protocol Buffers documentation. * * [Scalar Value Types]: * https://developers.google.com/protocol-buffers/docs/proto#scalar */ typedef enum { PROTOBUF_C_TYPE_INT32, /**< int32 */ PROTOBUF_C_TYPE_SINT32, /**< signed int32 */ PROTOBUF_C_TYPE_SFIXED32, /**< signed int32 (4 bytes) */ PROTOBUF_C_TYPE_INT64, /**< int64 */ PROTOBUF_C_TYPE_SINT64, /**< signed int64 */ PROTOBUF_C_TYPE_SFIXED64, /**< signed int64 (8 bytes) */ PROTOBUF_C_TYPE_UINT32, /**< unsigned int32 */ PROTOBUF_C_TYPE_FIXED32, /**< unsigned int32 (4 bytes) */ PROTOBUF_C_TYPE_UINT64, /**< unsigned int64 */ PROTOBUF_C_TYPE_FIXED64, /**< unsigned int64 (8 bytes) */ PROTOBUF_C_TYPE_FLOAT, /**< float */ PROTOBUF_C_TYPE_DOUBLE, /**< double */ PROTOBUF_C_TYPE_BOOL, /**< boolean */ PROTOBUF_C_TYPE_ENUM, /**< enumerated type */ PROTOBUF_C_TYPE_STRING, /**< UTF-8 or ASCII string */ PROTOBUF_C_TYPE_BYTES, /**< arbitrary byte sequence */ PROTOBUF_C_TYPE_MESSAGE, /**< nested message */ } ProtobufCType; /** * Field wire types. * * \see [Message Structure] in the Protocol Buffers documentation. * * [Message Structure]: * https://developers.google.com/protocol-buffers/docs/encoding#structure */ typedef enum { PROTOBUF_C_WIRE_TYPE_VARINT = 0, PROTOBUF_C_WIRE_TYPE_64BIT = 1, PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED = 2, /* "Start group" and "end group" wire types are unsupported. */ PROTOBUF_C_WIRE_TYPE_32BIT = 5, } ProtobufCWireType; struct ProtobufCAllocator; struct ProtobufCBinaryData; struct ProtobufCBuffer; struct ProtobufCBufferSimple; struct ProtobufCEnumDescriptor; struct ProtobufCEnumValue; struct ProtobufCEnumValueIndex; struct ProtobufCFieldDescriptor; struct ProtobufCIntRange; struct ProtobufCMessage; struct ProtobufCMessageDescriptor; struct ProtobufCMessageUnknownField; struct ProtobufCMethodDescriptor; struct ProtobufCService; struct ProtobufCServiceDescriptor; typedef struct ProtobufCAllocator ProtobufCAllocator; typedef struct ProtobufCBinaryData ProtobufCBinaryData; typedef struct ProtobufCBuffer ProtobufCBuffer; typedef struct ProtobufCBufferSimple ProtobufCBufferSimple; typedef struct ProtobufCEnumDescriptor ProtobufCEnumDescriptor; typedef struct ProtobufCEnumValue ProtobufCEnumValue; typedef struct ProtobufCEnumValueIndex ProtobufCEnumValueIndex; typedef struct ProtobufCFieldDescriptor ProtobufCFieldDescriptor; typedef struct ProtobufCIntRange ProtobufCIntRange; typedef struct ProtobufCMessage ProtobufCMessage; typedef struct ProtobufCMessageDescriptor ProtobufCMessageDescriptor; typedef struct ProtobufCMessageUnknownField ProtobufCMessageUnknownField; typedef struct ProtobufCMethodDescriptor ProtobufCMethodDescriptor; typedef struct ProtobufCService ProtobufCService; typedef struct ProtobufCServiceDescriptor ProtobufCServiceDescriptor; /** Boolean type. */ typedef int protobuf_c_boolean; typedef void (*ProtobufCClosure)(const ProtobufCMessage *, void *closure_data); typedef void (*ProtobufCMessageInit)(ProtobufCMessage *); typedef void (*ProtobufCServiceDestroy)(ProtobufCService *); /** * Structure for defining a custom memory allocator. */ struct ProtobufCAllocator { /** Function to allocate memory. */ void *(*alloc)(void *allocator_data, size_t size); /** Function to free memory. */ void (*free)(void *allocator_data, void *pointer); /** Opaque pointer passed to `alloc` and `free` functions. */ void *allocator_data; }; /** * Structure for the protobuf `bytes` scalar type. * * The data contained in a `ProtobufCBinaryData` is an arbitrary sequence of * bytes. It may contain embedded `NUL` characters and is not required to be * `NUL`-terminated. */ struct ProtobufCBinaryData { size_t len; /**< Number of bytes in the `data` field. */ uint8_t *data; /**< Data bytes. */ }; /** * Structure for defining a virtual append-only buffer. Used by * protobuf_c_message_pack_to_buffer() to abstract the consumption of serialized * bytes. * * `ProtobufCBuffer` "subclasses" may be defined on the stack. For example, to * write to a `FILE` object: * ~~~{.c} typedef struct { ProtobufCBuffer base; FILE *fp; } BufferAppendToFile; static void my_buffer_file_append(ProtobufCBuffer *buffer, size_t len, const uint8_t *data) { BufferAppendToFile *file_buf = (BufferAppendToFile *) buffer; fwrite(data, len, 1, file_buf->fp); // XXX: No error handling! } ~~~ * * To use this new type of ProtobufCBuffer, it could be called as follows: * ~~~{.c} ... BufferAppendToFile tmp = {0}; tmp.base.append = my_buffer_file_append; tmp.fp = fp; protobuf_c_message_pack_to_buffer(&message, &tmp); ... ~~~ */ struct ProtobufCBuffer { /** Append function. Consumes the `len` bytes stored at `data`. */ void (*append)(ProtobufCBuffer *buffer, size_t len, const uint8_t *data); }; /** * Simple buffer "subclass" of `ProtobufCBuffer`. * * A `ProtobufCBufferSimple` object is declared on the stack and uses a * scratch buffer provided by the user for the initial allocation. It performs * exponential resizing, using dynamically allocated memory. A * `ProtobufCBufferSimple` object can be created and used as follows: * ~~~{.c} uint8_t pad[128]; ProtobufCBufferSimple simple = PROTOBUF_C_BUFFER_SIMPLE_INIT(pad); ProtobufCBuffer *buffer = (ProtobufCBuffer *) &simple; ~~~ * * `buffer` can now be used with `protobuf_c_message_pack_to_buffer()`. Once a * message has been serialized to a `ProtobufCBufferSimple` object, the * serialized data bytes can be accessed from the `.data` field. * * To free the memory allocated by a `ProtobufCBufferSimple` object, if any, * call PROTOBUF_C_BUFFER_SIMPLE_CLEAR() on the object, for example: * ~~~{.c} PROTOBUF_C_BUFFER_SIMPLE_CLEAR(&simple); ~~~ * * \see PROTOBUF_C_BUFFER_SIMPLE_INIT * \see PROTOBUF_C_BUFFER_SIMPLE_CLEAR */ struct ProtobufCBufferSimple { /** "Base class". */ ProtobufCBuffer base; /** Number of bytes allocated in `data`. */ size_t alloced; /** Number of bytes currently stored in `data`. */ size_t len; /** Data bytes. */ uint8_t *data; /** Whether `data` must be freed. */ protobuf_c_boolean must_free_data; /** Allocator to use. May be NULL to indicate the system allocator. */ ProtobufCAllocator *allocator; }; /** * Describes an enumeration as a whole, with all of its values. */ struct ProtobufCEnumDescriptor { /** Magic value checked to ensure that the API is used correctly. */ uint32_t magic; /** The qualified name (e.g., "namespace.Type"). */ const char *name; /** The unqualified name as given in the .proto file (e.g., "Type"). */ const char *short_name; /** Identifier used in generated C code. */ const char *c_name; /** The dot-separated namespace. */ const char *package_name; /** Number elements in `values`. */ unsigned n_values; /** Array of distinct values, sorted by numeric value. */ const ProtobufCEnumValue *values; /** Number of elements in `values_by_name`. */ unsigned n_value_names; /** Array of named values, including aliases, sorted by name. */ const ProtobufCEnumValueIndex *values_by_name; /** Number of elements in `value_ranges`. */ unsigned n_value_ranges; /** Value ranges, for faster lookups by numeric value. */ const ProtobufCIntRange *value_ranges; /** Reserved for future use. */ void *reserved1; /** Reserved for future use. */ void *reserved2; /** Reserved for future use. */ void *reserved3; /** Reserved for future use. */ void *reserved4; }; /** * Represents a single value of an enumeration. */ struct ProtobufCEnumValue { /** The string identifying this value in the .proto file. */ const char *name; /** The string identifying this value in generated C code. */ const char *c_name; /** The numeric value assigned in the .proto file. */ int value; }; /** * Used by `ProtobufCEnumDescriptor` to look up enum values. */ struct ProtobufCEnumValueIndex { /** Name of the enum value. */ const char *name; /** Index into values[] array. */ unsigned index; }; /** * Describes a single field in a message. */ struct ProtobufCFieldDescriptor { /** Name of the field as given in the .proto file. */ const char *name; /** Tag value of the field as given in the .proto file. */ uint32_t id; /** Whether the field is `REQUIRED`, `OPTIONAL`, or `REPEATED`. */ ProtobufCLabel label; /** The type of the field. */ ProtobufCType type; /** * The offset in bytes of the message's C structure's quantifier field * (the `has_MEMBER` field for optional members or the `n_MEMBER` field * for repeated members or the case enum for oneofs). */ unsigned quantifier_offset; /** * The offset in bytes into the message's C structure for the member * itself. */ unsigned offset; /** * A type-specific descriptor. * * If `type` is `PROTOBUF_C_TYPE_ENUM`, then `descriptor` points to the * corresponding `ProtobufCEnumDescriptor`. * * If `type` is `PROTOBUF_C_TYPE_MESSAGE`, then `descriptor` points to * the corresponding `ProtobufCMessageDescriptor`. * * Otherwise this field is NULL. */ const void *descriptor; /* for MESSAGE and ENUM types */ /** The default value for this field, if defined. May be NULL. */ const void *default_value; /** * A flag word. Zero or more of the bits defined in the * `ProtobufCFieldFlag` enum may be set. */ uint32_t flags; /** Reserved for future use. */ unsigned reserved_flags; /** Reserved for future use. */ void *reserved2; /** Reserved for future use. */ void *reserved3; }; /** * Helper structure for optimizing int => index lookups in the case * where the keys are mostly consecutive values, as they presumably are for * enums and fields. * * The data structures requires that the values in the original array are * sorted. */ struct ProtobufCIntRange { int start_value; unsigned orig_index; /* * NOTE: the number of values in the range can be inferred by looking * at the next element's orig_index. A dummy element is added to make * this simple. */ }; /** * An instance of a message. * * `ProtobufCMessage` is a light-weight "base class" for all messages. * * In particular, `ProtobufCMessage` doesn't have any allocation policy * associated with it. That's because it's common to create `ProtobufCMessage` * objects on the stack. In fact, that's what we recommend for sending messages. * If the object is allocated from the stack, you can't really have a memory * leak. * * This means that calls to functions like protobuf_c_message_unpack() which * return a `ProtobufCMessage` must be paired with a call to a free function, * like protobuf_c_message_free_unpacked(). */ struct ProtobufCMessage { /** The descriptor for this message type. */ const ProtobufCMessageDescriptor *descriptor; /** The number of elements in `unknown_fields`. */ unsigned n_unknown_fields; /** The fields that weren't recognized by the parser. */ ProtobufCMessageUnknownField *unknown_fields; }; /** * Describes a message. */ struct ProtobufCMessageDescriptor { /** Magic value checked to ensure that the API is used correctly. */ uint32_t magic; /** The qualified name (e.g., "namespace.Type"). */ const char *name; /** The unqualified name as given in the .proto file (e.g., "Type"). */ const char *short_name; /** Identifier used in generated C code. */ const char *c_name; /** The dot-separated namespace. */ const char *package_name; /** * Size in bytes of the C structure representing an instance of this * type of message. */ size_t sizeof_message; /** Number of elements in `fields`. */ unsigned n_fields; /** Field descriptors, sorted by tag number. */ const ProtobufCFieldDescriptor *fields; /** Used for looking up fields by name. */ const unsigned *fields_sorted_by_name; /** Number of elements in `field_ranges`. */ unsigned n_field_ranges; /** Used for looking up fields by id. */ const ProtobufCIntRange *field_ranges; /** Message initialisation function. */ ProtobufCMessageInit message_init; /** Reserved for future use. */ void *reserved1; /** Reserved for future use. */ void *reserved2; /** Reserved for future use. */ void *reserved3; }; /** * An unknown message field. */ struct ProtobufCMessageUnknownField { /** The tag number. */ uint32_t tag; /** The wire type of the field. */ ProtobufCWireType wire_type; /** Number of bytes in `data`. */ size_t len; /** Field data. */ uint8_t *data; }; /** * Method descriptor. */ struct ProtobufCMethodDescriptor { /** Method name. */ const char *name; /** Input message descriptor. */ const ProtobufCMessageDescriptor *input; /** Output message descriptor. */ const ProtobufCMessageDescriptor *output; }; /** * Service. */ struct ProtobufCService { /** Service descriptor. */ const ProtobufCServiceDescriptor *descriptor; /** Function to invoke the service. */ void (*invoke)(ProtobufCService *service, unsigned method_index, const ProtobufCMessage *input, ProtobufCClosure closure, void *closure_data); /** Function to destroy the service. */ void (*destroy)(ProtobufCService *service); }; /** * Service descriptor. */ struct ProtobufCServiceDescriptor { /** Magic value checked to ensure that the API is used correctly. */ uint32_t magic; /** Service name. */ const char *name; /** Short version of service name. */ const char *short_name; /** C identifier for the service name. */ const char *c_name; /** Package name. */ const char *package; /** Number of elements in `methods`. */ unsigned n_methods; /** Method descriptors, in the order defined in the .proto file. */ const ProtobufCMethodDescriptor *methods; /** Sort index of methods. */ const unsigned *method_indices_by_name; }; /** * Get the version of the protobuf-c library. Note that this is the version of * the library linked against, not the version of the headers compiled against. * * \return A string containing the version number of protobuf-c. */ PROTOBUF_C__API const char * protobuf_c_version(void); /** * Get the version of the protobuf-c library. Note that this is the version of * the library linked against, not the version of the headers compiled against. * * \return A 32 bit unsigned integer containing the version number of * protobuf-c, represented in base-10 as (MAJOR*1E6) + (MINOR*1E3) + PATCH. */ PROTOBUF_C__API uint32_t protobuf_c_version_number(void); /** * The version of the protobuf-c headers, represented as a string using the same * format as protobuf_c_version(). */ #define PROTOBUF_C_VERSION "1.3.0" /** * The version of the protobuf-c headers, represented as an integer using the * same format as protobuf_c_version_number(). */ #define PROTOBUF_C_VERSION_NUMBER 1003000 /** * The minimum protoc-c version which works with the current version of the * protobuf-c headers. */ #define PROTOBUF_C_MIN_COMPILER_VERSION 1000000 /** * Look up a `ProtobufCEnumValue` from a `ProtobufCEnumDescriptor` by name. * * \param desc * The `ProtobufCEnumDescriptor` object. * \param name * The `name` field from the corresponding `ProtobufCEnumValue` object to * match. * \return * A `ProtobufCEnumValue` object. * \retval NULL * If not found or if the optimize_for = CODE_SIZE option was set. */ PROTOBUF_C__API const ProtobufCEnumValue * protobuf_c_enum_descriptor_get_value_by_name( const ProtobufCEnumDescriptor *desc, const char *name); /** * Look up a `ProtobufCEnumValue` from a `ProtobufCEnumDescriptor` by numeric * value. * * \param desc * The `ProtobufCEnumDescriptor` object. * \param value * The `value` field from the corresponding `ProtobufCEnumValue` object to * match. * * \return * A `ProtobufCEnumValue` object. * \retval NULL * If not found. */ PROTOBUF_C__API const ProtobufCEnumValue * protobuf_c_enum_descriptor_get_value( const ProtobufCEnumDescriptor *desc, int value); /** * Look up a `ProtobufCFieldDescriptor` from a `ProtobufCMessageDescriptor` by * the name of the field. * * \param desc * The `ProtobufCMessageDescriptor` object. * \param name * The name of the field. * \return * A `ProtobufCFieldDescriptor` object. * \retval NULL * If not found or if the optimize_for = CODE_SIZE option was set. */ PROTOBUF_C__API const ProtobufCFieldDescriptor * protobuf_c_message_descriptor_get_field_by_name( const ProtobufCMessageDescriptor *desc, const char *name); /** * Look up a `ProtobufCFieldDescriptor` from a `ProtobufCMessageDescriptor` by * the tag value of the field. * * \param desc * The `ProtobufCMessageDescriptor` object. * \param value * The tag value of the field. * \return * A `ProtobufCFieldDescriptor` object. * \retval NULL * If not found. */ PROTOBUF_C__API const ProtobufCFieldDescriptor * protobuf_c_message_descriptor_get_field( const ProtobufCMessageDescriptor *desc, unsigned value); /** * Determine the number of bytes required to store the serialised message. * * \param message * The message object to serialise. * \return * Number of bytes. */ PROTOBUF_C__API size_t protobuf_c_message_get_packed_size(const ProtobufCMessage *message); /** * Serialise a message from its in-memory representation. * * This function stores the serialised bytes of the message in a pre-allocated * buffer. * * \param message * The message object to serialise. * \param[out] out * Buffer to store the bytes of the serialised message. This buffer must * have enough space to store the packed message. Use * protobuf_c_message_get_packed_size() to determine the number of bytes * required. * \return * Number of bytes stored in `out`. */ PROTOBUF_C__API size_t protobuf_c_message_pack(const ProtobufCMessage *message, uint8_t *out); /** * Serialise a message from its in-memory representation to a virtual buffer. * * This function calls the `append` method of a `ProtobufCBuffer` object to * consume the bytes generated by the serialiser. * * \param message * The message object to serialise. * \param buffer * The virtual buffer object. * \return * Number of bytes passed to the virtual buffer. */ PROTOBUF_C__API size_t protobuf_c_message_pack_to_buffer( const ProtobufCMessage *message, ProtobufCBuffer *buffer); /** * Unpack a serialised message into an in-memory representation. * * \param descriptor * The message descriptor. * \param allocator * `ProtobufCAllocator` to use for memory allocation. May be NULL to * specify the default allocator. * \param len * Length in bytes of the serialised message. * \param data * Pointer to the serialised message. * \return * An unpacked message object. * \retval NULL * If an error occurred during unpacking. */ PROTOBUF_C__API ProtobufCMessage * protobuf_c_message_unpack( const ProtobufCMessageDescriptor *descriptor, ProtobufCAllocator *allocator, size_t len, const uint8_t *data); /** * Free an unpacked message object. * * This function should be used to deallocate the memory used by a call to * protobuf_c_message_unpack(). * * \param message * The message object to free. May be NULL. * \param allocator * `ProtobufCAllocator` to use for memory deallocation. May be NULL to * specify the default allocator. */ PROTOBUF_C__API void protobuf_c_message_free_unpacked( ProtobufCMessage *message, ProtobufCAllocator *allocator); /** * Check the validity of a message object. * * Makes sure all required fields (`PROTOBUF_C_LABEL_REQUIRED`) are present. * Recursively checks nested messages. * * \retval TRUE * Message is valid. * \retval FALSE * Message is invalid. */ PROTOBUF_C__API protobuf_c_boolean protobuf_c_message_check(const ProtobufCMessage *); /** Message initialiser. */ #define PROTOBUF_C_MESSAGE_INIT(descriptor) { descriptor, 0, NULL } /** * Initialise a message object from a message descriptor. * * \param descriptor * Message descriptor. * \param message * Allocated block of memory of size `descriptor->sizeof_message`. */ PROTOBUF_C__API void protobuf_c_message_init( const ProtobufCMessageDescriptor *descriptor, void *message); /** * Free a service. * * \param service * The service object to free. */ PROTOBUF_C__API void protobuf_c_service_destroy(ProtobufCService *service); /** * Look up a `ProtobufCMethodDescriptor` by name. * * \param desc * Service descriptor. * \param name * Name of the method. * * \return * A `ProtobufCMethodDescriptor` object. * \retval NULL * If not found or if the optimize_for = CODE_SIZE option was set. */ PROTOBUF_C__API const ProtobufCMethodDescriptor * protobuf_c_service_descriptor_get_method_by_name( const ProtobufCServiceDescriptor *desc, const char *name); /** * Initialise a `ProtobufCBufferSimple` object. */ #define PROTOBUF_C_BUFFER_SIMPLE_INIT(array_of_bytes) \ { \ { protobuf_c_buffer_simple_append }, \ sizeof(array_of_bytes), \ 0, \ (array_of_bytes), \ 0, \ NULL \ } /** * Clear a `ProtobufCBufferSimple` object, freeing any allocated memory. */ #define PROTOBUF_C_BUFFER_SIMPLE_CLEAR(simp_buf) \ do { \ if ((simp_buf)->must_free_data) { \ if ((simp_buf)->allocator != NULL) \ (simp_buf)->allocator->free( \ (simp_buf)->allocator, \ (simp_buf)->data); \ else \ free((simp_buf)->data); \ } \ } while (0) /** * The `append` method for `ProtobufCBufferSimple`. * * \param buffer * The buffer object to append to. Must actually be a * `ProtobufCBufferSimple` object. * \param len * Number of bytes in `data`. * \param data * Data to append. */ PROTOBUF_C__API void protobuf_c_buffer_simple_append( ProtobufCBuffer *buffer, size_t len, const unsigned char *data); PROTOBUF_C__API void protobuf_c_service_generated_init( ProtobufCService *service, const ProtobufCServiceDescriptor *descriptor, ProtobufCServiceDestroy destroy); PROTOBUF_C__API void protobuf_c_service_invoke_internal( ProtobufCService *service, unsigned method_index, const ProtobufCMessage *input, ProtobufCClosure closure, void *closure_data); /**@}*/ PROTOBUF_C__END_DECLS #endif /* PROTOBUF_C_H */ PKZsz7AAsecurity/pam_filter.hnu[/* * $Id$ * * this file is associated with the Linux-PAM filter module. * it was written by Andrew G. Morgan * */ #ifndef PAM_FILTER_H #define PAM_FILTER_H #include /* * this will fail if there is some problem with these file descriptors * being allocated by the pam_filter Linux-PAM module. The numbers * here are thought safe, but the filter developer should use the * macros, as these numbers are subject to change. * * The APPXXX_FILENO file descriptors are the STDIN/OUT/ERR_FILENO of the * application. The filter uses the STDIN/OUT/ERR_FILENO's to converse * with the user, passes (modified) user input to the application via * APPIN_FILENO, and receives application output from APPOUT_FILENO/ERR. */ #define APPIN_FILENO 3 /* write here to give application input */ #define APPOUT_FILENO 4 /* read here to get application output */ #define APPERR_FILENO 5 /* read here to get application errors */ #define APPTOP_FILE 6 /* used by select */ #endif PKZXX security/pam_appl.hnu[/* * * * This header file collects definitions for the PAM API --- that is, * public interface between the PAM library and an application program * that wishes to use it. * * Note, the copyright information is at end of file. */ #ifndef _SECURITY_PAM_APPL_H #define _SECURITY_PAM_APPL_H #ifdef __cplusplus extern "C" { #endif #include /* Linux-PAM common defined types */ /* -------------- The Linux-PAM Framework layer API ------------- */ extern int PAM_NONNULL((1,3,4)) pam_start(const char *service_name, const char *user, const struct pam_conv *pam_conversation, pam_handle_t **pamh); extern int PAM_NONNULL((1)) pam_end(pam_handle_t *pamh, int pam_status); /* Authentication API's */ extern int PAM_NONNULL((1)) pam_authenticate(pam_handle_t *pamh, int flags); extern int PAM_NONNULL((1)) pam_setcred(pam_handle_t *pamh, int flags); /* Account Management API's */ extern int PAM_NONNULL((1)) pam_acct_mgmt(pam_handle_t *pamh, int flags); /* Session Management API's */ extern int PAM_NONNULL((1)) pam_open_session(pam_handle_t *pamh, int flags); extern int PAM_NONNULL((1)) pam_close_session(pam_handle_t *pamh, int flags); /* Password Management API's */ extern int PAM_NONNULL((1)) pam_chauthtok(pam_handle_t *pamh, int flags); /* take care of any compatibility issues */ #include #ifdef __cplusplus } #endif /* * Copyright Theodore Ts'o, 1996. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * ALTERNATIVELY, this product may be distributed under the terms of * the GNU Public License, in which case the provisions of the GPL are * required INSTEAD OF the above restrictions. (This clause is * necessary due to a potential bad interaction between the GPL and * the restrictions contained in a BSD-style copyright.) * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #endif /* _SECURITY_PAM_APPL_H */ PKZ1 security/_pam_compat.hnu[#ifndef _PAM_COMPAT_H #define _PAM_COMPAT_H /* * This file was contributed by Derrick J Brashear * slight modification by Brad M. Garcia * * A number of operating systems have started to implement PAM. * unfortunately, they have a different set of numeric values for * certain constants. This file is included for compatibility's sake. */ /* Solaris uses different constants. We redefine to those here */ #if defined(solaris) || (defined(__SVR4) && defined(sun)) # ifdef _SECURITY_PAM_MODULES_H /* flags for pam_chauthtok() */ # undef PAM_PRELIM_CHECK # define PAM_PRELIM_CHECK 0x1 # undef PAM_UPDATE_AUTHTOK # define PAM_UPDATE_AUTHTOK 0x2 # endif /* _SECURITY_PAM_MODULES_H */ # ifdef _SECURITY__PAM_TYPES_H /* generic for pam_* functions */ # undef PAM_SILENT # define PAM_SILENT 0x80000000 # undef PAM_CHANGE_EXPIRED_AUTHTOK # define PAM_CHANGE_EXPIRED_AUTHTOK 0x4 /* flags for pam_setcred() */ # undef PAM_ESTABLISH_CRED # define PAM_ESTABLISH_CRED 0x1 # undef PAM_DELETE_CRED # define PAM_DELETE_CRED 0x2 # undef PAM_REINITIALIZE_CRED # define PAM_REINITIALIZE_CRED 0x4 # undef PAM_REFRESH_CRED # define PAM_REFRESH_CRED 0x8 /* another binary incompatibility comes from the return codes! */ # undef PAM_CONV_ERR # define PAM_CONV_ERR 6 # undef PAM_PERM_DENIED # define PAM_PERM_DENIED 7 # undef PAM_MAXTRIES # define PAM_MAXTRIES 8 # undef PAM_AUTH_ERR # define PAM_AUTH_ERR 9 # undef PAM_NEW_AUTHTOK_REQD # define PAM_NEW_AUTHTOK_REQD 10 # undef PAM_CRED_INSUFFICIENT # define PAM_CRED_INSUFFICIENT 11 # undef PAM_AUTHINFO_UNAVAIL # define PAM_AUTHINFO_UNAVAIL 12 # undef PAM_USER_UNKNOWN # define PAM_USER_UNKNOWN 13 # undef PAM_CRED_UNAVAIL # define PAM_CRED_UNAVAIL 14 # undef PAM_CRED_EXPIRED # define PAM_CRED_EXPIRED 15 # undef PAM_CRED_ERR # define PAM_CRED_ERR 16 # undef PAM_ACCT_EXPIRED # define PAM_ACCT_EXPIRED 17 # undef PAM_AUTHTOK_EXPIRED # define PAM_AUTHTOK_EXPIRED 18 # undef PAM_SESSION_ERR # define PAM_SESSION_ERR 19 # undef PAM_AUTHTOK_ERR # define PAM_AUTHTOK_ERR 20 # undef PAM_AUTHTOK_RECOVERY_ERR # define PAM_AUTHTOK_RECOVERY_ERR 21 # undef PAM_AUTHTOK_LOCK_BUSY # define PAM_AUTHTOK_LOCK_BUSY 22 # undef PAM_AUTHTOK_DISABLE_AGING # define PAM_AUTHTOK_DISABLE_AGING 23 # undef PAM_NO_MODULE_DATA # define PAM_NO_MODULE_DATA 24 # undef PAM_IGNORE # define PAM_IGNORE 25 # undef PAM_ABORT # define PAM_ABORT 26 # undef PAM_TRY_AGAIN # define PAM_TRY_AGAIN 27 #endif /* _SECURITY__PAM_TYPES_H */ #else /* For compatibility with old Linux-PAM implementations. */ #define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_RECOVERY_ERR #endif /* defined(solaris) || (defined(__SVR4) && defined(sun)) */ #endif /* _PAM_COMPAT_H */ PKZ$//security/pam_ext.hnu[/* * Copyright (C) 2005, 2006, 2008, 2009 Thorsten Kukuk. * * * * This header file collects definitions for the extended PAM API. * This is a public interface of the PAM library for PAM modules, * which makes the life of PAM developers easier, but are not documented * in any standard and are not portable between different PAM * implementations. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * ALTERNATIVELY, this product may be distributed under the terms of * the GNU Public License, in which case the provisions of the GPL are * required INSTEAD OF the above restrictions. (This clause is * necessary due to a potential bad interaction between the GPL and * the restrictions contained in a BSD-style copyright.) * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SECURITY__PAM_EXT_H_ #define _SECURITY__PAM_EXT_H_ #ifdef __cplusplus extern "C" { #endif #include #include extern void PAM_FORMAT((printf, 3, 0)) PAM_NONNULL((3)) pam_vsyslog (const pam_handle_t *pamh, int priority, const char *fmt, va_list args); extern void PAM_FORMAT((printf, 3, 4)) PAM_NONNULL((3)) pam_syslog (const pam_handle_t *pamh, int priority, const char *fmt, ...); extern int PAM_FORMAT((printf, 4, 0)) PAM_NONNULL((1,4)) pam_vprompt (pam_handle_t *pamh, int style, char **response, const char *fmt, va_list args); extern int PAM_FORMAT((printf, 4, 5)) PAM_NONNULL((1,4)) pam_prompt (pam_handle_t *pamh, int style, char **response, const char *fmt, ...); #define pam_error(pamh, fmt...) \ pam_prompt(pamh, PAM_ERROR_MSG, NULL, fmt) #define pam_verror(pamh, fmt, args) \ pam_vprompt(pamh, PAM_ERROR_MSG, NULL, fmt, args) #define pam_info(pamh, fmt...) pam_prompt(pamh, PAM_TEXT_INFO, NULL, fmt) #define pam_vinfo(pamh, fmt, args) pam_vprompt(pamh, PAM_TEXT_INFO, NULL, fmt, args) extern int PAM_NONNULL((1,3)) pam_get_authtok (pam_handle_t *pamh, int item, const char **authtok, const char *prompt); extern int PAM_NONNULL((1,2)) pam_get_authtok_noverify (pam_handle_t *pamh, const char **authtok, const char *prompt); extern int PAM_NONNULL((1,2)) pam_get_authtok_verify (pam_handle_t *pamh, const char **authtok, const char *prompt); #ifdef __cplusplus } #endif #endif PKZٺh2h2security/_pam_types.hnu[/* * * * This file defines all of the types common to the Linux-PAM library * applications and modules. * * Note, the copyright+license information is at end of file. */ #ifndef _SECURITY__PAM_TYPES_H #define _SECURITY__PAM_TYPES_H /* This is a blind structure; users aren't allowed to see inside a * pam_handle_t, so we don't define struct pam_handle here. This is * defined in a file private to the PAM library. (i.e., it's private * to PAM service modules, too!) */ typedef struct pam_handle pam_handle_t; /* ---------------- The Linux-PAM Version defines ----------------- */ /* Major and minor version number of the Linux-PAM package. Use these macros to test for features in specific releases. */ #define __LINUX_PAM__ 1 #define __LINUX_PAM_MINOR__ 0 /* ----------------- The Linux-PAM return values ------------------ */ #define PAM_SUCCESS 0 /* Successful function return */ #define PAM_OPEN_ERR 1 /* dlopen() failure when dynamically */ /* loading a service module */ #define PAM_SYMBOL_ERR 2 /* Symbol not found */ #define PAM_SERVICE_ERR 3 /* Error in service module */ #define PAM_SYSTEM_ERR 4 /* System error */ #define PAM_BUF_ERR 5 /* Memory buffer error */ #define PAM_PERM_DENIED 6 /* Permission denied */ #define PAM_AUTH_ERR 7 /* Authentication failure */ #define PAM_CRED_INSUFFICIENT 8 /* Can not access authentication data */ /* due to insufficient credentials */ #define PAM_AUTHINFO_UNAVAIL 9 /* Underlying authentication service */ /* can not retrieve authentication */ /* information */ #define PAM_USER_UNKNOWN 10 /* User not known to the underlying */ /* authenticaiton module */ #define PAM_MAXTRIES 11 /* An authentication service has */ /* maintained a retry count which has */ /* been reached. No further retries */ /* should be attempted */ #define PAM_NEW_AUTHTOK_REQD 12 /* New authentication token required. */ /* This is normally returned if the */ /* machine security policies require */ /* that the password should be changed */ /* beccause the password is NULL or it */ /* has aged */ #define PAM_ACCT_EXPIRED 13 /* User account has expired */ #define PAM_SESSION_ERR 14 /* Can not make/remove an entry for */ /* the specified session */ #define PAM_CRED_UNAVAIL 15 /* Underlying authentication service */ /* can not retrieve user credentials */ /* unavailable */ #define PAM_CRED_EXPIRED 16 /* User credentials expired */ #define PAM_CRED_ERR 17 /* Failure setting user credentials */ #define PAM_NO_MODULE_DATA 18 /* No module specific data is present */ #define PAM_CONV_ERR 19 /* Conversation error */ #define PAM_AUTHTOK_ERR 20 /* Authentication token manipulation error */ #define PAM_AUTHTOK_RECOVERY_ERR 21 /* Authentication information */ /* cannot be recovered */ #define PAM_AUTHTOK_LOCK_BUSY 22 /* Authentication token lock busy */ #define PAM_AUTHTOK_DISABLE_AGING 23 /* Authentication token aging disabled */ #define PAM_TRY_AGAIN 24 /* Preliminary check by password service */ #define PAM_IGNORE 25 /* Ignore underlying account module */ /* regardless of whether the control */ /* flag is required, optional, or sufficient */ #define PAM_ABORT 26 /* Critical error (?module fail now request) */ #define PAM_AUTHTOK_EXPIRED 27 /* user's authentication token has expired */ #define PAM_MODULE_UNKNOWN 28 /* module is not known */ #define PAM_BAD_ITEM 29 /* Bad item passed to pam_*_item() */ #define PAM_CONV_AGAIN 30 /* conversation function is event driven and data is not available yet */ #define PAM_INCOMPLETE 31 /* please call this function again to complete authentication stack. Before calling again, verify that conversation is completed */ /* * Add new #define's here - take care to also extend the libpam code: * pam_strerror() and "libpam/pam_tokens.h" . */ #define _PAM_RETURN_VALUES 32 /* this is the number of return values */ /* ---------------------- The Linux-PAM flags -------------------- */ /* Authentication service should not generate any messages */ #define PAM_SILENT 0x8000U /* Note: these flags are used by pam_authenticate{,_secondary}() */ /* The authentication service should return PAM_AUTH_ERROR if the * user has a null authentication token */ #define PAM_DISALLOW_NULL_AUTHTOK 0x0001U /* Note: these flags are used for pam_setcred() */ /* Set user credentials for an authentication service */ #define PAM_ESTABLISH_CRED 0x0002U /* Delete user credentials associated with an authentication service */ #define PAM_DELETE_CRED 0x0004U /* Reinitialize user credentials */ #define PAM_REINITIALIZE_CRED 0x0008U /* Extend lifetime of user credentials */ #define PAM_REFRESH_CRED 0x0010U /* Note: these flags are used by pam_chauthtok */ /* The password service should only update those passwords that have * aged. If this flag is not passed, the password service should * update all passwords. */ #define PAM_CHANGE_EXPIRED_AUTHTOK 0x0020U /* ------------------ The Linux-PAM item types ------------------- */ /* These defines are used by pam_set_item() and pam_get_item(). Please check the spec which are allowed for use by applications and which are only allowed for use by modules. */ #define PAM_SERVICE 1 /* The service name */ #define PAM_USER 2 /* The user name */ #define PAM_TTY 3 /* The tty name */ #define PAM_RHOST 4 /* The remote host name */ #define PAM_CONV 5 /* The pam_conv structure */ #define PAM_AUTHTOK 6 /* The authentication token (password) */ #define PAM_OLDAUTHTOK 7 /* The old authentication token */ #define PAM_RUSER 8 /* The remote user name */ #define PAM_USER_PROMPT 9 /* the prompt for getting a username */ /* Linux-PAM extensions */ #define PAM_FAIL_DELAY 10 /* app supplied function to override failure delays */ #define PAM_XDISPLAY 11 /* X display name */ #define PAM_XAUTHDATA 12 /* X server authentication data */ #define PAM_AUTHTOK_TYPE 13 /* The type for pam_get_authtok */ /* -------------- Special defines used by Linux-PAM -------------- */ #if defined(__GNUC__) && defined(__GNUC_MINOR__) # define PAM_GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else # define PAM_GNUC_PREREQ(maj, min) 0 #endif #if PAM_GNUC_PREREQ(2,5) # define PAM_FORMAT(params) __attribute__((__format__ params)) #else # define PAM_FORMAT(params) #endif #if PAM_GNUC_PREREQ(3,3) && !defined(LIBPAM_COMPILE) # define PAM_NONNULL(params) __attribute__((__nonnull__ params)) #else # define PAM_NONNULL(params) #endif /* ---------- Common Linux-PAM application/module PI ----------- */ extern int PAM_NONNULL((1)) pam_set_item(pam_handle_t *pamh, int item_type, const void *item); extern int PAM_NONNULL((1)) pam_get_item(const pam_handle_t *pamh, int item_type, const void **item); extern const char * pam_strerror(pam_handle_t *pamh, int errnum); extern int PAM_NONNULL((1,2)) pam_putenv(pam_handle_t *pamh, const char *name_value); extern const char * PAM_NONNULL((1,2)) pam_getenv(pam_handle_t *pamh, const char *name); extern char ** PAM_NONNULL((1)) pam_getenvlist(pam_handle_t *pamh); /* ---------- Common Linux-PAM application/module PI ----------- */ /* * here are some proposed error status definitions for the * 'error_status' argument used by the cleanup function associated * with data items they should be logically OR'd with the error_status * of the latest return from libpam -- new with .52 and positive * impression from Sun although not official as of 1996/9/4 * [generally the other flags are to be found in pam_modules.h] */ #define PAM_DATA_SILENT 0x40000000 /* used to suppress messages... */ /* * here we define an externally (by apps or modules) callable function * that primes the libpam library to delay when a stacked set of * modules results in a failure. In the case of PAM_SUCCESS this delay * is ignored. * * Note, the pam_[gs]et_item(... PAM_FAIL_DELAY ...) can be used to set * a function pointer which can override the default fail-delay behavior. * This item was added to accommodate event driven programs that need to * manage delays more carefully. The function prototype for this data * item is * void (*fail_delay)(int status, unsigned int delay, void *appdata_ptr); */ #define HAVE_PAM_FAIL_DELAY extern int pam_fail_delay(pam_handle_t *pamh, unsigned int musec_delay); /* ------------ The Linux-PAM conversation structures ------------ */ /* Message styles */ #define PAM_PROMPT_ECHO_OFF 1 #define PAM_PROMPT_ECHO_ON 2 #define PAM_ERROR_MSG 3 #define PAM_TEXT_INFO 4 /* Linux-PAM specific types */ #define PAM_RADIO_TYPE 5 /* yes/no/maybe conditionals */ /* This is for server client non-human interaction.. these are NOT part of the X/Open PAM specification. */ #define PAM_BINARY_PROMPT 7 /* maximum size of messages/responses etc.. (these are mostly arbitrary so Linux-PAM should handle longer values). */ #define PAM_MAX_NUM_MSG 32 #define PAM_MAX_MSG_SIZE 512 #define PAM_MAX_RESP_SIZE 512 /* Used to pass prompting text, error messages, or other informatory * text to the user. This structure is allocated and freed by the PAM * library (or loaded module). */ struct pam_message { int msg_style; const char *msg; }; /* if the pam_message.msg_style = PAM_BINARY_PROMPT the 'pam_message.msg' is a pointer to a 'const *' for the following pseudo-structure. When used with a PAM_BINARY_PROMPT, the returned pam_response.resp pointer points to an object with the following structure: struct { u32 length; # network byte order unsigned char type; unsigned char data[length-5]; }; The 'libpamc' library is designed around this flavor of message and should be used to handle this flavor of msg_style. */ /* Used to return the user's response to the PAM library. This structure is allocated by the application program, and free()'d by the Linux-PAM library (or calling module). */ struct pam_response { char *resp; int resp_retcode; /* currently un-used, zero expected */ }; /* The actual conversation structure itself */ struct pam_conv { int (*conv)(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr); void *appdata_ptr; }; /* Used by the PAM_XAUTHDATA pam item. Contains X authentication data used by modules to connect to the user's X display. Note: this structure is intentionally compatible with xcb_auth_info_t. */ struct pam_xauth_data { int namelen; char *name; int datalen; char *data; }; /* ... adapted from the pam_appl.h file created by Theodore Ts'o and * * Copyright Theodore Ts'o, 1996. All rights reserved. * Copyright (c) Andrew G. Morgan , 1996-8 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * ALTERNATIVELY, this product may be distributed under the terms of * the GNU Public License, in which case the provisions of the GPL are * required INSTEAD OF the above restrictions. (This clause is * necessary due to a potential bad interaction between the GPL and * the restrictions contained in a BSD-style copyright.) * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #endif /* _SECURITY__PAM_TYPES_H */ PKZddsecurity/pam_modutil.hnu[/* * Copyright (c) 2001-2002 Andrew Morgan * * * * This file is a list of handy libc wrappers that attempt to provide some * thread-safe and other convenient functionality to modules in a common form. * * A number of these functions reserve space in a pam_[sg]et_data item. * In all cases, the name of the item is prefixed with "pam_modutil_*". * * On systems that simply can't support thread safe programming, these * functions don't support it either - sorry. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * ALTERNATIVELY, this product may be distributed under the terms of * the GNU Public License, in which case the provisions of the GPL are * required INSTEAD OF the above restrictions. (This clause is * necessary due to a potential bad interaction between the GPL and * the restrictions contained in a BSD-style copyright.) * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SECURITY__PAM_MODUTIL_H #define _SECURITY__PAM_MODUTIL_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif #include extern struct passwd * PAM_NONNULL((1,2)) pam_modutil_getpwnam(pam_handle_t *pamh, const char *user); extern struct passwd * PAM_NONNULL((1)) pam_modutil_getpwuid(pam_handle_t *pamh, uid_t uid); extern struct group * PAM_NONNULL((1,2)) pam_modutil_getgrnam(pam_handle_t *pamh, const char *group); extern struct group * PAM_NONNULL((1)) pam_modutil_getgrgid(pam_handle_t *pamh, gid_t gid); extern struct spwd * PAM_NONNULL((1,2)) pam_modutil_getspnam(pam_handle_t *pamh, const char *user); extern int PAM_NONNULL((1,2,3)) pam_modutil_user_in_group_nam_nam(pam_handle_t *pamh, const char *user, const char *group); extern int PAM_NONNULL((1,2)) pam_modutil_user_in_group_nam_gid(pam_handle_t *pamh, const char *user, gid_t group); extern int PAM_NONNULL((1,3)) pam_modutil_user_in_group_uid_nam(pam_handle_t *pamh, uid_t user, const char *group); extern int PAM_NONNULL((1)) pam_modutil_user_in_group_uid_gid(pam_handle_t *pamh, uid_t user, gid_t group); extern const char * PAM_NONNULL((1)) pam_modutil_getlogin(pam_handle_t *pamh); extern int pam_modutil_read(int fd, char *buffer, int count); extern int pam_modutil_write(int fd, const char *buffer, int count); extern int PAM_NONNULL((1,3)) pam_modutil_audit_write(pam_handle_t *pamh, int type, const char *message, int retval); struct pam_modutil_privs { gid_t *grplist; int number_of_groups; int allocated; gid_t old_gid; uid_t old_uid; int is_dropped; }; #define PAM_MODUTIL_NGROUPS 64 #define PAM_MODUTIL_DEF_PRIVS(n) \ gid_t n##_grplist[PAM_MODUTIL_NGROUPS]; \ struct pam_modutil_privs n = { n##_grplist, PAM_MODUTIL_NGROUPS, 0, -1, -1, 0 } extern int PAM_NONNULL((1,2,3)) pam_modutil_drop_priv(pam_handle_t *pamh, struct pam_modutil_privs *p, const struct passwd *pw); extern int PAM_NONNULL((1,2)) pam_modutil_regain_priv(pam_handle_t *pamh, struct pam_modutil_privs *p); enum pam_modutil_redirect_fd { PAM_MODUTIL_IGNORE_FD, /* do not redirect */ PAM_MODUTIL_PIPE_FD, /* redirect to a pipe */ PAM_MODUTIL_NULL_FD, /* redirect to /dev/null */ }; /* redirect standard descriptors, close all other descriptors. */ extern int PAM_NONNULL((1)) pam_modutil_sanitize_helper_fds(pam_handle_t *pamh, enum pam_modutil_redirect_fd redirect_stdin, enum pam_modutil_redirect_fd redirect_stdout, enum pam_modutil_redirect_fd redirect_stderr); #ifdef __cplusplus } #endif #endif /* _SECURITY__PAM_MODUTIL_H */ PKZuusecurity/pam_modules.hnu[/* * * * This header file collects definitions for the PAM API --- that is, * public interface between the PAM library and PAM modules. * * Note, the copyright information is at end of file. */ #ifndef _SECURITY_PAM_MODULES_H #define _SECURITY_PAM_MODULES_H #ifdef __cplusplus extern "C" { #endif #include /* Linux-PAM common defined types */ /* -------------- The Linux-PAM Module PI ------------- */ extern int PAM_NONNULL((1,2)) pam_set_data(pam_handle_t *pamh, const char *module_data_name, void *data, void (*cleanup)(pam_handle_t *pamh, void *data, int error_status)); extern int PAM_NONNULL((1,2,3)) pam_get_data(const pam_handle_t *pamh, const char *module_data_name, const void **data); extern int PAM_NONNULL((1,2)) pam_get_user(pam_handle_t *pamh, const char **user, const char *prompt); /* Authentication API's */ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv); int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc, const char **argv); /* Account Management API's */ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv); /* Session Management API's */ int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv); int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv); /* Password Management API's */ int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv); /* The following two flags are for use across the Linux-PAM/module * interface only. The Application is not permitted to use these * tokens. * * The password service should only perform preliminary checks. No * passwords should be updated. */ #define PAM_PRELIM_CHECK 0x4000 /* The password service should update passwords Note: PAM_PRELIM_CHECK * and PAM_UPDATE_AUTHTOK cannot both be set simultaneously! */ #define PAM_UPDATE_AUTHTOK 0x2000 /* * here are some proposed error status definitions for the * 'error_status' argument used by the cleanup function associated * with data items they should be logically OR'd with the error_status * of the latest return from libpam -- new with .52 and positive * impression from Sun although not official as of 1996/9/4 there are * others in _pam_types.h -- they are for common module/app use. */ #define PAM_DATA_REPLACE 0x20000000 /* used when replacing a data item */ /* PAM_EXTERN isn't needed anymore, but don't remove it to not break lot of external code using it. */ #define PAM_EXTERN extern /* take care of any compatibility issues */ #include #ifdef __cplusplus } #endif /* Copyright (C) Theodore Ts'o, 1996. * Copyright (C) Andrew Morgan, 1996-8. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * ALTERNATIVELY, this product may be distributed under the terms of * the GNU General Public License, in which case the provisions of the * GNU GPL are required INSTEAD OF the above restrictions. (This * clause is necessary due to a potential bad interaction between the * GNU GPL and the restrictions contained in a BSD-style copyright.) * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #endif /* _SECURITY_PAM_MODULES_H */ PKZwGGsecurity/pam_client.hnu[/* * $Id$ * * Copyright (c) 1999 Andrew G. Morgan * * This header file provides the prototypes for the PAM client API */ #ifndef PAM_CLIENT_H #define PAM_CLIENT_H #ifdef __cplusplus extern "C" { #endif /* def __cplusplus */ #include #include #include #include /* opaque agent handling structure */ typedef struct pamc_handle_s *pamc_handle_t; /* binary prompt structure pointer */ typedef struct { u_int32_t length; u_int8_t control; } *pamc_bp_t; /* * functions provided by libpamc */ /* * Initialize the agent abstraction library */ pamc_handle_t pamc_start(void); /* * Terminate the authentication process */ int pamc_end(pamc_handle_t *pch); /* * force the loading of a specified agent */ int pamc_load(pamc_handle_t pch, const char *agent_id); /* * Single conversation interface for binary prompts */ int pamc_converse(pamc_handle_t pch, pamc_bp_t *prompt_p); /* * disable an agent */ int pamc_disable(pamc_handle_t pch, const char *agent_id); /* * obtain a list of available agents */ char **pamc_list_agents(pamc_handle_t pch); /* * PAM_BP_ MACROS for creating, destroying and manipulating binary prompts */ #include #include #include #ifndef PAM_BP_ASSERT # ifdef NDEBUG # define PAM_BP_ASSERT(x) do {} while (0) # else # define PAM_BP_ASSERT(x) do { printf(__FILE__ "(%d): %s\n", \ __LINE__, x) ; exit(1); } while (0) # endif /* NDEBUG */ #endif /* PAM_BP_ASSERT */ #ifndef PAM_BP_CALLOC # define PAM_BP_CALLOC calloc #endif /* PAM_BP_CALLOC */ #ifndef PAM_BP_FREE # define PAM_BP_FREE free #endif /* PAM_BP_FREE */ #define __PAM_BP_WOCTET(x,y) (*((y) + (u_int8_t *)(x))) #define __PAM_BP_ROCTET(x,y) (*((y) + (const u_int8_t *)(x))) #define PAM_BP_MIN_SIZE (sizeof(u_int32_t) + sizeof(u_int8_t)) #define PAM_BP_MAX_LENGTH 0x20000 /* an advisory limit */ #define PAM_BP_WCONTROL(x) (__PAM_BP_WOCTET(x,4)) #define PAM_BP_RCONTROL(x) (__PAM_BP_ROCTET(x,4)) #define PAM_BP_SIZE(x) ((__PAM_BP_ROCTET(x,0)<<24)+ \ (__PAM_BP_ROCTET(x,1)<<16)+ \ (__PAM_BP_ROCTET(x,2)<< 8)+ \ (__PAM_BP_ROCTET(x,3) )) #define PAM_BP_LENGTH(x) (PAM_BP_SIZE(x) - PAM_BP_MIN_SIZE) #define PAM_BP_WDATA(x) (PAM_BP_MIN_SIZE + (u_int8_t *) (x)) #define PAM_BP_RDATA(x) (PAM_BP_MIN_SIZE + (const u_int8_t *) (x)) /* Note, this macro always '\0' terminates renewed packets */ #define PAM_BP_RENEW(old_p, cntrl, data_length) \ do { \ if (old_p) { \ if (*(old_p)) { \ u_int32_t __size; \ __size = PAM_BP_SIZE(*(old_p)); \ memset(*(old_p), 0, __size); \ PAM_BP_FREE(*(old_p)); \ } \ if (cntrl) { \ u_int32_t __size; \ \ __size = PAM_BP_MIN_SIZE + data_length; \ if ((*(old_p) = PAM_BP_CALLOC(1, 1+__size))) { \ __PAM_BP_WOCTET(*(old_p), 3) = __size & 0xFF; \ __PAM_BP_WOCTET(*(old_p), 2) = (__size>>=8) & 0xFF; \ __PAM_BP_WOCTET(*(old_p), 1) = (__size>>=8) & 0xFF; \ __PAM_BP_WOCTET(*(old_p), 0) = (__size>>=8) & 0xFF; \ (*(old_p))->control = cntrl; \ } else { \ PAM_BP_ASSERT("out of memory for binary prompt"); \ } \ } else { \ *old_p = NULL; \ } \ } else { \ PAM_BP_ASSERT("programming error, invalid binary prompt pointer"); \ } \ } while (0) #define PAM_BP_FILL(prmpt, offset, length, data) \ do { \ size_t bp_length; \ u_int8_t *prompt = (u_int8_t *) (prmpt); \ bp_length = PAM_BP_LENGTH(prompt); \ if (bp_length < ((length)+(offset))) { \ PAM_BP_ASSERT("attempt to write over end of prompt"); \ } \ memcpy((offset) + PAM_BP_WDATA(prompt), (data), (length)); \ } while (0) #define PAM_BP_EXTRACT(prmpt, offset, length, data) \ do { \ size_t __bp_length; \ const u_int8_t *__prompt = (const u_int8_t *) (prmpt); \ __bp_length = PAM_BP_LENGTH(__prompt); \ if (((offset) < 0) || (__bp_length < ((length)+(offset))) \ || ((length) < 0)) { \ PAM_BP_ASSERT("invalid extraction from prompt"); \ } \ memcpy((data), (offset) + PAM_BP_RDATA(__prompt), (length)); \ } while (0) /* Control types */ #define PAM_BPC_FALSE 0 #define PAM_BPC_TRUE 1 #define PAM_BPC_OK 0x01 /* continuation packet */ #define PAM_BPC_SELECT 0x02 /* initialization packet */ #define PAM_BPC_DONE 0x03 /* termination packet */ #define PAM_BPC_FAIL 0x04 /* unable to execute */ /* The following control characters are only legal for echanges between an agent and a client (it is the responsibility of the client to enforce this rule in the face of a rogue server): */ #define PAM_BPC_GETENV 0x41 /* obtain client env.var */ #define PAM_BPC_PUTENV 0x42 /* set client env.var */ #define PAM_BPC_TEXT 0x43 /* display message */ #define PAM_BPC_ERROR 0x44 /* display error message */ #define PAM_BPC_PROMPT 0x45 /* echo'd text prompt */ #define PAM_BPC_PASS 0x46 /* non-echo'd text prompt*/ /* quick check for prompts that are legal for the client (by implication the server too) to send to libpamc */ #define PAM_BPC_FOR_CLIENT(/* pamc_bp_t */ prompt) \ (((prompt)->control <= PAM_BPC_FAIL && (prompt)->control >= PAM_BPC_OK) \ ? PAM_BPC_TRUE:PAM_BPC_FALSE) #ifdef __cplusplus } #endif /* def __cplusplus */ #endif /* PAM_CLIENT_H */ PKZifLsecurity/_pam_macros.hnu[#ifndef PAM_MACROS_H #define PAM_MACROS_H /* * All kind of macros used by PAM, but usable in some other * programs too. * Organized by Cristian Gafton */ /* a 'safe' version of strdup */ #include #include #define x_strdup(s) ( (s) ? strdup(s):NULL ) /* Good policy to strike out passwords with some characters not just free the memory */ #define _pam_overwrite(x) \ do { \ register char *__xx__; \ if ((__xx__=(x))) \ while (*__xx__) \ *__xx__++ = '\0'; \ } while (0) #define _pam_overwrite_n(x,n) \ do { \ register char *__xx__; \ register unsigned int __i__ = 0; \ if ((__xx__=(x))) \ for (;__i__ */ #include #include #include #include #include #include #include /* * This is for debugging purposes ONLY. DO NOT use on live systems !!! * You have been warned :-) - CG * * to get automated debugging to the log file, it must be created manually. * _PAM_LOGFILE must exist and be writable to the programs you debug. */ #ifndef _PAM_LOGFILE #define _PAM_LOGFILE "/var/run/pam-debug.log" #endif static void _pam_output_debug_info(const char *file, const char *fn , const int line) { FILE *logfile; int must_close = 1, fd; #ifdef O_NOFOLLOW if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_NOFOLLOW|O_APPEND)) != -1) { #else if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_APPEND)) != -1) { #endif if (!(logfile = fdopen(fd,"a"))) { logfile = stderr; must_close = 0; close(fd); } } else { logfile = stderr; must_close = 0; } fprintf(logfile,"[%s:%s(%d)] ",file, fn, line); fflush(logfile); if (must_close) fclose(logfile); } static void _pam_output_debug(const char *format, ...) { va_list args; FILE *logfile; int must_close = 1, fd; va_start(args, format); #ifdef O_NOFOLLOW if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_NOFOLLOW|O_APPEND)) != -1) { #else if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_APPEND)) != -1) { #endif if (!(logfile = fdopen(fd,"a"))) { logfile = stderr; must_close = 0; close(fd); } } else { logfile = stderr; must_close = 0; } vfprintf(logfile, format, args); fprintf(logfile, "\n"); fflush(logfile); if (must_close) fclose(logfile); va_end(args); } #define D(x) do { \ _pam_output_debug_info(__FILE__, __FUNCTION__, __LINE__); \ _pam_output_debug x ; \ } while (0) #define _pam_show_mem(X,XS) do { \ int i; \ register unsigned char *x; \ x = (unsigned char *)X; \ fprintf(stderr, " \n", X); \ for (i = 0; i < XS ; ++x, ++i) { \ fprintf(stderr, " %02X. <%p:%02X>\n", i, x, *x); \ } \ fprintf(stderr, " \n", X, XS); \ } while (0) #define _pam_show_reply(/* struct pam_response * */reply, /* int */replies) \ do { \ int reply_i; \ setbuf(stderr, NULL); \ fprintf(stderr, "array at %p of size %d\n",reply,replies); \ fflush(stderr); \ if (reply) { \ for (reply_i = 0; reply_i < replies; reply_i++) { \ fprintf(stderr, " elem# %d at %p: resp = %p, retcode = %d\n", \ reply_i, reply+reply_i, reply[reply_i].resp, \ reply[reply_i].resp, _retcode); \ fflush(stderr); \ if (reply[reply_i].resp) { \ fprintf(stderr, " resp[%d] = '%s'\n", \ strlen(reply[reply_i].resp), reply[reply_i].resp); \ fflush(stderr); \ } \ } \ } \ fprintf(stderr, "done here\n"); \ fflush(stderr); \ } while (0) #else #define D(x) do { } while (0) #define _pam_show_mem(X,XS) do { } while (0) #define _pam_show_reply(reply, replies) do { } while (0) #endif /* PAM_DEBUG */ #endif /* PAM_MACROS_H */ PKZiP7security/pam_misc.hnu[/* $Id$ */ #ifndef __PAMMISC_H #define __PAMMISC_H #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* include some useful macros */ #include /* functions defined in pam_misc.* libraries */ extern int misc_conv(int num_msg, const struct pam_message **msgm, struct pam_response **response, void *appdata_ptr); #include extern time_t pam_misc_conv_warn_time; /* time that we should warn user */ extern time_t pam_misc_conv_die_time; /* cut-off time for input */ extern const char *pam_misc_conv_warn_line; /* warning notice */ extern const char *pam_misc_conv_die_line; /* cut-off remark */ extern int pam_misc_conv_died; /* 1 = cut-off time reached (0 not) */ extern int (*pam_binary_handler_fn)(void *appdata, pamc_bp_t *prompt_p); extern void (*pam_binary_handler_free)(void *appdata, pamc_bp_t *prompt_p); /* * Environment helper functions */ /* transcribe given environment (to pam) */ extern int pam_misc_paste_env(pam_handle_t *pamh , const char * const * user_env); /* delete environment as obtained from (pam_getenvlist) */ extern char **pam_misc_drop_env(char **env); /* provide something like the POSIX setenv function for the (Linux-)PAM * environment. */ extern int pam_misc_setenv(pam_handle_t *pamh, const char *name , const char *value, int readonly); #ifdef __cplusplus } #endif /* def __cplusplus */ #endif /* ndef __PAMMISC_H */ PKZ/R syscall.hnu[#include PKZv AFF uuid/uuid.hnu[/* * Public include file for the UUID library * * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. * * %Begin-Header% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * %End-Header% */ #ifndef _UUID_UUID_H #define _UUID_UUID_H #include #ifndef _WIN32 #include #endif #include typedef unsigned char uuid_t[16]; /* UUID Variant definitions */ #define UUID_VARIANT_NCS 0 #define UUID_VARIANT_DCE 1 #define UUID_VARIANT_MICROSOFT 2 #define UUID_VARIANT_OTHER 3 #define UUID_VARIANT_SHIFT 5 #define UUID_VARIANT_MASK 0x7 /* UUID Type definitions */ #define UUID_TYPE_DCE_TIME 1 #define UUID_TYPE_DCE_SECURITY 2 #define UUID_TYPE_DCE_MD5 3 #define UUID_TYPE_DCE_RANDOM 4 #define UUID_TYPE_DCE_SHA1 5 #define UUID_TYPE_SHIFT 4 #define UUID_TYPE_MASK 0xf #define UUID_STR_LEN 37 /* Allow UUID constants to be defined */ #ifdef __GNUC__ #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} #else #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} #endif #ifdef __cplusplus extern "C" { #endif /* clear.c */ extern void uuid_clear(uuid_t uu); /* compare.c */ extern int uuid_compare(const uuid_t uu1, const uuid_t uu2); /* copy.c */ extern void uuid_copy(uuid_t dst, const uuid_t src); /* gen_uuid.c */ extern void uuid_generate(uuid_t out); extern void uuid_generate_random(uuid_t out); extern void uuid_generate_time(uuid_t out); extern int uuid_generate_time_safe(uuid_t out); extern void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len); extern void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t len); /* isnull.c */ extern int uuid_is_null(const uuid_t uu); /* parse.c */ extern int uuid_parse(const char *in, uuid_t uu); /* unparse.c */ extern void uuid_unparse(const uuid_t uu, char *out); extern void uuid_unparse_lower(const uuid_t uu, char *out); extern void uuid_unparse_upper(const uuid_t uu, char *out); /* uuid_time.c */ extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); extern int uuid_type(const uuid_t uu); extern int uuid_variant(const uuid_t uu); /* predefined.c */ extern const uuid_t *uuid_get_template(const char *alias); #ifdef __cplusplus } #endif #endif /* _UUID_UUID_H */ PKZ_getopt.hnu[/* Declarations for getopt. Copyright (C) 1989-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib; gnulib also has a getopt.h but it is different. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_H #define _GETOPT_H 1 #include /* The type of the 'argv' argument to getopt_long and getopt_long_only is properly 'char **', since both functions may write to the array (in order to move all the options to the beginning). However, for compatibility with old versions of LSB, glibc has to use 'char *const *' instead. */ #ifndef __getopt_argv_const # define __getopt_argv_const const #endif #include #include #endif /* getopt.h */ PKZ(-/-/resolv.hnu[/* * Copyright (c) 1983, 1987, 1989 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Portions Copyright (c) 1996-1999 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. */ /* * @(#)resolv.h 8.1 (Berkeley) 6/2/93 * $BINDId: resolv.h,v 8.31 2000/03/30 20:16:50 vixie Exp $ */ #ifndef _RESOLV_H_ #define _RESOLV_H_ #include #include #include #include #include #include #include /* * Global defines and variables for resolver stub. */ #define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ #define RES_TIMEOUT 5 /* min. seconds between retries */ #define RES_MAXNDOTS 15 /* should reflect bit field size */ #define RES_MAXRETRANS 30 /* only for resolv.conf/RES_OPTIONS */ #define RES_MAXRETRY 5 /* only for resolv.conf/RES_OPTIONS */ #define RES_DFLRETRY 2 /* Default #/tries. */ #define RES_MAXTIME 65535 /* Infinity, in milliseconds. */ #define nsaddr nsaddr_list[0] /* for backward compatibility */ /* * Revision information. This is the release date in YYYYMMDD format. * It can change every day so the right thing to do with it is use it * in preprocessor commands such as "#if (__RES > 19931104)". Do not * compare for equality; rather, use it to determine whether your resolver * is new enough to contain a certain feature. */ #define __RES 19991006 /* * Resolver configuration file. * Normally not present, but may contain the address of the * inital name server(s) to query and the domain search list. */ #ifndef _PATH_RESCONF #define _PATH_RESCONF "/etc/resolv.conf" #endif struct res_sym { int number; /* Identifying number, like T_MX */ char * name; /* Its symbolic name, like "MX" */ char * humanname; /* Its fun name, like "mail exchanger" */ }; /* * Resolver options (keep these in synch with res_debug.c, please) */ #define RES_INIT 0x00000001 /* address initialized */ #define RES_DEBUG 0x00000002 /* print debug messages */ #define RES_AAONLY \ __glibc_macro_warning ("RES_AAONLY is deprecated") 0x00000004 #define RES_USEVC 0x00000008 /* use virtual circuit */ #define RES_PRIMARY \ __glibc_macro_warning ("RES_PRIMARY is deprecated") 0x00000010 #define RES_IGNTC 0x00000020 /* ignore trucation errors */ #define RES_RECURSE 0x00000040 /* recursion desired */ #define RES_DEFNAMES 0x00000080 /* use default domain name */ #define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */ #define RES_DNSRCH 0x00000200 /* search up local domain tree */ #define RES_INSECURE1 0x00000400 /* type 1 security disabled */ #define RES_INSECURE2 0x00000800 /* type 2 security disabled */ #define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */ #define RES_USE_INET6 \ __glibc_macro_warning ("RES_USE_INET6 is deprecated") 0x00002000 #define RES_ROTATE 0x00004000 /* rotate ns list after each query */ #define RES_NOCHECKNAME \ __glibc_macro_warning ("RES_NOCHECKNAME is deprecated") 0x00008000 #define RES_KEEPTSIG \ __glibc_macro_warning ("RES_KEEPTSIG is deprecated") 0x00010000 #define RES_BLAST \ __glibc_macro_warning ("RES_BLAST is deprecated") 0x00020000 #define RES_USE_EDNS0 0x00100000 /* Use EDNS0. */ #define RES_SNGLKUP 0x00200000 /* one outstanding request at a time */ #define RES_SNGLKUPREOP 0x00400000 /* -"-, but open new socket for each request */ #define RES_USE_DNSSEC 0x00800000 /* use DNSSEC using OK bit in OPT */ #define RES_NOTLDQUERY 0x01000000 /* Do not look up unqualified name as a TLD. */ #define RES_NORELOAD 0x02000000 /* No automatic configuration reload. */ #define RES_NOAAAA 0x08000000 /* Suppress AAAA queries. */ #define RES_DEFAULT (RES_RECURSE|RES_DEFNAMES|RES_DNSRCH) /* * Resolver "pfcode" values. Used by dig. */ #define RES_PRF_STATS 0x00000001 #define RES_PRF_UPDATE 0x00000002 #define RES_PRF_CLASS 0x00000004 #define RES_PRF_CMD 0x00000008 #define RES_PRF_QUES 0x00000010 #define RES_PRF_ANS 0x00000020 #define RES_PRF_AUTH 0x00000040 #define RES_PRF_ADD 0x00000080 #define RES_PRF_HEAD1 0x00000100 #define RES_PRF_HEAD2 0x00000200 #define RES_PRF_TTLID 0x00000400 #define RES_PRF_HEADX 0x00000800 #define RES_PRF_QUERY 0x00001000 #define RES_PRF_REPLY 0x00002000 #define RES_PRF_INIT 0x00004000 /* 0x00008000 */ /* Things involving an internal (static) resolver context. */ __BEGIN_DECLS extern struct __res_state *__res_state(void) __attribute__ ((__const__)); __END_DECLS #define _res (*__res_state()) #define fp_nquery __fp_nquery #define fp_query __fp_query #define hostalias __hostalias #define p_query __p_query #define res_close __res_close #define res_init __res_init #define res_isourserver __res_isourserver #define res_mkquery __res_mkquery #define res_query __res_query #define res_querydomain __res_querydomain #define res_search __res_search #define res_send __res_send __BEGIN_DECLS void fp_nquery (const unsigned char *, int, FILE *) __THROW; void fp_query (const unsigned char *, FILE *) __THROW; const char * hostalias (const char *) __THROW; void p_query (const unsigned char *) __THROW; void res_close (void) __THROW; int res_init (void) __THROW; int res_isourserver (const struct sockaddr_in *) __THROW; int res_mkquery (int, const char *, int, int, const unsigned char *, int, const unsigned char *, unsigned char *, int) __THROW; int res_query (const char *, int, int, unsigned char *, int) __THROW; int res_querydomain (const char *, const char *, int, int, unsigned char *, int) __THROW; int res_search (const char *, int, int, unsigned char *, int) __THROW; int res_send (const unsigned char *, int, unsigned char *, int) __THROW; __END_DECLS #define b64_ntop __b64_ntop #define b64_pton __b64_pton #define dn_comp __dn_comp #define dn_count_labels __dn_count_labels #define dn_expand __dn_expand #define dn_skipname __dn_skipname #define fp_resstat __fp_resstat #define loc_aton __loc_aton #define loc_ntoa __loc_ntoa #define p_cdname __p_cdname #define p_cdnname __p_cdnname #define p_class __p_class #define p_fqname __p_fqname #define p_fqnname __p_fqnname #define p_option __p_option #define p_time __p_time #define p_type __p_type #define p_rcode __p_rcode #define putlong __putlong #define putshort __putshort #define res_dnok __res_dnok #define res_hnok __res_hnok #define res_hostalias __res_hostalias #define res_mailok __res_mailok #define res_nameinquery __res_nameinquery #define res_nclose __res_nclose #define res_ninit __res_ninit #define res_nmkquery __res_nmkquery #define res_nquery __res_nquery #define res_nquerydomain __res_nquerydomain #define res_nsearch __res_nsearch #define res_nsend __res_nsend #define res_ownok __res_ownok #define res_queriesmatch __res_queriesmatch #define res_randomid __res_randomid #define sym_ntop __sym_ntop #define sym_ntos __sym_ntos #define sym_ston __sym_ston __BEGIN_DECLS int res_hnok (const char *) __THROW; int res_ownok (const char *) __THROW; int res_mailok (const char *) __THROW; int res_dnok (const char *) __THROW; int sym_ston (const struct res_sym *, const char *, int *) __THROW; const char * sym_ntos (const struct res_sym *, int, int *) __THROW; const char * sym_ntop (const struct res_sym *, int, int *) __THROW; int b64_ntop (const unsigned char *, size_t, char *, size_t) __THROW; int b64_pton (char const *, unsigned char *, size_t) __THROW; int loc_aton (const char *__ascii, unsigned char *__binary) __THROW; const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW; int dn_skipname (const unsigned char *, const unsigned char *) __THROW; void putlong (uint32_t, unsigned char *) __THROW; void putshort (uint16_t, unsigned char *) __THROW; const char * p_class (int) __THROW; const char * p_time (uint32_t) __THROW; const char * p_type (int) __THROW; const char * p_rcode (int) __THROW; const unsigned char * p_cdnname (const unsigned char *, const unsigned char *, int, FILE *) __THROW; const unsigned char * p_cdname (const unsigned char *, const unsigned char *, FILE *) __THROW; const unsigned char * p_fqnname (const unsigned char *__cp, const unsigned char *__msg, int, char *, int) __THROW; const unsigned char * p_fqname (const unsigned char *, const unsigned char *, FILE *) __THROW; const char * p_option (unsigned long __option) __THROW; int dn_count_labels (const char *) __THROW; int dn_comp (const char *, unsigned char *, int, unsigned char **, unsigned char **) __THROW; int dn_expand (const unsigned char *, const unsigned char *, const unsigned char *, char *, int) __THROW; unsigned int res_randomid (void) __THROW; int res_nameinquery (const char *, int, int, const unsigned char *, const unsigned char *) __THROW; int res_queriesmatch (const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *) __THROW; /* Things involving a resolver context. */ int res_ninit (res_state) __THROW; void fp_resstat (const res_state, FILE *) __THROW; const char * res_hostalias (const res_state, const char *, char *, size_t) __THROW; int res_nquery (res_state, const char *, int, int, unsigned char *, int) __THROW; int res_nsearch (res_state, const char *, int, int, unsigned char *, int) __THROW; int res_nquerydomain (res_state, const char *, const char *, int, int, unsigned char *, int) __THROW; int res_nmkquery (res_state, int, const char *, int, int, const unsigned char *, int, const unsigned char *, unsigned char *, int) __THROW; int res_nsend (res_state, const unsigned char *, int, unsigned char *, int) __THROW; void res_nclose (res_state) __THROW; __END_DECLS #endif /* !_RESOLV_H_ */ PKZaapython2.7/moduleobject.hnu[ /* Module object interface */ #ifndef Py_MODULEOBJECT_H #define Py_MODULEOBJECT_H #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(PyTypeObject) PyModule_Type; #define PyModule_Check(op) PyObject_TypeCheck(op, &PyModule_Type) #define PyModule_CheckExact(op) (Py_TYPE(op) == &PyModule_Type) PyAPI_FUNC(PyObject *) PyModule_New(const char *); PyAPI_FUNC(PyObject *) PyModule_GetDict(PyObject *); PyAPI_FUNC(char *) PyModule_GetName(PyObject *); PyAPI_FUNC(char *) PyModule_GetFilename(PyObject *); PyAPI_FUNC(void) _PyModule_Clear(PyObject *); #ifdef __cplusplus } #endif #endif /* !Py_MODULEOBJECT_H */ PKZ77python2.7/code.hnu[/* Definitions for bytecode */ #ifndef Py_CODE_H #define Py_CODE_H #ifdef __cplusplus extern "C" { #endif /* Bytecode object */ typedef struct { PyObject_HEAD int co_argcount; /* #arguments, except *args */ int co_nlocals; /* #local variables */ int co_stacksize; /* #entries needed for evaluation stack */ int co_flags; /* CO_..., see below */ PyObject *co_code; /* instruction opcodes */ PyObject *co_consts; /* list (constants used) */ PyObject *co_names; /* list of strings (names used) */ PyObject *co_varnames; /* tuple of strings (local variable names) */ PyObject *co_freevars; /* tuple of strings (free variable names) */ PyObject *co_cellvars; /* tuple of strings (cell variable names) */ /* The rest doesn't count for hash/cmp */ PyObject *co_filename; /* string (where it was loaded from) */ PyObject *co_name; /* string (name, for reference) */ int co_firstlineno; /* first source line number */ PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See Objects/lnotab_notes.txt for details. */ void *co_zombieframe; /* for optimization only (see frameobject.c) */ PyObject *co_weakreflist; /* to support weakrefs to code objects */ } PyCodeObject; /* Masks for co_flags above */ #define CO_OPTIMIZED 0x0001 #define CO_NEWLOCALS 0x0002 #define CO_VARARGS 0x0004 #define CO_VARKEYWORDS 0x0008 #define CO_NESTED 0x0010 #define CO_GENERATOR 0x0020 /* The CO_NOFREE flag is set if there are no free or cell variables. This information is redundant, but it allows a single flag test to determine whether there is any extra work to be done when the call frame it setup. */ #define CO_NOFREE 0x0040 #if 0 /* This is no longer used. Stopped defining in 2.5, do not re-use. */ #define CO_GENERATOR_ALLOWED 0x1000 #endif #define CO_FUTURE_DIVISION 0x2000 #define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */ #define CO_FUTURE_WITH_STATEMENT 0x8000 #define CO_FUTURE_PRINT_FUNCTION 0x10000 #define CO_FUTURE_UNICODE_LITERALS 0x20000 /* This should be defined if a future statement modifies the syntax. For example, when a keyword is added. */ #if 1 #define PY_PARSER_REQUIRES_FUTURE_KEYWORD #endif #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ PyAPI_DATA(PyTypeObject) PyCode_Type; #define PyCode_Check(op) (Py_TYPE(op) == &PyCode_Type) #define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars)) /* Public interface */ PyAPI_FUNC(PyCodeObject *) PyCode_New( int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); /* same as struct above */ /* Creates a new empty code object with the specified source location. */ PyAPI_FUNC(PyCodeObject *) PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno); /* Return the line number associated with the specified bytecode index in this code object. If you just need the line number of a frame, use PyFrame_GetLineNumber() instead. */ PyAPI_FUNC(int) PyCode_Addr2Line(PyCodeObject *, int); /* for internal use only */ #define _PyCode_GETCODEPTR(co, pp) \ ((*Py_TYPE((co)->co_code)->tp_as_buffer->bf_getreadbuffer) \ ((co)->co_code, 0, (void **)(pp))) typedef struct _addr_pair { int ap_lower; int ap_upper; } PyAddrPair; /* Update *bounds to describe the first and one-past-the-last instructions in the same line as lasti. Return the number of that line. */ PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds); /* Create a comparable key used to compare constants taking in account the * object type. It is used to make sure types are not coerced (e.g., float and * complex) _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms * * Return (type(obj), obj, ...): a tuple with variable size (at least 2 items) * depending on the type and the value. The type is the first item to not * compare bytes and unicode which can raise a BytesWarning exception. */ PyAPI_FUNC(PyObject*) _PyCode_ConstantKey(PyObject *obj); PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, PyObject *lineno_obj); #ifdef __cplusplus } #endif #endif /* !Py_CODE_H */ PKZ(python2.7/codecs.hnu[#ifndef Py_CODECREGISTRY_H #define Py_CODECREGISTRY_H #ifdef __cplusplus extern "C" { #endif /* ------------------------------------------------------------------------ Python Codec Registry and support functions Written by Marc-Andre Lemburg (mal@lemburg.com). Copyright (c) Corporation for National Research Initiatives. ------------------------------------------------------------------------ */ /* Register a new codec search function. As side effect, this tries to load the encodings package, if not yet done, to make sure that it is always first in the list of search functions. The search_function's refcount is incremented by this function. */ PyAPI_FUNC(int) PyCodec_Register( PyObject *search_function ); /* Codec register lookup API. Looks up the given encoding and returns a CodecInfo object with function attributes which implement the different aspects of processing the encoding. The encoding string is looked up converted to all lower-case characters. This makes encodings looked up through this mechanism effectively case-insensitive. If no codec is found, a KeyError is set and NULL returned. As side effect, this tries to load the encodings package, if not yet done. This is part of the lazy load strategy for the encodings package. */ PyAPI_FUNC(PyObject *) _PyCodec_Lookup( const char *encoding ); /* Generic codec based encoding API. object is passed through the encoder function found for the given encoding using the error handling method defined by errors. errors may be NULL to use the default method defined for the codec. Raises a LookupError in case no encoder can be found. */ PyAPI_FUNC(PyObject *) PyCodec_Encode( PyObject *object, const char *encoding, const char *errors ); /* Generic codec based decoding API. object is passed through the decoder function found for the given encoding using the error handling method defined by errors. errors may be NULL to use the default method defined for the codec. Raises a LookupError in case no encoder can be found. */ PyAPI_FUNC(PyObject *) PyCodec_Decode( PyObject *object, const char *encoding, const char *errors ); /* Text codec specific encoding and decoding API. Checks the encoding against a list of codecs which do not implement a unicode<->bytes encoding before attempting the operation. Please note that these APIs are internal and should not be used in Python C extensions. XXX (ncoghlan): should we make these, or something like them, public in Python 3.5+? */ PyAPI_FUNC(PyObject *) _PyCodec_LookupTextEncoding( const char *encoding, const char *alternate_command ); PyAPI_FUNC(PyObject *) _PyCodec_EncodeText( PyObject *object, const char *encoding, const char *errors ); PyAPI_FUNC(PyObject *) _PyCodec_DecodeText( PyObject *object, const char *encoding, const char *errors ); /* These two aren't actually text encoding specific, but _io.TextIOWrapper * is the only current API consumer. */ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalDecoder( PyObject *codec_info, const char *errors ); PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder( PyObject *codec_info, const char *errors ); /* --- Codec Lookup APIs -------------------------------------------------- All APIs return a codec object with incremented refcount and are based on _PyCodec_Lookup(). The same comments w/r to the encoding name also apply to these APIs. */ /* Get an encoder function for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_Encoder( const char *encoding ); /* Get a decoder function for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_Decoder( const char *encoding ); /* Get an IncrementalEncoder object for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_IncrementalEncoder( const char *encoding, const char *errors ); /* Get an IncrementalDecoder object function for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_IncrementalDecoder( const char *encoding, const char *errors ); /* Get a StreamReader factory function for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_StreamReader( const char *encoding, PyObject *stream, const char *errors ); /* Get a StreamWriter factory function for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_StreamWriter( const char *encoding, PyObject *stream, const char *errors ); /* Unicode encoding error handling callback registry API */ /* Register the error handling callback function error under the given name. This function will be called by the codec when it encounters unencodable characters/undecodable bytes and doesn't know the callback name, when name is specified as the error parameter in the call to the encode/decode function. Return 0 on success, -1 on error */ PyAPI_FUNC(int) PyCodec_RegisterError(const char *name, PyObject *error); /* Lookup the error handling callback function registered under the given name. As a special case NULL can be passed, in which case the error handling callback for "strict" will be returned. */ PyAPI_FUNC(PyObject *) PyCodec_LookupError(const char *name); /* raise exc as an exception */ PyAPI_FUNC(PyObject *) PyCodec_StrictErrors(PyObject *exc); /* ignore the unicode error, skipping the faulty input */ PyAPI_FUNC(PyObject *) PyCodec_IgnoreErrors(PyObject *exc); /* replace the unicode encode error with ? or U+FFFD */ PyAPI_FUNC(PyObject *) PyCodec_ReplaceErrors(PyObject *exc); /* replace the unicode encode error with XML character references */ PyAPI_FUNC(PyObject *) PyCodec_XMLCharRefReplaceErrors(PyObject *exc); /* replace the unicode encode error with backslash escapes (\x, \u and \U) */ PyAPI_FUNC(PyObject *) PyCodec_BackslashReplaceErrors(PyObject *exc); #ifdef __cplusplus } #endif #endif /* !Py_CODECREGISTRY_H */ PKZl python2.7/frameobject.hnu[ /* Frame object interface */ #ifndef Py_FRAMEOBJECT_H #define Py_FRAMEOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { int b_type; /* what kind of block this is */ int b_handler; /* where to jump to find handler */ int b_level; /* value stack level to pop to */ } PyTryBlock; typedef struct _frame { PyObject_VAR_HEAD struct _frame *f_back; /* previous frame, or NULL */ PyCodeObject *f_code; /* code segment */ PyObject *f_builtins; /* builtin symbol table (PyDictObject) */ PyObject *f_globals; /* global symbol table (PyDictObject) */ PyObject *f_locals; /* local symbol table (any mapping) */ PyObject **f_valuestack; /* points after the last local */ /* Next free slot in f_valuestack. Frame creation sets to f_valuestack. Frame evaluation usually NULLs it, but a frame that yields sets it to the current stack top. */ PyObject **f_stacktop; PyObject *f_trace; /* Trace function */ /* If an exception is raised in this frame, the next three are used to * record the exception info (if any) originally in the thread state. See * comments before set_exc_info() -- it's not obvious. * Invariant: if _type is NULL, then so are _value and _traceback. * Desired invariant: all three are NULL, or all three are non-NULL. That * one isn't currently true, but "should be". */ PyObject *f_exc_type, *f_exc_value, *f_exc_traceback; PyThreadState *f_tstate; int f_lasti; /* Last instruction if called */ /* Call PyFrame_GetLineNumber() instead of reading this field directly. As of 2.3 f_lineno is only valid when tracing is active (i.e. when f_trace is set). At other times we use PyCode_Addr2Line to calculate the line from the current bytecode index. */ int f_lineno; /* Current line number */ int f_iblock; /* index in f_blockstack */ PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */ PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */ } PyFrameObject; /* Standard object interface */ PyAPI_DATA(PyTypeObject) PyFrame_Type; #define PyFrame_Check(op) (Py_TYPE(op) == &PyFrame_Type) #define PyFrame_IsRestricted(f) \ ((f)->f_tstate && (f)->f_builtins != (f)->f_tstate->interp->builtins) PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *, PyObject *, PyObject *); /* The rest of the interface is specific for frame objects */ /* Block management functions */ PyAPI_FUNC(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int); PyAPI_FUNC(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *); /* Extend the value stack */ PyAPI_FUNC(PyObject **) PyFrame_ExtendStack(PyFrameObject *, int, int); /* Conversions between "fast locals" and locals in dictionary */ PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int); PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *); PyAPI_FUNC(int) PyFrame_ClearFreeList(void); PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out); /* Return the line of code the frame is currently executing. */ PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *); #ifdef __cplusplus } #endif #endif /* !Py_FRAMEOBJECT_H */ PKZ Xaapython2.7/sysmodule.hnu[ /* System module interface */ #ifndef Py_SYSMODULE_H #define Py_SYSMODULE_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(PyObject *) PySys_GetObject(char *); PyAPI_FUNC(int) PySys_SetObject(char *, PyObject *); PyAPI_FUNC(FILE *) PySys_GetFile(char *, FILE *); PyAPI_FUNC(void) PySys_SetArgv(int, char **); PyAPI_FUNC(void) PySys_SetArgvEx(int, char **, int); PyAPI_FUNC(void) PySys_SetPath(char *); PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) Py_GCC_ATTRIBUTE((format(printf, 1, 2))); PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) Py_GCC_ATTRIBUTE((format(printf, 1, 2))); PyAPI_FUNC(void) PySys_ResetWarnOptions(void); PyAPI_FUNC(void) PySys_AddWarnOption(char *); PyAPI_FUNC(int) PySys_HasWarnOptions(void); PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *); #ifdef __cplusplus } #endif #endif /* !Py_SYSMODULE_H */ PKZG NEEpython2.7/pyexpat.hnu[/* Stuff to export relevant 'expat' entry points from pyexpat to other * parser modules, such as cElementTree. */ /* note: you must import expat.h before importing this module! */ #define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1" #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI" struct PyExpat_CAPI { char* magic; /* set to PyExpat_CAPI_MAGIC */ int size; /* set to sizeof(struct PyExpat_CAPI) */ int MAJOR_VERSION; int MINOR_VERSION; int MICRO_VERSION; /* pointers to selected expat functions. add new functions at the end, if needed */ const XML_LChar * (*ErrorString)(enum XML_Error code); enum XML_Error (*GetErrorCode)(XML_Parser parser); XML_Size (*GetErrorColumnNumber)(XML_Parser parser); XML_Size (*GetErrorLineNumber)(XML_Parser parser); enum XML_Status (*Parse)( XML_Parser parser, const char *s, int len, int isFinal); XML_Parser (*ParserCreate_MM)( const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite, const XML_Char *namespaceSeparator); void (*ParserFree)(XML_Parser parser); void (*SetCharacterDataHandler)( XML_Parser parser, XML_CharacterDataHandler handler); void (*SetCommentHandler)( XML_Parser parser, XML_CommentHandler handler); void (*SetDefaultHandlerExpand)( XML_Parser parser, XML_DefaultHandler handler); void (*SetElementHandler)( XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); void (*SetNamespaceDeclHandler)( XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end); void (*SetProcessingInstructionHandler)( XML_Parser parser, XML_ProcessingInstructionHandler handler); void (*SetUnknownEncodingHandler)( XML_Parser parser, XML_UnknownEncodingHandler handler, void *encodingHandlerData); void (*SetUserData)(XML_Parser parser, void *userData); /* might be none for expat < 2.1.0 */ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt); /* always add new stuff to the end! */ }; PKZ{\Pܪpython2.7/patchlevel.hnu[ /* Newfangled version identification scheme. This scheme was added in Python 1.5.2b2; before that time, only PATCHLEVEL was available. To test for presence of the scheme, test for defined(PY_MAJOR_VERSION). When the major or minor version changes, the VERSION variable in configure.ac must also be changed. There is also (independent) API version information in modsupport.h. */ /* Values for PY_RELEASE_LEVEL */ #define PY_RELEASE_LEVEL_ALPHA 0xA #define PY_RELEASE_LEVEL_BETA 0xB #define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ /* Higher for patch releases */ /* Version parsed out into numeric values */ /*--start constants--*/ #define PY_MAJOR_VERSION 2 #define PY_MINOR_VERSION 7 #define PY_MICRO_VERSION 18 #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL #define PY_RELEASE_SERIAL 0 /* Version as a string */ #define PY_VERSION "2.7.18" /*--end constants--*/ /* Subversion Revision number of this file (not of the repository). Empty since Mercurial migration. */ #define PY_PATCHLEVEL_REVISION "" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ (PY_MINOR_VERSION << 16) | \ (PY_MICRO_VERSION << 8) | \ (PY_RELEASE_LEVEL << 4) | \ (PY_RELEASE_SERIAL << 0)) PKZRRpython2.7/dtoa.hnu[#ifndef PY_NO_SHORT_FLOAT_REPR #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr); PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve); PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); #ifdef __cplusplus } #endif #endif PKZfipython2.7/floatobject.hnu[ /* Float object interface */ /* PyFloatObject represents a (double precision) floating point number. */ #ifndef Py_FLOATOBJECT_H #define Py_FLOATOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { PyObject_HEAD double ob_fval; } PyFloatObject; PyAPI_DATA(PyTypeObject) PyFloat_Type; #define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type) #define PyFloat_CheckExact(op) (Py_TYPE(op) == &PyFloat_Type) /* The str() precision PyFloat_STR_PRECISION is chosen so that in most cases, the rounding noise created by various operations is suppressed, while giving plenty of precision for practical use. */ #define PyFloat_STR_PRECISION 12 #ifdef Py_NAN #define Py_RETURN_NAN return PyFloat_FromDouble(Py_NAN) #endif #define Py_RETURN_INF(sign) do \ if (copysign(1., sign) == 1.) { \ return PyFloat_FromDouble(Py_HUGE_VAL); \ } else { \ return PyFloat_FromDouble(-Py_HUGE_VAL); \ } while(0) PyAPI_FUNC(double) PyFloat_GetMax(void); PyAPI_FUNC(double) PyFloat_GetMin(void); PyAPI_FUNC(PyObject *) PyFloat_GetInfo(void); /* Return Python float from string PyObject. Second argument ignored on input, and, if non-NULL, NULL is stored into *junk (this tried to serve a purpose once but can't be made to work as intended). */ PyAPI_FUNC(PyObject *) PyFloat_FromString(PyObject*, char** junk); /* Return Python float from C double. */ PyAPI_FUNC(PyObject *) PyFloat_FromDouble(double); /* Extract C double from Python float. The macro version trades safety for speed. */ PyAPI_FUNC(double) PyFloat_AsDouble(PyObject *); #define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval) /* Write repr(v) into the char buffer argument, followed by null byte. The buffer must be "big enough"; >= 100 is very safe. PyFloat_AsReprString(buf, x) strives to print enough digits so that PyFloat_FromString(buf) then reproduces x exactly. */ PyAPI_FUNC(void) PyFloat_AsReprString(char*, PyFloatObject *v); /* Write str(v) into the char buffer argument, followed by null byte. The buffer must be "big enough"; >= 100 is very safe. Note that it's unusual to be able to get back the float you started with from PyFloat_AsString's result -- use PyFloat_AsReprString() if you want to preserve precision across conversions. */ PyAPI_FUNC(void) PyFloat_AsString(char*, PyFloatObject *v); /* _PyFloat_{Pack,Unpack}{4,8} * * The struct and pickle (at least) modules need an efficient platform- * independent way to store floating-point values as byte strings. * The Pack routines produce a string from a C double, and the Unpack * routines produce a C double from such a string. The suffix (4 or 8) * specifies the number of bytes in the string. * * On platforms that appear to use (see _PyFloat_Init()) IEEE-754 formats * these functions work by copying bits. On other platforms, the formats the * 4- byte format is identical to the IEEE-754 single precision format, and * the 8-byte format to the IEEE-754 double precision format, although the * packing of INFs and NaNs (if such things exist on the platform) isn't * handled correctly, and attempting to unpack a string containing an IEEE * INF or NaN will raise an exception. * * On non-IEEE platforms with more precision, or larger dynamic range, than * 754 supports, not all values can be packed; on non-IEEE platforms with less * precision, or smaller dynamic range, not all values can be unpacked. What * happens in such cases is partly accidental (alas). */ /* The pack routines write 4 or 8 bytes, starting at p. le is a bool * argument, true if you want the string in little-endian format (exponent * last, at p+3 or p+7), false if you want big-endian format (exponent * first, at p). * Return value: 0 if all is OK, -1 if error (and an exception is * set, most likely OverflowError). * There are two problems on non-IEEE platforms: * 1): What this does is undefined if x is a NaN or infinity. * 2): -0.0 and +0.0 produce the same string. */ PyAPI_FUNC(int) _PyFloat_Pack4(double x, unsigned char *p, int le); PyAPI_FUNC(int) _PyFloat_Pack8(double x, unsigned char *p, int le); /* Used to get the important decimal digits of a double */ PyAPI_FUNC(int) _PyFloat_Digits(char *buf, double v, int *signum); PyAPI_FUNC(void) _PyFloat_DigitsInit(void); /* The unpack routines read 4 or 8 bytes, starting at p. le is a bool * argument, true if the string is in little-endian format (exponent * last, at p+3 or p+7), false if big-endian (exponent first, at p). * Return value: The unpacked double. On error, this is -1.0 and * PyErr_Occurred() is true (and an exception is set, most likely * OverflowError). Note that on a non-IEEE platform this will refuse * to unpack a string that represents a NaN or infinity. */ PyAPI_FUNC(double) _PyFloat_Unpack4(const unsigned char *p, int le); PyAPI_FUNC(double) _PyFloat_Unpack8(const unsigned char *p, int le); /* free list api */ PyAPI_FUNC(int) PyFloat_ClearFreeList(void); /* Format the object based on the format_spec, as defined in PEP 3101 (Advanced String Formatting). */ PyAPI_FUNC(PyObject *) _PyFloat_FormatAdvanced(PyObject *obj, char *format_spec, Py_ssize_t format_spec_len); /* Round a C double x to the closest multiple of 10**-ndigits. Returns a Python float on success, or NULL (with an appropriate exception set) on failure. Used in builtin_round in bltinmodule.c. */ PyAPI_FUNC(PyObject *) _Py_double_round(double x, int ndigits); PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out); #ifdef __cplusplus } #endif #endif /* !Py_FLOATOBJECT_H */ PKZh"NNpython2.7/fileobject.hnu[ /* File object interface */ #ifndef Py_FILEOBJECT_H #define Py_FILEOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { PyObject_HEAD FILE *f_fp; PyObject *f_name; PyObject *f_mode; int (*f_close)(FILE *); int f_softspace; /* Flag used by 'print' command */ int f_binary; /* Flag which indicates whether the file is open in binary (1) or text (0) mode */ char* f_buf; /* Allocated readahead buffer */ char* f_bufend; /* Points after last occupied position */ char* f_bufptr; /* Current buffer position */ char *f_setbuf; /* Buffer for setbuf(3) and setvbuf(3) */ int f_univ_newline; /* Handle any newline convention */ int f_newlinetypes; /* Types of newlines seen */ int f_skipnextlf; /* Skip next \n */ PyObject *f_encoding; PyObject *f_errors; PyObject *weakreflist; /* List of weak references */ int unlocked_count; /* Num. currently running sections of code using f_fp with the GIL released. */ int readable; int writable; } PyFileObject; PyAPI_DATA(PyTypeObject) PyFile_Type; #define PyFile_Check(op) PyObject_TypeCheck(op, &PyFile_Type) #define PyFile_CheckExact(op) (Py_TYPE(op) == &PyFile_Type) PyAPI_FUNC(PyObject *) PyFile_FromString(char *, char *); PyAPI_FUNC(void) PyFile_SetBufSize(PyObject *, int); PyAPI_FUNC(int) PyFile_SetEncoding(PyObject *, const char *); PyAPI_FUNC(int) PyFile_SetEncodingAndErrors(PyObject *, const char *, char *errors); PyAPI_FUNC(PyObject *) PyFile_FromFile(FILE *, char *, char *, int (*)(FILE *)); PyAPI_FUNC(FILE *) PyFile_AsFile(PyObject *); PyAPI_FUNC(void) PyFile_IncUseCount(PyFileObject *); PyAPI_FUNC(void) PyFile_DecUseCount(PyFileObject *); PyAPI_FUNC(PyObject *) PyFile_Name(PyObject *); PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *, int); PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int); PyAPI_FUNC(int) PyFile_SoftSpace(PyObject *, int); PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *); PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *); /* The default encoding used by the platform file system APIs If non-NULL, this is different than the default encoding for strings */ PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding; /* Routines to replace fread() and fgets() which accept any of \r, \n or \r\n as line terminators. */ #define PY_STDIOTEXTMODE "b" char *Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); size_t Py_UniversalNewlineFread(char *, size_t, FILE *, PyObject *); /* A routine to do sanity checking on the file mode string. returns non-zero on if an exception occurred */ int _PyFile_SanitizeMode(char *mode); #if defined _MSC_VER && _MSC_VER >= 1400 /* A routine to check if a file descriptor is valid on Windows. Returns 0 * and sets errno to EBADF if it isn't. This is to avoid Assertions * from various functions in the Windows CRT beginning with * Visual Studio 2005 */ int _PyVerify_fd(int fd); #elif defined _MSC_VER && _MSC_VER >= 1200 /* fdopen doesn't set errno EBADF and crashes for large fd on debug build */ #define _PyVerify_fd(fd) (_get_osfhandle(fd) >= 0) #else #define _PyVerify_fd(A) (1) /* dummy */ #endif /* A routine to check if a file descriptor can be select()-ed. */ #ifdef HAVE_SELECT #define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE)) #else #define _PyIsSelectable_fd(FD) (1) #endif /* HAVE_SELECT */ #ifdef __cplusplus } #endif #endif /* !Py_FILEOBJECT_H */ PKZu|python2.7/boolobject.hnu[/* Boolean object interface */ #ifndef Py_BOOLOBJECT_H #define Py_BOOLOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef PyIntObject PyBoolObject; PyAPI_DATA(PyTypeObject) PyBool_Type; #define PyBool_Check(x) (Py_TYPE(x) == &PyBool_Type) /* Py_False and Py_True are the only two bools in existence. Don't forget to apply Py_INCREF() when returning either!!! */ /* Don't use these directly */ PyAPI_DATA(PyIntObject) _Py_ZeroStruct, _Py_TrueStruct; /* Use these macros */ #define Py_False ((PyObject *) &_Py_ZeroStruct) #define Py_True ((PyObject *) &_Py_TrueStruct) /* Macros for returning Py_True or Py_False, respectively */ #define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True #define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False /* Function to return a bool from a C long */ PyAPI_FUNC(PyObject *) PyBool_FromLong(long); #ifdef __cplusplus } #endif #endif /* !Py_BOOLOBJECT_H */ PKZ9##python2.7/osdefs.hnu[#ifndef Py_OSDEFS_H #define Py_OSDEFS_H #ifdef __cplusplus extern "C" { #endif /* Operating system dependencies */ /* Mod by chrish: QNX has WATCOM, but isn't DOS */ #if !defined(__QNX__) #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2) #if defined(PYOS_OS2) && defined(PYCC_GCC) #define MAXPATHLEN 260 #define SEP '/' #define ALTSEP '\\' #else #define SEP '\\' #define ALTSEP '/' #define MAXPATHLEN 256 #endif #define DELIM ';' #endif #endif #ifdef RISCOS #define SEP '.' #define MAXPATHLEN 256 #define DELIM ',' #endif /* Filename separator */ #ifndef SEP #define SEP '/' #endif /* Max pathname length */ #ifdef __hpux #include #include #ifndef PATH_MAX #define PATH_MAX MAXPATHLEN #endif #endif #ifndef MAXPATHLEN #if defined(PATH_MAX) && PATH_MAX > 1024 #define MAXPATHLEN PATH_MAX #else #define MAXPATHLEN 1024 #endif #endif /* Search path entry delimiter */ #ifndef DELIM #define DELIM ':' #endif #ifdef __cplusplus } #endif #endif /* !Py_OSDEFS_H */ PKZpython2.7/modsupport.hnu[ #ifndef Py_MODSUPPORT_H #define Py_MODSUPPORT_H #ifdef __cplusplus extern "C" { #endif /* Module support interface */ #include /* If PY_SSIZE_T_CLEAN is defined, each functions treats #-specifier to mean Py_ssize_t */ #ifdef PY_SSIZE_T_CLEAN #define PyArg_Parse _PyArg_Parse_SizeT #define PyArg_ParseTuple _PyArg_ParseTuple_SizeT #define PyArg_ParseTupleAndKeywords _PyArg_ParseTupleAndKeywords_SizeT #define PyArg_VaParse _PyArg_VaParse_SizeT #define PyArg_VaParseTupleAndKeywords _PyArg_VaParseTupleAndKeywords_SizeT #define Py_BuildValue _Py_BuildValue_SizeT #define Py_VaBuildValue _Py_VaBuildValue_SizeT #else PyAPI_FUNC(PyObject *) _Py_VaBuildValue_SizeT(const char *, va_list); #endif PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...); PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...) Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3); PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, const char *, char **, ...); PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...); PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...); PyAPI_FUNC(PyObject *) _Py_BuildValue_SizeT(const char *, ...); PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname, PyObject *kw); PyAPI_FUNC(int) PyArg_VaParse(PyObject *, const char *, va_list); PyAPI_FUNC(int) PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *, const char *, char **, va_list); PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list); PyAPI_FUNC(int) PyModule_AddObject(PyObject *, const char *, PyObject *); PyAPI_FUNC(int) PyModule_AddIntConstant(PyObject *, const char *, long); PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char *); #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) #define PyModule_AddStringMacro(m, c) PyModule_AddStringConstant(m, #c, c) #define PYTHON_API_VERSION 1013 #define PYTHON_API_STRING "1013" /* The API version is maintained (independently from the Python version) so we can detect mismatches between the interpreter and dynamically loaded modules. These are diagnosed by an error message but the module is still loaded (because the mismatch can only be tested after loading the module). The error message is intended to explain the core dump a few seconds later. The symbol PYTHON_API_STRING defines the same value as a string literal. *** PLEASE MAKE SURE THE DEFINITIONS MATCH. *** Please add a line or two to the top of this log for each API version change: 22-Feb-2006 MvL 1013 PEP 353 - long indices for sequence lengths 19-Aug-2002 GvR 1012 Changes to string object struct for interning changes, saving 3 bytes. 17-Jul-2001 GvR 1011 Descr-branch, just to be on the safe side 25-Jan-2001 FLD 1010 Parameters added to PyCode_New() and PyFrame_New(); Python 2.1a2 14-Mar-2000 GvR 1009 Unicode API added 3-Jan-1999 GvR 1007 Decided to change back! (Don't reuse 1008!) 3-Dec-1998 GvR 1008 Python 1.5.2b1 18-Jan-1997 GvR 1007 string interning and other speedups 11-Oct-1996 GvR renamed Py_Ellipses to Py_Ellipsis :-( 30-Jul-1996 GvR Slice and ellipses syntax added 23-Jul-1996 GvR For 1.4 -- better safe than sorry this time :-) 7-Nov-1995 GvR Keyword arguments (should've been done at 1.3 :-( ) 10-Jan-1995 GvR Renamed globals to new naming scheme 9-Jan-1995 GvR Initial version (incompatible with older API) */ #ifdef MS_WINDOWS /* Special defines for Windows versions used to live here. Things have changed, and the "Version" is now in a global string variable. Reason for this is that this for easier branding of a "custom DLL" without actually needing a recompile. */ #endif /* MS_WINDOWS */ #if SIZEOF_SIZE_T != SIZEOF_INT /* On a 64-bit system, rename the Py_InitModule4 so that 2.4 modules cannot get loaded into a 2.5 interpreter */ #define Py_InitModule4 Py_InitModule4_64 #endif #ifdef Py_TRACE_REFS /* When we are tracing reference counts, rename Py_InitModule4 so modules compiled with incompatible settings will generate a link-time error. */ #if SIZEOF_SIZE_T != SIZEOF_INT #undef Py_InitModule4 #define Py_InitModule4 Py_InitModule4TraceRefs_64 #else #define Py_InitModule4 Py_InitModule4TraceRefs #endif #endif PyAPI_FUNC(PyObject *) Py_InitModule4(const char *name, PyMethodDef *methods, const char *doc, PyObject *self, int apiver); #define Py_InitModule(name, methods) \ Py_InitModule4(name, methods, (char *)NULL, (PyObject *)NULL, \ PYTHON_API_VERSION) #define Py_InitModule3(name, methods, doc) \ Py_InitModule4(name, methods, doc, (PyObject *)NULL, \ PYTHON_API_VERSION) PyAPI_DATA(char *) _Py_PackageContext; #ifdef __cplusplus } #endif #endif /* !Py_MODSUPPORT_H */ PKZ23{{python2.7/warnings.hnu[#ifndef Py_WARNINGS_H #define Py_WARNINGS_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(void) _PyWarnings_Init(void); PyAPI_FUNC(int) PyErr_WarnEx(PyObject *, const char *, Py_ssize_t); PyAPI_FUNC(int) PyErr_WarnExplicit(PyObject *, const char *, const char *, int, const char *, PyObject *); #define PyErr_WarnPy3k(msg, stacklevel) \ (Py_Py3kWarningFlag ? PyErr_WarnEx(PyExc_DeprecationWarning, msg, stacklevel) : 0) /* DEPRECATED: Use PyErr_WarnEx() instead. */ #define PyErr_Warn(category, msg) PyErr_WarnEx(category, msg, 1) #ifdef __cplusplus } #endif #endif /* !Py_WARNINGS_H */ PKZ){..python2.7/pystrtod.hnu[#ifndef Py_STRTOD_H #define Py_STRTOD_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(double) PyOS_ascii_strtod(const char *str, char **ptr); PyAPI_FUNC(double) PyOS_ascii_atof(const char *str); /* Deprecated in 2.7 and 3.1. Will disappear in 2.8 (if it exists) and 3.2 */ PyAPI_FUNC(char *) PyOS_ascii_formatd(char *buffer, size_t buf_len, const char *format, double d); PyAPI_FUNC(double) PyOS_string_to_double(const char *str, char **endptr, PyObject *overflow_exception); /* The caller is responsible for calling PyMem_Free to free the buffer that's is returned. */ PyAPI_FUNC(char *) PyOS_double_to_string(double val, char format_code, int precision, int flags, int *type); PyAPI_FUNC(double) _Py_parse_inf_or_nan(const char *p, char **endptr); /* PyOS_double_to_string's "flags" parameter can be set to 0 or more of: */ #define Py_DTSF_SIGN 0x01 /* always add the sign */ #define Py_DTSF_ADD_DOT_0 0x02 /* if the result is an integer add ".0" */ #define Py_DTSF_ALT 0x04 /* "alternate" formatting. it's format_code specific */ /* PyOS_double_to_string's "type", if non-NULL, will be set to one of: */ #define Py_DTST_FINITE 0 #define Py_DTST_INFINITE 1 #define Py_DTST_NAN 2 #ifdef __cplusplus } #endif #endif /* !Py_STRTOD_H */ PKZ ݹpython2.7/traceback.hnu[ #ifndef Py_TRACEBACK_H #define Py_TRACEBACK_H #ifdef __cplusplus extern "C" { #endif struct _frame; /* Traceback interface */ typedef struct _traceback { PyObject_HEAD struct _traceback *tb_next; struct _frame *tb_frame; int tb_lasti; int tb_lineno; } PyTracebackObject; PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *); PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, const char *, int, int); /* Reveal traceback type so we can typecheck traceback objects */ PyAPI_DATA(PyTypeObject) PyTraceBack_Type; #define PyTraceBack_Check(v) (Py_TYPE(v) == &PyTraceBack_Type) #ifdef __cplusplus } #endif #endif /* !Py_TRACEBACK_H */ PKZF[(python2.7/pystrcmp.hnu[#ifndef Py_STRCMP_H #define Py_STRCMP_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *); #if defined(MS_WINDOWS) || defined(PYOS_OS2) #define PyOS_strnicmp strnicmp #define PyOS_stricmp stricmp #else #define PyOS_strnicmp PyOS_mystrnicmp #define PyOS_stricmp PyOS_mystricmp #endif #ifdef __cplusplus } #endif #endif /* !Py_STRCMP_H */ PKZRʿpython2.7/unicodeobject.hnu[#ifndef Py_UNICODEOBJECT_H #define Py_UNICODEOBJECT_H #include /* Unicode implementation based on original code by Fredrik Lundh, modified by Marc-Andre Lemburg (mal@lemburg.com) according to the Unicode Integration Proposal (see file Misc/unicode.txt). Copyright (c) Corporation for National Research Initiatives. Original header: -------------------------------------------------------------------- * Yet another Unicode string type for Python. This type supports the * 16-bit Basic Multilingual Plane (BMP) only. * * Written by Fredrik Lundh, January 1999. * * Copyright (c) 1999 by Secret Labs AB. * Copyright (c) 1999 by Fredrik Lundh. * * fredrik@pythonware.com * http://www.pythonware.com * * -------------------------------------------------------------------- * This Unicode String Type is * * Copyright (c) 1999 by Secret Labs AB * Copyright (c) 1999 by Fredrik Lundh * * By obtaining, using, and/or copying this software and/or its * associated documentation, you agree that you have read, understood, * and will comply with the following terms and conditions: * * Permission to use, copy, modify, and distribute this software and its * associated documentation for any purpose and without fee is hereby * granted, provided that the above copyright notice appears in all * copies, and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of Secret Labs * AB or the author not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. * * SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * -------------------------------------------------------------------- */ #include /* === Internal API ======================================================= */ /* --- Internal Unicode Format -------------------------------------------- */ #ifndef Py_USING_UNICODE #define PyUnicode_Check(op) 0 #define PyUnicode_CheckExact(op) 0 #else /* FIXME: MvL's new implementation assumes that Py_UNICODE_SIZE is properly set, but the default rules below doesn't set it. I'll sort this out some other day -- fredrik@pythonware.com */ #ifndef Py_UNICODE_SIZE #error Must define Py_UNICODE_SIZE #endif /* Setting Py_UNICODE_WIDE enables UCS-4 storage. Otherwise, Unicode strings are stored as UCS-2 (with limited support for UTF-16) */ #if Py_UNICODE_SIZE >= 4 #define Py_UNICODE_WIDE #endif /* Set these flags if the platform has "wchar.h", "wctype.h" and the wchar_t type is a 16-bit unsigned type */ /* #define HAVE_WCHAR_H */ /* #define HAVE_USABLE_WCHAR_T */ /* Defaults for various platforms */ #ifndef PY_UNICODE_TYPE /* Windows has a usable wchar_t type (unless we're using UCS-4) */ # if defined(MS_WIN32) && Py_UNICODE_SIZE == 2 # define HAVE_USABLE_WCHAR_T # define PY_UNICODE_TYPE wchar_t # endif # if defined(Py_UNICODE_WIDE) # define PY_UNICODE_TYPE Py_UCS4 # endif #endif /* If the compiler provides a wchar_t type we try to support it through the interface functions PyUnicode_FromWideChar() and PyUnicode_AsWideChar(). */ #ifdef HAVE_USABLE_WCHAR_T # ifndef HAVE_WCHAR_H # define HAVE_WCHAR_H # endif #endif #ifdef HAVE_WCHAR_H /* Work around a cosmetic bug in BSDI 4.x wchar.h; thanks to Thomas Wouters */ # ifdef _HAVE_BSDI # include # endif # include #endif /* * Use this typedef when you need to represent a UTF-16 surrogate pair * as single unsigned integer. */ #if SIZEOF_INT >= 4 typedef unsigned int Py_UCS4; #elif SIZEOF_LONG >= 4 typedef unsigned long Py_UCS4; #endif /* Py_UNICODE is the native Unicode storage format (code unit) used by Python and represents a single Unicode element in the Unicode type. */ typedef PY_UNICODE_TYPE Py_UNICODE; /* --- UCS-2/UCS-4 Name Mangling ------------------------------------------ */ /* Unicode API names are mangled to assure that UCS-2 and UCS-4 builds produce different external names and thus cause import errors in case Python interpreters and extensions with mixed compiled in Unicode width assumptions are combined. */ #ifndef Py_UNICODE_WIDE # define PyUnicode_AsASCIIString PyUnicodeUCS2_AsASCIIString # define PyUnicode_AsCharmapString PyUnicodeUCS2_AsCharmapString # define PyUnicode_AsEncodedObject PyUnicodeUCS2_AsEncodedObject # define PyUnicode_AsEncodedString PyUnicodeUCS2_AsEncodedString # define PyUnicode_AsLatin1String PyUnicodeUCS2_AsLatin1String # define PyUnicode_AsRawUnicodeEscapeString PyUnicodeUCS2_AsRawUnicodeEscapeString # define PyUnicode_AsUTF32String PyUnicodeUCS2_AsUTF32String # define PyUnicode_AsUTF16String PyUnicodeUCS2_AsUTF16String # define PyUnicode_AsUTF8String PyUnicodeUCS2_AsUTF8String # define PyUnicode_AsUnicode PyUnicodeUCS2_AsUnicode # define PyUnicode_AsUnicodeEscapeString PyUnicodeUCS2_AsUnicodeEscapeString # define PyUnicode_AsWideChar PyUnicodeUCS2_AsWideChar # define PyUnicode_ClearFreeList PyUnicodeUCS2_ClearFreelist # define PyUnicode_Compare PyUnicodeUCS2_Compare # define PyUnicode_Concat PyUnicodeUCS2_Concat # define PyUnicode_Contains PyUnicodeUCS2_Contains # define PyUnicode_Count PyUnicodeUCS2_Count # define PyUnicode_Decode PyUnicodeUCS2_Decode # define PyUnicode_DecodeASCII PyUnicodeUCS2_DecodeASCII # define PyUnicode_DecodeCharmap PyUnicodeUCS2_DecodeCharmap # define PyUnicode_DecodeLatin1 PyUnicodeUCS2_DecodeLatin1 # define PyUnicode_DecodeRawUnicodeEscape PyUnicodeUCS2_DecodeRawUnicodeEscape # define PyUnicode_DecodeUTF32 PyUnicodeUCS2_DecodeUTF32 # define PyUnicode_DecodeUTF32Stateful PyUnicodeUCS2_DecodeUTF32Stateful # define PyUnicode_DecodeUTF16 PyUnicodeUCS2_DecodeUTF16 # define PyUnicode_DecodeUTF16Stateful PyUnicodeUCS2_DecodeUTF16Stateful # define PyUnicode_DecodeUTF8 PyUnicodeUCS2_DecodeUTF8 # define PyUnicode_DecodeUTF8Stateful PyUnicodeUCS2_DecodeUTF8Stateful # define PyUnicode_DecodeUnicodeEscape PyUnicodeUCS2_DecodeUnicodeEscape # define PyUnicode_Encode PyUnicodeUCS2_Encode # define PyUnicode_EncodeASCII PyUnicodeUCS2_EncodeASCII # define PyUnicode_EncodeCharmap PyUnicodeUCS2_EncodeCharmap # define PyUnicode_EncodeDecimal PyUnicodeUCS2_EncodeDecimal # define PyUnicode_EncodeLatin1 PyUnicodeUCS2_EncodeLatin1 # define PyUnicode_EncodeRawUnicodeEscape PyUnicodeUCS2_EncodeRawUnicodeEscape # define PyUnicode_EncodeUTF32 PyUnicodeUCS2_EncodeUTF32 # define PyUnicode_EncodeUTF16 PyUnicodeUCS2_EncodeUTF16 # define PyUnicode_EncodeUTF8 PyUnicodeUCS2_EncodeUTF8 # define PyUnicode_EncodeUnicodeEscape PyUnicodeUCS2_EncodeUnicodeEscape # define PyUnicode_Find PyUnicodeUCS2_Find # define PyUnicode_Format PyUnicodeUCS2_Format # define PyUnicode_FromEncodedObject PyUnicodeUCS2_FromEncodedObject # define PyUnicode_FromFormat PyUnicodeUCS2_FromFormat # define PyUnicode_FromFormatV PyUnicodeUCS2_FromFormatV # define PyUnicode_FromObject PyUnicodeUCS2_FromObject # define PyUnicode_FromOrdinal PyUnicodeUCS2_FromOrdinal # define PyUnicode_FromString PyUnicodeUCS2_FromString # define PyUnicode_FromStringAndSize PyUnicodeUCS2_FromStringAndSize # define PyUnicode_FromUnicode PyUnicodeUCS2_FromUnicode # define PyUnicode_FromWideChar PyUnicodeUCS2_FromWideChar # define PyUnicode_GetDefaultEncoding PyUnicodeUCS2_GetDefaultEncoding # define PyUnicode_GetMax PyUnicodeUCS2_GetMax # define PyUnicode_GetSize PyUnicodeUCS2_GetSize # define PyUnicode_Join PyUnicodeUCS2_Join # define PyUnicode_Partition PyUnicodeUCS2_Partition # define PyUnicode_RPartition PyUnicodeUCS2_RPartition # define PyUnicode_RSplit PyUnicodeUCS2_RSplit # define PyUnicode_Replace PyUnicodeUCS2_Replace # define PyUnicode_Resize PyUnicodeUCS2_Resize # define PyUnicode_RichCompare PyUnicodeUCS2_RichCompare # define PyUnicode_SetDefaultEncoding PyUnicodeUCS2_SetDefaultEncoding # define PyUnicode_Split PyUnicodeUCS2_Split # define PyUnicode_Splitlines PyUnicodeUCS2_Splitlines # define PyUnicode_Tailmatch PyUnicodeUCS2_Tailmatch # define PyUnicode_Translate PyUnicodeUCS2_Translate # define PyUnicode_TranslateCharmap PyUnicodeUCS2_TranslateCharmap # define _PyUnicode_AsDefaultEncodedString _PyUnicodeUCS2_AsDefaultEncodedString # define _PyUnicode_Fini _PyUnicodeUCS2_Fini # define _PyUnicode_Init _PyUnicodeUCS2_Init # define _PyUnicode_IsAlpha _PyUnicodeUCS2_IsAlpha # define _PyUnicode_IsDecimalDigit _PyUnicodeUCS2_IsDecimalDigit # define _PyUnicode_IsDigit _PyUnicodeUCS2_IsDigit # define _PyUnicode_IsLinebreak _PyUnicodeUCS2_IsLinebreak # define _PyUnicode_IsLowercase _PyUnicodeUCS2_IsLowercase # define _PyUnicode_IsNumeric _PyUnicodeUCS2_IsNumeric # define _PyUnicode_IsTitlecase _PyUnicodeUCS2_IsTitlecase # define _PyUnicode_IsUppercase _PyUnicodeUCS2_IsUppercase # define _PyUnicode_IsWhitespace _PyUnicodeUCS2_IsWhitespace # define _PyUnicode_ToDecimalDigit _PyUnicodeUCS2_ToDecimalDigit # define _PyUnicode_ToDigit _PyUnicodeUCS2_ToDigit # define _PyUnicode_ToLowercase _PyUnicodeUCS2_ToLowercase # define _PyUnicode_ToNumeric _PyUnicodeUCS2_ToNumeric # define _PyUnicode_ToTitlecase _PyUnicodeUCS2_ToTitlecase # define _PyUnicode_ToUppercase _PyUnicodeUCS2_ToUppercase #else # define PyUnicode_AsASCIIString PyUnicodeUCS4_AsASCIIString # define PyUnicode_AsCharmapString PyUnicodeUCS4_AsCharmapString # define PyUnicode_AsEncodedObject PyUnicodeUCS4_AsEncodedObject # define PyUnicode_AsEncodedString PyUnicodeUCS4_AsEncodedString # define PyUnicode_AsLatin1String PyUnicodeUCS4_AsLatin1String # define PyUnicode_AsRawUnicodeEscapeString PyUnicodeUCS4_AsRawUnicodeEscapeString # define PyUnicode_AsUTF32String PyUnicodeUCS4_AsUTF32String # define PyUnicode_AsUTF16String PyUnicodeUCS4_AsUTF16String # define PyUnicode_AsUTF8String PyUnicodeUCS4_AsUTF8String # define PyUnicode_AsUnicode PyUnicodeUCS4_AsUnicode # define PyUnicode_AsUnicodeEscapeString PyUnicodeUCS4_AsUnicodeEscapeString # define PyUnicode_AsWideChar PyUnicodeUCS4_AsWideChar # define PyUnicode_ClearFreeList PyUnicodeUCS4_ClearFreelist # define PyUnicode_Compare PyUnicodeUCS4_Compare # define PyUnicode_Concat PyUnicodeUCS4_Concat # define PyUnicode_Contains PyUnicodeUCS4_Contains # define PyUnicode_Count PyUnicodeUCS4_Count # define PyUnicode_Decode PyUnicodeUCS4_Decode # define PyUnicode_DecodeASCII PyUnicodeUCS4_DecodeASCII # define PyUnicode_DecodeCharmap PyUnicodeUCS4_DecodeCharmap # define PyUnicode_DecodeLatin1 PyUnicodeUCS4_DecodeLatin1 # define PyUnicode_DecodeRawUnicodeEscape PyUnicodeUCS4_DecodeRawUnicodeEscape # define PyUnicode_DecodeUTF32 PyUnicodeUCS4_DecodeUTF32 # define PyUnicode_DecodeUTF32Stateful PyUnicodeUCS4_DecodeUTF32Stateful # define PyUnicode_DecodeUTF16 PyUnicodeUCS4_DecodeUTF16 # define PyUnicode_DecodeUTF16Stateful PyUnicodeUCS4_DecodeUTF16Stateful # define PyUnicode_DecodeUTF8 PyUnicodeUCS4_DecodeUTF8 # define PyUnicode_DecodeUTF8Stateful PyUnicodeUCS4_DecodeUTF8Stateful # define PyUnicode_DecodeUnicodeEscape PyUnicodeUCS4_DecodeUnicodeEscape # define PyUnicode_Encode PyUnicodeUCS4_Encode # define PyUnicode_EncodeASCII PyUnicodeUCS4_EncodeASCII # define PyUnicode_EncodeCharmap PyUnicodeUCS4_EncodeCharmap # define PyUnicode_EncodeDecimal PyUnicodeUCS4_EncodeDecimal # define PyUnicode_EncodeLatin1 PyUnicodeUCS4_EncodeLatin1 # define PyUnicode_EncodeRawUnicodeEscape PyUnicodeUCS4_EncodeRawUnicodeEscape # define PyUnicode_EncodeUTF32 PyUnicodeUCS4_EncodeUTF32 # define PyUnicode_EncodeUTF16 PyUnicodeUCS4_EncodeUTF16 # define PyUnicode_EncodeUTF8 PyUnicodeUCS4_EncodeUTF8 # define PyUnicode_EncodeUnicodeEscape PyUnicodeUCS4_EncodeUnicodeEscape # define PyUnicode_Find PyUnicodeUCS4_Find # define PyUnicode_Format PyUnicodeUCS4_Format # define PyUnicode_FromEncodedObject PyUnicodeUCS4_FromEncodedObject # define PyUnicode_FromFormat PyUnicodeUCS4_FromFormat # define PyUnicode_FromFormatV PyUnicodeUCS4_FromFormatV # define PyUnicode_FromObject PyUnicodeUCS4_FromObject # define PyUnicode_FromOrdinal PyUnicodeUCS4_FromOrdinal # define PyUnicode_FromString PyUnicodeUCS4_FromString # define PyUnicode_FromStringAndSize PyUnicodeUCS4_FromStringAndSize # define PyUnicode_FromUnicode PyUnicodeUCS4_FromUnicode # define PyUnicode_FromWideChar PyUnicodeUCS4_FromWideChar # define PyUnicode_GetDefaultEncoding PyUnicodeUCS4_GetDefaultEncoding # define PyUnicode_GetMax PyUnicodeUCS4_GetMax # define PyUnicode_GetSize PyUnicodeUCS4_GetSize # define PyUnicode_Join PyUnicodeUCS4_Join # define PyUnicode_Partition PyUnicodeUCS4_Partition # define PyUnicode_RPartition PyUnicodeUCS4_RPartition # define PyUnicode_RSplit PyUnicodeUCS4_RSplit # define PyUnicode_Replace PyUnicodeUCS4_Replace # define PyUnicode_Resize PyUnicodeUCS4_Resize # define PyUnicode_RichCompare PyUnicodeUCS4_RichCompare # define PyUnicode_SetDefaultEncoding PyUnicodeUCS4_SetDefaultEncoding # define PyUnicode_Split PyUnicodeUCS4_Split # define PyUnicode_Splitlines PyUnicodeUCS4_Splitlines # define PyUnicode_Tailmatch PyUnicodeUCS4_Tailmatch # define PyUnicode_Translate PyUnicodeUCS4_Translate # define PyUnicode_TranslateCharmap PyUnicodeUCS4_TranslateCharmap # define _PyUnicode_AsDefaultEncodedString _PyUnicodeUCS4_AsDefaultEncodedString # define _PyUnicode_Fini _PyUnicodeUCS4_Fini # define _PyUnicode_Init _PyUnicodeUCS4_Init # define _PyUnicode_IsAlpha _PyUnicodeUCS4_IsAlpha # define _PyUnicode_IsDecimalDigit _PyUnicodeUCS4_IsDecimalDigit # define _PyUnicode_IsDigit _PyUnicodeUCS4_IsDigit # define _PyUnicode_IsLinebreak _PyUnicodeUCS4_IsLinebreak # define _PyUnicode_IsLowercase _PyUnicodeUCS4_IsLowercase # define _PyUnicode_IsNumeric _PyUnicodeUCS4_IsNumeric # define _PyUnicode_IsTitlecase _PyUnicodeUCS4_IsTitlecase # define _PyUnicode_IsUppercase _PyUnicodeUCS4_IsUppercase # define _PyUnicode_IsWhitespace _PyUnicodeUCS4_IsWhitespace # define _PyUnicode_ToDecimalDigit _PyUnicodeUCS4_ToDecimalDigit # define _PyUnicode_ToDigit _PyUnicodeUCS4_ToDigit # define _PyUnicode_ToLowercase _PyUnicodeUCS4_ToLowercase # define _PyUnicode_ToNumeric _PyUnicodeUCS4_ToNumeric # define _PyUnicode_ToTitlecase _PyUnicodeUCS4_ToTitlecase # define _PyUnicode_ToUppercase _PyUnicodeUCS4_ToUppercase #endif /* --- Internal Unicode Operations ---------------------------------------- */ /* If you want Python to use the compiler's wctype.h functions instead of the ones supplied with Python, define WANT_WCTYPE_FUNCTIONS or configure Python using --with-wctype-functions. This reduces the interpreter's code size. */ #if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS) #include #define Py_UNICODE_ISSPACE(ch) iswspace(ch) #define Py_UNICODE_ISLOWER(ch) iswlower(ch) #define Py_UNICODE_ISUPPER(ch) iswupper(ch) #define Py_UNICODE_ISTITLE(ch) _PyUnicode_IsTitlecase(ch) #define Py_UNICODE_ISLINEBREAK(ch) _PyUnicode_IsLinebreak(ch) #define Py_UNICODE_TOLOWER(ch) towlower(ch) #define Py_UNICODE_TOUPPER(ch) towupper(ch) #define Py_UNICODE_TOTITLE(ch) _PyUnicode_ToTitlecase(ch) #define Py_UNICODE_ISDECIMAL(ch) _PyUnicode_IsDecimalDigit(ch) #define Py_UNICODE_ISDIGIT(ch) _PyUnicode_IsDigit(ch) #define Py_UNICODE_ISNUMERIC(ch) _PyUnicode_IsNumeric(ch) #define Py_UNICODE_TODECIMAL(ch) _PyUnicode_ToDecimalDigit(ch) #define Py_UNICODE_TODIGIT(ch) _PyUnicode_ToDigit(ch) #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) #define Py_UNICODE_ISALPHA(ch) iswalpha(ch) #else /* Since splitting on whitespace is an important use case, and whitespace in most situations is solely ASCII whitespace, we optimize for the common case by using a quick look-up table _Py_ascii_whitespace (see below) with an inlined check. */ #define Py_UNICODE_ISSPACE(ch) \ ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) #define Py_UNICODE_ISLOWER(ch) _PyUnicode_IsLowercase(ch) #define Py_UNICODE_ISUPPER(ch) _PyUnicode_IsUppercase(ch) #define Py_UNICODE_ISTITLE(ch) _PyUnicode_IsTitlecase(ch) #define Py_UNICODE_ISLINEBREAK(ch) _PyUnicode_IsLinebreak(ch) #define Py_UNICODE_TOLOWER(ch) _PyUnicode_ToLowercase(ch) #define Py_UNICODE_TOUPPER(ch) _PyUnicode_ToUppercase(ch) #define Py_UNICODE_TOTITLE(ch) _PyUnicode_ToTitlecase(ch) #define Py_UNICODE_ISDECIMAL(ch) _PyUnicode_IsDecimalDigit(ch) #define Py_UNICODE_ISDIGIT(ch) _PyUnicode_IsDigit(ch) #define Py_UNICODE_ISNUMERIC(ch) _PyUnicode_IsNumeric(ch) #define Py_UNICODE_TODECIMAL(ch) _PyUnicode_ToDecimalDigit(ch) #define Py_UNICODE_TODIGIT(ch) _PyUnicode_ToDigit(ch) #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) #define Py_UNICODE_ISALPHA(ch) _PyUnicode_IsAlpha(ch) #endif #define Py_UNICODE_ISALNUM(ch) \ (Py_UNICODE_ISALPHA(ch) || \ Py_UNICODE_ISDECIMAL(ch) || \ Py_UNICODE_ISDIGIT(ch) || \ Py_UNICODE_ISNUMERIC(ch)) #define Py_UNICODE_COPY(target, source, length) \ Py_MEMCPY((target), (source), (length)*sizeof(Py_UNICODE)) #define Py_UNICODE_FILL(target, value, length) \ do {Py_ssize_t i_; Py_UNICODE *t_ = (target); Py_UNICODE v_ = (value);\ for (i_ = 0; i_ < (length); i_++) t_[i_] = v_;\ } while (0) /* Check if substring matches at given offset. the offset must be valid, and the substring must not be empty */ #define Py_UNICODE_MATCH(string, offset, substring) \ ((*((string)->str + (offset)) == *((substring)->str)) && \ ((*((string)->str + (offset) + (substring)->length-1) == *((substring)->str + (substring)->length-1))) && \ !memcmp((string)->str + (offset), (substring)->str, (substring)->length*sizeof(Py_UNICODE))) #ifdef __cplusplus extern "C" { #endif /* --- Unicode Type ------------------------------------------------------- */ typedef struct { PyObject_HEAD Py_ssize_t length; /* Length of raw Unicode data in buffer */ Py_UNICODE *str; /* Raw Unicode buffer */ long hash; /* Hash value; -1 if not set */ PyObject *defenc; /* (Default) Encoded version as Python string, or NULL; this is used for implementing the buffer protocol */ } PyUnicodeObject; PyAPI_DATA(PyTypeObject) PyUnicode_Type; #define PyUnicode_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS) #define PyUnicode_CheckExact(op) (Py_TYPE(op) == &PyUnicode_Type) /* Fast access macros */ #define PyUnicode_GET_SIZE(op) \ (((PyUnicodeObject *)(op))->length) #define PyUnicode_GET_DATA_SIZE(op) \ (((PyUnicodeObject *)(op))->length * sizeof(Py_UNICODE)) #define PyUnicode_AS_UNICODE(op) \ (((PyUnicodeObject *)(op))->str) #define PyUnicode_AS_DATA(op) \ ((const char *)((PyUnicodeObject *)(op))->str) /* --- Constants ---------------------------------------------------------- */ /* This Unicode character will be used as replacement character during decoding if the errors argument is set to "replace". Note: the Unicode character U+FFFD is the official REPLACEMENT CHARACTER in Unicode 3.0. */ #define Py_UNICODE_REPLACEMENT_CHARACTER ((Py_UNICODE) 0xFFFD) /* === Public API ========================================================= */ /* --- Plain Py_UNICODE --------------------------------------------------- */ /* Create a Unicode Object from the Py_UNICODE buffer u of the given size. u may be NULL which causes the contents to be undefined. It is the user's responsibility to fill in the needed data afterwards. Note that modifying the Unicode object contents after construction is only allowed if u was set to NULL. The buffer is copied into the new object. */ PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode( const Py_UNICODE *u, /* Unicode buffer */ Py_ssize_t size /* size of buffer */ ); /* Similar to PyUnicode_FromUnicode(), but u points to Latin-1 encoded bytes */ PyAPI_FUNC(PyObject*) PyUnicode_FromStringAndSize( const char *u, /* char buffer */ Py_ssize_t size /* size of buffer */ ); /* Similar to PyUnicode_FromUnicode(), but u points to null-terminated Latin-1 encoded bytes */ PyAPI_FUNC(PyObject*) PyUnicode_FromString( const char *u /* string */ ); /* Return a read-only pointer to the Unicode object's internal Py_UNICODE buffer. */ PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( PyObject *unicode /* Unicode object */ ); /* Get the length of the Unicode object. */ PyAPI_FUNC(Py_ssize_t) PyUnicode_GetSize( PyObject *unicode /* Unicode object */ ); /* Get the maximum ordinal for a Unicode character. */ PyAPI_FUNC(Py_UNICODE) PyUnicode_GetMax(void); /* Resize an already allocated Unicode object to the new size length. *unicode is modified to point to the new (resized) object and 0 returned on success. This API may only be called by the function which also called the Unicode constructor. The refcount on the object must be 1. Otherwise, an error is returned. Error handling is implemented as follows: an exception is set, -1 is returned and *unicode left untouched. */ PyAPI_FUNC(int) PyUnicode_Resize( PyObject **unicode, /* Pointer to the Unicode object */ Py_ssize_t length /* New length */ ); /* Coerce obj to a Unicode object and return a reference with *incremented* refcount. Coercion is done in the following way: 1. String and other char buffer compatible objects are decoded under the assumptions that they contain data using the current default encoding. Decoding is done in "strict" mode. 2. All other objects (including Unicode objects) raise an exception. The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects. */ PyAPI_FUNC(PyObject*) PyUnicode_FromEncodedObject( register PyObject *obj, /* Object */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Coerce obj to a Unicode object and return a reference with *incremented* refcount. Unicode objects are passed back as-is (subclasses are converted to true Unicode objects), all other objects are delegated to PyUnicode_FromEncodedObject(obj, NULL, "strict") which results in using the default encoding as basis for decoding the object. The API returns NULL in case of an error. The caller is responsible for decref'ing the returned objects. */ PyAPI_FUNC(PyObject*) PyUnicode_FromObject( register PyObject *obj /* Object */ ); PyAPI_FUNC(PyObject *) PyUnicode_FromFormatV(const char*, va_list); PyAPI_FUNC(PyObject *) PyUnicode_FromFormat(const char*, ...); /* Format the object based on the format_spec, as defined in PEP 3101 (Advanced String Formatting). */ PyAPI_FUNC(PyObject *) _PyUnicode_FormatAdvanced(PyObject *obj, Py_UNICODE *format_spec, Py_ssize_t format_spec_len); /* --- wchar_t support for platforms which support it --------------------- */ #ifdef HAVE_WCHAR_H /* Create a Unicode Object from the whcar_t buffer w of the given size. The buffer is copied into the new object. */ PyAPI_FUNC(PyObject*) PyUnicode_FromWideChar( register const wchar_t *w, /* wchar_t buffer */ Py_ssize_t size /* size of buffer */ ); /* Copies the Unicode Object contents into the wchar_t buffer w. At most size wchar_t characters are copied. Note that the resulting wchar_t string may or may not be 0-terminated. It is the responsibility of the caller to make sure that the wchar_t string is 0-terminated in case this is required by the application. Returns the number of wchar_t characters copied (excluding a possibly trailing 0-termination character) or -1 in case of an error. */ PyAPI_FUNC(Py_ssize_t) PyUnicode_AsWideChar( PyUnicodeObject *unicode, /* Unicode object */ register wchar_t *w, /* wchar_t buffer */ Py_ssize_t size /* size of buffer */ ); #endif /* --- Unicode ordinals --------------------------------------------------- */ /* Create a Unicode Object from the given Unicode code point ordinal. The ordinal must be in range(0x10000) on narrow Python builds (UCS2), and range(0x110000) on wide builds (UCS4). A ValueError is raised in case it is not. */ PyAPI_FUNC(PyObject*) PyUnicode_FromOrdinal(int ordinal); /* --- Free-list management ----------------------------------------------- */ /* Clear the free list used by the Unicode implementation. This can be used to release memory used for objects on the free list back to the Python memory allocator. */ PyAPI_FUNC(int) PyUnicode_ClearFreeList(void); /* === Builtin Codecs ===================================================== Many of these APIs take two arguments encoding and errors. These parameters encoding and errors have the same semantics as the ones of the builtin unicode() API. Setting encoding to NULL causes the default encoding to be used. Error handling is set by errors which may also be set to NULL meaning to use the default handling defined for the codec. Default error handling for all builtin codecs is "strict" (ValueErrors are raised). The codecs all use a similar interface. Only deviation from the generic ones are documented. */ /* --- Manage the default encoding ---------------------------------------- */ /* Return a Python string holding the default encoded value of the Unicode object. The resulting string is cached in the Unicode object for subsequent usage by this function. The cached version is needed to implement the character buffer interface and will live (at least) as long as the Unicode object itself. The refcount of the string is *not* incremented. *** Exported for internal use by the interpreter only !!! *** */ PyAPI_FUNC(PyObject *) _PyUnicode_AsDefaultEncodedString( PyObject *, const char *); /* Returns the currently active default encoding. The default encoding is currently implemented as run-time settable process global. This may change in future versions of the interpreter to become a parameter which is managed on a per-thread basis. */ PyAPI_FUNC(const char*) PyUnicode_GetDefaultEncoding(void); /* Sets the currently active default encoding. Returns 0 on success, -1 in case of an error. */ PyAPI_FUNC(int) PyUnicode_SetDefaultEncoding( const char *encoding /* Encoding name in standard form */ ); /* --- Generic Codecs ----------------------------------------------------- */ /* Create a Unicode object by decoding the encoded string s of the given size. */ PyAPI_FUNC(PyObject*) PyUnicode_Decode( const char *s, /* encoded string */ Py_ssize_t size, /* size of buffer */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Encodes a Py_UNICODE buffer of the given size and returns a Python string object. */ PyAPI_FUNC(PyObject*) PyUnicode_Encode( const Py_UNICODE *s, /* Unicode char buffer */ Py_ssize_t size, /* number of Py_UNICODE chars to encode */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Encodes a Unicode object and returns the result as Python object. */ PyAPI_FUNC(PyObject*) PyUnicode_AsEncodedObject( PyObject *unicode, /* Unicode object */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Encodes a Unicode object and returns the result as Python string object. */ PyAPI_FUNC(PyObject*) PyUnicode_AsEncodedString( PyObject *unicode, /* Unicode object */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_BuildEncodingMap( PyObject* string /* 256 character map */ ); /* --- UTF-7 Codecs ------------------------------------------------------- */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF7( const char *string, /* UTF-7 encoded string */ Py_ssize_t length, /* size of string */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF7Stateful( const char *string, /* UTF-7 encoded string */ Py_ssize_t length, /* size of string */ const char *errors, /* error handling */ Py_ssize_t *consumed /* bytes consumed */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF7( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* number of Py_UNICODE chars to encode */ int base64SetO, /* Encode RFC2152 Set O characters in base64 */ int base64WhiteSpace, /* Encode whitespace (sp, ht, nl, cr) in base64 */ const char *errors /* error handling */ ); /* --- UTF-8 Codecs ------------------------------------------------------- */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF8( const char *string, /* UTF-8 encoded string */ Py_ssize_t length, /* size of string */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF8Stateful( const char *string, /* UTF-8 encoded string */ Py_ssize_t length, /* size of string */ const char *errors, /* error handling */ Py_ssize_t *consumed /* bytes consumed */ ); PyAPI_FUNC(PyObject*) PyUnicode_AsUTF8String( PyObject *unicode /* Unicode object */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF8( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* number of Py_UNICODE chars to encode */ const char *errors /* error handling */ ); /* --- UTF-32 Codecs ------------------------------------------------------ */ /* Decodes length bytes from a UTF-32 encoded buffer string and returns the corresponding Unicode object. errors (if non-NULL) defines the error handling. It defaults to "strict". If byteorder is non-NULL, the decoder starts decoding using the given byte order: *byteorder == -1: little endian *byteorder == 0: native order *byteorder == 1: big endian In native mode, the first four bytes of the stream are checked for a BOM mark. If found, the BOM mark is analysed, the byte order adjusted and the BOM skipped. In the other modes, no BOM mark interpretation is done. After completion, *byteorder is set to the current byte order at the end of input data. If byteorder is NULL, the codec starts in native order mode. */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF32( const char *string, /* UTF-32 encoded string */ Py_ssize_t length, /* size of string */ const char *errors, /* error handling */ int *byteorder /* pointer to byteorder to use 0=native;-1=LE,1=BE; updated on exit */ ); PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF32Stateful( const char *string, /* UTF-32 encoded string */ Py_ssize_t length, /* size of string */ const char *errors, /* error handling */ int *byteorder, /* pointer to byteorder to use 0=native;-1=LE,1=BE; updated on exit */ Py_ssize_t *consumed /* bytes consumed */ ); /* Returns a Python string using the UTF-32 encoding in native byte order. The string always starts with a BOM mark. */ PyAPI_FUNC(PyObject*) PyUnicode_AsUTF32String( PyObject *unicode /* Unicode object */ ); /* Returns a Python string object holding the UTF-32 encoded value of the Unicode data. If byteorder is not 0, output is written according to the following byte order: byteorder == -1: little endian byteorder == 0: native byte order (writes a BOM mark) byteorder == 1: big endian If byteorder is 0, the output string will always start with the Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is prepended. */ PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF32( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* number of Py_UNICODE chars to encode */ const char *errors, /* error handling */ int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */ ); /* --- UTF-16 Codecs ------------------------------------------------------ */ /* Decodes length bytes from a UTF-16 encoded buffer string and returns the corresponding Unicode object. errors (if non-NULL) defines the error handling. It defaults to "strict". If byteorder is non-NULL, the decoder starts decoding using the given byte order: *byteorder == -1: little endian *byteorder == 0: native order *byteorder == 1: big endian In native mode, the first two bytes of the stream are checked for a BOM mark. If found, the BOM mark is analysed, the byte order adjusted and the BOM skipped. In the other modes, no BOM mark interpretation is done. After completion, *byteorder is set to the current byte order at the end of input data. If byteorder is NULL, the codec starts in native order mode. */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF16( const char *string, /* UTF-16 encoded string */ Py_ssize_t length, /* size of string */ const char *errors, /* error handling */ int *byteorder /* pointer to byteorder to use 0=native;-1=LE,1=BE; updated on exit */ ); PyAPI_FUNC(PyObject*) PyUnicode_DecodeUTF16Stateful( const char *string, /* UTF-16 encoded string */ Py_ssize_t length, /* size of string */ const char *errors, /* error handling */ int *byteorder, /* pointer to byteorder to use 0=native;-1=LE,1=BE; updated on exit */ Py_ssize_t *consumed /* bytes consumed */ ); /* Returns a Python string using the UTF-16 encoding in native byte order. The string always starts with a BOM mark. */ PyAPI_FUNC(PyObject*) PyUnicode_AsUTF16String( PyObject *unicode /* Unicode object */ ); /* Returns a Python string object holding the UTF-16 encoded value of the Unicode data. If byteorder is not 0, output is written according to the following byte order: byteorder == -1: little endian byteorder == 0: native byte order (writes a BOM mark) byteorder == 1: big endian If byteorder is 0, the output string will always start with the Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is prepended. Note that Py_UNICODE data is being interpreted as UTF-16 reduced to UCS-2. This trick makes it possible to add full UTF-16 capabilities at a later point without compromising the APIs. */ PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF16( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* number of Py_UNICODE chars to encode */ const char *errors, /* error handling */ int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */ ); /* --- Unicode-Escape Codecs ---------------------------------------------- */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeUnicodeEscape( const char *string, /* Unicode-Escape encoded string */ Py_ssize_t length, /* size of string */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_AsUnicodeEscapeString( PyObject *unicode /* Unicode object */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeUnicodeEscape( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length /* Number of Py_UNICODE chars to encode */ ); /* --- Raw-Unicode-Escape Codecs ------------------------------------------ */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeRawUnicodeEscape( const char *string, /* Raw-Unicode-Escape encoded string */ Py_ssize_t length, /* size of string */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_AsRawUnicodeEscapeString( PyObject *unicode /* Unicode object */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeRawUnicodeEscape( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length /* Number of Py_UNICODE chars to encode */ ); /* --- Unicode Internal Codec --------------------------------------------- Only for internal use in _codecsmodule.c */ PyObject *_PyUnicode_DecodeUnicodeInternal( const char *string, Py_ssize_t length, const char *errors ); /* --- Latin-1 Codecs ----------------------------------------------------- Note: Latin-1 corresponds to the first 256 Unicode ordinals. */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeLatin1( const char *string, /* Latin-1 encoded string */ Py_ssize_t length, /* size of string */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_AsLatin1String( PyObject *unicode /* Unicode object */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeLatin1( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */ const char *errors /* error handling */ ); /* --- ASCII Codecs ------------------------------------------------------- Only 7-bit ASCII data is excepted. All other codes generate errors. */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeASCII( const char *string, /* ASCII encoded string */ Py_ssize_t length, /* size of string */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_AsASCIIString( PyObject *unicode /* Unicode object */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeASCII( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */ const char *errors /* error handling */ ); /* --- Character Map Codecs ----------------------------------------------- This codec uses mappings to encode and decode characters. Decoding mappings must map single string characters to single Unicode characters, integers (which are then interpreted as Unicode ordinals) or None (meaning "undefined mapping" and causing an error). Encoding mappings must map single Unicode characters to single string characters, integers (which are then interpreted as Latin-1 ordinals) or None (meaning "undefined mapping" and causing an error). If a character lookup fails with a LookupError, the character is copied as-is meaning that its ordinal value will be interpreted as Unicode or Latin-1 ordinal resp. Because of this mappings only need to contain those mappings which map characters to different code points. */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeCharmap( const char *string, /* Encoded string */ Py_ssize_t length, /* size of string */ PyObject *mapping, /* character mapping (char ordinal -> unicode ordinal) */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_AsCharmapString( PyObject *unicode, /* Unicode object */ PyObject *mapping /* character mapping (unicode ordinal -> char ordinal) */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeCharmap( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */ PyObject *mapping, /* character mapping (unicode ordinal -> char ordinal) */ const char *errors /* error handling */ ); /* Translate a Py_UNICODE buffer of the given length by applying a character mapping table to it and return the resulting Unicode object. The mapping table must map Unicode ordinal integers to Unicode ordinal integers or None (causing deletion of the character). Mapping tables may be dictionaries or sequences. Unmapped character ordinals (ones which cause a LookupError) are left untouched and are copied as-is. */ PyAPI_FUNC(PyObject *) PyUnicode_TranslateCharmap( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */ PyObject *table, /* Translate table */ const char *errors /* error handling */ ); #ifdef MS_WIN32 /* --- MBCS codecs for Windows -------------------------------------------- */ PyAPI_FUNC(PyObject*) PyUnicode_DecodeMBCS( const char *string, /* MBCS encoded string */ Py_ssize_t length, /* size of string */ const char *errors /* error handling */ ); PyAPI_FUNC(PyObject*) PyUnicode_DecodeMBCSStateful( const char *string, /* MBCS encoded string */ Py_ssize_t length, /* size of string */ const char *errors, /* error handling */ Py_ssize_t *consumed /* bytes consumed */ ); PyAPI_FUNC(PyObject*) PyUnicode_AsMBCSString( PyObject *unicode /* Unicode object */ ); PyAPI_FUNC(PyObject*) PyUnicode_EncodeMBCS( const Py_UNICODE *data, /* Unicode char buffer */ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */ const char *errors /* error handling */ ); #endif /* MS_WIN32 */ /* --- Decimal Encoder ---------------------------------------------------- */ /* Takes a Unicode string holding a decimal value and writes it into an output buffer using standard ASCII digit codes. The output buffer has to provide at least length+1 bytes of storage area. The output string is 0-terminated. The encoder converts whitespace to ' ', decimal characters to their corresponding ASCII digit and all other Latin-1 characters except \0 as-is. Characters outside this range (Unicode ordinals 1-256) are treated as errors. This includes embedded NULL bytes. Error handling is defined by the errors argument: NULL or "strict": raise a ValueError "ignore": ignore the wrong characters (these are not copied to the output buffer) "replace": replaces illegal characters with '?' Returns 0 on success, -1 on failure. */ PyAPI_FUNC(int) PyUnicode_EncodeDecimal( Py_UNICODE *s, /* Unicode buffer */ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */ char *output, /* Output buffer; must have size >= length */ const char *errors /* error handling */ ); /* --- Methods & Slots ---------------------------------------------------- These are capable of handling Unicode objects and strings on input (we refer to them as strings in the descriptions) and return Unicode objects or integers as appropriate. */ /* Concat two strings giving a new Unicode string. */ PyAPI_FUNC(PyObject*) PyUnicode_Concat( PyObject *left, /* Left string */ PyObject *right /* Right string */ ); /* Split a string giving a list of Unicode strings. If sep is NULL, splitting will be done at all whitespace substrings. Otherwise, splits occur at the given separator. At most maxsplit splits will be done. If negative, no limit is set. Separators are not included in the resulting list. */ PyAPI_FUNC(PyObject*) PyUnicode_Split( PyObject *s, /* String to split */ PyObject *sep, /* String separator */ Py_ssize_t maxsplit /* Maxsplit count */ ); /* Dito, but split at line breaks. CRLF is considered to be one line break. Line breaks are not included in the resulting list. */ PyAPI_FUNC(PyObject*) PyUnicode_Splitlines( PyObject *s, /* String to split */ int keepends /* If true, line end markers are included */ ); /* Partition a string using a given separator. */ PyAPI_FUNC(PyObject*) PyUnicode_Partition( PyObject *s, /* String to partition */ PyObject *sep /* String separator */ ); /* Partition a string using a given separator, searching from the end of the string. */ PyAPI_FUNC(PyObject*) PyUnicode_RPartition( PyObject *s, /* String to partition */ PyObject *sep /* String separator */ ); /* Split a string giving a list of Unicode strings. If sep is NULL, splitting will be done at all whitespace substrings. Otherwise, splits occur at the given separator. At most maxsplit splits will be done. But unlike PyUnicode_Split PyUnicode_RSplit splits from the end of the string. If negative, no limit is set. Separators are not included in the resulting list. */ PyAPI_FUNC(PyObject*) PyUnicode_RSplit( PyObject *s, /* String to split */ PyObject *sep, /* String separator */ Py_ssize_t maxsplit /* Maxsplit count */ ); /* Translate a string by applying a character mapping table to it and return the resulting Unicode object. The mapping table must map Unicode ordinal integers to Unicode ordinal integers or None (causing deletion of the character). Mapping tables may be dictionaries or sequences. Unmapped character ordinals (ones which cause a LookupError) are left untouched and are copied as-is. */ PyAPI_FUNC(PyObject *) PyUnicode_Translate( PyObject *str, /* String */ PyObject *table, /* Translate table */ const char *errors /* error handling */ ); /* Join a sequence of strings using the given separator and return the resulting Unicode string. */ PyAPI_FUNC(PyObject*) PyUnicode_Join( PyObject *separator, /* Separator string */ PyObject *seq /* Sequence object */ ); /* Return 1 if substr matches str[start:end] at the given tail end, 0 otherwise. */ PyAPI_FUNC(Py_ssize_t) PyUnicode_Tailmatch( PyObject *str, /* String */ PyObject *substr, /* Prefix or Suffix string */ Py_ssize_t start, /* Start index */ Py_ssize_t end, /* Stop index */ int direction /* Tail end: -1 prefix, +1 suffix */ ); /* Return the first position of substr in str[start:end] using the given search direction or -1 if not found. -2 is returned in case an error occurred and an exception is set. */ PyAPI_FUNC(Py_ssize_t) PyUnicode_Find( PyObject *str, /* String */ PyObject *substr, /* Substring to find */ Py_ssize_t start, /* Start index */ Py_ssize_t end, /* Stop index */ int direction /* Find direction: +1 forward, -1 backward */ ); /* Count the number of occurrences of substr in str[start:end]. */ PyAPI_FUNC(Py_ssize_t) PyUnicode_Count( PyObject *str, /* String */ PyObject *substr, /* Substring to count */ Py_ssize_t start, /* Start index */ Py_ssize_t end /* Stop index */ ); /* Replace at most maxcount occurrences of substr in str with replstr and return the resulting Unicode object. */ PyAPI_FUNC(PyObject *) PyUnicode_Replace( PyObject *str, /* String */ PyObject *substr, /* Substring to find */ PyObject *replstr, /* Substring to replace */ Py_ssize_t maxcount /* Max. number of replacements to apply; -1 = all */ ); /* Compare two strings and return -1, 0, 1 for less than, equal, greater than resp. */ PyAPI_FUNC(int) PyUnicode_Compare( PyObject *left, /* Left string */ PyObject *right /* Right string */ ); /* Rich compare two strings and return one of the following: - NULL in case an exception was raised - Py_True or Py_False for successful comparisons - Py_NotImplemented in case the type combination is unknown Note that Py_EQ and Py_NE comparisons can cause a UnicodeWarning in case the conversion of the arguments to Unicode fails with a UnicodeDecodeError. Possible values for op: Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE */ PyAPI_FUNC(PyObject *) PyUnicode_RichCompare( PyObject *left, /* Left string */ PyObject *right, /* Right string */ int op /* Operation: Py_EQ, Py_NE, Py_GT, etc. */ ); /* Apply an argument tuple or dictionary to a format string and return the resulting Unicode string. */ PyAPI_FUNC(PyObject *) PyUnicode_Format( PyObject *format, /* Format string */ PyObject *args /* Argument tuple or dictionary */ ); /* Checks whether element is contained in container and return 1/0 accordingly. element has to coerce to a one element Unicode string. -1 is returned in case of an error. */ PyAPI_FUNC(int) PyUnicode_Contains( PyObject *container, /* Container string */ PyObject *element /* Element string */ ); /* Externally visible for str.strip(unicode) */ PyAPI_FUNC(PyObject *) _PyUnicode_XStrip( PyUnicodeObject *self, int striptype, PyObject *sepobj ); /* === Characters Type APIs =============================================== */ /* Helper array used by Py_UNICODE_ISSPACE(). */ PyAPI_DATA(const unsigned char) _Py_ascii_whitespace[]; /* These should not be used directly. Use the Py_UNICODE_IS* and Py_UNICODE_TO* macros instead. These APIs are implemented in Objects/unicodectype.c. */ PyAPI_FUNC(int) _PyUnicode_IsLowercase( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsUppercase( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsTitlecase( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsWhitespace( const Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsLinebreak( const Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(Py_UNICODE) _PyUnicode_ToLowercase( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(Py_UNICODE) _PyUnicode_ToUppercase( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(Py_UNICODE) _PyUnicode_ToTitlecase( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_ToDecimalDigit( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_ToDigit( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(double) _PyUnicode_ToNumeric( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsDecimalDigit( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsDigit( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsNumeric( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(int) _PyUnicode_IsAlpha( Py_UNICODE ch /* Unicode character */ ); PyAPI_FUNC(void) _PyUnicode_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* Py_USING_UNICODE */ #endif /* !Py_UNICODEOBJECT_H */ PKZ`Fgpython2.7/abstract.hnu[#ifndef Py_ABSTRACTOBJECT_H #define Py_ABSTRACTOBJECT_H #ifdef __cplusplus extern "C" { #endif #ifdef PY_SSIZE_T_CLEAN #define PyObject_CallFunction _PyObject_CallFunction_SizeT #define PyObject_CallMethod _PyObject_CallMethod_SizeT #endif /* Abstract Object Interface (many thanks to Jim Fulton) */ /* PROPOSAL: A Generic Python Object Interface for Python C Modules Problem Python modules written in C that must access Python objects must do so through routines whose interfaces are described by a set of include files. Unfortunately, these routines vary according to the object accessed. To use these routines, the C programmer must check the type of the object being used and must call a routine based on the object type. For example, to access an element of a sequence, the programmer must determine whether the sequence is a list or a tuple: if(is_tupleobject(o)) e=gettupleitem(o,i) else if(is_listitem(o)) e=getlistitem(o,i) If the programmer wants to get an item from another type of object that provides sequence behavior, there is no clear way to do it correctly. The persistent programmer may peruse object.h and find that the _typeobject structure provides a means of invoking up to (currently about) 41 special operators. So, for example, a routine can get an item from any object that provides sequence behavior. However, to use this mechanism, the programmer must make their code dependent on the current Python implementation. Also, certain semantics, especially memory management semantics, may differ by the type of object being used. Unfortunately, these semantics are not clearly described in the current include files. An abstract interface providing more consistent semantics is needed. Proposal I propose the creation of a standard interface (with an associated library of routines and/or macros) for generically obtaining the services of Python objects. This proposal can be viewed as one components of a Python C interface consisting of several components. From the viewpoint of C access to Python services, we have (as suggested by Guido in off-line discussions): - "Very high level layer": two or three functions that let you exec or eval arbitrary Python code given as a string in a module whose name is given, passing C values in and getting C values out using mkvalue/getargs style format strings. This does not require the user to declare any variables of type "PyObject *". This should be enough to write a simple application that gets Python code from the user, execs it, and returns the output or errors. (Error handling must also be part of this API.) - "Abstract objects layer": which is the subject of this proposal. It has many functions operating on objects, and lest you do many things from C that you can also write in Python, without going through the Python parser. - "Concrete objects layer": This is the public type-dependent interface provided by the standard built-in types, such as floats, strings, and lists. This interface exists and is currently documented by the collection of include files provided with the Python distributions. From the point of view of Python accessing services provided by C modules: - "Python module interface": this interface consist of the basic routines used to define modules and their members. Most of the current extensions-writing guide deals with this interface. - "Built-in object interface": this is the interface that a new built-in type must provide and the mechanisms and rules that a developer of a new built-in type must use and follow. This proposal is a "first-cut" that is intended to spur discussion. See especially the lists of notes. The Python C object interface will provide four protocols: object, numeric, sequence, and mapping. Each protocol consists of a collection of related operations. If an operation that is not provided by a particular type is invoked, then a standard exception, NotImplementedError is raised with an operation name as an argument. In addition, for convenience this interface defines a set of constructors for building objects of built-in types. This is needed so new objects can be returned from C functions that otherwise treat objects generically. Memory Management For all of the functions described in this proposal, if a function retains a reference to a Python object passed as an argument, then the function will increase the reference count of the object. It is unnecessary for the caller to increase the reference count of an argument in anticipation of the object's retention. All Python objects returned from functions should be treated as new objects. Functions that return objects assume that the caller will retain a reference and the reference count of the object has already been incremented to account for this fact. A caller that does not retain a reference to an object that is returned from a function must decrement the reference count of the object (using DECREF(object)) to prevent memory leaks. Note that the behavior mentioned here is different from the current behavior for some objects (e.g. lists and tuples) when certain type-specific routines are called directly (e.g. setlistitem). The proposed abstraction layer will provide a consistent memory management interface, correcting for inconsistent behavior for some built-in types. Protocols xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ /* Object Protocol: */ /* Implemented elsewhere: int PyObject_Print(PyObject *o, FILE *fp, int flags); Print an object, o, on file, fp. Returns -1 on error. The flags argument is used to enable certain printing options. The only option currently supported is Py_Print_RAW. (What should be said about Py_Print_RAW?) */ /* Implemented elsewhere: int PyObject_HasAttrString(PyObject *o, char *attr_name); Returns 1 if o has the attribute attr_name, and 0 otherwise. This is equivalent to the Python expression: hasattr(o,attr_name). This function always succeeds. */ /* Implemented elsewhere: PyObject* PyObject_GetAttrString(PyObject *o, char *attr_name); Retrieve an attributed named attr_name form object o. Returns the attribute value on success, or NULL on failure. This is the equivalent of the Python expression: o.attr_name. */ /* Implemented elsewhere: int PyObject_HasAttr(PyObject *o, PyObject *attr_name); Returns 1 if o has the attribute attr_name, and 0 otherwise. This is equivalent to the Python expression: hasattr(o,attr_name). This function always succeeds. */ /* Implemented elsewhere: PyObject* PyObject_GetAttr(PyObject *o, PyObject *attr_name); Retrieve an attributed named attr_name form object o. Returns the attribute value on success, or NULL on failure. This is the equivalent of the Python expression: o.attr_name. */ /* Implemented elsewhere: int PyObject_SetAttrString(PyObject *o, char *attr_name, PyObject *v); Set the value of the attribute named attr_name, for object o, to the value v. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o.attr_name=v. */ /* Implemented elsewhere: int PyObject_SetAttr(PyObject *o, PyObject *attr_name, PyObject *v); Set the value of the attribute named attr_name, for object o, to the value v. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o.attr_name=v. */ /* implemented as a macro: int PyObject_DelAttrString(PyObject *o, char *attr_name); Delete attribute named attr_name, for object o. Returns -1 on failure. This is the equivalent of the Python statement: del o.attr_name. */ #define PyObject_DelAttrString(O,A) PyObject_SetAttrString((O),(A),NULL) /* implemented as a macro: int PyObject_DelAttr(PyObject *o, PyObject *attr_name); Delete attribute named attr_name, for object o. Returns -1 on failure. This is the equivalent of the Python statement: del o.attr_name. */ #define PyObject_DelAttr(O,A) PyObject_SetAttr((O),(A),NULL) PyAPI_FUNC(int) PyObject_Cmp(PyObject *o1, PyObject *o2, int *result); /* Compare the values of o1 and o2 using a routine provided by o1, if one exists, otherwise with a routine provided by o2. The result of the comparison is returned in result. Returns -1 on failure. This is the equivalent of the Python statement: result=cmp(o1,o2). */ /* Implemented elsewhere: int PyObject_Compare(PyObject *o1, PyObject *o2); Compare the values of o1 and o2 using a routine provided by o1, if one exists, otherwise with a routine provided by o2. Returns the result of the comparison on success. On error, the value returned is undefined. This is equivalent to the Python expression: cmp(o1,o2). */ /* Implemented elsewhere: PyObject *PyObject_Repr(PyObject *o); Compute the string representation of object, o. Returns the string representation on success, NULL on failure. This is the equivalent of the Python expression: repr(o). Called by the repr() built-in function and by reverse quotes. */ /* Implemented elsewhere: PyObject *PyObject_Str(PyObject *o); Compute the string representation of object, o. Returns the string representation on success, NULL on failure. This is the equivalent of the Python expression: str(o).) Called by the str() built-in function and by the print statement. */ /* Implemented elsewhere: PyObject *PyObject_Unicode(PyObject *o); Compute the unicode representation of object, o. Returns the unicode representation on success, NULL on failure. This is the equivalent of the Python expression: unistr(o).) Called by the unistr() built-in function. */ /* Declared elsewhere PyAPI_FUNC(int) PyCallable_Check(PyObject *o); Determine if the object, o, is callable. Return 1 if the object is callable and 0 otherwise. This function always succeeds. */ PyAPI_FUNC(PyObject *) PyObject_Call(PyObject *callable_object, PyObject *args, PyObject *kw); /* Call a callable Python object, callable_object, with arguments and keywords arguments. The 'args' argument can not be NULL, but the 'kw' argument can be NULL. */ PyAPI_FUNC(PyObject *) PyObject_CallObject(PyObject *callable_object, PyObject *args); /* Call a callable Python object, callable_object, with arguments given by the tuple, args. If no arguments are needed, then args may be NULL. Returns the result of the call on success, or NULL on failure. This is the equivalent of the Python expression: apply(o,args). */ PyAPI_FUNC(PyObject *) PyObject_CallFunction(PyObject *callable_object, char *format, ...); /* Call a callable Python object, callable_object, with a variable number of C arguments. The C arguments are described using a mkvalue-style format string. The format may be NULL, indicating that no arguments are provided. Returns the result of the call on success, or NULL on failure. This is the equivalent of the Python expression: apply(o,args). */ PyAPI_FUNC(PyObject *) PyObject_CallMethod(PyObject *o, char *m, char *format, ...); /* Call the method named m of object o with a variable number of C arguments. The C arguments are described by a mkvalue format string. The format may be NULL, indicating that no arguments are provided. Returns the result of the call on success, or NULL on failure. This is the equivalent of the Python expression: o.method(args). */ PyAPI_FUNC(PyObject *) _PyObject_CallFunction_SizeT(PyObject *callable, char *format, ...); PyAPI_FUNC(PyObject *) _PyObject_CallMethod_SizeT(PyObject *o, char *name, char *format, ...); PyAPI_FUNC(PyObject *) PyObject_CallFunctionObjArgs(PyObject *callable, ...); /* Call a callable Python object, callable_object, with a variable number of C arguments. The C arguments are provided as PyObject * values, terminated by a NULL. Returns the result of the call on success, or NULL on failure. This is the equivalent of the Python expression: apply(o,args). */ PyAPI_FUNC(PyObject *) PyObject_CallMethodObjArgs(PyObject *o, PyObject *m, ...); /* Call the method named m of object o with a variable number of C arguments. The C arguments are provided as PyObject * values, terminated by NULL. Returns the result of the call on success, or NULL on failure. This is the equivalent of the Python expression: o.method(args). */ /* Implemented elsewhere: long PyObject_Hash(PyObject *o); Compute and return the hash, hash_value, of an object, o. On failure, return -1. This is the equivalent of the Python expression: hash(o). */ /* Implemented elsewhere: int PyObject_IsTrue(PyObject *o); Returns 1 if the object, o, is considered to be true, 0 if o is considered to be false and -1 on failure. This is equivalent to the Python expression: not not o */ /* Implemented elsewhere: int PyObject_Not(PyObject *o); Returns 0 if the object, o, is considered to be true, 1 if o is considered to be false and -1 on failure. This is equivalent to the Python expression: not o */ PyAPI_FUNC(PyObject *) PyObject_Type(PyObject *o); /* On success, returns a type object corresponding to the object type of object o. On failure, returns NULL. This is equivalent to the Python expression: type(o). */ PyAPI_FUNC(Py_ssize_t) PyObject_Size(PyObject *o); /* Return the size of object o. If the object, o, provides both sequence and mapping protocols, the sequence size is returned. On error, -1 is returned. This is the equivalent to the Python expression: len(o). */ /* For DLL compatibility */ #undef PyObject_Length PyAPI_FUNC(Py_ssize_t) PyObject_Length(PyObject *o); #define PyObject_Length PyObject_Size PyAPI_FUNC(Py_ssize_t) _PyObject_LengthHint(PyObject *o, Py_ssize_t); /* Guess the size of object o using len(o) or o.__length_hint__(). If neither of those return a non-negative value, then return the default value. If one of the calls fails, this function returns -1. */ PyAPI_FUNC(PyObject *) PyObject_GetItem(PyObject *o, PyObject *key); /* Return element of o corresponding to the object, key, or NULL on failure. This is the equivalent of the Python expression: o[key]. */ PyAPI_FUNC(int) PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v); /* Map the object key to the value v. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o[key]=v. */ PyAPI_FUNC(int) PyObject_DelItemString(PyObject *o, char *key); /* Remove the mapping for object, key, from the object *o. Returns -1 on failure. This is equivalent to the Python statement: del o[key]. */ PyAPI_FUNC(int) PyObject_DelItem(PyObject *o, PyObject *key); /* Delete the mapping for key from *o. Returns -1 on failure. This is the equivalent of the Python statement: del o[key]. */ PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, const char **buffer, Py_ssize_t *buffer_len); /* Takes an arbitrary object which must support the (character, single segment) buffer interface and returns a pointer to a read-only memory location useable as character based input for subsequent processing. 0 is returned on success. buffer and buffer_len are only set in case no error occurs. Otherwise, -1 is returned and an exception set. */ PyAPI_FUNC(int) PyObject_CheckReadBuffer(PyObject *obj); /* Checks whether an arbitrary object supports the (character, single segment) buffer interface. Returns 1 on success, 0 on failure. */ PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj, const void **buffer, Py_ssize_t *buffer_len); /* Same as PyObject_AsCharBuffer() except that this API expects (readable, single segment) buffer interface and returns a pointer to a read-only memory location which can contain arbitrary data. 0 is returned on success. buffer and buffer_len are only set in case no error occurs. Otherwise, -1 is returned and an exception set. */ PyAPI_FUNC(int) PyObject_AsWriteBuffer(PyObject *obj, void **buffer, Py_ssize_t *buffer_len); /* Takes an arbitrary object which must support the (writeable, single segment) buffer interface and returns a pointer to a writeable memory location in buffer of size buffer_len. 0 is returned on success. buffer and buffer_len are only set in case no error occurs. Otherwise, -1 is returned and an exception set. */ /* new buffer API */ #define PyObject_CheckBuffer(obj) \ (((obj)->ob_type->tp_as_buffer != NULL) && \ (PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_NEWBUFFER)) && \ ((obj)->ob_type->tp_as_buffer->bf_getbuffer != NULL)) /* Return 1 if the getbuffer function is available, otherwise return 0 */ PyAPI_FUNC(int) PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags); /* This is a C-API version of the getbuffer function call. It checks to make sure object has the required function pointer and issues the call. Returns -1 and raises an error on failure and returns 0 on success */ PyAPI_FUNC(void *) PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices); /* Get the memory area pointed to by the indices for the buffer given. Note that view->ndim is the assumed size of indices */ PyAPI_FUNC(int) PyBuffer_SizeFromFormat(const char *); /* Return the implied itemsize of the data-format area from a struct-style description */ PyAPI_FUNC(int) PyBuffer_ToContiguous(void *buf, Py_buffer *view, Py_ssize_t len, char fort); PyAPI_FUNC(int) PyBuffer_FromContiguous(Py_buffer *view, void *buf, Py_ssize_t len, char fort); /* Copy len bytes of data from the contiguous chunk of memory pointed to by buf into the buffer exported by obj. Return 0 on success and return -1 and raise a PyBuffer_Error on error (i.e. the object does not have a buffer interface or it is not working). If fort is 'F' and the object is multi-dimensional, then the data will be copied into the array in Fortran-style (first dimension varies the fastest). If fort is 'C', then the data will be copied into the array in C-style (last dimension varies the fastest). If fort is 'A', then it does not matter and the copy will be made in whatever way is more efficient. */ PyAPI_FUNC(int) PyObject_CopyData(PyObject *dest, PyObject *src); /* Copy the data from the src buffer to the buffer of destination */ PyAPI_FUNC(int) PyBuffer_IsContiguous(Py_buffer *view, char fort); PyAPI_FUNC(void) PyBuffer_FillContiguousStrides(int ndims, Py_ssize_t *shape, Py_ssize_t *strides, int itemsize, char fort); /* Fill the strides array with byte-strides of a contiguous (Fortran-style if fort is 'F' or C-style otherwise) array of the given shape with the given number of bytes per element. */ PyAPI_FUNC(int) PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf, Py_ssize_t len, int readonly, int flags); /* Fills in a buffer-info structure correctly for an exporter that can only share a contiguous chunk of memory of "unsigned bytes" of the given length. Returns 0 on success and -1 (with raising an error) on error. */ PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view); /* Releases a Py_buffer obtained from getbuffer ParseTuple's s*. */ PyAPI_FUNC(PyObject *) PyObject_Format(PyObject* obj, PyObject *format_spec); /* Takes an arbitrary object and returns the result of calling obj.__format__(format_spec). */ /* Iterators */ PyAPI_FUNC(PyObject *) PyObject_GetIter(PyObject *); /* Takes an object and returns an iterator for it. This is typically a new iterator but if the argument is an iterator, this returns itself. */ #define PyIter_Check(obj) \ (PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_ITER) && \ (obj)->ob_type->tp_iternext != NULL && \ (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented) PyAPI_FUNC(PyObject *) PyIter_Next(PyObject *); /* Takes an iterator object and calls its tp_iternext slot, returning the next value. If the iterator is exhausted, this returns NULL without setting an exception. NULL with an exception means an error occurred. */ /* Number Protocol:*/ PyAPI_FUNC(int) PyNumber_Check(PyObject *o); /* Returns 1 if the object, o, provides numeric protocols, and false otherwise. This function always succeeds. */ PyAPI_FUNC(PyObject *) PyNumber_Add(PyObject *o1, PyObject *o2); /* Returns the result of adding o1 and o2, or null on failure. This is the equivalent of the Python expression: o1+o2. */ PyAPI_FUNC(PyObject *) PyNumber_Subtract(PyObject *o1, PyObject *o2); /* Returns the result of subtracting o2 from o1, or null on failure. This is the equivalent of the Python expression: o1-o2. */ PyAPI_FUNC(PyObject *) PyNumber_Multiply(PyObject *o1, PyObject *o2); /* Returns the result of multiplying o1 and o2, or null on failure. This is the equivalent of the Python expression: o1*o2. */ PyAPI_FUNC(PyObject *) PyNumber_Divide(PyObject *o1, PyObject *o2); /* Returns the result of dividing o1 by o2, or null on failure. This is the equivalent of the Python expression: o1/o2. */ PyAPI_FUNC(PyObject *) PyNumber_FloorDivide(PyObject *o1, PyObject *o2); /* Returns the result of dividing o1 by o2 giving an integral result, or null on failure. This is the equivalent of the Python expression: o1//o2. */ PyAPI_FUNC(PyObject *) PyNumber_TrueDivide(PyObject *o1, PyObject *o2); /* Returns the result of dividing o1 by o2 giving a float result, or null on failure. This is the equivalent of the Python expression: o1/o2. */ PyAPI_FUNC(PyObject *) PyNumber_Remainder(PyObject *o1, PyObject *o2); /* Returns the remainder of dividing o1 by o2, or null on failure. This is the equivalent of the Python expression: o1%o2. */ PyAPI_FUNC(PyObject *) PyNumber_Divmod(PyObject *o1, PyObject *o2); /* See the built-in function divmod. Returns NULL on failure. This is the equivalent of the Python expression: divmod(o1,o2). */ PyAPI_FUNC(PyObject *) PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3); /* See the built-in function pow. Returns NULL on failure. This is the equivalent of the Python expression: pow(o1,o2,o3), where o3 is optional. */ PyAPI_FUNC(PyObject *) PyNumber_Negative(PyObject *o); /* Returns the negation of o on success, or null on failure. This is the equivalent of the Python expression: -o. */ PyAPI_FUNC(PyObject *) PyNumber_Positive(PyObject *o); /* Returns the (what?) of o on success, or NULL on failure. This is the equivalent of the Python expression: +o. */ PyAPI_FUNC(PyObject *) PyNumber_Absolute(PyObject *o); /* Returns the absolute value of o, or null on failure. This is the equivalent of the Python expression: abs(o). */ PyAPI_FUNC(PyObject *) PyNumber_Invert(PyObject *o); /* Returns the bitwise negation of o on success, or NULL on failure. This is the equivalent of the Python expression: ~o. */ PyAPI_FUNC(PyObject *) PyNumber_Lshift(PyObject *o1, PyObject *o2); /* Returns the result of left shifting o1 by o2 on success, or NULL on failure. This is the equivalent of the Python expression: o1 << o2. */ PyAPI_FUNC(PyObject *) PyNumber_Rshift(PyObject *o1, PyObject *o2); /* Returns the result of right shifting o1 by o2 on success, or NULL on failure. This is the equivalent of the Python expression: o1 >> o2. */ PyAPI_FUNC(PyObject *) PyNumber_And(PyObject *o1, PyObject *o2); /* Returns the result of bitwise and of o1 and o2 on success, or NULL on failure. This is the equivalent of the Python expression: o1&o2. */ PyAPI_FUNC(PyObject *) PyNumber_Xor(PyObject *o1, PyObject *o2); /* Returns the bitwise exclusive or of o1 by o2 on success, or NULL on failure. This is the equivalent of the Python expression: o1^o2. */ PyAPI_FUNC(PyObject *) PyNumber_Or(PyObject *o1, PyObject *o2); /* Returns the result of bitwise or on o1 and o2 on success, or NULL on failure. This is the equivalent of the Python expression: o1|o2. */ /* Implemented elsewhere: int PyNumber_Coerce(PyObject **p1, PyObject **p2); This function takes the addresses of two variables of type PyObject*. If the objects pointed to by *p1 and *p2 have the same type, increment their reference count and return 0 (success). If the objects can be converted to a common numeric type, replace *p1 and *p2 by their converted value (with 'new' reference counts), and return 0. If no conversion is possible, or if some other error occurs, return -1 (failure) and don't increment the reference counts. The call PyNumber_Coerce(&o1, &o2) is equivalent to the Python statement o1, o2 = coerce(o1, o2). */ #define PyIndex_Check(obj) \ ((obj)->ob_type->tp_as_number != NULL && \ PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_INDEX) && \ (obj)->ob_type->tp_as_number->nb_index != NULL) PyAPI_FUNC(PyObject *) PyNumber_Index(PyObject *o); /* Returns the object converted to a Python long or int or NULL with an error raised on failure. */ PyAPI_FUNC(Py_ssize_t) PyNumber_AsSsize_t(PyObject *o, PyObject *exc); /* Returns the Integral instance converted to an int. The instance is expected to be int or long or have an __int__ method. Steals integral's reference. error_format will be used to create the TypeError if integral isn't actually an Integral instance. error_format should be a format string that can accept a char* naming integral's type. */ PyAPI_FUNC(PyObject *) _PyNumber_ConvertIntegralToInt( PyObject *integral, const char* error_format); /* Returns the object converted to Py_ssize_t by going through PyNumber_Index first. If an overflow error occurs while converting the int-or-long to Py_ssize_t, then the second argument is the error-type to return. If it is NULL, then the overflow error is cleared and the value is clipped. */ PyAPI_FUNC(PyObject *) PyNumber_Int(PyObject *o); /* Returns the o converted to an integer object on success, or NULL on failure. This is the equivalent of the Python expression: int(o). */ PyAPI_FUNC(PyObject *) PyNumber_Long(PyObject *o); /* Returns the o converted to a long integer object on success, or NULL on failure. This is the equivalent of the Python expression: long(o). */ PyAPI_FUNC(PyObject *) PyNumber_Float(PyObject *o); /* Returns the o converted to a float object on success, or NULL on failure. This is the equivalent of the Python expression: float(o). */ /* In-place variants of (some of) the above number protocol functions */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2); /* Returns the result of adding o2 to o1, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 += o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2); /* Returns the result of subtracting o2 from o1, possibly in-place or null on failure. This is the equivalent of the Python expression: o1 -= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2); /* Returns the result of multiplying o1 by o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 *= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2); /* Returns the result of dividing o1 by o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 /= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceFloorDivide(PyObject *o1, PyObject *o2); /* Returns the result of dividing o1 by o2 giving an integral result, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 /= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceTrueDivide(PyObject *o1, PyObject *o2); /* Returns the result of dividing o1 by o2 giving a float result, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 /= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2); /* Returns the remainder of dividing o1 by o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 %= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3); /* Returns the result of raising o1 to the power of o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 **= o2, or pow(o1, o2, o3) if o3 is present. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2); /* Returns the result of left shifting o1 by o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 <<= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2); /* Returns the result of right shifting o1 by o2, possibly in-place or null on failure. This is the equivalent of the Python expression: o1 >>= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2); /* Returns the result of bitwise and of o1 and o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 &= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceXor(PyObject *o1, PyObject *o2); /* Returns the bitwise exclusive or of o1 by o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 ^= o2. */ PyAPI_FUNC(PyObject *) PyNumber_InPlaceOr(PyObject *o1, PyObject *o2); /* Returns the result of bitwise or of o1 and o2, possibly in-place, or null on failure. This is the equivalent of the Python expression: o1 |= o2. */ PyAPI_FUNC(PyObject *) PyNumber_ToBase(PyObject *n, int base); /* Returns the integer n converted to a string with a base, with a base marker of 0b, 0o or 0x prefixed if applicable. If n is not an int object, it is converted with PyNumber_Index first. */ /* Sequence protocol:*/ PyAPI_FUNC(int) PySequence_Check(PyObject *o); /* Return 1 if the object provides sequence protocol, and zero otherwise. This function always succeeds. */ PyAPI_FUNC(Py_ssize_t) PySequence_Size(PyObject *o); /* Return the size of sequence object o, or -1 on failure. */ /* For DLL compatibility */ #undef PySequence_Length PyAPI_FUNC(Py_ssize_t) PySequence_Length(PyObject *o); #define PySequence_Length PySequence_Size PyAPI_FUNC(PyObject *) PySequence_Concat(PyObject *o1, PyObject *o2); /* Return the concatenation of o1 and o2 on success, and NULL on failure. This is the equivalent of the Python expression: o1+o2. */ PyAPI_FUNC(PyObject *) PySequence_Repeat(PyObject *o, Py_ssize_t count); /* Return the result of repeating sequence object o count times, or NULL on failure. This is the equivalent of the Python expression: o1*count. */ PyAPI_FUNC(PyObject *) PySequence_GetItem(PyObject *o, Py_ssize_t i); /* Return the ith element of o, or NULL on failure. This is the equivalent of the Python expression: o[i]. */ PyAPI_FUNC(PyObject *) PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); /* Return the slice of sequence object o between i1 and i2, or NULL on failure. This is the equivalent of the Python expression: o[i1:i2]. */ PyAPI_FUNC(int) PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v); /* Assign object v to the ith element of o. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement o[i]=v. */ PyAPI_FUNC(int) PySequence_DelItem(PyObject *o, Py_ssize_t i); /* Delete the ith element of object v. Returns -1 on failure. This is the equivalent of the Python statement: del o[i]. */ PyAPI_FUNC(int) PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, PyObject *v); /* Assign the sequence object, v, to the slice in sequence object, o, from i1 to i2. Raise an exception and return -1 on failure; return 0 on success. This is the equivalent of the Python statement: o[i1:i2]=v. */ PyAPI_FUNC(int) PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); /* Delete the slice in sequence object, o, from i1 to i2. Returns -1 on failure. This is the equivalent of the Python statement: del o[i1:i2]. */ PyAPI_FUNC(PyObject *) PySequence_Tuple(PyObject *o); /* Returns the sequence, o, as a tuple on success, and NULL on failure. This is equivalent to the Python expression: tuple(o) */ PyAPI_FUNC(PyObject *) PySequence_List(PyObject *o); /* Returns the sequence, o, as a list on success, and NULL on failure. This is equivalent to the Python expression: list(o) */ PyAPI_FUNC(PyObject *) PySequence_Fast(PyObject *o, const char* m); /* Return the sequence, o, as a list, unless it's already a tuple or list. Use PySequence_Fast_GET_ITEM to access the members of this list, and PySequence_Fast_GET_SIZE to get its length. Returns NULL on failure. If the object does not support iteration, raises a TypeError exception with m as the message text. */ #define PySequence_Fast_GET_SIZE(o) \ (PyList_Check(o) ? PyList_GET_SIZE(o) : PyTuple_GET_SIZE(o)) /* Return the size of o, assuming that o was returned by PySequence_Fast and is not NULL. */ #define PySequence_Fast_GET_ITEM(o, i)\ (PyList_Check(o) ? PyList_GET_ITEM(o, i) : PyTuple_GET_ITEM(o, i)) /* Return the ith element of o, assuming that o was returned by PySequence_Fast, and that i is within bounds. */ #define PySequence_ITEM(o, i)\ ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) ) /* Assume tp_as_sequence and sq_item exist and that i does not need to be corrected for a negative index */ #define PySequence_Fast_ITEMS(sf) \ (PyList_Check(sf) ? ((PyListObject *)(sf))->ob_item \ : ((PyTupleObject *)(sf))->ob_item) /* Return a pointer to the underlying item array for an object retured by PySequence_Fast */ PyAPI_FUNC(Py_ssize_t) PySequence_Count(PyObject *o, PyObject *value); /* Return the number of occurrences on value on o, that is, return the number of keys for which o[key]==value. On failure, return -1. This is equivalent to the Python expression: o.count(value). */ PyAPI_FUNC(int) PySequence_Contains(PyObject *seq, PyObject *ob); /* Return -1 if error; 1 if ob in seq; 0 if ob not in seq. Use __contains__ if possible, else _PySequence_IterSearch(). */ #define PY_ITERSEARCH_COUNT 1 #define PY_ITERSEARCH_INDEX 2 #define PY_ITERSEARCH_CONTAINS 3 PyAPI_FUNC(Py_ssize_t) _PySequence_IterSearch(PyObject *seq, PyObject *obj, int operation); /* Iterate over seq. Result depends on the operation: PY_ITERSEARCH_COUNT: return # of times obj appears in seq; -1 if error. PY_ITERSEARCH_INDEX: return 0-based index of first occurrence of obj in seq; set ValueError and return -1 if none found; also return -1 on error. PY_ITERSEARCH_CONTAINS: return 1 if obj in seq, else 0; -1 on error. */ /* For DLL-level backwards compatibility */ #undef PySequence_In PyAPI_FUNC(int) PySequence_In(PyObject *o, PyObject *value); /* For source-level backwards compatibility */ #define PySequence_In PySequence_Contains /* Determine if o contains value. If an item in o is equal to X, return 1, otherwise return 0. On error, return -1. This is equivalent to the Python expression: value in o. */ PyAPI_FUNC(Py_ssize_t) PySequence_Index(PyObject *o, PyObject *value); /* Return the first index for which o[i]=value. On error, return -1. This is equivalent to the Python expression: o.index(value). */ /* In-place versions of some of the above Sequence functions. */ PyAPI_FUNC(PyObject *) PySequence_InPlaceConcat(PyObject *o1, PyObject *o2); /* Append o2 to o1, in-place when possible. Return the resulting object, which could be o1, or NULL on failure. This is the equivalent of the Python expression: o1 += o2. */ PyAPI_FUNC(PyObject *) PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count); /* Repeat o1 by count, in-place when possible. Return the resulting object, which could be o1, or NULL on failure. This is the equivalent of the Python expression: o1 *= count. */ /* Mapping protocol:*/ PyAPI_FUNC(int) PyMapping_Check(PyObject *o); /* Return 1 if the object provides mapping protocol, and zero otherwise. This function always succeeds. */ PyAPI_FUNC(Py_ssize_t) PyMapping_Size(PyObject *o); /* Returns the number of keys in object o on success, and -1 on failure. For objects that do not provide sequence protocol, this is equivalent to the Python expression: len(o). */ /* For DLL compatibility */ #undef PyMapping_Length PyAPI_FUNC(Py_ssize_t) PyMapping_Length(PyObject *o); #define PyMapping_Length PyMapping_Size /* implemented as a macro: int PyMapping_DelItemString(PyObject *o, char *key); Remove the mapping for object, key, from the object *o. Returns -1 on failure. This is equivalent to the Python statement: del o[key]. */ #define PyMapping_DelItemString(O,K) PyObject_DelItemString((O),(K)) /* implemented as a macro: int PyMapping_DelItem(PyObject *o, PyObject *key); Remove the mapping for object, key, from the object *o. Returns -1 on failure. This is equivalent to the Python statement: del o[key]. */ #define PyMapping_DelItem(O,K) PyObject_DelItem((O),(K)) PyAPI_FUNC(int) PyMapping_HasKeyString(PyObject *o, char *key); /* On success, return 1 if the mapping object has the key, key, and 0 otherwise. This is equivalent to the Python expression: o.has_key(key). This function always succeeds. */ PyAPI_FUNC(int) PyMapping_HasKey(PyObject *o, PyObject *key); /* Return 1 if the mapping object has the key, key, and 0 otherwise. This is equivalent to the Python expression: o.has_key(key). This function always succeeds. */ /* Implemented as macro: PyObject *PyMapping_Keys(PyObject *o); On success, return a list of the keys in object o. On failure, return NULL. This is equivalent to the Python expression: o.keys(). */ #define PyMapping_Keys(O) PyObject_CallMethod(O,"keys",NULL) /* Implemented as macro: PyObject *PyMapping_Values(PyObject *o); On success, return a list of the values in object o. On failure, return NULL. This is equivalent to the Python expression: o.values(). */ #define PyMapping_Values(O) PyObject_CallMethod(O,"values",NULL) /* Implemented as macro: PyObject *PyMapping_Items(PyObject *o); On success, return a list of the items in object o, where each item is a tuple containing a key-value pair. On failure, return NULL. This is equivalent to the Python expression: o.items(). */ #define PyMapping_Items(O) PyObject_CallMethod(O,"items",NULL) PyAPI_FUNC(PyObject *) PyMapping_GetItemString(PyObject *o, char *key); /* Return element of o corresponding to the object, key, or NULL on failure. This is the equivalent of the Python expression: o[key]. */ PyAPI_FUNC(int) PyMapping_SetItemString(PyObject *o, char *key, PyObject *value); /* Map the object, key, to the value, v. Returns -1 on failure. This is the equivalent of the Python statement: o[key]=v. */ PyAPI_FUNC(int) PyObject_IsInstance(PyObject *object, PyObject *typeorclass); /* isinstance(object, typeorclass) */ PyAPI_FUNC(int) PyObject_IsSubclass(PyObject *object, PyObject *typeorclass); /* issubclass(object, typeorclass) */ PyAPI_FUNC(int) _PyObject_RealIsInstance(PyObject *inst, PyObject *cls); PyAPI_FUNC(int) _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls); /* For internal use by buffer API functions */ PyAPI_FUNC(void) _Py_add_one_to_index_F(int nd, Py_ssize_t *index, const Py_ssize_t *shape); PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index, const Py_ssize_t *shape); #ifdef __cplusplus } #endif #endif /* Py_ABSTRACTOBJECT_H */ PKZ,`---python2.7/eval.hnu[ /* Interface to execute compiled code */ #ifndef Py_EVAL_H #define Py_EVAL_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(PyObject *) PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals, PyObject **args, int argc, PyObject **kwds, int kwdc, PyObject **defs, int defc, PyObject *closure); PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args); #ifdef __cplusplus } #endif #endif /* !Py_EVAL_H */ PKZokpython2.7/timefuncs.hnu[/* timefuncs.h */ /* Utility function related to timemodule.c. */ #ifndef TIMEFUNCS_H #define TIMEFUNCS_H #ifdef __cplusplus extern "C" { #endif /* Cast double x to time_t, but raise ValueError if x is too large * to fit in a time_t. ValueError is set on return iff the return * value is (time_t)-1 and PyErr_Occurred(). */ PyAPI_FUNC(time_t) _PyTime_DoubleToTimet(double x); /* Get the current time since the epoch in seconds */ PyAPI_FUNC(double) _PyTime_FloatTime(void); #ifdef __cplusplus } #endif #endif /* TIMEFUNCS_H */ PKZZ~i**python2.7/pydebug.hnu[ #ifndef Py_PYDEBUG_H #define Py_PYDEBUG_H #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(int) Py_DebugFlag; PyAPI_DATA(int) Py_VerboseFlag; PyAPI_DATA(int) Py_InteractiveFlag; PyAPI_DATA(int) Py_InspectFlag; PyAPI_DATA(int) Py_OptimizeFlag; PyAPI_DATA(int) Py_NoSiteFlag; PyAPI_DATA(int) Py_BytesWarningFlag; PyAPI_DATA(int) Py_UseClassExceptionsFlag; PyAPI_DATA(int) Py_FrozenFlag; PyAPI_DATA(int) Py_TabcheckFlag; PyAPI_DATA(int) Py_UnicodeFlag; PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; PyAPI_DATA(int) Py_DivisionWarningFlag; PyAPI_DATA(int) Py_DontWriteBytecodeFlag; PyAPI_DATA(int) Py_NoUserSiteDirectory; /* _XXX Py_QnewFlag should go away in 3.0. It's true iff -Qnew is passed, on the command line, and is used in 2.2 by ceval.c to make all "/" divisions true divisions (which they will be in 3.0). */ PyAPI_DATA(int) _Py_QnewFlag; /* Warn about 3.x issues */ PyAPI_DATA(int) Py_Py3kWarningFlag; PyAPI_DATA(int) Py_HashRandomizationFlag; /* this is a wrapper around getenv() that pays attention to Py_IgnoreEnvironmentFlag. It should be used for getting variables like PYTHONPATH and PYTHONHOME from the environment */ #define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s)) PyAPI_FUNC(void) Py_FatalError(const char *message); #ifdef __cplusplus } #endif #endif /* !Py_PYDEBUG_H */ PKZj\\python2.7/pygetopt.hnu[ #ifndef Py_PYGETOPT_H #define Py_PYGETOPT_H #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(int) _PyOS_opterr; PyAPI_DATA(int) _PyOS_optind; PyAPI_DATA(char *) _PyOS_optarg; PyAPI_FUNC(void) _PyOS_ResetGetOpt(void); PyAPI_FUNC(int) _PyOS_GetOpt(int argc, char **argv, char *optstring); #ifdef __cplusplus } #endif #endif /* !Py_PYGETOPT_H */ PKZ23python2.7/ucnhash.hnu[/* Unicode name database interface */ #ifndef Py_UCNHASH_H #define Py_UCNHASH_H #ifdef __cplusplus extern "C" { #endif /* revised ucnhash CAPI interface (exported through a "wrapper") */ #define PyUnicodeData_CAPSULE_NAME "unicodedata.ucnhash_CAPI" typedef struct { /* Size of this struct */ int size; /* Get name for a given character code. Returns non-zero if success, zero if not. Does not set Python exceptions. If self is NULL, data come from the default version of the database. If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */ int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen); /* Get character code for a given name. Same error handling as for getname. */ int (*getcode)(PyObject *self, const char* name, int namelen, Py_UCS4* code); } _PyUnicode_Name_CAPI; #ifdef __cplusplus } #endif #endif /* !Py_UCNHASH_H */ PKZᥗyRyRpython2.7/Python-ast.hnu[/* File automatically generated by Parser/asdl_c.py. */ #include "asdl.h" typedef struct _mod *mod_ty; typedef struct _stmt *stmt_ty; typedef struct _expr *expr_ty; typedef enum _expr_context { Load=1, Store=2, Del=3, AugLoad=4, AugStore=5, Param=6 } expr_context_ty; typedef struct _slice *slice_ty; typedef enum _boolop { And=1, Or=2 } boolop_ty; typedef enum _operator { Add=1, Sub=2, Mult=3, Div=4, Mod=5, Pow=6, LShift=7, RShift=8, BitOr=9, BitXor=10, BitAnd=11, FloorDiv=12 } operator_ty; typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty; typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8, In=9, NotIn=10 } cmpop_ty; typedef struct _comprehension *comprehension_ty; typedef struct _excepthandler *excepthandler_ty; typedef struct _arguments *arguments_ty; typedef struct _keyword *keyword_ty; typedef struct _alias *alias_ty; enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3, Suite_kind=4}; struct _mod { enum _mod_kind kind; union { struct { asdl_seq *body; } Module; struct { asdl_seq *body; } Interactive; struct { expr_ty body; } Expression; struct { asdl_seq *body; } Suite; } v; }; enum _stmt_kind {FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3, Delete_kind=4, Assign_kind=5, AugAssign_kind=6, Print_kind=7, For_kind=8, While_kind=9, If_kind=10, With_kind=11, Raise_kind=12, TryExcept_kind=13, TryFinally_kind=14, Assert_kind=15, Import_kind=16, ImportFrom_kind=17, Exec_kind=18, Global_kind=19, Expr_kind=20, Pass_kind=21, Break_kind=22, Continue_kind=23}; struct _stmt { enum _stmt_kind kind; union { struct { identifier name; arguments_ty args; asdl_seq *body; asdl_seq *decorator_list; } FunctionDef; struct { identifier name; asdl_seq *bases; asdl_seq *body; asdl_seq *decorator_list; } ClassDef; struct { expr_ty value; } Return; struct { asdl_seq *targets; } Delete; struct { asdl_seq *targets; expr_ty value; } Assign; struct { expr_ty target; operator_ty op; expr_ty value; } AugAssign; struct { expr_ty dest; asdl_seq *values; bool nl; } Print; struct { expr_ty target; expr_ty iter; asdl_seq *body; asdl_seq *orelse; } For; struct { expr_ty test; asdl_seq *body; asdl_seq *orelse; } While; struct { expr_ty test; asdl_seq *body; asdl_seq *orelse; } If; struct { expr_ty context_expr; expr_ty optional_vars; asdl_seq *body; } With; struct { expr_ty type; expr_ty inst; expr_ty tback; } Raise; struct { asdl_seq *body; asdl_seq *handlers; asdl_seq *orelse; } TryExcept; struct { asdl_seq *body; asdl_seq *finalbody; } TryFinally; struct { expr_ty test; expr_ty msg; } Assert; struct { asdl_seq *names; } Import; struct { identifier module; asdl_seq *names; int level; } ImportFrom; struct { expr_ty body; expr_ty globals; expr_ty locals; } Exec; struct { asdl_seq *names; } Global; struct { expr_ty value; } Expr; } v; int lineno; int col_offset; }; enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4, IfExp_kind=5, Dict_kind=6, Set_kind=7, ListComp_kind=8, SetComp_kind=9, DictComp_kind=10, GeneratorExp_kind=11, Yield_kind=12, Compare_kind=13, Call_kind=14, Repr_kind=15, Num_kind=16, Str_kind=17, Attribute_kind=18, Subscript_kind=19, Name_kind=20, List_kind=21, Tuple_kind=22}; struct _expr { enum _expr_kind kind; union { struct { boolop_ty op; asdl_seq *values; } BoolOp; struct { expr_ty left; operator_ty op; expr_ty right; } BinOp; struct { unaryop_ty op; expr_ty operand; } UnaryOp; struct { arguments_ty args; expr_ty body; } Lambda; struct { expr_ty test; expr_ty body; expr_ty orelse; } IfExp; struct { asdl_seq *keys; asdl_seq *values; } Dict; struct { asdl_seq *elts; } Set; struct { expr_ty elt; asdl_seq *generators; } ListComp; struct { expr_ty elt; asdl_seq *generators; } SetComp; struct { expr_ty key; expr_ty value; asdl_seq *generators; } DictComp; struct { expr_ty elt; asdl_seq *generators; } GeneratorExp; struct { expr_ty value; } Yield; struct { expr_ty left; asdl_int_seq *ops; asdl_seq *comparators; } Compare; struct { expr_ty func; asdl_seq *args; asdl_seq *keywords; expr_ty starargs; expr_ty kwargs; } Call; struct { expr_ty value; } Repr; struct { object n; } Num; struct { string s; } Str; struct { expr_ty value; identifier attr; expr_context_ty ctx; } Attribute; struct { expr_ty value; slice_ty slice; expr_context_ty ctx; } Subscript; struct { identifier id; expr_context_ty ctx; } Name; struct { asdl_seq *elts; expr_context_ty ctx; } List; struct { asdl_seq *elts; expr_context_ty ctx; } Tuple; } v; int lineno; int col_offset; }; enum _slice_kind {Ellipsis_kind=1, Slice_kind=2, ExtSlice_kind=3, Index_kind=4}; struct _slice { enum _slice_kind kind; union { struct { expr_ty lower; expr_ty upper; expr_ty step; } Slice; struct { asdl_seq *dims; } ExtSlice; struct { expr_ty value; } Index; } v; }; struct _comprehension { expr_ty target; expr_ty iter; asdl_seq *ifs; }; enum _excepthandler_kind {ExceptHandler_kind=1}; struct _excepthandler { enum _excepthandler_kind kind; union { struct { expr_ty type; expr_ty name; asdl_seq *body; } ExceptHandler; } v; int lineno; int col_offset; }; struct _arguments { asdl_seq *args; identifier vararg; identifier kwarg; asdl_seq *defaults; }; struct _keyword { identifier arg; expr_ty value; }; struct _alias { identifier name; identifier asname; }; #define Module(a0, a1) _Py_Module(a0, a1) mod_ty _Py_Module(asdl_seq * body, PyArena *arena); #define Interactive(a0, a1) _Py_Interactive(a0, a1) mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena); #define Expression(a0, a1) _Py_Expression(a0, a1) mod_ty _Py_Expression(expr_ty body, PyArena *arena); #define Suite(a0, a1) _Py_Suite(a0, a1) mod_ty _Py_Suite(asdl_seq * body, PyArena *arena); #define FunctionDef(a0, a1, a2, a3, a4, a5, a6) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6) stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body, asdl_seq * decorator_list, int lineno, int col_offset, PyArena *arena); #define ClassDef(a0, a1, a2, a3, a4, a5, a6) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6) stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * body, asdl_seq * decorator_list, int lineno, int col_offset, PyArena *arena); #define Return(a0, a1, a2, a3) _Py_Return(a0, a1, a2, a3) stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, PyArena *arena); #define Delete(a0, a1, a2, a3) _Py_Delete(a0, a1, a2, a3) stmt_ty _Py_Delete(asdl_seq * targets, int lineno, int col_offset, PyArena *arena); #define Assign(a0, a1, a2, a3, a4) _Py_Assign(a0, a1, a2, a3, a4) stmt_ty _Py_Assign(asdl_seq * targets, expr_ty value, int lineno, int col_offset, PyArena *arena); #define AugAssign(a0, a1, a2, a3, a4, a5) _Py_AugAssign(a0, a1, a2, a3, a4, a5) stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int lineno, int col_offset, PyArena *arena); #define Print(a0, a1, a2, a3, a4, a5) _Py_Print(a0, a1, a2, a3, a4, a5) stmt_ty _Py_Print(expr_ty dest, asdl_seq * values, bool nl, int lineno, int col_offset, PyArena *arena); #define For(a0, a1, a2, a3, a4, a5, a6) _Py_For(a0, a1, a2, a3, a4, a5, a6) stmt_ty _Py_For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse, int lineno, int col_offset, PyArena *arena); #define While(a0, a1, a2, a3, a4, a5) _Py_While(a0, a1, a2, a3, a4, a5) stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int col_offset, PyArena *arena); #define If(a0, a1, a2, a3, a4, a5) _Py_If(a0, a1, a2, a3, a4, a5) stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int col_offset, PyArena *arena); #define With(a0, a1, a2, a3, a4, a5) _Py_With(a0, a1, a2, a3, a4, a5) stmt_ty _Py_With(expr_ty context_expr, expr_ty optional_vars, asdl_seq * body, int lineno, int col_offset, PyArena *arena); #define Raise(a0, a1, a2, a3, a4, a5) _Py_Raise(a0, a1, a2, a3, a4, a5) stmt_ty _Py_Raise(expr_ty type, expr_ty inst, expr_ty tback, int lineno, int col_offset, PyArena *arena); #define TryExcept(a0, a1, a2, a3, a4, a5) _Py_TryExcept(a0, a1, a2, a3, a4, a5) stmt_ty _Py_TryExcept(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse, int lineno, int col_offset, PyArena *arena); #define TryFinally(a0, a1, a2, a3, a4) _Py_TryFinally(a0, a1, a2, a3, a4) stmt_ty _Py_TryFinally(asdl_seq * body, asdl_seq * finalbody, int lineno, int col_offset, PyArena *arena); #define Assert(a0, a1, a2, a3, a4) _Py_Assert(a0, a1, a2, a3, a4) stmt_ty _Py_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, PyArena *arena); #define Import(a0, a1, a2, a3) _Py_Import(a0, a1, a2, a3) stmt_ty _Py_Import(asdl_seq * names, int lineno, int col_offset, PyArena *arena); #define ImportFrom(a0, a1, a2, a3, a4, a5) _Py_ImportFrom(a0, a1, a2, a3, a4, a5) stmt_ty _Py_ImportFrom(identifier module, asdl_seq * names, int level, int lineno, int col_offset, PyArena *arena); #define Exec(a0, a1, a2, a3, a4, a5) _Py_Exec(a0, a1, a2, a3, a4, a5) stmt_ty _Py_Exec(expr_ty body, expr_ty globals, expr_ty locals, int lineno, int col_offset, PyArena *arena); #define Global(a0, a1, a2, a3) _Py_Global(a0, a1, a2, a3) stmt_ty _Py_Global(asdl_seq * names, int lineno, int col_offset, PyArena *arena); #define Expr(a0, a1, a2, a3) _Py_Expr(a0, a1, a2, a3) stmt_ty _Py_Expr(expr_ty value, int lineno, int col_offset, PyArena *arena); #define Pass(a0, a1, a2) _Py_Pass(a0, a1, a2) stmt_ty _Py_Pass(int lineno, int col_offset, PyArena *arena); #define Break(a0, a1, a2) _Py_Break(a0, a1, a2) stmt_ty _Py_Break(int lineno, int col_offset, PyArena *arena); #define Continue(a0, a1, a2) _Py_Continue(a0, a1, a2) stmt_ty _Py_Continue(int lineno, int col_offset, PyArena *arena); #define BoolOp(a0, a1, a2, a3, a4) _Py_BoolOp(a0, a1, a2, a3, a4) expr_ty _Py_BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset, PyArena *arena); #define BinOp(a0, a1, a2, a3, a4, a5) _Py_BinOp(a0, a1, a2, a3, a4, a5) expr_ty _Py_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int col_offset, PyArena *arena); #define UnaryOp(a0, a1, a2, a3, a4) _Py_UnaryOp(a0, a1, a2, a3, a4) expr_ty _Py_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset, PyArena *arena); #define Lambda(a0, a1, a2, a3, a4) _Py_Lambda(a0, a1, a2, a3, a4) expr_ty _Py_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, PyArena *arena); #define IfExp(a0, a1, a2, a3, a4, a5) _Py_IfExp(a0, a1, a2, a3, a4, a5) expr_ty _Py_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int col_offset, PyArena *arena); #define Dict(a0, a1, a2, a3, a4) _Py_Dict(a0, a1, a2, a3, a4) expr_ty _Py_Dict(asdl_seq * keys, asdl_seq * values, int lineno, int col_offset, PyArena *arena); #define Set(a0, a1, a2, a3) _Py_Set(a0, a1, a2, a3) expr_ty _Py_Set(asdl_seq * elts, int lineno, int col_offset, PyArena *arena); #define ListComp(a0, a1, a2, a3, a4) _Py_ListComp(a0, a1, a2, a3, a4) expr_ty _Py_ListComp(expr_ty elt, asdl_seq * generators, int lineno, int col_offset, PyArena *arena); #define SetComp(a0, a1, a2, a3, a4) _Py_SetComp(a0, a1, a2, a3, a4) expr_ty _Py_SetComp(expr_ty elt, asdl_seq * generators, int lineno, int col_offset, PyArena *arena); #define DictComp(a0, a1, a2, a3, a4, a5) _Py_DictComp(a0, a1, a2, a3, a4, a5) expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int lineno, int col_offset, PyArena *arena); #define GeneratorExp(a0, a1, a2, a3, a4) _Py_GeneratorExp(a0, a1, a2, a3, a4) expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int col_offset, PyArena *arena); #define Yield(a0, a1, a2, a3) _Py_Yield(a0, a1, a2, a3) expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, PyArena *arena); #define Compare(a0, a1, a2, a3, a4, a5) _Py_Compare(a0, a1, a2, a3, a4, a5) expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators, int lineno, int col_offset, PyArena *arena); #define Call(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Call(a0, a1, a2, a3, a4, a5, a6, a7) expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty starargs, expr_ty kwargs, int lineno, int col_offset, PyArena *arena); #define Repr(a0, a1, a2, a3) _Py_Repr(a0, a1, a2, a3) expr_ty _Py_Repr(expr_ty value, int lineno, int col_offset, PyArena *arena); #define Num(a0, a1, a2, a3) _Py_Num(a0, a1, a2, a3) expr_ty _Py_Num(object n, int lineno, int col_offset, PyArena *arena); #define Str(a0, a1, a2, a3) _Py_Str(a0, a1, a2, a3) expr_ty _Py_Str(string s, int lineno, int col_offset, PyArena *arena); #define Attribute(a0, a1, a2, a3, a4, a5) _Py_Attribute(a0, a1, a2, a3, a4, a5) expr_ty _Py_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int lineno, int col_offset, PyArena *arena); #define Subscript(a0, a1, a2, a3, a4, a5) _Py_Subscript(a0, a1, a2, a3, a4, a5) expr_ty _Py_Subscript(expr_ty value, slice_ty slice, expr_context_ty ctx, int lineno, int col_offset, PyArena *arena); #define Name(a0, a1, a2, a3, a4) _Py_Name(a0, a1, a2, a3, a4) expr_ty _Py_Name(identifier id, expr_context_ty ctx, int lineno, int col_offset, PyArena *arena); #define List(a0, a1, a2, a3, a4) _Py_List(a0, a1, a2, a3, a4) expr_ty _Py_List(asdl_seq * elts, expr_context_ty ctx, int lineno, int col_offset, PyArena *arena); #define Tuple(a0, a1, a2, a3, a4) _Py_Tuple(a0, a1, a2, a3, a4) expr_ty _Py_Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int col_offset, PyArena *arena); #define Ellipsis(a0) _Py_Ellipsis(a0) slice_ty _Py_Ellipsis(PyArena *arena); #define Slice(a0, a1, a2, a3) _Py_Slice(a0, a1, a2, a3) slice_ty _Py_Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena); #define ExtSlice(a0, a1) _Py_ExtSlice(a0, a1) slice_ty _Py_ExtSlice(asdl_seq * dims, PyArena *arena); #define Index(a0, a1) _Py_Index(a0, a1) slice_ty _Py_Index(expr_ty value, PyArena *arena); #define comprehension(a0, a1, a2, a3) _Py_comprehension(a0, a1, a2, a3) comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq * ifs, PyArena *arena); #define ExceptHandler(a0, a1, a2, a3, a4, a5) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5) excepthandler_ty _Py_ExceptHandler(expr_ty type, expr_ty name, asdl_seq * body, int lineno, int col_offset, PyArena *arena); #define arguments(a0, a1, a2, a3, a4) _Py_arguments(a0, a1, a2, a3, a4) arguments_ty _Py_arguments(asdl_seq * args, identifier vararg, identifier kwarg, asdl_seq * defaults, PyArena *arena); #define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2) keyword_ty _Py_keyword(identifier arg, expr_ty value, PyArena *arena); #define alias(a0, a1, a2) _Py_alias(a0, a1, a2) alias_ty _Py_alias(identifier name, identifier asname, PyArena *arena); PyObject* PyAST_mod2obj(mod_ty t); mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode); int PyAST_Check(PyObject* obj); PKZ)y y python2.7/datetime.hnu[/* datetime.h */ #ifndef DATETIME_H #define DATETIME_H #ifdef __cplusplus extern "C" { #endif /* Fields are packed into successive bytes, each viewed as unsigned and * big-endian, unless otherwise noted: * * byte offset * 0 year 2 bytes, 1-9999 * 2 month 1 byte, 1-12 * 3 day 1 byte, 1-31 * 4 hour 1 byte, 0-23 * 5 minute 1 byte, 0-59 * 6 second 1 byte, 0-59 * 7 usecond 3 bytes, 0-999999 * 10 */ /* # of bytes for year, month, and day. */ #define _PyDateTime_DATE_DATASIZE 4 /* # of bytes for hour, minute, second, and usecond. */ #define _PyDateTime_TIME_DATASIZE 6 /* # of bytes for year, month, day, hour, minute, second, and usecond. */ #define _PyDateTime_DATETIME_DATASIZE 10 typedef struct { PyObject_HEAD long hashcode; /* -1 when unknown */ int days; /* -MAX_DELTA_DAYS <= days <= MAX_DELTA_DAYS */ int seconds; /* 0 <= seconds < 24*3600 is invariant */ int microseconds; /* 0 <= microseconds < 1000000 is invariant */ } PyDateTime_Delta; typedef struct { PyObject_HEAD /* a pure abstract base class */ } PyDateTime_TZInfo; /* The datetime and time types have hashcodes, and an optional tzinfo member, * present if and only if hastzinfo is true. */ #define _PyTZINFO_HEAD \ PyObject_HEAD \ long hashcode; \ char hastzinfo; /* boolean flag */ /* No _PyDateTime_BaseTZInfo is allocated; it's just to have something * convenient to cast to, when getting at the hastzinfo member of objects * starting with _PyTZINFO_HEAD. */ typedef struct { _PyTZINFO_HEAD } _PyDateTime_BaseTZInfo; /* All time objects are of PyDateTime_TimeType, but that can be allocated * in two ways, with or without a tzinfo member. Without is the same as * tzinfo == None, but consumes less memory. _PyDateTime_BaseTime is an * internal struct used to allocate the right amount of space for the * "without" case. */ #define _PyDateTime_TIMEHEAD \ _PyTZINFO_HEAD \ unsigned char data[_PyDateTime_TIME_DATASIZE]; typedef struct { _PyDateTime_TIMEHEAD } _PyDateTime_BaseTime; /* hastzinfo false */ typedef struct { _PyDateTime_TIMEHEAD PyObject *tzinfo; } PyDateTime_Time; /* hastzinfo true */ /* All datetime objects are of PyDateTime_DateTimeType, but that can be * allocated in two ways too, just like for time objects above. In addition, * the plain date type is a base class for datetime, so it must also have * a hastzinfo member (although it's unused there). */ typedef struct { _PyTZINFO_HEAD unsigned char data[_PyDateTime_DATE_DATASIZE]; } PyDateTime_Date; #define _PyDateTime_DATETIMEHEAD \ _PyTZINFO_HEAD \ unsigned char data[_PyDateTime_DATETIME_DATASIZE]; typedef struct { _PyDateTime_DATETIMEHEAD } _PyDateTime_BaseDateTime; /* hastzinfo false */ typedef struct { _PyDateTime_DATETIMEHEAD PyObject *tzinfo; } PyDateTime_DateTime; /* hastzinfo true */ /* Apply for date and datetime instances. */ #define PyDateTime_GET_YEAR(o) ((((PyDateTime_Date*)o)->data[0] << 8) | \ ((PyDateTime_Date*)o)->data[1]) #define PyDateTime_GET_MONTH(o) (((PyDateTime_Date*)o)->data[2]) #define PyDateTime_GET_DAY(o) (((PyDateTime_Date*)o)->data[3]) #define PyDateTime_DATE_GET_HOUR(o) (((PyDateTime_DateTime*)o)->data[4]) #define PyDateTime_DATE_GET_MINUTE(o) (((PyDateTime_DateTime*)o)->data[5]) #define PyDateTime_DATE_GET_SECOND(o) (((PyDateTime_DateTime*)o)->data[6]) #define PyDateTime_DATE_GET_MICROSECOND(o) \ ((((PyDateTime_DateTime*)o)->data[7] << 16) | \ (((PyDateTime_DateTime*)o)->data[8] << 8) | \ ((PyDateTime_DateTime*)o)->data[9]) /* Apply for time instances. */ #define PyDateTime_TIME_GET_HOUR(o) (((PyDateTime_Time*)o)->data[0]) #define PyDateTime_TIME_GET_MINUTE(o) (((PyDateTime_Time*)o)->data[1]) #define PyDateTime_TIME_GET_SECOND(o) (((PyDateTime_Time*)o)->data[2]) #define PyDateTime_TIME_GET_MICROSECOND(o) \ ((((PyDateTime_Time*)o)->data[3] << 16) | \ (((PyDateTime_Time*)o)->data[4] << 8) | \ ((PyDateTime_Time*)o)->data[5]) /* Define structure for C API. */ typedef struct { /* type objects */ PyTypeObject *DateType; PyTypeObject *DateTimeType; PyTypeObject *TimeType; PyTypeObject *DeltaType; PyTypeObject *TZInfoType; /* constructors */ PyObject *(*Date_FromDate)(int, int, int, PyTypeObject*); PyObject *(*DateTime_FromDateAndTime)(int, int, int, int, int, int, int, PyObject*, PyTypeObject*); PyObject *(*Time_FromTime)(int, int, int, int, PyObject*, PyTypeObject*); PyObject *(*Delta_FromDelta)(int, int, int, int, PyTypeObject*); /* constructors for the DB API */ PyObject *(*DateTime_FromTimestamp)(PyObject*, PyObject*, PyObject*); PyObject *(*Date_FromTimestamp)(PyObject*, PyObject*); } PyDateTime_CAPI; #define PyDateTime_CAPSULE_NAME "datetime.datetime_CAPI" /* "magic" constant used to partially protect against developer mistakes. */ #define DATETIME_API_MAGIC 0x414548d5 #ifdef Py_BUILD_CORE /* Macros for type checking when building the Python core. */ #define PyDate_Check(op) PyObject_TypeCheck(op, &PyDateTime_DateType) #define PyDate_CheckExact(op) (Py_TYPE(op) == &PyDateTime_DateType) #define PyDateTime_Check(op) PyObject_TypeCheck(op, &PyDateTime_DateTimeType) #define PyDateTime_CheckExact(op) (Py_TYPE(op) == &PyDateTime_DateTimeType) #define PyTime_Check(op) PyObject_TypeCheck(op, &PyDateTime_TimeType) #define PyTime_CheckExact(op) (Py_TYPE(op) == &PyDateTime_TimeType) #define PyDelta_Check(op) PyObject_TypeCheck(op, &PyDateTime_DeltaType) #define PyDelta_CheckExact(op) (Py_TYPE(op) == &PyDateTime_DeltaType) #define PyTZInfo_Check(op) PyObject_TypeCheck(op, &PyDateTime_TZInfoType) #define PyTZInfo_CheckExact(op) (Py_TYPE(op) == &PyDateTime_TZInfoType) #else /* Define global variable for the C API and a macro for setting it. */ static PyDateTime_CAPI *PyDateTimeAPI = NULL; #define PyDateTime_IMPORT \ PyDateTimeAPI = (PyDateTime_CAPI *)PyCapsule_Import(PyDateTime_CAPSULE_NAME, 0) /* Macros for type checking when not building the Python core. */ #define PyDate_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DateType) #define PyDate_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateType) #define PyDateTime_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DateTimeType) #define PyDateTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateTimeType) #define PyTime_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->TimeType) #define PyTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TimeType) #define PyDelta_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DeltaType) #define PyDelta_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DeltaType) #define PyTZInfo_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->TZInfoType) #define PyTZInfo_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TZInfoType) /* Macros for accessing constructors in a simplified fashion. */ #define PyDate_FromDate(year, month, day) \ PyDateTimeAPI->Date_FromDate(year, month, day, PyDateTimeAPI->DateType) #define PyDateTime_FromDateAndTime(year, month, day, hour, min, sec, usec) \ PyDateTimeAPI->DateTime_FromDateAndTime(year, month, day, hour, \ min, sec, usec, Py_None, PyDateTimeAPI->DateTimeType) #define PyTime_FromTime(hour, minute, second, usecond) \ PyDateTimeAPI->Time_FromTime(hour, minute, second, usecond, \ Py_None, PyDateTimeAPI->TimeType) #define PyDelta_FromDSU(days, seconds, useconds) \ PyDateTimeAPI->Delta_FromDelta(days, seconds, useconds, 1, \ PyDateTimeAPI->DeltaType) /* Macros supporting the DB API. */ #define PyDateTime_FromTimestamp(args) \ PyDateTimeAPI->DateTime_FromTimestamp( \ (PyObject*) (PyDateTimeAPI->DateTimeType), args, NULL) #define PyDate_FromTimestamp(args) \ PyDateTimeAPI->Date_FromTimestamp( \ (PyObject*) (PyDateTimeAPI->DateType), args) #endif /* Py_BUILD_CORE */ #ifdef __cplusplus } #endif #endif PKZb,python2.7/pycapsule.hnu[ /* Capsule objects let you wrap a C "void *" pointer in a Python object. They're a way of passing data through the Python interpreter without creating your own custom type. Capsules are used for communication between extension modules. They provide a way for an extension module to export a C interface to other extension modules, so that extension modules can use the Python import mechanism to link to one another. For more information, please see "c-api/capsule.html" in the documentation. */ #ifndef Py_CAPSULE_H #define Py_CAPSULE_H #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(PyTypeObject) PyCapsule_Type; typedef void (*PyCapsule_Destructor)(PyObject *); #define PyCapsule_CheckExact(op) (Py_TYPE(op) == &PyCapsule_Type) PyAPI_FUNC(PyObject *) PyCapsule_New( void *pointer, const char *name, PyCapsule_Destructor destructor); PyAPI_FUNC(void *) PyCapsule_GetPointer(PyObject *capsule, const char *name); PyAPI_FUNC(PyCapsule_Destructor) PyCapsule_GetDestructor(PyObject *capsule); PyAPI_FUNC(const char *) PyCapsule_GetName(PyObject *capsule); PyAPI_FUNC(void *) PyCapsule_GetContext(PyObject *capsule); PyAPI_FUNC(int) PyCapsule_IsValid(PyObject *capsule, const char *name); PyAPI_FUNC(int) PyCapsule_SetPointer(PyObject *capsule, void *pointer); PyAPI_FUNC(int) PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor); PyAPI_FUNC(int) PyCapsule_SetName(PyObject *capsule, const char *name); PyAPI_FUNC(int) PyCapsule_SetContext(PyObject *capsule, void *context); PyAPI_FUNC(void *) PyCapsule_Import(const char *name, int no_block); #ifdef __cplusplus } #endif #endif /* !Py_CAPSULE_H */ PKZ[cpython2.7/pyconfig-64.hnu[/* pyconfig.h. Generated from pyconfig.h.in by configure. */ /* pyconfig.h.in. Generated from configure.ac by autoheader. */ #ifndef Py_PYCONFIG_H #define Py_PYCONFIG_H /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want support for AIX C++ shared extension modules. */ /* #undef AIX_GENUINE_CPLUSPLUS */ /* Define this if you have AtheOS threads. */ /* #undef ATHEOS_THREADS */ /* Define this if you have BeOS threads. */ /* #undef BEOS_THREADS */ /* Define to keep records on function call invocation */ /* #undef CALL_PROFILE */ /* Define to keep records of the number of instances of each type */ /* #undef COUNT_ALLOCS */ /* Define if you have the Mach cthreads package */ /* #undef C_THREADS */ /* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM mixed-endian order (byte order 45670123) */ /* #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 */ /* Define if C doubles are 64-bit IEEE 754 binary format, stored with the most significant byte first */ /* #undef DOUBLE_IS_BIG_ENDIAN_IEEE754 */ /* Define if C doubles are 64-bit IEEE 754 binary format, stored with the least significant byte first */ #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1 /* Define if --enable-ipv6 is specified */ #define ENABLE_IPV6 1 /* Define if flock needs to be linked with bsd library. */ /* #undef FLOCK_NEEDS_LIBBSD */ /* Define if getpgrp() must be called as getpgrp(0). */ /* #undef GETPGRP_HAVE_ARG */ /* Define if gettimeofday() does not have second (timezone) argument This is the case on Motorola V4 (R40V4.2) */ /* #undef GETTIMEOFDAY_NO_TZ */ /* Define to 1 if you have the `acosh' function. */ #define HAVE_ACOSH 1 /* struct addrinfo (netdb.h) */ #define HAVE_ADDRINFO 1 /* Define to 1 if you have the `alarm' function. */ #define HAVE_ALARM 1 /* Define to 1 if you have the header file. */ #define HAVE_ALLOCA_H 1 /* Define this if your time.h defines altzone. */ /* #undef HAVE_ALTZONE */ /* Define to 1 if you have the `asinh' function. */ #define HAVE_ASINH 1 /* Define to 1 if you have the header file. */ #define HAVE_ASM_TYPES_H 1 /* Define to 1 if you have the `atanh' function. */ #define HAVE_ATANH 1 /* Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3))) */ /* #undef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE */ /* Define to 1 if bind_textdomain_codeset is available. */ #define HAVE_BIND_TEXTDOMAIN_CODESET 1 /* Define to 1 if you have the header file. */ #define HAVE_BLUETOOTH_BLUETOOTH_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_BLUETOOTH_H */ /* Define if nice() returns success/failure instead of the new priority. */ /* #undef HAVE_BROKEN_NICE */ /* Define if the system reports an invalid PIPE_BUF value. */ /* #undef HAVE_BROKEN_PIPE_BUF */ /* Define if poll() sets errno on invalid file descriptors. */ /* #undef HAVE_BROKEN_POLL */ /* Define if the Posix semaphores do not work on your system */ /* #undef HAVE_BROKEN_POSIX_SEMAPHORES */ /* Define if pthread_sigmask() does not work on your system. */ /* #undef HAVE_BROKEN_PTHREAD_SIGMASK */ /* define to 1 if your sem_getvalue is broken. */ /* #undef HAVE_BROKEN_SEM_GETVALUE */ /* Define if `unsetenv` does not return an int. */ /* #undef HAVE_BROKEN_UNSETENV */ /* Define this if you have the type _Bool. */ #define HAVE_C99_BOOL 1 /* Define to 1 if you have the 'chflags' function. */ /* #undef HAVE_CHFLAGS */ /* Define to 1 if you have the `chown' function. */ #define HAVE_CHOWN 1 /* Define if you have the 'chroot' function. */ #define HAVE_CHROOT 1 /* Define to 1 if you have the `clock' function. */ #define HAVE_CLOCK 1 /* Define if the C compiler supports computed gotos. */ #define HAVE_COMPUTED_GOTOS 1 /* Define to 1 if you have the `confstr' function. */ #define HAVE_CONFSTR 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_CONIO_H */ /* Define to 1 if you have the `copysign' function. */ #define HAVE_COPYSIGN 1 /* Define to 1 if you have the header file. */ #define HAVE_CRYPT_H 1 /* Define to 1 if you have the `ctermid' function. */ #define HAVE_CTERMID 1 /* Define if you have the 'ctermid_r' function. */ /* #undef HAVE_CTERMID_R */ /* Define if you have the 'filter' function. */ #define HAVE_CURSES_FILTER 1 /* Define to 1 if you have the header file. */ #define HAVE_CURSES_H 1 /* Define if you have the 'has_key' function. */ #define HAVE_CURSES_HAS_KEY 1 /* Define if you have the 'immedok' function. */ #define HAVE_CURSES_IMMEDOK 1 /* Define if you have the 'is_pad' function or macro. */ #define HAVE_CURSES_IS_PAD 1 /* Define if you have the 'is_term_resized' function. */ #define HAVE_CURSES_IS_TERM_RESIZED 1 /* Define if you have the 'resizeterm' function. */ #define HAVE_CURSES_RESIZETERM 1 /* Define if you have the 'resize_term' function. */ #define HAVE_CURSES_RESIZE_TERM 1 /* Define if you have the 'syncok' function. */ #define HAVE_CURSES_SYNCOK 1 /* Define if you have the 'typeahead' function. */ #define HAVE_CURSES_TYPEAHEAD 1 /* Define if you have the 'use_env' function. */ #define HAVE_CURSES_USE_ENV 1 /* Define if you have the 'wchgat' function. */ #define HAVE_CURSES_WCHGAT 1 /* Define to 1 if you have the declaration of `isfinite', and to 0 if you don't. */ #define HAVE_DECL_ISFINITE 1 /* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. */ #define HAVE_DECL_ISINF 1 /* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. */ #define HAVE_DECL_ISNAN 1 /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ /* #undef HAVE_DECL_TZNAME */ /* Define to 1 if you have the device macros. */ #define HAVE_DEVICE_MACROS 1 /* Define to 1 if you have the /dev/ptc device file. */ /* #undef HAVE_DEV_PTC */ /* Define to 1 if you have the /dev/ptmx device file. */ #define HAVE_DEV_PTMX 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_DIRECT_H */ /* Define to 1 if you have the header file, and it defines `DIR'. */ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the `dlopen' function. */ #define HAVE_DLOPEN 1 /* Define to 1 if you have the `dup2' function. */ #define HAVE_DUP2 1 /* Defined when any dynamic module loading is enabled. */ #define HAVE_DYNAMIC_LOADING 1 /* Define if you have the 'epoll' functions. */ #define HAVE_EPOLL 1 /* Define to 1 if you have the `erf' function. */ #define HAVE_ERF 1 /* Define to 1 if you have the `erfc' function. */ #define HAVE_ERFC 1 /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the `execv' function. */ #define HAVE_EXECV 1 /* Define to 1 if you have the `expm1' function. */ #define HAVE_EXPM1 1 /* Define if you have the 'fchdir' function. */ #define HAVE_FCHDIR 1 /* Define to 1 if you have the `fchmod' function. */ #define HAVE_FCHMOD 1 /* Define to 1 if you have the `fchown' function. */ #define HAVE_FCHOWN 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define if you have the 'fdatasync' function. */ #define HAVE_FDATASYNC 1 /* Define to 1 if you have the `finite' function. */ #define HAVE_FINITE 1 /* Define to 1 if you have the `flock' function. */ #define HAVE_FLOCK 1 /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 /* Define to 1 if you have the `forkpty' function. */ #define HAVE_FORKPTY 1 /* Define to 1 if you have the `fpathconf' function. */ #define HAVE_FPATHCONF 1 /* Define to 1 if you have the `fseek64' function. */ /* #undef HAVE_FSEEK64 */ /* Define to 1 if you have the `fseeko' function. */ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `fstatvfs' function. */ #define HAVE_FSTATVFS 1 /* Define if you have the 'fsync' function. */ #define HAVE_FSYNC 1 /* Define to 1 if you have the `ftell64' function. */ /* #undef HAVE_FTELL64 */ /* Define to 1 if you have the `ftello' function. */ #define HAVE_FTELLO 1 /* Define to 1 if you have the `ftime' function. */ #define HAVE_FTIME 1 /* Define to 1 if you have the `ftruncate' function. */ #define HAVE_FTRUNCATE 1 /* Define to 1 if you have the `gai_strerror' function. */ #define HAVE_GAI_STRERROR 1 /* Define to 1 if you have the `gamma' function. */ #define HAVE_GAMMA 1 /* Define if we can use gcc inline assembler to get and set x87 control word */ #define HAVE_GCC_ASM_FOR_X87 1 /* Define if you have the getaddrinfo function. */ #define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */ #define HAVE_GETC_UNLOCKED 1 /* Define to 1 if you have the `getentropy' function. */ #define HAVE_GETENTROPY 1 /* Define to 1 if you have the `getgroups' function. */ #define HAVE_GETGROUPS 1 /* Define to 1 if you have the `gethostbyname' function. */ /* #undef HAVE_GETHOSTBYNAME */ /* Define this if you have some version of gethostbyname_r() */ #define HAVE_GETHOSTBYNAME_R 1 /* Define this if you have the 3-arg version of gethostbyname_r(). */ /* #undef HAVE_GETHOSTBYNAME_R_3_ARG */ /* Define this if you have the 5-arg version of gethostbyname_r(). */ /* #undef HAVE_GETHOSTBYNAME_R_5_ARG */ /* Define this if you have the 6-arg version of gethostbyname_r(). */ #define HAVE_GETHOSTBYNAME_R_6_ARG 1 /* Define to 1 if you have the `getitimer' function. */ #define HAVE_GETITIMER 1 /* Define to 1 if you have the `getloadavg' function. */ #define HAVE_GETLOADAVG 1 /* Define to 1 if you have the `getlogin' function. */ #define HAVE_GETLOGIN 1 /* Define to 1 if you have the `getnameinfo' function. */ #define HAVE_GETNAMEINFO 1 /* Define if you have the 'getpagesize' function. */ #define HAVE_GETPAGESIZE 1 /* Define to 1 if you have the `getpeername' function. */ #define HAVE_GETPEERNAME 1 /* Define to 1 if you have the `getpgid' function. */ #define HAVE_GETPGID 1 /* Define to 1 if you have the `getpgrp' function. */ #define HAVE_GETPGRP 1 /* Define to 1 if you have the `getpid' function. */ #define HAVE_GETPID 1 /* Define to 1 if you have the `getpriority' function. */ #define HAVE_GETPRIORITY 1 /* Define to 1 if you have the `getpwent' function. */ #define HAVE_GETPWENT 1 /* Define to 1 if you have the `getresgid' function. */ #define HAVE_GETRESGID 1 /* Define to 1 if you have the `getresuid' function. */ #define HAVE_GETRESUID 1 /* Define to 1 if you have the `getsid' function. */ #define HAVE_GETSID 1 /* Define to 1 if you have the `getspent' function. */ #define HAVE_GETSPENT 1 /* Define to 1 if you have the `getspnam' function. */ #define HAVE_GETSPNAM 1 /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the `getwd' function. */ #define HAVE_GETWD 1 /* Define to 1 if you have the header file. */ #define HAVE_GRP_H 1 /* Define if you have the 'hstrerror' function. */ #define HAVE_HSTRERROR 1 /* Define to 1 if you have the `hypot' function. */ #define HAVE_HYPOT 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_IEEEFP_H */ /* Define if you have the 'inet_aton' function. */ #define HAVE_INET_ATON 1 /* Define if you have the 'inet_pton' function. */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the `initgroups' function. */ #define HAVE_INITGROUPS 1 /* Define if your compiler provides int32_t. */ #define HAVE_INT32_T 1 /* Define if your compiler provides int64_t. */ #define HAVE_INT64_T 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_IO_H */ /* Define to 1 if you have the `kill' function. */ #define HAVE_KILL 1 /* Define to 1 if you have the `killpg' function. */ #define HAVE_KILLPG 1 /* Define if you have the 'kqueue' functions. */ /* #undef HAVE_KQUEUE */ /* Define to 1 if you have the header file. */ #define HAVE_LANGINFO_H 1 /* Defined to enable large file support when an off_t is bigger than a long and long long is available and at least as big as an off_t. You may need to add some flags for configuration and compilation to enable this mode. (For Solaris and Linux, the necessary defines are already defined.) */ /* #undef HAVE_LARGEFILE_SUPPORT */ /* Define to 1 if you have the 'lchflags' function. */ /* #undef HAVE_LCHFLAGS */ /* Define to 1 if you have the `lchmod' function. */ /* #undef HAVE_LCHMOD */ /* Define to 1 if you have the `lchown' function. */ #define HAVE_LCHOWN 1 /* Define to 1 if you have the `lgamma' function. */ #define HAVE_LGAMMA 1 /* Define to 1 if you have the `dl' library (-ldl). */ #define HAVE_LIBDL 1 /* Define to 1 if you have the `dld' library (-ldld). */ /* #undef HAVE_LIBDLD */ /* Define to 1 if you have the `ieee' library (-lieee). */ /* #undef HAVE_LIBIEEE */ /* Define to 1 if you have the header file. */ #define HAVE_LIBINTL_H 1 /* Define if you have the readline library (-lreadline). */ #define HAVE_LIBREADLINE 1 /* Define to 1 if you have the `resolv' library (-lresolv). */ /* #undef HAVE_LIBRESOLV */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBUTIL_H */ /* Define if you have the 'link' function. */ #define HAVE_LINK 1 /* Define to 1 if you have the header file. */ #define HAVE_LINUX_NETLINK_H 1 /* Define to 1 if you have the header file. */ #define HAVE_LINUX_TIPC_H 1 /* Define to 1 if you have the `log1p' function. */ #define HAVE_LOG1P 1 /* Define this if you have the type long double. */ #define HAVE_LONG_DOUBLE 1 /* Define this if you have the type long long. */ #define HAVE_LONG_LONG 1 /* Define to 1 if you have the `lstat' function. */ #define HAVE_LSTAT 1 /* Define this if you have the makedev macro. */ #define HAVE_MAKEDEV 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `mkfifo' function. */ #define HAVE_MKFIFO 1 /* Define to 1 if you have the `mknod' function. */ #define HAVE_MKNOD 1 /* Define to 1 if you have the `mktime' function. */ #define HAVE_MKTIME 1 /* Define to 1 if you have the `mmap' function. */ #define HAVE_MMAP 1 /* Define to 1 if you have the `mremap' function. */ #define HAVE_MREMAP 1 /* Define to 1 if you have the header file. */ #define HAVE_NCURSES_H 1 /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETPACKET_PACKET_H 1 /* Define to 1 if you have the `nice' function. */ #define HAVE_NICE 1 /* Define to 1 if you have the `openpty' function. */ #define HAVE_OPENPTY 1 /* Define if compiling using MacOS X 10.5 SDK or later. */ /* #undef HAVE_OSX105_SDK */ /* Define to 1 if you have the `pathconf' function. */ #define HAVE_PATHCONF 1 /* Define to 1 if you have the `pause' function. */ #define HAVE_PAUSE 1 /* Define to 1 if you have the `plock' function. */ /* #undef HAVE_PLOCK */ /* Define to 1 if you have the `poll' function. */ #define HAVE_POLL 1 /* Define to 1 if you have the header file. */ #define HAVE_POLL_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PROCESS_H */ /* Define if your compiler supports function prototype */ #define HAVE_PROTOTYPES 1 /* Define if you have GNU PTH threads. */ /* #undef HAVE_PTH */ /* Define to 1 if you have the `pthread_atfork' function. */ #define HAVE_PTHREAD_ATFORK 1 /* Defined for Solaris 2.6 bug in pthread header. */ /* #undef HAVE_PTHREAD_DESTRUCTOR */ /* Define to 1 if you have the header file. */ #define HAVE_PTHREAD_H 1 /* Define to 1 if you have the `pthread_init' function. */ /* #undef HAVE_PTHREAD_INIT */ /* Define to 1 if you have the `pthread_sigmask' function. */ #define HAVE_PTHREAD_SIGMASK 1 /* Define to 1 if you have the header file. */ #define HAVE_PTY_H 1 /* Define to 1 if you have the `putenv' function. */ #define HAVE_PUTENV 1 /* Define to 1 if you have the `readlink' function. */ #define HAVE_READLINK 1 /* Define to 1 if you have the `realpath' function. */ #define HAVE_REALPATH 1 /* Define if you have readline 2.1 */ #define HAVE_RL_CALLBACK 1 /* Define if you can turn off readline's signal handling. */ #define HAVE_RL_CATCH_SIGNAL 1 /* Define if you have readline 2.2 */ #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1 /* Define if you have readline 4.0 */ #define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1 /* Define if you have readline 4.2 */ #define HAVE_RL_COMPLETION_MATCHES 1 /* Define if you have rl_completion_suppress_append */ #define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1 /* Define if you have readline 4.0 */ #define HAVE_RL_PRE_INPUT_HOOK 1 /* Define if you have readline 4.0 */ #define HAVE_RL_RESIZE_TERMINAL 1 /* Define to 1 if you have the `round' function. */ #define HAVE_ROUND 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if you have the `sem_getvalue' function. */ #define HAVE_SEM_GETVALUE 1 /* Define to 1 if you have the `sem_open' function. */ #define HAVE_SEM_OPEN 1 /* Define to 1 if you have the `sem_timedwait' function. */ #define HAVE_SEM_TIMEDWAIT 1 /* Define to 1 if you have the `sem_unlink' function. */ #define HAVE_SEM_UNLINK 1 /* Define to 1 if you have the `setegid' function. */ #define HAVE_SETEGID 1 /* Define to 1 if you have the `seteuid' function. */ #define HAVE_SETEUID 1 /* Define to 1 if you have the `setgid' function. */ #define HAVE_SETGID 1 /* Define if you have the 'setgroups' function. */ #define HAVE_SETGROUPS 1 /* Define to 1 if you have the `setitimer' function. */ #define HAVE_SETITIMER 1 /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 /* Define to 1 if you have the `setpgid' function. */ #define HAVE_SETPGID 1 /* Define to 1 if you have the `setpgrp' function. */ #define HAVE_SETPGRP 1 /* Define to 1 if you have the `setregid' function. */ #define HAVE_SETREGID 1 /* Define to 1 if you have the `setresgid' function. */ #define HAVE_SETRESGID 1 /* Define to 1 if you have the `setresuid' function. */ #define HAVE_SETRESUID 1 /* Define to 1 if you have the `setreuid' function. */ #define HAVE_SETREUID 1 /* Define to 1 if you have the `setsid' function. */ #define HAVE_SETSID 1 /* Define to 1 if you have the `setuid' function. */ #define HAVE_SETUID 1 /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 /* Define to 1 if you have the header file. */ #define HAVE_SHADOW_H 1 /* Define to 1 if you have the `sigaction' function. */ #define HAVE_SIGACTION 1 /* Define to 1 if you have the `siginterrupt' function. */ #define HAVE_SIGINTERRUPT 1 /* Define to 1 if you have the header file. */ #define HAVE_SIGNAL_H 1 /* Define to 1 if you have the `sigrelse' function. */ #define HAVE_SIGRELSE 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define if sockaddr has sa_len member */ /* #undef HAVE_SOCKADDR_SA_LEN */ /* struct sockaddr_storage (sys/socket.h) */ #define HAVE_SOCKADDR_STORAGE 1 /* Define if you have the 'socketpair' function. */ #define HAVE_SOCKETPAIR 1 /* Define to 1 if you have the header file. */ #define HAVE_SPAWN_H 1 /* Define if your compiler provides ssize_t */ #define HAVE_SSIZE_T 1 /* Define to 1 if you have the `statvfs' function. */ #define HAVE_STATVFS 1 /* Define if you have struct stat.st_mtim.tv_nsec */ #define HAVE_STAT_TV_NSEC 1 /* Define if you have struct stat.st_mtimensec */ /* #undef HAVE_STAT_TV_NSEC2 */ /* Define if your compiler supports variable length function prototypes (e.g. void fprintf(FILE *, char *, ...);) *and* */ #define HAVE_STDARG_PROTOTYPES 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strftime' function. */ #define HAVE_STRFTIME 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_STROPTS_H */ /* Define to 1 if `st_birthtime' is a member of `struct stat'. */ /* #undef HAVE_STRUCT_STAT_ST_BIRTHTIME */ /* Define to 1 if `st_blksize' is a member of `struct stat'. */ #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 /* Define to 1 if `st_blocks' is a member of `struct stat'. */ #define HAVE_STRUCT_STAT_ST_BLOCKS 1 /* Define to 1 if `st_flags' is a member of `struct stat'. */ /* #undef HAVE_STRUCT_STAT_ST_FLAGS */ /* Define to 1 if `st_gen' is a member of `struct stat'. */ /* #undef HAVE_STRUCT_STAT_ST_GEN */ /* Define to 1 if `st_rdev' is a member of `struct stat'. */ #define HAVE_STRUCT_STAT_ST_RDEV 1 /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #define HAVE_STRUCT_TM_TM_ZONE 1 /* Define if you have the 'symlink' function. */ #define HAVE_SYMLINK 1 /* Define to 1 if you have the `sysconf' function. */ #define HAVE_SYSCONF 1 /* Define to 1 if you have the header file. */ #define HAVE_SYSEXITS_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_AUDIOIO_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_BSDTTY_H */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_DIR_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_EPOLL_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_EVENT_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_FILE_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_LOADAVG_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_LOCK_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_MKDEV_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_MODEM_H */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_NDIR_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_POLL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_RANDOM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_RESOURCE_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STATVFS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SYSMACROS_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_TERMIO_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIMES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_UN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_UTSNAME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_WAIT_H 1 /* Define to 1 if you have the `tcgetpgrp' function. */ #define HAVE_TCGETPGRP 1 /* Define to 1 if you have the `tcsetpgrp' function. */ #define HAVE_TCSETPGRP 1 /* Define to 1 if you have the `tempnam' function. */ #define HAVE_TEMPNAM 1 /* Define to 1 if you have the header file. */ #define HAVE_TERMIOS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_TERM_H 1 /* Define to 1 if you have the `tgamma' function. */ #define HAVE_TGAMMA 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_THREAD_H */ /* Define to 1 if you have the `timegm' function. */ #define HAVE_TIMEGM 1 /* Define to 1 if you have the `times' function. */ #define HAVE_TIMES 1 /* Define to 1 if you have the `tmpfile' function. */ #define HAVE_TMPFILE 1 /* Define to 1 if you have the `tmpnam' function. */ #define HAVE_TMPNAM 1 /* Define to 1 if you have the `tmpnam_r' function. */ #define HAVE_TMPNAM_R 1 /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #define HAVE_TM_ZONE 1 /* Define to 1 if you have the `truncate' function. */ #define HAVE_TRUNCATE 1 /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ /* #undef HAVE_TZNAME */ /* Define this if you have tcl and TCL_UTF_MAX==6 */ /* #undef HAVE_UCS4_TCL */ /* Define if your compiler provides uint32_t. */ #define HAVE_UINT32_T 1 /* Define if your compiler provides uint64_t. */ #define HAVE_UINT64_T 1 /* Define to 1 if the system has the type `uintptr_t'. */ #define HAVE_UINTPTR_T 1 /* Define to 1 if you have the `uname' function. */ #define HAVE_UNAME 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ #define HAVE_UNSETENV 1 /* Define if you have a useable wchar_t type defined in wchar.h; useable means wchar_t must be an unsigned type with at least 16 bits. (see Include/unicodeobject.h). */ /* #undef HAVE_USABLE_WCHAR_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_UTIL_H */ /* Define to 1 if you have the `utimes' function. */ #define HAVE_UTIMES 1 /* Define to 1 if you have the header file. */ #define HAVE_UTIME_H 1 /* Define to 1 if you have the `wait3' function. */ #define HAVE_WAIT3 1 /* Define to 1 if you have the `wait4' function. */ #define HAVE_WAIT4 1 /* Define to 1 if you have the `waitpid' function. */ #define HAVE_WAITPID 1 /* Define if the compiler provides a wchar.h header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcscoll' function. */ #define HAVE_WCSCOLL 1 /* Define if tzset() actually switches the local timezone in a meaningful way. */ #define HAVE_WORKING_TZSET 1 /* Define if the zlib library has inflateCopy */ #define HAVE_ZLIB_COPY 1 /* Define to 1 if you have the `_getpty' function. */ /* #undef HAVE__GETPTY */ /* Define if you are using Mach cthreads directly under /include */ /* #undef HURD_C_THREADS */ /* Define if you are using Mach cthreads under mach / */ /* #undef MACH_C_THREADS */ /* Define to 1 if `major', `minor', and `makedev' are declared in . */ /* #undef MAJOR_IN_MKDEV */ /* Define to 1 if `major', `minor', and `makedev' are declared in . */ #define MAJOR_IN_SYSMACROS 1 /* Define if mvwdelch in curses.h is an expression. */ #define MVWDELCH_IS_EXPRESSION 1 /* Define to the address where bug reports for this package should be sent. */ /* #undef PACKAGE_BUGREPORT */ /* Define to the full name of this package. */ /* #undef PACKAGE_NAME */ /* Define to the full name and version of this package. */ /* #undef PACKAGE_STRING */ /* Define to the one symbol short name of this package. */ /* #undef PACKAGE_TARNAME */ /* Define to the home page for this package. */ /* #undef PACKAGE_URL */ /* Define to the version of this package. */ /* #undef PACKAGE_VERSION */ /* Define if POSIX semaphores aren't enabled on your system */ /* #undef POSIX_SEMAPHORES_NOT_ENABLED */ /* Defined if PTHREAD_SCOPE_SYSTEM supported. */ #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 /* Define as the preferred size in bits of long digits */ /* #undef PYLONG_BITS_IN_DIGIT */ /* Define to printf format modifier for long long type */ #define PY_FORMAT_LONG_LONG "ll" /* Define to printf format modifier for Py_ssize_t */ #define PY_FORMAT_SIZE_T "z" /* Define as the integral type used for Unicode representation. */ /* #undef PY_UNICODE_TYPE */ /* Define if you want to build an interpreter with many run-time checks. */ /* #undef Py_DEBUG */ /* Defined if Python is built as a shared library. */ #define Py_ENABLE_SHARED 1 /* Define as the size of the unicode type. */ #define Py_UNICODE_SIZE 4 /* Define if you want to have a Unicode type. */ #define Py_USING_UNICODE 1 /* assume C89 semantics that RETSIGTYPE is always void */ #define RETSIGTYPE void /* Define if setpgrp() must be called as setpgrp(0, 0). */ /* #undef SETPGRP_HAVE_ARG */ /* Define this to be extension of shared libraries (including the dot!). */ #define SHLIB_EXT ".so" /* Define if i>>j for signed int i does not extend the sign bit when i < 0 */ /* #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS */ /* The size of `double', as computed by sizeof. */ #define SIZEOF_DOUBLE 8 /* The size of `float', as computed by sizeof. */ #define SIZEOF_FLOAT 4 /* The size of `fpos_t', as computed by sizeof. */ #define SIZEOF_FPOS_T 16 /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 /* The size of `long double', as computed by sizeof. */ #define SIZEOF_LONG_DOUBLE 16 /* The size of `long long', as computed by sizeof. */ #define SIZEOF_LONG_LONG 8 /* The size of `off_t', as computed by sizeof. */ #define SIZEOF_OFF_T 8 /* The size of `pid_t', as computed by sizeof. */ #define SIZEOF_PID_T 4 /* The size of `pthread_t', as computed by sizeof. */ #define SIZEOF_PTHREAD_T 8 /* The size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 /* The size of `size_t', as computed by sizeof. */ #define SIZEOF_SIZE_T 8 /* The size of `time_t', as computed by sizeof. */ #define SIZEOF_TIME_T 8 /* The size of `uintptr_t', as computed by sizeof. */ #define SIZEOF_UINTPTR_T 8 /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 /* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 /* The size of `_Bool', as computed by sizeof. */ #define SIZEOF__BOOL 1 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you can safely include both and (which you can't on SCO ODT 3.0). */ #define SYS_SELECT_WITH_SYS_TIME 1 /* Define if tanh(-0.) is -0., or if platform doesn't have signed zeros */ #define TANH_PRESERVES_ZERO_SIGN 1 /* Define to 1 if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Define if you want to use computed gotos in ceval.c. */ /* #undef USE_COMPUTED_GOTOS */ /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif /* Define if you want to use MacPython modules on MacOSX in unix-Python. */ /* #undef USE_TOOLBOX_OBJECT_GLUE */ /* Define if a va_list is an array of some kind */ #define VA_LIST_IS_ARRAY 1 /* Define if you want SIGFPE handled (see Include/pyfpe.h). */ /* #undef WANT_SIGFPE_HANDLER */ /* Define if you want wctype.h functions to be used instead of the one supplied by Python itself. (see Include/unicodectype.h). */ /* #undef WANT_WCTYPE_FUNCTIONS */ /* Define if WINDOW in curses.h offers a field _flags. */ #define WINDOW_HAS_FLAGS 1 /* Define if you want documentation strings in extension modules */ #define WITH_DOC_STRINGS 1 /* Define if you want to compile in Dtrace support */ #define WITH_DTRACE 1 /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). Dyld is necessary to support frameworks. */ /* #undef WITH_DYLD */ /* Define to 1 if libintl is needed for locale functions. */ /* #undef WITH_LIBINTL */ /* Define if you want to produce an OpenStep/Rhapsody framework (shared library plus accessory files). */ /* #undef WITH_NEXT_FRAMEWORK */ /* Define if you want to compile in Python-specific mallocs */ #define WITH_PYMALLOC 1 /* Define if you want to compile in rudimentary thread support */ #define WITH_THREAD 1 /* Define to profile with the Pentium timestamp counter */ /* #undef WITH_TSC */ /* Define if you want pymalloc to be disabled when running under valgrind */ #define WITH_VALGRIND 1 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN /* # undef WORDS_BIGENDIAN */ # endif #endif /* Define if arithmetic is subject to x87-style double rounding issue */ /* #undef X87_DOUBLE_ROUNDING */ /* Define on OpenBSD to activate all library features */ /* #undef _BSD_SOURCE */ /* Define on Irix to enable u_int */ #define _BSD_TYPES 1 /* Define on Darwin to activate all library features */ #define _DARWIN_C_SOURCE 1 /* This must be set to 64 on some systems to enable large file support. */ #define _FILE_OFFSET_BITS 64 /* Define on Linux to activate all library features */ #define _GNU_SOURCE 1 /* This must be defined on some systems to enable large file support. */ #define _LARGEFILE_SOURCE 1 /* This must be defined on AIX systems to enable large file support. */ /* #undef _LARGE_FILES */ /* Define to 1 if on MINIX. */ /* #undef _MINIX */ /* Define on NetBSD to activate all library features */ #define _NETBSD_SOURCE 1 /* Define _OSF_SOURCE to get the makedev macro. */ /* #undef _OSF_SOURCE */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define to activate features from IEEE Stds 1003.1-2001 */ #define _POSIX_C_SOURCE 200112L /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define if you have POSIX threads, and your system does not define that. */ /* #undef _POSIX_THREADS */ /* Define to force use of thread-safe errno, h_errno, and other functions */ /* #undef _REENTRANT */ /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT32_T */ /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT64_T */ /* Define to the level of X/Open that your system supports */ #define _XOPEN_SOURCE 600 /* Define to activate Unix95-and-earlier features */ #define _XOPEN_SOURCE_EXTENDED 1 /* Define on FreeBSD to activate all library features */ #define __BSD_VISIBLE 1 /* Define to 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ /* # undef __CHAR_UNSIGNED__ */ #endif /* Defined on Solaris to see additional function prototypes. */ #define __EXTENSIONS__ 1 /* Define to 'long' if doesn't define. */ /* #undef clock_t */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `int' if doesn't define. */ /* #undef gid_t */ /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef int32_t */ /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef int64_t */ /* Define to `int' if does not define. */ /* #undef mode_t */ /* Define to `long int' if does not define. */ /* #undef off_t */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to empty if the keyword does not work. */ /* #undef signed */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define to `int' if does not define. */ /* #undef socklen_t */ /* Define to `int' if doesn't define. */ /* #undef uid_t */ /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef uint32_t */ /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef uint64_t */ /* Define to empty if the keyword does not work. */ /* #undef volatile */ /* Define the macros needed if on a UnixWare 7.x system. */ #if defined(__USLC__) && defined(__SCO_VERSION__) #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */ #endif #endif /*Py_PYCONFIG_H*/ PKZ|hhpython2.7/pymem.hnu[/* The PyMem_ family: low-level memory allocation interfaces. See objimpl.h for the PyObject_ memory family. */ #ifndef Py_PYMEM_H #define Py_PYMEM_H #include "pyport.h" #ifdef __cplusplus extern "C" { #endif /* BEWARE: Each interface exports both functions and macros. Extension modules should use the functions, to ensure binary compatibility across Python versions. Because the Python implementation is free to change internal details, and the macros may (or may not) expose details for speed, if you do use the macros you must recompile your extensions with each Python release. Never mix calls to PyMem_ with calls to the platform malloc/realloc/ calloc/free. For example, on Windows different DLLs may end up using different heaps, and if you use PyMem_Malloc you'll get the memory from the heap used by the Python DLL; it could be a disaster if you free()'ed that directly in your own extension. Using PyMem_Free instead ensures Python can return the memory to the proper heap. As another example, in PYMALLOC_DEBUG mode, Python wraps all calls to all PyMem_ and PyObject_ memory functions in special debugging wrappers that add additional debugging info to dynamic memory blocks. The system routines have no idea what to do with that stuff, and the Python wrappers have no idea what to do with raw blocks obtained directly by the system routines then. The GIL must be held when using these APIs. */ /* * Raw memory interface * ==================== */ /* Functions Functions supplying platform-independent semantics for malloc/realloc/ free. These functions make sure that allocating 0 bytes returns a distinct non-NULL pointer (whenever possible -- if we're flat out of memory, NULL may be returned), even if the platform malloc and realloc don't. Returned pointers must be checked for NULL explicitly. No action is performed on failure (no exception is set, no warning is printed, etc). */ PyAPI_FUNC(void *) PyMem_Malloc(size_t); PyAPI_FUNC(void *) PyMem_Realloc(void *, size_t); PyAPI_FUNC(void) PyMem_Free(void *); /* Starting from Python 1.6, the wrappers Py_{Malloc,Realloc,Free} are no longer supported. They used to call PyErr_NoMemory() on failure. */ /* Macros. */ #ifdef PYMALLOC_DEBUG /* Redirect all memory operations to Python's debugging allocator. */ #define PyMem_MALLOC _PyMem_DebugMalloc #define PyMem_REALLOC _PyMem_DebugRealloc #define PyMem_FREE _PyMem_DebugFree #else /* ! PYMALLOC_DEBUG */ /* PyMem_MALLOC(0) means malloc(1). Some systems would return NULL for malloc(0), which would be treated as an error. Some platforms would return a pointer with no memory behind it, which would break pymalloc. To solve these problems, allocate an extra byte. */ /* Returns NULL to indicate error if a negative size or size larger than Py_ssize_t can represent is supplied. Helps prevents security holes. */ #define PyMem_MALLOC(n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \ : malloc(((n) != 0) ? (n) : 1)) #define PyMem_REALLOC(p, n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \ : realloc((p), ((n) != 0) ? (n) : 1)) #define PyMem_FREE free #endif /* PYMALLOC_DEBUG */ /* * Type-oriented memory interface * ============================== * * Allocate memory for n objects of the given type. Returns a new pointer * or NULL if the request was too large or memory allocation failed. Use * these macros rather than doing the multiplication yourself so that proper * overflow checking is always done. */ #define PyMem_New(type, n) \ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ ( (type *) PyMem_Malloc((n) * sizeof(type)) ) ) #define PyMem_NEW(type, n) \ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) /* * The value of (p) is always clobbered by this macro regardless of success. * The caller MUST check if (p) is NULL afterwards and deal with the memory * error if so. This means the original value of (p) MUST be saved for the * caller's memory error handler to not lose track of it. */ #define PyMem_Resize(p, type, n) \ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ (type *) PyMem_Realloc((p), (n) * sizeof(type)) ) #define PyMem_RESIZE(p, type, n) \ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ (type *) PyMem_REALLOC((p), (n) * sizeof(type)) ) /* PyMem{Del,DEL} are left over from ancient days, and shouldn't be used * anymore. They're just confusing aliases for PyMem_{Free,FREE} now. */ #define PyMem_Del PyMem_Free #define PyMem_DEL PyMem_FREE #ifdef __cplusplus } #endif #endif /* !Py_PYMEM_H */ PKZEpython2.7/marshal.hnu[ /* Interface for marshal.c */ #ifndef Py_MARSHAL_H #define Py_MARSHAL_H #ifdef __cplusplus extern "C" { #endif #define Py_MARSHAL_VERSION 2 PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int); PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int); PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int); PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *); PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *); PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *); PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *); PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(char *, Py_ssize_t); #ifdef __cplusplus } #endif #endif /* !Py_MARSHAL_H */ PKZ"python2.7/longobject.hnu[#ifndef Py_LONGOBJECT_H #define Py_LONGOBJECT_H #ifdef __cplusplus extern "C" { #endif /* Long (arbitrary precision) integer object interface */ typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */ PyAPI_DATA(PyTypeObject) PyLong_Type; #define PyLong_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS) #define PyLong_CheckExact(op) (Py_TYPE(op) == &PyLong_Type) PyAPI_FUNC(PyObject *) PyLong_FromLong(long); PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long); PyAPI_FUNC(PyObject *) PyLong_FromDouble(double); PyAPI_FUNC(PyObject *) PyLong_FromSize_t(size_t); PyAPI_FUNC(PyObject *) PyLong_FromSsize_t(Py_ssize_t); PyAPI_FUNC(long) PyLong_AsLong(PyObject *); PyAPI_FUNC(long) PyLong_AsLongAndOverflow(PyObject *, int *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *); PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(PyObject *); PyAPI_FUNC(int) _PyLong_AsInt(PyObject *); PyAPI_FUNC(PyObject *) PyLong_GetInfo(void); /* For use by intobject.c only */ #define _PyLong_AsSsize_t PyLong_AsSsize_t #define _PyLong_FromSize_t PyLong_FromSize_t #define _PyLong_FromSsize_t PyLong_FromSsize_t PyAPI_DATA(int) _PyLong_DigitValue[256]; /* _PyLong_Frexp returns a double x and an exponent e such that the true value is approximately equal to x * 2**e. e is >= 0. x is 0.0 if and only if the input is 0 (in which case, e and x are both zeroes); otherwise, 0.5 <= abs(x) < 1.0. On overflow, which is possible if the number of bits doesn't fit into a Py_ssize_t, sets OverflowError and returns -1.0 for x, 0 for e. */ PyAPI_FUNC(double) _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e); PyAPI_FUNC(double) PyLong_AsDouble(PyObject *); PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *); PyAPI_FUNC(void *) PyLong_AsVoidPtr(PyObject *); #ifdef HAVE_LONG_LONG PyAPI_FUNC(PyObject *) PyLong_FromLongLong(PY_LONG_LONG); PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG); PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLong(PyObject *); PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *); PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLongAndOverflow(PyObject *, int *); #endif /* HAVE_LONG_LONG */ PyAPI_FUNC(PyObject *) PyLong_FromString(char *, char **, int); #ifdef Py_USING_UNICODE PyAPI_FUNC(PyObject *) PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); #endif /* _PyLong_Sign. Return 0 if v is 0, -1 if v < 0, +1 if v > 0. v must not be NULL, and must be a normalized long. There are no error cases. */ PyAPI_FUNC(int) _PyLong_Sign(PyObject *v); /* _PyLong_NumBits. Return the number of bits needed to represent the absolute value of a long. For example, this returns 1 for 1 and -1, 2 for 2 and -2, and 2 for 3 and -3. It returns 0 for 0. v must not be NULL, and must be a normalized long. (size_t)-1 is returned and OverflowError set if the true result doesn't fit in a size_t. */ PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v); /* _PyLong_FromByteArray: View the n unsigned bytes as a binary integer in base 256, and return a Python long with the same numeric value. If n is 0, the integer is 0. Else: If little_endian is 1/true, bytes[n-1] is the MSB and bytes[0] the LSB; else (little_endian is 0/false) bytes[0] is the MSB and bytes[n-1] the LSB. If is_signed is 0/false, view the bytes as a non-negative integer. If is_signed is 1/true, view the bytes as a 2's-complement integer, non-negative if bit 0x80 of the MSB is clear, negative if set. Error returns: + Return NULL with the appropriate exception set if there's not enough memory to create the Python long. */ PyAPI_FUNC(PyObject *) _PyLong_FromByteArray( const unsigned char* bytes, size_t n, int little_endian, int is_signed); /* _PyLong_AsByteArray: Convert the least-significant 8*n bits of long v to a base-256 integer, stored in array bytes. Normally return 0, return -1 on error. If little_endian is 1/true, store the MSB at bytes[n-1] and the LSB at bytes[0]; else (little_endian is 0/false) store the MSB at bytes[0] and the LSB at bytes[n-1]. If is_signed is 0/false, it's an error if v < 0; else (v >= 0) n bytes are filled and there's nothing special about bit 0x80 of the MSB. If is_signed is 1/true, bytes is filled with the 2's-complement representation of v's value. Bit 0x80 of the MSB is the sign bit. Error returns (-1): + is_signed is 0 and v < 0. TypeError is set in this case, and bytes isn't altered. + n isn't big enough to hold the full mathematical value of v. For example, if is_signed is 0 and there are more digits in the v than fit in n; or if is_signed is 1, v < 0, and n is just 1 bit shy of being large enough to hold a sign bit. OverflowError is set in this case, but bytes holds the least-significant n bytes of the true value. */ PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v, unsigned char* bytes, size_t n, int little_endian, int is_signed); /* _PyLong_Format: Convert the long to a string object with given base, appending a base prefix of 0[box] if base is 2, 8 or 16. Add a trailing "L" if addL is non-zero. If newstyle is zero, then use the pre-2.6 behavior of octal having a leading "0", instead of the prefix "0o" */ PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base, int addL, int newstyle); /* Format the object based on the format_spec, as defined in PEP 3101 (Advanced String Formatting). */ PyAPI_FUNC(PyObject *) _PyLong_FormatAdvanced(PyObject *obj, char *format_spec, Py_ssize_t format_spec_len); #ifdef __cplusplus } #endif #endif /* !Py_LONGOBJECT_H */ PKZbSpython2.7/token.hnu[ /* Token types */ #ifndef Py_TOKEN_H #define Py_TOKEN_H #ifdef __cplusplus extern "C" { #endif #undef TILDE /* Prevent clash of our definition with system macro. Ex AIX, ioctl.h */ #define ENDMARKER 0 #define NAME 1 #define NUMBER 2 #define STRING 3 #define NEWLINE 4 #define INDENT 5 #define DEDENT 6 #define LPAR 7 #define RPAR 8 #define LSQB 9 #define RSQB 10 #define COLON 11 #define COMMA 12 #define SEMI 13 #define PLUS 14 #define MINUS 15 #define STAR 16 #define SLASH 17 #define VBAR 18 #define AMPER 19 #define LESS 20 #define GREATER 21 #define EQUAL 22 #define DOT 23 #define PERCENT 24 #define BACKQUOTE 25 #define LBRACE 26 #define RBRACE 27 #define EQEQUAL 28 #define NOTEQUAL 29 #define LESSEQUAL 30 #define GREATEREQUAL 31 #define TILDE 32 #define CIRCUMFLEX 33 #define LEFTSHIFT 34 #define RIGHTSHIFT 35 #define DOUBLESTAR 36 #define PLUSEQUAL 37 #define MINEQUAL 38 #define STAREQUAL 39 #define SLASHEQUAL 40 #define PERCENTEQUAL 41 #define AMPEREQUAL 42 #define VBAREQUAL 43 #define CIRCUMFLEXEQUAL 44 #define LEFTSHIFTEQUAL 45 #define RIGHTSHIFTEQUAL 46 #define DOUBLESTAREQUAL 47 #define DOUBLESLASH 48 #define DOUBLESLASHEQUAL 49 #define AT 50 /* Don't forget to update the table _PyParser_TokenNames in tokenizer.c! */ #define OP 51 #define ERRORTOKEN 52 #define N_TOKENS 53 /* Special definitions for cooperation with parser */ #define NT_OFFSET 256 #define ISTERMINAL(x) ((x) < NT_OFFSET) #define ISNONTERMINAL(x) ((x) >= NT_OFFSET) #define ISEOF(x) ((x) == ENDMARKER) PyAPI_DATA(char *) _PyParser_TokenNames[]; /* Token names */ PyAPI_FUNC(int) PyToken_OneChar(int); PyAPI_FUNC(int) PyToken_TwoChars(int, int); PyAPI_FUNC(int) PyToken_ThreeChars(int, int, int); #ifdef __cplusplus } #endif #endif /* !Py_TOKEN_H */ PKZu'̰ python2.7/descrobject.hnu[/* Descriptors */ #ifndef Py_DESCROBJECT_H #define Py_DESCROBJECT_H #ifdef __cplusplus extern "C" { #endif typedef PyObject *(*getter)(PyObject *, void *); typedef int (*setter)(PyObject *, PyObject *, void *); typedef struct PyGetSetDef { char *name; getter get; setter set; char *doc; void *closure; } PyGetSetDef; typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args, void *wrapped); typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args, void *wrapped, PyObject *kwds); struct wrapperbase { char *name; int offset; void *function; wrapperfunc wrapper; char *doc; int flags; PyObject *name_strobj; }; /* Flags for above struct */ #define PyWrapperFlag_KEYWORDS 1 /* wrapper function takes keyword args */ /* Various kinds of descriptor objects */ #define PyDescr_COMMON \ PyObject_HEAD \ PyTypeObject *d_type; \ PyObject *d_name typedef struct { PyDescr_COMMON; } PyDescrObject; typedef struct { PyDescr_COMMON; PyMethodDef *d_method; } PyMethodDescrObject; typedef struct { PyDescr_COMMON; struct PyMemberDef *d_member; } PyMemberDescrObject; typedef struct { PyDescr_COMMON; PyGetSetDef *d_getset; } PyGetSetDescrObject; typedef struct { PyDescr_COMMON; struct wrapperbase *d_base; void *d_wrapped; /* This can be any function pointer */ } PyWrapperDescrObject; PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type; PyAPI_DATA(PyTypeObject) PyDictProxy_Type; PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type; PyAPI_DATA(PyTypeObject) PyMemberDescr_Type; PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); PyAPI_FUNC(PyObject *) PyDescr_NewMember(PyTypeObject *, struct PyMemberDef *); PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, struct PyGetSetDef *); PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *, struct wrapperbase *, void *); #define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL) PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *); PyAPI_FUNC(PyObject *) PyWrapper_New(PyObject *, PyObject *); PyAPI_DATA(PyTypeObject) PyProperty_Type; #ifdef __cplusplus } #endif #endif /* !Py_DESCROBJECT_H */ PKZ,T  python2.7/iterobject.hnu[#ifndef Py_ITEROBJECT_H #define Py_ITEROBJECT_H /* Iterators (the basic kind, over a sequence) */ #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(PyTypeObject) PySeqIter_Type; #define PySeqIter_Check(op) (Py_TYPE(op) == &PySeqIter_Type) PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *); PyAPI_DATA(PyTypeObject) PyCallIter_Type; #define PyCallIter_Check(op) (Py_TYPE(op) == &PyCallIter_Type) PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *); #ifdef __cplusplus } #endif #endif /* !Py_ITEROBJECT_H */ PKZ7o^^python2.7/structseq.hnu[ /* Tuple object interface */ #ifndef Py_STRUCTSEQ_H #define Py_STRUCTSEQ_H #ifdef __cplusplus extern "C" { #endif typedef struct PyStructSequence_Field { char *name; char *doc; } PyStructSequence_Field; typedef struct PyStructSequence_Desc { char *name; char *doc; struct PyStructSequence_Field *fields; int n_in_sequence; } PyStructSequence_Desc; extern char* PyStructSequence_UnnamedField; PyAPI_FUNC(void) PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc); PyAPI_FUNC(PyObject *) PyStructSequence_New(PyTypeObject* type); typedef struct { PyObject_VAR_HEAD PyObject *ob_item[1]; } PyStructSequence; /* Macro, *only* to be used to fill in brand new objects */ #define PyStructSequence_SET_ITEM(op, i, v) \ (((PyStructSequence *)(op))->ob_item[i] = v) #ifdef __cplusplus } #endif #endif /* !Py_STRUCTSEQ_H */ PKZjHpython2.7/dictobject.hnu[#ifndef Py_DICTOBJECT_H #define Py_DICTOBJECT_H #ifdef __cplusplus extern "C" { #endif /* Dictionary object type -- mapping from hashable object to object */ /* The distribution includes a separate file, Objects/dictnotes.txt, describing explorations into dictionary design and optimization. It covers typical dictionary use patterns, the parameters for tuning dictionaries, and several ideas for possible optimizations. */ /* There are three kinds of slots in the table: 1. Unused. me_key == me_value == NULL Does not hold an active (key, value) pair now and never did. Unused can transition to Active upon key insertion. This is the only case in which me_key is NULL, and is each slot's initial state. 2. Active. me_key != NULL and me_key != dummy and me_value != NULL Holds an active (key, value) pair. Active can transition to Dummy upon key deletion. This is the only case in which me_value != NULL. 3. Dummy. me_key == dummy and me_value == NULL Previously held an active (key, value) pair, but that was deleted and an active pair has not yet overwritten the slot. Dummy can transition to Active upon key insertion. Dummy slots cannot be made Unused again (cannot have me_key set to NULL), else the probe sequence in case of collision would have no way to know they were once active. Note: .popitem() abuses the me_hash field of an Unused or Dummy slot to hold a search finger. The me_hash field of Unused or Dummy slots has no meaning otherwise. */ /* PyDict_MINSIZE is the minimum size of a dictionary. This many slots are * allocated directly in the dict object (in the ma_smalltable member). * It must be a power of 2, and at least 4. 8 allows dicts with no more * than 5 active entries to live in ma_smalltable (and so avoid an * additional malloc); instrumentation suggested this suffices for the * majority of dicts (consisting mostly of usually-small instance dicts and * usually-small dicts created to pass keyword arguments). */ #define PyDict_MINSIZE 8 typedef struct { /* Cached hash code of me_key. Note that hash codes are C longs. * We have to use Py_ssize_t instead because dict_popitem() abuses * me_hash to hold a search finger. */ Py_ssize_t me_hash; PyObject *me_key; PyObject *me_value; } PyDictEntry; /* To ensure the lookup algorithm terminates, there must be at least one Unused slot (NULL key) in the table. The value ma_fill is the number of non-NULL keys (sum of Active and Dummy); ma_used is the number of non-NULL, non-dummy keys (== the number of non-NULL values == the number of Active items). To avoid slowing down lookups on a near-full table, we resize the table when it's two-thirds full. */ typedef struct _dictobject PyDictObject; struct _dictobject { PyObject_HEAD Py_ssize_t ma_fill; /* # Active + # Dummy */ Py_ssize_t ma_used; /* # Active */ /* The table contains ma_mask + 1 slots, and that's a power of 2. * We store the mask instead of the size because the mask is more * frequently needed. */ Py_ssize_t ma_mask; /* ma_table points to ma_smalltable for small tables, else to * additional malloc'ed memory. ma_table is never NULL! This rule * saves repeated runtime null-tests in the workhorse getitem and * setitem calls. */ PyDictEntry *ma_table; PyDictEntry *(*ma_lookup)(PyDictObject *mp, PyObject *key, long hash); PyDictEntry ma_smalltable[PyDict_MINSIZE]; }; PyAPI_DATA(PyTypeObject) PyDict_Type; PyAPI_DATA(PyTypeObject) PyDictIterKey_Type; PyAPI_DATA(PyTypeObject) PyDictIterValue_Type; PyAPI_DATA(PyTypeObject) PyDictIterItem_Type; PyAPI_DATA(PyTypeObject) PyDictKeys_Type; PyAPI_DATA(PyTypeObject) PyDictItems_Type; PyAPI_DATA(PyTypeObject) PyDictValues_Type; #define PyDict_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS) #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) #define PyDictKeys_Check(op) (Py_TYPE(op) == &PyDictKeys_Type) #define PyDictItems_Check(op) (Py_TYPE(op) == &PyDictItems_Type) #define PyDictValues_Check(op) (Py_TYPE(op) == &PyDictValues_Type) /* This excludes Values, since they are not sets. */ # define PyDictViewSet_Check(op) \ (PyDictKeys_Check(op) || PyDictItems_Check(op)) PyAPI_FUNC(PyObject *) PyDict_New(void); PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key); PyAPI_FUNC(PyObject *) _PyDict_GetItemWithError(PyObject *mp, PyObject *key); PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key); PyAPI_FUNC(int) _PyDict_DelItemIf(PyObject *mp, PyObject *key, int (*predicate)(PyObject *value)); PyAPI_FUNC(void) PyDict_Clear(PyObject *mp); PyAPI_FUNC(int) PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); PyAPI_FUNC(int) _PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, long *hash); PyAPI_FUNC(PyObject *) PyDict_Keys(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Values(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Items(PyObject *mp); PyAPI_FUNC(Py_ssize_t) PyDict_Size(PyObject *mp); PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp); PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key); PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, long hash); PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused); PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp); /* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */ PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other); /* PyDict_Merge updates/merges from a mapping object (an object that supports PyMapping_Keys() and PyObject_GetItem()). If override is true, the last occurrence of a key wins, else the first. The Python dict.update(other) is equivalent to PyDict_Merge(dict, other, 1). */ PyAPI_FUNC(int) PyDict_Merge(PyObject *mp, PyObject *other, int override); /* PyDict_MergeFromSeq2 updates/merges from an iterable object producing iterable objects of length 2. If override is true, the last occurrence of a key wins, else the first. The Python dict constructor dict(seq2) is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1). */ PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d, PyObject *seq2, int override); PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key); PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item); PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key); PyAPI_FUNC(void) _PyDict_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_DICTOBJECT_H */ PKZ++python2.7/stringobject.hnu[ /* String (str/bytes) object interface */ #ifndef Py_STRINGOBJECT_H #define Py_STRINGOBJECT_H #ifdef __cplusplus extern "C" { #endif #include /* Type PyStringObject represents a character string. An extra zero byte is reserved at the end to ensure it is zero-terminated, but a size is present so strings with null bytes in them can be represented. This is an immutable object type. There are functions to create new string objects, to test an object for string-ness, and to get the string value. The latter function returns a null pointer if the object is not of the proper type. There is a variant that takes an explicit size as well as a variant that assumes a zero-terminated string. Note that none of the functions should be applied to nil objects. */ /* Caching the hash (ob_shash) saves recalculation of a string's hash value. Interning strings (ob_sstate) tries to ensure that only one string object with a given value exists, so equality tests can be one pointer comparison. This is generally restricted to strings that "look like" Python identifiers, although the intern() builtin can be used to force interning of any string. Together, these sped the interpreter by up to 20%. */ typedef struct { PyObject_VAR_HEAD long ob_shash; int ob_sstate; char ob_sval[1]; /* Invariants: * ob_sval contains space for 'ob_size+1' elements. * ob_sval[ob_size] == 0. * ob_shash is the hash of the string or -1 if not computed yet. * ob_sstate != 0 iff the string object is in stringobject.c's * 'interned' dictionary; in this case the two references * from 'interned' to this object are *not counted* in ob_refcnt. */ } PyStringObject; #define SSTATE_NOT_INTERNED 0 #define SSTATE_INTERNED_MORTAL 1 #define SSTATE_INTERNED_IMMORTAL 2 PyAPI_DATA(PyTypeObject) PyBaseString_Type; PyAPI_DATA(PyTypeObject) PyString_Type; #define PyString_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_STRING_SUBCLASS) #define PyString_CheckExact(op) (Py_TYPE(op) == &PyString_Type) PyAPI_FUNC(PyObject *) PyString_FromStringAndSize(const char *, Py_ssize_t); PyAPI_FUNC(PyObject *) PyString_FromString(const char *); PyAPI_FUNC(PyObject *) PyString_FromFormatV(const char*, va_list) Py_GCC_ATTRIBUTE((format(printf, 1, 0))); PyAPI_FUNC(PyObject *) PyString_FromFormat(const char*, ...) Py_GCC_ATTRIBUTE((format(printf, 1, 2))); PyAPI_FUNC(Py_ssize_t) PyString_Size(PyObject *); PyAPI_FUNC(char *) PyString_AsString(PyObject *); PyAPI_FUNC(PyObject *) PyString_Repr(PyObject *, int); PyAPI_FUNC(void) PyString_Concat(PyObject **, PyObject *); PyAPI_FUNC(void) PyString_ConcatAndDel(PyObject **, PyObject *); PyAPI_FUNC(int) _PyString_Resize(PyObject **, Py_ssize_t); PyAPI_FUNC(int) _PyString_Eq(PyObject *, PyObject*); PyAPI_FUNC(PyObject *) PyString_Format(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) _PyString_FormatLong(PyObject*, int, int, int, char**, int*); PyAPI_FUNC(PyObject *) PyString_DecodeEscape(const char *, Py_ssize_t, const char *, Py_ssize_t, const char *); PyAPI_FUNC(void) PyString_InternInPlace(PyObject **); PyAPI_FUNC(void) PyString_InternImmortal(PyObject **); PyAPI_FUNC(PyObject *) PyString_InternFromString(const char *); PyAPI_FUNC(void) _Py_ReleaseInternedStrings(void); /* Use only if you know it's a string */ #define PyString_CHECK_INTERNED(op) (((PyStringObject *)(op))->ob_sstate) /* Macro, trading safety for speed */ #define PyString_AS_STRING(op) (((PyStringObject *)(op))->ob_sval) #define PyString_GET_SIZE(op) Py_SIZE(op) /* _PyString_Join(sep, x) is like sep.join(x). sep must be PyStringObject*, x must be an iterable object. */ PyAPI_FUNC(PyObject *) _PyString_Join(PyObject *sep, PyObject *x); /* --- Generic Codecs ----------------------------------------------------- */ /* Create an object by decoding the encoded string s of the given size. */ PyAPI_FUNC(PyObject*) PyString_Decode( const char *s, /* encoded string */ Py_ssize_t size, /* size of buffer */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Encodes a char buffer of the given size and returns a Python object. */ PyAPI_FUNC(PyObject*) PyString_Encode( const char *s, /* string char buffer */ Py_ssize_t size, /* number of chars to encode */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Encodes a string object and returns the result as Python object. */ PyAPI_FUNC(PyObject*) PyString_AsEncodedObject( PyObject *str, /* string object */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Encodes a string object and returns the result as Python string object. If the codec returns a Unicode object, the object is converted back to a string using the default encoding. DEPRECATED - use PyString_AsEncodedObject() instead. */ PyAPI_FUNC(PyObject*) PyString_AsEncodedString( PyObject *str, /* string object */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Decodes a string object and returns the result as Python object. */ PyAPI_FUNC(PyObject*) PyString_AsDecodedObject( PyObject *str, /* string object */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Decodes a string object and returns the result as Python string object. If the codec returns a Unicode object, the object is converted back to a string using the default encoding. DEPRECATED - use PyString_AsDecodedObject() instead. */ PyAPI_FUNC(PyObject*) PyString_AsDecodedString( PyObject *str, /* string object */ const char *encoding, /* encoding */ const char *errors /* error handling */ ); /* Provides access to the internal data buffer and size of a string object or the default encoded version of a Unicode object. Passing NULL as *len parameter will force the string buffer to be 0-terminated (passing a string with embedded NULL characters will cause an exception). */ PyAPI_FUNC(int) PyString_AsStringAndSize( register PyObject *obj, /* string or Unicode object */ register char **s, /* pointer to buffer variable */ register Py_ssize_t *len /* pointer to length variable or NULL (only possible for 0-terminated strings) */ ); /* Using the current locale, insert the thousands grouping into the string pointed to by buffer. For the argument descriptions, see Objects/stringlib/localeutil.h */ PyAPI_FUNC(Py_ssize_t) _PyString_InsertThousandsGroupingLocale(char *buffer, Py_ssize_t n_buffer, char *digits, Py_ssize_t n_digits, Py_ssize_t min_width); /* Using explicit passed-in values, insert the thousands grouping into the string pointed to by buffer. For the argument descriptions, see Objects/stringlib/localeutil.h */ PyAPI_FUNC(Py_ssize_t) _PyString_InsertThousandsGrouping(char *buffer, Py_ssize_t n_buffer, char *digits, Py_ssize_t n_digits, Py_ssize_t min_width, const char *grouping, const char *thousands_sep); /* Format the object based on the format_spec, as defined in PEP 3101 (Advanced String Formatting). */ PyAPI_FUNC(PyObject *) _PyBytes_FormatAdvanced(PyObject *obj, char *format_spec, Py_ssize_t format_spec_len); PyAPI_FUNC(void) _PyString_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_STRINGOBJECT_H */ PKZBCCpython2.7/longintrepr.hnu[#ifndef Py_LONGINTREPR_H #define Py_LONGINTREPR_H #ifdef __cplusplus extern "C" { #endif /* This is published for the benefit of "friend" marshal.c only. */ /* Parameters of the long integer representation. There are two different sets of parameters: one set for 30-bit digits, stored in an unsigned 32-bit integer type, and one set for 15-bit digits with each digit stored in an unsigned short. The value of PYLONG_BITS_IN_DIGIT, defined either at configure time or in pyport.h, is used to decide which digit size to use. Type 'digit' should be able to hold 2*PyLong_BASE-1, and type 'twodigits' should be an unsigned integer type able to hold all integers up to PyLong_BASE*PyLong_BASE-1. x_sub assumes that 'digit' is an unsigned type, and that overflow is handled by taking the result modulo 2**N for some N > PyLong_SHIFT. The majority of the code doesn't care about the precise value of PyLong_SHIFT, but there are some notable exceptions: - long_pow() requires that PyLong_SHIFT be divisible by 5 - PyLong_{As,From}ByteArray require that PyLong_SHIFT be at least 8 - long_hash() requires that PyLong_SHIFT is *strictly* less than the number of bits in an unsigned long, as do the PyLong <-> long (or unsigned long) conversion functions - the long <-> size_t/Py_ssize_t conversion functions expect that PyLong_SHIFT is strictly less than the number of bits in a size_t - the marshal code currently expects that PyLong_SHIFT is a multiple of 15 The values 15 and 30 should fit all of the above requirements, on any platform. */ #if PYLONG_BITS_IN_DIGIT == 30 #if !(defined HAVE_UINT64_T && defined HAVE_UINT32_T && \ defined HAVE_INT64_T && defined HAVE_INT32_T) #error "30-bit long digits requested, but the necessary types are not available on this platform" #endif typedef PY_UINT32_T digit; typedef PY_INT32_T sdigit; /* signed variant of digit */ typedef PY_UINT64_T twodigits; typedef PY_INT64_T stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 30 #define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */ #define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */ #elif PYLONG_BITS_IN_DIGIT == 15 typedef unsigned short digit; typedef short sdigit; /* signed variant of digit */ typedef unsigned long twodigits; typedef long stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 15 #define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */ #define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */ #else #error "PYLONG_BITS_IN_DIGIT should be 15 or 30" #endif #define PyLong_BASE ((digit)1 << PyLong_SHIFT) #define PyLong_MASK ((digit)(PyLong_BASE - 1)) /* b/w compatibility with Python 2.5 */ #define SHIFT PyLong_SHIFT #define BASE PyLong_BASE #define MASK PyLong_MASK #if PyLong_SHIFT % 5 != 0 #error "longobject.c requires that PyLong_SHIFT be divisible by 5" #endif /* Long integer representation. The absolute value of a number is equal to SUM(for i=0 through abs(ob_size)-1) ob_digit[i] * 2**(SHIFT*i) Negative numbers are represented with ob_size < 0; zero is represented by ob_size == 0. In a normalized number, ob_digit[abs(ob_size)-1] (the most significant digit) is never zero. Also, in all cases, for all valid i, 0 <= ob_digit[i] <= MASK. The allocation function takes care of allocating extra memory so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. CAUTION: Generic code manipulating subtypes of PyVarObject has to aware that longs abuse ob_size's sign bit. */ struct _longobject { PyObject_VAR_HEAD digit ob_digit[1]; }; PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t); /* Return a copy of src. */ PyAPI_FUNC(PyObject *) _PyLong_Copy(PyLongObject *src); #ifdef __cplusplus } #endif #endif /* !Py_LONGINTREPR_H */ PKZ! python2.7/pymacconfig.hnu[#ifndef PYMACCONFIG_H #define PYMACCONFIG_H /* * This file moves some of the autoconf magic to compile-time * when building on MacOSX. This is needed for building 4-way * universal binaries and for 64-bit universal binaries because * the values redefined below aren't configure-time constant but * only compile-time constant in these scenarios. */ #if defined(__APPLE__) # undef SIZEOF_LONG # undef SIZEOF_PTHREAD_T # undef SIZEOF_SIZE_T # undef SIZEOF_TIME_T # undef SIZEOF_VOID_P # undef SIZEOF__BOOL # undef SIZEOF_UINTPTR_T # undef SIZEOF_PTHREAD_T # undef WORDS_BIGENDIAN # undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 # undef DOUBLE_IS_BIG_ENDIAN_IEEE754 # undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754 # undef HAVE_GCC_ASM_FOR_X87 # undef VA_LIST_IS_ARRAY # if defined(__LP64__) && defined(__x86_64__) # define VA_LIST_IS_ARRAY 1 # endif # undef HAVE_LARGEFILE_SUPPORT # ifndef __LP64__ # define HAVE_LARGEFILE_SUPPORT 1 # endif # undef SIZEOF_LONG # ifdef __LP64__ # define SIZEOF__BOOL 1 # define SIZEOF__BOOL 1 # define SIZEOF_LONG 8 # define SIZEOF_PTHREAD_T 8 # define SIZEOF_SIZE_T 8 # define SIZEOF_TIME_T 8 # define SIZEOF_VOID_P 8 # define SIZEOF_UINTPTR_T 8 # define SIZEOF_PTHREAD_T 8 # else # ifdef __ppc__ # define SIZEOF__BOOL 4 # else # define SIZEOF__BOOL 1 # endif # define SIZEOF_LONG 4 # define SIZEOF_PTHREAD_T 4 # define SIZEOF_SIZE_T 4 # define SIZEOF_TIME_T 4 # define SIZEOF_VOID_P 4 # define SIZEOF_UINTPTR_T 4 # define SIZEOF_PTHREAD_T 4 # endif # if defined(__LP64__) /* MacOSX 10.4 (the first release to support 64-bit code * at all) only supports 64-bit in the UNIX layer. * Therefore suppress the toolbox-glue in 64-bit mode. */ /* In 64-bit mode setpgrp always has no arguments, in 32-bit * mode that depends on the compilation environment */ # undef SETPGRP_HAVE_ARG # endif #ifdef __BIG_ENDIAN__ #define WORDS_BIGENDIAN 1 #define DOUBLE_IS_BIG_ENDIAN_IEEE754 #else #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 #endif /* __BIG_ENDIAN */ #ifdef __i386__ # define HAVE_GCC_ASM_FOR_X87 #endif /* * The definition in pyconfig.h is only valid on the OS release * where configure ran on and not necessarily for all systems where * the executable can be used on. * * Specifically: OSX 10.4 has limited supported for '%zd', while * 10.5 has full support for '%zd'. A binary built on 10.5 won't * work properly on 10.4 unless we suppress the definition * of PY_FORMAT_SIZE_T */ #undef PY_FORMAT_SIZE_T #endif /* defined(_APPLE__) */ #endif /* PYMACCONFIG_H */ PKZcFpython2.7/symtable.hnu[#ifndef Py_SYMTABLE_H #define Py_SYMTABLE_H #ifdef __cplusplus extern "C" { #endif typedef enum _block_type { FunctionBlock, ClassBlock, ModuleBlock } _Py_block_ty; struct _symtable_entry; struct symtable { const char *st_filename; /* name of file being compiled */ struct _symtable_entry *st_cur; /* current symbol table entry */ struct _symtable_entry *st_top; /* module entry */ PyObject *st_symbols; /* dictionary of symbol table entries */ PyObject *st_stack; /* stack of namespace info */ PyObject *st_global; /* borrowed ref to MODULE in st_symbols */ int st_nblocks; /* number of blocks */ PyObject *st_private; /* name of current class or NULL */ PyFutureFeatures *st_future; /* module's future features */ }; typedef struct _symtable_entry { PyObject_HEAD PyObject *ste_id; /* int: key in st_symbols */ PyObject *ste_symbols; /* dict: name to flags */ PyObject *ste_name; /* string: name of block */ PyObject *ste_varnames; /* list of variable names */ PyObject *ste_children; /* list of child ids */ _Py_block_ty ste_type; /* module, class, or function */ int ste_unoptimized; /* false if namespace is optimized */ int ste_nested; /* true if block is nested */ unsigned ste_free : 1; /* true if block has free variables */ unsigned ste_child_free : 1; /* true if a child block has free vars, including free refs to globals */ unsigned ste_generator : 1; /* true if namespace is a generator */ unsigned ste_varargs : 1; /* true if block has varargs */ unsigned ste_varkeywords : 1; /* true if block has varkeywords */ unsigned ste_returns_value : 1; /* true if namespace uses return with an argument */ int ste_lineno; /* first line of block */ int ste_opt_lineno; /* lineno of last exec or import * */ int ste_tmpname; /* counter for listcomp temp vars */ struct symtable *ste_table; } PySTEntryObject; PyAPI_DATA(PyTypeObject) PySTEntry_Type; #define PySTEntry_Check(op) (Py_TYPE(op) == &PySTEntry_Type) PyAPI_FUNC(int) PyST_GetScope(PySTEntryObject *, PyObject *); PyAPI_FUNC(struct symtable *) PySymtable_Build(mod_ty, const char *, PyFutureFeatures *); PyAPI_FUNC(PySTEntryObject *) PySymtable_Lookup(struct symtable *, void *); PyAPI_FUNC(void) PySymtable_Free(struct symtable *); /* Flags for def-use information */ #define DEF_GLOBAL 1 /* global stmt */ #define DEF_LOCAL 2 /* assignment in code block */ #define DEF_PARAM 2<<1 /* formal parameter */ #define USE 2<<2 /* name is used */ #define DEF_FREE 2<<3 /* name used but not defined in nested block */ #define DEF_FREE_CLASS 2<<4 /* free variable from class's method */ #define DEF_IMPORT 2<<5 /* assignment occurred via import */ #define DEF_BOUND (DEF_LOCAL | DEF_PARAM | DEF_IMPORT) /* GLOBAL_EXPLICIT and GLOBAL_IMPLICIT are used internally by the symbol table. GLOBAL is returned from PyST_GetScope() for either of them. It is stored in ste_symbols at bits 12-14. */ #define SCOPE_OFF 11 #define SCOPE_MASK 7 #define LOCAL 1 #define GLOBAL_EXPLICIT 2 #define GLOBAL_IMPLICIT 3 #define FREE 4 #define CELL 5 /* The following three names are used for the ste_unoptimized bit field */ #define OPT_IMPORT_STAR 1 #define OPT_EXEC 2 #define OPT_BARE_EXEC 4 #define OPT_TOPLEVEL 8 /* top-level names, including eval and exec */ #define GENERATOR 1 #define GENERATOR_EXPRESSION 2 #ifdef __cplusplus } #endif #endif /* !Py_SYMTABLE_H */ PKZ'}python2.7/metagrammar.hnu[#ifndef Py_METAGRAMMAR_H #define Py_METAGRAMMAR_H #ifdef __cplusplus extern "C" { #endif #define MSTART 256 #define RULE 257 #define RHS 258 #define ALT 259 #define ITEM 260 #define ATOM 261 #ifdef __cplusplus } #endif #endif /* !Py_METAGRAMMAR_H */ PKZ)Vpython2.7/pgen.hnu[#ifndef Py_PGEN_H #define Py_PGEN_H #ifdef __cplusplus extern "C" { #endif /* Parser generator interface */ extern grammar *meta_grammar(void); struct _node; extern grammar *pgen(struct _node *); #ifdef __cplusplus } #endif #endif /* !Py_PGEN_H */ PKZu0 python2.7/weakrefobject.hnu[/* Weak references objects for Python. */ #ifndef Py_WEAKREFOBJECT_H #define Py_WEAKREFOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct _PyWeakReference PyWeakReference; /* PyWeakReference is the base struct for the Python ReferenceType, ProxyType, * and CallableProxyType. */ struct _PyWeakReference { PyObject_HEAD /* The object to which this is a weak reference, or Py_None if none. * Note that this is a stealth reference: wr_object's refcount is * not incremented to reflect this pointer. */ PyObject *wr_object; /* A callable to invoke when wr_object dies, or NULL if none. */ PyObject *wr_callback; /* A cache for wr_object's hash code. As usual for hashes, this is -1 * if the hash code isn't known yet. */ long hash; /* If wr_object is weakly referenced, wr_object has a doubly-linked NULL- * terminated list of weak references to it. These are the list pointers. * If wr_object goes away, wr_object is set to Py_None, and these pointers * have no meaning then. */ PyWeakReference *wr_prev; PyWeakReference *wr_next; }; PyAPI_DATA(PyTypeObject) _PyWeakref_RefType; PyAPI_DATA(PyTypeObject) _PyWeakref_ProxyType; PyAPI_DATA(PyTypeObject) _PyWeakref_CallableProxyType; #define PyWeakref_CheckRef(op) PyObject_TypeCheck(op, &_PyWeakref_RefType) #define PyWeakref_CheckRefExact(op) \ (Py_TYPE(op) == &_PyWeakref_RefType) #define PyWeakref_CheckProxy(op) \ ((Py_TYPE(op) == &_PyWeakref_ProxyType) || \ (Py_TYPE(op) == &_PyWeakref_CallableProxyType)) #define PyWeakref_Check(op) \ (PyWeakref_CheckRef(op) || PyWeakref_CheckProxy(op)) PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob, PyObject *callback); PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob, PyObject *callback); PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref); PyAPI_FUNC(Py_ssize_t) _PyWeakref_GetWeakrefCount(PyWeakReference *head); PyAPI_FUNC(void) _PyWeakref_ClearRef(PyWeakReference *self); /* Explanation for the Py_REFCNT() check: when a weakref's target is part of a long chain of deallocations which triggers the trashcan mechanism, clearing the weakrefs can be delayed long after the target's refcount has dropped to zero. In the meantime, code accessing the weakref will be able to "see" the target object even though it is supposed to be unreachable. See issue #16602. */ #define PyWeakref_GET_OBJECT(ref) \ (Py_REFCNT(((PyWeakReference *)(ref))->wr_object) > 0 \ ? ((PyWeakReference *)(ref))->wr_object \ : Py_None) #ifdef __cplusplus } #endif #endif /* !Py_WEAKREFOBJECT_H */ PKZlQpython2.7/py_curses.hnu[ #ifndef Py_CURSES_H #define Py_CURSES_H #ifdef __APPLE__ /* ** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards ** against multiple definition of wchar_t. */ #ifdef _BSD_WCHAR_T_DEFINED_ #define _WCHAR_T #endif #endif /* __APPLE__ */ #ifdef __FreeBSD__ /* ** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards ** against multiple definition of wchar_t and wint_t. */ #ifdef _XOPEN_SOURCE_EXTENDED #ifndef __FreeBSD_version #include #endif #if __FreeBSD_version >= 500000 #ifndef __wchar_t #define __wchar_t #endif #ifndef __wint_t #define __wint_t #endif #else #ifndef _WCHAR_T #define _WCHAR_T #endif #ifndef _WINT_T #define _WINT_T #endif #endif #endif #endif #if !defined(HAVE_CURSES_IS_PAD) && defined(WINDOW_HAS_FLAGS) /* The following definition is necessary for ncurses 5.7; without it, some of [n]curses.h set NCURSES_OPAQUE to 1, and then Python can't get at the WINDOW flags field. */ #define NCURSES_OPAQUE 0 #endif #ifdef HAVE_NCURSES_H #include #else #include #endif #ifdef HAVE_NCURSES_H /* configure was checking , but we will use , which has some or all these features. */ #if !defined(WINDOW_HAS_FLAGS) && !(NCURSES_OPAQUE+0) #define WINDOW_HAS_FLAGS 1 #endif #if !defined(HAVE_CURSES_IS_PAD) && NCURSES_VERSION_PATCH+0 >= 20090906 #define HAVE_CURSES_IS_PAD 1 #endif #ifndef MVWDELCH_IS_EXPRESSION #define MVWDELCH_IS_EXPRESSION 1 #endif #endif #ifdef __cplusplus extern "C" { #endif #define PyCurses_API_pointers 4 /* Type declarations */ typedef struct { PyObject_HEAD WINDOW *win; } PyCursesWindowObject; #define PyCursesWindow_Check(v) (Py_TYPE(v) == &PyCursesWindow_Type) #define PyCurses_CAPSULE_NAME "_curses._C_API" #ifdef CURSES_MODULE /* This section is used when compiling _cursesmodule.c */ #else /* This section is used in modules that use the _cursesmodule API */ static void **PyCurses_API; #define PyCursesWindow_Type (*(PyTypeObject *) PyCurses_API[0]) #define PyCursesSetupTermCalled {if (! ((int (*)(void))PyCurses_API[1]) () ) return NULL;} #define PyCursesInitialised {if (! ((int (*)(void))PyCurses_API[2]) () ) return NULL;} #define PyCursesInitialisedColor {if (! ((int (*)(void))PyCurses_API[3]) () ) return NULL;} #define import_curses() \ PyCurses_API = (void **)PyCapsule_Import(PyCurses_CAPSULE_NAME, 1); #endif /* general error messages */ static char *catchall_ERR = "curses function returned ERR"; static char *catchall_NULL = "curses function returned NULL"; /* Function Prototype Macros - They are ugly but very, very useful. ;-) X - function name TYPE - parameter Type ERGSTR - format string for construction of the return value PARSESTR - format string for argument parsing */ #define NoArgNoReturnFunction(X) \ static PyObject *PyCurses_ ## X (PyObject *self) \ { \ PyCursesInitialised \ return PyCursesCheckERR(X(), # X); } #define NoArgOrFlagNoReturnFunction(X) \ static PyObject *PyCurses_ ## X (PyObject *self, PyObject *args) \ { \ int flag = 0; \ PyCursesInitialised \ switch(PyTuple_Size(args)) { \ case 0: \ return PyCursesCheckERR(X(), # X); \ case 1: \ if (!PyArg_ParseTuple(args, "i;True(1) or False(0)", &flag)) return NULL; \ if (flag) return PyCursesCheckERR(X(), # X); \ else return PyCursesCheckERR(no ## X (), # X); \ default: \ PyErr_SetString(PyExc_TypeError, # X " requires 0 or 1 arguments"); \ return NULL; } } #define NoArgReturnIntFunction(X) \ static PyObject *PyCurses_ ## X (PyObject *self) \ { \ PyCursesInitialised \ return PyInt_FromLong((long) X()); } #define NoArgReturnStringFunction(X) \ static PyObject *PyCurses_ ## X (PyObject *self) \ { \ PyCursesInitialised \ return PyString_FromString(X()); } #define NoArgTrueFalseFunction(X) \ static PyObject *PyCurses_ ## X (PyObject *self) \ { \ PyCursesInitialised \ if (X () == FALSE) { \ Py_INCREF(Py_False); \ return Py_False; \ } \ Py_INCREF(Py_True); \ return Py_True; } #define NoArgNoReturnVoidFunction(X) \ static PyObject *PyCurses_ ## X (PyObject *self) \ { \ PyCursesInitialised \ X(); \ Py_INCREF(Py_None); \ return Py_None; } #ifdef __cplusplus } #endif #endif /* !defined(Py_CURSES_H) */ PKZpython2.7/pyctype.hnu[#ifndef PYCTYPE_H #define PYCTYPE_H #define PY_CTF_LOWER 0x01 #define PY_CTF_UPPER 0x02 #define PY_CTF_ALPHA (PY_CTF_LOWER|PY_CTF_UPPER) #define PY_CTF_DIGIT 0x04 #define PY_CTF_ALNUM (PY_CTF_ALPHA|PY_CTF_DIGIT) #define PY_CTF_SPACE 0x08 #define PY_CTF_XDIGIT 0x10 PyAPI_DATA(const unsigned int) _Py_ctype_table[256]; /* Unlike their C counterparts, the following macros are not meant to * handle an int with any of the values [EOF, 0-UCHAR_MAX]. The argument * must be a signed/unsigned char. */ #define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER) #define Py_ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER) #define Py_ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA) #define Py_ISDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_DIGIT) #define Py_ISXDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_XDIGIT) #define Py_ISALNUM(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALNUM) #define Py_ISSPACE(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_SPACE) PyAPI_DATA(const unsigned char) _Py_ctype_tolower[256]; PyAPI_DATA(const unsigned char) _Py_ctype_toupper[256]; #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)]) #define Py_TOUPPER(c) (_Py_ctype_toupper[Py_CHARMASK(c)]) #endif /* !PYCTYPE_H */ PKZ- python2.7/bytes_methods.hnu[#ifndef Py_BYTES_CTYPE_H #define Py_BYTES_CTYPE_H /* * The internal implementation behind PyString (bytes) and PyBytes (buffer) * methods of the given names, they operate on ASCII byte strings. */ extern PyObject* _Py_bytes_isspace(const char *cptr, Py_ssize_t len); extern PyObject* _Py_bytes_isalpha(const char *cptr, Py_ssize_t len); extern PyObject* _Py_bytes_isalnum(const char *cptr, Py_ssize_t len); extern PyObject* _Py_bytes_isdigit(const char *cptr, Py_ssize_t len); extern PyObject* _Py_bytes_islower(const char *cptr, Py_ssize_t len); extern PyObject* _Py_bytes_isupper(const char *cptr, Py_ssize_t len); extern PyObject* _Py_bytes_istitle(const char *cptr, Py_ssize_t len); /* These store their len sized answer in the given preallocated *result arg. */ extern void _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len); extern void _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len); extern void _Py_bytes_title(char *result, char *s, Py_ssize_t len); extern void _Py_bytes_capitalize(char *result, char *s, Py_ssize_t len); extern void _Py_bytes_swapcase(char *result, char *s, Py_ssize_t len); /* Shared __doc__ strings. */ extern const char _Py_isspace__doc__[]; extern const char _Py_isalpha__doc__[]; extern const char _Py_isalnum__doc__[]; extern const char _Py_isdigit__doc__[]; extern const char _Py_islower__doc__[]; extern const char _Py_isupper__doc__[]; extern const char _Py_istitle__doc__[]; extern const char _Py_lower__doc__[]; extern const char _Py_upper__doc__[]; extern const char _Py_title__doc__[]; extern const char _Py_capitalize__doc__[]; extern const char _Py_swapcase__doc__[]; /* These are left in for backward compatibility and will be removed in 2.8/3.2 */ #define ISLOWER(c) Py_ISLOWER(c) #define ISUPPER(c) Py_ISUPPER(c) #define ISALPHA(c) Py_ISALPHA(c) #define ISDIGIT(c) Py_ISDIGIT(c) #define ISXDIGIT(c) Py_ISXDIGIT(c) #define ISALNUM(c) Py_ISALNUM(c) #define ISSPACE(c) Py_ISSPACE(c) #undef islower #define islower(c) undefined_islower(c) #undef isupper #define isupper(c) undefined_isupper(c) #undef isalpha #define isalpha(c) undefined_isalpha(c) #undef isdigit #define isdigit(c) undefined_isdigit(c) #undef isxdigit #define isxdigit(c) undefined_isxdigit(c) #undef isalnum #define isalnum(c) undefined_isalnum(c) #undef isspace #define isspace(c) undefined_isspace(c) /* These are left in for backward compatibility and will be removed in 2.8/3.2 */ #define TOLOWER(c) Py_TOLOWER(c) #define TOUPPER(c) Py_TOUPPER(c) #undef tolower #define tolower(c) undefined_tolower(c) #undef toupper #define toupper(c) undefined_toupper(c) /* this is needed because some docs are shared from the .o, not static */ #define PyDoc_STRVAR_shared(name,str) const char name[] = PyDoc_STR(str) #endif /* !Py_BYTES_CTYPE_H */ PKZ䖪python2.7/node.hnu[ /* Parse tree node interface */ #ifndef Py_NODE_H #define Py_NODE_H #ifdef __cplusplus extern "C" { #endif typedef struct _node { short n_type; char *n_str; int n_lineno; int n_col_offset; int n_nchildren; struct _node *n_child; } node; PyAPI_FUNC(node *) PyNode_New(int type); PyAPI_FUNC(int) PyNode_AddChild(node *n, int type, char *str, int lineno, int col_offset); PyAPI_FUNC(void) PyNode_Free(node *n); PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n); /* Node access functions */ #define NCH(n) ((n)->n_nchildren) #define CHILD(n, i) (&(n)->n_child[i]) #define RCHILD(n, i) (CHILD(n, NCH(n) + i)) #define TYPE(n) ((n)->n_type) #define STR(n) ((n)->n_str) /* Assert that the type of a node is what we expect */ #define REQ(n, type) assert(TYPE(n) == (type)) PyAPI_FUNC(void) PyNode_ListTree(node *); #ifdef __cplusplus } #endif #endif /* !Py_NODE_H */ PKZ python2.7/funcobject.hnu[ /* Function object interface */ #ifndef Py_FUNCOBJECT_H #define Py_FUNCOBJECT_H #ifdef __cplusplus extern "C" { #endif /* Function objects and code objects should not be confused with each other: * * Function objects are created by the execution of the 'def' statement. * They reference a code object in their func_code attribute, which is a * purely syntactic object, i.e. nothing more than a compiled version of some * source code lines. There is one code object per source code "fragment", * but each code object can be referenced by zero or many function objects * depending only on how many times the 'def' statement in the source was * executed so far. */ typedef struct { PyObject_HEAD PyObject *func_code; /* A code object */ PyObject *func_globals; /* A dictionary (other mappings won't do) */ PyObject *func_defaults; /* NULL or a tuple */ PyObject *func_closure; /* NULL or a tuple of cell objects */ PyObject *func_doc; /* The __doc__ attribute, can be anything */ PyObject *func_name; /* The __name__ attribute, a string object */ PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */ PyObject *func_weakreflist; /* List of weak references */ PyObject *func_module; /* The __module__ attribute, can be anything */ /* Invariant: * func_closure contains the bindings for func_code->co_freevars, so * PyTuple_Size(func_closure) == PyCode_GetNumFree(func_code) * (func_closure may be NULL if PyCode_GetNumFree(func_code) == 0). */ } PyFunctionObject; PyAPI_DATA(PyTypeObject) PyFunction_Type; #define PyFunction_Check(op) (Py_TYPE(op) == &PyFunction_Type) PyAPI_FUNC(PyObject *) PyFunction_New(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *); PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *); PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *); PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *); PyAPI_FUNC(int) PyFunction_SetDefaults(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *); PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *); /* Macros for direct access to these values. Type checks are *not* done, so use with care. */ #define PyFunction_GET_CODE(func) \ (((PyFunctionObject *)func) -> func_code) #define PyFunction_GET_GLOBALS(func) \ (((PyFunctionObject *)func) -> func_globals) #define PyFunction_GET_MODULE(func) \ (((PyFunctionObject *)func) -> func_module) #define PyFunction_GET_DEFAULTS(func) \ (((PyFunctionObject *)func) -> func_defaults) #define PyFunction_GET_CLOSURE(func) \ (((PyFunctionObject *)func) -> func_closure) /* The classmethod and staticmethod types lives here, too */ PyAPI_DATA(PyTypeObject) PyClassMethod_Type; PyAPI_DATA(PyTypeObject) PyStaticMethod_Type; PyAPI_FUNC(PyObject *) PyClassMethod_New(PyObject *); PyAPI_FUNC(PyObject *) PyStaticMethod_New(PyObject *); #ifdef __cplusplus } #endif #endif /* !Py_FUNCOBJECT_H */ PKZ{{python2.7/object.hnu[#ifndef Py_OBJECT_H #define Py_OBJECT_H #ifdef __cplusplus extern "C" { #endif /* Object and type object interface */ /* Objects are structures allocated on the heap. Special rules apply to the use of objects to ensure they are properly garbage-collected. Objects are never allocated statically or on the stack; they must be accessed through special macros and functions only. (Type objects are exceptions to the first rule; the standard types are represented by statically initialized type objects, although work on type/class unification for Python 2.2 made it possible to have heap-allocated type objects too). An object has a 'reference count' that is increased or decreased when a pointer to the object is copied or deleted; when the reference count reaches zero there are no references to the object left and it can be removed from the heap. An object has a 'type' that determines what it represents and what kind of data it contains. An object's type is fixed when it is created. Types themselves are represented as objects; an object contains a pointer to the corresponding type object. The type itself has a type pointer pointing to the object representing the type 'type', which contains a pointer to itself!). Objects do not float around in memory; once allocated an object keeps the same size and address. Objects that must hold variable-size data can contain pointers to variable-size parts of the object. Not all objects of the same type have the same size; but the size cannot change after allocation. (These restrictions are made so a reference to an object can be simply a pointer -- moving an object would require updating all the pointers, and changing an object's size would require moving it if there was another object right next to it.) Objects are always accessed through pointers of the type 'PyObject *'. The type 'PyObject' is a structure that only contains the reference count and the type pointer. The actual memory allocated for an object contains other data that can only be accessed after casting the pointer to a pointer to a longer structure type. This longer type must start with the reference count and type fields; the macro PyObject_HEAD should be used for this (to accommodate for future changes). The implementation of a particular object type can cast the object pointer to the proper type and back. A standard interface exists for objects that contain an array of items whose size is determined when the object is allocated. */ /* Py_DEBUG implies Py_TRACE_REFS. */ #if defined(Py_DEBUG) && !defined(Py_TRACE_REFS) #define Py_TRACE_REFS #endif /* Py_TRACE_REFS implies Py_REF_DEBUG. */ #if defined(Py_TRACE_REFS) && !defined(Py_REF_DEBUG) #define Py_REF_DEBUG #endif #ifdef Py_TRACE_REFS /* Define pointers to support a doubly-linked list of all live heap objects. */ #define _PyObject_HEAD_EXTRA \ struct _object *_ob_next; \ struct _object *_ob_prev; #define _PyObject_EXTRA_INIT 0, 0, #else #define _PyObject_HEAD_EXTRA #define _PyObject_EXTRA_INIT #endif /* PyObject_HEAD defines the initial segment of every PyObject. */ #define PyObject_HEAD \ _PyObject_HEAD_EXTRA \ Py_ssize_t ob_refcnt; \ struct _typeobject *ob_type; #define PyObject_HEAD_INIT(type) \ _PyObject_EXTRA_INIT \ 1, type, #define PyVarObject_HEAD_INIT(type, size) \ PyObject_HEAD_INIT(type) size, /* PyObject_VAR_HEAD defines the initial segment of all variable-size * container objects. These end with a declaration of an array with 1 * element, but enough space is malloc'ed so that the array actually * has room for ob_size elements. Note that ob_size is an element count, * not necessarily a byte count. */ #define PyObject_VAR_HEAD \ PyObject_HEAD \ Py_ssize_t ob_size; /* Number of items in variable part */ #define Py_INVALID_SIZE (Py_ssize_t)-1 /* Nothing is actually declared to be a PyObject, but every pointer to * a Python object can be cast to a PyObject*. This is inheritance built * by hand. Similarly every pointer to a variable-size Python object can, * in addition, be cast to PyVarObject*. */ typedef struct _object { PyObject_HEAD } PyObject; typedef struct { PyObject_VAR_HEAD } PyVarObject; #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) /* Type objects contain a string containing the type name (to help somewhat in debugging), the allocation parameters (see PyObject_New() and PyObject_NewVar()), and methods for accessing objects of the type. Methods are optional, a nil pointer meaning that particular kind of access is not available for this type. The Py_DECREF() macro uses the tp_dealloc method without checking for a nil pointer; it should always be implemented except if the implementation can guarantee that the reference count will never reach zero (e.g., for statically allocated type objects). NB: the methods for certain type groups are now contained in separate method blocks. */ typedef PyObject * (*unaryfunc)(PyObject *); typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); typedef int (*inquiry)(PyObject *); typedef Py_ssize_t (*lenfunc)(PyObject *); typedef int (*coercion)(PyObject **, PyObject **); typedef PyObject *(*intargfunc)(PyObject *, int) Py_DEPRECATED(2.5); typedef PyObject *(*intintargfunc)(PyObject *, int, int) Py_DEPRECATED(2.5); typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t); typedef int(*intobjargproc)(PyObject *, int, PyObject *); typedef int(*intintobjargproc)(PyObject *, int, int, PyObject *); typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); /* int-based buffer interface */ typedef int (*getreadbufferproc)(PyObject *, int, void **); typedef int (*getwritebufferproc)(PyObject *, int, void **); typedef int (*getsegcountproc)(PyObject *, int *); typedef int (*getcharbufferproc)(PyObject *, int, char **); /* ssize_t-based buffer interface */ typedef Py_ssize_t (*readbufferproc)(PyObject *, Py_ssize_t, void **); typedef Py_ssize_t (*writebufferproc)(PyObject *, Py_ssize_t, void **); typedef Py_ssize_t (*segcountproc)(PyObject *, Py_ssize_t *); typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, char **); /* Py3k buffer interface */ typedef struct bufferinfo { void *buf; PyObject *obj; /* owned reference */ Py_ssize_t len; Py_ssize_t itemsize; /* This is Py_ssize_t so it can be pointed to by strides in simple case.*/ int readonly; int ndim; char *format; Py_ssize_t *shape; Py_ssize_t *strides; Py_ssize_t *suboffsets; Py_ssize_t smalltable[2]; /* static store for shape and strides of mono-dimensional buffers. */ void *internal; } Py_buffer; typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); typedef void (*releasebufferproc)(PyObject *, Py_buffer *); /* Flags for getting buffers */ #define PyBUF_SIMPLE 0 #define PyBUF_WRITABLE 0x0001 /* we used to include an E, backwards compatible alias */ #define PyBUF_WRITEABLE PyBUF_WRITABLE #define PyBUF_FORMAT 0x0004 #define PyBUF_ND 0x0008 #define PyBUF_STRIDES (0x0010 | PyBUF_ND) #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #define PyBUF_CONTIG (PyBUF_ND | PyBUF_WRITABLE) #define PyBUF_CONTIG_RO (PyBUF_ND) #define PyBUF_STRIDED (PyBUF_STRIDES | PyBUF_WRITABLE) #define PyBUF_STRIDED_RO (PyBUF_STRIDES) #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_FORMAT) #define PyBUF_RECORDS_RO (PyBUF_STRIDES | PyBUF_FORMAT) #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FORMAT) #define PyBUF_FULL_RO (PyBUF_INDIRECT | PyBUF_FORMAT) #define PyBUF_READ 0x100 #define PyBUF_WRITE 0x200 #define PyBUF_SHADOW 0x400 /* end Py3k buffer interface */ typedef int (*objobjproc)(PyObject *, PyObject *); typedef int (*visitproc)(PyObject *, void *); typedef int (*traverseproc)(PyObject *, visitproc, void *); typedef struct { /* For numbers without flag bit Py_TPFLAGS_CHECKTYPES set, all arguments are guaranteed to be of the object's type (modulo coercion hacks -- i.e. if the type's coercion function returns other types, then these are allowed as well). Numbers that have the Py_TPFLAGS_CHECKTYPES flag bit set should check *both* arguments for proper type and implement the necessary conversions in the slot functions themselves. */ binaryfunc nb_add; binaryfunc nb_subtract; binaryfunc nb_multiply; binaryfunc nb_divide; binaryfunc nb_remainder; binaryfunc nb_divmod; ternaryfunc nb_power; unaryfunc nb_negative; unaryfunc nb_positive; unaryfunc nb_absolute; inquiry nb_nonzero; unaryfunc nb_invert; binaryfunc nb_lshift; binaryfunc nb_rshift; binaryfunc nb_and; binaryfunc nb_xor; binaryfunc nb_or; coercion nb_coerce; unaryfunc nb_int; unaryfunc nb_long; unaryfunc nb_float; unaryfunc nb_oct; unaryfunc nb_hex; /* Added in release 2.0 */ binaryfunc nb_inplace_add; binaryfunc nb_inplace_subtract; binaryfunc nb_inplace_multiply; binaryfunc nb_inplace_divide; binaryfunc nb_inplace_remainder; ternaryfunc nb_inplace_power; binaryfunc nb_inplace_lshift; binaryfunc nb_inplace_rshift; binaryfunc nb_inplace_and; binaryfunc nb_inplace_xor; binaryfunc nb_inplace_or; /* Added in release 2.2 */ /* The following require the Py_TPFLAGS_HAVE_CLASS flag */ binaryfunc nb_floor_divide; binaryfunc nb_true_divide; binaryfunc nb_inplace_floor_divide; binaryfunc nb_inplace_true_divide; /* Added in release 2.5 */ unaryfunc nb_index; } PyNumberMethods; typedef struct { lenfunc sq_length; binaryfunc sq_concat; ssizeargfunc sq_repeat; ssizeargfunc sq_item; ssizessizeargfunc sq_slice; ssizeobjargproc sq_ass_item; ssizessizeobjargproc sq_ass_slice; objobjproc sq_contains; /* Added in release 2.0 */ binaryfunc sq_inplace_concat; ssizeargfunc sq_inplace_repeat; } PySequenceMethods; typedef struct { lenfunc mp_length; binaryfunc mp_subscript; objobjargproc mp_ass_subscript; } PyMappingMethods; typedef struct { readbufferproc bf_getreadbuffer; writebufferproc bf_getwritebuffer; segcountproc bf_getsegcount; charbufferproc bf_getcharbuffer; getbufferproc bf_getbuffer; releasebufferproc bf_releasebuffer; } PyBufferProcs; typedef void (*freefunc)(void *); typedef void (*destructor)(PyObject *); typedef int (*printfunc)(PyObject *, FILE *, int); typedef PyObject *(*getattrfunc)(PyObject *, char *); typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); typedef int (*setattrfunc)(PyObject *, char *, PyObject *); typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); typedef int (*cmpfunc)(PyObject *, PyObject *); typedef PyObject *(*reprfunc)(PyObject *); typedef long (*hashfunc)(PyObject *); typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int); typedef PyObject *(*getiterfunc) (PyObject *); typedef PyObject *(*iternextfunc) (PyObject *); typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *); typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *); typedef int (*initproc)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*newfunc)(struct _typeobject *, PyObject *, PyObject *); typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t); typedef struct _typeobject { PyObject_VAR_HEAD const char *tp_name; /* For printing, in format "." */ Py_ssize_t tp_basicsize, tp_itemsize; /* For allocation */ /* Methods to implement standard operations */ destructor tp_dealloc; printfunc tp_print; getattrfunc tp_getattr; setattrfunc tp_setattr; cmpfunc tp_compare; reprfunc tp_repr; /* Method suites for standard classes */ PyNumberMethods *tp_as_number; PySequenceMethods *tp_as_sequence; PyMappingMethods *tp_as_mapping; /* More standard operations (here for binary compatibility) */ hashfunc tp_hash; ternaryfunc tp_call; reprfunc tp_str; getattrofunc tp_getattro; setattrofunc tp_setattro; /* Functions to access object as input/output buffer */ PyBufferProcs *tp_as_buffer; /* Flags to define presence of optional/expanded features */ long tp_flags; const char *tp_doc; /* Documentation string */ /* Assigned meaning in release 2.0 */ /* call function for all accessible objects */ traverseproc tp_traverse; /* delete references to contained objects */ inquiry tp_clear; /* Assigned meaning in release 2.1 */ /* rich comparisons */ richcmpfunc tp_richcompare; /* weak reference enabler */ Py_ssize_t tp_weaklistoffset; /* Added in release 2.2 */ /* Iterators */ getiterfunc tp_iter; iternextfunc tp_iternext; /* Attribute descriptor and subclassing stuff */ struct PyMethodDef *tp_methods; struct PyMemberDef *tp_members; struct PyGetSetDef *tp_getset; struct _typeobject *tp_base; PyObject *tp_dict; descrgetfunc tp_descr_get; descrsetfunc tp_descr_set; Py_ssize_t tp_dictoffset; initproc tp_init; allocfunc tp_alloc; newfunc tp_new; freefunc tp_free; /* Low-level free-memory routine */ inquiry tp_is_gc; /* For PyObject_IS_GC */ PyObject *tp_bases; PyObject *tp_mro; /* method resolution order */ PyObject *tp_cache; PyObject *tp_subclasses; PyObject *tp_weaklist; destructor tp_del; /* Type attribute cache version tag. Added in version 2.6 */ unsigned int tp_version_tag; #ifdef COUNT_ALLOCS /* these must be last and never explicitly initialized */ Py_ssize_t tp_allocs; Py_ssize_t tp_frees; Py_ssize_t tp_maxalloc; struct _typeobject *tp_prev; struct _typeobject *tp_next; #endif } PyTypeObject; /* The *real* layout of a type object when allocated on the heap */ typedef struct _heaptypeobject { /* Note: there's a dependency on the order of these members in slotptr() in typeobject.c . */ PyTypeObject ht_type; PyNumberMethods as_number; PyMappingMethods as_mapping; PySequenceMethods as_sequence; /* as_sequence comes after as_mapping, so that the mapping wins when both the mapping and the sequence define a given operator (e.g. __getitem__). see add_operators() in typeobject.c . */ PyBufferProcs as_buffer; PyObject *ht_name, *ht_slots; /* here are optional user slots, followed by the members. */ } PyHeapTypeObject; /* access macro to the members which are floating "behind" the object */ #define PyHeapType_GET_MEMBERS(etype) \ ((PyMemberDef *)(((char *)etype) + Py_TYPE(etype)->tp_basicsize)) /* Generic type check */ PyAPI_FUNC(int) PyType_IsSubtype(PyTypeObject *, PyTypeObject *); #define PyObject_TypeCheck(ob, tp) \ (Py_TYPE(ob) == (tp) || PyType_IsSubtype(Py_TYPE(ob), (tp))) PyAPI_DATA(PyTypeObject) PyType_Type; /* built-in 'type' */ PyAPI_DATA(PyTypeObject) PyBaseObject_Type; /* built-in 'object' */ PyAPI_DATA(PyTypeObject) PySuper_Type; /* built-in 'super' */ #define PyType_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS) #define PyType_CheckExact(op) (Py_TYPE(op) == &PyType_Type) PyAPI_FUNC(int) PyType_Ready(PyTypeObject *); PyAPI_FUNC(PyObject *) PyType_GenericAlloc(PyTypeObject *, Py_ssize_t); PyAPI_FUNC(PyObject *) PyType_GenericNew(PyTypeObject *, PyObject *, PyObject *); PyAPI_FUNC(PyObject *) _PyType_Lookup(PyTypeObject *, PyObject *); PyAPI_FUNC(PyObject *) _PyObject_LookupSpecial(PyObject *, char *, PyObject **); PyAPI_FUNC(unsigned int) PyType_ClearCache(void); PyAPI_FUNC(void) PyType_Modified(PyTypeObject *); /* Generic operations on objects */ PyAPI_FUNC(int) PyObject_Print(PyObject *, FILE *, int); PyAPI_FUNC(void) _PyObject_Dump(PyObject *); PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *); PyAPI_FUNC(PyObject *) _PyObject_Str(PyObject *); PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *); #define PyObject_Bytes PyObject_Str #ifdef Py_USING_UNICODE PyAPI_FUNC(PyObject *) PyObject_Unicode(PyObject *); #endif PyAPI_FUNC(int) PyObject_Compare(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int); PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int); PyAPI_FUNC(PyObject *) PyObject_GetAttrString(PyObject *, const char *); PyAPI_FUNC(int) PyObject_SetAttrString(PyObject *, const char *, PyObject *); PyAPI_FUNC(int) PyObject_HasAttrString(PyObject *, const char *); PyAPI_FUNC(PyObject *) PyObject_GetAttr(PyObject *, PyObject *); PyAPI_FUNC(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(int) PyObject_HasAttr(PyObject *, PyObject *); PyAPI_FUNC(PyObject **) _PyObject_GetDictPtr(PyObject *); PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *); PyAPI_FUNC(PyObject *) _PyObject_NextNotImplemented(PyObject *); PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *); PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(long) PyObject_Hash(PyObject *); PyAPI_FUNC(long) PyObject_HashNotImplemented(PyObject *); PyAPI_FUNC(int) PyObject_IsTrue(PyObject *); PyAPI_FUNC(int) PyObject_Not(PyObject *); PyAPI_FUNC(int) PyCallable_Check(PyObject *); PyAPI_FUNC(int) PyNumber_Coerce(PyObject **, PyObject **); PyAPI_FUNC(int) PyNumber_CoerceEx(PyObject **, PyObject **); PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *); /* A slot function whose address we need to compare */ extern int _PyObject_SlotCompare(PyObject *, PyObject *); /* Same as PyObject_Generic{Get,Set}Attr, but passing the attributes dict as the last parameter. */ PyAPI_FUNC(PyObject *) _PyObject_GenericGetAttrWithDict(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(int) _PyObject_GenericSetAttrWithDict(PyObject *, PyObject *, PyObject *, PyObject *); /* PyObject_Dir(obj) acts like Python __builtin__.dir(obj), returning a list of strings. PyObject_Dir(NULL) is like __builtin__.dir(), returning the names of the current locals. In this case, if there are no current locals, NULL is returned, and PyErr_Occurred() is false. */ PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *); /* Helpers for printing recursive container types */ PyAPI_FUNC(int) Py_ReprEnter(PyObject *); PyAPI_FUNC(void) Py_ReprLeave(PyObject *); /* Helpers for hash functions */ PyAPI_FUNC(long) _Py_HashDouble(double); PyAPI_FUNC(long) _Py_HashPointer(void*); typedef struct { long prefix; long suffix; } _Py_HashSecret_t; PyAPI_DATA(_Py_HashSecret_t) _Py_HashSecret; #ifdef Py_DEBUG PyAPI_DATA(int) _Py_HashSecret_Initialized; #endif /* Helper for passing objects to printf and the like. Leaks refcounts. Don't use it! */ #define PyObject_REPR(obj) PyString_AS_STRING(PyObject_Repr(obj)) /* Flag bits for printing: */ #define Py_PRINT_RAW 1 /* No string quotes etc. */ /* `Type flags (tp_flags) These flags are used to extend the type structure in a backwards-compatible fashion. Extensions can use the flags to indicate (and test) when a given type structure contains a new feature. The Python core will use these when introducing new functionality between major revisions (to avoid mid-version changes in the PYTHON_API_VERSION). Arbitration of the flag bit positions will need to be coordinated among all extension writers who publically release their extensions (this will be fewer than you might expect!).. Python 1.5.2 introduced the bf_getcharbuffer slot into PyBufferProcs. Type definitions should use Py_TPFLAGS_DEFAULT for their tp_flags value. Code can use PyType_HasFeature(type_ob, flag_value) to test whether the given type object has a specified feature. NOTE: when building the core, Py_TPFLAGS_DEFAULT includes Py_TPFLAGS_HAVE_VERSION_TAG; outside the core, it doesn't. This is so that extensions that modify tp_dict of their own types directly don't break, since this was allowed in 2.5. In 3.0 they will have to manually remove this flag though! */ /* PyBufferProcs contains bf_getcharbuffer */ #define Py_TPFLAGS_HAVE_GETCHARBUFFER (1L<<0) /* PySequenceMethods contains sq_contains */ #define Py_TPFLAGS_HAVE_SEQUENCE_IN (1L<<1) /* This is here for backwards compatibility. Extensions that use the old GC * API will still compile but the objects will not be tracked by the GC. */ #define Py_TPFLAGS_GC 0 /* used to be (1L<<2) */ /* PySequenceMethods and PyNumberMethods contain in-place operators */ #define Py_TPFLAGS_HAVE_INPLACEOPS (1L<<3) /* PyNumberMethods do their own coercion */ #define Py_TPFLAGS_CHECKTYPES (1L<<4) /* tp_richcompare is defined */ #define Py_TPFLAGS_HAVE_RICHCOMPARE (1L<<5) /* Objects which are weakly referencable if their tp_weaklistoffset is >0 */ #define Py_TPFLAGS_HAVE_WEAKREFS (1L<<6) /* tp_iter is defined */ #define Py_TPFLAGS_HAVE_ITER (1L<<7) /* New members introduced by Python 2.2 exist */ #define Py_TPFLAGS_HAVE_CLASS (1L<<8) /* Set if the type object is dynamically allocated */ #define Py_TPFLAGS_HEAPTYPE (1L<<9) /* Set if the type allows subclassing */ #define Py_TPFLAGS_BASETYPE (1L<<10) /* Set if the type is 'ready' -- fully initialized */ #define Py_TPFLAGS_READY (1L<<12) /* Set while the type is being 'readied', to prevent recursive ready calls */ #define Py_TPFLAGS_READYING (1L<<13) /* Objects support garbage collection (see objimp.h) */ #define Py_TPFLAGS_HAVE_GC (1L<<14) /* These two bits are preserved for Stackless Python, next after this is 17 */ #ifdef STACKLESS #define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION (3L<<15) #else #define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION 0 #endif /* Objects support nb_index in PyNumberMethods */ #define Py_TPFLAGS_HAVE_INDEX (1L<<17) /* Objects support type attribute cache */ #define Py_TPFLAGS_HAVE_VERSION_TAG (1L<<18) #define Py_TPFLAGS_VALID_VERSION_TAG (1L<<19) /* Type is abstract and cannot be instantiated */ #define Py_TPFLAGS_IS_ABSTRACT (1L<<20) /* Has the new buffer protocol */ #define Py_TPFLAGS_HAVE_NEWBUFFER (1L<<21) /* These flags are used to determine if a type is a subclass. */ #define Py_TPFLAGS_INT_SUBCLASS (1L<<23) #define Py_TPFLAGS_LONG_SUBCLASS (1L<<24) #define Py_TPFLAGS_LIST_SUBCLASS (1L<<25) #define Py_TPFLAGS_TUPLE_SUBCLASS (1L<<26) #define Py_TPFLAGS_STRING_SUBCLASS (1L<<27) #define Py_TPFLAGS_UNICODE_SUBCLASS (1L<<28) #define Py_TPFLAGS_DICT_SUBCLASS (1L<<29) #define Py_TPFLAGS_BASE_EXC_SUBCLASS (1L<<30) #define Py_TPFLAGS_TYPE_SUBCLASS (1L<<31) #define Py_TPFLAGS_DEFAULT_EXTERNAL ( \ Py_TPFLAGS_HAVE_GETCHARBUFFER | \ Py_TPFLAGS_HAVE_SEQUENCE_IN | \ Py_TPFLAGS_HAVE_INPLACEOPS | \ Py_TPFLAGS_HAVE_RICHCOMPARE | \ Py_TPFLAGS_HAVE_WEAKREFS | \ Py_TPFLAGS_HAVE_ITER | \ Py_TPFLAGS_HAVE_CLASS | \ Py_TPFLAGS_HAVE_STACKLESS_EXTENSION | \ Py_TPFLAGS_HAVE_INDEX | \ 0) #define Py_TPFLAGS_DEFAULT_CORE (Py_TPFLAGS_DEFAULT_EXTERNAL | \ Py_TPFLAGS_HAVE_VERSION_TAG) #ifdef Py_BUILD_CORE #define Py_TPFLAGS_DEFAULT Py_TPFLAGS_DEFAULT_CORE #else #define Py_TPFLAGS_DEFAULT Py_TPFLAGS_DEFAULT_EXTERNAL #endif #define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0) #define PyType_FastSubclass(t,f) PyType_HasFeature(t,f) /* The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement reference counts. Py_DECREF calls the object's deallocator function when the refcount falls to 0; for objects that don't contain references to other objects or heap memory this can be the standard function free(). Both macros can be used wherever a void expression is allowed. The argument must not be a NULL pointer. If it may be NULL, use Py_XINCREF/Py_XDECREF instead. The macro _Py_NewReference(op) initialize reference counts to 1, and in special builds (Py_REF_DEBUG, Py_TRACE_REFS) performs additional bookkeeping appropriate to the special build. We assume that the reference count field can never overflow; this can be proven when the size of the field is the same as the pointer size, so we ignore the possibility. Provided a C int is at least 32 bits (which is implicitly assumed in many parts of this code), that's enough for about 2**31 references to an object. XXX The following became out of date in Python 2.2, but I'm not sure XXX what the full truth is now. Certainly, heap-allocated type objects XXX can and should be deallocated. Type objects should never be deallocated; the type pointer in an object is not considered to be a reference to the type object, to save complications in the deallocation function. (This is actually a decision that's up to the implementer of each new type so if you want, you can count such references to the type object.) *** WARNING*** The Py_DECREF macro must have a side-effect-free argument since it may evaluate its argument multiple times. (The alternative would be to mace it a proper function or assign it to a global temporary variable first, both of which are slower; and in a multi-threaded environment the global variable trick is not safe.) */ /* First define a pile of simple helper macros, one set per special * build symbol. These either expand to the obvious things, or to * nothing at all when the special mode isn't in effect. The main * macros can later be defined just once then, yet expand to different * things depending on which special build options are and aren't in effect. * Trust me : while painful, this is 20x easier to understand than, * e.g, defining _Py_NewReference five different times in a maze of nested * #ifdefs (we used to do that -- it was impenetrable). */ #ifdef Py_REF_DEBUG PyAPI_DATA(Py_ssize_t) _Py_RefTotal; PyAPI_FUNC(void) _Py_NegativeRefcount(const char *fname, int lineno, PyObject *op); PyAPI_FUNC(PyObject *) _PyDict_Dummy(void); PyAPI_FUNC(PyObject *) _PySet_Dummy(void); PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void); #define _Py_INC_REFTOTAL _Py_RefTotal++ #define _Py_DEC_REFTOTAL _Py_RefTotal-- #define _Py_REF_DEBUG_COMMA , #define _Py_CHECK_REFCNT(OP) \ { if (((PyObject*)OP)->ob_refcnt < 0) \ _Py_NegativeRefcount(__FILE__, __LINE__, \ (PyObject *)(OP)); \ } #else #define _Py_INC_REFTOTAL #define _Py_DEC_REFTOTAL #define _Py_REF_DEBUG_COMMA #define _Py_CHECK_REFCNT(OP) /* a semicolon */; #endif /* Py_REF_DEBUG */ #ifdef COUNT_ALLOCS PyAPI_FUNC(void) inc_count(PyTypeObject *); PyAPI_FUNC(void) dec_count(PyTypeObject *); #define _Py_INC_TPALLOCS(OP) inc_count(Py_TYPE(OP)) #define _Py_INC_TPFREES(OP) dec_count(Py_TYPE(OP)) #define _Py_DEC_TPFREES(OP) Py_TYPE(OP)->tp_frees-- #define _Py_COUNT_ALLOCS_COMMA , #else #define _Py_INC_TPALLOCS(OP) #define _Py_INC_TPFREES(OP) #define _Py_DEC_TPFREES(OP) #define _Py_COUNT_ALLOCS_COMMA #endif /* COUNT_ALLOCS */ #ifdef Py_TRACE_REFS /* Py_TRACE_REFS is such major surgery that we call external routines. */ PyAPI_FUNC(void) _Py_NewReference(PyObject *); PyAPI_FUNC(void) _Py_ForgetReference(PyObject *); PyAPI_FUNC(void) _Py_Dealloc(PyObject *); PyAPI_FUNC(void) _Py_PrintReferences(FILE *); PyAPI_FUNC(void) _Py_PrintReferenceAddresses(FILE *); PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force); #else /* Without Py_TRACE_REFS, there's little enough to do that we expand code * inline. */ #define _Py_NewReference(op) ( \ _Py_INC_TPALLOCS(op) _Py_COUNT_ALLOCS_COMMA \ _Py_INC_REFTOTAL _Py_REF_DEBUG_COMMA \ Py_REFCNT(op) = 1) #define _Py_ForgetReference(op) _Py_INC_TPFREES(op) #define _Py_Dealloc(op) ( \ _Py_INC_TPFREES(op) _Py_COUNT_ALLOCS_COMMA \ (*Py_TYPE(op)->tp_dealloc)((PyObject *)(op))) #endif /* !Py_TRACE_REFS */ #define Py_INCREF(op) ( \ _Py_INC_REFTOTAL _Py_REF_DEBUG_COMMA \ ((PyObject*)(op))->ob_refcnt++) #define Py_DECREF(op) \ do { \ if (_Py_DEC_REFTOTAL _Py_REF_DEBUG_COMMA \ --((PyObject*)(op))->ob_refcnt != 0) \ _Py_CHECK_REFCNT(op) \ else \ _Py_Dealloc((PyObject *)(op)); \ } while (0) /* Safely decref `op` and set `op` to NULL, especially useful in tp_clear * and tp_dealloc implementations. * * Note that "the obvious" code can be deadly: * * Py_XDECREF(op); * op = NULL; * * Typically, `op` is something like self->containee, and `self` is done * using its `containee` member. In the code sequence above, suppose * `containee` is non-NULL with a refcount of 1. Its refcount falls to * 0 on the first line, which can trigger an arbitrary amount of code, * possibly including finalizers (like __del__ methods or weakref callbacks) * coded in Python, which in turn can release the GIL and allow other threads * to run, etc. Such code may even invoke methods of `self` again, or cause * cyclic gc to trigger, but-- oops! --self->containee still points to the * object being torn down, and it may be in an insane state while being torn * down. This has in fact been a rich historic source of miserable (rare & * hard-to-diagnose) segfaulting (and other) bugs. * * The safe way is: * * Py_CLEAR(op); * * That arranges to set `op` to NULL _before_ decref'ing, so that any code * triggered as a side-effect of `op` getting torn down no longer believes * `op` points to a valid object. * * There are cases where it's safe to use the naive code, but they're brittle. * For example, if `op` points to a Python integer, you know that destroying * one of those can't cause problems -- but in part that relies on that * Python integers aren't currently weakly referencable. Best practice is * to use Py_CLEAR() even if you can't think of a reason for why you need to. */ #define Py_CLEAR(op) \ do { \ if (op) { \ PyObject *_py_tmp = (PyObject *)(op); \ (op) = NULL; \ Py_DECREF(_py_tmp); \ } \ } while (0) /* Macros to use in case the object pointer may be NULL: */ #define Py_XINCREF(op) do { if ((op) == NULL) ; else Py_INCREF(op); } while (0) #define Py_XDECREF(op) do { if ((op) == NULL) ; else Py_DECREF(op); } while (0) /* Safely decref `op` and set `op` to `op2`. * * As in case of Py_CLEAR "the obvious" code can be deadly: * * Py_DECREF(op); * op = op2; * * The safe way is: * * Py_SETREF(op, op2); * * That arranges to set `op` to `op2` _before_ decref'ing, so that any code * triggered as a side-effect of `op` getting torn down no longer believes * `op` points to a valid object. * * Py_XSETREF is a variant of Py_SETREF that uses Py_XDECREF instead of * Py_DECREF. */ #define Py_SETREF(op, op2) \ do { \ PyObject *_py_tmp = (PyObject *)(op); \ (op) = (op2); \ Py_DECREF(_py_tmp); \ } while (0) #define Py_XSETREF(op, op2) \ do { \ PyObject *_py_tmp = (PyObject *)(op); \ (op) = (op2); \ Py_XDECREF(_py_tmp); \ } while (0) /* These are provided as conveniences to Python runtime embedders, so that they can have object code that is not dependent on Python compilation flags. */ PyAPI_FUNC(void) Py_IncRef(PyObject *); PyAPI_FUNC(void) Py_DecRef(PyObject *); /* _Py_NoneStruct is an object of undefined type which can be used in contexts where NULL (nil) is not suitable (since NULL often means 'error'). Don't forget to apply Py_INCREF() when returning this value!!! */ PyAPI_DATA(PyObject) _Py_NoneStruct; /* Don't use this directly */ #define Py_None (&_Py_NoneStruct) /* Macro for returning Py_None from a function */ #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None /* Py_NotImplemented is a singleton used to signal that an operation is not implemented for a given type combination. */ PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */ #define Py_NotImplemented (&_Py_NotImplementedStruct) /* Rich comparison opcodes */ #define Py_LT 0 #define Py_LE 1 #define Py_EQ 2 #define Py_NE 3 #define Py_GT 4 #define Py_GE 5 /* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE. * Defined in object.c. */ PyAPI_DATA(int) _Py_SwappedOp[]; /* Define staticforward and statichere for source compatibility with old C extensions. The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) */ #define staticforward static #define statichere static /* More conventions ================ Argument Checking ----------------- Functions that take objects as arguments normally don't check for nil arguments, but they do check the type of the argument, and return an error if the function doesn't apply to the type. Failure Modes ------------- Functions may fail for a variety of reasons, including running out of memory. This is communicated to the caller in two ways: an error string is set (see errors.h), and the function result differs: functions that normally return a pointer return NULL for failure, functions returning an integer return -1 (which could be a legal return value too!), and other functions return 0 for success and -1 for failure. Callers should always check for errors before using the result. If an error was set, the caller must either explicitly clear it, or pass the error on to its caller. Reference Counts ---------------- It takes a while to get used to the proper usage of reference counts. Functions that create an object set the reference count to 1; such new objects must be stored somewhere or destroyed again with Py_DECREF(). Some functions that 'store' objects, such as PyTuple_SetItem() and PyList_SetItem(), don't increment the reference count of the object, since the most frequent use is to store a fresh object. Functions that 'retrieve' objects, such as PyTuple_GetItem() and PyDict_GetItemString(), also don't increment the reference count, since most frequently the object is only looked at quickly. Thus, to retrieve an object and store it again, the caller must call Py_INCREF() explicitly. NOTE: functions that 'consume' a reference count, like PyList_SetItem(), consume the reference even if the object wasn't successfully stored, to simplify error handling. It seems attractive to make other functions that take an object as argument consume a reference count; however, this may quickly get confusing (even the current practice is already confusing). Consider it carefully, it may save lots of calls to Py_INCREF() and Py_DECREF() at times. */ /* Trashcan mechanism, thanks to Christian Tismer. When deallocating a container object, it's possible to trigger an unbounded chain of deallocations, as each Py_DECREF in turn drops the refcount on "the next" object in the chain to 0. This can easily lead to stack faults, and especially in threads (which typically have less stack space to work with). A container object that participates in cyclic gc can avoid this by bracketing the body of its tp_dealloc function with a pair of macros: static void mytype_dealloc(mytype *p) { ... declarations go here ... PyObject_GC_UnTrack(p); // must untrack first Py_TRASHCAN_SAFE_BEGIN(p) ... The body of the deallocator goes here, including all calls ... ... to Py_DECREF on contained objects. ... Py_TRASHCAN_SAFE_END(p) } CAUTION: Never return from the middle of the body! If the body needs to "get out early", put a label immediately before the Py_TRASHCAN_SAFE_END call, and goto it. Else the call-depth counter (see below) will stay above 0 forever, and the trashcan will never get emptied. How it works: The BEGIN macro increments a call-depth counter. So long as this counter is small, the body of the deallocator is run directly without further ado. But if the counter gets large, it instead adds p to a list of objects to be deallocated later, skips the body of the deallocator, and resumes execution after the END macro. The tp_dealloc routine then returns without deallocating anything (and so unbounded call-stack depth is avoided). When the call stack finishes unwinding again, code generated by the END macro notices this, and calls another routine to deallocate all the objects that may have been added to the list of deferred deallocations. In effect, a chain of N deallocations is broken into N / PyTrash_UNWIND_LEVEL pieces, with the call stack never exceeding a depth of PyTrash_UNWIND_LEVEL. */ /* This is the old private API, invoked by the macros before 2.7.4. Kept for binary compatibility of extensions. */ PyAPI_FUNC(void) _PyTrash_deposit_object(PyObject*); PyAPI_FUNC(void) _PyTrash_destroy_chain(void); PyAPI_DATA(int) _PyTrash_delete_nesting; PyAPI_DATA(PyObject *) _PyTrash_delete_later; /* The new thread-safe private API, invoked by the macros below. */ PyAPI_FUNC(void) _PyTrash_thread_deposit_object(PyObject*); PyAPI_FUNC(void) _PyTrash_thread_destroy_chain(void); #define PyTrash_UNWIND_LEVEL 50 /* Note the workaround for when the thread state is NULL (issue #17703) */ #define Py_TRASHCAN_SAFE_BEGIN(op) \ do { \ PyThreadState *_tstate = PyThreadState_GET(); \ if (!_tstate || \ _tstate->trash_delete_nesting < PyTrash_UNWIND_LEVEL) { \ if (_tstate) \ ++_tstate->trash_delete_nesting; /* The body of the deallocator is here. */ #define Py_TRASHCAN_SAFE_END(op) \ if (_tstate) { \ --_tstate->trash_delete_nesting; \ if (_tstate->trash_delete_later \ && _tstate->trash_delete_nesting <= 0) \ _PyTrash_thread_destroy_chain(); \ } \ } \ else \ _PyTrash_thread_deposit_object((PyObject*)op); \ } while (0); PyAPI_FUNC(void) _PyDebugAllocatorStats(FILE *out, const char *block_name, int num_blocks, size_t sizeof_block); PyAPI_FUNC(void) _PyObject_DebugTypeStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_OBJECT_H */ PKZxpython2.7/pyconfig.hnu[#include #if __WORDSIZE == 32 #include "pyconfig-32.h" #elif __WORDSIZE == 64 #include "pyconfig-64.h" #else #error "Unknown word size" #endif PKZH~python2.7/pythread.hnu[ #ifndef Py_PYTHREAD_H #define Py_PYTHREAD_H typedef void *PyThread_type_lock; typedef void *PyThread_type_sema; #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(void) PyThread_init_thread(void); PyAPI_FUNC(long) PyThread_start_new_thread(void (*)(void *), void *); PyAPI_FUNC(void) PyThread_exit_thread(void); PyAPI_FUNC(long) PyThread_get_thread_ident(void); PyAPI_FUNC(PyThread_type_lock) PyThread_allocate_lock(void); PyAPI_FUNC(void) PyThread_free_lock(PyThread_type_lock); PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int); #define WAIT_LOCK 1 #define NOWAIT_LOCK 0 PyAPI_FUNC(void) PyThread_release_lock(PyThread_type_lock); PyAPI_FUNC(size_t) PyThread_get_stacksize(void); PyAPI_FUNC(int) PyThread_set_stacksize(size_t); /* Thread Local Storage (TLS) API */ PyAPI_FUNC(int) PyThread_create_key(void); PyAPI_FUNC(void) PyThread_delete_key(int); PyAPI_FUNC(int) PyThread_set_key_value(int, void *); PyAPI_FUNC(void *) PyThread_get_key_value(int); PyAPI_FUNC(void) PyThread_delete_key_value(int key); /* Cleanup after a fork */ PyAPI_FUNC(void) PyThread_ReInitTLS(void); #ifdef __cplusplus } #endif #endif /* !Py_PYTHREAD_H */ PKZ=U U python2.7/structmember.hnu[#ifndef Py_STRUCTMEMBER_H #define Py_STRUCTMEMBER_H #ifdef __cplusplus extern "C" { #endif /* Interface to map C struct members to Python object attributes */ #include /* For offsetof */ /* The offsetof() macro calculates the offset of a structure member in its structure. Unfortunately this cannot be written down portably, hence it is provided by a Standard C header file. For pre-Standard C compilers, here is a version that usually works (but watch out!): */ #ifndef offsetof #define offsetof(type, member) ( (int) & ((type*)0) -> member ) #endif /* An array of memberlist structures defines the name, type and offset of selected members of a C structure. These can be read by PyMember_Get() and set by PyMember_Set() (except if their READONLY flag is set). The array must be terminated with an entry whose name pointer is NULL. */ struct memberlist { /* Obsolete version, for binary backwards compatibility */ char *name; int type; int offset; int flags; }; typedef struct PyMemberDef { /* Current version, use this */ char *name; int type; Py_ssize_t offset; int flags; char *doc; } PyMemberDef; /* Types */ #define T_SHORT 0 #define T_INT 1 #define T_LONG 2 #define T_FLOAT 3 #define T_DOUBLE 4 #define T_STRING 5 #define T_OBJECT 6 /* XXX the ordering here is weird for binary compatibility */ #define T_CHAR 7 /* 1-character string */ #define T_BYTE 8 /* 8-bit signed int */ /* unsigned variants: */ #define T_UBYTE 9 #define T_USHORT 10 #define T_UINT 11 #define T_ULONG 12 /* Added by Jack: strings contained in the structure */ #define T_STRING_INPLACE 13 /* Added by Lillo: bools contained in the structure (assumed char) */ #define T_BOOL 14 #define T_OBJECT_EX 16 /* Like T_OBJECT, but raises AttributeError when the value is NULL, instead of converting to None. */ #ifdef HAVE_LONG_LONG #define T_LONGLONG 17 #define T_ULONGLONG 18 #endif /* HAVE_LONG_LONG */ #define T_PYSSIZET 19 /* Py_ssize_t */ /* Flags */ #define READONLY 1 #define RO READONLY /* Shorthand */ #define READ_RESTRICTED 2 #define PY_WRITE_RESTRICTED 4 #define RESTRICTED (READ_RESTRICTED | PY_WRITE_RESTRICTED) /* Obsolete API, for binary backwards compatibility */ PyAPI_FUNC(PyObject *) PyMember_Get(const char *, struct memberlist *, const char *); PyAPI_FUNC(int) PyMember_Set(char *, struct memberlist *, const char *, PyObject *); /* Current API, use this */ PyAPI_FUNC(PyObject *) PyMember_GetOne(const char *, struct PyMemberDef *); PyAPI_FUNC(int) PyMember_SetOne(char *, struct PyMemberDef *, PyObject *); #ifdef __cplusplus } #endif #endif /* !Py_STRUCTMEMBER_H */ PKZIu..python2.7/pyport.hnu[#ifndef Py_PYPORT_H #define Py_PYPORT_H #include "pyconfig.h" /* include for defines */ /* Some versions of HP-UX & Solaris need inttypes.h for int32_t, INT32_MAX, etc. */ #ifdef HAVE_INTTYPES_H #include #endif #ifdef HAVE_STDINT_H #include #endif /************************************************************************** Symbols and macros to supply platform-independent interfaces to basic C language & library operations whose spellings vary across platforms. Please try to make documentation here as clear as possible: by definition, the stuff here is trying to illuminate C's darkest corners. Config #defines referenced here: SIGNED_RIGHT_SHIFT_ZERO_FILLS Meaning: To be defined iff i>>j does not extend the sign bit when i is a signed integral type and i < 0. Used in: Py_ARITHMETIC_RIGHT_SHIFT Py_DEBUG Meaning: Extra checks compiled in for debug mode. Used in: Py_SAFE_DOWNCAST HAVE_UINTPTR_T Meaning: The C9X type uintptr_t is supported by the compiler Used in: Py_uintptr_t HAVE_LONG_LONG Meaning: The compiler supports the C type "long long" Used in: PY_LONG_LONG **************************************************************************/ /* For backward compatibility only. Obsolete, do not use. */ #ifdef HAVE_PROTOTYPES #define Py_PROTO(x) x #else #define Py_PROTO(x) () #endif #ifndef Py_FPROTO #define Py_FPROTO(x) Py_PROTO(x) #endif /* typedefs for some C9X-defined synonyms for integral types. * * The names in Python are exactly the same as the C9X names, except with a * Py_ prefix. Until C9X is universally implemented, this is the only way * to ensure that Python gets reliable names that don't conflict with names * in non-Python code that are playing their own tricks to define the C9X * names. * * NOTE: don't go nuts here! Python has no use for *most* of the C9X * integral synonyms. Only define the ones we actually need. */ #ifdef HAVE_LONG_LONG #ifndef PY_LONG_LONG #define PY_LONG_LONG long long #if defined(LLONG_MAX) /* If LLONG_MAX is defined in limits.h, use that. */ #define PY_LLONG_MIN LLONG_MIN #define PY_LLONG_MAX LLONG_MAX #define PY_ULLONG_MAX ULLONG_MAX #elif defined(__LONG_LONG_MAX__) /* Otherwise, if GCC has a builtin define, use that. */ #define PY_LLONG_MAX __LONG_LONG_MAX__ #define PY_LLONG_MIN (-PY_LLONG_MAX-1) #define PY_ULLONG_MAX (__LONG_LONG_MAX__*2ULL + 1ULL) #else /* Otherwise, rely on two's complement. */ #define PY_ULLONG_MAX (~0ULL) #define PY_LLONG_MAX ((long long)(PY_ULLONG_MAX>>1)) #define PY_LLONG_MIN (-PY_LLONG_MAX-1) #endif /* LLONG_MAX */ #endif #endif /* HAVE_LONG_LONG */ /* a build with 30-bit digits for Python long integers needs an exact-width * 32-bit unsigned integer type to store those digits. (We could just use * type 'unsigned long', but that would be wasteful on a system where longs * are 64-bits.) On Unix systems, the autoconf macro AC_TYPE_UINT32_T defines * uint32_t to be such a type unless stdint.h or inttypes.h defines uint32_t. * However, it doesn't set HAVE_UINT32_T, so we do that here. */ #ifdef uint32_t #define HAVE_UINT32_T 1 #endif #ifdef HAVE_UINT32_T #ifndef PY_UINT32_T #define PY_UINT32_T uint32_t #endif #endif /* Macros for a 64-bit unsigned integer type; used for type 'twodigits' in the * long integer implementation, when 30-bit digits are enabled. */ #ifdef uint64_t #define HAVE_UINT64_T 1 #endif #ifdef HAVE_UINT64_T #ifndef PY_UINT64_T #define PY_UINT64_T uint64_t #endif #endif /* Signed variants of the above */ #ifdef int32_t #define HAVE_INT32_T 1 #endif #ifdef HAVE_INT32_T #ifndef PY_INT32_T #define PY_INT32_T int32_t #endif #endif #ifdef int64_t #define HAVE_INT64_T 1 #endif #ifdef HAVE_INT64_T #ifndef PY_INT64_T #define PY_INT64_T int64_t #endif #endif /* If PYLONG_BITS_IN_DIGIT is not defined then we'll use 30-bit digits if all the necessary integer types are available, and we're on a 64-bit platform (as determined by SIZEOF_VOID_P); otherwise we use 15-bit digits. */ #ifndef PYLONG_BITS_IN_DIGIT #if (defined HAVE_UINT64_T && defined HAVE_INT64_T && \ defined HAVE_UINT32_T && defined HAVE_INT32_T && SIZEOF_VOID_P >= 8) #define PYLONG_BITS_IN_DIGIT 30 #else #define PYLONG_BITS_IN_DIGIT 15 #endif #endif /* uintptr_t is the C9X name for an unsigned integral type such that a * legitimate void* can be cast to uintptr_t and then back to void* again * without loss of information. Similarly for intptr_t, wrt a signed * integral type. */ #ifdef HAVE_UINTPTR_T typedef uintptr_t Py_uintptr_t; typedef intptr_t Py_intptr_t; #elif SIZEOF_VOID_P <= SIZEOF_INT typedef unsigned int Py_uintptr_t; typedef int Py_intptr_t; #elif SIZEOF_VOID_P <= SIZEOF_LONG typedef unsigned long Py_uintptr_t; typedef long Py_intptr_t; #elif defined(HAVE_LONG_LONG) && (SIZEOF_VOID_P <= SIZEOF_LONG_LONG) typedef unsigned PY_LONG_LONG Py_uintptr_t; typedef PY_LONG_LONG Py_intptr_t; #else # error "Python needs a typedef for Py_uintptr_t in pyport.h." #endif /* HAVE_UINTPTR_T */ /* Py_ssize_t is a signed integral type such that sizeof(Py_ssize_t) == * sizeof(size_t). C99 doesn't define such a thing directly (size_t is an * unsigned integral type). See PEP 353 for details. */ #ifdef HAVE_SSIZE_T typedef ssize_t Py_ssize_t; #elif SIZEOF_VOID_P == SIZEOF_SIZE_T typedef Py_intptr_t Py_ssize_t; #else # error "Python needs a typedef for Py_ssize_t in pyport.h." #endif /* Largest possible value of size_t. SIZE_MAX is part of C99, so it might be defined on some platforms. If it is not defined, (size_t)-1 is a portable definition for C89, due to the way signed->unsigned conversion is defined. */ #ifdef SIZE_MAX #define PY_SIZE_MAX SIZE_MAX #else #define PY_SIZE_MAX ((size_t)-1) #endif /* Largest positive value of type Py_ssize_t. */ #define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1)) /* Smallest negative value of type Py_ssize_t. */ #define PY_SSIZE_T_MIN (-PY_SSIZE_T_MAX-1) #if SIZEOF_PID_T > SIZEOF_LONG # error "Python doesn't support sizeof(pid_t) > sizeof(long)" #endif /* PY_FORMAT_SIZE_T is a platform-specific modifier for use in a printf * format to convert an argument with the width of a size_t or Py_ssize_t. * C99 introduced "z" for this purpose, but not all platforms support that; * e.g., MS compilers use "I" instead. * * These "high level" Python format functions interpret "z" correctly on * all platforms (Python interprets the format string itself, and does whatever * the platform C requires to convert a size_t/Py_ssize_t argument): * * PyString_FromFormat * PyErr_Format * PyString_FromFormatV * * Lower-level uses require that you interpolate the correct format modifier * yourself (e.g., calling printf, fprintf, sprintf, PyOS_snprintf); for * example, * * Py_ssize_t index; * fprintf(stderr, "index %" PY_FORMAT_SIZE_T "d sucks\n", index); * * That will expand to %ld, or %Id, or to something else correct for a * Py_ssize_t on the platform. */ #ifndef PY_FORMAT_SIZE_T # if SIZEOF_SIZE_T == SIZEOF_INT && !defined(__APPLE__) # define PY_FORMAT_SIZE_T "" # elif SIZEOF_SIZE_T == SIZEOF_LONG # define PY_FORMAT_SIZE_T "l" # elif defined(MS_WINDOWS) # define PY_FORMAT_SIZE_T "I" # else # error "This platform's pyconfig.h needs to define PY_FORMAT_SIZE_T" # endif #endif /* PY_FORMAT_LONG_LONG is analogous to PY_FORMAT_SIZE_T above, but for * the long long type instead of the size_t type. It's only available * when HAVE_LONG_LONG is defined. The "high level" Python format * functions listed above will interpret "lld" or "llu" correctly on * all platforms. */ #ifdef HAVE_LONG_LONG # ifndef PY_FORMAT_LONG_LONG # if defined(MS_WIN64) || defined(MS_WINDOWS) # define PY_FORMAT_LONG_LONG "I64" # else # error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" # endif # endif #endif /* Py_LOCAL can be used instead of static to get the fastest possible calling * convention for functions that are local to a given module. * * Py_LOCAL_INLINE does the same thing, and also explicitly requests inlining, * for platforms that support that. * * If PY_LOCAL_AGGRESSIVE is defined before python.h is included, more * "aggressive" inlining/optimization is enabled for the entire module. This * may lead to code bloat, and may slow things down for those reasons. It may * also lead to errors, if the code relies on pointer aliasing. Use with * care. * * NOTE: You can only use this for functions that are entirely local to a * module; functions that are exported via method tables, callbacks, etc, * should keep using static. */ #undef USE_INLINE /* XXX - set via configure? */ #if defined(_MSC_VER) #if defined(PY_LOCAL_AGGRESSIVE) /* enable more aggressive optimization for visual studio */ #pragma optimize("agtw", on) #endif /* ignore warnings if the compiler decides not to inline a function */ #pragma warning(disable: 4710) /* fastest possible local call under MSVC */ #define Py_LOCAL(type) static type __fastcall #define Py_LOCAL_INLINE(type) static __inline type __fastcall #elif defined(USE_INLINE) #define Py_LOCAL(type) static type #define Py_LOCAL_INLINE(type) static inline type #else #define Py_LOCAL(type) static type #define Py_LOCAL_INLINE(type) static type #endif /* Py_MEMCPY can be used instead of memcpy in cases where the copied blocks * are often very short. While most platforms have highly optimized code for * large transfers, the setup costs for memcpy are often quite high. MEMCPY * solves this by doing short copies "in line". */ #if defined(_MSC_VER) #define Py_MEMCPY(target, source, length) do { \ size_t i_, n_ = (length); \ char *t_ = (void*) (target); \ const char *s_ = (void*) (source); \ if (n_ >= 16) \ memcpy(t_, s_, n_); \ else \ for (i_ = 0; i_ < n_; i_++) \ t_[i_] = s_[i_]; \ } while (0) #else #define Py_MEMCPY memcpy #endif #include #ifdef HAVE_IEEEFP_H #include /* needed for 'finite' declaration on some platforms */ #endif #include /* Moved here from the math section, before extern "C" */ /******************************************** * WRAPPER FOR and/or * ********************************************/ #ifdef TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #ifdef HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ /****************************** * WRAPPER FOR * ******************************/ /* NB caller must include */ #ifdef HAVE_SYS_SELECT_H #include #endif /* !HAVE_SYS_SELECT_H */ /******************************* * stat() and fstat() fiddling * *******************************/ /* We expect that stat and fstat exist on most systems. * It's confirmed on Unix, Mac and Windows. * If you don't have them, add * #define DONT_HAVE_STAT * and/or * #define DONT_HAVE_FSTAT * to your pyconfig.h. Python code beyond this should check HAVE_STAT and * HAVE_FSTAT instead. * Also * #define HAVE_SYS_STAT_H * if exists on your platform, and * #define HAVE_STAT_H * if does. */ #ifndef DONT_HAVE_STAT #define HAVE_STAT #endif #ifndef DONT_HAVE_FSTAT #define HAVE_FSTAT #endif #ifdef RISCOS #include #include "unixstuff.h" #endif #ifdef HAVE_SYS_STAT_H #if defined(PYOS_OS2) && defined(PYCC_GCC) #include #endif #include #elif defined(HAVE_STAT_H) #include #endif #if defined(PYCC_VACPP) /* VisualAge C/C++ Failed to Define MountType Field in sys/stat.h */ #define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG) #endif #ifndef S_ISREG #define S_ISREG(x) (((x) & S_IFMT) == S_IFREG) #endif #ifndef S_ISDIR #define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR) #endif #ifdef __cplusplus /* Move this down here since some C++ #include's don't like to be included inside an extern "C" */ extern "C" { #endif /* Py_ARITHMETIC_RIGHT_SHIFT * C doesn't define whether a right-shift of a signed integer sign-extends * or zero-fills. Here a macro to force sign extension: * Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) * Return I >> J, forcing sign extension. Arithmetically, return the * floor of I/2**J. * Requirements: * I should have signed integer type. In the terminology of C99, this can * be either one of the five standard signed integer types (signed char, * short, int, long, long long) or an extended signed integer type. * J is an integer >= 0 and strictly less than the number of bits in the * type of I (because C doesn't define what happens for J outside that * range either). * TYPE used to specify the type of I, but is now ignored. It's been left * in for backwards compatibility with versions <= 2.6 or 3.0. * Caution: * I may be evaluated more than once. */ #ifdef SIGNED_RIGHT_SHIFT_ZERO_FILLS #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) \ ((I) < 0 ? -1-((-1-(I)) >> (J)) : (I) >> (J)) #else #define Py_ARITHMETIC_RIGHT_SHIFT(TYPE, I, J) ((I) >> (J)) #endif /* Py_FORCE_EXPANSION(X) * "Simply" returns its argument. However, macro expansions within the * argument are evaluated. This unfortunate trickery is needed to get * token-pasting to work as desired in some cases. */ #define Py_FORCE_EXPANSION(X) X /* Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) * Cast VALUE to type NARROW from type WIDE. In Py_DEBUG mode, this * assert-fails if any information is lost. * Caution: * VALUE may be evaluated more than once. */ #ifdef Py_DEBUG #define Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) \ (assert((WIDE)(NARROW)(VALUE) == (VALUE)), (NARROW)(VALUE)) #else #define Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) (NARROW)(VALUE) #endif /* Py_SET_ERRNO_ON_MATH_ERROR(x) * If a libm function did not set errno, but it looks like the result * overflowed or not-a-number, set errno to ERANGE or EDOM. Set errno * to 0 before calling a libm function, and invoke this macro after, * passing the function result. * Caution: * This isn't reliable. See Py_OVERFLOWED comments. * X is evaluated more than once. */ #if defined(__FreeBSD__) || defined(__OpenBSD__) || (defined(__hpux) && defined(__ia64)) #define _Py_SET_EDOM_FOR_NAN(X) if (isnan(X)) errno = EDOM; #else #define _Py_SET_EDOM_FOR_NAN(X) ; #endif #define Py_SET_ERRNO_ON_MATH_ERROR(X) \ do { \ if (errno == 0) { \ if ((X) == Py_HUGE_VAL || (X) == -Py_HUGE_VAL) \ errno = ERANGE; \ else _Py_SET_EDOM_FOR_NAN(X) \ } \ } while(0) /* Py_SET_ERANGE_IF_OVERFLOW(x) * An alias of Py_SET_ERRNO_ON_MATH_ERROR for backward-compatibility. */ #define Py_SET_ERANGE_IF_OVERFLOW(X) Py_SET_ERRNO_ON_MATH_ERROR(X) /* Py_ADJUST_ERANGE1(x) * Py_ADJUST_ERANGE2(x, y) * Set errno to 0 before calling a libm function, and invoke one of these * macros after, passing the function result(s) (Py_ADJUST_ERANGE2 is useful * for functions returning complex results). This makes two kinds of * adjustments to errno: (A) If it looks like the platform libm set * errno=ERANGE due to underflow, clear errno. (B) If it looks like the * platform libm overflowed but didn't set errno, force errno to ERANGE. In * effect, we're trying to force a useful implementation of C89 errno * behavior. * Caution: * This isn't reliable. See Py_OVERFLOWED comments. * X and Y may be evaluated more than once. */ #define Py_ADJUST_ERANGE1(X) \ do { \ if (errno == 0) { \ if ((X) == Py_HUGE_VAL || (X) == -Py_HUGE_VAL) \ errno = ERANGE; \ } \ else if (errno == ERANGE && (X) == 0.0) \ errno = 0; \ } while(0) #define Py_ADJUST_ERANGE2(X, Y) \ do { \ if ((X) == Py_HUGE_VAL || (X) == -Py_HUGE_VAL || \ (Y) == Py_HUGE_VAL || (Y) == -Py_HUGE_VAL) { \ if (errno == 0) \ errno = ERANGE; \ } \ else if (errno == ERANGE) \ errno = 0; \ } while(0) /* The functions _Py_dg_strtod and _Py_dg_dtoa in Python/dtoa.c (which are * required to support the short float repr introduced in Python 3.1) require * that the floating-point unit that's being used for arithmetic operations * on C doubles is set to use 53-bit precision. It also requires that the * FPU rounding mode is round-half-to-even, but that's less often an issue. * * If your FPU isn't already set to 53-bit precision/round-half-to-even, and * you want to make use of _Py_dg_strtod and _Py_dg_dtoa, then you should * * #define HAVE_PY_SET_53BIT_PRECISION 1 * * and also give appropriate definitions for the following three macros: * * _PY_SET_53BIT_PRECISION_START : store original FPU settings, and * set FPU to 53-bit precision/round-half-to-even * _PY_SET_53BIT_PRECISION_END : restore original FPU settings * _PY_SET_53BIT_PRECISION_HEADER : any variable declarations needed to * use the two macros above. * * The macros are designed to be used within a single C function: see * Python/pystrtod.c for an example of their use. */ /* get and set x87 control word for gcc/x86 */ #ifdef HAVE_GCC_ASM_FOR_X87 #define HAVE_PY_SET_53BIT_PRECISION 1 /* _Py_get/set_387controlword functions are defined in Python/pymath.c */ #define _Py_SET_53BIT_PRECISION_HEADER \ unsigned short old_387controlword, new_387controlword #define _Py_SET_53BIT_PRECISION_START \ do { \ old_387controlword = _Py_get_387controlword(); \ new_387controlword = (old_387controlword & ~0x0f00) | 0x0200; \ if (new_387controlword != old_387controlword) \ _Py_set_387controlword(new_387controlword); \ } while (0) #define _Py_SET_53BIT_PRECISION_END \ if (new_387controlword != old_387controlword) \ _Py_set_387controlword(old_387controlword) #endif /* get and set x87 control word for VisualStudio/x86 */ #if defined(_MSC_VER) && !defined(_WIN64) /* x87 not supported in 64-bit */ #define HAVE_PY_SET_53BIT_PRECISION 1 #define _Py_SET_53BIT_PRECISION_HEADER \ unsigned int old_387controlword, new_387controlword, out_387controlword /* We use the __control87_2 function to set only the x87 control word. The SSE control word is unaffected. */ #define _Py_SET_53BIT_PRECISION_START \ do { \ __control87_2(0, 0, &old_387controlword, NULL); \ new_387controlword = \ (old_387controlword & ~(_MCW_PC | _MCW_RC)) | (_PC_53 | _RC_NEAR); \ if (new_387controlword != old_387controlword) \ __control87_2(new_387controlword, _MCW_PC | _MCW_RC, \ &out_387controlword, NULL); \ } while (0) #define _Py_SET_53BIT_PRECISION_END \ do { \ if (new_387controlword != old_387controlword) \ __control87_2(old_387controlword, _MCW_PC | _MCW_RC, \ &out_387controlword, NULL); \ } while (0) #endif /* default definitions are empty */ #ifndef HAVE_PY_SET_53BIT_PRECISION #define _Py_SET_53BIT_PRECISION_HEADER #define _Py_SET_53BIT_PRECISION_START #define _Py_SET_53BIT_PRECISION_END #endif /* If we can't guarantee 53-bit precision, don't use the code in Python/dtoa.c, but fall back to standard code. This means that repr of a float will be long (17 sig digits). Realistically, there are two things that could go wrong: (1) doubles aren't IEEE 754 doubles, or (2) we're on x86 with the rounding precision set to 64-bits (extended precision), and we don't know how to change the rounding precision. */ #if !defined(DOUBLE_IS_LITTLE_ENDIAN_IEEE754) && \ !defined(DOUBLE_IS_BIG_ENDIAN_IEEE754) && \ !defined(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754) #define PY_NO_SHORT_FLOAT_REPR #endif /* double rounding is symptomatic of use of extended precision on x86. If we're seeing double rounding, and we don't have any mechanism available for changing the FPU rounding precision, then don't use Python/dtoa.c. */ #if defined(X87_DOUBLE_ROUNDING) && !defined(HAVE_PY_SET_53BIT_PRECISION) #define PY_NO_SHORT_FLOAT_REPR #endif /* Py_DEPRECATED(version) * Declare a variable, type, or function deprecated. * Usage: * extern int old_var Py_DEPRECATED(2.3); * typedef int T1 Py_DEPRECATED(2.4); * extern int x() Py_DEPRECATED(2.5); */ #if defined(__GNUC__) && ((__GNUC__ >= 4) || \ (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__)) #else #define Py_DEPRECATED(VERSION_UNUSED) #endif /************************************************************************** Prototypes that are missing from the standard include files on some systems (and possibly only some versions of such systems.) Please be conservative with adding new ones, document them and enclose them in platform-specific #ifdefs. **************************************************************************/ #ifdef SOLARIS /* Unchecked */ extern int gethostname(char *, int); #endif #ifdef __BEOS__ /* Unchecked */ /* It's in the libs, but not the headers... - [cjh] */ int shutdown( int, int ); #endif #ifdef HAVE__GETPTY #include /* we need to import mode_t */ extern char * _getpty(int *, int, mode_t, int); #endif /* On QNX 6, struct termio must be declared by including sys/termio.h if TCGETA, TCSETA, TCSETAW, or TCSETAF are used. sys/termio.h must be included before termios.h or it will generate an error. */ #if defined(HAVE_SYS_TERMIO_H) && !defined(__hpux) #include #endif #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) #if !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) && !defined(HAVE_UTIL_H) /* BSDI does not supply a prototype for the 'openpty' and 'forkpty' functions, even though they are included in libutil. */ #include extern int openpty(int *, int *, char *, struct termios *, struct winsize *); extern pid_t forkpty(int *, char *, struct termios *, struct winsize *); #endif /* !defined(HAVE_PTY_H) && !defined(HAVE_LIBUTIL_H) */ #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */ /* These are pulled from various places. It isn't obvious on what platforms they are necessary, nor what the exact prototype should look like (which is likely to vary between platforms!) If you find you need one of these declarations, please move them to a platform-specific block and include proper prototypes. */ #if 0 /* From Modules/resource.c */ extern int getrusage(); extern int getpagesize(); /* From Python/sysmodule.c and Modules/posixmodule.c */ extern int fclose(FILE *); /* From Modules/posixmodule.c */ extern int fdatasync(int); #endif /* 0 */ /* On 4.4BSD-descendants, ctype functions serves the whole range of * wchar_t character set rather than single byte code points only. * This characteristic can break some operations of string object * including str.upper() and str.split() on UTF-8 locales. This * workaround was provided by Tim Robbins of FreeBSD project. */ #ifdef __FreeBSD__ #include #if (__FreeBSD_version >= 500040 && __FreeBSD_version < 602113) || \ (__FreeBSD_version >= 700000 && __FreeBSD_version < 700054) || \ (__FreeBSD_version >= 800000 && __FreeBSD_version < 800001) # define _PY_PORT_CTYPE_UTF8_ISSUE #endif #endif #if defined(__APPLE__) # define _PY_PORT_CTYPE_UTF8_ISSUE #endif #ifdef _PY_PORT_CTYPE_UTF8_ISSUE #ifndef __cplusplus /* The workaround below is unsafe in C++ because * the defines these symbols as real functions, * with a slightly different signature. * See issue #10910 */ #include #include #undef isalnum #define isalnum(c) iswalnum(btowc(c)) #undef isalpha #define isalpha(c) iswalpha(btowc(c)) #undef islower #define islower(c) iswlower(btowc(c)) #undef isspace #define isspace(c) iswspace(btowc(c)) #undef isupper #define isupper(c) iswupper(btowc(c)) #undef tolower #define tolower(c) towlower(btowc(c)) #undef toupper #define toupper(c) towupper(btowc(c)) #endif #endif /* Declarations for symbol visibility. PyAPI_FUNC(type): Declares a public Python API function and return type PyAPI_DATA(type): Declares public Python data and its type PyMODINIT_FUNC: A Python module init function. If these functions are inside the Python core, they are private to the core. If in an extension module, it may be declared with external linkage depending on the platform. As a number of platforms support/require "__declspec(dllimport/dllexport)", we support a HAVE_DECLSPEC_DLL macro to save duplication. */ /* All windows ports, except cygwin, are handled in PC/pyconfig.h. BeOS and cygwin are the only other autoconf platform requiring special linkage handling and both of these use __declspec(). */ #if defined(__CYGWIN__) || defined(__BEOS__) # define HAVE_DECLSPEC_DLL #endif /* only get special linkage if built as shared or platform is Cygwin */ #if defined(Py_ENABLE_SHARED) || defined(__CYGWIN__) # if defined(HAVE_DECLSPEC_DLL) # ifdef Py_BUILD_CORE # define PyAPI_FUNC(RTYPE) __declspec(dllexport) RTYPE # define PyAPI_DATA(RTYPE) extern __declspec(dllexport) RTYPE /* module init functions inside the core need no external linkage */ /* except for Cygwin to handle embedding (FIXME: BeOS too?) */ # if defined(__CYGWIN__) # define PyMODINIT_FUNC __declspec(dllexport) void # else /* __CYGWIN__ */ # define PyMODINIT_FUNC void # endif /* __CYGWIN__ */ # else /* Py_BUILD_CORE */ /* Building an extension module, or an embedded situation */ /* public Python functions and data are imported */ /* Under Cygwin, auto-import functions to prevent compilation */ /* failures similar to those described at the bottom of 4.1: */ /* http://docs.python.org/extending/windows.html#a-cookbook-approach */ # if !defined(__CYGWIN__) # define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE # endif /* !__CYGWIN__ */ # define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE /* module init functions outside the core must be exported */ # if defined(__cplusplus) # define PyMODINIT_FUNC extern "C" __declspec(dllexport) void # else /* __cplusplus */ # define PyMODINIT_FUNC __declspec(dllexport) void # endif /* __cplusplus */ # endif /* Py_BUILD_CORE */ # endif /* HAVE_DECLSPEC */ #endif /* Py_ENABLE_SHARED */ /* If no external linkage macros defined by now, create defaults */ #ifndef PyAPI_FUNC # define PyAPI_FUNC(RTYPE) RTYPE #endif #ifndef PyAPI_DATA # define PyAPI_DATA(RTYPE) extern RTYPE #endif #ifndef PyMODINIT_FUNC # if defined(__cplusplus) # define PyMODINIT_FUNC extern "C" void # else /* __cplusplus */ # define PyMODINIT_FUNC void # endif /* __cplusplus */ #endif /* Deprecated DL_IMPORT and DL_EXPORT macros */ #if defined(Py_ENABLE_SHARED) && defined (HAVE_DECLSPEC_DLL) # if defined(Py_BUILD_CORE) # define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE # define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE # else # define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE # define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE # endif #endif #ifndef DL_EXPORT # define DL_EXPORT(RTYPE) RTYPE #endif #ifndef DL_IMPORT # define DL_IMPORT(RTYPE) RTYPE #endif /* End of deprecated DL_* macros */ /* If the fd manipulation macros aren't defined, here is a set that should do the job */ #if 0 /* disabled and probably obsolete */ #ifndef FD_SETSIZE #define FD_SETSIZE 256 #endif #ifndef FD_SET typedef long fd_mask; #define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif /* howmany */ typedef struct fd_set { fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; } fd_set; #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) #define FD_ZERO(p) memset((char *)(p), '\0', sizeof(*(p))) #endif /* FD_SET */ #endif /* fd manipulation macros */ /* limits.h constants that may be missing */ #ifndef INT_MAX #define INT_MAX 2147483647 #endif #ifndef LONG_MAX #if SIZEOF_LONG == 4 #define LONG_MAX 0X7FFFFFFFL #elif SIZEOF_LONG == 8 #define LONG_MAX 0X7FFFFFFFFFFFFFFFL #else #error "could not set LONG_MAX in pyport.h" #endif #endif #ifndef LONG_MIN #define LONG_MIN (-LONG_MAX-1) #endif #ifndef LONG_BIT #define LONG_BIT (8 * SIZEOF_LONG) #endif #if LONG_BIT != 8 * SIZEOF_LONG /* 04-Oct-2000 LONG_BIT is apparently (mis)defined as 64 on some recent * 32-bit platforms using gcc. We try to catch that here at compile-time * rather than waiting for integer multiplication to trigger bogus * overflows. */ #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." #endif #ifdef __cplusplus } #endif /* * Hide GCC attributes from compilers that don't support them. */ #if (!defined(__GNUC__) || __GNUC__ < 2 || \ (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ) && \ !defined(RISCOS) #define Py_GCC_ATTRIBUTE(x) #else #define Py_GCC_ATTRIBUTE(x) __attribute__(x) #endif /* * Add PyArg_ParseTuple format where available. */ #ifdef HAVE_ATTRIBUTE_FORMAT_PARSETUPLE #define Py_FORMAT_PARSETUPLE(func,p1,p2) __attribute__((format(func,p1,p2))) #else #define Py_FORMAT_PARSETUPLE(func,p1,p2) #endif /* * Specify alignment on compilers that support it. */ #if defined(__GNUC__) && __GNUC__ >= 3 #define Py_ALIGNED(x) __attribute__((aligned(x))) #else #define Py_ALIGNED(x) #endif /* Eliminate end-of-loop code not reached warnings from SunPro C * when using do{...}while(0) macros */ #ifdef __SUNPRO_C #pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED) #endif /* * Older Microsoft compilers don't support the C99 long long literal suffixes, * so these will be defined in PC/pyconfig.h for those compilers. */ #ifndef Py_LL #define Py_LL(x) x##LL #endif #ifndef Py_ULL #define Py_ULL(x) Py_LL(x##U) #endif #endif /* Py_PYPORT_H */ PKZ))python2.7/compile.hnu[ #ifndef Py_COMPILE_H #define Py_COMPILE_H #include "code.h" #ifdef __cplusplus extern "C" { #endif /* Public interface */ struct _node; /* Declare the existence of this type */ PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *); /* Future feature support */ typedef struct { int ff_features; /* flags set by future statements */ int ff_lineno; /* line number of last future statement */ } PyFutureFeatures; #define FUTURE_NESTED_SCOPES "nested_scopes" #define FUTURE_GENERATORS "generators" #define FUTURE_DIVISION "division" #define FUTURE_ABSOLUTE_IMPORT "absolute_import" #define FUTURE_WITH_STATEMENT "with_statement" #define FUTURE_PRINT_FUNCTION "print_function" #define FUTURE_UNICODE_LITERALS "unicode_literals" struct _mod; /* Declare the existence of this type */ PyAPI_FUNC(PyCodeObject *) PyAST_Compile(struct _mod *, const char *, PyCompilerFlags *, PyArena *); PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *); #ifdef __cplusplus } #endif #endif /* !Py_COMPILE_H */ PKZC288python2.7/objimpl.hnu[/* The PyObject_ memory family: high-level object memory interfaces. See pymem.h for the low-level PyMem_ family. */ #ifndef Py_OBJIMPL_H #define Py_OBJIMPL_H #include "pymem.h" #ifdef __cplusplus extern "C" { #endif /* BEWARE: Each interface exports both functions and macros. Extension modules should use the functions, to ensure binary compatibility across Python versions. Because the Python implementation is free to change internal details, and the macros may (or may not) expose details for speed, if you do use the macros you must recompile your extensions with each Python release. Never mix calls to PyObject_ memory functions with calls to the platform malloc/realloc/ calloc/free, or with calls to PyMem_. */ /* Functions and macros for modules that implement new object types. - PyObject_New(type, typeobj) allocates memory for a new object of the given type, and initializes part of it. 'type' must be the C structure type used to represent the object, and 'typeobj' the address of the corresponding type object. Reference count and type pointer are filled in; the rest of the bytes of the object are *undefined*! The resulting expression type is 'type *'. The size of the object is determined by the tp_basicsize field of the type object. - PyObject_NewVar(type, typeobj, n) is similar but allocates a variable-size object with room for n items. In addition to the refcount and type pointer fields, this also fills in the ob_size field. - PyObject_Del(op) releases the memory allocated for an object. It does not run a destructor -- it only frees the memory. PyObject_Free is identical. - PyObject_Init(op, typeobj) and PyObject_InitVar(op, typeobj, n) don't allocate memory. Instead of a 'type' parameter, they take a pointer to a new object (allocated by an arbitrary allocator), and initialize its object header fields. Note that objects created with PyObject_{New, NewVar} are allocated using the specialized Python allocator (implemented in obmalloc.c), if WITH_PYMALLOC is enabled. In addition, a special debugging allocator is used if PYMALLOC_DEBUG is also #defined. In case a specific form of memory management is needed (for example, if you must use the platform malloc heap(s), or shared memory, or C++ local storage or operator new), you must first allocate the object with your custom allocator, then pass its pointer to PyObject_{Init, InitVar} for filling in its Python- specific fields: reference count, type pointer, possibly others. You should be aware that Python has no control over these objects because they don't cooperate with the Python memory manager. Such objects may not be eligible for automatic garbage collection and you have to make sure that they are released accordingly whenever their destructor gets called (cf. the specific form of memory management you're using). Unless you have specific memory management requirements, use PyObject_{New, NewVar, Del}. */ /* * Raw object memory interface * =========================== */ /* Functions to call the same malloc/realloc/free as used by Python's object allocator. If WITH_PYMALLOC is enabled, these may differ from the platform malloc/realloc/free. The Python object allocator is designed for fast, cache-conscious allocation of many "small" objects, and with low hidden memory overhead. PyObject_Malloc(0) returns a unique non-NULL pointer if possible. PyObject_Realloc(NULL, n) acts like PyObject_Malloc(n). PyObject_Realloc(p != NULL, 0) does not return NULL, or free the memory at p. Returned pointers must be checked for NULL explicitly; no action is performed on failure other than to return NULL (no warning it printed, no exception is set, etc). For allocating objects, use PyObject_{New, NewVar} instead whenever possible. The PyObject_{Malloc, Realloc, Free} family is exposed so that you can exploit Python's small-block allocator for non-object uses. If you must use these routines to allocate object memory, make sure the object gets initialized via PyObject_{Init, InitVar} after obtaining the raw memory. */ PyAPI_FUNC(void *) PyObject_Malloc(size_t); PyAPI_FUNC(void *) PyObject_Realloc(void *, size_t); PyAPI_FUNC(void) PyObject_Free(void *); /* Macros */ #ifdef WITH_PYMALLOC PyAPI_FUNC(void) _PyObject_DebugMallocStats(FILE *out); #ifdef PYMALLOC_DEBUG /* WITH_PYMALLOC && PYMALLOC_DEBUG */ PyAPI_FUNC(void *) _PyObject_DebugMalloc(size_t nbytes); PyAPI_FUNC(void *) _PyObject_DebugRealloc(void *p, size_t nbytes); PyAPI_FUNC(void) _PyObject_DebugFree(void *p); PyAPI_FUNC(void) _PyObject_DebugDumpAddress(const void *p); PyAPI_FUNC(void) _PyObject_DebugCheckAddress(const void *p); PyAPI_FUNC(void *) _PyObject_DebugMallocApi(char api, size_t nbytes); PyAPI_FUNC(void *) _PyObject_DebugReallocApi(char api, void *p, size_t nbytes); PyAPI_FUNC(void) _PyObject_DebugFreeApi(char api, void *p); PyAPI_FUNC(void) _PyObject_DebugCheckAddressApi(char api, const void *p); PyAPI_FUNC(void *) _PyMem_DebugMalloc(size_t nbytes); PyAPI_FUNC(void *) _PyMem_DebugRealloc(void *p, size_t nbytes); PyAPI_FUNC(void) _PyMem_DebugFree(void *p); #define PyObject_MALLOC _PyObject_DebugMalloc #define PyObject_Malloc _PyObject_DebugMalloc #define PyObject_REALLOC _PyObject_DebugRealloc #define PyObject_Realloc _PyObject_DebugRealloc #define PyObject_FREE _PyObject_DebugFree #define PyObject_Free _PyObject_DebugFree #else /* WITH_PYMALLOC && ! PYMALLOC_DEBUG */ #define PyObject_MALLOC PyObject_Malloc #define PyObject_REALLOC PyObject_Realloc #define PyObject_FREE PyObject_Free #endif #else /* ! WITH_PYMALLOC */ #define PyObject_MALLOC PyMem_MALLOC #define PyObject_REALLOC PyMem_REALLOC #define PyObject_FREE PyMem_FREE #endif /* WITH_PYMALLOC */ #define PyObject_Del PyObject_Free #define PyObject_DEL PyObject_FREE /* for source compatibility with 2.2 */ #define _PyObject_Del PyObject_Free /* * Generic object allocator interface * ================================== */ /* Functions */ PyAPI_FUNC(PyObject *) PyObject_Init(PyObject *, PyTypeObject *); PyAPI_FUNC(PyVarObject *) PyObject_InitVar(PyVarObject *, PyTypeObject *, Py_ssize_t); PyAPI_FUNC(PyObject *) _PyObject_New(PyTypeObject *); PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t); #define PyObject_New(type, typeobj) \ ( (type *) _PyObject_New(typeobj) ) #define PyObject_NewVar(type, typeobj, n) \ ( (type *) _PyObject_NewVar((typeobj), (n)) ) /* Macros trading binary compatibility for speed. See also pymem.h. Note that these macros expect non-NULL object pointers.*/ #define PyObject_INIT(op, typeobj) \ ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) #define PyObject_INIT_VAR(op, typeobj, size) \ ( Py_SIZE(op) = (size), PyObject_INIT((op), (typeobj)) ) #define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize ) /* _PyObject_VAR_SIZE returns the number of bytes (as size_t) allocated for a vrbl-size object with nitems items, exclusive of gc overhead (if any). The value is rounded up to the closest multiple of sizeof(void *), in order to ensure that pointer fields at the end of the object are correctly aligned for the platform (this is of special importance for subclasses of, e.g., str or long, so that pointers can be stored after the embedded data). Note that there's no memory wastage in doing this, as malloc has to return (at worst) pointer-aligned memory anyway. */ #if ((SIZEOF_VOID_P - 1) & SIZEOF_VOID_P) != 0 # error "_PyObject_VAR_SIZE requires SIZEOF_VOID_P be a power of 2" #endif #define _PyObject_VAR_SIZE(typeobj, nitems) \ (size_t) \ ( ( (typeobj)->tp_basicsize + \ (nitems)*(typeobj)->tp_itemsize + \ (SIZEOF_VOID_P - 1) \ ) & ~(SIZEOF_VOID_P - 1) \ ) #define PyObject_NEW(type, typeobj) \ ( (type *) PyObject_Init( \ (PyObject *) PyObject_MALLOC( _PyObject_SIZE(typeobj) ), (typeobj)) ) #define PyObject_NEW_VAR(type, typeobj, n) \ ( (type *) PyObject_InitVar( \ (PyVarObject *) PyObject_MALLOC(_PyObject_VAR_SIZE((typeobj),(n)) ),\ (typeobj), (n)) ) /* This example code implements an object constructor with a custom allocator, where PyObject_New is inlined, and shows the important distinction between two steps (at least): 1) the actual allocation of the object storage; 2) the initialization of the Python specific fields in this storage with PyObject_{Init, InitVar}. PyObject * YourObject_New(...) { PyObject *op; op = (PyObject *) Your_Allocator(_PyObject_SIZE(YourTypeStruct)); if (op == NULL) return PyErr_NoMemory(); PyObject_Init(op, &YourTypeStruct); op->ob_field = value; ... return op; } Note that in C++, the use of the new operator usually implies that the 1st step is performed automatically for you, so in a C++ class constructor you would start directly with PyObject_Init/InitVar */ /* * Garbage Collection Support * ========================== */ /* C equivalent of gc.collect(). */ PyAPI_FUNC(Py_ssize_t) PyGC_Collect(void); /* Test if a type has a GC head */ #define PyType_IS_GC(t) PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC) /* Test if an object has a GC head */ #define PyObject_IS_GC(o) (PyType_IS_GC(Py_TYPE(o)) && \ (Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o))) PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); #define PyObject_GC_Resize(type, op, n) \ ( (type *) _PyObject_GC_Resize((PyVarObject *)(op), (n)) ) /* for source compatibility with 2.2 */ #define _PyObject_GC_Del PyObject_GC_Del /* * Former over-aligned definition of PyGC_Head, used to compute the size of the * padding for the new version below. */ union _gc_head; union _gc_head_old { struct { union _gc_head_old *gc_next; union _gc_head_old *gc_prev; Py_ssize_t gc_refs; } gc; long double dummy; }; /* GC information is stored BEFORE the object structure. */ typedef union _gc_head { struct { union _gc_head *gc_next; union _gc_head *gc_prev; Py_ssize_t gc_refs; } gc; double dummy; /* Force at least 8-byte alignment. */ char dummy_padding[sizeof(union _gc_head_old)]; } PyGC_Head; extern PyGC_Head *_PyGC_generation0; #define _Py_AS_GC(o) ((PyGC_Head *)(o)-1) #define _PyGC_REFS_UNTRACKED (-2) #define _PyGC_REFS_REACHABLE (-3) #define _PyGC_REFS_TENTATIVELY_UNREACHABLE (-4) /* Tell the GC to track this object. NB: While the object is tracked the * collector it must be safe to call the ob_traverse method. */ #define _PyObject_GC_TRACK(o) do { \ PyGC_Head *g = _Py_AS_GC(o); \ if (g->gc.gc_refs != _PyGC_REFS_UNTRACKED) \ Py_FatalError("GC object already tracked"); \ g->gc.gc_refs = _PyGC_REFS_REACHABLE; \ g->gc.gc_next = _PyGC_generation0; \ g->gc.gc_prev = _PyGC_generation0->gc.gc_prev; \ g->gc.gc_prev->gc.gc_next = g; \ _PyGC_generation0->gc.gc_prev = g; \ } while (0); /* Tell the GC to stop tracking this object. * gc_next doesn't need to be set to NULL, but doing so is a good * way to provoke memory errors if calling code is confused. */ #define _PyObject_GC_UNTRACK(o) do { \ PyGC_Head *g = _Py_AS_GC(o); \ assert(g->gc.gc_refs != _PyGC_REFS_UNTRACKED); \ g->gc.gc_refs = _PyGC_REFS_UNTRACKED; \ g->gc.gc_prev->gc.gc_next = g->gc.gc_next; \ g->gc.gc_next->gc.gc_prev = g->gc.gc_prev; \ g->gc.gc_next = NULL; \ } while (0); /* True if the object is currently tracked by the GC. */ #define _PyObject_GC_IS_TRACKED(o) \ ((_Py_AS_GC(o))->gc.gc_refs != _PyGC_REFS_UNTRACKED) /* True if the object may be tracked by the GC in the future, or already is. This can be useful to implement some optimizations. */ #define _PyObject_GC_MAY_BE_TRACKED(obj) \ (PyObject_IS_GC(obj) && \ (!PyTuple_CheckExact(obj) || _PyObject_GC_IS_TRACKED(obj))) PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t); PyAPI_FUNC(PyObject *) _PyObject_GC_New(PyTypeObject *); PyAPI_FUNC(PyVarObject *) _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t); PyAPI_FUNC(void) PyObject_GC_Track(void *); PyAPI_FUNC(void) PyObject_GC_UnTrack(void *); PyAPI_FUNC(void) PyObject_GC_Del(void *); #define PyObject_GC_New(type, typeobj) \ ( (type *) _PyObject_GC_New(typeobj) ) #define PyObject_GC_NewVar(type, typeobj, n) \ ( (type *) _PyObject_GC_NewVar((typeobj), (n)) ) /* Utility macro to help write tp_traverse functions. * To use this macro, the tp_traverse function must name its arguments * "visit" and "arg". This is intended to keep tp_traverse functions * looking as much alike as possible. */ #define Py_VISIT(op) \ do { \ if (op) { \ int vret = visit((PyObject *)(op), arg); \ if (vret) \ return vret; \ } \ } while (0) /* This is here for the sake of backwards compatibility. Extensions that * use the old GC API will still compile but the objects will not be * tracked by the GC. */ #define PyGC_HEAD_SIZE 0 #define PyObject_GC_Init(op) #define PyObject_GC_Fini(op) #define PyObject_AS_GC(op) (op) #define PyObject_FROM_GC(op) (op) /* Test if a type supports weak references */ #define PyType_SUPPORTS_WEAKREFS(t) \ (PyType_HasFeature((t), Py_TPFLAGS_HAVE_WEAKREFS) \ && ((t)->tp_weaklistoffset > 0)) #define PyObject_GET_WEAKREFS_LISTPTR(o) \ ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset)) #ifdef __cplusplus } #endif #endif /* !Py_OBJIMPL_H */ PKZRKKpython2.7/asdl.hnu[#ifndef Py_ASDL_H #define Py_ASDL_H typedef PyObject * identifier; typedef PyObject * string; typedef PyObject * object; #ifndef __cplusplus typedef enum {false, true} bool; #endif /* It would be nice if the code generated by asdl_c.py was completely independent of Python, but it is a goal the requires too much work at this stage. So, for example, I'll represent identifiers as interned Python strings. */ /* XXX A sequence should be typed so that its use can be typechecked. */ typedef struct { int size; void *elements[1]; } asdl_seq; typedef struct { int size; int elements[1]; } asdl_int_seq; asdl_seq *asdl_seq_new(int size, PyArena *arena); asdl_int_seq *asdl_int_seq_new(int size, PyArena *arena); #define asdl_seq_GET(S, I) (S)->elements[(I)] #define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size) #ifdef Py_DEBUG #define asdl_seq_SET(S, I, V) { \ int _asdl_i = (I); \ assert((S) && _asdl_i < (S)->size); \ (S)->elements[_asdl_i] = (V); \ } #else #define asdl_seq_SET(S, I, V) (S)->elements[I] = (V) #endif #endif /* !Py_ASDL_H */ PKZv'-python2.7/cStringIO.hnu[#ifndef Py_CSTRINGIO_H #define Py_CSTRINGIO_H #ifdef __cplusplus extern "C" { #endif /* This header provides access to cStringIO objects from C. Functions are provided for calling cStringIO objects and macros are provided for testing whether you have cStringIO objects. Before calling any of the functions or macros, you must initialize the routines with: PycString_IMPORT This would typically be done in your init function. */ #define PycStringIO_CAPSULE_NAME "cStringIO.cStringIO_CAPI" #define PycString_IMPORT \ PycStringIO = ((struct PycStringIO_CAPI*)PyCapsule_Import(\ PycStringIO_CAPSULE_NAME, 0)) /* Basic functions to manipulate cStringIO objects from C */ static struct PycStringIO_CAPI { /* Read a string from an input object. If the last argument is -1, the remainder will be read. */ int(*cread)(PyObject *, char **, Py_ssize_t); /* Read a line from an input object. Returns the length of the read line as an int and a pointer inside the object buffer as char** (so the caller doesn't have to provide its own buffer as destination). */ int(*creadline)(PyObject *, char **); /* Write a string to an output object*/ int(*cwrite)(PyObject *, const char *, Py_ssize_t); /* Get the output object as a Python string (returns new reference). */ PyObject *(*cgetvalue)(PyObject *); /* Create a new output object */ PyObject *(*NewOutput)(int); /* Create an input object from a Python string (copies the Python string reference). */ PyObject *(*NewInput)(PyObject *); /* The Python types for cStringIO input and output objects. Note that you can do input on an output object. */ PyTypeObject *InputType, *OutputType; } *PycStringIO; /* These can be used to test if you have one */ #define PycStringIO_InputCheck(O) \ (Py_TYPE(O)==PycStringIO->InputType) #define PycStringIO_OutputCheck(O) \ (Py_TYPE(O)==PycStringIO->OutputType) #ifdef __cplusplus } #endif #endif /* !Py_CSTRINGIO_H */ PKZ8у  python2.7/memoryobject.hnu[/* Memory view object. In Python this is available as "memoryview". */ #ifndef Py_MEMORYOBJECT_H #define Py_MEMORYOBJECT_H #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(PyTypeObject) PyMemoryView_Type; #define PyMemoryView_Check(op) (Py_TYPE(op) == &PyMemoryView_Type) /* Get a pointer to the underlying Py_buffer of a memoryview object. */ #define PyMemoryView_GET_BUFFER(op) (&((PyMemoryViewObject *)(op))->view) /* Get a pointer to the PyObject from which originates a memoryview object. */ #define PyMemoryView_GET_BASE(op) (((PyMemoryViewObject *)(op))->view.obj) PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base, int buffertype, char fort); /* Return a contiguous chunk of memory representing the buffer from an object in a memory view object. If a copy is made then the base object for the memory view will be a *new* bytes object. Otherwise, the base-object will be the object itself and no data-copying will be done. The buffertype argument can be PyBUF_READ, PyBUF_WRITE, PyBUF_SHADOW to determine whether the returned buffer should be READONLY, WRITABLE, or set to update the original buffer if a copy must be made. If buffertype is PyBUF_WRITE and the buffer is not contiguous an error will be raised. In this circumstance, the user can use PyBUF_SHADOW to ensure that a writable temporary contiguous buffer is returned. The contents of this contiguous buffer will be copied back into the original object after the memoryview object is deleted as long as the original object is writable and allows setting an exclusive write lock. If this is not allowed by the original object, then a BufferError is raised. If the object is multi-dimensional and if fortran is 'F', the first dimension of the underlying array will vary the fastest in the buffer. If fortran is 'C', then the last dimension will vary the fastest (C-style contiguous). If fortran is 'A', then it does not matter and you will get whatever the object decides is more efficient. A new reference is returned that must be DECREF'd when finished. */ PyAPI_FUNC(PyObject *) PyMemoryView_FromObject(PyObject *base); PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(Py_buffer *info); /* create new if bufptr is NULL will be a new bytesobject in base */ /* The struct is declared here so that macros can work, but it shouldn't be considered public. Don't access those fields directly, use the macros and functions instead! */ typedef struct { PyObject_HEAD PyObject *base; Py_buffer view; } PyMemoryViewObject; #ifdef __cplusplus } #endif #endif /* !Py_MEMORYOBJECT_H */ PKZGg}}python2.7/graminit.hnu[/* Generated by Parser/pgen */ #define single_input 256 #define file_input 257 #define eval_input 258 #define decorator 259 #define decorators 260 #define decorated 261 #define funcdef 262 #define parameters 263 #define varargslist 264 #define fpdef 265 #define fplist 266 #define stmt 267 #define simple_stmt 268 #define small_stmt 269 #define expr_stmt 270 #define augassign 271 #define print_stmt 272 #define del_stmt 273 #define pass_stmt 274 #define flow_stmt 275 #define break_stmt 276 #define continue_stmt 277 #define return_stmt 278 #define yield_stmt 279 #define raise_stmt 280 #define import_stmt 281 #define import_name 282 #define import_from 283 #define import_as_name 284 #define dotted_as_name 285 #define import_as_names 286 #define dotted_as_names 287 #define dotted_name 288 #define global_stmt 289 #define exec_stmt 290 #define assert_stmt 291 #define compound_stmt 292 #define if_stmt 293 #define while_stmt 294 #define for_stmt 295 #define try_stmt 296 #define with_stmt 297 #define with_item 298 #define except_clause 299 #define suite 300 #define testlist_safe 301 #define old_test 302 #define old_lambdef 303 #define test 304 #define or_test 305 #define and_test 306 #define not_test 307 #define comparison 308 #define comp_op 309 #define expr 310 #define xor_expr 311 #define and_expr 312 #define shift_expr 313 #define arith_expr 314 #define term 315 #define factor 316 #define power 317 #define atom 318 #define listmaker 319 #define testlist_comp 320 #define lambdef 321 #define trailer 322 #define subscriptlist 323 #define subscript 324 #define sliceop 325 #define exprlist 326 #define testlist 327 #define dictorsetmaker 328 #define classdef 329 #define arglist 330 #define argument 331 #define list_iter 332 #define list_for 333 #define list_if 334 #define comp_iter 335 #define comp_for 336 #define comp_if 337 #define testlist1 338 #define encoding_decl 339 #define yield_expr 340 PKZ0+python2.7/grammar.hnu[ /* Grammar interface */ #ifndef Py_GRAMMAR_H #define Py_GRAMMAR_H #ifdef __cplusplus extern "C" { #endif #include "bitset.h" /* Sigh... */ /* A label of an arc */ typedef struct { int lb_type; char *lb_str; } label; #define EMPTY 0 /* Label number 0 is by definition the empty label */ /* A list of labels */ typedef struct { int ll_nlabels; label *ll_label; } labellist; /* An arc from one state to another */ typedef struct { short a_lbl; /* Label of this arc */ short a_arrow; /* State where this arc goes to */ } arc; /* A state in a DFA */ typedef struct { int s_narcs; arc *s_arc; /* Array of arcs */ /* Optional accelerators */ int s_lower; /* Lowest label index */ int s_upper; /* Highest label index */ int *s_accel; /* Accelerator */ int s_accept; /* Nonzero for accepting state */ } state; /* A DFA */ typedef struct { int d_type; /* Non-terminal this represents */ char *d_name; /* For printing */ int d_initial; /* Initial state */ int d_nstates; state *d_state; /* Array of states */ bitset d_first; } dfa; /* A grammar */ typedef struct { int g_ndfas; dfa *g_dfa; /* Array of DFAs */ labellist g_ll; int g_start; /* Start symbol of the grammar */ int g_accel; /* Set if accelerators present */ } grammar; /* FUNCTIONS */ grammar *newgrammar(int start); void freegrammar(grammar *g); dfa *adddfa(grammar *g, int type, char *name); int addstate(dfa *d); void addarc(dfa *d, int from, int to, int lbl); dfa *PyGrammar_FindDFA(grammar *g, int type); int addlabel(labellist *ll, int type, char *str); int findlabel(labellist *ll, int type, char *str); char *PyGrammar_LabelRepr(label *lb); void translatelabels(grammar *g); void addfirstsets(grammar *g); void PyGrammar_AddAccelerators(grammar *g); void PyGrammar_RemoveAccelerators(grammar *); void printgrammar(grammar *g, FILE *fp); void printnonterminals(grammar *g, FILE *fp); #ifdef __cplusplus } #endif #endif /* !Py_GRAMMAR_H */ PKZWťpython2.7/Python.hnu[#ifndef Py_PYTHON_H #define Py_PYTHON_H /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */ /* Include nearly all Python header files */ #include "patchlevel.h" #include "pyconfig.h" #include "pymacconfig.h" /* Cyclic gc is always enabled, starting with release 2.3a1. Supply the * old symbol for the benefit of extension modules written before then * that may be conditionalizing on it. The core doesn't use it anymore. */ #ifndef WITH_CYCLE_GC #define WITH_CYCLE_GC 1 #endif #include #ifndef UCHAR_MAX #error "Something's broken. UCHAR_MAX should be defined in limits.h." #endif #if UCHAR_MAX != 255 #error "Python's source code assumes C's unsigned char is an 8-bit type." #endif #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) #define _SGI_MP_SOURCE #endif #include #ifndef NULL # error "Python.h requires that stdio.h define NULL." #endif #include #ifdef HAVE_ERRNO_H #include #endif #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_CRYPT_H #include #endif /* For size_t? */ #ifdef HAVE_STDDEF_H #include #endif /* CAUTION: Build setups should ensure that NDEBUG is defined on the * compiler command line when building Python in release mode; else * assert() calls won't be removed. */ #include #include "pyport.h" /* pyconfig.h or pyport.h may or may not define DL_IMPORT */ #ifndef DL_IMPORT /* declarations for DLL import/export */ #define DL_IMPORT(RTYPE) RTYPE #endif #ifndef DL_EXPORT /* declarations for DLL import/export */ #define DL_EXPORT(RTYPE) RTYPE #endif /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG. * PYMALLOC_DEBUG is in error if pymalloc is not in use. */ #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG) #define PYMALLOC_DEBUG #endif #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC) #error "PYMALLOC_DEBUG requires WITH_PYMALLOC" #endif #include "pymath.h" #include "pymem.h" #include "object.h" #include "objimpl.h" #include "pydebug.h" #include "unicodeobject.h" #include "intobject.h" #include "boolobject.h" #include "longobject.h" #include "floatobject.h" #ifndef WITHOUT_COMPLEX #include "complexobject.h" #endif #include "rangeobject.h" #include "stringobject.h" #include "memoryobject.h" #include "bufferobject.h" #include "bytesobject.h" #include "bytearrayobject.h" #include "tupleobject.h" #include "listobject.h" #include "dictobject.h" #include "enumobject.h" #include "setobject.h" #include "methodobject.h" #include "moduleobject.h" #include "funcobject.h" #include "classobject.h" #include "fileobject.h" #include "cobject.h" #include "pycapsule.h" #include "traceback.h" #include "sliceobject.h" #include "cellobject.h" #include "iterobject.h" #include "genobject.h" #include "descrobject.h" #include "warnings.h" #include "weakrefobject.h" #include "codecs.h" #include "pyerrors.h" #include "pystate.h" #include "pyarena.h" #include "modsupport.h" #include "pythonrun.h" #include "ceval.h" #include "sysmodule.h" #include "intrcheck.h" #include "import.h" #include "abstract.h" #include "compile.h" #include "eval.h" #include "pyctype.h" #include "pystrtod.h" #include "pystrcmp.h" #include "dtoa.h" /* _Py_Mangle is defined in compile.c */ PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name); /* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */ #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a)) /* PyArg_NoArgs should not be necessary. Set ml_flags in the PyMethodDef to METH_NOARGS. */ #define PyArg_NoArgs(v) PyArg_Parse(v, "") /* Argument must be a char or an int in [-128, 127] or [0, 255]. */ #define Py_CHARMASK(c) ((unsigned char)((c) & 0xff)) #include "pyfpe.h" /* These definitions must match corresponding definitions in graminit.h. There's code in compile.c that checks that they are the same. */ #define Py_single_input 256 #define Py_file_input 257 #define Py_eval_input 258 #ifdef HAVE_PTH /* GNU pth user-space thread support */ #include #endif /* Define macros for inline documentation. */ #define PyDoc_VAR(name) static char name[] #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str) #ifdef WITH_DOC_STRINGS #define PyDoc_STR(str) str #else #define PyDoc_STR(str) "" #endif #endif /* !Py_PYTHON_H */ PKZ\m+{{python2.7/genobject.hnu[ /* Generator object interface */ #ifndef Py_GENOBJECT_H #define Py_GENOBJECT_H #ifdef __cplusplus extern "C" { #endif struct _frame; /* Avoid including frameobject.h */ typedef struct { PyObject_HEAD /* The gi_ prefix is intended to remind of generator-iterator. */ /* Note: gi_frame can be NULL if the generator is "finished" */ struct _frame *gi_frame; /* True if generator is being executed. */ int gi_running; /* The code object backing the generator */ PyObject *gi_code; /* List of weak reference. */ PyObject *gi_weakreflist; } PyGenObject; PyAPI_DATA(PyTypeObject) PyGen_Type; #define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type) #define PyGen_CheckExact(op) (Py_TYPE(op) == &PyGen_Type) PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *); PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *); #ifdef __cplusplus } #endif #endif /* !Py_GENOBJECT_H */ PKZ,V==python2.7/complexobject.hnu[/* Complex number structure */ #ifndef Py_COMPLEXOBJECT_H #define Py_COMPLEXOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { double real; double imag; } Py_complex; /* Operations on complex numbers from complexmodule.c */ #define c_sum _Py_c_sum #define c_diff _Py_c_diff #define c_neg _Py_c_neg #define c_prod _Py_c_prod #define c_quot _Py_c_quot #define c_pow _Py_c_pow #define c_abs _Py_c_abs PyAPI_FUNC(Py_complex) c_sum(Py_complex, Py_complex); PyAPI_FUNC(Py_complex) c_diff(Py_complex, Py_complex); PyAPI_FUNC(Py_complex) c_neg(Py_complex); PyAPI_FUNC(Py_complex) c_prod(Py_complex, Py_complex); PyAPI_FUNC(Py_complex) c_quot(Py_complex, Py_complex); PyAPI_FUNC(Py_complex) c_pow(Py_complex, Py_complex); PyAPI_FUNC(double) c_abs(Py_complex); /* Complex object interface */ /* PyComplexObject represents a complex number with double-precision real and imaginary parts. */ typedef struct { PyObject_HEAD Py_complex cval; } PyComplexObject; PyAPI_DATA(PyTypeObject) PyComplex_Type; #define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type) #define PyComplex_CheckExact(op) (Py_TYPE(op) == &PyComplex_Type) PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex); PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag); PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op); PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op); PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op); /* Format the object based on the format_spec, as defined in PEP 3101 (Advanced String Formatting). */ PyAPI_FUNC(PyObject *) _PyComplex_FormatAdvanced(PyObject *obj, char *format_spec, Py_ssize_t format_spec_len); #ifdef __cplusplus } #endif #endif /* !Py_COMPLEXOBJECT_H */ PKZп?python2.7/pystate.hnu[ /* Thread and interpreter state structures and their interfaces */ #ifndef Py_PYSTATE_H #define Py_PYSTATE_H #ifdef __cplusplus extern "C" { #endif /* State shared between threads */ struct _ts; /* Forward */ struct _is; /* Forward */ typedef struct _is { struct _is *next; struct _ts *tstate_head; PyObject *modules; PyObject *sysdict; PyObject *builtins; PyObject *modules_reloading; PyObject *codec_search_path; PyObject *codec_search_cache; PyObject *codec_error_registry; #ifdef HAVE_DLOPEN int dlopenflags; #endif #ifdef WITH_TSC int tscdump; #endif } PyInterpreterState; /* State unique per thread */ struct _frame; /* Avoid including frameobject.h */ /* Py_tracefunc return -1 when raising an exception, or 0 for success. */ typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *); /* The following values are used for 'what' for tracefunc functions: */ #define PyTrace_CALL 0 #define PyTrace_EXCEPTION 1 #define PyTrace_LINE 2 #define PyTrace_RETURN 3 #define PyTrace_C_CALL 4 #define PyTrace_C_EXCEPTION 5 #define PyTrace_C_RETURN 6 typedef struct _ts { /* See Python/ceval.c for comments explaining most fields */ struct _ts *next; PyInterpreterState *interp; struct _frame *frame; int recursion_depth; /* 'tracing' keeps track of the execution depth when tracing/profiling. This is to prevent the actual trace/profile code from being recorded in the trace/profile. */ int tracing; int use_tracing; Py_tracefunc c_profilefunc; Py_tracefunc c_tracefunc; PyObject *c_profileobj; PyObject *c_traceobj; PyObject *curexc_type; PyObject *curexc_value; PyObject *curexc_traceback; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *dict; /* Stores per-thread state */ /* tick_counter is incremented whenever the check_interval ticker * reaches zero. The purpose is to give a useful measure of the number * of interpreted bytecode instructions in a given thread. This * extremely lightweight statistic collector may be of interest to * profilers (like psyco.jit()), although nothing in the core uses it. */ int tick_counter; int gilstate_counter; PyObject *async_exc; /* Asynchronous exception to raise */ long thread_id; /* Thread id where this tstate was created */ int trash_delete_nesting; PyObject *trash_delete_later; /* XXX signal handlers should also be here */ } PyThreadState; PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_New(void); PyAPI_FUNC(void) PyInterpreterState_Clear(PyInterpreterState *); PyAPI_FUNC(void) PyInterpreterState_Delete(PyInterpreterState *); PyAPI_FUNC(PyThreadState *) PyThreadState_New(PyInterpreterState *); PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *); PyAPI_FUNC(void) _PyThreadState_Init(PyThreadState *); PyAPI_FUNC(void) PyThreadState_Clear(PyThreadState *); PyAPI_FUNC(void) PyThreadState_Delete(PyThreadState *); #ifdef WITH_THREAD PyAPI_FUNC(void) PyThreadState_DeleteCurrent(void); #endif PyAPI_FUNC(PyThreadState *) PyThreadState_Get(void); PyAPI_FUNC(PyThreadState *) PyThreadState_Swap(PyThreadState *); PyAPI_FUNC(PyObject *) PyThreadState_GetDict(void); PyAPI_FUNC(int) PyThreadState_SetAsyncExc(long, PyObject *); /* Variable and macro for in-line access to current thread state */ PyAPI_DATA(PyThreadState *) _PyThreadState_Current; #ifdef Py_DEBUG #define PyThreadState_GET() PyThreadState_Get() #else #define PyThreadState_GET() (_PyThreadState_Current) #endif typedef enum {PyGILState_LOCKED, PyGILState_UNLOCKED} PyGILState_STATE; /* Ensure that the current thread is ready to call the Python C API, regardless of the current state of Python, or of its thread lock. This may be called as many times as desired by a thread so long as each call is matched with a call to PyGILState_Release(). In general, other thread-state APIs may be used between _Ensure() and _Release() calls, so long as the thread-state is restored to its previous state before the Release(). For example, normal use of the Py_BEGIN_ALLOW_THREADS/ Py_END_ALLOW_THREADS macros are acceptable. The return value is an opaque "handle" to the thread state when PyGILState_Ensure() was called, and must be passed to PyGILState_Release() to ensure Python is left in the same state. Even though recursive calls are allowed, these handles can *not* be shared - each unique call to PyGILState_Ensure must save the handle for its call to PyGILState_Release. When the function returns, the current thread will hold the GIL. Failure is a fatal error. */ PyAPI_FUNC(PyGILState_STATE) PyGILState_Ensure(void); /* Release any resources previously acquired. After this call, Python's state will be the same as it was prior to the corresponding PyGILState_Ensure() call (but generally this state will be unknown to the caller, hence the use of the GILState API.) Every call to PyGILState_Ensure must be matched by a call to PyGILState_Release on the same thread. */ PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE); /* Helper/diagnostic function - get the current thread state for this thread. May return NULL if no GILState API has been used on the current thread. Note that the main thread always has such a thread-state, even if no auto-thread-state call has been made on the main thread. */ PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadState(void); /* The implementation of sys._current_frames() Returns a dict mapping thread id to that thread's current frame. */ PyAPI_FUNC(PyObject *) _PyThread_CurrentFrames(void); /* Routines for advanced debuggers, requested by David Beazley. Don't use unless you know what you are doing! */ PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_Head(void); PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_Next(PyInterpreterState *); PyAPI_FUNC(PyThreadState *) PyInterpreterState_ThreadHead(PyInterpreterState *); PyAPI_FUNC(PyThreadState *) PyThreadState_Next(PyThreadState *); typedef struct _frame *(*PyThreadFrameGetter)(PyThreadState *self_); /* hook for PyEval_GetFrame(), requested for Psyco */ PyAPI_DATA(PyThreadFrameGetter) _PyThreadState_GetFrame; #ifdef __cplusplus } #endif #endif /* !Py_PYSTATE_H */ PKZԨ python2.7/intobject.hnu[ /* Integer object interface */ /* PyIntObject represents a (long) integer. This is an immutable object; an integer cannot change its value after creation. There are functions to create new integer objects, to test an object for integer-ness, and to get the integer value. The latter functions returns -1 and sets errno to EBADF if the object is not an PyIntObject. None of the functions should be applied to nil objects. The type PyIntObject is (unfortunately) exposed here so we can declare _Py_TrueStruct and _Py_ZeroStruct in boolobject.h; don't use this. */ #ifndef Py_INTOBJECT_H #define Py_INTOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { PyObject_HEAD long ob_ival; } PyIntObject; PyAPI_DATA(PyTypeObject) PyInt_Type; #define PyInt_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_INT_SUBCLASS) #define PyInt_CheckExact(op) (Py_TYPE(op) == &PyInt_Type) #define _PyAnyInt_Check(op) (PyInt_Check(op) || PyLong_Check(op)) #define _PyAnyInt_CheckExact(op) (PyInt_CheckExact(op) || PyLong_CheckExact(op)) PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int); #ifdef Py_USING_UNICODE PyAPI_FUNC(PyObject *) PyInt_FromUnicode(Py_UNICODE*, Py_ssize_t, int); #endif PyAPI_FUNC(PyObject *) PyInt_FromLong(long); PyAPI_FUNC(PyObject *) PyInt_FromSize_t(size_t); PyAPI_FUNC(PyObject *) PyInt_FromSsize_t(Py_ssize_t); PyAPI_FUNC(long) PyInt_AsLong(PyObject *); PyAPI_FUNC(Py_ssize_t) PyInt_AsSsize_t(PyObject *); PyAPI_FUNC(int) _PyInt_AsInt(PyObject *); PyAPI_FUNC(unsigned long) PyInt_AsUnsignedLongMask(PyObject *); #ifdef HAVE_LONG_LONG PyAPI_FUNC(unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *); #endif PyAPI_FUNC(long) PyInt_GetMax(void); /* Macro, trading safety for speed */ #define PyInt_AS_LONG(op) (((PyIntObject *)(op))->ob_ival) /* These aren't really part of the Int object, but they're handy; the protos * are necessary for systems that need the magic of PyAPI_FUNC and that want * to have stropmodule as a dynamically loaded module instead of building it * into the main Python shared library/DLL. Guido thinks I'm weird for * building it this way. :-) [cjh] */ PyAPI_FUNC(unsigned long) PyOS_strtoul(char *, char **, int); PyAPI_FUNC(long) PyOS_strtol(char *, char **, int); /* free list api */ PyAPI_FUNC(int) PyInt_ClearFreeList(void); /* Convert an integer to the given base. Returns a string. If base is 2, 8 or 16, add the proper prefix '0b', '0o' or '0x'. If newstyle is zero, then use the pre-2.6 behavior of octal having a leading "0" */ PyAPI_FUNC(PyObject*) _PyInt_Format(PyIntObject* v, int base, int newstyle); /* Format the object based on the format_spec, as defined in PEP 3101 (Advanced String Formatting). */ PyAPI_FUNC(PyObject *) _PyInt_FormatAdvanced(PyObject *obj, char *format_spec, Py_ssize_t format_spec_len); PyAPI_FUNC(void) _PyInt_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_INTOBJECT_H */ PKZbQ--python2.7/pyerrors.hnu[#ifndef Py_ERRORS_H #define Py_ERRORS_H #ifdef __cplusplus extern "C" { #endif /* Error objects */ typedef struct { PyObject_HEAD PyObject *dict; PyObject *args; PyObject *message; } PyBaseExceptionObject; typedef struct { PyObject_HEAD PyObject *dict; PyObject *args; PyObject *message; PyObject *msg; PyObject *filename; PyObject *lineno; PyObject *offset; PyObject *text; PyObject *print_file_and_line; } PySyntaxErrorObject; #ifdef Py_USING_UNICODE typedef struct { PyObject_HEAD PyObject *dict; PyObject *args; PyObject *message; PyObject *encoding; PyObject *object; Py_ssize_t start; Py_ssize_t end; PyObject *reason; } PyUnicodeErrorObject; #endif typedef struct { PyObject_HEAD PyObject *dict; PyObject *args; PyObject *message; PyObject *code; } PySystemExitObject; typedef struct { PyObject_HEAD PyObject *dict; PyObject *args; PyObject *message; PyObject *myerrno; PyObject *strerror; PyObject *filename; } PyEnvironmentErrorObject; #ifdef MS_WINDOWS typedef struct { PyObject_HEAD PyObject *dict; PyObject *args; PyObject *message; PyObject *myerrno; PyObject *strerror; PyObject *filename; PyObject *winerror; } PyWindowsErrorObject; #endif /* Error handling definitions */ PyAPI_FUNC(void) PyErr_SetNone(PyObject *); PyAPI_FUNC(void) PyErr_SetObject(PyObject *, PyObject *); PyAPI_FUNC(void) PyErr_SetString(PyObject *, const char *); PyAPI_FUNC(PyObject *) PyErr_Occurred(void); PyAPI_FUNC(void) PyErr_Clear(void); PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **); PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *); #ifdef Py_DEBUG #define _PyErr_OCCURRED() PyErr_Occurred() #else #define _PyErr_OCCURRED() (_PyThreadState_Current->curexc_type) #endif /* Error testing and normalization */ PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *); PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *); PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); PyAPI_FUNC(void) _PyErr_ReplaceException(PyObject *, PyObject *, PyObject *); /* */ #define PyExceptionClass_Check(x) \ (PyClass_Check((x)) || (PyType_Check((x)) && \ PyType_FastSubclass((PyTypeObject*)(x), Py_TPFLAGS_BASE_EXC_SUBCLASS))) #define PyExceptionInstance_Check(x) \ (PyInstance_Check((x)) || \ PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS)) #define PyExceptionClass_Name(x) \ (PyClass_Check((x)) \ ? PyString_AS_STRING(((PyClassObject*)(x))->cl_name) \ : (char *)(((PyTypeObject*)(x))->tp_name)) #define PyExceptionInstance_Class(x) \ ((PyInstance_Check((x)) \ ? (PyObject*)((PyInstanceObject*)(x))->in_class \ : (PyObject*)((x)->ob_type))) /* Predefined exceptions */ PyAPI_DATA(PyObject *) PyExc_BaseException; PyAPI_DATA(PyObject *) PyExc_Exception; PyAPI_DATA(PyObject *) PyExc_StopIteration; PyAPI_DATA(PyObject *) PyExc_GeneratorExit; PyAPI_DATA(PyObject *) PyExc_StandardError; PyAPI_DATA(PyObject *) PyExc_ArithmeticError; PyAPI_DATA(PyObject *) PyExc_LookupError; PyAPI_DATA(PyObject *) PyExc_AssertionError; PyAPI_DATA(PyObject *) PyExc_AttributeError; PyAPI_DATA(PyObject *) PyExc_EOFError; PyAPI_DATA(PyObject *) PyExc_FloatingPointError; PyAPI_DATA(PyObject *) PyExc_EnvironmentError; PyAPI_DATA(PyObject *) PyExc_IOError; PyAPI_DATA(PyObject *) PyExc_OSError; PyAPI_DATA(PyObject *) PyExc_ImportError; PyAPI_DATA(PyObject *) PyExc_IndexError; PyAPI_DATA(PyObject *) PyExc_KeyError; PyAPI_DATA(PyObject *) PyExc_KeyboardInterrupt; PyAPI_DATA(PyObject *) PyExc_MemoryError; PyAPI_DATA(PyObject *) PyExc_NameError; PyAPI_DATA(PyObject *) PyExc_OverflowError; PyAPI_DATA(PyObject *) PyExc_RuntimeError; PyAPI_DATA(PyObject *) PyExc_NotImplementedError; PyAPI_DATA(PyObject *) PyExc_SyntaxError; PyAPI_DATA(PyObject *) PyExc_IndentationError; PyAPI_DATA(PyObject *) PyExc_TabError; PyAPI_DATA(PyObject *) PyExc_ReferenceError; PyAPI_DATA(PyObject *) PyExc_SystemError; PyAPI_DATA(PyObject *) PyExc_SystemExit; PyAPI_DATA(PyObject *) PyExc_TypeError; PyAPI_DATA(PyObject *) PyExc_UnboundLocalError; PyAPI_DATA(PyObject *) PyExc_UnicodeError; PyAPI_DATA(PyObject *) PyExc_UnicodeEncodeError; PyAPI_DATA(PyObject *) PyExc_UnicodeDecodeError; PyAPI_DATA(PyObject *) PyExc_UnicodeTranslateError; PyAPI_DATA(PyObject *) PyExc_ValueError; PyAPI_DATA(PyObject *) PyExc_ZeroDivisionError; #ifdef MS_WINDOWS PyAPI_DATA(PyObject *) PyExc_WindowsError; #endif #ifdef __VMS PyAPI_DATA(PyObject *) PyExc_VMSError; #endif PyAPI_DATA(PyObject *) PyExc_BufferError; PyAPI_DATA(PyObject *) PyExc_MemoryErrorInst; PyAPI_DATA(PyObject *) PyExc_RecursionErrorInst; /* Predefined warning categories */ PyAPI_DATA(PyObject *) PyExc_Warning; PyAPI_DATA(PyObject *) PyExc_UserWarning; PyAPI_DATA(PyObject *) PyExc_DeprecationWarning; PyAPI_DATA(PyObject *) PyExc_PendingDeprecationWarning; PyAPI_DATA(PyObject *) PyExc_SyntaxWarning; PyAPI_DATA(PyObject *) PyExc_RuntimeWarning; PyAPI_DATA(PyObject *) PyExc_FutureWarning; PyAPI_DATA(PyObject *) PyExc_ImportWarning; PyAPI_DATA(PyObject *) PyExc_UnicodeWarning; PyAPI_DATA(PyObject *) PyExc_BytesWarning; /* Convenience functions */ PyAPI_FUNC(int) PyErr_BadArgument(void); PyAPI_FUNC(PyObject *) PyErr_NoMemory(void); PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *); PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject( PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename( PyObject *, const char *); #ifdef MS_WINDOWS PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename( PyObject *, const Py_UNICODE *); #endif /* MS_WINDOWS */ PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...) Py_GCC_ATTRIBUTE((format(printf, 2, 3))); #ifdef MS_WINDOWS PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject( int, const char *); PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename( int, const char *); PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename( int, const Py_UNICODE *); PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int); PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject( PyObject *,int, PyObject *); PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename( PyObject *,int, const char *); PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename( PyObject *,int, const Py_UNICODE *); PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int); #endif /* MS_WINDOWS */ /* Export the old function so that the existing API remains available: */ PyAPI_FUNC(void) PyErr_BadInternalCall(void); PyAPI_FUNC(void) _PyErr_BadInternalCall(const char *filename, int lineno); /* Mask the old API with a call to the new API for code compiled under Python 2.0: */ #define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__) /* Function to create a new exception */ PyAPI_FUNC(PyObject *) PyErr_NewException( char *name, PyObject *base, PyObject *dict); PyAPI_FUNC(PyObject *) PyErr_NewExceptionWithDoc( char *name, char *doc, PyObject *base, PyObject *dict); PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *); /* In sigcheck.c or signalmodule.c */ PyAPI_FUNC(int) PyErr_CheckSignals(void); PyAPI_FUNC(void) PyErr_SetInterrupt(void); /* In signalmodule.c */ int PySignal_SetWakeupFd(int fd); /* Support for adding program text to SyntaxErrors */ PyAPI_FUNC(void) PyErr_SyntaxLocation(const char *, int); PyAPI_FUNC(PyObject *) PyErr_ProgramText(const char *, int); #ifdef Py_USING_UNICODE /* The following functions are used to create and modify unicode exceptions from C */ /* create a UnicodeDecodeError object */ PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_Create( const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); /* create a UnicodeEncodeError object */ PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_Create( const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); /* create a UnicodeTranslateError object */ PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_Create( const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); /* get the encoding attribute */ PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetEncoding(PyObject *); PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetEncoding(PyObject *); /* get the object attribute */ PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetObject(PyObject *); PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetObject(PyObject *); PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetObject(PyObject *); /* get the value of the start attribute (the int * may not be NULL) return 0 on success, -1 on failure */ PyAPI_FUNC(int) PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *); PyAPI_FUNC(int) PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *); PyAPI_FUNC(int) PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *); /* assign a new value to the start attribute return 0 on success, -1 on failure */ PyAPI_FUNC(int) PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t); PyAPI_FUNC(int) PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t); PyAPI_FUNC(int) PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t); /* get the value of the end attribute (the int *may not be NULL) return 0 on success, -1 on failure */ PyAPI_FUNC(int) PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *); PyAPI_FUNC(int) PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *); PyAPI_FUNC(int) PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *); /* assign a new value to the end attribute return 0 on success, -1 on failure */ PyAPI_FUNC(int) PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t); PyAPI_FUNC(int) PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t); PyAPI_FUNC(int) PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t); /* get the value of the reason attribute */ PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetReason(PyObject *); PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetReason(PyObject *); PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetReason(PyObject *); /* assign a new value to the reason attribute return 0 on success, -1 on failure */ PyAPI_FUNC(int) PyUnicodeEncodeError_SetReason( PyObject *, const char *); PyAPI_FUNC(int) PyUnicodeDecodeError_SetReason( PyObject *, const char *); PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason( PyObject *, const char *); #endif /* These APIs aren't really part of the error implementation, but often needed to format error messages; the native C lib APIs are not available on all platforms, which is why we provide emulations for those platforms in Python/mysnprintf.c, WARNING: The return value of snprintf varies across platforms; do not rely on any particular behavior; eventually the C99 defn may be reliable. */ #if defined(MS_WIN32) && !defined(HAVE_SNPRINTF) # define HAVE_SNPRINTF # define snprintf _snprintf # define vsnprintf _vsnprintf #endif #include PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) Py_GCC_ATTRIBUTE((format(printf, 3, 4))); PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) Py_GCC_ATTRIBUTE((format(printf, 3, 0))); #ifdef __cplusplus } #endif #endif /* !Py_ERRORS_H */ PKZ10  python2.7/methodobject.hnu[ /* Method object interface */ #ifndef Py_METHODOBJECT_H #define Py_METHODOBJECT_H #ifdef __cplusplus extern "C" { #endif /* This is about the type 'builtin_function_or_method', not Python methods in user-defined classes. See classobject.h for the latter. */ PyAPI_DATA(PyTypeObject) PyCFunction_Type; #define PyCFunction_Check(op) (Py_TYPE(op) == &PyCFunction_Type) typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*PyNoArgsFunction)(PyObject *); PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *); PyAPI_FUNC(PyObject *) PyCFunction_GetSelf(PyObject *); PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *); /* Macros for direct access to these values. Type checks are *not* done, so use with care. */ #define PyCFunction_GET_FUNCTION(func) \ (((PyCFunctionObject *)func) -> m_ml -> ml_meth) #define PyCFunction_GET_SELF(func) \ (((PyCFunctionObject *)func) -> m_self) #define PyCFunction_GET_FLAGS(func) \ (((PyCFunctionObject *)func) -> m_ml -> ml_flags) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *); struct PyMethodDef { const char *ml_name; /* The name of the built-in function/method */ PyCFunction ml_meth; /* The C function that implements it */ int ml_flags; /* Combination of METH_xxx flags, which mostly describe the args expected by the C func */ const char *ml_doc; /* The __doc__ attribute, or NULL */ }; typedef struct PyMethodDef PyMethodDef; PyAPI_FUNC(PyObject *) Py_FindMethod(PyMethodDef[], PyObject *, const char *); #define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL) PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *, PyObject *); /* Flag passed to newmethodobject */ #define METH_OLDARGS 0x0000 #define METH_VARARGS 0x0001 #define METH_KEYWORDS 0x0002 /* METH_NOARGS and METH_O must not be combined with the flags above. */ #define METH_NOARGS 0x0004 #define METH_O 0x0008 /* METH_CLASS and METH_STATIC are a little different; these control the construction of methods for a class. These cannot be used for functions in modules. */ #define METH_CLASS 0x0010 #define METH_STATIC 0x0020 /* METH_COEXIST allows a method to be entered eventhough a slot has already filled the entry. When defined, the flag allows a separate method, "__contains__" for example, to coexist with a defined slot like sq_contains. */ #define METH_COEXIST 0x0040 typedef struct PyMethodChain { PyMethodDef *methods; /* Methods of this type */ struct PyMethodChain *link; /* NULL or base type */ } PyMethodChain; PyAPI_FUNC(PyObject *) Py_FindMethodInChain(PyMethodChain *, PyObject *, const char *); typedef struct { PyObject_HEAD PyMethodDef *m_ml; /* Description of the C function to call */ PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */ PyObject *m_module; /* The __module__ attribute, can be anything */ } PyCFunctionObject; PyAPI_FUNC(int) PyCFunction_ClearFreeList(void); PyAPI_FUNC(void) _PyCFunction_DebugMallocStats(FILE *out); PyAPI_FUNC(void) _PyMethod_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_METHODOBJECT_H */ PKZALIpython2.7/bitset.hnu[ #ifndef Py_BITSET_H #define Py_BITSET_H #ifdef __cplusplus extern "C" { #endif /* Bitset interface */ #define BYTE char typedef BYTE *bitset; bitset newbitset(int nbits); void delbitset(bitset bs); #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0) int addbit(bitset bs, int ibit); /* Returns 0 if already set */ int samebitset(bitset bs1, bitset bs2, int nbits); void mergebitset(bitset bs1, bitset bs2, int nbits); #define BITSPERBYTE (8*sizeof(BYTE)) #define NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE) #define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE) #define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE) #define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit)) #define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE) #ifdef __cplusplus } #endif #endif /* !Py_BITSET_H */ PKZ:ċpython2.7/cellobject.hnu[/* Cell object interface */ #ifndef Py_CELLOBJECT_H #define Py_CELLOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { PyObject_HEAD PyObject *ob_ref; /* Content of the cell or NULL when empty */ } PyCellObject; PyAPI_DATA(PyTypeObject) PyCell_Type; #define PyCell_Check(op) (Py_TYPE(op) == &PyCell_Type) PyAPI_FUNC(PyObject *) PyCell_New(PyObject *); PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *); PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *); #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref) #define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v) #ifdef __cplusplus } #endif #endif /* !Py_TUPLEOBJECT_H */ PKZa python2.7/ceval.hnu[#ifndef Py_CEVAL_H #define Py_CEVAL_H #ifdef __cplusplus extern "C" { #endif /* Interface to random parts in ceval.c */ PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords( PyObject *, PyObject *, PyObject *); /* Inline this */ #define PyEval_CallObject(func,arg) \ PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) PyAPI_FUNC(PyObject *) PyEval_CallFunction(PyObject *obj, const char *format, ...); PyAPI_FUNC(PyObject *) PyEval_CallMethod(PyObject *obj, const char *methodname, const char *format, ...); PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *); PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *); struct _frame; /* Avoid including frameobject.h */ PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void); PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void); PyAPI_FUNC(PyObject *) PyEval_GetLocals(void); PyAPI_FUNC(struct _frame *) PyEval_GetFrame(void); PyAPI_FUNC(int) PyEval_GetRestricted(void); /* Look at the current frame's (if any) code's co_flags, and turn on the corresponding compiler flags in cf->cf_flags. Return 1 if any flag was set, else return 0. */ PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf); PyAPI_FUNC(int) Py_FlushLine(void); PyAPI_FUNC(int) Py_AddPendingCall(int (*func)(void *), void *arg); PyAPI_FUNC(int) Py_MakePendingCalls(void); /* Protection against deeply nested recursive calls */ PyAPI_FUNC(void) Py_SetRecursionLimit(int); PyAPI_FUNC(int) Py_GetRecursionLimit(void); #define Py_EnterRecursiveCall(where) \ (_Py_MakeRecCheck(PyThreadState_GET()->recursion_depth) && \ _Py_CheckRecursiveCall(where)) #define Py_LeaveRecursiveCall() \ (--PyThreadState_GET()->recursion_depth) PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where); PyAPI_DATA(int) _Py_CheckRecursionLimit; #ifdef USE_STACKCHECK # define _Py_MakeRecCheck(x) (++(x) > --_Py_CheckRecursionLimit) #else # define _Py_MakeRecCheck(x) (++(x) > _Py_CheckRecursionLimit) #endif PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *); PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *); PyAPI_FUNC(PyObject *) PyEval_GetCallStats(PyObject *); PyAPI_FUNC(PyObject *) PyEval_EvalFrame(struct _frame *); PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(struct _frame *f, int exc); /* this used to be handled on a per-thread basis - now just two globals */ PyAPI_DATA(volatile int) _Py_Ticker; PyAPI_DATA(int) _Py_CheckInterval; /* Interface for threads. A module that plans to do a blocking system call (or something else that lasts a long time and doesn't touch Python data) can allow other threads to run as follows: ...preparations here... Py_BEGIN_ALLOW_THREADS ...blocking system call here... Py_END_ALLOW_THREADS ...interpret result here... The Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS pair expands to a {}-surrounded block. To leave the block in the middle (e.g., with return), you must insert a line containing Py_BLOCK_THREADS before the return, e.g. if (...premature_exit...) { Py_BLOCK_THREADS PyErr_SetFromErrno(PyExc_IOError); return NULL; } An alternative is: Py_BLOCK_THREADS if (...premature_exit...) { PyErr_SetFromErrno(PyExc_IOError); return NULL; } Py_UNBLOCK_THREADS For convenience, that the value of 'errno' is restored across Py_END_ALLOW_THREADS and Py_BLOCK_THREADS. WARNING: NEVER NEST CALLS TO Py_BEGIN_ALLOW_THREADS AND Py_END_ALLOW_THREADS!!! The function PyEval_InitThreads() should be called only from initthread() in "threadmodule.c". Note that not yet all candidates have been converted to use this mechanism! */ PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void); PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *); #ifdef WITH_THREAD PyAPI_FUNC(int) PyEval_ThreadsInitialized(void); PyAPI_FUNC(void) PyEval_InitThreads(void); PyAPI_FUNC(void) PyEval_AcquireLock(void); PyAPI_FUNC(void) PyEval_ReleaseLock(void); PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate); PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate); PyAPI_FUNC(void) PyEval_ReInitThreads(void); #define Py_BEGIN_ALLOW_THREADS { \ PyThreadState *_save; \ _save = PyEval_SaveThread(); #define Py_BLOCK_THREADS PyEval_RestoreThread(_save); #define Py_UNBLOCK_THREADS _save = PyEval_SaveThread(); #define Py_END_ALLOW_THREADS PyEval_RestoreThread(_save); \ } #else /* !WITH_THREAD */ #define Py_BEGIN_ALLOW_THREADS { #define Py_BLOCK_THREADS #define Py_UNBLOCK_THREADS #define Py_END_ALLOW_THREADS } #endif /* !WITH_THREAD */ PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *); PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *); #ifdef __cplusplus } #endif #endif /* !Py_CEVAL_H */ PKZ!!python2.7/pyfpe.hnu[#ifndef Py_PYFPE_H #define Py_PYFPE_H #ifdef __cplusplus extern "C" { #endif /* --------------------------------------------------------------------- / Copyright (c) 1996. \ | The Regents of the University of California. | | All rights reserved. | | | | Permission to use, copy, modify, and distribute this software for | | any purpose without fee is hereby granted, provided that this en- | | tire notice is included in all copies of any software which is or | | includes a copy or modification of this software and in all | | copies of the supporting documentation for such software. | | | | This work was produced at the University of California, Lawrence | | Livermore National Laboratory under contract no. W-7405-ENG-48 | | between the U.S. Department of Energy and The Regents of the | | University of California for the operation of UC LLNL. | | | | DISCLAIMER | | | | This software was prepared as an account of work sponsored by an | | agency of the United States Government. Neither the United States | | Government nor the University of California nor any of their em- | | ployees, makes any warranty, express or implied, or assumes any | | liability or responsibility for the accuracy, completeness, or | | usefulness of any information, apparatus, product, or process | | disclosed, or represents that its use would not infringe | | privately-owned rights. Reference herein to any specific commer- | | cial products, process, or service by trade name, trademark, | | manufacturer, or otherwise, does not necessarily constitute or | | imply its endorsement, recommendation, or favoring by the United | | States Government or the University of California. The views and | | opinions of authors expressed herein do not necessarily state or | | reflect those of the United States Government or the University | | of California, and shall not be used for advertising or product | \ endorsement purposes. / --------------------------------------------------------------------- */ /* * Define macros for handling SIGFPE. * Lee Busby, LLNL, November, 1996 * busby1@llnl.gov * ********************************************* * Overview of the system for handling SIGFPE: * * This file (Include/pyfpe.h) defines a couple of "wrapper" macros for * insertion into your Python C code of choice. Their proper use is * discussed below. The file Python/pyfpe.c defines a pair of global * variables PyFPE_jbuf and PyFPE_counter which are used by the signal * handler for SIGFPE to decide if a particular exception was protected * by the macros. The signal handler itself, and code for enabling the * generation of SIGFPE in the first place, is in a (new) Python module * named fpectl. This module is standard in every respect. It can be loaded * either statically or dynamically as you choose, and like any other * Python module, has no effect until you import it. * * In the general case, there are three steps toward handling SIGFPE in any * Python code: * * 1) Add the *_PROTECT macros to your C code as required to protect * dangerous floating point sections. * * 2) Turn on the inclusion of the code by adding the ``--with-fpectl'' * flag at the time you run configure. If the fpectl or other modules * which use the *_PROTECT macros are to be dynamically loaded, be * sure they are compiled with WANT_SIGFPE_HANDLER defined. * * 3) When python is built and running, import fpectl, and execute * fpectl.turnon_sigfpe(). This sets up the signal handler and enables * generation of SIGFPE whenever an exception occurs. From this point * on, any properly trapped SIGFPE should result in the Python * FloatingPointError exception. * * Step 1 has been done already for the Python kernel code, and should be * done soon for the NumPy array package. Step 2 is usually done once at * python install time. Python's behavior with respect to SIGFPE is not * changed unless you also do step 3. Thus you can control this new * facility at compile time, or run time, or both. * ******************************** * Using the macros in your code: * * static PyObject *foobar(PyObject *self,PyObject *args) * { * .... * PyFPE_START_PROTECT("Error in foobar", return 0) * result = dangerous_op(somearg1, somearg2, ...); * PyFPE_END_PROTECT(result) * .... * } * * If a floating point error occurs in dangerous_op, foobar returns 0 (NULL), * after setting the associated value of the FloatingPointError exception to * "Error in foobar". ``Dangerous_op'' can be a single operation, or a block * of code, function calls, or any combination, so long as no alternate * return is possible before the PyFPE_END_PROTECT macro is reached. * * The macros can only be used in a function context where an error return * can be recognized as signaling a Python exception. (Generally, most * functions that return a PyObject * will qualify.) * * Guido's original design suggestion for PyFPE_START_PROTECT and * PyFPE_END_PROTECT had them open and close a local block, with a locally * defined jmp_buf and jmp_buf pointer. This would allow recursive nesting * of the macros. The Ansi C standard makes it clear that such local * variables need to be declared with the "volatile" type qualifier to keep * setjmp from corrupting their values. Some current implementations seem * to be more restrictive. For example, the HPUX man page for setjmp says * * Upon the return from a setjmp() call caused by a longjmp(), the * values of any non-static local variables belonging to the routine * from which setjmp() was called are undefined. Code which depends on * such values is not guaranteed to be portable. * * I therefore decided on a more limited form of nesting, using a counter * variable (PyFPE_counter) to keep track of any recursion. If an exception * occurs in an ``inner'' pair of macros, the return will apparently * come from the outermost level. * */ #ifdef WANT_SIGFPE_HANDLER #include #include #include extern jmp_buf PyFPE_jbuf; extern int PyFPE_counter; extern double PyFPE_dummy(void *); #define PyFPE_START_PROTECT(err_string, leave_stmt) \ if (!PyFPE_counter++ && setjmp(PyFPE_jbuf)) { \ PyErr_SetString(PyExc_FloatingPointError, err_string); \ PyFPE_counter = 0; \ leave_stmt; \ } /* * This (following) is a heck of a way to decrement a counter. However, * unless the macro argument is provided, code optimizers will sometimes move * this statement so that it gets executed *before* the unsafe expression * which we're trying to protect. That pretty well messes things up, * of course. * * If the expression(s) you're trying to protect don't happen to return a * value, you will need to manufacture a dummy result just to preserve the * correct ordering of statements. Note that the macro passes the address * of its argument (so you need to give it something which is addressable). * If your expression returns multiple results, pass the last such result * to PyFPE_END_PROTECT. * * Note that PyFPE_dummy returns a double, which is cast to int. * This seeming insanity is to tickle the Floating Point Unit (FPU). * If an exception has occurred in a preceding floating point operation, * some architectures (notably Intel 80x86) will not deliver the interrupt * until the *next* floating point operation. This is painful if you've * already decremented PyFPE_counter. */ #define PyFPE_END_PROTECT(v) PyFPE_counter -= (int)PyFPE_dummy(&(v)); #else #define PyFPE_START_PROTECT(err_string, leave_stmt) #define PyFPE_END_PROTECT(v) #endif #ifdef __cplusplus } #endif #endif /* !Py_PYFPE_H */ PKZVTwwpython2.7/errcode.hnu[#ifndef Py_ERRCODE_H #define Py_ERRCODE_H #ifdef __cplusplus extern "C" { #endif /* Error codes passed around between file input, tokenizer, parser and interpreter. This is necessary so we can turn them into Python exceptions at a higher level. Note that some errors have a slightly different meaning when passed from the tokenizer to the parser than when passed from the parser to the interpreter; e.g. the parser only returns E_EOF when it hits EOF immediately, and it never returns E_OK. */ #define E_OK 10 /* No error */ #define E_EOF 11 /* End Of File */ #define E_INTR 12 /* Interrupted */ #define E_TOKEN 13 /* Bad token */ #define E_SYNTAX 14 /* Syntax error */ #define E_NOMEM 15 /* Ran out of memory */ #define E_DONE 16 /* Parsing complete */ #define E_ERROR 17 /* Execution error */ #define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */ #define E_OVERFLOW 19 /* Node had too many children */ #define E_TOODEEP 20 /* Too many indentation levels */ #define E_DEDENT 21 /* No matching outer block for dedent */ #define E_DECODE 22 /* Error in decoding into Unicode */ #define E_EOFS 23 /* EOF in triple-quoted string */ #define E_EOLS 24 /* EOL in single-quoted string */ #define E_LINECONT 25 /* Unexpected characters after a line continuation */ #define E_IO 26 /* I/O error */ #ifdef __cplusplus } #endif #endif /* !Py_ERRCODE_H */ PKZ.python2.7/pgenheaders.hnu[#ifndef Py_PGENHEADERS_H #define Py_PGENHEADERS_H #ifdef __cplusplus extern "C" { #endif /* Include files and extern declarations used by most of the parser. */ #include "Python.h" PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...) Py_GCC_ATTRIBUTE((format(printf, 1, 2))); PyAPI_FUNC(void) PySys_WriteStderr(const char *format, ...) Py_GCC_ATTRIBUTE((format(printf, 1, 2))); #define addarc _Py_addarc #define addbit _Py_addbit #define adddfa _Py_adddfa #define addfirstsets _Py_addfirstsets #define addlabel _Py_addlabel #define addstate _Py_addstate #define delbitset _Py_delbitset #define dumptree _Py_dumptree #define findlabel _Py_findlabel #define freegrammar _Py_freegrammar #define mergebitset _Py_mergebitset #define meta_grammar _Py_meta_grammar #define newbitset _Py_newbitset #define newgrammar _Py_newgrammar #define pgen _Py_pgen #define printgrammar _Py_printgrammar #define printnonterminals _Py_printnonterminals #define printtree _Py_printtree #define samebitset _Py_samebitset #define showtree _Py_showtree #define tok_dump _Py_tok_dump #define translatelabels _Py_translatelabels #ifdef __cplusplus } #endif #endif /* !Py_PGENHEADERS_H */ PKZއ python2.7/classobject.hnu[ /* Class object interface */ /* Revealing some structures (not for general use) */ #ifndef Py_CLASSOBJECT_H #define Py_CLASSOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { PyObject_HEAD PyObject *cl_bases; /* A tuple of class objects */ PyObject *cl_dict; /* A dictionary */ PyObject *cl_name; /* A string */ /* The following three are functions or NULL */ PyObject *cl_getattr; PyObject *cl_setattr; PyObject *cl_delattr; PyObject *cl_weakreflist; /* List of weak references */ } PyClassObject; typedef struct { PyObject_HEAD PyClassObject *in_class; /* The class object */ PyObject *in_dict; /* A dictionary */ PyObject *in_weakreflist; /* List of weak references */ } PyInstanceObject; typedef struct { PyObject_HEAD PyObject *im_func; /* The callable object implementing the method */ PyObject *im_self; /* The instance it is bound to, or NULL */ PyObject *im_class; /* The class that asked for the method */ PyObject *im_weakreflist; /* List of weak references */ } PyMethodObject; PyAPI_DATA(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type; #define PyClass_Check(op) ((op)->ob_type == &PyClass_Type) #define PyInstance_Check(op) ((op)->ob_type == &PyInstance_Type) #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type) PyAPI_FUNC(PyObject *) PyClass_New(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyInstance_New(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyInstance_NewRaw(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyMethod_New(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyMethod_Function(PyObject *); PyAPI_FUNC(PyObject *) PyMethod_Self(PyObject *); PyAPI_FUNC(PyObject *) PyMethod_Class(PyObject *); /* Look up attribute with name (a string) on instance object pinst, using * only the instance and base class dicts. If a descriptor is found in * a class dict, the descriptor is returned without calling it. * Returns NULL if nothing found, else a borrowed reference to the * value associated with name in the dict in which name was found. * The point of this routine is that it never calls arbitrary Python * code, so is always "safe": all it does is dict lookups. The function * can't fail, never sets an exception, and NULL is not an error (it just * means "not found"). */ PyAPI_FUNC(PyObject *) _PyInstance_Lookup(PyObject *pinst, PyObject *name); /* Macros for direct access to these values. Type checks are *not* done, so use with care. */ #define PyMethod_GET_FUNCTION(meth) \ (((PyMethodObject *)meth) -> im_func) #define PyMethod_GET_SELF(meth) \ (((PyMethodObject *)meth) -> im_self) #define PyMethod_GET_CLASS(meth) \ (((PyMethodObject *)meth) -> im_class) PyAPI_FUNC(int) PyClass_IsSubclass(PyObject *, PyObject *); PyAPI_FUNC(int) PyMethod_ClearFreeList(void); #ifdef __cplusplus } #endif #endif /* !Py_CLASSOBJECT_H */ PKZg: : python2.7/setobject.hnu[/* Set object interface */ #ifndef Py_SETOBJECT_H #define Py_SETOBJECT_H #ifdef __cplusplus extern "C" { #endif /* There are three kinds of slots in the table: 1. Unused: key == NULL 2. Active: key != NULL and key != dummy 3. Dummy: key == dummy Note: .pop() abuses the hash field of an Unused or Dummy slot to hold a search finger. The hash field of Unused or Dummy slots has no meaning otherwise. */ #define PySet_MINSIZE 8 typedef struct { long hash; /* cached hash code for the entry key */ PyObject *key; } setentry; /* This data structure is shared by set and frozenset objects. */ typedef struct _setobject PySetObject; struct _setobject { PyObject_HEAD Py_ssize_t fill; /* # Active + # Dummy */ Py_ssize_t used; /* # Active */ /* The table contains mask + 1 slots, and that's a power of 2. * We store the mask instead of the size because the mask is more * frequently needed. */ Py_ssize_t mask; /* table points to smalltable for small tables, else to * additional malloc'ed memory. table is never NULL! This rule * saves repeated runtime null-tests. */ setentry *table; setentry *(*lookup)(PySetObject *so, PyObject *key, long hash); setentry smalltable[PySet_MINSIZE]; long hash; /* only used by frozenset objects */ PyObject *weakreflist; /* List of weak references */ }; PyAPI_DATA(PyTypeObject) PySet_Type; PyAPI_DATA(PyTypeObject) PyFrozenSet_Type; /* Invariants for frozensets: * data is immutable. * hash is the hash of the frozenset or -1 if not computed yet. * Invariants for sets: * hash is -1 */ #define PyFrozenSet_CheckExact(ob) (Py_TYPE(ob) == &PyFrozenSet_Type) #define PyAnySet_CheckExact(ob) \ (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type) #define PyAnySet_Check(ob) \ (Py_TYPE(ob) == &PySet_Type || Py_TYPE(ob) == &PyFrozenSet_Type || \ PyType_IsSubtype(Py_TYPE(ob), &PySet_Type) || \ PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type)) #define PySet_Check(ob) \ (Py_TYPE(ob) == &PySet_Type || \ PyType_IsSubtype(Py_TYPE(ob), &PySet_Type)) #define PyFrozenSet_Check(ob) \ (Py_TYPE(ob) == &PyFrozenSet_Type || \ PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type)) PyAPI_FUNC(PyObject *) PySet_New(PyObject *); PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *); PyAPI_FUNC(Py_ssize_t) PySet_Size(PyObject *anyset); #define PySet_GET_SIZE(so) (((PySetObject *)(so))->used) PyAPI_FUNC(int) PySet_Clear(PyObject *set); PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key); PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key); PyAPI_FUNC(int) PySet_Add(PyObject *set, PyObject *key); PyAPI_FUNC(int) _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key); PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash); PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set); PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable); PyAPI_FUNC(void) _PySet_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_SETOBJECT_H */ PKZ~MBBpython2.7/pythonrun.hnu[ /* Interfaces to parse and execute pieces of python code */ #ifndef Py_PYTHONRUN_H #define Py_PYTHONRUN_H #ifdef __cplusplus extern "C" { #endif #define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \ CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \ CO_FUTURE_UNICODE_LITERALS) #define PyCF_MASK_OBSOLETE (CO_NESTED) #define PyCF_SOURCE_IS_UTF8 0x0100 #define PyCF_DONT_IMPLY_DEDENT 0x0200 #define PyCF_ONLY_AST 0x0400 typedef struct { int cf_flags; /* bitmask of CO_xxx flags relevant to future */ } PyCompilerFlags; PyAPI_FUNC(void) Py_SetProgramName(char *); PyAPI_FUNC(char *) Py_GetProgramName(void); PyAPI_FUNC(void) Py_SetPythonHome(char *); PyAPI_FUNC(char *) Py_GetPythonHome(void); PyAPI_FUNC(void) Py_Initialize(void); PyAPI_FUNC(void) Py_InitializeEx(int); PyAPI_FUNC(void) Py_Finalize(void); PyAPI_FUNC(int) Py_IsInitialized(void); PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void); PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *); PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); PyAPI_FUNC(int) PyRun_AnyFileExFlags(FILE *, const char *, int, PyCompilerFlags *); PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); PyAPI_FUNC(int) PyRun_SimpleFileExFlags(FILE *, const char *, int, PyCompilerFlags *); PyAPI_FUNC(int) PyRun_InteractiveOneFlags(FILE *, const char *, PyCompilerFlags *); PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(FILE *, const char *, PyCompilerFlags *); PyAPI_FUNC(struct _mod *) PyParser_ASTFromString(const char *, const char *, int, PyCompilerFlags *flags, PyArena *); PyAPI_FUNC(struct _mod *) PyParser_ASTFromFile(FILE *, const char *, int, char *, char *, PyCompilerFlags *, int *, PyArena *); #define PyParser_SimpleParseString(S, B) \ PyParser_SimpleParseStringFlags(S, B, 0) #define PyParser_SimpleParseFile(FP, S, B) \ PyParser_SimpleParseFileFlags(FP, S, B, 0) PyAPI_FUNC(struct _node *) PyParser_SimpleParseStringFlags(const char *, int, int); PyAPI_FUNC(struct _node *) PyParser_SimpleParseFileFlags(FILE *, const char *, int, int); PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *, PyObject *, PyCompilerFlags *); PyAPI_FUNC(PyObject *) PyRun_FileExFlags(FILE *, const char *, int, PyObject *, PyObject *, int, PyCompilerFlags *); #define Py_CompileString(str, p, s) Py_CompileStringFlags(str, p, s, NULL) PyAPI_FUNC(PyObject *) Py_CompileStringFlags(const char *, const char *, int, PyCompilerFlags *); PyAPI_FUNC(struct symtable *) Py_SymtableString(const char *, const char *, int); PyAPI_FUNC(void) PyErr_Print(void); PyAPI_FUNC(void) PyErr_PrintEx(int); PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(int) Py_AtExit(void (*func)(void)); PyAPI_FUNC(void) Py_Exit(int); PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *); /* Bootstrap */ PyAPI_FUNC(int) Py_Main(int argc, char **argv); /* Use macros for a bunch of old variants */ #define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL) #define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags(fp, name, 0, NULL) #define PyRun_AnyFileEx(fp, name, closeit) \ PyRun_AnyFileExFlags(fp, name, closeit, NULL) #define PyRun_AnyFileFlags(fp, name, flags) \ PyRun_AnyFileExFlags(fp, name, 0, flags) #define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL) #define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags(f, p, 0, NULL) #define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags(f, p, c, NULL) #define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags(f, p, NULL) #define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags(f, p, NULL) #define PyRun_File(fp, p, s, g, l) \ PyRun_FileExFlags(fp, p, s, g, l, 0, NULL) #define PyRun_FileEx(fp, p, s, g, l, c) \ PyRun_FileExFlags(fp, p, s, g, l, c, NULL) #define PyRun_FileFlags(fp, p, s, g, l, flags) \ PyRun_FileExFlags(fp, p, s, g, l, 0, flags) /* In getpath.c */ PyAPI_FUNC(char *) Py_GetProgramFullPath(void); PyAPI_FUNC(char *) Py_GetPrefix(void); PyAPI_FUNC(char *) Py_GetExecPrefix(void); PyAPI_FUNC(char *) Py_GetPath(void); /* In their own files */ PyAPI_FUNC(const char *) Py_GetVersion(void); PyAPI_FUNC(const char *) Py_GetPlatform(void); PyAPI_FUNC(const char *) Py_GetCopyright(void); PyAPI_FUNC(const char *) Py_GetCompiler(void); PyAPI_FUNC(const char *) Py_GetBuildInfo(void); PyAPI_FUNC(const char *) Py_SubversionRevision(void); PyAPI_FUNC(const char *) Py_SubversionShortBranch(void); PyAPI_FUNC(const char *) _Py_gitidentifier(void); PyAPI_FUNC(const char *) _Py_gitversion(void); /* Internal -- various one-time initializations */ PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void); PyAPI_FUNC(PyObject *) _PySys_Init(void); PyAPI_FUNC(void) _PyImport_Init(void); PyAPI_FUNC(void) _PyExc_Init(void); PyAPI_FUNC(void) _PyImportHooks_Init(void); PyAPI_FUNC(int) _PyFrame_Init(void); PyAPI_FUNC(int) _PyInt_Init(void); PyAPI_FUNC(int) _PyLong_Init(void); PyAPI_FUNC(void) _PyFloat_Init(void); PyAPI_FUNC(int) PyByteArray_Init(void); PyAPI_FUNC(void) _PyRandom_Init(void); /* Various internal finalizers */ PyAPI_FUNC(void) _PyExc_Fini(void); PyAPI_FUNC(void) _PyImport_Fini(void); PyAPI_FUNC(void) PyMethod_Fini(void); PyAPI_FUNC(void) PyFrame_Fini(void); PyAPI_FUNC(void) PyCFunction_Fini(void); PyAPI_FUNC(void) PyDict_Fini(void); PyAPI_FUNC(void) PyTuple_Fini(void); PyAPI_FUNC(void) PyList_Fini(void); PyAPI_FUNC(void) PySet_Fini(void); PyAPI_FUNC(void) PyString_Fini(void); PyAPI_FUNC(void) PyInt_Fini(void); PyAPI_FUNC(void) PyFloat_Fini(void); PyAPI_FUNC(void) PyOS_FiniInterrupts(void); PyAPI_FUNC(void) PyByteArray_Fini(void); PyAPI_FUNC(void) _PyRandom_Fini(void); /* Stuff with no proper home (yet) */ PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, char *); PyAPI_DATA(int) (*PyOS_InputHook)(void); PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *); PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState; /* Stack size, in "pointers" (so we get extra safety margins on 64-bit platforms). On a 32-bit platform, this translates to an 8k margin. */ #define PYOS_STACK_MARGIN 2048 #if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1300 /* Enable stack checking under Microsoft C */ #define USE_STACKCHECK #endif #ifdef USE_STACKCHECK /* Check that we aren't overflowing our stack */ PyAPI_FUNC(int) PyOS_CheckStack(void); #endif /* Signals */ typedef void (*PyOS_sighandler_t)(int); PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int); PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t); /* Random */ PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size); #ifdef __cplusplus } #endif #endif /* !Py_PYTHONRUN_H */ PKZpython2.7/import.hnu[ /* Module definition and import interface */ #ifndef Py_IMPORT_H #define Py_IMPORT_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(long) PyImport_GetMagicNumber(void); PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co); PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx( char *name, PyObject *co, char *pathname); PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void); PyAPI_FUNC(PyObject *) PyImport_AddModule(const char *name); PyAPI_FUNC(PyObject *) PyImport_ImportModule(const char *name); PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock(const char *); PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(char *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level); #define PyImport_ImportModuleEx(n, g, l, f) \ PyImport_ImportModuleLevel(n, g, l, f, -1) PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path); PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name); PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m); PyAPI_FUNC(void) PyImport_Cleanup(void); PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *); #ifdef WITH_THREAD PyAPI_FUNC(void) _PyImport_AcquireLock(void); PyAPI_FUNC(int) _PyImport_ReleaseLock(void); #else #define _PyImport_AcquireLock() #define _PyImport_ReleaseLock() 1 #endif PyAPI_FUNC(struct filedescr *) _PyImport_FindModule( const char *, PyObject *, char *, size_t, FILE **, PyObject **); PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *); PyAPI_FUNC(void) _PyImport_ReInitLock(void); PyAPI_FUNC(PyObject *) _PyImport_FindExtension(char *, char *); PyAPI_FUNC(PyObject *) _PyImport_FixupExtension(char *, char *); struct _inittab { char *name; void (*initfunc)(void); }; PyAPI_DATA(PyTypeObject) PyNullImporter_Type; PyAPI_DATA(struct _inittab *) PyImport_Inittab; PyAPI_FUNC(int) PyImport_AppendInittab(const char *name, void (*initfunc)(void)); PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); struct _frozen { char *name; unsigned char *code; int size; }; /* Embedding apps may change this pointer to point to their favorite collection of frozen modules: */ PyAPI_DATA(struct _frozen *) PyImport_FrozenModules; #ifdef __cplusplus } #endif #endif /* !Py_IMPORT_H */ PKZkE python2.7/pyarena.hnu[/* An arena-like memory interface for the compiler. */ #ifndef Py_PYARENA_H #define Py_PYARENA_H #ifdef __cplusplus extern "C" { #endif typedef struct _arena PyArena; /* PyArena_New() and PyArena_Free() create a new arena and free it, respectively. Once an arena has been created, it can be used to allocate memory via PyArena_Malloc(). Pointers to PyObject can also be registered with the arena via PyArena_AddPyObject(), and the arena will ensure that the PyObjects stay alive at least until PyArena_Free() is called. When an arena is freed, all the memory it allocated is freed, the arena releases internal references to registered PyObject*, and none of its pointers are valid. XXX (tim) What does "none of its pointers are valid" mean? Does it XXX mean that pointers previously obtained via PyArena_Malloc() are XXX no longer valid? (That's clearly true, but not sure that's what XXX the text is trying to say.) PyArena_New() returns an arena pointer. On error, it returns a negative number and sets an exception. XXX (tim): Not true. On error, PyArena_New() actually returns NULL, XXX and looks like it may or may not set an exception (e.g., if the XXX internal PyList_New(0) returns NULL, PyArena_New() passes that on XXX and an exception is set; OTOH, if the internal XXX block_new(DEFAULT_BLOCK_SIZE) returns NULL, that's passed on but XXX an exception is not set in that case). */ PyAPI_FUNC(PyArena *) PyArena_New(void); PyAPI_FUNC(void) PyArena_Free(PyArena *); /* Mostly like malloc(), return the address of a block of memory spanning * `size` bytes, or return NULL (without setting an exception) if enough * new memory can't be obtained. Unlike malloc(0), PyArena_Malloc() with * size=0 does not guarantee to return a unique pointer (the pointer * returned may equal one or more other pointers obtained from * PyArena_Malloc()). * Note that pointers obtained via PyArena_Malloc() must never be passed to * the system free() or realloc(), or to any of Python's similar memory- * management functions. PyArena_Malloc()-obtained pointers remain valid * until PyArena_Free(ar) is called, at which point all pointers obtained * from the arena `ar` become invalid simultaneously. */ PyAPI_FUNC(void *) PyArena_Malloc(PyArena *, size_t size); /* This routine isn't a proper arena allocation routine. It takes * a PyObject* and records it so that it can be DECREFed when the * arena is freed. */ PyAPI_FUNC(int) PyArena_AddPyObject(PyArena *, PyObject *); #ifdef __cplusplus } #endif #endif /* !Py_PYARENA_H */ PKZRpython2.7/bufferobject.hnu[ /* Buffer object interface */ /* Note: the object's structure is private */ #ifndef Py_BUFFEROBJECT_H #define Py_BUFFEROBJECT_H #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(PyTypeObject) PyBuffer_Type; #define PyBuffer_Check(op) (Py_TYPE(op) == &PyBuffer_Type) #define Py_END_OF_BUFFER (-1) PyAPI_FUNC(PyObject *) PyBuffer_FromObject(PyObject *base, Py_ssize_t offset, Py_ssize_t size); PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteObject(PyObject *base, Py_ssize_t offset, Py_ssize_t size); PyAPI_FUNC(PyObject *) PyBuffer_FromMemory(void *ptr, Py_ssize_t size); PyAPI_FUNC(PyObject *) PyBuffer_FromReadWriteMemory(void *ptr, Py_ssize_t size); PyAPI_FUNC(PyObject *) PyBuffer_New(Py_ssize_t size); #ifdef __cplusplus } #endif #endif /* !Py_BUFFEROBJECT_H */ PKZkr r python2.7/cobject.hnu[/* CObjects are marked Pending Deprecation as of Python 2.7. The full schedule for 2.x is as follows: - CObjects are marked Pending Deprecation in Python 2.7. - CObjects will be marked Deprecated in Python 2.8 (if there is one). - CObjects will be removed in Python 2.9 (if there is one). Additionally, for the Python 3.x series: - CObjects were marked Deprecated in Python 3.1. - CObjects will be removed in Python 3.2. You should switch all use of CObjects to capsules. Capsules have a safer and more consistent API. For more information, see Include/pycapsule.h, or read the "Capsules" topic in the "Python/C API Reference Manual". Python 2.7 no longer uses CObjects itself; all objects which were formerly CObjects are now capsules. Note that this change does not by itself break binary compatibility with extensions built for previous versions of Python--PyCObject_AsVoidPtr() has been changed to also understand capsules. */ /* original file header comment follows: */ /* C objects to be exported from one extension module to another. C objects are used for communication between extension modules. They provide a way for an extension module to export a C interface to other extension modules, so that extension modules can use the Python import mechanism to link to one another. */ #ifndef Py_COBJECT_H #define Py_COBJECT_H #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(PyTypeObject) PyCObject_Type; #define PyCObject_Check(op) (Py_TYPE(op) == &PyCObject_Type) /* Create a PyCObject from a pointer to a C object and an optional destructor function. If the second argument is non-null, then it will be called with the first argument if and when the PyCObject is destroyed. */ PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtr( void *cobj, void (*destruct)(void*)); /* Create a PyCObject from a pointer to a C object, a description object, and an optional destructor function. If the third argument is non-null, then it will be called with the first and second arguments if and when the PyCObject is destroyed. */ PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtrAndDesc( void *cobj, void *desc, void (*destruct)(void*,void*)); /* Retrieve a pointer to a C object from a PyCObject. */ PyAPI_FUNC(void *) PyCObject_AsVoidPtr(PyObject *); /* Retrieve a pointer to a description object from a PyCObject. */ PyAPI_FUNC(void *) PyCObject_GetDesc(PyObject *); /* Import a pointer to a C object from a module using a PyCObject. */ PyAPI_FUNC(void *) PyCObject_Import(char *module_name, char *cobject_name); /* Modify a C object. Fails (==0) if object has a destructor. */ PyAPI_FUNC(int) PyCObject_SetVoidPtr(PyObject *self, void *cobj); typedef struct { PyObject_HEAD void *cobject; void *desc; void (*destructor)(void *); } PyCObject; #ifdef __cplusplus } #endif #endif /* !Py_COBJECT_H */ PKZFI"python2.7/opcode.hnu[#ifndef Py_OPCODE_H #define Py_OPCODE_H #ifdef __cplusplus extern "C" { #endif /* Instruction opcodes for compiled code */ #define STOP_CODE 0 #define POP_TOP 1 #define ROT_TWO 2 #define ROT_THREE 3 #define DUP_TOP 4 #define ROT_FOUR 5 #define NOP 9 #define UNARY_POSITIVE 10 #define UNARY_NEGATIVE 11 #define UNARY_NOT 12 #define UNARY_CONVERT 13 #define UNARY_INVERT 15 #define BINARY_POWER 19 #define BINARY_MULTIPLY 20 #define BINARY_DIVIDE 21 #define BINARY_MODULO 22 #define BINARY_ADD 23 #define BINARY_SUBTRACT 24 #define BINARY_SUBSCR 25 #define BINARY_FLOOR_DIVIDE 26 #define BINARY_TRUE_DIVIDE 27 #define INPLACE_FLOOR_DIVIDE 28 #define INPLACE_TRUE_DIVIDE 29 #define SLICE 30 /* Also uses 31-33 */ #define SLICE_1 31 #define SLICE_2 32 #define SLICE_3 33 #define STORE_SLICE 40 /* Also uses 41-43 */ #define STORE_SLICE_1 41 #define STORE_SLICE_2 42 #define STORE_SLICE_3 43 #define DELETE_SLICE 50 /* Also uses 51-53 */ #define DELETE_SLICE_1 51 #define DELETE_SLICE_2 52 #define DELETE_SLICE_3 53 #define STORE_MAP 54 #define INPLACE_ADD 55 #define INPLACE_SUBTRACT 56 #define INPLACE_MULTIPLY 57 #define INPLACE_DIVIDE 58 #define INPLACE_MODULO 59 #define STORE_SUBSCR 60 #define DELETE_SUBSCR 61 #define BINARY_LSHIFT 62 #define BINARY_RSHIFT 63 #define BINARY_AND 64 #define BINARY_XOR 65 #define BINARY_OR 66 #define INPLACE_POWER 67 #define GET_ITER 68 #define PRINT_EXPR 70 #define PRINT_ITEM 71 #define PRINT_NEWLINE 72 #define PRINT_ITEM_TO 73 #define PRINT_NEWLINE_TO 74 #define INPLACE_LSHIFT 75 #define INPLACE_RSHIFT 76 #define INPLACE_AND 77 #define INPLACE_XOR 78 #define INPLACE_OR 79 #define BREAK_LOOP 80 #define WITH_CLEANUP 81 #define LOAD_LOCALS 82 #define RETURN_VALUE 83 #define IMPORT_STAR 84 #define EXEC_STMT 85 #define YIELD_VALUE 86 #define POP_BLOCK 87 #define END_FINALLY 88 #define BUILD_CLASS 89 #define HAVE_ARGUMENT 90 /* Opcodes from here have an argument: */ #define STORE_NAME 90 /* Index in name list */ #define DELETE_NAME 91 /* "" */ #define UNPACK_SEQUENCE 92 /* Number of sequence items */ #define FOR_ITER 93 #define LIST_APPEND 94 #define STORE_ATTR 95 /* Index in name list */ #define DELETE_ATTR 96 /* "" */ #define STORE_GLOBAL 97 /* "" */ #define DELETE_GLOBAL 98 /* "" */ #define DUP_TOPX 99 /* number of items to duplicate */ #define LOAD_CONST 100 /* Index in const list */ #define LOAD_NAME 101 /* Index in name list */ #define BUILD_TUPLE 102 /* Number of tuple items */ #define BUILD_LIST 103 /* Number of list items */ #define BUILD_SET 104 /* Number of set items */ #define BUILD_MAP 105 /* Always zero for now */ #define LOAD_ATTR 106 /* Index in name list */ #define COMPARE_OP 107 /* Comparison operator */ #define IMPORT_NAME 108 /* Index in name list */ #define IMPORT_FROM 109 /* Index in name list */ #define JUMP_FORWARD 110 /* Number of bytes to skip */ #define JUMP_IF_FALSE_OR_POP 111 /* Target byte offset from beginning of code */ #define JUMP_IF_TRUE_OR_POP 112 /* "" */ #define JUMP_ABSOLUTE 113 /* "" */ #define POP_JUMP_IF_FALSE 114 /* "" */ #define POP_JUMP_IF_TRUE 115 /* "" */ #define LOAD_GLOBAL 116 /* Index in name list */ #define CONTINUE_LOOP 119 /* Start of loop (absolute) */ #define SETUP_LOOP 120 /* Target address (relative) */ #define SETUP_EXCEPT 121 /* "" */ #define SETUP_FINALLY 122 /* "" */ #define LOAD_FAST 124 /* Local variable number */ #define STORE_FAST 125 /* Local variable number */ #define DELETE_FAST 126 /* Local variable number */ #define RAISE_VARARGS 130 /* Number of raise arguments (1, 2 or 3) */ /* CALL_FUNCTION_XXX opcodes defined below depend on this definition */ #define CALL_FUNCTION 131 /* #args + (#kwargs<<8) */ #define MAKE_FUNCTION 132 /* #defaults */ #define BUILD_SLICE 133 /* Number of items */ #define MAKE_CLOSURE 134 /* #free vars */ #define LOAD_CLOSURE 135 /* Load free variable from closure */ #define LOAD_DEREF 136 /* Load and dereference from closure cell */ #define STORE_DEREF 137 /* Store into cell */ /* The next 3 opcodes must be contiguous and satisfy (CALL_FUNCTION_VAR - CALL_FUNCTION) & 3 == 1 */ #define CALL_FUNCTION_VAR 140 /* #args + (#kwargs<<8) */ #define CALL_FUNCTION_KW 141 /* #args + (#kwargs<<8) */ #define CALL_FUNCTION_VAR_KW 142 /* #args + (#kwargs<<8) */ #define SETUP_WITH 143 /* Support for opargs more than 16 bits long */ #define EXTENDED_ARG 145 #define SET_ADD 146 #define MAP_ADD 147 enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE, PyCmp_GT=Py_GT, PyCmp_GE=Py_GE, PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD}; #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT) #ifdef __cplusplus } #endif #endif /* !Py_OPCODE_H */ PKZOpython2.7/intrcheck.hnu[ #ifndef Py_INTRCHECK_H #define Py_INTRCHECK_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(int) PyOS_InterruptOccurred(void); PyAPI_FUNC(void) PyOS_InitInterrupts(void); PyAPI_FUNC(void) PyOS_AfterFork(void); #ifdef __cplusplus } #endif #endif /* !Py_INTRCHECK_H */ PKZ]\python2.7/bytearrayobject.hnu[/* ByteArray object interface */ #ifndef Py_BYTEARRAYOBJECT_H #define Py_BYTEARRAYOBJECT_H #ifdef __cplusplus extern "C" { #endif #include /* Type PyByteArrayObject represents a mutable array of bytes. * The Python API is that of a sequence; * the bytes are mapped to ints in [0, 256). * Bytes are not characters; they may be used to encode characters. * The only way to go between bytes and str/unicode is via encoding * and decoding. * For the convenience of C programmers, the bytes type is considered * to contain a char pointer, not an unsigned char pointer. */ /* Object layout */ typedef struct { PyObject_VAR_HEAD /* XXX(nnorwitz): should ob_exports be Py_ssize_t? */ int ob_exports; /* how many buffer exports */ Py_ssize_t ob_alloc; /* How many bytes allocated */ char *ob_bytes; } PyByteArrayObject; /* Type object */ PyAPI_DATA(PyTypeObject) PyByteArray_Type; PyAPI_DATA(PyTypeObject) PyByteArrayIter_Type; /* Type check macros */ #define PyByteArray_Check(self) PyObject_TypeCheck(self, &PyByteArray_Type) #define PyByteArray_CheckExact(self) (Py_TYPE(self) == &PyByteArray_Type) /* Direct API functions */ PyAPI_FUNC(PyObject *) PyByteArray_FromObject(PyObject *); PyAPI_FUNC(PyObject *) PyByteArray_Concat(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyByteArray_FromStringAndSize(const char *, Py_ssize_t); PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject *); PyAPI_FUNC(char *) PyByteArray_AsString(PyObject *); PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t); /* Macros, trading safety for speed */ #define PyByteArray_AS_STRING(self) \ (assert(PyByteArray_Check(self)), \ Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_bytes : _PyByteArray_empty_string) #define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)),Py_SIZE(self)) PyAPI_DATA(char) _PyByteArray_empty_string[]; #ifdef __cplusplus } #endif #endif /* !Py_BYTEARRAYOBJECT_H */ PKZ python2.7/rangeobject.hnu[ /* Range object interface */ #ifndef Py_RANGEOBJECT_H #define Py_RANGEOBJECT_H #ifdef __cplusplus extern "C" { #endif /* This is about the type 'xrange', not the built-in function range(), which returns regular lists. */ /* A range object represents an integer range. This is an immutable object; a range cannot change its value after creation. Range objects behave like the corresponding tuple objects except that they are represented by a start, stop, and step datamembers. */ PyAPI_DATA(PyTypeObject) PyRange_Type; #define PyRange_Check(op) (Py_TYPE(op) == &PyRange_Type) #ifdef __cplusplus } #endif #endif /* !Py_RANGEOBJECT_H */ PKZL$python2.7/tupleobject.hnu[ /* Tuple object interface */ #ifndef Py_TUPLEOBJECT_H #define Py_TUPLEOBJECT_H #ifdef __cplusplus extern "C" { #endif /* Another generally useful object type is a tuple of object pointers. For Python, this is an immutable type. C code can change the tuple items (but not their number), and even use tuples are general-purpose arrays of object references, but in general only brand new tuples should be mutated, not ones that might already have been exposed to Python code. *** WARNING *** PyTuple_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the tuple. Similarly, PyTuple_GetItem does not increment the returned item's reference count. */ typedef struct { PyObject_VAR_HEAD PyObject *ob_item[1]; /* ob_item contains space for 'ob_size' elements. * Items must normally not be NULL, except during construction when * the tuple is not yet visible outside the function that builds it. */ } PyTupleObject; PyAPI_DATA(PyTypeObject) PyTuple_Type; #define PyTuple_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TUPLE_SUBCLASS) #define PyTuple_CheckExact(op) (Py_TYPE(op) == &PyTuple_Type) PyAPI_FUNC(PyObject *) PyTuple_New(Py_ssize_t size); PyAPI_FUNC(Py_ssize_t) PyTuple_Size(PyObject *); PyAPI_FUNC(PyObject *) PyTuple_GetItem(PyObject *, Py_ssize_t); PyAPI_FUNC(int) PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *); PyAPI_FUNC(PyObject *) PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, Py_ssize_t); PyAPI_FUNC(PyObject *) PyTuple_Pack(Py_ssize_t, ...); PyAPI_FUNC(void) _PyTuple_MaybeUntrack(PyObject *); /* Macro, trading safety for speed */ #define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i]) #define PyTuple_GET_SIZE(op) Py_SIZE(op) /* Macro, *only* to be used to fill in brand new tuples */ #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v) PyAPI_FUNC(int) PyTuple_ClearFreeList(void); PyAPI_FUNC(void) _PyTuple_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_TUPLEOBJECT_H */ PKZmppython2.7/ast.hnu[#ifndef Py_AST_H #define Py_AST_H #ifdef __cplusplus extern "C" { #endif PyAPI_FUNC(mod_ty) PyAST_FromNode(const node *, PyCompilerFlags *flags, const char *, PyArena *); #ifdef __cplusplus } #endif #endif /* !Py_AST_H */ PKZ҃| python2.7/listobject.hnu[ /* List object interface */ /* Another generally useful object type is a list of object pointers. This is a mutable type: the list items can be changed, and items can be added or removed. Out-of-range indices or non-list objects are ignored. *** WARNING *** PyList_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the list. Similarly, PyList_GetItem does not increment the returned item's reference count. */ #ifndef Py_LISTOBJECT_H #define Py_LISTOBJECT_H #ifdef __cplusplus extern "C" { #endif typedef struct { PyObject_VAR_HEAD /* Vector of pointers to list elements. list[0] is ob_item[0], etc. */ PyObject **ob_item; /* ob_item contains space for 'allocated' elements. The number * currently in use is ob_size. * Invariants: * 0 <= ob_size <= allocated * len(list) == ob_size * ob_item == NULL implies ob_size == allocated == 0 * list.sort() temporarily sets allocated to -1 to detect mutations. * * Items must normally not be NULL, except during construction when * the list is not yet visible outside the function that builds it. */ Py_ssize_t allocated; } PyListObject; PyAPI_DATA(PyTypeObject) PyList_Type; #define PyList_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) #define PyList_CheckExact(op) (Py_TYPE(op) == &PyList_Type) PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size); PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *); PyAPI_FUNC(PyObject *) PyList_GetItem(PyObject *, Py_ssize_t); PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *); PyAPI_FUNC(int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *); PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); PyAPI_FUNC(int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); PyAPI_FUNC(int) PyList_Sort(PyObject *); PyAPI_FUNC(int) PyList_Reverse(PyObject *); PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *); PyAPI_FUNC(PyObject *) _PyList_Extend(PyListObject *, PyObject *); /* Macro, trading safety for speed */ #define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i]) #define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v)) #define PyList_GET_SIZE(op) Py_SIZE(op) PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out); #ifdef __cplusplus } #endif #endif /* !Py_LISTOBJECT_H */ PKZ ߀python2.7/bytesobject.hnu[#define PyBytesObject PyStringObject #define PyBytes_Type PyString_Type #define PyBytes_Check PyString_Check #define PyBytes_CheckExact PyString_CheckExact #define PyBytes_CHECK_INTERNED PyString_CHECK_INTERNED #define PyBytes_AS_STRING PyString_AS_STRING #define PyBytes_GET_SIZE PyString_GET_SIZE #define Py_TPFLAGS_BYTES_SUBCLASS Py_TPFLAGS_STRING_SUBCLASS #define PyBytes_FromStringAndSize PyString_FromStringAndSize #define PyBytes_FromString PyString_FromString #define PyBytes_FromFormatV PyString_FromFormatV #define PyBytes_FromFormat PyString_FromFormat #define PyBytes_Size PyString_Size #define PyBytes_AsString PyString_AsString #define PyBytes_Repr PyString_Repr #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #define _PyBytes_Resize _PyString_Resize #define _PyBytes_Eq _PyString_Eq #define PyBytes_Format PyString_Format #define _PyBytes_FormatLong _PyString_FormatLong #define PyBytes_DecodeEscape PyString_DecodeEscape #define _PyBytes_Join _PyString_Join #define PyBytes_AsStringAndSize PyString_AsStringAndSize #define _PyBytes_InsertThousandsGrouping _PyString_InsertThousandsGrouping PKZ؋python2.7/sliceobject.hnu[#ifndef Py_SLICEOBJECT_H #define Py_SLICEOBJECT_H #ifdef __cplusplus extern "C" { #endif /* The unique ellipsis object "..." */ PyAPI_DATA(PyObject) _Py_EllipsisObject; /* Don't use this directly */ #define Py_Ellipsis (&_Py_EllipsisObject) /* Slice object interface */ /* A slice object containing start, stop, and step data members (the names are from range). After much talk with Guido, it was decided to let these be any arbitrary python type. Py_None stands for omitted values. */ typedef struct { PyObject_HEAD PyObject *start, *stop, *step; /* not NULL */ } PySliceObject; PyAPI_DATA(PyTypeObject) PySlice_Type; PyAPI_DATA(PyTypeObject) PyEllipsis_Type; #define PySlice_Check(op) (Py_TYPE(op) == &PySlice_Type) PyAPI_FUNC(PyObject *) PySlice_New(PyObject* start, PyObject* stop, PyObject* step); PyAPI_FUNC(PyObject *) _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop); PyAPI_FUNC(int) PySlice_GetIndices(PySliceObject *r, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); PyAPI_FUNC(int) PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength); PyAPI_FUNC(int) _PySlice_Unpack(PyObject *slice, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); PyAPI_FUNC(Py_ssize_t) _PySlice_AdjustIndices(Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t step); #ifdef __cplusplus } #endif #endif /* !Py_SLICEOBJECT_H */ PKZpython2.7/enumobject.hnu[#ifndef Py_ENUMOBJECT_H #define Py_ENUMOBJECT_H /* Enumerate Object */ #ifdef __cplusplus extern "C" { #endif PyAPI_DATA(PyTypeObject) PyEnum_Type; PyAPI_DATA(PyTypeObject) PyReversed_Type; #ifdef __cplusplus } #endif #endif /* !Py_ENUMOBJECT_H */ PKZv /* ** Issue #27806: Workaround for gcc 4.x which does not have _has_include. */ #ifndef __has_include #define __has_include(x) 0 #endif /* Workaround */ #if __has_include() #include #define APPLE_SUPPORTS_QUICKTIME (__MAC_OS_X_VERSION_MAX_ALLOWED < 101200) && !__LP64__ #else #define APPLE_SUPPORTS_QUICKTIME !__LP64__ #endif #if APPLE_SUPPORTS_QUICKTIME #include #endif /* APPLE_SUPPORTS_QUICKTIME */ /* ** Helper routines for error codes and such. */ char *PyMac_StrError(int); /* strerror with mac errors */ extern PyObject *PyMac_OSErrException; /* Exception for OSErr */ PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */ PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */ PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */ #if APPLE_SUPPORTS_QUICKTIME extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert fsspec->path */ #endif /* APPLE_SUPPORTS_QUICKTIME */ /* ** These conversion routines are defined in mactoolboxglue.c itself. */ int PyMac_GetOSType(PyObject *, OSType *); /* argument parser for OSType */ PyObject *PyMac_BuildOSType(OSType); /* Convert OSType to PyObject */ PyObject *PyMac_BuildNumVersion(NumVersion);/* Convert NumVersion to PyObject */ int PyMac_GetStr255(PyObject *, Str255); /* argument parser for Str255 */ PyObject *PyMac_BuildStr255(Str255); /* Convert Str255 to PyObject */ PyObject *PyMac_BuildOptStr255(Str255); /* Convert Str255 to PyObject, NULL to None */ int PyMac_GetRect(PyObject *, Rect *); /* argument parser for Rect */ PyObject *PyMac_BuildRect(Rect *); /* Convert Rect to PyObject */ int PyMac_GetPoint(PyObject *, Point *); /* argument parser for Point */ PyObject *PyMac_BuildPoint(Point); /* Convert Point to PyObject */ int PyMac_GetEventRecord(PyObject *, EventRecord *); /* argument parser for EventRecord */ PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to PyObject */ int PyMac_GetFixed(PyObject *, Fixed *); /* argument parser for Fixed */ PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */ int PyMac_Getwide(PyObject *, wide *); /* argument parser for wide */ PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */ /* ** The rest of the routines are implemented by extension modules. If they are ** dynamically loaded mactoolboxglue will contain a stub implementation of the ** routine, which imports the module, whereupon the module's init routine will ** communicate the routine pointer back to the stub. ** If USE_TOOLBOX_OBJECT_GLUE is not defined there is no glue code, and the ** extension modules simply declare the routine. This is the case for static ** builds (and could be the case for MacPython CFM builds, because CFM extension ** modules can reference each other without problems). */ #ifdef USE_TOOLBOX_OBJECT_GLUE /* ** These macros are used in the module init code. If we use toolbox object glue ** it sets the function pointer to point to the real function. */ #define PyMac_INIT_TOOLBOX_OBJECT_NEW(object, rtn) { \ extern PyObject *(*PyMacGluePtr_##rtn)(object); \ PyMacGluePtr_##rtn = _##rtn; \ } #define PyMac_INIT_TOOLBOX_OBJECT_CONVERT(object, rtn) { \ extern int (*PyMacGluePtr_##rtn)(PyObject *, object *); \ PyMacGluePtr_##rtn = _##rtn; \ } #else /* ** If we don't use toolbox object glue the init macros are empty. Moreover, we define ** _xxx_New to be the same as xxx_New, and the code in mactoolboxglue isn't included. */ #define PyMac_INIT_TOOLBOX_OBJECT_NEW(object, rtn) #define PyMac_INIT_TOOLBOX_OBJECT_CONVERT(object, rtn) #endif /* USE_TOOLBOX_OBJECT_GLUE */ /* macfs exports */ #ifndef __LP64__ int PyMac_GetFSSpec(PyObject *, FSSpec *); /* argument parser for FSSpec */ PyObject *PyMac_BuildFSSpec(FSSpec *); /* Convert FSSpec to PyObject */ #endif /* !__LP64__ */ int PyMac_GetFSRef(PyObject *, FSRef *); /* argument parser for FSRef */ PyObject *PyMac_BuildFSRef(FSRef *); /* Convert FSRef to PyObject */ /* AE exports */ extern PyObject *AEDesc_New(AppleEvent *); /* XXXX Why passed by address?? */ extern PyObject *AEDesc_NewBorrowed(AppleEvent *); extern int AEDesc_Convert(PyObject *, AppleEvent *); /* Cm exports */ extern PyObject *CmpObj_New(Component); extern int CmpObj_Convert(PyObject *, Component *); extern PyObject *CmpInstObj_New(ComponentInstance); extern int CmpInstObj_Convert(PyObject *, ComponentInstance *); /* Ctl exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *CtlObj_New(ControlHandle); extern int CtlObj_Convert(PyObject *, ControlHandle *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Dlg exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *DlgObj_New(DialogPtr); extern int DlgObj_Convert(PyObject *, DialogPtr *); extern PyObject *DlgObj_WhichDialog(DialogPtr); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Drag exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *DragObj_New(DragReference); extern int DragObj_Convert(PyObject *, DragReference *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* List exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *ListObj_New(ListHandle); extern int ListObj_Convert(PyObject *, ListHandle *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Menu exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *MenuObj_New(MenuHandle); extern int MenuObj_Convert(PyObject *, MenuHandle *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Qd exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *GrafObj_New(GrafPtr); extern int GrafObj_Convert(PyObject *, GrafPtr *); extern PyObject *BMObj_New(BitMapPtr); extern int BMObj_Convert(PyObject *, BitMapPtr *); extern PyObject *QdRGB_New(RGBColor *); extern int QdRGB_Convert(PyObject *, RGBColor *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Qdoffs exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *GWorldObj_New(GWorldPtr); extern int GWorldObj_Convert(PyObject *, GWorldPtr *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Qt exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *TrackObj_New(Track); extern int TrackObj_Convert(PyObject *, Track *); extern PyObject *MovieObj_New(Movie); extern int MovieObj_Convert(PyObject *, Movie *); extern PyObject *MovieCtlObj_New(MovieController); extern int MovieCtlObj_Convert(PyObject *, MovieController *); extern PyObject *TimeBaseObj_New(TimeBase); extern int TimeBaseObj_Convert(PyObject *, TimeBase *); extern PyObject *UserDataObj_New(UserData); extern int UserDataObj_Convert(PyObject *, UserData *); extern PyObject *MediaObj_New(Media); extern int MediaObj_Convert(PyObject *, Media *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Res exports */ extern PyObject *ResObj_New(Handle); extern int ResObj_Convert(PyObject *, Handle *); extern PyObject *OptResObj_New(Handle); extern int OptResObj_Convert(PyObject *, Handle *); /* TE exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *TEObj_New(TEHandle); extern int TEObj_Convert(PyObject *, TEHandle *); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* Win exports */ #if APPLE_SUPPORTS_QUICKTIME extern PyObject *WinObj_New(WindowPtr); extern int WinObj_Convert(PyObject *, WindowPtr *); extern PyObject *WinObj_WhichWindow(WindowPtr); #endif /* APPLE_SUPPORTS_QUICKTIME */ /* CF exports */ extern PyObject *CFObj_New(CFTypeRef); extern int CFObj_Convert(PyObject *, CFTypeRef *); extern PyObject *CFTypeRefObj_New(CFTypeRef); extern int CFTypeRefObj_Convert(PyObject *, CFTypeRef *); extern PyObject *CFStringRefObj_New(CFStringRef); extern int CFStringRefObj_Convert(PyObject *, CFStringRef *); extern PyObject *CFMutableStringRefObj_New(CFMutableStringRef); extern int CFMutableStringRefObj_Convert(PyObject *, CFMutableStringRef *); extern PyObject *CFArrayRefObj_New(CFArrayRef); extern int CFArrayRefObj_Convert(PyObject *, CFArrayRef *); extern PyObject *CFMutableArrayRefObj_New(CFMutableArrayRef); extern int CFMutableArrayRefObj_Convert(PyObject *, CFMutableArrayRef *); extern PyObject *CFDictionaryRefObj_New(CFDictionaryRef); extern int CFDictionaryRefObj_Convert(PyObject *, CFDictionaryRef *); extern PyObject *CFMutableDictionaryRefObj_New(CFMutableDictionaryRef); extern int CFMutableDictionaryRefObj_Convert(PyObject *, CFMutableDictionaryRef *); extern PyObject *CFURLRefObj_New(CFURLRef); extern int CFURLRefObj_Convert(PyObject *, CFURLRef *); extern int OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *); #ifdef __cplusplus } #endif #endif PKZƾppython2.7/parsetok.hnu[ /* Parser-tokenizer link interface */ #ifndef Py_PARSETOK_H #define Py_PARSETOK_H #ifdef __cplusplus extern "C" { #endif typedef struct { int error; const char *filename; int lineno; int offset; char *text; int token; int expected; } perrdetail; #if 0 #define PyPARSE_YIELD_IS_KEYWORD 0x0001 #endif #define PyPARSE_DONT_IMPLY_DEDENT 0x0002 #if 0 #define PyPARSE_WITH_IS_KEYWORD 0x0003 #endif #define PyPARSE_PRINT_IS_FUNCTION 0x0004 #define PyPARSE_UNICODE_LITERALS 0x0008 PyAPI_FUNC(node *) PyParser_ParseString(const char *, grammar *, int, perrdetail *); PyAPI_FUNC(node *) PyParser_ParseFile (FILE *, const char *, grammar *, int, char *, char *, perrdetail *); PyAPI_FUNC(node *) PyParser_ParseStringFlags(const char *, grammar *, int, perrdetail *, int); PyAPI_FUNC(node *) PyParser_ParseFileFlags(FILE *, const char *, grammar *, int, char *, char *, perrdetail *, int); PyAPI_FUNC(node *) PyParser_ParseFileFlagsEx(FILE *, const char *, grammar *, int, char *, char *, perrdetail *, int *); PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilename(const char *, const char *, grammar *, int, perrdetail *, int); PyAPI_FUNC(node *) PyParser_ParseStringFlagsFilenameEx(const char *, const char *, grammar *, int, perrdetail *, int *); /* Note that he following function is defined in pythonrun.c not parsetok.c. */ PyAPI_FUNC(void) PyParser_SetError(perrdetail *); #ifdef __cplusplus } #endif #endif /* !Py_PARSETOK_H */ PKZ)A**fcntl.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 6.5 File Control Operations */ #ifndef _FCNTL_H #define _FCNTL_H 1 #include /* This must be early so can define types winningly. */ __BEGIN_DECLS /* Get __mode_t, __dev_t and __off_t .*/ #include /* Get the definitions of O_*, F_*, FD_*: all the numbers and flag bits for `open', `fcntl', et al. */ #include /* Detect if open needs mode as a third argument (or for openat as a fourth argument). */ #ifdef __O_TMPFILE # define __OPEN_NEEDS_MODE(oflag) \ (((oflag) & O_CREAT) != 0 || ((oflag) & __O_TMPFILE) == __O_TMPFILE) #else # define __OPEN_NEEDS_MODE(oflag) (((oflag) & O_CREAT) != 0) #endif /* POSIX.1-2001 specifies that these types are defined by . Earlier POSIX standards permitted any type ending in `_t' to be defined by any POSIX header, so we don't conditionalize the definitions here. */ #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else typedef __off64_t off_t; # endif # define __off_t_defined #endif #if defined __USE_LARGEFILE64 && !defined __off64_t_defined typedef __off64_t off64_t; # define __off64_t_defined #endif #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif /* For XPG all symbols from should also be available. */ #ifdef __USE_XOPEN2K8 # include #endif #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # include # define S_IFMT __S_IFMT # define S_IFDIR __S_IFDIR # define S_IFCHR __S_IFCHR # define S_IFBLK __S_IFBLK # define S_IFREG __S_IFREG # ifdef __S_IFIFO # define S_IFIFO __S_IFIFO # endif # ifdef __S_IFLNK # define S_IFLNK __S_IFLNK # endif # if (defined __USE_UNIX98 || defined __USE_XOPEN2K8) && defined __S_IFSOCK # define S_IFSOCK __S_IFSOCK # endif /* Protection bits. */ # define S_ISUID __S_ISUID /* Set user ID on execution. */ # define S_ISGID __S_ISGID /* Set group ID on execution. */ # if defined __USE_MISC || defined __USE_XOPEN /* Save swapped text after use (sticky bit). This is pretty well obsolete. */ # define S_ISVTX __S_ISVTX # endif # define S_IRUSR __S_IREAD /* Read by owner. */ # define S_IWUSR __S_IWRITE /* Write by owner. */ # define S_IXUSR __S_IEXEC /* Execute by owner. */ /* Read, write, and execute by owner. */ # define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC) # define S_IRGRP (S_IRUSR >> 3) /* Read by group. */ # define S_IWGRP (S_IWUSR >> 3) /* Write by group. */ # define S_IXGRP (S_IXUSR >> 3) /* Execute by group. */ /* Read, write, and execute by group. */ # define S_IRWXG (S_IRWXU >> 3) # define S_IROTH (S_IRGRP >> 3) /* Read by others. */ # define S_IWOTH (S_IWGRP >> 3) /* Write by others. */ # define S_IXOTH (S_IXGRP >> 3) /* Execute by others. */ /* Read, write, and execute by others. */ # define S_IRWXO (S_IRWXG >> 3) #endif #ifdef __USE_MISC # ifndef R_OK /* Verbatim from . Ugh. */ /* Values for the second argument to access. These may be OR'd together. */ # define R_OK 4 /* Test for read permission. */ # define W_OK 2 /* Test for write permission. */ # define X_OK 1 /* Test for execute permission. */ # define F_OK 0 /* Test for existence. */ # endif #endif /* Use misc. */ /* XPG wants the following symbols. has the same definitions. */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Seek from end of file. */ #endif /* XPG */ /* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to unlinkat. The two functions do completely different things and therefore, the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to faccessat would be undefined behavior and thus treating it equivalent to AT_EACCESS is valid undefined behavior. */ #ifdef __USE_ATFILE # define AT_FDCWD -100 /* Special value used to indicate the *at functions should use the current working directory. */ # define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ # define AT_REMOVEDIR 0x200 /* Remove directory instead of unlinking file. */ # define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ # ifdef __USE_GNU # define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal. */ # define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ # define AT_STATX_SYNC_TYPE 0x6000 # define AT_STATX_SYNC_AS_STAT 0x0000 # define AT_STATX_FORCE_SYNC 0x2000 # define AT_STATX_DONT_SYNC 0x4000 # endif # define AT_EACCESS 0x200 /* Test access permitted for effective IDs, not real IDs. */ #endif /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int fcntl (int __fd, int __cmd, ...); #else # ifdef __REDIRECT extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); # else # define fcntl fcntl64 # endif #endif #ifdef __USE_LARGEFILE64 extern int fcntl64 (int __fd, int __cmd, ...); #endif /* Open FILE and return a new file descriptor for it, or -1 on error. OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set in OFLAG, the third argument is taken as a `mode_t', the mode of the created file. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int open (const char *__file, int __oflag, ...) __nonnull ((1)); #else # ifdef __REDIRECT extern int __REDIRECT (open, (const char *__file, int __oflag, ...), open64) __nonnull ((1)); # else # define open open64 # endif #endif #ifdef __USE_LARGEFILE64 extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1)); #endif #ifdef __USE_ATFILE /* Similar to `open' but a relative path name is interpreted relative to the directory for which FD is a descriptor. NOTE: some other `openat' implementation support additional functionality through this interface, especially using the O_XATTR flag. This is not yet supported here. This function is a cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int openat (int __fd, const char *__file, int __oflag, ...) __nonnull ((2)); # else # ifdef __REDIRECT extern int __REDIRECT (openat, (int __fd, const char *__file, int __oflag, ...), openat64) __nonnull ((2)); # else # define openat openat64 # endif # endif # ifdef __USE_LARGEFILE64 extern int openat64 (int __fd, const char *__file, int __oflag, ...) __nonnull ((2)); # endif #endif /* Create and open FILE, with mode MODE. This takes an `int' MODE argument because that is what `mode_t' will be widened to. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int creat (const char *__file, mode_t __mode) __nonnull ((1)); #else # ifdef __REDIRECT extern int __REDIRECT (creat, (const char *__file, mode_t __mode), creat64) __nonnull ((1)); # else # define creat creat64 # endif #endif #ifdef __USE_LARGEFILE64 extern int creat64 (const char *__file, mode_t __mode) __nonnull ((1)); #endif #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \ && !defined __USE_POSIX)) /* NOTE: These declarations also appear in ; be sure to keep both files consistent. Some systems have them there and some here, and some software depends on the macros being defined without including both. */ /* `lockf' is a simpler interface to the locking facilities of `fcntl'. LEN is always relative to the current file position. The CMD argument is one of the following. */ # define F_ULOCK 0 /* Unlock a previously locked region. */ # define F_LOCK 1 /* Lock a region for exclusive use. */ # define F_TLOCK 2 /* Test and lock a region for exclusive use. */ # define F_TEST 3 /* Test a region for other processes locks. */ # ifndef __USE_FILE_OFFSET64 extern int lockf (int __fd, int __cmd, off_t __len); # else # ifdef __REDIRECT extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64); # else # define lockf lockf64 # endif # endif # ifdef __USE_LARGEFILE64 extern int lockf64 (int __fd, int __cmd, off64_t __len); # endif #endif #ifdef __USE_XOPEN2K /* Advice the system about the expected behaviour of the application with respect to the file associated with FD. */ # ifndef __USE_FILE_OFFSET64 extern int posix_fadvise (int __fd, off_t __offset, off_t __len, int __advise) __THROW; # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset, __off64_t __len, int __advise), posix_fadvise64); # else # define posix_fadvise posix_fadvise64 # endif # endif # ifdef __USE_LARGEFILE64 extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len, int __advise) __THROW; # endif /* Reserve storage for the data of the file associated with FD. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int posix_fallocate (int __fd, off_t __offset, off_t __len); # else # ifdef __REDIRECT extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset, __off64_t __len), posix_fallocate64); # else # define posix_fallocate posix_fallocate64 # endif # endif # ifdef __USE_LARGEFILE64 extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len); # endif #endif /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \ && defined __va_arg_pack_len # include #endif __END_DECLS #endif /* fcntl.h */ PKZAwLL cursesm.hnu[// * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** * Copyright (c) 1998-2012,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /**************************************************************************** * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ // $Id: cursesm.h,v 1.30 2014/08/09 22:06:18 Adam.Jiang Exp $ #ifndef NCURSES_CURSESM_H_incl #define NCURSES_CURSESM_H_incl 1 #include extern "C" { # include } // // ------------------------------------------------------------------------- // This wraps the ITEM type of // ------------------------------------------------------------------------- // class NCURSES_IMPEXP NCursesMenuItem { friend class NCursesMenu; protected: ITEM *item; inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) { if (err != E_OK) THROW(new NCursesMenuException (err)); } public: NCursesMenuItem (const char* p_name = NULL, const char* p_descript = NULL) : item(0) { item = p_name ? ::new_item (p_name, p_descript) : STATIC_CAST(ITEM*)(0); if (p_name && !item) OnError (E_SYSTEM_ERROR); } // Create an item. If you pass both parameters as NULL, a delimiting // item is constructed which can be used to terminate a list of // NCursesMenu objects. NCursesMenuItem& operator=(const NCursesMenuItem& rhs) { if (this != &rhs) { *this = rhs; } return *this; } NCursesMenuItem(const NCursesMenuItem& rhs) : item(0) { (void) rhs; } virtual ~NCursesMenuItem (); // Release the items memory inline const char* name () const { return ::item_name (item); } // Name of the item inline const char* description () const { return ::item_description (item); } // Description of the item inline int (index) (void) const { return ::item_index (item); } // Index of the item in an item array (or -1) inline void options_on (Item_Options opts) { OnError (::item_opts_on (item, opts)); } // Switch on the items options inline void options_off (Item_Options opts) { OnError (::item_opts_off (item, opts)); } // Switch off the item's option inline Item_Options options () const { return ::item_opts (item); } // Retrieve the items options inline void set_options (Item_Options opts) { OnError (::set_item_opts (item, opts)); } // Set the items options inline void set_value (bool f) { OnError (::set_item_value (item,f)); } // Set/Reset the items selection state inline bool value () const { return ::item_value (item); } // Retrieve the items selection state inline bool visible () const { return ::item_visible (item); } // Retrieve visibility of the item virtual bool action(); // Perform an action associated with this item; you may use this in an // user supplied driver for a menu; you may derive from this class and // overload action() to supply items with different actions. // If an action returns true, the menu will be exited. The default action // is to do nothing. }; // Prototype for an items callback function. typedef bool ITEMCALLBACK(NCursesMenuItem&); // If you don't like to create a child class for individual items to // overload action(), you may use this class and provide a callback // function pointer for items. class NCURSES_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem { private: ITEMCALLBACK* p_fct; public: NCursesMenuCallbackItem(ITEMCALLBACK* fct = NULL, const char* p_name = NULL, const char* p_descript = NULL ) : NCursesMenuItem (p_name, p_descript), p_fct (fct) { } NCursesMenuCallbackItem& operator=(const NCursesMenuCallbackItem& rhs) { if (this != &rhs) { *this = rhs; } return *this; } NCursesMenuCallbackItem(const NCursesMenuCallbackItem& rhs) : NCursesMenuItem(rhs), p_fct(0) { } virtual ~NCursesMenuCallbackItem(); bool action(); }; // This are the built-in hook functions in this C++ binding. In C++ we use // virtual member functions (see below On_..._Init and On_..._Termination) // to provide this functionality in an object oriented manner. extern "C" { void _nc_xx_mnu_init(MENU *); void _nc_xx_mnu_term(MENU *); void _nc_xx_itm_init(MENU *); void _nc_xx_itm_term(MENU *); } // // ------------------------------------------------------------------------- // This wraps the MENU type of // ------------------------------------------------------------------------- // class NCURSES_IMPEXP NCursesMenu : public NCursesPanel { protected: MENU *menu; private: NCursesWindow* sub; // the subwindow object bool b_sub_owner; // is this our own subwindow? bool b_framed; // has the menu a border? bool b_autoDelete; // Delete items when deleting menu? NCursesMenuItem** my_items; // The array of items for this menu // This structure is used for the menu's user data field to link the // MENU* to the C++ object and to provide extra space for a user pointer. typedef struct { void* m_user; // the pointer for the user's data const NCursesMenu* m_back; // backward pointer to C++ object const MENU* m_owner; } UserHook; // Get the backward pointer to the C++ object from a MENU static inline NCursesMenu* getHook(const MENU *m) { UserHook* hook = STATIC_CAST(UserHook*)(::menu_userptr(m)); assert(hook != 0 && hook->m_owner==m); return const_cast(hook->m_back); } friend void _nc_xx_mnu_init(MENU *); friend void _nc_xx_mnu_term(MENU *); friend void _nc_xx_itm_init(MENU *); friend void _nc_xx_itm_term(MENU *); // Calculate ITEM* array for the menu ITEM** mapItems(NCursesMenuItem* nitems[]); protected: // internal routines inline void set_user(void *user) { UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu)); assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu); uptr->m_user = user; } inline void *get_user() { UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu)); assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu); return uptr->m_user; } void InitMenu (NCursesMenuItem* menu[], bool with_frame, bool autoDeleteItems); inline void OnError (int err) const THROW2(NCursesException const, NCursesMenuException) { if (err != E_OK) THROW(new NCursesMenuException (this, err)); } // this wraps the menu_driver call. virtual int driver (int c) ; // 'Internal' constructor to create a menu without association to // an array of items. NCursesMenu( int nlines, int ncols, int begin_y = 0, int begin_x = 0) : NCursesPanel(nlines,ncols,begin_y,begin_x), menu (STATIC_CAST(MENU*)(0)), sub(0), b_sub_owner(0), b_framed(0), b_autoDelete(0), my_items(0) { } public: // Make a full window size menu NCursesMenu (NCursesMenuItem* Items[], bool with_frame=FALSE, // Reserve space for a frame? bool autoDelete_Items=FALSE) // Autocleanup of Items? : NCursesPanel(), menu(0), sub(0), b_sub_owner(0), b_framed(0), b_autoDelete(0), my_items(0) { InitMenu(Items, with_frame, autoDelete_Items); } // Make a menu with a window of this size. NCursesMenu (NCursesMenuItem* Items[], int nlines, int ncols, int begin_y = 0, int begin_x = 0, bool with_frame=FALSE, // Reserve space for a frame? bool autoDelete_Items=FALSE) // Autocleanup of Items? : NCursesPanel(nlines, ncols, begin_y, begin_x), menu(0), sub(0), b_sub_owner(0), b_framed(0), b_autoDelete(0), my_items(0) { InitMenu(Items, with_frame, autoDelete_Items); } NCursesMenu& operator=(const NCursesMenu& rhs) { if (this != &rhs) { *this = rhs; NCursesPanel::operator=(rhs); } return *this; } NCursesMenu(const NCursesMenu& rhs) : NCursesPanel(rhs), menu(rhs.menu), sub(rhs.sub), b_sub_owner(rhs.b_sub_owner), b_framed(rhs.b_framed), b_autoDelete(rhs.b_autoDelete), my_items(rhs.my_items) { } virtual ~NCursesMenu (); // Retrieve the menus subwindow inline NCursesWindow& subWindow() const { assert(sub!=NULL); return *sub; } // Set the menus subwindow void setSubWindow(NCursesWindow& sub); // Set these items for the menu inline void setItems(NCursesMenuItem* Items[]) { OnError(::set_menu_items(menu,mapItems(Items))); } // Remove the menu from the screen inline void unpost (void) { OnError (::unpost_menu (menu)); } // Post the menu to the screen if flag is true, unpost it otherwise inline void post(bool flag = TRUE) { flag ? OnError (::post_menu(menu)) : OnError (::unpost_menu (menu)); } // Get the numer of rows and columns for this menu inline void scale (int& mrows, int& mcols) const { OnError (::scale_menu (menu, &mrows, &mcols)); } // Set the format of this menu inline void set_format(int mrows, int mcols) { OnError (::set_menu_format(menu, mrows, mcols)); } // Get the format of this menu inline void menu_format(int& rows,int& ncols) { ::menu_format(menu,&rows,&ncols); } // Items of the menu inline NCursesMenuItem* items() const { return *my_items; } // Get the number of items in this menu inline int count() const { return ::item_count(menu); } // Get the current item (i.e. the one the cursor is located) inline NCursesMenuItem* current_item() const { return my_items[::item_index(::current_item(menu))]; } // Get the marker string inline const char* mark() const { return ::menu_mark(menu); } // Set the marker string inline void set_mark(const char *marker) { OnError (::set_menu_mark (menu, marker)); } // Get the name of the request code c inline static const char* request_name(int c) { return ::menu_request_name(c); } // Get the current pattern inline char* pattern() const { return ::menu_pattern(menu); } // true if there is a pattern match, false otherwise. bool set_pattern (const char *pat); // set the default attributes for the menu // i.e. set fore, back and grey attribute virtual void setDefaultAttributes(); // Get the menus background attributes inline chtype back() const { return ::menu_back(menu); } // Get the menus foreground attributes inline chtype fore() const { return ::menu_fore(menu); } // Get the menus grey attributes (used for unselectable items) inline chtype grey() const { return ::menu_grey(menu); } // Set the menus background attributes inline chtype set_background(chtype a) { return ::set_menu_back(menu,a); } // Set the menus foreground attributes inline chtype set_foreground(chtype a) { return ::set_menu_fore(menu,a); } // Set the menus grey attributes (used for unselectable items) inline chtype set_grey(chtype a) { return ::set_menu_grey(menu,a); } inline void options_on (Menu_Options opts) { OnError (::menu_opts_on (menu,opts)); } inline void options_off(Menu_Options opts) { OnError (::menu_opts_off(menu,opts)); } inline Menu_Options options() const { return ::menu_opts(menu); } inline void set_options (Menu_Options opts) { OnError (::set_menu_opts (menu,opts)); } inline int pad() const { return ::menu_pad(menu); } inline void set_pad (int padch) { OnError (::set_menu_pad (menu, padch)); } // Position the cursor to the current item inline void position_cursor () const { OnError (::pos_menu_cursor (menu)); } // Set the current item inline void set_current(NCursesMenuItem& I) { OnError (::set_current_item(menu, I.item)); } // Get the current top row of the menu inline int top_row (void) const { return ::top_row (menu); } // Set the current top row of the menu inline void set_top_row (int row) { OnError (::set_top_row (menu, row)); } // spacing control // Set the spacing for the menu inline void setSpacing(int spc_description, int spc_rows, int spc_columns) { OnError(::set_menu_spacing(menu, spc_description, spc_rows, spc_columns)); } // Get the spacing info for the menu inline void Spacing(int& spc_description, int& spc_rows, int& spc_columns) const { OnError(::menu_spacing(menu, &spc_description, &spc_rows, &spc_columns)); } // Decorations inline void frame(const char *title=NULL, const char* btitle=NULL) { if (b_framed) NCursesPanel::frame(title,btitle); else OnError(E_SYSTEM_ERROR); } inline void boldframe(const char *title=NULL, const char* btitle=NULL) { if (b_framed) NCursesPanel::boldframe(title,btitle); else OnError(E_SYSTEM_ERROR); } inline void label(const char *topLabel, const char *bottomLabel) { if (b_framed) NCursesPanel::label(topLabel,bottomLabel); else OnError(E_SYSTEM_ERROR); } // ----- // Hooks // ----- // Called after the menu gets repositioned in its window. // This is especially true if the menu is posted. virtual void On_Menu_Init(); // Called before the menu gets repositioned in its window. // This is especially true if the menu is unposted. virtual void On_Menu_Termination(); // Called after the item became the current item virtual void On_Item_Init(NCursesMenuItem& item); // Called before this item is left as current item. virtual void On_Item_Termination(NCursesMenuItem& item); // Provide a default key virtualization. Translate the keyboard // code c into a menu request code. // The default implementation provides a hopefully straightforward // mapping for the most common keystrokes and menu requests. virtual int virtualize(int c); // Operators inline NCursesMenuItem* operator[](int i) const { if ( (i < 0) || (i >= ::item_count (menu)) ) OnError (E_BAD_ARGUMENT); return (my_items[i]); } // Perform the menu's operation // Return the item where you left the selection mark for a single // selection menu, or NULL for a multivalued menu. virtual NCursesMenuItem* operator()(void); // -------------------- // Exception handlers // Called by operator() // -------------------- // Called if the request is denied virtual void On_Request_Denied(int c) const; // Called if the item is not selectable virtual void On_Not_Selectable(int c) const; // Called if pattern doesn't match virtual void On_No_Match(int c) const; // Called if the command is unknown virtual void On_Unknown_Command(int c) const; }; // // ------------------------------------------------------------------------- // This is the typical C++ typesafe way to allow to attach // user data to an item of a menu. Its assumed that the user // data belongs to some class T. Use T as template argument // to create a UserItem. // ------------------------------------------------------------------------- // template class NCURSES_IMPEXP NCursesUserItem : public NCursesMenuItem { public: NCursesUserItem (const char* p_name, const char* p_descript = NULL, const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesMenuItem (p_name, p_descript) { if (item) OnError (::set_item_userptr (item, const_cast(reinterpret_cast(p_UserData)))); } virtual ~NCursesUserItem() {} inline const T* UserData (void) const { return reinterpret_cast(::item_userptr (item)); }; inline virtual void setUserData(const T* p_UserData) { if (item) OnError (::set_item_userptr (item, const_cast(reinterpret_cast(p_UserData)))); } }; // // ------------------------------------------------------------------------- // The same mechanism is used to attach user data to a menu // ------------------------------------------------------------------------- // template class NCURSES_IMPEXP NCursesUserMenu : public NCursesMenu { protected: NCursesUserMenu( int nlines, int ncols, int begin_y = 0, int begin_x = 0, const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesMenu(nlines,ncols,begin_y,begin_x) { if (menu) set_user (const_cast(reinterpret_cast(p_UserData))); } public: NCursesUserMenu (NCursesMenuItem* Items[], const T* p_UserData = STATIC_CAST(T*)(0), bool with_frame=FALSE, bool autoDelete_Items=FALSE) : NCursesMenu (Items, with_frame, autoDelete_Items) { if (menu) set_user (const_cast(reinterpret_cast(p_UserData))); }; NCursesUserMenu (NCursesMenuItem* Items[], int nlines, int ncols, int begin_y = 0, int begin_x = 0, const T* p_UserData = STATIC_CAST(T*)(0), bool with_frame=FALSE) : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) { if (menu) set_user (const_cast(reinterpret_cast(p_UserData))); }; virtual ~NCursesUserMenu() { }; inline T* UserData (void) { return reinterpret_cast(get_user ()); }; inline virtual void setUserData (const T* p_UserData) { if (menu) set_user (const_cast(reinterpret_cast(p_UserData))); } }; #endif /* NCURSES_CURSESM_H_incl */ PKZ tiffio.hxxnu[/* $Id: tiffio.hxx,v 1.3 2010-06-08 18:55:15 bfriesen Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Sam Leffler and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Sam Leffler and Silicon Graphics. * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef _TIFFIO_HXX_ #define _TIFFIO_HXX_ /* * TIFF I/O library definitions which provide C++ streams API. */ #include #include "tiff.h" extern TIFF* TIFFStreamOpen(const char*, std::ostream *); extern TIFF* TIFFStreamOpen(const char*, std::istream *); #endif /* _TIFFIO_HXX_ */ /* vim: set ts=8 sts=8 sw=8 noet: */ /* * Local Variables: * mode: c++ * c-basic-offset: 8 * fill-column: 78 * End: */ PKZ-Xþ>> features.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FEATURES_H #define _FEATURES_H 1 /* These are defined by the user (or the compiler) to specify the desired environment: __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010. __STDC_WANT_IEC_60559_BFP_EXT__ Extensions to ISO C11 from TS 18661-1:2014. __STDC_WANT_IEC_60559_FUNCS_EXT__ Extensions to ISO C11 from TS 18661-4:2015. __STDC_WANT_IEC_60559_TYPES_EXT__ Extensions to ISO C11 from TS 18661-3:2015. _POSIX_SOURCE IEEE Std 1003.1. _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; if >=199309L, add IEEE Std 1003.1b-1993; if >=199506L, add IEEE Std 1003.1c-1995; if >=200112L, all of IEEE 1003.1-2004 if >=200809L, all of IEEE 1003.1-2008 _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if Single Unix conformance is wanted, to 600 for the sixth revision, to 700 for the seventh revision. _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. _LARGEFILE_SOURCE Some more functions for correct standard I/O. _LARGEFILE64_SOURCE Additional functionality from LFS for large files. _FILE_OFFSET_BITS=N Select default filesystem interface. _ATFILE_SOURCE Additional *at interfaces. _GNU_SOURCE All of the above, plus GNU extensions. _DEFAULT_SOURCE The default set of features (taking precedence over __STRICT_ANSI__). _FORTIFY_SOURCE Add security hardening to many library functions. Set to 1 or 2; 2 performs stricter checks than 1. _REENTRANT, _THREAD_SAFE Obsolete; equivalent to _POSIX_C_SOURCE=199506L. The `-ansi' switch to the GNU C compiler, and standards conformance options such as `-std=c99', define __STRICT_ANSI__. If none of these are defined, or if _DEFAULT_SOURCE is defined, the default is to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 200809L, as well as enabling miscellaneous functions from BSD and SVID. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. These are defined by this file and are used by the header files to decide what to declare or define: __GLIBC_USE (F) Define things from feature set F. This is defined to 1 or 0; the subsequent macros are either defined or undefined, and those tests should be moved to __GLIBC_USE. __USE_ISOC11 Define ISO C11 things. __USE_ISOC99 Define ISO C99 things. __USE_ISOC95 Define ISO C90 AMD1 (C95) things. __USE_ISOCXX11 Define ISO C++11 things. __USE_POSIX Define IEEE Std 1003.1 things. __USE_POSIX2 Define IEEE Std 1003.2 things. __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. __USE_XOPEN Define XPG things. __USE_XOPEN_EXTENDED Define X/Open Unix things. __USE_UNIX98 Define Single Unix V2 things. __USE_XOPEN2K Define XPG6 things. __USE_XOPEN2KXSI Define XPG6 XSI things. __USE_XOPEN2K8 Define XPG7 things. __USE_XOPEN2K8XSI Define XPG7 XSI things. __USE_LARGEFILE Define correct standard I/O things. __USE_LARGEFILE64 Define LFS things with separate names. __USE_FILE_OFFSET64 Define 64bit interface as default. __USE_MISC Define things from 4.3BSD or System V Unix. __USE_ATFILE Define *at interfaces and AT_* constants for them. __USE_GNU Define GNU extensions. __USE_FORTIFY_LEVEL Additional security measures used, according to level. The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are defined by this file unconditionally. `__GNU_LIBRARY__' is provided only for compatibility. All new code should use the other symbols to test for features. All macros listed above as possibly being defined by this file are explicitly undefined if they are not explicitly defined. Feature-test macros that are not defined by the user or compiler but are implied by the other feature-test macros defined (or by the lack of any definitions) are defined by the file. ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included, and so they are handled in , which does not have a multiple include guard. Feature test macros that can be handled from the first system header included are handled here. */ /* Undefine everything, so we get a clean slate. */ #undef __USE_ISOC11 #undef __USE_ISOC99 #undef __USE_ISOC95 #undef __USE_ISOCXX11 #undef __USE_POSIX #undef __USE_POSIX2 #undef __USE_POSIX199309 #undef __USE_POSIX199506 #undef __USE_XOPEN #undef __USE_XOPEN_EXTENDED #undef __USE_UNIX98 #undef __USE_XOPEN2K #undef __USE_XOPEN2KXSI #undef __USE_XOPEN2K8 #undef __USE_XOPEN2K8XSI #undef __USE_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_MISC #undef __USE_ATFILE #undef __USE_GNU #undef __USE_FORTIFY_LEVEL #undef __KERNEL_STRICT_NAMES #undef __GLIBC_USE_DEPRECATED_GETS /* Suppress kernel-name space pollution unless user expressedly asks for it. */ #ifndef _LOOSE_KERNEL_NAMES # define __KERNEL_STRICT_NAMES #endif /* Convenience macro to test the version of gcc. Use like this: #if __GNUC_PREREQ (2,8) ... code requiring gcc 2.8 or later ... #endif Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was added in 2.0. */ #if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else # define __GNUC_PREREQ(maj, min) 0 #endif /* Similarly for clang. Features added to GCC after version 4.2 may or may not also be available in clang, and clang's definitions of __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such features can be queried via __has_extension/__has_feature. */ #if defined __clang_major__ && defined __clang_minor__ # define __glibc_clang_prereq(maj, min) \ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min)) #else # define __glibc_clang_prereq(maj, min) 0 #endif /* Whether to use feature set F. */ #define __GLIBC_USE(F) __GLIBC_USE_ ## F /* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not issue a warning; the expectation is that the source is being transitioned to use the new macro. */ #if (defined _BSD_SOURCE || defined _SVID_SOURCE) \ && !defined _DEFAULT_SOURCE # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #ifdef _GNU_SOURCE # undef _ISOC95_SOURCE # define _ISOC95_SOURCE 1 # undef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 # undef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L # undef _XOPEN_SOURCE # define _XOPEN_SOURCE 700 # undef _XOPEN_SOURCE_EXTENDED # define _XOPEN_SOURCE_EXTENDED 1 # undef _LARGEFILE64_SOURCE # define _LARGEFILE64_SOURCE 1 # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif /* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, define _DEFAULT_SOURCE. */ #if (defined _DEFAULT_SOURCE \ || (!defined __STRICT_ANSI__ \ && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \ && !defined _XOPEN_SOURCE)) # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif /* This is to enable the ISO C11 extension. */ #if (defined _ISOC11_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) # define __USE_ISOC11 1 #endif /* This is to enable the ISO C99 extension. */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) # define __USE_ISOC99 1 #endif /* This is to enable the ISO C90 Amendment 1:1995 extension. */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) # define __USE_ISOC95 1 #endif #ifdef __cplusplus /* This is to enable compatibility for ISO C++17. */ # if __cplusplus >= 201703L # define __USE_ISOC11 1 # endif /* This is to enable compatibility for ISO C++11. Check the temporary macro for now, too. */ # if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__ # define __USE_ISOCXX11 1 # define __USE_ISOC99 1 # endif #endif /* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE is defined, use POSIX.1-2008 (or another version depending on _XOPEN_SOURCE). */ #ifdef _DEFAULT_SOURCE # if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE # define __USE_POSIX_IMPLICITLY 1 # endif # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L #endif #if ((!defined __STRICT_ANSI__ \ || (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)) \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE) # define _POSIX_SOURCE 1 # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 # define _POSIX_C_SOURCE 2 # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600 # define _POSIX_C_SOURCE 199506L # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700 # define _POSIX_C_SOURCE 200112L # else # define _POSIX_C_SOURCE 200809L # endif # define __USE_POSIX_IMPLICITLY 1 #endif /* Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be defined in all multithreaded code. GNU libc has not required this for many years. We now treat them as compatibility synonyms for _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with comprehensive support for multithreaded code. Using them never lowers the selected level of POSIX conformance, only raises it. */ #if ((!defined _POSIX_C_SOURCE || (_POSIX_C_SOURCE - 0) < 199506L) \ && (defined _REENTRANT || defined _THREAD_SAFE)) # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 199506L #endif #if (defined _POSIX_SOURCE \ || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1) \ || defined _XOPEN_SOURCE) # define __USE_POSIX 1 #endif #if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE # define __USE_POSIX2 1 #endif #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L # define __USE_POSIX199309 1 #endif #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L # define __USE_POSIX199506 1 #endif #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L # define __USE_XOPEN2K 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 #endif #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L # define __USE_XOPEN2K8 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif #ifdef _XOPEN_SOURCE # define __USE_XOPEN 1 # if (_XOPEN_SOURCE - 0) >= 500 # define __USE_XOPEN_EXTENDED 1 # define __USE_UNIX98 1 # undef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # if (_XOPEN_SOURCE - 0) >= 600 # if (_XOPEN_SOURCE - 0) >= 700 # define __USE_XOPEN2K8 1 # define __USE_XOPEN2K8XSI 1 # endif # define __USE_XOPEN2K 1 # define __USE_XOPEN2KXSI 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 # endif # else # ifdef _XOPEN_SOURCE_EXTENDED # define __USE_XOPEN_EXTENDED 1 # endif # endif #endif #ifdef _LARGEFILE_SOURCE # define __USE_LARGEFILE 1 #endif #ifdef _LARGEFILE64_SOURCE # define __USE_LARGEFILE64 1 #endif #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 # define __USE_FILE_OFFSET64 1 #endif #if defined _DEFAULT_SOURCE # define __USE_MISC 1 #endif #ifdef _ATFILE_SOURCE # define __USE_ATFILE 1 #endif #ifdef _GNU_SOURCE # define __USE_GNU 1 #endif #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 # if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0 # warning _FORTIFY_SOURCE requires compiling with optimization (-O) # elif !__GNUC_PREREQ (4, 1) # warning _FORTIFY_SOURCE requires GCC 4.1 or later # elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \ || __GNUC_PREREQ (12, 0)) # if _FORTIFY_SOURCE > 3 # warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform # endif # define __USE_FORTIFY_LEVEL 3 # elif _FORTIFY_SOURCE > 1 # if _FORTIFY_SOURCE > 2 # warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform # endif # define __USE_FORTIFY_LEVEL 2 # else # define __USE_FORTIFY_LEVEL 1 # endif #endif #ifndef __USE_FORTIFY_LEVEL # define __USE_FORTIFY_LEVEL 0 #endif /* The function 'gets' existed in C89, but is impossible to use safely. It has been removed from ISO C11 and ISO C++14. Note: for compatibility with various implementations of , this test must consider only the value of __cplusplus when compiling C++. */ #if defined __cplusplus ? __cplusplus >= 201402L : defined __USE_ISOC11 # define __GLIBC_USE_DEPRECATED_GETS 0 #else # define __GLIBC_USE_DEPRECATED_GETS 1 #endif /* Get definitions of __STDC_* predefined macros, if the compiler has not preincluded this header automatically. */ #include /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now on. The use of this variable is deprecated. Use __GLIBC__ and __GLIBC_MINOR__ now (see below) when you want to test for a specific GNU C library version and use the values in to get the sonames of the shared libraries. */ #undef __GNU_LIBRARY__ #define __GNU_LIBRARY__ 6 /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 #define __GLIBC_MINOR__ 28 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) /* This is here only because every header file already includes this one. */ #ifndef __ASSEMBLER__ # ifndef _SYS_CDEFS_H # include # endif /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ # if defined __USE_FILE_OFFSET64 && !defined __REDIRECT # define __USE_LARGEFILE 1 # define __USE_LARGEFILE64 1 # endif #endif /* !ASSEMBLER */ /* Decide whether we can define 'extern inline' functions in headers. */ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \ && defined __extern_inline # define __USE_EXTERN_INLINES 1 #endif /* This is here only because every header file already includes this one. Get the definitions of all the appropriate `__stub_FUNCTION' symbols. contains `#define __stub_FUNCTION' when FUNCTION is a stub that will always return failure (and set errno to ENOSYS). */ #include #endif /* features.h */ PKZ+Ŕ event.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT1_EVENT_H_INCLUDED_ #define EVENT1_EVENT_H_INCLUDED_ /** @file event.h A library for writing event-driven network servers. The header is deprecated in Libevent 2.0 and later; please use instead. Depending on what functionality you need, you may also want to include more of the other event2/ headers. */ #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif #ifdef EVENT__HAVE_STDINT_H #include #endif #include /* For int types. */ #include #ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include #include #undef WIN32_LEAN_AND_MEAN #endif #include #include #include #include #include #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* EVENT1_EVENT_H_INCLUDED_ */ PKZB_X execinfo.hnu[/* Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _EXECINFO_H #define _EXECINFO_H 1 #include __BEGIN_DECLS /* Store up to SIZE return address of the current program state in ARRAY and return the exact number of values stored. */ extern int backtrace (void **__array, int __size) __nonnull ((1)); /* Return names of functions from the backtrace list in ARRAY in a newly malloc()ed memory block. */ extern char **backtrace_symbols (void *const *__array, int __size) __THROW __nonnull ((1)); /* This function is similar to backtrace_symbols() but it writes the result immediately to a file. */ extern void backtrace_symbols_fd (void *const *__array, int __size, int __fd) __THROW __nonnull ((1)); __END_DECLS #endif /* execinfo.h */ PKZ4w   monetary.hnu[/* Header file for monetary value formatting functions. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MONETARY_H #define _MONETARY_H 1 #include /* Get needed types. */ #define __need_size_t #include #include #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif __BEGIN_DECLS /* Formatting a monetary value according to the current locale. */ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize, const char *__restrict __format, ...) __THROW __attribute_format_strfmon__ (3, 4); #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ # include /* Formatting a monetary value according to the given locale. */ extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize, locale_t __loc, const char *__restrict __format, ...) __THROW __attribute_format_strfmon__ (4, 5); #endif #ifdef __LDBL_COMPAT # include #endif __END_DECLS #endif /* monetary.h */ PKZ  pcap-namedb.hnu[/* * Copyright (c) 1994, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * For backwards compatibility. * * Note to OS vendors: do NOT get rid of this file! Some applications * might expect to be able to include . */ #include PKZhv#""krad.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2013 Red Hat, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This API is not considered as stable as the main krb5 API. * * - We may make arbitrary incompatible changes between feature releases * (e.g. from 1.12 to 1.13). * - We will make some effort to avoid making incompatible changes for * bugfix releases, but will make them if necessary. */ #ifndef KRAD_H_ #define KRAD_H_ #include #include #include #include #define KRAD_PACKET_SIZE_MAX 4096 #define KRAD_SERVICE_TYPE_LOGIN 1 #define KRAD_SERVICE_TYPE_FRAMED 2 #define KRAD_SERVICE_TYPE_CALLBACK_LOGIN 3 #define KRAD_SERVICE_TYPE_CALLBACK_FRAMED 4 #define KRAD_SERVICE_TYPE_OUTBOUND 5 #define KRAD_SERVICE_TYPE_ADMINISTRATIVE 6 #define KRAD_SERVICE_TYPE_NAS_PROMPT 7 #define KRAD_SERVICE_TYPE_AUTHENTICATE_ONLY 8 #define KRAD_SERVICE_TYPE_CALLBACK_NAS_PROMPT 9 #define KRAD_SERVICE_TYPE_CALL_CHECK 10 #define KRAD_SERVICE_TYPE_CALLBACK_ADMINISTRATIVE 11 typedef struct krad_attrset_st krad_attrset; typedef struct krad_packet_st krad_packet; typedef struct krad_client_st krad_client; typedef unsigned char krad_code; typedef unsigned char krad_attr; /* Called when a response is received or the request times out. */ typedef void (*krad_cb)(krb5_error_code retval, const krad_packet *request, const krad_packet *response, void *data); /* * Called to iterate over a set of requests. Either the callback will be * called until it returns NULL, or it will be called with cancel = TRUE to * terminate in the middle of an iteration. */ typedef const krad_packet * (*krad_packet_iter_cb)(void *data, krb5_boolean cancel); /* * Code */ /* Convert a code name to its number. Only works for codes defined * by RFC 2875 or 2882. Returns 0 if the name was not found. */ krad_code krad_code_name2num(const char *name); /* Convert a code number to its name. Only works for attributes defined * by RFC 2865 or 2882. Returns NULL if the name was not found. */ const char * krad_code_num2name(krad_code code); /* * Attribute */ /* Convert an attribute name to its number. Only works for attributes defined * by RFC 2865. Returns 0 if the name was not found. */ krad_attr krad_attr_name2num(const char *name); /* Convert an attribute number to its name. Only works for attributes defined * by RFC 2865. Returns NULL if the name was not found. */ const char * krad_attr_num2name(krad_attr type); /* * Attribute set */ /* Create a new attribute set. */ krb5_error_code krad_attrset_new(krb5_context ctx, krad_attrset **set); /* Create a deep copy of an attribute set. */ krb5_error_code krad_attrset_copy(const krad_attrset *set, krad_attrset **copy); /* Free an attribute set. */ void krad_attrset_free(krad_attrset *set); /* Add an attribute to a set. */ krb5_error_code krad_attrset_add(krad_attrset *set, krad_attr type, const krb5_data *data); /* Add a four-octet unsigned number attribute to the given set. */ krb5_error_code krad_attrset_add_number(krad_attrset *set, krad_attr type, krb5_ui_4 num); /* Delete the specified attribute. */ void krad_attrset_del(krad_attrset *set, krad_attr type, size_t indx); /* Get the specified attribute. */ const krb5_data * krad_attrset_get(const krad_attrset *set, krad_attr type, size_t indx); /* * Packet */ /* Determine the bytes needed from the socket to get the whole packet. Don't * cache the return value as it can change! Returns -1 on EBADMSG. */ ssize_t krad_packet_bytes_needed(const krb5_data *buffer); /* Free a packet. */ void krad_packet_free(krad_packet *pkt); /* * Create a new request packet. * * This function takes the attributes specified in set and converts them into a * radius packet. The packet will have a randomized id. If cb is not NULL, it * will be called passing data as the argument to iterate over a set of * outstanding requests. In this case, the id will be both random and unique * across the set of requests. */ krb5_error_code krad_packet_new_request(krb5_context ctx, const char *secret, krad_code code, const krad_attrset *set, krad_packet_iter_cb cb, void *data, krad_packet **request); /* * Create a new response packet. * * This function is similar to krad_packet_new_requst() except that it crafts a * packet in response to a request packet. This new packet will borrow values * from the request such as the id and the authenticator. */ krb5_error_code krad_packet_new_response(krb5_context ctx, const char *secret, krad_code code, const krad_attrset *set, const krad_packet *request, krad_packet **response); /* * Decode a request radius packet from krb5_data. * * The resulting decoded packet will be a request packet stored in *reqpkt. * * If cb is NULL, *duppkt will always be NULL. * * If cb is not NULL, it will be called (with the data argument) to iterate * over a set of requests currently being processed. In this case, if the * packet is a duplicate of an already received request, the original request * will be set in *duppkt. */ krb5_error_code krad_packet_decode_request(krb5_context ctx, const char *secret, const krb5_data *buffer, krad_packet_iter_cb cb, void *data, const krad_packet **duppkt, krad_packet **reqpkt); /* * Decode a response radius packet from krb5_data. * * The resulting decoded packet will be a response packet stored in *rsppkt. * * If cb is NULL, *reqpkt will always be NULL. * * If cb is not NULL, it will be called (with the data argument) to iterate * over a set of requests awaiting responses. In this case, if the response * packet matches one of these requests, the original request will be set in * *reqpkt. */ krb5_error_code krad_packet_decode_response(krb5_context ctx, const char *secret, const krb5_data *buffer, krad_packet_iter_cb cb, void *data, const krad_packet **reqpkt, krad_packet **rsppkt); /* Encode packet. */ const krb5_data * krad_packet_encode(const krad_packet *pkt); /* Get the code for the given packet. */ krad_code krad_packet_get_code(const krad_packet *pkt); /* Get the specified attribute. */ const krb5_data * krad_packet_get_attr(const krad_packet *pkt, krad_attr type, size_t indx); /* * Client */ /* Create a new client. */ krb5_error_code krad_client_new(krb5_context kctx, verto_ctx *vctx, krad_client **client); /* Free the client. */ void krad_client_free(krad_client *client); /* * Send a request to a radius server. * * The remote host may be specified by one of the following formats: * - /path/to/unix.socket * - IPv4 * - IPv4:port * - IPv4:service * - [IPv6] * - [IPv6]:port * - [IPv6]:service * - hostname * - hostname:port * - hostname:service * * The timeout parameter (milliseconds) is the total timeout across all remote * hosts (when DNS returns multiple entries) and all retries. For stream * sockets, the retries parameter is ignored and no retries are performed. * * The cb function will be called with the data argument when either a response * is received or the request times out on all possible remote hosts. */ krb5_error_code krad_client_send(krad_client *rc, krad_code code, const krad_attrset *attrs, const char *remote, const char *secret, int timeout, size_t retries, krad_cb cb, void *data); #endif /* KRAD_H_ */ PKZk5i\printf.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _PRINTF_H #define _PRINTF_H 1 #include __BEGIN_DECLS #include #define __need_size_t #define __need_wchar_t #include #include struct printf_info { int prec; /* Precision. */ int width; /* Width. */ wchar_t spec; /* Format letter. */ unsigned int is_long_double:1;/* L flag. */ unsigned int is_short:1; /* h flag. */ unsigned int is_long:1; /* l flag. */ unsigned int alt:1; /* # flag. */ unsigned int space:1; /* Space flag. */ unsigned int left:1; /* - flag. */ unsigned int showsign:1; /* + flag. */ unsigned int group:1; /* ' flag. */ unsigned int extra:1; /* For special use. */ unsigned int is_char:1; /* hh flag. */ unsigned int wide:1; /* Nonzero for wide character streams. */ unsigned int i18n:1; /* I flag. */ unsigned int is_binary128:1; /* Floating-point argument is ABI-compatible with IEC 60559 binary128. */ unsigned int __pad:3; /* Unused so far. */ unsigned short int user; /* Bits for user-installed modifiers. */ wchar_t pad; /* Padding character. */ }; /* Type of a printf specifier-handler function. STREAM is the FILE on which to write output. INFO gives information about the format specification. ARGS is a vector of pointers to the argument data; the number of pointers will be the number returned by the associated arginfo function for the same INFO. The function should return the number of characters written, or -1 for errors. */ typedef int printf_function (FILE *__stream, const struct printf_info *__info, const void *const *__args); /* Type of a printf specifier-arginfo function. INFO gives information about the format specification. N, ARGTYPES, *SIZE has to contain the size of the parameter for user-defined types, and return value are as for parse_printf_format except that -1 should be returned if the handler cannot handle this case. This allows to partially overwrite the functionality of existing format specifiers. */ typedef int printf_arginfo_size_function (const struct printf_info *__info, size_t __n, int *__argtypes, int *__size); /* Old version of 'printf_arginfo_function' without a SIZE parameter. */ typedef int printf_arginfo_function (const struct printf_info *__info, size_t __n, int *__argtypes); /* Type of a function to get a value of a user-defined from the variable argument list. */ typedef void printf_va_arg_function (void *__mem, va_list *__ap); /* Register FUNC to be called to format SPEC specifiers; ARGINFO must be specified to determine how many arguments a SPEC conversion requires and what their types are. */ extern int register_printf_specifier (int __spec, printf_function __func, printf_arginfo_size_function __arginfo) __THROW; /* Obsolete interface similar to register_printf_specifier. It can only handle basic data types because the ARGINFO callback does not return information on the size of the user-defined type. */ extern int register_printf_function (int __spec, printf_function __func, printf_arginfo_function __arginfo) __THROW __attribute_deprecated__; /* Register a new modifier character sequence. If the call succeeds it returns a positive value representing the bit set in the USER field in 'struct printf_info'. */ extern int register_printf_modifier (const wchar_t *__str) __THROW __wur; /* Register variable argument handler for user type. The return value is to be used in ARGINFO functions to signal the use of the type. */ extern int register_printf_type (printf_va_arg_function __fct) __THROW __wur; /* Parse FMT, and fill in N elements of ARGTYPES with the types needed for the conversions FMT specifies. Returns the number of arguments required by FMT. The ARGINFO function registered with a user-defined format is passed a `struct printf_info' describing the format spec being parsed. A width or precision of INT_MIN means a `*' was used to indicate that the width/precision will come from an arg. The function should fill in the array it is passed with the types of the arguments it wants, and return the number of arguments it wants. */ extern size_t parse_printf_format (const char *__restrict __fmt, size_t __n, int *__restrict __argtypes) __THROW; /* Codes returned by `parse_printf_format' for basic types. These values cover all the standard format specifications. Users can reserve new values after PA_LAST for their own types using 'register_printf_type'. */ enum { /* C type: */ PA_INT, /* int */ PA_CHAR, /* int, cast to char */ PA_WCHAR, /* wide char */ PA_STRING, /* const char *, a '\0'-terminated string */ PA_WSTRING, /* const wchar_t *, wide character string */ PA_POINTER, /* void * */ PA_FLOAT, /* float */ PA_DOUBLE, /* double */ PA_LAST }; /* Flag bits that can be set in a type returned by `parse_printf_format'. */ #define PA_FLAG_MASK 0xff00 #define PA_FLAG_LONG_LONG (1 << 8) #define PA_FLAG_LONG_DOUBLE PA_FLAG_LONG_LONG #define PA_FLAG_LONG (1 << 9) #define PA_FLAG_SHORT (1 << 10) #define PA_FLAG_PTR (1 << 11) /* Function which can be registered as `printf'-handlers. */ /* Print floating point value using using abbreviations for the orders of magnitude used for numbers ('k' for kilo, 'm' for mega etc). If the format specifier is a uppercase character powers of 1000 are used. Otherwise powers of 1024. */ extern int printf_size (FILE *__restrict __fp, const struct printf_info *__info, const void *const *__restrict __args) __THROW; /* This is the appropriate argument information function for `printf_size'. */ extern int printf_size_info (const struct printf_info *__restrict __info, size_t __n, int *__restrict __argtypes) __THROW; #ifdef __LDBL_COMPAT # include #endif __END_DECLS #endif /* printf.h */ PKZ2 idn-free.hnu[/* idn-free.h --- Invoke the free function to release memory Copyright (C) 2004-2016 Simon Josefsson This file is part of GNU Libidn. GNU Libidn is free software: you can redistribute it and/or modify it under the terms of either: * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. or * the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. or both in parallel, as here. GNU Libidn is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received copies of the GNU General Public License and the GNU Lesser General Public License along with this program. If not, see . */ #ifndef IDN_FREE_H # define IDN_FREE_H # ifndef IDNAPI # if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY # define IDNAPI __attribute__((__visibility__("default"))) # elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC # define IDNAPI __declspec(dllexport) # elif defined _MSC_VER && ! defined LIBIDN_STATIC # define IDNAPI __declspec(dllimport) # else # define IDNAPI # endif # endif # ifdef __cplusplus extern "C" { # endif /* I don't recommend using this interface in general. Use `free'. * * I'm told Microsoft Windows may use one set of `malloc' and `free' * in a library, and another incompatible set in a statically compiled * application that link to the library, thus creating problems if the * application would invoke `free' on a pointer pointing to memory * allocated by the library. This motivated adding this function. * * The theory of isolating all memory allocations and de-allocations * within a code package (library) sounds good, to simplify hunting * down memory allocation related problems, but I'm not sure if it is * worth enough to motivate recommending this interface over calling * `free' directly, though. * * See the manual section 'Memory handling under Windows' for more * information. */ extern void IDNAPI idn_free (void *ptr); # ifdef __cplusplus } # endif #endif /* IDN_FREE_H */ PKZ^䙷RR netash/ash.hnu[/* Definitions for use with Linux AF_ASH sockets. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETASH_ASH_H #define _NETASH_ASH_H 1 #include #include struct sockaddr_ash { __SOCKADDR_COMMON (sash_); /* Common data: address family etc. */ int sash_ifindex; /* Interface to use. */ unsigned char sash_channel; /* Realtime or control. */ unsigned int sash_plen; unsigned char sash_prefix[16]; }; /* Values for `channel' member. */ #define ASH_CHANNEL_ANY 0 #define ASH_CHANNEL_CONTROL 1 #define ASH_CHANNEL_REALTIME 2 #endif /* netash/ash.h */ PKZ"  aio.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO/IEC 9945-1:1996 6.7: Asynchronous Input and Output */ #ifndef _AIO_H #define _AIO_H 1 #include #include #include #include #include __BEGIN_DECLS /* Asynchronous I/O control block. */ struct aiocb { int aio_fildes; /* File desriptor. */ int aio_lio_opcode; /* Operation to be performed. */ int aio_reqprio; /* Request priority offset. */ volatile void *aio_buf; /* Location of buffer. */ size_t aio_nbytes; /* Length of transfer. */ struct sigevent aio_sigevent; /* Signal number and value. */ /* Internal members. */ struct aiocb *__next_prio; int __abs_prio; int __policy; int __error_code; __ssize_t __return_value; #ifndef __USE_FILE_OFFSET64 __off_t aio_offset; /* File offset. */ char __pad[sizeof (__off64_t) - sizeof (__off_t)]; #else __off64_t aio_offset; /* File offset. */ #endif char __glibc_reserved[32]; }; /* The same for the 64bit offsets. Please note that the members aio_fildes to __return_value have to be the same in aiocb and aiocb64. */ #ifdef __USE_LARGEFILE64 struct aiocb64 { int aio_fildes; /* File desriptor. */ int aio_lio_opcode; /* Operation to be performed. */ int aio_reqprio; /* Request priority offset. */ volatile void *aio_buf; /* Location of buffer. */ size_t aio_nbytes; /* Length of transfer. */ struct sigevent aio_sigevent; /* Signal number and value. */ /* Internal members. */ struct aiocb *__next_prio; int __abs_prio; int __policy; int __error_code; __ssize_t __return_value; __off64_t aio_offset; /* File offset. */ char __glibc_reserved[32]; }; #endif #ifdef __USE_GNU /* To customize the implementation one can use the following struct. This implementation follows the one in Irix. */ struct aioinit { int aio_threads; /* Maximal number of threads. */ int aio_num; /* Number of expected simultanious requests. */ int aio_locks; /* Not used. */ int aio_usedba; /* Not used. */ int aio_debug; /* Not used. */ int aio_numusers; /* Not used. */ int aio_idle_time; /* Number of seconds before idle thread terminates. */ int aio_reserved; }; #endif /* Return values of cancelation function. */ enum { AIO_CANCELED, #define AIO_CANCELED AIO_CANCELED AIO_NOTCANCELED, #define AIO_NOTCANCELED AIO_NOTCANCELED AIO_ALLDONE #define AIO_ALLDONE AIO_ALLDONE }; /* Operation codes for `aio_lio_opcode'. */ enum { LIO_READ, #define LIO_READ LIO_READ LIO_WRITE, #define LIO_WRITE LIO_WRITE LIO_NOP #define LIO_NOP LIO_NOP }; /* Synchronization options for `lio_listio' function. */ enum { LIO_WAIT, #define LIO_WAIT LIO_WAIT LIO_NOWAIT #define LIO_NOWAIT LIO_NOWAIT }; /* Allow user to specify optimization. */ #ifdef __USE_GNU extern void aio_init (const struct aioinit *__init) __THROW __nonnull ((1)); #endif #ifndef __USE_FILE_OFFSET64 /* Enqueue read request for given number of bytes and the given priority. */ extern int aio_read (struct aiocb *__aiocbp) __THROW __nonnull ((1)); /* Enqueue write request for given number of bytes and the given priority. */ extern int aio_write (struct aiocb *__aiocbp) __THROW __nonnull ((1)); /* Initiate list of I/O requests. */ extern int lio_listio (int __mode, struct aiocb *const __list[__restrict_arr], int __nent, struct sigevent *__restrict __sig) __THROW __nonnull ((2)); /* Retrieve error status associated with AIOCBP. */ extern int aio_error (const struct aiocb *__aiocbp) __THROW __nonnull ((1)); /* Return status associated with AIOCBP. */ extern __ssize_t aio_return (struct aiocb *__aiocbp) __THROW __nonnull ((1)); /* Try to cancel asynchronous I/O requests outstanding against file descriptor FILDES. */ extern int aio_cancel (int __fildes, struct aiocb *__aiocbp) __THROW; /* Suspend calling thread until at least one of the asynchronous I/O operations referenced by LIST has completed. This function is a cancellation point and therefore not marked with __THROW. */ extern int aio_suspend (const struct aiocb *const __list[], int __nent, const struct timespec *__restrict __timeout) __nonnull ((1)); /* Force all operations associated with file desriptor described by `aio_fildes' member of AIOCBP. */ extern int aio_fsync (int __operation, struct aiocb *__aiocbp) __THROW __nonnull ((2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (aio_read, (struct aiocb *__aiocbp), aio_read64) __nonnull ((1)); extern int __REDIRECT_NTH (aio_write, (struct aiocb *__aiocbp), aio_write64) __nonnull ((1)); extern int __REDIRECT_NTH (lio_listio, (int __mode, struct aiocb *const __list[__restrict_arr], int __nent, struct sigevent *__restrict __sig), lio_listio64) __nonnull ((2)); extern int __REDIRECT_NTH (aio_error, (const struct aiocb *__aiocbp), aio_error64) __nonnull ((1)); extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp), aio_return64) __nonnull ((1)); extern int __REDIRECT_NTH (aio_cancel, (int __fildes, struct aiocb *__aiocbp), aio_cancel64); extern int __REDIRECT_NTH (aio_suspend, (const struct aiocb *const __list[], int __nent, const struct timespec *__restrict __timeout), aio_suspend64) __nonnull ((1)); extern int __REDIRECT_NTH (aio_fsync, (int __operation, struct aiocb *__aiocbp), aio_fsync64) __nonnull ((2)); # else # define aio_read aio_read64 # define aio_write aio_write64 # define lio_listio lio_listio64 # define aio_error aio_error64 # define aio_return aio_return64 # define aio_cancel aio_cancel64 # define aio_suspend aio_suspend64 # define aio_fsync aio_fsync64 # endif #endif #ifdef __USE_LARGEFILE64 extern int aio_read64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1)); extern int aio_write64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1)); extern int lio_listio64 (int __mode, struct aiocb64 *const __list[__restrict_arr], int __nent, struct sigevent *__restrict __sig) __THROW __nonnull ((2)); extern int aio_error64 (const struct aiocb64 *__aiocbp) __THROW __nonnull ((1)); extern __ssize_t aio_return64 (struct aiocb64 *__aiocbp) __THROW __nonnull ((1)); extern int aio_cancel64 (int __fildes, struct aiocb64 *__aiocbp) __THROW; extern int aio_suspend64 (const struct aiocb64 *const __list[], int __nent, const struct timespec *__restrict __timeout) __THROW __nonnull ((1)); extern int aio_fsync64 (int __operation, struct aiocb64 *__aiocbp) __THROW __nonnull ((2)); #endif __END_DECLS #endif /* aio.h */ PKZ 8S""spawn.hnu[/* Definitions for POSIX spawn interface. Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SPAWN_H #define _SPAWN_H 1 #include #include #include #include /* Data structure to contain attributes for thread creation. */ typedef struct { short int __flags; pid_t __pgrp; sigset_t __sd; sigset_t __ss; struct sched_param __sp; int __policy; int __pad[16]; } posix_spawnattr_t; /* Data structure to contain information about the actions to be performed in the new process with respect to file descriptors. */ typedef struct { int __allocated; int __used; struct __spawn_action *__actions; int __pad[16]; } posix_spawn_file_actions_t; /* Flags to be set in the `posix_spawnattr_t'. */ #define POSIX_SPAWN_RESETIDS 0x01 #define POSIX_SPAWN_SETPGROUP 0x02 #define POSIX_SPAWN_SETSIGDEF 0x04 #define POSIX_SPAWN_SETSIGMASK 0x08 #define POSIX_SPAWN_SETSCHEDPARAM 0x10 #define POSIX_SPAWN_SETSCHEDULER 0x20 #ifdef __USE_GNU # define POSIX_SPAWN_USEVFORK 0x40 # define POSIX_SPAWN_SETSID 0x80 #endif __BEGIN_DECLS /* Spawn a new process executing PATH with the attributes describes in *ATTRP. Before running the process perform the actions described in FILE-ACTIONS. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int posix_spawn (pid_t *__restrict __pid, const char *__restrict __path, const posix_spawn_file_actions_t *__restrict __file_actions, const posix_spawnattr_t *__restrict __attrp, char *const __argv[__restrict_arr], char *const __envp[__restrict_arr]); /* Similar to `posix_spawn' but search for FILE in the PATH. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int posix_spawnp (pid_t *__pid, const char *__file, const posix_spawn_file_actions_t *__file_actions, const posix_spawnattr_t *__attrp, char *const __argv[], char *const __envp[]); /* Initialize data structure with attributes for `spawn' to default values. */ extern int posix_spawnattr_init (posix_spawnattr_t *__attr) __THROW; /* Free resources associated with ATTR. */ extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) __THROW; /* Store signal mask for signals with default handling from ATTR in SIGDEFAULT. */ extern int posix_spawnattr_getsigdefault (const posix_spawnattr_t * __restrict __attr, sigset_t *__restrict __sigdefault) __THROW; /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */ extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr, const sigset_t *__restrict __sigdefault) __THROW; /* Store signal mask for the new process from ATTR in SIGMASK. */ extern int posix_spawnattr_getsigmask (const posix_spawnattr_t *__restrict __attr, sigset_t *__restrict __sigmask) __THROW; /* Set signal mask for the new process in ATTR to SIGMASK. */ extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr, const sigset_t *__restrict __sigmask) __THROW; /* Get flag word from the attribute structure. */ extern int posix_spawnattr_getflags (const posix_spawnattr_t *__restrict __attr, short int *__restrict __flags) __THROW; /* Store flags in the attribute structure. */ extern int posix_spawnattr_setflags (posix_spawnattr_t *_attr, short int __flags) __THROW; /* Get process group ID from the attribute structure. */ extern int posix_spawnattr_getpgroup (const posix_spawnattr_t *__restrict __attr, pid_t *__restrict __pgroup) __THROW; /* Store process group ID in the attribute structure. */ extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr, pid_t __pgroup) __THROW; /* Get scheduling policy from the attribute structure. */ extern int posix_spawnattr_getschedpolicy (const posix_spawnattr_t * __restrict __attr, int *__restrict __schedpolicy) __THROW; /* Store scheduling policy in the attribute structure. */ extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr, int __schedpolicy) __THROW; /* Get scheduling parameters from the attribute structure. */ extern int posix_spawnattr_getschedparam (const posix_spawnattr_t * __restrict __attr, struct sched_param *__restrict __schedparam) __THROW; /* Store scheduling parameters in the attribute structure. */ extern int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr, const struct sched_param * __restrict __schedparam) __THROW; /* Initialize data structure for file attribute for `spawn' call. */ extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t * __file_actions) __THROW; /* Free resources associated with FILE-ACTIONS. */ extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t * __file_actions) __THROW; /* Add an action to FILE-ACTIONS which tells the implementation to call `open' for the given file during the `spawn' call. */ extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t * __restrict __file_actions, int __fd, const char *__restrict __path, int __oflag, mode_t __mode) __THROW; /* Add an action to FILE-ACTIONS which tells the implementation to call `close' for the given file descriptor during the `spawn' call. */ extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t * __file_actions, int __fd) __THROW; /* Add an action to FILE-ACTIONS which tells the implementation to call `dup2' for the given file descriptors during the `spawn' call. */ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t * __file_actions, int __fd, int __newfd) __THROW; __END_DECLS #endif /* spawn.h */ PKZl  fnmatch.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 #ifdef __cplusplus extern "C" { #endif /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in . */ #undef FNM_PATHNAME #undef FNM_NOESCAPE #undef FNM_PERIOD /* Bits set in the FLAGS argument to `fnmatch'. */ #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE # define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ # define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ # define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ # define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ #endif /* Value returned by `fnmatch' if STRING does not match PATTERN. */ #define FNM_NOMATCH 1 /* This value is returned if the implementation does not support `fnmatch'. Since this is not the case here it will never be returned but the conformance test suites still require the symbol to be defined. */ #ifdef _XOPEN_SOURCE # define FNM_NOSYS (-1) #endif /* Match NAME against the filename pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ extern int fnmatch (const char *__pattern, const char *__name, int __flags); #ifdef __cplusplus } #endif #endif /* fnmatch.h */ PKZ"' ' fstab.hnu[/* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)fstab.h 8.1 (Berkeley) 6/2/93 */ #ifndef _FSTAB_H #define _FSTAB_H 1 #include /* * File system table, see fstab(5). * * Used by dump, mount, umount, swapon, fsck, df, ... * * For ufs fs_spec field is the block special name. Programs that want to * use the character special name must create that name by prepending a 'r' * after the right most slash. Quota files are always named "quotas", so * if type is "rq", then use concatenation of fs_file and "quotas" to locate * quota file. */ #define _PATH_FSTAB "/etc/fstab" #define FSTAB "/etc/fstab" /* deprecated */ #define FSTAB_RW "rw" /* read/write device */ #define FSTAB_RQ "rq" /* read/write with quotas */ #define FSTAB_RO "ro" /* read-only device */ #define FSTAB_SW "sw" /* swap device */ #define FSTAB_XX "xx" /* ignore totally */ struct fstab { char *fs_spec; /* block special device name */ char *fs_file; /* file system path prefix */ char *fs_vfstype; /* File system type, ufs, nfs */ char *fs_mntops; /* Mount options ala -o */ const char *fs_type; /* FSTAB_* from fs_mntops */ int fs_freq; /* dump frequency, in days */ int fs_passno; /* pass number on parallel dump */ }; __BEGIN_DECLS extern struct fstab *getfsent (void) __THROW; extern struct fstab *getfsspec (const char *__name) __THROW; extern struct fstab *getfsfile (const char *__name) __THROW; extern int setfsent (void) __THROW; extern void endfsent (void) __THROW; __END_DECLS #endif /* fstab.h */ PKZ iilibgen.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _LIBGEN_H #define _LIBGEN_H 1 #include __BEGIN_DECLS /* Return directory part of PATH or "." if none is available. */ extern char *dirname (char *__path) __THROW; /* Return final component of PATH. This is the weird XPG version of this function. It sometimes will modify its argument. Therefore we normally use the GNU version (in ) and only if this header is included make the XPG version available under the real name. */ extern char *__xpg_basename (char *__path) __THROW; #define basename __xpg_basename __END_DECLS #endif /* libgen.h */ PKZ1אگmqueue.hnu[/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MQUEUE_H #define _MQUEUE_H 1 #include #include #include #include #include /* Get the definition of mqd_t and struct mq_attr. */ #include __BEGIN_DECLS /* Establish connection between a process and a message queue NAME and return message queue descriptor or (mqd_t) -1 on error. OFLAG determines the type of access used. If O_CREAT is on OFLAG, the third argument is taken as a `mode_t', the mode of the created message queue, and the fourth argument is taken as `struct mq_attr *', pointer to message queue attributes. If the fourth argument is NULL, default attributes are used. */ extern mqd_t mq_open (const char *__name, int __oflag, ...) __THROW __nonnull ((1)); /* Removes the association between message queue descriptor MQDES and its message queue. */ extern int mq_close (mqd_t __mqdes) __THROW; /* Query status and attributes of message queue MQDES. */ extern int mq_getattr (mqd_t __mqdes, struct mq_attr *__mqstat) __THROW __nonnull ((2)); /* Set attributes associated with message queue MQDES and if OMQSTAT is not NULL also query its old attributes. */ extern int mq_setattr (mqd_t __mqdes, const struct mq_attr *__restrict __mqstat, struct mq_attr *__restrict __omqstat) __THROW __nonnull ((2)); /* Remove message queue named NAME. */ extern int mq_unlink (const char *__name) __THROW __nonnull ((1)); /* Register notification issued upon message arrival to an empty message queue MQDES. */ extern int mq_notify (mqd_t __mqdes, const struct sigevent *__notification) __THROW; /* Receive the oldest from highest priority messages in message queue MQDES. */ extern ssize_t mq_receive (mqd_t __mqdes, char *__msg_ptr, size_t __msg_len, unsigned int *__msg_prio) __nonnull ((2)); /* Add message pointed by MSG_PTR to message queue MQDES. */ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len, unsigned int __msg_prio) __nonnull ((2)); #ifdef __USE_XOPEN2K /* Receive the oldest from highest priority messages in message queue MQDES, stop waiting if ABS_TIMEOUT expires. */ extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr, size_t __msg_len, unsigned int *__restrict __msg_prio, const struct timespec *__restrict __abs_timeout) __nonnull ((2, 5)); /* Add message pointed by MSG_PTR to message queue MQDES, stop blocking on full message queue if ABS_TIMEOUT expires. */ extern int mq_timedsend (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len, unsigned int __msg_prio, const struct timespec *__abs_timeout) __nonnull ((2, 5)); #endif /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \ && defined __va_arg_pack_len # include #endif __END_DECLS #endif /* mqueue.h */ PKZ_P_P kadm5/admin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* lib/kadm5/admin.h */ /* * Copyright 2001, 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ /* * Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved * * $Header$ */ /* * This API is not considered as stable as the main krb5 API. * * - We may make arbitrary incompatible changes between feature * releases (e.g. from 1.7 to 1.8). * - We will make some effort to avoid making incompatible changes for * bugfix releases, but will make them if necessary. */ #ifndef __KADM5_ADMIN_H__ #define __KADM5_ADMIN_H__ #include #include #include #include #include #include #include #ifndef KADM5INT_BEGIN_DECLS #if defined(__cplusplus) #define KADM5INT_BEGIN_DECLS extern "C" { #define KADM5INT_END_DECLS } #else #define KADM5INT_BEGIN_DECLS #define KADM5INT_END_DECLS #endif #endif KADM5INT_BEGIN_DECLS #define KADM5_ADMIN_SERVICE "kadmin/admin" #define KADM5_CHANGEPW_SERVICE "kadmin/changepw" #define KADM5_HIST_PRINCIPAL "kadmin/history" #define KADM5_KIPROP_HOST_SERVICE "kiprop" typedef krb5_principal kadm5_princ_t; typedef char *kadm5_policy_t; typedef long kadm5_ret_t; #define KADM5_PW_FIRST_PROMPT \ (error_message(CHPASS_UTIL_NEW_PASSWORD_PROMPT)) #define KADM5_PW_SECOND_PROMPT \ (error_message(CHPASS_UTIL_NEW_PASSWORD_AGAIN_PROMPT)) /* * Successful return code */ #define KADM5_OK 0 /* * Field masks */ /* kadm5_principal_ent_t */ #define KADM5_PRINCIPAL 0x000001 #define KADM5_PRINC_EXPIRE_TIME 0x000002 #define KADM5_PW_EXPIRATION 0x000004 #define KADM5_LAST_PWD_CHANGE 0x000008 #define KADM5_ATTRIBUTES 0x000010 #define KADM5_MAX_LIFE 0x000020 #define KADM5_MOD_TIME 0x000040 #define KADM5_MOD_NAME 0x000080 #define KADM5_KVNO 0x000100 #define KADM5_MKVNO 0x000200 #define KADM5_AUX_ATTRIBUTES 0x000400 #define KADM5_POLICY 0x000800 #define KADM5_POLICY_CLR 0x001000 /* version 2 masks */ #define KADM5_MAX_RLIFE 0x002000 #define KADM5_LAST_SUCCESS 0x004000 #define KADM5_LAST_FAILED 0x008000 #define KADM5_FAIL_AUTH_COUNT 0x010000 #define KADM5_KEY_DATA 0x020000 #define KADM5_TL_DATA 0x040000 #ifdef notyet /* Novell */ #define KADM5_CPW_FUNCTION 0x080000 #define KADM5_RANDKEY_USED 0x100000 #endif #define KADM5_LOAD 0x200000 #define KADM5_KEY_HIST 0x400000 /* all but KEY_DATA, TL_DATA, LOAD */ #define KADM5_PRINCIPAL_NORMAL_MASK 0x41ffff /* kadm5_policy_ent_t */ #define KADM5_PW_MAX_LIFE 0x00004000 #define KADM5_PW_MIN_LIFE 0x00008000 #define KADM5_PW_MIN_LENGTH 0x00010000 #define KADM5_PW_MIN_CLASSES 0x00020000 #define KADM5_PW_HISTORY_NUM 0x00040000 #define KADM5_REF_COUNT 0x00080000 #define KADM5_PW_MAX_FAILURE 0x00100000 #define KADM5_PW_FAILURE_COUNT_INTERVAL 0x00200000 #define KADM5_PW_LOCKOUT_DURATION 0x00400000 #define KADM5_POLICY_ATTRIBUTES 0x00800000 #define KADM5_POLICY_MAX_LIFE 0x01000000 #define KADM5_POLICY_MAX_RLIFE 0x02000000 #define KADM5_POLICY_ALLOWED_KEYSALTS 0x04000000 #define KADM5_POLICY_TL_DATA 0x08000000 /* kadm5_config_params */ #define KADM5_CONFIG_REALM 0x00000001 #define KADM5_CONFIG_DBNAME 0x00000002 #define KADM5_CONFIG_MKEY_NAME 0x00000004 #define KADM5_CONFIG_MAX_LIFE 0x00000008 #define KADM5_CONFIG_MAX_RLIFE 0x00000010 #define KADM5_CONFIG_EXPIRATION 0x00000020 #define KADM5_CONFIG_FLAGS 0x00000040 /*#define KADM5_CONFIG_ADMIN_KEYTAB 0x00000080*/ #define KADM5_CONFIG_STASH_FILE 0x00000100 #define KADM5_CONFIG_ENCTYPE 0x00000200 #define KADM5_CONFIG_ADBNAME 0x00000400 #define KADM5_CONFIG_ADB_LOCKFILE 0x00000800 #define KADM5_CONFIG_KADMIND_LISTEN 0x00001000 #define KADM5_CONFIG_ACL_FILE 0x00002000 #define KADM5_CONFIG_KADMIND_PORT 0x00004000 #define KADM5_CONFIG_ENCTYPES 0x00008000 #define KADM5_CONFIG_ADMIN_SERVER 0x00010000 #define KADM5_CONFIG_DICT_FILE 0x00020000 #define KADM5_CONFIG_MKEY_FROM_KBD 0x00040000 #define KADM5_CONFIG_KPASSWD_PORT 0x00080000 #define KADM5_CONFIG_OLD_AUTH_GSSAPI 0x00100000 #define KADM5_CONFIG_NO_AUTH 0x00200000 #define KADM5_CONFIG_AUTH_NOFALLBACK 0x00400000 #define KADM5_CONFIG_KPASSWD_LISTEN 0x00800000 #define KADM5_CONFIG_IPROP_ENABLED 0x01000000 #define KADM5_CONFIG_ULOG_SIZE 0x02000000 #define KADM5_CONFIG_POLL_TIME 0x04000000 #define KADM5_CONFIG_IPROP_LOGFILE 0x08000000 #define KADM5_CONFIG_IPROP_PORT 0x10000000 #define KADM5_CONFIG_KVNO 0x20000000 #define KADM5_CONFIG_IPROP_RESYNC_TIMEOUT 0x40000000 #define KADM5_CONFIG_IPROP_LISTEN 0x80000000 /* * permission bits */ #define KADM5_PRIV_GET 0x01 #define KADM5_PRIV_ADD 0x02 #define KADM5_PRIV_MODIFY 0x04 #define KADM5_PRIV_DELETE 0x08 /* * API versioning constants */ #define KADM5_MASK_BITS 0xffffff00 #define KADM5_STRUCT_VERSION_MASK 0x12345600 #define KADM5_STRUCT_VERSION_1 (KADM5_STRUCT_VERSION_MASK|0x01) #define KADM5_STRUCT_VERSION KADM5_STRUCT_VERSION_1 #define KADM5_API_VERSION_MASK 0x12345700 #define KADM5_API_VERSION_2 (KADM5_API_VERSION_MASK|0x02) #define KADM5_API_VERSION_3 (KADM5_API_VERSION_MASK|0x03) #define KADM5_API_VERSION_4 (KADM5_API_VERSION_MASK|0x04) typedef struct _kadm5_principal_ent_t { krb5_principal principal; krb5_timestamp princ_expire_time; krb5_timestamp last_pwd_change; krb5_timestamp pw_expiration; krb5_deltat max_life; krb5_principal mod_name; krb5_timestamp mod_date; krb5_flags attributes; krb5_kvno kvno; krb5_kvno mkvno; char *policy; long aux_attributes; /* version 2 fields */ krb5_deltat max_renewable_life; krb5_timestamp last_success; krb5_timestamp last_failed; krb5_kvno fail_auth_count; krb5_int16 n_key_data; krb5_int16 n_tl_data; krb5_tl_data *tl_data; krb5_key_data *key_data; } kadm5_principal_ent_rec, *kadm5_principal_ent_t; typedef struct _kadm5_policy_ent_t { char *policy; long pw_min_life; long pw_max_life; long pw_min_length; long pw_min_classes; long pw_history_num; long policy_refcnt; /* no longer used */ /* version 3 fields */ krb5_kvno pw_max_fail; krb5_deltat pw_failcnt_interval; krb5_deltat pw_lockout_duration; /* version 4 fields */ krb5_flags attributes; krb5_deltat max_life; krb5_deltat max_renewable_life; char *allowed_keysalts; krb5_int16 n_tl_data; krb5_tl_data *tl_data; } kadm5_policy_ent_rec, *kadm5_policy_ent_t; /* * Data structure returned by kadm5_get_config_params() */ typedef struct _kadm5_config_params { long mask; char * realm; int kadmind_port; int kpasswd_port; char * admin_server; #ifdef notyet /* Novell */ /* ABI change? */ char * kpasswd_server; #endif /* Deprecated except for db2 backwards compatibility. Don't add new uses except as fallbacks for parameters that should be specified in the database module section of the config file. */ char * dbname; char * acl_file; char * dict_file; int mkey_from_kbd; char * stash_file; char * mkey_name; krb5_enctype enctype; krb5_deltat max_life; krb5_deltat max_rlife; krb5_timestamp expiration; krb5_flags flags; krb5_key_salt_tuple *keysalts; krb5_int32 num_keysalts; krb5_kvno kvno; bool_t iprop_enabled; uint32_t iprop_ulogsize; krb5_deltat iprop_poll_time; char * iprop_logfile; /* char * iprop_server;*/ int iprop_port; int iprop_resync_timeout; char * kadmind_listen; char * kpasswd_listen; char * iprop_listen; } kadm5_config_params; typedef struct _kadm5_key_data { krb5_kvno kvno; krb5_keyblock key; krb5_keysalt salt; } kadm5_key_data; /* * functions */ krb5_error_code kadm5_get_config_params(krb5_context context, int use_kdc_config, kadm5_config_params *params_in, kadm5_config_params *params_out); krb5_error_code kadm5_free_config_params(krb5_context context, kadm5_config_params *params); krb5_error_code kadm5_get_admin_service_name(krb5_context, char *, char *, size_t); /* * For all initialization functions, the caller must first initialize * a context with kadm5_init_krb5_context which will survive as long * as the resulting handle. The caller should free the context with * krb5_free_context. */ kadm5_ret_t kadm5_init(krb5_context context, char *client_name, char *pass, char *service_name, kadm5_config_params *params, krb5_ui_4 struct_version, krb5_ui_4 api_version, char **db_args, void **server_handle); kadm5_ret_t kadm5_init_anonymous(krb5_context context, char *client_name, char *service_name, kadm5_config_params *params, krb5_ui_4 struct_version, krb5_ui_4 api_version, char **db_args, void **server_handle); kadm5_ret_t kadm5_init_with_password(krb5_context context, char *client_name, char *pass, char *service_name, kadm5_config_params *params, krb5_ui_4 struct_version, krb5_ui_4 api_version, char **db_args, void **server_handle); kadm5_ret_t kadm5_init_with_skey(krb5_context context, char *client_name, char *keytab, char *service_name, kadm5_config_params *params, krb5_ui_4 struct_version, krb5_ui_4 api_version, char **db_args, void **server_handle); kadm5_ret_t kadm5_init_with_creds(krb5_context context, char *client_name, krb5_ccache cc, char *service_name, kadm5_config_params *params, krb5_ui_4 struct_version, krb5_ui_4 api_version, char **db_args, void **server_handle); kadm5_ret_t kadm5_lock(void *server_handle); kadm5_ret_t kadm5_unlock(void *server_handle); kadm5_ret_t kadm5_flush(void *server_handle); kadm5_ret_t kadm5_destroy(void *server_handle); kadm5_ret_t kadm5_create_principal(void *server_handle, kadm5_principal_ent_t ent, long mask, char *pass); kadm5_ret_t kadm5_create_principal_3(void *server_handle, kadm5_principal_ent_t ent, long mask, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, char *pass); kadm5_ret_t kadm5_delete_principal(void *server_handle, krb5_principal principal); kadm5_ret_t kadm5_modify_principal(void *server_handle, kadm5_principal_ent_t ent, long mask); kadm5_ret_t kadm5_rename_principal(void *server_handle, krb5_principal,krb5_principal); kadm5_ret_t kadm5_get_principal(void *server_handle, krb5_principal principal, kadm5_principal_ent_t ent, long mask); kadm5_ret_t kadm5_chpass_principal(void *server_handle, krb5_principal principal, char *pass); kadm5_ret_t kadm5_chpass_principal_3(void *server_handle, krb5_principal principal, krb5_boolean keepold, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, char *pass); kadm5_ret_t kadm5_randkey_principal(void *server_handle, krb5_principal principal, krb5_keyblock **keyblocks, int *n_keys); kadm5_ret_t kadm5_randkey_principal_3(void *server_handle, krb5_principal principal, krb5_boolean keepold, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, krb5_keyblock **keyblocks, int *n_keys); kadm5_ret_t kadm5_setkey_principal(void *server_handle, krb5_principal principal, krb5_keyblock *keyblocks, int n_keys); kadm5_ret_t kadm5_setkey_principal_3(void *server_handle, krb5_principal principal, krb5_boolean keepold, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, krb5_keyblock *keyblocks, int n_keys); kadm5_ret_t kadm5_setkey_principal_4(void *server_handle, krb5_principal principal, krb5_boolean keepold, kadm5_key_data *key_data, int n_key_data); kadm5_ret_t kadm5_decrypt_key(void *server_handle, kadm5_principal_ent_t entry, krb5_int32 ktype, krb5_int32 stype, krb5_int32 kvno, krb5_keyblock *keyblock, krb5_keysalt *keysalt, int *kvnop); kadm5_ret_t kadm5_create_policy(void *server_handle, kadm5_policy_ent_t ent, long mask); kadm5_ret_t kadm5_delete_policy(void *server_handle, kadm5_policy_t policy); kadm5_ret_t kadm5_modify_policy(void *server_handle, kadm5_policy_ent_t ent, long mask); kadm5_ret_t kadm5_get_policy(void *server_handle, kadm5_policy_t policy, kadm5_policy_ent_t ent); kadm5_ret_t kadm5_get_privs(void *server_handle, long *privs); kadm5_ret_t kadm5_chpass_principal_util(void *server_handle, krb5_principal princ, char *new_pw, char **ret_pw, char *msg_ret, unsigned int msg_len); kadm5_ret_t kadm5_free_principal_ent(void *server_handle, kadm5_principal_ent_t ent); kadm5_ret_t kadm5_free_policy_ent(void *server_handle, kadm5_policy_ent_t ent); kadm5_ret_t kadm5_get_principals(void *server_handle, char *exp, char ***princs, int *count); kadm5_ret_t kadm5_get_policies(void *server_handle, char *exp, char ***pols, int *count); kadm5_ret_t kadm5_free_key_data(void *server_handle, krb5_int16 *n_key_data, krb5_key_data *key_data); kadm5_ret_t kadm5_free_name_list(void *server_handle, char **names, int count); krb5_error_code kadm5_init_krb5_context (krb5_context *); krb5_error_code kadm5_init_iprop(void *server_handle, char **db_args); kadm5_ret_t kadm5_get_principal_keys(void *server_handle, krb5_principal principal, krb5_kvno kvno, kadm5_key_data **key_data, int *n_key_data); kadm5_ret_t kadm5_purgekeys(void *server_handle, krb5_principal principal, int keepkvno); kadm5_ret_t kadm5_get_strings(void *server_handle, krb5_principal principal, krb5_string_attr **strings_out, int *count_out); kadm5_ret_t kadm5_set_string(void *server_handle, krb5_principal principal, const char *key, const char *value); kadm5_ret_t kadm5_free_strings(void *server_handle, krb5_string_attr *strings, int count); kadm5_ret_t kadm5_free_kadm5_key_data(krb5_context context, int n_key_data, kadm5_key_data *key_data); KADM5INT_END_DECLS #endif /* __KADM5_ADMIN_H__ */ PKZ6hkadm5/kadm_err.hnu[/* * et-h-kadm_err.h: * This file is automatically generated; please do not edit it. */ #include #define KADM5_FAILURE (43787520L) #define KADM5_AUTH_GET (43787521L) #define KADM5_AUTH_ADD (43787522L) #define KADM5_AUTH_MODIFY (43787523L) #define KADM5_AUTH_DELETE (43787524L) #define KADM5_AUTH_INSUFFICIENT (43787525L) #define KADM5_BAD_DB (43787526L) #define KADM5_DUP (43787527L) #define KADM5_RPC_ERROR (43787528L) #define KADM5_NO_SRV (43787529L) #define KADM5_BAD_HIST_KEY (43787530L) #define KADM5_NOT_INIT (43787531L) #define KADM5_UNK_PRINC (43787532L) #define KADM5_UNK_POLICY (43787533L) #define KADM5_BAD_MASK (43787534L) #define KADM5_BAD_CLASS (43787535L) #define KADM5_BAD_LENGTH (43787536L) #define KADM5_BAD_POLICY (43787537L) #define KADM5_BAD_PRINCIPAL (43787538L) #define KADM5_BAD_AUX_ATTR (43787539L) #define KADM5_BAD_HISTORY (43787540L) #define KADM5_BAD_MIN_PASS_LIFE (43787541L) #define KADM5_PASS_Q_TOOSHORT (43787542L) #define KADM5_PASS_Q_CLASS (43787543L) #define KADM5_PASS_Q_DICT (43787544L) #define KADM5_PASS_REUSE (43787545L) #define KADM5_PASS_TOOSOON (43787546L) #define KADM5_POLICY_REF (43787547L) #define KADM5_INIT (43787548L) #define KADM5_BAD_PASSWORD (43787549L) #define KADM5_PROTECT_PRINCIPAL (43787550L) #define KADM5_BAD_SERVER_HANDLE (43787551L) #define KADM5_BAD_STRUCT_VERSION (43787552L) #define KADM5_OLD_STRUCT_VERSION (43787553L) #define KADM5_NEW_STRUCT_VERSION (43787554L) #define KADM5_BAD_API_VERSION (43787555L) #define KADM5_OLD_LIB_API_VERSION (43787556L) #define KADM5_OLD_SERVER_API_VERSION (43787557L) #define KADM5_NEW_LIB_API_VERSION (43787558L) #define KADM5_NEW_SERVER_API_VERSION (43787559L) #define KADM5_SECURE_PRINC_MISSING (43787560L) #define KADM5_NO_RENAME_SALT (43787561L) #define KADM5_BAD_CLIENT_PARAMS (43787562L) #define KADM5_BAD_SERVER_PARAMS (43787563L) #define KADM5_AUTH_LIST (43787564L) #define KADM5_AUTH_CHANGEPW (43787565L) #define KADM5_GSS_ERROR (43787566L) #define KADM5_BAD_TL_TYPE (43787567L) #define KADM5_MISSING_CONF_PARAMS (43787568L) #define KADM5_BAD_SERVER_NAME (43787569L) #define KADM5_AUTH_SETKEY (43787570L) #define KADM5_SETKEY_DUP_ENCTYPES (43787571L) #define KADM5_SETV4KEY_INVAL_ENCTYPE (43787572L) #define KADM5_SETKEY3_ETYPE_MISMATCH (43787573L) #define KADM5_MISSING_KRB5_CONF_PARAMS (43787574L) #define KADM5_XDR_FAILURE (43787575L) #define KADM5_CANT_RESOLVE (43787576L) #define KADM5_PASS_Q_GENERIC (43787577L) #define KADM5_BAD_KEYSALTS (43787578L) #define KADM5_SETKEY_BAD_KVNO (43787579L) #define KADM5_AUTH_EXTRACT (43787580L) #define KADM5_PROTECT_KEYS (43787581L) #define KADM5_AUTH_INITIAL (43787582L) extern const struct error_table et_ovk_error_table; extern void initialize_ovk_error_table(void); /* For compatibility with Heimdal */ extern void initialize_ovk_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_ovk (43787520L) /* for compatibility with older versions... */ #define init_ovk_err_tbl initialize_ovk_error_table #define ovk_err_base ERROR_TABLE_BASE_ovk PKZ}  kadm5/chpass_util_strings.hnu[/* * et-h-chpass_util_strings.h: * This file is automatically generated; please do not edit it. */ #include #define CHPASS_UTIL_GET_POLICY_INFO (-1492553984L) #define CHPASS_UTIL_GET_PRINC_INFO (-1492553983L) #define CHPASS_UTIL_NEW_PASSWORD_MISMATCH (-1492553982L) #define CHPASS_UTIL_NEW_PASSWORD_PROMPT (-1492553981L) #define CHPASS_UTIL_NEW_PASSWORD_AGAIN_PROMPT (-1492553980L) #define CHPASS_UTIL_NO_PASSWORD_READ (-1492553979L) #define CHPASS_UTIL_NO_POLICY_YET_Q_ERROR (-1492553978L) #define CHPASS_UTIL_PASSWORD_CHANGED (-1492553977L) #define CHPASS_UTIL_PASSWORD_IN_DICTIONARY (-1492553976L) #define CHPASS_UTIL_PASSWORD_NOT_CHANGED (-1492553975L) #define CHPASS_UTIL_PASSWORD_TOO_SHORT (-1492553974L) #define CHPASS_UTIL_TOO_FEW_CLASSES (-1492553973L) #define CHPASS_UTIL_PASSWORD_TOO_SOON (-1492553972L) #define CHPASS_UTIL_PASSWORD_REUSE (-1492553971L) #define CHPASS_UTIL_WHILE_TRYING_TO_CHANGE (-1492553970L) #define CHPASS_UTIL_WHILE_READING_PASSWORD (-1492553969L) extern const struct error_table et_ovku_error_table; extern void initialize_ovku_error_table(void); /* For compatibility with Heimdal */ extern void initialize_ovku_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_ovku (-1492553984L) /* for compatibility with older versions... */ #define init_ovku_err_tbl initialize_ovku_error_table #define ovku_err_base ERROR_TABLE_BASE_ovku PKZ^ͣ5 5 gd_io.hnu[#ifdef __cplusplus extern "C" { #endif #ifndef GD_IO_H #define GD_IO_H 1 #include #ifdef VMS # define Putchar gdPutchar #endif /* Group: Types typedef: gdIOCtx gdIOCtx structures hold function pointers for doing image IO. Most of the gd functions that read and write files, such as also have variants that accept a structure; see and . Those who wish to provide their own custom routines to read and write images can populate a gdIOCtx structure with functions of their own devising to to read and write data. For image reading, the only mandatory functions are getC and getBuf, which must return the number of characters actually read, or a negative value on error or EOF. These functions must read the number of characters requested unless at the end of the file. For image writing, the only mandatory functions are putC and putBuf, which return the number of characters written; these functions must write the number of characters requested except in the event of an error. The seek and tell functions are only required in conjunction with the gd2 file format, which supports quick loading of partial images. The gd_free function will not be invoked when calling the standard Ctx functions; it is an implementation convenience when adding new data types to gd. For examples, see gd_png.c, gd_gd2.c, gd_jpeg.c, etc., all of which rely on gdIOCtx to implement the standard image read and write functions. > typedef struct gdIOCtx > { > int (*getC) (struct gdIOCtx *); > int (*getBuf) (struct gdIOCtx *, void *, int wanted); > > void (*putC) (struct gdIOCtx *, int); > int (*putBuf) (struct gdIOCtx *, const void *, int wanted); > > // seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! > int (*seek) (struct gdIOCtx *, const int); > long (*tell) (struct gdIOCtx *); > > void (*gd_free) (struct gdIOCtx *); > } gdIOCtx; */ typedef struct gdIOCtx { int (*getC)(struct gdIOCtx *); int (*getBuf)(struct gdIOCtx *, void *, int); void (*putC)(struct gdIOCtx *, int); int (*putBuf)(struct gdIOCtx *, const void *, int); /* seek must return 1 on SUCCESS, 0 on FAILURE. Unlike fseek! */ int (*seek)(struct gdIOCtx *, const int); long (*tell)(struct gdIOCtx *); void (*gd_free)(struct gdIOCtx *); void *data; } gdIOCtx; typedef struct gdIOCtx *gdIOCtxPtr; void Putword(int w, gdIOCtx *ctx); void Putchar(int c, gdIOCtx *ctx); void gdPutC(const unsigned char c, gdIOCtx *ctx); int gdPutBuf(const void *, int, gdIOCtx *); void gdPutWord(int w, gdIOCtx *ctx); void gdPutInt(int w, gdIOCtx *ctx); int gdGetC(gdIOCtx *ctx); int gdGetBuf(void *, int, gdIOCtx *); int gdGetByte(int *result, gdIOCtx *ctx); int gdGetWord(int *result, gdIOCtx *ctx); int gdGetWordLSB(signed short int *result, gdIOCtx *ctx); int gdGetInt(int *result, gdIOCtx *ctx); int gdGetIntLSB(signed int *result, gdIOCtx *ctx); int gdSeek(gdIOCtx *ctx, const int offset); long gdTell(gdIOCtx *ctx); #endif #ifdef __cplusplus } #endif PKZې' ' gpgrt.hnu[/* gpg-error.h or gpgrt.h - Common code for GnuPG and others. -*- c -*- * Copyright (C) 2001-2018 g10 Code GmbH * * This file is part of libgpg-error (aka libgpgrt). * * libgpg-error is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * libgpg-error is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see . * SPDX-License-Identifier: LGPL-2.1+ * * Do not edit. Generated from gpg-error.h.in. */ /* The GnuPG project consists of many components. Error codes are * exchanged between all components. The common error codes and their * user-presentable descriptions are kept into a shared library to * allow adding new error codes and components without recompiling any * of the other components. In addition to error codes this library * also features several other groups of functions which are common to * all GnuPG components. They may be used by independet project as * well. The interfaces will not change in a backward incompatible way. * * An error code together with an error source build up an error * value. As the error value is been passed from one component to * another, it preserves the information about the source and nature * of the error. * * A component of the GnuPG project can define the following macros to * tune the behaviour of the library: * * GPG_ERR_SOURCE_DEFAULT: Define to an error source of type * gpg_err_source_t to make that source the default for gpg_error(). * Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default. * * GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the * internal gettext API to standard names. This has only an effect on * Windows platforms. * * GPGRT_ENABLE_ES_MACROS: Define to provide "es_" macros for the * estream functions. * * GPGRT_ENABLE_LOG_MACROS: Define to provide short versions of the * log functions. * * GPGRT_ENABLE_ARGPARSE_MACROS: Needs to be defined to provide the * mandatory macros of the argparse interface. */ #ifndef GPG_ERROR_H #define GPG_ERROR_H 1 #ifndef GPGRT_H #define GPGRT_H 1 #include #include #include /* The version string of this header. */ #define GPG_ERROR_VERSION "1.31" #define GPGRT_VERSION "1.31" /* The version number of this header. */ #define GPG_ERROR_VERSION_NUMBER 0x011f00 #define GPGRT_VERSION_NUMBER 0x011f00 #ifdef __GNUC__ # define GPG_ERR_INLINE __inline__ #elif defined(_MSC_VER) && _MSC_VER >= 1300 # define GPG_ERR_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # define GPG_ERR_INLINE inline #else # ifndef GPG_ERR_INLINE # define GPG_ERR_INLINE # endif #endif #ifdef __cplusplus extern "C" { #if 0 /* just to make Emacs auto-indent happy */ } #endif #endif /* __cplusplus */ /* The error source type gpg_err_source_t. * * Where as the Poo out of a welle small * Taketh his firste springing and his sours. * --Chaucer. */ /* Only use free slots, never change or reorder the existing * entries. */ typedef enum { GPG_ERR_SOURCE_UNKNOWN = 0, GPG_ERR_SOURCE_GCRYPT = 1, GPG_ERR_SOURCE_GPG = 2, GPG_ERR_SOURCE_GPGSM = 3, GPG_ERR_SOURCE_GPGAGENT = 4, GPG_ERR_SOURCE_PINENTRY = 5, GPG_ERR_SOURCE_SCD = 6, GPG_ERR_SOURCE_GPGME = 7, GPG_ERR_SOURCE_KEYBOX = 8, GPG_ERR_SOURCE_KSBA = 9, GPG_ERR_SOURCE_DIRMNGR = 10, GPG_ERR_SOURCE_GSTI = 11, GPG_ERR_SOURCE_GPA = 12, GPG_ERR_SOURCE_KLEO = 13, GPG_ERR_SOURCE_G13 = 14, GPG_ERR_SOURCE_ASSUAN = 15, GPG_ERR_SOURCE_TLS = 17, GPG_ERR_SOURCE_ANY = 31, GPG_ERR_SOURCE_USER_1 = 32, GPG_ERR_SOURCE_USER_2 = 33, GPG_ERR_SOURCE_USER_3 = 34, GPG_ERR_SOURCE_USER_4 = 35, /* This is one more than the largest allowed entry. */ GPG_ERR_SOURCE_DIM = 128 } gpg_err_source_t; /* The error code type gpg_err_code_t. */ /* Only use free slots, never change or reorder the existing * entries. */ typedef enum { GPG_ERR_NO_ERROR = 0, GPG_ERR_GENERAL = 1, GPG_ERR_UNKNOWN_PACKET = 2, GPG_ERR_UNKNOWN_VERSION = 3, GPG_ERR_PUBKEY_ALGO = 4, GPG_ERR_DIGEST_ALGO = 5, GPG_ERR_BAD_PUBKEY = 6, GPG_ERR_BAD_SECKEY = 7, GPG_ERR_BAD_SIGNATURE = 8, GPG_ERR_NO_PUBKEY = 9, GPG_ERR_CHECKSUM = 10, GPG_ERR_BAD_PASSPHRASE = 11, GPG_ERR_CIPHER_ALGO = 12, GPG_ERR_KEYRING_OPEN = 13, GPG_ERR_INV_PACKET = 14, GPG_ERR_INV_ARMOR = 15, GPG_ERR_NO_USER_ID = 16, GPG_ERR_NO_SECKEY = 17, GPG_ERR_WRONG_SECKEY = 18, GPG_ERR_BAD_KEY = 19, GPG_ERR_COMPR_ALGO = 20, GPG_ERR_NO_PRIME = 21, GPG_ERR_NO_ENCODING_METHOD = 22, GPG_ERR_NO_ENCRYPTION_SCHEME = 23, GPG_ERR_NO_SIGNATURE_SCHEME = 24, GPG_ERR_INV_ATTR = 25, GPG_ERR_NO_VALUE = 26, GPG_ERR_NOT_FOUND = 27, GPG_ERR_VALUE_NOT_FOUND = 28, GPG_ERR_SYNTAX = 29, GPG_ERR_BAD_MPI = 30, GPG_ERR_INV_PASSPHRASE = 31, GPG_ERR_SIG_CLASS = 32, GPG_ERR_RESOURCE_LIMIT = 33, GPG_ERR_INV_KEYRING = 34, GPG_ERR_TRUSTDB = 35, GPG_ERR_BAD_CERT = 36, GPG_ERR_INV_USER_ID = 37, GPG_ERR_UNEXPECTED = 38, GPG_ERR_TIME_CONFLICT = 39, GPG_ERR_KEYSERVER = 40, GPG_ERR_WRONG_PUBKEY_ALGO = 41, GPG_ERR_TRIBUTE_TO_D_A = 42, GPG_ERR_WEAK_KEY = 43, GPG_ERR_INV_KEYLEN = 44, GPG_ERR_INV_ARG = 45, GPG_ERR_BAD_URI = 46, GPG_ERR_INV_URI = 47, GPG_ERR_NETWORK = 48, GPG_ERR_UNKNOWN_HOST = 49, GPG_ERR_SELFTEST_FAILED = 50, GPG_ERR_NOT_ENCRYPTED = 51, GPG_ERR_NOT_PROCESSED = 52, GPG_ERR_UNUSABLE_PUBKEY = 53, GPG_ERR_UNUSABLE_SECKEY = 54, GPG_ERR_INV_VALUE = 55, GPG_ERR_BAD_CERT_CHAIN = 56, GPG_ERR_MISSING_CERT = 57, GPG_ERR_NO_DATA = 58, GPG_ERR_BUG = 59, GPG_ERR_NOT_SUPPORTED = 60, GPG_ERR_INV_OP = 61, GPG_ERR_TIMEOUT = 62, GPG_ERR_INTERNAL = 63, GPG_ERR_EOF_GCRYPT = 64, GPG_ERR_INV_OBJ = 65, GPG_ERR_TOO_SHORT = 66, GPG_ERR_TOO_LARGE = 67, GPG_ERR_NO_OBJ = 68, GPG_ERR_NOT_IMPLEMENTED = 69, GPG_ERR_CONFLICT = 70, GPG_ERR_INV_CIPHER_MODE = 71, GPG_ERR_INV_FLAG = 72, GPG_ERR_INV_HANDLE = 73, GPG_ERR_TRUNCATED = 74, GPG_ERR_INCOMPLETE_LINE = 75, GPG_ERR_INV_RESPONSE = 76, GPG_ERR_NO_AGENT = 77, GPG_ERR_AGENT = 78, GPG_ERR_INV_DATA = 79, GPG_ERR_ASSUAN_SERVER_FAULT = 80, GPG_ERR_ASSUAN = 81, GPG_ERR_INV_SESSION_KEY = 82, GPG_ERR_INV_SEXP = 83, GPG_ERR_UNSUPPORTED_ALGORITHM = 84, GPG_ERR_NO_PIN_ENTRY = 85, GPG_ERR_PIN_ENTRY = 86, GPG_ERR_BAD_PIN = 87, GPG_ERR_INV_NAME = 88, GPG_ERR_BAD_DATA = 89, GPG_ERR_INV_PARAMETER = 90, GPG_ERR_WRONG_CARD = 91, GPG_ERR_NO_DIRMNGR = 92, GPG_ERR_DIRMNGR = 93, GPG_ERR_CERT_REVOKED = 94, GPG_ERR_NO_CRL_KNOWN = 95, GPG_ERR_CRL_TOO_OLD = 96, GPG_ERR_LINE_TOO_LONG = 97, GPG_ERR_NOT_TRUSTED = 98, GPG_ERR_CANCELED = 99, GPG_ERR_BAD_CA_CERT = 100, GPG_ERR_CERT_EXPIRED = 101, GPG_ERR_CERT_TOO_YOUNG = 102, GPG_ERR_UNSUPPORTED_CERT = 103, GPG_ERR_UNKNOWN_SEXP = 104, GPG_ERR_UNSUPPORTED_PROTECTION = 105, GPG_ERR_CORRUPTED_PROTECTION = 106, GPG_ERR_AMBIGUOUS_NAME = 107, GPG_ERR_CARD = 108, GPG_ERR_CARD_RESET = 109, GPG_ERR_CARD_REMOVED = 110, GPG_ERR_INV_CARD = 111, GPG_ERR_CARD_NOT_PRESENT = 112, GPG_ERR_NO_PKCS15_APP = 113, GPG_ERR_NOT_CONFIRMED = 114, GPG_ERR_CONFIGURATION = 115, GPG_ERR_NO_POLICY_MATCH = 116, GPG_ERR_INV_INDEX = 117, GPG_ERR_INV_ID = 118, GPG_ERR_NO_SCDAEMON = 119, GPG_ERR_SCDAEMON = 120, GPG_ERR_UNSUPPORTED_PROTOCOL = 121, GPG_ERR_BAD_PIN_METHOD = 122, GPG_ERR_CARD_NOT_INITIALIZED = 123, GPG_ERR_UNSUPPORTED_OPERATION = 124, GPG_ERR_WRONG_KEY_USAGE = 125, GPG_ERR_NOTHING_FOUND = 126, GPG_ERR_WRONG_BLOB_TYPE = 127, GPG_ERR_MISSING_VALUE = 128, GPG_ERR_HARDWARE = 129, GPG_ERR_PIN_BLOCKED = 130, GPG_ERR_USE_CONDITIONS = 131, GPG_ERR_PIN_NOT_SYNCED = 132, GPG_ERR_INV_CRL = 133, GPG_ERR_BAD_BER = 134, GPG_ERR_INV_BER = 135, GPG_ERR_ELEMENT_NOT_FOUND = 136, GPG_ERR_IDENTIFIER_NOT_FOUND = 137, GPG_ERR_INV_TAG = 138, GPG_ERR_INV_LENGTH = 139, GPG_ERR_INV_KEYINFO = 140, GPG_ERR_UNEXPECTED_TAG = 141, GPG_ERR_NOT_DER_ENCODED = 142, GPG_ERR_NO_CMS_OBJ = 143, GPG_ERR_INV_CMS_OBJ = 144, GPG_ERR_UNKNOWN_CMS_OBJ = 145, GPG_ERR_UNSUPPORTED_CMS_OBJ = 146, GPG_ERR_UNSUPPORTED_ENCODING = 147, GPG_ERR_UNSUPPORTED_CMS_VERSION = 148, GPG_ERR_UNKNOWN_ALGORITHM = 149, GPG_ERR_INV_ENGINE = 150, GPG_ERR_PUBKEY_NOT_TRUSTED = 151, GPG_ERR_DECRYPT_FAILED = 152, GPG_ERR_KEY_EXPIRED = 153, GPG_ERR_SIG_EXPIRED = 154, GPG_ERR_ENCODING_PROBLEM = 155, GPG_ERR_INV_STATE = 156, GPG_ERR_DUP_VALUE = 157, GPG_ERR_MISSING_ACTION = 158, GPG_ERR_MODULE_NOT_FOUND = 159, GPG_ERR_INV_OID_STRING = 160, GPG_ERR_INV_TIME = 161, GPG_ERR_INV_CRL_OBJ = 162, GPG_ERR_UNSUPPORTED_CRL_VERSION = 163, GPG_ERR_INV_CERT_OBJ = 164, GPG_ERR_UNKNOWN_NAME = 165, GPG_ERR_LOCALE_PROBLEM = 166, GPG_ERR_NOT_LOCKED = 167, GPG_ERR_PROTOCOL_VIOLATION = 168, GPG_ERR_INV_MAC = 169, GPG_ERR_INV_REQUEST = 170, GPG_ERR_UNKNOWN_EXTN = 171, GPG_ERR_UNKNOWN_CRIT_EXTN = 172, GPG_ERR_LOCKED = 173, GPG_ERR_UNKNOWN_OPTION = 174, GPG_ERR_UNKNOWN_COMMAND = 175, GPG_ERR_NOT_OPERATIONAL = 176, GPG_ERR_NO_PASSPHRASE = 177, GPG_ERR_NO_PIN = 178, GPG_ERR_NOT_ENABLED = 179, GPG_ERR_NO_ENGINE = 180, GPG_ERR_MISSING_KEY = 181, GPG_ERR_TOO_MANY = 182, GPG_ERR_LIMIT_REACHED = 183, GPG_ERR_NOT_INITIALIZED = 184, GPG_ERR_MISSING_ISSUER_CERT = 185, GPG_ERR_NO_KEYSERVER = 186, GPG_ERR_INV_CURVE = 187, GPG_ERR_UNKNOWN_CURVE = 188, GPG_ERR_DUP_KEY = 189, GPG_ERR_AMBIGUOUS = 190, GPG_ERR_NO_CRYPT_CTX = 191, GPG_ERR_WRONG_CRYPT_CTX = 192, GPG_ERR_BAD_CRYPT_CTX = 193, GPG_ERR_CRYPT_CTX_CONFLICT = 194, GPG_ERR_BROKEN_PUBKEY = 195, GPG_ERR_BROKEN_SECKEY = 196, GPG_ERR_MAC_ALGO = 197, GPG_ERR_FULLY_CANCELED = 198, GPG_ERR_UNFINISHED = 199, GPG_ERR_BUFFER_TOO_SHORT = 200, GPG_ERR_SEXP_INV_LEN_SPEC = 201, GPG_ERR_SEXP_STRING_TOO_LONG = 202, GPG_ERR_SEXP_UNMATCHED_PAREN = 203, GPG_ERR_SEXP_NOT_CANONICAL = 204, GPG_ERR_SEXP_BAD_CHARACTER = 205, GPG_ERR_SEXP_BAD_QUOTATION = 206, GPG_ERR_SEXP_ZERO_PREFIX = 207, GPG_ERR_SEXP_NESTED_DH = 208, GPG_ERR_SEXP_UNMATCHED_DH = 209, GPG_ERR_SEXP_UNEXPECTED_PUNC = 210, GPG_ERR_SEXP_BAD_HEX_CHAR = 211, GPG_ERR_SEXP_ODD_HEX_NUMBERS = 212, GPG_ERR_SEXP_BAD_OCT_CHAR = 213, GPG_ERR_SUBKEYS_EXP_OR_REV = 217, GPG_ERR_DB_CORRUPTED = 218, GPG_ERR_SERVER_FAILED = 219, GPG_ERR_NO_NAME = 220, GPG_ERR_NO_KEY = 221, GPG_ERR_LEGACY_KEY = 222, GPG_ERR_REQUEST_TOO_SHORT = 223, GPG_ERR_REQUEST_TOO_LONG = 224, GPG_ERR_OBJ_TERM_STATE = 225, GPG_ERR_NO_CERT_CHAIN = 226, GPG_ERR_CERT_TOO_LARGE = 227, GPG_ERR_INV_RECORD = 228, GPG_ERR_BAD_MAC = 229, GPG_ERR_UNEXPECTED_MSG = 230, GPG_ERR_COMPR_FAILED = 231, GPG_ERR_WOULD_WRAP = 232, GPG_ERR_FATAL_ALERT = 233, GPG_ERR_NO_CIPHER = 234, GPG_ERR_MISSING_CLIENT_CERT = 235, GPG_ERR_CLOSE_NOTIFY = 236, GPG_ERR_TICKET_EXPIRED = 237, GPG_ERR_BAD_TICKET = 238, GPG_ERR_UNKNOWN_IDENTITY = 239, GPG_ERR_BAD_HS_CERT = 240, GPG_ERR_BAD_HS_CERT_REQ = 241, GPG_ERR_BAD_HS_CERT_VER = 242, GPG_ERR_BAD_HS_CHANGE_CIPHER = 243, GPG_ERR_BAD_HS_CLIENT_HELLO = 244, GPG_ERR_BAD_HS_SERVER_HELLO = 245, GPG_ERR_BAD_HS_SERVER_HELLO_DONE = 246, GPG_ERR_BAD_HS_FINISHED = 247, GPG_ERR_BAD_HS_SERVER_KEX = 248, GPG_ERR_BAD_HS_CLIENT_KEX = 249, GPG_ERR_BOGUS_STRING = 250, GPG_ERR_FORBIDDEN = 251, GPG_ERR_KEY_DISABLED = 252, GPG_ERR_KEY_ON_CARD = 253, GPG_ERR_INV_LOCK_OBJ = 254, GPG_ERR_TRUE = 255, GPG_ERR_FALSE = 256, GPG_ERR_ASS_GENERAL = 257, GPG_ERR_ASS_ACCEPT_FAILED = 258, GPG_ERR_ASS_CONNECT_FAILED = 259, GPG_ERR_ASS_INV_RESPONSE = 260, GPG_ERR_ASS_INV_VALUE = 261, GPG_ERR_ASS_INCOMPLETE_LINE = 262, GPG_ERR_ASS_LINE_TOO_LONG = 263, GPG_ERR_ASS_NESTED_COMMANDS = 264, GPG_ERR_ASS_NO_DATA_CB = 265, GPG_ERR_ASS_NO_INQUIRE_CB = 266, GPG_ERR_ASS_NOT_A_SERVER = 267, GPG_ERR_ASS_NOT_A_CLIENT = 268, GPG_ERR_ASS_SERVER_START = 269, GPG_ERR_ASS_READ_ERROR = 270, GPG_ERR_ASS_WRITE_ERROR = 271, GPG_ERR_ASS_TOO_MUCH_DATA = 273, GPG_ERR_ASS_UNEXPECTED_CMD = 274, GPG_ERR_ASS_UNKNOWN_CMD = 275, GPG_ERR_ASS_SYNTAX = 276, GPG_ERR_ASS_CANCELED = 277, GPG_ERR_ASS_NO_INPUT = 278, GPG_ERR_ASS_NO_OUTPUT = 279, GPG_ERR_ASS_PARAMETER = 280, GPG_ERR_ASS_UNKNOWN_INQUIRE = 281, GPG_ERR_ENGINE_TOO_OLD = 300, GPG_ERR_WINDOW_TOO_SMALL = 301, GPG_ERR_WINDOW_TOO_LARGE = 302, GPG_ERR_MISSING_ENVVAR = 303, GPG_ERR_USER_ID_EXISTS = 304, GPG_ERR_NAME_EXISTS = 305, GPG_ERR_DUP_NAME = 306, GPG_ERR_TOO_YOUNG = 307, GPG_ERR_TOO_OLD = 308, GPG_ERR_UNKNOWN_FLAG = 309, GPG_ERR_INV_ORDER = 310, GPG_ERR_ALREADY_FETCHED = 311, GPG_ERR_TRY_LATER = 312, GPG_ERR_WRONG_NAME = 313, GPG_ERR_SYSTEM_BUG = 666, GPG_ERR_DNS_UNKNOWN = 711, GPG_ERR_DNS_SECTION = 712, GPG_ERR_DNS_ADDRESS = 713, GPG_ERR_DNS_NO_QUERY = 714, GPG_ERR_DNS_NO_ANSWER = 715, GPG_ERR_DNS_CLOSED = 716, GPG_ERR_DNS_VERIFY = 717, GPG_ERR_DNS_TIMEOUT = 718, GPG_ERR_LDAP_GENERAL = 721, GPG_ERR_LDAP_ATTR_GENERAL = 722, GPG_ERR_LDAP_NAME_GENERAL = 723, GPG_ERR_LDAP_SECURITY_GENERAL = 724, GPG_ERR_LDAP_SERVICE_GENERAL = 725, GPG_ERR_LDAP_UPDATE_GENERAL = 726, GPG_ERR_LDAP_E_GENERAL = 727, GPG_ERR_LDAP_X_GENERAL = 728, GPG_ERR_LDAP_OTHER_GENERAL = 729, GPG_ERR_LDAP_X_CONNECTING = 750, GPG_ERR_LDAP_REFERRAL_LIMIT = 751, GPG_ERR_LDAP_CLIENT_LOOP = 752, GPG_ERR_LDAP_NO_RESULTS = 754, GPG_ERR_LDAP_CONTROL_NOT_FOUND = 755, GPG_ERR_LDAP_NOT_SUPPORTED = 756, GPG_ERR_LDAP_CONNECT = 757, GPG_ERR_LDAP_NO_MEMORY = 758, GPG_ERR_LDAP_PARAM = 759, GPG_ERR_LDAP_USER_CANCELLED = 760, GPG_ERR_LDAP_FILTER = 761, GPG_ERR_LDAP_AUTH_UNKNOWN = 762, GPG_ERR_LDAP_TIMEOUT = 763, GPG_ERR_LDAP_DECODING = 764, GPG_ERR_LDAP_ENCODING = 765, GPG_ERR_LDAP_LOCAL = 766, GPG_ERR_LDAP_SERVER_DOWN = 767, GPG_ERR_LDAP_SUCCESS = 768, GPG_ERR_LDAP_OPERATIONS = 769, GPG_ERR_LDAP_PROTOCOL = 770, GPG_ERR_LDAP_TIMELIMIT = 771, GPG_ERR_LDAP_SIZELIMIT = 772, GPG_ERR_LDAP_COMPARE_FALSE = 773, GPG_ERR_LDAP_COMPARE_TRUE = 774, GPG_ERR_LDAP_UNSUPPORTED_AUTH = 775, GPG_ERR_LDAP_STRONG_AUTH_RQRD = 776, GPG_ERR_LDAP_PARTIAL_RESULTS = 777, GPG_ERR_LDAP_REFERRAL = 778, GPG_ERR_LDAP_ADMINLIMIT = 779, GPG_ERR_LDAP_UNAVAIL_CRIT_EXTN = 780, GPG_ERR_LDAP_CONFIDENT_RQRD = 781, GPG_ERR_LDAP_SASL_BIND_INPROG = 782, GPG_ERR_LDAP_NO_SUCH_ATTRIBUTE = 784, GPG_ERR_LDAP_UNDEFINED_TYPE = 785, GPG_ERR_LDAP_BAD_MATCHING = 786, GPG_ERR_LDAP_CONST_VIOLATION = 787, GPG_ERR_LDAP_TYPE_VALUE_EXISTS = 788, GPG_ERR_LDAP_INV_SYNTAX = 789, GPG_ERR_LDAP_NO_SUCH_OBJ = 800, GPG_ERR_LDAP_ALIAS_PROBLEM = 801, GPG_ERR_LDAP_INV_DN_SYNTAX = 802, GPG_ERR_LDAP_IS_LEAF = 803, GPG_ERR_LDAP_ALIAS_DEREF = 804, GPG_ERR_LDAP_X_PROXY_AUTH_FAIL = 815, GPG_ERR_LDAP_BAD_AUTH = 816, GPG_ERR_LDAP_INV_CREDENTIALS = 817, GPG_ERR_LDAP_INSUFFICIENT_ACC = 818, GPG_ERR_LDAP_BUSY = 819, GPG_ERR_LDAP_UNAVAILABLE = 820, GPG_ERR_LDAP_UNWILL_TO_PERFORM = 821, GPG_ERR_LDAP_LOOP_DETECT = 822, GPG_ERR_LDAP_NAMING_VIOLATION = 832, GPG_ERR_LDAP_OBJ_CLS_VIOLATION = 833, GPG_ERR_LDAP_NOT_ALLOW_NONLEAF = 834, GPG_ERR_LDAP_NOT_ALLOW_ON_RDN = 835, GPG_ERR_LDAP_ALREADY_EXISTS = 836, GPG_ERR_LDAP_NO_OBJ_CLASS_MODS = 837, GPG_ERR_LDAP_RESULTS_TOO_LARGE = 838, GPG_ERR_LDAP_AFFECTS_MULT_DSAS = 839, GPG_ERR_LDAP_VLV = 844, GPG_ERR_LDAP_OTHER = 848, GPG_ERR_LDAP_CUP_RESOURCE_LIMIT = 881, GPG_ERR_LDAP_CUP_SEC_VIOLATION = 882, GPG_ERR_LDAP_CUP_INV_DATA = 883, GPG_ERR_LDAP_CUP_UNSUP_SCHEME = 884, GPG_ERR_LDAP_CUP_RELOAD = 885, GPG_ERR_LDAP_CANCELLED = 886, GPG_ERR_LDAP_NO_SUCH_OPERATION = 887, GPG_ERR_LDAP_TOO_LATE = 888, GPG_ERR_LDAP_CANNOT_CANCEL = 889, GPG_ERR_LDAP_ASSERTION_FAILED = 890, GPG_ERR_LDAP_PROX_AUTH_DENIED = 891, GPG_ERR_USER_1 = 1024, GPG_ERR_USER_2 = 1025, GPG_ERR_USER_3 = 1026, GPG_ERR_USER_4 = 1027, GPG_ERR_USER_5 = 1028, GPG_ERR_USER_6 = 1029, GPG_ERR_USER_7 = 1030, GPG_ERR_USER_8 = 1031, GPG_ERR_USER_9 = 1032, GPG_ERR_USER_10 = 1033, GPG_ERR_USER_11 = 1034, GPG_ERR_USER_12 = 1035, GPG_ERR_USER_13 = 1036, GPG_ERR_USER_14 = 1037, GPG_ERR_USER_15 = 1038, GPG_ERR_USER_16 = 1039, GPG_ERR_MISSING_ERRNO = 16381, GPG_ERR_UNKNOWN_ERRNO = 16382, GPG_ERR_EOF = 16383, /* The following error codes are used to map system errors. */ #define GPG_ERR_SYSTEM_ERROR (1 << 15) GPG_ERR_E2BIG = GPG_ERR_SYSTEM_ERROR | 0, GPG_ERR_EACCES = GPG_ERR_SYSTEM_ERROR | 1, GPG_ERR_EADDRINUSE = GPG_ERR_SYSTEM_ERROR | 2, GPG_ERR_EADDRNOTAVAIL = GPG_ERR_SYSTEM_ERROR | 3, GPG_ERR_EADV = GPG_ERR_SYSTEM_ERROR | 4, GPG_ERR_EAFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 5, GPG_ERR_EAGAIN = GPG_ERR_SYSTEM_ERROR | 6, GPG_ERR_EALREADY = GPG_ERR_SYSTEM_ERROR | 7, GPG_ERR_EAUTH = GPG_ERR_SYSTEM_ERROR | 8, GPG_ERR_EBACKGROUND = GPG_ERR_SYSTEM_ERROR | 9, GPG_ERR_EBADE = GPG_ERR_SYSTEM_ERROR | 10, GPG_ERR_EBADF = GPG_ERR_SYSTEM_ERROR | 11, GPG_ERR_EBADFD = GPG_ERR_SYSTEM_ERROR | 12, GPG_ERR_EBADMSG = GPG_ERR_SYSTEM_ERROR | 13, GPG_ERR_EBADR = GPG_ERR_SYSTEM_ERROR | 14, GPG_ERR_EBADRPC = GPG_ERR_SYSTEM_ERROR | 15, GPG_ERR_EBADRQC = GPG_ERR_SYSTEM_ERROR | 16, GPG_ERR_EBADSLT = GPG_ERR_SYSTEM_ERROR | 17, GPG_ERR_EBFONT = GPG_ERR_SYSTEM_ERROR | 18, GPG_ERR_EBUSY = GPG_ERR_SYSTEM_ERROR | 19, GPG_ERR_ECANCELED = GPG_ERR_SYSTEM_ERROR | 20, GPG_ERR_ECHILD = GPG_ERR_SYSTEM_ERROR | 21, GPG_ERR_ECHRNG = GPG_ERR_SYSTEM_ERROR | 22, GPG_ERR_ECOMM = GPG_ERR_SYSTEM_ERROR | 23, GPG_ERR_ECONNABORTED = GPG_ERR_SYSTEM_ERROR | 24, GPG_ERR_ECONNREFUSED = GPG_ERR_SYSTEM_ERROR | 25, GPG_ERR_ECONNRESET = GPG_ERR_SYSTEM_ERROR | 26, GPG_ERR_ED = GPG_ERR_SYSTEM_ERROR | 27, GPG_ERR_EDEADLK = GPG_ERR_SYSTEM_ERROR | 28, GPG_ERR_EDEADLOCK = GPG_ERR_SYSTEM_ERROR | 29, GPG_ERR_EDESTADDRREQ = GPG_ERR_SYSTEM_ERROR | 30, GPG_ERR_EDIED = GPG_ERR_SYSTEM_ERROR | 31, GPG_ERR_EDOM = GPG_ERR_SYSTEM_ERROR | 32, GPG_ERR_EDOTDOT = GPG_ERR_SYSTEM_ERROR | 33, GPG_ERR_EDQUOT = GPG_ERR_SYSTEM_ERROR | 34, GPG_ERR_EEXIST = GPG_ERR_SYSTEM_ERROR | 35, GPG_ERR_EFAULT = GPG_ERR_SYSTEM_ERROR | 36, GPG_ERR_EFBIG = GPG_ERR_SYSTEM_ERROR | 37, GPG_ERR_EFTYPE = GPG_ERR_SYSTEM_ERROR | 38, GPG_ERR_EGRATUITOUS = GPG_ERR_SYSTEM_ERROR | 39, GPG_ERR_EGREGIOUS = GPG_ERR_SYSTEM_ERROR | 40, GPG_ERR_EHOSTDOWN = GPG_ERR_SYSTEM_ERROR | 41, GPG_ERR_EHOSTUNREACH = GPG_ERR_SYSTEM_ERROR | 42, GPG_ERR_EIDRM = GPG_ERR_SYSTEM_ERROR | 43, GPG_ERR_EIEIO = GPG_ERR_SYSTEM_ERROR | 44, GPG_ERR_EILSEQ = GPG_ERR_SYSTEM_ERROR | 45, GPG_ERR_EINPROGRESS = GPG_ERR_SYSTEM_ERROR | 46, GPG_ERR_EINTR = GPG_ERR_SYSTEM_ERROR | 47, GPG_ERR_EINVAL = GPG_ERR_SYSTEM_ERROR | 48, GPG_ERR_EIO = GPG_ERR_SYSTEM_ERROR | 49, GPG_ERR_EISCONN = GPG_ERR_SYSTEM_ERROR | 50, GPG_ERR_EISDIR = GPG_ERR_SYSTEM_ERROR | 51, GPG_ERR_EISNAM = GPG_ERR_SYSTEM_ERROR | 52, GPG_ERR_EL2HLT = GPG_ERR_SYSTEM_ERROR | 53, GPG_ERR_EL2NSYNC = GPG_ERR_SYSTEM_ERROR | 54, GPG_ERR_EL3HLT = GPG_ERR_SYSTEM_ERROR | 55, GPG_ERR_EL3RST = GPG_ERR_SYSTEM_ERROR | 56, GPG_ERR_ELIBACC = GPG_ERR_SYSTEM_ERROR | 57, GPG_ERR_ELIBBAD = GPG_ERR_SYSTEM_ERROR | 58, GPG_ERR_ELIBEXEC = GPG_ERR_SYSTEM_ERROR | 59, GPG_ERR_ELIBMAX = GPG_ERR_SYSTEM_ERROR | 60, GPG_ERR_ELIBSCN = GPG_ERR_SYSTEM_ERROR | 61, GPG_ERR_ELNRNG = GPG_ERR_SYSTEM_ERROR | 62, GPG_ERR_ELOOP = GPG_ERR_SYSTEM_ERROR | 63, GPG_ERR_EMEDIUMTYPE = GPG_ERR_SYSTEM_ERROR | 64, GPG_ERR_EMFILE = GPG_ERR_SYSTEM_ERROR | 65, GPG_ERR_EMLINK = GPG_ERR_SYSTEM_ERROR | 66, GPG_ERR_EMSGSIZE = GPG_ERR_SYSTEM_ERROR | 67, GPG_ERR_EMULTIHOP = GPG_ERR_SYSTEM_ERROR | 68, GPG_ERR_ENAMETOOLONG = GPG_ERR_SYSTEM_ERROR | 69, GPG_ERR_ENAVAIL = GPG_ERR_SYSTEM_ERROR | 70, GPG_ERR_ENEEDAUTH = GPG_ERR_SYSTEM_ERROR | 71, GPG_ERR_ENETDOWN = GPG_ERR_SYSTEM_ERROR | 72, GPG_ERR_ENETRESET = GPG_ERR_SYSTEM_ERROR | 73, GPG_ERR_ENETUNREACH = GPG_ERR_SYSTEM_ERROR | 74, GPG_ERR_ENFILE = GPG_ERR_SYSTEM_ERROR | 75, GPG_ERR_ENOANO = GPG_ERR_SYSTEM_ERROR | 76, GPG_ERR_ENOBUFS = GPG_ERR_SYSTEM_ERROR | 77, GPG_ERR_ENOCSI = GPG_ERR_SYSTEM_ERROR | 78, GPG_ERR_ENODATA = GPG_ERR_SYSTEM_ERROR | 79, GPG_ERR_ENODEV = GPG_ERR_SYSTEM_ERROR | 80, GPG_ERR_ENOENT = GPG_ERR_SYSTEM_ERROR | 81, GPG_ERR_ENOEXEC = GPG_ERR_SYSTEM_ERROR | 82, GPG_ERR_ENOLCK = GPG_ERR_SYSTEM_ERROR | 83, GPG_ERR_ENOLINK = GPG_ERR_SYSTEM_ERROR | 84, GPG_ERR_ENOMEDIUM = GPG_ERR_SYSTEM_ERROR | 85, GPG_ERR_ENOMEM = GPG_ERR_SYSTEM_ERROR | 86, GPG_ERR_ENOMSG = GPG_ERR_SYSTEM_ERROR | 87, GPG_ERR_ENONET = GPG_ERR_SYSTEM_ERROR | 88, GPG_ERR_ENOPKG = GPG_ERR_SYSTEM_ERROR | 89, GPG_ERR_ENOPROTOOPT = GPG_ERR_SYSTEM_ERROR | 90, GPG_ERR_ENOSPC = GPG_ERR_SYSTEM_ERROR | 91, GPG_ERR_ENOSR = GPG_ERR_SYSTEM_ERROR | 92, GPG_ERR_ENOSTR = GPG_ERR_SYSTEM_ERROR | 93, GPG_ERR_ENOSYS = GPG_ERR_SYSTEM_ERROR | 94, GPG_ERR_ENOTBLK = GPG_ERR_SYSTEM_ERROR | 95, GPG_ERR_ENOTCONN = GPG_ERR_SYSTEM_ERROR | 96, GPG_ERR_ENOTDIR = GPG_ERR_SYSTEM_ERROR | 97, GPG_ERR_ENOTEMPTY = GPG_ERR_SYSTEM_ERROR | 98, GPG_ERR_ENOTNAM = GPG_ERR_SYSTEM_ERROR | 99, GPG_ERR_ENOTSOCK = GPG_ERR_SYSTEM_ERROR | 100, GPG_ERR_ENOTSUP = GPG_ERR_SYSTEM_ERROR | 101, GPG_ERR_ENOTTY = GPG_ERR_SYSTEM_ERROR | 102, GPG_ERR_ENOTUNIQ = GPG_ERR_SYSTEM_ERROR | 103, GPG_ERR_ENXIO = GPG_ERR_SYSTEM_ERROR | 104, GPG_ERR_EOPNOTSUPP = GPG_ERR_SYSTEM_ERROR | 105, GPG_ERR_EOVERFLOW = GPG_ERR_SYSTEM_ERROR | 106, GPG_ERR_EPERM = GPG_ERR_SYSTEM_ERROR | 107, GPG_ERR_EPFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 108, GPG_ERR_EPIPE = GPG_ERR_SYSTEM_ERROR | 109, GPG_ERR_EPROCLIM = GPG_ERR_SYSTEM_ERROR | 110, GPG_ERR_EPROCUNAVAIL = GPG_ERR_SYSTEM_ERROR | 111, GPG_ERR_EPROGMISMATCH = GPG_ERR_SYSTEM_ERROR | 112, GPG_ERR_EPROGUNAVAIL = GPG_ERR_SYSTEM_ERROR | 113, GPG_ERR_EPROTO = GPG_ERR_SYSTEM_ERROR | 114, GPG_ERR_EPROTONOSUPPORT = GPG_ERR_SYSTEM_ERROR | 115, GPG_ERR_EPROTOTYPE = GPG_ERR_SYSTEM_ERROR | 116, GPG_ERR_ERANGE = GPG_ERR_SYSTEM_ERROR | 117, GPG_ERR_EREMCHG = GPG_ERR_SYSTEM_ERROR | 118, GPG_ERR_EREMOTE = GPG_ERR_SYSTEM_ERROR | 119, GPG_ERR_EREMOTEIO = GPG_ERR_SYSTEM_ERROR | 120, GPG_ERR_ERESTART = GPG_ERR_SYSTEM_ERROR | 121, GPG_ERR_EROFS = GPG_ERR_SYSTEM_ERROR | 122, GPG_ERR_ERPCMISMATCH = GPG_ERR_SYSTEM_ERROR | 123, GPG_ERR_ESHUTDOWN = GPG_ERR_SYSTEM_ERROR | 124, GPG_ERR_ESOCKTNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 125, GPG_ERR_ESPIPE = GPG_ERR_SYSTEM_ERROR | 126, GPG_ERR_ESRCH = GPG_ERR_SYSTEM_ERROR | 127, GPG_ERR_ESRMNT = GPG_ERR_SYSTEM_ERROR | 128, GPG_ERR_ESTALE = GPG_ERR_SYSTEM_ERROR | 129, GPG_ERR_ESTRPIPE = GPG_ERR_SYSTEM_ERROR | 130, GPG_ERR_ETIME = GPG_ERR_SYSTEM_ERROR | 131, GPG_ERR_ETIMEDOUT = GPG_ERR_SYSTEM_ERROR | 132, GPG_ERR_ETOOMANYREFS = GPG_ERR_SYSTEM_ERROR | 133, GPG_ERR_ETXTBSY = GPG_ERR_SYSTEM_ERROR | 134, GPG_ERR_EUCLEAN = GPG_ERR_SYSTEM_ERROR | 135, GPG_ERR_EUNATCH = GPG_ERR_SYSTEM_ERROR | 136, GPG_ERR_EUSERS = GPG_ERR_SYSTEM_ERROR | 137, GPG_ERR_EWOULDBLOCK = GPG_ERR_SYSTEM_ERROR | 138, GPG_ERR_EXDEV = GPG_ERR_SYSTEM_ERROR | 139, GPG_ERR_EXFULL = GPG_ERR_SYSTEM_ERROR | 140, /* This is one more than the largest allowed entry. */ GPG_ERR_CODE_DIM = 65536 } gpg_err_code_t; /* The error value type gpg_error_t. */ /* We would really like to use bit-fields in a struct, but using * structs as return values can cause binary compatibility issues, in * particular if you want to do it efficiently (also see * -freg-struct-return option to GCC). */ typedef unsigned int gpg_error_t; /* We use the lowest 16 bits of gpg_error_t for error codes. The 16th * bit indicates system errors. */ #define GPG_ERR_CODE_MASK (GPG_ERR_CODE_DIM - 1) /* Bits 17 to 24 are reserved. */ /* We use the upper 7 bits of gpg_error_t for error sources. */ #define GPG_ERR_SOURCE_MASK (GPG_ERR_SOURCE_DIM - 1) #define GPG_ERR_SOURCE_SHIFT 24 /* The highest bit is reserved. It shouldn't be used to prevent * potential negative numbers when transmitting error values as * text. */ /* * GCC feature test. */ #if __GNUC__ # define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #else # define _GPG_ERR_GCC_VERSION 0 #endif #undef _GPG_ERR_HAVE_CONSTRUCTOR #if _GPG_ERR_GCC_VERSION > 30100 # define _GPG_ERR_CONSTRUCTOR __attribute__ ((__constructor__)) # define _GPG_ERR_HAVE_CONSTRUCTOR #else # define _GPG_ERR_CONSTRUCTOR #endif #define GPGRT_GCC_VERSION _GPG_ERR_GCC_VERSION #if _GPG_ERR_GCC_VERSION >= 29200 # define _GPGRT__RESTRICT __restrict__ #else # define _GPGRT__RESTRICT #endif /* The noreturn attribute. */ #if _GPG_ERR_GCC_VERSION >= 20500 # define GPGRT_ATTR_NORETURN __attribute__ ((noreturn)) #else # define GPGRT_ATTR_NORETURN #endif /* The printf attributes. */ #if _GPG_ERR_GCC_VERSION >= 40400 # define GPGRT_ATTR_PRINTF(f, a) \ __attribute__ ((format(__gnu_printf__,f,a))) # define GPGRT_ATTR_NR_PRINTF(f, a) \ __attribute__ ((noreturn, format(__gnu_printf__,f,a))) #elif _GPG_ERR_GCC_VERSION >= 20500 # define GPGRT_ATTR_PRINTF(f, a) \ __attribute__ ((format(printf,f,a))) # define GPGRT_ATTR_NR_PRINTF(f, a) \ __attribute__ ((noreturn, format(printf,f,a))) #else # define GPGRT_ATTR_PRINTF(f, a) # define GPGRT_ATTR_NR_PRINTF(f, a) #endif #if _GPG_ERR_GCC_VERSION >= 20800 # define GPGRT_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a))) #else # define GPGRT_ATTR_FORMAT_ARG(a) #endif /* The sentinel attribute. */ #if _GPG_ERR_GCC_VERSION >= 40000 # define GPGRT_ATTR_SENTINEL(a) __attribute__ ((sentinel(a))) #else # define GPGRT_ATTR_SENTINEL(a) #endif /* The used and unused attributes. * I am not sure since when the unused attribute is really supported. * In any case it it only needed for gcc versions which print a * warning. Thus let us require gcc >= 3.5. */ #if _GPG_ERR_GCC_VERSION >= 40000 # define GPGRT_ATTR_USED __attribute__ ((used)) #else # define GPGRT_ATTR_USED #endif #if _GPG_ERR_GCC_VERSION >= 30500 # define GPGRT_ATTR_UNUSED __attribute__ ((unused)) #else # define GPGRT_ATTR_UNUSED #endif /* The deprecated attribute. */ #if _GPG_ERR_GCC_VERSION >= 30100 # define GPGRT_ATTR_DEPRECATED __attribute__ ((__deprecated__)) #else # define GPGRT_ATTR_DEPRECATED #endif /* The pure attribute. */ #if _GPG_ERR_GCC_VERSION >= 29600 # define GPGRT_ATTR_PURE __attribute__ ((__pure__)) #else # define GPGRT_ATTR_PURE #endif /* The malloc attribute. */ #if _GPG_ERR_GCC_VERSION >= 30200 # define GPGRT_ATTR_MALLOC __attribute__ ((__malloc__)) #else # define GPGRT_ATTR_MALLOC #endif /* A macro defined if a GCC style __FUNCTION__ macro is available. */ #undef GPGRT_HAVE_MACRO_FUNCTION #if _GPG_ERR_GCC_VERSION >= 20500 # define GPGRT_HAVE_MACRO_FUNCTION 1 #endif /* A macro defined if the pragma GCC push_options is available. */ #undef GPGRT_HAVE_PRAGMA_GCC_PUSH #if _GPG_ERR_GCC_VERSION >= 40400 # define GPGRT_HAVE_PRAGMA_GCC_PUSH 1 #endif /* Detect LeakSanitizer (LSan) support for GCC and Clang based on * whether AddressSanitizer (ASAN) is enabled via -fsanitize=address). * Note that -fsanitize=leak just affect the linker options which * cannot be detected here. In that case you have to define the * GPGRT_HAVE_LEAK_SANITIZER macro manually. */ #ifdef __GNUC__ # ifdef __SANITIZE_ADDRESS__ # define GPGRT_HAVE_LEAK_SANITIZER # elif defined(__has_feature) # if __has_feature(address_sanitizer) # define GPGRT_HAVE_LEAK_SANITIZER # endif # endif #endif /* The new name for the inline macro. */ #define GPGRT_INLINE GPG_ERR_INLINE #ifdef GPGRT_HAVE_LEAK_SANITIZER # include #endif /* Mark heap objects as non-leaked memory. */ static GPGRT_INLINE void gpgrt_annotate_leaked_object (const void *p) { #ifdef GPGRT_HAVE_LEAK_SANITIZER __lsan_ignore_object(p); #else (void)p; #endif } /* * Initialization function. */ /* Initialize the library. This function should be run early. */ gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR; /* If this is defined, the library is already initialized by the constructor and does not need to be initialized explicitely. */ #undef GPG_ERR_INITIALIZED #ifdef _GPG_ERR_HAVE_CONSTRUCTOR # define GPG_ERR_INITIALIZED 1 # define gpgrt_init() do { gpg_err_init (); } while (0) #else # define gpgrt_init() do { ; } while (0) #endif /* See the source on how to use the deinit function; it is usually not required. */ void gpg_err_deinit (int mode); /* Register blocking system I/O clamping functions. */ void gpgrt_set_syscall_clamp (void (*pre)(void), void (*post)(void)); /* Get current I/O clamping functions. */ void gpgrt_get_syscall_clamp (void (**r_pre)(void), void (**r_post)(void)); /* Register a custom malloc/realloc/free function. */ void gpgrt_set_alloc_func (void *(*f)(void *a, size_t n)); /* * Constructor and accessor functions. */ /* Construct an error value from an error code and source. Within a * subsystem, use gpg_error. */ static GPG_ERR_INLINE gpg_error_t gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) { return code == GPG_ERR_NO_ERROR ? GPG_ERR_NO_ERROR : (((source & GPG_ERR_SOURCE_MASK) << GPG_ERR_SOURCE_SHIFT) | (code & GPG_ERR_CODE_MASK)); } /* The user should define GPG_ERR_SOURCE_DEFAULT before including this * file to specify a default source for gpg_error. */ #ifndef GPG_ERR_SOURCE_DEFAULT #define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_UNKNOWN #endif static GPG_ERR_INLINE gpg_error_t gpg_error (gpg_err_code_t code) { return gpg_err_make (GPG_ERR_SOURCE_DEFAULT, code); } /* Retrieve the error code from an error value. */ static GPG_ERR_INLINE gpg_err_code_t gpg_err_code (gpg_error_t err) { return (gpg_err_code_t) (err & GPG_ERR_CODE_MASK); } /* Retrieve the error source from an error value. */ static GPG_ERR_INLINE gpg_err_source_t gpg_err_source (gpg_error_t err) { return (gpg_err_source_t) ((err >> GPG_ERR_SOURCE_SHIFT) & GPG_ERR_SOURCE_MASK); } /* String functions. */ /* Return a pointer to a string containing a description of the error * code in the error value ERR. This function is not thread-safe. */ const char *gpg_strerror (gpg_error_t err); /* Return the error string for ERR in the user-supplied buffer BUF of * size BUFLEN. This function is, in contrast to gpg_strerror, * thread-safe if a thread-safe strerror_r() function is provided by * the system. If the function succeeds, 0 is returned and BUF * contains the string describing the error. If the buffer was not * large enough, ERANGE is returned and BUF contains as much of the * beginning of the error string as fits into the buffer. */ int gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen); /* Return a pointer to a string containing a description of the error * source in the error value ERR. */ const char *gpg_strsource (gpg_error_t err); /* * Mapping of system errors (errno). */ /* Retrieve the error code for the system error ERR. This returns * GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report * this). */ gpg_err_code_t gpg_err_code_from_errno (int err); /* Retrieve the system error for the error code CODE. This returns 0 * if CODE is not a system error code. */ int gpg_err_code_to_errno (gpg_err_code_t code); /* Retrieve the error code directly from the ERRNO variable. This * returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped * (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ gpg_err_code_t gpg_err_code_from_syserror (void); /* Set the ERRNO variable. This function is the preferred way to set * ERRNO due to peculiarities on WindowsCE. */ void gpg_err_set_errno (int err); /* Return or check the version. Both functions are identical. */ const char *gpgrt_check_version (const char *req_version); const char *gpg_error_check_version (const char *req_version); /* System specific type definitions. */ #include typedef ssize_t gpgrt_ssize_t; #include typedef int64_t gpgrt_off_t; /* Self-documenting convenience functions. */ static GPG_ERR_INLINE gpg_error_t gpg_err_make_from_errno (gpg_err_source_t source, int err) { return gpg_err_make (source, gpg_err_code_from_errno (err)); } static GPG_ERR_INLINE gpg_error_t gpg_error_from_errno (int err) { return gpg_error (gpg_err_code_from_errno (err)); } static GPG_ERR_INLINE gpg_error_t gpg_error_from_syserror (void) { return gpg_error (gpg_err_code_from_syserror ()); } /* * Malloc and friends */ void *gpgrt_realloc (void *a, size_t n); void *gpgrt_malloc (size_t n); void *gpgrt_calloc (size_t n, size_t m); char *gpgrt_strdup (const char *string); char *gpgrt_strconcat (const char *s1, ...) GPGRT_ATTR_SENTINEL(0); void gpgrt_free (void *a); /* * System specific function wrappers. */ /* A getenv replacement which mallocs the returned string. */ char *gpgrt_getenv (const char *name); /* A setenv and a unsetenv replacement.*/ gpg_err_code_t gpgrt_setenv (const char *name, const char *value, int overwrite); #define gpgrt_unsetenv(n) gpgrt_setenv ((n), NULL, 1) /* A wrapper around mkdir using a string for the mode. */ gpg_err_code_t gpgrt_mkdir (const char *name, const char *modestr); /* A simple wrapper around chdir. */ gpg_err_code_t gpgrt_chdir (const char *name); /* Return the current WD as a malloced string. */ char *gpgrt_getcwd (void); /* * Lock functions. */ #include typedef struct { long _vers; union { volatile char _priv[sizeof(pthread_mutex_t)]; long _x_align; long *_xp_align; } u; } gpgrt_lock_t; #define GPGRT_LOCK_INITIALIZER {1,{{0}}} #define GPGRT_LOCK_DEFINE(name) \ static gpgrt_lock_t name = GPGRT_LOCK_INITIALIZER /* NB: If GPGRT_LOCK_DEFINE is not used, zero out the lock variable before passing it to gpgrt_lock_init. */ gpg_err_code_t gpgrt_lock_init (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_lock (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_trylock (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_unlock (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_destroy (gpgrt_lock_t *lockhd); /* * Thread functions. */ gpg_err_code_t gpgrt_yield (void); /* * Estream */ /* The definition of this struct is entirely private. You must not use it for anything. It is only here so some functions can be implemented as macros. */ struct _gpgrt_stream_internal; struct _gpgrt__stream { /* The layout of this struct must never change. It may be grown, but only if all functions which access the new members are versioned. */ /* Various flags. */ struct { unsigned int magic: 16; unsigned int writing: 1; unsigned int reserved: 15; } flags; /* A pointer to the stream buffer. */ unsigned char *buffer; /* The size of the buffer in bytes. */ size_t buffer_size; /* The length of the usable data in the buffer, only valid when in read mode (see flags). */ size_t data_len; /* The current position of the offset pointer, valid in read and write mode. */ size_t data_offset; size_t data_flushed; unsigned char *unread_buffer; size_t unread_buffer_size; /* The number of unread bytes. */ size_t unread_data_len; /* A pointer to our internal data for this stream. */ struct _gpgrt_stream_internal *intern; }; /* The opaque type for an estream. */ typedef struct _gpgrt__stream *gpgrt_stream_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt__stream *estream_t; #endif typedef ssize_t (*gpgrt_cookie_read_function_t) (void *cookie, void *buffer, size_t size); typedef ssize_t (*gpgrt_cookie_write_function_t) (void *cookie, const void *buffer, size_t size); typedef int (*gpgrt_cookie_seek_function_t) (void *cookie, gpgrt_off_t *pos, int whence); typedef int (*gpgrt_cookie_close_function_t) (void *cookie); struct _gpgrt_cookie_io_functions { gpgrt_cookie_read_function_t func_read; gpgrt_cookie_write_function_t func_write; gpgrt_cookie_seek_function_t func_seek; gpgrt_cookie_close_function_t func_close; }; typedef struct _gpgrt_cookie_io_functions gpgrt_cookie_io_functions_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt_cookie_io_functions es_cookie_io_functions_t; #define es_cookie_read_function_t gpgrt_cookie_read_function_t #define es_cookie_write_function_t gpgrt_cookie_read_function_t #define es_cookie_seek_function_t gpgrt_cookie_read_function_t #define es_cookie_close_function_t gpgrt_cookie_read_function_t #endif enum gpgrt_syshd_types { GPGRT_SYSHD_NONE = 0, /* No system handle available. */ GPGRT_SYSHD_FD = 1, /* A file descriptor as returned by open(). */ GPGRT_SYSHD_SOCK = 2, /* A socket as returned by socket(). */ GPGRT_SYSHD_RVID = 3, /* A rendezvous id (see libassuan's gpgcedev.c). */ GPGRT_SYSHD_HANDLE = 4 /* A HANDLE object (Windows). */ }; struct _gpgrt_syshd { enum gpgrt_syshd_types type; union { int fd; int sock; int rvid; void *handle; } u; }; typedef struct _gpgrt_syshd gpgrt_syshd_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt_syshd es_syshd_t; #define ES_SYSHD_NONE GPGRT_SYSHD_NONE #define ES_SYSHD_FD GPGRT_SYSHD_FD #define ES_SYSHD_SOCK GPGRT_SYSHD_SOCK #define ES_SYSHD_RVID GPGRT_SYSHD_RVID #define ES_SYSHD_HANDLE GPGRT_SYSHD_HANDLE #endif /* The object used with gpgrt_poll. */ struct _gpgrt_poll_s { gpgrt_stream_t stream; unsigned int want_read:1; unsigned int want_write:1; unsigned int want_oob:1; unsigned int want_rdhup:1; unsigned int _reserv1:4; unsigned int got_read:1; unsigned int got_write:1; unsigned int got_oob:1; unsigned int got_rdhup:1; unsigned int _reserv2:4; unsigned int got_err:1; unsigned int got_hup:1; unsigned int got_nval:1; unsigned int _reserv3:4; unsigned int ignore:1; unsigned int user:8; /* For application use. */ }; typedef struct _gpgrt_poll_s gpgrt_poll_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt_poll_s es_poll_t; #endif gpgrt_stream_t gpgrt_fopen (const char *_GPGRT__RESTRICT path, const char *_GPGRT__RESTRICT mode); gpgrt_stream_t gpgrt_mopen (void *_GPGRT__RESTRICT data, size_t data_n, size_t data_len, unsigned int grow, void *(*func_realloc) (void *mem, size_t size), void (*func_free) (void *mem), const char *_GPGRT__RESTRICT mode); gpgrt_stream_t gpgrt_fopenmem (size_t memlimit, const char *_GPGRT__RESTRICT mode); gpgrt_stream_t gpgrt_fopenmem_init (size_t memlimit, const char *_GPGRT__RESTRICT mode, const void *data, size_t datalen); gpgrt_stream_t gpgrt_fdopen (int filedes, const char *mode); gpgrt_stream_t gpgrt_fdopen_nc (int filedes, const char *mode); gpgrt_stream_t gpgrt_sysopen (gpgrt_syshd_t *syshd, const char *mode); gpgrt_stream_t gpgrt_sysopen_nc (gpgrt_syshd_t *syshd, const char *mode); gpgrt_stream_t gpgrt_fpopen (FILE *fp, const char *mode); gpgrt_stream_t gpgrt_fpopen_nc (FILE *fp, const char *mode); gpgrt_stream_t gpgrt_freopen (const char *_GPGRT__RESTRICT path, const char *_GPGRT__RESTRICT mode, gpgrt_stream_t _GPGRT__RESTRICT stream); gpgrt_stream_t gpgrt_fopencookie (void *_GPGRT__RESTRICT cookie, const char *_GPGRT__RESTRICT mode, gpgrt_cookie_io_functions_t functions); int gpgrt_fclose (gpgrt_stream_t stream); int gpgrt_fclose_snatch (gpgrt_stream_t stream, void **r_buffer, size_t *r_buflen); int gpgrt_onclose (gpgrt_stream_t stream, int mode, void (*fnc) (gpgrt_stream_t, void*), void *fnc_value); int gpgrt_fileno (gpgrt_stream_t stream); int gpgrt_fileno_unlocked (gpgrt_stream_t stream); int gpgrt_syshd (gpgrt_stream_t stream, gpgrt_syshd_t *syshd); int gpgrt_syshd_unlocked (gpgrt_stream_t stream, gpgrt_syshd_t *syshd); void _gpgrt_set_std_fd (int no, int fd); gpgrt_stream_t _gpgrt_get_std_stream (int fd); #define gpgrt_stdin _gpgrt_get_std_stream (0) #define gpgrt_stdout _gpgrt_get_std_stream (1) #define gpgrt_stderr _gpgrt_get_std_stream (2) void gpgrt_flockfile (gpgrt_stream_t stream); int gpgrt_ftrylockfile (gpgrt_stream_t stream); void gpgrt_funlockfile (gpgrt_stream_t stream); int gpgrt_feof (gpgrt_stream_t stream); int gpgrt_feof_unlocked (gpgrt_stream_t stream); int gpgrt_ferror (gpgrt_stream_t stream); int gpgrt_ferror_unlocked (gpgrt_stream_t stream); void gpgrt_clearerr (gpgrt_stream_t stream); void gpgrt_clearerr_unlocked (gpgrt_stream_t stream); int _gpgrt_pending (gpgrt_stream_t stream); /* (private) */ int _gpgrt_pending_unlocked (gpgrt_stream_t stream); /* (private) */ #define gpgrt_pending(stream) _gpgrt_pending (stream) #define gpgrt_pending_unlocked(stream) \ (((!(stream)->flags.writing) \ && (((stream)->data_offset < (stream)->data_len) \ || ((stream)->unread_data_len))) \ ? 1 : _gpgrt_pending_unlocked ((stream))) int gpgrt_fflush (gpgrt_stream_t stream); int gpgrt_fseek (gpgrt_stream_t stream, long int offset, int whence); int gpgrt_fseeko (gpgrt_stream_t stream, gpgrt_off_t offset, int whence); long int gpgrt_ftell (gpgrt_stream_t stream); gpgrt_off_t gpgrt_ftello (gpgrt_stream_t stream); void gpgrt_rewind (gpgrt_stream_t stream); int gpgrt_fgetc (gpgrt_stream_t stream); int gpgrt_fputc (int c, gpgrt_stream_t stream); int _gpgrt_getc_underflow (gpgrt_stream_t stream); /* (private) */ int _gpgrt_putc_overflow (int c, gpgrt_stream_t stream); /* (private) */ #define gpgrt_getc_unlocked(stream) \ (((!(stream)->flags.writing) \ && ((stream)->data_offset < (stream)->data_len) \ && (! (stream)->unread_data_len)) \ ? ((int) (stream)->buffer[((stream)->data_offset)++]) \ : _gpgrt_getc_underflow ((stream))) #define gpgrt_putc_unlocked(c, stream) \ (((stream)->flags.writing \ && ((stream)->data_offset < (stream)->buffer_size) \ && (c != '\n')) \ ? ((int) ((stream)->buffer[((stream)->data_offset)++] = (c))) \ : _gpgrt_putc_overflow ((c), (stream))) #define gpgrt_getc(stream) gpgrt_fgetc (stream) #define gpgrt_putc(c, stream) gpgrt_fputc (c, stream) int gpgrt_ungetc (int c, gpgrt_stream_t stream); int gpgrt_read (gpgrt_stream_t _GPGRT__RESTRICT stream, void *_GPGRT__RESTRICT buffer, size_t bytes_to_read, size_t *_GPGRT__RESTRICT bytes_read); int gpgrt_write (gpgrt_stream_t _GPGRT__RESTRICT stream, const void *_GPGRT__RESTRICT buffer, size_t bytes_to_write, size_t *_GPGRT__RESTRICT bytes_written); int gpgrt_write_sanitized (gpgrt_stream_t _GPGRT__RESTRICT stream, const void *_GPGRT__RESTRICT buffer, size_t length, const char *delimiters, size_t *_GPGRT__RESTRICT bytes_written); int gpgrt_write_hexstring (gpgrt_stream_t _GPGRT__RESTRICT stream, const void *_GPGRT__RESTRICT buffer, size_t length, int reserved, size_t *_GPGRT__RESTRICT bytes_written); size_t gpgrt_fread (void *_GPGRT__RESTRICT ptr, size_t size, size_t nitems, gpgrt_stream_t _GPGRT__RESTRICT stream); size_t gpgrt_fwrite (const void *_GPGRT__RESTRICT ptr, size_t size, size_t memb, gpgrt_stream_t _GPGRT__RESTRICT stream); char *gpgrt_fgets (char *_GPGRT__RESTRICT s, int n, gpgrt_stream_t _GPGRT__RESTRICT stream); int gpgrt_fputs (const char *_GPGRT__RESTRICT s, gpgrt_stream_t _GPGRT__RESTRICT stream); int gpgrt_fputs_unlocked (const char *_GPGRT__RESTRICT s, gpgrt_stream_t _GPGRT__RESTRICT stream); ssize_t gpgrt_getline (char *_GPGRT__RESTRICT *_GPGRT__RESTRICT lineptr, size_t *_GPGRT__RESTRICT n, gpgrt_stream_t stream); ssize_t gpgrt_read_line (gpgrt_stream_t stream, char **addr_of_buffer, size_t *length_of_buffer, size_t *max_length); int gpgrt_fprintf (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(2,3); int gpgrt_fprintf_unlocked (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(2,3); int gpgrt_printf (const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(1,2); int gpgrt_printf_unlocked (const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(1,2); int gpgrt_vfprintf (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(2,0); int gpgrt_vfprintf_unlocked (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(2,0); int gpgrt_setvbuf (gpgrt_stream_t _GPGRT__RESTRICT stream, char *_GPGRT__RESTRICT buf, int mode, size_t size); void gpgrt_setbuf (gpgrt_stream_t _GPGRT__RESTRICT stream, char *_GPGRT__RESTRICT buf); void gpgrt_set_binary (gpgrt_stream_t stream); int gpgrt_set_nonblock (gpgrt_stream_t stream, int onoff); int gpgrt_get_nonblock (gpgrt_stream_t stream); int gpgrt_poll (gpgrt_poll_t *fdlist, unsigned int nfds, int timeout); gpgrt_stream_t gpgrt_tmpfile (void); void gpgrt_opaque_set (gpgrt_stream_t _GPGRT__RESTRICT stream, void *_GPGRT__RESTRICT opaque); void *gpgrt_opaque_get (gpgrt_stream_t stream); void gpgrt_fname_set (gpgrt_stream_t stream, const char *fname); const char *gpgrt_fname_get (gpgrt_stream_t stream); int gpgrt_asprintf (char **r_buf, const char * _GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(2,3); int gpgrt_vasprintf (char **r_buf, const char * _GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(2,0); char *gpgrt_bsprintf (const char * _GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(1,2); char *gpgrt_vbsprintf (const char * _GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(1,0); int gpgrt_snprintf (char *buf, size_t bufsize, const char * _GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(3,4); int gpgrt_vsnprintf (char *buf,size_t bufsize, const char * _GPGRT__RESTRICT format, va_list arg_ptr) GPGRT_ATTR_PRINTF(3,0); #ifdef GPGRT_ENABLE_ES_MACROS # define es_fopen gpgrt_fopen # define es_mopen gpgrt_mopen # define es_fopenmem gpgrt_fopenmem # define es_fopenmem_init gpgrt_fopenmem_init # define es_fdopen gpgrt_fdopen # define es_fdopen_nc gpgrt_fdopen_nc # define es_sysopen gpgrt_sysopen # define es_sysopen_nc gpgrt_sysopen_nc # define es_fpopen gpgrt_fpopen # define es_fpopen_nc gpgrt_fpopen_nc # define es_freopen gpgrt_freopen # define es_fopencookie gpgrt_fopencookie # define es_fclose gpgrt_fclose # define es_fclose_snatch gpgrt_fclose_snatch # define es_onclose gpgrt_onclose # define es_fileno gpgrt_fileno # define es_fileno_unlocked gpgrt_fileno_unlocked # define es_syshd gpgrt_syshd # define es_syshd_unlocked gpgrt_syshd_unlocked # define es_stdin _gpgrt_get_std_stream (0) # define es_stdout _gpgrt_get_std_stream (1) # define es_stderr _gpgrt_get_std_stream (2) # define es_flockfile gpgrt_flockfile # define es_ftrylockfile gpgrt_ftrylockfile # define es_funlockfile gpgrt_funlockfile # define es_feof gpgrt_feof # define es_feof_unlocked gpgrt_feof_unlocked # define es_ferror gpgrt_ferror # define es_ferror_unlocked gpgrt_ferror_unlocked # define es_clearerr gpgrt_clearerr # define es_clearerr_unlocked gpgrt_clearerr_unlocked # define es_pending gpgrt_pending # define es_pending_unlocked gpgrt_pending_unlocked # define es_fflush gpgrt_fflush # define es_fseek gpgrt_fseek # define es_fseeko gpgrt_fseeko # define es_ftell gpgrt_ftell # define es_ftello gpgrt_ftello # define es_rewind gpgrt_rewind # define es_fgetc gpgrt_fgetc # define es_fputc gpgrt_fputc # define es_getc_unlocked gpgrt_getc_unlocked # define es_putc_unlocked gpgrt_putc_unlocked # define es_getc gpgrt_getc # define es_putc gpgrt_putc # define es_ungetc gpgrt_ungetc # define es_read gpgrt_read # define es_write gpgrt_write # define es_write_sanitized gpgrt_write_sanitized # define es_write_hexstring gpgrt_write_hexstring # define es_fread gpgrt_fread # define es_fwrite gpgrt_fwrite # define es_fgets gpgrt_fgets # define es_fputs gpgrt_fputs # define es_fputs_unlocked gpgrt_fputs_unlocked # define es_getline gpgrt_getline # define es_read_line gpgrt_read_line # define es_free gpgrt_free # define es_fprintf gpgrt_fprintf # define es_fprintf_unlocked gpgrt_fprintf_unlocked # define es_printf gpgrt_printf # define es_printf_unlocked gpgrt_printf_unlocked # define es_vfprintf gpgrt_vfprintf # define es_vfprintf_unlocked gpgrt_vfprintf_unlocked # define es_setvbuf gpgrt_setvbuf # define es_setbuf gpgrt_setbuf # define es_set_binary gpgrt_set_binary # define es_set_nonblock gpgrt_set_nonblock # define es_get_nonblock gpgrt_get_nonblock # define es_poll gpgrt_poll # define es_tmpfile gpgrt_tmpfile # define es_opaque_set gpgrt_opaque_set # define es_opaque_get gpgrt_opaque_get # define es_fname_set gpgrt_fname_set # define es_fname_get gpgrt_fname_get # define es_asprintf gpgrt_asprintf # define es_vasprintf gpgrt_vasprintf # define es_bsprintf gpgrt_bsprintf # define es_vbsprintf gpgrt_vbsprintf #endif /*GPGRT_ENABLE_ES_MACROS*/ /* * Base64 encode and decode functions. */ struct _gpgrt_b64state; typedef struct _gpgrt_b64state *gpgrt_b64state_t; gpgrt_b64state_t gpgrt_b64enc_start (gpgrt_stream_t stream, const char *title); gpg_err_code_t gpgrt_b64enc_write (gpgrt_b64state_t state, const void *buffer, size_t nbytes); gpg_err_code_t gpgrt_b64enc_finish (gpgrt_b64state_t state); gpgrt_b64state_t gpgrt_b64dec_start (const char *title); gpg_error_t gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length, size_t *r_nbytes); gpg_error_t gpgrt_b64dec_finish (gpgrt_b64state_t state); /* * Logging functions */ /* Flag values for gpgrt_log_set_prefix. */ #define GPGRT_LOG_WITH_PREFIX 1 #define GPGRT_LOG_WITH_TIME 2 #define GPGRT_LOG_WITH_PID 4 #define GPGRT_LOG_RUN_DETACHED 256 #define GPGRT_LOG_NO_REGISTRY 512 /* Log levels as used by gpgrt_log. */ enum gpgrt_log_levels { GPGRT_LOGLVL_BEGIN, GPGRT_LOGLVL_CONT, GPGRT_LOGLVL_INFO, GPGRT_LOGLVL_WARN, GPGRT_LOGLVL_ERROR, GPGRT_LOGLVL_FATAL, GPGRT_LOGLVL_BUG, GPGRT_LOGLVL_DEBUG }; /* The next 4 functions are not thread-safe - call them early. */ void gpgrt_log_set_sink (const char *name, gpgrt_stream_t stream, int fd); void gpgrt_log_set_socket_dir_cb (const char *(*fnc)(void)); void gpgrt_log_set_pid_suffix_cb (int (*cb)(unsigned long *r_value)); void gpgrt_log_set_prefix (const char *text, unsigned int flags); int gpgrt_get_errorcount (int clear); void gpgrt_inc_errorcount (void); const char *gpgrt_log_get_prefix (unsigned int *flags); int gpgrt_log_test_fd (int fd); int gpgrt_log_get_fd (void); gpgrt_stream_t gpgrt_log_get_stream (void); void gpgrt_log (int level, const char *fmt, ...) GPGRT_ATTR_PRINTF(2,3); void gpgrt_logv (int level, const char *fmt, va_list arg_ptr); void gpgrt_logv_prefix (int level, const char *prefix, const char *fmt, va_list arg_ptr); void gpgrt_log_string (int level, const char *string); void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2); void gpgrt_log_fatal (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2); void gpgrt_log_error (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_info (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_debug (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_debug_string (const char *string, const char *fmt, ...) GPGRT_ATTR_PRINTF(2,3); void gpgrt_log_printf (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_printhex (const void *buffer, size_t length, const char *fmt, ...) GPGRT_ATTR_PRINTF(3,4); void gpgrt_log_clock (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_flush (void); void _gpgrt_log_assert (const char *expr, const char *file, int line, const char *func) GPGRT_ATTR_NORETURN; #ifdef GPGRT_HAVE_MACRO_FUNCTION # define gpgrt_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, __FUNCTION__)) #else /*!GPGRT_HAVE_MACRO_FUNCTION*/ # define gpgrt_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, NULL)) #endif /*!GPGRT_HAVE_MACRO_FUNCTION*/ #ifdef GPGRT_ENABLE_LOG_MACROS # define log_get_errorcount gpgrt_get_errorcount # define log_inc_errorcount gpgrt_inc_errorcount # define log_set_file(a) gpgrt_log_set_sink ((a), NULL, -1) # define log_set_fd(a) gpgrt_log_set_sink (NULL, NULL, (a)) # define log_set_stream(a) gpgrt_log_set_sink (NULL, (a), -1) # define log_set_socket_dir_cb gpgrt_log_set_socket_dir_cb # define log_set_pid_suffix_cb gpgrt_log_set_pid_suffix_cb # define log_set_prefix gpgrt_log_set_prefix # define log_get_prefix gpgrt_log_get_prefix # define log_test_fd gpgrt_log_test_fd # define log_get_fd gpgrt_log_get_fd # define log_get_stream gpgrt_log_get_stream # define log_log gpgrt_log # define log_logv gpgrt_logv # define log_logv_prefix gpgrt_logv_prefix # define log_string gpgrt_log_string # define log_bug gpgrt_log_bug # define log_fatal gpgrt_log_fatal # define log_error gpgrt_log_error # define log_info gpgrt_log_info # define log_debug gpgrt_log_debug # define log_debug_string gpgrt_log_debug_string # define log_printf gpgrt_log_printf # define log_printhex gpgrt_log_printhex # define log_clock gpgrt_log_clock # define log_flush gpgrt_log_flush # ifdef GPGRT_HAVE_MACRO_FUNCTION # define log_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, __FUNCTION__)) # else /*!GPGRT_HAVE_MACRO_FUNCTION*/ # define log_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, NULL)) # endif /*!GPGRT_HAVE_MACRO_FUNCTION*/ #endif /*GPGRT_ENABLE_LOG_MACROS*/ /* * Spawn functions (Not yet available) */ #define GPGRT_SPAWN_NONBLOCK 16 /* Set the streams to non-blocking. */ #define GPGRT_SPAWN_RUN_ASFW 64 /* Use AllowSetForegroundWindow on W32. */ #define GPGRT_SPAWN_DETACHED 128 /* Start the process in the background. */ #if 0 /* Function and convenience macros to create pipes. */ gpg_err_code_t gpgrt_make_pipe (int filedes[2], gpgrt_stream_t *r_fp, int direction, int nonblock); #define gpgrt_create_pipe(a) gpgrt_make_pipe ((a),NULL, 0, 0); #define gpgrt_create_inbound_pipe(a,b,c) gpgrt_make_pipe ((a), (b), -1,(c)); #define gpgrt_create_outbound_pipe(a,b,c) gpgrt_make_pipe ((a), (b), 1,(c)); /* Fork and exec PGMNAME. */ gpg_err_code_t gpgrt_spawn_process (const char *pgmname, const char *argv[], int *execpt, void (*preexec)(void), unsigned int flags, gpgrt_stream_t *r_infp, gpgrt_stream_t *r_outfp, gpgrt_stream_t *r_errfp, pid_t *pid); /* Fork and exec PGNNAME and connect the process to the given FDs. */ gpg_err_code_t gpgrt_spawn_process_fd (const char *pgmname, const char *argv[], int infd, int outfd, int errfd, pid_t *pid); /* Fork and exec PGMNAME as a detached process. */ gpg_err_code_t gpgrt_spawn_process_detached (const char *pgmname, const char *argv[], const char *envp[] ); /* Wait for a single process. */ gpg_err_code_t gpgrt_wait_process (const char *pgmname, pid_t pid, int hang, int *r_exitcode); /* Wait for a multiple processes. */ gpg_err_code_t gpgrt_wait_processes (const char **pgmnames, pid_t *pids, size_t count, int hang, int *r_exitcodes); /* Kill the process identified by PID. */ void gpgrt_kill_process (pid_t pid); /* Release process resources identified by PID. */ void gpgrt_release_process (pid_t pid); #endif /*0*/ /* * Option parsing. */ struct _gpgrt_argparse_internal_s; typedef struct { int *argc; /* Pointer to ARGC (value subject to change). */ char ***argv; /* Pointer to ARGV (value subject to change). */ unsigned int flags; /* Global flags. May be set prior to calling the parser. The parser may change the value. */ int err; /* Print error description for last option. Either 0, ARGPARSE_PRINT_WARNING or ARGPARSE_PRINT_ERROR. */ unsigned int lineno;/* The current line number. */ int r_opt; /* Returns option code. */ int r_type; /* Returns type of option value. */ union { int ret_int; long ret_long; unsigned long ret_ulong; char *ret_str; } r; /* Return values */ struct _gpgrt_argparse_internal_s *internal; } gpgrt_argparse_t; typedef struct { int short_opt; const char *long_opt; unsigned int flags; const char *description; /* Optional description. */ } gpgrt_opt_t; #ifdef GPGRT_ENABLE_ARGPARSE_MACROS /* Global flags for (gpgrt_argparse_t).flags. */ #define ARGPARSE_FLAG_KEEP 1 /* Do not remove options form argv. */ #define ARGPARSE_FLAG_ALL 2 /* Do not stop at last option but return remaining args with R_OPT set to -1. */ #define ARGPARSE_FLAG_MIXED 4 /* Assume options and args are mixed. */ #define ARGPARSE_FLAG_NOSTOP 8 /* Do not stop processing at "--". */ #define ARGPARSE_FLAG_ARG0 16 /* Do not skip the first arg. */ #define ARGPARSE_FLAG_ONEDASH 32 /* Allow long options with one dash. */ #define ARGPARSE_FLAG_NOVERSION 64 /* No output for "--version". */ #define ARGPARSE_FLAG_RESET 128 /* Request to reset the internal state. */ #define ARGPARSE_FLAG_STOP_SEEN 256 /* Set to true if a "--" has been seen. */ #define ARGPARSE_FLAG_NOLINENO 512 /* Do not zero the lineno field. */ /* Constants for (gpgrt_argparse_t).err. */ #define ARGPARSE_PRINT_WARNING 1 /* Print a diagnostic. */ #define ARGPARSE_PRINT_ERROR 2 /* Print a diagnostic and call exit. */ /* Special return values of gpgrt_argparse. */ #define ARGPARSE_IS_ARG (-1) #define ARGPARSE_INVALID_OPTION (-2) #define ARGPARSE_MISSING_ARG (-3) #define ARGPARSE_KEYWORD_TOO_LONG (-4) #define ARGPARSE_READ_ERROR (-5) #define ARGPARSE_UNEXPECTED_ARG (-6) #define ARGPARSE_INVALID_COMMAND (-7) #define ARGPARSE_AMBIGUOUS_OPTION (-8) #define ARGPARSE_AMBIGUOUS_COMMAND (-9) #define ARGPARSE_INVALID_ALIAS (-10) #define ARGPARSE_OUT_OF_CORE (-11) #define ARGPARSE_INVALID_ARG (-12) /* Flags for the option descriptor (gpgrt_opt_t)->flags. Note that * a TYPE constant may be or-ed with the OPT constants. */ #define ARGPARSE_TYPE_NONE 0 /* Does not take an argument. */ #define ARGPARSE_TYPE_INT 1 /* Takes an int argument. */ #define ARGPARSE_TYPE_STRING 2 /* Takes a string argument. */ #define ARGPARSE_TYPE_LONG 3 /* Takes a long argument. */ #define ARGPARSE_TYPE_ULONG 4 /* Takes an unsigned long argument. */ #define ARGPARSE_OPT_OPTIONAL (1<<3) /* Argument is optional. */ #define ARGPARSE_OPT_PREFIX (1<<4) /* Allow 0x etc. prefixed values. */ #define ARGPARSE_OPT_IGNORE (1<<6) /* Ignore command or option. */ #define ARGPARSE_OPT_COMMAND (1<<7) /* The argument is a command. */ /* A set of macros to make option definitions easier to read. */ #define ARGPARSE_x(s,l,t,f,d) \ { (s), (l), ARGPARSE_TYPE_ ## t | (f), (d) } #define ARGPARSE_s(s,l,t,d) \ { (s), (l), ARGPARSE_TYPE_ ## t, (d) } #define ARGPARSE_s_n(s,l,d) \ { (s), (l), ARGPARSE_TYPE_NONE, (d) } #define ARGPARSE_s_i(s,l,d) \ { (s), (l), ARGPARSE_TYPE_INT, (d) } #define ARGPARSE_s_s(s,l,d) \ { (s), (l), ARGPARSE_TYPE_STRING, (d) } #define ARGPARSE_s_l(s,l,d) \ { (s), (l), ARGPARSE_TYPE_LONG, (d) } #define ARGPARSE_s_u(s,l,d) \ { (s), (l), ARGPARSE_TYPE_ULONG, (d) } #define ARGPARSE_o(s,l,t,d) \ { (s), (l), (ARGPARSE_TYPE_ ## t | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_n(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_i(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_INT | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_s(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_STRING | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_l(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_LONG | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_u(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_ULONG | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_p(s,l,t,d) \ { (s), (l), (ARGPARSE_TYPE_ ## t | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_n(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_i(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_INT | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_s(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_STRING | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_l(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_LONG | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_u(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_ULONG | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op(s,l,t,d) \ { (s), (l), (ARGPARSE_TYPE_ ## t \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_n(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_i(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_INT \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_s(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_STRING \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_l(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_LONG \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_u(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_ULONG \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_c(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE | ARGPARSE_OPT_COMMAND), (d) } #define ARGPARSE_ignore(s,l) \ { (s), (l), (ARGPARSE_OPT_IGNORE), "@" } #define ARGPARSE_group(s,d) \ { (s), NULL, 0, (d) } /* Mark the end of the list (mandatory). */ #define ARGPARSE_end() \ { 0, NULL, 0, NULL } #endif /* GPGRT_ENABLE_ARGPARSE_MACROS */ /* Take care: gpgrt_argparse keeps state in ARG and requires that * either ARGPARSE_FLAG_RESET is used after OPTS has been changed or * gpgrt_argparse (NULL, ARG, NULL) is called first. */ int gpgrt_argparse (gpgrt_stream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts); void gpgrt_usage (int level); const char *gpgrt_strusage (int level); void gpgrt_set_strusage (const char *(*f)(int)); void gpgrt_set_usage_outfnc (int (*f)(int, const char *)); void gpgrt_set_fixed_string_mapper (const char *(*f)(const char*)); #ifdef __cplusplus } #endif #endif /* GPGRT_H */ #endif /* GPG_ERROR_H */ /* Local Variables: buffer-read-only: t End: */ PKZOgd.hnu[#ifdef __cplusplus extern "C" { #endif #include #ifndef GD_H #define GD_H 1 /* Version information. This gets parsed by build scripts as well as * gcc so each #define line in this group must also be splittable on * whitespace, take the form GD_*_VERSION and contain the magical * trailing comment. */ #define GD_MAJOR_VERSION 2 /*version605b5d1778*/ #define GD_MINOR_VERSION 2 /*version605b5d1778*/ #define GD_RELEASE_VERSION 5 /*version605b5d1778*/ #define GD_EXTRA_VERSION "" /*version605b5d1778*/ /* End parsable section. */ /* The version string. This is constructed from the version number * parts above via macro abuse^Wtrickery. */ #define GDXXX_VERSION_STR(mjr, mnr, rev, ext) mjr "." mnr "." rev ext #define GDXXX_STR(s) GDXXX_SSTR(s) /* Two levels needed to expand args. */ #define GDXXX_SSTR(s) #s #define GD_VERSION_STRING \ GDXXX_VERSION_STR(GDXXX_STR(GD_MAJOR_VERSION), \ GDXXX_STR(GD_MINOR_VERSION), \ GDXXX_STR(GD_RELEASE_VERSION), \ GD_EXTRA_VERSION) /* Do the DLL dance: dllexport when building the DLL, dllimport when importing from it, nothing when not on Silly Silly Windows (tm Aardman Productions). */ /* 2.0.20: for headers */ /* 2.0.24: __stdcall also needed for Visual BASIC and other languages. This breaks ABI compatibility with previous DLL revs, but it's necessary. */ /* 2.0.29: WIN32 programmers can declare the NONDLL macro if they wish to build gd as a static library or by directly including the gd sources in a project. */ /* http://gcc.gnu.org/wiki/Visibility */ #if defined(_WIN32) || defined(CYGWIN) || defined(_WIN32_WCE) # ifdef BGDWIN32 # ifdef NONDLL # define BGD_EXPORT_DATA_PROT # else # ifdef __GNUC__ # define BGD_EXPORT_DATA_PROT __attribute__ ((dllexport)) # else # define BGD_EXPORT_DATA_PROT __declspec(dllexport) # endif # endif # else # ifdef __GNUC__ # define BGD_EXPORT_DATA_PROT __attribute__ ((dllimport)) # else # define BGD_EXPORT_DATA_PROT __declspec(dllimport) # endif # endif # define BGD_STDCALL __stdcall # define BGD_EXPORT_DATA_IMPL #else # if defined(__GNUC__) || defined(__clang__) # define BGD_EXPORT_DATA_PROT __attribute__ ((visibility ("default"))) # define BGD_EXPORT_DATA_IMPL __attribute__ ((visibility ("hidden"))) # else # define BGD_EXPORT_DATA_PROT # define BGD_EXPORT_DATA_IMPL # endif # define BGD_STDCALL #endif #define BGD_DECLARE(rt) BGD_EXPORT_DATA_PROT rt BGD_STDCALL /* VS2012+ disable keyword macroizing unless _ALLOW_KEYWORD_MACROS is set We define inline, snprintf, and strcasecmp if they're missing */ #ifdef _MSC_VER # define _ALLOW_KEYWORD_MACROS # ifndef inline # define inline __inline # endif # ifndef strcasecmp # define strcasecmp _stricmp # endif #if _MSC_VER < 1900 extern int snprintf(char*, size_t, const char*, ...); #endif #endif #ifdef __cplusplus extern "C" { #endif /* gd.h: declarations file for the graphic-draw module. * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation. This software is provided "AS IS." Thomas Boutell and * Boutell.Com, Inc. disclaim all warranties, either express or implied, * including but not limited to implied warranties of merchantability and * fitness for a particular purpose, with respect to this code and accompanying * documentation. */ /* stdio is needed for file I/O. */ #include #include #include "gd_io.h" /* The maximum number of palette entries in palette-based images. In the wonderful new world of gd 2.0, you can of course have many more colors when using truecolor mode. */ #define gdMaxColors 256 /* Image type. See functions below; you will not need to change the elements directly. Use the provided macros to access sx, sy, the color table, and colorsTotal for read-only purposes. */ /* If 'truecolor' is set true, the image is truecolor; pixels are represented by integers, which must be 32 bits wide or more. True colors are repsented as follows: ARGB Where 'A' (alpha channel) occupies only the LOWER 7 BITS of the MSB. This very small loss of alpha channel resolution allows gd 2.x to keep backwards compatibility by allowing signed integers to be used to represent colors, and negative numbers to represent special cases, just as in gd 1.x. */ #define gdAlphaMax 127 #define gdAlphaOpaque 0 #define gdAlphaTransparent 127 #define gdRedMax 255 #define gdGreenMax 255 #define gdBlueMax 255 /** * Group: Color Decomposition */ /** * Macro: gdTrueColorGetAlpha * * Gets the alpha channel value * * Parameters: * c - The color * * See also: * - */ #define gdTrueColorGetAlpha(c) (((c) & 0x7F000000) >> 24) /** * Macro: gdTrueColorGetRed * * Gets the red channel value * * Parameters: * c - The color * * See also: * - */ #define gdTrueColorGetRed(c) (((c) & 0xFF0000) >> 16) /** * Macro: gdTrueColorGetGreen * * Gets the green channel value * * Parameters: * c - The color * * See also: * - */ #define gdTrueColorGetGreen(c) (((c) & 0x00FF00) >> 8) /** * Macro: gdTrueColorGetBlue * * Gets the blue channel value * * Parameters: * c - The color * * See also: * - */ #define gdTrueColorGetBlue(c) ((c) & 0x0000FF) /** * Group: Effects * * The layering effect * * When pixels are drawn the new colors are "mixed" with the background * depending on the effect. * * Note that the effect does not apply to palette images, where pixels * are always replaced. * * Modes: * gdEffectReplace - replace pixels * gdEffectAlphaBlend - blend pixels, see * gdEffectNormal - default mode; same as gdEffectAlphaBlend * gdEffectOverlay - overlay pixels, see * gdEffectMultiply - overlay pixels with multiply effect, see * * * See also: * - */ #define gdEffectReplace 0 #define gdEffectAlphaBlend 1 #define gdEffectNormal 2 #define gdEffectOverlay 3 #define gdEffectMultiply 4 #define GD_TRUE 1 #define GD_FALSE 0 #define GD_EPSILON 1e-6 #ifndef M_PI # define M_PI 3.14159265358979323846 #endif /* This function accepts truecolor pixel values only. The source color is composited with the destination color based on the alpha channel value of the source color. The resulting color is opaque. */ BGD_DECLARE(int) gdAlphaBlend (int dest, int src); BGD_DECLARE(int) gdLayerOverlay (int dest, int src); BGD_DECLARE(int) gdLayerMultiply (int dest, int src); /** * Group: Color Quantization * * Enum: gdPaletteQuantizationMethod * * Constants: * GD_QUANT_DEFAULT - GD_QUANT_LIQ if libimagequant is available, * GD_QUANT_JQUANT otherwise. * GD_QUANT_JQUANT - libjpeg's old median cut. Fast, but only uses 16-bit * color. * GD_QUANT_NEUQUANT - NeuQuant - approximation using Kohonen neural network. * GD_QUANT_LIQ - A combination of algorithms used in libimagequant * aiming for the highest quality at cost of speed. * * Note that GD_QUANT_JQUANT does not retain the alpha channel, and * GD_QUANT_NEUQUANT does not support dithering. * * See also: * - */ enum gdPaletteQuantizationMethod { GD_QUANT_DEFAULT = 0, GD_QUANT_JQUANT = 1, GD_QUANT_NEUQUANT = 2, GD_QUANT_LIQ = 3 }; /** * Group: Transform * * Constants: gdInterpolationMethod * * GD_BELL - Bell * GD_BESSEL - Bessel * GD_BILINEAR_FIXED - fixed point bilinear * GD_BICUBIC - Bicubic * GD_BICUBIC_FIXED - fixed point bicubic integer * GD_BLACKMAN - Blackman * GD_BOX - Box * GD_BSPLINE - BSpline * GD_CATMULLROM - Catmullrom * GD_GAUSSIAN - Gaussian * GD_GENERALIZED_CUBIC - Generalized cubic * GD_HERMITE - Hermite * GD_HAMMING - Hamming * GD_HANNING - Hannig * GD_MITCHELL - Mitchell * GD_NEAREST_NEIGHBOUR - Nearest neighbour interpolation * GD_POWER - Power * GD_QUADRATIC - Quadratic * GD_SINC - Sinc * GD_TRIANGLE - Triangle * GD_WEIGHTED4 - 4 pixels weighted bilinear interpolation * GD_LINEAR - bilinear interpolation * * See also: * - * - */ typedef enum { GD_DEFAULT = 0, GD_BELL, GD_BESSEL, GD_BILINEAR_FIXED, GD_BICUBIC, GD_BICUBIC_FIXED, GD_BLACKMAN, GD_BOX, GD_BSPLINE, GD_CATMULLROM, GD_GAUSSIAN, GD_GENERALIZED_CUBIC, GD_HERMITE, GD_HAMMING, GD_HANNING, GD_MITCHELL, GD_NEAREST_NEIGHBOUR, GD_POWER, GD_QUADRATIC, GD_SINC, GD_TRIANGLE, GD_WEIGHTED4, GD_LINEAR, GD_METHOD_COUNT = 23 } gdInterpolationMethod; /* define struct with name and func ptr and add it to gdImageStruct gdInterpolationMethod interpolation; */ /* Interpolation function ptr */ typedef double (* interpolation_method )(double); /* Group: Types typedef: gdImage typedef: gdImagePtr The data structure in which gd stores images. , and the various image file-loading functions return a pointer to this type, and the other functions expect to receive a pointer to this type as their first argument. *gdImagePtr* is a pointer to *gdImage*. See also: (Previous versions of this library encouraged directly manipulating the contents ofthe struct but we are attempting to move away from this practice so the fields are no longer documented here. If you need to poke at the internals of this struct, feel free to look at *gd.h*.) */ typedef struct gdImageStruct { /* Palette-based image pixels */ unsigned char **pixels; int sx; int sy; /* These are valid in palette images only. See also 'alpha', which appears later in the structure to preserve binary backwards compatibility */ int colorsTotal; int red[gdMaxColors]; int green[gdMaxColors]; int blue[gdMaxColors]; int open[gdMaxColors]; /* For backwards compatibility, this is set to the first palette entry with 100% transparency, and is also set and reset by the gdImageColorTransparent function. Newer applications can allocate palette entries with any desired level of transparency; however, bear in mind that many viewers, notably many web browsers, fail to implement full alpha channel for PNG and provide support for full opacity or transparency only. */ int transparent; int *polyInts; int polyAllocated; struct gdImageStruct *brush; struct gdImageStruct *tile; int brushColorMap[gdMaxColors]; int tileColorMap[gdMaxColors]; int styleLength; int stylePos; int *style; int interlace; /* New in 2.0: thickness of line. Initialized to 1. */ int thick; /* New in 2.0: alpha channel for palettes. Note that only Macintosh Internet Explorer and (possibly) Netscape 6 really support multiple levels of transparency in palettes, to my knowledge, as of 2/15/01. Most common browsers will display 100% opaque and 100% transparent correctly, and do something unpredictable and/or undesirable for levels in between. TBB */ int alpha[gdMaxColors]; /* Truecolor flag and pixels. New 2.0 fields appear here at the end to minimize breakage of existing object code. */ int trueColor; int **tpixels; /* Should alpha channel be copied, or applied, each time a pixel is drawn? This applies to truecolor images only. No attempt is made to alpha-blend in palette images, even if semitransparent palette entries exist. To do that, build your image as a truecolor image, then quantize down to 8 bits. */ int alphaBlendingFlag; /* Should the alpha channel of the image be saved? This affects PNG at the moment; other future formats may also have that capability. JPEG doesn't. */ int saveAlphaFlag; /* There should NEVER BE ACCESSOR MACROS FOR ITEMS BELOW HERE, so this part of the structure can be safely changed in new releases. */ /* 2.0.12: anti-aliased globals. 2.0.26: just a few vestiges after switching to the fast, memory-cheap implementation from PHP-gd. */ int AA; int AA_color; int AA_dont_blend; /* 2.0.12: simple clipping rectangle. These values must be checked for safety when set; please use gdImageSetClip */ int cx1; int cy1; int cx2; int cy2; /* 2.1.0: allows to specify resolution in dpi */ unsigned int res_x; unsigned int res_y; /* Selects quantization method, see gdImageTrueColorToPaletteSetMethod() and gdPaletteQuantizationMethod enum. */ int paletteQuantizationMethod; /* speed/quality trade-off. 1 = best quality, 10 = best speed. 0 = method-specific default. Applicable to GD_QUANT_LIQ and GD_QUANT_NEUQUANT. */ int paletteQuantizationSpeed; /* Image will remain true-color if conversion to palette cannot achieve given quality. Value from 1 to 100, 1 = ugly, 100 = perfect. Applicable to GD_QUANT_LIQ.*/ int paletteQuantizationMinQuality; /* Image will use minimum number of palette colors needed to achieve given quality. Must be higher than paletteQuantizationMinQuality Value from 1 to 100, 1 = ugly, 100 = perfect. Applicable to GD_QUANT_LIQ.*/ int paletteQuantizationMaxQuality; gdInterpolationMethod interpolation_id; interpolation_method interpolation; } gdImage; typedef gdImage *gdImagePtr; /* Point type for use in polygon drawing. */ /** * Group: Types * * typedef: gdPointF * Defines a point in a 2D coordinate system using floating point * values. * x - Floating point position (increase from left to right) * y - Floating point Row position (increase from top to bottom) * * typedef: gdPointFPtr * Pointer to a * * See also: * , , **/ typedef struct { double x, y; } gdPointF, *gdPointFPtr; /* Group: Types typedef: gdFont typedef: gdFontPtr A font structure, containing the bitmaps of all characters in a font. Used to declare the characteristics of a font. Text-output functions expect these as their second argument, following the argument. and both return one. You can provide your own font data by providing such a structure and the associated pixel array. You can determine the width and height of a single character in a font by examining the w and h members of the structure. If you will not be creating your own fonts, you will not need to concern yourself with the rest of the components of this structure. Please see the files gdfontl.c and gdfontl.h for an example of the proper declaration of this structure. > typedef struct { > // # of characters in font > int nchars; > // First character is numbered... (usually 32 = space) > int offset; > // Character width and height > int w; > int h; > // Font data; array of characters, one row after another. > // Easily included in code, also easily loaded from > // data files. > char *data; > } gdFont; gdFontPtr is a pointer to gdFont. */ typedef struct { /* # of characters in font */ int nchars; /* First character is numbered... (usually 32 = space) */ int offset; /* Character width and height */ int w; int h; /* Font data; array of characters, one row after another. Easily included in code, also easily loaded from data files. */ char *data; } gdFont; /* Text functions take these. */ typedef gdFont *gdFontPtr; typedef void(*gdErrorMethod)(int, const char *, va_list); BGD_DECLARE(void) gdSetErrorMethod(gdErrorMethod); BGD_DECLARE(void) gdClearErrorMethod(void); /* For backwards compatibility only. Use gdImageSetStyle() for MUCH more flexible line drawing. Also see gdImageSetBrush(). */ #define gdDashSize 4 /** * Group: Colors * * Colors are always of type int which is supposed to be at least 32 bit large. * * Kinds of colors: * true colors - ARGB values where the alpha channel is stored as most * significant, and the blue channel as least significant * byte. Note that the alpha channel only uses the 7 least * significant bits. * Don't rely on the internal representation, though, and * use to compose a truecolor value, and * , , * and to access * the respective channels. * palette indexes - The index of a color palette entry (0-255). * special colors - As listed in the following section. * * Constants: Special Colors * gdStyled - use the current style, see * gdBrushed - use the current brush, see * gdStyledBrushed - use the current style and brush * gdTiled - use the current tile, see * gdTransparent - indicate transparency, what is not the same as the * transparent color index; used for lines only * gdAntiAliased - draw anti aliased */ #define gdStyled (-2) #define gdBrushed (-3) #define gdStyledBrushed (-4) #define gdTiled (-5) #define gdTransparent (-6) #define gdAntiAliased (-7) /* Functions to manipulate images. */ /* Creates a palette-based image (up to 256 colors). */ BGD_DECLARE(gdImagePtr) gdImageCreate (int sx, int sy); /* An alternate name for the above (2.0). */ #define gdImageCreatePalette gdImageCreate /* Creates a truecolor image (millions of colors). */ BGD_DECLARE(gdImagePtr) gdImageCreateTrueColor (int sx, int sy); /* Creates an image from various file types. These functions return a palette or truecolor image based on the nature of the file being loaded. Truecolor PNG stays truecolor; palette PNG stays palette-based; JPEG is always truecolor. */ BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * fd); BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtxPtr in); BGD_DECLARE(gdImagePtr) gdImageCreateFromPngPtr (int size, void *data); /* These read the first frame only */ BGD_DECLARE(gdImagePtr) gdImageCreateFromGif (FILE * fd); BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx (gdIOCtxPtr in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGifPtr (int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMP (FILE * inFile); BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPCtx (gdIOCtx * infile); BGD_DECLARE(gdImagePtr) gdImageCreateFromWBMPPtr (int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromJpeg (FILE * infile); BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegEx (FILE * infile, int ignore_warning); BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtx (gdIOCtx * infile); BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegCtxEx (gdIOCtx * infile, int ignore_warning); BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtr (int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromJpegPtrEx (int size, void *data, int ignore_warning); BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile); BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile); BGD_DECLARE(gdImagePtr) gdImageCreateFromTiff(FILE *inFile); BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffCtx(gdIOCtx *infile); BGD_DECLARE(gdImagePtr) gdImageCreateFromTiffPtr(int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromTga( FILE * fp ); BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaCtx(gdIOCtx* ctx); BGD_DECLARE(gdImagePtr) gdImageCreateFromTgaPtr(int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromBmp (FILE * inFile); BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpPtr (int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromBmpCtx (gdIOCtxPtr infile); BGD_DECLARE(gdImagePtr) gdImageCreateFromFile(const char *filename); /* Group: Types typedef: gdSource typedef: gdSourcePtr *Note:* This interface is *obsolete* and kept only for *compatibility. Use instead. Represents a source from which a PNG can be read. Programmers who do not wish to read PNGs from a file can provide their own alternate input mechanism, using the function. See the documentation of that function for an example of the proper use of this type. > typedef struct { > int (*source) (void *context, char *buffer, int len); > void *context; > } gdSource, *gdSourcePtr; The source function must return -1 on error, otherwise the number of bytes fetched. 0 is EOF, not an error! 'context' will be passed to your source function. */ typedef struct { int (*source) (void *context, char *buffer, int len); void *context; } gdSource, *gdSourcePtr; /* Deprecated in favor of gdImageCreateFromPngCtx */ BGD_DECLARE(gdImagePtr) gdImageCreateFromPngSource (gdSourcePtr in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGd (FILE * in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGdCtx (gdIOCtxPtr in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGdPtr (int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2 (FILE * in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in); BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ptr (int size, void *data); BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * in, int srcx, int srcy, int w, int h); BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy, int w, int h); BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, int h); /* 2.0.10: prototype was missing */ BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * in); BGD_DECLARE(void) gdImageXbmCtx(gdImagePtr image, char* file_name, int fg, gdIOCtx * out); /* NOTE: filename, not FILE */ BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm (char *filename); BGD_DECLARE(void) gdImageDestroy (gdImagePtr im); /* Replaces or blends with the background depending on the most recent call to gdImageAlphaBlending and the alpha channel value of 'color'; default is to overwrite. Tiling and line styling are also implemented here. All other gd drawing functions pass through this call, allowing for many useful effects. Overlay and multiply effects are used when gdImageAlphaBlending is passed gdEffectOverlay and gdEffectMultiply */ BGD_DECLARE(void) gdImageSetPixel (gdImagePtr im, int x, int y, int color); /* FreeType 2 text output with hook to extra flags */ BGD_DECLARE(int) gdImageGetPixel (gdImagePtr im, int x, int y); BGD_DECLARE(int) gdImageGetTrueColorPixel (gdImagePtr im, int x, int y); BGD_DECLARE(void) gdImageAABlend (gdImagePtr im); BGD_DECLARE(void) gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color); /* For backwards compatibility only. Use gdImageSetStyle() for much more flexible line drawing. */ BGD_DECLARE(void) gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color); /* Corners specified (not width and height). Upper left first, lower right second. */ BGD_DECLARE(void) gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color); /* Solid bar. Upper left corner first, lower right corner second. */ BGD_DECLARE(void) gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color); BGD_DECLARE(void) gdImageSetClip(gdImagePtr im, int x1, int y1, int x2, int y2); BGD_DECLARE(void) gdImageGetClip(gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P); BGD_DECLARE(void) gdImageSetResolution(gdImagePtr im, const unsigned int res_x, const unsigned int res_y); BGD_DECLARE(int) gdImageBoundsSafe (gdImagePtr im, int x, int y); BGD_DECLARE(void) gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color); BGD_DECLARE(void) gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color); BGD_DECLARE(void) gdImageString (gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color); BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color); BGD_DECLARE(void) gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color); BGD_DECLARE(void) gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color); /* 2.0.16: for thread-safe use of gdImageStringFT and friends, call this before allowing any thread to call gdImageStringFT. Otherwise it is invoked by the first thread to invoke gdImageStringFT, with a very small but real risk of a race condition. Return 0 on success, nonzero on failure to initialize freetype. */ BGD_DECLARE(int) gdFontCacheSetup (void); /* Optional: clean up after application is done using fonts in gdImageStringFT(). */ BGD_DECLARE(void) gdFontCacheShutdown (void); /* 2.0.20: for backwards compatibility. A few applications did start calling this function when it first appeared although it was never documented. Simply invokes gdFontCacheShutdown. */ BGD_DECLARE(void) gdFreeFontCache (void); /* Calls gdImageStringFT. Provided for backwards compatibility only. */ BGD_DECLARE(char *) gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist, double ptsize, double angle, int x, int y, char *string); /* FreeType 2 text output */ BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist, double ptsize, double angle, int x, int y, char *string); /* Group: Types typedef: gdFTStringExtra typedef: gdFTStringExtraPtr A structure and associated pointer type used to pass additional parameters to the function. See for the structure definition. Thanks to Wez Furlong. */ /* 2.0.5: provides an extensible way to pass additional parameters. Thanks to Wez Furlong, sorry for the delay. */ typedef struct { int flags; /* Logical OR of gdFTEX_ values */ double linespacing; /* fine tune line spacing for '\n' */ int charmap; /* TBB: 2.0.12: may be gdFTEX_Unicode, gdFTEX_Shift_JIS, gdFTEX_Big5, or gdFTEX_Adobe_Custom; when not specified, maps are searched for in the above order. */ int hdpi; /* if (flags & gdFTEX_RESOLUTION) */ int vdpi; /* if (flags & gdFTEX_RESOLUTION) */ char *xshow; /* if (flags & gdFTEX_XSHOW) then, on return, xshow is a malloc'ed string containing xshow position data for the last string. NB. The caller is responsible for gdFree'ing the xshow string. */ char *fontpath; /* if (flags & gdFTEX_RETURNFONTPATHNAME) then, on return, fontpath is a malloc'ed string containing the actual font file path name used, which can be interesting when fontconfig is in use. The caller is responsible for gdFree'ing the fontpath string. */ } gdFTStringExtra, *gdFTStringExtraPtr; #define gdFTEX_LINESPACE 1 #define gdFTEX_CHARMAP 2 #define gdFTEX_RESOLUTION 4 #define gdFTEX_DISABLE_KERNING 8 #define gdFTEX_XSHOW 16 /* The default unless gdFTUseFontConfig(1); has been called: fontlist is a full or partial font file pathname or list thereof (i.e. just like before 2.0.29) */ #define gdFTEX_FONTPATHNAME 32 /* Necessary to use fontconfig patterns instead of font pathnames as the fontlist argument, unless gdFTUseFontConfig(1); has been called. New in 2.0.29 */ #define gdFTEX_FONTCONFIG 64 /* Sometimes interesting when fontconfig is used: the fontpath element of the structure above will contain a gdMalloc'd string copy of the actual font file pathname used, if this flag is set when the call is made */ #define gdFTEX_RETURNFONTPATHNAME 128 /* If flag is nonzero, the fontlist parameter to gdImageStringFT and gdImageStringFTEx shall be assumed to be a fontconfig font pattern if fontconfig was compiled into gd. This function returns zero if fontconfig is not available, nonzero otherwise. */ BGD_DECLARE(int) gdFTUseFontConfig(int flag); /* These are NOT flags; set one in 'charmap' if you set the gdFTEX_CHARMAP bit in 'flags'. */ #define gdFTEX_Unicode 0 #define gdFTEX_Shift_JIS 1 #define gdFTEX_Big5 2 #define gdFTEX_Adobe_Custom 3 BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsize, double angle, int x, int y, char *string, gdFTStringExtraPtr strex); /* Group: Types typedef: gdPoint typedef: gdPointPtr Represents a point in the coordinate space of the image; used by , and for polygon drawing. > typedef struct { > int x, y; > } gdPoint, *gdPointPtr; */ typedef struct { int x, y; } gdPoint, *gdPointPtr; /** * Typedef: gdRect * * A rectangle in the coordinate space of the image * * Members: * x - The x-coordinate of the upper left corner. * y - The y-coordinate of the upper left corner. * width - The width. * height - The height. * * Typedef: gdRectPtr * * A pointer to a */ typedef struct { int x, y; int width, height; } gdRect, *gdRectPtr; BGD_DECLARE(void) gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c); BGD_DECLARE(void) gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c); BGD_DECLARE(void) gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c); /* These functions still work with truecolor images, for which they never return error. */ BGD_DECLARE(int) gdImageColorAllocate (gdImagePtr im, int r, int g, int b); /* gd 2.0: palette entries with non-opaque transparency are permitted. */ BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a); /* Assumes opaque is the preferred alpha channel value */ BGD_DECLARE(int) gdImageColorClosest (gdImagePtr im, int r, int g, int b); /* Closest match taking all four parameters into account. A slightly different color with the same transparency beats the exact same color with radically different transparency */ BGD_DECLARE(int) gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a); /* An alternate method */ BGD_DECLARE(int) gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b); /* Returns exact, 100% opaque matches only */ BGD_DECLARE(int) gdImageColorExact (gdImagePtr im, int r, int g, int b); /* Returns an exact match only, including alpha */ BGD_DECLARE(int) gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a); /* Opaque only */ BGD_DECLARE(int) gdImageColorResolve (gdImagePtr im, int r, int g, int b); /* Based on gdImageColorExactAlpha and gdImageColorClosestAlpha */ BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a); /* A simpler way to obtain an opaque truecolor value for drawing on a truecolor image. Not for use with palette images! */ #define gdTrueColor(r, g, b) (((r) << 16) + \ ((g) << 8) + \ (b)) /** * Group: Color Composition * * Macro: gdTrueColorAlpha * * Compose a truecolor value from its components * * Parameters: * r - The red channel (0-255) * g - The green channel (0-255) * b - The blue channel (0-255) * a - The alpha channel (0-127, where 127 is fully transparent, and 0 is * completely opaque). * * See also: * - * - * - * - * - */ #define gdTrueColorAlpha(r, g, b, a) (((a) << 24) + \ ((r) << 16) + \ ((g) << 8) + \ (b)) BGD_DECLARE(void) gdImageColorDeallocate (gdImagePtr im, int color); /* Converts a truecolor image to a palette-based image, using a high-quality two-pass quantization routine which attempts to preserve alpha channel information as well as R/G/B color information when creating a palette. If ditherFlag is set, the image will be dithered to approximate colors better, at the expense of some obvious "speckling." colorsWanted can be anything up to 256. If the original source image includes photographic information or anything that came out of a JPEG, 256 is strongly recommended. Better yet, don't use these function -- write real truecolor PNGs and JPEGs. The disk space gain of conversion to palette is not great (for small images it can be negative) and the quality loss is ugly. DIFFERENCES: gdImageCreatePaletteFromTrueColor creates and returns a new image. gdImageTrueColorToPalette modifies an existing image, and the truecolor pixels are discarded. gdImageTrueColorToPalette() returns TRUE on success, FALSE on failure. */ BGD_DECLARE(gdImagePtr) gdImageCreatePaletteFromTrueColor (gdImagePtr im, int ditherFlag, int colorsWanted); BGD_DECLARE(int) gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag, int colorsWanted); BGD_DECLARE(int) gdImagePaletteToTrueColor(gdImagePtr src); /* An attempt at getting the results of gdImageTrueColorToPalette to * look a bit more like the original (im1 is the original and im2 is * the palette version */ BGD_DECLARE(int) gdImageColorMatch(gdImagePtr im1, gdImagePtr im2); /* Selects quantization method used for subsequent gdImageTrueColorToPalette calls. See gdPaletteQuantizationMethod enum (e.g. GD_QUANT_NEUQUANT, GD_QUANT_LIQ). Speed is from 1 (highest quality) to 10 (fastest). Speed 0 selects method-specific default (recommended). Returns FALSE if the given method is invalid or not available. */ BGD_DECLARE(int) gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method, int speed); /* Chooses quality range that subsequent call to gdImageTrueColorToPalette will aim for. Min and max quality is in range 1-100 (1 = ugly, 100 = perfect). Max must be higher than min. If palette cannot represent image with at least min_quality, then image will remain true-color. If palette can represent image with quality better than max_quality, then lower number of colors will be used. This function has effect only when GD_QUANT_LIQ method has been selected and the source image is true-color. */ BGD_DECLARE(void) gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_quality, int max_quality); /* Specifies a color index (if a palette image) or an RGB color (if a truecolor image) which should be considered 100% transparent. FOR TRUECOLOR IMAGES, THIS IS IGNORED IF AN ALPHA CHANNEL IS BEING SAVED. Use gdImageSaveAlpha(im, 0); to turn off the saving of a full alpha channel in a truecolor image. Note that gdImageColorTransparent is usually compatible with older browsers that do not understand full alpha channels well. TBB */ BGD_DECLARE(void) gdImageColorTransparent (gdImagePtr im, int color); BGD_DECLARE(void) gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src); typedef int (*gdCallbackImageColor)(gdImagePtr im, int src); BGD_DECLARE(int) gdImageColorReplace(gdImagePtr im, int src, int dst); BGD_DECLARE(int) gdImageColorReplaceThreshold(gdImagePtr im, int src, int dst, float threshold); BGD_DECLARE(int) gdImageColorReplaceArray(gdImagePtr im, int len, int *src, int *dst); BGD_DECLARE(int) gdImageColorReplaceCallback(gdImagePtr im, gdCallbackImageColor callback); BGD_DECLARE(void) gdImageGif (gdImagePtr im, FILE * out); BGD_DECLARE(void) gdImagePng (gdImagePtr im, FILE * out); BGD_DECLARE(void) gdImagePngCtx (gdImagePtr im, gdIOCtx * out); BGD_DECLARE(void) gdImageGifCtx (gdImagePtr im, gdIOCtx * out); BGD_DECLARE(void) gdImageTiff(gdImagePtr im, FILE *outFile); BGD_DECLARE(void *) gdImageTiffPtr(gdImagePtr im, int *size); BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out); BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression); BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression); BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression); /* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all, 1 is FASTEST but produces larger files, 9 provides the best compression (smallest files) but takes a long time to compress, and -1 selects the default compiled into the zlib library. */ BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * out, int level); BGD_DECLARE(void) gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level); BGD_DECLARE(void) gdImageWBMP (gdImagePtr image, int fg, FILE * out); BGD_DECLARE(void) gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out); BGD_DECLARE(int) gdImageFile(gdImagePtr im, const char *filename); BGD_DECLARE(int) gdSupportsFileType(const char *filename, int writing); /* Guaranteed to correctly free memory returned by the gdImage*Ptr functions */ BGD_DECLARE(void) gdFree (void *m); /* Best to free this memory with gdFree(), not free() */ BGD_DECLARE(void *) gdImageWBMPPtr (gdImagePtr im, int *size, int fg); /* 100 is highest quality (there is always a little loss with JPEG). 0 is lowest. 10 is about the lowest useful setting. */ BGD_DECLARE(void) gdImageJpeg (gdImagePtr im, FILE * out, int quality); BGD_DECLARE(void) gdImageJpegCtx (gdImagePtr im, gdIOCtx * out, int quality); /* Best to free this memory with gdFree(), not free() */ BGD_DECLARE(void *) gdImageJpegPtr (gdImagePtr im, int *size, int quality); BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization); BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile); BGD_DECLARE(void *) gdImageWebpPtr (gdImagePtr im, int *size); BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization); BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization); /** * Group: GifAnim * * Legal values for Disposal. gdDisposalNone is always used by * the built-in optimizer if previm is passed. * * Constants: gdImageGifAnim * * gdDisposalUnknown - Not recommended * gdDisposalNone - Preserve previous frame * gdDisposalRestoreBackground - First allocated color of palette * gdDisposalRestorePrevious - Restore to before start of frame * * See also: * - */ enum { gdDisposalUnknown, gdDisposalNone, gdDisposalRestoreBackground, gdDisposalRestorePrevious }; BGD_DECLARE(void) gdImageGifAnimBegin(gdImagePtr im, FILE *outFile, int GlobalCM, int Loops); BGD_DECLARE(void) gdImageGifAnimAdd(gdImagePtr im, FILE *outFile, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); BGD_DECLARE(void) gdImageGifAnimEnd(FILE *outFile); BGD_DECLARE(void) gdImageGifAnimBeginCtx(gdImagePtr im, gdIOCtx *out, int GlobalCM, int Loops); BGD_DECLARE(void) gdImageGifAnimAddCtx(gdImagePtr im, gdIOCtx *out, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); BGD_DECLARE(void) gdImageGifAnimEndCtx(gdIOCtx *out); BGD_DECLARE(void *) gdImageGifAnimBeginPtr(gdImagePtr im, int *size, int GlobalCM, int Loops); BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm); BGD_DECLARE(void *) gdImageGifAnimEndPtr(int *size); /* Group: Types typedef: gdSink typedef: gdSinkPtr *Note:* This interface is *obsolete* and kept only for *compatibility*. Use instead. Represents a "sink" (destination) to which a PNG can be written. Programmers who do not wish to write PNGs to a file can provide their own alternate output mechanism, using the function. See the documentation of that function for an example of the proper use of this type. > typedef struct { > int (*sink) (void *context, char *buffer, int len); > void *context; > } gdSink, *gdSinkPtr; The _sink_ function must return -1 on error, otherwise the number of bytes written, which must be equal to len. _context_ will be passed to your sink function. */ typedef struct { int (*sink) (void *context, const char *buffer, int len); void *context; } gdSink, *gdSinkPtr; BGD_DECLARE(void) gdImagePngToSink (gdImagePtr im, gdSinkPtr out); BGD_DECLARE(void) gdImageGd (gdImagePtr im, FILE * out); BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * out, int cs, int fmt); /* Best to free this memory with gdFree(), not free() */ BGD_DECLARE(void *) gdImageGifPtr (gdImagePtr im, int *size); /* Best to free this memory with gdFree(), not free() */ BGD_DECLARE(void *) gdImagePngPtr (gdImagePtr im, int *size); BGD_DECLARE(void *) gdImagePngPtrEx (gdImagePtr im, int *size, int level); /* Best to free this memory with gdFree(), not free() */ BGD_DECLARE(void *) gdImageGdPtr (gdImagePtr im, int *size); /* Best to free this memory with gdFree(), not free() */ BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size); /* Style is a bitwise OR ( | operator ) of these. gdArc and gdChord are mutually exclusive; gdChord just connects the starting and ending angles with a straight line, while gdArc produces a rounded edge. gdPie is a synonym for gdArc. gdNoFill indicates that the arc or chord should be outlined, not filled. gdEdged, used together with gdNoFill, indicates that the beginning and ending angles should be connected to the center; this is a good way to outline (rather than fill) a 'pie slice'. */ #define gdArc 0 #define gdPie gdArc #define gdChord 1 #define gdNoFill 2 #define gdEdged 4 BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color, int style); BGD_DECLARE(void) gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color); BGD_DECLARE(void) gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int color); BGD_DECLARE(void) gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h, int color); BGD_DECLARE(void) gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color); BGD_DECLARE(void) gdImageFill (gdImagePtr im, int x, int y, int color); BGD_DECLARE(void) gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h); BGD_DECLARE(void) gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h, int pct); BGD_DECLARE(void) gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h, int pct); /* Stretches or shrinks to fit, as needed. Does NOT attempt to average the entire set of source pixels that scale down onto the destination pixel. */ BGD_DECLARE(void) gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH); /* gd 2.0: stretches or shrinks to fit, as needed. When called with a truecolor destination image, this function averages the entire set of source pixels that scale down onto the destination pixel, taking into account what portion of the destination pixel each source pixel represents. This is a floating point operation, but this is not a performance issue on modern hardware, except for some embedded devices. If the destination is a palette image, gdImageCopyResized is substituted automatically. */ BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH); /* gd 2.0.8: gdImageCopyRotated is added. Source is a rectangle, with its upper left corner at srcX and srcY. Destination is the *center* of the rotated copy. Angle is in degrees, same as gdImageArc. Floating point destination center coordinates allow accurate rotation of objects of odd-numbered width or height. */ BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst, gdImagePtr src, double dstX, double dstY, int srcX, int srcY, int srcWidth, int srcHeight, int angle); BGD_DECLARE(gdImagePtr) gdImageClone (gdImagePtr src); BGD_DECLARE(void) gdImageSetBrush (gdImagePtr im, gdImagePtr brush); BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile); BGD_DECLARE(void) gdImageSetAntiAliased (gdImagePtr im, int c); BGD_DECLARE(void) gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend); BGD_DECLARE(void) gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels); /* Line thickness (defaults to 1). Affects lines, ellipses, rectangles, polygons and so forth. */ BGD_DECLARE(void) gdImageSetThickness (gdImagePtr im, int thickness); /* On or off (1 or 0) for all three of these. */ BGD_DECLARE(void) gdImageInterlace (gdImagePtr im, int interlaceArg); BGD_DECLARE(void) gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg); BGD_DECLARE(void) gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg); BGD_DECLARE(gdImagePtr) gdImageNeuQuant(gdImagePtr im, const int max_color, int sample_factor); enum gdPixelateMode { GD_PIXELATE_UPPERLEFT, GD_PIXELATE_AVERAGE }; BGD_DECLARE(int) gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode); typedef struct { int sub; int plus; unsigned int num_colors; int *colors; unsigned int seed; } gdScatter, *gdScatterPtr; BGD_DECLARE(int) gdImageScatter(gdImagePtr im, int sub, int plus); BGD_DECLARE(int) gdImageScatterColor(gdImagePtr im, int sub, int plus, int colors[], unsigned int num_colors); BGD_DECLARE(int) gdImageScatterEx(gdImagePtr im, gdScatterPtr s); BGD_DECLARE(int) gdImageSmooth(gdImagePtr im, float weight); BGD_DECLARE(int) gdImageMeanRemoval(gdImagePtr im); BGD_DECLARE(int) gdImageEmboss(gdImagePtr im); BGD_DECLARE(int) gdImageGaussianBlur(gdImagePtr im); BGD_DECLARE(int) gdImageEdgeDetectQuick(gdImagePtr src); BGD_DECLARE(int) gdImageSelectiveBlur( gdImagePtr src); BGD_DECLARE(int) gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, float offset); BGD_DECLARE(int) gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha); BGD_DECLARE(int) gdImageContrast(gdImagePtr src, double contrast); BGD_DECLARE(int) gdImageBrightness(gdImagePtr src, int brightness); BGD_DECLARE(int) gdImageGrayScale(gdImagePtr src); BGD_DECLARE(int) gdImageNegate(gdImagePtr src); BGD_DECLARE(gdImagePtr) gdImageCopyGaussianBlurred(gdImagePtr src, int radius, double sigma); /** * Group: Accessor Macros */ /** * Macro: gdImageTrueColor * * Whether an image is a truecolor image. * * Parameters: * im - The image. * * Returns: * Non-zero if the image is a truecolor image, zero for palette images. */ #define gdImageTrueColor(im) ((im)->trueColor) /** * Macro: gdImageSX * * Gets the width (in pixels) of an image. * * Parameters: * im - The image. */ #define gdImageSX(im) ((im)->sx) /** * Macro: gdImageSY * * Gets the height (in pixels) of an image. * * Parameters: * im - The image. */ #define gdImageSY(im) ((im)->sy) /** * Macro: gdImageColorsTotal * * Gets the number of colors in the palette. * * This macro is only valid for palette images. * * Parameters: * im - The image */ #define gdImageColorsTotal(im) ((im)->colorsTotal) /** * Macro: gdImageRed * * Gets the red component value of a given color. * * Parameters: * im - The image. * c - The color. */ #define gdImageRed(im, c) ((im)->trueColor ? gdTrueColorGetRed(c) : \ (im)->red[(c)]) /** * Macro: gdImageGreen * * Gets the green component value of a given color. * * Parameters: * im - The image. * c - The color. */ #define gdImageGreen(im, c) ((im)->trueColor ? gdTrueColorGetGreen(c) : \ (im)->green[(c)]) /** * Macro: gdImageBlue * * Gets the blue component value of a given color. * * Parameters: * im - The image. * c - The color. */ #define gdImageBlue(im, c) ((im)->trueColor ? gdTrueColorGetBlue(c) : \ (im)->blue[(c)]) /** * Macro: gdImageAlpha * * Gets the alpha component value of a given color. * * Parameters: * im - The image. * c - The color. */ #define gdImageAlpha(im, c) ((im)->trueColor ? gdTrueColorGetAlpha(c) : \ (im)->alpha[(c)]) /** * Macro: gdImageGetTransparent * * Gets the transparent color of the image. * * Parameters: * im - The image. * * See also: * - */ #define gdImageGetTransparent(im) ((im)->transparent) /** * Macro: gdImageGetInterlaced * * Whether an image is interlaced. * * Parameters: * im - The image. * * Returns: * Non-zero for interlaced images, zero otherwise. * * See also: * - */ #define gdImageGetInterlaced(im) ((im)->interlace) /** * Macro: gdImagePalettePixel * * Gets the color of a pixel. * * Calling this macro is only valid for palette images. * No bounds checking is done for the coordinates. * * Parameters: * im - The image. * x - The x-coordinate. * y - The y-coordinate. * * See also: * - * - */ #define gdImagePalettePixel(im, x, y) (im)->pixels[(y)][(x)] /** * Macro: gdImageTrueColorPixel * * Gets the color of a pixel. * * Calling this macro is only valid for truecolor images. * No bounds checking is done for the coordinates. * * Parameters: * im - The image. * x - The x-coordinate. * y - The y-coordinate. * * See also: * - * - */ #define gdImageTrueColorPixel(im, x, y) (im)->tpixels[(y)][(x)] /** * Macro: gdImageResolutionX * * Gets the horizontal resolution in DPI. * * Parameters: * im - The image. * * See also: * - * - */ #define gdImageResolutionX(im) (im)->res_x /** * Macro: gdImageResolutionY * * Gets the vertical resolution in DPI. * * Parameters: * im - The image. * * See also: * - * - */ #define gdImageResolutionY(im) (im)->res_y /* I/O Support routines. */ BGD_DECLARE(gdIOCtx *) gdNewFileCtx (FILE *); /* If data is null, size is ignored and an initial data buffer is allocated automatically. NOTE: this function assumes gd has the right to free or reallocate "data" at will! Also note that gd will free "data" when the IO context is freed. If data is not null, it must point to memory allocated with gdMalloc, or by a call to gdImage[something]Ptr. If not, see gdNewDynamicCtxEx for an alternative. */ BGD_DECLARE(gdIOCtx *) gdNewDynamicCtx (int size, void *data); /* 2.0.21: if freeFlag is nonzero, gd will free and/or reallocate "data" as needed as described above. If freeFlag is zero, gd will never free or reallocate "data", which means that the context should only be used for *reading* an image from a memory buffer, or writing an image to a memory buffer which is already large enough. If the memory buffer is not large enough and an image write is attempted, the write operation will fail. Those wishing to write an image to a buffer in memory have a much simpler alternative in the gdImage[something]Ptr functions. */ BGD_DECLARE(gdIOCtx *) gdNewDynamicCtxEx (int size, void *data, int freeFlag); BGD_DECLARE(gdIOCtx *) gdNewSSCtx (gdSourcePtr in, gdSinkPtr out); BGD_DECLARE(void *) gdDPExtractData (struct gdIOCtx *ctx, int *size); #define GD2_CHUNKSIZE 128 #define GD2_CHUNKSIZE_MIN 64 #define GD2_CHUNKSIZE_MAX 4096 #define GD2_VERS 2 #define GD2_ID "gd2" #define GD2_FMT_RAW 1 #define GD2_FMT_COMPRESSED 2 /* Image comparison definitions */ BGD_DECLARE(int) gdImageCompare (gdImagePtr im1, gdImagePtr im2); BGD_DECLARE(void) gdImageFlipHorizontal(gdImagePtr im); BGD_DECLARE(void) gdImageFlipVertical(gdImagePtr im); BGD_DECLARE(void) gdImageFlipBoth(gdImagePtr im); #define GD_FLIP_HORINZONTAL 1 #define GD_FLIP_VERTICAL 2 #define GD_FLIP_BOTH 3 /** * Group: Crop * * Constants: gdCropMode * GD_CROP_DEFAULT - Default crop mode (4 corners or background) * GD_CROP_TRANSPARENT - Crop using the transparent color * GD_CROP_BLACK - Crop black borders * GD_CROP_WHITE - Crop white borders * GD_CROP_SIDES - Crop using colors of the 4 corners * * See also: * - **/ enum gdCropMode { GD_CROP_DEFAULT = 0, GD_CROP_TRANSPARENT, GD_CROP_BLACK, GD_CROP_WHITE, GD_CROP_SIDES, GD_CROP_THRESHOLD }; BGD_DECLARE(gdImagePtr) gdImageCrop(gdImagePtr src, const gdRect *crop); BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode); BGD_DECLARE(gdImagePtr) gdImageCropThreshold(gdImagePtr im, const unsigned int color, const float threshold); BGD_DECLARE(int) gdImageSetInterpolationMethod(gdImagePtr im, gdInterpolationMethod id); BGD_DECLARE(gdInterpolationMethod) gdImageGetInterpolationMethod(gdImagePtr im); BGD_DECLARE(gdImagePtr) gdImageScale(const gdImagePtr src, const unsigned int new_width, const unsigned int new_height); BGD_DECLARE(gdImagePtr) gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor); typedef enum { GD_AFFINE_TRANSLATE = 0, GD_AFFINE_SCALE, GD_AFFINE_ROTATE, GD_AFFINE_SHEAR_HORIZONTAL, GD_AFFINE_SHEAR_VERTICAL } gdAffineStandardMatrix; BGD_DECLARE(int) gdAffineApplyToPointF (gdPointFPtr dst, const gdPointFPtr src, const double affine[6]); BGD_DECLARE(int) gdAffineInvert (double dst[6], const double src[6]); BGD_DECLARE(int) gdAffineFlip (double dst_affine[6], const double src_affine[6], const int flip_h, const int flip_v); BGD_DECLARE(int) gdAffineConcat (double dst[6], const double m1[6], const double m2[6]); BGD_DECLARE(int) gdAffineIdentity (double dst[6]); BGD_DECLARE(int) gdAffineScale (double dst[6], const double scale_x, const double scale_y); BGD_DECLARE(int) gdAffineRotate (double dst[6], const double angle); BGD_DECLARE(int) gdAffineShearHorizontal (double dst[6], const double angle); BGD_DECLARE(int) gdAffineShearVertical(double dst[6], const double angle); BGD_DECLARE(int) gdAffineTranslate (double dst[6], const double offset_x, const double offset_y); BGD_DECLARE(double) gdAffineExpansion (const double src[6]); BGD_DECLARE(int) gdAffineRectilinear (const double src[6]); BGD_DECLARE(int) gdAffineEqual (const double matrix1[6], const double matrix2[6]); BGD_DECLARE(int) gdTransformAffineGetImage(gdImagePtr *dst, const gdImagePtr src, gdRectPtr src_area, const double affine[6]); BGD_DECLARE(int) gdTransformAffineCopy(gdImagePtr dst, int dst_x, int dst_y, const gdImagePtr src, gdRectPtr src_region, const double affine[6]); /* gdTransformAffineCopy(gdImagePtr dst, int x0, int y0, int x1, int y1, const gdImagePtr src, int src_width, int src_height, const double affine[6]); */ BGD_DECLARE(int) gdTransformAffineBoundingBox(gdRectPtr src, const double affine[6], gdRectPtr bbox); /** * Group: Image Comparison * * Constants: * GD_CMP_IMAGE - Actual image IS different * GD_CMP_NUM_COLORS - Number of colors in pallette differ * GD_CMP_COLOR - Image colors differ * GD_CMP_SIZE_X - Image width differs * GD_CMP_SIZE_Y - Image heights differ * GD_CMP_TRANSPARENT - Transparent color differs * GD_CMP_BACKGROUND - Background color differs * GD_CMP_INTERLACE - Interlaced setting differs * GD_CMP_TRUECOLOR - Truecolor vs palette differs * * See also: * - */ #define GD_CMP_IMAGE 1 #define GD_CMP_NUM_COLORS 2 #define GD_CMP_COLOR 4 #define GD_CMP_SIZE_X 8 #define GD_CMP_SIZE_Y 16 #define GD_CMP_TRANSPARENT 32 #define GD_CMP_BACKGROUND 64 #define GD_CMP_INTERLACE 128 #define GD_CMP_TRUECOLOR 256 /* resolution affects ttf font rendering, particularly hinting */ #define GD_RESOLUTION 96 /* pixels per inch */ /* Version information functions */ BGD_DECLARE(int) gdMajorVersion(void); BGD_DECLARE(int) gdMinorVersion(void); BGD_DECLARE(int) gdReleaseVersion(void); BGD_DECLARE(const char *) gdExtraVersion(void); BGD_DECLARE(const char *) gdVersionString(void); #ifdef __cplusplus } #endif /* newfangled special effects */ #include "gdfx.h" #endif /* GD_H */ #ifdef __cplusplus } #endif PKZ2ɰ?? X11/Xlibint.hnu[ /* Copyright 1984, 1985, 1987, 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _X11_XLIBINT_H_ #define _X11_XLIBINT_H_ 1 /* * Xlibint.h - Header definition and support file for the internal * support routines used by the C subroutine interface * library (Xlib) to the X Window System. * * Warning, there be dragons here.... */ #include #include #include /* to declare xEvent */ #include /* for configured options like XTHREADS */ /* The Xlib structs are full of implicit padding to properly align members. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif #ifdef WIN32 #define _XFlush _XFlushIt #endif struct _XGC { XExtData *ext_data; /* hook for extension to hang data */ GContext gid; /* protocol ID for graphics context */ Bool rects; /* boolean: TRUE if clipmask is list of rectangles */ Bool dashes; /* boolean: TRUE if dash-list is really a list */ unsigned long dirty;/* cache dirty bits */ XGCValues values; /* shadow structure of values */ }; struct _XDisplay { XExtData *ext_data; /* hook for extension to hang data */ struct _XFreeFuncs *free_funcs; /* internal free functions */ int fd; /* Network socket. */ int conn_checker; /* ugly thing used by _XEventsQueued */ int proto_major_version;/* maj. version of server's X protocol */ int proto_minor_version;/* minor version of server's X protocol */ char *vendor; /* vendor of the server hardware */ XID resource_base; /* resource ID base */ XID resource_mask; /* resource ID mask bits */ XID resource_id; /* allocator current ID */ int resource_shift; /* allocator shift to correct bits */ XID (*resource_alloc)( /* allocator function */ struct _XDisplay* ); int byte_order; /* screen byte order, LSBFirst, MSBFirst */ int bitmap_unit; /* padding and data requirements */ int bitmap_pad; /* padding requirements on bitmaps */ int bitmap_bit_order; /* LeastSignificant or MostSignificant */ int nformats; /* number of pixmap formats in list */ ScreenFormat *pixmap_format; /* pixmap format list */ int vnumber; /* Xlib's X protocol version number. */ int release; /* release of the server */ struct _XSQEvent *head, *tail; /* Input event queue. */ int qlen; /* Length of input event queue */ unsigned long last_request_read; /* seq number of last event read */ unsigned long request; /* sequence number of last request. */ char *last_req; /* beginning of last request, or dummy */ char *buffer; /* Output buffer starting address. */ char *bufptr; /* Output buffer index pointer. */ char *bufmax; /* Output buffer maximum+1 address. */ unsigned max_request_size; /* maximum number 32 bit words in request*/ struct _XrmHashBucketRec *db; int (*synchandler)( /* Synchronization handler */ struct _XDisplay* ); char *display_name; /* "host:display" string used on this connect*/ int default_screen; /* default screen for operations */ int nscreens; /* number of screens on this server*/ Screen *screens; /* pointer to list of screens */ unsigned long motion_buffer; /* size of motion buffer */ volatile unsigned long flags; /* internal connection flags */ int min_keycode; /* minimum defined keycode */ int max_keycode; /* maximum defined keycode */ KeySym *keysyms; /* This server's keysyms */ XModifierKeymap *modifiermap; /* This server's modifier keymap */ int keysyms_per_keycode;/* number of rows */ char *xdefaults; /* contents of defaults from server */ char *scratch_buffer; /* place to hang scratch buffer */ unsigned long scratch_length; /* length of scratch buffer */ int ext_number; /* extension number on this display */ struct _XExten *ext_procs; /* extensions initialized on this display */ /* * the following can be fixed size, as the protocol defines how * much address space is available. * While this could be done using the extension vector, there * may be MANY events processed, so a search through the extension * list to find the right procedure for each event might be * expensive if many extensions are being used. */ Bool (*event_vec[128])( /* vector for wire to event */ Display * /* dpy */, XEvent * /* re */, xEvent * /* event */ ); Status (*wire_vec[128])( /* vector for event to wire */ Display * /* dpy */, XEvent * /* re */, xEvent * /* event */ ); KeySym lock_meaning; /* for XLookupString */ struct _XLockInfo *lock; /* multi-thread state, display lock */ struct _XInternalAsync *async_handlers; /* for internal async */ unsigned long bigreq_size; /* max size of big requests */ struct _XLockPtrs *lock_fns; /* pointers to threads functions */ void (*idlist_alloc)( /* XID list allocator function */ Display * /* dpy */, XID * /* ids */, int /* count */ ); /* things above this line should not move, for binary compatibility */ struct _XKeytrans *key_bindings; /* for XLookupString */ Font cursor_font; /* for XCreateFontCursor */ struct _XDisplayAtoms *atoms; /* for XInternAtom */ unsigned int mode_switch; /* keyboard group modifiers */ unsigned int num_lock; /* keyboard numlock modifiers */ struct _XContextDB *context_db; /* context database */ Bool (**error_vec)( /* vector for wire to error */ Display * /* display */, XErrorEvent * /* he */, xError * /* we */ ); /* * Xcms information */ struct { XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */ XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */ XPointer perVisualIntensityMaps; /* linked list of XcmsIntensityMap */ } cms; struct _XIMFilter *im_filters; struct _XSQEvent *qfree; /* unallocated event queue elements */ unsigned long next_event_serial_num; /* inserted into next queue elt */ struct _XExten *flushes; /* Flush hooks */ struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */ int im_fd_length; /* number of im_fd_info */ struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */ int watcher_count; /* number of conn_watchers */ XPointer filedes; /* struct pollfd cache for _XWaitForReadable */ int (*savedsynchandler)( /* user synchandler when Xlib usurps */ Display * /* dpy */ ); XID resource_max; /* allocator max ID */ int xcmisc_opcode; /* major opcode for XC-MISC */ struct _XkbInfoRec *xkb_info; /* XKB info */ struct _XtransConnInfo *trans_conn; /* transport connection object */ struct _X11XCBPrivate *xcb; /* XCB glue private data */ /* Generic event cookie handling */ unsigned int next_cookie; /* next event cookie */ /* vector for wire to generic event, index is (extension - 128) */ Bool (*generic_event_vec[128])( Display * /* dpy */, XGenericEventCookie * /* Xlib event */, xEvent * /* wire event */); /* vector for event copy, index is (extension - 128) */ Bool (*generic_event_copy_vec[128])( Display * /* dpy */, XGenericEventCookie * /* in */, XGenericEventCookie * /* out*/); void *cookiejar; /* cookie events returned but not claimed */ #ifndef LONG64 unsigned long last_request_read_upper32bit; unsigned long request_upper32bit; #endif struct _XErrorThreadInfo *error_threads; }; #define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n) /* * access "last_request_read" and "request" with 64bit * warning: the value argument of the SET-macros must not * have any side-effects because it may get called twice. */ #ifndef LONG64 /* accessors for 32-bit unsigned long */ #define X_DPY_GET_REQUEST(dpy) \ ( \ ((uint64_t)(((struct _XDisplay*)dpy)->request)) \ + (((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) << 32) \ ) #define X_DPY_SET_REQUEST(dpy, value) \ ( \ (((struct _XDisplay*)dpy)->request = \ (value) & 0xFFFFFFFFUL), \ (((struct _XDisplay*)dpy)->request_upper32bit = \ ((uint64_t)(value)) >> 32), \ (void)0 /* don't use the result */ \ ) #define X_DPY_GET_LAST_REQUEST_READ(dpy) \ ( \ ((uint64_t)(((struct _XDisplay*)dpy)->last_request_read)) \ + ( \ ((uint64_t)( \ ((struct _XDisplay*)dpy)->last_request_read_upper32bit \ )) << 32 \ ) \ ) #define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \ ( \ (((struct _XDisplay*)dpy)->last_request_read = \ (value) & 0xFFFFFFFFUL), \ (((struct _XDisplay*)dpy)->last_request_read_upper32bit = \ ((uint64_t)(value)) >> 32), \ (void)0 /* don't use the result */ \ ) /* * widen a 32-bit sequence number to a 64 sequence number. * This macro makes the following assumptions: * - ulseq refers to a sequence that has already been sent * - ulseq means the most recent possible sequence number * with these lower 32 bits. * * The following optimization is used: * The comparison result is taken a 0 or 1 to avoid a branch. */ #define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) \ ( \ ((uint64_t)ulseq) \ + \ (( \ ((uint64_t)(((struct _XDisplay*)dpy)->request_upper32bit)) \ - (uint64_t)( \ (ulseq) > (((struct _XDisplay*)dpy)->request) \ ) \ ) << 32) \ ) #define X_DPY_REQUEST_INCREMENT(dpy) \ ( \ ((struct _XDisplay*)dpy)->request++, \ ( \ (((struct _XDisplay*)dpy)->request == 0) ? ( \ ((struct _XDisplay*)dpy)->request_upper32bit++ \ ) : 0 \ ), \ (void)0 /* don't use the result */ \ ) #define X_DPY_REQUEST_DECREMENT(dpy) \ ( \ ( \ (((struct _XDisplay*)dpy)->request == 0) ? (\ ((struct _XDisplay*)dpy)->request--, /* wrap */ \ ((struct _XDisplay*)dpy)->request_upper32bit-- \ ) : ( \ ((struct _XDisplay*)dpy)->request-- \ ) \ ), \ (void)0 /* don't use the result */ \ ) #else /* accessors for 64-bit unsigned long */ #define X_DPY_GET_REQUEST(dpy) \ (((struct _XDisplay*)dpy)->request) #define X_DPY_SET_REQUEST(dpy, value) \ ((struct _XDisplay*)dpy)->request = (value) #define X_DPY_GET_LAST_REQUEST_READ(dpy) \ (((struct _XDisplay*)dpy)->last_request_read) #define X_DPY_SET_LAST_REQUEST_READ(dpy, value) \ ((struct _XDisplay*)dpy)->last_request_read = (value) #define X_DPY_WIDEN_UNSIGNED_LONG_SEQ(dpy, ulseq) ulseq #define X_DPY_REQUEST_INCREMENT(dpy) ((struct _XDisplay*)dpy)->request++ #define X_DPY_REQUEST_DECREMENT(dpy) ((struct _XDisplay*)dpy)->request-- #endif #ifndef _XEVENT_ /* * _QEvent datatype for use in input queueing. */ typedef struct _XSQEvent { struct _XSQEvent *next; XEvent event; unsigned long qserial_num; /* so multi-threaded code can find new ones */ } _XQEvent; #endif #include #ifdef __sgi #define _SGI_MP_SOURCE /* turn this on to get MP safe errno */ #endif #include #define _XBCOPYFUNC _Xbcopy #include #include /* Utek leaves kernel macros around in include files (bleah) */ #ifdef dirty #undef dirty #endif #include #include #include _XFUNCPROTOBEGIN /* * The following definitions can be used for locking requests in multi-threaded * address spaces. */ #ifdef XTHREADS /* Author: Stephen Gildea, MIT X Consortium * * declarations for C Threads locking */ typedef struct _LockInfoRec *LockInfoPtr; /* interfaces for locking.c */ struct _XLockPtrs { /* used by all, including extensions; do not move */ void (*lock_display)( Display *dpy #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char *file , int line #endif ); void (*unlock_display)( Display *dpy #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char *file , int line #endif ); }; #if defined(WIN32) && !defined(_XLIBINT_) #define _XCreateMutex_fn (*_XCreateMutex_fn_p) #define _XFreeMutex_fn (*_XFreeMutex_fn_p) #define _XLockMutex_fn (*_XLockMutex_fn_p) #define _XUnlockMutex_fn (*_XUnlockMutex_fn_p) #define _Xglobal_lock (*_Xglobal_lock_p) #endif /* in XlibInt.c */ extern void (*_XCreateMutex_fn)( LockInfoPtr /* lock */ ); extern void (*_XFreeMutex_fn)( LockInfoPtr /* lock */ ); extern void (*_XLockMutex_fn)( LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */ #endif ); extern void (*_XUnlockMutex_fn)( LockInfoPtr /* lock */ #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) , char * /* file */ , int /* line */ #endif ); extern LockInfoPtr _Xglobal_lock; #if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) #define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__) #define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)((d),__FILE__,__LINE__) #define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock,__FILE__,__LINE__) #define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock,__FILE__,__LINE__) #else /* used everywhere, so must be fast if not using threads */ #define LockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->lock_display)(d) #define UnlockDisplay(d) if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)(d) #define _XLockMutex(lock) if (_XLockMutex_fn) (*_XLockMutex_fn)(lock) #define _XUnlockMutex(lock) if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock) #endif #define _XCreateMutex(lock) if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock); #define _XFreeMutex(lock) if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock); #else /* XTHREADS */ #define LockDisplay(dis) #define _XLockMutex(lock) #define _XUnlockMutex(lock) #define UnlockDisplay(dis) #define _XCreateMutex(lock) #define _XFreeMutex(lock) #endif #define Xfree(ptr) free((ptr)) /* * Note that some machines do not return a valid pointer for malloc(0), in * which case we provide an alternate under the control of the * define MALLOC_0_RETURNS_NULL. This is necessary because some * Xlib code expects malloc(0) to return a valid pointer to storage. */ #if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__) # define Xmalloc(size) malloc(((size) == 0 ? 1 : (size))) # define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size))) # define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize)) #else # define Xmalloc(size) malloc((size)) # define Xrealloc(ptr, size) realloc((ptr), (size)) # define Xcalloc(nelem, elsize) calloc((nelem), (elsize)) #endif #include #define LOCKED 1 #define UNLOCKED 0 #ifndef BUFSIZE #define BUFSIZE 2048 /* X output buffer size. */ #endif #ifndef PTSPERBATCH #define PTSPERBATCH 1024 /* point batching */ #endif #ifndef WLNSPERBATCH #define WLNSPERBATCH 50 /* wide line batching */ #endif #ifndef ZLNSPERBATCH #define ZLNSPERBATCH 1024 /* thin line batching */ #endif #ifndef WRCTSPERBATCH #define WRCTSPERBATCH 10 /* wide line rectangle batching */ #endif #ifndef ZRCTSPERBATCH #define ZRCTSPERBATCH 256 /* thin line rectangle batching */ #endif #ifndef FRCTSPERBATCH #define FRCTSPERBATCH 256 /* filled rectangle batching */ #endif #ifndef FARCSPERBATCH #define FARCSPERBATCH 256 /* filled arc batching */ #endif #ifndef CURSORFONT #define CURSORFONT "cursor" /* standard cursor fonts */ #endif /* * Display flags */ #define XlibDisplayIOError (1L << 0) #define XlibDisplayClosing (1L << 1) #define XlibDisplayNoXkb (1L << 2) #define XlibDisplayPrivSync (1L << 3) #define XlibDisplayProcConni (1L << 4) /* in _XProcessInternalConnection */ #define XlibDisplayReadEvents (1L << 5) /* in _XReadEvents */ #define XlibDisplayReply (1L << 5) /* in _XReply */ #define XlibDisplayWriting (1L << 6) /* in _XFlushInt, _XSend */ #define XlibDisplayDfltRMDB (1L << 7) /* mark if RM db from XGetDefault */ /* * X Protocol packetizing macros. */ /* Leftover from CRAY support - was defined empty on all non-Cray systems */ #define WORD64ALIGN /** * Return a len-sized request buffer for the request type. This function may * flush the output queue. * * @param dpy The display connection * @param type The request type * @param len Length of the request in bytes * * @returns A pointer to the request buffer with a few default values * initialized. */ extern void *_XGetRequest(Display *dpy, CARD8 type, size_t len); /* GetReqSized is the same as GetReq but allows the caller to specify the * size in bytes. 'sz' must be a multiple of 4! */ #define GetReqSized(name, sz, req) \ req = (x##name##Req *) _XGetRequest(dpy, X_##name, sz) /* * GetReq - Get the next available X request packet in the buffer and * return it. * * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc. * "req" is the name of the request pointer. * */ #define GetReq(name, req) \ GetReqSized(name, SIZEOF(x##name##Req), req) /* GetReqExtra is the same as GetReq, but allocates "n" additional bytes after the request. "n" must be a multiple of 4! */ #define GetReqExtra(name, n, req) \ GetReqSized(name, SIZEOF(x##name##Req) + n, req) /* * GetResReq is for those requests that have a resource ID * (Window, Pixmap, GContext, etc.) as their single argument. * "rid" is the name of the resource. */ #define GetResReq(name, rid, req) \ req = (xResourceReq *) _XGetRequest(dpy, X_##name, SIZEOF(xResourceReq)); \ req->id = (rid) /* * GetEmptyReq is for those requests that have no arguments * at all. */ #define GetEmptyReq(name, req) \ req = (xReq *) _XGetRequest(dpy, X_##name, SIZEOF(xReq)) /* * MakeBigReq sets the CARD16 "req->length" to 0 and inserts a new CARD32 * length, after req->length, before the data in the request. The new length * includes the "n" extra 32-bit words. * * Do not use MakeBigReq if there is no data already in the request. * req->length must already be >= 2. */ #ifdef LONG64 #define MakeBigReq(req,n) \ { \ CARD64 _BRdat; \ CARD32 _BRlen = req->length - 1; \ req->length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \ ((CARD32 *)req)[1] = _BRlen + n + 2; \ Data32(dpy, &_BRdat, 4); \ } #else #define MakeBigReq(req,n) \ { \ CARD32 _BRdat; \ CARD32 _BRlen = req->length - 1; \ req->length = 0; \ _BRdat = ((CARD32 *)req)[_BRlen]; \ memmove(((char *)req) + 8, ((char *)req) + 4, (_BRlen - 1) << 2); \ ((CARD32 *)req)[1] = _BRlen + n + 2; \ Data32(dpy, &_BRdat, 4); \ } #endif /* * SetReqLen increases the count of 32-bit words in the request by "n", * or by "badlen" if "n" is too large. * * Do not use SetReqLen if "req" does not already have data after the * xReq header. req->length must already be >= 2. */ #ifndef __clang_analyzer__ #define SetReqLen(req,n,badlen) \ if ((req->length + n) > (unsigned)65535) { \ if (dpy->bigreq_size) { \ MakeBigReq(req,n) \ } else { \ n = badlen; \ req->length += n; \ } \ } else \ req->length += n #else #define SetReqLen(req,n,badlen) \ req->length += n #endif #define SyncHandle() \ if (dpy->synchandler) (*dpy->synchandler)(dpy) extern void _XFlushGCCache(Display *dpy, GC gc); #define FlushGC(dpy, gc) \ if ((gc)->dirty) _XFlushGCCache((dpy), (gc)) /* * Data - Place data in the buffer and pad the end to provide * 32 bit word alignment. Transmit if the buffer fills. * * "dpy" is a pointer to a Display. * "data" is a pointer to a data buffer. * "len" is the length of the data buffer. */ #ifndef DataRoutineIsProcedure #define Data(dpy, data, len) {\ if (dpy->bufptr + (len) <= dpy->bufmax) {\ memcpy(dpy->bufptr, data, (int)len);\ dpy->bufptr += ((len) + 3) & ~3;\ } else\ _XSend(dpy, data, len);\ } #endif /* DataRoutineIsProcedure */ /* Allocate bytes from the buffer. No padding is done, so if * the length is not a multiple of 4, the caller must be * careful to leave the buffer aligned after sending the * current request. * * "type" is the type of the pointer being assigned to. * "ptr" is the pointer being assigned to. * "n" is the number of bytes to allocate. * * Example: * xTextElt *elt; * BufAlloc (xTextElt *, elt, nbytes) */ #define BufAlloc(type, ptr, n) \ if (dpy->bufptr + (n) > dpy->bufmax) \ _XFlush (dpy); \ ptr = (type) dpy->bufptr; \ memset(ptr, '\0', n); \ dpy->bufptr += (n); #define Data16(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len)) #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len)) #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len)) #ifdef LONG64 #define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)data, len) extern int _XData32( Display *dpy, register _Xconst long *data, unsigned len ); extern void _XRead32( Display *dpy, register long *data, long len ); #else #define Data32(dpy, data, len) Data((dpy), (_Xconst char *)(data), (len)) #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len)) #endif #define PackData16(dpy,data,len) Data16 (dpy, data, len) #define PackData32(dpy,data,len) Data32 (dpy, data, len) /* Xlib manual is bogus */ #define PackData(dpy,data,len) PackData16 (dpy, data, len) #define min(a,b) (((a) < (b)) ? (a) : (b)) #define max(a,b) (((a) > (b)) ? (a) : (b)) #define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \ (((cs)->rbearing|(cs)->lbearing| \ (cs)->ascent|(cs)->descent) == 0)) /* * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit * character. If the character is in the column and exists, then return the * appropriate metrics (note that fonts with common per-character metrics will * return min_bounds). If none of these hold true, try again with the default * char. */ #define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \ { \ cs = def; \ if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \ if (fs->per_char == NULL) { \ cs = &fs->min_bounds; \ } else { \ cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \ if (CI_NONEXISTCHAR(cs)) cs = def; \ } \ } \ } #define CI_GET_DEFAULT_INFO_1D(fs,cs) \ CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs) /* * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and * column. This is used for fonts that have more than row zero. */ #define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \ { \ cs = def; \ if (row >= fs->min_byte1 && row <= fs->max_byte1 && \ col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \ if (fs->per_char == NULL) { \ cs = &fs->min_bounds; \ } else { \ cs = &fs->per_char[((row - fs->min_byte1) * \ (fs->max_char_or_byte2 - \ fs->min_char_or_byte2 + 1)) + \ (col - fs->min_char_or_byte2)]; \ if (CI_NONEXISTCHAR(cs)) cs = def; \ } \ } \ } #define CI_GET_DEFAULT_INFO_2D(fs,cs) \ { \ unsigned int r = (fs->default_char >> 8); \ unsigned int c = (fs->default_char & 0xff); \ CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \ } /* srcvar must be a variable for large architecture version */ #define OneDataCard32(dpy,dstaddr,srcvar) \ { *(CARD32 *)(dstaddr) = (srcvar); } typedef struct _XInternalAsync { struct _XInternalAsync *next; /* * handler arguments: * rep is the generic reply that caused this handler * to be invoked. It must also be passed to _XGetAsyncReply. * buf and len are opaque values that must be passed to * _XGetAsyncReply or _XGetAsyncData. * data is the closure stored in this struct. * The handler returns True iff it handled this reply. */ Bool (*handler)( Display* /* dpy */, xReply* /* rep */, char* /* buf */, int /* len */, XPointer /* data */ ); XPointer data; } _XAsyncHandler; /* * This struct is part of the ABI and is defined by value * in user-code. This means that we cannot make * the sequence-numbers 64bit. */ typedef struct _XAsyncEState { unsigned long min_sequence_number; unsigned long max_sequence_number; unsigned char error_code; unsigned char major_opcode; unsigned short minor_opcode; unsigned char last_error_received; int error_count; } _XAsyncErrorState; extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler); #define DeqAsyncHandler(dpy,handler) { \ if (dpy->async_handlers == (handler)) \ dpy->async_handlers = (handler)->next; \ else \ _XDeqAsyncHandler(dpy, handler); \ } typedef void (*FreeFuncType) ( Display* /* display */ ); typedef int (*FreeModmapType) ( XModifierKeymap* /* modmap */ ); /* * This structure is private to the library. */ typedef struct _XFreeFuncs { FreeFuncType atoms; /* _XFreeAtomTable */ FreeModmapType modifiermap; /* XFreeModifiermap */ FreeFuncType key_bindings; /* _XFreeKeyBindings */ FreeFuncType context_db; /* _XFreeContextDB */ FreeFuncType defaultCCCs; /* _XcmsFreeDefaultCCCs */ FreeFuncType clientCmaps; /* _XcmsFreeClientCmaps */ FreeFuncType intensityMaps; /* _XcmsFreeIntensityMaps */ FreeFuncType im_filters; /* _XFreeIMFilters */ FreeFuncType xkb; /* _XkbFreeInfo */ } _XFreeFuncRec; /* types for InitExt.c */ typedef int (*CreateGCType) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ); typedef int (*CopyGCType)( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ); typedef int (*FlushGCType) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ); typedef int (*FreeGCType) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ); typedef int (*CreateFontType) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ ); typedef int (*FreeFontType) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ ); typedef int (*CloseDisplayType) ( Display* /* display */, XExtCodes* /* codes */ ); typedef int (*ErrorType) ( Display* /* display */, xError* /* err */, XExtCodes* /* codes */, int* /* ret_code */ ); typedef char* (*ErrorStringType) ( Display* /* display */, int /* code */, XExtCodes* /* codes */, char* /* buffer */, int /* nbytes */ ); typedef void (*PrintErrorType)( Display* /* display */, XErrorEvent* /* ev */, void* /* fp */ ); typedef void (*BeforeFlushType)( Display* /* display */, XExtCodes* /* codes */, _Xconst char* /* data */, long /* len */ ); /* * This structure is private to the library. */ typedef struct _XExten { /* private to extension mechanism */ struct _XExten *next; /* next in list */ XExtCodes codes; /* public information, all extension told */ CreateGCType create_GC; /* routine to call when GC created */ CopyGCType copy_GC; /* routine to call when GC copied */ FlushGCType flush_GC; /* routine to call when GC flushed */ FreeGCType free_GC; /* routine to call when GC freed */ CreateFontType create_Font; /* routine to call when Font created */ FreeFontType free_Font; /* routine to call when Font freed */ CloseDisplayType close_display; /* routine to call when connection closed */ ErrorType error; /* who to call when an error occurs */ ErrorStringType error_string; /* routine to supply error string */ char *name; /* name of this extension */ PrintErrorType error_values; /* routine to supply error values */ BeforeFlushType before_flush; /* routine to call when sending data */ struct _XExten *next_flush; /* next in list of those with flushes */ } _XExtension; /* Temporary definition until we can depend on an xproto release with it */ #ifdef _X_COLD # define _XLIB_COLD _X_COLD #elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */ # define _XLIB_COLD __attribute__((__cold__)) #else # define _XLIB_COLD /* nothing */ #endif /* extension hooks */ #ifdef DataRoutineIsProcedure extern void Data(Display *dpy, char *data, long len); #endif extern int _XError( Display* /* dpy */, xError* /* rep */ ); extern int _XIOError( Display* /* dpy */ ) _X_NORETURN; extern int (*_XIOErrorFunction)( Display* /* dpy */ ); extern int (*_XErrorFunction)( Display* /* dpy */, XErrorEvent* /* error_event */ ); extern void _XEatData( Display* /* dpy */, unsigned long /* n */ ) _XLIB_COLD; extern void _XEatDataWords( Display* /* dpy */, unsigned long /* n */ ) _XLIB_COLD; #if defined(__SUNPRO_C) /* Studio compiler alternative to "cold" attribute */ # pragma rarely_called(_XEatData, _XEatDataWords) #endif extern char *_XAllocScratch( Display* /* dpy */, unsigned long /* nbytes */ ); extern char *_XAllocTemp( Display* /* dpy */, unsigned long /* nbytes */ ); extern void _XFreeTemp( Display* /* dpy */, char* /* buf */, unsigned long /* nbytes */ ); extern Visual *_XVIDtoVisual( Display* /* dpy */, VisualID /* id */ ); extern unsigned long _XSetLastRequestRead( Display* /* dpy */, xGenericReply* /* rep */ ); extern int _XGetHostname( char* /* buf */, int /* maxlen */ ); extern Screen *_XScreenOfWindow( Display* /* dpy */, Window /* w */ ); extern Bool _XAsyncErrorHandler( Display* /* dpy */, xReply* /* rep */, char* /* buf */, int /* len */, XPointer /* data */ ); extern char *_XGetAsyncReply( Display* /* dpy */, char* /* replbuf */, xReply* /* rep */, char* /* buf */, int /* len */, int /* extra */, Bool /* discard */ ); extern void _XGetAsyncData( Display* /* dpy */, char * /* data */, char * /* buf */, int /* len */, int /* skip */, int /* datalen */, int /* discardtotal */ ); extern void _XFlush( Display* /* dpy */ ); extern int _XEventsQueued( Display* /* dpy */, int /* mode */ ); extern void _XReadEvents( Display* /* dpy */ ); extern int _XRead( Display* /* dpy */, char* /* data */, long /* size */ ); extern void _XReadPad( Display* /* dpy */, char* /* data */, long /* size */ ); extern void _XSend( Display* /* dpy */, _Xconst char* /* data */, long /* size */ ); extern Status _XReply( Display* /* dpy */, xReply* /* rep */, int /* extra */, Bool /* discard */ ); extern void _XEnq( Display* /* dpy */, xEvent* /* event */ ); extern void _XDeq( Display* /* dpy */, _XQEvent* /* prev */, _XQEvent* /* qelt */ ); extern Bool _XUnknownWireEvent( Display* /* dpy */, XEvent* /* re */, xEvent* /* event */ ); extern Bool _XUnknownWireEventCookie( Display* /* dpy */, XGenericEventCookie* /* re */, xEvent* /* event */ ); extern Bool _XUnknownCopyEventCookie( Display* /* dpy */, XGenericEventCookie* /* in */, XGenericEventCookie* /* out */ ); extern Status _XUnknownNativeEvent( Display* /* dpy */, XEvent* /* re */, xEvent* /* event */ ); extern Bool _XWireToEvent(Display *dpy, XEvent *re, xEvent *event); extern Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we); extern Bool _XPollfdCacheInit(Display *dpy); extern void _XPollfdCacheAdd(Display *dpy, int fd); extern void _XPollfdCacheDel(Display *dpy, int fd); extern XID _XAllocID(Display *dpy); extern void _XAllocIDs(Display *dpy, XID *ids, int count); extern int _XFreeExtData( XExtData* /* extension */ ); extern int (*XESetCreateGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */ ))( Display*, GC, XExtCodes* ); extern int (*XESetCopyGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */ ))( Display*, GC, XExtCodes* ); extern int (*XESetFlushGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */ ))( Display*, GC, XExtCodes* ); extern int (*XESetFreeGC( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, GC /* gc */, XExtCodes* /* codes */ ) /* proc */ ))( Display*, GC, XExtCodes* ); extern int (*XESetCreateFont( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ ) /* proc */ ))( Display*, XFontStruct*, XExtCodes* ); extern int (*XESetFreeFont( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, XFontStruct* /* fs */, XExtCodes* /* codes */ ) /* proc */ ))( Display*, XFontStruct*, XExtCodes* ); extern int (*XESetCloseDisplay( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, XExtCodes* /* codes */ ) /* proc */ ))( Display*, XExtCodes* ); extern int (*XESetError( Display* /* display */, int /* extension */, int (*) ( Display* /* display */, xError* /* err */, XExtCodes* /* codes */, int* /* ret_code */ ) /* proc */ ))( Display*, xError*, XExtCodes*, int* ); extern char* (*XESetErrorString( Display* /* display */, int /* extension */, char* (*) ( Display* /* display */, int /* code */, XExtCodes* /* codes */, char* /* buffer */, int /* nbytes */ ) /* proc */ ))( Display*, int, XExtCodes*, char*, int ); extern void (*XESetPrintErrorValues ( Display* /* display */, int /* extension */, void (*)( Display* /* display */, XErrorEvent* /* ev */, void* /* fp */ ) /* proc */ ))( Display*, XErrorEvent*, void* ); extern Bool (*XESetWireToEvent( Display* /* display */, int /* event_number */, Bool (*) ( Display* /* display */, XEvent* /* re */, xEvent* /* event */ ) /* proc */ ))( Display*, XEvent*, xEvent* ); extern Bool (*XESetWireToEventCookie( Display* /* display */, int /* extension */, Bool (*) ( Display* /* display */, XGenericEventCookie* /* re */, xEvent* /* event */ ) /* proc */ ))( Display*, XGenericEventCookie*, xEvent* ); extern Bool (*XESetCopyEventCookie( Display* /* display */, int /* extension */, Bool (*) ( Display* /* display */, XGenericEventCookie* /* in */, XGenericEventCookie* /* out */ ) /* proc */ ))( Display*, XGenericEventCookie*, XGenericEventCookie* ); extern Status (*XESetEventToWire( Display* /* display */, int /* event_number */, Status (*) ( Display* /* display */, XEvent* /* re */, xEvent* /* event */ ) /* proc */ ))( Display*, XEvent*, xEvent* ); extern Bool (*XESetWireToError( Display* /* display */, int /* error_number */, Bool (*) ( Display* /* display */, XErrorEvent* /* he */, xError* /* we */ ) /* proc */ ))( Display*, XErrorEvent*, xError* ); extern void (*XESetBeforeFlush( Display* /* display */, int /* error_number */, void (*) ( Display* /* display */, XExtCodes* /* codes */, _Xconst char* /* data */, long /* len */ ) /* proc */ ))( Display*, XExtCodes*, _Xconst char*, long ); /* internal connections for IMs */ typedef void (*_XInternalConnectionProc)( Display* /* dpy */, int /* fd */, XPointer /* call_data */ ); extern Status _XRegisterInternalConnection( Display* /* dpy */, int /* fd */, _XInternalConnectionProc /* callback */, XPointer /* call_data */ ); extern void _XUnregisterInternalConnection( Display* /* dpy */, int /* fd */ ); extern void _XProcessInternalConnection( Display* /* dpy */, struct _XConnectionInfo* /* conn_info */ ); /* Display structure has pointers to these */ struct _XConnectionInfo { /* info from _XRegisterInternalConnection */ int fd; _XInternalConnectionProc read_callback; XPointer call_data; XPointer *watch_data; /* set/used by XConnectionWatchProc */ struct _XConnectionInfo *next; }; struct _XConnWatchInfo { /* info from XAddConnectionWatch */ XConnectionWatchProc fn; XPointer client_data; struct _XConnWatchInfo *next; }; #ifdef __UNIXOS2__ extern char* __XOS2RedirRoot( char* ); #endif extern int _XTextHeight( XFontStruct* /* font_struct */, _Xconst char* /* string */, int /* count */ ); extern int _XTextHeight16( XFontStruct* /* font_struct */, _Xconst XChar2b* /* string */, int /* count */ ); #if defined(WIN32) extern int _XOpenFile( _Xconst char* /* path */, int /* flags */ ); extern int _XOpenFileMode( _Xconst char* /* path */, int /* flags */, mode_t /* mode */ ); extern void* _XFopenFile( _Xconst char* /* path */, _Xconst char* /* mode */ ); extern int _XAccessFile( _Xconst char* /* path */ ); #else #define _XOpenFile(path,flags) open(path,flags) #define _XOpenFileMode(path,flags,mode) open(path,flags,mode) #define _XFopenFile(path,mode) fopen(path,mode) #endif /* EvToWire.c */ extern Status _XEventToWire(Display *dpy, XEvent *re, xEvent *event); extern int _XF86LoadQueryLocaleFont( Display* /* dpy */, _Xconst char* /* name*/, XFontStruct** /* xfp*/, Font* /* fidp */ ); extern void _XProcessWindowAttributes ( register Display *dpy, xChangeWindowAttributesReq *req, register unsigned long valuemask, register XSetWindowAttributes *attributes); extern int _XDefaultError( Display *dpy, XErrorEvent *event); extern int _XDefaultIOError( Display *dpy); extern void _XSetClipRectangles ( register Display *dpy, GC gc, int clip_x_origin, int clip_y_origin, XRectangle *rectangles, int n, int ordering); Status _XGetWindowAttributes( register Display *dpy, Window w, XWindowAttributes *attr); int _XPutBackEvent ( register Display *dpy, register XEvent *event); extern Bool _XIsEventCookie( Display *dpy, XEvent *ev); extern void _XFreeEventCookies( Display *dpy); extern void _XStoreEventCookie( Display *dpy, XEvent *ev); extern Bool _XFetchEventCookie( Display *dpy, XGenericEventCookie *ev); extern Bool _XCopyEventCookie( Display *dpy, XGenericEventCookie *in, XGenericEventCookie *out); /* lcFile.c */ extern void xlocaledir( char *buf, int buf_len ); #ifdef __clang__ #pragma clang diagnostic pop #endif _XFUNCPROTOEND #endif /* _X11_XLIBINT_H_ */ PKZyy X11/XKBlib.hnu[/************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _X11_XKBLIB_H_ #define _X11_XKBLIB_H_ #include #include typedef struct _XkbAnyEvent { int type; /* XkbAnyEvent */ unsigned long serial; /* # of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XKB event minor code */ unsigned int device; /* device ID */ } XkbAnyEvent; typedef struct _XkbNewKeyboardNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbNewKeyboardNotify */ int device; /* device ID */ int old_device; /* device ID of previous keyboard */ int min_key_code; /* minimum key code */ int max_key_code; /* maximum key code */ int old_min_key_code;/* min key code of previous kbd */ int old_max_key_code;/* max key code of previous kbd */ unsigned int changed; /* changed aspects of the keyboard */ char req_major; /* major and minor opcode of req */ char req_minor; /* that caused change, if applicable */ } XkbNewKeyboardNotifyEvent; typedef struct _XkbMapNotifyEvent { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbMapNotify */ int device; /* device ID */ unsigned int changed; /* fields which have been changed */ unsigned int flags; /* reserved */ int first_type; /* first changed key type */ int num_types; /* number of changed key types */ KeyCode min_key_code; KeyCode max_key_code; KeyCode first_key_sym; KeyCode first_key_act; KeyCode first_key_behavior; KeyCode first_key_explicit; KeyCode first_modmap_key; KeyCode first_vmodmap_key; int num_key_syms; int num_key_acts; int num_key_behaviors; int num_key_explicit; int num_modmap_keys; int num_vmodmap_keys; unsigned int vmods; /* mask of changed virtual mods */ } XkbMapNotifyEvent; typedef struct _XkbStateNotifyEvent { int type; /* XkbAnyEvent */ unsigned long serial; /* # of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbStateNotify */ int device; /* device ID */ unsigned int changed; /* mask of changed state components */ int group; /* keyboard group */ int base_group; /* base keyboard group */ int latched_group; /* latched keyboard group */ int locked_group; /* locked keyboard group */ unsigned int mods; /* modifier state */ unsigned int base_mods; /* base modifier state */ unsigned int latched_mods; /* latched modifiers */ unsigned int locked_mods; /* locked modifiers */ int compat_state; /* compatibility state */ unsigned char grab_mods; /* mods used for grabs */ unsigned char compat_grab_mods;/* grab mods for non-XKB clients */ unsigned char lookup_mods; /* mods sent to clients */ unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */ int ptr_buttons; /* pointer button state */ KeyCode keycode; /* keycode that caused the change */ char event_type; /* KeyPress or KeyRelease */ char req_major; /* Major opcode of request */ char req_minor; /* Minor opcode of request */ } XkbStateNotifyEvent; typedef struct _XkbControlsNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbControlsNotify */ int device; /* device ID */ unsigned int changed_ctrls; /* controls with changed sub-values */ unsigned int enabled_ctrls; /* controls currently enabled */ unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */ int num_groups; /* total groups on keyboard */ KeyCode keycode; /* key that caused change or 0 */ char event_type; /* type of event that caused change */ char req_major; /* if keycode==0, major and minor */ char req_minor; /* opcode of req that caused change */ } XkbControlsNotifyEvent; typedef struct _XkbIndicatorNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbIndicatorNotify */ int device; /* device ID */ unsigned int changed; /* indicators with new state or map */ unsigned int state; /* current state of all indicators */ } XkbIndicatorNotifyEvent; typedef struct _XkbNamesNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbNamesNotify */ int device; /* device ID */ unsigned int changed; /* names that have changed */ int first_type; /* first key type with new name */ int num_types; /* number of key types with new names */ int first_lvl; /* first key type new new level names */ int num_lvls; /* # of key types w/new level names */ int num_aliases; /* total number of key aliases*/ int num_radio_groups;/* total number of radio groups */ unsigned int changed_vmods; /* virtual modifiers with new names */ unsigned int changed_groups; /* groups with new names */ unsigned int changed_indicators;/* indicators with new names */ int first_key; /* first key with new name */ int num_keys; /* number of keys with new names */ } XkbNamesNotifyEvent; typedef struct _XkbCompatMapNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbCompatMapNotify */ int device; /* device ID */ unsigned int changed_groups; /* groups with new compat maps */ int first_si; /* first new symbol interp */ int num_si; /* number of new symbol interps */ int num_total_si; /* total # of symbol interps */ } XkbCompatMapNotifyEvent; typedef struct _XkbBellNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbBellNotify */ int device; /* device ID */ int percent; /* requested volume as a % of maximum */ int pitch; /* requested pitch in Hz */ int duration; /* requested duration in useconds */ int bell_class; /* (input extension) feedback class */ int bell_id; /* (input extension) ID of feedback */ Atom name; /* "name" of requested bell */ Window window; /* window associated with event */ Bool event_only; /* "event only" requested */ } XkbBellNotifyEvent; typedef struct _XkbActionMessage { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbActionMessage */ int device; /* device ID */ KeyCode keycode; /* key that generated the event */ Bool press; /* true if act caused by key press */ Bool key_event_follows;/* true if key event also generated */ int group; /* effective group */ unsigned int mods; /* effective mods */ char message[XkbActionMessageLength+1]; /* message -- leave space for NUL */ } XkbActionMessageEvent; typedef struct _XkbAccessXNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbAccessXNotify */ int device; /* device ID */ int detail; /* XkbAXN_* */ int keycode; /* key of event */ int sk_delay; /* current slow keys delay */ int debounce_delay; /* current debounce delay */ } XkbAccessXNotifyEvent; typedef struct _XkbExtensionDeviceNotify { int type; /* XkbAnyEvent */ unsigned long serial; /* of last req processed by server */ Bool send_event; /* is this from a SendEvent request? */ Display * display; /* Display the event was read from */ Time time; /* milliseconds */ int xkb_type; /* XkbExtensionDeviceNotify */ int device; /* device ID */ unsigned int reason; /* reason for the event */ unsigned int supported; /* mask of supported features */ unsigned int unsupported; /* mask of unsupported features */ /* that some app tried to use */ int first_btn; /* first button that changed */ int num_btns; /* range of buttons changed */ unsigned int leds_defined; /* indicators with names or maps */ unsigned int led_state; /* current state of the indicators */ int led_class; /* feedback class for led changes */ int led_id; /* feedback id for led changes */ } XkbExtensionDeviceNotifyEvent; typedef union _XkbEvent { int type; XkbAnyEvent any; XkbNewKeyboardNotifyEvent new_kbd; XkbMapNotifyEvent map; XkbStateNotifyEvent state; XkbControlsNotifyEvent ctrls; XkbIndicatorNotifyEvent indicators; XkbNamesNotifyEvent names; XkbCompatMapNotifyEvent compat; XkbBellNotifyEvent bell; XkbActionMessageEvent message; XkbAccessXNotifyEvent accessx; XkbExtensionDeviceNotifyEvent device; XEvent core; } XkbEvent; typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr; /* XkbOpenDisplay error codes */ #define XkbOD_Success 0 #define XkbOD_BadLibraryVersion 1 #define XkbOD_ConnectionRefused 2 #define XkbOD_NonXkbServer 3 #define XkbOD_BadServerVersion 4 /* Values for XlibFlags */ #define XkbLC_ForceLatin1Lookup (1<<0) #define XkbLC_ConsumeLookupMods (1<<1) #define XkbLC_AlwaysConsumeShiftAndLock (1<<2) #define XkbLC_IgnoreNewKeyboards (1<<3) #define XkbLC_ControlFallback (1<<4) #define XkbLC_ConsumeKeysOnComposeFail (1<<29) #define XkbLC_ComposeLED (1<<30) #define XkbLC_BeepOnComposeFail (1<<31) #define XkbLC_AllComposeControls (0xc0000000) #define XkbLC_AllControls (0xc000001f) _XFUNCPROTOBEGIN extern Bool XkbIgnoreExtension( Bool /* ignore */ ); extern Display *XkbOpenDisplay( char * /* name */, int * /* ev_rtrn */, int * /* err_rtrn */, int * /* major_rtrn */, int * /* minor_rtrn */, int * /* reason */ ); extern Bool XkbQueryExtension( Display * /* dpy */, int * /* opcodeReturn */, int * /* eventBaseReturn */, int * /* errorBaseReturn */, int * /* majorRtrn */, int * /* minorRtrn */ ); extern Bool XkbUseExtension( Display * /* dpy */, int * /* major_rtrn */, int * /* minor_rtrn */ ); extern Bool XkbLibraryVersion( int * /* libMajorRtrn */, int * /* libMinorRtrn */ ); extern unsigned int XkbSetXlibControls( Display* /* dpy */, unsigned int /* affect */, unsigned int /* values */ ); extern unsigned int XkbGetXlibControls( Display* /* dpy */ ); extern unsigned int XkbXlibControlsImplemented(void); typedef Atom (*XkbInternAtomFunc)( Display * /* dpy */, _Xconst char * /* name */, Bool /* only_if_exists */ ); typedef char * (*XkbGetAtomNameFunc)( Display * /* dpy */, Atom /* atom */ ); extern void XkbSetAtomFuncs( XkbInternAtomFunc /* getAtom */, XkbGetAtomNameFunc /* getName */ ); extern KeySym XkbKeycodeToKeysym( Display * /* dpy */, #if NeedWidePrototypes unsigned int /* kc */, #else KeyCode /* kc */, #endif int /* group */, int /* level */ ); extern unsigned int XkbKeysymToModifiers( Display * /* dpy */, KeySym /* ks */ ); extern Bool XkbLookupKeySym( Display * /* dpy */, KeyCode /* keycode */, unsigned int /* modifiers */, unsigned int * /* modifiers_return */, KeySym * /* keysym_return */ ); extern int XkbLookupKeyBinding( Display * /* dpy */, KeySym /* sym_rtrn */, unsigned int /* mods */, char * /* buffer */, int /* nbytes */, int * /* extra_rtrn */ ); extern Bool XkbTranslateKeyCode( XkbDescPtr /* xkb */, KeyCode /* keycode */, unsigned int /* modifiers */, unsigned int * /* modifiers_return */, KeySym * /* keysym_return */ ); extern int XkbTranslateKeySym( Display * /* dpy */, register KeySym * /* sym_return */, unsigned int /* modifiers */, char * /* buffer */, int /* nbytes */, int * /* extra_rtrn */ ); extern Bool XkbSetAutoRepeatRate( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* delay */, unsigned int /* interval */ ); extern Bool XkbGetAutoRepeatRate( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int * /* delayRtrn */, unsigned int * /* intervalRtrn */ ); extern Bool XkbChangeEnabledControls( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */ ); extern Bool XkbDeviceBell( Display * /* dpy */, Window /* win */, int /* deviceSpec */, int /* bellClass */, int /* bellID */, int /* percent */, Atom /* name */ ); extern Bool XkbForceDeviceBell( Display * /* dpy */, int /* deviceSpec */, int /* bellClass */, int /* bellID */, int /* percent */ ); extern Bool XkbDeviceBellEvent( Display * /* dpy */, Window /* win */, int /* deviceSpec */, int /* bellClass */, int /* bellID */, int /* percent */, Atom /* name */ ); extern Bool XkbBell( Display * /* dpy */, Window /* win */, int /* percent */, Atom /* name */ ); extern Bool XkbForceBell( Display * /* dpy */, int /* percent */ ); extern Bool XkbBellEvent( Display * /* dpy */, Window /* win */, int /* percent */, Atom /* name */ ); extern Bool XkbSelectEvents( Display * /* dpy */, unsigned int /* deviceID */, unsigned int /* affect */, unsigned int /* values */ ); extern Bool XkbSelectEventDetails( Display * /* dpy */, unsigned int /* deviceID */, unsigned int /* eventType */, unsigned long /* affect */, unsigned long /* details */ ); extern void XkbNoteMapChanges( XkbMapChangesPtr /* old */, XkbMapNotifyEvent * /* new */, unsigned int /* wanted */ ); extern void XkbNoteNameChanges( XkbNameChangesPtr /* old */, XkbNamesNotifyEvent * /* new */, unsigned int /* wanted */ ); extern Status XkbGetIndicatorState( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int * /* pStateRtrn */ ); extern Status XkbGetDeviceIndicatorState( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */, unsigned int * /* pStateRtrn */ ); extern Status XkbGetIndicatorMap( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ ); extern Bool XkbSetIndicatorMap( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ ); #define XkbNoteIndicatorMapChanges(o,n,w) \ ((o)->map_changes|=((n)->map_changes&(w))) #define XkbNoteIndicatorStateChanges(o,n,w)\ ((o)->state_changes|=((n)->state_changes&(w))) #define XkbGetIndicatorMapChanges(d,x,c) \ (XkbGetIndicatorMap((d),(c)->map_changes,x)) #define XkbChangeIndicatorMaps(d,x,c) \ (XkbSetIndicatorMap((d),(c)->map_changes,x)) extern Bool XkbGetNamedIndicator( Display * /* dpy */, Atom /* name */, int * /* pNdxRtrn */, Bool * /* pStateRtrn */, XkbIndicatorMapPtr /* pMapRtrn */, Bool * /* pRealRtrn */ ); extern Bool XkbGetNamedDeviceIndicator( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */, Atom /* name */, int * /* pNdxRtrn */, Bool * /* pStateRtrn */, XkbIndicatorMapPtr /* pMapRtrn */, Bool * /* pRealRtrn */ ); extern Bool XkbSetNamedIndicator( Display * /* dpy */, Atom /* name */, Bool /* changeState */, Bool /* state */, Bool /* createNewMap */, XkbIndicatorMapPtr /* pMap */ ); extern Bool XkbSetNamedDeviceIndicator( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */, Atom /* name */, Bool /* changeState */, Bool /* state */, Bool /* createNewMap */, XkbIndicatorMapPtr /* pMap */ ); extern Bool XkbLockModifiers( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */ ); extern Bool XkbLatchModifiers( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affect */, unsigned int /* values */ ); extern Bool XkbLockGroup( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* group */ ); extern Bool XkbLatchGroup( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* group */ ); extern Bool XkbSetServerInternalMods( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affectReal */, unsigned int /* realValues */, unsigned int /* affectVirtual */, unsigned int /* virtualValues */ ); extern Bool XkbSetIgnoreLockMods( Display * /* dpy */, unsigned int /* deviceSpec */, unsigned int /* affectReal */, unsigned int /* realValues */, unsigned int /* affectVirtual */, unsigned int /* virtualValues */ ); extern Bool XkbVirtualModsToReal( XkbDescPtr /* xkb */, unsigned int /* virtual_mask */, unsigned int * /* mask_rtrn */ ); extern Bool XkbComputeEffectiveMap( XkbDescPtr /* xkb */, XkbKeyTypePtr /* type */, unsigned char * /* map_rtrn */ ); extern Status XkbInitCanonicalKeyTypes( XkbDescPtr /* xkb */, unsigned int /* which */, int /* keypadVMod */ ); extern XkbDescPtr XkbAllocKeyboard( void ); extern void XkbFreeKeyboard( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeDesc */ ); extern Status XkbAllocClientMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nTypes */ ); extern Status XkbAllocServerMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nActions */ ); extern void XkbFreeClientMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ ); extern void XkbFreeServerMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ ); extern XkbKeyTypePtr XkbAddKeyType( XkbDescPtr /* xkb */, Atom /* name */, int /* map_count */, Bool /* want_preserve */, int /* num_lvls */ ); extern Status XkbAllocIndicatorMaps( XkbDescPtr /* xkb */ ); extern void XkbFreeIndicatorMaps( XkbDescPtr /* xkb */ ); extern XkbDescPtr XkbGetMap( Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */ ); extern Status XkbGetUpdatedMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ ); extern Status XkbGetMapChanges( Display * /* dpy */, XkbDescPtr /* xkb */, XkbMapChangesPtr /* changes */ ); extern Status XkbRefreshKeyboardMapping( XkbMapNotifyEvent * /* event */ ); extern Status XkbGetKeyTypes( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */ ); extern Status XkbGetKeySyms( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */ ); extern Status XkbGetKeyActions( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */ ); extern Status XkbGetKeyBehaviors( Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */ ); extern Status XkbGetVirtualMods( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ ); extern Status XkbGetKeyExplicitComponents( Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */ ); extern Status XkbGetKeyModifierMap( Display * /* dpy */, unsigned int /* firstKey */, unsigned int /* nKeys */, XkbDescPtr /* desc */ ); extern Status XkbGetKeyVirtualModMap( Display * /* dpy */, unsigned int /* first */, unsigned int /* num */, XkbDescPtr /* xkb */ ); extern Status XkbAllocControls( XkbDescPtr /* xkb */, unsigned int /* which*/ ); extern void XkbFreeControls( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); extern Status XkbGetControls( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ ); extern Bool XkbSetControls( Display * /* dpy */, unsigned long /* which */, XkbDescPtr /* desc */ ); extern void XkbNoteControlsChanges( XkbControlsChangesPtr /* old */, XkbControlsNotifyEvent * /* new */, unsigned int /* wanted */ ); #define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x) #define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x) extern Status XkbAllocCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nInterpret */ ); extern void XkbFreeCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); extern Status XkbGetCompatMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* xkb */ ); extern Bool XkbSetCompatMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* xkb */, Bool /* updateActions */ ); extern XkbSymInterpretPtr XkbAddSymInterpret( XkbDescPtr /* xkb */, XkbSymInterpretPtr /* si */, Bool /* updateMap */, XkbChangesPtr /* changes */ ); extern Status XkbAllocNames( XkbDescPtr /* xkb */, unsigned int /* which */, int /* nTotalRG */, int /* nTotalAliases */ ); extern Status XkbGetNames( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ ); extern Bool XkbSetNames( Display * /* dpy */, unsigned int /* which */, unsigned int /* firstType */, unsigned int /* nTypes */, XkbDescPtr /* desc */ ); extern Bool XkbChangeNames( Display * /* dpy */, XkbDescPtr /* xkb */, XkbNameChangesPtr /* changes */ ); extern void XkbFreeNames( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); extern Status XkbGetState( Display * /* dpy */, unsigned int /* deviceSpec */, XkbStatePtr /* rtrnState */ ); extern Bool XkbSetMap( Display * /* dpy */, unsigned int /* which */, XkbDescPtr /* desc */ ); extern Bool XkbChangeMap( Display* /* dpy */, XkbDescPtr /* desc */, XkbMapChangesPtr /* changes */ ); extern Bool XkbSetDetectableAutoRepeat( Display * /* dpy */, Bool /* detectable */, Bool * /* supported */ ); extern Bool XkbGetDetectableAutoRepeat( Display * /* dpy */, Bool * /* supported */ ); extern Bool XkbSetAutoResetControls( Display * /* dpy */, unsigned int /* changes */, unsigned int * /* auto_ctrls */, unsigned int * /* auto_values */ ); extern Bool XkbGetAutoResetControls( Display * /* dpy */, unsigned int * /* auto_ctrls */, unsigned int * /* auto_ctrl_values */ ); extern Bool XkbSetPerClientControls( Display * /* dpy */, unsigned int /* change */, unsigned int * /* values */ ); extern Bool XkbGetPerClientControls( Display * /* dpy */, unsigned int * /* ctrls */ ); extern Status XkbCopyKeyType( XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */ ); extern Status XkbCopyKeyTypes( XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */, int /* num_types */ ); extern Status XkbResizeKeyType( XkbDescPtr /* xkb */, int /* type_ndx */, int /* map_count */, Bool /* want_preserve */, int /* new_num_lvls */ ); extern KeySym *XkbResizeKeySyms( XkbDescPtr /* desc */, int /* forKey */, int /* symsNeeded */ ); extern XkbAction *XkbResizeKeyActions( XkbDescPtr /* desc */, int /* forKey */, int /* actsNeeded */ ); extern Status XkbChangeTypesOfKey( XkbDescPtr /* xkb */, int /* key */, int /* num_groups */, unsigned int /* groups */, int * /* newTypes */, XkbMapChangesPtr /* pChanges */ ); extern Status XkbChangeKeycodeRange( XkbDescPtr /* xkb */, int /* minKC */, int /* maxKC */, XkbChangesPtr /* changes */ ); /***====================================================================***/ extern XkbComponentListPtr XkbListComponents( Display * /* dpy */, unsigned int /* deviceSpec */, XkbComponentNamesPtr /* ptrns */, int * /* max_inout */ ); extern void XkbFreeComponentList( XkbComponentListPtr /* list */ ); extern XkbDescPtr XkbGetKeyboard( Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */ ); extern XkbDescPtr XkbGetKeyboardByName( Display * /* dpy */, unsigned int /* deviceSpec */, XkbComponentNamesPtr /* names */, unsigned int /* want */, unsigned int /* need */, Bool /* load */ ); /***====================================================================***/ extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */ XkbDescPtr /* xkb */, /* keyboard device */ int /* map_width */, /* width of core KeySym array */ KeySym * /* core_syms */, /* always mapWidth symbols */ unsigned int /* protected */, /* explicit key types */ int * /* types_inout */, /* always four type indices */ KeySym * /* xkb_syms_rtrn */ /* must have enough space */ ); extern Bool XkbApplyCompatMapToKey( /* False only on error */ XkbDescPtr /* xkb */, /* keymap to be edited */ KeyCode /* key */, /* key to be updated */ XkbChangesPtr /* changes */ /* resulting changes to map */ ); extern Bool XkbUpdateMapFromCore( /* False only on error */ XkbDescPtr /* xkb */, /* XKB keyboard to be edited */ KeyCode /* first_key */, /* first changed key */ int /* num_keys */, /* number of changed keys */ int /* map_width */, /* width of core keymap */ KeySym * /* core_keysyms */, /* symbols from core keymap */ XkbChangesPtr /* changes */ /* resulting changes */ ); /***====================================================================***/ extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo( XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass */, unsigned int /* ledId */ ); extern Status XkbResizeDeviceButtonActions( XkbDeviceInfoPtr /* devi */, unsigned int /* newTotal */ ); extern XkbDeviceInfoPtr XkbAllocDeviceInfo( unsigned int /* deviceSpec */, unsigned int /* nButtons */, unsigned int /* szLeds */ ); extern void XkbFreeDeviceInfo( XkbDeviceInfoPtr /* devi */, unsigned int /* which */, Bool /* freeDevI */ ); extern void XkbNoteDeviceChanges( XkbDeviceChangesPtr /* old */, XkbExtensionDeviceNotifyEvent * /* new */, unsigned int /* wanted */ ); extern XkbDeviceInfoPtr XkbGetDeviceInfo( Display * /* dpy */, unsigned int /* which */, unsigned int /* deviceSpec */, unsigned int /* ledClass */, unsigned int /* ledID */ ); extern Status XkbGetDeviceInfoChanges( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, XkbDeviceChangesPtr /* changes */ ); extern Status XkbGetDeviceButtonActions( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, Bool /* all */, unsigned int /* first */, unsigned int /* nBtns */ ); extern Status XkbGetDeviceLedInfo( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass (class, XIDflt, XIAll) */, unsigned int /* ledId (id, XIDflt, XIAll) */, unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */ ); extern Bool XkbSetDeviceInfo( Display * /* dpy */, unsigned int /* which */, XkbDeviceInfoPtr /* devi */ ); extern Bool XkbChangeDeviceInfo( Display* /* dpy */, XkbDeviceInfoPtr /* desc */, XkbDeviceChangesPtr /* changes */ ); extern Bool XkbSetDeviceLedInfo( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass */, unsigned int /* ledID */, unsigned int /* which */ ); extern Bool XkbSetDeviceButtonActions( Display * /* dpy */, XkbDeviceInfoPtr /* devi */, unsigned int /* first */, unsigned int /* nBtns */ ); /***====================================================================***/ extern char XkbToControl( char /* c */ ); /***====================================================================***/ extern Bool XkbSetDebuggingFlags( Display * /* dpy */, unsigned int /* mask */, unsigned int /* flags */, char * /* msg */, unsigned int /* ctrls_mask */, unsigned int /* ctrls */, unsigned int * /* rtrn_flags */, unsigned int * /* rtrn_ctrls */ ); extern Bool XkbApplyVirtualModChanges( XkbDescPtr /* xkb */, unsigned int /* changed */, XkbChangesPtr /* changes */ ); extern Bool XkbUpdateActionVirtualMods( XkbDescPtr /* xkb */, XkbAction * /* act */, unsigned int /* changed */ ); extern void XkbUpdateKeyTypeVirtualMods( XkbDescPtr /* xkb */, XkbKeyTypePtr /* type */, unsigned int /* changed */, XkbChangesPtr /* changes */ ); _XFUNCPROTOEND #endif /* _X11_XKBLIB_H_ */ PKZ΀ X11/Xfuncs.hnu[/* * Copyright 1990, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. * */ #ifndef _XFUNCS_H_ # define _XFUNCS_H_ # include /* the old Xfuncs.h, for pre-R6 */ # if !(defined(XFree86LOADER) && defined(IN_MODULE)) # ifdef X_USEBFUNCS void bcopy(); void bzero(); int bcmp(); # else # if defined(SYSV) && !defined(__SCO__) && !defined(__sun) && !defined(__UNIXWARE__) && !defined(_AIX) # include void bcopy(); # define bzero(b,len) memset(b, 0, len) # define bcmp(b1,b2,len) memcmp(b1, b2, len) # else # include # if defined(__SCO__) || defined(__sun) || defined(__UNIXWARE__) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) # include # endif # define _XFUNCS_H_INCLUDED_STRING_H # endif # endif /* X_USEBFUNCS */ /* the new Xfuncs.h */ /* the ANSI C way */ # ifndef _XFUNCS_H_INCLUDED_STRING_H # include # endif # undef bzero # define bzero(b,len) memset(b,0,len) # if defined WIN32 && defined __MINGW32__ # define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len)) # endif # endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */ #endif /* _XFUNCS_H_ */ PKZZ X11/Xatom.hnu[#ifndef XATOM_H #define XATOM_H 1 /* THIS IS A GENERATED FILE * * Do not change! Changing this file implies a protocol change! */ #define XA_PRIMARY ((Atom) 1) #define XA_SECONDARY ((Atom) 2) #define XA_ARC ((Atom) 3) #define XA_ATOM ((Atom) 4) #define XA_BITMAP ((Atom) 5) #define XA_CARDINAL ((Atom) 6) #define XA_COLORMAP ((Atom) 7) #define XA_CURSOR ((Atom) 8) #define XA_CUT_BUFFER0 ((Atom) 9) #define XA_CUT_BUFFER1 ((Atom) 10) #define XA_CUT_BUFFER2 ((Atom) 11) #define XA_CUT_BUFFER3 ((Atom) 12) #define XA_CUT_BUFFER4 ((Atom) 13) #define XA_CUT_BUFFER5 ((Atom) 14) #define XA_CUT_BUFFER6 ((Atom) 15) #define XA_CUT_BUFFER7 ((Atom) 16) #define XA_DRAWABLE ((Atom) 17) #define XA_FONT ((Atom) 18) #define XA_INTEGER ((Atom) 19) #define XA_PIXMAP ((Atom) 20) #define XA_POINT ((Atom) 21) #define XA_RECTANGLE ((Atom) 22) #define XA_RESOURCE_MANAGER ((Atom) 23) #define XA_RGB_COLOR_MAP ((Atom) 24) #define XA_RGB_BEST_MAP ((Atom) 25) #define XA_RGB_BLUE_MAP ((Atom) 26) #define XA_RGB_DEFAULT_MAP ((Atom) 27) #define XA_RGB_GRAY_MAP ((Atom) 28) #define XA_RGB_GREEN_MAP ((Atom) 29) #define XA_RGB_RED_MAP ((Atom) 30) #define XA_STRING ((Atom) 31) #define XA_VISUALID ((Atom) 32) #define XA_WINDOW ((Atom) 33) #define XA_WM_COMMAND ((Atom) 34) #define XA_WM_HINTS ((Atom) 35) #define XA_WM_CLIENT_MACHINE ((Atom) 36) #define XA_WM_ICON_NAME ((Atom) 37) #define XA_WM_ICON_SIZE ((Atom) 38) #define XA_WM_NAME ((Atom) 39) #define XA_WM_NORMAL_HINTS ((Atom) 40) #define XA_WM_SIZE_HINTS ((Atom) 41) #define XA_WM_ZOOM_HINTS ((Atom) 42) #define XA_MIN_SPACE ((Atom) 43) #define XA_NORM_SPACE ((Atom) 44) #define XA_MAX_SPACE ((Atom) 45) #define XA_END_SPACE ((Atom) 46) #define XA_SUPERSCRIPT_X ((Atom) 47) #define XA_SUPERSCRIPT_Y ((Atom) 48) #define XA_SUBSCRIPT_X ((Atom) 49) #define XA_SUBSCRIPT_Y ((Atom) 50) #define XA_UNDERLINE_POSITION ((Atom) 51) #define XA_UNDERLINE_THICKNESS ((Atom) 52) #define XA_STRIKEOUT_ASCENT ((Atom) 53) #define XA_STRIKEOUT_DESCENT ((Atom) 54) #define XA_ITALIC_ANGLE ((Atom) 55) #define XA_X_HEIGHT ((Atom) 56) #define XA_QUAD_WIDTH ((Atom) 57) #define XA_WEIGHT ((Atom) 58) #define XA_POINT_SIZE ((Atom) 59) #define XA_RESOLUTION ((Atom) 60) #define XA_COPYRIGHT ((Atom) 61) #define XA_NOTICE ((Atom) 62) #define XA_FONT_NAME ((Atom) 63) #define XA_FAMILY_NAME ((Atom) 64) #define XA_FULL_NAME ((Atom) 65) #define XA_CAP_HEIGHT ((Atom) 66) #define XA_WM_CLASS ((Atom) 67) #define XA_WM_TRANSIENT_FOR ((Atom) 68) #define XA_LAST_PREDEFINED ((Atom) 68) #endif /* XATOM_H */ PKZLX11/HPkeysym.hnu[/* Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Hewlett Packard or Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material. */ #ifndef _HPKEYSYM_H #define _HPKEYSYM_H #define hpXK_ClearLine 0x1000FF6F #define hpXK_InsertLine 0x1000FF70 #define hpXK_DeleteLine 0x1000FF71 #define hpXK_InsertChar 0x1000FF72 #define hpXK_DeleteChar 0x1000FF73 #define hpXK_BackTab 0x1000FF74 #define hpXK_KP_BackTab 0x1000FF75 #define hpXK_Modelock1 0x1000FF48 #define hpXK_Modelock2 0x1000FF49 #define hpXK_Reset 0x1000FF6C #define hpXK_System 0x1000FF6D #define hpXK_User 0x1000FF6E #define hpXK_mute_acute 0x100000A8 #define hpXK_mute_grave 0x100000A9 #define hpXK_mute_asciicircum 0x100000AA #define hpXK_mute_diaeresis 0x100000AB #define hpXK_mute_asciitilde 0x100000AC #define hpXK_lira 0x100000AF #define hpXK_guilder 0x100000BE #define hpXK_Ydiaeresis 0x100000EE #define hpXK_IO 0x100000EE #define hpXK_longminus 0x100000F6 #define hpXK_block 0x100000FC #ifndef _OSF_Keysyms #define _OSF_Keysyms #define osfXK_Copy 0x1004FF02 #define osfXK_Cut 0x1004FF03 #define osfXK_Paste 0x1004FF04 #define osfXK_BackTab 0x1004FF07 #define osfXK_BackSpace 0x1004FF08 #define osfXK_Clear 0x1004FF0B #define osfXK_Escape 0x1004FF1B #define osfXK_AddMode 0x1004FF31 #define osfXK_PrimaryPaste 0x1004FF32 #define osfXK_QuickPaste 0x1004FF33 #define osfXK_PageLeft 0x1004FF40 #define osfXK_PageUp 0x1004FF41 #define osfXK_PageDown 0x1004FF42 #define osfXK_PageRight 0x1004FF43 #define osfXK_Activate 0x1004FF44 #define osfXK_MenuBar 0x1004FF45 #define osfXK_Left 0x1004FF51 #define osfXK_Up 0x1004FF52 #define osfXK_Right 0x1004FF53 #define osfXK_Down 0x1004FF54 #define osfXK_EndLine 0x1004FF57 #define osfXK_BeginLine 0x1004FF58 #define osfXK_EndData 0x1004FF59 #define osfXK_BeginData 0x1004FF5A #define osfXK_PrevMenu 0x1004FF5B #define osfXK_NextMenu 0x1004FF5C #define osfXK_PrevField 0x1004FF5D #define osfXK_NextField 0x1004FF5E #define osfXK_Select 0x1004FF60 #define osfXK_Insert 0x1004FF63 #define osfXK_Undo 0x1004FF65 #define osfXK_Menu 0x1004FF67 #define osfXK_Cancel 0x1004FF69 #define osfXK_Help 0x1004FF6A #define osfXK_SelectAll 0x1004FF71 #define osfXK_DeselectAll 0x1004FF72 #define osfXK_Reselect 0x1004FF73 #define osfXK_Extend 0x1004FF74 #define osfXK_Restore 0x1004FF78 #define osfXK_Delete 0x1004FFFF #endif /* _OSF_Keysyms */ /************************************************************** * The use of the following macros is deprecated. * They are listed below only for backwards compatibility. */ #define XK_Reset 0x1000FF6C #define XK_System 0x1000FF6D #define XK_User 0x1000FF6E #define XK_ClearLine 0x1000FF6F #define XK_InsertLine 0x1000FF70 #define XK_DeleteLine 0x1000FF71 #define XK_InsertChar 0x1000FF72 #define XK_DeleteChar 0x1000FF73 #define XK_BackTab 0x1000FF74 #define XK_KP_BackTab 0x1000FF75 #define XK_Ext16bit_L 0x1000FF76 #define XK_Ext16bit_R 0x1000FF77 #define XK_mute_acute 0x100000a8 #define XK_mute_grave 0x100000a9 #define XK_mute_asciicircum 0x100000aa #define XK_mute_diaeresis 0x100000ab #define XK_mute_asciitilde 0x100000ac #define XK_lira 0x100000af #define XK_guilder 0x100000be #ifndef XK_Ydiaeresis #define XK_Ydiaeresis 0x100000ee #endif #define XK_IO 0x100000ee #define XK_longminus 0x100000f6 #define XK_block 0x100000fc #endif /* _HPKEYSYM_H */ PKZ5MX11/Xfuncproto.hnu[/* * Copyright 1989, 1991, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. * */ /* Definitions to make function prototypes manageable */ #ifndef _XFUNCPROTO_H_ #define _XFUNCPROTO_H_ #ifndef NeedFunctionPrototypes #define NeedFunctionPrototypes 1 #endif /* NeedFunctionPrototypes */ #ifndef NeedVarargsPrototypes #define NeedVarargsPrototypes 1 #endif /* NeedVarargsPrototypes */ #if NeedFunctionPrototypes #ifndef NeedNestedPrototypes #define NeedNestedPrototypes 1 #endif /* NeedNestedPrototypes */ #ifndef _Xconst #define _Xconst const #endif /* _Xconst */ /* Function prototype configuration (see configure for more info) */ #if !defined(NARROWPROTO) && \ (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) #define NARROWPROTO #endif #ifndef FUNCPROTO #define FUNCPROTO 15 #endif #ifndef NeedWidePrototypes #ifdef NARROWPROTO #define NeedWidePrototypes 0 #else #define NeedWidePrototypes 1 /* default to make interropt. easier */ #endif #endif /* NeedWidePrototypes */ #endif /* NeedFunctionPrototypes */ #ifndef _XFUNCPROTOBEGIN #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ #define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ #define _XFUNCPROTOEND } #else #define _XFUNCPROTOBEGIN #define _XFUNCPROTOEND #endif #endif /* _XFUNCPROTOBEGIN */ /* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */ #ifndef __has_attribute # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ #endif #ifndef __has_feature # define __has_feature(x) 0 /* Compatibility with non-clang compilers. */ #endif #ifndef __has_extension # define __has_extension(x) 0 /* Compatibility with non-clang compilers. */ #endif /* Added in X11R6.9, so available in any version of modular xproto */ #if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4)) # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x))) #else # define _X_SENTINEL(x) #endif /* GNUC >= 4 */ /* Added in X11R6.9, so available in any version of modular xproto */ #if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \ && !defined(__CYGWIN__) && !defined(__MINGW32__) # define _X_EXPORT __attribute__((visibility("default"))) # define _X_HIDDEN __attribute__((visibility("hidden"))) # define _X_INTERNAL __attribute__((visibility("internal"))) #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) # define _X_EXPORT __global # define _X_HIDDEN __hidden # define _X_INTERNAL __hidden #else /* not gcc >= 4 and not Sun Studio >= 8 */ # define _X_EXPORT # define _X_HIDDEN # define _X_INTERNAL #endif /* GNUC >= 4 */ /* Branch prediction hints for individual conditionals */ /* requires xproto >= 7.0.9 */ #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) # define _X_LIKELY(x) __builtin_expect(!!(x), 1) # define _X_UNLIKELY(x) __builtin_expect(!!(x), 0) #else /* not gcc >= 3.3 */ # define _X_LIKELY(x) (x) # define _X_UNLIKELY(x) (x) #endif /* Bulk branch prediction hints via marking error path functions as "cold" */ /* requires xproto >= 7.0.25 */ #if __has_attribute(__cold__) || \ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */ # define _X_COLD __attribute__((__cold__)) #else # define _X_COLD /* nothing */ #endif /* Added in X11R6.9, so available in any version of modular xproto */ #if __has_attribute(deprecated) \ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130)) # define _X_DEPRECATED __attribute__((deprecated)) #else /* not gcc >= 3.1 */ # define _X_DEPRECATED #endif /* requires xproto >= 7.0.30 */ #if __has_extension(attribute_deprecated_with_message) || \ (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))) # define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg))) #else # define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED #endif /* requires xproto >= 7.0.17 */ #if __has_attribute(noreturn) \ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) # define _X_NORETURN __attribute((noreturn)) #else # define _X_NORETURN #endif /* GNUC */ /* Added in X11R6.9, so available in any version of modular xproto */ #if __has_attribute(__format__) \ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203) # define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) #else /* not gcc >= 2.3 */ # define _X_ATTRIBUTE_PRINTF(x,y) #endif /* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable argument macros, must be only used inside #ifdef _X_NONNULL guards, as many legacy X clients are compiled in C89 mode still. */ #if __has_attribute(nonnull) \ && defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ #define _X_NONNULL(...) __attribute__((nonnull(__VA_ARGS__))) #elif __has_attribute(nonnull) \ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) #define _X_NONNULL(args...) __attribute__((nonnull(args))) #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ #define _X_NONNULL(...) /* */ #endif /* requires xproto >= 7.0.22 */ #if __has_attribute(__unused__) \ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205) #define _X_UNUSED __attribute__((__unused__)) #else #define _X_UNUSED /* */ #endif /* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */ /* requires xproto >= 7.0.9 (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */ #if defined(inline) /* assume autoconf set it correctly */ || \ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)) # define _X_INLINE inline #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ # define _X_INLINE __inline__ #else # define _X_INLINE #endif /* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */ /* requires xproto >= 7.0.21 */ #ifndef _X_RESTRICT_KYWD # if defined(restrict) /* assume autoconf set it correctly */ || \ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \ && !defined(__cplusplus)) /* Workaround g++ issue on Solaris */ # define _X_RESTRICT_KYWD restrict # elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ # define _X_RESTRICT_KYWD __restrict__ # else # define _X_RESTRICT_KYWD # endif #endif /* requires xproto >= 7.0.30 */ #if __has_attribute(no_sanitize_thread) # define _X_NOTSAN __attribute__((no_sanitize_thread)) #else # define _X_NOTSAN #endif #endif /* _XFUNCPROTO_H_ */ PKZԘ7̄̄ X11/Xlib.hnu[/* Copyright 1985, 1986, 1987, 1991, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * Xlib.h - Header definition and support file for the C subroutine * interface library (Xlib) to the X Window System Protocol (V11). * Structures and symbols starting with "_" are private to the library. */ #ifndef _X11_XLIB_H_ #define _X11_XLIB_H_ #define XlibSpecificationRelease 6 #include #if defined(__SCO__) || defined(__UNIXWARE__) #include #endif #include /* applications should not depend on these two headers being included! */ #include #include #ifndef X_WCHAR #include #else #ifdef __UNIXOS2__ #include #else /* replace this with #include or typedef appropriate for your system */ typedef unsigned long wchar_t; #endif #endif extern int _Xmblen( char *str, int len ); /* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in November 2000. Its presence is indicated through the following macro. */ #define X_HAVE_UTF8_STRING 1 /* The Xlib structs are full of implicit padding to properly align members. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif typedef char *XPointer; #define Bool int #define Status int #define True 1 #define False 0 #define QueuedAlready 0 #define QueuedAfterReading 1 #define QueuedAfterFlush 2 #define ConnectionNumber(dpy) (((_XPrivDisplay)(dpy))->fd) #define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root) #define DefaultScreen(dpy) (((_XPrivDisplay)(dpy))->default_screen) #define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root) #define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual) #define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc) #define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel) #define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel) #define AllPlanes ((unsigned long)~0L) #define QLength(dpy) (((_XPrivDisplay)(dpy))->qlen) #define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width) #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height) #define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth) #define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight) #define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth) #define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries) #define ScreenCount(dpy) (((_XPrivDisplay)(dpy))->nscreens) #define ServerVendor(dpy) (((_XPrivDisplay)(dpy))->vendor) #define ProtocolVersion(dpy) (((_XPrivDisplay)(dpy))->proto_major_version) #define ProtocolRevision(dpy) (((_XPrivDisplay)(dpy))->proto_minor_version) #define VendorRelease(dpy) (((_XPrivDisplay)(dpy))->release) #define DisplayString(dpy) (((_XPrivDisplay)(dpy))->display_name) #define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth) #define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap) #define BitmapUnit(dpy) (((_XPrivDisplay)(dpy))->bitmap_unit) #define BitmapBitOrder(dpy) (((_XPrivDisplay)(dpy))->bitmap_bit_order) #define BitmapPad(dpy) (((_XPrivDisplay)(dpy))->bitmap_pad) #define ImageByteOrder(dpy) (((_XPrivDisplay)(dpy))->byte_order) #define NextRequest(dpy) (((_XPrivDisplay)(dpy))->request + 1) #define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)(dpy))->last_request_read) /* macros for screen oriented applications (toolkit) */ #define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)(dpy))->screens[scr]) #define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy)) #define DisplayOfScreen(s) ((s)->display) #define RootWindowOfScreen(s) ((s)->root) #define BlackPixelOfScreen(s) ((s)->black_pixel) #define WhitePixelOfScreen(s) ((s)->white_pixel) #define DefaultColormapOfScreen(s)((s)->cmap) #define DefaultDepthOfScreen(s) ((s)->root_depth) #define DefaultGCOfScreen(s) ((s)->default_gc) #define DefaultVisualOfScreen(s)((s)->root_visual) #define WidthOfScreen(s) ((s)->width) #define HeightOfScreen(s) ((s)->height) #define WidthMMOfScreen(s) ((s)->mwidth) #define HeightMMOfScreen(s) ((s)->mheight) #define PlanesOfScreen(s) ((s)->root_depth) #define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries) #define MinCmapsOfScreen(s) ((s)->min_maps) #define MaxCmapsOfScreen(s) ((s)->max_maps) #define DoesSaveUnders(s) ((s)->save_unders) #define DoesBackingStore(s) ((s)->backing_store) #define EventMaskOfScreen(s) ((s)->root_input_mask) /* * Extensions need a way to hang private data on some structures. */ typedef struct _XExtData { int number; /* number returned by XRegisterExtension */ struct _XExtData *next; /* next item on list of data for structure */ int (*free_private)( /* called to free private storage */ struct _XExtData *extension ); XPointer private_data; /* data private to this extension. */ } XExtData; /* * This file contains structures used by the extension mechanism. */ typedef struct { /* public to extension, cannot be changed */ int extension; /* extension number */ int major_opcode; /* major op-code assigned by server */ int first_event; /* first event number for the extension */ int first_error; /* first error number for the extension */ } XExtCodes; /* * Data structure for retrieving info about pixmap formats. */ typedef struct { int depth; int bits_per_pixel; int scanline_pad; } XPixmapFormatValues; /* * Data structure for setting graphics context. */ typedef struct { int function; /* logical operation */ unsigned long plane_mask;/* plane mask */ unsigned long foreground;/* foreground pixel */ unsigned long background;/* background pixel */ int line_width; /* line width */ int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */ int cap_style; /* CapNotLast, CapButt, CapRound, CapProjecting */ int join_style; /* JoinMiter, JoinRound, JoinBevel */ int fill_style; /* FillSolid, FillTiled, FillStippled, FillOpaeueStippled */ int fill_rule; /* EvenOddRule, WindingRule */ int arc_mode; /* ArcChord, ArcPieSlice */ Pixmap tile; /* tile pixmap for tiling operations */ Pixmap stipple; /* stipple 1 plane pixmap for stipping */ int ts_x_origin; /* offset for tile or stipple operations */ int ts_y_origin; Font font; /* default text font for text operations */ int subwindow_mode; /* ClipByChildren, IncludeInferiors */ Bool graphics_exposures;/* boolean, should exposures be generated */ int clip_x_origin; /* origin for clipping */ int clip_y_origin; Pixmap clip_mask; /* bitmap clipping; other calls for rects */ int dash_offset; /* patterned/dashed line information */ char dashes; } XGCValues; /* * Graphics context. The contents of this structure are implementation * dependent. A GC should be treated as opaque by application code. */ typedef struct _XGC #ifdef XLIB_ILLEGAL_ACCESS { XExtData *ext_data; /* hook for extension to hang data */ GContext gid; /* protocol ID for graphics context */ /* there is more to this structure, but it is private to Xlib */ } #endif *GC; /* * Visual structure; contains information about colormapping possible. */ typedef struct { XExtData *ext_data; /* hook for extension to hang data */ VisualID visualid; /* visual id of this visual */ #if defined(__cplusplus) || defined(c_plusplus) int c_class; /* C++ class of screen (monochrome, etc.) */ #else int class; /* class of screen (monochrome, etc.) */ #endif unsigned long red_mask, green_mask, blue_mask; /* mask values */ int bits_per_rgb; /* log base 2 of distinct color values */ int map_entries; /* color map entries */ } Visual; /* * Depth structure; contains information for each possible depth. */ typedef struct { int depth; /* this depth (Z) of the depth */ int nvisuals; /* number of Visual types at this depth */ Visual *visuals; /* list of visuals possible at this depth */ } Depth; /* * Information about the screen. The contents of this structure are * implementation dependent. A Screen should be treated as opaque * by application code. */ struct _XDisplay; /* Forward declare before use for C++ */ typedef struct { XExtData *ext_data; /* hook for extension to hang data */ struct _XDisplay *display;/* back pointer to display structure */ Window root; /* Root window id. */ int width, height; /* width and height of screen */ int mwidth, mheight; /* width and height of in millimeters */ int ndepths; /* number of depths possible */ Depth *depths; /* list of allowable depths on the screen */ int root_depth; /* bits per pixel */ Visual *root_visual; /* root visual */ GC default_gc; /* GC for the root root visual */ Colormap cmap; /* default color map */ unsigned long white_pixel; unsigned long black_pixel; /* White and Black pixel values */ int max_maps, min_maps; /* max and min color maps */ int backing_store; /* Never, WhenMapped, Always */ Bool save_unders; long root_input_mask; /* initial root input mask */ } Screen; /* * Format structure; describes ZFormat data the screen will understand. */ typedef struct { XExtData *ext_data; /* hook for extension to hang data */ int depth; /* depth of this image format */ int bits_per_pixel; /* bits/pixel at this depth */ int scanline_pad; /* scanline must padded to this multiple */ } ScreenFormat; /* * Data structure for setting window attributes. */ typedef struct { Pixmap background_pixmap; /* background or None or ParentRelative */ unsigned long background_pixel; /* background pixel */ Pixmap border_pixmap; /* border of the window */ unsigned long border_pixel; /* border pixel value */ int bit_gravity; /* one of bit gravity values */ int win_gravity; /* one of the window gravity values */ int backing_store; /* NotUseful, WhenMapped, Always */ unsigned long backing_planes;/* planes to be preseved if possible */ unsigned long backing_pixel;/* value to use in restoring planes */ Bool save_under; /* should bits under be saved? (popups) */ long event_mask; /* set of events that should be saved */ long do_not_propagate_mask; /* set of events that should not propagate */ Bool override_redirect; /* boolean value for override-redirect */ Colormap colormap; /* color map to be associated with window */ Cursor cursor; /* cursor to be displayed (or None) */ } XSetWindowAttributes; typedef struct { int x, y; /* location of window */ int width, height; /* width and height of window */ int border_width; /* border width of window */ int depth; /* depth of window */ Visual *visual; /* the associated visual structure */ Window root; /* root of screen containing window */ #if defined(__cplusplus) || defined(c_plusplus) int c_class; /* C++ InputOutput, InputOnly*/ #else int class; /* InputOutput, InputOnly*/ #endif int bit_gravity; /* one of bit gravity values */ int win_gravity; /* one of the window gravity values */ int backing_store; /* NotUseful, WhenMapped, Always */ unsigned long backing_planes;/* planes to be preserved if possible */ unsigned long backing_pixel;/* value to be used when restoring planes */ Bool save_under; /* boolean, should bits under be saved? */ Colormap colormap; /* color map to be associated with window */ Bool map_installed; /* boolean, is color map currently installed*/ int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ long all_event_masks; /* set of events all people have interest in*/ long your_event_mask; /* my event mask */ long do_not_propagate_mask; /* set of events that should not propagate */ Bool override_redirect; /* boolean value for override-redirect */ Screen *screen; /* back pointer to correct screen */ } XWindowAttributes; /* * Data structure for host setting; getting routines. * */ typedef struct { int family; /* for example FamilyInternet */ int length; /* length of address, in bytes */ char *address; /* pointer to where to find the bytes */ } XHostAddress; /* * Data structure for ServerFamilyInterpreted addresses in host routines */ typedef struct { int typelength; /* length of type string, in bytes */ int valuelength; /* length of value string, in bytes */ char *type; /* pointer to where to find the type string */ char *value; /* pointer to where to find the address */ } XServerInterpretedAddress; /* * Data structure for "image" data, used by image manipulation routines. */ typedef struct _XImage { int width, height; /* size of image */ int xoffset; /* number of pixels offset in X direction */ int format; /* XYBitmap, XYPixmap, ZPixmap */ char *data; /* pointer to image data */ int byte_order; /* data byte order, LSBFirst, MSBFirst */ int bitmap_unit; /* quant. of scanline 8, 16, 32 */ int bitmap_bit_order; /* LSBFirst, MSBFirst */ int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */ int depth; /* depth of image */ int bytes_per_line; /* accelarator to next line */ int bits_per_pixel; /* bits per pixel (ZPixmap) */ unsigned long red_mask; /* bits in z arrangment */ unsigned long green_mask; unsigned long blue_mask; XPointer obdata; /* hook for the object routines to hang on */ struct funcs { /* image manipulation routines */ struct _XImage *(*create_image)( struct _XDisplay* /* display */, Visual* /* visual */, unsigned int /* depth */, int /* format */, int /* offset */, char* /* data */, unsigned int /* width */, unsigned int /* height */, int /* bitmap_pad */, int /* bytes_per_line */); int (*destroy_image) (struct _XImage *); unsigned long (*get_pixel) (struct _XImage *, int, int); int (*put_pixel) (struct _XImage *, int, int, unsigned long); struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int); int (*add_pixel) (struct _XImage *, long); } f; } XImage; /* * Data structure for XReconfigureWindow */ typedef struct { int x, y; int width, height; int border_width; Window sibling; int stack_mode; } XWindowChanges; /* * Data structure used by color operations */ typedef struct { unsigned long pixel; unsigned short red, green, blue; char flags; /* do_red, do_green, do_blue */ char pad; } XColor; /* * Data structures for graphics operations. On most machines, these are * congruent with the wire protocol structures, so reformatting the data * can be avoided on these architectures. */ typedef struct { short x1, y1, x2, y2; } XSegment; typedef struct { short x, y; } XPoint; typedef struct { short x, y; unsigned short width, height; } XRectangle; typedef struct { short x, y; unsigned short width, height; short angle1, angle2; } XArc; /* Data structure for XChangeKeyboardControl */ typedef struct { int key_click_percent; int bell_percent; int bell_pitch; int bell_duration; int led; int led_mode; int key; int auto_repeat_mode; /* On, Off, Default */ } XKeyboardControl; /* Data structure for XGetKeyboardControl */ typedef struct { int key_click_percent; int bell_percent; unsigned int bell_pitch, bell_duration; unsigned long led_mask; int global_auto_repeat; char auto_repeats[32]; } XKeyboardState; /* Data structure for XGetMotionEvents. */ typedef struct { Time time; short x, y; } XTimeCoord; /* Data structure for X{Set,Get}ModifierMapping */ typedef struct { int max_keypermod; /* The server's max # of keys per modifier */ KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */ } XModifierKeymap; /* * Display datatype maintaining display specific data. * The contents of this structure are implementation dependent. * A Display should be treated as opaque by application code. */ #ifndef XLIB_ILLEGAL_ACCESS typedef struct _XDisplay Display; #endif struct _XPrivate; /* Forward declare before use for C++ */ struct _XrmHashBucketRec; typedef struct #ifdef XLIB_ILLEGAL_ACCESS _XDisplay #endif { XExtData *ext_data; /* hook for extension to hang data */ struct _XPrivate *private1; int fd; /* Network socket. */ int private2; int proto_major_version;/* major version of server's X protocol */ int proto_minor_version;/* minor version of servers X protocol */ char *vendor; /* vendor of the server hardware */ XID private3; XID private4; XID private5; int private6; XID (*resource_alloc)( /* allocator function */ struct _XDisplay* ); int byte_order; /* screen byte order, LSBFirst, MSBFirst */ int bitmap_unit; /* padding and data requirements */ int bitmap_pad; /* padding requirements on bitmaps */ int bitmap_bit_order; /* LeastSignificant or MostSignificant */ int nformats; /* number of pixmap formats in list */ ScreenFormat *pixmap_format; /* pixmap format list */ int private8; int release; /* release of the server */ struct _XPrivate *private9, *private10; int qlen; /* Length of input event queue */ unsigned long last_request_read; /* seq number of last event read */ unsigned long request; /* sequence number of last request. */ XPointer private11; XPointer private12; XPointer private13; XPointer private14; unsigned max_request_size; /* maximum number 32 bit words in request*/ struct _XrmHashBucketRec *db; int (*private15)( struct _XDisplay* ); char *display_name; /* "host:display" string used on this connect*/ int default_screen; /* default screen for operations */ int nscreens; /* number of screens on this server*/ Screen *screens; /* pointer to list of screens */ unsigned long motion_buffer; /* size of motion buffer */ unsigned long private16; int min_keycode; /* minimum defined keycode */ int max_keycode; /* maximum defined keycode */ XPointer private17; XPointer private18; int private19; char *xdefaults; /* contents of defaults from server */ /* there is more to this structure, but it is private to Xlib */ } #ifdef XLIB_ILLEGAL_ACCESS Display, #endif *_XPrivDisplay; #undef _XEVENT_ #ifndef _XEVENT_ /* * Definitions of specific events. */ typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window it is reported relative to */ Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ int x_root, y_root; /* coordinates relative to root */ unsigned int state; /* key or button mask */ unsigned int keycode; /* detail */ Bool same_screen; /* same screen flag */ } XKeyEvent; typedef XKeyEvent XKeyPressedEvent; typedef XKeyEvent XKeyReleasedEvent; typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window it is reported relative to */ Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ int x_root, y_root; /* coordinates relative to root */ unsigned int state; /* key or button mask */ unsigned int button; /* detail */ Bool same_screen; /* same screen flag */ } XButtonEvent; typedef XButtonEvent XButtonPressedEvent; typedef XButtonEvent XButtonReleasedEvent; typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window reported relative to */ Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ int x_root, y_root; /* coordinates relative to root */ unsigned int state; /* key or button mask */ char is_hint; /* detail */ Bool same_screen; /* same screen flag */ } XMotionEvent; typedef XMotionEvent XPointerMovedEvent; typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window reported relative to */ Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ int x_root, y_root; /* coordinates relative to root */ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ int detail; /* * NotifyAncestor, NotifyVirtual, NotifyInferior, * NotifyNonlinear,NotifyNonlinearVirtual */ Bool same_screen; /* same screen flag */ Bool focus; /* boolean focus */ unsigned int state; /* key or button mask */ } XCrossingEvent; typedef XCrossingEvent XEnterWindowEvent; typedef XCrossingEvent XLeaveWindowEvent; typedef struct { int type; /* FocusIn or FocusOut */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* window of event */ int mode; /* NotifyNormal, NotifyWhileGrabbed, NotifyGrab, NotifyUngrab */ int detail; /* * NotifyAncestor, NotifyVirtual, NotifyInferior, * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer, * NotifyPointerRoot, NotifyDetailNone */ } XFocusChangeEvent; typedef XFocusChangeEvent XFocusInEvent; typedef XFocusChangeEvent XFocusOutEvent; /* generated on EnterWindow and FocusIn when KeyMapState selected */ typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; char key_vector[32]; } XKeymapEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; int x, y; int width, height; int count; /* if non-zero, at least this many more */ } XExposeEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Drawable drawable; int x, y; int width, height; int count; /* if non-zero, at least this many more */ int major_code; /* core is CopyArea or CopyPlane */ int minor_code; /* not defined in the core */ } XGraphicsExposeEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Drawable drawable; int major_code; /* core is CopyArea or CopyPlane */ int minor_code; /* not defined in the core */ } XNoExposeEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; int state; /* Visibility state */ } XVisibilityEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window parent; /* parent of the window */ Window window; /* window id of window created */ int x, y; /* window location */ int width, height; /* size of window */ int border_width; /* border width */ Bool override_redirect; /* creation should be overridden */ } XCreateWindowEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; Window window; } XDestroyWindowEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; Window window; Bool from_configure; } XUnmapEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; Window window; Bool override_redirect; /* boolean, is override set... */ } XMapEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window parent; Window window; } XMapRequestEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; Window window; Window parent; int x, y; Bool override_redirect; } XReparentEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; Window window; int x, y; int width, height; int border_width; Window above; Bool override_redirect; } XConfigureEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; Window window; int x, y; } XGravityEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; int width, height; } XResizeRequestEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window parent; Window window; int x, y; int width, height; int border_width; Window above; int detail; /* Above, Below, TopIf, BottomIf, Opposite */ unsigned long value_mask; } XConfigureRequestEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window event; Window window; int place; /* PlaceOnTop, PlaceOnBottom */ } XCirculateEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window parent; Window window; int place; /* PlaceOnTop, PlaceOnBottom */ } XCirculateRequestEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; Atom atom; Time time; int state; /* NewValue, Deleted */ } XPropertyEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; Atom selection; Time time; } XSelectionClearEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window owner; Window requestor; Atom selection; Atom target; Atom property; Time time; } XSelectionRequestEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window requestor; Atom selection; Atom target; Atom property; /* ATOM or None */ Time time; } XSelectionEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; Colormap colormap; /* COLORMAP or None */ #if defined(__cplusplus) || defined(c_plusplus) Bool c_new; /* C++ */ #else Bool new; #endif int state; /* ColormapInstalled, ColormapUninstalled */ } XColormapEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; Atom message_type; int format; union { char b[20]; short s[10]; long l[5]; } data; } XClientMessageEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* unused */ int request; /* one of MappingModifier, MappingKeyboard, MappingPointer */ int first_keycode; /* first keycode */ int count; /* defines range of change w. first_keycode*/ } XMappingEvent; typedef struct { int type; Display *display; /* Display the event was read from */ XID resourceid; /* resource id */ unsigned long serial; /* serial number of failed request */ unsigned char error_code; /* error code of failed request */ unsigned char request_code; /* Major op-code of failed request */ unsigned char minor_code; /* Minor op-code of failed request */ } XErrorEvent; typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a SendEvent request */ Display *display;/* Display the event was read from */ Window window; /* window on which event was requested in event mask */ } XAnyEvent; /*************************************************************** * * GenericEvent. This event is the standard event for all newer extensions. */ typedef struct { int type; /* of event. Always GenericEvent */ unsigned long serial; /* # of last request processed */ Bool send_event; /* true if from SendEvent request */ Display *display; /* Display the event was read from */ int extension; /* major opcode of extension that caused the event */ int evtype; /* actual event type. */ } XGenericEvent; typedef struct { int type; /* of event. Always GenericEvent */ unsigned long serial; /* # of last request processed */ Bool send_event; /* true if from SendEvent request */ Display *display; /* Display the event was read from */ int extension; /* major opcode of extension that caused the event */ int evtype; /* actual event type. */ unsigned int cookie; void *data; } XGenericEventCookie; /* * this union is defined so Xlib can always use the same sized * event structure internally, to avoid memory fragmentation. */ typedef union _XEvent { int type; /* must not be changed; first element */ XAnyEvent xany; XKeyEvent xkey; XButtonEvent xbutton; XMotionEvent xmotion; XCrossingEvent xcrossing; XFocusChangeEvent xfocus; XExposeEvent xexpose; XGraphicsExposeEvent xgraphicsexpose; XNoExposeEvent xnoexpose; XVisibilityEvent xvisibility; XCreateWindowEvent xcreatewindow; XDestroyWindowEvent xdestroywindow; XUnmapEvent xunmap; XMapEvent xmap; XMapRequestEvent xmaprequest; XReparentEvent xreparent; XConfigureEvent xconfigure; XGravityEvent xgravity; XResizeRequestEvent xresizerequest; XConfigureRequestEvent xconfigurerequest; XCirculateEvent xcirculate; XCirculateRequestEvent xcirculaterequest; XPropertyEvent xproperty; XSelectionClearEvent xselectionclear; XSelectionRequestEvent xselectionrequest; XSelectionEvent xselection; XColormapEvent xcolormap; XClientMessageEvent xclient; XMappingEvent xmapping; XErrorEvent xerror; XKeymapEvent xkeymap; XGenericEvent xgeneric; XGenericEventCookie xcookie; long pad[24]; } XEvent; #endif #define XAllocID(dpy) ((*((_XPrivDisplay)(dpy))->resource_alloc)((dpy))) /* * per character font metric information. */ typedef struct { short lbearing; /* origin to left edge of raster */ short rbearing; /* origin to right edge of raster */ short width; /* advance to next char's origin */ short ascent; /* baseline to top edge of raster */ short descent; /* baseline to bottom edge of raster */ unsigned short attributes; /* per char flags (not predefined) */ } XCharStruct; /* * To allow arbitrary information with fonts, there are additional properties * returned. */ typedef struct { Atom name; unsigned long card32; } XFontProp; typedef struct { XExtData *ext_data; /* hook for extension to hang data */ Font fid; /* Font id for this font */ unsigned direction; /* hint about direction the font is painted */ unsigned min_char_or_byte2;/* first character */ unsigned max_char_or_byte2;/* last character */ unsigned min_byte1; /* first row that exists */ unsigned max_byte1; /* last row that exists */ Bool all_chars_exist;/* flag if all characters have non-zero size*/ unsigned default_char; /* char to print for undefined character */ int n_properties; /* how many properties there are */ XFontProp *properties; /* pointer to array of additional properties*/ XCharStruct min_bounds; /* minimum bounds over all existing char*/ XCharStruct max_bounds; /* maximum bounds over all existing char*/ XCharStruct *per_char; /* first_char to last_char information */ int ascent; /* log. extent above baseline for spacing */ int descent; /* log. descent below baseline for spacing */ } XFontStruct; /* * PolyText routines take these as arguments. */ typedef struct { char *chars; /* pointer to string */ int nchars; /* number of characters */ int delta; /* delta between strings */ Font font; /* font to print it in, None don't change */ } XTextItem; typedef struct { /* normal 16 bit characters are two bytes */ unsigned char byte1; unsigned char byte2; } XChar2b; typedef struct { XChar2b *chars; /* two byte characters */ int nchars; /* number of characters */ int delta; /* delta between strings */ Font font; /* font to print it in, None don't change */ } XTextItem16; typedef union { Display *display; GC gc; Visual *visual; Screen *screen; ScreenFormat *pixmap_format; XFontStruct *font; } XEDataObject; typedef struct { XRectangle max_ink_extent; XRectangle max_logical_extent; } XFontSetExtents; /* unused: typedef void (*XOMProc)(); */ typedef struct _XOM *XOM; typedef struct _XOC *XOC, *XFontSet; typedef struct { char *chars; int nchars; int delta; XFontSet font_set; } XmbTextItem; typedef struct { wchar_t *chars; int nchars; int delta; XFontSet font_set; } XwcTextItem; #define XNRequiredCharSet "requiredCharSet" #define XNQueryOrientation "queryOrientation" #define XNBaseFontName "baseFontName" #define XNOMAutomatic "omAutomatic" #define XNMissingCharSet "missingCharSet" #define XNDefaultString "defaultString" #define XNOrientation "orientation" #define XNDirectionalDependentDrawing "directionalDependentDrawing" #define XNContextualDrawing "contextualDrawing" #define XNFontInfo "fontInfo" typedef struct { int charset_count; char **charset_list; } XOMCharSetList; typedef enum { XOMOrientation_LTR_TTB, XOMOrientation_RTL_TTB, XOMOrientation_TTB_LTR, XOMOrientation_TTB_RTL, XOMOrientation_Context } XOrientation; typedef struct { int num_orientation; XOrientation *orientation; /* Input Text description */ } XOMOrientation; typedef struct { int num_font; XFontStruct **font_struct_list; char **font_name_list; } XOMFontInfo; typedef struct _XIM *XIM; typedef struct _XIC *XIC; typedef void (*XIMProc)( XIM, XPointer, XPointer ); typedef Bool (*XICProc)( XIC, XPointer, XPointer ); typedef void (*XIDProc)( Display*, XPointer, XPointer ); typedef unsigned long XIMStyle; typedef struct { unsigned short count_styles; XIMStyle *supported_styles; } XIMStyles; #define XIMPreeditArea 0x0001L #define XIMPreeditCallbacks 0x0002L #define XIMPreeditPosition 0x0004L #define XIMPreeditNothing 0x0008L #define XIMPreeditNone 0x0010L #define XIMStatusArea 0x0100L #define XIMStatusCallbacks 0x0200L #define XIMStatusNothing 0x0400L #define XIMStatusNone 0x0800L #define XNVaNestedList "XNVaNestedList" #define XNQueryInputStyle "queryInputStyle" #define XNClientWindow "clientWindow" #define XNInputStyle "inputStyle" #define XNFocusWindow "focusWindow" #define XNResourceName "resourceName" #define XNResourceClass "resourceClass" #define XNGeometryCallback "geometryCallback" #define XNDestroyCallback "destroyCallback" #define XNFilterEvents "filterEvents" #define XNPreeditStartCallback "preeditStartCallback" #define XNPreeditDoneCallback "preeditDoneCallback" #define XNPreeditDrawCallback "preeditDrawCallback" #define XNPreeditCaretCallback "preeditCaretCallback" #define XNPreeditStateNotifyCallback "preeditStateNotifyCallback" #define XNPreeditAttributes "preeditAttributes" #define XNStatusStartCallback "statusStartCallback" #define XNStatusDoneCallback "statusDoneCallback" #define XNStatusDrawCallback "statusDrawCallback" #define XNStatusAttributes "statusAttributes" #define XNArea "area" #define XNAreaNeeded "areaNeeded" #define XNSpotLocation "spotLocation" #define XNColormap "colorMap" #define XNStdColormap "stdColorMap" #define XNForeground "foreground" #define XNBackground "background" #define XNBackgroundPixmap "backgroundPixmap" #define XNFontSet "fontSet" #define XNLineSpace "lineSpace" #define XNCursor "cursor" #define XNQueryIMValuesList "queryIMValuesList" #define XNQueryICValuesList "queryICValuesList" #define XNVisiblePosition "visiblePosition" #define XNR6PreeditCallback "r6PreeditCallback" #define XNStringConversionCallback "stringConversionCallback" #define XNStringConversion "stringConversion" #define XNResetState "resetState" #define XNHotKey "hotKey" #define XNHotKeyState "hotKeyState" #define XNPreeditState "preeditState" #define XNSeparatorofNestedList "separatorofNestedList" #define XBufferOverflow -1 #define XLookupNone 1 #define XLookupChars 2 #define XLookupKeySym 3 #define XLookupBoth 4 typedef void *XVaNestedList; typedef struct { XPointer client_data; XIMProc callback; } XIMCallback; typedef struct { XPointer client_data; XICProc callback; } XICCallback; typedef unsigned long XIMFeedback; #define XIMReverse 1L #define XIMUnderline (1L<<1) #define XIMHighlight (1L<<2) #define XIMPrimary (1L<<5) #define XIMSecondary (1L<<6) #define XIMTertiary (1L<<7) #define XIMVisibleToForward (1L<<8) #define XIMVisibleToBackword (1L<<9) #define XIMVisibleToCenter (1L<<10) typedef struct _XIMText { unsigned short length; XIMFeedback *feedback; Bool encoding_is_wchar; union { char *multi_byte; wchar_t *wide_char; } string; } XIMText; typedef unsigned long XIMPreeditState; #define XIMPreeditUnKnown 0L #define XIMPreeditEnable 1L #define XIMPreeditDisable (1L<<1) typedef struct _XIMPreeditStateNotifyCallbackStruct { XIMPreeditState state; } XIMPreeditStateNotifyCallbackStruct; typedef unsigned long XIMResetState; #define XIMInitialState 1L #define XIMPreserveState (1L<<1) typedef unsigned long XIMStringConversionFeedback; #define XIMStringConversionLeftEdge (0x00000001) #define XIMStringConversionRightEdge (0x00000002) #define XIMStringConversionTopEdge (0x00000004) #define XIMStringConversionBottomEdge (0x00000008) #define XIMStringConversionConcealed (0x00000010) #define XIMStringConversionWrapped (0x00000020) typedef struct _XIMStringConversionText { unsigned short length; XIMStringConversionFeedback *feedback; Bool encoding_is_wchar; union { char *mbs; wchar_t *wcs; } string; } XIMStringConversionText; typedef unsigned short XIMStringConversionPosition; typedef unsigned short XIMStringConversionType; #define XIMStringConversionBuffer (0x0001) #define XIMStringConversionLine (0x0002) #define XIMStringConversionWord (0x0003) #define XIMStringConversionChar (0x0004) typedef unsigned short XIMStringConversionOperation; #define XIMStringConversionSubstitution (0x0001) #define XIMStringConversionRetrieval (0x0002) typedef enum { XIMForwardChar, XIMBackwardChar, XIMForwardWord, XIMBackwardWord, XIMCaretUp, XIMCaretDown, XIMNextLine, XIMPreviousLine, XIMLineStart, XIMLineEnd, XIMAbsolutePosition, XIMDontChange } XIMCaretDirection; typedef struct _XIMStringConversionCallbackStruct { XIMStringConversionPosition position; XIMCaretDirection direction; XIMStringConversionOperation operation; unsigned short factor; XIMStringConversionText *text; } XIMStringConversionCallbackStruct; typedef struct _XIMPreeditDrawCallbackStruct { int caret; /* Cursor offset within pre-edit string */ int chg_first; /* Starting change position */ int chg_length; /* Length of the change in character count */ XIMText *text; } XIMPreeditDrawCallbackStruct; typedef enum { XIMIsInvisible, /* Disable caret feedback */ XIMIsPrimary, /* UI defined caret feedback */ XIMIsSecondary /* UI defined caret feedback */ } XIMCaretStyle; typedef struct _XIMPreeditCaretCallbackStruct { int position; /* Caret offset within pre-edit string */ XIMCaretDirection direction; /* Caret moves direction */ XIMCaretStyle style; /* Feedback of the caret */ } XIMPreeditCaretCallbackStruct; typedef enum { XIMTextType, XIMBitmapType } XIMStatusDataType; typedef struct _XIMStatusDrawCallbackStruct { XIMStatusDataType type; union { XIMText *text; Pixmap bitmap; } data; } XIMStatusDrawCallbackStruct; typedef struct _XIMHotKeyTrigger { KeySym keysym; int modifier; int modifier_mask; } XIMHotKeyTrigger; typedef struct _XIMHotKeyTriggers { int num_hot_key; XIMHotKeyTrigger *key; } XIMHotKeyTriggers; typedef unsigned long XIMHotKeyState; #define XIMHotKeyStateON (0x0001L) #define XIMHotKeyStateOFF (0x0002L) typedef struct { unsigned short count_values; char **supported_values; } XIMValuesList; _XFUNCPROTOBEGIN #if defined(WIN32) && !defined(_XLIBINT_) #define _Xdebug (*_Xdebug_p) #endif extern int _Xdebug; extern XFontStruct *XLoadQueryFont( Display* /* display */, _Xconst char* /* name */ ); extern XFontStruct *XQueryFont( Display* /* display */, XID /* font_ID */ ); extern XTimeCoord *XGetMotionEvents( Display* /* display */, Window /* w */, Time /* start */, Time /* stop */, int* /* nevents_return */ ); extern XModifierKeymap *XDeleteModifiermapEntry( XModifierKeymap* /* modmap */, #if NeedWidePrototypes unsigned int /* keycode_entry */, #else KeyCode /* keycode_entry */, #endif int /* modifier */ ); extern XModifierKeymap *XGetModifierMapping( Display* /* display */ ); extern XModifierKeymap *XInsertModifiermapEntry( XModifierKeymap* /* modmap */, #if NeedWidePrototypes unsigned int /* keycode_entry */, #else KeyCode /* keycode_entry */, #endif int /* modifier */ ); extern XModifierKeymap *XNewModifiermap( int /* max_keys_per_mod */ ); extern XImage *XCreateImage( Display* /* display */, Visual* /* visual */, unsigned int /* depth */, int /* format */, int /* offset */, char* /* data */, unsigned int /* width */, unsigned int /* height */, int /* bitmap_pad */, int /* bytes_per_line */ ); extern Status XInitImage( XImage* /* image */ ); extern XImage *XGetImage( Display* /* display */, Drawable /* d */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, unsigned long /* plane_mask */, int /* format */ ); extern XImage *XGetSubImage( Display* /* display */, Drawable /* d */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, unsigned long /* plane_mask */, int /* format */, XImage* /* dest_image */, int /* dest_x */, int /* dest_y */ ); /* * X function declarations. */ extern Display *XOpenDisplay( _Xconst char* /* display_name */ ); extern void XrmInitialize( void ); extern char *XFetchBytes( Display* /* display */, int* /* nbytes_return */ ); extern char *XFetchBuffer( Display* /* display */, int* /* nbytes_return */, int /* buffer */ ); extern char *XGetAtomName( Display* /* display */, Atom /* atom */ ); extern Status XGetAtomNames( Display* /* dpy */, Atom* /* atoms */, int /* count */, char** /* names_return */ ); extern char *XGetDefault( Display* /* display */, _Xconst char* /* program */, _Xconst char* /* option */ ); extern char *XDisplayName( _Xconst char* /* string */ ); extern char *XKeysymToString( KeySym /* keysym */ ); extern int (*XSynchronize( Display* /* display */, Bool /* onoff */ ))( Display* /* display */ ); extern int (*XSetAfterFunction( Display* /* display */, int (*) ( Display* /* display */ ) /* procedure */ ))( Display* /* display */ ); extern Atom XInternAtom( Display* /* display */, _Xconst char* /* atom_name */, Bool /* only_if_exists */ ); extern Status XInternAtoms( Display* /* dpy */, char** /* names */, int /* count */, Bool /* onlyIfExists */, Atom* /* atoms_return */ ); extern Colormap XCopyColormapAndFree( Display* /* display */, Colormap /* colormap */ ); extern Colormap XCreateColormap( Display* /* display */, Window /* w */, Visual* /* visual */, int /* alloc */ ); extern Cursor XCreatePixmapCursor( Display* /* display */, Pixmap /* source */, Pixmap /* mask */, XColor* /* foreground_color */, XColor* /* background_color */, unsigned int /* x */, unsigned int /* y */ ); extern Cursor XCreateGlyphCursor( Display* /* display */, Font /* source_font */, Font /* mask_font */, unsigned int /* source_char */, unsigned int /* mask_char */, XColor _Xconst * /* foreground_color */, XColor _Xconst * /* background_color */ ); extern Cursor XCreateFontCursor( Display* /* display */, unsigned int /* shape */ ); extern Font XLoadFont( Display* /* display */, _Xconst char* /* name */ ); extern GC XCreateGC( Display* /* display */, Drawable /* d */, unsigned long /* valuemask */, XGCValues* /* values */ ); extern GContext XGContextFromGC( GC /* gc */ ); extern void XFlushGC( Display* /* display */, GC /* gc */ ); extern Pixmap XCreatePixmap( Display* /* display */, Drawable /* d */, unsigned int /* width */, unsigned int /* height */, unsigned int /* depth */ ); extern Pixmap XCreateBitmapFromData( Display* /* display */, Drawable /* d */, _Xconst char* /* data */, unsigned int /* width */, unsigned int /* height */ ); extern Pixmap XCreatePixmapFromBitmapData( Display* /* display */, Drawable /* d */, char* /* data */, unsigned int /* width */, unsigned int /* height */, unsigned long /* fg */, unsigned long /* bg */, unsigned int /* depth */ ); extern Window XCreateSimpleWindow( Display* /* display */, Window /* parent */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, unsigned int /* border_width */, unsigned long /* border */, unsigned long /* background */ ); extern Window XGetSelectionOwner( Display* /* display */, Atom /* selection */ ); extern Window XCreateWindow( Display* /* display */, Window /* parent */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, unsigned int /* border_width */, int /* depth */, unsigned int /* class */, Visual* /* visual */, unsigned long /* valuemask */, XSetWindowAttributes* /* attributes */ ); extern Colormap *XListInstalledColormaps( Display* /* display */, Window /* w */, int* /* num_return */ ); extern char **XListFonts( Display* /* display */, _Xconst char* /* pattern */, int /* maxnames */, int* /* actual_count_return */ ); extern char **XListFontsWithInfo( Display* /* display */, _Xconst char* /* pattern */, int /* maxnames */, int* /* count_return */, XFontStruct** /* info_return */ ); extern char **XGetFontPath( Display* /* display */, int* /* npaths_return */ ); extern char **XListExtensions( Display* /* display */, int* /* nextensions_return */ ); extern Atom *XListProperties( Display* /* display */, Window /* w */, int* /* num_prop_return */ ); extern XHostAddress *XListHosts( Display* /* display */, int* /* nhosts_return */, Bool* /* state_return */ ); _X_DEPRECATED extern KeySym XKeycodeToKeysym( Display* /* display */, #if NeedWidePrototypes unsigned int /* keycode */, #else KeyCode /* keycode */, #endif int /* index */ ); extern KeySym XLookupKeysym( XKeyEvent* /* key_event */, int /* index */ ); extern KeySym *XGetKeyboardMapping( Display* /* display */, #if NeedWidePrototypes unsigned int /* first_keycode */, #else KeyCode /* first_keycode */, #endif int /* keycode_count */, int* /* keysyms_per_keycode_return */ ); extern KeySym XStringToKeysym( _Xconst char* /* string */ ); extern long XMaxRequestSize( Display* /* display */ ); extern long XExtendedMaxRequestSize( Display* /* display */ ); extern char *XResourceManagerString( Display* /* display */ ); extern char *XScreenResourceString( Screen* /* screen */ ); extern unsigned long XDisplayMotionBufferSize( Display* /* display */ ); extern VisualID XVisualIDFromVisual( Visual* /* visual */ ); /* multithread routines */ extern Status XInitThreads( void ); extern void XLockDisplay( Display* /* display */ ); extern void XUnlockDisplay( Display* /* display */ ); /* routines for dealing with extensions */ extern XExtCodes *XInitExtension( Display* /* display */, _Xconst char* /* name */ ); extern XExtCodes *XAddExtension( Display* /* display */ ); extern XExtData *XFindOnExtensionList( XExtData** /* structure */, int /* number */ ); extern XExtData **XEHeadOfExtensionList( XEDataObject /* object */ ); /* these are routines for which there are also macros */ extern Window XRootWindow( Display* /* display */, int /* screen_number */ ); extern Window XDefaultRootWindow( Display* /* display */ ); extern Window XRootWindowOfScreen( Screen* /* screen */ ); extern Visual *XDefaultVisual( Display* /* display */, int /* screen_number */ ); extern Visual *XDefaultVisualOfScreen( Screen* /* screen */ ); extern GC XDefaultGC( Display* /* display */, int /* screen_number */ ); extern GC XDefaultGCOfScreen( Screen* /* screen */ ); extern unsigned long XBlackPixel( Display* /* display */, int /* screen_number */ ); extern unsigned long XWhitePixel( Display* /* display */, int /* screen_number */ ); extern unsigned long XAllPlanes( void ); extern unsigned long XBlackPixelOfScreen( Screen* /* screen */ ); extern unsigned long XWhitePixelOfScreen( Screen* /* screen */ ); extern unsigned long XNextRequest( Display* /* display */ ); extern unsigned long XLastKnownRequestProcessed( Display* /* display */ ); extern char *XServerVendor( Display* /* display */ ); extern char *XDisplayString( Display* /* display */ ); extern Colormap XDefaultColormap( Display* /* display */, int /* screen_number */ ); extern Colormap XDefaultColormapOfScreen( Screen* /* screen */ ); extern Display *XDisplayOfScreen( Screen* /* screen */ ); extern Screen *XScreenOfDisplay( Display* /* display */, int /* screen_number */ ); extern Screen *XDefaultScreenOfDisplay( Display* /* display */ ); extern long XEventMaskOfScreen( Screen* /* screen */ ); extern int XScreenNumberOfScreen( Screen* /* screen */ ); typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */ Display* /* display */, XErrorEvent* /* error_event */ ); extern XErrorHandler XSetErrorHandler ( XErrorHandler /* handler */ ); typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */ Display* /* display */ ); extern XIOErrorHandler XSetIOErrorHandler ( XIOErrorHandler /* handler */ ); extern XPixmapFormatValues *XListPixmapFormats( Display* /* display */, int* /* count_return */ ); extern int *XListDepths( Display* /* display */, int /* screen_number */, int* /* count_return */ ); /* ICCCM routines for things that don't require special include files; */ /* other declarations are given in Xutil.h */ extern Status XReconfigureWMWindow( Display* /* display */, Window /* w */, int /* screen_number */, unsigned int /* mask */, XWindowChanges* /* changes */ ); extern Status XGetWMProtocols( Display* /* display */, Window /* w */, Atom** /* protocols_return */, int* /* count_return */ ); extern Status XSetWMProtocols( Display* /* display */, Window /* w */, Atom* /* protocols */, int /* count */ ); extern Status XIconifyWindow( Display* /* display */, Window /* w */, int /* screen_number */ ); extern Status XWithdrawWindow( Display* /* display */, Window /* w */, int /* screen_number */ ); extern Status XGetCommand( Display* /* display */, Window /* w */, char*** /* argv_return */, int* /* argc_return */ ); extern Status XGetWMColormapWindows( Display* /* display */, Window /* w */, Window** /* windows_return */, int* /* count_return */ ); extern Status XSetWMColormapWindows( Display* /* display */, Window /* w */, Window* /* colormap_windows */, int /* count */ ); extern void XFreeStringList( char** /* list */ ); extern int XSetTransientForHint( Display* /* display */, Window /* w */, Window /* prop_window */ ); /* The following are given in alphabetical order */ extern int XActivateScreenSaver( Display* /* display */ ); extern int XAddHost( Display* /* display */, XHostAddress* /* host */ ); extern int XAddHosts( Display* /* display */, XHostAddress* /* hosts */, int /* num_hosts */ ); extern int XAddToExtensionList( struct _XExtData** /* structure */, XExtData* /* ext_data */ ); extern int XAddToSaveSet( Display* /* display */, Window /* w */ ); extern Status XAllocColor( Display* /* display */, Colormap /* colormap */, XColor* /* screen_in_out */ ); extern Status XAllocColorCells( Display* /* display */, Colormap /* colormap */, Bool /* contig */, unsigned long* /* plane_masks_return */, unsigned int /* nplanes */, unsigned long* /* pixels_return */, unsigned int /* npixels */ ); extern Status XAllocColorPlanes( Display* /* display */, Colormap /* colormap */, Bool /* contig */, unsigned long* /* pixels_return */, int /* ncolors */, int /* nreds */, int /* ngreens */, int /* nblues */, unsigned long* /* rmask_return */, unsigned long* /* gmask_return */, unsigned long* /* bmask_return */ ); extern Status XAllocNamedColor( Display* /* display */, Colormap /* colormap */, _Xconst char* /* color_name */, XColor* /* screen_def_return */, XColor* /* exact_def_return */ ); extern int XAllowEvents( Display* /* display */, int /* event_mode */, Time /* time */ ); extern int XAutoRepeatOff( Display* /* display */ ); extern int XAutoRepeatOn( Display* /* display */ ); extern int XBell( Display* /* display */, int /* percent */ ); extern int XBitmapBitOrder( Display* /* display */ ); extern int XBitmapPad( Display* /* display */ ); extern int XBitmapUnit( Display* /* display */ ); extern int XCellsOfScreen( Screen* /* screen */ ); extern int XChangeActivePointerGrab( Display* /* display */, unsigned int /* event_mask */, Cursor /* cursor */, Time /* time */ ); extern int XChangeGC( Display* /* display */, GC /* gc */, unsigned long /* valuemask */, XGCValues* /* values */ ); extern int XChangeKeyboardControl( Display* /* display */, unsigned long /* value_mask */, XKeyboardControl* /* values */ ); extern int XChangeKeyboardMapping( Display* /* display */, int /* first_keycode */, int /* keysyms_per_keycode */, KeySym* /* keysyms */, int /* num_codes */ ); extern int XChangePointerControl( Display* /* display */, Bool /* do_accel */, Bool /* do_threshold */, int /* accel_numerator */, int /* accel_denominator */, int /* threshold */ ); extern int XChangeProperty( Display* /* display */, Window /* w */, Atom /* property */, Atom /* type */, int /* format */, int /* mode */, _Xconst unsigned char* /* data */, int /* nelements */ ); extern int XChangeSaveSet( Display* /* display */, Window /* w */, int /* change_mode */ ); extern int XChangeWindowAttributes( Display* /* display */, Window /* w */, unsigned long /* valuemask */, XSetWindowAttributes* /* attributes */ ); extern Bool XCheckIfEvent( Display* /* display */, XEvent* /* event_return */, Bool (*) ( Display* /* display */, XEvent* /* event */, XPointer /* arg */ ) /* predicate */, XPointer /* arg */ ); extern Bool XCheckMaskEvent( Display* /* display */, long /* event_mask */, XEvent* /* event_return */ ); extern Bool XCheckTypedEvent( Display* /* display */, int /* event_type */, XEvent* /* event_return */ ); extern Bool XCheckTypedWindowEvent( Display* /* display */, Window /* w */, int /* event_type */, XEvent* /* event_return */ ); extern Bool XCheckWindowEvent( Display* /* display */, Window /* w */, long /* event_mask */, XEvent* /* event_return */ ); extern int XCirculateSubwindows( Display* /* display */, Window /* w */, int /* direction */ ); extern int XCirculateSubwindowsDown( Display* /* display */, Window /* w */ ); extern int XCirculateSubwindowsUp( Display* /* display */, Window /* w */ ); extern int XClearArea( Display* /* display */, Window /* w */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, Bool /* exposures */ ); extern int XClearWindow( Display* /* display */, Window /* w */ ); extern int XCloseDisplay( Display* /* display */ ); extern int XConfigureWindow( Display* /* display */, Window /* w */, unsigned int /* value_mask */, XWindowChanges* /* values */ ); extern int XConnectionNumber( Display* /* display */ ); extern int XConvertSelection( Display* /* display */, Atom /* selection */, Atom /* target */, Atom /* property */, Window /* requestor */, Time /* time */ ); extern int XCopyArea( Display* /* display */, Drawable /* src */, Drawable /* dest */, GC /* gc */, int /* src_x */, int /* src_y */, unsigned int /* width */, unsigned int /* height */, int /* dest_x */, int /* dest_y */ ); extern int XCopyGC( Display* /* display */, GC /* src */, unsigned long /* valuemask */, GC /* dest */ ); extern int XCopyPlane( Display* /* display */, Drawable /* src */, Drawable /* dest */, GC /* gc */, int /* src_x */, int /* src_y */, unsigned int /* width */, unsigned int /* height */, int /* dest_x */, int /* dest_y */, unsigned long /* plane */ ); extern int XDefaultDepth( Display* /* display */, int /* screen_number */ ); extern int XDefaultDepthOfScreen( Screen* /* screen */ ); extern int XDefaultScreen( Display* /* display */ ); extern int XDefineCursor( Display* /* display */, Window /* w */, Cursor /* cursor */ ); extern int XDeleteProperty( Display* /* display */, Window /* w */, Atom /* property */ ); extern int XDestroyWindow( Display* /* display */, Window /* w */ ); extern int XDestroySubwindows( Display* /* display */, Window /* w */ ); extern int XDoesBackingStore( Screen* /* screen */ ); extern Bool XDoesSaveUnders( Screen* /* screen */ ); extern int XDisableAccessControl( Display* /* display */ ); extern int XDisplayCells( Display* /* display */, int /* screen_number */ ); extern int XDisplayHeight( Display* /* display */, int /* screen_number */ ); extern int XDisplayHeightMM( Display* /* display */, int /* screen_number */ ); extern int XDisplayKeycodes( Display* /* display */, int* /* min_keycodes_return */, int* /* max_keycodes_return */ ); extern int XDisplayPlanes( Display* /* display */, int /* screen_number */ ); extern int XDisplayWidth( Display* /* display */, int /* screen_number */ ); extern int XDisplayWidthMM( Display* /* display */, int /* screen_number */ ); extern int XDrawArc( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, int /* angle1 */, int /* angle2 */ ); extern int XDrawArcs( Display* /* display */, Drawable /* d */, GC /* gc */, XArc* /* arcs */, int /* narcs */ ); extern int XDrawImageString( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, _Xconst char* /* string */, int /* length */ ); extern int XDrawImageString16( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, _Xconst XChar2b* /* string */, int /* length */ ); extern int XDrawLine( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x1 */, int /* y1 */, int /* x2 */, int /* y2 */ ); extern int XDrawLines( Display* /* display */, Drawable /* d */, GC /* gc */, XPoint* /* points */, int /* npoints */, int /* mode */ ); extern int XDrawPoint( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */ ); extern int XDrawPoints( Display* /* display */, Drawable /* d */, GC /* gc */, XPoint* /* points */, int /* npoints */, int /* mode */ ); extern int XDrawRectangle( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */ ); extern int XDrawRectangles( Display* /* display */, Drawable /* d */, GC /* gc */, XRectangle* /* rectangles */, int /* nrectangles */ ); extern int XDrawSegments( Display* /* display */, Drawable /* d */, GC /* gc */, XSegment* /* segments */, int /* nsegments */ ); extern int XDrawString( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, _Xconst char* /* string */, int /* length */ ); extern int XDrawString16( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, _Xconst XChar2b* /* string */, int /* length */ ); extern int XDrawText( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, XTextItem* /* items */, int /* nitems */ ); extern int XDrawText16( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, XTextItem16* /* items */, int /* nitems */ ); extern int XEnableAccessControl( Display* /* display */ ); extern int XEventsQueued( Display* /* display */, int /* mode */ ); extern Status XFetchName( Display* /* display */, Window /* w */, char** /* window_name_return */ ); extern int XFillArc( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, int /* angle1 */, int /* angle2 */ ); extern int XFillArcs( Display* /* display */, Drawable /* d */, GC /* gc */, XArc* /* arcs */, int /* narcs */ ); extern int XFillPolygon( Display* /* display */, Drawable /* d */, GC /* gc */, XPoint* /* points */, int /* npoints */, int /* shape */, int /* mode */ ); extern int XFillRectangle( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */ ); extern int XFillRectangles( Display* /* display */, Drawable /* d */, GC /* gc */, XRectangle* /* rectangles */, int /* nrectangles */ ); extern int XFlush( Display* /* display */ ); extern int XForceScreenSaver( Display* /* display */, int /* mode */ ); extern int XFree( void* /* data */ ); extern int XFreeColormap( Display* /* display */, Colormap /* colormap */ ); extern int XFreeColors( Display* /* display */, Colormap /* colormap */, unsigned long* /* pixels */, int /* npixels */, unsigned long /* planes */ ); extern int XFreeCursor( Display* /* display */, Cursor /* cursor */ ); extern int XFreeExtensionList( char** /* list */ ); extern int XFreeFont( Display* /* display */, XFontStruct* /* font_struct */ ); extern int XFreeFontInfo( char** /* names */, XFontStruct* /* free_info */, int /* actual_count */ ); extern int XFreeFontNames( char** /* list */ ); extern int XFreeFontPath( char** /* list */ ); extern int XFreeGC( Display* /* display */, GC /* gc */ ); extern int XFreeModifiermap( XModifierKeymap* /* modmap */ ); extern int XFreePixmap( Display* /* display */, Pixmap /* pixmap */ ); extern int XGeometry( Display* /* display */, int /* screen */, _Xconst char* /* position */, _Xconst char* /* default_position */, unsigned int /* bwidth */, unsigned int /* fwidth */, unsigned int /* fheight */, int /* xadder */, int /* yadder */, int* /* x_return */, int* /* y_return */, int* /* width_return */, int* /* height_return */ ); extern int XGetErrorDatabaseText( Display* /* display */, _Xconst char* /* name */, _Xconst char* /* message */, _Xconst char* /* default_string */, char* /* buffer_return */, int /* length */ ); extern int XGetErrorText( Display* /* display */, int /* code */, char* /* buffer_return */, int /* length */ ); extern Bool XGetFontProperty( XFontStruct* /* font_struct */, Atom /* atom */, unsigned long* /* value_return */ ); extern Status XGetGCValues( Display* /* display */, GC /* gc */, unsigned long /* valuemask */, XGCValues* /* values_return */ ); extern Status XGetGeometry( Display* /* display */, Drawable /* d */, Window* /* root_return */, int* /* x_return */, int* /* y_return */, unsigned int* /* width_return */, unsigned int* /* height_return */, unsigned int* /* border_width_return */, unsigned int* /* depth_return */ ); extern Status XGetIconName( Display* /* display */, Window /* w */, char** /* icon_name_return */ ); extern int XGetInputFocus( Display* /* display */, Window* /* focus_return */, int* /* revert_to_return */ ); extern int XGetKeyboardControl( Display* /* display */, XKeyboardState* /* values_return */ ); extern int XGetPointerControl( Display* /* display */, int* /* accel_numerator_return */, int* /* accel_denominator_return */, int* /* threshold_return */ ); extern int XGetPointerMapping( Display* /* display */, unsigned char* /* map_return */, int /* nmap */ ); extern int XGetScreenSaver( Display* /* display */, int* /* timeout_return */, int* /* interval_return */, int* /* prefer_blanking_return */, int* /* allow_exposures_return */ ); extern Status XGetTransientForHint( Display* /* display */, Window /* w */, Window* /* prop_window_return */ ); extern int XGetWindowProperty( Display* /* display */, Window /* w */, Atom /* property */, long /* long_offset */, long /* long_length */, Bool /* delete */, Atom /* req_type */, Atom* /* actual_type_return */, int* /* actual_format_return */, unsigned long* /* nitems_return */, unsigned long* /* bytes_after_return */, unsigned char** /* prop_return */ ); extern Status XGetWindowAttributes( Display* /* display */, Window /* w */, XWindowAttributes* /* window_attributes_return */ ); extern int XGrabButton( Display* /* display */, unsigned int /* button */, unsigned int /* modifiers */, Window /* grab_window */, Bool /* owner_events */, unsigned int /* event_mask */, int /* pointer_mode */, int /* keyboard_mode */, Window /* confine_to */, Cursor /* cursor */ ); extern int XGrabKey( Display* /* display */, int /* keycode */, unsigned int /* modifiers */, Window /* grab_window */, Bool /* owner_events */, int /* pointer_mode */, int /* keyboard_mode */ ); extern int XGrabKeyboard( Display* /* display */, Window /* grab_window */, Bool /* owner_events */, int /* pointer_mode */, int /* keyboard_mode */, Time /* time */ ); extern int XGrabPointer( Display* /* display */, Window /* grab_window */, Bool /* owner_events */, unsigned int /* event_mask */, int /* pointer_mode */, int /* keyboard_mode */, Window /* confine_to */, Cursor /* cursor */, Time /* time */ ); extern int XGrabServer( Display* /* display */ ); extern int XHeightMMOfScreen( Screen* /* screen */ ); extern int XHeightOfScreen( Screen* /* screen */ ); extern int XIfEvent( Display* /* display */, XEvent* /* event_return */, Bool (*) ( Display* /* display */, XEvent* /* event */, XPointer /* arg */ ) /* predicate */, XPointer /* arg */ ); extern int XImageByteOrder( Display* /* display */ ); extern int XInstallColormap( Display* /* display */, Colormap /* colormap */ ); extern KeyCode XKeysymToKeycode( Display* /* display */, KeySym /* keysym */ ); extern int XKillClient( Display* /* display */, XID /* resource */ ); extern Status XLookupColor( Display* /* display */, Colormap /* colormap */, _Xconst char* /* color_name */, XColor* /* exact_def_return */, XColor* /* screen_def_return */ ); extern int XLowerWindow( Display* /* display */, Window /* w */ ); extern int XMapRaised( Display* /* display */, Window /* w */ ); extern int XMapSubwindows( Display* /* display */, Window /* w */ ); extern int XMapWindow( Display* /* display */, Window /* w */ ); extern int XMaskEvent( Display* /* display */, long /* event_mask */, XEvent* /* event_return */ ); extern int XMaxCmapsOfScreen( Screen* /* screen */ ); extern int XMinCmapsOfScreen( Screen* /* screen */ ); extern int XMoveResizeWindow( Display* /* display */, Window /* w */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */ ); extern int XMoveWindow( Display* /* display */, Window /* w */, int /* x */, int /* y */ ); extern int XNextEvent( Display* /* display */, XEvent* /* event_return */ ); extern int XNoOp( Display* /* display */ ); extern Status XParseColor( Display* /* display */, Colormap /* colormap */, _Xconst char* /* spec */, XColor* /* exact_def_return */ ); extern int XParseGeometry( _Xconst char* /* parsestring */, int* /* x_return */, int* /* y_return */, unsigned int* /* width_return */, unsigned int* /* height_return */ ); extern int XPeekEvent( Display* /* display */, XEvent* /* event_return */ ); extern int XPeekIfEvent( Display* /* display */, XEvent* /* event_return */, Bool (*) ( Display* /* display */, XEvent* /* event */, XPointer /* arg */ ) /* predicate */, XPointer /* arg */ ); extern int XPending( Display* /* display */ ); extern int XPlanesOfScreen( Screen* /* screen */ ); extern int XProtocolRevision( Display* /* display */ ); extern int XProtocolVersion( Display* /* display */ ); extern int XPutBackEvent( Display* /* display */, XEvent* /* event */ ); extern int XPutImage( Display* /* display */, Drawable /* d */, GC /* gc */, XImage* /* image */, int /* src_x */, int /* src_y */, int /* dest_x */, int /* dest_y */, unsigned int /* width */, unsigned int /* height */ ); extern int XQLength( Display* /* display */ ); extern Status XQueryBestCursor( Display* /* display */, Drawable /* d */, unsigned int /* width */, unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ ); extern Status XQueryBestSize( Display* /* display */, int /* class */, Drawable /* which_screen */, unsigned int /* width */, unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ ); extern Status XQueryBestStipple( Display* /* display */, Drawable /* which_screen */, unsigned int /* width */, unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ ); extern Status XQueryBestTile( Display* /* display */, Drawable /* which_screen */, unsigned int /* width */, unsigned int /* height */, unsigned int* /* width_return */, unsigned int* /* height_return */ ); extern int XQueryColor( Display* /* display */, Colormap /* colormap */, XColor* /* def_in_out */ ); extern int XQueryColors( Display* /* display */, Colormap /* colormap */, XColor* /* defs_in_out */, int /* ncolors */ ); extern Bool XQueryExtension( Display* /* display */, _Xconst char* /* name */, int* /* major_opcode_return */, int* /* first_event_return */, int* /* first_error_return */ ); extern int XQueryKeymap( Display* /* display */, char [32] /* keys_return */ ); extern Bool XQueryPointer( Display* /* display */, Window /* w */, Window* /* root_return */, Window* /* child_return */, int* /* root_x_return */, int* /* root_y_return */, int* /* win_x_return */, int* /* win_y_return */, unsigned int* /* mask_return */ ); extern int XQueryTextExtents( Display* /* display */, XID /* font_ID */, _Xconst char* /* string */, int /* nchars */, int* /* direction_return */, int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ ); extern int XQueryTextExtents16( Display* /* display */, XID /* font_ID */, _Xconst XChar2b* /* string */, int /* nchars */, int* /* direction_return */, int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ ); extern Status XQueryTree( Display* /* display */, Window /* w */, Window* /* root_return */, Window* /* parent_return */, Window** /* children_return */, unsigned int* /* nchildren_return */ ); extern int XRaiseWindow( Display* /* display */, Window /* w */ ); extern int XReadBitmapFile( Display* /* display */, Drawable /* d */, _Xconst char* /* filename */, unsigned int* /* width_return */, unsigned int* /* height_return */, Pixmap* /* bitmap_return */, int* /* x_hot_return */, int* /* y_hot_return */ ); extern int XReadBitmapFileData( _Xconst char* /* filename */, unsigned int* /* width_return */, unsigned int* /* height_return */, unsigned char** /* data_return */, int* /* x_hot_return */, int* /* y_hot_return */ ); extern int XRebindKeysym( Display* /* display */, KeySym /* keysym */, KeySym* /* list */, int /* mod_count */, _Xconst unsigned char* /* string */, int /* bytes_string */ ); extern int XRecolorCursor( Display* /* display */, Cursor /* cursor */, XColor* /* foreground_color */, XColor* /* background_color */ ); extern int XRefreshKeyboardMapping( XMappingEvent* /* event_map */ ); extern int XRemoveFromSaveSet( Display* /* display */, Window /* w */ ); extern int XRemoveHost( Display* /* display */, XHostAddress* /* host */ ); extern int XRemoveHosts( Display* /* display */, XHostAddress* /* hosts */, int /* num_hosts */ ); extern int XReparentWindow( Display* /* display */, Window /* w */, Window /* parent */, int /* x */, int /* y */ ); extern int XResetScreenSaver( Display* /* display */ ); extern int XResizeWindow( Display* /* display */, Window /* w */, unsigned int /* width */, unsigned int /* height */ ); extern int XRestackWindows( Display* /* display */, Window* /* windows */, int /* nwindows */ ); extern int XRotateBuffers( Display* /* display */, int /* rotate */ ); extern int XRotateWindowProperties( Display* /* display */, Window /* w */, Atom* /* properties */, int /* num_prop */, int /* npositions */ ); extern int XScreenCount( Display* /* display */ ); extern int XSelectInput( Display* /* display */, Window /* w */, long /* event_mask */ ); extern Status XSendEvent( Display* /* display */, Window /* w */, Bool /* propagate */, long /* event_mask */, XEvent* /* event_send */ ); extern int XSetAccessControl( Display* /* display */, int /* mode */ ); extern int XSetArcMode( Display* /* display */, GC /* gc */, int /* arc_mode */ ); extern int XSetBackground( Display* /* display */, GC /* gc */, unsigned long /* background */ ); extern int XSetClipMask( Display* /* display */, GC /* gc */, Pixmap /* pixmap */ ); extern int XSetClipOrigin( Display* /* display */, GC /* gc */, int /* clip_x_origin */, int /* clip_y_origin */ ); extern int XSetClipRectangles( Display* /* display */, GC /* gc */, int /* clip_x_origin */, int /* clip_y_origin */, XRectangle* /* rectangles */, int /* n */, int /* ordering */ ); extern int XSetCloseDownMode( Display* /* display */, int /* close_mode */ ); extern int XSetCommand( Display* /* display */, Window /* w */, char** /* argv */, int /* argc */ ); extern int XSetDashes( Display* /* display */, GC /* gc */, int /* dash_offset */, _Xconst char* /* dash_list */, int /* n */ ); extern int XSetFillRule( Display* /* display */, GC /* gc */, int /* fill_rule */ ); extern int XSetFillStyle( Display* /* display */, GC /* gc */, int /* fill_style */ ); extern int XSetFont( Display* /* display */, GC /* gc */, Font /* font */ ); extern int XSetFontPath( Display* /* display */, char** /* directories */, int /* ndirs */ ); extern int XSetForeground( Display* /* display */, GC /* gc */, unsigned long /* foreground */ ); extern int XSetFunction( Display* /* display */, GC /* gc */, int /* function */ ); extern int XSetGraphicsExposures( Display* /* display */, GC /* gc */, Bool /* graphics_exposures */ ); extern int XSetIconName( Display* /* display */, Window /* w */, _Xconst char* /* icon_name */ ); extern int XSetInputFocus( Display* /* display */, Window /* focus */, int /* revert_to */, Time /* time */ ); extern int XSetLineAttributes( Display* /* display */, GC /* gc */, unsigned int /* line_width */, int /* line_style */, int /* cap_style */, int /* join_style */ ); extern int XSetModifierMapping( Display* /* display */, XModifierKeymap* /* modmap */ ); extern int XSetPlaneMask( Display* /* display */, GC /* gc */, unsigned long /* plane_mask */ ); extern int XSetPointerMapping( Display* /* display */, _Xconst unsigned char* /* map */, int /* nmap */ ); extern int XSetScreenSaver( Display* /* display */, int /* timeout */, int /* interval */, int /* prefer_blanking */, int /* allow_exposures */ ); extern int XSetSelectionOwner( Display* /* display */, Atom /* selection */, Window /* owner */, Time /* time */ ); extern int XSetState( Display* /* display */, GC /* gc */, unsigned long /* foreground */, unsigned long /* background */, int /* function */, unsigned long /* plane_mask */ ); extern int XSetStipple( Display* /* display */, GC /* gc */, Pixmap /* stipple */ ); extern int XSetSubwindowMode( Display* /* display */, GC /* gc */, int /* subwindow_mode */ ); extern int XSetTSOrigin( Display* /* display */, GC /* gc */, int /* ts_x_origin */, int /* ts_y_origin */ ); extern int XSetTile( Display* /* display */, GC /* gc */, Pixmap /* tile */ ); extern int XSetWindowBackground( Display* /* display */, Window /* w */, unsigned long /* background_pixel */ ); extern int XSetWindowBackgroundPixmap( Display* /* display */, Window /* w */, Pixmap /* background_pixmap */ ); extern int XSetWindowBorder( Display* /* display */, Window /* w */, unsigned long /* border_pixel */ ); extern int XSetWindowBorderPixmap( Display* /* display */, Window /* w */, Pixmap /* border_pixmap */ ); extern int XSetWindowBorderWidth( Display* /* display */, Window /* w */, unsigned int /* width */ ); extern int XSetWindowColormap( Display* /* display */, Window /* w */, Colormap /* colormap */ ); extern int XStoreBuffer( Display* /* display */, _Xconst char* /* bytes */, int /* nbytes */, int /* buffer */ ); extern int XStoreBytes( Display* /* display */, _Xconst char* /* bytes */, int /* nbytes */ ); extern int XStoreColor( Display* /* display */, Colormap /* colormap */, XColor* /* color */ ); extern int XStoreColors( Display* /* display */, Colormap /* colormap */, XColor* /* color */, int /* ncolors */ ); extern int XStoreName( Display* /* display */, Window /* w */, _Xconst char* /* window_name */ ); extern int XStoreNamedColor( Display* /* display */, Colormap /* colormap */, _Xconst char* /* color */, unsigned long /* pixel */, int /* flags */ ); extern int XSync( Display* /* display */, Bool /* discard */ ); extern int XTextExtents( XFontStruct* /* font_struct */, _Xconst char* /* string */, int /* nchars */, int* /* direction_return */, int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ ); extern int XTextExtents16( XFontStruct* /* font_struct */, _Xconst XChar2b* /* string */, int /* nchars */, int* /* direction_return */, int* /* font_ascent_return */, int* /* font_descent_return */, XCharStruct* /* overall_return */ ); extern int XTextWidth( XFontStruct* /* font_struct */, _Xconst char* /* string */, int /* count */ ); extern int XTextWidth16( XFontStruct* /* font_struct */, _Xconst XChar2b* /* string */, int /* count */ ); extern Bool XTranslateCoordinates( Display* /* display */, Window /* src_w */, Window /* dest_w */, int /* src_x */, int /* src_y */, int* /* dest_x_return */, int* /* dest_y_return */, Window* /* child_return */ ); extern int XUndefineCursor( Display* /* display */, Window /* w */ ); extern int XUngrabButton( Display* /* display */, unsigned int /* button */, unsigned int /* modifiers */, Window /* grab_window */ ); extern int XUngrabKey( Display* /* display */, int /* keycode */, unsigned int /* modifiers */, Window /* grab_window */ ); extern int XUngrabKeyboard( Display* /* display */, Time /* time */ ); extern int XUngrabPointer( Display* /* display */, Time /* time */ ); extern int XUngrabServer( Display* /* display */ ); extern int XUninstallColormap( Display* /* display */, Colormap /* colormap */ ); extern int XUnloadFont( Display* /* display */, Font /* font */ ); extern int XUnmapSubwindows( Display* /* display */, Window /* w */ ); extern int XUnmapWindow( Display* /* display */, Window /* w */ ); extern int XVendorRelease( Display* /* display */ ); extern int XWarpPointer( Display* /* display */, Window /* src_w */, Window /* dest_w */, int /* src_x */, int /* src_y */, unsigned int /* src_width */, unsigned int /* src_height */, int /* dest_x */, int /* dest_y */ ); extern int XWidthMMOfScreen( Screen* /* screen */ ); extern int XWidthOfScreen( Screen* /* screen */ ); extern int XWindowEvent( Display* /* display */, Window /* w */, long /* event_mask */, XEvent* /* event_return */ ); extern int XWriteBitmapFile( Display* /* display */, _Xconst char* /* filename */, Pixmap /* bitmap */, unsigned int /* width */, unsigned int /* height */, int /* x_hot */, int /* y_hot */ ); extern Bool XSupportsLocale (void); extern char *XSetLocaleModifiers( const char* /* modifier_list */ ); extern XOM XOpenOM( Display* /* display */, struct _XrmHashBucketRec* /* rdb */, _Xconst char* /* res_name */, _Xconst char* /* res_class */ ); extern Status XCloseOM( XOM /* om */ ); extern char *XSetOMValues( XOM /* om */, ... ) _X_SENTINEL(0); extern char *XGetOMValues( XOM /* om */, ... ) _X_SENTINEL(0); extern Display *XDisplayOfOM( XOM /* om */ ); extern char *XLocaleOfOM( XOM /* om */ ); extern XOC XCreateOC( XOM /* om */, ... ) _X_SENTINEL(0); extern void XDestroyOC( XOC /* oc */ ); extern XOM XOMOfOC( XOC /* oc */ ); extern char *XSetOCValues( XOC /* oc */, ... ) _X_SENTINEL(0); extern char *XGetOCValues( XOC /* oc */, ... ) _X_SENTINEL(0); extern XFontSet XCreateFontSet( Display* /* display */, _Xconst char* /* base_font_name_list */, char*** /* missing_charset_list */, int* /* missing_charset_count */, char** /* def_string */ ); extern void XFreeFontSet( Display* /* display */, XFontSet /* font_set */ ); extern int XFontsOfFontSet( XFontSet /* font_set */, XFontStruct*** /* font_struct_list */, char*** /* font_name_list */ ); extern char *XBaseFontNameListOfFontSet( XFontSet /* font_set */ ); extern char *XLocaleOfFontSet( XFontSet /* font_set */ ); extern Bool XContextDependentDrawing( XFontSet /* font_set */ ); extern Bool XDirectionalDependentDrawing( XFontSet /* font_set */ ); extern Bool XContextualDrawing( XFontSet /* font_set */ ); extern XFontSetExtents *XExtentsOfFontSet( XFontSet /* font_set */ ); extern int XmbTextEscapement( XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */ ); extern int XwcTextEscapement( XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* num_wchars */ ); extern int Xutf8TextEscapement( XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */ ); extern int XmbTextExtents( XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ ); extern int XwcTextExtents( XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* num_wchars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ ); extern int Xutf8TextExtents( XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ ); extern Status XmbTextPerCharExtents( XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, XRectangle* /* ink_extents_buffer */, XRectangle* /* logical_extents_buffer */, int /* buffer_size */, int* /* num_chars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ ); extern Status XwcTextPerCharExtents( XFontSet /* font_set */, _Xconst wchar_t* /* text */, int /* num_wchars */, XRectangle* /* ink_extents_buffer */, XRectangle* /* logical_extents_buffer */, int /* buffer_size */, int* /* num_chars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ ); extern Status Xutf8TextPerCharExtents( XFontSet /* font_set */, _Xconst char* /* text */, int /* bytes_text */, XRectangle* /* ink_extents_buffer */, XRectangle* /* logical_extents_buffer */, int /* buffer_size */, int* /* num_chars */, XRectangle* /* overall_ink_return */, XRectangle* /* overall_logical_return */ ); extern void XmbDrawText( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, XmbTextItem* /* text_items */, int /* nitems */ ); extern void XwcDrawText( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, XwcTextItem* /* text_items */, int /* nitems */ ); extern void Xutf8DrawText( Display* /* display */, Drawable /* d */, GC /* gc */, int /* x */, int /* y */, XmbTextItem* /* text_items */, int /* nitems */ ); extern void XmbDrawString( Display* /* display */, Drawable /* d */, XFontSet /* font_set */, GC /* gc */, int /* x */, int /* y */, _Xconst char* /* text */, int /* bytes_text */ ); extern void XwcDrawString( Display* /* display */, Drawable /* d */, XFontSet /* font_set */, GC /* gc */, int /* x */, int /* y */, _Xconst wchar_t* /* text */, int /* num_wchars */ ); extern void Xutf8DrawString( Display* /* display */, Drawable /* d */, XFontSet /* font_set */, GC /* gc */, int /* x */, int /* y */, _Xconst char* /* text */, int /* bytes_text */ ); extern void XmbDrawImageString( Display* /* display */, Drawable /* d */, XFontSet /* font_set */, GC /* gc */, int /* x */, int /* y */, _Xconst char* /* text */, int /* bytes_text */ ); extern void XwcDrawImageString( Display* /* display */, Drawable /* d */, XFontSet /* font_set */, GC /* gc */, int /* x */, int /* y */, _Xconst wchar_t* /* text */, int /* num_wchars */ ); extern void Xutf8DrawImageString( Display* /* display */, Drawable /* d */, XFontSet /* font_set */, GC /* gc */, int /* x */, int /* y */, _Xconst char* /* text */, int /* bytes_text */ ); extern XIM XOpenIM( Display* /* dpy */, struct _XrmHashBucketRec* /* rdb */, char* /* res_name */, char* /* res_class */ ); extern Status XCloseIM( XIM /* im */ ); extern char *XGetIMValues( XIM /* im */, ... ) _X_SENTINEL(0); extern char *XSetIMValues( XIM /* im */, ... ) _X_SENTINEL(0); extern Display *XDisplayOfIM( XIM /* im */ ); extern char *XLocaleOfIM( XIM /* im*/ ); extern XIC XCreateIC( XIM /* im */, ... ) _X_SENTINEL(0); extern void XDestroyIC( XIC /* ic */ ); extern void XSetICFocus( XIC /* ic */ ); extern void XUnsetICFocus( XIC /* ic */ ); extern wchar_t *XwcResetIC( XIC /* ic */ ); extern char *XmbResetIC( XIC /* ic */ ); extern char *Xutf8ResetIC( XIC /* ic */ ); extern char *XSetICValues( XIC /* ic */, ... ) _X_SENTINEL(0); extern char *XGetICValues( XIC /* ic */, ... ) _X_SENTINEL(0); extern XIM XIMOfIC( XIC /* ic */ ); extern Bool XFilterEvent( XEvent* /* event */, Window /* window */ ); extern int XmbLookupString( XIC /* ic */, XKeyPressedEvent* /* event */, char* /* buffer_return */, int /* bytes_buffer */, KeySym* /* keysym_return */, Status* /* status_return */ ); extern int XwcLookupString( XIC /* ic */, XKeyPressedEvent* /* event */, wchar_t* /* buffer_return */, int /* wchars_buffer */, KeySym* /* keysym_return */, Status* /* status_return */ ); extern int Xutf8LookupString( XIC /* ic */, XKeyPressedEvent* /* event */, char* /* buffer_return */, int /* bytes_buffer */, KeySym* /* keysym_return */, Status* /* status_return */ ); extern XVaNestedList XVaCreateNestedList( int /*unused*/, ... ) _X_SENTINEL(0); /* internal connections for IMs */ extern Bool XRegisterIMInstantiateCallback( Display* /* dpy */, struct _XrmHashBucketRec* /* rdb */, char* /* res_name */, char* /* res_class */, XIDProc /* callback */, XPointer /* client_data */ ); extern Bool XUnregisterIMInstantiateCallback( Display* /* dpy */, struct _XrmHashBucketRec* /* rdb */, char* /* res_name */, char* /* res_class */, XIDProc /* callback */, XPointer /* client_data */ ); typedef void (*XConnectionWatchProc)( Display* /* dpy */, XPointer /* client_data */, int /* fd */, Bool /* opening */, /* open or close flag */ XPointer* /* watch_data */ /* open sets, close uses */ ); extern Status XInternalConnectionNumbers( Display* /* dpy */, int** /* fd_return */, int* /* count_return */ ); extern void XProcessInternalConnection( Display* /* dpy */, int /* fd */ ); extern Status XAddConnectionWatch( Display* /* dpy */, XConnectionWatchProc /* callback */, XPointer /* client_data */ ); extern void XRemoveConnectionWatch( Display* /* dpy */, XConnectionWatchProc /* callback */, XPointer /* client_data */ ); extern void XSetAuthorization( char * /* name */, int /* namelen */, char * /* data */, int /* datalen */ ); extern int _Xmbtowc( wchar_t * /* wstr */, char * /* str */, int /* len */ ); extern int _Xwctomb( char * /* str */, wchar_t /* wc */ ); extern Bool XGetEventData( Display* /* dpy */, XGenericEventCookie* /* cookie*/ ); extern void XFreeEventData( Display* /* dpy */, XGenericEventCookie* /* cookie*/ ); #ifdef __clang__ #pragma clang diagnostic pop #endif _XFUNCPROTOEND #endif /* _X11_XLIB_H_ */ PKZٯX11/dri/xf86dristr.hnu[#warning "xf86dristr.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include PKZ2%%X11/dri/xf86driproto.hnu[/************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ /* * Authors: * Kevin E. Martin * Jens Owen * Rickard E. (Rik) Faith * */ #ifndef _XF86DRISTR_H_ #define _XF86DRISTR_H_ #include "xf86dri.h" #define XF86DRINAME "XFree86-DRI" /* The DRI version number. This was originally set to be the same of the * XFree86 version number. However, this version is really independent of * the XFree86 version. * * Version History: * 4.0.0: Original * 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02 * 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02 */ #define XF86DRI_MAJOR_VERSION 4 #define XF86DRI_MINOR_VERSION 1 #define XF86DRI_PATCH_VERSION 0 typedef struct _XF86DRIQueryVersion { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIQueryVersion */ CARD16 length; } xXF86DRIQueryVersionReq; #define sz_xXF86DRIQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of DRI protocol */ CARD16 minorVersion; /* minor version of DRI protocol */ CARD32 patchVersion; /* patch version of DRI protocol */ CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86DRIQueryVersionReply; #define sz_xXF86DRIQueryVersionReply 32 typedef struct _XF86DRIQueryDirectRenderingCapable { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */ CARD16 length; CARD32 screen; } xXF86DRIQueryDirectRenderingCapableReq; #define sz_xXF86DRIQueryDirectRenderingCapableReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; BOOL isCapable; BOOL pad2; BOOL pad3; BOOL pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; CARD32 pad8; CARD32 pad9; } xXF86DRIQueryDirectRenderingCapableReply; #define sz_xXF86DRIQueryDirectRenderingCapableReply 32 typedef struct _XF86DRIOpenConnection { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIOpenConnection */ CARD16 length; CARD32 screen; } xXF86DRIOpenConnectionReq; #define sz_xXF86DRIOpenConnectionReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hSAREALow; CARD32 hSAREAHigh; CARD32 busIdStringLength; CARD32 pad6; CARD32 pad7; CARD32 pad8; } xXF86DRIOpenConnectionReply; #define sz_xXF86DRIOpenConnectionReply 32 typedef struct _XF86DRIAuthConnection { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICloseConnection */ CARD16 length; CARD32 screen; CARD32 magic; } xXF86DRIAuthConnectionReq; #define sz_xXF86DRIAuthConnectionReq 12 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 authenticated; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86DRIAuthConnectionReply; #define zx_xXF86DRIAuthConnectionReply 32 typedef struct _XF86DRICloseConnection { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICloseConnection */ CARD16 length; CARD32 screen; } xXF86DRICloseConnectionReq; #define sz_xXF86DRICloseConnectionReq 8 typedef struct _XF86DRIGetClientDriverName { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIGetClientDriverName */ CARD16 length; CARD32 screen; } xXF86DRIGetClientDriverNameReq; #define sz_xXF86DRIGetClientDriverNameReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 ddxDriverMajorVersion; CARD32 ddxDriverMinorVersion; CARD32 ddxDriverPatchVersion; CARD32 clientDriverNameLength; CARD32 pad5; CARD32 pad6; } xXF86DRIGetClientDriverNameReply; #define sz_xXF86DRIGetClientDriverNameReply 32 typedef struct _XF86DRICreateContext { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICreateContext */ CARD16 length; CARD32 screen; CARD32 visual; CARD32 context; } xXF86DRICreateContextReq; #define sz_xXF86DRICreateContextReq 16 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hHWContext; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86DRICreateContextReply; #define sz_xXF86DRICreateContextReply 32 typedef struct _XF86DRIDestroyContext { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIDestroyContext */ CARD16 length; CARD32 screen; CARD32 context; } xXF86DRIDestroyContextReq; #define sz_xXF86DRIDestroyContextReq 12 typedef struct _XF86DRICreateDrawable { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICreateDrawable */ CARD16 length; CARD32 screen; CARD32 drawable; } xXF86DRICreateDrawableReq; #define sz_xXF86DRICreateDrawableReq 12 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hHWDrawable; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86DRICreateDrawableReply; #define sz_xXF86DRICreateDrawableReply 32 typedef struct _XF86DRIDestroyDrawable { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIDestroyDrawable */ CARD16 length; CARD32 screen; CARD32 drawable; } xXF86DRIDestroyDrawableReq; #define sz_xXF86DRIDestroyDrawableReq 12 typedef struct _XF86DRIGetDrawableInfo { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIGetDrawableInfo */ CARD16 length; CARD32 screen; CARD32 drawable; } xXF86DRIGetDrawableInfoReq; #define sz_xXF86DRIGetDrawableInfoReq 12 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 drawableTableIndex; CARD32 drawableTableStamp; INT16 drawableX; INT16 drawableY; INT16 drawableWidth; INT16 drawableHeight; CARD32 numClipRects; INT16 backX; INT16 backY; CARD32 numBackClipRects; } xXF86DRIGetDrawableInfoReply; #define sz_xXF86DRIGetDrawableInfoReply 36 typedef struct _XF86DRIGetDeviceInfo { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIGetDeviceInfo */ CARD16 length; CARD32 screen; } xXF86DRIGetDeviceInfoReq; #define sz_xXF86DRIGetDeviceInfoReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 hFrameBufferLow; CARD32 hFrameBufferHigh; CARD32 framebufferOrigin; CARD32 framebufferSize; CARD32 framebufferStride; CARD32 devPrivateSize; } xXF86DRIGetDeviceInfoReply; #define sz_xXF86DRIGetDeviceInfoReply 32 typedef struct _XF86DRIOpenFullScreen { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIOpenFullScreen */ CARD16 length; CARD32 screen; CARD32 drawable; } xXF86DRIOpenFullScreenReq; #define sz_xXF86DRIOpenFullScreenReq 12 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 isFullScreen; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86DRIOpenFullScreenReply; #define sz_xXF86DRIOpenFullScreenReply 32 typedef struct _XF86DRICloseFullScreen { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICloseFullScreen */ CARD16 length; CARD32 screen; CARD32 drawable; } xXF86DRICloseFullScreenReq; #define sz_xXF86DRICloseFullScreenReq 12 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xXF86DRICloseFullScreenReply; #define sz_xXF86DRICloseFullScreenReply 32 #endif /* _XF86DRISTR_H_ */ PKZ(` X11/dri/xf86dri.hnu[/************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ /** * \file xf86dri.h * Protocol numbers and function prototypes for DRI X protocol. * * \author Kevin E. Martin * \author Jens Owen * \author Rickard E. (Rik) Faith */ #ifndef _XF86DRI_H_ #define _XF86DRI_H_ #include #define X_XF86DRIQueryVersion 0 #define X_XF86DRIQueryDirectRenderingCapable 1 #define X_XF86DRIOpenConnection 2 #define X_XF86DRICloseConnection 3 #define X_XF86DRIGetClientDriverName 4 #define X_XF86DRICreateContext 5 #define X_XF86DRIDestroyContext 6 #define X_XF86DRICreateDrawable 7 #define X_XF86DRIDestroyDrawable 8 #define X_XF86DRIGetDrawableInfo 9 #define X_XF86DRIGetDeviceInfo 10 #define X_XF86DRIAuthConnection 11 #define X_XF86DRIOpenFullScreen 12 /* Deprecated */ #define X_XF86DRICloseFullScreen 13 /* Deprecated */ #define XF86DRINumberEvents 0 #define XF86DRIClientNotLocal 0 #define XF86DRIOperationNotSupported 1 #define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1) #endif /* _XF86DRI_H_ */ PKZ|!ǔX11/XlibConf.hnu[/* include/X11/XlibConf.h. Generated from XlibConf.h.in by configure. */ /* * Copyright © 2005 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _XLIBCONF_H_ #define _XLIBCONF_H_ /* * This header file exports defines necessary to correctly * use Xlibint.h both inside Xlib and by external libraries * such as extensions. */ /* Threading support? */ #define XTHREADS 1 /* Use multi-threaded libc functions? */ #define XUSE_MTSAFE_API 1 #endif /* _XLIBCONF_H_ */ PKZ<^ X11/keysym.hnu[/*********************************************************** Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ /* default keysyms */ #define XK_MISCELLANY #define XK_XKB_KEYS #define XK_LATIN1 #define XK_LATIN2 #define XK_LATIN3 #define XK_LATIN4 #define XK_LATIN8 #define XK_LATIN9 #define XK_CAUCASUS #define XK_GREEK #define XK_KATAKANA #define XK_ARABIC #define XK_CYRILLIC #define XK_HEBREW #define XK_THAI #define XK_KOREAN #define XK_ARMENIAN #define XK_GEORGIAN #define XK_VIETNAMESE #define XK_CURRENCY #define XK_MATHEMATICAL #define XK_BRAILLE #define XK_SINHALA #include PKZ`y X11/Xalloca.hnu[/* Copyright 1995, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * The purpose of this header is to define the macros ALLOCATE_LOCAL and * DEALLOCATE_LOCAL appropriately for the platform being compiled on. * These macros are used to make fast, function-local memory allocations. * Their characteristics are as follows: * * void *ALLOCATE_LOCAL(size_t size) * Returns a pointer to size bytes of memory, or NULL if the allocation * failed. The memory must be freed with DEALLOCATE_LOCAL before the * function that made the allocation returns. You should not ask for * large blocks of memory with this function, since on many platforms * the memory comes from the stack, which may have limited size. * * void DEALLOCATE_LOCAL(void *) * Frees the memory allocated by ALLOCATE_LOCAL. Omission of this * step may be harmless on some platforms, but will result in * memory leaks or worse on others. * * Before including this file, you should define two macros, * ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK, that have the * same characteristics as ALLOCATE_LOCAL and DEALLOCATE_LOCAL. The * header uses the fallbacks if it doesn't know a "better" way to define * ALLOCATE_LOCAL and DEALLOCATE_LOCAL. Typical usage would be: * * #define ALLOCATE_LOCAL_FALLBACK(_size) malloc(_size) * #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free(_ptr) * #include "Xalloca.h" */ #ifndef XALLOCA_H #define XALLOCA_H 1 #ifndef INCLUDE_ALLOCA_H /* Need to add more here to match Imake *.cf's */ # if defined(HAVE_ALLOCA_H) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) # define INCLUDE_ALLOCA_H # endif #endif #ifdef INCLUDE_ALLOCA_H # include #endif #ifndef NO_ALLOCA /* * os-dependent definition of local allocation and deallocation * If you want something other than (DE)ALLOCATE_LOCAL_FALLBACK * for ALLOCATE/DEALLOCATE_LOCAL then you add that in here. */ # ifdef __GNUC__ # ifndef alloca # define alloca __builtin_alloca # endif /* !alloca */ # define ALLOCATE_LOCAL(size) alloca((size_t)(size)) # else /* ! __GNUC__ */ /* * warning: old mips alloca (pre 2.10) is unusable, new one is built in * Test is easy, the new one is named __builtin_alloca and comes * from alloca.h which #defines alloca. */ # if defined(__sun) || defined(alloca) /* * Some System V boxes extract alloca.o from /lib/libPW.a; if you * decide that you don't want to use alloca, you might want to fix it here. */ /* alloca might be a macro taking one arg (hi, Sun!), so give it one. */ # if !defined(__cplusplus) # define __Xnullarg /* as nothing */ extern void *alloca(__Xnullarg); # endif # define ALLOCATE_LOCAL(size) alloca((size_t)(size)) # endif /* who does alloca */ # endif /* __GNUC__ */ #endif /* NO_ALLOCA */ #if !defined(ALLOCATE_LOCAL) # if defined(ALLOCATE_LOCAL_FALLBACK) && defined(DEALLOCATE_LOCAL_FALLBACK) # define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK(_size) # define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK(_ptr) # else /* no fallbacks supplied; error */ # define ALLOCATE_LOCAL(_size) ALLOCATE_LOCAL_FALLBACK undefined! # define DEALLOCATE_LOCAL(_ptr) DEALLOCATE_LOCAL_FALLBACK undefined! # endif /* defined(ALLOCATE_LOCAL_FALLBACK && DEALLOCATE_LOCAL_FALLBACK) */ #else # if !defined(DEALLOCATE_LOCAL) # define DEALLOCATE_LOCAL(_ptr) do {} while(0) # endif #endif /* defined(ALLOCATE_LOCAL) */ #endif /* XALLOCA_H */ PKZrMuuX11/Xw32defs.hnu[#ifndef _XW32DEFS_H # define _XW32DEFS_H # ifdef __GNUC__ /* mingw is more close to unix than msvc */ # if !defined(__daddr_t_defined) typedef char *caddr_t; # endif # define lstat stat # else typedef char *caddr_t; # define access _access # define alloca _alloca # define chdir _chdir # define chmod _chmod # define close _close # define creat _creat # define dup _dup # define dup2 _dup2 # define environ _environ # define execl _execl # define execle _execle # define execlp _execlp # define execlpe _execlpe # define execv _execv # define execve _execve # define execvp _execvp # define execvpe _execvpe # define fdopen _fdopen # define fileno _fileno # define fstat _fstat # define getcwd _getcwd # define getpid _getpid # define hypot _hypot # define isascii __isascii # define isatty _isatty # define lseek _lseek # define mkdir _mkdir # define mktemp _mktemp # define open _open # define putenv _putenv # define read _read # define rmdir _rmdir # define sleep(x) Sleep((x) * 1000) # define stat _stat # define sys_errlist _sys_errlist # define sys_nerr _sys_nerr # define umask _umask # define unlink _unlink # define write _write # define random rand # define srandom srand # define O_RDONLY _O_RDONLY # define O_WRONLY _O_WRONLY # define O_RDWR _O_RDWR # define O_APPEND _O_APPEND # define O_CREAT _O_CREAT # define O_TRUNC _O_TRUNC # define O_EXCL _O_EXCL # define O_TEXT _O_TEXT # define O_BINARY _O_BINARY # define O_RAW _O_BINARY # define S_IFMT _S_IFMT # define S_IFDIR _S_IFDIR # define S_IFCHR _S_IFCHR # define S_IFREG _S_IFREG # define S_IREAD _S_IREAD # define S_IWRITE _S_IWRITE # define S_IEXEC _S_IEXEC # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 # endif /* __GNUC__ */ #endif PKZdNNX11/X.hnu[/* Definitions for the X window system likely to be used by applications */ #ifndef X_H #define X_H /*********************************************************** Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #define X_PROTOCOL 11 /* current protocol version */ #define X_PROTOCOL_REVISION 0 /* current minor version */ /* Resources */ /* * _XSERVER64 must ONLY be defined when compiling X server sources on * systems where unsigned long is not 32 bits, must NOT be used in * client or library code. */ #ifndef _XSERVER64 # ifndef _XTYPEDEF_XID # define _XTYPEDEF_XID typedef unsigned long XID; # endif # ifndef _XTYPEDEF_MASK # define _XTYPEDEF_MASK typedef unsigned long Mask; # endif # ifndef _XTYPEDEF_ATOM # define _XTYPEDEF_ATOM typedef unsigned long Atom; /* Also in Xdefs.h */ # endif typedef unsigned long VisualID; typedef unsigned long Time; #else # include # ifndef _XTYPEDEF_XID # define _XTYPEDEF_XID typedef CARD32 XID; # endif # ifndef _XTYPEDEF_MASK # define _XTYPEDEF_MASK typedef CARD32 Mask; # endif # ifndef _XTYPEDEF_ATOM # define _XTYPEDEF_ATOM typedef CARD32 Atom; # endif typedef CARD32 VisualID; typedef CARD32 Time; #endif typedef XID Window; typedef XID Drawable; #ifndef _XTYPEDEF_FONT # define _XTYPEDEF_FONT typedef XID Font; #endif typedef XID Pixmap; typedef XID Cursor; typedef XID Colormap; typedef XID GContext; typedef XID KeySym; typedef unsigned char KeyCode; /***************************************************************** * RESERVED RESOURCE AND CONSTANT DEFINITIONS *****************************************************************/ #ifndef None #define None 0L /* universal null resource or null atom */ #endif #define ParentRelative 1L /* background pixmap in CreateWindow and ChangeWindowAttributes */ #define CopyFromParent 0L /* border pixmap in CreateWindow and ChangeWindowAttributes special VisualID and special window class passed to CreateWindow */ #define PointerWindow 0L /* destination window in SendEvent */ #define InputFocus 1L /* destination window in SendEvent */ #define PointerRoot 1L /* focus window in SetInputFocus */ #define AnyPropertyType 0L /* special Atom, passed to GetProperty */ #define AnyKey 0L /* special Key Code, passed to GrabKey */ #define AnyButton 0L /* special Button Code, passed to GrabButton */ #define AllTemporary 0L /* special Resource ID passed to KillClient */ #define CurrentTime 0L /* special Time */ #define NoSymbol 0L /* special KeySym */ /***************************************************************** * EVENT DEFINITIONS *****************************************************************/ /* Input Event Masks. Used as event-mask window attribute and as arguments to Grab requests. Not to be confused with event names. */ #define NoEventMask 0L #define KeyPressMask (1L<<0) #define KeyReleaseMask (1L<<1) #define ButtonPressMask (1L<<2) #define ButtonReleaseMask (1L<<3) #define EnterWindowMask (1L<<4) #define LeaveWindowMask (1L<<5) #define PointerMotionMask (1L<<6) #define PointerMotionHintMask (1L<<7) #define Button1MotionMask (1L<<8) #define Button2MotionMask (1L<<9) #define Button3MotionMask (1L<<10) #define Button4MotionMask (1L<<11) #define Button5MotionMask (1L<<12) #define ButtonMotionMask (1L<<13) #define KeymapStateMask (1L<<14) #define ExposureMask (1L<<15) #define VisibilityChangeMask (1L<<16) #define StructureNotifyMask (1L<<17) #define ResizeRedirectMask (1L<<18) #define SubstructureNotifyMask (1L<<19) #define SubstructureRedirectMask (1L<<20) #define FocusChangeMask (1L<<21) #define PropertyChangeMask (1L<<22) #define ColormapChangeMask (1L<<23) #define OwnerGrabButtonMask (1L<<24) /* Event names. Used in "type" field in XEvent structures. Not to be confused with event masks above. They start from 2 because 0 and 1 are reserved in the protocol for errors and replies. */ #define KeyPress 2 #define KeyRelease 3 #define ButtonPress 4 #define ButtonRelease 5 #define MotionNotify 6 #define EnterNotify 7 #define LeaveNotify 8 #define FocusIn 9 #define FocusOut 10 #define KeymapNotify 11 #define Expose 12 #define GraphicsExpose 13 #define NoExpose 14 #define VisibilityNotify 15 #define CreateNotify 16 #define DestroyNotify 17 #define UnmapNotify 18 #define MapNotify 19 #define MapRequest 20 #define ReparentNotify 21 #define ConfigureNotify 22 #define ConfigureRequest 23 #define GravityNotify 24 #define ResizeRequest 25 #define CirculateNotify 26 #define CirculateRequest 27 #define PropertyNotify 28 #define SelectionClear 29 #define SelectionRequest 30 #define SelectionNotify 31 #define ColormapNotify 32 #define ClientMessage 33 #define MappingNotify 34 #define GenericEvent 35 #define LASTEvent 36 /* must be bigger than any event # */ /* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer, state in various key-, mouse-, and button-related events. */ #define ShiftMask (1<<0) #define LockMask (1<<1) #define ControlMask (1<<2) #define Mod1Mask (1<<3) #define Mod2Mask (1<<4) #define Mod3Mask (1<<5) #define Mod4Mask (1<<6) #define Mod5Mask (1<<7) /* modifier names. Used to build a SetModifierMapping request or to read a GetModifierMapping request. These correspond to the masks defined above. */ #define ShiftMapIndex 0 #define LockMapIndex 1 #define ControlMapIndex 2 #define Mod1MapIndex 3 #define Mod2MapIndex 4 #define Mod3MapIndex 5 #define Mod4MapIndex 6 #define Mod5MapIndex 7 /* button masks. Used in same manner as Key masks above. Not to be confused with button names below. */ #define Button1Mask (1<<8) #define Button2Mask (1<<9) #define Button3Mask (1<<10) #define Button4Mask (1<<11) #define Button5Mask (1<<12) #define AnyModifier (1<<15) /* used in GrabButton, GrabKey */ /* button names. Used as arguments to GrabButton and as detail in ButtonPress and ButtonRelease events. Not to be confused with button masks above. Note that 0 is already defined above as "AnyButton". */ #define Button1 1 #define Button2 2 #define Button3 3 #define Button4 4 #define Button5 5 /* Notify modes */ #define NotifyNormal 0 #define NotifyGrab 1 #define NotifyUngrab 2 #define NotifyWhileGrabbed 3 #define NotifyHint 1 /* for MotionNotify events */ /* Notify detail */ #define NotifyAncestor 0 #define NotifyVirtual 1 #define NotifyInferior 2 #define NotifyNonlinear 3 #define NotifyNonlinearVirtual 4 #define NotifyPointer 5 #define NotifyPointerRoot 6 #define NotifyDetailNone 7 /* Visibility notify */ #define VisibilityUnobscured 0 #define VisibilityPartiallyObscured 1 #define VisibilityFullyObscured 2 /* Circulation request */ #define PlaceOnTop 0 #define PlaceOnBottom 1 /* protocol families */ #define FamilyInternet 0 /* IPv4 */ #define FamilyDECnet 1 #define FamilyChaos 2 #define FamilyInternet6 6 /* IPv6 */ /* authentication families not tied to a specific protocol */ #define FamilyServerInterpreted 5 /* Property notification */ #define PropertyNewValue 0 #define PropertyDelete 1 /* Color Map notification */ #define ColormapUninstalled 0 #define ColormapInstalled 1 /* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */ #define GrabModeSync 0 #define GrabModeAsync 1 /* GrabPointer, GrabKeyboard reply status */ #define GrabSuccess 0 #define AlreadyGrabbed 1 #define GrabInvalidTime 2 #define GrabNotViewable 3 #define GrabFrozen 4 /* AllowEvents modes */ #define AsyncPointer 0 #define SyncPointer 1 #define ReplayPointer 2 #define AsyncKeyboard 3 #define SyncKeyboard 4 #define ReplayKeyboard 5 #define AsyncBoth 6 #define SyncBoth 7 /* Used in SetInputFocus, GetInputFocus */ #define RevertToNone (int)None #define RevertToPointerRoot (int)PointerRoot #define RevertToParent 2 /***************************************************************** * ERROR CODES *****************************************************************/ #define Success 0 /* everything's okay */ #define BadRequest 1 /* bad request code */ #define BadValue 2 /* int parameter out of range */ #define BadWindow 3 /* parameter not a Window */ #define BadPixmap 4 /* parameter not a Pixmap */ #define BadAtom 5 /* parameter not an Atom */ #define BadCursor 6 /* parameter not a Cursor */ #define BadFont 7 /* parameter not a Font */ #define BadMatch 8 /* parameter mismatch */ #define BadDrawable 9 /* parameter not a Pixmap or Window */ #define BadAccess 10 /* depending on context: - key/button already grabbed - attempt to free an illegal cmap entry - attempt to store into a read-only color map entry. - attempt to modify the access control list from other than the local host. */ #define BadAlloc 11 /* insufficient resources */ #define BadColor 12 /* no such colormap */ #define BadGC 13 /* parameter not a GC */ #define BadIDChoice 14 /* choice not in range or already used */ #define BadName 15 /* font or color name doesn't exist */ #define BadLength 16 /* Request length incorrect */ #define BadImplementation 17 /* server is defective */ #define FirstExtensionError 128 #define LastExtensionError 255 /***************************************************************** * WINDOW DEFINITIONS *****************************************************************/ /* Window classes used by CreateWindow */ /* Note that CopyFromParent is already defined as 0 above */ #define InputOutput 1 #define InputOnly 2 /* Window attributes for CreateWindow and ChangeWindowAttributes */ #define CWBackPixmap (1L<<0) #define CWBackPixel (1L<<1) #define CWBorderPixmap (1L<<2) #define CWBorderPixel (1L<<3) #define CWBitGravity (1L<<4) #define CWWinGravity (1L<<5) #define CWBackingStore (1L<<6) #define CWBackingPlanes (1L<<7) #define CWBackingPixel (1L<<8) #define CWOverrideRedirect (1L<<9) #define CWSaveUnder (1L<<10) #define CWEventMask (1L<<11) #define CWDontPropagate (1L<<12) #define CWColormap (1L<<13) #define CWCursor (1L<<14) /* ConfigureWindow structure */ #define CWX (1<<0) #define CWY (1<<1) #define CWWidth (1<<2) #define CWHeight (1<<3) #define CWBorderWidth (1<<4) #define CWSibling (1<<5) #define CWStackMode (1<<6) /* Bit Gravity */ #define ForgetGravity 0 #define NorthWestGravity 1 #define NorthGravity 2 #define NorthEastGravity 3 #define WestGravity 4 #define CenterGravity 5 #define EastGravity 6 #define SouthWestGravity 7 #define SouthGravity 8 #define SouthEastGravity 9 #define StaticGravity 10 /* Window gravity + bit gravity above */ #define UnmapGravity 0 /* Used in CreateWindow for backing-store hint */ #define NotUseful 0 #define WhenMapped 1 #define Always 2 /* Used in GetWindowAttributes reply */ #define IsUnmapped 0 #define IsUnviewable 1 #define IsViewable 2 /* Used in ChangeSaveSet */ #define SetModeInsert 0 #define SetModeDelete 1 /* Used in ChangeCloseDownMode */ #define DestroyAll 0 #define RetainPermanent 1 #define RetainTemporary 2 /* Window stacking method (in configureWindow) */ #define Above 0 #define Below 1 #define TopIf 2 #define BottomIf 3 #define Opposite 4 /* Circulation direction */ #define RaiseLowest 0 #define LowerHighest 1 /* Property modes */ #define PropModeReplace 0 #define PropModePrepend 1 #define PropModeAppend 2 /***************************************************************** * GRAPHICS DEFINITIONS *****************************************************************/ /* graphics functions, as in GC.alu */ #define GXclear 0x0 /* 0 */ #define GXand 0x1 /* src AND dst */ #define GXandReverse 0x2 /* src AND NOT dst */ #define GXcopy 0x3 /* src */ #define GXandInverted 0x4 /* NOT src AND dst */ #define GXnoop 0x5 /* dst */ #define GXxor 0x6 /* src XOR dst */ #define GXor 0x7 /* src OR dst */ #define GXnor 0x8 /* NOT src AND NOT dst */ #define GXequiv 0x9 /* NOT src XOR dst */ #define GXinvert 0xa /* NOT dst */ #define GXorReverse 0xb /* src OR NOT dst */ #define GXcopyInverted 0xc /* NOT src */ #define GXorInverted 0xd /* NOT src OR dst */ #define GXnand 0xe /* NOT src OR NOT dst */ #define GXset 0xf /* 1 */ /* LineStyle */ #define LineSolid 0 #define LineOnOffDash 1 #define LineDoubleDash 2 /* capStyle */ #define CapNotLast 0 #define CapButt 1 #define CapRound 2 #define CapProjecting 3 /* joinStyle */ #define JoinMiter 0 #define JoinRound 1 #define JoinBevel 2 /* fillStyle */ #define FillSolid 0 #define FillTiled 1 #define FillStippled 2 #define FillOpaqueStippled 3 /* fillRule */ #define EvenOddRule 0 #define WindingRule 1 /* subwindow mode */ #define ClipByChildren 0 #define IncludeInferiors 1 /* SetClipRectangles ordering */ #define Unsorted 0 #define YSorted 1 #define YXSorted 2 #define YXBanded 3 /* CoordinateMode for drawing routines */ #define CoordModeOrigin 0 /* relative to the origin */ #define CoordModePrevious 1 /* relative to previous point */ /* Polygon shapes */ #define Complex 0 /* paths may intersect */ #define Nonconvex 1 /* no paths intersect, but not convex */ #define Convex 2 /* wholly convex */ /* Arc modes for PolyFillArc */ #define ArcChord 0 /* join endpoints of arc */ #define ArcPieSlice 1 /* join endpoints to center of arc */ /* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into GC.stateChanges */ #define GCFunction (1L<<0) #define GCPlaneMask (1L<<1) #define GCForeground (1L<<2) #define GCBackground (1L<<3) #define GCLineWidth (1L<<4) #define GCLineStyle (1L<<5) #define GCCapStyle (1L<<6) #define GCJoinStyle (1L<<7) #define GCFillStyle (1L<<8) #define GCFillRule (1L<<9) #define GCTile (1L<<10) #define GCStipple (1L<<11) #define GCTileStipXOrigin (1L<<12) #define GCTileStipYOrigin (1L<<13) #define GCFont (1L<<14) #define GCSubwindowMode (1L<<15) #define GCGraphicsExposures (1L<<16) #define GCClipXOrigin (1L<<17) #define GCClipYOrigin (1L<<18) #define GCClipMask (1L<<19) #define GCDashOffset (1L<<20) #define GCDashList (1L<<21) #define GCArcMode (1L<<22) #define GCLastBit 22 /***************************************************************** * FONTS *****************************************************************/ /* used in QueryFont -- draw direction */ #define FontLeftToRight 0 #define FontRightToLeft 1 #define FontChange 255 /***************************************************************** * IMAGING *****************************************************************/ /* ImageFormat -- PutImage, GetImage */ #define XYBitmap 0 /* depth 1, XYFormat */ #define XYPixmap 1 /* depth == drawable depth */ #define ZPixmap 2 /* depth == drawable depth */ /***************************************************************** * COLOR MAP STUFF *****************************************************************/ /* For CreateColormap */ #define AllocNone 0 /* create map with no entries */ #define AllocAll 1 /* allocate entire map writeable */ /* Flags used in StoreNamedColor, StoreColors */ #define DoRed (1<<0) #define DoGreen (1<<1) #define DoBlue (1<<2) /***************************************************************** * CURSOR STUFF *****************************************************************/ /* QueryBestSize Class */ #define CursorShape 0 /* largest size that can be displayed */ #define TileShape 1 /* size tiled fastest */ #define StippleShape 2 /* size stippled fastest */ /***************************************************************** * KEYBOARD/POINTER STUFF *****************************************************************/ #define AutoRepeatModeOff 0 #define AutoRepeatModeOn 1 #define AutoRepeatModeDefault 2 #define LedModeOff 0 #define LedModeOn 1 /* masks for ChangeKeyboardControl */ #define KBKeyClickPercent (1L<<0) #define KBBellPercent (1L<<1) #define KBBellPitch (1L<<2) #define KBBellDuration (1L<<3) #define KBLed (1L<<4) #define KBLedMode (1L<<5) #define KBKey (1L<<6) #define KBAutoRepeatMode (1L<<7) #define MappingSuccess 0 #define MappingBusy 1 #define MappingFailed 2 #define MappingModifier 0 #define MappingKeyboard 1 #define MappingPointer 2 /***************************************************************** * SCREEN SAVER STUFF *****************************************************************/ #define DontPreferBlanking 0 #define PreferBlanking 1 #define DefaultBlanking 2 #define DisableScreenSaver 0 #define DisableScreenInterval 0 #define DontAllowExposures 0 #define AllowExposures 1 #define DefaultExposures 2 /* for ForceScreenSaver */ #define ScreenSaverReset 0 #define ScreenSaverActive 1 /***************************************************************** * HOSTS AND CONNECTIONS *****************************************************************/ /* for ChangeHosts */ #define HostInsert 0 #define HostDelete 1 /* for ChangeAccessControl */ #define EnableAccess 1 #define DisableAccess 0 /* Display classes used in opening the connection * Note that the statically allocated ones are even numbered and the * dynamically changeable ones are odd numbered */ #define StaticGray 0 #define GrayScale 1 #define StaticColor 2 #define PseudoColor 3 #define TrueColor 4 #define DirectColor 5 /* Byte order used in imageByteOrder and bitmapBitOrder */ #define LSBFirst 0 #define MSBFirst 1 #endif /* X_H */ PKZ=ViSiS X11/Xutil.hnu[ /*********************************************************** Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef _X11_XUTIL_H_ #define _X11_XUTIL_H_ /* You must include before including this file */ #include #include /* The Xlib structs are full of implicit padding to properly align members. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif /* * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding * value (x, y, width, height) was found in the parsed string. */ #define NoValue 0x0000 #define XValue 0x0001 #define YValue 0x0002 #define WidthValue 0x0004 #define HeightValue 0x0008 #define AllValues 0x000F #define XNegative 0x0010 #define YNegative 0x0020 /* * new version containing base_width, base_height, and win_gravity fields; * used with WM_NORMAL_HINTS. */ typedef struct { long flags; /* marks which fields in this structure are defined */ int x, y; /* obsolete for new window mgrs, but clients */ int width, height; /* should set so old wm's don't mess up */ int min_width, min_height; int max_width, max_height; int width_inc, height_inc; struct { int x; /* numerator */ int y; /* denominator */ } min_aspect, max_aspect; int base_width, base_height; /* added by ICCCM version 1 */ int win_gravity; /* added by ICCCM version 1 */ } XSizeHints; /* * The next block of definitions are for window manager properties that * clients and applications use for communication. */ /* flags argument in size hints */ #define USPosition (1L << 0) /* user specified x, y */ #define USSize (1L << 1) /* user specified width, height */ #define PPosition (1L << 2) /* program specified position */ #define PSize (1L << 3) /* program specified size */ #define PMinSize (1L << 4) /* program specified minimum size */ #define PMaxSize (1L << 5) /* program specified maximum size */ #define PResizeInc (1L << 6) /* program specified resize increments */ #define PAspect (1L << 7) /* program specified min and max aspect ratios */ #define PBaseSize (1L << 8) /* program specified base for incrementing */ #define PWinGravity (1L << 9) /* program specified window gravity */ /* obsolete */ #define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) typedef struct { long flags; /* marks which fields in this structure are defined */ Bool input; /* does this application rely on the window manager to get keyboard input? */ int initial_state; /* see below */ Pixmap icon_pixmap; /* pixmap to be used as icon */ Window icon_window; /* window to be used as icon */ int icon_x, icon_y; /* initial position of icon */ Pixmap icon_mask; /* icon mask bitmap */ XID window_group; /* id of related window group */ /* this structure may be extended in the future */ } XWMHints; /* definition for flags of XWMHints */ #define InputHint (1L << 0) #define StateHint (1L << 1) #define IconPixmapHint (1L << 2) #define IconWindowHint (1L << 3) #define IconPositionHint (1L << 4) #define IconMaskHint (1L << 5) #define WindowGroupHint (1L << 6) #define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \ IconPositionHint|IconMaskHint|WindowGroupHint) #define XUrgencyHint (1L << 8) /* definitions for initial window state */ #define WithdrawnState 0 /* for windows that are not mapped */ #define NormalState 1 /* most applications want to start this way */ #define IconicState 3 /* application wants to start as an icon */ /* * Obsolete states no longer defined by ICCCM */ #define DontCareState 0 /* don't know or care */ #define ZoomState 2 /* application wants to start zoomed */ #define InactiveState 4 /* application believes it is seldom used; */ /* some wm's may put it on inactive menu */ /* * new structure for manipulating TEXT properties; used with WM_NAME, * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND. */ typedef struct { unsigned char *value; /* same as Property routines */ Atom encoding; /* prop type */ int format; /* prop data format: 8, 16, or 32 */ unsigned long nitems; /* number of data items in value */ } XTextProperty; #define XNoMemory -1 #define XLocaleNotSupported -2 #define XConverterNotFound -3 typedef enum { XStringStyle, /* STRING */ XCompoundTextStyle, /* COMPOUND_TEXT */ XTextStyle, /* text in owner's encoding (current locale)*/ XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */ /* The following is an XFree86 extension, introduced in November 2000 */ XUTF8StringStyle /* UTF8_STRING */ } XICCEncodingStyle; typedef struct { int min_width, min_height; int max_width, max_height; int width_inc, height_inc; } XIconSize; typedef struct { char *res_name; char *res_class; } XClassHint; #ifdef XUTIL_DEFINE_FUNCTIONS extern int XDestroyImage( XImage *ximage); extern unsigned long XGetPixel( XImage *ximage, int x, int y); extern int XPutPixel( XImage *ximage, int x, int y, unsigned long pixel); extern XImage *XSubImage( XImage *ximage, int x, int y, unsigned int width, unsigned int height); extern int XAddPixel( XImage *ximage, long value); #else /* * These macros are used to give some sugar to the image routines so that * naive people are more comfortable with them. */ #define XDestroyImage(ximage) \ ((*((ximage)->f.destroy_image))((ximage))) #define XGetPixel(ximage, x, y) \ ((*((ximage)->f.get_pixel))((ximage), (x), (y))) #define XPutPixel(ximage, x, y, pixel) \ ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel))) #define XSubImage(ximage, x, y, width, height) \ ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height))) #define XAddPixel(ximage, value) \ ((*((ximage)->f.add_pixel))((ximage), (value))) #endif /* * Compose sequence status structure, used in calling XLookupString. */ typedef struct _XComposeStatus { XPointer compose_ptr; /* state table pointer */ int chars_matched; /* match state */ } XComposeStatus; /* * Keysym macros, used on Keysyms to test for classes of symbols */ #define IsKeypadKey(keysym) \ (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal)) #define IsPrivateKeypadKey(keysym) \ (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF)) #define IsCursorKey(keysym) \ (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select)) #define IsPFKey(keysym) \ (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4)) #define IsFunctionKey(keysym) \ (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35)) #define IsMiscFunctionKey(keysym) \ (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break)) #ifdef XK_XKB_KEYS #define IsModifierKey(keysym) \ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \ || (((KeySym)(keysym) >= XK_ISO_Lock) && \ ((KeySym)(keysym) <= XK_ISO_Level5_Lock)) \ || ((KeySym)(keysym) == XK_Mode_switch) \ || ((KeySym)(keysym) == XK_Num_Lock)) #else #define IsModifierKey(keysym) \ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \ || ((KeySym)(keysym) == XK_Mode_switch) \ || ((KeySym)(keysym) == XK_Num_Lock)) #endif /* * opaque reference to Region data type */ typedef struct _XRegion *Region; /* Return values from XRectInRegion() */ #define RectangleOut 0 #define RectangleIn 1 #define RectanglePart 2 /* * Information used by the visual utility routines to find desired visual * type from the many visuals a display may support. */ typedef struct { Visual *visual; VisualID visualid; int screen; int depth; #if defined(__cplusplus) || defined(c_plusplus) int c_class; /* C++ */ #else int class; #endif unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; int colormap_size; int bits_per_rgb; } XVisualInfo; #define VisualNoMask 0x0 #define VisualIDMask 0x1 #define VisualScreenMask 0x2 #define VisualDepthMask 0x4 #define VisualClassMask 0x8 #define VisualRedMaskMask 0x10 #define VisualGreenMaskMask 0x20 #define VisualBlueMaskMask 0x40 #define VisualColormapSizeMask 0x80 #define VisualBitsPerRGBMask 0x100 #define VisualAllMask 0x1FF /* * This defines a window manager property that clients may use to * share standard color maps of type RGB_COLOR_MAP: */ typedef struct { Colormap colormap; unsigned long red_max; unsigned long red_mult; unsigned long green_max; unsigned long green_mult; unsigned long blue_max; unsigned long blue_mult; unsigned long base_pixel; VisualID visualid; /* added by ICCCM version 1 */ XID killid; /* added by ICCCM version 1 */ } XStandardColormap; #define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */ /* * return codes for XReadBitmapFile and XWriteBitmapFile */ #define BitmapSuccess 0 #define BitmapOpenFailed 1 #define BitmapFileInvalid 2 #define BitmapNoMemory 3 /**************************************************************** * * Context Management * ****************************************************************/ /* Associative lookup table return codes */ #define XCSUCCESS 0 /* No error. */ #define XCNOMEM 1 /* Out of memory */ #define XCNOENT 2 /* No entry in table */ typedef int XContext; #define XUniqueContext() ((XContext) XrmUniqueQuark()) #define XStringToContext(string) ((XContext) XrmStringToQuark(string)) _XFUNCPROTOBEGIN /* The following declarations are alphabetized. */ extern XClassHint *XAllocClassHint ( void ); extern XIconSize *XAllocIconSize ( void ); extern XSizeHints *XAllocSizeHints ( void ); extern XStandardColormap *XAllocStandardColormap ( void ); extern XWMHints *XAllocWMHints ( void ); extern int XClipBox( Region /* r */, XRectangle* /* rect_return */ ); extern Region XCreateRegion( void ); extern const char *XDefaultString (void); extern int XDeleteContext( Display* /* display */, XID /* rid */, XContext /* context */ ); extern int XDestroyRegion( Region /* r */ ); extern int XEmptyRegion( Region /* r */ ); extern int XEqualRegion( Region /* r1 */, Region /* r2 */ ); extern int XFindContext( Display* /* display */, XID /* rid */, XContext /* context */, XPointer* /* data_return */ ); extern Status XGetClassHint( Display* /* display */, Window /* w */, XClassHint* /* class_hints_return */ ); extern Status XGetIconSizes( Display* /* display */, Window /* w */, XIconSize** /* size_list_return */, int* /* count_return */ ); extern Status XGetNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */ ); extern Status XGetRGBColormaps( Display* /* display */, Window /* w */, XStandardColormap** /* stdcmap_return */, int* /* count_return */, Atom /* property */ ); extern Status XGetSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, Atom /* property */ ); extern Status XGetStandardColormap( Display* /* display */, Window /* w */, XStandardColormap* /* colormap_return */, Atom /* property */ ); extern Status XGetTextProperty( Display* /* display */, Window /* window */, XTextProperty* /* text_prop_return */, Atom /* property */ ); extern XVisualInfo *XGetVisualInfo( Display* /* display */, long /* vinfo_mask */, XVisualInfo* /* vinfo_template */, int* /* nitems_return */ ); extern Status XGetWMClientMachine( Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */ ); extern XWMHints *XGetWMHints( Display* /* display */, Window /* w */ ); extern Status XGetWMIconName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */ ); extern Status XGetWMName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop_return */ ); extern Status XGetWMNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, long* /* supplied_return */ ); extern Status XGetWMSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints_return */, long* /* supplied_return */, Atom /* property */ ); extern Status XGetZoomHints( Display* /* display */, Window /* w */, XSizeHints* /* zhints_return */ ); extern int XIntersectRegion( Region /* sra */, Region /* srb */, Region /* dr_return */ ); extern void XConvertCase( KeySym /* sym */, KeySym* /* lower */, KeySym* /* upper */ ); extern int XLookupString( XKeyEvent* /* event_struct */, char* /* buffer_return */, int /* bytes_buffer */, KeySym* /* keysym_return */, XComposeStatus* /* status_in_out */ ); extern Status XMatchVisualInfo( Display* /* display */, int /* screen */, int /* depth */, int /* class */, XVisualInfo* /* vinfo_return */ ); extern int XOffsetRegion( Region /* r */, int /* dx */, int /* dy */ ); extern Bool XPointInRegion( Region /* r */, int /* x */, int /* y */ ); extern Region XPolygonRegion( XPoint* /* points */, int /* n */, int /* fill_rule */ ); extern int XRectInRegion( Region /* r */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */ ); extern int XSaveContext( Display* /* display */, XID /* rid */, XContext /* context */, _Xconst char* /* data */ ); extern int XSetClassHint( Display* /* display */, Window /* w */, XClassHint* /* class_hints */ ); extern int XSetIconSizes( Display* /* display */, Window /* w */, XIconSize* /* size_list */, int /* count */ ); extern int XSetNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */ ); extern void XSetRGBColormaps( Display* /* display */, Window /* w */, XStandardColormap* /* stdcmaps */, int /* count */, Atom /* property */ ); extern int XSetSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */, Atom /* property */ ); extern int XSetStandardProperties( Display* /* display */, Window /* w */, _Xconst char* /* window_name */, _Xconst char* /* icon_name */, Pixmap /* icon_pixmap */, char** /* argv */, int /* argc */, XSizeHints* /* hints */ ); extern void XSetTextProperty( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */, Atom /* property */ ); extern void XSetWMClientMachine( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */ ); extern int XSetWMHints( Display* /* display */, Window /* w */, XWMHints* /* wm_hints */ ); extern void XSetWMIconName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */ ); extern void XSetWMName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */ ); extern void XSetWMNormalHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */ ); extern void XSetWMProperties( Display* /* display */, Window /* w */, XTextProperty* /* window_name */, XTextProperty* /* icon_name */, char** /* argv */, int /* argc */, XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */ ); extern void XmbSetWMProperties( Display* /* display */, Window /* w */, _Xconst char* /* window_name */, _Xconst char* /* icon_name */, char** /* argv */, int /* argc */, XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */ ); extern void Xutf8SetWMProperties( Display* /* display */, Window /* w */, _Xconst char* /* window_name */, _Xconst char* /* icon_name */, char** /* argv */, int /* argc */, XSizeHints* /* normal_hints */, XWMHints* /* wm_hints */, XClassHint* /* class_hints */ ); extern void XSetWMSizeHints( Display* /* display */, Window /* w */, XSizeHints* /* hints */, Atom /* property */ ); extern int XSetRegion( Display* /* display */, GC /* gc */, Region /* r */ ); extern void XSetStandardColormap( Display* /* display */, Window /* w */, XStandardColormap* /* colormap */, Atom /* property */ ); extern int XSetZoomHints( Display* /* display */, Window /* w */, XSizeHints* /* zhints */ ); extern int XShrinkRegion( Region /* r */, int /* dx */, int /* dy */ ); extern Status XStringListToTextProperty( char** /* list */, int /* count */, XTextProperty* /* text_prop_return */ ); extern int XSubtractRegion( Region /* sra */, Region /* srb */, Region /* dr_return */ ); extern int XmbTextListToTextProperty( Display* display, char** list, int count, XICCEncodingStyle style, XTextProperty* text_prop_return ); extern int XwcTextListToTextProperty( Display* display, wchar_t** list, int count, XICCEncodingStyle style, XTextProperty* text_prop_return ); extern int Xutf8TextListToTextProperty( Display* display, char** list, int count, XICCEncodingStyle style, XTextProperty* text_prop_return ); extern void XwcFreeStringList( wchar_t** list ); extern Status XTextPropertyToStringList( XTextProperty* /* text_prop */, char*** /* list_return */, int* /* count_return */ ); extern int XmbTextPropertyToTextList( Display* display, const XTextProperty* text_prop, char*** list_return, int* count_return ); extern int XwcTextPropertyToTextList( Display* display, const XTextProperty* text_prop, wchar_t*** list_return, int* count_return ); extern int Xutf8TextPropertyToTextList( Display* display, const XTextProperty* text_prop, char*** list_return, int* count_return ); extern int XUnionRectWithRegion( XRectangle* /* rectangle */, Region /* src_region */, Region /* dest_region_return */ ); extern int XUnionRegion( Region /* sra */, Region /* srb */, Region /* dr_return */ ); extern int XWMGeometry( Display* /* display */, int /* screen_number */, _Xconst char* /* user_geometry */, _Xconst char* /* default_geometry */, unsigned int /* border_width */, XSizeHints* /* hints */, int* /* x_return */, int* /* y_return */, int* /* width_return */, int* /* height_return */, int* /* gravity_return */ ); extern int XXorRegion( Region /* sra */, Region /* srb */, Region /* dr_return */ ); #ifdef __clang__ #pragma clang diagnostic pop #endif _XFUNCPROTOEND #endif /* _X11_XUTIL_H_ */ PKZJ X11/ImUtil.hnu[ #ifndef _X11_IMUTIL_H_ #define _X11_IMUTIL_H_ extern int _XGetScanlinePad( Display *dpy, int depth); extern int _XGetBitsPerPixel( Display *dpy, int depth); extern int _XSetImage( XImage *srcimg, register XImage *dstimg, register int x, register int y); extern int _XReverse_Bytes( register unsigned char *bpt, register int nb); extern void _XInitImageFuncPtrs( register XImage *image); #endif /* _X11_IMUTIL_H_ */ PKZx>ޢX11/Xlib-xcb.hnu[/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett * This file is licensed under the MIT license. See the file COPYING. */ #ifndef _X11_XLIB_XCB_H_ #define _X11_XLIB_XCB_H_ #include #include #include _XFUNCPROTOBEGIN xcb_connection_t *XGetXCBConnection(Display *dpy); enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue }; void XSetEventQueueOwner(Display *dpy, enum XEventQueueOwner owner); _XFUNCPROTOEND #endif /* _X11_XLIB_XCB_H_ */ PKZl4ї,5,5X11/XF86keysym.hnu[/* * XFree86 vendor specific keysyms. * * The XFree86 keysym range is 0x10080001 - 0x1008FFFF. * * X.Org will not be adding to the XF86 set of keysyms, though they have * been adopted and are considered a "standard" part of X keysym definitions. * XFree86 never properly commented these keysyms, so we have done our * best to explain the semantic meaning of these keys. * * XFree86 has removed their mail archives of the period, that might have * shed more light on some of these definitions. Until/unless we resurrect * these archives, these are from memory and usage. */ /* * ModeLock * * This one is old, and not really used any more since XKB offers this * functionality. */ #define XF86XK_ModeLock 0x1008FF01 /* Mode Switch Lock */ /* Backlight controls. */ #define XF86XK_MonBrightnessUp 0x1008FF02 /* Monitor/panel brightness */ #define XF86XK_MonBrightnessDown 0x1008FF03 /* Monitor/panel brightness */ #define XF86XK_KbdLightOnOff 0x1008FF04 /* Keyboards may be lit */ #define XF86XK_KbdBrightnessUp 0x1008FF05 /* Keyboards may be lit */ #define XF86XK_KbdBrightnessDown 0x1008FF06 /* Keyboards may be lit */ #define XF86XK_MonBrightnessCycle 0x1008FF07 /* Monitor/panel brightness */ /* * Keys found on some "Internet" keyboards. */ #define XF86XK_Standby 0x1008FF10 /* System into standby mode */ #define XF86XK_AudioLowerVolume 0x1008FF11 /* Volume control down */ #define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */ #define XF86XK_AudioRaiseVolume 0x1008FF13 /* Volume control up */ #define XF86XK_AudioPlay 0x1008FF14 /* Start playing of audio > */ #define XF86XK_AudioStop 0x1008FF15 /* Stop playing audio */ #define XF86XK_AudioPrev 0x1008FF16 /* Previous track */ #define XF86XK_AudioNext 0x1008FF17 /* Next track */ #define XF86XK_HomePage 0x1008FF18 /* Display user's home page */ #define XF86XK_Mail 0x1008FF19 /* Invoke user's mail program */ #define XF86XK_Start 0x1008FF1A /* Start application */ #define XF86XK_Search 0x1008FF1B /* Search */ #define XF86XK_AudioRecord 0x1008FF1C /* Record audio application */ /* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */ #define XF86XK_Calculator 0x1008FF1D /* Invoke calculator program */ #define XF86XK_Memo 0x1008FF1E /* Invoke Memo taking program */ #define XF86XK_ToDoList 0x1008FF1F /* Invoke To Do List program */ #define XF86XK_Calendar 0x1008FF20 /* Invoke Calendar program */ #define XF86XK_PowerDown 0x1008FF21 /* Deep sleep the system */ #define XF86XK_ContrastAdjust 0x1008FF22 /* Adjust screen contrast */ #define XF86XK_RockerUp 0x1008FF23 /* Rocker switches exist up */ #define XF86XK_RockerDown 0x1008FF24 /* and down */ #define XF86XK_RockerEnter 0x1008FF25 /* and let you press them */ /* Some more "Internet" keyboard symbols */ #define XF86XK_Back 0x1008FF26 /* Like back on a browser */ #define XF86XK_Forward 0x1008FF27 /* Like forward on a browser */ #define XF86XK_Stop 0x1008FF28 /* Stop current operation */ #define XF86XK_Refresh 0x1008FF29 /* Refresh the page */ #define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */ #define XF86XK_WakeUp 0x1008FF2B /* Wake up system from sleep */ #define XF86XK_Eject 0x1008FF2C /* Eject device (e.g. DVD) */ #define XF86XK_ScreenSaver 0x1008FF2D /* Invoke screensaver */ #define XF86XK_WWW 0x1008FF2E /* Invoke web browser */ #define XF86XK_Sleep 0x1008FF2F /* Put system to sleep */ #define XF86XK_Favorites 0x1008FF30 /* Show favorite locations */ #define XF86XK_AudioPause 0x1008FF31 /* Pause audio playing */ #define XF86XK_AudioMedia 0x1008FF32 /* Launch media collection app */ #define XF86XK_MyComputer 0x1008FF33 /* Display "My Computer" window */ #define XF86XK_VendorHome 0x1008FF34 /* Display vendor home web site */ #define XF86XK_LightBulb 0x1008FF35 /* Light bulb keys exist */ #define XF86XK_Shop 0x1008FF36 /* Display shopping web site */ #define XF86XK_History 0x1008FF37 /* Show history of web surfing */ #define XF86XK_OpenURL 0x1008FF38 /* Open selected URL */ #define XF86XK_AddFavorite 0x1008FF39 /* Add URL to favorites list */ #define XF86XK_HotLinks 0x1008FF3A /* Show "hot" links */ #define XF86XK_BrightnessAdjust 0x1008FF3B /* Invoke brightness adj. UI */ #define XF86XK_Finance 0x1008FF3C /* Display financial site */ #define XF86XK_Community 0x1008FF3D /* Display user's community */ #define XF86XK_AudioRewind 0x1008FF3E /* "rewind" audio track */ #define XF86XK_BackForward 0x1008FF3F /* ??? */ #define XF86XK_Launch0 0x1008FF40 /* Launch Application */ #define XF86XK_Launch1 0x1008FF41 /* Launch Application */ #define XF86XK_Launch2 0x1008FF42 /* Launch Application */ #define XF86XK_Launch3 0x1008FF43 /* Launch Application */ #define XF86XK_Launch4 0x1008FF44 /* Launch Application */ #define XF86XK_Launch5 0x1008FF45 /* Launch Application */ #define XF86XK_Launch6 0x1008FF46 /* Launch Application */ #define XF86XK_Launch7 0x1008FF47 /* Launch Application */ #define XF86XK_Launch8 0x1008FF48 /* Launch Application */ #define XF86XK_Launch9 0x1008FF49 /* Launch Application */ #define XF86XK_LaunchA 0x1008FF4A /* Launch Application */ #define XF86XK_LaunchB 0x1008FF4B /* Launch Application */ #define XF86XK_LaunchC 0x1008FF4C /* Launch Application */ #define XF86XK_LaunchD 0x1008FF4D /* Launch Application */ #define XF86XK_LaunchE 0x1008FF4E /* Launch Application */ #define XF86XK_LaunchF 0x1008FF4F /* Launch Application */ #define XF86XK_ApplicationLeft 0x1008FF50 /* switch to application, left */ #define XF86XK_ApplicationRight 0x1008FF51 /* switch to application, right*/ #define XF86XK_Book 0x1008FF52 /* Launch bookreader */ #define XF86XK_CD 0x1008FF53 /* Launch CD/DVD player */ #define XF86XK_Calculater 0x1008FF54 /* Launch Calculater */ #define XF86XK_Clear 0x1008FF55 /* Clear window, screen */ #define XF86XK_Close 0x1008FF56 /* Close window */ #define XF86XK_Copy 0x1008FF57 /* Copy selection */ #define XF86XK_Cut 0x1008FF58 /* Cut selection */ #define XF86XK_Display 0x1008FF59 /* Output switch key */ #define XF86XK_DOS 0x1008FF5A /* Launch DOS (emulation) */ #define XF86XK_Documents 0x1008FF5B /* Open documents window */ #define XF86XK_Excel 0x1008FF5C /* Launch spread sheet */ #define XF86XK_Explorer 0x1008FF5D /* Launch file explorer */ #define XF86XK_Game 0x1008FF5E /* Launch game */ #define XF86XK_Go 0x1008FF5F /* Go to URL */ #define XF86XK_iTouch 0x1008FF60 /* Logitech iTouch- don't use */ #define XF86XK_LogOff 0x1008FF61 /* Log off system */ #define XF86XK_Market 0x1008FF62 /* ?? */ #define XF86XK_Meeting 0x1008FF63 /* enter meeting in calendar */ #define XF86XK_MenuKB 0x1008FF65 /* distinguish keyboard from PB */ #define XF86XK_MenuPB 0x1008FF66 /* distinguish PB from keyboard */ #define XF86XK_MySites 0x1008FF67 /* Favourites */ #define XF86XK_New 0x1008FF68 /* New (folder, document... */ #define XF86XK_News 0x1008FF69 /* News */ #define XF86XK_OfficeHome 0x1008FF6A /* Office home (old Staroffice)*/ #define XF86XK_Open 0x1008FF6B /* Open */ #define XF86XK_Option 0x1008FF6C /* ?? */ #define XF86XK_Paste 0x1008FF6D /* Paste */ #define XF86XK_Phone 0x1008FF6E /* Launch phone; dial number */ #define XF86XK_Q 0x1008FF70 /* Compaq's Q - don't use */ #define XF86XK_Reply 0x1008FF72 /* Reply e.g., mail */ #define XF86XK_Reload 0x1008FF73 /* Reload web page, file, etc. */ #define XF86XK_RotateWindows 0x1008FF74 /* Rotate windows e.g. xrandr */ #define XF86XK_RotationPB 0x1008FF75 /* don't use */ #define XF86XK_RotationKB 0x1008FF76 /* don't use */ #define XF86XK_Save 0x1008FF77 /* Save (file, document, state */ #define XF86XK_ScrollUp 0x1008FF78 /* Scroll window/contents up */ #define XF86XK_ScrollDown 0x1008FF79 /* Scrool window/contentd down */ #define XF86XK_ScrollClick 0x1008FF7A /* Use XKB mousekeys instead */ #define XF86XK_Send 0x1008FF7B /* Send mail, file, object */ #define XF86XK_Spell 0x1008FF7C /* Spell checker */ #define XF86XK_SplitScreen 0x1008FF7D /* Split window or screen */ #define XF86XK_Support 0x1008FF7E /* Get support (??) */ #define XF86XK_TaskPane 0x1008FF7F /* Show tasks */ #define XF86XK_Terminal 0x1008FF80 /* Launch terminal emulator */ #define XF86XK_Tools 0x1008FF81 /* toolbox of desktop/app. */ #define XF86XK_Travel 0x1008FF82 /* ?? */ #define XF86XK_UserPB 0x1008FF84 /* ?? */ #define XF86XK_User1KB 0x1008FF85 /* ?? */ #define XF86XK_User2KB 0x1008FF86 /* ?? */ #define XF86XK_Video 0x1008FF87 /* Launch video player */ #define XF86XK_WheelButton 0x1008FF88 /* button from a mouse wheel */ #define XF86XK_Word 0x1008FF89 /* Launch word processor */ #define XF86XK_Xfer 0x1008FF8A #define XF86XK_ZoomIn 0x1008FF8B /* zoom in view, map, etc. */ #define XF86XK_ZoomOut 0x1008FF8C /* zoom out view, map, etc. */ #define XF86XK_Away 0x1008FF8D /* mark yourself as away */ #define XF86XK_Messenger 0x1008FF8E /* as in instant messaging */ #define XF86XK_WebCam 0x1008FF8F /* Launch web camera app. */ #define XF86XK_MailForward 0x1008FF90 /* Forward in mail */ #define XF86XK_Pictures 0x1008FF91 /* Show pictures */ #define XF86XK_Music 0x1008FF92 /* Launch music application */ #define XF86XK_Battery 0x1008FF93 /* Display battery information */ #define XF86XK_Bluetooth 0x1008FF94 /* Enable/disable Bluetooth */ #define XF86XK_WLAN 0x1008FF95 /* Enable/disable WLAN */ #define XF86XK_UWB 0x1008FF96 /* Enable/disable UWB */ #define XF86XK_AudioForward 0x1008FF97 /* fast-forward audio track */ #define XF86XK_AudioRepeat 0x1008FF98 /* toggle repeat mode */ #define XF86XK_AudioRandomPlay 0x1008FF99 /* toggle shuffle mode */ #define XF86XK_Subtitle 0x1008FF9A /* cycle through subtitle */ #define XF86XK_AudioCycleTrack 0x1008FF9B /* cycle through audio tracks */ #define XF86XK_CycleAngle 0x1008FF9C /* cycle through angles */ #define XF86XK_FrameBack 0x1008FF9D /* video: go one frame back */ #define XF86XK_FrameForward 0x1008FF9E /* video: go one frame forward */ #define XF86XK_Time 0x1008FF9F /* display, or shows an entry for time seeking */ #define XF86XK_Select 0x1008FFA0 /* Select button on joypads and remotes */ #define XF86XK_View 0x1008FFA1 /* Show a view options/properties */ #define XF86XK_TopMenu 0x1008FFA2 /* Go to a top-level menu in a video */ #define XF86XK_Red 0x1008FFA3 /* Red button */ #define XF86XK_Green 0x1008FFA4 /* Green button */ #define XF86XK_Yellow 0x1008FFA5 /* Yellow button */ #define XF86XK_Blue 0x1008FFA6 /* Blue button */ #define XF86XK_Suspend 0x1008FFA7 /* Sleep to RAM */ #define XF86XK_Hibernate 0x1008FFA8 /* Sleep to disk */ #define XF86XK_TouchpadToggle 0x1008FFA9 /* Toggle between touchpad/trackstick */ #define XF86XK_TouchpadOn 0x1008FFB0 /* The touchpad got switched on */ #define XF86XK_TouchpadOff 0x1008FFB1 /* The touchpad got switched off */ #define XF86XK_AudioMicMute 0x1008FFB2 /* Mute the Mic from the system */ #define XF86XK_Keyboard 0x1008FFB3 /* User defined keyboard related action */ #define XF86XK_WWAN 0x1008FFB4 /* Toggle WWAN (LTE, UMTS, etc.) radio */ #define XF86XK_RFKill 0x1008FFB5 /* Toggle radios on/off */ #define XF86XK_AudioPreset 0x1008FFB6 /* Select equalizer preset, e.g. theatre-mode */ #define XF86XK_RotationLockToggle 0x1008FFB7 /* Toggle screen rotation lock on/off */ #define XF86XK_FullScreen 0x1008FFB8 /* Toggle fullscreen */ /* Keys for special action keys (hot keys) */ /* Virtual terminals on some operating systems */ #define XF86XK_Switch_VT_1 0x1008FE01 #define XF86XK_Switch_VT_2 0x1008FE02 #define XF86XK_Switch_VT_3 0x1008FE03 #define XF86XK_Switch_VT_4 0x1008FE04 #define XF86XK_Switch_VT_5 0x1008FE05 #define XF86XK_Switch_VT_6 0x1008FE06 #define XF86XK_Switch_VT_7 0x1008FE07 #define XF86XK_Switch_VT_8 0x1008FE08 #define XF86XK_Switch_VT_9 0x1008FE09 #define XF86XK_Switch_VT_10 0x1008FE0A #define XF86XK_Switch_VT_11 0x1008FE0B #define XF86XK_Switch_VT_12 0x1008FE0C #define XF86XK_Ungrab 0x1008FE20 /* force ungrab */ #define XF86XK_ClearGrab 0x1008FE21 /* kill application with grab */ #define XF86XK_Next_VMode 0x1008FE22 /* next video mode available */ #define XF86XK_Prev_VMode 0x1008FE23 /* prev. video mode available */ #define XF86XK_LogWindowTree 0x1008FE24 /* print window tree to log */ #define XF86XK_LogGrabInfo 0x1008FE25 /* print all active grabs to log */ PKZeU?U? X11/xpm.hnu[/* * Copyright (C) 1989-95 GROUPE BULL * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of GROUPE BULL shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from GROUPE BULL. */ /*****************************************************************************\ * xpm.h: * * * * XPM library * * Include file * * * * Developed by Arnaud Le Hors * \*****************************************************************************/ /* * The code related to FOR_MSW has been added by * HeDu (hedu@cul-ipn.uni-kiel.de) 4/94 */ /* * The code related to AMIGA has been added by * Lorens Younes (d93-hyo@nada.kth.se) 4/96 */ #ifndef XPM_h #define XPM_h /* * first some identification numbers: * the version and revision numbers are determined with the following rule: * SO Major number = LIB minor version number. * SO Minor number = LIB sub-minor version number. * e.g: Xpm version 3.2f * we forget the 3 which is the format number, 2 gives 2, and f gives 6. * thus we have XpmVersion = 2 and XpmRevision = 6 * which gives SOXPMLIBREV = 2.6 * * Then the XpmIncludeVersion number is built from these numbers. */ #define XpmFormat 3 #define XpmVersion 4 #define XpmRevision 11 #define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision) #ifndef XPM_NUMBERS #ifdef FOR_MSW # define SYSV /* uses memcpy string.h etc. */ # include # include "simx.h" /* defines some X stuff using MSW types */ #define NEED_STRCASECMP /* at least for MSVC++ */ #else /* FOR_MSW */ # ifdef AMIGA # include "amigax.h" # else /* not AMIGA */ # include # include # endif /* not AMIGA */ #endif /* FOR_MSW */ /* let's define Pixel if it is not done yet */ #if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED) typedef unsigned long Pixel; /* Index into colormap */ # define PIXEL_ALREADY_TYPEDEFED #endif /* Return ErrorStatus codes: * null if full success * positive if partial success * negative if failure */ #define XpmColorError 1 #define XpmSuccess 0 #define XpmOpenFailed -1 #define XpmFileInvalid -2 #define XpmNoMemory -3 #define XpmColorFailed -4 typedef struct { char *name; /* Symbolic color name */ char *value; /* Color value */ Pixel pixel; /* Color pixel */ } XpmColorSymbol; typedef struct { char *name; /* name of the extension */ unsigned int nlines; /* number of lines in this extension */ char **lines; /* pointer to the extension array of strings */ } XpmExtension; typedef struct { char *string; /* characters string */ char *symbolic; /* symbolic name */ char *m_color; /* monochrom default */ char *g4_color; /* 4 level grayscale default */ char *g_color; /* other level grayscale default */ char *c_color; /* color default */ } XpmColor; typedef struct { unsigned int width; /* image width */ unsigned int height; /* image height */ unsigned int cpp; /* number of characters per pixel */ unsigned int ncolors; /* number of colors */ XpmColor *colorTable; /* list of related colors */ unsigned int *data; /* image data */ } XpmImage; typedef struct { unsigned long valuemask; /* Specifies which attributes are defined */ char *hints_cmt; /* Comment of the hints section */ char *colors_cmt; /* Comment of the colors section */ char *pixels_cmt; /* Comment of the pixels section */ unsigned int x_hotspot; /* Returns the x hotspot's coordinate */ unsigned int y_hotspot; /* Returns the y hotspot's coordinate */ unsigned int nextensions; /* number of extensions */ XpmExtension *extensions; /* pointer to array of extensions */ } XpmInfo; typedef int (*XpmAllocColorFunc)( Display* /* display */, Colormap /* colormap */, char* /* colorname */, XColor* /* xcolor */, void* /* closure */ ); typedef int (*XpmFreeColorsFunc)( Display* /* display */, Colormap /* colormap */, Pixel* /* pixels */, int /* npixels */, void* /* closure */ ); typedef struct { unsigned long valuemask; /* Specifies which attributes are defined */ Visual *visual; /* Specifies the visual to use */ Colormap colormap; /* Specifies the colormap to use */ unsigned int depth; /* Specifies the depth */ unsigned int width; /* Returns the width of the created pixmap */ unsigned int height; /* Returns the height of the created pixmap */ unsigned int x_hotspot; /* Returns the x hotspot's coordinate */ unsigned int y_hotspot; /* Returns the y hotspot's coordinate */ unsigned int cpp; /* Specifies the number of char per pixel */ Pixel *pixels; /* List of used color pixels */ unsigned int npixels; /* Number of used pixels */ XpmColorSymbol *colorsymbols; /* List of color symbols to override */ unsigned int numsymbols; /* Number of symbols */ char *rgb_fname; /* RGB text file name */ unsigned int nextensions; /* Number of extensions */ XpmExtension *extensions; /* List of extensions */ unsigned int ncolors; /* Number of colors */ XpmColor *colorTable; /* List of colors */ /* 3.2 backward compatibility code */ char *hints_cmt; /* Comment of the hints section */ char *colors_cmt; /* Comment of the colors section */ char *pixels_cmt; /* Comment of the pixels section */ /* end 3.2 bc */ unsigned int mask_pixel; /* Color table index of transparent color */ /* Color Allocation Directives */ Bool exactColors; /* Only use exact colors for visual */ unsigned int closeness; /* Allowable RGB deviation */ unsigned int red_closeness; /* Allowable red deviation */ unsigned int green_closeness; /* Allowable green deviation */ unsigned int blue_closeness; /* Allowable blue deviation */ int color_key; /* Use colors from this color set */ Pixel *alloc_pixels; /* Returns the list of alloc'ed color pixels */ int nalloc_pixels; /* Returns the number of alloc'ed color pixels */ Bool alloc_close_colors; /* Specify whether close colors should be allocated using XAllocColor or not */ int bitmap_format; /* Specify the format of 1bit depth images: ZPixmap or XYBitmap */ /* Color functions */ XpmAllocColorFunc alloc_color; /* Application color allocator */ XpmFreeColorsFunc free_colors; /* Application color de-allocator */ void *color_closure; /* Application private data to pass to alloc_color and free_colors */ } XpmAttributes; /* XpmAttributes value masks bits */ #define XpmVisual (1L<<0) #define XpmColormap (1L<<1) #define XpmDepth (1L<<2) #define XpmSize (1L<<3) /* width & height */ #define XpmHotspot (1L<<4) /* x_hotspot & y_hotspot */ #define XpmCharsPerPixel (1L<<5) #define XpmColorSymbols (1L<<6) #define XpmRgbFilename (1L<<7) /* 3.2 backward compatibility code */ #define XpmInfos (1L<<8) #define XpmReturnInfos XpmInfos /* end 3.2 bc */ #define XpmReturnPixels (1L<<9) #define XpmExtensions (1L<<10) #define XpmReturnExtensions XpmExtensions #define XpmExactColors (1L<<11) #define XpmCloseness (1L<<12) #define XpmRGBCloseness (1L<<13) #define XpmColorKey (1L<<14) #define XpmColorTable (1L<<15) #define XpmReturnColorTable XpmColorTable #define XpmReturnAllocPixels (1L<<16) #define XpmAllocCloseColors (1L<<17) #define XpmBitmapFormat (1L<<18) #define XpmAllocColor (1L<<19) #define XpmFreeColors (1L<<20) #define XpmColorClosure (1L<<21) /* XpmInfo value masks bits */ #define XpmComments XpmInfos #define XpmReturnComments XpmComments /* XpmAttributes mask_pixel value when there is no mask */ #ifndef FOR_MSW #define XpmUndefPixel 0x80000000 #else /* int is only 16 bit for MSW */ #define XpmUndefPixel 0x8000 #endif /* * color keys for visual type, they must fit along with the number key of * each related element in xpmColorKeys[] defined in XpmI.h */ #define XPM_MONO 2 #define XPM_GREY4 3 #define XPM_GRAY4 3 #define XPM_GREY 4 #define XPM_GRAY 4 #define XPM_COLOR 5 /* macros for forward declarations of functions with prototypes */ #define FUNC(f, t, p) extern t f p #define LFUNC(f, t, p) static t f p /* * functions declarations */ _XFUNCPROTOBEGIN /* FOR_MSW, all ..Pixmap.. are excluded, only the ..XImage.. are used */ /* Same for Amiga! */ #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreatePixmapFromData, int, (Display *display, Drawable d, char **data, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); FUNC(XpmCreateDataFromPixmap, int, (Display *display, char ***data_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)); FUNC(XpmReadFileToPixmap, int, (Display *display, Drawable d, const char *filename, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); FUNC(XpmWriteFileFromPixmap, int, (Display *display, const char *filename, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)); #endif FUNC(XpmCreateImageFromData, int, (Display *display, char **data, XImage **image_return, XImage **shapemask_return, XpmAttributes *attributes)); FUNC(XpmCreateDataFromImage, int, (Display *display, char ***data_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes)); FUNC(XpmReadFileToImage, int, (Display *display, const char *filename, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes)); FUNC(XpmWriteFileFromImage, int, (Display *display, const char *filename, XImage *image, XImage *shapeimage, XpmAttributes *attributes)); FUNC(XpmCreateImageFromBuffer, int, (Display *display, char *buffer, XImage **image_return, XImage **shapemask_return, XpmAttributes *attributes)); #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreatePixmapFromBuffer, int, (Display *display, Drawable d, char *buffer, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); FUNC(XpmCreateBufferFromImage, int, (Display *display, char **buffer_return, XImage *image, XImage *shapeimage, XpmAttributes *attributes)); FUNC(XpmCreateBufferFromPixmap, int, (Display *display, char **buffer_return, Pixmap pixmap, Pixmap shapemask, XpmAttributes *attributes)); #endif FUNC(XpmReadFileToBuffer, int, (const char *filename, char **buffer_return)); FUNC(XpmWriteFileFromBuffer, int, (const char *filename, char *buffer)); FUNC(XpmReadFileToData, int, (const char *filename, char ***data_return)); FUNC(XpmWriteFileFromData, int, (const char *filename, char **data)); FUNC(XpmAttributesSize, int, (void)); FUNC(XpmFreeAttributes, void, (XpmAttributes *attributes)); FUNC(XpmFreeExtensions, void, (XpmExtension *extensions, int nextensions)); FUNC(XpmFreeXpmImage, void, (XpmImage *image)); FUNC(XpmFreeXpmInfo, void, (XpmInfo *info)); FUNC(XpmGetErrorString, char *, (int errcode)); FUNC(XpmLibraryVersion, int, (void)); /* XpmImage functions */ FUNC(XpmReadFileToXpmImage, int, (const char *filename, XpmImage *image, XpmInfo *info)); FUNC(XpmWriteFileFromXpmImage, int, (const char *filename, XpmImage *image, XpmInfo *info)); #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreatePixmapFromXpmImage, int, (Display *display, Drawable d, XpmImage *image, Pixmap *pixmap_return, Pixmap *shapemask_return, XpmAttributes *attributes)); #endif FUNC(XpmCreateImageFromXpmImage, int, (Display *display, XpmImage *image, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes)); FUNC(XpmCreateXpmImageFromImage, int, (Display *display, XImage *image, XImage *shapeimage, XpmImage *xpmimage, XpmAttributes *attributes)); #if !defined(FOR_MSW) && !defined(AMIGA) FUNC(XpmCreateXpmImageFromPixmap, int, (Display *display, Pixmap pixmap, Pixmap shapemask, XpmImage *xpmimage, XpmAttributes *attributes)); #endif FUNC(XpmCreateDataFromXpmImage, int, (char ***data_return, XpmImage *image, XpmInfo *info)); FUNC(XpmCreateXpmImageFromData, int, (char **data, XpmImage *image, XpmInfo *info)); FUNC(XpmCreateXpmImageFromBuffer, int, (char *buffer, XpmImage *image, XpmInfo *info)); FUNC(XpmCreateBufferFromXpmImage, int, (char **buffer_return, XpmImage *image, XpmInfo *info)); FUNC(XpmGetParseError, int, (char *filename, int *linenum_return, int *charnum_return)); FUNC(XpmFree, void, (void *ptr)); _XFUNCPROTOEND /* backward compatibility */ /* for version 3.0c */ #define XpmPixmapColorError XpmColorError #define XpmPixmapSuccess XpmSuccess #define XpmPixmapOpenFailed XpmOpenFailed #define XpmPixmapFileInvalid XpmFileInvalid #define XpmPixmapNoMemory XpmNoMemory #define XpmPixmapColorFailed XpmColorFailed #define XpmReadPixmapFile(dpy, d, file, pix, mask, att) \ XpmReadFileToPixmap(dpy, d, file, pix, mask, att) #define XpmWritePixmapFile(dpy, file, pix, mask, att) \ XpmWriteFileFromPixmap(dpy, file, pix, mask, att) /* for version 3.0b */ #define PixmapColorError XpmColorError #define PixmapSuccess XpmSuccess #define PixmapOpenFailed XpmOpenFailed #define PixmapFileInvalid XpmFileInvalid #define PixmapNoMemory XpmNoMemory #define PixmapColorFailed XpmColorFailed #define ColorSymbol XpmColorSymbol #define XReadPixmapFile(dpy, d, file, pix, mask, att) \ XpmReadFileToPixmap(dpy, d, file, pix, mask, att) #define XWritePixmapFile(dpy, file, pix, mask, att) \ XpmWriteFileFromPixmap(dpy, file, pix, mask, att) #define XCreatePixmapFromData(dpy, d, data, pix, mask, att) \ XpmCreatePixmapFromData(dpy, d, data, pix, mask, att) #define XCreateDataFromPixmap(dpy, data, pix, mask, att) \ XpmCreateDataFromPixmap(dpy, data, pix, mask, att) #endif /* XPM_NUMBERS */ #endif PKZ9w== X11/Xregion.hnu[/************************************************************************ Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ #ifndef _X11_XREGION_H_ #define _X11_XREGION_H_ typedef struct { short x1, x2, y1, y2; } Box, BOX, BoxRec, *BoxPtr; typedef struct { short x, y, width, height; }RECTANGLE, RectangleRec, *RectanglePtr; #define TRUE 1 #define FALSE 0 #define MAXSHORT 32767 #define MINSHORT -MAXSHORT #ifndef MAX #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif #ifndef MIN #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif /* * clip region */ typedef struct _XRegion { long size; long numRects; BOX *rects; BOX extents; } REGION; /* Xutil.h contains the declaration: * typedef struct _XRegion *Region; */ /* 1 if two BOXs overlap. * 0 if two BOXs do not overlap. * Remember, x2 and y2 are not in the region */ #define EXTENTCHECK(r1, r2) \ ((r1)->x2 > (r2)->x1 && \ (r1)->x1 < (r2)->x2 && \ (r1)->y2 > (r2)->y1 && \ (r1)->y1 < (r2)->y2) /* * update region extents */ #define EXTENTS(r,idRect){\ if((r)->x1 < (idRect)->extents.x1)\ (idRect)->extents.x1 = (r)->x1;\ if((r)->y1 < (idRect)->extents.y1)\ (idRect)->extents.y1 = (r)->y1;\ if((r)->x2 > (idRect)->extents.x2)\ (idRect)->extents.x2 = (r)->x2;\ if((r)->y2 > (idRect)->extents.y2)\ (idRect)->extents.y2 = (r)->y2;\ } /* * Check to see if there is enough memory in the present region. */ #define MEMCHECK(reg, rect, firstrect){\ if ((reg)->numRects >= ((reg)->size - 1)){\ BoxPtr tmpRect = Xrealloc ((firstrect), \ (2 * (sizeof(BOX)) * ((reg)->size))); \ if (tmpRect == NULL) \ return(0);\ (firstrect) = tmpRect; \ (reg)->size *= 2;\ (rect) = &(firstrect)[(reg)->numRects];\ }\ } /* this routine checks to see if the previous rectangle is the same * or subsumes the new rectangle to add. */ #define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)\ (!(((Reg)->numRects > 0)&&\ ((R-1)->y1 == (Ry1)) &&\ ((R-1)->y2 == (Ry2)) &&\ ((R-1)->x1 <= (Rx1)) &&\ ((R-1)->x2 >= (Rx2)))) /* add a rectangle to the given Region */ #define ADDRECT(reg, r, rx1, ry1, rx2, ry2){\ if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\ CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\ (r)->x1 = (rx1);\ (r)->y1 = (ry1);\ (r)->x2 = (rx2);\ (r)->y2 = (ry2);\ EXTENTS((r), (reg));\ (reg)->numRects++;\ (r)++;\ }\ } /* add a rectangle to the given Region */ #define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2){\ if ((rx1 < rx2) && (ry1 < ry2) &&\ CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\ (r)->x1 = (rx1);\ (r)->y1 = (ry1);\ (r)->x2 = (rx2);\ (r)->y2 = (ry2);\ (reg)->numRects++;\ (r)++;\ }\ } #define EMPTY_REGION(pReg) pReg->numRects = 0 #define REGION_NOT_EMPTY(pReg) pReg->numRects #define INBOX(r, x, y) \ ( ( ((r).x2 > x)) && \ ( ((r).x1 <= x)) && \ ( ((r).y2 > y)) && \ ( ((r).y1 <= y)) ) /* * number of points to buffer before sending them off * to scanlines() : Must be an even number */ #define NUMPTSTOBUFFER 200 /* * used to allocate buffers for points and link * the buffers together */ typedef struct _POINTBLOCK { XPoint pts[NUMPTSTOBUFFER]; struct _POINTBLOCK *next; } POINTBLOCK; #endif /* _X11_XREGION_H_ */ PKZ&Pw   X11/XWDFile.hnu[/* Copyright 1985, 1986, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * XWDFile.h MIT Project Athena, X Window system window raster * image dumper, dump file format header file. * * Author: Tony Della Fera, DEC * 27-Jun-85 * * Modifier: William F. Wyatt, SAO * 18-Nov-86 - version 6 for saving/restoring color maps */ #ifndef XWDFILE_H #define XWDFILE_H #include #define XWD_FILE_VERSION 7 #define sz_XWDheader 100 #define sz_XWDColor 12 typedef CARD32 xwdval; /* for old broken programs */ /* Values in the file are most significant byte first. */ typedef struct _xwd_file_header { /* header_size = SIZEOF(XWDheader) + length of null-terminated * window name. */ CARD32 header_size; CARD32 file_version; /* = XWD_FILE_VERSION above */ CARD32 pixmap_format; /* ZPixmap or XYPixmap */ CARD32 pixmap_depth; /* Pixmap depth */ CARD32 pixmap_width; /* Pixmap width */ CARD32 pixmap_height; /* Pixmap height */ CARD32 xoffset; /* Bitmap x offset, normally 0 */ CARD32 byte_order; /* of image data: MSBFirst, LSBFirst */ /* bitmap_unit applies to bitmaps (depth 1 format XY) only. * It is the number of bits that each scanline is padded to. */ CARD32 bitmap_unit; CARD32 bitmap_bit_order; /* bitmaps only: MSBFirst, LSBFirst */ /* bitmap_pad applies to pixmaps (non-bitmaps) only. * It is the number of bits that each scanline is padded to. */ CARD32 bitmap_pad; CARD32 bits_per_pixel; /* Bits per pixel */ /* bytes_per_line is pixmap_width padded to bitmap_unit (bitmaps) * or bitmap_pad (pixmaps). It is the delta (in bytes) to get * to the same x position on an adjacent row. */ CARD32 bytes_per_line; CARD32 visual_class; /* Class of colormap */ CARD32 red_mask; /* Z red mask */ CARD32 green_mask; /* Z green mask */ CARD32 blue_mask; /* Z blue mask */ CARD32 bits_per_rgb; /* Log2 of distinct color values */ CARD32 colormap_entries; /* Number of entries in colormap; not used? */ CARD32 ncolors; /* Number of XWDColor structures */ CARD32 window_width; /* Window width */ CARD32 window_height; /* Window height */ CARD32 window_x; /* Window upper left X coordinate */ CARD32 window_y; /* Window upper left Y coordinate */ CARD32 window_bdrwidth; /* Window border width */ } XWDFileHeader; /* Null-terminated window name follows the above structure. */ /* Next comes XWDColor structures, at offset XWDFileHeader.header_size in * the file. XWDFileHeader.ncolors tells how many XWDColor structures * there are. */ typedef struct { CARD32 pixel; CARD16 red; CARD16 green; CARD16 blue; CARD8 flags; CARD8 pad; } XWDColor; /* Last comes the image data in the format described by XWDFileHeader. */ #endif /* XWDFILE_H */ PKZvS X11/Xmd.hnu[/*********************************************************** Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef XMD_H # define XMD_H 1 /* * Xmd.h: MACHINE DEPENDENT DECLARATIONS. */ /* * Special per-machine configuration flags. */ # if defined(__sun) && defined(__SVR4) # include /* Solaris: defines _LP64 if necessary */ # endif # if defined (_LP64) || defined(__LP64__) || \ defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ defined(__s390x__) || \ defined(__amd64__) || defined(amd64) || \ defined(__powerpc64__) # if !defined(__ILP32__) /* amd64-x32 is 32bit */ # define LONG64 /* 32/64-bit architecture */ # endif /* !__ILP32__ */ # endif /* * Definition of macro used to set constants for size of network structures; * machines with preprocessors that can't handle all of the sz_ symbols * can define this macro to be sizeof(x) if and only if their compiler doesn't * pad out structures (esp. the xTextElt structure which contains only two * one-byte fields). Network structures should always define sz_symbols. * * The sz_ prefix is used instead of something more descriptive so that the * symbols are no more than 32 characters long (which causes problems for some * compilers and preprocessors). * * The extra indirection is to get macro arguments to expand correctly before * the concatenation, rather than afterward. */ # define _SIZEOF(x) sz_##x # define SIZEOF(x) _SIZEOF(x) /* * Bitfield suffixes for the protocol structure elements, if you * need them. Note that bitfields are not guaranteed to be signed * (or even unsigned) according to ANSI C. */ # define B32 /* bitfield not needed on architectures with native 32-bit type */ # define B16 /* bitfield not needed on architectures with native 16-bit type */ # ifdef LONG64 typedef long INT64; typedef int INT32; # else typedef long INT32; # endif typedef short INT16; typedef signed char INT8; # ifdef LONG64 typedef unsigned long CARD64; typedef unsigned int CARD32; # else typedef unsigned long long CARD64; typedef unsigned long CARD32; # endif typedef unsigned short CARD16; typedef unsigned char CARD8; typedef CARD32 BITS32; typedef CARD16 BITS16; typedef CARD8 BYTE; typedef CARD8 BOOL; /* * was definitions for sign-extending bitfields on architectures without * native types smaller than 64-bit, now just backwards compatibility */ # define cvtINT8toInt(val) (val) # define cvtINT16toInt(val) (val) # define cvtINT32toInt(val) (val) # define cvtINT8toShort(val) (val) # define cvtINT16toShort(val) (val) # define cvtINT32toShort(val) (val) # define cvtINT8toLong(val) (val) # define cvtINT16toLong(val) (val) # define cvtINT32toLong(val) (val) /* * this version should leave result of type (t *), but that should only be * used when not in MUSTCOPY */ # define NEXTPTR(p,t) (((t *)(p)) + 1) #endif /* XMD_H */ PKZA. . X11/cursorfont.hnu[/* Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _X11_CURSORFONT_H_ #define _X11_CURSORFONT_H_ #define XC_num_glyphs 154 #define XC_X_cursor 0 #define XC_arrow 2 #define XC_based_arrow_down 4 #define XC_based_arrow_up 6 #define XC_boat 8 #define XC_bogosity 10 #define XC_bottom_left_corner 12 #define XC_bottom_right_corner 14 #define XC_bottom_side 16 #define XC_bottom_tee 18 #define XC_box_spiral 20 #define XC_center_ptr 22 #define XC_circle 24 #define XC_clock 26 #define XC_coffee_mug 28 #define XC_cross 30 #define XC_cross_reverse 32 #define XC_crosshair 34 #define XC_diamond_cross 36 #define XC_dot 38 #define XC_dotbox 40 #define XC_double_arrow 42 #define XC_draft_large 44 #define XC_draft_small 46 #define XC_draped_box 48 #define XC_exchange 50 #define XC_fleur 52 #define XC_gobbler 54 #define XC_gumby 56 #define XC_hand1 58 #define XC_hand2 60 #define XC_heart 62 #define XC_icon 64 #define XC_iron_cross 66 #define XC_left_ptr 68 #define XC_left_side 70 #define XC_left_tee 72 #define XC_leftbutton 74 #define XC_ll_angle 76 #define XC_lr_angle 78 #define XC_man 80 #define XC_middlebutton 82 #define XC_mouse 84 #define XC_pencil 86 #define XC_pirate 88 #define XC_plus 90 #define XC_question_arrow 92 #define XC_right_ptr 94 #define XC_right_side 96 #define XC_right_tee 98 #define XC_rightbutton 100 #define XC_rtl_logo 102 #define XC_sailboat 104 #define XC_sb_down_arrow 106 #define XC_sb_h_double_arrow 108 #define XC_sb_left_arrow 110 #define XC_sb_right_arrow 112 #define XC_sb_up_arrow 114 #define XC_sb_v_double_arrow 116 #define XC_shuttle 118 #define XC_sizing 120 #define XC_spider 122 #define XC_spraycan 124 #define XC_star 126 #define XC_target 128 #define XC_tcross 130 #define XC_top_left_arrow 132 #define XC_top_left_corner 134 #define XC_top_right_corner 136 #define XC_top_side 138 #define XC_top_tee 140 #define XC_trek 142 #define XC_ul_angle 144 #define XC_umbrella 146 #define XC_ur_angle 148 #define XC_watch 150 #define XC_xterm 152 #endif /* _X11_CURSORFONT_H_ */ PKZ @ X11/Xauth.hnu[/* Copyright 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _Xauth_h #define _Xauth_h /* struct xauth is full of implicit padding to properly align the pointers after the length fields. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif typedef struct xauth { unsigned short family; unsigned short address_length; char *address; unsigned short number_length; char *number; unsigned short name_length; char *name; unsigned short data_length; char *data; } Xauth; #ifdef __clang__ #pragma clang diagnostic pop #endif #ifndef _XAUTH_STRUCT_ONLY # include # include # include # define FamilyLocal (256) /* not part of X standard (i.e. X.h) */ # define FamilyWild (65535) # define FamilyNetname (254) /* not part of X standard */ # define FamilyKrb5Principal (253) /* Kerberos 5 principal name */ # define FamilyLocalHost (252) /* for local non-net authentication */ _XFUNCPROTOBEGIN char *XauFileName(void); Xauth *XauReadAuth( FILE* /* auth_file */ ); int XauLockAuth( _Xconst char* /* file_name */, int /* retries */, int /* timeout */, long /* dead */ ); int XauUnlockAuth( _Xconst char* /* file_name */ ); int XauWriteAuth( FILE* /* auth_file */, Xauth* /* auth */ ); Xauth *XauGetAuthByAddr( #if NeedWidePrototypes unsigned int /* family */, unsigned int /* address_length */, #else unsigned short /* family */, unsigned short /* address_length */, #endif _Xconst char* /* address */, #if NeedWidePrototypes unsigned int /* number_length */, #else unsigned short /* number_length */, #endif _Xconst char* /* number */, #if NeedWidePrototypes unsigned int /* name_length */, #else unsigned short /* name_length */, #endif _Xconst char* /* name */ ); Xauth *XauGetBestAuthByAddr( #if NeedWidePrototypes unsigned int /* family */, unsigned int /* address_length */, #else unsigned short /* family */, unsigned short /* address_length */, #endif _Xconst char* /* address */, #if NeedWidePrototypes unsigned int /* number_length */, #else unsigned short /* number_length */, #endif _Xconst char* /* number */, int /* types_length */, char** /* type_names */, _Xconst int* /* type_lengths */ ); void XauDisposeAuth( Xauth* /* auth */ ); _XFUNCPROTOEND /* Return values from XauLockAuth */ # define LOCK_SUCCESS 0 /* lock succeeded */ # define LOCK_ERROR 1 /* lock unexpectely failed, check errno */ # define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */ #endif /* _XAUTH_STRUCT_ONLY */ #endif /* _Xauth_h */ PKZumk0k0X11/Xthreads.hnu[/* * Copyright 1993, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. * * */ #ifndef _XTHREADS_H_ # define _XTHREADS_H_ /* Redefine these to XtMalloc/XtFree or whatever you want before including * this header file. */ # ifndef xmalloc # define xmalloc malloc # endif # ifndef xfree # define xfree free # endif # ifdef CTHREADS # include typedef cthread_t xthread_t; typedef struct condition xcondition_rec; typedef struct mutex xmutex_rec; # define xthread_init() cthread_init() # define xthread_self cthread_self # define xthread_fork(func,closure) cthread_fork(func,closure) # define xthread_yield() cthread_yield() # define xthread_exit(v) cthread_exit(v) # define xthread_set_name(t,str) cthread_set_name(t,str) # define xmutex_init(m) mutex_init(m) # define xmutex_clear(m) mutex_clear(m) # define xmutex_lock(m) mutex_lock(m) # define xmutex_unlock(m) mutex_unlock(m) # define xmutex_set_name(m,str) mutex_set_name(m,str) # define xcondition_init(cv) condition_init(cv) # define xcondition_clear(cv) condition_clear(cv) # define xcondition_wait(cv,m) condition_wait(cv,m) # define xcondition_signal(cv) condition_signal(cv) # define xcondition_broadcast(cv) condition_broadcast(cv) # define xcondition_set_name(cv,str) condition_set_name(cv,str) # else /* !CTHREADS */ # if defined(SVR4) # include # include typedef thread_t xthread_t; typedef thread_key_t xthread_key_t; typedef cond_t xcondition_rec; typedef mutex_t xmutex_rec; # if defined(__UNIXWARE__) extern xthread_t (*_x11_thr_self)(); # define xthread_self (_x11_thr_self) # else # define xthread_self thr_self # endif # define xthread_fork(func,closure) thr_create(NULL,0,func,closure,THR_NEW_LWP|THR_DETACHED,NULL) # define xthread_yield() thr_yield() # define xthread_exit(v) thr_exit(v) # define xthread_key_create(kp,d) thr_keycreate(kp,d) # ifdef __sun # define xthread_key_delete(k) 0 # else # define xthread_key_delete(k) thr_keydelete(k) # endif # define xthread_set_specific(k,v) thr_setspecific(k,v) # define xthread_get_specific(k,vp) thr_getspecific(k,vp) # define xmutex_init(m) mutex_init(m,USYNC_THREAD,0) # define xmutex_clear(m) mutex_destroy(m) # define xmutex_lock(m) mutex_lock(m) # define xmutex_unlock(m) mutex_unlock(m) # define xcondition_init(cv) cond_init(cv,USYNC_THREAD,0) # define xcondition_clear(cv) cond_destroy(cv) # define xcondition_wait(cv,m) cond_wait(cv,m) # define xcondition_signal(cv) cond_signal(cv) # define xcondition_broadcast(cv) cond_broadcast(cv) # else /* !SVR4 */ # ifdef WIN32 # include typedef DWORD xthread_t; typedef DWORD xthread_key_t; struct _xthread_waiter { HANDLE sem; struct _xthread_waiter *next; }; typedef struct { CRITICAL_SECTION cs; struct _xthread_waiter *waiters; } xcondition_rec; typedef CRITICAL_SECTION xmutex_rec; extern void _Xthread_init(void); # define xthread_init() _Xthread_init() # define xthread_self GetCurrentThreadId # define xthread_fork(func,closure) { \ DWORD _tmptid; \ CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, (LPVOID)closure, 0, \ &_tmptid); \ } # define xthread_yield() Sleep(0) # define xthread_exit(v) ExitThread((DWORD)(v)) # define xthread_key_create(kp,d) *(kp) = TlsAlloc() # define xthread_key_delete(k) TlsFree(k) # define xthread_set_specific(k,v) TlsSetValue(k,v) # define xthread_get_specific(k,vp) TlsGetValue(k) # define xmutex_init(m) InitializeCriticalSection(m) # define xmutex_clear(m) DeleteCriticalSection(m) # define _XMUTEX_NESTS # define xmutex_lock(m) EnterCriticalSection(m) # define xmutex_unlock(m) LeaveCriticalSection(m) # define xcondition_init(cv) { \ InitializeCriticalSection(&(cv)->cs); \ (cv)->waiters = NULL; \ } # define xcondition_clear(cv) DeleteCriticalSection(&(cv)->cs) extern struct _xthread_waiter *_Xthread_waiter(); # define xcondition_wait(cv,m) { \ struct _xthread_waiter *_tmpthr = _Xthread_waiter(); \ EnterCriticalSection(&(cv)->cs); \ _tmpthr->next = (cv)->waiters; \ (cv)->waiters = _tmpthr; \ LeaveCriticalSection(&(cv)->cs); \ LeaveCriticalSection(m); \ WaitForSingleObject(_tmpthr->sem, INFINITE); \ EnterCriticalSection(m); \ } # define xcondition_signal(cv) { \ EnterCriticalSection(&(cv)->cs); \ if ((cv)->waiters) { \ ReleaseSemaphore((cv)->waiters->sem, 1, NULL); \ (cv)->waiters = (cv)->waiters->next; \ } \ LeaveCriticalSection(&(cv)->cs); \ } # define xcondition_broadcast(cv) { \ struct _xthread_waiter *_tmpthr; \ EnterCriticalSection(&(cv)->cs); \ for (_tmpthr = (cv)->waiters; _tmpthr; _tmpthr = _tmpthr->next) \ ReleaseSemaphore(_tmpthr->sem, 1, NULL); \ (cv)->waiters = NULL; \ LeaveCriticalSection(&(cv)->cs); \ } # else /* !WIN32 */ # ifdef USE_TIS_SUPPORT /* * TIS support is intended for thread safe libraries. * This should not be used for general client programming. */ # include typedef pthread_t xthread_t; typedef pthread_key_t xthread_key_t; typedef pthread_cond_t xcondition_rec; typedef pthread_mutex_t xmutex_rec; # define xthread_self tis_self # define xthread_fork(func,closure) { pthread_t _tmpxthr; \ pthread_create(&_tmpxthr,NULL,func,closure); } # define xthread_yield() pthread_yield_np() # define xthread_exit(v) pthread_exit(v) # define xthread_key_create(kp,d) tis_key_create(kp,d) # define xthread_key_delete(k) tis_key_delete(k) # define xthread_set_specific(k,v) tis_setspecific(k,v) # define xthread_get_specific(k,vp) *(vp) = tis_getspecific(k) # define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER # define xmutex_init(m) tis_mutex_init(m) # define xmutex_clear(m) tis_mutex_destroy(m) # define xmutex_lock(m) tis_mutex_lock(m) # define xmutex_unlock(m) tis_mutex_unlock(m) # define xcondition_init(c) tis_cond_init(c) # define xcondition_clear(c) tis_cond_destroy(c) # define xcondition_wait(c,m) tis_cond_wait(c,m) # define xcondition_signal(c) tis_cond_signal(c) # define xcondition_broadcast(c) tis_cond_broadcast(c) # else # ifdef USE_NBSD_THREADLIB /* * NetBSD threadlib support is intended for thread safe libraries. * This should not be used for general client programming. */ # include typedef thr_t xthread_t; typedef thread_key_t xthread_key_t; typedef cond_t xcondition_rec; typedef mutex_t xmutex_rec; # define xthread_self thr_self # define xthread_fork(func,closure) { thr_t _tmpxthr; \ /* XXX Create it detached? --thorpej */ \ thr_create(&_tmpxthr,NULL,func,closure); } # define xthread_yield() thr_yield() # define xthread_exit(v) thr_exit(v) # define xthread_key_create(kp,d) thr_keycreate(kp,d) # define xthread_key_delete(k) thr_keydelete(k) # define xthread_set_specific(k,v) thr_setspecific(k,v) # define xthread_get_specific(k,vp) *(vp) = thr_getspecific(k) # define XMUTEX_INITIALIZER MUTEX_INITIALIZER # define xmutex_init(m) mutex_init(m, 0) # define xmutex_clear(m) mutex_destroy(m) # define xmutex_lock(m) mutex_lock(m) # define xmutex_unlock(m) mutex_unlock(m) # define xcondition_init(c) cond_init(c, 0, 0) # define xcondition_clear(c) cond_destroy(c) # define xcondition_wait(c,m) cond_wait(c,m) # define xcondition_signal(c) cond_signal(c) # define xcondition_broadcast(c) cond_broadcast(c) # else # include typedef pthread_t xthread_t; typedef pthread_key_t xthread_key_t; typedef pthread_cond_t xcondition_rec; typedef pthread_mutex_t xmutex_rec; # define xthread_self pthread_self # define xthread_yield() pthread_yield() # define xthread_exit(v) pthread_exit(v) # define xthread_set_specific(k,v) pthread_setspecific(k,v) # define xmutex_clear(m) pthread_mutex_destroy(m) # define xmutex_lock(m) pthread_mutex_lock(m) # define xmutex_unlock(m) pthread_mutex_unlock(m) # ifndef XPRE_STANDARD_API # define xthread_key_create(kp,d) pthread_key_create(kp,d) # define xthread_key_delete(k) pthread_key_delete(k) # define xthread_get_specific(k,vp) *(vp) = pthread_getspecific(k) # define xthread_fork(func,closure) { pthread_t _tmpxthr; \ pthread_create(&_tmpxthr,NULL,func,closure); } # define XMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER # define xmutex_init(m) pthread_mutex_init(m, NULL) # define xcondition_init(c) pthread_cond_init(c, NULL) # else /* XPRE_STANDARD_API */ # define xthread_key_create(kp,d) pthread_keycreate(kp,d) # define xthread_key_delete(k) 0 # define xthread_get_specific(k,vp) pthread_getspecific(k,vp) # define xthread_fork(func,closure) { pthread_t _tmpxthr; \ pthread_create(&_tmpxthr,pthread_attr_default,func,closure); } # define xmutex_init(m) pthread_mutex_init(m, pthread_mutexattr_default) # define xcondition_init(c) pthread_cond_init(c, pthread_condattr_default) # endif /* XPRE_STANDARD_API */ # define xcondition_clear(c) pthread_cond_destroy(c) # define xcondition_wait(c,m) pthread_cond_wait(c,m) # define xcondition_signal(c) pthread_cond_signal(c) # define xcondition_broadcast(c) pthread_cond_broadcast(c) # if defined(_DECTHREADS_) static xthread_t _X_no_thread_id; # define xthread_have_id(id) !pthread_equal(id, _X_no_thread_id) # define xthread_clear_id(id) id = _X_no_thread_id # define xthread_equal(id1,id2) pthread_equal(id1, id2) # endif /* _DECTHREADS_ */ # if defined(__linux__) # define xthread_have_id(id) !pthread_equal(id, 0) # define xthread_clear_id(id) id = 0 # define xthread_equal(id1,id2) pthread_equal(id1, id2) # endif /* linux */ # if defined(_CMA_VENDOR_) && defined(_CMA__IBM) && (_CMA_VENDOR_ == _CMA__IBM) # ifdef DEBUG /* too much of a hack to enable normally */ /* see also cma__obj_set_name() */ # define xmutex_set_name(m,str) ((char**)(m)->field1)[5] = (str) # define xcondition_set_name(cv,str) ((char**)(cv)->field1)[5] = (str) # endif /* DEBUG */ # endif /* _CMA_VENDOR_ == _CMA__IBM */ # endif /* USE_NBSD_THREADLIB */ # endif /* USE_TIS_SUPPORT */ # endif /* WIN32 */ # endif /* SVR4 */ # endif /* CTHREADS */ typedef xcondition_rec *xcondition_t; typedef xmutex_rec *xmutex_t; # ifndef xcondition_malloc # define xcondition_malloc() (xcondition_t)xmalloc(sizeof(xcondition_rec)) # endif # ifndef xcondition_free # define xcondition_free(c) xfree((char *)c) # endif # ifndef xmutex_malloc # define xmutex_malloc() (xmutex_t)xmalloc(sizeof(xmutex_rec)) # endif # ifndef xmutex_free # define xmutex_free(m) xfree((char *)m) # endif # ifndef xthread_have_id # define xthread_have_id(id) id # endif # ifndef xthread_clear_id # define xthread_clear_id(id) id = 0 # endif # ifndef xthread_equal # define xthread_equal(id1,id2) ((id1) == (id2)) # endif /* aids understood by some debuggers */ # ifndef xthread_set_name # define xthread_set_name(t,str) # endif # ifndef xmutex_set_name # define xmutex_set_name(m,str) # endif # ifndef xcondition_set_name # define xcondition_set_name(cv,str) # endif #endif /* _XTHREADS_H_ */ PKZLbSbS X11/Xcms.hnu[ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this * software and its documentation for any purpose and without fee, provided * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE. * * * DESCRIPTION * Public include file for X Color Management System */ #ifndef _X11_XCMS_H_ #define _X11_XCMS_H_ #include /* The Xcms structs are full of implicit padding to properly align members. We can't clean that up without breaking ABI, so tell clang not to bother complaining about it. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif /* * XCMS Status Values */ #define XcmsFailure 0 #define XcmsSuccess 1 #define XcmsSuccessWithCompression 2 /* * Color Space Format ID's * Color Space ID's are of XcmsColorFormat type. * * bit 31 * 0 == Device-Independent * 1 == Device-Dependent * * bit 30: * 0 == Registered with X Consortium * 1 == Unregistered */ #define XcmsUndefinedFormat (XcmsColorFormat)0x00000000 #define XcmsCIEXYZFormat (XcmsColorFormat)0x00000001 #define XcmsCIEuvYFormat (XcmsColorFormat)0x00000002 #define XcmsCIExyYFormat (XcmsColorFormat)0x00000003 #define XcmsCIELabFormat (XcmsColorFormat)0x00000004 #define XcmsCIELuvFormat (XcmsColorFormat)0x00000005 #define XcmsTekHVCFormat (XcmsColorFormat)0x00000006 #define XcmsRGBFormat (XcmsColorFormat)0x80000000 #define XcmsRGBiFormat (XcmsColorFormat)0x80000001 /* * State of XcmsPerScrnInfo */ #define XcmsInitNone 0x00 /* no initialization attempted */ #define XcmsInitSuccess 0x01 /* initialization successful */ #define XcmsInitFailure 0xff /* failure, use defaults */ #define DisplayOfCCC(ccc) ((ccc)->dpy) #define ScreenNumberOfCCC(ccc) ((ccc)->screenNumber) #define VisualOfCCC(ccc) ((ccc)->visual) #define ClientWhitePointOfCCC(ccc) (&(ccc)->clientWhitePt) #define ScreenWhitePointOfCCC(ccc) (&(ccc)->pPerScrnInfo->screenWhitePt) #define FunctionSetOfCCC(ccc) ((ccc)->pPerScrnInfo->functionSet) typedef unsigned long XcmsColorFormat; /* Color Space Format ID */ typedef double XcmsFloat; /* * Device RGB */ typedef struct { unsigned short red; /* scaled from 0x0000 to 0xffff */ unsigned short green; /* scaled from 0x0000 to 0xffff */ unsigned short blue; /* scaled from 0x0000 to 0xffff */ } XcmsRGB; /* * RGB Intensity */ typedef struct { XcmsFloat red; /* 0.0 - 1.0 */ XcmsFloat green; /* 0.0 - 1.0 */ XcmsFloat blue; /* 0.0 - 1.0 */ } XcmsRGBi; /* * CIE XYZ */ typedef struct { XcmsFloat X; XcmsFloat Y; XcmsFloat Z; } XcmsCIEXYZ; /* * CIE u'v'Y */ typedef struct { XcmsFloat u_prime; /* 0.0 - 1.0 */ XcmsFloat v_prime; /* 0.0 - 1.0 */ XcmsFloat Y; /* 0.0 - 1.0 */ } XcmsCIEuvY; /* * CIE xyY */ typedef struct { XcmsFloat x; /* 0.0 - 1.0 */ XcmsFloat y; /* 0.0 - 1.0 */ XcmsFloat Y; /* 0.0 - 1.0 */ } XcmsCIExyY; /* * CIE L*a*b* */ typedef struct { XcmsFloat L_star; /* 0.0 - 100.0 */ XcmsFloat a_star; XcmsFloat b_star; } XcmsCIELab; /* * CIE L*u*v* */ typedef struct { XcmsFloat L_star; /* 0.0 - 100.0 */ XcmsFloat u_star; XcmsFloat v_star; } XcmsCIELuv; /* * TekHVC */ typedef struct { XcmsFloat H; /* 0.0 - 360.0 */ XcmsFloat V; /* 0.0 - 100.0 */ XcmsFloat C; /* 0.0 - 100.0 */ } XcmsTekHVC; /* * PAD */ typedef struct { XcmsFloat pad0; XcmsFloat pad1; XcmsFloat pad2; XcmsFloat pad3; } XcmsPad; /* * XCMS Color Structure */ typedef struct { union { XcmsRGB RGB; XcmsRGBi RGBi; XcmsCIEXYZ CIEXYZ; XcmsCIEuvY CIEuvY; XcmsCIExyY CIExyY; XcmsCIELab CIELab; XcmsCIELuv CIELuv; XcmsTekHVC TekHVC; XcmsPad Pad; } spec; /* the color specification */ unsigned long pixel; /* pixel value (as needed) */ XcmsColorFormat format; /* the specification format */ } XcmsColor; /* * XCMS Per Screen related data */ typedef struct _XcmsPerScrnInfo { XcmsColor screenWhitePt; /* Screen White point */ XPointer functionSet; /* pointer to Screen Color Characterization */ /* Function Set structure */ XPointer screenData; /* pointer to corresponding Screen Color*/ /* Characterization Data */ unsigned char state; /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */ char pad[3]; } XcmsPerScrnInfo; typedef struct _XcmsCCC *XcmsCCC; typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */ XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */ XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); /* * XCMS Color Conversion Context */ typedef struct _XcmsCCC { Display *dpy; /* X Display */ int screenNumber; /* X screen number */ Visual *visual; /* X Visual */ XcmsColor clientWhitePt; /* Client White Point */ XcmsCompressionProc gamutCompProc; /* Gamut Compression Function */ XPointer gamutCompClientData; /* Gamut Comp Func Client Data */ XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */ XPointer whitePtAdjClientData; /* White Pt Adj Func Client Data */ XcmsPerScrnInfo *pPerScrnInfo; /* pointer to per screen information */ /* associated with the above display */ /* screenNumber */ } XcmsCCCRec; typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */ Display* /* dpy */, int /* screen_number */, XcmsPerScrnInfo* /* screen_info */ ); typedef void (*XcmsScreenFreeProc)( XPointer /* screenData */ ); /* * Function List Pointer -- pointer to an array of function pointers. * The end of list is indicated by a NULL pointer. */ /* * XXX: The use of the XcmsConversionProc type is broken. The * device-independent colour conversion code uses it as: typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, XcmsColor *, unsigned int); * while the device-dependent code uses it as: typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, unsigned int, Bool *); * Until this is reworked, it's probably best to leave it unprotoized. * The code works regardless. */ typedef Status (*XcmsDDConversionProc)( /* using device-dependent version */ XcmsCCC /* ccc */, XcmsColor* /* pcolors_in_out */, unsigned int /* ncolors */, Bool* /* pCompressed */ ); typedef Status (*XcmsDIConversionProc)( /* using device-independent version */ XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* pcolors_in_out */, unsigned int /* ncolors */ ); typedef XcmsDIConversionProc XcmsConversionProc; typedef XcmsConversionProc *XcmsFuncListPtr; typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */ char* /* color_string */, XcmsColor* /* color_return */ ); /* * Color Space -- per Color Space related data (Device-Independent * or Device-Dependent) */ typedef struct _XcmsColorSpace { const char *prefix; /* Prefix of string format. */ XcmsColorFormat id; /* Format ID number. */ XcmsParseStringProc parseString; /* String format parsing function */ XcmsFuncListPtr to_CIEXYZ; /* Pointer to an array of function */ /* pointers such that when the */ /* functions are executed in sequence */ /* will convert a XcmsColor structure */ /* from this color space to CIEXYZ */ /* space. */ XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function */ /* pointers such that when the */ /* functions are executed in sequence */ /* will convert a XcmsColor structure */ /* from CIEXYZ space to this color */ /* space. */ int inverse_flag; /* If 1, indicates that for 0 <= i < n */ /* where n is the number of function */ /* pointers in the lists to_CIEXYZ */ /* and from_CIEXYZ; for each function */ /* to_CIEXYZ[i] its inverse function */ /* is from_CIEXYZ[n - i]. */ } XcmsColorSpace; /* * Screen Color Characterization Function Set -- per device class * color space conversion functions. */ typedef struct _XcmsFunctionSet { XcmsColorSpace **DDColorSpaces; /* Pointer to an array of pointers to */ /* Device-DEPENDENT color spaces */ /* understood by this SCCFuncSet. */ XcmsScreenInitProc screenInitProc; /* Screen initialization function that */ /* reads Screen Color Characterization*/ /* Data off properties on the screen's*/ /* root window. */ XcmsScreenFreeProc screenFreeProc; /* Function that frees the SCCData */ /* structures. */ } XcmsFunctionSet; _XFUNCPROTOBEGIN extern Status XcmsAddColorSpace ( XcmsColorSpace* /* pColorSpace */ ); extern Status XcmsAddFunctionSet ( XcmsFunctionSet* /* functionSet */ ); extern Status XcmsAllocColor ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* color_in_out */, XcmsColorFormat /* result_format */ ); extern Status XcmsAllocNamedColor ( Display* /* dpy */, Colormap /* colormap */, _Xconst char* /* color_string */, XcmsColor* /* color_scrn_return */, XcmsColor* /* color_exact_return */, XcmsColorFormat /* result_format */ ); extern XcmsCCC XcmsCCCOfColormap ( Display* /* dpy */, Colormap /* colormap */ ); extern Status XcmsCIELabClipab( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsCIELabClipL( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsCIELabClipLab( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsCIELabQueryMaxC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* L_star */, XcmsColor* /* color_return */ ); extern Status XcmsCIELabQueryMaxL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ ); extern Status XcmsCIELabQueryMaxLC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsColor* /* color_return */ ); extern Status XcmsCIELabQueryMinL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ ); extern Status XcmsCIELabToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIELabWhiteShiftColors( XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); extern Status XcmsCIELuvClipL( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsCIELuvClipLuv( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsCIELuvClipuv( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsCIELuvQueryMaxC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* L_star */, XcmsColor* /* color_return */ ); extern Status XcmsCIELuvQueryMaxL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ ); extern Status XcmsCIELuvQueryMaxLC ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsColor* /* color_return */ ); extern Status XcmsCIELuvQueryMinL ( XcmsCCC /* ccc */, XcmsFloat /* hue_angle */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ ); extern Status XcmsCIELuvToCIEuvY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIELuvWhiteShiftColors( XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); extern Status XcmsCIEXYZToCIELab ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIEXYZToCIEuvY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIEXYZToCIExyY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIEXYZToRGBi ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); extern Status XcmsCIEuvYToCIELuv ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIEuvYToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIEuvYToTekHVC ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsCIExyYToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern XcmsColor *XcmsClientWhitePointOfCCC ( XcmsCCC /* ccc */ ); extern Status XcmsConvertColors ( XcmsCCC /* ccc */, XcmsColor* /* colorArry_in_out */, unsigned int /* nColors */, XcmsColorFormat /* targetFormat */, Bool* /* compArry_return */ ); extern XcmsCCC XcmsCreateCCC ( Display* /* dpy */, int /* screenNumber */, Visual* /* visual */, XcmsColor* /* clientWhitePt */, XcmsCompressionProc /* gamutCompProc */, XPointer /* gamutCompClientData */, XcmsWhiteAdjustProc /* whitePtAdjProc */, XPointer /* whitePtAdjClientData */ ); extern XcmsCCC XcmsDefaultCCC ( Display* /* dpy */, int /* screenNumber */ ); extern Display *XcmsDisplayOfCCC ( XcmsCCC /* ccc */ ); extern XcmsColorFormat XcmsFormatOfPrefix ( char* /* prefix */ ); extern void XcmsFreeCCC ( XcmsCCC /* ccc */ ); extern Status XcmsLookupColor ( Display* /* dpy */, Colormap /* colormap */, _Xconst char* /* color_string */, XcmsColor* /* pColor_exact_in_out */, XcmsColor* /* pColor_scrn_in_out */, XcmsColorFormat /* result_format */ ); extern char *XcmsPrefixOfFormat ( XcmsColorFormat /* id */ ); extern Status XcmsQueryBlack ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ ); extern Status XcmsQueryBlue ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ ); extern Status XcmsQueryColor ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* pColor_in_out */, XcmsColorFormat /* result_format */ ); extern Status XcmsQueryColors ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* colorArry_in_out */, unsigned int /* nColors */, XcmsColorFormat /* result_format */ ); extern Status XcmsQueryGreen ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ ); extern Status XcmsQueryRed ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ ); extern Status XcmsQueryWhite ( XcmsCCC /* ccc */, XcmsColorFormat /* target_format */, XcmsColor* /* color_return */ ); extern Status XcmsRGBiToCIEXYZ ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); extern Status XcmsRGBiToRGB ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); extern Status XcmsRGBToRGBi ( XcmsCCC /* ccc */, XcmsColor* /* colors */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); extern int XcmsScreenNumberOfCCC ( XcmsCCC /* ccc */ ); extern XcmsColor *XcmsScreenWhitePointOfCCC ( XcmsCCC /* ccc */ ); extern XcmsCCC XcmsSetCCCOfColormap( Display* /* dpy */, Colormap /* colormap */, XcmsCCC /* ccc */ ); extern XcmsCompressionProc XcmsSetCompressionProc ( XcmsCCC /* ccc */, XcmsCompressionProc /* compression_proc */, XPointer /* client_data */ ); extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc ( XcmsCCC /* ccc */, XcmsWhiteAdjustProc /* white_adjust_proc */, XPointer /* client_data */ ); extern Status XcmsSetWhitePoint ( XcmsCCC /* ccc */, XcmsColor* /* color */ ); extern Status XcmsStoreColor ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* pColor_in */ ); extern Status XcmsStoreColors ( Display* /* dpy */, Colormap /* colormap */, XcmsColor* /* colorArry_in */, unsigned int /* nColors */, Bool* /* compArry_return */ ); extern Status XcmsTekHVCClipC( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsTekHVCClipV( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsTekHVCClipVC( XcmsCCC /* ccc */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, unsigned int /* index */, Bool* /* compression_flags_return */ ); extern Status XcmsTekHVCQueryMaxC ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* value */, XcmsColor* /* color_return */ ); extern Status XcmsTekHVCQueryMaxV ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ ); extern Status XcmsTekHVCQueryMaxVC ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsColor* /* color_return */ ); extern Status XcmsTekHVCQueryMaxVSamples ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsColor* /* colors_return */, unsigned int /* nsamples */ ); extern Status XcmsTekHVCQueryMinV ( XcmsCCC /* ccc */, XcmsFloat /* hue */, XcmsFloat /* chroma */, XcmsColor* /* color_return */ ); extern Status XcmsTekHVCToCIEuvY ( XcmsCCC /* ccc */, XcmsColor* /* white_point */, XcmsColor* /* colors */, unsigned int /* ncolors */ ); extern Status XcmsTekHVCWhiteShiftColors( XcmsCCC /* ccc */, XcmsColor* /* initial_white_point*/, XcmsColor* /* target_white_point*/, XcmsColorFormat /* target_format */, XcmsColor* /* colors_in_out */, unsigned int /* ncolors */, Bool* /* compression_flags_return */ ); extern Visual *XcmsVisualOfCCC ( XcmsCCC /* ccc */ ); #ifdef __clang__ #pragma clang diagnostic pop #endif _XFUNCPROTOEND #endif /* _X11_XCMS_H_ */ PKZpHC҄))X11/Xresource.hnu[ /*********************************************************** Copyright 1987, 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef _X11_XRESOURCE_H_ #define _X11_XRESOURCE_H_ #ifndef _XP_PRINT_SERVER_ #include #endif /**************************************************************** **************************************************************** *** *** *** *** *** X Resource Manager Intrinsics *** *** *** *** *** **************************************************************** ****************************************************************/ _XFUNCPROTOBEGIN /**************************************************************** * * Memory Management * ****************************************************************/ extern char *Xpermalloc( unsigned int /* size */ ); /**************************************************************** * * Quark Management * ****************************************************************/ typedef int XrmQuark, *XrmQuarkList; #define NULLQUARK ((XrmQuark) 0) typedef char *XrmString; #define NULLSTRING ((XrmString) 0) /* find quark for string, create new quark if none already exists */ extern XrmQuark XrmStringToQuark( _Xconst char* /* string */ ); extern XrmQuark XrmPermStringToQuark( _Xconst char* /* string */ ); /* find string for quark */ extern XrmString XrmQuarkToString( XrmQuark /* quark */ ); extern XrmQuark XrmUniqueQuark( void ); #define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0) /**************************************************************** * * Conversion of Strings to Lists * ****************************************************************/ typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList; extern void XrmStringToQuarkList( _Xconst char* /* string */, XrmQuarkList /* quarks_return */ ); extern void XrmStringToBindingQuarkList( _Xconst char* /* string */, XrmBindingList /* bindings_return */, XrmQuarkList /* quarks_return */ ); /**************************************************************** * * Name and Class lists. * ****************************************************************/ typedef XrmQuark XrmName; typedef XrmQuarkList XrmNameList; #define XrmNameToString(name) XrmQuarkToString(name) #define XrmStringToName(string) XrmStringToQuark(string) #define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name) typedef XrmQuark XrmClass; typedef XrmQuarkList XrmClassList; #define XrmClassToString(c_class) XrmQuarkToString(c_class) #define XrmStringToClass(c_class) XrmStringToQuark(c_class) #define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class) /**************************************************************** * * Resource Representation Types and Values * ****************************************************************/ typedef XrmQuark XrmRepresentation; #define XrmStringToRepresentation(string) XrmStringToQuark(string) #define XrmRepresentationToString(type) XrmQuarkToString(type) typedef struct { unsigned int size; XPointer addr; } XrmValue, *XrmValuePtr; /**************************************************************** * * Resource Manager Functions * ****************************************************************/ typedef struct _XrmHashBucketRec *XrmHashBucket; typedef XrmHashBucket *XrmHashTable; typedef XrmHashTable XrmSearchList[]; typedef struct _XrmHashBucketRec *XrmDatabase; extern void XrmDestroyDatabase( XrmDatabase /* database */ ); extern void XrmQPutResource( XrmDatabase* /* database */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, XrmRepresentation /* type */, XrmValue* /* value */ ); extern void XrmPutResource( XrmDatabase* /* database */, _Xconst char* /* specifier */, _Xconst char* /* type */, XrmValue* /* value */ ); extern void XrmQPutStringResource( XrmDatabase* /* database */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, _Xconst char* /* value */ ); extern void XrmPutStringResource( XrmDatabase* /* database */, _Xconst char* /* specifier */, _Xconst char* /* value */ ); extern void XrmPutLineResource( XrmDatabase* /* database */, _Xconst char* /* line */ ); extern Bool XrmQGetResource( XrmDatabase /* database */, XrmNameList /* quark_name */, XrmClassList /* quark_class */, XrmRepresentation* /* quark_type_return */, XrmValue* /* value_return */ ); extern Bool XrmGetResource( XrmDatabase /* database */, _Xconst char* /* str_name */, _Xconst char* /* str_class */, char** /* str_type_return */, XrmValue* /* value_return */ ); extern Bool XrmQGetSearchList( XrmDatabase /* database */, XrmNameList /* names */, XrmClassList /* classes */, XrmSearchList /* list_return */, int /* list_length */ ); extern Bool XrmQGetSearchResource( XrmSearchList /* list */, XrmName /* name */, XrmClass /* class */, XrmRepresentation* /* type_return */, XrmValue* /* value_return */ ); /**************************************************************** * * Resource Database Management * ****************************************************************/ #ifndef _XP_PRINT_SERVER_ extern void XrmSetDatabase( Display* /* display */, XrmDatabase /* database */ ); extern XrmDatabase XrmGetDatabase( Display* /* display */ ); #endif /* !_XP_PRINT_SERVER_ */ extern XrmDatabase XrmGetFileDatabase( _Xconst char* /* filename */ ); extern Status XrmCombineFileDatabase( _Xconst char* /* filename */, XrmDatabase* /* target */, Bool /* override */ ); extern XrmDatabase XrmGetStringDatabase( _Xconst char* /* data */ /* null terminated string */ ); extern void XrmPutFileDatabase( XrmDatabase /* database */, _Xconst char* /* filename */ ); extern void XrmMergeDatabases( XrmDatabase /* source_db */, XrmDatabase* /* target_db */ ); extern void XrmCombineDatabase( XrmDatabase /* source_db */, XrmDatabase* /* target_db */, Bool /* override */ ); #define XrmEnumAllLevels 0 #define XrmEnumOneLevel 1 extern Bool XrmEnumerateDatabase( XrmDatabase /* db */, XrmNameList /* name_prefix */, XrmClassList /* class_prefix */, int /* mode */, Bool (*)( XrmDatabase* /* db */, XrmBindingList /* bindings */, XrmQuarkList /* quarks */, XrmRepresentation* /* type */, XrmValue* /* value */, XPointer /* closure */ ) /* proc */, XPointer /* closure */ ); extern const char *XrmLocaleOfDatabase( XrmDatabase /* database */ ); /**************************************************************** * * Command line option mapping to resource entries * ****************************************************************/ typedef enum { XrmoptionNoArg, /* Value is specified in OptionDescRec.value */ XrmoptionIsArg, /* Value is the option string itself */ XrmoptionStickyArg, /* Value is characters immediately following option */ XrmoptionSepArg, /* Value is next argument in argv */ XrmoptionResArg, /* Resource and value in next argument in argv */ XrmoptionSkipArg, /* Ignore this option and the next argument in argv */ XrmoptionSkipLine, /* Ignore this option and the rest of argv */ XrmoptionSkipNArgs /* Ignore this option and the next OptionDescRes.value arguments in argv */ } XrmOptionKind; typedef struct { char *option; /* Option abbreviation in argv */ char *specifier; /* Resource specifier */ XrmOptionKind argKind; /* Which style of option it is */ XPointer value; /* Value to provide if XrmoptionNoArg */ } XrmOptionDescRec, *XrmOptionDescList; extern void XrmParseCommand( XrmDatabase* /* database */, XrmOptionDescList /* table */, int /* table_count */, _Xconst char* /* name */, int* /* argc_in_out */, char** /* argv_in_out */ ); _XFUNCPROTOEND #endif /* _X11_XRESOURCE_H_ */ /* DON'T ADD STUFF AFTER THIS #endif */ PKZ X11/Xprotostr.hnu[#ifndef XPROTOSTRUCTS_H #define XPROTOSTRUCTS_H /*********************************************************** Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #include /* Used by PolySegment */ typedef struct _xSegment { INT16 x1, y1, x2, y2; } xSegment; /* POINT */ typedef struct _xPoint { INT16 x, y; } xPoint; typedef struct _xRectangle { INT16 x, y; CARD16 width, height; } xRectangle; /* ARC */ typedef struct _xArc { INT16 x, y; CARD16 width, height; INT16 angle1, angle2; } xArc; #endif /* XPROTOSTRUCTS_H */ PKZ" X11/ap_keysym.hnu[/****************************************************************** Copyright 1987 by Apollo Computer Inc., Chelmsford, Massachusetts. Copyright 1989 by Hewlett-Packard Company. All Rights Reserved Permission to use, duplicate, change, and distribute this software and its documentation for any purpose and without fee is granted, provided that the above copyright notice appear in such copy and that this copyright notice appear in all supporting documentation, and that the names of Apollo Computer Inc., the Hewlett-Packard Company, or the X Consortium not be used in advertising or publicity pertaining to distribution of the software without written prior permission. HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS SOFWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material. This software is not subject to any license of the American Telephone and Telegraph Company or of the Regents of the University of California. ******************************************************************/ #define apXK_LineDel 0x1000FF00 #define apXK_CharDel 0x1000FF01 #define apXK_Copy 0x1000FF02 #define apXK_Cut 0x1000FF03 #define apXK_Paste 0x1000FF04 #define apXK_Move 0x1000FF05 #define apXK_Grow 0x1000FF06 #define apXK_Cmd 0x1000FF07 #define apXK_Shell 0x1000FF08 #define apXK_LeftBar 0x1000FF09 #define apXK_RightBar 0x1000FF0A #define apXK_LeftBox 0x1000FF0B #define apXK_RightBox 0x1000FF0C #define apXK_UpBox 0x1000FF0D #define apXK_DownBox 0x1000FF0E #define apXK_Pop 0x1000FF0F #define apXK_Read 0x1000FF10 #define apXK_Edit 0x1000FF11 #define apXK_Save 0x1000FF12 #define apXK_Exit 0x1000FF13 #define apXK_Repeat 0x1000FF14 #define apXK_KP_parenleft 0x1000FFA8 #define apXK_KP_parenright 0x1000FFA9 PKZb$00X11/extensions/XResproto.hnu[/* Copyright (c) 2002 XFree86 Inc */ #ifndef _XRESPROTO_H #define _XRESPROTO_H #define XRES_MAJOR_VERSION 1 #define XRES_MINOR_VERSION 2 #define XRES_NAME "X-Resource" /* v1.0 */ #define X_XResQueryVersion 0 #define X_XResQueryClients 1 #define X_XResQueryClientResources 2 #define X_XResQueryClientPixmapBytes 3 /* Version 1.1 has been accidentally released from the version */ /* control and while it doesn't have differences to version 1.0, the */ /* next version is labeled 1.2 in order to remove the risk of confusion. */ /* v1.2 */ #define X_XResQueryClientIds 4 #define X_XResQueryResourceBytes 5 typedef struct { CARD32 resource_base; CARD32 resource_mask; } xXResClient; #define sz_xXResClient 8 typedef struct { CARD32 resource_type; CARD32 count; } xXResType; #define sz_xXResType 8 /* XResQueryVersion */ typedef struct _XResQueryVersion { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD8 client_major; CARD8 client_minor; CARD16 unused; } xXResQueryVersionReq; #define sz_xXResQueryVersionReq 8 typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD16 server_major; CARD16 server_minor; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXResQueryVersionReply; #define sz_xXResQueryVersionReply 32 /* XResQueryClients */ typedef struct _XResQueryClients { CARD8 reqType; CARD8 XResReqType; CARD16 length; } xXResQueryClientsReq; #define sz_xXResQueryClientsReq 4 typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 num_clients; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXResQueryClientsReply; #define sz_xXResQueryClientsReply 32 /* XResQueryClientResources */ typedef struct _XResQueryClientResources { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 xid; } xXResQueryClientResourcesReq; #define sz_xXResQueryClientResourcesReq 8 typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 num_types; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXResQueryClientResourcesReply; #define sz_xXResQueryClientResourcesReply 32 /* XResQueryClientPixmapBytes */ typedef struct _XResQueryClientPixmapBytes { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 xid; } xXResQueryClientPixmapBytesReq; #define sz_xXResQueryClientPixmapBytesReq 8 typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 bytes; CARD32 bytes_overflow; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXResQueryClientPixmapBytesReply; #define sz_xXResQueryClientPixmapBytesReply 32 /* v1.2 XResQueryClientIds */ #define X_XResClientXIDMask 0x01 #define X_XResLocalClientPIDMask 0x02 typedef struct _XResClientIdSpec { CARD32 client; CARD32 mask; } xXResClientIdSpec; #define sz_xXResClientIdSpec 8 typedef struct _XResClientIdValue { xXResClientIdSpec spec; CARD32 length; // followed by length CARD32s } xXResClientIdValue; #define sz_xResClientIdValue (sz_xXResClientIdSpec + 4) typedef struct _XResQueryClientIds { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 numSpecs; // followed by numSpecs times XResClientIdSpec } xXResQueryClientIdsReq; #define sz_xXResQueryClientIdsReq 8 typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numIds; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; // followed by numIds times XResClientIdValue } xXResQueryClientIdsReply; #define sz_xXResQueryClientIdsReply 32 /* v1.2 XResQueryResourceBytes */ typedef struct _XResResourceIdSpec { CARD32 resource; CARD32 type; } xXResResourceIdSpec; #define sz_xXResResourceIdSpec 8 typedef struct _XResQueryResourceBytes { CARD8 reqType; CARD8 XResReqType; CARD16 length; CARD32 client; CARD32 numSpecs; // followed by numSpecs times XResResourceIdSpec } xXResQueryResourceBytesReq; #define sz_xXResQueryResourceBytesReq 12 typedef struct _XResResourceSizeSpec { xXResResourceIdSpec spec; CARD32 bytes; CARD32 refCount; CARD32 useCount; } xXResResourceSizeSpec; #define sz_xXResResourceSizeSpec (sz_xXResResourceIdSpec + 12) typedef struct _XResResourceSizeValue { xXResResourceSizeSpec size; CARD32 numCrossReferences; // followed by numCrossReferences times XResResourceSizeSpec } xXResResourceSizeValue; #define sz_xXResResourceSizeValue (sz_xXResResourceSizeSpec + 4) typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numSizes; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; // followed by numSizes times XResResourceSizeValue } xXResQueryResourceBytesReply; #define sz_xXResQueryResourceBytesReply 32 #endif /* _XRESPROTO_H */ PKZsX11/extensions/recordconst.hnu[/*************************************************************************** * Copyright 1995 Network Computing Devices * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Network Computing Devices * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. * * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. **************************************************************************/ #ifndef _RECORDCONST_H_ #define _RECORDCONST_H_ #define RECORD_NAME "RECORD" #define RECORD_MAJOR_VERSION 1 #define RECORD_MINOR_VERSION 13 #define RECORD_LOWEST_MAJOR_VERSION 1 #define RECORD_LOWEST_MINOR_VERSION 12 #define XRecordBadContext 0 /* Not a valid RC */ #define RecordNumErrors (XRecordBadContext + 1) #define RecordNumEvents 0L /* * Constants for arguments of various requests */ #define XRecordFromServerTime 0x01 #define XRecordFromClientTime 0x02 #define XRecordFromClientSequence 0x04 #define XRecordCurrentClients 1 #define XRecordFutureClients 2 #define XRecordAllClients 3 #define XRecordFromServer 0 #define XRecordFromClient 1 #define XRecordClientStarted 2 #define XRecordClientDied 3 #define XRecordStartOfData 4 #define XRecordEndOfData 5 #endif /* _RECORD_H_ */ PKZY{X11/extensions/xcmiscstr.hnu[#warning "xcmiscstr.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include PKZYIIX11/extensions/cup.hnu[/* Copyright 1987, 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _CUP_H_ #define _CUP_H_ #define XCUPNAME "TOG-CUP" #define XCUP_MAJOR_VERSION 1 /* current version numbers */ #define XCUP_MINOR_VERSION 0 #define XcupNumberErrors 0 #endif /* _CUP_H_ */ PKZEɒɒX11/extensions/XI2proto.hnu[/* * Copyright © 2009 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * */ /* Conventions for this file: * Names: * structs: always typedef'd, prefixed with xXI, CamelCase * struct members: lower_case_with_underscores * Exceptions: reqType, ReqType, repType, RepType, sequenceNumber are * named as such for historical reasons. * request opcodes: X_XIRequestName as CamelCase * defines: defines used in client applications must go in XI2.h * defines used only in protocol handling: XISOMENAME * * Data types: unless there is a historical name for a datatype (e.g. * Window), use stdint types specifying the size of the datatype. * historical data type names must be defined and undefined at the top and * end of the file. * * General: * spaces, not tabs. * structs specific to a request or reply added before the request * definition. structs used in more than one request, reply or event * appended to the common structs section before the definition of the * first request. * members of structs vertically aligned on column 16 if datatypes permit. * otherwise aligned on next available 8n column. */ /** * Protocol definitions for the XI2 protocol. * This file should not be included by clients that merely use XI2, but do not * need the wire protocol. Such clients should include XI2.h, or the matching * header from the library. * */ #ifndef _XI2PROTO_H_ #define _XI2PROTO_H_ #include #include #include #include /* make sure types have right sizes for protocol structures. */ #define Window uint32_t #define Time uint32_t #define Atom uint32_t #define Cursor uint32_t #define Barrier uint32_t /** * XI2 Request opcodes */ #define X_XIQueryPointer 40 #define X_XIWarpPointer 41 #define X_XIChangeCursor 42 #define X_XIChangeHierarchy 43 #define X_XISetClientPointer 44 #define X_XIGetClientPointer 45 #define X_XISelectEvents 46 #define X_XIQueryVersion 47 #define X_XIQueryDevice 48 #define X_XISetFocus 49 #define X_XIGetFocus 50 #define X_XIGrabDevice 51 #define X_XIUngrabDevice 52 #define X_XIAllowEvents 53 #define X_XIPassiveGrabDevice 54 #define X_XIPassiveUngrabDevice 55 #define X_XIListProperties 56 #define X_XIChangeProperty 57 #define X_XIDeleteProperty 58 #define X_XIGetProperty 59 #define X_XIGetSelectedEvents 60 #define X_XIBarrierReleasePointer 61 /** Number of XI requests */ #define XI2REQUESTS (X_XIBarrierReleasePointer - X_XIQueryPointer + 1) /** Number of XI2 events */ #define XI2EVENTS (XI_LASTEVENT + 1) /************************************************************************************* * * * COMMON STRUCTS * * * *************************************************************************************/ /** Fixed point 16.16 */ typedef int32_t FP1616; /** Fixed point 32.32 */ typedef struct { int32_t integral; uint32_t frac; } FP3232; /** * Struct to describe a device. * * For a MasterPointer or a MasterKeyboard, 'attachment' specifies the * paired master device. * For a SlaveKeyboard or SlavePointer, 'attachment' specifies the master * device this device is attached to. * For a FloatingSlave, 'attachment' is undefined. */ typedef struct { uint16_t deviceid; uint16_t use; /**< ::XIMasterPointer, ::XIMasterKeyboard, ::XISlavePointer, ::XISlaveKeyboard, ::XIFloatingSlave */ uint16_t attachment; /**< Current attachment or pairing.*/ uint16_t num_classes; /**< Number of classes following this struct. */ uint16_t name_len; /**< Length of name in bytes. */ uint8_t enabled; /**< TRUE if device is enabled. */ uint8_t pad; } xXIDeviceInfo; /** * Default template for a device class. * A device class is equivalent to a device's capabilities. Multiple classes * are supported per device. */ typedef struct { uint16_t type; /**< One of *class */ uint16_t length; /**< Length in 4 byte units */ uint16_t sourceid; /**< source device for this class */ uint16_t pad; } xXIAnyInfo; /** * Denotes button capability on a device. * Struct is followed by a button bit-mask (padded to four byte chunks) and * then num_buttons * Atom that names the buttons in the device-native setup * (i.e. ignoring button mappings). */ typedef struct { uint16_t type; /**< Always ButtonClass */ uint16_t length; /**< Length in 4 byte units */ uint16_t sourceid; /**< source device for this class */ uint16_t num_buttons; /**< Number of buttons provided */ } xXIButtonInfo; /** * Denotes key capability on a device. * Struct is followed by num_keys * CARD32 that lists the keycodes available * on the device. */ typedef struct { uint16_t type; /**< Always KeyClass */ uint16_t length; /**< Length in 4 byte units */ uint16_t sourceid; /**< source device for this class */ uint16_t num_keycodes; /**< Number of keys provided */ } xXIKeyInfo; /** * Denotes an valuator capability on a device. * One XIValuatorInfo describes exactly one valuator (axis) on the device. */ typedef struct { uint16_t type; /**< Always ValuatorClass */ uint16_t length; /**< Length in 4 byte units */ uint16_t sourceid; /**< source device for this class */ uint16_t number; /**< Valuator number */ Atom label; /**< Axis label */ FP3232 min; /**< Min value */ FP3232 max; /**< Max value */ FP3232 value; /**< Last published value */ uint32_t resolution; /**< Resolutions in units/m */ uint8_t mode; /**< ModeRelative or ModeAbsolute */ uint8_t pad1; uint16_t pad2; } xXIValuatorInfo; /*** * Denotes a scroll valuator on a device. * One XIScrollInfo describes exactly one scroll valuator that must have a * XIValuatorInfo struct. */ typedef struct { uint16_t type; /**< Always ValuatorClass */ uint16_t length; /**< Length in 4 byte units */ uint16_t sourceid; /**< source device for this class */ uint16_t number; /**< Valuator number */ uint16_t scroll_type; /**< ::XIScrollTypeVertical, ::XIScrollTypeHorizontal */ uint16_t pad0; uint32_t flags; /**< ::XIScrollFlagEmulate, ::XIScrollFlagPreferred */ FP3232 increment; /**< Increment for one unit of scrolling */ } xXIScrollInfo; /** * Denotes multitouch capability on a device. */ typedef struct { uint16_t type; /**< Always TouchClass */ uint16_t length; /**< Length in 4 byte units */ uint16_t sourceid; /**< source device for this class */ uint8_t mode; /**< DirectTouch or DependentTouch */ uint8_t num_touches; /**< Maximum number of touches (0==unlimited) */ } xXITouchInfo; /** * Used to select for events on a given window. * Struct is followed by (mask_len * CARD8), with each bit set representing * the event mask for the given type. A mask bit represents an event type if * (mask == (1 << type)). */ typedef struct { uint16_t deviceid; /**< Device id to select for */ uint16_t mask_len; /**< Length of mask in 4 byte units */ } xXIEventMask; /** * XKB modifier information. * The effective modifier is a binary mask of base, latched, and locked * modifiers. */ typedef struct { uint32_t base_mods; /**< Logically pressed modifiers */ uint32_t latched_mods; /**< Logically latched modifiers */ uint32_t locked_mods; /**< Logically locked modifiers */ uint32_t effective_mods; /**< Effective modifiers */ } xXIModifierInfo; /** * XKB group information. * The effective group is the mathematical sum of base, latched, and locked * group after group wrapping is taken into account. */ typedef struct { uint8_t base_group; /**< Logically "pressed" group */ uint8_t latched_group; /**< Logically latched group */ uint8_t locked_group; /**< Logically locked group */ uint8_t effective_group; /**< Effective group */ } xXIGroupInfo; /************************************************************************************* * * * REQUESTS * * * *************************************************************************************/ /** * Query the server for the supported X Input extension version. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XIQueryVersion */ uint16_t length; /**< Length in 4 byte units */ uint16_t major_version; uint16_t minor_version; } xXIQueryVersionReq; #define sz_xXIQueryVersionReq 8 typedef struct { uint8_t repType; /**< ::X_Reply */ uint8_t RepType; /**< Always ::X_XIQueryVersion */ uint16_t sequenceNumber; uint32_t length; uint16_t major_version; uint16_t minor_version; uint32_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; } xXIQueryVersionReply; #define sz_xXIQueryVersionReply 32 /** * Query the server for information about a specific device or all input * devices. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XIQueryDevice */ uint16_t length; /**< Length in 4 byte units */ uint16_t deviceid; uint16_t pad; } xXIQueryDeviceReq; #define sz_xXIQueryDeviceReq 8 typedef struct { uint8_t repType; /**< ::X_Reply */ uint8_t RepType; /**< Always ::X_XIQueryDevice */ uint16_t sequenceNumber; uint32_t length; uint16_t num_devices; uint16_t pad0; uint32_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; } xXIQueryDeviceReply; #define sz_xXIQueryDeviceReply 32 /** * Select for events on a given window. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XISelectEvents */ uint16_t length; /**< Length in 4 byte units */ Window win; uint16_t num_masks; uint16_t pad; } xXISelectEventsReq; #define sz_xXISelectEventsReq 12 /** * Query for selected events on a given window. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XIGetSelectedEvents */ uint16_t length; /**< Length in 4 byte units */ Window win; } xXIGetSelectedEventsReq; #define sz_xXIGetSelectedEventsReq 8 typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always ::X_XIGetSelectedEvents */ uint16_t sequenceNumber; uint32_t length; uint16_t num_masks; /**< Number of xXIEventMask structs trailing the reply */ uint16_t pad0; uint32_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; } xXIGetSelectedEventsReply; #define sz_xXIGetSelectedEventsReply 32 /** * Query the given device's screen/window coordinates. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XIQueryPointer */ uint16_t length; /**< Length in 4 byte units */ Window win; uint16_t deviceid; uint16_t pad1; } xXIQueryPointerReq; #define sz_xXIQueryPointerReq 12 typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always ::X_XIQueryPointer */ uint16_t sequenceNumber; uint32_t length; Window root; Window child; FP1616 root_x; FP1616 root_y; FP1616 win_x; FP1616 win_y; uint8_t same_screen; uint8_t pad0; uint16_t buttons_len; xXIModifierInfo mods; xXIGroupInfo group; } xXIQueryPointerReply; #define sz_xXIQueryPointerReply 56 /** * Warp the given device's pointer to the specified position. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XIWarpPointer */ uint16_t length; /**< Length in 4 byte units */ Window src_win; Window dst_win; FP1616 src_x; FP1616 src_y; uint16_t src_width; uint16_t src_height; FP1616 dst_x; FP1616 dst_y; uint16_t deviceid; uint16_t pad1; } xXIWarpPointerReq; #define sz_xXIWarpPointerReq 36 /** * Change the given device's sprite to the given cursor. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XIChangeCursor */ uint16_t length; /**< Length in 4 byte units */ Window win; Cursor cursor; uint16_t deviceid; uint16_t pad1; } xXIChangeCursorReq; #define sz_xXIChangeCursorReq 16 /** * Modify the device hierarchy. */ typedef struct { uint8_t reqType; /**< Input extension major code */ uint8_t ReqType; /**< Always ::X_XIChangeHierarchy */ uint16_t length; /**< Length in 4 byte units */ uint8_t num_changes; uint8_t pad0; uint16_t pad1; } xXIChangeHierarchyReq; #define sz_xXIChangeHierarchyReq 8 /** * Generic header for any hierarchy change. */ typedef struct { uint16_t type; uint16_t length; /**< Length in 4 byte units */ } xXIAnyHierarchyChangeInfo; /** * Create a new master device. * Name of new master follows struct (4-byte padded) */ typedef struct { uint16_t type; /**< Always ::XIAddMaster */ uint16_t length; /**< 2 + (namelen + padding)/4 */ uint16_t name_len; uint8_t send_core; uint8_t enable; } xXIAddMasterInfo; /** * Delete a master device. Will automatically delete the master device paired * with the given master device. */ typedef struct { uint16_t type; /**< Always ::XIRemoveMaster */ uint16_t length; /**< 3 */ uint16_t deviceid; uint8_t return_mode; /**< ::XIAttachToMaster, ::XIFloating */ uint8_t pad; uint16_t return_pointer; /**< Pointer to attach slave ptr devices to */ uint16_t return_keyboard; /**< keyboard to attach slave keybd devices to*/ } xXIRemoveMasterInfo; /** * Attach an SD to a new device. * NewMaster has to be of same type (pointer->pointer, keyboard->keyboard); */ typedef struct { uint16_t type; /**< Always ::XIAttachSlave */ uint16_t length; /**< 2 */ uint16_t deviceid; uint16_t new_master; /**< id of new master device */ } xXIAttachSlaveInfo; /** * Detach an SD from its current master device. */ typedef struct { uint16_t type; /**< Always ::XIDetachSlave */ uint16_t length; /**< 2 */ uint16_t deviceid; uint16_t pad; } xXIDetachSlaveInfo; /** * Set the window/client's ClientPointer. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XISetClientPointer */ uint16_t length; /**< Length in 4 byte units */ Window win; uint16_t deviceid; uint16_t pad1; } xXISetClientPointerReq; #define sz_xXISetClientPointerReq 12 /** * Query the given window/client's ClientPointer setting. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_GetClientPointer */ uint16_t length; /**< Length in 4 byte units */ Window win; } xXIGetClientPointerReq; #define sz_xXIGetClientPointerReq 8 typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always ::X_GetClientPointer */ uint16_t sequenceNumber; uint32_t length; BOOL set; /**< client pointer is set? */ uint8_t pad0; uint16_t deviceid; uint32_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; } xXIGetClientPointerReply; #define sz_xXIGetClientPointerReply 32 /** * Set the input focus to the specified window. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XISetFocus */ uint16_t length; /**< Length in 4 byte units */ Window focus; Time time; uint16_t deviceid; uint16_t pad0; } xXISetFocusReq; #define sz_xXISetFocusReq 16 /** * Query the current input focus. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIGetDeviceFocus */ uint16_t length; /**< Length in 4 byte units */ uint16_t deviceid; uint16_t pad0; } xXIGetFocusReq; #define sz_xXIGetFocusReq 8 typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always ::X_XIGetFocus */ uint16_t sequenceNumber; uint32_t length; Window focus; uint32_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; } xXIGetFocusReply; #define sz_xXIGetFocusReply 32 /** * Grab the given device. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIGrabDevice */ uint16_t length; /**< Length in 4 byte units */ Window grab_window; Time time; Cursor cursor; uint16_t deviceid; uint8_t grab_mode; uint8_t paired_device_mode; uint8_t owner_events; uint8_t pad; uint16_t mask_len; } xXIGrabDeviceReq; #define sz_xXIGrabDeviceReq 24 /** * Return codes from a XIPassiveGrabDevice request. */ typedef struct { uint32_t modifiers; /**< Modifier state */ uint8_t status; /**< Grab status code */ uint8_t pad0; uint16_t pad1; } xXIGrabModifierInfo; typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always ::X_XIGrabDevice */ uint16_t sequenceNumber; uint32_t length; uint8_t status; uint8_t pad0; uint16_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; uint32_t pad6; } xXIGrabDeviceReply; #define sz_xXIGrabDeviceReply 32 /** * Ungrab the specified device. * */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIUngrabDevice */ uint16_t length; /**< Length in 4 byte units */ Time time; uint16_t deviceid; uint16_t pad; } xXIUngrabDeviceReq; #define sz_xXIUngrabDeviceReq 12 /** * Allow or replay events on the specified grabbed device. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIAllowEvents */ uint16_t length; /**< Length in 4 byte units */ Time time; uint16_t deviceid; uint8_t mode; uint8_t pad; } xXIAllowEventsReq; #define sz_xXIAllowEventsReq 12 /** * Allow or replay events on the specified grabbed device. * Since XI 2.2 */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIAllowEvents */ uint16_t length; /**< Length in 4 byte units */ Time time; uint16_t deviceid; uint8_t mode; uint8_t pad; uint32_t touchid; /**< Since XI 2.2 */ Window grab_window; /**< Since XI 2.2 */ } xXI2_2AllowEventsReq; #define sz_xXI2_2AllowEventsReq 20 /** * Passively grab the device. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIPassiveGrabDevice */ uint16_t length; /**< Length in 4 byte units */ Time time; Window grab_window; Cursor cursor; uint32_t detail; uint16_t deviceid; uint16_t num_modifiers; uint16_t mask_len; uint8_t grab_type; uint8_t grab_mode; uint8_t paired_device_mode; uint8_t owner_events; uint16_t pad1; } xXIPassiveGrabDeviceReq; #define sz_xXIPassiveGrabDeviceReq 32 typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always ::X_XIPassiveGrabDevice */ uint16_t sequenceNumber; uint32_t length; uint16_t num_modifiers; uint16_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; uint32_t pad6; } xXIPassiveGrabDeviceReply; #define sz_xXIPassiveGrabDeviceReply 32 /** * Delete a passive grab for the given device. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIPassiveUngrabDevice */ uint16_t length; /**< Length in 4 byte units */ Window grab_window; uint32_t detail; uint16_t deviceid; uint16_t num_modifiers; uint8_t grab_type; uint8_t pad0; uint16_t pad1; } xXIPassiveUngrabDeviceReq; #define sz_xXIPassiveUngrabDeviceReq 20 /** * List all device properties on the specified device. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIListProperties */ uint16_t length; /**< Length in 4 byte units */ uint16_t deviceid; uint16_t pad; } xXIListPropertiesReq; #define sz_xXIListPropertiesReq 8 typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always ::X_XIListProperties */ uint16_t sequenceNumber; uint32_t length; uint16_t num_properties; uint16_t pad0; uint32_t pad1; uint32_t pad2; uint32_t pad3; uint32_t pad4; uint32_t pad5; } xXIListPropertiesReply; #define sz_xXIListPropertiesReply 32 /** * Change a property on the specified device. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always ::X_XIChangeProperty */ uint16_t length; /**< Length in 4 byte units */ uint16_t deviceid; uint8_t mode; uint8_t format; Atom property; Atom type; uint32_t num_items; } xXIChangePropertyReq; #define sz_xXIChangePropertyReq 20 /** * Delete the specified property. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always X_XIDeleteProperty */ uint16_t length; /**< Length in 4 byte units */ uint16_t deviceid; uint16_t pad0; Atom property; } xXIDeletePropertyReq; #define sz_xXIDeletePropertyReq 12 /** * Query the specified property's values. */ typedef struct { uint8_t reqType; uint8_t ReqType; /**< Always X_XIGetProperty */ uint16_t length; /**< Length in 4 byte units */ uint16_t deviceid; #if defined(__cplusplus) || defined(c_plusplus) uint8_t c_delete; #else uint8_t delete; #endif uint8_t pad0; Atom property; Atom type; uint32_t offset; uint32_t len; } xXIGetPropertyReq; #define sz_xXIGetPropertyReq 24 typedef struct { uint8_t repType; /**< Input extension major opcode */ uint8_t RepType; /**< Always X_XIGetProperty */ uint16_t sequenceNumber; uint32_t length; Atom type; uint32_t bytes_after; uint32_t num_items; uint8_t format; uint8_t pad0; uint16_t pad1; uint32_t pad2; uint32_t pad3; } xXIGetPropertyReply; #define sz_xXIGetPropertyReply 32 typedef struct { uint16_t deviceid; uint16_t pad; Barrier barrier; uint32_t eventid; } xXIBarrierReleasePointerInfo; typedef struct { uint8_t reqType; /**< Input extension major opcode */ uint8_t ReqType; /**< Always X_XIBarrierReleasePointer */ uint16_t length; uint32_t num_barriers; /* array of xXIBarrierReleasePointerInfo */ } xXIBarrierReleasePointerReq; #define sz_xXIBarrierReleasePointerReq 8 /************************************************************************************* * * * EVENTS * * * *************************************************************************************/ /** * Generic XI2 event header. All XI2 events use the same header. */ typedef struct { uint8_t type; uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; uint16_t evtype; uint16_t deviceid; Time time; } xXIGenericDeviceEvent; /** * Device hierarchy information. */ typedef struct { uint16_t deviceid; uint16_t attachment; /**< ID of master or paired device */ uint8_t use; /**< ::XIMasterKeyboard, ::XIMasterPointer, ::XISlaveKeyboard, ::XISlavePointer, ::XIFloatingSlave */ BOOL enabled; /**< TRUE if the device is enabled */ uint16_t pad; uint32_t flags; /**< ::XIMasterAdded, ::XIMasterRemoved, ::XISlaveAttached, ::XISlaveDetached, ::XISlaveAdded, ::XISlaveRemoved, ::XIDeviceEnabled, ::XIDeviceDisabled */ } xXIHierarchyInfo; /** * The device hierarchy has been modified. This event includes the device * hierarchy after the modification has been applied. */ typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte units */ uint16_t evtype; /**< ::XI_Hierarchy */ uint16_t deviceid; Time time; uint32_t flags; /**< ::XIMasterAdded, ::XIMasterDeleted, ::XISlaveAttached, ::XISlaveDetached, ::XISlaveAdded, ::XISlaveRemoved, ::XIDeviceEnabled, ::XIDeviceDisabled */ uint16_t num_info; uint16_t pad0; uint32_t pad1; uint32_t pad2; } xXIHierarchyEvent; /** * A device has changed capabilities. */ typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte units */ uint16_t evtype; /**< XI_DeviceChanged */ uint16_t deviceid; /**< Device that has changed */ Time time; uint16_t num_classes; /**< Number of classes that have changed */ uint16_t sourceid; /**< Source of the new classes */ uint8_t reason; /**< ::XISlaveSwitch, ::XIDeviceChange */ uint8_t pad0; uint16_t pad1; uint32_t pad2; uint32_t pad3; } xXIDeviceChangedEvent; /** * The owner of a touch stream has passed on ownership to another client. */ typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte units */ uint16_t evtype; /**< XI_TouchOwnership */ uint16_t deviceid; /**< Device that has changed */ Time time; uint32_t touchid; Window root; Window event; Window child; /* └──────── 32 byte boundary ────────┘ */ uint16_t sourceid; uint16_t pad0; uint32_t flags; uint32_t pad1; uint32_t pad2; } xXITouchOwnershipEvent; /** * Default input event for pointer, keyboard or touch input. */ typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte uints */ uint16_t evtype; uint16_t deviceid; Time time; uint32_t detail; /**< Keycode or button */ Window root; Window event; Window child; /* └──────── 32 byte boundary ────────┘ */ FP1616 root_x; /**< Always screen coords, 16.16 fixed point */ FP1616 root_y; FP1616 event_x; /**< Always screen coords, 16.16 fixed point */ FP1616 event_y; uint16_t buttons_len; /**< Len of button flags in 4 b units */ uint16_t valuators_len; /**< Len of val. flags in 4 b units */ uint16_t sourceid; /**< The source device */ uint16_t pad0; uint32_t flags; /**< ::XIKeyRepeat */ xXIModifierInfo mods; xXIGroupInfo group; } xXIDeviceEvent; /** * Sent when an input event is generated. RawEvents include valuator * information in both device-specific data (i.e. unaccelerated) and * processed data (i.e. accelerated, if applicable). */ typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte uints */ uint16_t evtype; /**< ::XI_RawEvent */ uint16_t deviceid; Time time; uint32_t detail; uint16_t sourceid; /**< The source device (XI 2.1) */ uint16_t valuators_len; /**< Length of trailing valuator mask in 4 byte units */ uint32_t flags; /**< ::XIKeyRepeat */ uint32_t pad2; } xXIRawEvent; /** * Note that the layout of root, event, child, root_x, root_y, event_x, * event_y must be identical to the xXIDeviceEvent. */ typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte uints */ uint16_t evtype; /**< ::XI_Enter */ uint16_t deviceid; Time time; uint16_t sourceid; uint8_t mode; uint8_t detail; Window root; Window event; Window child; /* └──────── 32 byte boundary ────────┘ */ FP1616 root_x; FP1616 root_y; FP1616 event_x; FP1616 event_y; BOOL same_screen; BOOL focus; uint16_t buttons_len; /**< Length of trailing button mask in 4 byte units */ xXIModifierInfo mods; xXIGroupInfo group; } xXIEnterEvent; typedef xXIEnterEvent xXILeaveEvent; typedef xXIEnterEvent xXIFocusInEvent; typedef xXIEnterEvent xXIFocusOutEvent; /** * Sent when a device property is created, modified or deleted. Does not * include property data, the client is required to query the data. */ typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte units */ uint16_t evtype; /**< ::XI_PropertyEvent */ uint16_t deviceid; Time time; Atom property; uint8_t what; /**< ::XIPropertyDeleted, ::XIPropertyCreated, ::XIPropertyMotified */ uint8_t pad0; uint16_t pad1; uint32_t pad2; uint32_t pad3; } xXIPropertyEvent; typedef struct { uint8_t type; /**< Always GenericEvent */ uint8_t extension; /**< XI extension offset */ uint16_t sequenceNumber; uint32_t length; /**< Length in 4 byte units */ uint16_t evtype; /**< ::XI_BarrierHit or ::XI_BarrierLeave */ uint16_t deviceid; Time time; uint32_t eventid; Window root; Window event; Barrier barrier; /* └──────── 32 byte boundary ────────┘ */ uint32_t dtime; uint32_t flags; /**< ::XIBarrierPointerReleased ::XIBarrierDeviceIsGrabbed */ uint16_t sourceid; int16_t pad; FP1616 root_x; FP1616 root_y; FP3232 dx; FP3232 dy; } xXIBarrierEvent; typedef xXIBarrierEvent xXIBarrierHitEvent; typedef xXIBarrierEvent xXIBarrierPointerReleasedEvent; typedef xXIBarrierEvent xXIBarrierLeaveEvent; #undef Window #undef Time #undef Atom #undef Cursor #undef Barrier #endif /* _XI2PROTO_H_ */ PKZS[ X11/extensions/Xv.hnu[/*********************************************************** Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef XV_H #define XV_H /* ** File: ** ** Xv.h --- Xv shared library and server header file ** ** Author: ** ** David Carver (Digital Workstation Engineering/Project Athena) ** ** Revisions: ** ** 05.15.91 Carver ** - version 2.0 upgrade ** ** 01.24.91 Carver ** - version 1.4 upgrade ** */ #include #define XvName "XVideo" #define XvVersion 2 #define XvRevision 2 /* Symbols */ typedef XID XvPortID; typedef XID XvEncodingID; #define XvNone 0 #define XvInput 0 #define XvOutput 1 #define XvInputMask (1< for the library interfaces." #warning "include for the protocol defines." #include PKZv>X11/extensions/xf86dga1str.hnu[#warning "xf86dga1str.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include PKZfX11/extensions/agproto.hnu[/* Copyright 1996, 1998, 2001 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _AGPROTO_H_ /* { */ #define _AGPROTO_H_ #include #define X_XagQueryVersion 0 #define X_XagCreate 1 #define X_XagDestroy 2 #define X_XagGetAttr 3 #define X_XagQuery 4 #define X_XagCreateAssoc 5 #define X_XagDestroyAssoc 6 #define XAppGroup CARD32 /* * Redefine some basic types used by structures defined herein. This allows * both the library and server to view communicated data as 32-bit entities, * thus preventing problems on 64-bit architectures where libXext sees this * data as 64 bits and the server sees it as 32 bits. */ #define Colormap CARD32 #define VisualID CARD32 #define Window CARD32 typedef struct _XagQueryVersion { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagQueryVersion */ CARD16 length; CARD16 client_major_version; CARD16 client_minor_version; } xXagQueryVersionReq; #define sz_xXagQueryVersionReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequence_number; CARD32 length; CARD16 server_major_version; CARD16 server_minor_version; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXagQueryVersionReply; #define sz_xXagQueryVersionReply 32 /* Set AppGroup Attributes masks */ #define XagSingleScreenMask 1 << 0 #define XagDefaultRootMask 1 << XagNdefaultRoot #define XagRootVisualMask 1 << XagNrootVisual #define XagDefaultColormapMask 1 << XagNdefaultColormap #define XagBlackPixelMask 1 << XagNblackPixel #define XagWhitePixelMask 1 << XagNwhitePixel #define XagAppGroupLeaderMask 1 << XagNappGroupLeader typedef struct _XagCreate { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagCreate */ CARD16 length; XAppGroup app_group; CARD32 attrib_mask; /* LISTofVALUE follows */ } xXagCreateReq; #define sz_xXagCreateReq 12 typedef struct _XagDestroy { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagDestroy */ CARD16 length; XAppGroup app_group; } xXagDestroyReq; #define sz_xXagDestroyReq 8 typedef struct _XagGetAttr { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagGetAttr */ CARD16 length; XAppGroup app_group; } xXagGetAttrReq; #define sz_xXagGetAttrReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequence_number; CARD32 length; Window default_root; VisualID root_visual; Colormap default_colormap; CARD32 black_pixel; CARD32 white_pixel; BOOL single_screen; BOOL app_group_leader; CARD16 pad2; } xXagGetAttrReply; #define sz_xXagGetAttrReply 32 typedef struct _XagQuery { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagQuery */ CARD16 length; CARD32 resource; } xXagQueryReq; #define sz_xXagQueryReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequence_number; CARD32 length; XAppGroup app_group; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXagQueryReply; #define sz_xXagQueryReply 32 typedef struct _XagCreateAssoc { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagCreateAssoc */ CARD16 length; Window window; CARD16 window_type; CARD16 system_window_len; /* LISTofCARD8 follows */ } xXagCreateAssocReq; #define sz_xXagCreateAssocReq 12 typedef struct _XagDestroyAssoc { CARD8 reqType; /* always XagReqCode */ CARD8 xagReqType; /* always X_XagDestroyAssoc */ CARD16 length; Window window; } xXagDestroyAssocReq; #define sz_xXagDestroyAssocReq 8 #undef XAppGroup /* * Cancel the previous redefinition of the basic types, thus restoring their * X.h definitions. */ #undef Window #undef Colormap #undef VisualID #endif /* } _AGPROTO_H_ */ PKZŇkX11/extensions/mitmiscconst.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ********************************************************/ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ #ifndef _MITMISCCONST_H_ #define _MITMISCCONST_H_ #define MITMiscNumberEvents 0 #define MITMiscNumberErrors 0 #define MITMISCNAME "MIT-SUNDRY-NONSTANDARD" #endif PKZc_Q/ / X11/extensions/geproto.hnu[/* * Copyright © 2007-2008 Peter Hutterer * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * Authors: Peter Hutterer, University of South Australia, NICTA * */ #ifndef _GEPROTO_H_ #define _GEPROTO_H_ #include #include #include /********************************************************* * * Protocol request constants * */ #define X_GEGetExtensionVersion 1 /********************************************************* * * XGE protocol requests/replies * */ /* generic request */ typedef struct { CARD8 reqType; CARD8 ReqType; CARD16 length; } xGEReq; /* QueryVersion */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GEQueryVersion */ CARD16 length; CARD16 majorVersion; CARD16 minorVersion; } xGEQueryVersionReq; #define sz_xGEQueryVersionReq 8 typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GEQueryVersion */ CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; CARD16 minorVersion; CARD32 pad00; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; } xGEQueryVersionReply; #define sz_xGEQueryVersionReply 32 #endif /* _GEPROTO_H_ */ PKZֺ E E X11/extensions/dmx.hnu[/* * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* * Authors: * Rickard E. (Rik) Faith * */ /** \file * This file describes the interface to the client-side libdmx.a * library. All DMX-aware client-side applications should include this * file. */ #ifndef _DMX_H_ #define _DMX_H_ /* These values must be larger than LastExtensionError. The values in dmxext.h and dmxproto.h *MUST* match. */ #define DmxBadXinerama 1001 #define DmxBadValue 1002 #define DmxBadReply 1003 #define DMXScreenWindowWidth (1L<<0) #define DMXScreenWindowHeight (1L<<1) #define DMXScreenWindowXoffset (1L<<2) #define DMXScreenWindowYoffset (1L<<3) #define DMXRootWindowWidth (1L<<4) #define DMXRootWindowHeight (1L<<5) #define DMXRootWindowXoffset (1L<<6) #define DMXRootWindowYoffset (1L<<7) #define DMXRootWindowXorigin (1L<<8) #define DMXRootWindowYorigin (1L<<9) #define DMXDesktopWidth (1L<<0) #define DMXDesktopHeight (1L<<1) #define DMXDesktopShiftX (1L<<2) #define DMXDesktopShiftY (1L<<3) #define DMXInputType (1L<<0) #define DMXInputPhysicalScreen (1L<<1) #define DMXInputSendsCore (1L<<2) #endif PKZu<X11/extensions/dri3proto.hnu[/* * Copyright © 2013 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef _DRI3_PROTO_H_ #define _DRI3_PROTO_H_ #define DRI3_NAME "DRI3" #define DRI3_MAJOR 1 #define DRI3_MINOR 2 #define DRI3NumberErrors 0 #define DRI3NumberEvents 0 #define X_DRI3QueryVersion 0 #define X_DRI3Open 1 #define X_DRI3PixmapFromBuffer 2 #define X_DRI3BufferFromPixmap 3 #define X_DRI3FenceFromFD 4 #define X_DRI3FDFromFence 5 /* v1.2 */ #define xDRI3GetSupportedModifiers 6 #define xDRI3PixmapFromBuffers 7 #define xDRI3BuffersFromPixmap 8 #define DRI3NumberRequests 9 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xDRI3QueryVersionReq; #define sz_xDRI3QueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDRI3QueryVersionReply; #define sz_xDRI3QueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 drawable; CARD32 provider; } xDRI3OpenReq; #define sz_xDRI3OpenReq 12 typedef struct { BYTE type; /* X_Reply */ CARD8 nfd; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xDRI3OpenReply; #define sz_xDRI3OpenReply 32 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 pixmap; CARD32 drawable; CARD32 size; CARD16 width; CARD16 height; CARD16 stride; CARD8 depth; CARD8 bpp; } xDRI3PixmapFromBufferReq; #define sz_xDRI3PixmapFromBufferReq 24 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 pixmap; } xDRI3BufferFromPixmapReq; #define sz_xDRI3BufferFromPixmapReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 nfd; /* Number of file descriptors returned (1) */ CARD16 sequenceNumber; CARD32 length; CARD32 size; CARD16 width; CARD16 height; CARD16 stride; CARD8 depth; CARD8 bpp; CARD32 pad20; CARD32 pad24; CARD32 pad28; } xDRI3BufferFromPixmapReply; #define sz_xDRI3BufferFromPixmapReply 32 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 drawable; CARD32 fence; BOOL initially_triggered; CARD8 pad13; CARD16 pad14; } xDRI3FenceFromFDReq; #define sz_xDRI3FenceFromFDReq 16 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 drawable; CARD32 fence; } xDRI3FDFromFenceReq; #define sz_xDRI3FDFromFenceReq 12 typedef struct { BYTE type; /* X_Reply */ CARD8 nfd; /* Number of file descriptors returned (1) */ CARD16 sequenceNumber; CARD32 length; CARD32 pad08; CARD32 pad12; CARD32 pad16; CARD32 pad20; CARD32 pad24; CARD32 pad28; } xDRI3FDFromFenceReply; #define sz_xDRI3FDFromFenceReply 32 /* v1.2 */ typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 window; CARD8 depth; CARD8 bpp; CARD16 pad10; } xDRI3GetSupportedModifiersReq; #define sz_xDRI3GetSupportedModifiersReq 12 typedef struct { BYTE type; /* X_Reply */ CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numWindowModifiers; CARD32 numScreenModifiers; CARD32 pad16; CARD32 pad20; CARD32 pad24; CARD32 pad28; } xDRI3GetSupportedModifiersReply; #define sz_xDRI3GetSupportedModifiersReply 32 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 pixmap; CARD32 window; CARD8 num_buffers; /* Number of file descriptors passed */ CARD8 pad13; CARD16 pad14; CARD16 width; CARD16 height; CARD32 stride0; CARD32 offset0; CARD32 stride1; CARD32 offset1; CARD32 stride2; CARD32 offset2; CARD32 stride3; CARD32 offset3; CARD8 depth; CARD8 bpp; CARD16 pad54; CARD64 modifier; } xDRI3PixmapFromBuffersReq; #define sz_xDRI3PixmapFromBuffersReq 64 typedef struct { CARD8 reqType; CARD8 dri3ReqType; CARD16 length; CARD32 pixmap; } xDRI3BuffersFromPixmapReq; #define sz_xDRI3BuffersFromPixmapReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 nfd; /* Number of file descriptors returned */ CARD16 sequenceNumber; CARD32 length; CARD16 width; CARD16 height; CARD32 pad12; CARD64 modifier; CARD8 depth; CARD8 bpp; CARD16 pad26; CARD32 pad28; } xDRI3BuffersFromPixmapReply; #define sz_xDRI3BuffersFromPixmapReply 32 #endif PKZQ_&_&X11/extensions/XI.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ /* Definitions used by the server, library and client */ #ifndef _XI_H_ #define _XI_H_ #define sz_xGetExtensionVersionReq 8 #define sz_xGetExtensionVersionReply 32 #define sz_xListInputDevicesReq 4 #define sz_xListInputDevicesReply 32 #define sz_xOpenDeviceReq 8 #define sz_xOpenDeviceReply 32 #define sz_xCloseDeviceReq 8 #define sz_xSetDeviceModeReq 8 #define sz_xSetDeviceModeReply 32 #define sz_xSelectExtensionEventReq 12 #define sz_xGetSelectedExtensionEventsReq 8 #define sz_xGetSelectedExtensionEventsReply 32 #define sz_xChangeDeviceDontPropagateListReq 12 #define sz_xGetDeviceDontPropagateListReq 8 #define sz_xGetDeviceDontPropagateListReply 32 #define sz_xGetDeviceMotionEventsReq 16 #define sz_xGetDeviceMotionEventsReply 32 #define sz_xChangeKeyboardDeviceReq 8 #define sz_xChangeKeyboardDeviceReply 32 #define sz_xChangePointerDeviceReq 8 #define sz_xChangePointerDeviceReply 32 #define sz_xGrabDeviceReq 20 #define sz_xGrabDeviceReply 32 #define sz_xUngrabDeviceReq 12 #define sz_xGrabDeviceKeyReq 20 #define sz_xGrabDeviceKeyReply 32 #define sz_xUngrabDeviceKeyReq 16 #define sz_xGrabDeviceButtonReq 20 #define sz_xGrabDeviceButtonReply 32 #define sz_xUngrabDeviceButtonReq 16 #define sz_xAllowDeviceEventsReq 12 #define sz_xGetDeviceFocusReq 8 #define sz_xGetDeviceFocusReply 32 #define sz_xSetDeviceFocusReq 16 #define sz_xGetFeedbackControlReq 8 #define sz_xGetFeedbackControlReply 32 #define sz_xChangeFeedbackControlReq 12 #define sz_xGetDeviceKeyMappingReq 8 #define sz_xGetDeviceKeyMappingReply 32 #define sz_xChangeDeviceKeyMappingReq 8 #define sz_xGetDeviceModifierMappingReq 8 #define sz_xSetDeviceModifierMappingReq 8 #define sz_xSetDeviceModifierMappingReply 32 #define sz_xGetDeviceButtonMappingReq 8 #define sz_xGetDeviceButtonMappingReply 32 #define sz_xSetDeviceButtonMappingReq 8 #define sz_xSetDeviceButtonMappingReply 32 #define sz_xQueryDeviceStateReq 8 #define sz_xQueryDeviceStateReply 32 #define sz_xSendExtensionEventReq 16 #define sz_xDeviceBellReq 8 #define sz_xSetDeviceValuatorsReq 8 #define sz_xSetDeviceValuatorsReply 32 #define sz_xGetDeviceControlReq 8 #define sz_xGetDeviceControlReply 32 #define sz_xChangeDeviceControlReq 8 #define sz_xChangeDeviceControlReply 32 #define sz_xListDevicePropertiesReq 8 #define sz_xListDevicePropertiesReply 32 #define sz_xChangeDevicePropertyReq 20 #define sz_xDeleteDevicePropertyReq 12 #define sz_xGetDevicePropertyReq 24 #define sz_xGetDevicePropertyReply 32 #define INAME "XInputExtension" #define XI_KEYBOARD "KEYBOARD" #define XI_MOUSE "MOUSE" #define XI_TABLET "TABLET" #define XI_TOUCHSCREEN "TOUCHSCREEN" #define XI_TOUCHPAD "TOUCHPAD" #define XI_BARCODE "BARCODE" #define XI_BUTTONBOX "BUTTONBOX" #define XI_KNOB_BOX "KNOB_BOX" #define XI_ONE_KNOB "ONE_KNOB" #define XI_NINE_KNOB "NINE_KNOB" #define XI_TRACKBALL "TRACKBALL" #define XI_QUADRATURE "QUADRATURE" #define XI_ID_MODULE "ID_MODULE" #define XI_SPACEBALL "SPACEBALL" #define XI_DATAGLOVE "DATAGLOVE" #define XI_EYETRACKER "EYETRACKER" #define XI_CURSORKEYS "CURSORKEYS" #define XI_FOOTMOUSE "FOOTMOUSE" #define XI_JOYSTICK "JOYSTICK" /* Indices into the versions[] array (XExtInt.c). Used as a index to * retrieve the minimum version of XI from _XiCheckExtInit */ #define Dont_Check 0 #define XInput_Initial_Release 1 #define XInput_Add_XDeviceBell 2 #define XInput_Add_XSetDeviceValuators 3 #define XInput_Add_XChangeDeviceControl 4 #define XInput_Add_DevicePresenceNotify 5 #define XInput_Add_DeviceProperties 6 /* DO NOT ADD TO HERE -> XI2 */ #define XI_Absent 0 #define XI_Present 1 #define XI_Initial_Release_Major 1 #define XI_Initial_Release_Minor 0 #define XI_Add_XDeviceBell_Major 1 #define XI_Add_XDeviceBell_Minor 1 #define XI_Add_XSetDeviceValuators_Major 1 #define XI_Add_XSetDeviceValuators_Minor 2 #define XI_Add_XChangeDeviceControl_Major 1 #define XI_Add_XChangeDeviceControl_Minor 3 #define XI_Add_DevicePresenceNotify_Major 1 #define XI_Add_DevicePresenceNotify_Minor 4 #define XI_Add_DeviceProperties_Major 1 #define XI_Add_DeviceProperties_Minor 5 #define DEVICE_RESOLUTION 1 #define DEVICE_ABS_CALIB 2 #define DEVICE_CORE 3 #define DEVICE_ENABLE 4 #define DEVICE_ABS_AREA 5 #define NoSuchExtension 1 #define COUNT 0 #define CREATE 1 #define NewPointer 0 #define NewKeyboard 1 #define XPOINTER 0 #define XKEYBOARD 1 #define UseXKeyboard 0xFF #define IsXPointer 0 #define IsXKeyboard 1 #define IsXExtensionDevice 2 #define IsXExtensionKeyboard 3 #define IsXExtensionPointer 4 #define AsyncThisDevice 0 #define SyncThisDevice 1 #define ReplayThisDevice 2 #define AsyncOtherDevices 3 #define AsyncAll 4 #define SyncAll 5 #define FollowKeyboard 3 #ifndef RevertToFollowKeyboard #define RevertToFollowKeyboard 3 #endif #define DvAccelNum (1L << 0) #define DvAccelDenom (1L << 1) #define DvThreshold (1L << 2) #define DvKeyClickPercent (1L<<0) #define DvPercent (1L<<1) #define DvPitch (1L<<2) #define DvDuration (1L<<3) #define DvLed (1L<<4) #define DvLedMode (1L<<5) #define DvKey (1L<<6) #define DvAutoRepeatMode (1L<<7) #define DvString (1L << 0) #define DvInteger (1L << 0) #define DeviceMode (1L << 0) #define Relative 0 #define Absolute 1 #define ProximityState (1L << 1) #define InProximity (0L << 1) #define OutOfProximity (1L << 1) #define AddToList 0 #define DeleteFromList 1 #define KeyClass 0 #define ButtonClass 1 #define ValuatorClass 2 #define FeedbackClass 3 #define ProximityClass 4 #define FocusClass 5 #define OtherClass 6 #define AttachClass 7 #define KbdFeedbackClass 0 #define PtrFeedbackClass 1 #define StringFeedbackClass 2 #define IntegerFeedbackClass 3 #define LedFeedbackClass 4 #define BellFeedbackClass 5 #define _devicePointerMotionHint 0 #define _deviceButton1Motion 1 #define _deviceButton2Motion 2 #define _deviceButton3Motion 3 #define _deviceButton4Motion 4 #define _deviceButton5Motion 5 #define _deviceButtonMotion 6 #define _deviceButtonGrab 7 #define _deviceOwnerGrabButton 8 #define _noExtensionEvent 9 #define _devicePresence 0 #define _deviceEnter 0 #define _deviceLeave 1 /* Device presence notify states */ #define DeviceAdded 0 #define DeviceRemoved 1 #define DeviceEnabled 2 #define DeviceDisabled 3 #define DeviceUnrecoverable 4 #define DeviceControlChanged 5 /* XI Errors */ #define XI_BadDevice 0 #define XI_BadEvent 1 #define XI_BadMode 2 #define XI_DeviceBusy 3 #define XI_BadClass 4 /* * Make XEventClass be a CARD32 for 64 bit servers. Don't affect client * definition of XEventClass since that would be a library interface change. * See the top of X.h for more _XSERVER64 magic. * * But, don't actually use the CARD32 type. We can't get it defined here * without polluting the namespace. */ #ifdef _XSERVER64 typedef unsigned int XEventClass; #else typedef unsigned long XEventClass; #endif /******************************************************************* * * Extension version structure. * */ typedef struct { int present; short major_version; short minor_version; } XExtensionVersion; #endif /* _XI_H_ */ PKZhq X11/extensions/dri2tokens.hnu[/* * Copyright © 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- * ware"), to deal in the Software without restriction, including without * limitation the rights to use, copy, modify, merge, publish, distribute, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, provided that the above copyright * notice(s) and this permission notice appear in all copies of the Soft- * ware and that both the above copyright notice(s) and this permission * notice appear in supporting documentation. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- * MANCE OF THIS SOFTWARE. * * Except as contained in this notice, the name of a copyright holder shall * not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization of * the copyright holder. * * Authors: * Kristian Høgsberg (krh@redhat.com) */ #ifndef _DRI2_TOKENS_H_ #define _DRI2_TOKENS_H_ #define DRI2BufferFrontLeft 0 #define DRI2BufferBackLeft 1 #define DRI2BufferFrontRight 2 #define DRI2BufferBackRight 3 #define DRI2BufferDepth 4 #define DRI2BufferStencil 5 #define DRI2BufferAccum 6 #define DRI2BufferFakeFrontLeft 7 #define DRI2BufferFakeFrontRight 8 #define DRI2BufferDepthStencil 9 #define DRI2BufferHiz 10 /* keep bits 16 and above for prime IDs */ #define DRI2DriverPrimeMask 7 /* 0 - 7 - allows for 6 devices*/ #define DRI2DriverPrimeShift 16 #define DRI2DriverPrimeId(x) (((x) >> DRI2DriverPrimeShift) & (DRI2DriverPrimeMask)) #define DRI2DriverDRI 0 #define DRI2DriverVDPAU 1 /* Event sub-types for the swap complete event */ #define DRI2_EXCHANGE_COMPLETE 0x1 #define DRI2_BLIT_COMPLETE 0x2 #define DRI2_FLIP_COMPLETE 0x3 #endif PKZfR  X11/extensions/presenttokens.hnu[/* * Copyright © 2013 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef _PRESENT_TOKENS_H_ #define _PRESENT_TOKENS_H_ #define PRESENT_NAME "Present" #define PRESENT_MAJOR 1 #define PRESENT_MINOR 2 #define PresentNumberErrors 0 #define PresentNumberEvents 0 /* Requests */ #define X_PresentQueryVersion 0 #define X_PresentPixmap 1 #define X_PresentNotifyMSC 2 #define X_PresentSelectInput 3 #define X_PresentQueryCapabilities 4 #define PresentNumberRequests 5 /* Present operation options */ #define PresentOptionNone 0 #define PresentOptionAsync (1 << 0) #define PresentOptionCopy (1 << 1) #define PresentOptionUST (1 << 2) #define PresentOptionSuboptimal (1 << 3) #define PresentAllOptions (PresentOptionAsync | \ PresentOptionCopy | \ PresentOptionUST | \ PresentOptionSuboptimal) /* Present capabilities */ #define PresentCapabilityNone 0 #define PresentCapabilityAsync 1 #define PresentCapabilityFence 2 #define PresentCapabilityUST 4 #define PresentAllCapabilities (PresentCapabilityAsync | \ PresentCapabilityFence | \ PresentCapabilityUST) /* Events */ #define PresentConfigureNotify 0 #define PresentCompleteNotify 1 #define PresentIdleNotify 2 #if PRESENT_FUTURE_VERSION #define PresentRedirectNotify 3 #endif /* Event Masks */ #define PresentConfigureNotifyMask 1 #define PresentCompleteNotifyMask 2 #define PresentIdleNotifyMask 4 #if PRESENT_FUTURE_VERSION #define PresentRedirectNotifyMask 8 #endif #if PRESENT_FUTURE_VERSION #define PRESENT_REDIRECT_NOTIFY_MASK PresentRedirectNotifyMask #else #define PRESENT_REDIRECT_NOTIFY_MASK 0 #endif #define PresentAllEvents (PresentConfigureNotifyMask | \ PresentCompleteNotifyMask | \ PresentIdleNotifyMask | \ PRESENT_REDIRECT_NOTIFY_MASK) /* Complete Kinds */ #define PresentCompleteKindPixmap 0 #define PresentCompleteKindNotifyMSC 1 /* Complete Modes */ #define PresentCompleteModeCopy 0 #define PresentCompleteModeFlip 1 #define PresentCompleteModeSkip 2 #define PresentCompleteModeSuboptimalCopy 3 #endif PKZ։hX11/extensions/syncstr.hnu[/* Copyright 1991, 1993, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /*********************************************************** Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, and Olivetti Research Limited, Cambridge, England. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or Olivetti not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef _SYNCSTR_H_ #define _SYNCSTR_H_ #include #ifdef _SYNC_SERVER #define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */ typedef struct _SyncCounter { ClientPtr client; /* Owning client. 0 for system counters */ XSyncCounter id; /* resource ID */ CARD64 value; /* counter value */ struct _SyncTriggerList *pTriglist; /* list of triggers */ Bool beingDestroyed; /* in process of going away */ struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */ } SyncCounter; /* * The System Counter interface */ typedef enum { XSyncCounterNeverChanges, XSyncCounterNeverIncreases, XSyncCounterNeverDecreases, XSyncCounterUnrestricted } SyncCounterType; typedef struct _SysCounterInfo { char *name; CARD64 resolution; CARD64 bracket_greater; CARD64 bracket_less; SyncCounterType counterType; /* how can this counter change */ void (*QueryValue)( pointer /*pCounter*/, CARD64 * /*freshvalue*/ ); void (*BracketValues)( pointer /*pCounter*/, CARD64 * /*lessthan*/, CARD64 * /*greaterthan*/ ); } SysCounterInfo; typedef struct _SyncTrigger { SyncCounter *pCounter; CARD64 wait_value; /* wait value */ unsigned int value_type; /* Absolute or Relative */ unsigned int test_type; /* transition or Comparision type */ CARD64 test_value; /* trigger event threshold value */ Bool (*CheckTrigger)( struct _SyncTrigger * /*pTrigger*/, CARD64 /*newval*/ ); void (*TriggerFired)( struct _SyncTrigger * /*pTrigger*/ ); void (*CounterDestroyed)( struct _SyncTrigger * /*pTrigger*/ ); } SyncTrigger; typedef struct _SyncTriggerList { SyncTrigger *pTrigger; struct _SyncTriggerList *next; } SyncTriggerList; typedef struct _SyncAlarmClientList { ClientPtr client; XID delete_id; struct _SyncAlarmClientList *next; } SyncAlarmClientList; typedef struct _SyncAlarm { SyncTrigger trigger; ClientPtr client; XSyncAlarm alarm_id; CARD64 delta; int events; int state; SyncAlarmClientList *pEventClients; } SyncAlarm; typedef struct { ClientPtr client; CARD32 delete_id; int num_waitconditions; } SyncAwaitHeader; typedef struct { SyncTrigger trigger; CARD64 event_threshold; SyncAwaitHeader *pHeader; } SyncAwait; typedef union { SyncAwaitHeader header; SyncAwait await; } SyncAwaitUnion; extern pointer SyncCreateSystemCounter( char * /* name */, CARD64 /* initial_value */, CARD64 /* resolution */, SyncCounterType /* change characterization */, void (* /*QueryValue*/ ) ( pointer /* pCounter */, CARD64 * /* pValue_return */), /* XXX prototype */ void (* /*BracketValues*/) ( pointer /* pCounter */, CARD64 * /* pbracket_less */, CARD64 * /* pbracket_greater */) ); extern void SyncChangeCounter( SyncCounter * /* pCounter*/, CARD64 /* new_value */ ); extern void SyncDestroySystemCounter( pointer pCounter ); extern void InitServertime(void); #endif /* _SYNC_SERVER */ #endif /* _SYNCSTR_H_ */ PKZqФNnnX11/extensions/xtestext1proto.hnu[/* * xtestext1.h * * X11 Input Synthesis Extension include file */ /* Copyright 1986, 1987, 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Hewlett-Packard makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. This software is not subject to any license of the American Telephone and Telegraph Company or of the Regents of the University of California. */ #ifndef _XTESTEXT1PROTO_H #define _XTESTEXT1PROTO_H 1 #include /* * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h */ /* * XTest request type values * * used in the XTest extension protocol requests */ #define X_TestFakeInput 1 #define X_TestGetInput 2 #define X_TestStopInput 3 #define X_TestReset 4 #define X_TestQueryInputSize 5 /* * This defines the maximum size of a list of input actions * to be sent to the server. It should always be a multiple of * 4 so that the entire xTestFakeInputReq structure size is a * multiple of 4. */ typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 XTestReqType; /* always X_TestFakeInput */ CARD16 length; /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */ CARD32 ack; CARD8 action_list[XTestMAX_ACTION_LIST_SIZE]; } xTestFakeInputReq; #define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8) typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 XTestReqType; /* always X_TestGetInput */ CARD16 length; /* 2 */ CARD32 mode; } xTestGetInputReq; #define sz_xTestGetInputReq 8 typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 XTestReqType; /* always X_TestStopInput */ CARD16 length; /* 1 */ } xTestStopInputReq; #define sz_xTestStopInputReq 4 typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 XTestReqType; /* always X_TestReset */ CARD16 length; /* 1 */ } xTestResetReq; #define sz_xTestResetReq 4 typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 XTestReqType; /* always X_TestQueryInputSize */ CARD16 length; /* 1 */ } xTestQueryInputSizeReq; #define sz_xTestQueryInputSizeReq 4 /* * This is the definition of the reply for the xTestQueryInputSize * request. It should remain the same minimum size as other replies * (32 bytes). */ typedef struct { CARD8 type; /* always X_Reply */ CARD8 pad1; CARD16 sequenceNumber; CARD32 length; /* always 0 */ CARD32 size_return; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xTestQueryInputSizeReply; /* * This is the definition for the input action wire event structure. * This event is sent to the client when the server has one or * more user input actions to report to the client. It must * remain the same size as all other wire events (32 bytes). */ typedef struct { CARD8 type; /* always XTestInputActionType */ CARD8 pad00; CARD16 sequenceNumber; CARD8 actions[XTestACTIONS_SIZE]; } xTestInputActionEvent; /* * This is the definition for the xTestFakeAck wire event structure. * This event is sent to the client when the server has completely * processed its input action buffer, and is ready for more. * It must remain the same size as all other wire events (32 bytes). */ typedef struct { CARD8 type; /* always XTestFakeAckType */ CARD8 pad00; CARD16 sequenceNumber; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; CARD32 pad06; CARD32 pad07; CARD32 pad08; } xTestFakeAckEvent; /* * These are the definitions for key/button motion input actions. */ typedef struct { CARD8 header; /* which device, key up/down */ CARD8 keycode; /* which key/button to move */ CARD16 delay_time; /* how long to delay (in ms) */ } XTestKeyInfo; /* * This is the definition for pointer jump input actions. */ typedef struct { CARD8 header; /* which pointer */ CARD8 pad1; /* unused padding byte */ CARD16 jumpx; /* x coord to jump to */ CARD16 jumpy; /* y coord to jump to */ CARD16 delay_time; /* how long to delay (in ms) */ } XTestJumpInfo; /* * These are the definitions for pointer relative motion input * actions. * * The sign bits for the x and y relative motions are contained * in the header byte. The x and y relative motions are packed * into one byte to make things fit in 32 bits. If the relative * motion range is larger than +/-15, use the pointer jump action. */ typedef struct { CARD8 header; /* which pointer */ CARD8 motion_data; /* x,y relative motion */ CARD16 delay_time; /* how long to delay (in ms) */ } XTestMotionInfo; /* * These are the definitions for a long delay input action. It is * used when more than XTestSHORT_DELAY_TIME milliseconds of delay * (approximately one minute) is needed. * * The device ID for a delay is always set to XTestDELAY_DEVICE_ID. * This guarantees that a header byte with a value of 0 is not * a valid header, so it can be used as a flag to indicate that * there are no more input actions in an XTestInputAction event. */ typedef struct { CARD8 header; /* always XTestDELAY_DEVICE_ID */ CARD8 pad1; /* unused padding byte */ CARD16 pad2; /* unused padding word */ CARD32 delay_time; /* how long to delay (in ms) */ } XTestDelayInfo; #endif /* _XTESTEXT1PROTO_H */ PKZ՘xX11/extensions/dbeproto.hnu[/****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of the Hewlett-Packard * Company shall not be used in advertising or otherwise to promote the * sale, use or other dealings in this Software without prior written * authorization from the Hewlett-Packard Company. * * Header file for Xlib-related DBE * *****************************************************************************/ #ifndef DBE_PROTO_H #define DBE_PROTO_H #include /* Request values used in (S)ProcDbeDispatch() */ #define X_DbeGetVersion 0 #define X_DbeAllocateBackBufferName 1 #define X_DbeDeallocateBackBufferName 2 #define X_DbeSwapBuffers 3 #define X_DbeBeginIdiom 4 #define X_DbeEndIdiom 5 #define X_DbeGetVisualInfo 6 #define X_DbeGetBackBufferAttributes 7 typedef CARD8 xDbeSwapAction; typedef CARD32 xDbeBackBuffer; /* TYPEDEFS */ /* Protocol data types */ typedef struct { CARD32 window; /* window */ xDbeSwapAction swapAction; /* swap action */ CARD8 pad1; /* unused */ CARD16 pad2; } xDbeSwapInfo; typedef struct { CARD32 visualID; /* associated visual */ CARD8 depth; /* depth of visual */ CARD8 perfLevel; /* performance level hint */ CARD16 pad1; } xDbeVisInfo; #define sz_xDbeVisInfo 8 typedef struct { CARD32 n; /* number of visual info items in list */ } xDbeScreenVisInfo; /* followed by n xDbeVisInfo items */ typedef struct { CARD32 window; /* window */ } xDbeBufferAttributes; /* Requests and replies */ typedef struct { CARD8 reqType; /* major-opcode: always codes->major_opcode */ CARD8 dbeReqType; /* minor-opcode: always X_DbeGetVersion (0) */ CARD16 length; /* request length: (2) */ CARD8 majorVersion; /* client-major-version */ CARD8 minorVersion; /* client-minor-version */ CARD16 unused; /* unused */ } xDbeGetVersionReq; #define sz_xDbeGetVersionReq 8 typedef struct { BYTE type; /* Reply: X_Reply (1) */ CARD8 unused; /* unused */ CARD16 sequenceNumber; /* sequence number */ CARD32 length; /* reply length: (0) */ CARD8 majorVersion; /* server-major-version */ CARD8 minorVersion; /* server-minor-version */ CARD16 pad1; /* unused */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xDbeGetVersionReply; #define sz_xDbeGetVersionReply 32 typedef struct { CARD8 reqType; /* major-opcode: codes->major_opcode */ CARD8 dbeReqType; /* X_DbeAllocateBackBufferName (1) */ CARD16 length; /* request length: (4) */ CARD32 window; /* window */ xDbeBackBuffer buffer; /* back buffer name */ xDbeSwapAction swapAction; /* swap action hint */ CARD8 pad1; /* unused */ CARD16 pad2; } xDbeAllocateBackBufferNameReq; #define sz_xDbeAllocateBackBufferNameReq 16 typedef struct { CARD8 reqType; /* major-opcode: codes->major_opcode */ CARD8 dbeReqType; /* X_DbeDeallocateBackBufferName (2) */ CARD16 length; /* request length: (2) */ xDbeBackBuffer buffer; /* back buffer name */ } xDbeDeallocateBackBufferNameReq; #define sz_xDbeDeallocateBackBufferNameReq 8 typedef struct { CARD8 reqType; /* major-opcode: always codes->major_opcode */ CARD8 dbeReqType; /* minor-opcode: always X_DbeSwapBuffers (3) */ CARD16 length; /* request length: (2+2n) */ CARD32 n; /* n, number of window/swap action pairs */ } xDbeSwapBuffersReq; /* followed by n window/swap action pairs */ #define sz_xDbeSwapBuffersReq 8 typedef struct { CARD8 reqType; /* major-opcode: always codes->major_opcode */ CARD8 dbeReqType; /* minor-opcode: always X_DbeBeginIdom (4) */ CARD16 length; /* request length: (1) */ } xDbeBeginIdiomReq; #define sz_xDbeBeginIdiomReq 4 typedef struct { CARD8 reqType; /* major-opcode: always codes->major_opcode */ CARD8 dbeReqType; /* minor-opcode: always X_DbeEndIdom (5) */ CARD16 length; /* request length: (1) */ } xDbeEndIdiomReq; #define sz_xDbeEndIdiomReq 4 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 dbeReqType; /* always X_DbeGetVisualInfo (6) */ CARD16 length; /* request length: (2+n) */ CARD32 n; /* n, number of drawables in list */ } xDbeGetVisualInfoReq; /* followed by n drawables */ #define sz_xDbeGetVisualInfoReq 8 typedef struct { BYTE type; /* Reply: X_Reply (1) */ CARD8 unused; /* unused */ CARD16 sequenceNumber; /* sequence number */ CARD32 length; /* reply length */ CARD32 m; /* m, number of visual infos in list */ CARD32 pad1; /* unused */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDbeGetVisualInfoReply; /* followed by m visual infos */ #define sz_xDbeGetVisualInfoReply 32 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 dbeReqType; /* X_DbeGetBackBufferAttributes (7) */ CARD16 length; /* request length: (2) */ xDbeBackBuffer buffer; /* back buffer name */ } xDbeGetBackBufferAttributesReq; #define sz_xDbeGetBackBufferAttributesReq 8 typedef struct { BYTE type; /* Reply: X_Reply (1) */ CARD8 unused; /* unused */ CARD16 sequenceNumber; /* sequence number */ CARD32 length; /* reply length: (0) */ CARD32 attributes; /* attributes */ CARD32 pad1; /* unused */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDbeGetBackBufferAttributesReply; #define sz_xDbeGetBackBufferAttributesReply 32 #endif /* DBE_PROTO_H */ PKZO2qqX11/extensions/XKBproto.hnu[/************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _XKBPROTO_H_ #define _XKBPROTO_H_ #include #include #define Window CARD32 #define Atom CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define XkbPaddedSize(n) ((((unsigned int)(n)+3) >> 2) << 2) typedef struct _xkbUseExtension { CARD8 reqType; CARD8 xkbReqType; /* always X_KBUseExtension */ CARD16 length; CARD16 wantedMajor; CARD16 wantedMinor; } xkbUseExtensionReq; #define sz_xkbUseExtensionReq 8 typedef struct _xkbUseExtensionReply { BYTE type; /* X_Reply */ BOOL supported; CARD16 sequenceNumber; CARD32 length; CARD16 serverMajor; CARD16 serverMinor; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xkbUseExtensionReply; #define sz_xkbUseExtensionReply 32 typedef struct _xkbSelectEvents { CARD8 reqType; CARD8 xkbReqType; /* X_KBSelectEvents */ CARD16 length; CARD16 deviceSpec; CARD16 affectWhich; CARD16 clear; CARD16 selectAll; CARD16 affectMap; CARD16 map; } xkbSelectEventsReq; #define sz_xkbSelectEventsReq 16 typedef struct _xkbBell { CARD8 reqType; CARD8 xkbReqType; /* X_KBBell */ CARD16 length; CARD16 deviceSpec; CARD16 bellClass; CARD16 bellID; INT8 percent; BOOL forceSound; BOOL eventOnly; CARD8 pad1; INT16 pitch; INT16 duration; CARD16 pad2; Atom name; Window window; } xkbBellReq; #define sz_xkbBellReq 28 typedef struct _xkbGetState { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetState */ CARD16 length; CARD16 deviceSpec; CARD16 pad; } xkbGetStateReq; #define sz_xkbGetStateReq 8 typedef struct _xkbGetStateReply { BYTE type; BYTE deviceID; CARD16 sequenceNumber; CARD32 length; CARD8 mods; CARD8 baseMods; CARD8 latchedMods; CARD8 lockedMods; CARD8 group; CARD8 lockedGroup; INT16 baseGroup; INT16 latchedGroup; CARD8 compatState; CARD8 grabMods; CARD8 compatGrabMods; CARD8 lookupMods; CARD8 compatLookupMods; CARD8 pad1; CARD16 ptrBtnState; CARD16 pad2; CARD32 pad3; } xkbGetStateReply; #define sz_xkbGetStateReply 32 typedef struct _xkbLatchLockState { CARD8 reqType; CARD8 xkbReqType; /* always X_KBLatchLockState */ CARD16 length; CARD16 deviceSpec; CARD8 affectModLocks; CARD8 modLocks; BOOL lockGroup; CARD8 groupLock; CARD8 affectModLatches; CARD8 modLatches; CARD8 pad; BOOL latchGroup; INT16 groupLatch; } xkbLatchLockStateReq; #define sz_xkbLatchLockStateReq 16 typedef struct _xkbGetControls { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetControls */ CARD16 length; CARD16 deviceSpec; CARD16 pad; } xkbGetControlsReq; #define sz_xkbGetControlsReq 8 typedef struct _xkbGetControlsReply { BYTE type; /* X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD8 mkDfltBtn; CARD8 numGroups; CARD8 groupsWrap; CARD8 internalMods; CARD8 ignoreLockMods; CARD8 internalRealMods; CARD8 ignoreLockRealMods; CARD8 pad1; CARD16 internalVMods; CARD16 ignoreLockVMods; CARD16 repeatDelay; CARD16 repeatInterval; CARD16 slowKeysDelay; CARD16 debounceDelay; CARD16 mkDelay; CARD16 mkInterval; CARD16 mkTimeToMax; CARD16 mkMaxSpeed; INT16 mkCurve; CARD16 axOptions; CARD16 axTimeout; CARD16 axtOptsMask; CARD16 axtOptsValues; CARD16 pad2; CARD32 axtCtrlsMask; CARD32 axtCtrlsValues; CARD32 enabledCtrls; BYTE perKeyRepeat[XkbPerKeyBitArraySize]; } xkbGetControlsReply; #define sz_xkbGetControlsReply 92 typedef struct _xkbSetControls { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetControls */ CARD16 length; CARD16 deviceSpec; CARD8 affectInternalMods; CARD8 internalMods; CARD8 affectIgnoreLockMods; CARD8 ignoreLockMods; CARD16 affectInternalVMods; CARD16 internalVMods; CARD16 affectIgnoreLockVMods; CARD16 ignoreLockVMods; CARD8 mkDfltBtn; CARD8 groupsWrap; CARD16 axOptions; CARD16 pad1; CARD32 affectEnabledCtrls; CARD32 enabledCtrls; CARD32 changeCtrls; CARD16 repeatDelay; CARD16 repeatInterval; CARD16 slowKeysDelay; CARD16 debounceDelay; CARD16 mkDelay; CARD16 mkInterval; CARD16 mkTimeToMax; CARD16 mkMaxSpeed; INT16 mkCurve; CARD16 axTimeout; CARD32 axtCtrlsMask; CARD32 axtCtrlsValues; CARD16 axtOptsMask; CARD16 axtOptsValues; BYTE perKeyRepeat[XkbPerKeyBitArraySize]; } xkbSetControlsReq; #define sz_xkbSetControlsReq 100 typedef struct _xkbKTMapEntryWireDesc { BOOL active; CARD8 mask; CARD8 level; CARD8 realMods; CARD16 virtualMods; CARD16 pad; } xkbKTMapEntryWireDesc; #define sz_xkbKTMapEntryWireDesc 8 typedef struct _xkbKTSetMapEntryWireDesc { CARD8 level; CARD8 realMods; CARD16 virtualMods; } xkbKTSetMapEntryWireDesc; #define sz_xkbKTSetMapEntryWireDesc 4 typedef struct _xkbModsWireDesc { CARD8 mask; /* GetMap only */ CARD8 realMods; CARD16 virtualMods; } xkbModsWireDesc; #define sz_xkbModsWireDesc 4 typedef struct _xkbKeyTypeWireDesc { CARD8 mask; CARD8 realMods; CARD16 virtualMods; CARD8 numLevels; CARD8 nMapEntries; BOOL preserve; CARD8 pad; } xkbKeyTypeWireDesc; #define sz_xkbKeyTypeWireDesc 8 typedef struct _xkbSymMapWireDesc { CARD8 ktIndex[XkbNumKbdGroups]; CARD8 groupInfo; CARD8 width; CARD16 nSyms; } xkbSymMapWireDesc; #define sz_xkbSymMapWireDesc 8 typedef struct _xkbVModMapWireDesc { KeyCode key; CARD8 pad; CARD16 vmods; } xkbVModMapWireDesc; #define sz_xkbVModMapWireDesc 4 typedef struct _xkbBehaviorWireDesc { CARD8 key; CARD8 type; CARD8 data; CARD8 pad; } xkbBehaviorWireDesc; #define sz_xkbBehaviorWireDesc 4 typedef struct _xkbActionWireDesc { CARD8 type; CARD8 data[7]; } xkbActionWireDesc; #define sz_xkbActionWireDesc 8 typedef struct _xkbGetMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetMap */ CARD16 length; CARD16 deviceSpec; CARD16 full; CARD16 partial; CARD8 firstType; CARD8 nTypes; KeyCode firstKeySym; CARD8 nKeySyms; KeyCode firstKeyAct; CARD8 nKeyActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; CARD16 virtualMods; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD16 pad1; } xkbGetMapReq; #define sz_xkbGetMapReq 28 typedef struct _xkbGetMapReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD16 pad1; KeyCode minKeyCode; KeyCode maxKeyCode; CARD16 present; CARD8 firstType; CARD8 nTypes; CARD8 totalTypes; KeyCode firstKeySym; CARD16 totalSyms; CARD8 nKeySyms; KeyCode firstKeyAct; CARD16 totalActs; CARD8 nKeyActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; CARD8 totalKeyBehaviors; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; CARD8 totalKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; CARD8 totalModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD8 totalVModMapKeys; CARD8 pad2; CARD16 virtualMods; } xkbGetMapReply; #define sz_xkbGetMapReply 40 #define XkbSetMapResizeTypes (1L<<0) #define XkbSetMapRecomputeActions (1L<<1) #define XkbSetMapAllFlags (0x3) typedef struct _xkbSetMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetMap */ CARD16 length; CARD16 deviceSpec; CARD16 present; CARD16 flags; KeyCode minKeyCode; KeyCode maxKeyCode; CARD8 firstType; CARD8 nTypes; KeyCode firstKeySym; CARD8 nKeySyms; CARD16 totalSyms; KeyCode firstKeyAct; CARD8 nKeyActs; CARD16 totalActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; CARD8 totalKeyBehaviors; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; CARD8 totalKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; CARD8 totalModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD8 totalVModMapKeys; CARD16 virtualMods; } xkbSetMapReq; #define sz_xkbSetMapReq 36 typedef struct _xkbSymInterpretWireDesc { CARD32 sym; CARD8 mods; CARD8 match; CARD8 virtualMod; CARD8 flags; xkbActionWireDesc act; } xkbSymInterpretWireDesc; #define sz_xkbSymInterpretWireDesc 16 typedef struct _xkbGetCompatMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetCompatMap */ CARD16 length; CARD16 deviceSpec; CARD8 groups; BOOL getAllSI; CARD16 firstSI; CARD16 nSI; } xkbGetCompatMapReq; #define sz_xkbGetCompatMapReq 12 typedef struct _xkbGetCompatMapReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD8 groups; CARD8 pad1; CARD16 firstSI; CARD16 nSI; CARD16 nTotalSI; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xkbGetCompatMapReply; #define sz_xkbGetCompatMapReply 32 typedef struct _xkbSetCompatMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetCompatMap */ CARD16 length; CARD16 deviceSpec; CARD8 pad1; BOOL recomputeActions; BOOL truncateSI; CARD8 groups; CARD16 firstSI; CARD16 nSI; CARD16 pad2; } xkbSetCompatMapReq; #define sz_xkbSetCompatMapReq 16 typedef struct _xkbGetIndicatorState { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetIndicatorState */ CARD16 length; CARD16 deviceSpec; CARD16 pad1; } xkbGetIndicatorStateReq; #define sz_xkbGetIndicatorStateReq 8 typedef struct _xkbGetIndicatorStateReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 state; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xkbGetIndicatorStateReply; #define sz_xkbGetIndicatorStateReply 32 typedef struct _xkbGetIndicatorMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetIndicatorMap */ CARD16 length; CARD16 deviceSpec; CARD16 pad; CARD32 which; } xkbGetIndicatorMapReq; #define sz_xkbGetIndicatorMapReq 12 typedef struct _xkbGetIndicatorMapReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 which; CARD32 realIndicators; CARD8 nIndicators; CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xkbGetIndicatorMapReply; #define sz_xkbGetIndicatorMapReply 32 typedef struct _xkbIndicatorMapWireDesc { CARD8 flags; CARD8 whichGroups; CARD8 groups; CARD8 whichMods; CARD8 mods; CARD8 realMods; CARD16 virtualMods; CARD32 ctrls; } xkbIndicatorMapWireDesc; #define sz_xkbIndicatorMapWireDesc 12 typedef struct _xkbSetIndicatorMap { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetIndicatorMap */ CARD16 length; CARD16 deviceSpec; CARD16 pad1; CARD32 which; } xkbSetIndicatorMapReq; #define sz_xkbSetIndicatorMapReq 12 typedef struct _xkbGetNamedIndicator { CARD8 reqType; CARD8 xkbReqType; /* X_KBGetNamedIndicator */ CARD16 length; CARD16 deviceSpec; CARD16 ledClass; CARD16 ledID; CARD16 pad1; Atom indicator; } xkbGetNamedIndicatorReq; #define sz_xkbGetNamedIndicatorReq 16 typedef struct _xkbGetNamedIndicatorReply { BYTE type; BYTE deviceID; CARD16 sequenceNumber; CARD32 length; Atom indicator; BOOL found; BOOL on; BOOL realIndicator; CARD8 ndx; CARD8 flags; CARD8 whichGroups; CARD8 groups; CARD8 whichMods; CARD8 mods; CARD8 realMods; CARD16 virtualMods; CARD32 ctrls; BOOL supported; CARD8 pad1; CARD16 pad2; } xkbGetNamedIndicatorReply; #define sz_xkbGetNamedIndicatorReply 32 typedef struct _xkbSetNamedIndicator { CARD8 reqType; CARD8 xkbReqType; /* X_KBSetNamedIndicator */ CARD16 length; CARD16 deviceSpec; CARD16 ledClass; CARD16 ledID; CARD16 pad1; Atom indicator; BOOL setState; BOOL on; BOOL setMap; BOOL createMap; CARD8 pad2; CARD8 flags; CARD8 whichGroups; CARD8 groups; CARD8 whichMods; CARD8 realMods; CARD16 virtualMods; CARD32 ctrls; } xkbSetNamedIndicatorReq; #define sz_xkbSetNamedIndicatorReq 32 typedef struct _xkbGetNames { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetNames */ CARD16 length; CARD16 deviceSpec; CARD16 pad; CARD32 which; } xkbGetNamesReq; #define sz_xkbGetNamesReq 12 typedef struct _xkbGetNamesReply { BYTE type; BYTE deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 which; KeyCode minKeyCode; KeyCode maxKeyCode; CARD8 nTypes; CARD8 groupNames; CARD16 virtualMods; KeyCode firstKey; CARD8 nKeys; CARD32 indicators; CARD8 nRadioGroups; CARD8 nKeyAliases; CARD16 nKTLevels; CARD32 pad3; } xkbGetNamesReply; #define sz_xkbGetNamesReply 32 typedef struct _xkbSetNames { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetNames */ CARD16 length; CARD16 deviceSpec; CARD16 virtualMods; CARD32 which; CARD8 firstType; CARD8 nTypes; CARD8 firstKTLevel; CARD8 nKTLevels; CARD32 indicators; CARD8 groupNames; CARD8 nRadioGroups; KeyCode firstKey; CARD8 nKeys; CARD8 nKeyAliases; CARD8 pad1; CARD16 totalKTLevelNames; } xkbSetNamesReq; #define sz_xkbSetNamesReq 28 typedef struct _xkbPointWireDesc { INT16 x; INT16 y; } xkbPointWireDesc; #define sz_xkbPointWireDesc 4 typedef struct _xkbOutlineWireDesc { CARD8 nPoints; CARD8 cornerRadius; CARD16 pad; } xkbOutlineWireDesc; #define sz_xkbOutlineWireDesc 4 typedef struct _xkbShapeWireDesc { Atom name; CARD8 nOutlines; CARD8 primaryNdx; CARD8 approxNdx; CARD8 pad; } xkbShapeWireDesc; #define sz_xkbShapeWireDesc 8 typedef struct _xkbSectionWireDesc { Atom name; INT16 top; INT16 left; CARD16 width; CARD16 height; INT16 angle; CARD8 priority; CARD8 nRows; CARD8 nDoodads; CARD8 nOverlays; CARD16 pad; } xkbSectionWireDesc; #define sz_xkbSectionWireDesc 20 typedef struct _xkbRowWireDesc { INT16 top; INT16 left; CARD8 nKeys; BOOL vertical; CARD16 pad; } xkbRowWireDesc; #define sz_xkbRowWireDesc 8 typedef struct _xkbKeyWireDesc { CARD8 name[XkbKeyNameLength]; INT16 gap; CARD8 shapeNdx; CARD8 colorNdx; } xkbKeyWireDesc; #define sz_xkbKeyWireDesc 8 typedef struct _xkbOverlayWireDesc { Atom name; CARD8 nRows; CARD8 pad1; CARD16 pad2; } xkbOverlayWireDesc; #define sz_xkbOverlayWireDesc 8 typedef struct _xkbOverlayRowWireDesc { CARD8 rowUnder; CARD8 nKeys; CARD16 pad1; } xkbOverlayRowWireDesc; #define sz_xkbOverlayRowWireDesc 4 typedef struct _xkbOverlayKeyWireDesc { CARD8 over[XkbKeyNameLength]; CARD8 under[XkbKeyNameLength]; } xkbOverlayKeyWireDesc; #define sz_xkbOverlayKeyWireDesc 8 typedef struct _xkbShapeDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD8 colorNdx; CARD8 shapeNdx; CARD16 pad1; CARD32 pad2; } xkbShapeDoodadWireDesc; #define sz_xkbShapeDoodadWireDesc 20 typedef struct _xkbTextDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD16 width; CARD16 height; CARD8 colorNdx; CARD8 pad1; CARD16 pad2; } xkbTextDoodadWireDesc; #define sz_xkbTextDoodadWireDesc 20 typedef struct _xkbIndicatorDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD8 shapeNdx; CARD8 onColorNdx; CARD8 offColorNdx; CARD8 pad1; CARD32 pad2; } xkbIndicatorDoodadWireDesc; #define sz_xkbIndicatorDoodadWireDesc 20 typedef struct _xkbLogoDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD8 colorNdx; CARD8 shapeNdx; CARD16 pad1; CARD32 pad2; } xkbLogoDoodadWireDesc; #define sz_xkbLogoDoodadWireDesc 20 typedef struct _xkbAnyDoodadWireDesc { Atom name; CARD8 type; CARD8 priority; INT16 top; INT16 left; INT16 angle; CARD32 pad2; CARD32 pad3; } xkbAnyDoodadWireDesc; #define sz_xkbAnyDoodadWireDesc 20 typedef union _xkbDoodadWireDesc { xkbAnyDoodadWireDesc any; xkbShapeDoodadWireDesc shape; xkbTextDoodadWireDesc text; xkbIndicatorDoodadWireDesc indicator; xkbLogoDoodadWireDesc logo; } xkbDoodadWireDesc; #define sz_xkbDoodadWireDesc 20 typedef struct _xkbGetGeometry { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetGeometry */ CARD16 length; CARD16 deviceSpec; CARD16 pad; Atom name; } xkbGetGeometryReq; #define sz_xkbGetGeometryReq 12 typedef struct _xkbGetGeometryReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; Atom name; BOOL found; CARD8 pad; CARD16 widthMM; CARD16 heightMM; CARD16 nProperties; CARD16 nColors; CARD16 nShapes; CARD16 nSections; CARD16 nDoodads; CARD16 nKeyAliases; CARD8 baseColorNdx; CARD8 labelColorNdx; } xkbGetGeometryReply; #define sz_xkbGetGeometryReply 32 typedef struct _xkbSetGeometry { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetGeometry */ CARD16 length; CARD16 deviceSpec; CARD8 nShapes; CARD8 nSections; Atom name; CARD16 widthMM; CARD16 heightMM; CARD16 nProperties; CARD16 nColors; CARD16 nDoodads; CARD16 nKeyAliases; CARD8 baseColorNdx; CARD8 labelColorNdx; CARD16 pad; } xkbSetGeometryReq; #define sz_xkbSetGeometryReq 28 typedef struct _xkbPerClientFlags { CARD8 reqType; CARD8 xkbReqType;/* always X_KBPerClientFlags */ CARD16 length; CARD16 deviceSpec; CARD16 pad1; CARD32 change; CARD32 value; CARD32 ctrlsToChange; CARD32 autoCtrls; CARD32 autoCtrlValues; } xkbPerClientFlagsReq; #define sz_xkbPerClientFlagsReq 28 typedef struct _xkbPerClientFlagsReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD32 supported; CARD32 value; CARD32 autoCtrls; CARD32 autoCtrlValues; CARD32 pad1; CARD32 pad2; } xkbPerClientFlagsReply; #define sz_xkbPerClientFlagsReply 32 typedef struct _xkbListComponents { CARD8 reqType; CARD8 xkbReqType; /* always X_KBListComponents */ CARD16 length; CARD16 deviceSpec; CARD16 maxNames; } xkbListComponentsReq; #define sz_xkbListComponentsReq 8 typedef struct _xkbListComponentsReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD16 nKeymaps; CARD16 nKeycodes; CARD16 nTypes; CARD16 nCompatMaps; CARD16 nSymbols; CARD16 nGeometries; CARD16 extra; CARD16 pad1; CARD32 pad2; CARD32 pad3; } xkbListComponentsReply; #define sz_xkbListComponentsReply 32 typedef struct _xkbGetKbdByName { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetKbdByName */ CARD16 length; CARD16 deviceSpec; CARD16 need; /* combination of XkbGBN_* */ CARD16 want; /* combination of XkbGBN_* */ BOOL load; CARD8 pad; } xkbGetKbdByNameReq; #define sz_xkbGetKbdByNameReq 12 typedef struct _xkbGetKbdByNameReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; KeyCode minKeyCode; KeyCode maxKeyCode; BOOL loaded; BOOL newKeyboard; CARD16 found; /* combination of XkbGBN_* */ CARD16 reported; /* combination of XkbAllComponents */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xkbGetKbdByNameReply; #define sz_xkbGetKbdByNameReply 32 typedef struct _xkbDeviceLedsWireDesc { CARD16 ledClass; CARD16 ledID; CARD32 namesPresent; CARD32 mapsPresent; CARD32 physIndicators; CARD32 state; } xkbDeviceLedsWireDesc; #define sz_xkbDeviceLedsWireDesc 20 typedef struct _xkbGetDeviceInfo { CARD8 reqType; CARD8 xkbReqType; /* always X_KBGetDeviceInfo */ CARD16 length; CARD16 deviceSpec; CARD16 wanted; BOOL allBtns; CARD8 firstBtn; CARD8 nBtns; CARD8 pad; CARD16 ledClass; CARD16 ledID; } xkbGetDeviceInfoReq; #define sz_xkbGetDeviceInfoReq 16 typedef struct _xkbGetDeviceInfoReply { CARD8 type; /* always X_Reply */ CARD8 deviceID; CARD16 sequenceNumber; CARD32 length; CARD16 present; CARD16 supported; CARD16 unsupported; CARD16 nDeviceLedFBs; CARD8 firstBtnWanted; CARD8 nBtnsWanted; CARD8 firstBtnRtrn; CARD8 nBtnsRtrn; CARD8 totalBtns; BOOL hasOwnState; CARD16 dfltKbdFB; CARD16 dfltLedFB; CARD16 pad; Atom devType; } xkbGetDeviceInfoReply; #define sz_xkbGetDeviceInfoReply 32 typedef struct _xkbSetDeviceInfo { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetDeviceInfo */ CARD16 length; CARD16 deviceSpec; CARD8 firstBtn; CARD8 nBtns; CARD16 change; CARD16 nDeviceLedFBs; } xkbSetDeviceInfoReq; #define sz_xkbSetDeviceInfoReq 12 typedef struct _xkbSetDebuggingFlags { CARD8 reqType; CARD8 xkbReqType; /* always X_KBSetDebuggingFlags */ CARD16 length; CARD16 msgLength; CARD16 pad; CARD32 affectFlags; CARD32 flags; CARD32 affectCtrls; CARD32 ctrls; } xkbSetDebuggingFlagsReq; #define sz_xkbSetDebuggingFlagsReq 24 typedef struct _xkbSetDebuggingFlagsReply { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 currentFlags; CARD32 currentCtrls; CARD32 supportedFlags; CARD32 supportedCtrls; CARD32 pad1; CARD32 pad2; } xkbSetDebuggingFlagsReply; #define sz_xkbSetDebuggingFlagsReply 32 /* * X KEYBOARD EXTENSION EVENT STRUCTURES */ typedef struct _xkbAnyEvent { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xkbAnyEvent; #define sz_xkbAnyEvent 32 typedef struct _xkbNewKeyboardNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 oldDeviceID; KeyCode minKeyCode; KeyCode maxKeyCode; KeyCode oldMinKeyCode; KeyCode oldMaxKeyCode; CARD8 requestMajor; CARD8 requestMinor; CARD16 changed; CARD8 detail; CARD8 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xkbNewKeyboardNotify; #define sz_xkbNewKeyboardNotify 32 typedef struct _xkbMapNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 ptrBtnActions; CARD16 changed; KeyCode minKeyCode; KeyCode maxKeyCode; CARD8 firstType; CARD8 nTypes; KeyCode firstKeySym; CARD8 nKeySyms; KeyCode firstKeyAct; CARD8 nKeyActs; KeyCode firstKeyBehavior; CARD8 nKeyBehaviors; KeyCode firstKeyExplicit; CARD8 nKeyExplicit; KeyCode firstModMapKey; CARD8 nModMapKeys; KeyCode firstVModMapKey; CARD8 nVModMapKeys; CARD16 virtualMods; CARD16 pad1; } xkbMapNotify; #define sz_xkbMapNotify 32 typedef struct _xkbStateNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 mods; CARD8 baseMods; CARD8 latchedMods; CARD8 lockedMods; CARD8 group; INT16 baseGroup; INT16 latchedGroup; CARD8 lockedGroup; CARD8 compatState; CARD8 grabMods; CARD8 compatGrabMods; CARD8 lookupMods; CARD8 compatLookupMods; CARD16 ptrBtnState; CARD16 changed; KeyCode keycode; CARD8 eventType; CARD8 requestMajor; CARD8 requestMinor; } xkbStateNotify; #define sz_xkbStateNotify 32 typedef struct _xkbControlsNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 numGroups; CARD16 pad1; CARD32 changedControls; CARD32 enabledControls; CARD32 enabledControlChanges; KeyCode keycode; CARD8 eventType; CARD8 requestMajor; CARD8 requestMinor; CARD32 pad2; } xkbControlsNotify; #define sz_xkbControlsNotify 32 typedef struct _xkbIndicatorNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 pad2; CARD32 state; CARD32 changed; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xkbIndicatorNotify; #define sz_xkbIndicatorNotify 32 typedef struct _xkbNamesNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 changed; CARD8 firstType; CARD8 nTypes; CARD8 firstLevelName; CARD8 nLevelNames; CARD8 pad2; CARD8 nRadioGroups; CARD8 nAliases; CARD8 changedGroupNames; CARD16 changedVirtualMods; CARD8 firstKey; CARD8 nKeys; CARD32 changedIndicators; CARD32 pad3; } xkbNamesNotify; #define sz_xkbNamesNotify 32 typedef struct _xkbCompatMapNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 changedGroups; CARD16 firstSI; CARD16 nSI; CARD16 nTotalSI; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xkbCompatMapNotify; #define sz_xkbCompatMapNotify 32 typedef struct _xkbBellNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 bellClass; CARD8 bellID; CARD8 percent; CARD16 pitch; CARD16 duration; Atom name; Window window; BOOL eventOnly; CARD8 pad1; CARD16 pad2; CARD32 pad3; } xkbBellNotify; #define sz_xkbBellNotify 32 typedef struct _xkbActionMessage { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; KeyCode keycode; BOOL press; BOOL keyEventFollows; CARD8 mods; CARD8 group; CARD8 message[8]; CARD16 pad1; CARD32 pad2; CARD32 pad3; } xkbActionMessage; #define sz_xkbActionMessage 32 typedef struct _xkbAccessXNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; KeyCode keycode; CARD16 detail; CARD16 slowKeysDelay; CARD16 debounceDelay; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xkbAccessXNotify; #define sz_xkbAccessXNotify 32 typedef struct _xkbExtensionDeviceNotify { BYTE type; BYTE xkbType; CARD16 sequenceNumber; Time time; CARD8 deviceID; CARD8 pad1; CARD16 reason; CARD16 ledClass; CARD16 ledID; CARD32 ledsDefined; CARD32 ledState; CARD8 firstBtn; CARD8 nBtns; CARD16 supported; CARD16 unsupported; CARD16 pad3; } xkbExtensionDeviceNotify; #define sz_xkbExtensionDeviceNotify 32 typedef struct _xkbEvent { union { xkbAnyEvent any; xkbNewKeyboardNotify new_kbd; xkbMapNotify map; xkbStateNotify state; xkbControlsNotify ctrls; xkbIndicatorNotify indicators; xkbNamesNotify names; xkbCompatMapNotify compat; xkbBellNotify bell; xkbActionMessage message; xkbAccessXNotify accessx; xkbExtensionDeviceNotify device; } u; } xkbEvent; #define sz_xkbEvent 32 #undef Window #undef Atom #undef Time #undef KeyCode #undef KeySym #endif /* _XKBPROTO_H_ */ PKZXX11/extensions/recordproto.hnu[/*************************************************************************** * Copyright 1995 Network Computing Devices * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Network Computing Devices * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. * * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. **************************************************************************/ #ifndef _RECORDPROTO_H_ #define _RECORDPROTO_H_ #include /* only difference between 1.12 and 1.13 is byte order of device events, which the library doesn't deal with. */ /********************************************************* * * Protocol request constants * */ #define X_RecordQueryVersion 0 /* First request from client */ #define X_RecordCreateContext 1 /* Create client RC */ #define X_RecordRegisterClients 2 /* Add to client RC */ #define X_RecordUnregisterClients 3 /* Delete from client RC */ #define X_RecordGetContext 4 /* Query client RC */ #define X_RecordEnableContext 5 /* Enable interception and reporting */ #define X_RecordDisableContext 6 /* Disable interception and reporting */ #define X_RecordFreeContext 7 /* Free client RC */ #define sz_XRecordRange 32 #define sz_XRecordClientInfo 12 #define sz_XRecordState 16 #define sz_XRecordDatum 32 #define XRecordGlobaldef #define XRecordGlobalref extern #define RecordMaxEvent (128L-1L) #define RecordMinDeviceEvent (2L) #define RecordMaxDeviceEvent (6L) #define RecordMaxError (256L-1L) #define RecordMaxCoreRequest (128L-1L) #define RecordMaxExtRequest (256L-1L) #define RecordMinExtRequest (129L-1L) #define RECORD_RC CARD32 #define RECORD_XIDBASE CARD32 #define RECORD_CLIENTSPEC CARD32 #define RECORD_ELEMENT_HEADER CARD8 typedef RECORD_CLIENTSPEC RecordClientSpec, *RecordClientSpecPtr; typedef struct { CARD8 first; CARD8 last; } RECORD_RANGE8; typedef struct { CARD16 first; CARD16 last; } RECORD_RANGE16; typedef struct { RECORD_RANGE8 majorCode; RECORD_RANGE16 minorCode; } RECORD_EXTRANGE; typedef struct { RECORD_RANGE8 coreRequests; RECORD_RANGE8 coreReplies; RECORD_EXTRANGE extRequests; RECORD_EXTRANGE extReplies; RECORD_RANGE8 deliveredEvents; RECORD_RANGE8 deviceEvents; RECORD_RANGE8 errors; BOOL clientStarted; BOOL clientDied; } RECORDRANGE; #define sz_RECORDRANGE 24 /* typedef RECORDRANGE xRecordRange, *xRecordRangePtr; #define sz_xRecordRange 24 */ /* Cannot have structures within structures going over the wire */ typedef struct { CARD8 coreRequestsFirst; CARD8 coreRequestsLast; CARD8 coreRepliesFirst; CARD8 coreRepliesLast; CARD8 extRequestsMajorFirst; CARD8 extRequestsMajorLast; CARD16 extRequestsMinorFirst; CARD16 extRequestsMinorLast; CARD8 extRepliesMajorFirst; CARD8 extRepliesMajorLast; CARD16 extRepliesMinorFirst; CARD16 extRepliesMinorLast; CARD8 deliveredEventsFirst; CARD8 deliveredEventsLast; CARD8 deviceEventsFirst; CARD8 deviceEventsLast; CARD8 errorsFirst; CARD8 errorsLast; BOOL clientStarted; BOOL clientDied; } xRecordRange; #define sz_xRecordRange 24 typedef struct { RECORD_CLIENTSPEC clientResource; CARD32 nRanges; /* LISTofRECORDRANGE */ } RECORD_CLIENT_INFO; typedef RECORD_CLIENT_INFO xRecordClientInfo; /* * Initialize */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; CARD16 majorVersion; CARD16 minorVersion; } xRecordQueryVersionReq; #define sz_xRecordQueryVersionReq 8 typedef struct { CARD8 type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; CARD16 minorVersion; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRecordQueryVersionReply; #define sz_xRecordQueryVersionReply 32 /* * Create RC */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; RECORD_RC context; RECORD_ELEMENT_HEADER elementHeader; CARD8 pad; CARD16 pad0; CARD32 nClients; CARD32 nRanges; /* LISTofRECORD_CLIENTSPEC */ /* LISTofRECORDRANGE */ } xRecordCreateContextReq; #define sz_xRecordCreateContextReq 20 /* * Add to RC */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; RECORD_RC context; RECORD_ELEMENT_HEADER elementHeader; CARD8 pad; CARD16 pad0; CARD32 nClients; CARD32 nRanges; /* LISTofRECORD_CLIENTSPEC */ /* LISTofRECORDRANGE */ } xRecordRegisterClientsReq; #define sz_xRecordRegisterClientsReq 20 /* * Delete from RC */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; RECORD_RC context; CARD32 nClients; /* LISTofRECORD_CLIENTSPEC */ } xRecordUnregisterClientsReq; #define sz_xRecordUnregisterClientsReq 12 /* * Query RC */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; RECORD_RC context; } xRecordGetContextReq; #define sz_xRecordGetContextReq 8 typedef struct { CARD8 type; BOOL enabled; CARD16 sequenceNumber; CARD32 length; RECORD_ELEMENT_HEADER elementHeader; CARD8 pad; CARD16 pad0; CARD32 nClients; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; /* LISTofCLIENT_INFO */ /* intercepted-clients */ } xRecordGetContextReply; #define sz_xRecordGetContextReply 32 /* * Enable data interception */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; RECORD_RC context; } xRecordEnableContextReq; #define sz_xRecordEnableContextReq 8 typedef struct { CARD8 type; CARD8 category; CARD16 sequenceNumber; CARD32 length; RECORD_ELEMENT_HEADER elementHeader; BOOL clientSwapped; CARD16 pad1; RECORD_XIDBASE idBase; CARD32 serverTime; CARD32 recordedSequenceNumber; CARD32 pad3; CARD32 pad4; /* BYTE data; */ } xRecordEnableContextReply; #define sz_xRecordEnableContextReply 32 /* * Disable data interception */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; RECORD_RC context; } xRecordDisableContextReq; #define sz_xRecordDisableContextReq 8 /* * Free RC */ typedef struct { CARD8 reqType; CARD8 recordReqType; CARD16 length; RECORD_RC context; } xRecordFreeContextReq; #define sz_xRecordFreeContextReq 8 #undef RECORD_RC #undef RECORD_XIDBASE #undef RECORD_ELEMENT_HEADER #undef RECORD_CLIENTSPEC #endif PKZX11/extensions/shmproto.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ********************************************************/ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #ifndef _SHMPROTO_H_ #define _SHMPROTO_H_ #include #define ShmSeg CARD32 #define Drawable CARD32 #define VisualID CARD32 #define GContext CARD32 #define Pixmap CARD32 #define X_ShmQueryVersion 0 #define X_ShmAttach 1 #define X_ShmDetach 2 #define X_ShmPutImage 3 #define X_ShmGetImage 4 #define X_ShmCreatePixmap 5 #define X_ShmAttachFd 6 #define X_ShmCreateSegment 7 typedef struct _ShmQueryVersion { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmQueryVersion */ CARD16 length; } xShmQueryVersionReq; #define sz_xShmQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL sharedPixmaps; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of SHM protocol */ CARD16 minorVersion; /* minor version of SHM protocol */ CARD16 uid; CARD16 gid; CARD8 pixmapFormat; CARD8 pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xShmQueryVersionReply; #define sz_xShmQueryVersionReply 32 typedef struct _ShmAttach { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmAttach */ CARD16 length; ShmSeg shmseg; CARD32 shmid; BOOL readOnly; BYTE pad0; CARD16 pad1; } xShmAttachReq; #define sz_xShmAttachReq 16 typedef struct _ShmDetach { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmDetach */ CARD16 length; ShmSeg shmseg; } xShmDetachReq; #define sz_xShmDetachReq 8 typedef struct _ShmPutImage { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmPutImage */ CARD16 length; Drawable drawable; GContext gc; CARD16 totalWidth; CARD16 totalHeight; CARD16 srcX; CARD16 srcY; CARD16 srcWidth; CARD16 srcHeight; INT16 dstX; INT16 dstY; CARD8 depth; CARD8 format; CARD8 sendEvent; CARD8 bpad; ShmSeg shmseg; CARD32 offset; } xShmPutImageReq; #define sz_xShmPutImageReq 40 typedef struct _ShmGetImage { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmGetImage */ CARD16 length; Drawable drawable; INT16 x; INT16 y; CARD16 width; CARD16 height; CARD32 planeMask; CARD8 format; CARD8 pad0; CARD8 pad1; CARD8 pad2; ShmSeg shmseg; CARD32 offset; } xShmGetImageReq; #define sz_xShmGetImageReq 32 typedef struct _ShmGetImageReply { BYTE type; /* X_Reply */ CARD8 depth; CARD16 sequenceNumber; CARD32 length; VisualID visual; CARD32 size; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xShmGetImageReply; #define sz_xShmGetImageReply 32 typedef struct _ShmCreatePixmap { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmCreatePixmap */ CARD16 length; Pixmap pid; Drawable drawable; CARD16 width; CARD16 height; CARD8 depth; CARD8 pad0; CARD8 pad1; CARD8 pad2; ShmSeg shmseg; CARD32 offset; } xShmCreatePixmapReq; #define sz_xShmCreatePixmapReq 28 typedef struct _ShmCompletion { BYTE type; /* always eventBase + ShmCompletion */ BYTE bpad0; CARD16 sequenceNumber; Drawable drawable; CARD16 minorEvent; BYTE majorEvent; BYTE bpad1; ShmSeg shmseg; CARD32 offset; CARD32 pad0; CARD32 pad1; CARD32 pad2; } xShmCompletionEvent; #define sz_xShmCompletionEvent 32 /* Version 1.2 additions */ typedef struct _ShmAttachFd { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmAttachFd */ CARD16 length; ShmSeg shmseg; BOOL readOnly; BYTE pad0; CARD16 pad1; } xShmAttachFdReq; /* File descriptor is passed with this request */ #define sz_xShmAttachFdReq 12 typedef struct _ShmCreateSegment { CARD8 reqType; /* always ShmReqCode */ CARD8 shmReqType; /* always X_ShmAttachFd */ CARD16 length; ShmSeg shmseg; CARD32 size; BOOL readOnly; BYTE pad0; CARD16 pad1; } xShmCreateSegmentReq; #define sz_xShmCreateSegmentReq 16 typedef struct { CARD8 type; /* must be X_Reply */ CARD8 nfd; /* must be 1 */ CARD16 sequenceNumber; /* last sequence number */ CARD32 length; /* 0 */ CARD32 pad2; /* unused */ CARD32 pad3; /* unused */ CARD32 pad4; /* unused */ CARD32 pad5; /* unused */ CARD32 pad6; /* unused */ CARD32 pad7; /* unused */ } xShmCreateSegmentReply; /* File descriptor is passed with this reply */ #define sz_xShmCreateSegmentReply 32 #undef ShmSeg #undef Drawable #undef VisualID #undef GContext #undef Pixmap #endif /* _SHMPROTO_H_ */ PKZ5 ST=T=X11/extensions/xf86vmproto.hnu[/* Copyright 1995 Kaleb S. KEITHLEY Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Kaleb S. KEITHLEY shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Kaleb S. KEITHLEY */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #ifndef _XF86VIDMODEPROTO_H_ #define _XF86VIDMODEPROTO_H_ #include #define XF86VIDMODENAME "XFree86-VidModeExtension" #define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */ #define XF86VIDMODE_MINOR_VERSION 2 #define X_XF86VidModeQueryVersion 0 #define X_XF86VidModeGetModeLine 1 #define X_XF86VidModeModModeLine 2 #define X_XF86VidModeSwitchMode 3 #define X_XF86VidModeGetMonitor 4 #define X_XF86VidModeLockModeSwitch 5 #define X_XF86VidModeGetAllModeLines 6 #define X_XF86VidModeAddModeLine 7 #define X_XF86VidModeDeleteModeLine 8 #define X_XF86VidModeValidateModeLine 9 #define X_XF86VidModeSwitchToMode 10 #define X_XF86VidModeGetViewPort 11 #define X_XF86VidModeSetViewPort 12 /* new for version 2.x of this extension */ #define X_XF86VidModeGetDotClocks 13 #define X_XF86VidModeSetClientVersion 14 #define X_XF86VidModeSetGamma 15 #define X_XF86VidModeGetGamma 16 #define X_XF86VidModeGetGammaRamp 17 #define X_XF86VidModeSetGammaRamp 18 #define X_XF86VidModeGetGammaRampSize 19 #define X_XF86VidModeGetPermissions 20 /* * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm. * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune * client. * major version 2 == uses new protocol version in XFree86 4.0. */ typedef struct _XF86VidModeQueryVersion { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86VidModeQueryVersion */ CARD16 length; } xXF86VidModeQueryVersionReq; #define sz_xXF86VidModeQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of XF86VidMode */ CARD16 minorVersion; /* minor version of XF86VidMode */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86VidModeQueryVersionReply; #define sz_xXF86VidModeQueryVersionReply 32 typedef struct _XF86VidModeGetModeLine { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD16 screen; CARD16 pad; } xXF86VidModeGetModeLineReq, xXF86VidModeGetAllModeLinesReq, xXF86VidModeGetMonitorReq, xXF86VidModeGetViewPortReq, xXF86VidModeGetDotClocksReq, xXF86VidModeGetPermissionsReq; #define sz_xXF86VidModeGetModeLineReq 8 #define sz_xXF86VidModeGetAllModeLinesReq 8 #define sz_xXF86VidModeGetMonitorReq 8 #define sz_xXF86VidModeGetViewPortReq 8 #define sz_xXF86VidModeGetDotClocksReq 8 #define sz_xXF86VidModeGetPermissionsReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 hskew; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD16 pad2; CARD32 flags; CARD32 reserved1; CARD32 reserved2; CARD32 reserved3; CARD32 privsize; } xXF86VidModeGetModeLineReply; #define sz_xXF86VidModeGetModeLineReply 52 /* 0.x version */ typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD32 flags; CARD32 privsize; } xXF86OldVidModeGetModeLineReply; #define sz_xXF86OldVidModeGetModeLineReply 36 typedef struct { CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD32 hskew; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD16 pad1; CARD32 flags; CARD32 reserved1; CARD32 reserved2; CARD32 reserved3; CARD32 privsize; } xXF86VidModeModeInfo; /* 0.x version */ typedef struct { CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD32 flags; CARD32 privsize; } xXF86OldVidModeModeInfo; typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 modecount; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86VidModeGetAllModeLinesReply; #define sz_xXF86VidModeGetAllModeLinesReply 32 typedef struct _XF86VidModeAddModeLine { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ CARD16 length; CARD32 screen; /* could be CARD16 but need the pad */ CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 hskew; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD16 pad1; CARD32 flags; CARD32 reserved1; CARD32 reserved2; CARD32 reserved3; CARD32 privsize; CARD32 after_dotclock; CARD16 after_hdisplay; CARD16 after_hsyncstart; CARD16 after_hsyncend; CARD16 after_htotal; CARD16 after_hskew; CARD16 after_vdisplay; CARD16 after_vsyncstart; CARD16 after_vsyncend; CARD16 after_vtotal; CARD16 pad2; CARD32 after_flags; CARD32 reserved4; CARD32 reserved5; CARD32 reserved6; } xXF86VidModeAddModeLineReq; #define sz_xXF86VidModeAddModeLineReq 92 /* 0.x version */ typedef struct _XF86OldVidModeAddModeLine { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ CARD16 length; CARD32 screen; /* could be CARD16 but need the pad */ CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD32 flags; CARD32 privsize; CARD32 after_dotclock; CARD16 after_hdisplay; CARD16 after_hsyncstart; CARD16 after_hsyncend; CARD16 after_htotal; CARD16 after_vdisplay; CARD16 after_vsyncstart; CARD16 after_vsyncend; CARD16 after_vtotal; CARD32 after_flags; } xXF86OldVidModeAddModeLineReq; #define sz_xXF86OldVidModeAddModeLineReq 60 typedef struct _XF86VidModeModModeLine { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86VidModeModModeLine */ CARD16 length; CARD32 screen; /* could be CARD16 but need the pad */ CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 hskew; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD16 pad1; CARD32 flags; CARD32 reserved1; CARD32 reserved2; CARD32 reserved3; CARD32 privsize; } xXF86VidModeModModeLineReq; #define sz_xXF86VidModeModModeLineReq 48 /* 0.x version */ typedef struct _XF86OldVidModeModModeLine { CARD8 reqType; /* always XF86OldVidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86OldVidModeModModeLine */ CARD16 length; CARD32 screen; /* could be CARD16 but need the pad */ CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD32 flags; CARD32 privsize; } xXF86OldVidModeModModeLineReq; #define sz_xXF86OldVidModeModModeLineReq 32 typedef struct _XF86VidModeValidateModeLine { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD32 screen; /* could be CARD16 but need the pad */ CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 hskew; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD16 pad1; CARD32 flags; CARD32 reserved1; CARD32 reserved2; CARD32 reserved3; CARD32 privsize; } xXF86VidModeDeleteModeLineReq, xXF86VidModeValidateModeLineReq, xXF86VidModeSwitchToModeReq; #define sz_xXF86VidModeDeleteModeLineReq 52 #define sz_xXF86VidModeValidateModeLineReq 52 #define sz_xXF86VidModeSwitchToModeReq 52 /* 0.x version */ typedef struct _XF86OldVidModeValidateModeLine { CARD8 reqType; /* always XF86OldVidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD32 screen; /* could be CARD16 but need the pad */ CARD32 dotclock; CARD16 hdisplay; CARD16 hsyncstart; CARD16 hsyncend; CARD16 htotal; CARD16 vdisplay; CARD16 vsyncstart; CARD16 vsyncend; CARD16 vtotal; CARD32 flags; CARD32 privsize; } xXF86OldVidModeDeleteModeLineReq, xXF86OldVidModeValidateModeLineReq, xXF86OldVidModeSwitchToModeReq; #define sz_xXF86OldVidModeDeleteModeLineReq 36 #define sz_xXF86OldVidModeValidateModeLineReq 36 #define sz_xXF86OldVidModeSwitchToModeReq 36 typedef struct _XF86VidModeSwitchMode { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSwitchMode */ CARD16 length; CARD16 screen; CARD16 zoom; } xXF86VidModeSwitchModeReq; #define sz_xXF86VidModeSwitchModeReq 8 typedef struct _XF86VidModeLockModeSwitch { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86VidModeLockModeSwitch */ CARD16 length; CARD16 screen; CARD16 lock; } xXF86VidModeLockModeSwitchReq; #define sz_xXF86VidModeLockModeSwitchReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86VidModeValidateModeLineReply; #define sz_xXF86VidModeValidateModeLineReply 32 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD8 vendorLength; CARD8 modelLength; CARD8 nhsync; CARD8 nvsync; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86VidModeGetMonitorReply; #define sz_xXF86VidModeGetMonitorReply 32 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 x; CARD32 y; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86VidModeGetViewPortReply; #define sz_xXF86VidModeGetViewPortReply 32 typedef struct _XF86VidModeSetViewPort { CARD8 reqType; /* always VidModeReqCode */ CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSetViewPort */ CARD16 length; CARD16 screen; CARD16 pad; CARD32 x; CARD32 y; } xXF86VidModeSetViewPortReq; #define sz_xXF86VidModeSetViewPortReq 16 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 flags; CARD32 clocks; CARD32 maxclocks; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xXF86VidModeGetDotClocksReply; #define sz_xXF86VidModeGetDotClocksReply 32 typedef struct _XF86VidModeSetClientVersion { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD16 major; CARD16 minor; } xXF86VidModeSetClientVersionReq; #define sz_xXF86VidModeSetClientVersionReq 8 typedef struct _XF86VidModeGetGamma { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD16 screen; CARD16 pad; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86VidModeGetGammaReq; #define sz_xXF86VidModeGetGammaReq 32 typedef struct { BYTE type; BOOL pad; CARD16 sequenceNumber; CARD32 length; CARD32 red; CARD32 green; CARD32 blue; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xXF86VidModeGetGammaReply; #define sz_xXF86VidModeGetGammaReply 32 typedef struct _XF86VidModeSetGamma { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD16 screen; CARD16 pad; CARD32 red; CARD32 green; CARD32 blue; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xXF86VidModeSetGammaReq; #define sz_xXF86VidModeSetGammaReq 32 typedef struct _XF86VidModeSetGammaRamp { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD16 screen; CARD16 size; } xXF86VidModeSetGammaRampReq; #define sz_xXF86VidModeSetGammaRampReq 8 typedef struct _XF86VidModeGetGammaRamp { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD16 screen; CARD16 size; } xXF86VidModeGetGammaRampReq; #define sz_xXF86VidModeGetGammaRampReq 8 typedef struct { BYTE type; BOOL pad; CARD16 sequenceNumber; CARD32 length; CARD16 size; CARD16 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86VidModeGetGammaRampReply; #define sz_xXF86VidModeGetGammaRampReply 32 typedef struct _XF86VidModeGetGammaRampSize { CARD8 reqType; /* always XF86VidModeReqCode */ CARD8 xf86vidmodeReqType; CARD16 length; CARD16 screen; CARD16 pad; } xXF86VidModeGetGammaRampSizeReq; #define sz_xXF86VidModeGetGammaRampSizeReq 8 typedef struct { BYTE type; BOOL pad; CARD16 sequenceNumber; CARD32 length; CARD16 size; CARD16 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86VidModeGetGammaRampSizeReply; #define sz_xXF86VidModeGetGammaRampSizeReply 32 typedef struct { BYTE type; BOOL pad; CARD16 sequenceNumber; CARD32 length; CARD32 permissions; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86VidModeGetPermissionsReply; #define sz_xXF86VidModeGetPermissionsReply 32 #endif /* _XF86VIDMODEPROTO_H_ */ PKZ VVX11/extensions/shapeconst.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ********************************************************/ #ifndef _SHAPECONST_H_ #define _SHAPECONST_H_ /* * Protocol requests constants and alignment values * These would really be in SHAPE's X.h and Xproto.h equivalents */ #define SHAPENAME "SHAPE" #define SHAPE_MAJOR_VERSION 1 /* current version numbers */ #define SHAPE_MINOR_VERSION 1 #define ShapeSet 0 #define ShapeUnion 1 #define ShapeIntersect 2 #define ShapeSubtract 3 #define ShapeInvert 4 #define ShapeBounding 0 #define ShapeClip 1 #define ShapeInput 2 #define ShapeNotifyMask (1L << 0) #define ShapeNotify 0 #define ShapeNumberEvents (ShapeNotify + 1) #endif /* _SHAPECONST_H_ */ PKZ?s{22X11/extensions/XIproto.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _XIPROTO_H #define _XIPROTO_H #include #include /* make sure types have right sizes for protocol structures. */ #define Window CARD32 #define Time CARD32 #define KeyCode CARD8 #define Mask CARD32 #define Atom CARD32 #define Cursor CARD32 /********************************************************* * * number of events, errors, and extension name. * */ #define MORE_EVENTS 0x80 #define DEVICE_BITS 0x7F #define InputClassBits 0x3F /* bits in mode field for input classes */ #define ModeBitsShift 6 /* amount to shift the remaining bits */ #define numInputClasses 7 #define IEVENTS 17 /* does NOT include generic events */ #define IERRORS 5 #define IREQUESTS 39 #define CLIENT_REQ 1 typedef struct _XExtEventInfo { Mask mask; BYTE type; BYTE word; } XExtEventInfo; #ifndef _XITYPEDEF_POINTER typedef void *Pointer; #endif struct tmask { Mask mask; void *dev; }; /********************************************************* * * Event constants used by library. * */ #define XI_DeviceValuator 0 #define XI_DeviceKeyPress 1 #define XI_DeviceKeyRelease 2 #define XI_DeviceButtonPress 3 #define XI_DeviceButtonRelease 4 #define XI_DeviceMotionNotify 5 #define XI_DeviceFocusIn 6 #define XI_DeviceFocusOut 7 #define XI_ProximityIn 8 #define XI_ProximityOut 9 #define XI_DeviceStateNotify 10 #define XI_DeviceMappingNotify 11 #define XI_ChangeDeviceNotify 12 #define XI_DeviceKeystateNotify 13 #define XI_DeviceButtonstateNotify 14 #define XI_DevicePresenceNotify 15 #define XI_DevicePropertyNotify 16 /********************************************************* * * Protocol request constants * */ #define X_GetExtensionVersion 1 #define X_ListInputDevices 2 #define X_OpenDevice 3 #define X_CloseDevice 4 #define X_SetDeviceMode 5 #define X_SelectExtensionEvent 6 #define X_GetSelectedExtensionEvents 7 #define X_ChangeDeviceDontPropagateList 8 #define X_GetDeviceDontPropagateList 9 #define X_GetDeviceMotionEvents 10 #define X_ChangeKeyboardDevice 11 #define X_ChangePointerDevice 12 #define X_GrabDevice 13 #define X_UngrabDevice 14 #define X_GrabDeviceKey 15 #define X_UngrabDeviceKey 16 #define X_GrabDeviceButton 17 #define X_UngrabDeviceButton 18 #define X_AllowDeviceEvents 19 #define X_GetDeviceFocus 20 #define X_SetDeviceFocus 21 #define X_GetFeedbackControl 22 #define X_ChangeFeedbackControl 23 #define X_GetDeviceKeyMapping 24 #define X_ChangeDeviceKeyMapping 25 #define X_GetDeviceModifierMapping 26 #define X_SetDeviceModifierMapping 27 #define X_GetDeviceButtonMapping 28 #define X_SetDeviceButtonMapping 29 #define X_QueryDeviceState 30 #define X_SendExtensionEvent 31 #define X_DeviceBell 32 #define X_SetDeviceValuators 33 #define X_GetDeviceControl 34 #define X_ChangeDeviceControl 35 /* XI 1.5 */ #define X_ListDeviceProperties 36 #define X_ChangeDeviceProperty 37 #define X_DeleteDeviceProperty 38 #define X_GetDeviceProperty 39 /********************************************************* * * Protocol request and reply structures. * * GetExtensionVersion. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GetExtensionVersion */ CARD16 length; CARD16 nbytes; CARD8 pad1, pad2; } xGetExtensionVersionReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetExtensionVersion */ CARD16 sequenceNumber; CARD32 length; CARD16 major_version; CARD16 minor_version; BOOL present; CARD8 pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; } xGetExtensionVersionReply; /********************************************************* * * ListInputDevices. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_ListInputDevices */ CARD16 length; } xListInputDevicesReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_ListInputDevices */ CARD16 sequenceNumber; CARD32 length; CARD8 ndevices; CARD8 pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xListInputDevicesReply; typedef struct _xDeviceInfo *xDeviceInfoPtr; typedef struct _xAnyClassinfo *xAnyClassPtr; typedef struct _xAnyClassinfo { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 length; } xAnyClassInfo; typedef struct _xDeviceInfo { CARD32 type; CARD8 id; CARD8 num_classes; CARD8 use; /* IsXPointer | IsXKeyboard | IsXExtension... */ CARD8 attached; /* id of master dev (if IsXExtension..) */ } xDeviceInfo; typedef struct _xKeyInfo *xKeyInfoPtr; typedef struct _xKeyInfo { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 length; KeyCode min_keycode; KeyCode max_keycode; CARD16 num_keys; CARD8 pad1,pad2; } xKeyInfo; typedef struct _xButtonInfo *xButtonInfoPtr; typedef struct _xButtonInfo { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 length; CARD16 num_buttons; } xButtonInfo; typedef struct _xValuatorInfo *xValuatorInfoPtr; typedef struct _xValuatorInfo { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 length; CARD8 num_axes; CARD8 mode; CARD32 motion_buffer_size; } xValuatorInfo; typedef struct _xAxisInfo *xAxisInfoPtr; typedef struct _xAxisInfo { CARD32 resolution; CARD32 min_value; CARD32 max_value; } xAxisInfo; /********************************************************* * * OpenDevice. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_OpenDevice */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xOpenDeviceReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_OpenDevice */ CARD16 sequenceNumber; CARD32 length; CARD8 num_classes; BYTE pad1, pad2, pad3; CARD32 pad00; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; } xOpenDeviceReply; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 event_type_base; } xInputClassInfo; /********************************************************* * * CloseDevice. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_CloseDevice */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xCloseDeviceReq; /********************************************************* * * SetDeviceMode. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_SetDeviceMode */ CARD16 length; CARD8 deviceid; CARD8 mode; BYTE pad1, pad2; } xSetDeviceModeReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_SetDeviceMode */ CARD16 sequenceNumber; CARD32 length; CARD8 status; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xSetDeviceModeReply; /********************************************************* * * SelectExtensionEvent. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_SelectExtensionEvent */ CARD16 length; Window window; CARD16 count; CARD16 pad00; } xSelectExtensionEventReq; /********************************************************* * * GetSelectedExtensionEvent. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_GetSelectedExtensionEvents */ CARD16 length; Window window; } xGetSelectedExtensionEventsReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* GetSelectedExtensionEvents */ CARD16 sequenceNumber; CARD32 length; CARD16 this_client_count; CARD16 all_clients_count; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xGetSelectedExtensionEventsReply; /********************************************************* * * ChangeDeviceDontPropagateList. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */ CARD16 length; Window window; CARD16 count; CARD8 mode; BYTE pad; } xChangeDeviceDontPropagateListReq; /********************************************************* * * GetDeviceDontPropagateList. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_GetDeviceDontPropagateList */ CARD16 length; Window window; } xGetDeviceDontPropagateListReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* GetDeviceDontPropagateList */ CARD16 sequenceNumber; CARD32 length; CARD16 count; CARD16 pad00; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xGetDeviceDontPropagateListReply; /********************************************************* * * GetDeviceMotionEvents. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GetDeviceMotionEvents*/ CARD16 length; Time start; Time stop; CARD8 deviceid; BYTE pad1, pad2, pad3; } xGetDeviceMotionEventsReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetDeviceMotionEvents */ CARD16 sequenceNumber; CARD32 length; CARD32 nEvents; CARD8 axes; CARD8 mode; BYTE pad1, pad2; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; } xGetDeviceMotionEventsReply; /********************************************************* * * ChangeKeyboardDevice. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_ChangeKeyboardDevice */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xChangeKeyboardDeviceReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_ChangeKeyboardDevice*/ CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD8 status; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xChangeKeyboardDeviceReply; /********************************************************* * * ChangePointerDevice. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_ChangePointerDevice */ CARD16 length; CARD8 xaxis; CARD8 yaxis; CARD8 deviceid; BYTE pad1; } xChangePointerDeviceReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_ChangePointerDevice */ CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD8 status; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xChangePointerDeviceReply; /********************************************************* * * GrabDevice. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GrabDevice */ CARD16 length; Window grabWindow; Time time; CARD16 event_count; CARD8 this_device_mode; CARD8 other_devices_mode; BOOL ownerEvents; CARD8 deviceid; CARD16 pad01; } xGrabDeviceReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GrabDevice */ CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD8 status; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xGrabDeviceReply; /********************************************************* * * UngrabDevice. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_UnGrabDevice */ CARD16 length; Time time; CARD8 deviceid; BYTE pad1, pad2, pad3; } xUngrabDeviceReq; /********************************************************* * * GrabDeviceKey. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GrabDeviceKey */ CARD16 length; Window grabWindow; CARD16 event_count; CARD16 modifiers; CARD8 modifier_device; CARD8 grabbed_device; CARD8 key; BYTE this_device_mode; BYTE other_devices_mode; BOOL ownerEvents; BYTE pad1, pad2; } xGrabDeviceKeyReq; /********************************************************* * * UngrabDeviceKey. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_UngrabDeviceKey */ CARD16 length; Window grabWindow; CARD16 modifiers; CARD8 modifier_device; CARD8 key; CARD8 grabbed_device; BYTE pad1, pad2, pad3; } xUngrabDeviceKeyReq; /********************************************************* * * GrabDeviceButton. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GrabDeviceButton */ CARD16 length; Window grabWindow; CARD8 grabbed_device; CARD8 modifier_device; CARD16 event_count; CARD16 modifiers; BYTE this_device_mode; BYTE other_devices_mode; CARD8 button; BOOL ownerEvents; BYTE pad1, pad2; } xGrabDeviceButtonReq; /********************************************************* * * UngrabDeviceButton. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_UngrabDeviceButton */ CARD16 length; Window grabWindow; CARD16 modifiers; CARD8 modifier_device; CARD8 button; CARD8 grabbed_device; BYTE pad1, pad2, pad3; } xUngrabDeviceButtonReq; /********************************************************* * * AllowDeviceEvents. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_AllowDeviceEvents */ CARD16 length; Time time; CARD8 mode; CARD8 deviceid; BYTE pad1, pad2; } xAllowDeviceEventsReq; /********************************************************* * * GetDeviceFocus. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GetDeviceFocus */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xGetDeviceFocusReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetDeviceFocus */ CARD16 sequenceNumber; CARD32 length; CARD32 focus; Time time; CARD8 revertTo; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; } xGetDeviceFocusReply; /********************************************************* * * SetDeviceFocus. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_SetDeviceFocus */ CARD16 length; Window focus; Time time; CARD8 revertTo; CARD8 device; CARD16 pad01; } xSetDeviceFocusReq; /********************************************************* * * GetFeedbackControl. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_GetFeedbackControl */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xGetFeedbackControlReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetFeedbackControl */ CARD16 sequenceNumber; CARD32 length; CARD16 num_feedbacks; CARD16 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; CARD32 pad06; } xGetFeedbackControlReply; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class */ #else CARD8 class; /* feedback class */ #endif CARD8 id; /* feedback id */ CARD16 length; /* feedback length */ } xFeedbackState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 id; CARD16 length; CARD16 pitch; CARD16 duration; CARD32 led_mask; CARD32 led_values; BOOL global_auto_repeat; CARD8 click; CARD8 percent; BYTE pad; BYTE auto_repeats[32]; } xKbdFeedbackState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 id; CARD16 length; CARD8 pad1,pad2; CARD16 accelNum; CARD16 accelDenom; CARD16 threshold; } xPtrFeedbackState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; CARD16 length; /* feedback length */ CARD32 resolution; INT32 min_value; INT32 max_value; } xIntegerFeedbackState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; CARD16 length; /* feedback length */ CARD16 max_symbols; CARD16 num_syms_supported; } xStringFeedbackState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; CARD16 length; /* feedback length */ CARD8 percent; BYTE pad1, pad2, pad3; CARD16 pitch; CARD16 duration; } xBellFeedbackState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; CARD16 length; /* feedback length */ CARD32 led_mask; CARD32 led_values; } xLedFeedbackState; /********************************************************* * * ChangeFeedbackControl. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_ChangeFeedbackControl */ CARD16 length; CARD32 mask; CARD8 deviceid; CARD8 feedbackid; BYTE pad1, pad2; } xChangeFeedbackControlReq; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; /* feedback id */ CARD16 length; /* feedback length */ } xFeedbackCtl; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; /* feedback length */ CARD16 length; /* feedback length */ KeyCode key; CARD8 auto_repeat_mode; INT8 click; INT8 percent; INT16 pitch; INT16 duration; CARD32 led_mask; CARD32 led_values; } xKbdFeedbackCtl; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; /* feedback id */ CARD16 length; /* feedback length */ CARD8 pad1,pad2; INT16 num; INT16 denom; INT16 thresh; } xPtrFeedbackCtl; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; /* feedback id */ CARD16 length; /* feedback length */ INT32 int_to_display; } xIntegerFeedbackCtl; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; /* feedback id */ CARD16 length; /* feedback length */ CARD8 pad1,pad2; CARD16 num_keysyms; } xStringFeedbackCtl; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; /* feedback id */ CARD16 length; /* feedback length */ INT8 percent; BYTE pad1, pad2, pad3; INT16 pitch; INT16 duration; } xBellFeedbackCtl; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; /* feedback class id */ #else CARD8 class; /* feedback class id */ #endif CARD8 id; /* feedback id */ CARD16 length; /* feedback length */ CARD32 led_mask; CARD32 led_values; } xLedFeedbackCtl; /********************************************************* * * GetDeviceKeyMapping. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GetDeviceKeyMapping */ CARD16 length; CARD8 deviceid; KeyCode firstKeyCode; CARD8 count; BYTE pad1; } xGetDeviceKeyMappingReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetDeviceKeyMapping */ CARD16 sequenceNumber; CARD32 length; CARD8 keySymsPerKeyCode; CARD8 pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetDeviceKeyMappingReply; /********************************************************* * * ChangeDeviceKeyMapping. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */ CARD16 length; CARD8 deviceid; KeyCode firstKeyCode; CARD8 keySymsPerKeyCode; CARD8 keyCodes; } xChangeDeviceKeyMappingReq; /********************************************************* * * GetDeviceModifierMapping. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GetDeviceModifierMapping */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xGetDeviceModifierMappingReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetDeviceModifierMapping */ CARD16 sequenceNumber; CARD32 length; CARD8 numKeyPerModifier; CARD8 pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetDeviceModifierMappingReply; /********************************************************* * * SetDeviceModifierMapping. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_SetDeviceModifierMapping */ CARD16 length; CARD8 deviceid; CARD8 numKeyPerModifier; CARD16 pad1; } xSetDeviceModifierMappingReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_SetDeviceModifierMapping */ CARD16 sequenceNumber; CARD32 length; CARD8 success; CARD8 pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xSetDeviceModifierMappingReply; /********************************************************* * * GetDeviceButtonMapping. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_GetDeviceButtonMapping */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xGetDeviceButtonMappingReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetDeviceButtonMapping */ CARD16 sequenceNumber; CARD32 length; CARD8 nElts; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xGetDeviceButtonMappingReply; /********************************************************* * * SetDeviceButtonMapping. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* X_SetDeviceButtonMapping */ CARD16 length; CARD8 deviceid; CARD8 map_length; BYTE pad1, pad2; } xSetDeviceButtonMappingReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_SetDeviceButtonMapping */ CARD16 sequenceNumber; CARD32 length; CARD8 status; BYTE pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xSetDeviceButtonMappingReply; /********************************************************* * * QueryDeviceState. * */ typedef struct { CARD8 reqType; CARD8 ReqType; /* always X_QueryDeviceState */ CARD16 length; CARD8 deviceid; BYTE pad1, pad2, pad3; } xQueryDeviceStateReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_QueryDeviceState */ CARD16 sequenceNumber; CARD32 length; CARD8 num_classes; BYTE pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xQueryDeviceStateReply; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 length; CARD8 num_keys; BYTE pad1; CARD8 keys[32]; } xKeyState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 length; CARD8 num_buttons; BYTE pad1; CARD8 buttons[32]; } xButtonState; typedef struct { #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 length; CARD8 num_valuators; CARD8 mode; } xValuatorState; /********************************************************* * * SendExtensionEvent. * THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH! * MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED! * */ typedef struct { CARD8 reqType; CARD8 ReqType; /* always X_SendExtensionEvent */ CARD16 length; Window destination; CARD8 deviceid; BOOL propagate; CARD16 count; CARD8 num_events; BYTE pad1,pad2,pad3; } xSendExtensionEventReq; /********************************************************* * * DeviceBell. * */ typedef struct { CARD8 reqType; CARD8 ReqType; /* always X_DeviceBell */ CARD16 length; CARD8 deviceid; CARD8 feedbackid; CARD8 feedbackclass; INT8 percent; } xDeviceBellReq; /********************************************************* * * SetDeviceValuators. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_SetDeviceValuators */ CARD16 length; CARD8 deviceid; CARD8 first_valuator; CARD8 num_valuators; BYTE pad1; } xSetDeviceValuatorsReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_SetDeviceValuators */ CARD16 sequenceNumber; CARD32 length; CARD8 status; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xSetDeviceValuatorsReply; /********************************************************* * * GetDeviceControl. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_GetDeviceControl */ CARD16 length; CARD16 control; CARD8 deviceid; BYTE pad2; } xGetDeviceControlReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetDeviceControl */ CARD16 sequenceNumber; CARD32 length; CARD8 status; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xGetDeviceControlReply; typedef struct { CARD16 control; /* control type */ CARD16 length; /* control length */ } xDeviceState; typedef struct { CARD16 control; /* control type */ CARD16 length; /* control length */ CARD32 num_valuators; /* number of valuators */ } xDeviceResolutionState; typedef struct { CARD16 control; CARD16 length; INT32 min_x; INT32 max_x; INT32 min_y; INT32 max_y; CARD32 flip_x; CARD32 flip_y; CARD32 rotation; CARD32 button_threshold; } xDeviceAbsCalibState; typedef struct { CARD16 control; CARD16 length; CARD32 offset_x; CARD32 offset_y; CARD32 width; CARD32 height; CARD32 screen; CARD32 following; } xDeviceAbsAreaState; typedef struct { CARD16 control; /* control type */ CARD16 length; /* control length */ CARD8 status; CARD8 iscore; CARD16 pad1; } xDeviceCoreState; typedef struct { CARD16 control; /* control type */ CARD16 length; /* control length */ CARD8 enable; CARD8 pad0; CARD16 pad1; } xDeviceEnableState; /********************************************************* * * ChangeDeviceControl. * */ typedef struct { CARD8 reqType; /* input extension major code */ CARD8 ReqType; /* always X_ChangeDeviceControl */ CARD16 length; CARD16 control; CARD8 deviceid; BYTE pad0; } xChangeDeviceControlReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_ChangeDeviceControl */ CARD16 sequenceNumber; CARD32 length; CARD8 status; BYTE pad1, pad2, pad3; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; } xChangeDeviceControlReply; typedef struct { CARD16 control; /* control type */ CARD16 length; /* control length */ } xDeviceCtl; typedef struct { CARD16 control; /* control type */ CARD16 length; /* control length */ CARD8 first_valuator; /* first valuator to change */ CARD8 num_valuators; /* number of valuators to change*/ CARD8 pad1,pad2; } xDeviceResolutionCtl; typedef struct { CARD16 control; CARD16 length; INT32 min_x; INT32 max_x; INT32 min_y; INT32 max_y; CARD32 flip_x; CARD32 flip_y; CARD32 rotation; CARD32 button_threshold; } xDeviceAbsCalibCtl; typedef struct { CARD16 control; CARD16 length; CARD32 offset_x; CARD32 offset_y; INT32 width; INT32 height; INT32 screen; CARD32 following; } xDeviceAbsAreaCtl; typedef struct { CARD16 control; CARD16 length; CARD8 status; CARD8 pad0; CARD16 pad1; } xDeviceCoreCtl; typedef struct { CARD16 control; CARD16 length; CARD8 enable; CARD8 pad0; CARD16 pad1; } xDeviceEnableCtl; /* XI 1.5 */ /********************************************************* * * ListDeviceProperties. * */ typedef struct { CARD8 reqType; /* input extension major opcode */ CARD8 ReqType; /* always X_ListDeviceProperties */ CARD16 length; CARD8 deviceid; CARD8 pad0; CARD16 pad1; } xListDevicePropertiesReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_ListDeviceProperties */ CARD16 sequenceNumber; CARD32 length; CARD16 nAtoms; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xListDevicePropertiesReply; /********************************************************* * * ChangeDeviceProperty. * */ typedef struct { CARD8 reqType; /* input extension major opcode */ CARD8 ReqType; /* always X_ChangeDeviceProperty */ CARD16 length; Atom property; Atom type; CARD8 deviceid; CARD8 format; CARD8 mode; CARD8 pad; CARD32 nUnits; } xChangeDevicePropertyReq; /********************************************************* * * DeleteDeviceProperty. * */ typedef struct { CARD8 reqType; /* input extension major opcode */ CARD8 ReqType; /* always X_DeleteDeviceProperty */ CARD16 length; Atom property; CARD8 deviceid; CARD8 pad0; CARD16 pad1; } xDeleteDevicePropertyReq; /********************************************************* * * GetDeviceProperty. * */ typedef struct { CARD8 reqType; /* input extension major opcode */ CARD8 ReqType; /* always X_GetDeviceProperty */ CARD16 length; Atom property; Atom type; CARD32 longOffset; CARD32 longLength; CARD8 deviceid; #if defined(__cplusplus) || defined(c_plusplus) BOOL c_delete; #else BOOL delete; #endif CARD16 pad; } xGetDevicePropertyReq; typedef struct { CARD8 repType; /* X_Reply */ CARD8 RepType; /* always X_GetDeviceProperty */ CARD16 sequenceNumber; CARD32 length; Atom propertyType; CARD32 bytesAfter; CARD32 nItems; CARD8 format; CARD8 deviceid; CARD16 pad1; CARD32 pad2; CARD32 pad3; } xGetDevicePropertyReply; /********************************************************** * * Input extension events. * * DeviceValuator * */ typedef struct { BYTE type; CARD8 deviceid; CARD16 sequenceNumber; KeyButMask device_state; CARD8 num_valuators; CARD8 first_valuator; INT32 valuator0; INT32 valuator1; INT32 valuator2; INT32 valuator3; INT32 valuator4; INT32 valuator5; } deviceValuator; /********************************************************** * * DeviceKeyButtonPointer. * * Used for: DeviceKeyPress, DeviceKeyRelease, * DeviceButtonPress, DeviceButtonRelease, * ProximityIn, ProximityOut * DeviceMotionNotify, * */ typedef struct { BYTE type; BYTE detail; CARD16 sequenceNumber; Time time; Window root; Window event; Window child; INT16 root_x; INT16 root_y; INT16 event_x; INT16 event_y; KeyButMask state; BOOL same_screen; CARD8 deviceid; } deviceKeyButtonPointer; /********************************************************** * * DeviceFocus. * */ typedef struct { BYTE type; BYTE detail; CARD16 sequenceNumber; Time time; Window window; BYTE mode; CARD8 deviceid; BYTE pad1, pad2; CARD32 pad00; CARD32 pad01; CARD32 pad02; CARD32 pad03; } deviceFocus; /********************************************************** * * DeviceStateNotify. * * Note that the two high-order bits in the classes_reported * field are the proximity state (InProximity or OutOfProximity), * and the device mode (Absolute or Relative), respectively. * */ typedef struct { BYTE type; BYTE deviceid; CARD16 sequenceNumber; Time time; CARD8 num_keys; CARD8 num_buttons; CARD8 num_valuators; CARD8 classes_reported; CARD8 buttons[4]; CARD8 keys[4]; INT32 valuator0; INT32 valuator1; INT32 valuator2; } deviceStateNotify; /********************************************************** * * DeviceKeyStateNotify. * */ typedef struct { BYTE type; BYTE deviceid; CARD16 sequenceNumber; CARD8 keys[28]; } deviceKeyStateNotify; /********************************************************** * * DeviceButtonStateNotify. * */ typedef struct { BYTE type; BYTE deviceid; CARD16 sequenceNumber; CARD8 buttons[28]; } deviceButtonStateNotify; /********************************************************** * * DeviceMappingNotify. * Fields must be kept in sync with core mappingnotify event. * */ typedef struct { BYTE type; BYTE deviceid; CARD16 sequenceNumber; CARD8 request; KeyCode firstKeyCode; CARD8 count; BYTE pad1; Time time; CARD32 pad00; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; } deviceMappingNotify; /********************************************************** * * ChangeDeviceNotify. * */ typedef struct { BYTE type; BYTE deviceid; CARD16 sequenceNumber; Time time; CARD8 request; BYTE pad1, pad2, pad3; CARD32 pad00; CARD32 pad01; CARD32 pad02; CARD32 pad03; CARD32 pad04; } changeDeviceNotify; /********************************************************** * * devicePresenceNotify. * */ typedef struct { BYTE type; BYTE pad00; CARD16 sequenceNumber; Time time; BYTE devchange; /* Device{Added|Removed|Enabled|Disabled|ControlChanged} */ BYTE deviceid; CARD16 control; CARD32 pad02; CARD32 pad03; CARD32 pad04; CARD32 pad05; CARD32 pad06; } devicePresenceNotify; /********************************************************* * DevicePropertyNotifyEvent * * Sent whenever a device's property changes. * */ typedef struct { BYTE type; BYTE state; /* NewValue or Deleted */ CARD16 sequenceNumber; CARD32 time; Atom atom; /* affected property */ CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD16 pad5; CARD8 pad4; CARD8 deviceid; /* id of device */ } devicePropertyNotify; #undef Window #undef Time #undef KeyCode #undef Mask #undef Atom #undef Cursor #endif PKZfHddX11/extensions/randrproto.hnu[/* * Copyright © 2000 Compaq Computer Corporation * Copyright © 2002 Hewlett-Packard Company * Copyright © 2006 Intel Corporation * Copyright © 2008 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * * Author: Jim Gettys, Hewlett-Packard Company, Inc. * Keith Packard, Intel Corporation */ /* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */ /* V1.0 removes depth switching from the protocol */ #ifndef _XRANDRP_H_ #define _XRANDRP_H_ #include #include #define Window CARD32 #define Drawable CARD32 #define Font CARD32 #define Pixmap CARD32 #define Cursor CARD32 #define Colormap CARD32 #define GContext CARD32 #define Atom CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define RROutput CARD32 #define RRMode CARD32 #define RRCrtc CARD32 #define RRProvider CARD32 #define RRModeFlags CARD32 #define RRLease CARD32 #define Rotation CARD16 #define SizeID CARD16 #define SubpixelOrder CARD16 /* * data structures */ typedef struct { CARD16 widthInPixels; CARD16 heightInPixels; CARD16 widthInMillimeters; CARD16 heightInMillimeters; } xScreenSizes; #define sz_xScreenSizes 8 /* * requests and replies */ typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xRRQueryVersionReq; #define sz_xRRQueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRRQueryVersionReply; #define sz_xRRQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; } xRRGetScreenInfoReq; #define sz_xRRGetScreenInfoReq 8 /* * the xRRScreenInfoReply structure is followed by: * * the size information */ typedef struct { BYTE type; /* X_Reply */ BYTE setOfRotations; CARD16 sequenceNumber; CARD32 length; Window root; Time timestamp; Time configTimestamp; CARD16 nSizes; SizeID sizeID; Rotation rotation; CARD16 rate; CARD16 nrateEnts; CARD16 pad; } xRRGetScreenInfoReply; #define sz_xRRGetScreenInfoReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Drawable drawable; Time timestamp; Time configTimestamp; SizeID sizeID; Rotation rotation; } xRR1_0SetScreenConfigReq; #define sz_xRR1_0SetScreenConfigReq 20 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Drawable drawable; Time timestamp; Time configTimestamp; SizeID sizeID; Rotation rotation; CARD16 rate; CARD16 pad; } xRRSetScreenConfigReq; #define sz_xRRSetScreenConfigReq 24 typedef struct { BYTE type; /* X_Reply */ CARD8 status; CARD16 sequenceNumber; CARD32 length; Time newTimestamp; Time newConfigTimestamp; Window root; CARD16 subpixelOrder; CARD16 pad4; CARD32 pad5; CARD32 pad6; } xRRSetScreenConfigReply; #define sz_xRRSetScreenConfigReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; CARD16 enable; CARD16 pad2; } xRRSelectInputReq; #define sz_xRRSelectInputReq 12 /* * Additions for version 1.2 */ typedef struct _xRRModeInfo { RRMode id; CARD16 width; CARD16 height; CARD32 dotClock; CARD16 hSyncStart; CARD16 hSyncEnd; CARD16 hTotal; CARD16 hSkew; CARD16 vSyncStart; CARD16 vSyncEnd; CARD16 vTotal; CARD16 nameLength; RRModeFlags modeFlags; } xRRModeInfo; #define sz_xRRModeInfo 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; } xRRGetScreenSizeRangeReq; #define sz_xRRGetScreenSizeRangeReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 pad; CARD16 sequenceNumber; CARD32 length; CARD16 minWidth; CARD16 minHeight; CARD16 maxWidth; CARD16 maxHeight; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xRRGetScreenSizeRangeReply; #define sz_xRRGetScreenSizeRangeReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; CARD16 width; CARD16 height; CARD32 widthInMillimeters; CARD32 heightInMillimeters; } xRRSetScreenSizeReq; #define sz_xRRSetScreenSizeReq 20 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; } xRRGetScreenResourcesReq; #define sz_xRRGetScreenResourcesReq 8 typedef struct { BYTE type; CARD8 pad; CARD16 sequenceNumber; CARD32 length; Time timestamp; Time configTimestamp; CARD16 nCrtcs; CARD16 nOutputs; CARD16 nModes; CARD16 nbytesNames; CARD32 pad1; CARD32 pad2; } xRRGetScreenResourcesReply; #define sz_xRRGetScreenResourcesReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; Time configTimestamp; } xRRGetOutputInfoReq; #define sz_xRRGetOutputInfoReq 12 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; Time timestamp; RRCrtc crtc; CARD32 mmWidth; CARD32 mmHeight; CARD8 connection; CARD8 subpixelOrder; CARD16 nCrtcs; CARD16 nModes; CARD16 nPreferred; CARD16 nClones; CARD16 nameLength; } xRRGetOutputInfoReply; #define sz_xRRGetOutputInfoReply 36 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; } xRRListOutputPropertiesReq; #define sz_xRRListOutputPropertiesReq 8 typedef struct { BYTE type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 nAtoms; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xRRListOutputPropertiesReply; #define sz_xRRListOutputPropertiesReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; Atom property; } xRRQueryOutputPropertyReq; #define sz_xRRQueryOutputPropertyReq 12 typedef struct { BYTE type; BYTE pad0; CARD16 sequenceNumber; CARD32 length; BOOL pending; BOOL range; BOOL immutable; BYTE pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xRRQueryOutputPropertyReply; #define sz_xRRQueryOutputPropertyReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; Atom property; BOOL pending; BOOL range; CARD16 pad; } xRRConfigureOutputPropertyReq; #define sz_xRRConfigureOutputPropertyReq 16 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; Atom property; Atom type; CARD8 format; CARD8 mode; CARD16 pad; CARD32 nUnits; } xRRChangeOutputPropertyReq; #define sz_xRRChangeOutputPropertyReq 24 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; Atom property; } xRRDeleteOutputPropertyReq; #define sz_xRRDeleteOutputPropertyReq 12 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; Atom property; Atom type; CARD32 longOffset; CARD32 longLength; #ifdef __cplusplus BOOL _delete; #else BOOL delete; #endif BOOL pending; CARD16 pad1; } xRRGetOutputPropertyReq; #define sz_xRRGetOutputPropertyReq 28 typedef struct { BYTE type; CARD8 format; CARD16 sequenceNumber; CARD32 length; Atom propertyType; CARD32 bytesAfter; CARD32 nItems; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xRRGetOutputPropertyReply; #define sz_xRRGetOutputPropertyReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; xRRModeInfo modeInfo; } xRRCreateModeReq; #define sz_xRRCreateModeReq 40 typedef struct { BYTE type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; RRMode mode; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRRCreateModeReply; #define sz_xRRCreateModeReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRMode mode; } xRRDestroyModeReq; #define sz_xRRDestroyModeReq 8 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; RRMode mode; } xRRAddOutputModeReq; #define sz_xRRAddOutputModeReq 12 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RROutput output; RRMode mode; } xRRDeleteOutputModeReq; #define sz_xRRDeleteOutputModeReq 12 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; Time configTimestamp; } xRRGetCrtcInfoReq; #define sz_xRRGetCrtcInfoReq 12 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; Time timestamp; INT16 x; INT16 y; CARD16 width; CARD16 height; RRMode mode; Rotation rotation; Rotation rotations; CARD16 nOutput; CARD16 nPossibleOutput; } xRRGetCrtcInfoReply; #define sz_xRRGetCrtcInfoReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; Time timestamp; Time configTimestamp; INT16 x; INT16 y; RRMode mode; Rotation rotation; CARD16 pad; } xRRSetCrtcConfigReq; #define sz_xRRSetCrtcConfigReq 28 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; Time newTimestamp; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRRSetCrtcConfigReply; #define sz_xRRSetCrtcConfigReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; } xRRGetCrtcGammaSizeReq; #define sz_xRRGetCrtcGammaSizeReq 8 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; CARD16 size; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xRRGetCrtcGammaSizeReply; #define sz_xRRGetCrtcGammaSizeReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; } xRRGetCrtcGammaReq; #define sz_xRRGetCrtcGammaReq 8 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; CARD16 size; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xRRGetCrtcGammaReply; #define sz_xRRGetCrtcGammaReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; CARD16 size; CARD16 pad1; } xRRSetCrtcGammaReq; #define sz_xRRSetCrtcGammaReq 12 /* * Additions for V1.3 */ typedef xRRGetScreenResourcesReq xRRGetScreenResourcesCurrentReq; #define sz_xRRGetScreenResourcesCurrentReq sz_xRRGetScreenResourcesReq typedef xRRGetScreenResourcesReply xRRGetScreenResourcesCurrentReply; #define sz_xRRGetScreenResourcesCurrentReply sz_xRRGetScreenResourcesReply typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; xRenderTransform transform; CARD16 nbytesFilter; /* number of bytes in filter name */ CARD16 pad; } xRRSetCrtcTransformReq; #define sz_xRRSetCrtcTransformReq 48 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; } xRRGetCrtcTransformReq; #define sz_xRRGetCrtcTransformReq 8 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; xRenderTransform pendingTransform; BYTE hasTransforms; CARD8 pad0; CARD16 pad1; xRenderTransform currentTransform; CARD32 pad2; CARD16 pendingNbytesFilter; /* number of bytes in filter name */ CARD16 pendingNparamsFilter; /* number of filter params */ CARD16 currentNbytesFilter; /* number of bytes in filter name */ CARD16 currentNparamsFilter; /* number of filter params */ } xRRGetCrtcTransformReply; #define sz_xRRGetCrtcTransformReply 96 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; RROutput output; } xRRSetOutputPrimaryReq; #define sz_xRRSetOutputPrimaryReq 12 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; } xRRGetOutputPrimaryReq; #define sz_xRRGetOutputPrimaryReq 8 typedef struct { BYTE type; CARD8 pad; CARD16 sequenceNumber; CARD32 length; RROutput output; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRRGetOutputPrimaryReply; #define sz_xRRGetOutputPrimaryReply 32 /* * Additions for V1.4 */ typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; } xRRGetProvidersReq; #define sz_xRRGetProvidersReq 8 typedef struct { BYTE type; CARD8 pad; CARD16 sequenceNumber; CARD32 length; Time timestamp; CARD16 nProviders; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRRGetProvidersReply; #define sz_xRRGetProvidersReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; Time configTimestamp; } xRRGetProviderInfoReq; #define sz_xRRGetProviderInfoReq 12 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; Time timestamp; CARD32 capabilities; CARD16 nCrtcs; CARD16 nOutputs; CARD16 nAssociatedProviders; CARD16 nameLength; CARD32 pad1; CARD32 pad2; } xRRGetProviderInfoReply; #define sz_xRRGetProviderInfoReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; RRProvider source_provider; Time configTimestamp; } xRRSetProviderOutputSourceReq; #define sz_xRRSetProviderOutputSourceReq 16 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; RRProvider sink_provider; Time configTimestamp; } xRRSetProviderOffloadSinkReq; #define sz_xRRSetProviderOffloadSinkReq 16 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; } xRRListProviderPropertiesReq; #define sz_xRRListProviderPropertiesReq 8 typedef struct { BYTE type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 nAtoms; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xRRListProviderPropertiesReply; #define sz_xRRListProviderPropertiesReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; Atom property; } xRRQueryProviderPropertyReq; #define sz_xRRQueryProviderPropertyReq 12 typedef struct { BYTE type; BYTE pad0; CARD16 sequenceNumber; CARD32 length; BOOL pending; BOOL range; BOOL immutable; BYTE pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xRRQueryProviderPropertyReply; #define sz_xRRQueryProviderPropertyReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; Atom property; BOOL pending; BOOL range; CARD16 pad; } xRRConfigureProviderPropertyReq; #define sz_xRRConfigureProviderPropertyReq 16 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; Atom property; Atom type; CARD8 format; CARD8 mode; CARD16 pad; CARD32 nUnits; } xRRChangeProviderPropertyReq; #define sz_xRRChangeProviderPropertyReq 24 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; Atom property; } xRRDeleteProviderPropertyReq; #define sz_xRRDeleteProviderPropertyReq 12 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRProvider provider; Atom property; Atom type; CARD32 longOffset; CARD32 longLength; #ifdef __cplusplus BOOL _delete; #else BOOL delete; #endif BOOL pending; CARD16 pad1; } xRRGetProviderPropertyReq; #define sz_xRRGetProviderPropertyReq 28 typedef struct { BYTE type; CARD8 format; CARD16 sequenceNumber; CARD32 length; Atom propertyType; CARD32 bytesAfter; CARD32 nItems; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xRRGetProviderPropertyReply; #define sz_xRRGetProviderPropertyReply 32 /* * Additions for V1.6 */ typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; RRLease lid; CARD16 nCrtcs; CARD16 nOutputs; } xRRCreateLeaseReq; #define sz_xRRCreateLeaseReq 16 typedef struct { BYTE type; CARD8 nfd; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xRRCreateLeaseReply; #define sz_xRRCreateLeaseReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRLease lid; BYTE terminate; CARD8 pad1; CARD16 pad2; } xRRFreeLeaseReq; #define sz_xRRFreeLeaseReq 12 /* * event */ typedef struct { CARD8 type; /* always evBase + ScreenChangeNotify */ CARD8 rotation; /* new rotation */ CARD16 sequenceNumber; Time timestamp; /* time screen was changed */ Time configTimestamp; /* time config data was changed */ Window root; /* root window */ Window window; /* window requesting notification */ SizeID sizeID; /* new size ID */ CARD16 subpixelOrder; /* subpixel order */ CARD16 widthInPixels; /* new size */ CARD16 heightInPixels; CARD16 widthInMillimeters; CARD16 heightInMillimeters; } xRRScreenChangeNotifyEvent; #define sz_xRRScreenChangeNotifyEvent 32 typedef struct { CARD8 type; /* always evBase + RRNotify */ CARD8 subCode; /* RRNotify_CrtcChange */ CARD16 sequenceNumber; Time timestamp; /* time crtc was changed */ Window window; /* window requesting notification */ RRCrtc crtc; /* affected CRTC */ RRMode mode; /* current mode */ CARD16 rotation; /* rotation and reflection */ CARD16 pad1; /* unused */ INT16 x; /* new location */ INT16 y; CARD16 width; /* new size */ CARD16 height; } xRRCrtcChangeNotifyEvent; #define sz_xRRCrtcChangeNotifyEvent 32 typedef struct { CARD8 type; /* always evBase + RRNotify */ CARD8 subCode; /* RRNotify_OutputChange */ CARD16 sequenceNumber; Time timestamp; /* time output was changed */ Time configTimestamp; /* time config was changed */ Window window; /* window requesting notification */ RROutput output; /* affected output */ RRCrtc crtc; /* current crtc */ RRMode mode; /* current mode */ CARD16 rotation; /* rotation and reflection */ CARD8 connection; /* connection status */ CARD8 subpixelOrder; /* subpixel order */ } xRROutputChangeNotifyEvent; #define sz_xRROutputChangeNotifyEvent 32 typedef struct { CARD8 type; /* always evBase + RRNotify */ CARD8 subCode; /* RRNotify_OutputProperty */ CARD16 sequenceNumber; Window window; /* window requesting notification */ RROutput output; /* affected output */ Atom atom; /* property name */ Time timestamp; /* time crtc was changed */ CARD8 state; /* NewValue or Deleted */ CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; } xRROutputPropertyNotifyEvent; #define sz_xRROutputPropertyNotifyEvent 32 typedef struct { CARD8 type; /* always evBase + RRNotify */ CARD8 subCode; /* RRNotify_ProviderChange */ CARD16 sequenceNumber; Time timestamp; /* time provider was changed */ Window window; /* window requesting notification */ RRProvider provider; /* affected provider */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xRRProviderChangeNotifyEvent; #define sz_xRRProviderChangeNotifyEvent 32 typedef struct { CARD8 type; /* always evBase + RRNotify */ CARD8 subCode; /* RRNotify_ProviderProperty */ CARD16 sequenceNumber; Window window; /* window requesting notification */ RRProvider provider; /* affected provider */ Atom atom; /* property name */ Time timestamp; /* time provider was changed */ CARD8 state; /* NewValue or Deleted */ CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; } xRRProviderPropertyNotifyEvent; #define sz_xRRProviderPropertyNotifyEvent 32 typedef struct { CARD8 type; /* always evBase + RRNotify */ CARD8 subCode; /* RRNotify_ResourceChange */ CARD16 sequenceNumber; Time timestamp; /* time resource was changed */ Window window; /* window requesting notification */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRRResourceChangeNotifyEvent; #define sz_xRRResourceChangeNotifyEvent 32 typedef struct { CARD8 type; /* always evBase + RRNotify */ CARD8 subCode; /* RRNotify_Lease */ CARD16 sequenceNumber; Time timestamp; /* time resource was changed */ Window window; /* window requesting notification */ RRLease lease; CARD8 created; /* created/deleted */ CARD8 pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xRRLeaseNotifyEvent; #define sz_xRRLeaseNotifyEvent 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; } xRRGetPanningReq; #define sz_xRRGetPanningReq 8 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; Time timestamp; CARD16 left; CARD16 top; CARD16 width; CARD16 height; CARD16 track_left; CARD16 track_top; CARD16 track_width; CARD16 track_height; INT16 border_left; INT16 border_top; INT16 border_right; INT16 border_bottom; } xRRGetPanningReply; #define sz_xRRGetPanningReply 36 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; RRCrtc crtc; Time timestamp; CARD16 left; CARD16 top; CARD16 width; CARD16 height; CARD16 track_left; CARD16 track_top; CARD16 track_width; CARD16 track_height; INT16 border_left; INT16 border_top; INT16 border_right; INT16 border_bottom; } xRRSetPanningReq; #define sz_xRRSetPanningReq 36 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; Time newTimestamp; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRRSetPanningReply; #define sz_xRRSetPanningReply 32 typedef struct { Atom name; BOOL primary; BOOL automatic; CARD16 noutput; INT16 x; INT16 y; CARD16 width; CARD16 height; CARD32 widthInMillimeters; CARD32 heightInMillimeters; } xRRMonitorInfo; #define sz_xRRMonitorInfo 24 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; BOOL get_active; CARD8 pad; CARD16 pad2; } xRRGetMonitorsReq; #define sz_xRRGetMonitorsReq 12 typedef struct { BYTE type; CARD8 status; CARD16 sequenceNumber; CARD32 length; Time timestamp; CARD32 nmonitors; CARD32 noutputs; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xRRGetMonitorsReply; #define sz_xRRGetMonitorsReply 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; xRRMonitorInfo monitor; } xRRSetMonitorReq; #define sz_xRRSetMonitorReq 32 typedef struct { CARD8 reqType; CARD8 randrReqType; CARD16 length; Window window; Atom name; } xRRDeleteMonitorReq; #define sz_xRRDeleteMonitorReq 12 #undef RRLease #undef RRModeFlags #undef RRCrtc #undef RRMode #undef RROutput #undef RRMode #undef RRCrtc #undef RRProvider #undef Drawable #undef Window #undef Font #undef Pixmap #undef Cursor #undef Colormap #undef GContext #undef Atom #undef Time #undef KeyCode #undef KeySym #undef Rotation #undef SizeID #undef SubpixelOrder #endif /* _XRANDRP_H_ */ PKZuuX11/extensions/bigreqsproto.hnu[/* Copyright 1992, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _BIGREQSPROTO_H_ #define _BIGREQSPROTO_H_ #define X_BigReqEnable 0 #define XBigReqNumberEvents 0 #define XBigReqNumberErrors 0 #define XBigReqExtensionName "BIG-REQUESTS" typedef struct { CARD8 reqType; /* always XBigReqCode */ CARD8 brReqType; /* always X_BigReqEnable */ CARD16 length; } xBigReqEnableReq; #define sz_xBigReqEnableReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 max_request_size; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xBigReqEnableReply; #define sz_xBigReqEnableReply 32 typedef struct { CARD8 reqType; CARD8 data; CARD16 zero; CARD32 length; } xBigReq; #endif /* _BIGREQSPROTO_H_ */ PKZU\X11/extensions/xf86bigfstr.hnu[#warning "xf86bigfstr.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include PKZ P X11/extensions/xf86dgaconst.hnu[/* Copyright (c) 1999 XFree86 Inc */ #ifndef _XF86DGACONST_H_ #define _XF86DGACONST_H_ #include #define X_XDGAQueryVersion 0 /* 1 through 9 are in xf86dga1.h */ /* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */ #define X_XDGAQueryModes 12 #define X_XDGASetMode 13 #define X_XDGASetViewport 14 #define X_XDGAInstallColormap 15 #define X_XDGASelectInput 16 #define X_XDGAFillRectangle 17 #define X_XDGACopyArea 18 #define X_XDGACopyTransparentArea 19 #define X_XDGAGetViewportStatus 20 #define X_XDGASync 21 #define X_XDGAOpenFramebuffer 22 #define X_XDGACloseFramebuffer 23 #define X_XDGASetClientVersion 24 #define X_XDGAChangePixmapMode 25 #define X_XDGACreateColormap 26 #define XDGAConcurrentAccess 0x00000001 #define XDGASolidFillRect 0x00000002 #define XDGABlitRect 0x00000004 #define XDGABlitTransRect 0x00000008 #define XDGAPixmap 0x00000010 #define XDGAInterlaced 0x00010000 #define XDGADoublescan 0x00020000 #define XDGAFlipImmediate 0x00000001 #define XDGAFlipRetrace 0x00000002 #define XDGANeedRoot 0x00000001 #define XF86DGANumberEvents 7 #define XDGAPixmapModeLarge 0 #define XDGAPixmapModeSmall 1 #define XF86DGAClientNotLocal 0 #define XF86DGANoDirectVideoMode 1 #define XF86DGAScreenNotActive 2 #define XF86DGADirectNotActivated 3 #define XF86DGAOperationNotSupported 4 #define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1) typedef struct { int num; /* A unique identifier for the mode (num > 0) */ char *name; /* name of mode given in the XF86Config */ float verticalRefresh; int flags; /* DGA_CONCURRENT_ACCESS, etc... */ int imageWidth; /* linear accessible portion (pixels) */ int imageHeight; int pixmapWidth; /* Xlib accessible portion (pixels) */ int pixmapHeight; /* both fields ignored if no concurrent access */ int bytesPerScanline; int byteOrder; /* MSBFirst, LSBFirst */ int depth; int bitsPerPixel; unsigned long redMask; unsigned long greenMask; unsigned long blueMask; short visualClass; int viewportWidth; int viewportHeight; int xViewportStep; /* viewport position granularity */ int yViewportStep; int maxViewportX; /* max viewport origin */ int maxViewportY; int viewportFlags; /* types of page flipping possible */ int reserved1; int reserved2; } XDGAMode; typedef struct { XDGAMode mode; unsigned char *data; Pixmap pixmap; } XDGADevice; #endif /* _XF86DGACONST_H_ */ PKZi!LX11/extensions/dpmsproto.hnu[/***************************************************************** Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Digital Equipment Corporation shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ #ifndef _DPMSPROTO_H_ #define _DPMSPROTO_H_ #include #define X_DPMSGetVersion 0 #define X_DPMSCapable 1 #define X_DPMSGetTimeouts 2 #define X_DPMSSetTimeouts 3 #define X_DPMSEnable 4 #define X_DPMSDisable 5 #define X_DPMSForceLevel 6 #define X_DPMSInfo 7 #define X_DPMSSelectInput 8 #define DPMSNumberEvents 0 #define DPMSNumberErrors 0 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSGetVersion */ CARD16 length; CARD16 majorVersion; CARD16 minorVersion; } xDPMSGetVersionReq; #define sz_xDPMSGetVersionReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; CARD16 minorVersion; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDPMSGetVersionReply; #define sz_xDPMSGetVersionReply 32 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSCapable */ CARD16 length; } xDPMSCapableReq; #define sz_xDPMSCapableReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; BOOL capable; CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xDPMSCapableReply; #define sz_xDPMSCapableReply 32 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSGetTimeouts */ CARD16 length; } xDPMSGetTimeoutsReq; #define sz_xDPMSGetTimeoutsReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 standby; CARD16 suspend; CARD16 off; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDPMSGetTimeoutsReply; #define sz_xDPMSGetTimeoutsReply 32 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSSetTimeouts */ CARD16 length; CARD16 standby; CARD16 suspend; CARD16 off; CARD16 pad0; } xDPMSSetTimeoutsReq; #define sz_xDPMSSetTimeoutsReq 12 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSEnable */ CARD16 length; } xDPMSEnableReq; #define sz_xDPMSEnableReq 4 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSDisable */ CARD16 length; } xDPMSDisableReq; #define sz_xDPMSDisableReq 4 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSForceLevel */ CARD16 length; CARD16 level; /* power level requested */ CARD16 pad0; } xDPMSForceLevelReq; #define sz_xDPMSForceLevelReq 8 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSInfo */ CARD16 length; } xDPMSInfoReq; #define sz_xDPMSInfoReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 power_level; BOOL state; CARD8 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xDPMSInfoReply; #define sz_xDPMSInfoReply 32 typedef struct { CARD8 reqType; /* always DPMSCode */ CARD8 dpmsReqType; /* always X_DPMSSelectInput */ CARD16 length B16; CARD32 eventMask B32; } xDPMSSelectInputReq; #define sz_xDPMSSelectInputReq 8 typedef struct { CARD8 type; CARD8 extension; CARD16 sequenceNumber B16; CARD32 length; CARD16 evtype B16; CARD16 pad0 B16; Time timestamp B32; CARD16 power_level B16; BOOL state; CARD8 pad1; CARD32 pad2 B32; CARD32 pad3 B32; CARD32 pad4 B32; } xDPMSInfoNotifyEvent; #define sz_xDPMSInfoNotifyEvent 32 #endif /* _DPMSPROTO_H_ */ PKZvoKKX11/extensions/shmstr.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ********************************************************/ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #ifndef _SHMSTR_H_ #define _SHMSTR_H_ #include #ifdef _XSHM_SERVER_ #define XSHM_PUT_IMAGE_ARGS \ DrawablePtr /* dst */, \ GCPtr /* pGC */, \ int /* depth */, \ unsigned int /* format */, \ int /* w */, \ int /* h */, \ int /* sx */, \ int /* sy */, \ int /* sw */, \ int /* sh */, \ int /* dx */, \ int /* dy */, \ char * /* data */ #define XSHM_CREATE_PIXMAP_ARGS \ ScreenPtr /* pScreen */, \ int /* width */, \ int /* height */, \ int /* depth */, \ char * /* addr */ typedef struct _ShmFuncs { PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS); void (* PutImage)(XSHM_PUT_IMAGE_ARGS); } ShmFuncs, *ShmFuncsPtr; #endif #endif /* _SHMSTR_H_ */ PKZ4c eeX11/extensions/damagewire.hnu[/* * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _DAMAGEWIRE_H_ #define _DAMAGEWIRE_H_ #define DAMAGE_NAME "DAMAGE" #define DAMAGE_MAJOR 1 #define DAMAGE_MINOR 1 /************* Version 1 ****************/ /* Constants */ #define XDamageReportRawRectangles 0 #define XDamageReportDeltaRectangles 1 #define XDamageReportBoundingBox 2 #define XDamageReportNonEmpty 3 /* Requests */ #define X_DamageQueryVersion 0 #define X_DamageCreate 1 #define X_DamageDestroy 2 #define X_DamageSubtract 3 #define X_DamageAdd 4 #define XDamageNumberRequests (X_DamageAdd + 1) /* Events */ #define XDamageNotify 0 #define XDamageNumberEvents (XDamageNotify + 1) /* Errors */ #define BadDamage 0 #define XDamageNumberErrors (BadDamage + 1) #endif /* _DAMAGEWIRE_H_ */ PKZ;X11/extensions/xf86dga1const.hnu[/* Copyright (c) 1995 Jon Tombs Copyright (c) 1995 XFree86 Inc */ /************************************************************************ THIS IS THE OLD DGA API AND IS OBSOLETE. PLEASE DO NOT USE IT ANYMORE ************************************************************************/ #ifndef _XF86DGA1CONST_H_ #define _XF86DGA1CONST_H_ #define X_XF86DGAQueryVersion 0 #define X_XF86DGAGetVideoLL 1 #define X_XF86DGADirectVideo 2 #define X_XF86DGAGetViewPortSize 3 #define X_XF86DGASetViewPort 4 #define X_XF86DGAGetVidPage 5 #define X_XF86DGASetVidPage 6 #define X_XF86DGAInstallColormap 7 #define X_XF86DGAQueryDirectVideo 8 #define X_XF86DGAViewPortChanged 9 #define XF86DGADirectPresent 0x0001 #define XF86DGADirectGraphics 0x0002 #define XF86DGADirectMouse 0x0004 #define XF86DGADirectKeyb 0x0008 #define XF86DGAHasColormap 0x0100 #define XF86DGADirectColormap 0x0200 #endif /* _XF86DGA1CONST_H_ */ PKZQ**X11/extensions/syncproto.hnu[/* Copyright 1991, 1993, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /*********************************************************** Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, and Olivetti Research Limited, Cambridge, England. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or Olivetti not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef _SYNCPROTO_H_ #define _SYNCPROTO_H_ #include #define X_SyncInitialize 0 #define X_SyncListSystemCounters 1 #define X_SyncCreateCounter 2 #define X_SyncSetCounter 3 #define X_SyncChangeCounter 4 #define X_SyncQueryCounter 5 #define X_SyncDestroyCounter 6 #define X_SyncAwait 7 #define X_SyncCreateAlarm 8 #define X_SyncChangeAlarm 9 #define X_SyncQueryAlarm 10 #define X_SyncDestroyAlarm 11 #define X_SyncSetPriority 12 #define X_SyncGetPriority 13 #define X_SyncCreateFence 14 #define X_SyncTriggerFence 15 #define X_SyncResetFence 16 #define X_SyncDestroyFence 17 #define X_SyncQueryFence 18 #define X_SyncAwaitFence 19 /* cover up types from sync.h to make sure they're the right size for * protocol packaging. These will be undef'ed after all the protocol * structures are defined. */ #define XSyncCounter CARD32 #define XSyncAlarm CARD32 #define XSyncFence CARD32 #define Drawable CARD32 /* * Initialize */ typedef struct _xSyncInitialize { CARD8 reqType; CARD8 syncReqType; CARD16 length; CARD8 majorVersion; CARD8 minorVersion; CARD16 pad; } xSyncInitializeReq; #define sz_xSyncInitializeReq 8 typedef struct { BYTE type; CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD8 majorVersion; CARD8 minorVersion; CARD16 pad; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xSyncInitializeReply; #define sz_xSyncInitializeReply 32 /* * ListSystemCounters */ typedef struct _xSyncListSystemCounters { CARD8 reqType; CARD8 syncReqType; CARD16 length; } xSyncListSystemCountersReq; #define sz_xSyncListSystemCountersReq 4 typedef struct { BYTE type; CARD8 unused; CARD16 sequenceNumber; CARD32 length; INT32 nCounters; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xSyncListSystemCountersReply; #define sz_xSyncListSystemCountersReply 32 typedef struct { XSyncCounter counter; INT32 resolution_hi; CARD32 resolution_lo; CARD16 name_length; } xSyncSystemCounter; #define sz_xSyncSystemCounter 14 /* * Create Counter */ typedef struct _xSyncCreateCounterReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncCounter cid; INT32 initial_value_hi; CARD32 initial_value_lo; } xSyncCreateCounterReq; #define sz_xSyncCreateCounterReq 16 /* * Change Counter */ typedef struct _xSyncChangeCounterReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncCounter cid; INT32 value_hi; CARD32 value_lo; } xSyncChangeCounterReq; #define sz_xSyncChangeCounterReq 16 /* * Set Counter */ typedef struct _xSyncSetCounterReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncCounter cid; INT32 value_hi; CARD32 value_lo; } xSyncSetCounterReq; #define sz_xSyncSetCounterReq 16 /* * Destroy Counter */ typedef struct _xSyncDestroyCounterReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncCounter counter; } xSyncDestroyCounterReq; #define sz_xSyncDestroyCounterReq 8 /* * Query Counter */ typedef struct _xSyncQueryCounterReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncCounter counter; } xSyncQueryCounterReq; #define sz_xSyncQueryCounterReq 8 typedef struct { BYTE type; CARD8 unused; CARD16 sequenceNumber; CARD32 length; INT32 value_hi; CARD32 value_lo; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xSyncQueryCounterReply; #define sz_xSyncQueryCounterReply 32 /* * Await */ typedef struct _xSyncAwaitReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; } xSyncAwaitReq; #define sz_xSyncAwaitReq 4 typedef struct _xSyncWaitCondition { XSyncCounter counter; CARD32 value_type; INT32 wait_value_hi; CARD32 wait_value_lo; CARD32 test_type; INT32 event_threshold_hi; CARD32 event_threshold_lo; } xSyncWaitCondition; #define sz_xSyncWaitCondition 28 /* * Create Alarm */ typedef struct _xSyncCreateAlarmReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncAlarm id; CARD32 valueMask; } xSyncCreateAlarmReq; #define sz_xSyncCreateAlarmReq 12 /* * Destroy Alarm */ typedef struct _xSyncDestroyAlarmReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncAlarm alarm; } xSyncDestroyAlarmReq; #define sz_xSyncDestroyAlarmReq 8 /* * Query Alarm */ typedef struct _xSyncQueryAlarmReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncAlarm alarm; } xSyncQueryAlarmReq; #define sz_xSyncQueryAlarmReq 8 typedef struct { BYTE type; CARD8 unused; CARD16 sequenceNumber; CARD32 length; XSyncCounter counter; CARD32 value_type; INT32 wait_value_hi; CARD32 wait_value_lo; CARD32 test_type; INT32 delta_hi; CARD32 delta_lo; BOOL events; BYTE state; BYTE pad0; BYTE pad1; } xSyncQueryAlarmReply; #define sz_xSyncQueryAlarmReply 40 /* * Change Alarm */ typedef struct _xSyncChangeAlarmReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncAlarm alarm; CARD32 valueMask; } xSyncChangeAlarmReq; #define sz_xSyncChangeAlarmReq 12 /* * SetPriority */ typedef struct _xSyncSetPriority{ CARD8 reqType; CARD8 syncReqType; CARD16 length; CARD32 id; INT32 priority; } xSyncSetPriorityReq; #define sz_xSyncSetPriorityReq 12 /* * Get Priority */ typedef struct _xSyncGetPriority{ CARD8 reqType; CARD8 syncReqType; CARD16 length; CARD32 id; /*XXX XID? */ } xSyncGetPriorityReq; #define sz_xSyncGetPriorityReq 8 typedef struct { BYTE type; CARD8 unused; CARD16 sequenceNumber; CARD32 length; INT32 priority; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xSyncGetPriorityReply; #define sz_xSyncGetPriorityReply 32 /* * Create Fence */ typedef struct _xSyncCreateFenceReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; Drawable d; XSyncFence fid; BOOL initially_triggered; CARD8 pad0; CARD16 pad1; } xSyncCreateFenceReq; #define sz_xSyncCreateFenceReq 16 /* * Put a fence object in the "triggered" state. */ typedef struct _xSyncTriggerFenceReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncFence fid; } xSyncTriggerFenceReq; #define sz_xSyncTriggerFenceReq 8 /* * Put a fence in the "untriggered" state. */ typedef struct _xSyncResetFenceReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncFence fid; } xSyncResetFenceReq; #define sz_xSyncResetFenceReq 8 /* * Destroy a fence object */ typedef struct _xSyncDestroyFenceReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncFence fid; } xSyncDestroyFenceReq; #define sz_xSyncDestroyFenceReq 8 /* * Query a fence object */ typedef struct _xSyncQueryFenceReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; XSyncFence fid; } xSyncQueryFenceReq; #define sz_xSyncQueryFenceReq 8 /* * Wait for any of a list of fence sync objects * to reach the "triggered" state. */ typedef struct _xSyncAwaitFenceReq { CARD8 reqType; CARD8 syncReqType; CARD16 length; } xSyncAwaitFenceReq; #define sz_xSyncAwaitFenceReq 4 typedef struct { BYTE type; CARD8 unused; CARD16 sequenceNumber; CARD32 length; BOOL triggered; BYTE pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xSyncQueryFenceReply; #define sz_xSyncQueryFenceReply 32 /* * Events */ typedef struct _xSyncCounterNotifyEvent { BYTE type; BYTE kind; CARD16 sequenceNumber; XSyncCounter counter; INT32 wait_value_hi; CARD32 wait_value_lo; INT32 counter_value_hi; CARD32 counter_value_lo; CARD32 time; CARD16 count; BOOL destroyed; BYTE pad0; } xSyncCounterNotifyEvent; typedef struct _xSyncAlarmNotifyEvent { BYTE type; BYTE kind; CARD16 sequenceNumber; XSyncAlarm alarm; INT32 counter_value_hi; CARD32 counter_value_lo; INT32 alarm_value_hi; CARD32 alarm_value_lo; CARD32 time; CARD8 state; BYTE pad0; BYTE pad1; BYTE pad2; } xSyncAlarmNotifyEvent; #undef XSyncCounter #undef XSyncAlarm #undef XSyncFence #undef Drawable #endif /* _SYNCPROTO_H_ */ PKZ*==X11/extensions/xf86misc.hnu[/* $XFree86: xc/include/extensions/xf86misc.h,v 3.16 2002/11/20 04:04:56 dawes Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ #ifndef _XF86MISC_H_ #define _XF86MISC_H_ #include #define X_XF86MiscQueryVersion 0 #ifdef _XF86MISC_SAVER_COMPAT_ #define X_XF86MiscGetSaver 1 #define X_XF86MiscSetSaver 2 #endif #define X_XF86MiscGetMouseSettings 3 #define X_XF86MiscGetKbdSettings 4 #define X_XF86MiscSetMouseSettings 5 #define X_XF86MiscSetKbdSettings 6 #define X_XF86MiscSetGrabKeysState 7 #define X_XF86MiscSetClientVersion 8 #define X_XF86MiscGetFilePaths 9 #define X_XF86MiscPassMessage 10 #define XF86MiscNumberEvents 0 #define XF86MiscBadMouseProtocol 0 #define XF86MiscBadMouseBaudRate 1 #define XF86MiscBadMouseFlags 2 #define XF86MiscBadMouseCombo 3 #define XF86MiscBadKbdType 4 #define XF86MiscModInDevDisabled 5 #define XF86MiscModInDevClientNotLocal 6 #define XF86MiscNoModule 7 #define XF86MiscNumberErrors (XF86MiscNoModule + 1) /* Never renumber these */ #define MTYPE_MICROSOFT 0 #define MTYPE_MOUSESYS 1 #define MTYPE_MMSERIES 2 #define MTYPE_LOGITECH 3 #define MTYPE_BUSMOUSE 4 #define MTYPE_LOGIMAN 5 #define MTYPE_PS_2 6 #define MTYPE_MMHIT 7 #define MTYPE_GLIDEPOINT 8 #define MTYPE_IMSERIAL 9 #define MTYPE_THINKING 10 #define MTYPE_IMPS2 11 #define MTYPE_THINKINGPS2 12 #define MTYPE_MMANPLUSPS2 13 #define MTYPE_GLIDEPOINTPS2 14 #define MTYPE_NETPS2 15 #define MTYPE_NETSCROLLPS2 16 #define MTYPE_SYSMOUSE 17 #define MTYPE_AUTOMOUSE 18 #define MTYPE_ACECAD 19 #define MTYPE_EXPPS2 20 #define MTYPE_XQUEUE 127 #define MTYPE_OSMOUSE 126 #define MTYPE_UNKNOWN 125 #define KTYPE_UNKNOWN 0 #define KTYPE_84KEY 1 #define KTYPE_101KEY 2 #define KTYPE_OTHER 3 #define KTYPE_XQUEUE 4 #define MF_CLEAR_DTR 1 #define MF_CLEAR_RTS 2 #define MF_REOPEN 128 #ifndef _XF86MISC_SERVER_ /* return values for XF86MiscSetGrabKeysState */ #define MiscExtGrabStateSuccess 0 /* No errors */ #define MiscExtGrabStateLocked 1 /* A client already requested that * grabs cannot be removed/killed */ #define MiscExtGrabStateAlready 2 /* Request for enabling/disabling * grab removal/kill already done */ _XFUNCPROTOBEGIN typedef struct { char* device; int type; int baudrate; int samplerate; int resolution; int buttons; Bool emulate3buttons; int emulate3timeout; Bool chordmiddle; int flags; } XF86MiscMouseSettings; typedef struct { int type; int rate; int delay; Bool servnumlock; } XF86MiscKbdSettings; typedef struct { char* configfile; char* modulepath; char* logfile; } XF86MiscFilePaths; Bool XF86MiscQueryVersion( Display* /* dpy */, int* /* majorVersion */, int* /* minorVersion */ ); Bool XF86MiscQueryExtension( Display* /* dpy */, int* /* event_base */, int* /* error_base */ ); Bool XF86MiscSetClientVersion( Display *dpy /* dpy */ ); Status XF86MiscGetMouseSettings( Display* /* dpy */, XF86MiscMouseSettings* /* mouse info */ ); Status XF86MiscGetKbdSettings( Display* /* dpy */, XF86MiscKbdSettings* /* keyboard info */ ); Status XF86MiscSetMouseSettings( Display* /* dpy */, XF86MiscMouseSettings* /* mouse info */ ); Status XF86MiscSetKbdSettings( Display* /* dpy */, XF86MiscKbdSettings* /* keyboard info */ ); int XF86MiscSetGrabKeysState( Display* /* dpy */, Bool /* enabled */ ); Status XF86MiscGetFilePaths( Display* /* dpy */, XF86MiscFilePaths* /* file paths/locations */ ); Status XF86MiscPassMessage( Display* /* dpy */, int /* screen */, const char* /* message name/type */, const char* /* message contents/value */, char ** /* returned message */ ); _XFUNCPROTOEND #endif #endif PKZ̖aaX11/extensions/panoramiXproto.hnu[/***************************************************************** Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Digital Equipment Corporation shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ #ifndef _PANORAMIXPROTO_H_ #define _PANORAMIXPROTO_H_ #define PANORAMIX_MAJOR_VERSION 1 /* current version number */ #define PANORAMIX_MINOR_VERSION 1 #define PANORAMIX_PROTOCOL_NAME "XINERAMA" #define X_PanoramiXQueryVersion 0 #define X_PanoramiXGetState 1 #define X_PanoramiXGetScreenCount 2 #define X_PanoramiXGetScreenSize 3 #define X_XineramaIsActive 4 #define X_XineramaQueryScreens 5 typedef struct _PanoramiXQueryVersion { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXQueryVersion */ CARD16 length; CARD8 clientMajor; CARD8 clientMinor; CARD16 unused; } xPanoramiXQueryVersionReq; #define sz_xPanoramiXQueryVersionReq 8 typedef struct { CARD8 type; /* must be X_Reply */ CARD8 pad1; /* unused */ CARD16 sequenceNumber; /* last sequence number */ CARD32 length; /* 0 */ CARD16 majorVersion; CARD16 minorVersion; CARD32 pad2; /* unused */ CARD32 pad3; /* unused */ CARD32 pad4; /* unused */ CARD32 pad5; /* unused */ CARD32 pad6; /* unused */ } xPanoramiXQueryVersionReply; #define sz_xPanoramiXQueryVersionReply 32 typedef struct _PanoramiXGetState { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXGetState */ CARD16 length; CARD32 window; } xPanoramiXGetStateReq; #define sz_xPanoramiXGetStateReq 8 typedef struct { BYTE type; BYTE state; CARD16 sequenceNumber; CARD32 length; CARD32 window; CARD32 pad1; /* unused */ CARD32 pad2; /* unused */ CARD32 pad3; /* unused */ CARD32 pad4; /* unused */ CARD32 pad5; /* unused */ } xPanoramiXGetStateReply; #define sz_panoramiXGetStateReply 32 typedef struct _PanoramiXGetScreenCount { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXGetScreenCount */ CARD16 length; CARD32 window; } xPanoramiXGetScreenCountReq; #define sz_xPanoramiXGetScreenCountReq 8 typedef struct { BYTE type; BYTE ScreenCount; CARD16 sequenceNumber; CARD32 length; CARD32 window; CARD32 pad1; /* unused */ CARD32 pad2; /* unused */ CARD32 pad3; /* unused */ CARD32 pad4; /* unused */ CARD32 pad5; /* unused */ } xPanoramiXGetScreenCountReply; #define sz_panoramiXGetScreenCountReply 32 typedef struct _PanoramiXGetScreenSize { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXGetState */ CARD16 length; CARD32 window; CARD32 screen; } xPanoramiXGetScreenSizeReq; #define sz_xPanoramiXGetScreenSizeReq 12 typedef struct { BYTE type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 width; CARD32 height; CARD32 window; CARD32 screen; CARD32 pad2; /* unused */ CARD32 pad3; /* unused */ } xPanoramiXGetScreenSizeReply; #define sz_panoramiXGetScreenSizeReply 32 /************ Alternate protocol ******************/ typedef struct { CARD8 reqType; CARD8 panoramiXReqType; CARD16 length; } xXineramaIsActiveReq; #define sz_xXineramaIsActiveReq 4 typedef struct { BYTE type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 state; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXineramaIsActiveReply; #define sz_XineramaIsActiveReply 32 typedef struct { CARD8 reqType; CARD8 panoramiXReqType; CARD16 length; } xXineramaQueryScreensReq; #define sz_xXineramaQueryScreensReq 4 typedef struct { BYTE type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 number; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXineramaQueryScreensReply; #define sz_XineramaQueryScreensReply 32 typedef struct { INT16 x_org; INT16 y_org; CARD16 width; CARD16 height; } xXineramaScreenInfo; #define sz_XineramaScreenInfo 8 #endif PKZ1qCkM/M/X11/extensions/Xvproto.hnu[/*********************************************************** Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef XVPROTO_H #define XVPROTO_H /* ** File: ** ** Xvproto.h --- Xv protocol header file ** ** Author: ** ** David Carver (Digital Workstation Engineering/Project Athena) ** ** Revisions: ** ** 11.06.91 Carver ** - changed SetPortControl to SetPortAttribute ** - changed GetPortControl to GetPortAttribute ** - changed QueryBestSize ** ** 15.05.91 Carver ** - version 2.0 upgrade ** ** 24.01.91 Carver ** - version 1.4 upgrade ** */ #include /* Symbols: These are undefined at the end of this file to restore the values they have in Xv.h */ #define XvPortID CARD32 #define XvEncodingID CARD32 #define ShmSeg CARD32 #define VisualID CARD32 #define Drawable CARD32 #define GContext CARD32 #define Time CARD32 #define Atom CARD32 /* Structures */ typedef struct { INT32 numerator; INT32 denominator; } xvRational; #define sz_xvRational 8 typedef struct { XvPortID base_id; CARD16 name_size; CARD16 num_ports; CARD16 num_formats; CARD8 type; CARD8 pad; } xvAdaptorInfo; #define sz_xvAdaptorInfo 12 typedef struct { XvEncodingID encoding; CARD16 name_size; CARD16 width, height; CARD16 pad; xvRational rate; } xvEncodingInfo; #define sz_xvEncodingInfo (12 + sz_xvRational) typedef struct { VisualID visual; CARD8 depth; CARD8 pad1; CARD16 pad2; } xvFormat; #define sz_xvFormat 8 typedef struct { CARD32 flags; INT32 min; INT32 max; CARD32 size; } xvAttributeInfo; #define sz_xvAttributeInfo 16 typedef struct { CARD32 id; CARD8 type; CARD8 byte_order; CARD16 pad1; CARD8 guid[16]; CARD8 bpp; CARD8 num_planes; CARD16 pad2; CARD8 depth; CARD8 pad3; CARD16 pad4; CARD32 red_mask; CARD32 green_mask; CARD32 blue_mask; CARD8 format; CARD8 pad5; CARD16 pad6; CARD32 y_sample_bits; CARD32 u_sample_bits; CARD32 v_sample_bits; CARD32 horz_y_period; CARD32 horz_u_period; CARD32 horz_v_period; CARD32 vert_y_period; CARD32 vert_u_period; CARD32 vert_v_period; CARD8 comp_order[32]; CARD8 scanline_order; CARD8 pad7; CARD16 pad8; CARD32 pad9; CARD32 pad10; } xvImageFormatInfo; #define sz_xvImageFormatInfo 128 /* Requests */ #define xv_QueryExtension 0 #define xv_QueryAdaptors 1 #define xv_QueryEncodings 2 #define xv_GrabPort 3 #define xv_UngrabPort 4 #define xv_PutVideo 5 #define xv_PutStill 6 #define xv_GetVideo 7 #define xv_GetStill 8 #define xv_StopVideo 9 #define xv_SelectVideoNotify 10 #define xv_SelectPortNotify 11 #define xv_QueryBestSize 12 #define xv_SetPortAttribute 13 #define xv_GetPortAttribute 14 #define xv_QueryPortAttributes 15 #define xv_ListImageFormats 16 #define xv_QueryImageAttributes 17 #define xv_PutImage 18 #define xv_ShmPutImage 19 #define xv_LastRequest xv_ShmPutImage #define xvNumRequests (xv_LastRequest + 1) typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; } xvQueryExtensionReq; #define sz_xvQueryExtensionReq 4 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; CARD32 window; } xvQueryAdaptorsReq; #define sz_xvQueryAdaptorsReq 8 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; CARD32 port; } xvQueryEncodingsReq; #define sz_xvQueryEncodingsReq 8 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Drawable drawable; GContext gc; INT16 vid_x; INT16 vid_y; CARD16 vid_w; CARD16 vid_h; INT16 drw_x; INT16 drw_y; CARD16 drw_w; CARD16 drw_h; } xvPutVideoReq; #define sz_xvPutVideoReq 32 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Drawable drawable; GContext gc; INT16 vid_x; INT16 vid_y; CARD16 vid_w; CARD16 vid_h; INT16 drw_x; INT16 drw_y; CARD16 drw_w; CARD16 drw_h; } xvPutStillReq; #define sz_xvPutStillReq 32 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Drawable drawable; GContext gc; INT16 vid_x; INT16 vid_y; CARD16 vid_w; CARD16 vid_h; INT16 drw_x; INT16 drw_y; CARD16 drw_w; CARD16 drw_h; } xvGetVideoReq; #define sz_xvGetVideoReq 32 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Drawable drawable; GContext gc; INT16 vid_x; INT16 vid_y; CARD16 vid_w; CARD16 vid_h; INT16 drw_x; INT16 drw_y; CARD16 drw_w; CARD16 drw_h; } xvGetStillReq; #define sz_xvGetStillReq 32 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Time time; } xvGrabPortReq; #define sz_xvGrabPortReq 12 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Time time; } xvUngrabPortReq; #define sz_xvUngrabPortReq 12 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; Drawable drawable; BOOL onoff; CARD8 pad1; CARD16 pad2; } xvSelectVideoNotifyReq; #define sz_xvSelectVideoNotifyReq 12 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; BOOL onoff; CARD8 pad1; CARD16 pad2; } xvSelectPortNotifyReq; #define sz_xvSelectPortNotifyReq 12 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Drawable drawable; } xvStopVideoReq; #define sz_xvStopVideoReq 12 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Atom attribute; INT32 value; } xvSetPortAttributeReq; #define sz_xvSetPortAttributeReq 16 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Atom attribute; } xvGetPortAttributeReq; #define sz_xvGetPortAttributeReq 12 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; CARD16 vid_w; CARD16 vid_h; CARD16 drw_w; CARD16 drw_h; CARD8 motion; CARD8 pad1; CARD16 pad2; } xvQueryBestSizeReq; #define sz_xvQueryBestSizeReq 20 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; } xvQueryPortAttributesReq; #define sz_xvQueryPortAttributesReq 8 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Drawable drawable; GContext gc; CARD32 id; INT16 src_x; INT16 src_y; CARD16 src_w; CARD16 src_h; INT16 drw_x; INT16 drw_y; CARD16 drw_w; CARD16 drw_h; CARD16 width; CARD16 height; } xvPutImageReq; #define sz_xvPutImageReq 40 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; Drawable drawable; GContext gc; ShmSeg shmseg; CARD32 id; CARD32 offset; INT16 src_x; INT16 src_y; CARD16 src_w; CARD16 src_h; INT16 drw_x; INT16 drw_y; CARD16 drw_w; CARD16 drw_h; CARD16 width; CARD16 height; CARD8 send_event; CARD8 pad1; CARD16 pad2; } xvShmPutImageReq; #define sz_xvShmPutImageReq 52 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; XvPortID port; } xvListImageFormatsReq; #define sz_xvListImageFormatsReq 8 typedef struct { CARD8 reqType; CARD8 xvReqType; CARD16 length; CARD32 port; CARD32 id; CARD16 width; CARD16 height; } xvQueryImageAttributesReq; #define sz_xvQueryImageAttributesReq 16 /* Replies */ typedef struct _QueryExtensionReply { BYTE type; /* X_Reply */ CARD8 padb1; CARD16 sequenceNumber; CARD32 length; CARD16 version; CARD16 revision; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvQueryExtensionReply; #define sz_xvQueryExtensionReply 32 typedef struct _QueryAdaptorsReply { BYTE type; /* X_Reply */ CARD8 padb1; CARD16 sequenceNumber; CARD32 length; CARD16 num_adaptors; CARD16 pads3; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvQueryAdaptorsReply; #define sz_xvQueryAdaptorsReply 32 typedef struct _QueryEncodingsReply { BYTE type; /* X_Reply */ CARD8 padb1; CARD16 sequenceNumber; CARD32 length; CARD16 num_encodings; CARD16 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvQueryEncodingsReply; #define sz_xvQueryEncodingsReply 32 typedef struct { BYTE type; /* X_Reply */ BYTE result; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD32 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvGrabPortReply; #define sz_xvGrabPortReply 32 typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; /* 0 */ INT32 value; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvGetPortAttributeReply; #define sz_xvGetPortAttributeReply 32 typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 actual_width; CARD16 actual_height; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvQueryBestSizeReply; #define sz_xvQueryBestSizeReply 32 typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD32 num_attributes; CARD32 text_size; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvQueryPortAttributesReply; #define sz_xvQueryPortAttributesReply 32 typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 num_formats; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvListImageFormatsReply; #define sz_xvListImageFormatsReply 32 typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 num_planes; CARD32 data_size; CARD16 width; CARD16 height; CARD32 padl6; CARD32 padl7; CARD32 padl8; } xvQueryImageAttributesReply; #define sz_xvQueryImageAttributesReply 32 /* DEFINE EVENT STRUCTURE */ typedef struct { union { struct { BYTE type; BYTE detail; CARD16 sequenceNumber; } u; struct { BYTE type; BYTE reason; CARD16 sequenceNumber; Time time; Drawable drawable; XvPortID port; CARD32 padl5; CARD32 padl6; CARD32 padl7; CARD32 padl8; } videoNotify; struct { BYTE type; BYTE padb1; CARD16 sequenceNumber; Time time; XvPortID port; Atom attribute; INT32 value; CARD32 padl6; CARD32 padl7; CARD32 padl8; } portNotify; } u; } xvEvent; #undef XvPortID #undef XvEncodingID #undef ShmSeg #undef VisualID #undef Drawable #undef GContext #undef Time #undef Atom #endif /* XVPROTO_H */ PKZ-v::X11/extensions/xf86vm.hnu[/* Copyright 1995 Kaleb S. KEITHLEY Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Kaleb S. KEITHLEY shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Kaleb S. KEITHLEY */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #ifndef _XF86VM_H_ #define _XF86VM_H_ #include #define CLKFLAG_PROGRAMABLE 1 #ifdef XF86VIDMODE_EVENTS #define XF86VidModeNotify 0 #define XF86VidModeNumberEvents (XF86VidModeNotify + 1) #define XF86VidModeNotifyMask 0x00000001 #define XF86VidModeNonEvent 0 #define XF86VidModeModeChange 1 #else #define XF86VidModeNumberEvents 0 #endif #define XF86VidModeBadClock 0 #define XF86VidModeBadHTimings 1 #define XF86VidModeBadVTimings 2 #define XF86VidModeModeUnsuitable 3 #define XF86VidModeExtensionDisabled 4 #define XF86VidModeClientNotLocal 5 #define XF86VidModeZoomLocked 6 #define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1) #define XF86VM_READ_PERMISSION 1 #define XF86VM_WRITE_PERMISSION 2 #endif PKZcX11/extensions/damageproto.hnu[/* * Copyright © 2003 Keith Packard * Copyright © 2007 Eric Anholt * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _DAMAGEPROTO_H_ #define _DAMAGEPROTO_H_ #include #include #include #define Window CARD32 #define Drawable CARD32 #define Font CARD32 #define Pixmap CARD32 #define Cursor CARD32 #define Colormap CARD32 #define GContext CARD32 #define Atom CARD32 #define VisualID CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define Picture CARD32 #define Region CARD32 #define Damage CARD32 /************** Version 0 ******************/ typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; } xDamageReq; /* * requests and replies */ typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xDamageQueryVersionReq; #define sz_xDamageQueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDamageQueryVersionReply; #define sz_xDamageQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Damage damage; Drawable drawable; CARD8 level; CARD8 pad1; CARD16 pad2; } xDamageCreateReq; #define sz_xDamageCreateReq 16 typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Damage damage; } xDamageDestroyReq; #define sz_xDamageDestroyReq 8 typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Damage damage; Region repair; Region parts; } xDamageSubtractReq; #define sz_xDamageSubtractReq 16 typedef struct { CARD8 reqType; CARD8 damageReqType; CARD16 length; Drawable drawable; Region region; } xDamageAddReq; #define sz_xDamageAddReq 12 /* Events */ #define DamageNotifyMore 0x80 typedef struct { CARD8 type; CARD8 level; CARD16 sequenceNumber; Drawable drawable; Damage damage; Time timestamp; xRectangle area; xRectangle geometry; } xDamageNotifyEvent; #undef Damage #undef Region #undef Picture #undef Window #undef Drawable #undef Font #undef Pixmap #undef Cursor #undef Colormap #undef GContext #undef Atom #undef VisualID #undef Time #undef KeyCode #undef KeySym #endif /* _DAMAGEPROTO_H_ */ PKZ(* X11/extensions/xcmiscproto.hnu[/* Copyright 1993, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _XCMISCPROTO_H_ #define _XCMISCPROTO_H_ #define X_XCMiscGetVersion 0 #define X_XCMiscGetXIDRange 1 #define X_XCMiscGetXIDList 2 #define XCMiscNumberEvents 0 #define XCMiscNumberErrors 0 #define XCMiscMajorVersion 1 #define XCMiscMinorVersion 1 #define XCMiscExtensionName "XC-MISC" typedef struct { CARD8 reqType; /* always XCMiscCode */ CARD8 miscReqType; /* always X_XCMiscGetVersion */ CARD16 length; CARD16 majorVersion; CARD16 minorVersion; } xXCMiscGetVersionReq; #define sz_xXCMiscGetVersionReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; CARD16 minorVersion; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXCMiscGetVersionReply; #define sz_xXCMiscGetVersionReply 32 typedef struct { CARD8 reqType; /* always XCMiscCode */ CARD8 miscReqType; /* always X_XCMiscGetXIDRange */ CARD16 length; } xXCMiscGetXIDRangeReq; #define sz_xXCMiscGetXIDRangeReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 start_id; CARD32 count; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xXCMiscGetXIDRangeReply; #define sz_xXCMiscGetXIDRangeReply 32 typedef struct { CARD8 reqType; /* always XCMiscCode */ CARD8 miscReqType; /* always X_XCMiscGetXIDList */ CARD16 length; CARD32 count; /* number of IDs requested */ } xXCMiscGetXIDListReq; #define sz_xXCMiscGetXIDListReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 count; /* number of IDs requested */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXCMiscGetXIDListReply; #define sz_xXCMiscGetXIDListReply 32 #endif /* _XCMISCPROTO_H_ */ PKZJ܅X11/extensions/xf86mscstr.hnu[/* $XFree86: xc/include/extensions/xf86mscstr.h,v 3.12 2002/11/20 04:04:56 dawes Exp $ */ /* * Copyright (c) 1995, 1996 The XFree86 Project, Inc */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ #ifndef _XF86MISCSTR_H_ #define _XF86MISCSTR_H_ #include #define XF86MISCNAME "XFree86-Misc" #define XF86MISC_MAJOR_VERSION 0 /* current version numbers */ #define XF86MISC_MINOR_VERSION 9 typedef struct _XF86MiscQueryVersion { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscQueryVersion */ CARD16 length; } xXF86MiscQueryVersionReq; #define sz_xXF86MiscQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of XFree86-Misc */ CARD16 minorVersion; /* minor version of XFree86-Misc */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86MiscQueryVersionReply; #define sz_xXF86MiscQueryVersionReply 32 #ifdef _XF86MISC_SAVER_COMPAT_ typedef struct _XF86MiscGetSaver { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscGetSaver */ CARD16 length; CARD16 screen; CARD16 pad; } xXF86MiscGetSaverReq; #define sz_xXF86MiscGetSaverReq 8 typedef struct _XF86MiscSetSaver { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscSetSaver */ CARD16 length; CARD16 screen; CARD16 pad; CARD32 suspendTime; CARD32 offTime; } xXF86MiscSetSaverReq; #define sz_xXF86MiscSetSaverReq 16 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 suspendTime; CARD32 offTime; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86MiscGetSaverReply; #define sz_xXF86MiscGetSaverReply 32 #endif typedef struct _XF86MiscGetMouseSettings { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscGetMouseSettings */ CARD16 length; } xXF86MiscGetMouseSettingsReq; #define sz_xXF86MiscGetMouseSettingsReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 mousetype; CARD32 baudrate; CARD32 samplerate; CARD32 resolution; CARD32 buttons; BOOL emulate3buttons; BOOL chordmiddle; CARD16 pad2; CARD32 emulate3timeout; CARD32 flags; CARD32 devnamelen; /* strlen(device)+1 */ } xXF86MiscGetMouseSettingsReply; #define sz_xXF86MiscGetMouseSettingsReply 44 typedef struct _XF86MiscGetKbdSettings { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscGetKbdSettings */ CARD16 length; } xXF86MiscGetKbdSettingsReq; #define sz_xXF86MiscGetKbdSettingsReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 kbdtype; CARD32 rate; CARD32 delay; BOOL servnumlock; BOOL pad2; CARD16 pad3; CARD32 pad4; CARD32 pad5; } xXF86MiscGetKbdSettingsReply; #define sz_xXF86MiscGetKbdSettingsReply 32 typedef struct _XF86MiscSetMouseSettings { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscSetMouseSettings */ CARD16 length; CARD32 mousetype; CARD32 baudrate; CARD32 samplerate; CARD32 resolution; CARD32 buttons; BOOL emulate3buttons; BOOL chordmiddle; CARD16 devnamelen; CARD32 emulate3timeout; CARD32 flags; } xXF86MiscSetMouseSettingsReq; #define sz_xXF86MiscSetMouseSettingsReq 36 typedef struct _XF86MiscSetKbdSettings { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscSetKbdSettings */ CARD16 length; CARD32 kbdtype; CARD32 rate; CARD32 delay; BOOL servnumlock; BOOL pad1; CARD16 pad2; } xXF86MiscSetKbdSettingsReq; #define sz_xXF86MiscSetKbdSettingsReq 20 typedef struct _XF86MiscSetGrabKeysState { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscSetKbdSettings */ CARD16 length; BOOL enable; BOOL pad1; CARD16 pad2; } xXF86MiscSetGrabKeysStateReq; #define sz_xXF86MiscSetGrabKeysStateReq 8 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86MiscSetGrabKeysStateReply; #define sz_xXF86MiscSetGrabKeysStateReply 32 typedef struct _XF86MiscSetClientVersion { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; CARD16 length; CARD16 major; CARD16 minor; } xXF86MiscSetClientVersionReq; #define sz_xXF86MiscSetClientVersionReq 8 typedef struct _XF86MiscGetFilePaths { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscGetFilePaths */ CARD16 length; } xXF86MiscGetFilePathsReq; #define sz_xXF86MiscGetFilePathsReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 configlen; CARD16 modulelen; CARD16 loglen; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86MiscGetFilePathsReply; #define sz_xXF86MiscGetFilePathsReply 32 typedef struct _XF86MiscPassMessage { CARD8 reqType; /* always XF86MiscReqCode */ CARD8 xf86miscReqType; /* always X_XF86MiscPassMessage */ CARD16 length; CARD16 typelen; CARD16 vallen; CARD16 screen; CARD16 pad; } xXF86MiscPassMessageReq; #define sz_xXF86MiscPassMessageReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 mesglen; CARD16 pad2; CARD32 status; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86MiscPassMessageReply; #define sz_xXF86MiscPassMessageReply 32 #endif /* _XF86MISCSTR_H_ */ PKZj\??X11/extensions/xtestext1const.hnu[/* * xtestext1.h * * X11 Input Synthesis Extension include file */ /* Copyright 1986, 1987, 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Hewlett-Packard makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. This software is not subject to any license of the American Telephone and Telegraph Company or of the Regents of the University of California. */ #ifndef _XTESTEXT1CONST_H #define _XTESTEXT1CONST_H 1 #define XTestMAX_ACTION_LIST_SIZE 64 #define XTestACTIONS_SIZE 28 /* * used in the XTestPressButton and XTestPressKey functions */ #define XTestPRESS 1 << 0 #define XTestRELEASE 1 << 1 #define XTestSTROKE 1 << 2 /* * When doing a key or button stroke, the number of milliseconds * to delay between the press and the release of a key or button * in the XTestPressButton and XTestPressKey functions. */ #define XTestSTROKE_DELAY_TIME 10 /* * used in the XTestGetInput function */ #define XTestEXCLUSIVE 1 << 0 #define XTestPACKED_ACTIONS 1 << 1 #define XTestPACKED_MOTION 1 << 2 /* * used in the XTestFakeInput function */ #define XTestFAKE_ACK_NOT_NEEDED 0 #define XTestFAKE_ACK_REQUEST 1 /* * used in the XTest extension initialization routine */ #define XTestEXTENSION_NAME "XTestExtension1" #define XTestEVENT_COUNT 2 /* * This is the definition for the format of the header byte * in the input action structures. */ #define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */ #define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */ #define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */ #define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */ #define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */ #define XTestMAX_DEVICE_ID 0x0f #define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4) #define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4) /* * These are the possible action types. */ #define XTestDELAY_ACTION 0 #define XTestKEY_ACTION 1 #define XTestMOTION_ACTION 2 #define XTestJUMP_ACTION 3 /* * These are the definitions for key/button motion input actions. */ #define XTestKEY_UP 0x04 #define XTestKEY_DOWN 0x00 /* * These are the definitions for pointer relative motion input * actions. * * The sign bits for the x and y relative motions are contained * in the header byte. The x and y relative motions are packed * into one byte to make things fit in 32 bits. If the relative * motion range is larger than +/-15, use the pointer jump action. */ #define XTestMOTION_MAX 15 #define XTestMOTION_MIN -15 #define XTestX_NEGATIVE 0x04 #define XTestY_NEGATIVE 0x08 #define XTestX_MOTION_MASK 0x0f #define XTestY_MOTION_MASK 0xf0 #define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK) #define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK) #define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK) #define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4) /* * These are the definitions for a long delay input action. It is * used when more than XTestSHORT_DELAY_TIME milliseconds of delay * (approximately one minute) is needed. * * The device ID for a delay is always set to XTestDELAY_DEVICE_ID. * This guarantees that a header byte with a value of 0 is not * a valid header, so it can be used as a flag to indicate that * there are no more input actions in an XTestInputAction event. */ #define XTestSHORT_DELAY_TIME 0xffff #define XTestDELAY_DEVICE_ID 0x0f #endif /* _XTESTEXT1CONST_H */ PKZd'44X11/extensions/dmxproto.hnu[/* * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* * Authors: * Rickard E. (Rik) Faith * */ /** \file * This file describes the structures necessary to implement the wire * protocol for the DMX protocol extension. It should be included only * in files that implement the client-side (or server-side) part of the * protocol (i.e., client-side applications should \b not include this * file). */ #ifndef _DMXSTR_H_ #define _DMXSTR_H_ #define DMX_EXTENSION_NAME "DMX" #define DMX_EXTENSION_MAJOR 2 #define DMX_EXTENSION_MINOR 2 #define DMX_EXTENSION_PATCH 20040604 /* These values must be larger than LastExtensionError. The values in dmxext.h and dmxproto.h *MUST* match. */ #define DMX_BAD_XINERAMA 1001 #define DMX_BAD_VALUE 1002 #define X_DMXQueryVersion 0 #define X_DMXGetScreenCount 1 #define X_DMXGetScreenInformationDEPRECATED 2 #define X_DMXGetWindowAttributes 3 #define X_DMXGetInputCount 4 #define X_DMXGetInputAttributes 5 #define X_DMXForceWindowCreationDEPRECATED 6 #define X_DMXReconfigureScreenDEPRECATED 7 #define X_DMXSync 8 #define X_DMXForceWindowCreation 9 #define X_DMXGetScreenAttributes 10 #define X_DMXChangeScreensAttributes 11 #define X_DMXAddScreen 12 #define X_DMXRemoveScreen 13 #define X_DMXGetDesktopAttributes 14 #define X_DMXChangeDesktopAttributes 15 #define X_DMXAddInput 16 #define X_DMXRemoveInput 17 /** Wire-level description of DMXQueryVersion protocol request. */ typedef struct { CARD8 reqType; /* dmxcode */ CARD8 dmxReqType; /* X_DMXQueryVersion */ CARD16 length; } xDMXQueryVersionReq; #define sz_xDMXQueryVersionReq 4 /** Wire-level description of DMXQueryVersion protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 ununsed; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 patchVersion; CARD32 pad0; CARD32 pad1; CARD32 pad2; } xDMXQueryVersionReply; #define sz_xDMXQueryVersionReply 32 /** Wire-level description of DMXSync protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXSync */ CARD16 length; } xDMXSyncReq; #define sz_xDMXSyncReq 4 /** Wire-level description of DMXSync protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXSyncReply; #define sz_xDMXSyncReply 32 /** Wire-level description of DMXForceWindowCreation protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXForceWindowCreation */ CARD16 length; CARD32 window; } xDMXForceWindowCreationReq; #define sz_xDMXForceWindowCreationReq 8 /** Wire-level description of DMXForceWindowCreation protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXForceWindowCreationReply; #define sz_xDMXForceWindowCreationReply 32 /** Wire-level description of DMXGetScreenCount protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXGetScreenCount */ CARD16 length; } xDMXGetScreenCountReq; #define sz_xDMXGetScreenCountReq 4 /** Wire-level description of DMXGetScreenCount protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 screenCount; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXGetScreenCountReply; #define sz_xDMXGetScreenCountReply 32 /** Wire-level description of DMXGetScreenAttributes protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXGetScreenAttributes */ CARD16 length; CARD32 physicalScreen; } xDMXGetScreenAttributesReq; #define sz_xDMXGetScreenAttributesReq 8 /** Wire-level description of DMXGetScreenAttributes protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 displayNameLength; CARD32 logicalScreen; CARD16 screenWindowWidth; CARD16 screenWindowHeight; INT16 screenWindowXoffset; INT16 screenWindowYoffset; CARD16 rootWindowWidth; CARD16 rootWindowHeight; INT16 rootWindowXoffset; INT16 rootWindowYoffset; INT16 rootWindowXorigin; INT16 rootWindowYorigin; } xDMXGetScreenAttributesReply; #define sz_xDMXGetScreenAttributesReply 36 /** Wire-level description of DMXChangeScreensAttributes protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */ CARD16 length; CARD32 screenCount; CARD32 maskCount; } xDMXChangeScreensAttributesReq; #define sz_xDMXChangeScreensAttributesReq 12 /** Wire-level description of DMXChangeScreensAttributes protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 errorScreen; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xDMXChangeScreensAttributesReply; #define sz_xDMXChangeScreensAttributesReply 32 /** Wire-level description of DMXAddScreen protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXAddScreen */ CARD16 length; CARD32 displayNameLength; CARD32 physicalScreen; CARD32 valueMask; } xDMXAddScreenReq; #define sz_xDMXAddScreenReq 16 /** Wire-level description of DMXAddScreen protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 physicalScreen; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xDMXAddScreenReply; #define sz_xDMXAddScreenReply 32 /** Wire-level description of DMXRemoveScreen protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXRemoveScreen */ CARD16 length; CARD32 physicalScreen; } xDMXRemoveScreenReq; #define sz_xDMXRemoveScreenReq 8 /** Wire-level description of DMXRemoveScreen protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXRemoveScreenReply; #define sz_xDMXRemoveScreenReply 32 /** Wire-level description of DMXGetWindowAttributes protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXGetWindowAttributes */ CARD16 length; CARD32 window; } xDMXGetWindowAttributesReq; #define sz_xDMXGetWindowAttributesReq 8 /** Wire-level description of DMXGetWindowAttributes protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 screenCount; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXGetWindowAttributesReply; #define sz_xDMXGetWindowAttributesReply 32 /** Wire-level description of DMXGetDesktopAttributes protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */ CARD16 length; } xDMXGetDesktopAttributesReq; #define sz_xDMXGetDesktopAttributesReq 4 /** Wire-level description of DMXGetDesktopAttributes protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; INT16 width; INT16 height; INT16 shiftX; INT16 shiftY; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xDMXGetDesktopAttributesReply; #define sz_xDMXGetDesktopAttributesReply 32 /** Wire-level description of DMXChangeDesktopAttributes protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */ CARD16 length; CARD32 valueMask; } xDMXChangeDesktopAttributesReq; #define sz_xDMXChangeDesktopAttributesReq 8 /** Wire-level description of DMXChangeDesktopAttributes protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXChangeDesktopAttributesReply; #define sz_xDMXChangeDesktopAttributesReply 32 /** Wire-level description of DMXGetInputCount protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXGetInputCount */ CARD16 length; } xDMXGetInputCountReq; #define sz_xDMXGetInputCountReq 4 /** Wire-level description of DMXGetInputCount protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 inputCount; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXGetInputCountReply; #define sz_xDMXGetInputCountReply 32 /** Wire-level description of DMXGetInputAttributes protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXGetInputAttributes */ CARD16 length; CARD32 deviceId; } xDMXGetInputAttributesReq; #define sz_xDMXGetInputAttributesReq 8 /** Wire-level description of DMXGetInputAttributes protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 inputType; CARD32 physicalScreen; CARD32 physicalId; CARD32 nameLength; BOOL isCore; BOOL sendsCore; BOOL detached; CARD8 pad0; CARD32 pad1; } xDMXGetInputAttributesReply; #define sz_xDMXGetInputAttributesReply 32 /** Wire-level description of DMXAddInput protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXAddInput */ CARD16 length; CARD32 displayNameLength; CARD32 valueMask; } xDMXAddInputReq; #define sz_xDMXAddInputReq 12 /** Wire-level description of DMXAddInput protocol reply. */ typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 physicalId; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xDMXAddInputReply; #define sz_xDMXAddInputReply 32 /** Wire-level description of DMXRemoveInput protocol request. */ typedef struct { CARD8 reqType; /* DMXCode */ CARD8 dmxReqType; /* X_DMXRemoveInput */ CARD16 length; CARD32 physicalId; } xDMXRemoveInputReq; #define sz_xDMXRemoveInputReq 8 /** Wire-level description of DMXRemoveInput protocol reply. */ typedef struct { BYTE type; CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDMXRemoveInputReply; #define sz_xDMXRemoveInputReply 32 #endif PKZ5rmrmX11/extensions/XKBsrv.hnu[/************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _XKBSRV_H_ #define _XKBSRV_H_ #ifdef XKB_IN_SERVER #define XkbAllocClientMap SrvXkbAllocClientMap #define XkbAllocServerMap SrvXkbAllocServerMap #define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey #define XkbAddKeyType SrvXkbAddKeyType #define XkbCopyKeyType SrvXkbCopyKeyType #define XkbCopyKeyTypes SrvXkbCopyKeyTypes #define XkbFreeClientMap SrvXkbFreeClientMap #define XkbFreeServerMap SrvXkbFreeServerMap #define XkbInitCanonicalKeyTypes SrvXkbInitCanonicalKeyTypes #define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols #define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey #define XkbUpdateMapFromCore SrvXkbUpdateMapFromCore #define XkbResizeKeyActions SrvXkbResizeKeyActions #define XkbResizeKeySyms SrvXkbResizeKeySyms #define XkbResizeKeyType SrvXkbResizeKeyType #define XkbAllocCompatMap SrvXkbAllocCompatMap #define XkbAllocControls SrvXkbAllocControls #define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps #define XkbAllocKeyboard SrvXkbAllocKeyboard #define XkbAllocNames SrvXkbAllocNames #define XkbFreeCompatMap SrvXkbFreeCompatMap #define XkbFreeControls SrvXkbFreeControls #define XkbFreeIndicatorMaps SrvXkbFreeIndicatorMaps #define XkbFreeKeyboard SrvXkbFreeKeyboard #define XkbFreeNames SrvXkbFreeNames #define XkbAddDeviceLedInfo SrvXkbAddDeviceLedInfo #define XkbAllocDeviceInfo SrvXkbAllocDeviceInfo #define XkbFreeDeviceInfo SrvXkbFreeDeviceInfo #define XkbResizeDeviceButtonActions SrvXkbResizeDeviceButtonActions #define XkbLatchModifiers SrvXkbLatchModifiers #define XkbLatchGroup SrvXkbLatchGroup #define XkbVirtualModsToReal SrvXkbVirtualModsToReal #define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange #define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges #define XkbUpdateActionVirtualMods SrvXkbUpdateActionVirtualMods #define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods #endif #include #include #include "inputstr.h" typedef struct _XkbInterest { DeviceIntPtr dev; ClientPtr client; XID resource; struct _XkbInterest * next; CARD16 extDevNotifyMask; CARD16 stateNotifyMask; CARD16 namesNotifyMask; CARD32 ctrlsNotifyMask; CARD8 compatNotifyMask; BOOL bellNotifyMask; BOOL actionMessageMask; CARD16 accessXNotifyMask; CARD32 iStateNotifyMask; CARD32 iMapNotifyMask; CARD16 altSymsNotifyMask; CARD32 autoCtrls; CARD32 autoCtrlValues; } XkbInterestRec,*XkbInterestPtr; typedef struct _XkbRadioGroup { CARD8 flags; CARD8 nMembers; CARD8 dfltDown; CARD8 currentDown; CARD8 members[XkbRGMaxMembers]; } XkbRadioGroupRec, *XkbRadioGroupPtr; typedef struct _XkbEventCause { CARD8 kc; CARD8 event; CARD8 mjr; CARD8 mnr; ClientPtr client; } XkbEventCauseRec,*XkbEventCausePtr; #define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\ (c)->mjr= (c)->mnr= 0; \ (c)->client= NULL; } #define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\ (c)->mjr= (j),(c)->mnr= (n);\ (c)->client= (cl); } #define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl) #define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl) #define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0) #define _OFF_TIMER 0 #define _KRG_WARN_TIMER 1 #define _KRG_TIMER 2 #define _SK_TIMEOUT_TIMER 3 #define _ALL_TIMEOUT_TIMER 4 #define _BEEP_NONE 0 #define _BEEP_FEATURE_ON 1 #define _BEEP_FEATURE_OFF 2 #define _BEEP_FEATURE_CHANGE 3 #define _BEEP_SLOW_WARN 4 #define _BEEP_SLOW_PRESS 5 #define _BEEP_SLOW_ACCEPT 6 #define _BEEP_SLOW_REJECT 7 #define _BEEP_SLOW_RELEASE 8 #define _BEEP_STICKY_LATCH 9 #define _BEEP_STICKY_LOCK 10 #define _BEEP_STICKY_UNLOCK 11 #define _BEEP_LED_ON 12 #define _BEEP_LED_OFF 13 #define _BEEP_LED_CHANGE 14 #define _BEEP_BOUNCE_REJECT 15 typedef struct _XkbSrvInfo { XkbStateRec prev_state; XkbStateRec state; XkbDescPtr desc; DeviceIntPtr device; KbdCtrlProcPtr kbdProc; XkbRadioGroupPtr radioGroups; CARD8 nRadioGroups; CARD8 clearMods; CARD8 setMods; INT16 groupChange; CARD16 dfltPtrDelta; double mouseKeysCurve; double mouseKeysCurveFactor; INT16 mouseKeysDX; INT16 mouseKeysDY; CARD8 mouseKeysFlags; Bool mouseKeysAccel; CARD8 mouseKeysCounter; CARD8 lockedPtrButtons; CARD8 shiftKeyCount; KeyCode mouseKey; KeyCode inactiveKey; KeyCode slowKey; KeyCode repeatKey; CARD8 krgTimerActive; CARD8 beepType; CARD8 beepCount; CARD32 flags; CARD32 lastPtrEventTime; CARD32 lastShiftEventTime; OsTimerPtr beepTimer; OsTimerPtr mouseKeyTimer; OsTimerPtr slowKeysTimer; OsTimerPtr bounceKeysTimer; OsTimerPtr repeatKeyTimer; OsTimerPtr krgTimer; } XkbSrvInfoRec, *XkbSrvInfoPtr; #define XkbSLI_IsDefault (1L<<0) #define XkbSLI_HasOwnState (1L<<1) typedef struct _XkbSrvLedInfo { CARD16 flags; CARD16 class; CARD16 id; union { KbdFeedbackPtr kf; LedFeedbackPtr lf; } fb; CARD32 physIndicators; CARD32 autoState; CARD32 explicitState; CARD32 effectiveState; CARD32 mapsPresent; CARD32 namesPresent; XkbIndicatorMapPtr maps; Atom * names; CARD32 usesBase; CARD32 usesLatched; CARD32 usesLocked; CARD32 usesEffective; CARD32 usesCompat; CARD32 usesControls; CARD32 usedComponents; } XkbSrvLedInfoRec, *XkbSrvLedInfoPtr; /* * Settings for xkbClientFlags field (used by DIX) * These flags _must_ not overlap with XkbPCF_* */ #define _XkbClientInitialized (1<<15) #define _XkbWantsDetectableAutoRepeat(c)\ ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask) /* * Settings for flags field */ #define _XkbStateNotifyInProgress (1<<0) typedef struct { ProcessInputProc processInputProc; ProcessInputProc realInputProc; DeviceUnwrapProc unwrapProc; } xkbDeviceInfoRec, *xkbDeviceInfoPtr; #define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \ device->public.processInputProc = proc; \ oldprocs->processInputProc = \ oldprocs->realInputProc = device->public.realInputProc; \ device->public.realInputProc = proc; \ oldprocs->unwrapProc = device->unwrapProc; \ device->unwrapProc = unwrapproc; #define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \ if (device->public.processInputProc == device->public.realInputProc)\ device->public.processInputProc = proc; \ oldprocs->processInputProc = \ oldprocs->realInputProc = device->public.realInputProc; \ device->public.realInputProc = proc; \ oldprocs->unwrapProc = device->unwrapProc; \ device->unwrapProc = unwrapproc; #define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \ device->public.processInputProc = oldprocs->processInputProc; \ device->public.realInputProc = oldprocs->realInputProc; \ device->unwrapProc = oldprocs->unwrapProc; #define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr) /***====================================================================***/ /***====================================================================***/ #define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask) #define XkbAllFilteredEventsMask \ (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask) /***====================================================================***/ extern int XkbReqCode; extern int XkbEventBase; extern int XkbKeyboardErrorCode; extern int XkbDisableLockActions; extern char * XkbBaseDirectory; extern char * XkbBinDirectory; extern char * XkbInitialMap; extern int _XkbClientMajor; extern int _XkbClientMinor; extern unsigned int XkbXIUnsupported; extern char * XkbModelUsed,*XkbLayoutUsed,*XkbVariantUsed,*XkbOptionsUsed; extern Bool noXkbExtension; extern Bool XkbWantRulesProp; extern pointer XkbLastRepeatEvent; extern CARD32 xkbDebugFlags; extern CARD32 xkbDebugCtrls; #define _XkbAlloc(s) xalloc((s)) #define _XkbCalloc(n,s) Xcalloc((n)*(s)) #define _XkbRealloc(o,s) Xrealloc((o),(s)) #define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t))) #define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t))) #define _XkbTypedRealloc(o,n,t) \ ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t)) #define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t)) #define _XkbFree(p) Xfree(p) #define _XkbLibError(c,l,d) \ { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); } #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff))) #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) extern int DeviceKeyPress,DeviceKeyRelease; extern int DeviceButtonPress,DeviceButtonRelease; #ifdef XINPUT #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress)) #define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease)) #else #define _XkbIsPressEvent(t) ((t)==KeyPress) #define _XkbIsReleaseEvent(t) ((t)==KeyRelease) #endif #define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\ ((k)<=(c)->curKeySyms.maxKeyCode)) #define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\ (c)->curKeySyms.minKeyCode+1) #define XConvertCase(s,l,u) XkbConvertCase(s,l,u) #undef IsKeypadKey #define IsKeypadKey(s) XkbKSIsKeypad(s) typedef int Status; typedef pointer XPointer; typedef struct _XDisplay Display; #ifndef True #define True 1 #define False 0 #endif #ifndef PATH_MAX #ifdef MAXPATHLEN #define PATH_MAX MAXPATHLEN #else #define PATH_MAX 1024 #endif #endif _XFUNCPROTOBEGIN extern void XkbUseMsg( void ); extern int XkbProcessArguments( int /* argc */, char ** /* argv */, int /* i */ ); extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc); extern void XkbFreeCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); extern void XkbFreeNames( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); extern DeviceIntPtr _XkbLookupAnyDevice( int /* id */, int * /* why_rtrn */ ); extern DeviceIntPtr _XkbLookupKeyboard( int /* id */, int * /* why_rtrn */ ); extern DeviceIntPtr _XkbLookupBellDevice( int /* id */, int * /* why_rtrn */ ); extern DeviceIntPtr _XkbLookupLedDevice( int /* id */, int * /* why_rtrn */ ); extern DeviceIntPtr _XkbLookupButtonDevice( int /* id */, int * /* why_rtrn */ ); extern XkbDescPtr XkbAllocKeyboard( void ); extern Status XkbAllocClientMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nTypes */ ); extern Status XkbAllocServerMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nNewActions */ ); extern void XkbFreeClientMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ ); extern void XkbFreeServerMap( XkbDescPtr /* xkb */, unsigned int /* what */, Bool /* freeMap */ ); extern Status XkbAllocIndicatorMaps( XkbDescPtr /* xkb */ ); extern Status XkbAllocCompatMap( XkbDescPtr /* xkb */, unsigned int /* which */, unsigned int /* nInterpret */ ); extern Status XkbAllocNames( XkbDescPtr /* xkb */, unsigned int /* which */, int /* nTotalRG */, int /* nTotalAliases */ ); extern Status XkbAllocControls( XkbDescPtr /* xkb */, unsigned int /* which*/ ); extern Status XkbCopyKeyType( XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */ ); extern Status XkbCopyKeyTypes( XkbKeyTypePtr /* from */, XkbKeyTypePtr /* into */, int /* num_types */ ); extern Status XkbResizeKeyType( XkbDescPtr /* xkb */, int /* type_ndx */, int /* map_count */, Bool /* want_preserve */, int /* new_num_lvls */ ); extern void XkbFreeKeyboard( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeDesc */ ); extern void XkbSetActionKeyMods( XkbDescPtr /* xkb */, XkbAction * /* act */, unsigned int /* mods */ ); extern Bool XkbCheckActionVMods( XkbDescPtr /* xkb */, XkbAction * /* act */, unsigned int /* changed */ ); extern Bool XkbApplyVModChanges( XkbSrvInfoPtr /* xkbi */, unsigned int /* changed */, XkbChangesPtr /* pChanges */, unsigned int * /* needChecksRtrn */, XkbEventCausePtr /* cause */ ); extern void XkbApplyVModChangesToAllDevices( DeviceIntPtr /* dev */, XkbDescPtr /* xkb */, unsigned int /* changed */, XkbEventCausePtr /* cause */ ); extern unsigned int XkbMaskForVMask( XkbDescPtr /* xkb */, unsigned int /* vmask */ ); extern Bool XkbVirtualModsToReal( XkbDescPtr /* xkb */, unsigned int /* virtua_mask */, unsigned int * /* mask_rtrn */ ); extern unsigned int XkbAdjustGroup( int /* group */, XkbControlsPtr /* ctrls */ ); extern KeySym *XkbResizeKeySyms( XkbDescPtr /* xkb */, int /* key */, int /* needed */ ); extern XkbAction *XkbResizeKeyActions( XkbDescPtr /* xkb */, int /* key */, int /* needed */ ); extern void XkbUpdateKeyTypesFromCore( DeviceIntPtr /* pXDev */, KeyCode /* first */, CARD8 /* num */, XkbChangesPtr /* pChanges */ ); extern void XkbUpdateDescActions( XkbDescPtr /* xkb */, KeyCode /* first */, CARD8 /* num */, XkbChangesPtr /* changes */ ); extern void XkbUpdateActions( DeviceIntPtr /* pXDev */, KeyCode /* first */, CARD8 /* num */, XkbChangesPtr /* pChanges */, unsigned int * /* needChecksRtrn */, XkbEventCausePtr /* cause */ ); extern void XkbUpdateCoreDescription( DeviceIntPtr /* keybd */, Bool /* resize */ ); extern void XkbApplyMappingChange( DeviceIntPtr /* pXDev */, CARD8 /* request */, KeyCode /* firstKey */, CARD8 /* num */, ClientPtr /* client */ ); extern void XkbSetIndicators( DeviceIntPtr /* pXDev */, CARD32 /* affect */, CARD32 /* values */, XkbEventCausePtr /* cause */ ); extern void XkbUpdateIndicators( DeviceIntPtr /* keybd */, CARD32 /* changed */, Bool /* check_edevs */, XkbChangesPtr /* pChanges */, XkbEventCausePtr /* cause */ ); extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo( DeviceIntPtr /* dev */, KbdFeedbackPtr /* kf */, LedFeedbackPtr /* lf */, unsigned int /* needed_parts */ ); extern XkbSrvLedInfoPtr XkbFindSrvLedInfo( DeviceIntPtr /* dev */, unsigned int /* class */, unsigned int /* id */, unsigned int /* needed_parts */ ); extern void XkbApplyLedNameChanges( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* changed_names */, xkbExtensionDeviceNotify * /* ed */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern void XkbApplyLedMapChanges( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* changed_maps */, xkbExtensionDeviceNotify * /* ed */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern void XkbApplyLedStateChanges( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* changed_leds */, xkbExtensionDeviceNotify * /* ed */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern void XkbUpdateLedAutoState( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* maps_to_check */, xkbExtensionDeviceNotify * /* ed */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern void XkbFlushLedEvents( DeviceIntPtr /* dev */, DeviceIntPtr /* kbd */, XkbSrvLedInfoPtr /* sli */, xkbExtensionDeviceNotify * /* ed */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern void XkbUpdateAllDeviceIndicators( XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern unsigned int XkbIndicatorsToUpdate( DeviceIntPtr /* dev */, unsigned long /* state_changes */, Bool /* enabled_ctrl_changes */ ); extern void XkbComputeDerivedState( XkbSrvInfoPtr /* xkbi */ ); extern void XkbCheckSecondaryEffects( XkbSrvInfoPtr /* xkbi */, unsigned int /* which */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern void XkbCheckIndicatorMaps( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, unsigned int /* which */ ); extern unsigned int XkbStateChangedFlags( XkbStatePtr /* old */, XkbStatePtr /* new */ ); extern void XkbSendStateNotify( DeviceIntPtr /* kbd */, xkbStateNotify * /* pSN */ ); extern void XkbSendMapNotify( DeviceIntPtr /* kbd */, xkbMapNotify * /* ev */ ); extern int XkbComputeControlsNotify( DeviceIntPtr /* kbd */, XkbControlsPtr /* old */, XkbControlsPtr /* new */, xkbControlsNotify * /* pCN */, Bool /* forceCtrlProc */ ); extern void XkbSendControlsNotify( DeviceIntPtr /* kbd */, xkbControlsNotify * /* ev */ ); extern void XkbSendCompatMapNotify( DeviceIntPtr /* kbd */, xkbCompatMapNotify * /* ev */ ); extern void XkbSendIndicatorNotify( DeviceIntPtr /* kbd */, int /* xkbType */, xkbIndicatorNotify * /* ev */ ); extern void XkbHandleBell( BOOL /* force */, BOOL /* eventOnly */, DeviceIntPtr /* kbd */, CARD8 /* percent */, pointer /* ctrl */, CARD8 /* class */, Atom /* name */, WindowPtr /* pWin */, ClientPtr /* pClient */ ); extern void XkbSendAccessXNotify( DeviceIntPtr /* kbd */, xkbAccessXNotify * /* pEv */ ); extern void XkbSendNamesNotify( DeviceIntPtr /* kbd */, xkbNamesNotify * /* ev */ ); extern void XkbSendCompatNotify( DeviceIntPtr /* kbd */, xkbCompatMapNotify * /* ev */ ); extern void XkbSendActionMessage( DeviceIntPtr /* kbd */, xkbActionMessage * /* ev */ ); extern void XkbSendExtensionDeviceNotify( DeviceIntPtr /* kbd */, ClientPtr /* client */, xkbExtensionDeviceNotify * /* ev */ ); extern void XkbSendNotification( DeviceIntPtr /* kbd */, XkbChangesPtr /* pChanges */, XkbEventCausePtr /* cause */ ); extern void XkbProcessKeyboardEvent( struct _xEvent * /* xE */, DeviceIntPtr /* keybd */, int /* count */ ); extern void XkbProcessOtherEvent( struct _xEvent * /* xE */, DeviceIntPtr /* keybd */, int /* count */ ); extern void XkbHandleActions( DeviceIntPtr /* dev */, DeviceIntPtr /* kbd */, struct _xEvent * /* xE */, int /* count */ ); extern Bool XkbEnableDisableControls( XkbSrvInfoPtr /* xkbi */, unsigned long /* change */, unsigned long /* newValues */, XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern void AccessXInit( DeviceIntPtr /* dev */ ); extern Bool AccessXFilterPressEvent( register struct _xEvent * /* xE */, register DeviceIntPtr /* keybd */, int /* count */ ); extern Bool AccessXFilterReleaseEvent( register struct _xEvent * /* xE */, register DeviceIntPtr /* keybd */, int /* count */ ); extern void AccessXCancelRepeatKey( XkbSrvInfoPtr /* xkbi */, KeyCode /* key */ ); extern void AccessXComputeCurveFactor( XkbSrvInfoPtr /* xkbi */, XkbControlsPtr /* ctrls */ ); extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo( XkbDeviceInfoPtr /* devi */, unsigned int /* ledClass */, unsigned int /* ledId */ ); extern XkbDeviceInfoPtr XkbAllocDeviceInfo( unsigned int /* deviceSpec */, unsigned int /* nButtons */, unsigned int /* szLeds */ ); extern void XkbFreeDeviceInfo( XkbDeviceInfoPtr /* devi */, unsigned int /* which */, Bool /* freeDevI */ ); extern Status XkbResizeDeviceButtonActions( XkbDeviceInfoPtr /* devi */, unsigned int /* newTotal */ ); extern XkbInterestPtr XkbFindClientResource( DevicePtr /* inDev */, ClientPtr /* client */ ); extern XkbInterestPtr XkbAddClientResource( DevicePtr /* inDev */, ClientPtr /* client */, XID /* id */ ); extern int XkbRemoveClient( DevicePtr /* inDev */, ClientPtr /* client */ ); extern int XkbRemoveResourceClient( DevicePtr /* inDev */, XID /* id */ ); extern int XkbDDXInitDevice( DeviceIntPtr /* dev */ ); extern int XkbDDXAccessXBeep( DeviceIntPtr /* dev */, unsigned int /* what */, unsigned int /* which */ ); extern void XkbDDXKeyClick( DeviceIntPtr /* dev */, int /* keycode */, int /* synthetic */ ); extern int XkbDDXUsesSoftRepeat( DeviceIntPtr /* dev */ ); extern void XkbDDXKeybdCtrlProc( DeviceIntPtr /* dev */, KeybdCtrl * /* ctrl */ ); extern void XkbDDXChangeControls( DeviceIntPtr /* dev */, XkbControlsPtr /* old */, XkbControlsPtr /* new */ ); extern void XkbDDXUpdateIndicators( DeviceIntPtr /* keybd */, CARD32 /* newState */ ); extern void XkbDDXUpdateDeviceIndicators( DeviceIntPtr /* dev */, XkbSrvLedInfoPtr /* sli */, CARD32 /* newState */ ); extern void XkbDDXFakePointerButton( int /* event */, int /* button */ ); extern void XkbDDXFakePointerMotion( unsigned int /* flags */, int /* x */, int /* y */ ); extern void XkbDDXFakeDeviceButton( DeviceIntPtr /* dev */, Bool /* press */, int /* button */ ); extern int XkbDDXTerminateServer( DeviceIntPtr /* dev */, KeyCode /* key */, XkbAction * /* act */ ); extern int XkbDDXSwitchScreen( DeviceIntPtr /* dev */, KeyCode /* key */, XkbAction * /* act */ ); extern int XkbDDXPrivate( DeviceIntPtr /* dev */, KeyCode /* key */, XkbAction * /* act */ ); extern void XkbDisableComputedAutoRepeats( DeviceIntPtr /* pXDev */, unsigned int /* key */ ); extern void XkbSetRepeatKeys( DeviceIntPtr /* pXDev */, int /* key */, int /* onoff */ ); extern int XkbLatchModifiers( DeviceIntPtr /* pXDev */, CARD8 /* mask */, CARD8 /* latches */ ); extern int XkbLatchGroup( DeviceIntPtr /* pXDev */, int /* group */ ); extern void XkbClearAllLatchesAndLocks( DeviceIntPtr /* dev */, XkbSrvInfoPtr /* xkbi */, Bool /* genEv */, XkbEventCausePtr /* cause */ ); extern void XkbSetRulesDflts( char * /* rulesFile */, char * /* model */, char * /* layout */, char * /* variant */, char * /* options */ ); extern void XkbInitDevice( DeviceIntPtr /* pXDev */ ); extern Bool XkbInitKeyboardDeviceStruct( DeviceIntPtr /* pXDev */, XkbComponentNamesPtr /* pNames */, KeySymsPtr /* pSyms */, CARD8 /* pMods */[], BellProcPtr /* bellProc */, KbdCtrlProcPtr /* ctrlProc */ ); extern int SProcXkbDispatch( ClientPtr /* client */ ); extern XkbGeometryPtr XkbLookupNamedGeometry( DeviceIntPtr /* dev */, Atom /* name */, Bool * /* shouldFree */ ); extern char * _XkbDupString( char * /* str */ ); extern void XkbConvertCase( KeySym /* sym */, KeySym * /* lower */, KeySym * /* upper */ ); extern Status XkbChangeKeycodeRange( XkbDescPtr /* xkb */, int /* minKC */, int /* maxKC */, XkbChangesPtr /* changes */ ); extern int XkbFinishDeviceInit( DeviceIntPtr /* pXDev */ ); extern void XkbFreeSrvLedInfo( XkbSrvLedInfoPtr /* sli */ ); extern void XkbFreeInfo( XkbSrvInfoPtr /* xkbi */ ); extern Status XkbChangeTypesOfKey( XkbDescPtr /* xkb */, int /* key */, int /* nGroups */, unsigned int /* groups */, int * /* newTypesIn */, XkbMapChangesPtr /* changes */ ); extern XkbKeyTypePtr XkbAddKeyType( XkbDescPtr /* xkb */, Atom /* name */, int /* map_count */, Bool /* want_preserve */, int /* num_lvls */ ); extern Status XkbInitCanonicalKeyTypes( XkbDescPtr /* xkb */, unsigned int /* which */, int /* keypadVMod */ ); extern int XkbKeyTypesForCoreSymbols( XkbDescPtr /* xkb */, int /* map_width */, KeySym * /* core_syms */, unsigned int /* protected */, int * /* types_inout */, KeySym * /* xkb_syms_rtrn */ ); extern Bool XkbApplyCompatMapToKey( XkbDescPtr /* xkb */, KeyCode /* key */, XkbChangesPtr /* changes */ ); extern Bool XkbUpdateMapFromCore( XkbDescPtr /* xkb */, KeyCode /* first_key */, int /* num_keys */, int /* map_width */, KeySym * /* core_keysyms */, XkbChangesPtr /* changes */ ); extern void XkbFreeControls( XkbDescPtr /* xkb */, unsigned int /* which */, Bool /* freeMap */ ); extern void XkbFreeIndicatorMaps( XkbDescPtr /* xkb */ ); extern Bool XkbApplyVirtualModChanges( XkbDescPtr /* xkb */, unsigned int /* changed */, XkbChangesPtr /* changes */ ); extern Bool XkbUpdateActionVirtualMods( XkbDescPtr /* xkb */, XkbAction * /* act */, unsigned int /* changed */ ); extern void XkbUpdateKeyTypeVirtualMods( XkbDescPtr /* xkb */, XkbKeyTypePtr /* type */, unsigned int /* changed */, XkbChangesPtr /* changes */ ); extern void XkbSendNewKeyboardNotify( DeviceIntPtr /* kbd */, xkbNewKeyboardNotify * /* pNKN */ ); #ifdef XKBSRV_NEED_FILE_FUNCS #include #include #include #define _XkbListKeymaps 0 #define _XkbListKeycodes 1 #define _XkbListTypes 2 #define _XkbListCompat 3 #define _XkbListSymbols 4 #define _XkbListGeometry 5 #define _XkbListNumComponents 6 typedef struct _XkbSrvListInfo { int szPool; int nPool; char * pool; int maxRtrn; int nTotal; char * pattern[_XkbListNumComponents]; int nFound[_XkbListNumComponents]; } XkbSrvListInfoRec,*XkbSrvListInfoPtr; char * XkbGetRulesDflts( XkbRF_VarDefsPtr /* defs */ ); extern void XkbSetRulesUsed( XkbRF_VarDefsPtr /* defs */ ); extern Status XkbDDXList( DeviceIntPtr /* dev */, XkbSrvListInfoPtr /* listing */, ClientPtr /* client */ ); extern unsigned int XkbDDXLoadKeymapByNames( DeviceIntPtr /* keybd */, XkbComponentNamesPtr /* names */, unsigned int /* want */, unsigned int /* need */, XkbFileInfoPtr /* finfoRtrn */, char * /* keymapNameRtrn */, int /* keymapNameRtrnLen */ ); extern Bool XkbDDXNamesFromRules( DeviceIntPtr /* keybd */, char * /* rules */, XkbRF_VarDefsPtr /* defs */, XkbComponentNamesPtr /* names */ ); extern FILE *XkbDDXOpenConfigFile( char * /* mapName */, char * /* fileNameRtrn */, int /* fileNameRtrnLen */ ); extern Bool XkbDDXApplyConfig( XPointer /* cfg_in */, XkbSrvInfoPtr /* xkbi */ ); extern XPointer XkbDDXPreloadConfig( char ** /* rulesFileRtrn */, XkbRF_VarDefsPtr /* defs */, XkbComponentNamesPtr /* names */, DeviceIntPtr /* dev */ ); extern int _XkbStrCaseCmp( char * /* str1 */, char * /* str2 */ ); #endif /* XKBSRV_NEED_FILE_FUNCS */ _XFUNCPROTOEND #define XkbAtomGetString(d,s) NameForAtom(s) #endif /* _XKBSRV_H_ */ PKZN>X11/extensions/randr.hnu[/* * Copyright © 2000 Compaq Computer Corporation * Copyright © 2002 Hewlett Packard Company * Copyright © 2006 Intel Corporation * Copyright © 2008 Red Hat, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. * Keith Packard, Intel Corporation */ #ifndef _RANDR_H_ #define _RANDR_H_ typedef unsigned short Rotation; typedef unsigned short SizeID; typedef unsigned short SubpixelOrder; typedef unsigned short Connection; typedef unsigned short XRandrRotation; typedef unsigned short XRandrSizeID; typedef unsigned short XRandrSubpixelOrder; typedef unsigned long XRandrModeFlags; #define RANDR_NAME "RANDR" #define RANDR_MAJOR 1 #define RANDR_MINOR 6 #define RRNumberErrors 5 #define RRNumberEvents 2 #define RRNumberRequests 47 #define X_RRQueryVersion 0 /* we skip 1 to make old clients fail pretty immediately */ #define X_RROldGetScreenInfo 1 #define X_RR1_0SetScreenConfig 2 /* V1.0 apps share the same set screen config request id */ #define X_RRSetScreenConfig 2 #define X_RROldScreenChangeSelectInput 3 /* 3 used to be ScreenChangeSelectInput; deprecated */ #define X_RRSelectInput 4 #define X_RRGetScreenInfo 5 /* V1.2 additions */ #define X_RRGetScreenSizeRange 6 #define X_RRSetScreenSize 7 #define X_RRGetScreenResources 8 #define X_RRGetOutputInfo 9 #define X_RRListOutputProperties 10 #define X_RRQueryOutputProperty 11 #define X_RRConfigureOutputProperty 12 #define X_RRChangeOutputProperty 13 #define X_RRDeleteOutputProperty 14 #define X_RRGetOutputProperty 15 #define X_RRCreateMode 16 #define X_RRDestroyMode 17 #define X_RRAddOutputMode 18 #define X_RRDeleteOutputMode 19 #define X_RRGetCrtcInfo 20 #define X_RRSetCrtcConfig 21 #define X_RRGetCrtcGammaSize 22 #define X_RRGetCrtcGamma 23 #define X_RRSetCrtcGamma 24 /* V1.3 additions */ #define X_RRGetScreenResourcesCurrent 25 #define X_RRSetCrtcTransform 26 #define X_RRGetCrtcTransform 27 #define X_RRGetPanning 28 #define X_RRSetPanning 29 #define X_RRSetOutputPrimary 30 #define X_RRGetOutputPrimary 31 #define RRTransformUnit (1L << 0) #define RRTransformScaleUp (1L << 1) #define RRTransformScaleDown (1L << 2) #define RRTransformProjective (1L << 3) /* v1.4 */ #define X_RRGetProviders 32 #define X_RRGetProviderInfo 33 #define X_RRSetProviderOffloadSink 34 #define X_RRSetProviderOutputSource 35 #define X_RRListProviderProperties 36 #define X_RRQueryProviderProperty 37 #define X_RRConfigureProviderProperty 38 #define X_RRChangeProviderProperty 39 #define X_RRDeleteProviderProperty 40 #define X_RRGetProviderProperty 41 /* v1.5 */ #define X_RRGetMonitors 42 #define X_RRSetMonitor 43 #define X_RRDeleteMonitor 44 /* v1.6 */ #define X_RRCreateLease 45 #define X_RRFreeLease 46 /* Event selection bits */ #define RRScreenChangeNotifyMask (1L << 0) /* V1.2 additions */ #define RRCrtcChangeNotifyMask (1L << 1) #define RROutputChangeNotifyMask (1L << 2) #define RROutputPropertyNotifyMask (1L << 3) /* V1.4 additions */ #define RRProviderChangeNotifyMask (1L << 4) #define RRProviderPropertyNotifyMask (1L << 5) #define RRResourceChangeNotifyMask (1L << 6) /* V1.6 additions */ #define RRLeaseNotifyMask (1L << 7) /* Event codes */ #define RRScreenChangeNotify 0 /* V1.2 additions */ #define RRNotify 1 /* RRNotify Subcodes */ #define RRNotify_CrtcChange 0 #define RRNotify_OutputChange 1 #define RRNotify_OutputProperty 2 #define RRNotify_ProviderChange 3 #define RRNotify_ProviderProperty 4 #define RRNotify_ResourceChange 5 /* V1.6 additions */ #define RRNotify_Lease 6 /* used in the rotation field; rotation and reflection in 0.1 proto. */ #define RR_Rotate_0 1 #define RR_Rotate_90 2 #define RR_Rotate_180 4 #define RR_Rotate_270 8 /* new in 1.0 protocol, to allow reflection of screen */ #define RR_Reflect_X 16 #define RR_Reflect_Y 32 #define RRSetConfigSuccess 0 #define RRSetConfigInvalidConfigTime 1 #define RRSetConfigInvalidTime 2 #define RRSetConfigFailed 3 /* new in 1.2 protocol */ #define RR_HSyncPositive 0x00000001 #define RR_HSyncNegative 0x00000002 #define RR_VSyncPositive 0x00000004 #define RR_VSyncNegative 0x00000008 #define RR_Interlace 0x00000010 #define RR_DoubleScan 0x00000020 #define RR_CSync 0x00000040 #define RR_CSyncPositive 0x00000080 #define RR_CSyncNegative 0x00000100 #define RR_HSkewPresent 0x00000200 #define RR_BCast 0x00000400 #define RR_PixelMultiplex 0x00000800 #define RR_DoubleClock 0x00001000 #define RR_ClockDivideBy2 0x00002000 #define RR_Connected 0 #define RR_Disconnected 1 #define RR_UnknownConnection 2 #define BadRROutput 0 #define BadRRCrtc 1 #define BadRRMode 2 #define BadRRProvider 3 #define BadRRLease 4 /* Conventional RandR output properties */ #define RR_PROPERTY_BACKLIGHT "Backlight" #define RR_PROPERTY_RANDR_EDID "EDID" #define RR_PROPERTY_SIGNAL_FORMAT "SignalFormat" #define RR_PROPERTY_SIGNAL_PROPERTIES "SignalProperties" #define RR_PROPERTY_CONNECTOR_TYPE "ConnectorType" #define RR_PROPERTY_CONNECTOR_NUMBER "ConnectorNumber" #define RR_PROPERTY_COMPATIBILITY_LIST "CompatibilityList" #define RR_PROPERTY_CLONE_LIST "CloneList" #define RR_PROPERTY_BORDER "Border" #define RR_PROPERTY_BORDER_DIMENSIONS "BorderDimensions" #define RR_PROPERTY_GUID "GUID" #define RR_PROPERTY_RANDR_TILE "TILE" #define RR_PROPERTY_NON_DESKTOP "non-desktop" /* roles this device can carry out */ #define RR_Capability_None 0 #define RR_Capability_SourceOutput 1 #define RR_Capability_SinkOutput 2 #define RR_Capability_SourceOffload 4 #define RR_Capability_SinkOffload 8 #endif /* _RANDR_H_ */ PKZ*tX11/extensions/bigreqstr.hnu[#warning "bigreqstr.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include PKZ>$]]X11/extensions/secur.hnu[/* Copyright 1996, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _SECUR_H #define _SECUR_H #define SECURITY_EXTENSION_NAME "SECURITY" #define SECURITY_MAJOR_VERSION 1 #define SECURITY_MINOR_VERSION 0 #define XSecurityNumberEvents 1 #define XSecurityNumberErrors 2 #define XSecurityBadAuthorization 0 #define XSecurityBadAuthorizationProtocol 1 /* trust levels */ #define XSecurityClientTrusted 0 #define XSecurityClientUntrusted 1 /* authorization attribute masks */ #define XSecurityTimeout (1<<0) #define XSecurityTrustLevel (1<<1) #define XSecurityGroup (1<<2) #define XSecurityEventMask (1<<3) #define XSecurityAllAuthorizationAttributes \ (XSecurityTimeout | XSecurityTrustLevel | XSecurityGroup | XSecurityEventMask) /* event masks */ #define XSecurityAuthorizationRevokedMask (1<<0) #define XSecurityAllEventMasks XSecurityAuthorizationRevokedMask /* event offsets */ #define XSecurityAuthorizationRevoked 0 #define XSecurityAuthorizationName "XC-QUERY-SECURITY-1" #define XSecurityAuthorizationNameLen 19 #endif /* _SECUR_H */ PKZ#X11/extensions/XvMCproto.hnu[#ifndef _XVMCPROTO_H_ #define _XVMCPROTO_H_ #define xvmc_QueryVersion 0 #define xvmc_ListSurfaceTypes 1 #define xvmc_CreateContext 2 #define xvmc_DestroyContext 3 #define xvmc_CreateSurface 4 #define xvmc_DestroySurface 5 #define xvmc_CreateSubpicture 6 #define xvmc_DestroySubpicture 7 #define xvmc_ListSubpictureTypes 8 #define xvmc_GetDRInfo 9 #define xvmc_LastRequest xvmc_GetDRInfo #define xvmcNumRequest (xvmc_LastRequest + 1) typedef struct { CARD32 surface_type_id; CARD16 chroma_format; CARD16 pad0; CARD16 max_width; CARD16 max_height; CARD16 subpicture_max_width; CARD16 subpicture_max_height; CARD32 mc_type; CARD32 flags; } xvmcSurfaceInfo; #define sz_xvmcSurfaceInfo 24; typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; } xvmcQueryVersionReq; #define sz_xvmcQueryVersionReq 4; typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 major; CARD32 minor; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; } xvmcQueryVersionReply; #define sz_xvmcQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 port; } xvmcListSurfaceTypesReq; #define sz_xvmcListSurfaceTypesReq 8; typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 num; CARD32 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; } xvmcListSurfaceTypesReply; #define sz_xvmcListSurfaceTypesReply 32 typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 context_id; CARD32 port; CARD32 surface_type_id; CARD16 width; CARD16 height; CARD32 flags; } xvmcCreateContextReq; #define sz_xvmcCreateContextReq 24; typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD16 width_actual; CARD16 height_actual; CARD32 flags_return; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; } xvmcCreateContextReply; #define sz_xvmcCreateContextReply 32 typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 context_id; } xvmcDestroyContextReq; #define sz_xvmcDestroyContextReq 8; typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 surface_id; CARD32 context_id; } xvmcCreateSurfaceReq; #define sz_xvmcCreateSurfaceReq 12; typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 padl2; CARD32 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6; CARD32 padl7; } xvmcCreateSurfaceReply; #define sz_xvmcCreateSurfaceReply 32 typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 surface_id; } xvmcDestroySurfaceReq; #define sz_xvmcDestroySurfaceReq 8; typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 subpicture_id; CARD32 context_id; CARD32 xvimage_id; CARD16 width; CARD16 height; } xvmcCreateSubpictureReq; #define sz_xvmcCreateSubpictureReq 20; typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD16 width_actual; CARD16 height_actual; CARD16 num_palette_entries; CARD16 entry_bytes; CARD8 component_order[4]; CARD32 padl5; CARD32 padl6; CARD32 padl7; } xvmcCreateSubpictureReply; #define sz_xvmcCreateSubpictureReply 32 typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 subpicture_id; } xvmcDestroySubpictureReq; #define sz_xvmcDestroySubpictureReq 8; typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 port; CARD32 surface_type_id; } xvmcListSubpictureTypesReq; #define sz_xvmcListSubpictureTypesReq 12; typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 num; CARD32 padl2; CARD32 padl3; CARD32 padl4; CARD32 padl5; CARD32 padl6; } xvmcListSubpictureTypesReply; #define sz_xvmcListSubpictureTypesReply 32 typedef struct { CARD8 reqType; CARD8 xvmcReqType; CARD16 length; CARD32 port; CARD32 shmKey; CARD32 magic; } xvmcGetDRInfoReq; #define sz_xvmcGetDRInfoReq 16; typedef struct { BYTE type; /* X_Reply */ BYTE padb1; CARD16 sequenceNumber; CARD32 length; CARD32 major; CARD32 minor; CARD32 patchLevel; CARD32 nameLen; CARD32 busIDLen; CARD32 isLocal; } xvmcGetDRInfoReply; #define sz_xvmcGetDRInfoReply 32 #endif PKZݭ$$X11/extensions/XvMC.hnu[#ifndef _XVMC_H_ #define _XVMC_H_ #include #include #define XvMCName "XVideo-MotionCompensation" #define XvMCNumEvents 0 #define XvMCNumErrors 3 #define XvMCVersion 1 #define XvMCRevision 1 #define XvMCBadContext 0 #define XvMCBadSurface 1 #define XvMCBadSubpicture 2 /* Chroma formats */ #define XVMC_CHROMA_FORMAT_420 0x00000001 #define XVMC_CHROMA_FORMAT_422 0x00000002 #define XVMC_CHROMA_FORMAT_444 0x00000003 /* XvMCSurfaceInfo Flags */ #define XVMC_OVERLAID_SURFACE 0x00000001 #define XVMC_BACKEND_SUBPICTURE 0x00000002 #define XVMC_SUBPICTURE_INDEPENDENT_SCALING 0x00000004 #define XVMC_INTRA_UNSIGNED 0x00000008 /* Motion Compensation types */ #define XVMC_MOCOMP 0x00000000 #define XVMC_IDCT 0x00010000 #define XVMC_MPEG_1 0x00000001 #define XVMC_MPEG_2 0x00000002 #define XVMC_H263 0x00000003 #define XVMC_MPEG_4 0x00000004 #define XVMC_MB_TYPE_MOTION_FORWARD 0x02 #define XVMC_MB_TYPE_MOTION_BACKWARD 0x04 #define XVMC_MB_TYPE_PATTERN 0x08 #define XVMC_MB_TYPE_INTRA 0x10 #define XVMC_PREDICTION_FIELD 0x01 #define XVMC_PREDICTION_FRAME 0x02 #define XVMC_PREDICTION_DUAL_PRIME 0x03 #define XVMC_PREDICTION_16x8 0x02 #define XVMC_PREDICTION_4MV 0x04 #define XVMC_SELECT_FIRST_FORWARD 0x01 #define XVMC_SELECT_FIRST_BACKWARD 0x02 #define XVMC_SELECT_SECOND_FORWARD 0x04 #define XVMC_SELECT_SECOND_BACKWARD 0x08 #define XVMC_DCT_TYPE_FRAME 0x00 #define XVMC_DCT_TYPE_FIELD 0x01 #define XVMC_TOP_FIELD 0x00000001 #define XVMC_BOTTOM_FIELD 0x00000002 #define XVMC_FRAME_PICTURE (XVMC_TOP_FIELD | XVMC_BOTTOM_FIELD) #define XVMC_SECOND_FIELD 0x00000004 #define XVMC_DIRECT 0x00000001 #define XVMC_RENDERING 0x00000001 #define XVMC_DISPLAYING 0x00000002 typedef struct { int surface_type_id; int chroma_format; unsigned short max_width; unsigned short max_height; unsigned short subpicture_max_width; unsigned short subpicture_max_height; int mc_type; int flags; } XvMCSurfaceInfo; typedef struct { XID context_id; int surface_type_id; unsigned short width; unsigned short height; XvPortID port; int flags; void * privData; /* private to the library */ } XvMCContext; typedef struct { XID surface_id; XID context_id; int surface_type_id; unsigned short width; unsigned short height; void *privData; /* private to the library */ } XvMCSurface; typedef struct { XID subpicture_id; XID context_id; int xvimage_id; unsigned short width; unsigned short height; int num_palette_entries; int entry_bytes; char component_order[4]; void *privData; /* private to the library */ } XvMCSubpicture; typedef struct { unsigned int num_blocks; XID context_id; void *privData; short *blocks; } XvMCBlockArray; typedef struct { unsigned short x; unsigned short y; unsigned char macroblock_type; unsigned char motion_type; unsigned char motion_vertical_field_select; unsigned char dct_type; short PMV[2][2][2]; unsigned int index; unsigned short coded_block_pattern; unsigned short pad0; } XvMCMacroBlock; typedef struct { unsigned int num_blocks; XID context_id; void *privData; XvMCMacroBlock *macro_blocks; } XvMCMacroBlockArray; #endif PKZ@JJX11/extensions/shapeproto.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ********************************************************/ #ifndef _SHAPEPROTO_H_ #define _SHAPEPROTO_H_ #include /* * Protocol requests constants and alignment values * These would really be in SHAPE's X.h and Xproto.h equivalents */ #define Window CARD32 #define Time CARD32 #define X_ShapeQueryVersion 0 #define X_ShapeRectangles 1 #define X_ShapeMask 2 #define X_ShapeCombine 3 #define X_ShapeOffset 4 #define X_ShapeQueryExtents 5 #define X_ShapeSelectInput 6 #define X_ShapeInputSelected 7 #define X_ShapeGetRectangles 8 typedef struct _ShapeQueryVersion { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeQueryVersion */ CARD16 length; } xShapeQueryVersionReq; #define sz_xShapeQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of SHAPE protocol */ CARD16 minorVersion; /* minor version of SHAPE protocol */ CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xShapeQueryVersionReply; #define sz_xShapeQueryVersionReply 32 typedef struct _ShapeRectangles { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeRectangles */ CARD16 length; CARD8 op; /* Set, ... */ CARD8 destKind; /* ShapeBounding or ShapeClip */ CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */ CARD8 pad0; /* not used */ Window dest; INT16 xOff; INT16 yOff; } xShapeRectanglesReq; /* followed by xRects */ #define sz_xShapeRectanglesReq 16 typedef struct _ShapeMask { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeMask */ CARD16 length; CARD8 op; /* Set, ... */ CARD8 destKind; /* ShapeBounding or ShapeClip */ CARD16 junk; /* not used */ Window dest; INT16 xOff; INT16 yOff; CARD32 src; /* 1 bit pixmap */ } xShapeMaskReq; #define sz_xShapeMaskReq 20 typedef struct _ShapeCombine { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeCombine */ CARD16 length; CARD8 op; /* Set, ... */ CARD8 destKind; /* ShapeBounding or ShapeClip */ CARD8 srcKind; /* ShapeBounding or ShapeClip */ CARD8 junk; /* not used */ Window dest; INT16 xOff; INT16 yOff; Window src; } xShapeCombineReq; #define sz_xShapeCombineReq 20 typedef struct _ShapeOffset { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeOffset */ CARD16 length; CARD8 destKind; /* ShapeBounding or ShapeClip */ CARD8 junk1; /* not used */ CARD16 junk2; /* not used */ Window dest; INT16 xOff; INT16 yOff; } xShapeOffsetReq; #define sz_xShapeOffsetReq 16 typedef struct _ShapeQueryExtents { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeQueryExtents */ CARD16 length; Window window; } xShapeQueryExtentsReq; #define sz_xShapeQueryExtentsReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD8 boundingShaped; /* window has bounding shape */ CARD8 clipShaped; /* window has clip shape */ CARD16 unused1; INT16 xBoundingShape; /* extents of bounding shape */ INT16 yBoundingShape; CARD16 widthBoundingShape; CARD16 heightBoundingShape; INT16 xClipShape; /* extents of clip shape */ INT16 yClipShape; CARD16 widthClipShape; CARD16 heightClipShape; CARD32 pad1; } xShapeQueryExtentsReply; #define sz_xShapeQueryExtentsReply 32 typedef struct _ShapeSelectInput { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeSelectInput */ CARD16 length; Window window; BYTE enable; /* xTrue -> send events */ BYTE pad1; CARD16 pad2; } xShapeSelectInputReq; #define sz_xShapeSelectInputReq 12 typedef struct _ShapeNotify { BYTE type; /* always eventBase + ShapeNotify */ BYTE kind; /* either ShapeBounding or ShapeClip */ CARD16 sequenceNumber; Window window; INT16 x; INT16 y; /* extents of new shape */ CARD16 width; CARD16 height; Time time; /* time of change */ BYTE shaped; /* set when a shape actual exists */ BYTE pad0; CARD16 pad1; CARD32 pad2; CARD32 pad3; } xShapeNotifyEvent; #define sz_xShapeNotifyEvent 32 typedef struct _ShapeInputSelected { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeInputSelected */ CARD16 length; Window window; } xShapeInputSelectedReq; #define sz_xShapeInputSelectedReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 enabled; /* current status */ CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD32 pad1; /* unused */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xShapeInputSelectedReply; #define sz_xShapeInputSelectedReply 32 typedef struct _ShapeGetRectangles { CARD8 reqType; /* always ShapeReqCode */ CARD8 shapeReqType; /* always X_ShapeGetRectangles */ CARD16 length; Window window; CARD8 kind; /* ShapeBounding or ShapeClip */ CARD8 junk1; CARD16 junk2; } xShapeGetRectanglesReq; #define sz_xShapeGetRectanglesReq 12 typedef struct { BYTE type; /* X_Reply */ CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */ CARD16 sequenceNumber; CARD32 length; /* not zero */ CARD32 nrects; /* number of rectangles */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xShapeGetRectanglesReply; /* followed by xRectangles */ #define sz_xShapeGetRectanglesReply 32 #undef Window #undef Time #endif /* _SHAPEPROTO_H_ */ PKZ\qqX11/extensions/xf86dga.hnu[#ifdef _XF86DGA_SERVER_ #warning "xf86dga.h is obsolete and may be removed in the future." #warning "include instead." #include #else #warning "xf86dga.h is obsolete and may be removed in the future." #warning "include instead." #include #endif PKZyX11/extensions/EVI.hnu[/************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _EVI_H_ #define _EVI_H_ #define XEVI_TRANSPARENCY_NONE 0 #define XEVI_TRANSPARENCY_PIXEL 1 #define XEVI_TRANSPARENCY_MASK 2 #define EVINAME "Extended-Visual-Information" #define XEVI_MAJOR_VERSION 1 /* current version numbers */ #define XEVI_MINOR_VERSION 0 #endif PKZ 9d11X11/extensions/xfixesproto.hnu[/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _XFIXESPROTO_H_ #define _XFIXESPROTO_H_ #include #include #include #define Window CARD32 #define Drawable CARD32 #define Font CARD32 #define Pixmap CARD32 #define Cursor CARD32 #define Colormap CARD32 #define GContext CARD32 #define Atom CARD32 #define VisualID CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define Picture CARD32 /*************** Version 1 ******************/ typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; } xXFixesReq; /* * requests and replies */ typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xXFixesQueryVersionReq; #define sz_xXFixesQueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXFixesQueryVersionReply; #define sz_xXFixesQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; BYTE mode; /* SetModeInsert/SetModeDelete*/ BYTE target; /* SaveSetNearest/SaveSetRoot*/ BYTE map; /* SaveSetMap/SaveSetUnmap */ BYTE pad1; Window window; } xXFixesChangeSaveSetReq; #define sz_xXFixesChangeSaveSetReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Window window; Atom selection; CARD32 eventMask; } xXFixesSelectSelectionInputReq; #define sz_xXFixesSelectSelectionInputReq 16 typedef struct { CARD8 type; CARD8 subtype; CARD16 sequenceNumber; Window window; Window owner; Atom selection; Time timestamp; Time selectionTimestamp; CARD32 pad2; CARD32 pad3; } xXFixesSelectionNotifyEvent; typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Window window; CARD32 eventMask; } xXFixesSelectCursorInputReq; #define sz_xXFixesSelectCursorInputReq 12 typedef struct { CARD8 type; CARD8 subtype; CARD16 sequenceNumber; Window window; CARD32 cursorSerial; Time timestamp; Atom name; /* Version 2 */ CARD32 pad1; CARD32 pad2; CARD32 pad3; } xXFixesCursorNotifyEvent; typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; } xXFixesGetCursorImageReq; #define sz_xXFixesGetCursorImageReq 4 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; INT16 x; INT16 y; CARD16 width; CARD16 height; CARD16 xhot; CARD16 yhot; CARD32 cursorSerial; CARD32 pad2; CARD32 pad3; } xXFixesGetCursorImageReply; #define sz_xXFixesGetCursorImageReply 32 /*************** Version 2 ******************/ #define Region CARD32 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; /* LISTofRECTANGLE */ } xXFixesCreateRegionReq; #define sz_xXFixesCreateRegionReq 8 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; Pixmap bitmap; } xXFixesCreateRegionFromBitmapReq; #define sz_xXFixesCreateRegionFromBitmapReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; Window window; CARD8 kind; CARD8 pad1; CARD16 pad2; } xXFixesCreateRegionFromWindowReq; #define sz_xXFixesCreateRegionFromWindowReq 16 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; GContext gc; } xXFixesCreateRegionFromGCReq; #define sz_xXFixesCreateRegionFromGCReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; Picture picture; } xXFixesCreateRegionFromPictureReq; #define sz_xXFixesCreateRegionFromPictureReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; } xXFixesDestroyRegionReq; #define sz_xXFixesDestroyRegionReq 8 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; /* LISTofRECTANGLE */ } xXFixesSetRegionReq; #define sz_xXFixesSetRegionReq 8 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region source; Region destination; } xXFixesCopyRegionReq; #define sz_xXFixesCopyRegionReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region source1; Region source2; Region destination; } xXFixesCombineRegionReq, xXFixesUnionRegionReq, xXFixesIntersectRegionReq, xXFixesSubtractRegionReq; #define sz_xXFixesCombineRegionReq 16 #define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq #define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq #define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region source; INT16 x, y; CARD16 width, height; Region destination; } xXFixesInvertRegionReq; #define sz_xXFixesInvertRegionReq 20 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; INT16 dx, dy; } xXFixesTranslateRegionReq; #define sz_xXFixesTranslateRegionReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region source; Region destination; } xXFixesRegionExtentsReq; #define sz_xXFixesRegionExtentsReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region region; } xXFixesFetchRegionReq; #define sz_xXFixesFetchRegionReq 8 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; INT16 x, y; CARD16 width, height; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXFixesFetchRegionReply; #define sz_xXFixesFetchRegionReply 32 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; GContext gc; Region region; INT16 xOrigin, yOrigin; } xXFixesSetGCClipRegionReq; #define sz_xXFixesSetGCClipRegionReq 16 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Window dest; BYTE destKind; CARD8 pad1; CARD16 pad2; INT16 xOff, yOff; Region region; } xXFixesSetWindowShapeRegionReq; #define sz_xXFixesSetWindowShapeRegionReq 20 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Picture picture; Region region; INT16 xOrigin, yOrigin; } xXFixesSetPictureClipRegionReq; #define sz_xXFixesSetPictureClipRegionReq 16 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Cursor cursor; CARD16 nbytes; CARD16 pad; } xXFixesSetCursorNameReq; #define sz_xXFixesSetCursorNameReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Cursor cursor; } xXFixesGetCursorNameReq; #define sz_xXFixesGetCursorNameReq 8 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; Atom atom; CARD16 nbytes; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXFixesGetCursorNameReply; #define sz_xXFixesGetCursorNameReply 32 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; } xXFixesGetCursorImageAndNameReq; #define sz_xXFixesGetCursorImageAndNameReq 4 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; INT16 x; INT16 y; CARD16 width; CARD16 height; CARD16 xhot; CARD16 yhot; CARD32 cursorSerial; Atom cursorName; CARD16 nbytes; CARD16 pad; } xXFixesGetCursorImageAndNameReply; #define sz_xXFixesGetCursorImageAndNameReply 32 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Cursor source; Cursor destination; } xXFixesChangeCursorReq; #define sz_xXFixesChangeCursorReq 12 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Cursor source; CARD16 nbytes; CARD16 pad; } xXFixesChangeCursorByNameReq; #define sz_xXFixesChangeCursorByNameReq 12 /*************** Version 3 ******************/ typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Region source; Region destination; CARD16 left; CARD16 right; CARD16 top; CARD16 bottom; } xXFixesExpandRegionReq; #define sz_xXFixesExpandRegionReq 20 /*************** Version 4.0 ******************/ typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Window window; } xXFixesHideCursorReq; #define sz_xXFixesHideCursorReq sizeof(xXFixesHideCursorReq) typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Window window; } xXFixesShowCursorReq; #define sz_xXFixesShowCursorReq sizeof(xXFixesShowCursorReq) /*************** Version 5.0 ******************/ #define Barrier CARD32 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Barrier barrier; Window window; INT16 x1; INT16 y1; INT16 x2; INT16 y2; CARD32 directions; CARD16 pad; CARD16 num_devices; /* array of CARD16 devices */ } xXFixesCreatePointerBarrierReq; #define sz_xXFixesCreatePointerBarrierReq 28 typedef struct { CARD8 reqType; CARD8 xfixesReqType; CARD16 length; Barrier barrier; } xXFixesDestroyPointerBarrierReq; #define sz_xXFixesDestroyPointerBarrierReq 8 #undef Barrier #undef Region #undef Picture #undef Window #undef Drawable #undef Font #undef Pixmap #undef Cursor #undef Colormap #undef GContext #undef Atom #undef VisualID #undef Time #undef KeyCode #undef KeySym #endif /* _XFIXESPROTO_H_ */ PKZmmX11/extensions/shm.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ********************************************************/ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #ifndef _SHM_H_ #define _SHM_H_ #define SHMNAME "MIT-SHM" #define SHM_MAJOR_VERSION 1 /* current version numbers */ #define SHM_MINOR_VERSION 2 #define ShmCompletion 0 #define ShmNumberEvents (ShmCompletion + 1) #define BadShmSeg 0 #define ShmNumberErrors (BadShmSeg + 1) #endif /* _SHM_H_ */ PKZ\3/X11/extensions/xf86bigfont.hnu[/* * Declarations for the BIGFONT extension. * * Copyright (c) 1999-2000 Bruno Haible * Copyright (c) 1999-2000 The XFree86 Project, Inc. */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ #ifndef _XF86BIGFONT_H_ #define _XF86BIGFONT_H_ #define X_XF86BigfontQueryVersion 0 #define X_XF86BigfontQueryFont 1 #define XF86BigfontNumberEvents 0 #define XF86BigfontNumberErrors 0 #endif /* _XF86BIGFONT_H_ */ PKZ`J3n3nX11/extensions/XKB.hnu[/************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _XKB_H_ #define _XKB_H_ /* * XKB request codes, used in: * - xkbReqType field of all requests * - requestMinor field of some events */ #define X_kbUseExtension 0 #define X_kbSelectEvents 1 #define X_kbBell 3 #define X_kbGetState 4 #define X_kbLatchLockState 5 #define X_kbGetControls 6 #define X_kbSetControls 7 #define X_kbGetMap 8 #define X_kbSetMap 9 #define X_kbGetCompatMap 10 #define X_kbSetCompatMap 11 #define X_kbGetIndicatorState 12 #define X_kbGetIndicatorMap 13 #define X_kbSetIndicatorMap 14 #define X_kbGetNamedIndicator 15 #define X_kbSetNamedIndicator 16 #define X_kbGetNames 17 #define X_kbSetNames 18 #define X_kbGetGeometry 19 #define X_kbSetGeometry 20 #define X_kbPerClientFlags 21 #define X_kbListComponents 22 #define X_kbGetKbdByName 23 #define X_kbGetDeviceInfo 24 #define X_kbSetDeviceInfo 25 #define X_kbSetDebuggingFlags 101 /* * In the X sense, XKB reports only one event. * The type field of all XKB events is XkbEventCode */ #define XkbEventCode 0 #define XkbNumberEvents (XkbEventCode+1) /* * XKB has a minor event code so it can use one X event code for * multiple purposes. * - reported in the xkbType field of all XKB events. * - XkbSelectEventDetails: Indicates the event for which event details * are being changed */ #define XkbNewKeyboardNotify 0 #define XkbMapNotify 1 #define XkbStateNotify 2 #define XkbControlsNotify 3 #define XkbIndicatorStateNotify 4 #define XkbIndicatorMapNotify 5 #define XkbNamesNotify 6 #define XkbCompatMapNotify 7 #define XkbBellNotify 8 #define XkbActionMessage 9 #define XkbAccessXNotify 10 #define XkbExtensionDeviceNotify 11 /* * Event Mask: * - XkbSelectEvents: Specifies event interest. */ #define XkbNewKeyboardNotifyMask (1L << 0) #define XkbMapNotifyMask (1L << 1) #define XkbStateNotifyMask (1L << 2) #define XkbControlsNotifyMask (1L << 3) #define XkbIndicatorStateNotifyMask (1L << 4) #define XkbIndicatorMapNotifyMask (1L << 5) #define XkbNamesNotifyMask (1L << 6) #define XkbCompatMapNotifyMask (1L << 7) #define XkbBellNotifyMask (1L << 8) #define XkbActionMessageMask (1L << 9) #define XkbAccessXNotifyMask (1L << 10) #define XkbExtensionDeviceNotifyMask (1L << 11) #define XkbAllEventsMask (0xFFF) /* * NewKeyboardNotify event details: */ #define XkbNKN_KeycodesMask (1L << 0) #define XkbNKN_GeometryMask (1L << 1) #define XkbNKN_DeviceIDMask (1L << 2) #define XkbAllNewKeyboardEventsMask (0x7) /* * AccessXNotify event types: * - The 'what' field of AccessXNotify events reports the * reason that the event was generated. */ #define XkbAXN_SKPress 0 #define XkbAXN_SKAccept 1 #define XkbAXN_SKReject 2 #define XkbAXN_SKRelease 3 #define XkbAXN_BKAccept 4 #define XkbAXN_BKReject 5 #define XkbAXN_AXKWarning 6 /* * AccessXNotify details: * - Used as an event detail mask to limit the conditions under which * AccessXNotify events are reported */ #define XkbAXN_SKPressMask (1L << 0) #define XkbAXN_SKAcceptMask (1L << 1) #define XkbAXN_SKRejectMask (1L << 2) #define XkbAXN_SKReleaseMask (1L << 3) #define XkbAXN_BKAcceptMask (1L << 4) #define XkbAXN_BKRejectMask (1L << 5) #define XkbAXN_AXKWarningMask (1L << 6) #define XkbAllAccessXEventsMask (0x7f) /* * Miscellaneous event details: * - event detail masks for assorted events that don't reall * have any details. */ #define XkbAllStateEventsMask XkbAllStateComponentsMask #define XkbAllMapEventsMask XkbAllMapComponentsMask #define XkbAllControlEventsMask XkbAllControlsMask #define XkbAllIndicatorEventsMask XkbAllIndicatorsMask #define XkbAllNameEventsMask XkbAllNamesMask #define XkbAllCompatMapEventsMask XkbAllCompatMask #define XkbAllBellEventsMask (1L << 0) #define XkbAllActionMessagesMask (1L << 0) /* * XKB reports one error: BadKeyboard * A further reason for the error is encoded into to most significant * byte of the resourceID for the error: * XkbErr_BadDevice - the device in question was not found * XkbErr_BadClass - the device was found but it doesn't belong to * the appropriate class. * XkbErr_BadId - the device was found and belongs to the right * class, but not feedback with a matching id was * found. * The low byte of the resourceID for this error contains the device * id, class specifier or feedback id that failed. */ #define XkbKeyboard 0 #define XkbNumberErrors 1 #define XkbErr_BadDevice 0xff #define XkbErr_BadClass 0xfe #define XkbErr_BadId 0xfd /* * Keyboard Components Mask: * - Specifies the components that follow a GetKeyboardByNameReply */ #define XkbClientMapMask (1L << 0) #define XkbServerMapMask (1L << 1) #define XkbCompatMapMask (1L << 2) #define XkbIndicatorMapMask (1L << 3) #define XkbNamesMask (1L << 4) #define XkbGeometryMask (1L << 5) #define XkbControlsMask (1L << 6) #define XkbAllComponentsMask (0x7f) /* * State detail mask: * - The 'changed' field of StateNotify events reports which of * the keyboard state components have changed. * - Used as an event detail mask to limit the conditions under * which StateNotify events are reported. */ #define XkbModifierStateMask (1L << 0) #define XkbModifierBaseMask (1L << 1) #define XkbModifierLatchMask (1L << 2) #define XkbModifierLockMask (1L << 3) #define XkbGroupStateMask (1L << 4) #define XkbGroupBaseMask (1L << 5) #define XkbGroupLatchMask (1L << 6) #define XkbGroupLockMask (1L << 7) #define XkbCompatStateMask (1L << 8) #define XkbGrabModsMask (1L << 9) #define XkbCompatGrabModsMask (1L << 10) #define XkbLookupModsMask (1L << 11) #define XkbCompatLookupModsMask (1L << 12) #define XkbPointerButtonMask (1L << 13) #define XkbAllStateComponentsMask (0x3fff) /* * Controls detail masks: * The controls specified in XkbAllControlsMask: * - The 'changed' field of ControlsNotify events reports which of * the keyboard controls have changed. * - The 'changeControls' field of the SetControls request specifies * the controls for which values are to be changed. * - Used as an event detail mask to limit the conditions under * which ControlsNotify events are reported. * * The controls specified in the XkbAllBooleanCtrlsMask: * - The 'enabledControls' field of ControlsNotify events reports the * current status of the boolean controls. * - The 'enabledControlsChanges' field of ControlsNotify events reports * any boolean controls that have been turned on or off. * - The 'affectEnabledControls' and 'enabledControls' fields of the * kbSetControls request change the set of enabled controls. * - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of * an XkbControlsRec specify the controls to be changed if the keyboard * times out and the values to which they should be changed. * - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags * request specifies the specify the controls to be reset when the * client exits and the values to which they should be reset. * - The 'ctrls' field of an indicator map specifies the controls * that drive the indicator. * - Specifies the boolean controls affected by the SetControls and * LockControls key actions. */ #define XkbRepeatKeysMask (1L << 0) #define XkbSlowKeysMask (1L << 1) #define XkbBounceKeysMask (1L << 2) #define XkbStickyKeysMask (1L << 3) #define XkbMouseKeysMask (1L << 4) #define XkbMouseKeysAccelMask (1L << 5) #define XkbAccessXKeysMask (1L << 6) #define XkbAccessXTimeoutMask (1L << 7) #define XkbAccessXFeedbackMask (1L << 8) #define XkbAudibleBellMask (1L << 9) #define XkbOverlay1Mask (1L << 10) #define XkbOverlay2Mask (1L << 11) #define XkbIgnoreGroupLockMask (1L << 12) #define XkbGroupsWrapMask (1L << 27) #define XkbInternalModsMask (1L << 28) #define XkbIgnoreLockModsMask (1L << 29) #define XkbPerKeyRepeatMask (1L << 30) #define XkbControlsEnabledMask (1L << 31) #define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask) #define XkbAllBooleanCtrlsMask (0x00001FFF) #define XkbAllControlsMask (0xF8001FFF) #define XkbAllControlEventsMask XkbAllControlsMask /* * AccessX Options Mask * - The 'accessXOptions' field of an XkbControlsRec specifies the * AccessX options that are currently in effect. * - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues' * fields of an XkbControlsRec specify the Access X options to be * changed if the keyboard times out and the values to which they * should be changed. */ #define XkbAX_SKPressFBMask (1L << 0) #define XkbAX_SKAcceptFBMask (1L << 1) #define XkbAX_FeatureFBMask (1L << 2) #define XkbAX_SlowWarnFBMask (1L << 3) #define XkbAX_IndicatorFBMask (1L << 4) #define XkbAX_StickyKeysFBMask (1L << 5) #define XkbAX_TwoKeysMask (1L << 6) #define XkbAX_LatchToLockMask (1L << 7) #define XkbAX_SKReleaseFBMask (1L << 8) #define XkbAX_SKRejectFBMask (1L << 9) #define XkbAX_BKRejectFBMask (1L << 10) #define XkbAX_DumbBellFBMask (1L << 11) #define XkbAX_FBOptionsMask (0xF3F) #define XkbAX_SKOptionsMask (0x0C0) #define XkbAX_AllOptionsMask (0xFFF) /* * XkbUseCoreKbd is used to specify the core keyboard without having * to look up its X input extension identifier. * XkbUseCorePtr is used to specify the core pointer without having * to look up its X input extension identifier. * XkbDfltXIClass is used to specify "don't care" any place that the * XKB protocol is looking for an X Input Extension * device class. * XkbDfltXIId is used to specify "don't care" any place that the * XKB protocol is looking for an X Input Extension * feedback identifier. * XkbAllXIClasses is used to get information about all device indicators, * whether they're part of the indicator feedback class * or the keyboard feedback class. * XkbAllXIIds is used to get information about all device indicator * feedbacks without having to list them. * XkbXINone is used to indicate that no class or id has been specified. * XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs * XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells * XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device * XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class * XkbExplicitXIId(c) True if 'i' explicitly specifies a device id * XkbSingleXIClass(c) True if 'c' specifies exactly one device class, * including the default. * XkbSingleXIId(i) True if 'i' specifies exactly one device * identifier, including the default. */ #define XkbUseCoreKbd 0x0100 #define XkbUseCorePtr 0x0200 #define XkbDfltXIClass 0x0300 #define XkbDfltXIId 0x0400 #define XkbAllXIClasses 0x0500 #define XkbAllXIIds 0x0600 #define XkbXINone 0xff00 #define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\ ((c)==LedFeedbackClass)||\ ((c)==XkbDfltXIClass)||\ ((c)==XkbAllXIClasses)) #define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\ ((c)==BellFeedbackClass)||\ ((c)==XkbDfltXIClass)||\ ((c)==XkbAllXIClasses)) #define XkbExplicitXIDevice(c) (((c)&(~0xff))==0) #define XkbExplicitXIClass(c) (((c)&(~0xff))==0) #define XkbExplicitXIId(c) (((c)&(~0xff))==0) #define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass)) #define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId)) #define XkbNoModifier 0xff #define XkbNoShiftLevel 0xff #define XkbNoShape 0xff #define XkbNoIndicator 0xff #define XkbNoModifierMask 0 #define XkbAllModifiersMask 0xff #define XkbAllVirtualModsMask 0xffff #define XkbNumKbdGroups 4 #define XkbMaxKbdGroup (XkbNumKbdGroups-1) #define XkbMaxMouseKeysBtn 4 /* * Group Index and Mask: * - Indices into the kt_index array of a key type. * - Mask specifies types to be changed for XkbChangeTypesOfKey */ #define XkbGroup1Index 0 #define XkbGroup2Index 1 #define XkbGroup3Index 2 #define XkbGroup4Index 3 #define XkbAnyGroup 254 #define XkbAllGroups 255 #define XkbGroup1Mask (1<<0) #define XkbGroup2Mask (1<<1) #define XkbGroup3Mask (1<<2) #define XkbGroup4Mask (1<<3) #define XkbAnyGroupMask (1<<7) #define XkbAllGroupsMask (0xf) /* * BuildCoreState: Given a keyboard group and a modifier state, * construct the value to be reported an event. * GroupForCoreState: Given the state reported in an event, * determine the keyboard group. * IsLegalGroup: Returns TRUE if 'g' is a valid group index. */ #define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff)) #define XkbGroupForCoreState(s) (((s)>>13)&0x3) #define XkbIsLegalGroup(g) (((g)>=0)&&((g)type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods)) #define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup)) #define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt)) /* * Key Behavior Qualifier: * KB_Permanent indicates that the behavior describes an unalterable * characteristic of the keyboard, not an XKB software-simulation of * the listed behavior. * Key Behavior Types: * Specifies the behavior of the underlying key. */ #define XkbKB_Permanent 0x80 #define XkbKB_OpMask 0x7f #define XkbKB_Default 0x00 #define XkbKB_Lock 0x01 #define XkbKB_RadioGroup 0x02 #define XkbKB_Overlay1 0x03 #define XkbKB_Overlay2 0x04 #define XkbKB_RGAllowNone 0x80 /* * Various macros which describe the range of legal keycodes. */ #define XkbMinLegalKeyCode 8 #define XkbMaxLegalKeyCode 255 #define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1) #define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8) /* Seems kinda silly to check that an unsigned char is <= 255... */ #define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode) /* * Assorted constants and limits. */ #define XkbNumModifiers 8 #define XkbNumVirtualMods 16 #define XkbNumIndicators 32 #define XkbAllIndicatorsMask (0xffffffff) #define XkbMaxRadioGroups 32 #define XkbAllRadioGroupsMask (0xffffffff) #define XkbMaxShiftLevel 63 #define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups) #define XkbRGMaxMembers 12 #define XkbActionMessageLength 6 #define XkbKeyNameLength 4 #define XkbMaxRedirectCount 8 #define XkbGeomPtsPerMM 10 #define XkbGeomMaxColors 32 #define XkbGeomMaxLabelColors 3 #define XkbGeomMaxPriority 255 /* * Key Type index and mask for the four standard key types. */ #define XkbOneLevelIndex 0 #define XkbTwoLevelIndex 1 #define XkbAlphabeticIndex 2 #define XkbKeypadIndex 3 #define XkbLastRequiredType XkbKeypadIndex #define XkbNumRequiredTypes (XkbLastRequiredType+1) #define XkbMaxKeyTypes 255 #define XkbOneLevelMask (1<<0) #define XkbTwoLevelMask (1<<1) #define XkbAlphabeticMask (1<<2) #define XkbKeypadMask (1<<3) #define XkbAllRequiredTypes (0xf) #define XkbShiftLevel(n) ((n)-1) #define XkbShiftLevelMask(n) (1<<((n)-1)) /* * Extension name and version information */ #define XkbName "XKEYBOARD" #define XkbMajorVersion 1 #define XkbMinorVersion 0 /* * Explicit map components: * - Used in the 'explicit' field of an XkbServerMap. Specifies * the keyboard components that should _not_ be updated automatically * in response to core protocol keyboard mapping requests. */ #define XkbExplicitKeyTypesMask (0x0f) #define XkbExplicitKeyType1Mask (1<<0) #define XkbExplicitKeyType2Mask (1<<1) #define XkbExplicitKeyType3Mask (1<<2) #define XkbExplicitKeyType4Mask (1<<3) #define XkbExplicitInterpretMask (1<<4) #define XkbExplicitAutoRepeatMask (1<<5) #define XkbExplicitBehaviorMask (1<<6) #define XkbExplicitVModMapMask (1<<7) #define XkbAllExplicitMask (0xff) /* * Map components masks: * Those in AllMapComponentsMask: * - Specifies the individual fields to be loaded or changed for the * GetMap and SetMap requests. * Those in ClientInfoMask: * - Specifies the components to be allocated by XkbAllocClientMap. * Those in ServerInfoMask: * - Specifies the components to be allocated by XkbAllocServerMap. */ #define XkbKeyTypesMask (1<<0) #define XkbKeySymsMask (1<<1) #define XkbModifierMapMask (1<<2) #define XkbExplicitComponentsMask (1<<3) #define XkbKeyActionsMask (1<<4) #define XkbKeyBehaviorsMask (1<<5) #define XkbVirtualModsMask (1<<6) #define XkbVirtualModMapMask (1<<7) #define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask) #define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask) #define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask) /* * Symbol interpretations flags: * - Used in the flags field of a symbol interpretation */ #define XkbSI_AutoRepeat (1<<0) #define XkbSI_LockingKey (1<<1) /* * Symbol interpretations match specification: * - Used in the match field of a symbol interpretation to specify * the conditions under which an interpretation is used. */ #define XkbSI_LevelOneOnly (0x80) #define XkbSI_OpMask (0x7f) #define XkbSI_NoneOf (0) #define XkbSI_AnyOfOrNone (1) #define XkbSI_AnyOf (2) #define XkbSI_AllOf (3) #define XkbSI_Exactly (4) /* * Indicator map flags: * - Used in the flags field of an indicator map to indicate the * conditions under which and indicator can be changed and the * effects of changing the indicator. */ #define XkbIM_NoExplicit (1L << 7) #define XkbIM_NoAutomatic (1L << 6) #define XkbIM_LEDDrivesKB (1L << 5) /* * Indicator map component specifications: * - Used by the 'which_groups' and 'which_mods' fields of an indicator * map to specify which keyboard components should be used to drive * the indicator. */ #define XkbIM_UseBase (1L << 0) #define XkbIM_UseLatched (1L << 1) #define XkbIM_UseLocked (1L << 2) #define XkbIM_UseEffective (1L << 3) #define XkbIM_UseCompat (1L << 4) #define XkbIM_UseNone 0 #define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\ |XkbIM_UseEffective) #define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat) /* * Compatibility Map Components: * - Specifies the components to be allocated in XkbAllocCompatMap. */ #define XkbSymInterpMask (1<<0) #define XkbGroupCompatMask (1<<1) #define XkbAllCompatMask (0x3) /* * Names component mask: * - Specifies the names to be loaded or changed for the GetNames and * SetNames requests. * - Specifies the names that have changed in a NamesNotify event. * - Specifies the names components to be allocated by XkbAllocNames. */ #define XkbKeycodesNameMask (1<<0) #define XkbGeometryNameMask (1<<1) #define XkbSymbolsNameMask (1<<2) #define XkbPhysSymbolsNameMask (1<<3) #define XkbTypesNameMask (1<<4) #define XkbCompatNameMask (1<<5) #define XkbKeyTypeNamesMask (1<<6) #define XkbKTLevelNamesMask (1<<7) #define XkbIndicatorNamesMask (1<<8) #define XkbKeyNamesMask (1<<9) #define XkbKeyAliasesMask (1<<10) #define XkbVirtualModNamesMask (1<<11) #define XkbGroupNamesMask (1<<12) #define XkbRGNamesMask (1<<13) #define XkbComponentNamesMask (0x3f) #define XkbAllNamesMask (0x3fff) /* * GetByName components: * - Specifies desired or necessary components to GetKbdByName request. * - Reports the components that were found in a GetKbdByNameReply */ #define XkbGBN_TypesMask (1L << 0) #define XkbGBN_CompatMapMask (1L << 1) #define XkbGBN_ClientSymbolsMask (1L << 2) #define XkbGBN_ServerSymbolsMask (1L << 3) #define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask) #define XkbGBN_IndicatorMapMask (1L << 4) #define XkbGBN_KeyNamesMask (1L << 5) #define XkbGBN_GeometryMask (1L << 6) #define XkbGBN_OtherNamesMask (1L << 7) #define XkbGBN_AllComponentsMask (0xff) /* * ListComponents flags */ #define XkbLC_Hidden (1L << 0) #define XkbLC_Default (1L << 1) #define XkbLC_Partial (1L << 2) #define XkbLC_AlphanumericKeys (1L << 8) #define XkbLC_ModifierKeys (1L << 9) #define XkbLC_KeypadKeys (1L << 10) #define XkbLC_FunctionKeys (1L << 11) #define XkbLC_AlternateGroup (1L << 12) /* * X Input Extension Interactions * - Specifies the possible interactions between XKB and the X input * extension * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo) * XKB information about an extension device. * - Reports the list of supported optional features in the reply to * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event. * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify * events to indicate an attempt to use an unsupported feature. */ #define XkbXI_KeyboardsMask (1L << 0) #define XkbXI_ButtonActionsMask (1L << 1) #define XkbXI_IndicatorNamesMask (1L << 2) #define XkbXI_IndicatorMapsMask (1L << 3) #define XkbXI_IndicatorStateMask (1L << 4) #define XkbXI_UnsupportedFeatureMask (1L << 15) #define XkbXI_AllFeaturesMask (0x001f) #define XkbXI_AllDeviceFeaturesMask (0x001e) #define XkbXI_IndicatorsMask (0x001c) #define XkbAllExtensionDeviceEventsMask (0x801f) /* * Per-Client Flags: * - Specifies flags to be changed by the PerClientFlags request. */ #define XkbPCF_DetectableAutoRepeatMask (1L << 0) #define XkbPCF_GrabsUseXKBStateMask (1L << 1) #define XkbPCF_AutoResetControlsMask (1L << 2) #define XkbPCF_LookupStateWhenGrabbed (1L << 3) #define XkbPCF_SendEventUsesXKBState (1L << 4) #define XkbPCF_AllFlagsMask (0x1F) /* * Debugging flags and controls */ #define XkbDF_DisableLocks (1<<0) #endif /* _XKB_H_ */ PKZMX11/extensions/shapestr.hnu[#ifndef _SHAPESTR_H_ #define _SHAPESTR_H_ #warning "shapestr.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include #endif /* _SHAPESTR_H_ */ PKZ{M8.).)X11/extensions/XI2.hnu[/* * Copyright © 2009 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * */ #ifndef _XI2_H_ #define _XI2_H_ #define XInput_2_0 7 /* DO NOT ADD TO THIS LIST. These are libXi-specific defines. See commit libXi-1.4.2-21-ge8531dd */ #define XI_2_Major 2 #define XI_2_Minor 3 /* Property event flags */ #define XIPropertyDeleted 0 #define XIPropertyCreated 1 #define XIPropertyModified 2 /* Property modes */ #define XIPropModeReplace 0 #define XIPropModePrepend 1 #define XIPropModeAppend 2 /* Special property type used for XIGetProperty */ #define XIAnyPropertyType 0L /* Enter/Leave and Focus In/Out modes */ #define XINotifyNormal 0 #define XINotifyGrab 1 #define XINotifyUngrab 2 #define XINotifyWhileGrabbed 3 #define XINotifyPassiveGrab 4 #define XINotifyPassiveUngrab 5 /* Enter/Leave and focus In/out detail */ #define XINotifyAncestor 0 #define XINotifyVirtual 1 #define XINotifyInferior 2 #define XINotifyNonlinear 3 #define XINotifyNonlinearVirtual 4 #define XINotifyPointer 5 #define XINotifyPointerRoot 6 #define XINotifyDetailNone 7 /* Grab modes */ #define XIGrabModeSync 0 #define XIGrabModeAsync 1 #define XIGrabModeTouch 2 /* Grab reply status codes */ #define XIGrabSuccess 0 #define XIAlreadyGrabbed 1 #define XIGrabInvalidTime 2 #define XIGrabNotViewable 3 #define XIGrabFrozen 4 /* Grab owner events values */ #define XIOwnerEvents True #define XINoOwnerEvents False /* Passive grab types */ #define XIGrabtypeButton 0 #define XIGrabtypeKeycode 1 #define XIGrabtypeEnter 2 #define XIGrabtypeFocusIn 3 #define XIGrabtypeTouchBegin 4 /* Passive grab modifier */ #define XIAnyModifier (1U << 31) #define XIAnyButton 0 #define XIAnyKeycode 0 /* XIAllowEvents event-modes */ #define XIAsyncDevice 0 #define XISyncDevice 1 #define XIReplayDevice 2 #define XIAsyncPairedDevice 3 #define XIAsyncPair 4 #define XISyncPair 5 #define XIAcceptTouch 6 #define XIRejectTouch 7 /* DeviceChangedEvent change reasons */ #define XISlaveSwitch 1 #define XIDeviceChange 2 /* Hierarchy flags */ #define XIMasterAdded (1 << 0) #define XIMasterRemoved (1 << 1) #define XISlaveAdded (1 << 2) #define XISlaveRemoved (1 << 3) #define XISlaveAttached (1 << 4) #define XISlaveDetached (1 << 5) #define XIDeviceEnabled (1 << 6) #define XIDeviceDisabled (1 << 7) /* ChangeHierarchy constants */ #define XIAddMaster 1 #define XIRemoveMaster 2 #define XIAttachSlave 3 #define XIDetachSlave 4 #define XIAttachToMaster 1 #define XIFloating 2 /* Valuator modes */ #define XIModeRelative 0 #define XIModeAbsolute 1 /* Device types */ #define XIMasterPointer 1 #define XIMasterKeyboard 2 #define XISlavePointer 3 #define XISlaveKeyboard 4 #define XIFloatingSlave 5 /* Device classes: classes that are not identical to Xi 1.x classes must be * numbered starting from 8. */ #define XIKeyClass 0 #define XIButtonClass 1 #define XIValuatorClass 2 #define XIScrollClass 3 #define XITouchClass 8 /* Scroll class types */ #define XIScrollTypeVertical 1 #define XIScrollTypeHorizontal 2 /* Scroll class flags */ #define XIScrollFlagNoEmulation (1 << 0) #define XIScrollFlagPreferred (1 << 1) /* Device event flags (common) */ /* Device event flags (key events only) */ #define XIKeyRepeat (1 << 16) /* Device event flags (pointer events only) */ #define XIPointerEmulated (1 << 16) /* Device event flags (touch events only) */ #define XITouchPendingEnd (1 << 16) #define XITouchEmulatingPointer (1 << 17) /* Barrier event flags */ #define XIBarrierPointerReleased (1 << 0) #define XIBarrierDeviceIsGrabbed (1 << 1) /* Touch modes */ #define XIDirectTouch 1 #define XIDependentTouch 2 /* XI2 event mask macros */ #define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7))) #define XIClearMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] &= ~(1 << ((event) & 7))) #define XIMaskIsSet(ptr, event) (((unsigned char*)(ptr))[(event)>>3] & (1 << ((event) & 7))) #define XIMaskLen(event) (((event) >> 3) + 1) /* Fake device ID's for event selection */ #define XIAllDevices 0 #define XIAllMasterDevices 1 /* Event types */ #define XI_DeviceChanged 1 #define XI_KeyPress 2 #define XI_KeyRelease 3 #define XI_ButtonPress 4 #define XI_ButtonRelease 5 #define XI_Motion 6 #define XI_Enter 7 #define XI_Leave 8 #define XI_FocusIn 9 #define XI_FocusOut 10 #define XI_HierarchyChanged 11 #define XI_PropertyEvent 12 #define XI_RawKeyPress 13 #define XI_RawKeyRelease 14 #define XI_RawButtonPress 15 #define XI_RawButtonRelease 16 #define XI_RawMotion 17 #define XI_TouchBegin 18 /* XI 2.2 */ #define XI_TouchUpdate 19 #define XI_TouchEnd 20 #define XI_TouchOwnership 21 #define XI_RawTouchBegin 22 #define XI_RawTouchUpdate 23 #define XI_RawTouchEnd 24 #define XI_BarrierHit 25 /* XI 2.3 */ #define XI_BarrierLeave 26 #define XI_LASTEVENT XI_BarrierLeave /* NOTE: XI2LASTEVENT in xserver/include/inputstr.h must be the same value * as XI_LASTEVENT if the server is supposed to handle masks etc. for this * type of event. */ /* Event masks. * Note: the protocol spec defines a mask to be of (1 << type). Clients are * free to create masks by bitshifting instead of using these defines. */ #define XI_DeviceChangedMask (1 << XI_DeviceChanged) #define XI_KeyPressMask (1 << XI_KeyPress) #define XI_KeyReleaseMask (1 << XI_KeyRelease) #define XI_ButtonPressMask (1 << XI_ButtonPress) #define XI_ButtonReleaseMask (1 << XI_ButtonRelease) #define XI_MotionMask (1 << XI_Motion) #define XI_EnterMask (1 << XI_Enter) #define XI_LeaveMask (1 << XI_Leave) #define XI_FocusInMask (1 << XI_FocusIn) #define XI_FocusOutMask (1 << XI_FocusOut) #define XI_HierarchyChangedMask (1 << XI_HierarchyChanged) #define XI_PropertyEventMask (1 << XI_PropertyEvent) #define XI_RawKeyPressMask (1 << XI_RawKeyPress) #define XI_RawKeyReleaseMask (1 << XI_RawKeyRelease) #define XI_RawButtonPressMask (1 << XI_RawButtonPress) #define XI_RawButtonReleaseMask (1 << XI_RawButtonRelease) #define XI_RawMotionMask (1 << XI_RawMotion) #define XI_TouchBeginMask (1 << XI_TouchBegin) #define XI_TouchEndMask (1 << XI_TouchEnd) #define XI_TouchOwnershipChangedMask (1 << XI_TouchOwnership) #define XI_TouchUpdateMask (1 << XI_TouchUpdate) #define XI_RawTouchBeginMask (1 << XI_RawTouchBegin) #define XI_RawTouchEndMask (1 << XI_RawTouchEnd) #define XI_RawTouchUpdateMask (1 << XI_RawTouchUpdate) #define XI_BarrierHitMask (1 << XI_BarrierHit) #define XI_BarrierLeaveMask (1 << XI_BarrierLeave) #endif /* _XI2_H_ */ PKZѤX11/extensions/ge.hnu[/* * Copyright © 2007-2008 Peter Hutterer * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * Authors: Peter Hutterer, University of South Australia, NICTA * */ #ifndef _GE_H_ #define _GE_H_ #define GE_NAME "Generic Event Extension" #define GE_MAJOR 1 #define GE_MINOR 0 /********************************************************* * * Requests * */ #define X_GEQueryVersion 0 #define GENumberRequests (X_GEQueryVersion + 1) /********************************************************* * * Events * */ #define GENumberEvents 0 /********************************************************* * * Errors * */ #define GENumberErrors 0 #endif /* _GE_H_ */ PKZyX11/extensions/mitmiscproto.hnu[/************************************************************ Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ********************************************************/ /* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ #ifndef _MITMISCPROTO_H_ #define _MITMISCPROTO_H_ #include #define X_MITSetBugMode 0 #define X_MITGetBugMode 1 typedef struct _SetBugMode { CARD8 reqType; /* always MITReqCode */ CARD8 mitReqType; /* always X_MITSetBugMode */ CARD16 length; BOOL onOff; BYTE pad0; CARD16 pad1; } xMITSetBugModeReq; #define sz_xMITSetBugModeReq 8 typedef struct _GetBugMode { CARD8 reqType; /* always MITReqCode */ CARD8 mitReqType; /* always X_MITGetBugMode */ CARD16 length; } xMITGetBugModeReq; #define sz_xMITGetBugModeReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL onOff; CARD16 sequenceNumber; CARD32 length; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xMITGetBugModeReply; #define sz_xMITGetBugModeReply 32 #endif /* _MITMISCPROTO_H_ */ PKZ>X11/extensions/xf86dgaproto.hnu[/* Copyright (c) 1995 Jon Tombs Copyright (c) 1995 XFree86 Inc. */ #ifndef _XF86DGAPROTO_H_ #define _XF86DGAPROTO_H_ #include #include #define XF86DGANAME "XFree86-DGA" #define XDGA_MAJOR_VERSION 2 /* current version numbers */ #define XDGA_MINOR_VERSION 0 typedef struct _XDGAQueryVersion { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_DGAQueryVersion */ CARD16 length; } xXDGAQueryVersionReq; #define sz_xXDGAQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of DGA protocol */ CARD16 minorVersion; /* minor version of DGA protocol */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXDGAQueryVersionReply; #define sz_xXDGAQueryVersionReply 32 typedef struct _XDGAQueryModes { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; } xXDGAQueryModesReq; #define sz_xXDGAQueryModesReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 number; /* number of modes available */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXDGAQueryModesReply; #define sz_xXDGAQueryModesReply 32 typedef struct _XDGASetMode { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD32 mode; /* mode number to init */ CARD32 pid; /* Pixmap descriptor */ } xXDGASetModeReq; #define sz_xXDGASetModeReq 16 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 offset; /* offset into framebuffer map */ CARD32 flags; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXDGASetModeReply; #define sz_xXDGASetModeReply 32 typedef struct { CARD8 byte_order; CARD8 depth; CARD16 num; CARD16 bpp; CARD16 name_size; CARD32 vsync_num; CARD32 vsync_den; CARD32 flags; CARD16 image_width; CARD16 image_height; CARD16 pixmap_width; CARD16 pixmap_height; CARD32 bytes_per_scanline; CARD32 red_mask; CARD32 green_mask; CARD32 blue_mask; CARD16 visual_class; CARD16 pad1; CARD16 viewport_width; CARD16 viewport_height; CARD16 viewport_xstep; CARD16 viewport_ystep; CARD16 viewport_xmax; CARD16 viewport_ymax; CARD32 viewport_flags; CARD32 reserved1; CARD32 reserved2; } xXDGAModeInfo; #define sz_xXDGAModeInfo 72 typedef struct _XDGAOpenFramebuffer { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; } xXDGAOpenFramebufferReq; #define sz_xXDGAOpenFramebufferReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; /* device name size if there is one */ CARD32 mem1; /* physical memory */ CARD32 mem2; /* spillover for _alpha_ */ CARD32 size; /* size of map in bytes */ CARD32 offset; /* optional offset into device */ CARD32 extra; /* extra info associated with the map */ CARD32 pad2; } xXDGAOpenFramebufferReply; #define sz_xXDGAOpenFramebufferReply 32 typedef struct _XDGACloseFramebuffer { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; } xXDGACloseFramebufferReq; #define sz_xXDGACloseFramebufferReq 8 typedef struct _XDGASetViewport { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD16 x; CARD16 y; CARD32 flags; } xXDGASetViewportReq; #define sz_xXDGASetViewportReq 16 typedef struct _XDGAInstallColormap { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD32 cmap; } xXDGAInstallColormapReq; #define sz_xXDGAInstallColormapReq 12 typedef struct _XDGASelectInput { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD32 mask; } xXDGASelectInputReq; #define sz_xXDGASelectInputReq 12 typedef struct _XDGAFillRectangle { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD16 x; CARD16 y; CARD16 width; CARD16 height; CARD32 color; } xXDGAFillRectangleReq; #define sz_xXDGAFillRectangleReq 20 typedef struct _XDGACopyArea { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD16 srcx; CARD16 srcy; CARD16 width; CARD16 height; CARD16 dstx; CARD16 dsty; } xXDGACopyAreaReq; #define sz_xXDGACopyAreaReq 20 typedef struct _XDGACopyTransparentArea { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD16 srcx; CARD16 srcy; CARD16 width; CARD16 height; CARD16 dstx; CARD16 dsty; CARD32 key; } xXDGACopyTransparentAreaReq; #define sz_xXDGACopyTransparentAreaReq 24 typedef struct _XDGAGetViewportStatus { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; } xXDGAGetViewportStatusReq; #define sz_xXDGAGetViewportStatusReq 8 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 status; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXDGAGetViewportStatusReply; #define sz_xXDGAGetViewportStatusReply 32 typedef struct _XDGASync { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; } xXDGASyncReq; #define sz_xXDGASyncReq 8 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xXDGASyncReply; #define sz_xXDGASyncReply 32 typedef struct _XDGASetClientVersion { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD16 major; CARD16 minor; } xXDGASetClientVersionReq; #define sz_xXDGASetClientVersionReq 8 typedef struct { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD16 x; CARD16 y; CARD32 flags; } xXDGAChangePixmapModeReq; #define sz_xXDGAChangePixmapModeReq 16 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 x; CARD16 y; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xXDGAChangePixmapModeReply; #define sz_xXDGAChangePixmapModeReply 32 typedef struct _XDGACreateColormap { CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD32 screen; CARD32 id; CARD32 mode; CARD8 alloc; CARD8 pad1; CARD16 pad2; } xXDGACreateColormapReq; #define sz_xXDGACreateColormapReq 20 typedef struct { union { struct { BYTE type; BYTE detail; CARD16 sequenceNumber; } u; struct { CARD32 pad0; CARD32 time; INT16 dx; INT16 dy; INT16 screen; CARD16 state; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } event; } u; } dgaEvent; #endif /* _XF86DGAPROTO_H_ */ PKZX11/extensions/lbx.hnu[/* * Copyright 1992 Network Computing Devices * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of NCD. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. NCD. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #ifndef _LBX_H_ #define _LBX_H_ #define LBXNAME "LBX" #define LBX_MAJOR_VERSION 1 #define LBX_MINOR_VERSION 0 #define LbxNumberReqs 44 #define LbxEvent 0 #define LbxQuickMotionDeltaEvent 1 #define LbxNumberEvents 2 /* This is always the master client */ #define LbxMasterClientIndex 0 /* LbxEvent lbxType sub-fields */ #define LbxSwitchEvent 0 #define LbxCloseEvent 1 #define LbxDeltaEvent 2 #define LbxInvalidateTagEvent 3 #define LbxSendTagDataEvent 4 #define LbxListenToOne 5 #define LbxListenToAll 6 #define LbxMotionDeltaEvent 7 #define LbxReleaseCmapEvent 8 #define LbxFreeCellsEvent 9 /* * Lbx image compression methods * * No compression is always assigned the value of 0. * * The rest of the compression method opcodes are assigned dynamically * at option negotiation time. */ #define LbxImageCompressNone 0 #define BadLbxClient 0 #define LbxNumberErrors (BadLbxClient + 1) /* tagged data types */ #define LbxTagTypeModmap 1 #define LbxTagTypeKeymap 2 #define LbxTagTypeProperty 3 #define LbxTagTypeFont 4 #define LbxTagTypeConnInfo 5 #endif PKZoi433X11/extensions/renderproto.hnu[/* * Copyright © 2000 SuSE, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Keith Packard, SuSE, Inc. */ #ifndef _XRENDERP_H_ #define _XRENDERP_H_ #include #include #define Window CARD32 #define Drawable CARD32 #define Font CARD32 #define Pixmap CARD32 #define Cursor CARD32 #define Colormap CARD32 #define GContext CARD32 #define Atom CARD32 #define VisualID CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define Picture CARD32 #define PictFormat CARD32 #define Fixed INT32 #define Glyphset CARD32 /* * data structures */ typedef struct { CARD16 red; CARD16 redMask; CARD16 green; CARD16 greenMask; CARD16 blue; CARD16 blueMask; CARD16 alpha; CARD16 alphaMask; } xDirectFormat; #define sz_xDirectFormat 16 typedef struct { PictFormat id; CARD8 type; CARD8 depth; CARD16 pad1; xDirectFormat direct; Colormap colormap; } xPictFormInfo; #define sz_xPictFormInfo 28 typedef struct { VisualID visual; PictFormat format; } xPictVisual; #define sz_xPictVisual 8 typedef struct { CARD8 depth; CARD8 pad1; CARD16 nPictVisuals; CARD32 pad2; } xPictDepth; #define sz_xPictDepth 8 typedef struct { CARD32 nDepth; PictFormat fallback; } xPictScreen; #define sz_xPictScreen 8 typedef struct { CARD32 pixel; CARD16 red; CARD16 green; CARD16 blue; CARD16 alpha; } xIndexValue; #define sz_xIndexValue 12 typedef struct { CARD16 red; CARD16 green; CARD16 blue; CARD16 alpha; } xRenderColor; #define sz_xRenderColor 8 typedef struct { Fixed x; Fixed y; } xPointFixed; #define sz_xPointFixed 8 typedef struct { xPointFixed p1; xPointFixed p2; } xLineFixed; #define sz_xLineFixed 16 typedef struct { xPointFixed p1, p2, p3; } xTriangle; #define sz_xTriangle 24 typedef struct { Fixed top; Fixed bottom; xLineFixed left; xLineFixed right; } xTrapezoid; #define sz_xTrapezoid 40 typedef struct { CARD16 width; CARD16 height; INT16 x; INT16 y; INT16 xOff; INT16 yOff; } xGlyphInfo; #define sz_xGlyphInfo 12 typedef struct { CARD8 len; CARD8 pad1; CARD16 pad2; INT16 deltax; INT16 deltay; } xGlyphElt; #define sz_xGlyphElt 8 typedef struct { Fixed l, r, y; } xSpanFix; #define sz_xSpanFix 12 typedef struct { xSpanFix top, bot; } xTrap; #define sz_xTrap 24 /* * requests and replies */ typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xRenderQueryVersionReq; #define sz_xRenderQueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRenderQueryVersionReply; #define sz_xRenderQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; } xRenderQueryPictFormatsReq; #define sz_xRenderQueryPictFormatsReq 4 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numFormats; CARD32 numScreens; CARD32 numDepths; CARD32 numVisuals; CARD32 numSubpixel; /* Version 0.6 */ CARD32 pad5; } xRenderQueryPictFormatsReply; #define sz_xRenderQueryPictFormatsReply 32 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; PictFormat format; } xRenderQueryPictIndexValuesReq; #define sz_xRenderQueryPictIndexValuesReq 8 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numIndexValues; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xRenderQueryPictIndexValuesReply; #define sz_xRenderQueryPictIndexValuesReply 32 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture pid; Drawable drawable; PictFormat format; CARD32 mask; } xRenderCreatePictureReq; #define sz_xRenderCreatePictureReq 20 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture picture; CARD32 mask; } xRenderChangePictureReq; #define sz_xRenderChangePictureReq 12 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture picture; INT16 xOrigin; INT16 yOrigin; } xRenderSetPictureClipRectanglesReq; #define sz_xRenderSetPictureClipRectanglesReq 12 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture picture; } xRenderFreePictureReq; #define sz_xRenderFreePictureReq 8 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD8 op; CARD8 pad1; CARD16 pad2; Picture src; Picture mask; Picture dst; INT16 xSrc; INT16 ySrc; INT16 xMask; INT16 yMask; INT16 xDst; INT16 yDst; CARD16 width; CARD16 height; } xRenderCompositeReq; #define sz_xRenderCompositeReq 36 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture src; Picture dst; CARD32 colorScale; CARD32 alphaScale; INT16 xSrc; INT16 ySrc; INT16 xDst; INT16 yDst; CARD16 width; CARD16 height; } xRenderScaleReq; #define sz_xRenderScaleReq 32 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD8 op; CARD8 pad1; CARD16 pad2; Picture src; Picture dst; PictFormat maskFormat; INT16 xSrc; INT16 ySrc; } xRenderTrapezoidsReq; #define sz_xRenderTrapezoidsReq 24 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD8 op; CARD8 pad1; CARD16 pad2; Picture src; Picture dst; PictFormat maskFormat; INT16 xSrc; INT16 ySrc; } xRenderTrianglesReq; #define sz_xRenderTrianglesReq 24 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD8 op; CARD8 pad1; CARD16 pad2; Picture src; Picture dst; PictFormat maskFormat; INT16 xSrc; INT16 ySrc; } xRenderTriStripReq; #define sz_xRenderTriStripReq 24 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD8 op; CARD8 pad1; CARD16 pad2; Picture src; Picture dst; PictFormat maskFormat; INT16 xSrc; INT16 ySrc; } xRenderTriFanReq; #define sz_xRenderTriFanReq 24 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Glyphset gsid; PictFormat format; } xRenderCreateGlyphSetReq; #define sz_xRenderCreateGlyphSetReq 12 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Glyphset gsid; Glyphset existing; } xRenderReferenceGlyphSetReq; #define sz_xRenderReferenceGlyphSetReq 24 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Glyphset glyphset; } xRenderFreeGlyphSetReq; #define sz_xRenderFreeGlyphSetReq 8 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Glyphset glyphset; CARD32 nglyphs; } xRenderAddGlyphsReq; #define sz_xRenderAddGlyphsReq 12 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Glyphset glyphset; } xRenderFreeGlyphsReq; #define sz_xRenderFreeGlyphsReq 8 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD8 op; CARD8 pad1; CARD16 pad2; Picture src; Picture dst; PictFormat maskFormat; Glyphset glyphset; INT16 xSrc; INT16 ySrc; } xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req, xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req; #define sz_xRenderCompositeGlyphs8Req 28 #define sz_xRenderCompositeGlyphs16Req 28 #define sz_xRenderCompositeGlyphs32Req 28 /* 0.1 and higher */ typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; CARD8 op; CARD8 pad1; CARD16 pad2; Picture dst; xRenderColor color; } xRenderFillRectanglesReq; #define sz_xRenderFillRectanglesReq 20 /* 0.5 and higher */ typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Cursor cid; Picture src; CARD16 x; CARD16 y; } xRenderCreateCursorReq; #define sz_xRenderCreateCursorReq 16 /* 0.6 and higher */ /* * This can't use an array because 32-bit values may be in bitfields */ typedef struct { Fixed matrix11; Fixed matrix12; Fixed matrix13; Fixed matrix21; Fixed matrix22; Fixed matrix23; Fixed matrix31; Fixed matrix32; Fixed matrix33; } xRenderTransform; #define sz_xRenderTransform 36 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture picture; xRenderTransform transform; } xRenderSetPictureTransformReq; #define sz_xRenderSetPictureTransformReq 44 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Drawable drawable; } xRenderQueryFiltersReq; #define sz_xRenderQueryFiltersReq 8 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 numAliases; /* LISTofCARD16 */ CARD32 numFilters; /* LISTofSTRING8 */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xRenderQueryFiltersReply; #define sz_xRenderQueryFiltersReply 32 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture picture; CARD16 nbytes; /* number of bytes in name */ CARD16 pad; } xRenderSetPictureFilterReq; #define sz_xRenderSetPictureFilterReq 12 /* 0.8 and higher */ typedef struct { Cursor cursor; CARD32 delay; } xAnimCursorElt; #define sz_xAnimCursorElt 8 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Cursor cid; } xRenderCreateAnimCursorReq; #define sz_xRenderCreateAnimCursorReq 8 /* 0.9 and higher */ typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture picture; INT16 xOff; INT16 yOff; } xRenderAddTrapsReq; #define sz_xRenderAddTrapsReq 12 /* 0.10 and higher */ typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture pid; xRenderColor color; } xRenderCreateSolidFillReq; #define sz_xRenderCreateSolidFillReq 16 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture pid; xPointFixed p1; xPointFixed p2; CARD32 nStops; } xRenderCreateLinearGradientReq; #define sz_xRenderCreateLinearGradientReq 28 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture pid; xPointFixed inner; xPointFixed outer; Fixed inner_radius; Fixed outer_radius; CARD32 nStops; } xRenderCreateRadialGradientReq; #define sz_xRenderCreateRadialGradientReq 36 typedef struct { CARD8 reqType; CARD8 renderReqType; CARD16 length; Picture pid; xPointFixed center; Fixed angle; /* in degrees */ CARD32 nStops; } xRenderCreateConicalGradientReq; #define sz_xRenderCreateConicalGradientReq 24 #undef Window #undef Drawable #undef Font #undef Pixmap #undef Cursor #undef Colormap #undef GContext #undef Atom #undef VisualID #undef Time #undef KeyCode #undef KeySym #undef Picture #undef PictFormat #undef Fixed #undef Glyphset #endif /* _XRENDERP_H_ */ PKZ  X11/extensions/multibufconst.hnu[/* Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _MULTIBUFCONST_H_ #define _MULTIBUFCONST_H_ #define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering" #define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */ #define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */ /* * update_action field */ #define MultibufferUpdateActionUndefined 0 #define MultibufferUpdateActionBackground 1 #define MultibufferUpdateActionUntouched 2 #define MultibufferUpdateActionCopied 3 /* * update_hint field */ #define MultibufferUpdateHintFrequent 0 #define MultibufferUpdateHintIntermittent 1 #define MultibufferUpdateHintStatic 2 /* * valuemask fields */ #define MultibufferWindowUpdateHint (1L << 0) #define MultibufferBufferEventMask (1L << 0) /* * mono vs. stereo and left vs. right */ #define MultibufferModeMono 0 #define MultibufferModeStereo 1 #define MultibufferSideMono 0 #define MultibufferSideLeft 1 #define MultibufferSideRight 2 /* * clobber state */ #define MultibufferUnclobbered 0 #define MultibufferPartiallyClobbered 1 #define MultibufferFullyClobbered 2 /* * event stuff */ #define MultibufferClobberNotifyMask 0x02000000 #define MultibufferUpdateNotifyMask 0x04000000 #define MultibufferClobberNotify 0 #define MultibufferUpdateNotify 1 #define MultibufferNumberEvents (MultibufferUpdateNotify + 1) #define MultibufferBadBuffer 0 #define MultibufferNumberErrors (MultibufferBadBuffer + 1) #endif /* _MULTIBUFCONST_H_ */ PKZ߹X11/extensions/xf86vmstr.hnu[#warning "xf86vmstr.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include PKZ8ppX11/extensions/xtestconst.hnu[/* Copyright 1992, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _XTEST_CONST_H_ #define _XTEST_CONST_H_ #define XTestNumberEvents 0 #define XTestNumberErrors 0 #define XTestCurrentCursor ((Cursor)1) #define XTestMajorVersion 2 #define XTestMinorVersion 2 #define XTestExtensionName "XTEST" #endif PKZWT X11/extensions/xtestproto.hnu[/* Copyright 1992, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _XTESTPROTO_H_ #define _XTESTPROTO_H_ #include #define Window CARD32 #define Time CARD32 #define Cursor CARD32 #define X_XTestGetVersion 0 #define X_XTestCompareCursor 1 #define X_XTestFakeInput 2 #define X_XTestGrabControl 3 typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 xtReqType; /* always X_XTestGetVersion */ CARD16 length; CARD8 majorVersion; CARD8 pad; CARD16 minorVersion; } xXTestGetVersionReq; #define sz_xXTestGetVersionReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 majorVersion; CARD16 sequenceNumber; CARD32 length; CARD16 minorVersion; CARD16 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXTestGetVersionReply; #define sz_xXTestGetVersionReply 32 typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 xtReqType; /* always X_XTestCompareCursor */ CARD16 length; Window window; Cursor cursor; } xXTestCompareCursorReq; #define sz_xXTestCompareCursorReq 12 typedef struct { BYTE type; /* X_Reply */ BOOL same; CARD16 sequenceNumber; CARD32 length; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXTestCompareCursorReply; #define sz_xXTestCompareCursorReply 32 /* used only on the client side */ typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 xtReqType; /* always X_XTestFakeInput */ CARD16 length; BYTE type; BYTE detail; CARD16 pad0; Time time; Window root; CARD32 pad1; CARD32 pad2; INT16 rootX, rootY; CARD32 pad3; CARD16 pad4; CARD8 pad5; CARD8 deviceid; } xXTestFakeInputReq; #define sz_xXTestFakeInputReq 36 typedef struct { CARD8 reqType; /* always XTestReqCode */ CARD8 xtReqType; /* always X_XTestGrabControl */ CARD16 length; BOOL impervious; CARD8 pad0; CARD8 pad1; CARD8 pad2; } xXTestGrabControlReq; #define sz_xXTestGrabControlReq 8 #undef Window #undef Time #undef Cursor #endif /* _XTESTPROTO_H_ */ PKZ: : X11/extensions/composite.hnu[/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _COMPOSITE_H_ #define _COMPOSITE_H_ #include #define COMPOSITE_NAME "Composite" #define COMPOSITE_MAJOR 0 #define COMPOSITE_MINOR 4 #define CompositeRedirectAutomatic 0 #define CompositeRedirectManual 1 #define X_CompositeQueryVersion 0 #define X_CompositeRedirectWindow 1 #define X_CompositeRedirectSubwindows 2 #define X_CompositeUnredirectWindow 3 #define X_CompositeUnredirectSubwindows 4 #define X_CompositeCreateRegionFromBorderClip 5 #define X_CompositeNameWindowPixmap 6 #define X_CompositeGetOverlayWindow 7 #define X_CompositeReleaseOverlayWindow 8 #define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1) #define CompositeNumberEvents 0 #endif /* _COMPOSITE_H_ */ PKZã``X11/extensions/lbxproto.hnu[/* * Copyright 1992 Network Computing Devices * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of NCD. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. NCD. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #ifndef _LBXPROTO_H_ #define _LBXPROTO_H_ #include /* * NOTE: any changes or additions to the opcodes needs to be reflected * in the lbxCacheable array in Xserver/lbx/lbxmain.c */ #define X_LbxQueryVersion 0 #define X_LbxStartProxy 1 #define X_LbxStopProxy 2 #define X_LbxSwitch 3 #define X_LbxNewClient 4 #define X_LbxCloseClient 5 #define X_LbxModifySequence 6 #define X_LbxAllowMotion 7 #define X_LbxIncrementPixel 8 #define X_LbxDelta 9 #define X_LbxGetModifierMapping 10 #define X_LbxInvalidateTag 12 #define X_LbxPolyPoint 13 #define X_LbxPolyLine 14 #define X_LbxPolySegment 15 #define X_LbxPolyRectangle 16 #define X_LbxPolyArc 17 #define X_LbxFillPoly 18 #define X_LbxPolyFillRectangle 19 #define X_LbxPolyFillArc 20 #define X_LbxGetKeyboardMapping 21 #define X_LbxQueryFont 22 #define X_LbxChangeProperty 23 #define X_LbxGetProperty 24 #define X_LbxTagData 25 #define X_LbxCopyArea 26 #define X_LbxCopyPlane 27 #define X_LbxPolyText8 28 #define X_LbxPolyText16 29 #define X_LbxImageText8 30 #define X_LbxImageText16 31 #define X_LbxQueryExtension 32 #define X_LbxPutImage 33 #define X_LbxGetImage 34 #define X_LbxBeginLargeRequest 35 #define X_LbxLargeRequestData 36 #define X_LbxEndLargeRequest 37 #define X_LbxInternAtoms 38 #define X_LbxGetWinAttrAndGeom 39 #define X_LbxGrabCmap 40 #define X_LbxReleaseCmap 41 #define X_LbxAllocColor 42 #define X_LbxSync 43 /* * Redefine some basic types used by structures defined herein. This removes * any possibility on 64-bit architectures of one entity viewing communicated * data as 32-bit quantities and another entity viewing the same data as 64-bit * quantities. */ #define XID CARD32 #define Atom CARD32 #define Colormap CARD32 #define Drawable CARD32 #define VisualID CARD32 #define Window CARD32 typedef struct { BOOL success; /* TRUE */ BOOL changeType; CARD16 majorVersion, minorVersion; CARD16 length; /* 1/4 additional bytes in setup info */ CARD32 tag; } xLbxConnSetupPrefix; typedef struct _LbxQueryVersion { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxQueryVersion */ CARD16 length; } xLbxQueryVersionReq; #define sz_xLbxQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of LBX protocol */ CARD16 minorVersion; /* minor version of LBX protocol */ CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xLbxQueryVersionReply; #define sz_xLbxQueryVersionReply 32 typedef struct _LbxStartProxy { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxStartProxy */ CARD16 length; } xLbxStartProxyReq; #define sz_xLbxStartProxyReq 4 typedef struct _LbxStopProxy { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxStopProxy */ CARD16 length; } xLbxStopProxyReq; #define sz_xLbxStopProxyReq 4 typedef struct _LbxSwitch { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxSwitch */ CARD16 length; CARD32 client; /* new client */ } xLbxSwitchReq; #define sz_xLbxSwitchReq 8 typedef struct _LbxNewClient { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxNewClient */ CARD16 length; CARD32 client; /* new client */ } xLbxNewClientReq; #define sz_xLbxNewClientReq 8 typedef struct _LbxCloseClient { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxCloseClient */ CARD16 length; CARD32 client; /* new client */ } xLbxCloseClientReq; #define sz_xLbxCloseClientReq 8 typedef struct _LbxModifySequence { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxModifySequence */ CARD16 length; CARD32 adjust; } xLbxModifySequenceReq; #define sz_xLbxModifySequenceReq 8 typedef struct _LbxAllowMotion { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxAllowMotion */ CARD16 length; CARD32 num; } xLbxAllowMotionReq; #define sz_xLbxAllowMotionReq 8 typedef struct { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxGrabCmap */ CARD16 length; Colormap cmap; } xLbxGrabCmapReq; #define sz_xLbxGrabCmapReq 8 #define LBX_SMART_GRAB 0x80 #define LBX_AUTO_RELEASE 0x40 #define LBX_3CHANNELS 0x20 #define LBX_2BYTE_PIXELS 0x10 #define LBX_RGB_BITS_MASK 0x0f #define LBX_LIST_END 0 #define LBX_PIXEL_PRIVATE 1 #define LBX_PIXEL_SHARED 2 #define LBX_PIXEL_RANGE_PRIVATE 3 #define LBX_PIXEL_RANGE_SHARED 4 #define LBX_NEXT_CHANNEL 5 typedef struct { BYTE type; /* X_Reply */ CARD8 flags; CARD16 sequenceNumber; CARD32 length; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xLbxGrabCmapReply; #define sz_xLbxGrabCmapReply 32 #define sz_xLbxGrabCmapReplyHdr 8 typedef struct { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxReleaseCmap */ CARD16 length; Colormap cmap; } xLbxReleaseCmapReq; #define sz_xLbxReleaseCmapReq 8 typedef struct { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxAllocColor */ CARD16 length; Colormap cmap; CARD32 pixel; CARD16 red, green, blue; CARD16 pad; } xLbxAllocColorReq; #define sz_xLbxAllocColorReq 20 typedef struct _LbxIncrementPixel { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxIncrementPixel */ CARD16 length; CARD32 cmap; CARD32 pixel; } xLbxIncrementPixelReq; #define sz_xLbxIncrementPixelReq 12 typedef struct _LbxDelta { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxDelta */ CARD16 length; CARD8 diffs; /* number of diffs */ CARD8 cindex; /* cache index */ /* list of diffs follows */ } xLbxDeltaReq; #define sz_xLbxDeltaReq 6 typedef struct _LbxGetModifierMapping { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxGetModifierMapping */ CARD16 length; } xLbxGetModifierMappingReq; #define sz_xLbxGetModifierMappingReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 keyspermod; CARD16 sequenceNumber; CARD32 length; CARD32 tag; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xLbxGetModifierMappingReply; #define sz_xLbxGetModifierMappingReply 32 typedef struct _LbxGetKeyboardMapping { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxGetKeyboardMapping */ CARD16 length; KeyCode firstKeyCode; CARD8 count; CARD16 pad1; } xLbxGetKeyboardMappingReq; #define sz_xLbxGetKeyboardMappingReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 keysperkeycode; CARD16 sequenceNumber; CARD32 length; CARD32 tag; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xLbxGetKeyboardMappingReply; #define sz_xLbxGetKeyboardMappingReply 32 typedef struct _LbxQueryFont { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxQueryFont */ CARD16 length; CARD32 fid; } xLbxQueryFontReq; #define sz_xLbxQueryFontReq 8 typedef struct _LbxInternAtoms { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxInternAtoms */ CARD16 length; CARD16 num; } xLbxInternAtomsReq; #define sz_xLbxInternAtomsReq 6 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 atomsStart; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xLbxInternAtomsReply; #define sz_xLbxInternAtomsReply 32 #define sz_xLbxInternAtomsReplyHdr 8 typedef struct _LbxGetWinAttrAndGeom { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxGetWinAttrAndGeom */ CARD16 length; CARD32 id; /* window id */ } xLbxGetWinAttrAndGeomReq; #define sz_xLbxGetWinAttrAndGeomReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 backingStore; CARD16 sequenceNumber; CARD32 length; /* NOT 0; this is an extra-large reply */ VisualID visualID; #if defined(__cplusplus) || defined(c_plusplus) CARD16 c_class; #else CARD16 class; #endif CARD8 bitGravity; CARD8 winGravity; CARD32 backingBitPlanes; CARD32 backingPixel; BOOL saveUnder; BOOL mapInstalled; CARD8 mapState; BOOL override; Colormap colormap; CARD32 allEventMasks; CARD32 yourEventMask; CARD16 doNotPropagateMask; CARD16 pad1; Window root; INT16 x, y; CARD16 width, height; CARD16 borderWidth; CARD8 depth; CARD8 pad2; } xLbxGetWinAttrAndGeomReply; #define sz_xLbxGetWinAttrAndGeomReply 60 typedef struct { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxSync */ CARD16 length; } xLbxSyncReq; #define sz_xLbxSyncReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xLbxSyncReply; #define sz_xLbxSyncReply 32 /* an LBX squished charinfo packs the data in a CARD32 as follows */ #define LBX_WIDTH_SHIFT 26 #define LBX_LEFT_SHIFT 20 #define LBX_RIGHT_SHIFT 13 #define LBX_ASCENT_SHIFT 7 #define LBX_DESCENT_SHIFT 0 #define LBX_WIDTH_BITS 6 #define LBX_LEFT_BITS 6 #define LBX_RIGHT_BITS 7 #define LBX_ASCENT_BITS 6 #define LBX_DESCENT_BITS 7 #define LBX_WIDTH_MASK 0xfc000000 #define LBX_LEFT_MASK 0x03f00000 #define LBX_RIGHT_MASK 0x000fe000 #define LBX_ASCENT_MASK 0x00001f80 #define LBX_DESCENT_MASK 0x0000007f #define LBX_MASK_BITS(val, n) ((unsigned int) ((val) & ((1 << (n)) - 1))) typedef struct { CARD32 metrics; } xLbxCharInfo; /* note that this is identical to xQueryFontReply except for missing * first 2 words */ typedef struct { xCharInfo minBounds; /* XXX do we need to leave this gunk? */ #ifndef WORD64 CARD32 walign1; #endif xCharInfo maxBounds; #ifndef WORD64 CARD32 walign2; #endif CARD16 minCharOrByte2, maxCharOrByte2; CARD16 defaultChar; CARD16 nFontProps; /* followed by this many xFontProp structures */ CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent, fontDescent; CARD32 nCharInfos; /* followed by this many xLbxCharInfo structures */ } xLbxFontInfo; typedef struct { BYTE type; /* X_Reply */ CARD8 compression; CARD16 sequenceNumber; CARD32 length; CARD32 tag; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; /* X_QueryFont sticks much of the data in the base reply packet, * but we hope that it won't be needed, (and it won't fit in 32 bytes * with the tag anyways) * * if any additional data is needed, its sent in a xLbxFontInfo */ } xLbxQueryFontReply; #define sz_xLbxQueryFontReply 32 typedef struct _LbxChangeProperty { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxChangeProperty */ CARD16 length; Window window; Atom property; Atom type; CARD8 format; CARD8 mode; BYTE pad[2]; CARD32 nUnits; } xLbxChangePropertyReq; #define sz_xLbxChangePropertyReq 24 typedef struct { BYTE type; /* X_Reply */ CARD8 pad; CARD16 sequenceNumber; CARD32 length; CARD32 tag; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xLbxChangePropertyReply; #define sz_xLbxChangePropertyReply 32 typedef struct _LbxGetProperty { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxGetProperty */ CARD16 length; Window window; Atom property; Atom type; CARD8 delete; BYTE pad[3]; CARD32 longOffset; CARD32 longLength; } xLbxGetPropertyReq; #define sz_xLbxGetPropertyReq 28 typedef struct { BYTE type; /* X_Reply */ CARD8 format; CARD16 sequenceNumber; CARD32 length; Atom propertyType; CARD32 bytesAfter; CARD32 nItems; CARD32 tag; CARD32 pad1; CARD32 pad2; } xLbxGetPropertyReply; #define sz_xLbxGetPropertyReply 32 typedef struct _LbxTagData { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxTagData */ CARD16 length; XID tag; CARD32 real_length; /* data */ } xLbxTagDataReq; #define sz_xLbxTagDataReq 12 typedef struct _LbxInvalidateTag { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxInvalidateTag */ CARD16 length; CARD32 tag; } xLbxInvalidateTagReq; #define sz_xLbxInvalidateTagReq 8 typedef struct _LbxPutImage { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxPutImage */ CARD16 length; CARD8 compressionMethod; CARD8 cacheEnts; CARD8 bitPacked; /* rest is variable */ } xLbxPutImageReq; #define sz_xLbxPutImageReq 7 typedef struct { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxGetImage */ CARD16 length; Drawable drawable; INT16 x, y; CARD16 width, height; CARD32 planeMask; CARD8 format; CARD8 pad1; CARD16 pad2; } xLbxGetImageReq; #define sz_xLbxGetImageReq 24 typedef struct { BYTE type; /* X_Reply */ CARD8 depth; CARD16 sequenceNumber; CARD32 lbxLength; CARD32 xLength; VisualID visual; CARD8 compressionMethod; CARD8 pad1; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xLbxGetImageReply; #define sz_xLbxGetImageReply 32 /* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment, LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */ #define GFX_CACHE_SIZE 15 #define GFXdCacheEnt(e) ((e) & 0xf) #define GFXgCacheEnt(e) (((e) >> 4) & 0xf) #define GFXCacheEnts(d,g) (((d) & 0xf) | (((g) & 0xf) << 4)) #define GFXCacheNone 0xf typedef struct _LbxPolyPoint { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; CARD16 length; CARD8 cacheEnts; CARD8 padBytes; } xLbxPolyPointReq; #define sz_xLbxPolyPointReq 6 typedef xLbxPolyPointReq xLbxPolyLineReq; typedef xLbxPolyPointReq xLbxPolySegmentReq; typedef xLbxPolyPointReq xLbxPolyRectangleReq; typedef xLbxPolyPointReq xLbxPolyArcReq; typedef xLbxPolyPointReq xLbxPolyFillRectangleReq; typedef xLbxPolyPointReq xLbxPolyFillArcReq; #define sz_xLbxPolyLineReq sz_xLbxPolyPointReq #define sz_xLbxPolySegmentReq sz_xLbxPolyPointReq #define sz_xLbxPolyRectangleReq sz_xLbxPolyPointReq #define sz_xLbxPolyArcReq sz_xLbxPolyPointReq #define sz_xLbxPolyFillRectangleReq sz_xLbxPolyPointReq #define sz_xLbxPolyFillArc sz_xLbxPolyPointReq typedef struct _LbxFillPoly { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; CARD16 length; CARD8 cacheEnts; BYTE shape; CARD8 padBytes; } xLbxFillPolyReq; #define sz_xLbxFillPolyReq 7 typedef struct _LbxCopyArea { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; CARD16 length; CARD8 srcCache; /* source drawable */ CARD8 cacheEnts; /* dest drawable and gc */ /* followed by encoded src x, src y, dst x, dst y, width, height */ } xLbxCopyAreaReq; #define sz_xLbxCopyAreaReq 6 typedef struct _LbxCopyPlane { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; CARD16 length; CARD32 bitPlane; CARD8 srcCache; /* source drawable */ CARD8 cacheEnts; /* dest drawable and gc */ /* followed by encoded src x, src y, dst x, dst y, width, height */ } xLbxCopyPlaneReq; #define sz_xLbxCopyPlaneReq 10 typedef struct _LbxPolyText { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; CARD16 length; CARD8 cacheEnts; /* followed by encoded src x, src y coordinates and text elts */ } xLbxPolyTextReq; #define sz_xLbxPolyTextReq 5 typedef xLbxPolyTextReq xLbxPolyText8Req; typedef xLbxPolyTextReq xLbxPolyText16Req; #define sz_xLbxPolyTextReq 5 #define sz_xLbxPolyText8Req 5 #define sz_xLbxPolyText16Req 5 typedef struct _LbxImageText { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; CARD16 length; CARD8 cacheEnts; CARD8 nChars; /* followed by encoded src x, src y coordinates and string */ } xLbxImageTextReq; typedef xLbxImageTextReq xLbxImageText8Req; typedef xLbxImageTextReq xLbxImageText16Req; #define sz_xLbxImageTextReq 6 #define sz_xLbxImageText8Req 6 #define sz_xLbxImageText16Req 6 typedef struct { CARD8 offset; CARD8 diff; } xLbxDiffItem; #define sz_xLbxDiffItem 2 typedef struct { BYTE type; /* X_Reply */ CARD8 nOpts; CARD16 sequenceNumber; CARD32 length; CARD32 optDataStart; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xLbxStartReply; #define sz_xLbxStartReply 32 #define sz_xLbxStartReplyHdr 8 typedef struct _LbxQueryExtension { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxQueryExtension */ CARD16 length; CARD32 nbytes; } xLbxQueryExtensionReq; #define sz_xLbxQueryExtensionReq 8 typedef struct _LbxQueryExtensionReply { BYTE type; /* X_Reply */ CARD8 numReqs; CARD16 sequenceNumber; CARD32 length; BOOL present; CARD8 major_opcode; CARD8 first_event; CARD8 first_error; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; /* reply & event generating requests */ } xLbxQueryExtensionReply; #define sz_xLbxQueryExtensionReply 32 typedef struct _LbxBeginLargeRequest { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxBeginLargeRequest */ CARD16 length; CARD32 largeReqLength; } xLbxBeginLargeRequestReq; #define sz_BeginLargeRequestReq 8 typedef struct _LbxLargeRequestData { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxLargeRequestData */ CARD16 length; /* followed by LISTofCARD8 data */ } xLbxLargeRequestDataReq; #define sz_LargeRequestDataReq 4 typedef struct _LbxEndLargeRequest { CARD8 reqType; /* always LbxReqCode */ CARD8 lbxReqType; /* always X_LbxEndLargeRequest */ CARD16 length; } xLbxEndLargeRequestReq; #define sz_EndLargeRequestReq 4 typedef struct _LbxSwitchEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxSwitchEvent */ CARD16 pad; CARD32 client; } xLbxSwitchEvent; #define sz_xLbxSwitchEvent 8 typedef struct _LbxCloseEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxCloseEvent */ CARD16 sequenceNumber; CARD32 client; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xLbxCloseEvent; #define sz_xLbxCloseEvent 32 typedef struct _LbxInvalidateTagEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxInvalidateTagEvent */ CARD16 sequenceNumber; CARD32 tag; CARD32 tagType; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xLbxInvalidateTagEvent; #define sz_xLbxInvalidateTagEvent 32 typedef struct _LbxSendTagDataEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxSendTagDataEvent */ CARD16 sequenceNumber; CARD32 tag; CARD32 tagType; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xLbxSendTagDataEvent; #define sz_xLbxSendTagDataEvent 32 typedef struct _LbxListenToOneEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxListenToOneEvent */ CARD16 sequenceNumber; CARD32 client; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xLbxListenToOneEvent; #define sz_xLbxListenToOneEvent 32 typedef struct _LbxListenToAllEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxListenToAllEvent */ CARD16 sequenceNumber; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xLbxListenToAllEvent; #define sz_xLbxListenToOneEvent 32 typedef struct _LbxReleaseCmapEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxReleaseCmapEvent */ CARD16 sequenceNumber; Colormap colormap; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xLbxReleaseCmapEvent; #define sz_xLbxReleaseCmapEvent 32 typedef struct _LbxFreeCellsEvent { BYTE type; /* always eventBase + LbxEvent */ BYTE lbxType; /* LbxFreeCellsEvent */ CARD16 sequenceNumber; Colormap colormap; CARD32 pixelStart; CARD32 pixelEnd; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xLbxFreeCellsEvent; #define sz_xLbxFreeCellsEvent 32 /* * squished X event sizes. If these change, be sure to update lbxquish.c * and unsquish.c appropriately * * lbxsz_* is the padded squished length * lbxupsz_* is the unpadded squished length */ #define lbxsz_KeyButtonEvent 32 #define lbxupsz_KeyButtonEvent 31 #define lbxsz_EnterLeaveEvent 32 #define lbxupsz_EnterLeaveEvent 32 #define lbxsz_FocusEvent 12 #define lbxupsz_FocusEvent 9 #define lbxsz_KeymapEvent 32 #define lbxupsz_KeymapEvent 32 #define lbxsz_ExposeEvent 20 #define lbxupsz_ExposeEvent 18 #define lbxsz_GfxExposeEvent 24 #define lbxupsz_GfxExposeEvent 21 #define lbxsz_NoExposeEvent 12 #define lbxupsz_NoExposeEvent 11 #define lbxsz_VisibilityEvent 12 #define lbxupsz_VisibilityEvent 9 #define lbxsz_CreateNotifyEvent 24 #define lbxupsz_CreateNotifyEvent 23 #define lbxsz_DestroyNotifyEvent 12 #define lbxupsz_DestroyNotifyEvent 12 #define lbxsz_UnmapNotifyEvent 16 #define lbxupsz_UnmapNotifyEvent 13 #define lbxsz_MapNotifyEvent 16 #define lbxupsz_MapNotifyEvent 13 #define lbxsz_MapRequestEvent 12 #define lbxupsz_MapRequestEvent 12 #define lbxsz_ReparentEvent 24 #define lbxupsz_ReparentEvent 21 #define lbxsz_ConfigureNotifyEvent 28 #define lbxupsz_ConfigureNotifyEvent 27 #define lbxsz_ConfigureRequestEvent 28 #define lbxupsz_ConfigureRequestEvent 28 #define lbxsz_GravityEvent 16 #define lbxupsz_GravityEvent 16 #define lbxsz_ResizeRequestEvent 12 #define lbxupsz_ResizeRequestEvent 12 #define lbxsz_CirculateEvent 20 #define lbxupsz_CirculateEvent 17 #define lbxsz_PropertyEvent 20 #define lbxupsz_PropertyEvent 17 #define lbxsz_SelectionClearEvent 16 #define lbxupsz_SelectionClearEvent 16 #define lbxsz_SelectionRequestEvent 28 #define lbxupsz_SelectionRequestEvent 28 #define lbxsz_SelectionNotifyEvent 24 #define lbxupsz_SelectionNotifyEvent 24 #define lbxsz_ColormapEvent 16 #define lbxupsz_ColormapEvent 14 #define lbxsz_MappingNotifyEvent 8 #define lbxupsz_MappingNotifyEvent 7 #define lbxsz_ClientMessageEvent 32 #define lbxupsz_ClientMessageEvent 32 #define lbxsz_UnknownEvent 32 #ifdef DEBUG #define DBG_SWITCH 0x00000001 #define DBG_CLOSE 0x00000002 #define DBG_IO 0x00000004 #define DBG_READ_REQ 0x00000008 #define DBG_LEN 0x00000010 #define DBG_BLOCK 0x00000020 #define DBG_CLIENT 0x00000040 #define DBG_DELTA 0x00000080 #endif /* * Cancel the previous redefinition of the basic types, thus restoring their * X.h definitions. */ #undef XID #undef Atom #undef Colormap #undef Drawable #undef VisualID #undef Window #endif /* _LBXPROTO_H_ */ PKZYzooX11/extensions/dbe.hnu[/****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of the Hewlett-Packard * Company shall not be used in advertising or otherwise to promote the * sale, use or other dealings in this Software without prior written * authorization from the Hewlett-Packard Company. * * Header file for Xlib-related DBE * *****************************************************************************/ #ifndef DBE_H #define DBE_H /* Values for swap_action field of XdbeSwapInfo structure */ #define XdbeUndefined 0 #define XdbeBackground 1 #define XdbeUntouched 2 #define XdbeCopied 3 /* Errors */ #define XdbeBadBuffer 0 #define DBE_PROTOCOL_NAME "DOUBLE-BUFFER" /* Current version numbers */ #define DBE_MAJOR_VERSION 1 #define DBE_MINOR_VERSION 0 /* Used when adding extension; also used in Xdbe macros */ #define DbeNumberEvents 0 #define DbeBadBuffer 0 #define DbeNumberErrors (DbeBadBuffer + 1) #endif /* DBE_H */ PKZ; !!X11/extensions/presentproto.hnu[/* * Copyright © 2013 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #ifndef _PRESENT_PROTO_H_ #define _PRESENT_PROTO_H_ #include #define Window CARD32 #define Pixmap CARD32 #define Region CARD32 #define XSyncFence CARD32 #define EventID CARD32 typedef struct { Window window; CARD32 serial; } xPresentNotify; #define sz_xPresentNotify 8 typedef struct { CARD8 reqType; CARD8 presentReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xPresentQueryVersionReq; #define sz_xPresentQueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xPresentQueryVersionReply; #define sz_xPresentQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 presentReqType; CARD16 length; Window window; Pixmap pixmap; CARD32 serial; Region valid; Region update; INT16 x_off; INT16 y_off; CARD32 target_crtc; XSyncFence wait_fence; XSyncFence idle_fence; CARD32 options; CARD32 pad1; CARD64 target_msc; CARD64 divisor; CARD64 remainder; /* followed by a LISTofPRESENTNOTIFY */ } xPresentPixmapReq; #define sz_xPresentPixmapReq 72 typedef struct { CARD8 reqType; CARD8 presentReqType; CARD16 length; Window window; CARD32 serial; CARD32 pad0; CARD64 target_msc; CARD64 divisor; CARD64 remainder; } xPresentNotifyMSCReq; #define sz_xPresentNotifyMSCReq 40 typedef struct { CARD8 reqType; CARD8 presentReqType; CARD16 length; CARD32 eid; CARD32 window; CARD32 eventMask; } xPresentSelectInputReq; #define sz_xPresentSelectInputReq 16 typedef struct { CARD8 reqType; CARD8 presentReqType; CARD16 length; CARD32 target; } xPresentQueryCapabilitiesReq; #define sz_xPresentQueryCapabilitiesReq 8 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 capabilities; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xPresentQueryCapabilitiesReply; #define sz_xPresentQueryCapabilitiesReply 32 /* * Events * * All Present events are X Generic Events */ typedef struct { CARD8 type; CARD8 extension; CARD16 sequenceNumber; CARD32 length; CARD16 evtype; CARD16 pad2; CARD32 eid; CARD32 window; INT16 x; INT16 y; CARD16 width; CARD16 height; INT16 off_x; INT16 off_y; CARD16 pixmap_width; CARD16 pixmap_height; CARD32 pixmap_flags; } xPresentConfigureNotify; #define sz_xPresentConfigureNotify 40 typedef struct { CARD8 type; CARD8 extension; CARD16 sequenceNumber; CARD32 length; CARD16 evtype; CARD8 kind; CARD8 mode; CARD32 eid; Window window; CARD32 serial; CARD64 ust; CARD64 msc; } xPresentCompleteNotify; #define sz_xPresentCompleteNotify 40 typedef struct { CARD8 type; CARD8 extension; CARD16 sequenceNumber; CARD32 length; CARD16 evtype; CARD16 pad2; CARD32 eid; Window window; CARD32 serial; Pixmap pixmap; CARD32 idle_fence; } xPresentIdleNotify; #define sz_xPresentIdleNotify 32 #if PRESENT_FUTURE_VERSION typedef struct { CARD8 type; CARD8 extension; CARD16 sequenceNumber; CARD32 length; CARD16 evtype; CARD8 update_window; CARD8 pad1; CARD32 eid; Window event_window; Window window; Pixmap pixmap; CARD32 serial; /* 32-byte boundary */ Region valid_region; Region update_region; xRectangle valid_rect; xRectangle update_rect; INT16 x_off; INT16 y_off; CARD32 target_crtc; XSyncFence wait_fence; XSyncFence idle_fence; CARD32 options; CARD32 pad2; CARD64 target_msc; CARD64 divisor; CARD64 remainder; } xPresentRedirectNotify; #define sz_xPresentRedirectNotify 104 #endif #undef Window #undef Pixmap #undef Region #undef XSyncFence #undef EventID #endif PKZiEA X11/extensions/xf86bigfproto.hnu[/* * Declarations of request structures for the BIGFONT extension. * * Copyright (c) 1999-2000 Bruno Haible * Copyright (c) 1999-2000 The XFree86 Project, Inc. */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ #ifndef _XF86BIGFPROTO_H_ #define _XF86BIGFPROTO_H_ #include #define XF86BIGFONTNAME "XFree86-Bigfont" #define XF86BIGFONT_MAJOR_VERSION 1 /* current version numbers */ #define XF86BIGFONT_MINOR_VERSION 1 typedef struct _XF86BigfontQueryVersion { CARD8 reqType; /* always XF86BigfontReqCode */ CARD8 xf86bigfontReqType; /* always X_XF86BigfontQueryVersion */ CARD16 length; } xXF86BigfontQueryVersionReq; #define sz_xXF86BigfontQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 capabilities; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of XFree86-Bigfont */ CARD16 minorVersion; /* minor version of XFree86-Bigfont */ CARD32 uid; CARD32 gid; CARD32 signature; CARD32 pad1; CARD32 pad2; } xXF86BigfontQueryVersionReply; #define sz_xXF86BigfontQueryVersionReply 32 /* Bit masks that can be set in the capabilities */ #define XF86Bigfont_CAP_LocalShm 1 typedef struct _XF86BigfontQueryFont { CARD8 reqType; /* always XF86BigfontReqCode */ CARD8 xf86bigfontReqType; /* always X_XF86BigfontQueryFont */ CARD16 length; CARD32 id; CARD32 flags; } xXF86BigfontQueryFontReq; #define sz_xXF86BigfontQueryFontReq 12 typedef struct { BYTE type; /* X_Reply */ CARD8 pad1; CARD16 sequenceNumber; CARD32 length; xCharInfo minBounds; #ifndef WORD64 CARD32 walign1; #endif xCharInfo maxBounds; #ifndef WORD64 CARD32 walign2; #endif CARD16 minCharOrByte2; CARD16 maxCharOrByte2; CARD16 defaultChar; CARD16 nFontProps; CARD8 drawDirection; CARD8 minByte1; CARD8 maxByte1; BOOL allCharsExist; INT16 fontAscent; INT16 fontDescent; CARD32 nCharInfos; CARD32 nUniqCharInfos; CARD32 shmid; CARD32 shmsegoffset; /* followed by nFontProps xFontProp structures */ /* and if nCharInfos > 0 && shmid == -1, followed by nUniqCharInfos xCharInfo structures and then by nCharInfos CARD16 indices (each >= 0, < nUniqCharInfos) and then, if nCharInfos is odd, one more CARD16 for padding. */ } xXF86BigfontQueryFontReply; #define sz_xXF86BigfontQueryFontReply 72 /* Bit masks that can be set in the flags */ #define XF86Bigfont_FLAGS_Shm 1 #endif /* _XF86BIGFPROTO_H_ */ PKZgLLX11/extensions/XKBstr.hnu[/************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _XKBSTR_H_ #define _XKBSTR_H_ #include #define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) #define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) #define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) /* * The Xkb structs are full of implicit padding to properly align members. * We can't clean that up without breaking ABI, so tell clang not to bother * complaining about it. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpadded" #endif /* * Common data structures and access macros */ typedef struct _XkbStateRec { unsigned char group; unsigned char locked_group; unsigned short base_group; unsigned short latched_group; unsigned char mods; unsigned char base_mods; unsigned char latched_mods; unsigned char locked_mods; unsigned char compat_state; unsigned char grab_mods; unsigned char compat_grab_mods; unsigned char lookup_mods; unsigned char compat_lookup_mods; unsigned short ptr_buttons; } XkbStateRec,*XkbStatePtr; #define XkbModLocks(s) ((s)->locked_mods) #define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s)) #define XkbGroupLock(s) ((s)->locked_group) #define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s)) #define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) #define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) typedef struct _XkbMods { unsigned char mask; /* effective mods */ unsigned char real_mods; unsigned short vmods; } XkbModsRec,*XkbModsPtr; typedef struct _XkbKTMapEntry { Bool active; unsigned char level; XkbModsRec mods; } XkbKTMapEntryRec,*XkbKTMapEntryPtr; typedef struct _XkbKeyType { XkbModsRec mods; unsigned char num_levels; unsigned char map_count; /* map is an array of map_count XkbKTMapEntryRec structs */ XkbKTMapEntryPtr map; /* preserve is an array of map_count XkbModsRec structs */ XkbModsPtr preserve; Atom name; /* level_names is an array of num_levels Atoms */ Atom * level_names; } XkbKeyTypeRec, *XkbKeyTypePtr; #define XkbNumGroups(g) ((g)&0x0f) #define XkbOutOfRangeGroupInfo(g) ((g)&0xf0) #define XkbOutOfRangeGroupAction(g) ((g)&0xc0) #define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4) #define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f)) #define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) /* * Structures and access macros used primarily by the server */ typedef struct _XkbBehavior { unsigned char type; unsigned char data; } XkbBehavior; #define XkbAnyActionDataSize 7 typedef struct _XkbAnyAction { unsigned char type; unsigned char data[XkbAnyActionDataSize]; } XkbAnyAction; typedef struct _XkbModAction { unsigned char type; unsigned char flags; unsigned char mask; unsigned char real_mods; unsigned char vmods1; unsigned char vmods2; } XkbModAction; #define XkbModActionVMods(a) \ ((short)(((a)->vmods1<<8)|((a)->vmods2))) #define XkbSetModActionVMods(a,v) \ (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff)) typedef struct _XkbGroupAction { unsigned char type; unsigned char flags; char group_XXX; } XkbGroupAction; #define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) #define XkbSASetGroup(a,g) ((a)->group_XXX=(g)) typedef struct _XkbISOAction { unsigned char type; unsigned char flags; unsigned char mask; unsigned char real_mods; char group_XXX; unsigned char affect; unsigned char vmods1; unsigned char vmods2; } XkbISOAction; typedef struct _XkbPtrAction { unsigned char type; unsigned char flags; unsigned char high_XXX; unsigned char low_XXX; unsigned char high_YYY; unsigned char low_YYY; } XkbPtrAction; #define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX)) #define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY)) #define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX)) #define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY)) typedef struct _XkbPtrBtnAction { unsigned char type; unsigned char flags; unsigned char count; unsigned char button; } XkbPtrBtnAction; typedef struct _XkbPtrDfltAction { unsigned char type; unsigned char flags; unsigned char affect; char valueXXX; } XkbPtrDfltAction; #define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) #define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff)) typedef struct _XkbSwitchScreenAction { unsigned char type; unsigned char flags; char screenXXX; } XkbSwitchScreenAction; #define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) #define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff)) typedef struct _XkbCtrlsAction { unsigned char type; unsigned char flags; unsigned char ctrls3; unsigned char ctrls2; unsigned char ctrls1; unsigned char ctrls0; } XkbCtrlsAction; #define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\ ((a)->ctrls2=(((c)>>16)&0xff)),\ ((a)->ctrls1=(((c)>>8)&0xff)),\ ((a)->ctrls0=((c)&0xff))) #define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\ (((unsigned int)(a)->ctrls2)<<16)|\ (((unsigned int)(a)->ctrls1)<<8)|\ ((unsigned int)((a)->ctrls0))) typedef struct _XkbMessageAction { unsigned char type; unsigned char flags; unsigned char message[6]; } XkbMessageAction; typedef struct _XkbRedirectKeyAction { unsigned char type; unsigned char new_key; unsigned char mods_mask; unsigned char mods; unsigned char vmods_mask0; unsigned char vmods_mask1; unsigned char vmods0; unsigned char vmods1; } XkbRedirectKeyAction; #define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ ((unsigned int)(a)->vmods0)) #define XkbSARedirectSetVMods(a,m) (((a)->vmods1=(((m)>>8)&0xff)),\ ((a)->vmods0=((m)&0xff))) #define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ ((unsigned int)(a)->vmods_mask0)) #define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ ((a)->vmods_mask0=((m)&0xff))) typedef struct _XkbDeviceBtnAction { unsigned char type; unsigned char flags; unsigned char count; unsigned char button; unsigned char device; } XkbDeviceBtnAction; typedef struct _XkbDeviceValuatorAction { unsigned char type; unsigned char device; unsigned char v1_what; unsigned char v1_ndx; unsigned char v1_value; unsigned char v2_what; unsigned char v2_ndx; unsigned char v2_value; } XkbDeviceValuatorAction; typedef union _XkbAction { XkbAnyAction any; XkbModAction mods; XkbGroupAction group; XkbISOAction iso; XkbPtrAction ptr; XkbPtrBtnAction btn; XkbPtrDfltAction dflt; XkbSwitchScreenAction screen; XkbCtrlsAction ctrls; XkbMessageAction msg; XkbRedirectKeyAction redirect; XkbDeviceBtnAction devbtn; XkbDeviceValuatorAction devval; unsigned char type; } XkbAction; typedef struct _XkbControls { unsigned char mk_dflt_btn; unsigned char num_groups; unsigned char groups_wrap; XkbModsRec internal; XkbModsRec ignore_lock; unsigned int enabled_ctrls; unsigned short repeat_delay; unsigned short repeat_interval; unsigned short slow_keys_delay; unsigned short debounce_delay; unsigned short mk_delay; unsigned short mk_interval; unsigned short mk_time_to_max; unsigned short mk_max_speed; short mk_curve; unsigned short ax_options; unsigned short ax_timeout; unsigned short axt_opts_mask; unsigned short axt_opts_values; unsigned int axt_ctrls_mask; unsigned int axt_ctrls_values; unsigned char per_key_repeat[XkbPerKeyBitArraySize]; } XkbControlsRec, *XkbControlsPtr; #define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask) #define XkbAX_NeedOption(c,w) ((c)->ax_options&(w)) #define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) typedef struct _XkbServerMapRec { /* acts is an array of XkbActions structs, with size_acts entries allocated, and num_acts entries used. */ unsigned short num_acts; unsigned short size_acts; XkbAction *acts; /* behaviors, key_acts, explicit, & vmodmap are all arrays with (xkb->max_key_code + 1) entries allocated for each. */ XkbBehavior *behaviors; unsigned short *key_acts; #if defined(__cplusplus) || defined(c_plusplus) /* explicit is a C++ reserved word */ unsigned char *c_explicit; #else unsigned char *explicit; #endif unsigned char vmods[XkbNumVirtualMods]; unsigned short *vmodmap; } XkbServerMapRec, *XkbServerMapPtr; #define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]]) /* * Structures and access macros used primarily by clients */ typedef struct _XkbSymMapRec { unsigned char kt_index[XkbNumKbdGroups]; unsigned char group_info; unsigned char width; unsigned short offset; } XkbSymMapRec, *XkbSymMapPtr; typedef struct _XkbClientMapRec { /* types is an array of XkbKeyTypeRec structs, with size_types entries allocated, and num_types entries used. */ unsigned char size_types; unsigned char num_types; XkbKeyTypePtr types; /* syms is an array of size_syms KeySyms, in which num_syms are used */ unsigned short size_syms; unsigned short num_syms; KeySym *syms; /* key_sym_map is an array of (max_key_code + 1) XkbSymMapRec structs */ XkbSymMapPtr key_sym_map; /* modmap is an array of (max_key_code + 1) unsigned chars */ unsigned char *modmap; } XkbClientMapRec, *XkbClientMapPtr; #define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info) #define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info)) #define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels) #define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width) #define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3]) #define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)]) #define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k)) #define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset) #define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)]) /* * Compatibility structures and access macros */ typedef struct _XkbSymInterpretRec { KeySym sym; unsigned char flags; unsigned char match; unsigned char mods; unsigned char virtual_mod; XkbAnyAction act; } XkbSymInterpretRec,*XkbSymInterpretPtr; typedef struct _XkbCompatMapRec { /* sym_interpret is an array of XkbSymInterpretRec structs, in which size_si are allocated & num_si are used. */ XkbSymInterpretPtr sym_interpret; XkbModsRec groups[XkbNumKbdGroups]; unsigned short num_si; unsigned short size_si; } XkbCompatMapRec, *XkbCompatMapPtr; typedef struct _XkbIndicatorMapRec { unsigned char flags; unsigned char which_groups; unsigned char groups; unsigned char which_mods; XkbModsRec mods; unsigned int ctrls; } XkbIndicatorMapRec, *XkbIndicatorMapPtr; #define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\ (((i)->which_groups&&(i)->groups)||\ ((i)->which_mods&&(i)->mods.mask)||\ ((i)->ctrls))) #define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\ ((i)->which_mods)||((i)->ctrls)) typedef struct _XkbIndicatorRec { unsigned long phys_indicators; XkbIndicatorMapRec maps[XkbNumIndicators]; } XkbIndicatorRec,*XkbIndicatorPtr; typedef struct _XkbKeyNameRec { char name[XkbKeyNameLength]; } XkbKeyNameRec,*XkbKeyNamePtr; typedef struct _XkbKeyAliasRec { char real[XkbKeyNameLength]; char alias[XkbKeyNameLength]; } XkbKeyAliasRec,*XkbKeyAliasPtr; /* * Names for everything */ typedef struct _XkbNamesRec { Atom keycodes; Atom geometry; Atom symbols; Atom types; Atom compat; Atom vmods[XkbNumVirtualMods]; Atom indicators[XkbNumIndicators]; Atom groups[XkbNumKbdGroups]; /* keys is an array of (xkb->max_key_code + 1) XkbKeyNameRec entries */ XkbKeyNamePtr keys; /* key_aliases is an array of num_key_aliases XkbKeyAliasRec entries */ XkbKeyAliasPtr key_aliases; /* radio_groups is an array of num_rg Atoms */ Atom *radio_groups; Atom phys_symbols; /* num_keys seems to be unused in libX11 */ unsigned char num_keys; unsigned char num_key_aliases; unsigned short num_rg; } XkbNamesRec,*XkbNamesPtr; typedef struct _XkbGeometry *XkbGeometryPtr; /* * Tie it all together into one big keyboard description */ typedef struct _XkbDesc { struct _XDisplay * dpy; unsigned short flags; unsigned short device_spec; KeyCode min_key_code; KeyCode max_key_code; XkbControlsPtr ctrls; XkbServerMapPtr server; XkbClientMapPtr map; XkbIndicatorPtr indicators; XkbNamesPtr names; XkbCompatMapPtr compat; XkbGeometryPtr geom; } XkbDescRec, *XkbDescPtr; #define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g)) #define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g)) #define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g)) #define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k)) #define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k))) #define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k))) #define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k))) #define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k))) #define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n]) #define XkbKeySymEntry(d,k,sl,g) \ (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl)))) #define XkbKeyAction(d,k,n) \ (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL) #define XkbKeyActionEntry(d,k,sl,g) \ (XkbKeyHasActions(d,k)?\ XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL) #define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0) #define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1) #define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k)) #define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\ ((k)<=(d)->max_key_code)) #define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1) /* * The following structures can be used to track changes * to a keyboard device */ typedef struct _XkbMapChanges { unsigned short changed; KeyCode min_key_code; KeyCode max_key_code; unsigned char first_type; unsigned char num_types; KeyCode first_key_sym; unsigned char num_key_syms; KeyCode first_key_act; unsigned char num_key_acts; KeyCode first_key_behavior; unsigned char num_key_behaviors; KeyCode first_key_explicit; unsigned char num_key_explicit; KeyCode first_modmap_key; unsigned char num_modmap_keys; KeyCode first_vmodmap_key; unsigned char num_vmodmap_keys; unsigned char pad; unsigned short vmods; } XkbMapChangesRec,*XkbMapChangesPtr; typedef struct _XkbControlsChanges { unsigned int changed_ctrls; unsigned int enabled_ctrls_changes; Bool num_groups_changed; } XkbControlsChangesRec,*XkbControlsChangesPtr; typedef struct _XkbIndicatorChanges { unsigned int state_changes; unsigned int map_changes; } XkbIndicatorChangesRec,*XkbIndicatorChangesPtr; typedef struct _XkbNameChanges { unsigned int changed; unsigned char first_type; unsigned char num_types; unsigned char first_lvl; unsigned char num_lvls; unsigned char num_aliases; unsigned char num_rg; unsigned char first_key; unsigned char num_keys; unsigned short changed_vmods; unsigned long changed_indicators; unsigned char changed_groups; } XkbNameChangesRec,*XkbNameChangesPtr; typedef struct _XkbCompatChanges { unsigned char changed_groups; unsigned short first_si; unsigned short num_si; } XkbCompatChangesRec,*XkbCompatChangesPtr; typedef struct _XkbChanges { unsigned short device_spec; unsigned short state_changes; XkbMapChangesRec map; XkbControlsChangesRec ctrls; XkbIndicatorChangesRec indicators; XkbNameChangesRec names; XkbCompatChangesRec compat; } XkbChangesRec, *XkbChangesPtr; /* * These data structures are used to construct a keymap from * a set of components or to list components in the server * database. */ typedef struct _XkbComponentNames { char * keymap; char * keycodes; char * types; char * compat; char * symbols; char * geometry; } XkbComponentNamesRec, *XkbComponentNamesPtr; typedef struct _XkbComponentName { unsigned short flags; char * name; } XkbComponentNameRec,*XkbComponentNamePtr; typedef struct _XkbComponentList { int num_keymaps; int num_keycodes; int num_types; int num_compat; int num_symbols; int num_geometry; XkbComponentNamePtr keymaps; XkbComponentNamePtr keycodes; XkbComponentNamePtr types; XkbComponentNamePtr compat; XkbComponentNamePtr symbols; XkbComponentNamePtr geometry; } XkbComponentListRec, *XkbComponentListPtr; /* * The following data structures describe and track changes to a * non-keyboard extension device */ typedef struct _XkbDeviceLedInfo { unsigned short led_class; unsigned short led_id; unsigned int phys_indicators; unsigned int maps_present; unsigned int names_present; unsigned int state; Atom names[XkbNumIndicators]; XkbIndicatorMapRec maps[XkbNumIndicators]; } XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr; typedef struct _XkbDeviceInfo { char * name; Atom type; unsigned short device_spec; Bool has_own_state; unsigned short supported; unsigned short unsupported; /* btn_acts is an array of num_btn XkbAction entries */ unsigned short num_btns; XkbAction * btn_acts; unsigned short sz_leds; unsigned short num_leds; unsigned short dflt_kbd_fb; unsigned short dflt_led_fb; /* leds is an array of XkbDeviceLedInfoRec in which sz_leds entries are allocated and num_leds entries are used */ XkbDeviceLedInfoPtr leds; } XkbDeviceInfoRec,*XkbDeviceInfoPtr; #define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL)) #define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns)) #define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL)) typedef struct _XkbDeviceLedChanges { unsigned short led_class; unsigned short led_id; unsigned int defined; /* names or maps changed */ struct _XkbDeviceLedChanges *next; } XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr; typedef struct _XkbDeviceChanges { unsigned int changed; unsigned short first_btn; unsigned short num_btns; XkbDeviceLedChangesRec leds; } XkbDeviceChangesRec,*XkbDeviceChangesPtr; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif /* _XKBSTR_H_ */ PKZrSllX11/extensions/saver.hnu[/* Copyright (c) 1992 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. * * Author: Keith Packard, MIT X Consortium */ #ifndef _SAVER_H_ #define _SAVER_H_ #define ScreenSaverName "MIT-SCREEN-SAVER" #define ScreenSaverPropertyName "_MIT_SCREEN_SAVER_ID" #define ScreenSaverNotifyMask 0x00000001 #define ScreenSaverCycleMask 0x00000002 #define ScreenSaverMajorVersion 1 #define ScreenSaverMinorVersion 1 #define ScreenSaverOff 0 #define ScreenSaverOn 1 #define ScreenSaverCycle 2 #define ScreenSaverDisabled 3 #define ScreenSaverBlanked 0 #define ScreenSaverInternal 1 #define ScreenSaverExternal 2 #define ScreenSaverNotify 0 #define ScreenSaverNumberEvents 1 #endif /* _SAVER_H_ */ PKZf X11/extensions/EVIproto.hnu[/************************************************************ Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _EVIPROTO_H_ #define _EVIPROTO_H_ #include #define X_EVIQueryVersion 0 #define X_EVIGetVisualInfo 1 #define VisualID CARD32 typedef CARD32 VisualID32; #define sz_VisualID32 4 typedef struct _xExtendedVisualInfo { VisualID core_visual_id; INT8 screen; INT8 level; CARD8 transparency_type; CARD8 pad0; CARD32 transparency_value; CARD8 min_hw_colormaps; CARD8 max_hw_colormaps; CARD16 num_colormap_conflicts; } xExtendedVisualInfo; #define sz_xExtendedVisualInfo 16 typedef struct _XEVIQueryVersion { CARD8 reqType; /* always XEVIReqCode */ CARD8 xeviReqType; /* always X_EVIQueryVersion */ CARD16 length; } xEVIQueryVersionReq; #define sz_xEVIQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of EVI protocol */ CARD16 minorVersion; /* minor version of EVI protocol */ CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xEVIQueryVersionReply; #define sz_xEVIQueryVersionReply 32 typedef struct _XEVIGetVisualInfoReq { CARD8 reqType; /* always XEVIReqCode */ CARD8 xeviReqType; /* always X_EVIGetVisualInfo */ CARD16 length; CARD32 n_visual; } xEVIGetVisualInfoReq; #define sz_xEVIGetVisualInfoReq 8 typedef struct _XEVIGetVisualInfoReply { BYTE type; /* X_Reply */ CARD8 unused; CARD16 sequenceNumber; CARD32 length; CARD32 n_info; CARD32 n_conflicts; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xEVIGetVisualInfoReply; #define sz_xEVIGetVisualInfoReply 32 #undef VisualID #endif /* _EVIPROTO_H_ */ PKZԲ  X11/extensions/saverproto.hnu[/* Copyright (c) 1992 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. * * Author: Keith Packard, MIT X Consortium */ #ifndef _SAVERPROTO_H_ #define _SAVERPROTO_H_ #include #define Window CARD32 #define Drawable CARD32 #define Font CARD32 #define Pixmap CARD32 #define Cursor CARD32 #define Colormap CARD32 #define GContext CARD32 #define Atom CARD32 #define VisualID CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define X_ScreenSaverQueryVersion 0 typedef struct _ScreenSaverQueryVersion { CARD8 reqType; /* always ScreenSaverReqCode */ CARD8 saverReqType; /* always X_ScreenSaverQueryVersion */ CARD16 length; CARD8 clientMajor; CARD8 clientMinor; CARD16 unused; } xScreenSaverQueryVersionReq; #define sz_xScreenSaverQueryVersionReq 8 typedef struct { CARD8 type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of protocol */ CARD16 minorVersion; /* minor version of protocol */ CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xScreenSaverQueryVersionReply; #define sz_xScreenSaverQueryVersionReply 32 #define X_ScreenSaverQueryInfo 1 typedef struct _ScreenSaverQueryInfo { CARD8 reqType; /* always ScreenSaverReqCode */ CARD8 saverReqType; /* always X_ScreenSaverQueryInfo */ CARD16 length; Drawable drawable; } xScreenSaverQueryInfoReq; #define sz_xScreenSaverQueryInfoReq 8 typedef struct { CARD8 type; /* X_Reply */ BYTE state; /* Off, On */ CARD16 sequenceNumber; CARD32 length; Window window; CARD32 tilOrSince; CARD32 idle; CARD32 eventMask; BYTE kind; /* Blanked, Internal, External */ CARD8 pad0; CARD16 pad1; CARD32 pad2; } xScreenSaverQueryInfoReply; #define sz_xScreenSaverQueryInfoReply 32 #define X_ScreenSaverSelectInput 2 typedef struct _ScreenSaverSelectInput { CARD8 reqType; /* always ScreenSaverReqCode */ CARD8 saverReqType; /* always X_ScreenSaverSelectInput */ CARD16 length; Drawable drawable; CARD32 eventMask; } xScreenSaverSelectInputReq; #define sz_xScreenSaverSelectInputReq 12 #define X_ScreenSaverSetAttributes 3 typedef struct _ScreenSaverSetAttributes { CARD8 reqType; /* always ScreenSaverReqCode */ CARD8 saverReqType; /* always X_ScreenSaverSetAttributes */ CARD16 length; Drawable drawable; INT16 x, y; CARD16 width, height, borderWidth; BYTE c_class; CARD8 depth; VisualID visualID; CARD32 mask; } xScreenSaverSetAttributesReq; #define sz_xScreenSaverSetAttributesReq 28 #define X_ScreenSaverUnsetAttributes 4 typedef struct _ScreenSaverUnsetAttributes { CARD8 reqType; /* always ScreenSaverReqCode */ CARD8 saverReqType; /* always X_ScreenSaverUnsetAttributes */ CARD16 length; Drawable drawable; } xScreenSaverUnsetAttributesReq; #define sz_xScreenSaverUnsetAttributesReq 8 #define X_ScreenSaverSuspend 5 typedef struct _ScreenSaverSuspend { CARD8 reqType; CARD8 saverReqType; CARD16 length; CARD32 suspend; /* a boolean, but using the wrong encoding */ } xScreenSaverSuspendReq; #define sz_xScreenSaverSuspendReq 8 typedef struct _ScreenSaverNotify { CARD8 type; /* always eventBase + ScreenSaverNotify */ BYTE state; /* off, on, cycle */ CARD16 sequenceNumber; Time timestamp; Window root; Window window; /* screen saver window */ BYTE kind; /* blanked, internal, external */ BYTE forced; CARD16 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xScreenSaverNotifyEvent; #define sz_xScreenSaverNotifyEvent 32 #undef Window #undef Drawable #undef Font #undef Pixmap #undef Cursor #undef Colormap #undef GContext #undef Atom #undef VisualID #undef Time #undef KeyCode #undef KeySym #endif /* _SAVERPROTO_H_ */ PKZ< ==X11/extensions/XKBgeom.hnu[/************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ #ifndef _XKBGEOM_H_ #define _XKBGEOM_H_ #include #ifdef XKB_IN_SERVER #define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias #define XkbAddGeomColor SrvXkbAddGeomColor #define XkbAddGeomDoodad SrvXkbAddGeomDoodad #define XkbAddGeomKey SrvXkbAddGeomKey #define XkbAddGeomOutline SrvXkbAddGeomOutline #define XkbAddGeomOverlay SrvXkbAddGeomOverlay #define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow #define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey #define XkbAddGeomProperty SrvXkbAddGeomProperty #define XkbAddGeomRow SrvXkbAddGeomRow #define XkbAddGeomSection SrvXkbAddGeomSection #define XkbAddGeomShape SrvXkbAddGeomShape #define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases #define XkbAllocGeomColors SrvXkbAllocGeomColors #define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads #define XkbAllocGeomKeys SrvXkbAllocGeomKeys #define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines #define XkbAllocGeomPoints SrvXkbAllocGeomPoints #define XkbAllocGeomProps SrvXkbAllocGeomProps #define XkbAllocGeomRows SrvXkbAllocGeomRows #define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads #define XkbAllocGeomSections SrvXkbAllocGeomSections #define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays #define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows #define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys #define XkbAllocGeomShapes SrvXkbAllocGeomShapes #define XkbAllocGeometry SrvXkbAllocGeometry #define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases #define XkbFreeGeomColors SrvXkbFreeGeomColors #define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads #define XkbFreeGeomProperties SrvXkbFreeGeomProperties #define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys #define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows #define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays #define XkbFreeGeomKeys SrvXkbFreeGeomKeys #define XkbFreeGeomRows SrvXkbFreeGeomRows #define XkbFreeGeomSections SrvXkbFreeGeomSections #define XkbFreeGeomPoints SrvXkbFreeGeomPoints #define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines #define XkbFreeGeomShapes SrvXkbFreeGeomShapes #define XkbFreeGeometry SrvXkbFreeGeometry #endif typedef struct _XkbProperty { char *name; char *value; } XkbPropertyRec,*XkbPropertyPtr; typedef struct _XkbColor { unsigned int pixel; char * spec; } XkbColorRec,*XkbColorPtr; typedef struct _XkbPoint { short x; short y; } XkbPointRec, *XkbPointPtr; typedef struct _XkbBounds { short x1,y1; short x2,y2; } XkbBoundsRec, *XkbBoundsPtr; #define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) #define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) /* * In the following structs, this pattern is used for dynamically sized arrays: * foo is an array for which sz_foo entries are allocated & num_foo are used */ typedef struct _XkbOutline { unsigned short num_points; unsigned short sz_points; unsigned short corner_radius; XkbPointPtr points; } XkbOutlineRec, *XkbOutlinePtr; typedef struct _XkbShape { Atom name; unsigned short num_outlines; unsigned short sz_outlines; XkbOutlinePtr outlines; XkbOutlinePtr approx; XkbOutlinePtr primary; XkbBoundsRec bounds; } XkbShapeRec, *XkbShapePtr; #define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) typedef struct _XkbShapeDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; unsigned short color_ndx; unsigned short shape_ndx; } XkbShapeDoodadRec, *XkbShapeDoodadPtr; #define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) #define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) #define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) #define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) typedef struct _XkbTextDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; short width; short height; unsigned short color_ndx; char * text; char * font; } XkbTextDoodadRec, *XkbTextDoodadPtr; #define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) #define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) typedef struct _XkbIndicatorDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; unsigned short shape_ndx; unsigned short on_color_ndx; unsigned short off_color_ndx; } XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr; #define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) #define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) #define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) #define XkbSetIndicatorDoodadOnColor(g,d,c) \ ((d)->on_color_ndx= (c)-&(g)->colors[0]) #define XkbSetIndicatorDoodadOffColor(g,d,c) \ ((d)->off_color_ndx= (c)-&(g)->colors[0]) #define XkbSetIndicatorDoodadShape(g,d,s) \ ((d)->shape_ndx= (s)-&(g)->shapes[0]) typedef struct _XkbLogoDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; unsigned short color_ndx; unsigned short shape_ndx; char * logo_name; } XkbLogoDoodadRec, *XkbLogoDoodadPtr; #define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) #define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) #define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) #define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) typedef struct _XkbAnyDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; } XkbAnyDoodadRec, *XkbAnyDoodadPtr; typedef union _XkbDoodad { XkbAnyDoodadRec any; XkbShapeDoodadRec shape; XkbTextDoodadRec text; XkbIndicatorDoodadRec indicator; XkbLogoDoodadRec logo; } XkbDoodadRec, *XkbDoodadPtr; #define XkbUnknownDoodad 0 #define XkbOutlineDoodad 1 #define XkbSolidDoodad 2 #define XkbTextDoodad 3 #define XkbIndicatorDoodad 4 #define XkbLogoDoodad 5 typedef struct _XkbKey { XkbKeyNameRec name; short gap; unsigned char shape_ndx; unsigned char color_ndx; } XkbKeyRec, *XkbKeyPtr; #define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) #define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) #define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) #define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) typedef struct _XkbRow { short top; short left; unsigned short num_keys; unsigned short sz_keys; int vertical; XkbKeyPtr keys; XkbBoundsRec bounds; } XkbRowRec, *XkbRowPtr; typedef struct _XkbSection { Atom name; unsigned char priority; short top; short left; unsigned short width; unsigned short height; short angle; unsigned short num_rows; unsigned short num_doodads; unsigned short num_overlays; unsigned short sz_rows; unsigned short sz_doodads; unsigned short sz_overlays; XkbRowPtr rows; XkbDoodadPtr doodads; XkbBoundsRec bounds; struct _XkbOverlay *overlays; } XkbSectionRec, *XkbSectionPtr; typedef struct _XkbOverlayKey { XkbKeyNameRec over; XkbKeyNameRec under; } XkbOverlayKeyRec,*XkbOverlayKeyPtr; typedef struct _XkbOverlayRow { unsigned short row_under; unsigned short num_keys; unsigned short sz_keys; XkbOverlayKeyPtr keys; } XkbOverlayRowRec,*XkbOverlayRowPtr; typedef struct _XkbOverlay { Atom name; XkbSectionPtr section_under; unsigned short num_rows; unsigned short sz_rows; XkbOverlayRowPtr rows; XkbBoundsPtr bounds; } XkbOverlayRec,*XkbOverlayPtr; typedef struct _XkbGeometry { Atom name; unsigned short width_mm; unsigned short height_mm; char * label_font; XkbColorPtr label_color; XkbColorPtr base_color; unsigned short sz_properties; unsigned short sz_colors; unsigned short sz_shapes; unsigned short sz_sections; unsigned short sz_doodads; unsigned short sz_key_aliases; unsigned short num_properties; unsigned short num_colors; unsigned short num_shapes; unsigned short num_sections; unsigned short num_doodads; unsigned short num_key_aliases; XkbPropertyPtr properties; XkbColorPtr colors; XkbShapePtr shapes; XkbSectionPtr sections; XkbDoodadPtr doodads; XkbKeyAliasPtr key_aliases; } XkbGeometryRec; #define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) #define XkbGeomPropertiesMask (1<<0) #define XkbGeomColorsMask (1<<1) #define XkbGeomShapesMask (1<<2) #define XkbGeomSectionsMask (1<<3) #define XkbGeomDoodadsMask (1<<4) #define XkbGeomKeyAliasesMask (1<<5) #define XkbGeomAllMask (0x3f) typedef struct _XkbGeometrySizes { unsigned int which; unsigned short num_properties; unsigned short num_colors; unsigned short num_shapes; unsigned short num_sections; unsigned short num_doodads; unsigned short num_key_aliases; } XkbGeometrySizesRec,*XkbGeometrySizesPtr; _XFUNCPROTOBEGIN extern XkbPropertyPtr XkbAddGeomProperty( XkbGeometryPtr /* geom */, char * /* name */, char * /* value */ ); extern XkbKeyAliasPtr XkbAddGeomKeyAlias( XkbGeometryPtr /* geom */, char * /* alias */, char * /* real */ ); extern XkbColorPtr XkbAddGeomColor( XkbGeometryPtr /* geom */, char * /* spec */, unsigned int /* pixel */ ); extern XkbOutlinePtr XkbAddGeomOutline( XkbShapePtr /* shape */, int /* sz_points */ ); extern XkbShapePtr XkbAddGeomShape( XkbGeometryPtr /* geom */, Atom /* name */, int /* sz_outlines */ ); extern XkbKeyPtr XkbAddGeomKey( XkbRowPtr /* row */ ); extern XkbRowPtr XkbAddGeomRow( XkbSectionPtr /* section */, int /* sz_keys */ ); extern XkbSectionPtr XkbAddGeomSection( XkbGeometryPtr /* geom */, Atom /* name */, int /* sz_rows */, int /* sz_doodads */, int /* sz_overlays */ ); extern XkbOverlayPtr XkbAddGeomOverlay( XkbSectionPtr /* section */, Atom /* name */, int /* sz_rows */ ); extern XkbOverlayRowPtr XkbAddGeomOverlayRow( XkbOverlayPtr /* overlay */, int /* row_under */, int /* sz_keys */ ); extern XkbOverlayKeyPtr XkbAddGeomOverlayKey( XkbOverlayPtr /* overlay */, XkbOverlayRowPtr /* row */, char * /* over */, char * /* under */ ); extern XkbDoodadPtr XkbAddGeomDoodad( XkbGeometryPtr /* geom */, XkbSectionPtr /* section */, Atom /* name */ ); extern void XkbFreeGeomKeyAliases( XkbGeometryPtr /* geom */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomColors( XkbGeometryPtr /* geom */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomDoodads( XkbDoodadPtr /* doodads */, int /* nDoodads */, Bool /* freeAll */ ); extern void XkbFreeGeomProperties( XkbGeometryPtr /* geom */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomOverlayKeys( XkbOverlayRowPtr /* row */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomOverlayRows( XkbOverlayPtr /* overlay */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomOverlays( XkbSectionPtr /* section */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomKeys( XkbRowPtr /* row */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomRows( XkbSectionPtr /* section */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomSections( XkbGeometryPtr /* geom */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomPoints( XkbOutlinePtr /* outline */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomOutlines( XkbShapePtr /* shape */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeomShapes( XkbGeometryPtr /* geom */, int /* first */, int /* count */, Bool /* freeAll */ ); extern void XkbFreeGeometry( XkbGeometryPtr /* geom */, unsigned int /* which */, Bool /* freeMap */ ); extern Status XkbAllocGeomProps( XkbGeometryPtr /* geom */, int /* nProps */ ); extern Status XkbAllocGeomKeyAliases( XkbGeometryPtr /* geom */, int /* nAliases */ ); extern Status XkbAllocGeomColors( XkbGeometryPtr /* geom */, int /* nColors */ ); extern Status XkbAllocGeomShapes( XkbGeometryPtr /* geom */, int /* nShapes */ ); extern Status XkbAllocGeomSections( XkbGeometryPtr /* geom */, int /* nSections */ ); extern Status XkbAllocGeomOverlays( XkbSectionPtr /* section */, int /* num_needed */ ); extern Status XkbAllocGeomOverlayRows( XkbOverlayPtr /* overlay */, int /* num_needed */ ); extern Status XkbAllocGeomOverlayKeys( XkbOverlayRowPtr /* row */, int /* num_needed */ ); extern Status XkbAllocGeomDoodads( XkbGeometryPtr /* geom */, int /* nDoodads */ ); extern Status XkbAllocGeomSectionDoodads( XkbSectionPtr /* section */, int /* nDoodads */ ); extern Status XkbAllocGeomOutlines( XkbShapePtr /* shape */, int /* nOL */ ); extern Status XkbAllocGeomRows( XkbSectionPtr /* section */, int /* nRows */ ); extern Status XkbAllocGeomPoints( XkbOutlinePtr /* ol */, int /* nPts */ ); extern Status XkbAllocGeomKeys( XkbRowPtr /* row */, int /* nKeys */ ); extern Status XkbAllocGeometry( XkbDescPtr /* xkb */, XkbGeometrySizesPtr /* sizes */ ); extern Status XkbSetGeometry( Display * /* dpy */, unsigned /* deviceSpec */, XkbGeometryPtr /* geom */ ); extern Bool XkbComputeShapeTop( XkbShapePtr /* shape */, XkbBoundsPtr /* bounds */ ); extern Bool XkbComputeShapeBounds( XkbShapePtr /* shape */ ); extern Bool XkbComputeRowBounds( XkbGeometryPtr /* geom */, XkbSectionPtr /* section */, XkbRowPtr /* row */ ); extern Bool XkbComputeSectionBounds( XkbGeometryPtr /* geom */, XkbSectionPtr /* section */ ); extern char * XkbFindOverlayForKey( XkbGeometryPtr /* geom */, XkbSectionPtr /* wanted */, char * /* under */ ); extern Status XkbGetGeometry( Display * /* dpy */, XkbDescPtr /* xkb */ ); extern Status XkbGetNamedGeometry( Display * /* dpy */, XkbDescPtr /* xkb */, Atom /* name */ ); _XFUNCPROTOEND #endif /* _XKBSTR_H_ */ PKZǽ X11/extensions/cupproto.hnu[/* Copyright 1987, 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _XCUPPROTO_H_ /* { */ #define _XCUPPROTO_H_ #include #define X_XcupQueryVersion 0 #define X_XcupGetReservedColormapEntries 1 #define X_XcupStoreColors 2 typedef struct _XcupQueryVersion { CARD8 reqType; /* always XcupReqCode */ CARD8 xcupReqType; /* always X_XcupQueryVersion */ CARD16 length; CARD16 client_major_version; CARD16 client_minor_version; } xXcupQueryVersionReq; #define sz_xXcupQueryVersionReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequence_number; CARD32 length; CARD16 server_major_version; CARD16 server_minor_version; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXcupQueryVersionReply; #define sz_xXcupQueryVersionReply 32 typedef struct _XcupGetReservedColormapEntries { CARD8 reqType; /* always XcupReqCode */ CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */ CARD16 length; CARD32 screen; } xXcupGetReservedColormapEntriesReq; #define sz_xXcupGetReservedColormapEntriesReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequence_number; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xXcupGetReservedColormapEntriesReply; #define sz_xXcupGetReservedColormapEntriesReply 32 typedef struct _XcupStoreColors { CARD8 reqType; /* always XcupReqCode */ CARD8 xcupReqType; /* always X_XcupStoreColors */ CARD16 length; CARD32 cmap; } xXcupStoreColorsReq; #define sz_xXcupStoreColorsReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequence_number; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xXcupStoreColorsReply; #define sz_xXcupStoreColorsReply 32 #endif /* } _XCUPPROTO_H_ */ PKZNMX11/extensions/dpmsconst.hnu[/***************************************************************** Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Digital Equipment Corporation shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ #ifndef _DPMSCONST_H #define _DPMSCONST_H 1 #define DPMSMajorVersion 1 #define DPMSMinorVersion 2 #define DPMSExtensionName "DPMS" #define DPMSModeOn 0 #define DPMSModeStandby 1 #define DPMSModeSuspend 2 #define DPMSModeOff 3 #define DPMSInfoNotifyMask (1L << 0) #define DPMSInfoNotify 0 #endif /* !_DPMSCONST_H */ PKZTMX11/extensions/render.hnu[/* * Copyright © 2000 SuSE, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Keith Packard, SuSE, Inc. */ #ifndef _RENDER_H_ #define _RENDER_H_ #include typedef XID Glyph; typedef XID GlyphSet; typedef XID Picture; typedef XID PictFormat; #define RENDER_NAME "RENDER" #define RENDER_MAJOR 0 #define RENDER_MINOR 11 #define X_RenderQueryVersion 0 #define X_RenderQueryPictFormats 1 #define X_RenderQueryPictIndexValues 2 /* 0.7 */ #define X_RenderQueryDithers 3 #define X_RenderCreatePicture 4 #define X_RenderChangePicture 5 #define X_RenderSetPictureClipRectangles 6 #define X_RenderFreePicture 7 #define X_RenderComposite 8 #define X_RenderScale 9 #define X_RenderTrapezoids 10 #define X_RenderTriangles 11 #define X_RenderTriStrip 12 #define X_RenderTriFan 13 #define X_RenderColorTrapezoids 14 #define X_RenderColorTriangles 15 /* #define X_RenderTransform 16 */ #define X_RenderCreateGlyphSet 17 #define X_RenderReferenceGlyphSet 18 #define X_RenderFreeGlyphSet 19 #define X_RenderAddGlyphs 20 #define X_RenderAddGlyphsFromPicture 21 #define X_RenderFreeGlyphs 22 #define X_RenderCompositeGlyphs8 23 #define X_RenderCompositeGlyphs16 24 #define X_RenderCompositeGlyphs32 25 #define X_RenderFillRectangles 26 /* 0.5 */ #define X_RenderCreateCursor 27 /* 0.6 */ #define X_RenderSetPictureTransform 28 #define X_RenderQueryFilters 29 #define X_RenderSetPictureFilter 30 /* 0.8 */ #define X_RenderCreateAnimCursor 31 /* 0.9 */ #define X_RenderAddTraps 32 /* 0.10 */ #define X_RenderCreateSolidFill 33 #define X_RenderCreateLinearGradient 34 #define X_RenderCreateRadialGradient 35 #define X_RenderCreateConicalGradient 36 #define RenderNumberRequests (X_RenderCreateConicalGradient+1) #define BadPictFormat 0 #define BadPicture 1 #define BadPictOp 2 #define BadGlyphSet 3 #define BadGlyph 4 #define RenderNumberErrors (BadGlyph+1) #define PictTypeIndexed 0 #define PictTypeDirect 1 #define PictOpMinimum 0 #define PictOpClear 0 #define PictOpSrc 1 #define PictOpDst 2 #define PictOpOver 3 #define PictOpOverReverse 4 #define PictOpIn 5 #define PictOpInReverse 6 #define PictOpOut 7 #define PictOpOutReverse 8 #define PictOpAtop 9 #define PictOpAtopReverse 10 #define PictOpXor 11 #define PictOpAdd 12 #define PictOpSaturate 13 #define PictOpMaximum 13 /* * Operators only available in version 0.2 */ #define PictOpDisjointMinimum 0x10 #define PictOpDisjointClear 0x10 #define PictOpDisjointSrc 0x11 #define PictOpDisjointDst 0x12 #define PictOpDisjointOver 0x13 #define PictOpDisjointOverReverse 0x14 #define PictOpDisjointIn 0x15 #define PictOpDisjointInReverse 0x16 #define PictOpDisjointOut 0x17 #define PictOpDisjointOutReverse 0x18 #define PictOpDisjointAtop 0x19 #define PictOpDisjointAtopReverse 0x1a #define PictOpDisjointXor 0x1b #define PictOpDisjointMaximum 0x1b #define PictOpConjointMinimum 0x20 #define PictOpConjointClear 0x20 #define PictOpConjointSrc 0x21 #define PictOpConjointDst 0x22 #define PictOpConjointOver 0x23 #define PictOpConjointOverReverse 0x24 #define PictOpConjointIn 0x25 #define PictOpConjointInReverse 0x26 #define PictOpConjointOut 0x27 #define PictOpConjointOutReverse 0x28 #define PictOpConjointAtop 0x29 #define PictOpConjointAtopReverse 0x2a #define PictOpConjointXor 0x2b #define PictOpConjointMaximum 0x2b /* * Operators only available in version 0.11 */ #define PictOpBlendMinimum 0x30 #define PictOpMultiply 0x30 #define PictOpScreen 0x31 #define PictOpOverlay 0x32 #define PictOpDarken 0x33 #define PictOpLighten 0x34 #define PictOpColorDodge 0x35 #define PictOpColorBurn 0x36 #define PictOpHardLight 0x37 #define PictOpSoftLight 0x38 #define PictOpDifference 0x39 #define PictOpExclusion 0x3a #define PictOpHSLHue 0x3b #define PictOpHSLSaturation 0x3c #define PictOpHSLColor 0x3d #define PictOpHSLLuminosity 0x3e #define PictOpBlendMaximum 0x3e #define PolyEdgeSharp 0 #define PolyEdgeSmooth 1 #define PolyModePrecise 0 #define PolyModeImprecise 1 #define CPRepeat (1 << 0) #define CPAlphaMap (1 << 1) #define CPAlphaXOrigin (1 << 2) #define CPAlphaYOrigin (1 << 3) #define CPClipXOrigin (1 << 4) #define CPClipYOrigin (1 << 5) #define CPClipMask (1 << 6) #define CPGraphicsExposure (1 << 7) #define CPSubwindowMode (1 << 8) #define CPPolyEdge (1 << 9) #define CPPolyMode (1 << 10) #define CPDither (1 << 11) #define CPComponentAlpha (1 << 12) #define CPLastBit 12 /* Filters included in 0.6 */ #define FilterNearest "nearest" #define FilterBilinear "bilinear" /* Filters included in 0.10 */ #define FilterConvolution "convolution" #define FilterFast "fast" #define FilterGood "good" #define FilterBest "best" #define FilterAliasNone -1 /* Subpixel orders included in 0.6 */ #define SubPixelUnknown 0 #define SubPixelHorizontalRGB 1 #define SubPixelHorizontalBGR 2 #define SubPixelVerticalRGB 3 #define SubPixelVerticalBGR 4 #define SubPixelNone 5 /* Extended repeat attributes included in 0.10 */ #define RepeatNone 0 #define RepeatNormal 1 #define RepeatPad 2 #define RepeatReflect 3 #endif /* _RENDER_H_ */ PKZ X11/extensions/xfixeswire.hnu[/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _XFIXESWIRE_H_ #define _XFIXESWIRE_H_ #define XFIXES_NAME "XFIXES" #define XFIXES_MAJOR 5 #define XFIXES_MINOR 0 /*************** Version 1 ******************/ #define X_XFixesQueryVersion 0 #define X_XFixesChangeSaveSet 1 #define X_XFixesSelectSelectionInput 2 #define X_XFixesSelectCursorInput 3 #define X_XFixesGetCursorImage 4 /*************** Version 2 ******************/ #define X_XFixesCreateRegion 5 #define X_XFixesCreateRegionFromBitmap 6 #define X_XFixesCreateRegionFromWindow 7 #define X_XFixesCreateRegionFromGC 8 #define X_XFixesCreateRegionFromPicture 9 #define X_XFixesDestroyRegion 10 #define X_XFixesSetRegion 11 #define X_XFixesCopyRegion 12 #define X_XFixesUnionRegion 13 #define X_XFixesIntersectRegion 14 #define X_XFixesSubtractRegion 15 #define X_XFixesInvertRegion 16 #define X_XFixesTranslateRegion 17 #define X_XFixesRegionExtents 18 #define X_XFixesFetchRegion 19 #define X_XFixesSetGCClipRegion 20 #define X_XFixesSetWindowShapeRegion 21 #define X_XFixesSetPictureClipRegion 22 #define X_XFixesSetCursorName 23 #define X_XFixesGetCursorName 24 #define X_XFixesGetCursorImageAndName 25 #define X_XFixesChangeCursor 26 #define X_XFixesChangeCursorByName 27 /*************** Version 3 ******************/ #define X_XFixesExpandRegion 28 /*************** Version 4 ******************/ #define X_XFixesHideCursor 29 #define X_XFixesShowCursor 30 /*************** Version 5 ******************/ #define X_XFixesCreatePointerBarrier 31 #define X_XFixesDestroyPointerBarrier 32 #define XFixesNumberRequests (X_XFixesDestroyPointerBarrier+1) /* Selection events share one event number */ #define XFixesSelectionNotify 0 /* Within the selection, the 'subtype' field distinguishes */ #define XFixesSetSelectionOwnerNotify 0 #define XFixesSelectionWindowDestroyNotify 1 #define XFixesSelectionClientCloseNotify 2 #define XFixesSetSelectionOwnerNotifyMask (1L << 0) #define XFixesSelectionWindowDestroyNotifyMask (1L << 1) #define XFixesSelectionClientCloseNotifyMask (1L << 2) /* There's only one cursor event so far */ #define XFixesCursorNotify 1 #define XFixesDisplayCursorNotify 0 #define XFixesDisplayCursorNotifyMask (1L << 0) #define XFixesNumberEvents (2) /* errors */ #define BadRegion 0 #define BadBarrier 1 #define XFixesNumberErrors (BadBarrier+1) #define SaveSetNearest 0 #define SaveSetRoot 1 #define SaveSetMap 0 #define SaveSetUnmap 1 /*************** Version 2 ******************/ #define WindowRegionBounding 0 #define WindowRegionClip 1 /*************** Version 5 ******************/ #define BarrierPositiveX (1L << 0) #define BarrierPositiveY (1L << 1) #define BarrierNegativeX (1L << 2) #define BarrierNegativeY (1L << 3) #endif /* _XFIXESWIRE_H_ */ PKZN^RX11/extensions/xf86dga1proto.hnu[/* Copyright (c) 1995 Jon Tombs Copyright (c) 1995 XFree86 Inc. */ #ifndef _XF86DGAPROTO1_H_ #define _XF86DGAPROTO1_H_ #include typedef struct _XF86DGAQueryVersion { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_DGAQueryVersion */ CARD16 length; } xXF86DGAQueryVersionReq; #define sz_xXF86DGAQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of DGA protocol */ CARD16 minorVersion; /* minor version of DGA protocol */ CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xXF86DGAQueryVersionReply; #define sz_xXF86DGAQueryVersionReply 32 typedef struct _XF86DGAGetVideoLL { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_XF86DGAGetVideoLL */ CARD16 length; CARD16 screen; CARD16 pad; } xXF86DGAGetVideoLLReq; #define sz_xXF86DGAGetVideoLLReq 8 typedef struct _XF86DGAInstallColormap{ CARD8 reqType; CARD8 dgaReqType; CARD16 length; CARD16 screen; CARD16 pad2; CARD32 id; /* colormap. */ } xXF86DGAInstallColormapReq; #define sz_xXF86DGAInstallColormapReq 12 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 offset; CARD32 width; CARD32 bank_size; CARD32 ram_size; CARD32 pad4; CARD32 pad5; } xXF86DGAGetVideoLLReply; #define sz_xXF86DGAGetVideoLLReply 32 typedef struct _XF86DGADirectVideo { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_XF86DGADirectVideo */ CARD16 length; CARD16 screen; CARD16 enable; } xXF86DGADirectVideoReq; #define sz_xXF86DGADirectVideoReq 8 typedef struct _XF86DGAGetViewPortSize { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_XF86DGAGetViewPort */ CARD16 length; CARD16 screen; CARD16 pad; } xXF86DGAGetViewPortSizeReq; #define sz_xXF86DGAGetViewPortSizeReq 8 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 width; CARD32 height; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86DGAGetViewPortSizeReply; #define sz_xXF86DGAGetViewPortSizeReply 32 typedef struct _XF86DGASetViewPort { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_XF86DGASetViewPort */ CARD16 length; CARD16 screen; CARD16 pad; CARD32 x; CARD32 y; } xXF86DGASetViewPortReq; #define sz_xXF86DGASetViewPortReq 16 typedef struct _XF86DGAGetVidPage { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_XF86DGAGetVidPage */ CARD16 length; CARD16 screen; CARD16 pad; } xXF86DGAGetVidPageReq; #define sz_xXF86DGAGetVidPageReq 8 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 vpage; CARD32 pad; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86DGAGetVidPageReply; #define sz_xXF86DGAGetVidPageReply 32 typedef struct _XF86DGASetVidPage { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_XF86DGASetVidPage */ CARD16 length; CARD16 screen; CARD16 vpage; } xXF86DGASetVidPageReq; #define sz_xXF86DGASetVidPageReq 8 typedef struct _XF86DGAQueryDirectVideo { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_DGAQueryVersion */ CARD16 length; CARD16 screen; CARD16 pad; } xXF86DGAQueryDirectVideoReq; #define sz_xXF86DGAQueryDirectVideoReq 8 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 flags; CARD32 pad; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86DGAQueryDirectVideoReply; #define sz_xXF86DGAQueryDirectVideoReply 32 typedef struct _XF86DGAViewPortChanged { CARD8 reqType; /* always DGAReqCode */ CARD8 dgaReqType; /* always X_DGAQueryVersion */ CARD16 length; CARD16 screen; CARD16 n; } xXF86DGAViewPortChangedReq; #define sz_xXF86DGAViewPortChangedReq 8 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 result; CARD32 pad; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xXF86DGAViewPortChangedReply; #define sz_xXF86DGAViewPortChangedReply 32 #endif /* _XF86DGAPROTO1_H_ */ PKZCf!!X11/extensions/multibufproto.hnu[/* Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _MULTIBUFPROTO_H_ #define _MULTIBUFPROTO_H_ #include /* * Protocol requests constants and alignment values */ #define Window CARD32 #define Drawable CARD32 #define VisualID CARD32 #define Multibuffer CARD32 #define X_MbufGetBufferVersion 0 #define X_MbufCreateImageBuffers 1 #define X_MbufDestroyImageBuffers 2 #define X_MbufDisplayImageBuffers 3 #define X_MbufSetMBufferAttributes 4 #define X_MbufGetMBufferAttributes 5 #define X_MbufSetBufferAttributes 6 #define X_MbufGetBufferAttributes 7 #define X_MbufGetBufferInfo 8 #define X_MbufCreateStereoWindow 9 #define X_MbufClearImageBufferArea 10 typedef struct xMbufBufferInfo { CARD32 visualID; /* associated visual */ CARD16 maxBuffers; /* maximum supported buffers */ CARD8 depth; /* depth of visual (redundant) */ CARD8 unused; } xMbufBufferInfo; #define sz_xMbufBufferInfo 8 typedef struct { BYTE type; BYTE unused; CARD16 sequenceNumber; CARD32 buffer; /* affected buffer */ BYTE state; /* current status */ CARD8 unused1; CARD16 unused2; CARD32 unused3; CARD32 unused4; CARD32 unused5; CARD32 unused6; CARD32 unused7; } xMbufClobberNotifyEvent; typedef struct { BYTE type; BYTE unused; CARD16 sequenceNumber; CARD32 buffer; /* affected buffer */ CARD32 timeStamp; /* update time */ CARD32 unused1; CARD32 unused2; CARD32 unused3; CARD32 unused4; CARD32 unused5; CARD32 unused6; } xMbufUpdateNotifyEvent; typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufGetBufferVersion */ CARD16 length; } xMbufGetBufferVersionReq; #define sz_xMbufGetBufferVersionReq 4 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; CARD8 majorVersion; /* major version of Multi-Buffering protocol */ CARD8 minorVersion; /* minor version of Multi-Buffering protocol */ CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xMbufGetBufferVersionReply; #define sz_xMbufGetBufferVersionReply 32 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */ CARD16 length; CARD32 window; /* associated window */ CARD8 updateAction; /* action at update */ CARD8 updateHint; /* hint as to frequency of updates */ CARD16 unused; } xMbufCreateImageBuffersReq; /* followed by buffer ids */ #define sz_xMbufCreateImageBuffersReq 12 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; CARD16 numberBuffer; /* number successfully allocated */ CARD16 unused1; CARD32 unused2; CARD32 unused3; CARD32 unused4; CARD32 unused5; CARD32 unused6; } xMbufCreateImageBuffersReply; #define sz_xMbufCreateImageBuffersReply 32 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */ CARD16 length; CARD32 window; /* associated window */ } xMbufDestroyImageBuffersReq; #define sz_xMbufDestroyImageBuffersReq 8 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */ CARD16 length; CARD16 minDelay; /* minimum time between last update and now */ CARD16 maxDelay; /* maximum time between last update and now */ } xMbufDisplayImageBuffersReq; /* followed by list of buffers */ #define sz_xMbufDisplayImageBuffersReq 8 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */ CARD16 length; CARD32 window; /* associated window */ CARD32 valueMask; /* modified entries */ } xMbufSetMBufferAttributesReq; /* followed by values */ #define sz_xMbufSetMBufferAttributesReq 12 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */ CARD16 length; CARD32 window; /* associated window */ } xMbufGetMBufferAttributesReq; #define sz_xMbufGetMBufferAttributesReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; CARD16 displayedBuffer; /* currently visible buffer */ CARD8 updateAction; CARD8 updateHint; CARD8 windowMode; CARD8 unused0; CARD16 unused1; CARD32 unused2; CARD32 unused3; CARD32 unused4; CARD32 unused5; } xMbufGetMBufferAttributesReply; #define sz_xMbufGetMBufferAttributesReply 32 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */ CARD16 length; CARD32 buffer; CARD32 valueMask; } xMbufSetBufferAttributesReq; /* followed by values */ #define sz_xMbufSetBufferAttributesReq 12 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */ CARD16 length; CARD32 buffer; } xMbufGetBufferAttributesReq; #define sz_xMbufGetBufferAttributesReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; CARD32 window; CARD32 eventMask; CARD16 bufferIndex; CARD8 side; CARD8 unused0; CARD32 unused1; CARD32 unused2; CARD32 unused3; } xMbufGetBufferAttributesReply; #define sz_xMbufGetBufferAttributesReply 32 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufGetBufferInfo */ CARD16 length; Drawable drawable; } xMbufGetBufferInfoReq; #define sz_xMbufGetBufferInfoReq 8 typedef struct { BYTE type; /* X_Reply */ CARD8 unused; /* not used */ CARD16 sequenceNumber; CARD32 length; CARD16 normalInfo; CARD16 stereoInfo; CARD32 unused1; CARD32 unused2; CARD32 unused3; CARD32 unused4; CARD32 unused5; } xMbufGetBufferInfoReply; /* followed by buffer infos */ #define sz_xMbufGetBufferInfoReply 32 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */ CARD16 length; CARD8 unused0; CARD8 unused1; CARD8 unused2; CARD8 depth; Window wid; Window parent; Multibuffer left; /* associated buffers */ Multibuffer right; INT16 x; INT16 y; CARD16 width; CARD16 height; CARD16 borderWidth; #if defined(__cplusplus) || defined(c_plusplus) CARD16 c_class; #else CARD16 class; #endif VisualID visual; CARD32 mask; } xMbufCreateStereoWindowReq; /* followed by value list */ #define sz_xMbufCreateStereoWindowReq 44 typedef struct { CARD8 reqType; /* always codes->major_opcode */ CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */ CARD16 length; Multibuffer buffer; INT16 x; INT16 y; CARD16 width; CARD16 height; CARD8 unused0; CARD8 unused1; CARD8 unused2; BOOL exposures; } xMbufClearImageBufferAreaReq; #define sz_xMbufClearImageBufferAreaReq 20 #undef Window #undef Drawable #undef VisualID #undef Multibuffer #endif /* _MULTIBUFPROTO_H_ */ PKZީ:^^X11/extensions/syncconst.hnu[/* Copyright 1991, 1993, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /*********************************************************** Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, and Olivetti Research Limited, Cambridge, England. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or Olivetti not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef _SYNCCONST_H_ #define _SYNCCONST_H_ #define SYNC_NAME "SYNC" #define SYNC_MAJOR_VERSION 3 #define SYNC_MINOR_VERSION 1 #define XSyncCounterNotify 0 #define XSyncAlarmNotify 1 #define XSyncAlarmNotifyMask (1L << XSyncAlarmNotify) #define XSyncNumberEvents 2L #define XSyncBadCounter 0L #define XSyncBadAlarm 1L #define XSyncBadFence 2L #define XSyncNumberErrors (XSyncBadFence + 1) /* * Flags for Alarm Attributes */ #define XSyncCACounter (1L<<0) #define XSyncCAValueType (1L<<1) #define XSyncCAValue (1L<<2) #define XSyncCATestType (1L<<3) #define XSyncCADelta (1L<<4) #define XSyncCAEvents (1L<<5) /* The _XSync macros below are for library internal use only. They exist * so that if we have to make a fix, we can change it in this one place * and have both the macro and function variants inherit the fix. */ #define _XSyncIntToValue(pv, i) ((pv)->hi=((i<0)?~0:0),(pv)->lo=(i)) #define _XSyncIntsToValue(pv, l, h) ((pv)->lo = (l), (pv)->hi = (h)) #define _XSyncValueGreaterThan(a, b)\ ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>(b).lo)) #define _XSyncValueLessThan(a, b)\ ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<(b).lo)) #define _XSyncValueGreaterOrEqual(a, b)\ ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>=(b).lo)) #define _XSyncValueLessOrEqual(a, b)\ ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<=(b).lo)) #define _XSyncValueEqual(a, b) ((a).lo==(b).lo && (a).hi==(b).hi) #define _XSyncValueIsNegative(v) (((v).hi & 0x80000000) ? 1 : 0) #define _XSyncValueIsZero(a) ((a).lo==0 && (a).hi==0) #define _XSyncValueIsPositive(v) (((v).hi & 0x80000000) ? 0 : 1) #define _XSyncValueLow32(v) ((v).lo) #define _XSyncValueHigh32(v) ((v).hi) #define _XSyncValueAdd(presult,a,b,poverflow) {\ int t = (a).lo;\ Bool signa = XSyncValueIsNegative(a);\ Bool signb = XSyncValueIsNegative(b);\ ((presult)->lo = (a).lo + (b).lo);\ ((presult)->hi = (a).hi + (b).hi);\ if (t>(presult)->lo) (presult)->hi++;\ *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\ } #define _XSyncValueSubtract(presult,a,b,poverflow) {\ int t = (a).lo;\ Bool signa = XSyncValueIsNegative(a);\ Bool signb = XSyncValueIsNegative(b);\ ((presult)->lo = (a).lo - (b).lo);\ ((presult)->hi = (a).hi - (b).hi);\ if (t<(presult)->lo) (presult)->hi--;\ *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\ } #define _XSyncMaxValue(pv) ((pv)->hi = 0x7fffffff, (pv)->lo = 0xffffffff) #define _XSyncMinValue(pv) ((pv)->hi = 0x80000000, (pv)->lo = 0) /* * These are the publically usable macros. If you want the function version * of one of these, just #undef the macro to uncover the function. * (This is the same convention that the ANSI C library uses.) */ #define XSyncIntToValue(pv, i) _XSyncIntToValue(pv, i) #define XSyncIntsToValue(pv, l, h) _XSyncIntsToValue(pv, l, h) #define XSyncValueGreaterThan(a, b) _XSyncValueGreaterThan(a, b) #define XSyncValueLessThan(a, b) _XSyncValueLessThan(a, b) #define XSyncValueGreaterOrEqual(a, b) _XSyncValueGreaterOrEqual(a, b) #define XSyncValueLessOrEqual(a, b) _XSyncValueLessOrEqual(a, b) #define XSyncValueEqual(a, b) _XSyncValueEqual(a, b) #define XSyncValueIsNegative(v) _XSyncValueIsNegative(v) #define XSyncValueIsZero(a) _XSyncValueIsZero(a) #define XSyncValueIsPositive(v) _XSyncValueIsPositive(v) #define XSyncValueLow32(v) _XSyncValueLow32(v) #define XSyncValueHigh32(v) _XSyncValueHigh32(v) #define XSyncValueAdd(presult,a,b,poverflow) _XSyncValueAdd(presult,a,b,poverflow) #define XSyncValueSubtract(presult,a,b,poverflow) _XSyncValueSubtract(presult,a,b,poverflow) #define XSyncMaxValue(pv) _XSyncMaxValue(pv) #define XSyncMinValue(pv) _XSyncMinValue(pv) /* * Constants for the value_type argument of various requests */ typedef enum { XSyncAbsolute, XSyncRelative } XSyncValueType; /* * Alarm Test types */ typedef enum { XSyncPositiveTransition, XSyncNegativeTransition, XSyncPositiveComparison, XSyncNegativeComparison } XSyncTestType; /* * Alarm state constants */ typedef enum { XSyncAlarmActive, XSyncAlarmInactive, XSyncAlarmDestroyed } XSyncAlarmState; typedef XID XSyncCounter; typedef XID XSyncAlarm; typedef XID XSyncFence; typedef struct _XSyncValue { int hi; unsigned int lo; } XSyncValue; #endif /* _SYNCCONST_H_ */ PKZ,VVX11/extensions/compositeproto.hnu[/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _COMPOSITEPROTO_H_ #define _COMPOSITEPROTO_H_ #include #include #define Window CARD32 #define Region CARD32 #define Pixmap CARD32 /* * requests and replies */ typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xCompositeQueryVersionReq; #define sz_xCompositeQueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xCompositeQueryVersionReply; #define sz_xCompositeQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Window window; CARD8 update; CARD8 pad1; CARD16 pad2; } xCompositeRedirectWindowReq; #define sz_xCompositeRedirectWindowReq 12 typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Window window; CARD8 update; CARD8 pad1; CARD16 pad2; } xCompositeRedirectSubwindowsReq; #define sz_xCompositeRedirectSubwindowsReq 12 typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Window window; CARD8 update; CARD8 pad1; CARD16 pad2; } xCompositeUnredirectWindowReq; #define sz_xCompositeUnredirectWindowReq 12 typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Window window; CARD8 update; CARD8 pad1; CARD16 pad2; } xCompositeUnredirectSubwindowsReq; #define sz_xCompositeUnredirectSubwindowsReq 12 typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Region region; Window window; } xCompositeCreateRegionFromBorderClipReq; #define sz_xCompositeCreateRegionFromBorderClipReq 12 /* Version 0.2 additions */ typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Window window; Pixmap pixmap; } xCompositeNameWindowPixmapReq; #define sz_xCompositeNameWindowPixmapReq 12 /* Version 0.3 additions */ typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Window window; } xCompositeGetOverlayWindowReq; #define sz_xCompositeGetOverlayWindowReq sizeof(xCompositeGetOverlayWindowReq) typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; Window overlayWin; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xCompositeGetOverlayWindowReply; #define sz_xCompositeGetOverlayWindowReply sizeof(xCompositeGetOverlayWindowReply) typedef struct { CARD8 reqType; CARD8 compositeReqType; CARD16 length; Window window; } xCompositeReleaseOverlayWindowReq; #define sz_xCompositeReleaseOverlayWindowReq sizeof(xCompositeReleaseOverlayWindowReq) #undef Window #undef Region #undef Pixmap #endif /* _COMPOSITEPROTO_H_ */ PKZAo~\i i X11/extensions/securproto.hnu[/* Copyright 1996, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _SECURPROTO_H #define _SECURPROTO_H #include #define X_SecurityQueryVersion 0 #define X_SecurityGenerateAuthorization 1 #define X_SecurityRevokeAuthorization 2 typedef struct { CARD8 reqType; CARD8 securityReqType; CARD16 length; CARD16 majorVersion; CARD16 minorVersion; } xSecurityQueryVersionReq; #define sz_xSecurityQueryVersionReq 8 typedef struct { CARD8 type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; CARD16 minorVersion; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xSecurityQueryVersionReply; #define sz_xSecurityQueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 securityReqType; CARD16 length; CARD16 nbytesAuthProto; CARD16 nbytesAuthData; CARD32 valueMask; /* auth protocol name padded to 4 bytes */ /* auth protocol data padded to 4 bytes */ /* list of CARD32 values, if any */ } xSecurityGenerateAuthorizationReq; #define sz_xSecurityGenerateAuthorizationReq 12 typedef struct { CARD8 type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 authId; CARD16 dataLength; CARD16 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xSecurityGenerateAuthorizationReply; #define sz_xSecurityGenerateAuthorizationReply 32 typedef struct { CARD8 reqType; CARD8 securityReqType; CARD16 length; CARD32 authId; } xSecurityRevokeAuthorizationReq; #define sz_xSecurityRevokeAuthorizationReq 8 typedef struct _xSecurityAuthorizationRevokedEvent { BYTE type; BYTE detail; CARD16 sequenceNumber; CARD32 authId; CARD32 pad0; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xSecurityAuthorizationRevokedEvent; #define sz_xSecurityAuthorizationRevokedEvent 32 #endif /* _SECURPROTO_H */ PKZ5ݟUX11/extensions/xf86dgastr.hnu[#warning "xf86dgastr.h is obsolete and may be removed in the future." #warning "include for the protocol defines." #include PKZu{~ ~ X11/extensions/dri2proto.hnu[/* * Copyright © 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- * ware"), to deal in the Software without restriction, including without * limitation the rights to use, copy, modify, merge, publish, distribute, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, provided that the above copyright * notice(s) and this permission notice appear in all copies of the Soft- * ware and that both the above copyright notice(s) and this permission * notice appear in supporting documentation. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- * MANCE OF THIS SOFTWARE. * * Except as contained in this notice, the name of a copyright holder shall * not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization of * the copyright holder. * * Authors: * Kristian Høgsberg (krh@redhat.com) */ #ifndef _DRI2_PROTO_H_ #define _DRI2_PROTO_H_ #define DRI2_NAME "DRI2" #define DRI2_MAJOR 1 #define DRI2_MINOR 4 #define DRI2NumberErrors 0 #define DRI2NumberEvents 2 #define DRI2NumberRequests 14 #define X_DRI2QueryVersion 0 #define X_DRI2Connect 1 #define X_DRI2Authenticate 2 #define X_DRI2CreateDrawable 3 #define X_DRI2DestroyDrawable 4 #define X_DRI2GetBuffers 5 #define X_DRI2CopyRegion 6 #define X_DRI2GetBuffersWithFormat 7 #define X_DRI2SwapBuffers 8 #define X_DRI2GetMSC 9 #define X_DRI2WaitMSC 10 #define X_DRI2WaitSBC 11 #define X_DRI2SwapInterval 12 #define X_DRI2GetParam 13 /* * Events */ #define DRI2_BufferSwapComplete 0 #define DRI2_InvalidateBuffers 1 typedef struct { CARD32 attachment; CARD32 name; CARD32 pitch; CARD32 cpp; CARD32 flags; } xDRI2Buffer; typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 majorVersion; CARD32 minorVersion; } xDRI2QueryVersionReq; #define sz_xDRI2QueryVersionReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 majorVersion; CARD32 minorVersion; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDRI2QueryVersionReply; #define sz_xDRI2QueryVersionReply 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 window; CARD32 driverType; } xDRI2ConnectReq; #define sz_xDRI2ConnectReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 driverNameLength; CARD32 deviceNameLength; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDRI2ConnectReply; #define sz_xDRI2ConnectReply 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 window; CARD32 magic; } xDRI2AuthenticateReq; #define sz_xDRI2AuthenticateReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 authenticated; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xDRI2AuthenticateReply; #define sz_xDRI2AuthenticateReply 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; } xDRI2CreateDrawableReq; #define sz_xDRI2CreateDrawableReq 8 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; } xDRI2DestroyDrawableReq; #define sz_xDRI2DestroyDrawableReq 8 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; CARD32 count; } xDRI2GetBuffersReq; #define sz_xDRI2GetBuffersReq 12 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 width; CARD32 height; CARD32 count; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDRI2GetBuffersReply; #define sz_xDRI2GetBuffersReply 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; CARD32 region; CARD32 dest; CARD32 src; } xDRI2CopyRegionReq; #define sz_xDRI2CopyRegionReq 20 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xDRI2CopyRegionReply; #define sz_xDRI2CopyRegionReply 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; CARD32 target_msc_hi; CARD32 target_msc_lo; CARD32 divisor_hi; CARD32 divisor_lo; CARD32 remainder_hi; CARD32 remainder_lo; } xDRI2SwapBuffersReq; #define sz_xDRI2SwapBuffersReq 32 typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 swap_hi; CARD32 swap_lo; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xDRI2SwapBuffersReply; #define sz_xDRI2SwapBuffersReply 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; } xDRI2GetMSCReq; #define sz_xDRI2GetMSCReq 8 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; CARD32 target_msc_hi; CARD32 target_msc_lo; CARD32 divisor_hi; CARD32 divisor_lo; CARD32 remainder_hi; CARD32 remainder_lo; } xDRI2WaitMSCReq; #define sz_xDRI2WaitMSCReq 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; CARD32 target_sbc_hi; CARD32 target_sbc_lo; } xDRI2WaitSBCReq; #define sz_xDRI2WaitSBCReq 16 typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 ust_hi; CARD32 ust_lo; CARD32 msc_hi; CARD32 msc_lo; CARD32 sbc_hi; CARD32 sbc_lo; } xDRI2MSCReply; #define sz_xDRI2MSCReply 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; CARD32 interval; } xDRI2SwapIntervalReq; #define sz_xDRI2SwapIntervalReq 12 typedef struct { CARD8 type; CARD8 pad; CARD16 sequenceNumber; CARD16 event_type; CARD16 pad2; CARD32 drawable; CARD32 ust_hi; CARD32 ust_lo; CARD32 msc_hi; CARD32 msc_lo; CARD32 sbc_hi; CARD32 sbc_lo; } xDRI2BufferSwapComplete; #define sz_xDRI2BufferSwapComplete 32 typedef struct { CARD8 type; CARD8 pad; CARD16 sequenceNumber; CARD16 event_type; CARD16 pad2; CARD32 drawable; CARD32 ust_hi; CARD32 ust_lo; CARD32 msc_hi; CARD32 msc_lo; CARD32 sbc; } xDRI2BufferSwapComplete2; #define sz_xDRI2BufferSwapComplete2 32 typedef struct { CARD8 type; CARD8 pad; CARD16 sequenceNumber; CARD32 drawable; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xDRI2InvalidateBuffers; #define sz_xDRI2InvalidateBuffers 32 typedef struct { CARD8 reqType; CARD8 dri2ReqType; CARD16 length; CARD32 drawable; CARD32 param; } xDRI2GetParamReq; #define sz_xDRI2GetParamReq 12 typedef struct { BYTE type; /*X_Reply*/ BOOL is_param_recognized; CARD16 sequenceNumber; CARD32 length; CARD32 value_hi; CARD32 value_lo; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; } xDRI2GetParamReply; #define sz_xDRI2GetParamReply 32 #endif PKŹP X11/Xarch.hnu[#ifndef _XARCH_H_ # define _XARCH_H_ /* * Copyright 1997 Metro Link Incorporated * * All Rights Reserved * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of * this software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* * Determine the machine's byte order. */ /* See if it is set in the imake config first */ # ifdef X_BYTE_ORDER # define X_BIG_ENDIAN 4321 # define X_LITTLE_ENDIAN 1234 # else # if defined(SVR4) || defined(__SVR4) # include # include # elif defined(CSRG_BASED) # if defined(__NetBSD__) || defined(__OpenBSD__) # include # endif # include # elif defined(linux) # if defined __STRICT_ANSI__ # undef __STRICT_ANSI__ # include # define __STRICT_ANSI__ # else # include # endif /* 'endian.h' might have been included before 'Xarch.h' */ # if !defined(LITTLE_ENDIAN) && defined(__LITTLE_ENDIAN) # define LITTLE_ENDIAN __LITTLE_ENDIAN # endif # if !defined(BIG_ENDIAN) && defined(__BIG_ENDIAN) # define BIG_ENDIAN __BIG_ENDIAN # endif # if !defined(PDP_ENDIAN) && defined(__PDP_ENDIAN) # define PDP_ENDIAN __PDP_ENDIAN # endif # if !defined(BYTE_ORDER) && defined(__BYTE_ORDER) # define BYTE_ORDER __BYTE_ORDER # endif # endif # ifndef BYTE_ORDER # define LITTLE_ENDIAN 1234 # define BIG_ENDIAN 4321 # if defined(__sun) && defined(__SVR4) # include # ifdef _LITTLE_ENDIAN # define BYTE_ORDER LITTLE_ENDIAN # endif # ifdef _BIG_ENDIAN # define BYTE_ORDER BIG_ENDIAN # endif # endif /* sun */ # endif /* BYTE_ORDER */ # define X_BYTE_ORDER BYTE_ORDER # define X_BIG_ENDIAN BIG_ENDIAN # define X_LITTLE_ENDIAN LITTLE_ENDIAN # endif /* not in imake config */ #endif /* _XARCH_H_ */ PKZ$[a a X11/Xdefs.hnu[/*********************************************************** Copyright (c) 1999 The XFree86 Project Inc. All Rights Reserved. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The XFree86 Project Inc. shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The XFree86 Project Inc.. */ /** ** Types definitions shared between server and clients **/ #ifndef _XDEFS_H #define _XDEFS_H #ifdef _XSERVER64 #include #endif #ifndef _XTYPEDEF_ATOM # define _XTYPEDEF_ATOM # ifndef _XSERVER64 typedef unsigned long Atom; # else typedef CARD32 Atom; # endif #endif #ifndef Bool # ifndef _XTYPEDEF_BOOL # define _XTYPEDEF_BOOL typedef int Bool; # endif #endif #ifndef _XTYPEDEF_POINTER # define _XTYPEDEF_POINTER typedef void *pointer; #endif #ifndef _XTYPEDEF_CLIENTPTR typedef struct _Client *ClientPtr; # define _XTYPEDEF_CLIENTPTR #endif #ifndef _XTYPEDEF_XID # define _XTYPEDEF_XID # ifndef _XSERVER64 typedef unsigned long XID; # else typedef CARD32 XID; # endif #endif #ifndef _XTYPEDEF_MASK # define _XTYPEDEF_MASK # ifndef _XSERVER64 typedef unsigned long Mask; # else typedef CARD32 Mask; # endif #endif #ifndef _XTYPEDEF_FONTPTR # define _XTYPEDEF_FONTPTR typedef struct _Font *FontPtr; /* also in fonts/include/font.h */ #endif #ifndef _XTYPEDEF_FONT # define _XTYPEDEF_FONT typedef XID Font; #endif #ifndef _XTYPEDEF_FSID # ifndef _XSERVER64 typedef unsigned long FSID; # else typedef CARD32 FSID; # endif #endif typedef FSID AccContext; /* OS independent time value XXX Should probably go in Xos.h */ typedef struct timeval **OSTimePtr; typedef void (* BlockHandlerProcPtr)(void * /* blockData */, OSTimePtr /* pTimeout */, void * /* pReadmask */); #endif PKZEם X11/Xos_r.hnu[/* Copyright 1996, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * Various and sundry Thread-Safe functions used by X11, Motif, and CDE. * * Use this file in MT-safe code where you would have included * for readdir() * for getgrgid() or getgrnam() * for gethostbyname(), gethostbyaddr(), or getservbyname() * for getpwnam() or getpwuid() * for strtok() * for asctime(), ctime(), localtime(), or gmtime() * for getlogin() or ttyname() * or their thread-safe analogs. * * If you are on a platform that defines XTHREADS but does not have * MT-safe system API (e.g. UnixWare) you must define _Xos_processLock * and _Xos_processUnlock macros before including this header. * * For convenience XOS_USE_XLIB_LOCKING or XOS_USE_XT_LOCKING may be defined * to obtain either Xlib-only or Xt-based versions of these macros. These * macros won't result in truly thread-safe calls, but they are better than * nothing. If you do not want locking in this situation define * XOS_USE_NO_LOCKING. * * NOTE: On systems lacking appropriate _r functions Gethostbyname(), * Gethostbyaddr(), and Getservbyname() do NOT copy the host or * protocol lists! * * NOTE: On systems lacking appropriate _r functions Getgrgid() and * Getgrnam() do NOT copy the list of group members! * * This header is nominally intended to simplify porting X11, Motif, and * CDE; it may be useful to other people too. The structure below is * complicated, mostly because P1003.1c (the IEEE POSIX Threads spec) * went through lots of drafts, and some vendors shipped systems based * on draft API that were changed later. Unfortunately POSIX did not * provide a feature-test macro for distinguishing each of the drafts. */ /* * This header has several parts. Search for "Effective prototypes" * to locate the beginning of a section. */ /* This header can be included multiple times with different defines! */ #ifndef _XOS_R_H_ # define _XOS_R_H_ # include # include # ifndef X_NOT_POSIX # ifdef _POSIX_SOURCE # include # else # define _POSIX_SOURCE # include # undef _POSIX_SOURCE # endif # ifndef LINE_MAX # define X_LINE_MAX 2048 # else # define X_LINE_MAX LINE_MAX # endif # endif #endif /* _XOS_R_H */ #ifndef WIN32 #ifdef __cplusplus extern "C" { #endif # if defined(XOS_USE_XLIB_LOCKING) # ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */ typedef struct _LockInfoRec *LockInfoPtr; extern LockInfoPtr _Xglobal_lock; # endif # ifndef _Xos_isThreadInitialized # define _Xos_isThreadInitialized (_Xglobal_lock) # endif # if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) # ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */ # include /* for NeedFunctionPrototypes */ extern void (*_XLockMutex_fn)( # if NeedFunctionPrototypes LockInfoPtr /* lock */, char * /* file */, int /* line */ # endif ); extern void (*_XUnlockMutex_fn)( # if NeedFunctionPrototypes LockInfoPtr /* lock */, char * /* file */, int /* line */ # endif ); # endif # ifndef _Xos_processLock # define _Xos_processLock \ (_XLockMutex_fn ? (*_XLockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0) # endif # ifndef _Xos_processUnlock # define _Xos_processUnlock \ (_XUnlockMutex_fn ? (*_XUnlockMutex_fn)(_Xglobal_lock,__FILE__,__LINE__) : 0) # endif # else # ifndef XAllocIDs /* Xlibint.h does not have multiple include protection */ # include /* for NeedFunctionPrototypes */ extern void (*_XLockMutex_fn)( # if NeedFunctionPrototypes LockInfoPtr /* lock */ # endif ); extern void (*_XUnlockMutex_fn)( # if NeedFunctionPrototypes LockInfoPtr /* lock */ # endif ); # endif # ifndef _Xos_processLock # define _Xos_processLock \ (_XLockMutex_fn ? ((*_XLockMutex_fn)(_Xglobal_lock), 0) : 0) # endif # ifndef _Xos_processUnlock # define _Xos_processUnlock \ (_XUnlockMutex_fn ? ((*_XUnlockMutex_fn)(_Xglobal_lock), 0) : 0) # endif # endif # elif defined(XOS_USE_XT_LOCKING) # ifndef _XtThreadsI_h extern void (*_XtProcessLock)(void); # endif # ifndef _XtintrinsicP_h # include /* for NeedFunctionPrototypes */ extern void XtProcessLock( # if NeedFunctionPrototypes void # endif ); extern void XtProcessUnlock( # if NeedFunctionPrototypes void # endif ); # endif # ifndef _Xos_isThreadInitialized # define _Xos_isThreadInitialized _XtProcessLock # endif # ifndef _Xos_processLock # define _Xos_processLock XtProcessLock() # endif # ifndef _Xos_processUnlock # define _Xos_processUnlock XtProcessUnlock() # endif # elif defined(XOS_USE_NO_LOCKING) # ifndef _Xos_isThreadInitialized # define _Xos_isThreadInitialized 0 # endif # ifndef _Xos_processLock # define _Xos_processLock 0 # endif # ifndef _Xos_processUnlock # define _Xos_processUnlock 0 # endif # endif #endif /* !defined WIN32 */ /* * Solaris defines the POSIX thread-safe feature test macro, but * uses the older SVR4 thread-safe functions unless the POSIX ones * are specifically requested. Fix the feature test macro. */ #if defined(__sun) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && \ (_POSIX_C_SOURCE - 0 < 199506L) && !defined(_POSIX_PTHREAD_SEMANTICS) # undef _POSIX_THREAD_SAFE_FUNCTIONS #endif /***** wrappers *****/ /* * Effective prototypes for wrappers: * * #define X_INCLUDE_PWD_H * #define XOS_USE_..._LOCKING * #include * * typedef ... _Xgetpwparams; * * struct passwd* _XGetpwnam(const char *name, _Xgetpwparams); * struct passwd* _XGetpwuid(uid_t uid, _Xgetpwparams); */ #if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H) # include # if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_PWDAPI) # define XOS_USE_MTSAFE_PWDAPI 1 # endif #endif #undef X_NEEDS_PWPARAMS #if !defined(X_INCLUDE_PWD_H) || defined(_XOS_INCLUDED_PWD_H) /* Do nothing */ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ # if defined(X_NOT_POSIX) && !defined(__i386__) && !defined(SYSV) extern struct passwd *getpwuid(), *getpwnam(); # endif typedef int _Xgetpwparams; /* dummy */ # define _XGetpwuid(u,p) getpwuid((u)) # define _XGetpwnam(u,p) getpwnam((u)) #elif !defined(XOS_USE_MTSAFE_PWDAPI) || defined(XNO_MTSAFE_PWDAPI) /* UnixWare 2.0, or other systems with thread support but no _r API. */ # define X_NEEDS_PWPARAMS typedef struct { struct passwd pws; char pwbuf[1024]; struct passwd* pwp; size_t len; } _Xgetpwparams; /* * NetBSD and FreeBSD, at least, are missing several of the unixware passwd * fields. */ #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ defined(__APPLE__) || defined(__DragonFly__) static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) { memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)); (p).pws.pw_name = (p).pwbuf; (p).len = strlen((p).pwp->pw_name); strcpy((p).pws.pw_name, (p).pwp->pw_name); (p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1; (p).len = strlen((p).pwp->pw_passwd); strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd); (p).pws.pw_class = (p).pws.pw_passwd + (p).len + 1; (p).len = strlen((p).pwp->pw_class); strcpy((p).pws.pw_class, (p).pwp->pw_class); (p).pws.pw_gecos = (p).pws.pw_class + (p).len + 1; (p).len = strlen((p).pwp->pw_gecos); strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos); (p).pws.pw_dir = (p).pws.pw_gecos + (p).len + 1; (p).len = strlen((p).pwp->pw_dir); strcpy((p).pws.pw_dir, (p).pwp->pw_dir); (p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1; (p).len = strlen((p).pwp->pw_shell); strcpy((p).pws.pw_shell, (p).pwp->pw_shell); (p).pwp = &(p).pws; } #else # define _Xpw_copyPasswd(p) \ (memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)), \ ((p).pws.pw_name = (p).pwbuf), \ ((p).len = strlen((p).pwp->pw_name)), \ strcpy((p).pws.pw_name, (p).pwp->pw_name), \ ((p).pws.pw_passwd = (p).pws.pw_name + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_passwd)), \ strcpy((p).pws.pw_passwd,(p).pwp->pw_passwd), \ ((p).pws.pw_age = (p).pws.pw_passwd + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_age)), \ strcpy((p).pws.pw_age, (p).pwp->pw_age), \ ((p).pws.pw_comment = (p).pws.pw_age + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_comment)), \ strcpy((p).pws.pw_comment, (p).pwp->pw_comment), \ ((p).pws.pw_gecos = (p).pws.pw_comment + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_gecos)), \ strcpy((p).pws.pw_gecos, (p).pwp->pw_gecos), \ ((p).pws.pw_dir = (p).pws.pw_comment + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_dir)), \ strcpy((p).pws.pw_dir, (p).pwp->pw_dir), \ ((p).pws.pw_shell = (p).pws.pw_dir + (p).len + 1), \ ((p).len = strlen((p).pwp->pw_shell)), \ strcpy((p).pws.pw_shell, (p).pwp->pw_shell), \ ((p).pwp = &(p).pws), \ 0 ) #endif # define _XGetpwuid(u,p) \ ( (_Xos_processLock), \ (((p).pwp = getpwuid((u))) ? _Xpw_copyPasswd(p), 0 : 0), \ (_Xos_processUnlock), \ (p).pwp ) # define _XGetpwnam(u,p) \ ( (_Xos_processLock), \ (((p).pwp = getpwnam((u))) ? _Xpw_copyPasswd(p), 0 : 0), \ (_Xos_processUnlock), \ (p).pwp ) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) # define X_NEEDS_PWPARAMS typedef struct { struct passwd pws; char pwbuf[X_LINE_MAX]; } _Xgetpwparams; # if defined(_POSIX_REENTRANT_FUNCTIONS) || !defined(SVR4) # define _XGetpwuid(u,p) \ ((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws) # define _XGetpwnam(u,p) \ ((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == -1) ? NULL : &(p).pws) # else /* SVR4 */ # define _XGetpwuid(u,p) \ ((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws) # define _XGetpwnam(u,p) \ ((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf)) == NULL) ? NULL : &(p).pws) # endif /* SVR4 */ #else /* _POSIX_THREAD_SAFE_FUNCTIONS */ # define X_NEEDS_PWPARAMS typedef struct { struct passwd pws; char pwbuf[X_LINE_MAX]; struct passwd* pwp; } _Xgetpwparams; typedef int _Xgetpwret; # define _XGetpwuid(u,p) \ ((getpwuid_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \ (p).pwp : NULL) # define _XGetpwnam(u,p) \ ((getpwnam_r((u),&(p).pws,(p).pwbuf,sizeof((p).pwbuf),&(p).pwp) == 0) ? \ (p).pwp : NULL) #endif /* X_INCLUDE_PWD_H */ #if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H) # define _XOS_INCLUDED_PWD_H #endif /***** wrappers *****/ /* * Effective prototypes for wrappers: * * NOTE: On systems lacking the appropriate _r functions Gethostbyname(), * Gethostbyaddr(), and Getservbyname() do NOT copy the host or * protocol lists! * * #define X_INCLUDE_NETDB_H * #define XOS_USE_..._LOCKING * #include * * typedef ... _Xgethostbynameparams; * typedef ... _Xgetservbynameparams; * * struct hostent* _XGethostbyname(const char* name,_Xgethostbynameparams); * struct hostent* _XGethostbyaddr(const char* addr, int len, int type, * _Xgethostbynameparams); * struct servent* _XGetservbyname(const char* name, const char* proto, * _Xgetservbynameparams); */ #undef XTHREADS_NEEDS_BYNAMEPARAMS #if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H) \ && !defined(WIN32) # include # if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_NETDBAPI) # define XOS_USE_MTSAFE_NETDBAPI 1 # endif #endif #if !defined(X_INCLUDE_NETDB_H) || defined(_XOS_INCLUDED_NETDB_H) /* Do nothing. */ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ typedef int _Xgethostbynameparams; /* dummy */ typedef int _Xgetservbynameparams; /* dummy */ # define _XGethostbyname(h,hp) gethostbyname((h)) # define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t)) # define _XGetservbyname(s,p,sp) getservbyname((s),(p)) #elif !defined(XOS_USE_MTSAFE_NETDBAPI) || defined(XNO_MTSAFE_NETDBAPI) /* WARNING: The h_addr_list and s_aliases values are *not* copied! */ #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) #include #endif typedef struct { struct hostent hent; char h_name[MAXHOSTNAMELEN]; struct hostent *hptr; } _Xgethostbynameparams; typedef struct { struct servent sent; char s_name[255]; char s_proto[255]; struct servent *sptr; } _Xgetservbynameparams; # define XTHREADS_NEEDS_BYNAMEPARAMS # define _Xg_copyHostent(hp) \ (memcpy(&(hp).hent, (hp).hptr, sizeof(struct hostent)), \ strcpy((hp).h_name, (hp).hptr->h_name), \ ((hp).hent.h_name = (hp).h_name), \ ((hp).hptr = &(hp).hent), \ 0 ) # define _Xg_copyServent(sp) \ (memcpy(&(sp).sent, (sp).sptr, sizeof(struct servent)), \ strcpy((sp).s_name, (sp).sptr->s_name), \ ((sp).sent.s_name = (sp).s_name), \ strcpy((sp).s_proto, (sp).sptr->s_proto), \ ((sp).sent.s_proto = (sp).s_proto), \ ((sp).sptr = &(sp).sent), \ 0 ) # define _XGethostbyname(h,hp) \ ((_Xos_processLock), \ (((hp).hptr = gethostbyname((h))) ? _Xg_copyHostent(hp) : 0), \ (_Xos_processUnlock), \ (hp).hptr ) # define _XGethostbyaddr(a,al,t,hp) \ ((_Xos_processLock), \ (((hp).hptr = gethostbyaddr((a),(al),(t))) ? _Xg_copyHostent(hp) : 0), \ (_Xos_processUnlock), \ (hp).hptr ) # define _XGetservbyname(s,p,sp) \ ((_Xos_processLock), \ (((sp).sptr = getservbyname((s),(p))) ? _Xg_copyServent(sp) : 0), \ (_Xos_processUnlock), \ (sp).sptr ) #elif defined(XUSE_NETDB_R_API) /* * POSIX does not specify _r equivalents for API, but some * vendors provide them anyway. Use them only when explicitly asked. */ # ifdef _POSIX_REENTRANT_FUNCTIONS # ifndef _POSIX_THREAD_SAFE_FUNCTIONS # endif # endif # ifdef _POSIX_THREAD_SAFE_FUNCTIONS # define X_POSIX_THREAD_SAFE_FUNCTIONS 1 # endif # define XTHREADS_NEEDS_BYNAMEPARAMS # ifndef X_POSIX_THREAD_SAFE_FUNCTIONS typedef struct { struct hostent hent; char hbuf[X_LINE_MAX]; int herr; } _Xgethostbynameparams; typedef struct { struct servent sent; char sbuf[X_LINE_MAX]; } _Xgetservbynameparams; # define _XGethostbyname(h,hp) \ gethostbyname_r((h),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr) # define _XGethostbyaddr(a,al,t,hp) \ gethostbyaddr_r((a),(al),(t),&(hp).hent,(hp).hbuf,sizeof((hp).hbuf),&(hp).herr) # define _XGetservbyname(s,p,sp) \ getservbyname_r((s),(p),&(sp).sent,(sp).sbuf,sizeof((sp).sbuf)) # else typedef struct { struct hostent hent; struct hostent_data hdata; } _Xgethostbynameparams; typedef struct { struct servent sent; struct servent_data sdata; } _Xgetservbynameparams; # define _XGethostbyname(h,hp) \ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \ ((gethostbyname_r((h),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent)) # define _XGethostbyaddr(a,al,t,hp) \ (bzero((char*)&(hp).hdata,sizeof((hp).hdata)), \ ((gethostbyaddr_r((a),(al),(t),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent)) # define _XGetservbyname(s,p,sp) \ (bzero((char*)&(sp).sdata,sizeof((sp).sdata)), \ ((getservbyname_r((s),(p),&(sp).sent,&(sp).sdata) == -1) ? NULL : &(sp).sent) ) # endif # ifdef X_POSIX_THREAD_SAFE_FUNCTIONS # undef X_POSIX_THREAD_SAFE_FUNCTIONS # endif #else /* The regular API is assumed to be MT-safe under POSIX. */ typedef int _Xgethostbynameparams; /* dummy */ typedef int _Xgetservbynameparams; /* dummy */ # define _XGethostbyname(h,hp) gethostbyname((h)) # define _XGethostbyaddr(a,al,t,hp) gethostbyaddr((a),(al),(t)) # define _XGetservbyname(s,p,sp) getservbyname((s),(p)) #endif /* X_INCLUDE_NETDB_H */ #if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H) # define _XOS_INCLUDED_NETDB_H #endif /***** wrappers *****/ /* * Effective prototypes for wrappers: * * #define X_INCLUDE_DIRENT_H * #define XOS_USE_..._LOCKING * #include * * typedef ... _Xreaddirparams; * * struct dirent *_XReaddir(DIR *dir_pointer, _Xreaddirparams); */ #if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H) # include # if !defined(X_NOT_POSIX) || defined(SYSV) # include # else # include # ifndef dirent # define dirent direct # endif # endif # if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_DIRENTAPI) # define XOS_USE_MTSAFE_DIRENTAPI 1 # endif #endif #if !defined(X_INCLUDE_DIRENT_H) || defined(_XOS_INCLUDED_DIRENT_H) /* Do nothing. */ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ typedef int _Xreaddirparams; /* dummy */ # define _XReaddir(d,p) readdir(d) #elif !defined(XOS_USE_MTSAFE_DIRENTAPI) || defined(XNO_MTSAFE_DIRENTAPI) /* Systems with thread support but no _r API. */ typedef struct { struct dirent *result; struct dirent dir_entry; # ifdef _POSIX_PATH_MAX char buf[_POSIX_PATH_MAX]; # elif defined(NAME_MAX) char buf[NAME_MAX]; # else char buf[255]; # endif } _Xreaddirparams; # define _XReaddir(d,p) \ ( (_Xos_processLock), \ (((p).result = readdir((d))) ? \ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \ ((p).result = &(p).dir_entry), 0) : \ 0), \ (_Xos_processUnlock), \ (p).result ) #else typedef struct { struct dirent *result; struct dirent dir_entry; # ifdef _POSIX_PATH_MAX char buf[_POSIX_PATH_MAX]; # elif defined(NAME_MAX) char buf[NAME_MAX]; # else char buf[255]; # endif } _Xreaddirparams; # if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(__APPLE__) /* POSIX final API, returns (int)0 on success. */ # define _XReaddir(d,p) \ (readdir_r((d), &((p).dir_entry), &((p).result)) ? NULL : (p).result) # elif defined(_POSIX_REENTRANT_FUNCTIONS) /* POSIX draft API, returns (int)0 on success. */ # define _XReaddir(d,p) \ (readdir_r((d),&((p).dir_entry)) ? NULL : &((p).dir_entry)) # elif defined(SVR4) /* Pre-POSIX API, returns non-NULL on success. */ # define _XReaddir(d,p) (readdir_r((d), &(p).dir_entry)) # else /* We have no idea what is going on. Fake it all using process locks. */ # define _XReaddir(d,p) \ ( (_Xos_processLock), \ (((p).result = readdir((d))) ? \ (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \ ((p).result = &(p).dir_entry), 0) : \ 0), \ (_Xos_processUnlock), \ (p).result ) # endif #endif /* X_INCLUDE_DIRENT_H */ #if defined(X_INCLUDE_DIRENT_H) && !defined(_XOS_INCLUDED_DIRENT_H) # define _XOS_INCLUDED_DIRENT_H #endif /***** wrappers *****/ /* * Effective prototypes for wrappers: * * #define X_INCLUDE_UNISTD_H * #define XOS_USE_..._LOCKING * #include * * typedef ... _Xgetloginparams; * typedef ... _Xttynameparams; * * char *_XGetlogin(_Xgetloginparams); * char *_XTtyname(int, _Xttynameparams); */ #if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H) /* already included by */ # if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_UNISTDAPI) # define XOS_USE_MTSAFE_UNISTDAPI 1 # endif #endif #if !defined(X_INCLUDE_UNISTD_H) || defined(_XOS_INCLUDED_UNISTD_H) /* Do nothing. */ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ typedef int _Xgetloginparams; /* dummy */ typedef int _Xttynameparams; /* dummy */ # define _XGetlogin(p) getlogin() # define _XTtyname(f) ttyname((f)) #elif !defined(XOS_USE_MTSAFE_UNISTDAPI) || defined(XNO_MTSAFE_UNISTDAPI) /* Systems with thread support but no _r API. */ typedef struct { char *result; # if defined(MAXLOGNAME) char buf[MAXLOGNAME]; # elif defined(LOGIN_NAME_MAX) char buf[LOGIN_NAME_MAX]; # else char buf[64]; # endif } _Xgetloginparams; typedef struct { char *result; # ifdef TTY_NAME_MAX char buf[TTY_NAME_MAX]; # elif defined(_POSIX_TTY_NAME_MAX) char buf[_POSIX_TTY_NAME_MAX]; # elif defined(_POSIX_PATH_MAX) char buf[_POSIX_PATH_MAX]; # else char buf[256]; # endif } _Xttynameparams; # define _XGetlogin(p) \ ( (_Xos_processLock), \ (((p).result = getlogin()) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), \ ((p).buf[sizeof((p).buf)-1] = '\0'), \ ((p).result = (p).buf), 0) : 0), \ (_Xos_processUnlock), \ (p).result ) #define _XTtyname(f,p) \ ( (_Xos_processLock), \ (((p).result = ttyname(f)) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), \ ((p).buf[sizeof((p).buf)-1] = '\0'), \ ((p).result = (p).buf), 0) : 0), \ (_Xos_processUnlock), \ (p).result ) #elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_POSIX_REENTRANT_FUNCTIONS) /* POSIX API. * * extern int getlogin_r(char *, size_t); * extern int ttyname_r(int, char *, size_t); */ typedef struct { # if defined(MAXLOGNAME) char buf[MAXLOGNAME]; # elif defined(LOGIN_NAME_MAX) char buf[LOGIN_NAME_MAX]; # else char buf[64]; # endif } _Xgetloginparams; typedef struct { # ifdef TTY_NAME_MAX char buf[TTY_NAME_MAX]; # elif defined(_POSIX_TTY_NAME_MAX) char buf[_POSIX_TTY_NAME_MAX]; # elif defined(_POSIX_PATH_MAX) char buf[_POSIX_PATH_MAX]; # else char buf[256]; # endif } _Xttynameparams; # define _XGetlogin(p) (getlogin_r((p).buf, sizeof((p).buf)) ? NULL : (p).buf) # define _XTtyname(f,p) \ (ttyname_r((f), (p).buf, sizeof((p).buf)) ? NULL : (p).buf) #else /* Pre-POSIX API. * * extern char *getlogin_r(char *, size_t); * extern char *ttyname_r(int, char *, size_t); */ typedef struct { # if defined(MAXLOGNAME) char buf[MAXLOGNAME]; # elif defined(LOGIN_NAME_MAX) char buf[LOGIN_NAME_MAX]; # else char buf[64]; # endif } _Xgetloginparams; typedef struct { # ifdef TTY_NAME_MAX char buf[TTY_NAME_MAX]; # elif defined(_POSIX_TTY_NAME_MAX) char buf[_POSIX_TTY_NAME_MAX]; # elif defined(_POSIX_PATH_MAX) char buf[_POSIX_PATH_MAX]; # else char buf[256]; # endif } _Xttynameparams; # define _XGetlogin(p) getlogin_r((p).buf, sizeof((p).buf)) # define _XTtyname(f,p) ttyname_r((f), (p).buf, sizeof((p).buf)) #endif /* X_INCLUDE_UNISTD_H */ #if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H) # define _XOS_INCLUDED_UNISTD_H #endif /***** wrappers *****/ /* * Effective prototypes for wrappers: * * #define X_INCLUDE_STRING_H * #define XOS_USE_..._LOCKING * #include * * typedef ... _Xstrtokparams; * * char *_XStrtok(char *, const char*, _Xstrtokparams); */ #if defined(X_INCLUDE_STRING_H) && !defined(_XOS_INCLUDED_STRING_H) /* has already been included by */ # if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_STRINGAPI) # define XOS_USE_MTSAFE_STRINGAPI 1 # endif #endif #if !defined(X_INCLUDE_STRING_H) || defined(_XOS_INCLUDED_STRING_H) /* Do nothing. */ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ typedef int _Xstrtokparams; /* dummy */ # define _XStrtok(s1,s2,p) \ ( p = 0, (void)p, strtok((s1),(s2)) ) #elif !defined(XOS_USE_MTSAFE_STRINGAPI) || defined(XNO_MTSAFE_STRINGAPI) /* Systems with thread support but no _r API. */ typedef char *_Xstrtokparams; # define _XStrtok(s1,s2,p) \ ( (_Xos_processLock), \ ((p) = strtok((s1),(s2))), \ (_Xos_processUnlock), \ (p) ) #else /* POSIX or pre-POSIX API. */ typedef char * _Xstrtokparams; # define _XStrtok(s1,s2,p) strtok_r((s1),(s2),&(p)) #endif /* X_INCLUDE_STRING_H */ /***** wrappers *****/ /* * Effective prototypes for wrappers: * * #define X_INCLUDE_TIME_H * #define XOS_USE_..._LOCKING * #include * * typedef ... _Xatimeparams; * typedef ... _Xctimeparams; * typedef ... _Xgtimeparams; * typedef ... _Xltimeparams; * * char *_XAsctime(const struct tm *, _Xatimeparams); * char *_XCtime(const time_t *, _Xctimeparams); * struct tm *_XGmtime(const time_t *, _Xgtimeparams); * struct tm *_XLocaltime(const time_t *, _Xltimeparams); */ #if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H) # include # if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_TIMEAPI) # define XOS_USE_MTSAFE_TIMEAPI 1 # endif #endif #if !defined(X_INCLUDE_TIME_H) || defined(_XOS_INCLUDED_TIME_H) /* Do nothing. */ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ typedef int _Xatimeparams; /* dummy */ # define _XAsctime(t,p) asctime((t)) typedef int _Xctimeparams; /* dummy */ # define _XCtime(t,p) ctime((t)) typedef int _Xgtimeparams; /* dummy */ # define _XGmtime(t,p) gmtime((t)) typedef int _Xltimeparams; /* dummy */ # define _XLocaltime(t,p) localtime((t)) #elif !defined(XOS_USE_MTSAFE_TIMEAPI) || defined(XNO_MTSAFE_TIMEAPI) /* Systems with thread support but no _r API. */ typedef struct { # ifdef TIMELEN char buf[TIMELEN]; # else char buf[26]; # endif char *result; } _Xctimeparams, _Xatimeparams; typedef struct { struct tm buf; struct tm *result; } _Xgtimeparams, _Xltimeparams; # define _XAsctime(t,p) \ ( (_Xos_processLock), \ (((p).result = asctime((t))) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result ) # define _XCtime(t,p) \ ( (_Xos_processLock), \ (((p).result = ctime((t))) ? \ (strncpy((p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result ) # define _XGmtime(t,p) \ ( (_Xos_processLock), \ (((p).result = gmtime(t)) ? \ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result ) # define _XLocaltime(t,p) \ ( (_Xos_processLock), \ (((p).result = localtime(t)) ? \ (memcpy(&(p).buf, (p).result, sizeof((p).buf)), (p).result = &(p).buf) : \ 0), \ (_Xos_processUnlock), \ (p).result ) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(hpV4) /* Returns (int)0 on success. * * extern int asctime_r(const struct tm *timeptr, char *buffer, int buflen); * extern int ctime_r(const time_t *timer, char *buffer, int buflen); * extern int gmtime_r(const time_t *timer, struct tm *result); * extern int localtime_r(const time_t *timer, struct tm *result); */ # ifdef TIMELEN typedef char _Xatimeparams[TIMELEN]; typedef char _Xctimeparams[TIMELEN]; # else typedef char _Xatimeparams[26]; typedef char _Xctimeparams[26]; # endif typedef struct tm _Xgtimeparams; typedef struct tm _Xltimeparams; # define _XAsctime(t,p) (asctime_r((t),(p),sizeof((p))) ? NULL : (p)) # define _XCtime(t,p) (ctime_r((t),(p),sizeof((p))) ? NULL : (p)) # define _XGmtime(t,p) (gmtime_r((t),&(p)) ? NULL : &(p)) # define _XLocaltime(t,p) (localtime_r((t),&(p)) ? NULL : &(p)) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun) /* Returns NULL on failure. Solaris 2.5 * * extern char *asctime_r(const struct tm *tm,char *buf, int buflen); * extern char *ctime_r(const time_t *clock, char *buf, int buflen); * extern struct tm *gmtime_r(const time_t *clock, struct tm *res); * extern struct tm *localtime_r(const time_t *clock, struct tm *res); */ # ifdef TIMELEN typedef char _Xatimeparams[TIMELEN]; typedef char _Xctimeparams[TIMELEN]; # else typedef char _Xatimeparams[26]; typedef char _Xctimeparams[26]; # endif typedef struct tm _Xgtimeparams; typedef struct tm _Xltimeparams; # define _XAsctime(t,p) asctime_r((t),(p),sizeof((p))) # define _XCtime(t,p) ctime_r((t),(p),sizeof((p))) # define _XGmtime(t,p) gmtime_r((t),&(p)) # define _XLocaltime(t,p) localtime_r((t),&(p)) #else /* defined(_POSIX_THREAD_SAFE_FUNCTIONS) */ /* POSIX final API. * extern char *asctime_r(const struct tm *timeptr, char *buffer); * extern char *ctime_r(const time_t *timer, char *buffer); * extern struct tm *gmtime_r(const time_t *timer, struct tm *result); * extern struct tm *localtime_r(const time_t *timer, struct tm *result); */ # ifdef TIMELEN typedef char _Xatimeparams[TIMELEN]; typedef char _Xctimeparams[TIMELEN]; # else typedef char _Xatimeparams[26]; typedef char _Xctimeparams[26]; # endif typedef struct tm _Xgtimeparams; typedef struct tm _Xltimeparams; # define _XAsctime(t,p) asctime_r((t),(p)) # define _XCtime(t,p) ctime_r((t),(p)) # define _XGmtime(t,p) gmtime_r((t),&(p)) # define _XLocaltime(t,p) localtime_r((t),&(p)) #endif /* X_INCLUDE_TIME_H */ #if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H) # define _XOS_INCLUDED_TIME_H #endif /***** wrappers *****/ /* * Effective prototypes for wrappers: * * NOTE: On systems lacking appropriate _r functions Getgrgid() and * Getgrnam() do NOT copy the list of group members! * * Remember that fgetgrent(), setgrent(), getgrent(), and endgrent() * are not included in POSIX. * * #define X_INCLUDE_GRP_H * #define XOS_USE_..._LOCKING * #include * * typedef ... _Xgetgrparams; * * struct group *_XGetgrgid(gid_t, _Xgetgrparams); * struct group *_XGetgrnam(const char *, _Xgetgrparams); */ #if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H) # include # if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_GRPAPI) # define XOS_USE_MTSAFE_GRPAPI 1 # endif #endif #if !defined(X_INCLUDE_GRP_H) || defined(_XOS_INCLUDED_GRP_H) /* Do nothing. */ #elif !defined(XTHREADS) && !defined(X_FORCE_USE_MTSAFE_API) /* Use regular, unsafe API. */ typedef int _Xgetgrparams; /* dummy */ #define _XGetgrgid(g,p) getgrgid((g)) #define _XGetgrnam(n,p) getgrnam((n)) #elif !defined(XOS_USE_MTSAFE_GRPAPI) || defined(XNO_MTSAFE_GRPAPI) /* Systems with thread support but no _r API. UnixWare 2.0. */ typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */ struct group *pgrp; size_t len; } _Xgetgrparams; #ifdef SVR4 /* Copy the gr_passwd field too. */ # define _Xgrp_copyGroup(p) \ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \ ((p).grp.gr_name = (p).buf), \ ((p).len = strlen((p).pgrp->gr_name)), \ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \ ((p).grp.gr_passwd = (p).grp.gr_name + (p).len + 1), \ ((p).pgrp = &(p).grp), \ 0 ) #else # define _Xgrp_copyGroup(p) \ ( memcpy(&(p).grp, (p).pgrp, sizeof(struct group)), \ ((p).grp.gr_name = (p).buf), \ strcpy((p).grp.gr_name, (p).pgrp->gr_name), \ ((p).pgrp = &(p).grp), \ 0 ) #endif #define _XGetgrgid(g,p) \ ( (_Xos_processLock), \ (((p).pgrp = getgrgid((g))) ? _Xgrp_copyGroup(p) : 0), \ (_Xos_processUnlock), \ (p).pgrp ) #define _XGetgrnam(n,p) \ ( (_Xos_processLock), \ (((p).pgrp = getgrnam((n))) ? _Xgrp_copyGroup(p) : 0), \ (_Xos_processUnlock), \ (p).pgrp ) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(__sun) /* Non-POSIX API. Solaris. * * extern struct group *getgrgid_r(gid_t, struct group *, char *, int); * extern struct group *getgrnam_r(const char *, struct group *, char *, int); */ typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */ } _Xgetgrparams; #define _XGetgrgid(g,p) getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf)) #define _XGetgrnam(n,p) getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf)) #elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) /* Non-POSIX API. * extern int getgrgid_r(gid_t, struct group *, char *, int); * extern int getgrnam_r(const char *, struct group *, char *, int); */ typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */ } _Xgetgrparams; #define _XGetgrgid(g,p) \ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp)) #define _XGetgrnam(n,p) \ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf)) ? NULL : &(p).grp)) #else /* POSIX final API. * * int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); * int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); */ typedef struct { struct group grp; char buf[X_LINE_MAX]; /* Should be sysconf(_SC_GETGR_R_SIZE_MAX)? */ struct group *result; } _Xgetgrparams; #define _XGetgrgid(g,p) \ ((getgrgid_r((g), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \ NULL : (p).result)) #define _XGetgrnam(n,p) \ ((getgrnam_r((n), &(p).grp, (p).buf, sizeof((p).buf), &(p).result) ? \ NULL : (p).result)) #endif #if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H) # define _XOS_INCLUDED_GRP_H #endif #ifdef __cplusplus } /* Close scope of 'extern "C"' declaration which encloses file. */ #endif PKZ /* * Get major data types (esp. caddr_t) */ # include # if defined(__SCO__) || defined(__UNIXWARE__) # include # endif /* * Just about everyone needs the strings routines. We provide both forms here, * index/rindex and strchr/strrchr, so any systems that don't provide them all * need to have #defines here. * * These macros are defined this way, rather than, e.g.: * #defined index(s,c) strchr(s,c) * because someone might be using them as function pointers, and such * a change would break compatibility for anyone who's relying on them * being the way they currently are. So we're stuck with them this way, * which can be really inconvenient. :-( */ # include # if defined(__SCO__) || defined(__UNIXWARE__) || defined(__sun) || defined(__CYGWIN__) || defined(_AIX) || defined(__APPLE__) # include # else # ifndef index # define index(s,c) (strchr((s),(c))) # endif # ifndef rindex # define rindex(s,c) (strrchr((s),(c))) # endif # endif /* * Get open(2) constants */ # if defined(X_NOT_POSIX) # include # if defined(USL) || defined(__i386__) && (defined(SYSV) || defined(SVR4)) # include # endif # ifdef WIN32 # include # else # include # endif # else /* X_NOT_POSIX */ # include # include # endif /* X_NOT_POSIX else */ /* * Get struct timeval and struct tm */ # if defined(_POSIX_SOURCE) && defined(SVR4) /* need to omit _POSIX_SOURCE in order to get what we want in SVR4 */ # undef _POSIX_SOURCE # include # define _POSIX_SOURCE # elif defined(WIN32) # include # if !defined(_WINSOCKAPI_) && !defined(_WILLWINSOCK_) && !defined(_TIMEVAL_DEFINED) && !defined(_STRUCT_TIMEVAL) struct timeval { long tv_sec; /* seconds */ long tv_usec; /* and microseconds */ }; # define _TIMEVAL_DEFINED # endif # include # define gettimeofday(t) \ { \ struct _timeb _gtodtmp; \ _ftime (&_gtodtmp); \ (t)->tv_sec = _gtodtmp.time; \ (t)->tv_usec = _gtodtmp.millitm * 1000; \ } # else # include # include # endif /* defined(_POSIX_SOURCE) && defined(SVR4) */ /* define X_GETTIMEOFDAY macro, a portable gettimeofday() */ # if defined(_XOPEN_XPG4) || defined(_XOPEN_UNIX) /* _XOPEN_UNIX is XPG4.2 */ # define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0) # else # if defined(SVR4) || defined(__SVR4) || defined(WIN32) # define X_GETTIMEOFDAY(t) gettimeofday(t) # else # define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0) # endif # endif /* XPG4 else */ # ifdef __GNU__ # define PATH_MAX 4096 # define MAXPATHLEN 4096 # define OPEN_MAX 256 /* We define a reasonable limit. */ # endif /* use POSIX name for signal */ # if defined(X_NOT_POSIX) && defined(SYSV) && !defined(SIGCHLD) # define SIGCHLD SIGCLD # endif # include #endif /* _XOS_H_ */ PKZ`, X11/Xlocale.hnu[/* Copyright 1991, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _X11_XLOCALE_H_ #define _X11_XLOCALE_H_ #include #include #include #endif /* _X11_XLOCALE_H_ */ PKZ^h X11/Xwindows.hnu[/* Copyright 1996, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL- ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * This header file has the sole purpose of allowing the inclusion of * windows.h without getting any name conflicts with X headers code, by * renaming or disabling the conflicting definitions from windows.h */ /* * Mingw.org versions of the Windows API headers actually avoid * making the conflicting definitions if XFree86Server is defined, so we * need to remember if that was defined and undefine it during including * windows.h (so the conflicting definitions get wrapped correctly), and * then redefine it afterwards. (This was never the correct thing to * do as it's no help at all to X11 clients which also need to use the * Win32 API) */ #undef _XFree86Server #ifdef XFree86Server # define _XFree86Server # undef XFree86Server #endif /* * There doesn't seem to be a good way to wrap the min/max macros from * windows.h, so we simply avoid defining them completely, allowing any * pre-existing definition to stand. * */ #define NOMINMAX /* * mingw-w64 headers define BOOL as a typedef, protecting against macros * mingw.org headers define BOOL in terms of WINBOOL * ... so try to come up with something which works with both :-) */ #define _NO_BOOL_TYPEDEF #define BOOL WINBOOL #define INT32 wINT32 #ifdef __x86_64__ #define INT64 wINT64 #define LONG64 wLONG64 #endif #undef Status #define Status wStatus #define ATOM wATOM #define BYTE wBYTE #define FreeResource wFreeResource #include #undef NOMINMAX #undef Status #define Status int #undef BYTE #undef BOOL #undef INT32 #undef INT64 #undef LONG64 #undef ATOM #undef FreeResource #undef CreateWindowA /* * Older version of this header used to name the windows API bool type wBOOL, * rather than more standard name WINBOOL */ #define wBOOL WINBOOL #ifdef RESOURCE_H # undef RT_FONT # undef RT_CURSOR # define RT_FONT ((RESTYPE)4) # define RT_CURSOR ((RESTYPE)5) #endif #ifndef __CYGWIN__ #define sleep(x) Sleep((x) * 1000) #endif #if defined(WIN32) && (!defined(PATH_MAX) || PATH_MAX < 1024) # undef PATH_MAX # define PATH_MAX 1024 #endif #ifdef _XFree86Server # define XFree86Server # undef _XFree86Server #endif PKZw/ X11/DECkeysym.hnu[/*********************************************************** Copyright 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ /* * DEC private keysyms * (29th bit set) */ /* two-key compose sequence initiators, chosen to map to Latin1 characters */ #define DXK_ring_accent 0x1000FEB0 #define DXK_circumflex_accent 0x1000FE5E #define DXK_cedilla_accent 0x1000FE2C #define DXK_acute_accent 0x1000FE27 #define DXK_grave_accent 0x1000FE60 #define DXK_tilde 0x1000FE7E #define DXK_diaeresis 0x1000FE22 /* special keysym for LK2** "Remove" key on editing keypad */ #define DXK_Remove 0x1000FF00 /* Remove */ PKZ]X11/Sunkeysym.hnu[/* * Copyright (c) 1991, Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /************************************************************ Copyright 1991, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. ***********************************************************/ /* * Floating Accent */ #define SunXK_FA_Grave 0x1005FF00 #define SunXK_FA_Circum 0x1005FF01 #define SunXK_FA_Tilde 0x1005FF02 #define SunXK_FA_Acute 0x1005FF03 #define SunXK_FA_Diaeresis 0x1005FF04 #define SunXK_FA_Cedilla 0x1005FF05 /* * Miscellaneous Functions */ #define SunXK_F36 0x1005FF10 /* Labeled F11 */ #define SunXK_F37 0x1005FF11 /* Labeled F12 */ #define SunXK_Sys_Req 0x1005FF60 #define SunXK_Print_Screen 0x0000FF61 /* Same as XK_Print */ /* * International & Multi-Key Character Composition */ #define SunXK_Compose 0x0000FF20 /* Same as XK_Multi_key */ #define SunXK_AltGraph 0x0000FF7E /* Same as XK_Mode_switch */ /* * Cursor Control */ #define SunXK_PageUp 0x0000FF55 /* Same as XK_Prior */ #define SunXK_PageDown 0x0000FF56 /* Same as XK_Next */ /* * Open Look Functions */ #define SunXK_Undo 0x0000FF65 /* Same as XK_Undo */ #define SunXK_Again 0x0000FF66 /* Same as XK_Redo */ #define SunXK_Find 0x0000FF68 /* Same as XK_Find */ #define SunXK_Stop 0x0000FF69 /* Same as XK_Cancel */ #define SunXK_Props 0x1005FF70 #define SunXK_Front 0x1005FF71 #define SunXK_Copy 0x1005FF72 #define SunXK_Open 0x1005FF73 #define SunXK_Paste 0x1005FF74 #define SunXK_Cut 0x1005FF75 #define SunXK_PowerSwitch 0x1005FF76 #define SunXK_AudioLowerVolume 0x1005FF77 #define SunXK_AudioMute 0x1005FF78 #define SunXK_AudioRaiseVolume 0x1005FF79 #define SunXK_VideoDegauss 0x1005FF7A #define SunXK_VideoLowerBrightness 0x1005FF7B #define SunXK_VideoRaiseBrightness 0x1005FF7C #define SunXK_PowerSwitchShift 0x1005FF7D PKZ"ףX11/keysymdef.hnu[/*********************************************************** Copyright 1987, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ /* * The "X11 Window System Protocol" standard defines in Appendix A the * keysym codes. These 29-bit integer values identify characters or * functions associated with each key (e.g., via the visible * engraving) of a keyboard layout. This file assigns mnemonic macro * names for these keysyms. * * This file is also compiled (by src/util/makekeys.c in libX11) into * hash tables that can be accessed with X11 library functions such as * XStringToKeysym() and XKeysymToString(). * * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode * character, this is noted in a comment that provides both the U+xxxx * Unicode position, as well as the official Unicode name of the * character. * * Where the correspondence is either not one-to-one or semantically * unclear, the Unicode position and name are enclosed in * parentheses. Such legacy keysyms should be considered deprecated * and are not recommended for use in future keyboard mappings. * * For any future extension of the keysyms with characters already * found in ISO 10646 / Unicode, the following algorithm shall be * used. The new keysym code position will simply be the character's * Unicode number plus 0x01000000. The keysym values in the range * 0x01000100 to 0x0110ffff are reserved to represent Unicode * characters in the range U+0100 to U+10FFFF. * * While most newer Unicode-based X11 clients do already accept * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it * will remain necessary for clients -- in the interest of * compatibility with existing servers -- to also understand the * existing legacy keysym values in the range 0x0100 to 0x20ff. * * Where several mnemonic names are defined for the same keysym in this * file, all but the first one listed should be considered deprecated. * * Mnemonic names for keysyms are defined in this file with lines * that match one of these Perl regular expressions: * * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U+([0-9A-F]{4,6}) (.*) \*\/\s*$/ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/ * /^\#define XK_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/ * * Before adding new keysyms, please do consider the following: In * addition to the keysym names defined in this file, the * XStringToKeysym() and XKeysymToString() functions will also handle * any keysym string of the form "U0020" to "U007E" and "U00A0" to * "U10FFFF" for all possible Unicode characters. In other words, * every possible Unicode character has already a keysym string * defined algorithmically, even if it is not listed here. Therefore, * defining an additional keysym macro is only necessary where a * non-hexadecimal mnemonic name is needed, or where the new keysym * does not represent any existing Unicode character. * * When adding new keysyms to this file, do not forget to also update the * following as needed: * * - the mappings in src/KeyBind.c in the libX11 repo * https://gitlab.freedesktop.org/xorg/lib/libx11 * * - the protocol specification in specs/keysyms.xml in this repo * https://gitlab.freedesktop.org/xorg/proto/xorgproto * */ #define XK_VoidSymbol 0xffffff /* Void symbol */ #ifdef XK_MISCELLANY /* * TTY function keys, cleverly chosen to map to ASCII, for convenience of * programming, but could have been arbitrary (at the cost of lookup * tables in client code). */ #define XK_BackSpace 0xff08 /* Back space, back char */ #define XK_Tab 0xff09 #define XK_Linefeed 0xff0a /* Linefeed, LF */ #define XK_Clear 0xff0b #define XK_Return 0xff0d /* Return, enter */ #define XK_Pause 0xff13 /* Pause, hold */ #define XK_Scroll_Lock 0xff14 #define XK_Sys_Req 0xff15 #define XK_Escape 0xff1b #define XK_Delete 0xffff /* Delete, rubout */ /* International & multi-key character composition */ #define XK_Multi_key 0xff20 /* Multi-key character compose */ #define XK_Codeinput 0xff37 #define XK_SingleCandidate 0xff3c #define XK_MultipleCandidate 0xff3d #define XK_PreviousCandidate 0xff3e /* Japanese keyboard support */ #define XK_Kanji 0xff21 /* Kanji, Kanji convert */ #define XK_Muhenkan 0xff22 /* Cancel Conversion */ #define XK_Henkan_Mode 0xff23 /* Start/Stop Conversion */ #define XK_Henkan 0xff23 /* Alias for Henkan_Mode */ #define XK_Romaji 0xff24 /* to Romaji */ #define XK_Hiragana 0xff25 /* to Hiragana */ #define XK_Katakana 0xff26 /* to Katakana */ #define XK_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */ #define XK_Zenkaku 0xff28 /* to Zenkaku */ #define XK_Hankaku 0xff29 /* to Hankaku */ #define XK_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */ #define XK_Touroku 0xff2b /* Add to Dictionary */ #define XK_Massyo 0xff2c /* Delete from Dictionary */ #define XK_Kana_Lock 0xff2d /* Kana Lock */ #define XK_Kana_Shift 0xff2e /* Kana Shift */ #define XK_Eisu_Shift 0xff2f /* Alphanumeric Shift */ #define XK_Eisu_toggle 0xff30 /* Alphanumeric toggle */ #define XK_Kanji_Bangou 0xff37 /* Codeinput */ #define XK_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */ #define XK_Mae_Koho 0xff3e /* Previous Candidate */ /* 0xff31 thru 0xff3f are under XK_KOREAN */ /* Cursor control & motion */ #define XK_Home 0xff50 #define XK_Left 0xff51 /* Move left, left arrow */ #define XK_Up 0xff52 /* Move up, up arrow */ #define XK_Right 0xff53 /* Move right, right arrow */ #define XK_Down 0xff54 /* Move down, down arrow */ #define XK_Prior 0xff55 /* Prior, previous */ #define XK_Page_Up 0xff55 #define XK_Next 0xff56 /* Next */ #define XK_Page_Down 0xff56 #define XK_End 0xff57 /* EOL */ #define XK_Begin 0xff58 /* BOL */ /* Misc functions */ #define XK_Select 0xff60 /* Select, mark */ #define XK_Print 0xff61 #define XK_Execute 0xff62 /* Execute, run, do */ #define XK_Insert 0xff63 /* Insert, insert here */ #define XK_Undo 0xff65 #define XK_Redo 0xff66 /* Redo, again */ #define XK_Menu 0xff67 #define XK_Find 0xff68 /* Find, search */ #define XK_Cancel 0xff69 /* Cancel, stop, abort, exit */ #define XK_Help 0xff6a /* Help */ #define XK_Break 0xff6b #define XK_Mode_switch 0xff7e /* Character set switch */ #define XK_script_switch 0xff7e /* Alias for mode_switch */ #define XK_Num_Lock 0xff7f /* Keypad functions, keypad numbers cleverly chosen to map to ASCII */ #define XK_KP_Space 0xff80 /* Space */ #define XK_KP_Tab 0xff89 #define XK_KP_Enter 0xff8d /* Enter */ #define XK_KP_F1 0xff91 /* PF1, KP_A, ... */ #define XK_KP_F2 0xff92 #define XK_KP_F3 0xff93 #define XK_KP_F4 0xff94 #define XK_KP_Home 0xff95 #define XK_KP_Left 0xff96 #define XK_KP_Up 0xff97 #define XK_KP_Right 0xff98 #define XK_KP_Down 0xff99 #define XK_KP_Prior 0xff9a #define XK_KP_Page_Up 0xff9a #define XK_KP_Next 0xff9b #define XK_KP_Page_Down 0xff9b #define XK_KP_End 0xff9c #define XK_KP_Begin 0xff9d #define XK_KP_Insert 0xff9e #define XK_KP_Delete 0xff9f #define XK_KP_Equal 0xffbd /* Equals */ #define XK_KP_Multiply 0xffaa #define XK_KP_Add 0xffab #define XK_KP_Separator 0xffac /* Separator, often comma */ #define XK_KP_Subtract 0xffad #define XK_KP_Decimal 0xffae #define XK_KP_Divide 0xffaf #define XK_KP_0 0xffb0 #define XK_KP_1 0xffb1 #define XK_KP_2 0xffb2 #define XK_KP_3 0xffb3 #define XK_KP_4 0xffb4 #define XK_KP_5 0xffb5 #define XK_KP_6 0xffb6 #define XK_KP_7 0xffb7 #define XK_KP_8 0xffb8 #define XK_KP_9 0xffb9 /* * Auxiliary functions; note the duplicate definitions for left and right * function keys; Sun keyboards and a few other manufacturers have such * function key groups on the left and/or right sides of the keyboard. * We've not found a keyboard with more than 35 function keys total. */ #define XK_F1 0xffbe #define XK_F2 0xffbf #define XK_F3 0xffc0 #define XK_F4 0xffc1 #define XK_F5 0xffc2 #define XK_F6 0xffc3 #define XK_F7 0xffc4 #define XK_F8 0xffc5 #define XK_F9 0xffc6 #define XK_F10 0xffc7 #define XK_F11 0xffc8 #define XK_L1 0xffc8 #define XK_F12 0xffc9 #define XK_L2 0xffc9 #define XK_F13 0xffca #define XK_L3 0xffca #define XK_F14 0xffcb #define XK_L4 0xffcb #define XK_F15 0xffcc #define XK_L5 0xffcc #define XK_F16 0xffcd #define XK_L6 0xffcd #define XK_F17 0xffce #define XK_L7 0xffce #define XK_F18 0xffcf #define XK_L8 0xffcf #define XK_F19 0xffd0 #define XK_L9 0xffd0 #define XK_F20 0xffd1 #define XK_L10 0xffd1 #define XK_F21 0xffd2 #define XK_R1 0xffd2 #define XK_F22 0xffd3 #define XK_R2 0xffd3 #define XK_F23 0xffd4 #define XK_R3 0xffd4 #define XK_F24 0xffd5 #define XK_R4 0xffd5 #define XK_F25 0xffd6 #define XK_R5 0xffd6 #define XK_F26 0xffd7 #define XK_R6 0xffd7 #define XK_F27 0xffd8 #define XK_R7 0xffd8 #define XK_F28 0xffd9 #define XK_R8 0xffd9 #define XK_F29 0xffda #define XK_R9 0xffda #define XK_F30 0xffdb #define XK_R10 0xffdb #define XK_F31 0xffdc #define XK_R11 0xffdc #define XK_F32 0xffdd #define XK_R12 0xffdd #define XK_F33 0xffde #define XK_R13 0xffde #define XK_F34 0xffdf #define XK_R14 0xffdf #define XK_F35 0xffe0 #define XK_R15 0xffe0 /* Modifiers */ #define XK_Shift_L 0xffe1 /* Left shift */ #define XK_Shift_R 0xffe2 /* Right shift */ #define XK_Control_L 0xffe3 /* Left control */ #define XK_Control_R 0xffe4 /* Right control */ #define XK_Caps_Lock 0xffe5 /* Caps lock */ #define XK_Shift_Lock 0xffe6 /* Shift lock */ #define XK_Meta_L 0xffe7 /* Left meta */ #define XK_Meta_R 0xffe8 /* Right meta */ #define XK_Alt_L 0xffe9 /* Left alt */ #define XK_Alt_R 0xffea /* Right alt */ #define XK_Super_L 0xffeb /* Left super */ #define XK_Super_R 0xffec /* Right super */ #define XK_Hyper_L 0xffed /* Left hyper */ #define XK_Hyper_R 0xffee /* Right hyper */ #endif /* XK_MISCELLANY */ /* * Keyboard (XKB) Extension function and modifier keys * (from Appendix C of "The X Keyboard Extension: Protocol Specification") * Byte 3 = 0xfe */ #ifdef XK_XKB_KEYS #define XK_ISO_Lock 0xfe01 #define XK_ISO_Level2_Latch 0xfe02 #define XK_ISO_Level3_Shift 0xfe03 #define XK_ISO_Level3_Latch 0xfe04 #define XK_ISO_Level3_Lock 0xfe05 #define XK_ISO_Level5_Shift 0xfe11 #define XK_ISO_Level5_Latch 0xfe12 #define XK_ISO_Level5_Lock 0xfe13 #define XK_ISO_Group_Shift 0xff7e /* Alias for mode_switch */ #define XK_ISO_Group_Latch 0xfe06 #define XK_ISO_Group_Lock 0xfe07 #define XK_ISO_Next_Group 0xfe08 #define XK_ISO_Next_Group_Lock 0xfe09 #define XK_ISO_Prev_Group 0xfe0a #define XK_ISO_Prev_Group_Lock 0xfe0b #define XK_ISO_First_Group 0xfe0c #define XK_ISO_First_Group_Lock 0xfe0d #define XK_ISO_Last_Group 0xfe0e #define XK_ISO_Last_Group_Lock 0xfe0f #define XK_ISO_Left_Tab 0xfe20 #define XK_ISO_Move_Line_Up 0xfe21 #define XK_ISO_Move_Line_Down 0xfe22 #define XK_ISO_Partial_Line_Up 0xfe23 #define XK_ISO_Partial_Line_Down 0xfe24 #define XK_ISO_Partial_Space_Left 0xfe25 #define XK_ISO_Partial_Space_Right 0xfe26 #define XK_ISO_Set_Margin_Left 0xfe27 #define XK_ISO_Set_Margin_Right 0xfe28 #define XK_ISO_Release_Margin_Left 0xfe29 #define XK_ISO_Release_Margin_Right 0xfe2a #define XK_ISO_Release_Both_Margins 0xfe2b #define XK_ISO_Fast_Cursor_Left 0xfe2c #define XK_ISO_Fast_Cursor_Right 0xfe2d #define XK_ISO_Fast_Cursor_Up 0xfe2e #define XK_ISO_Fast_Cursor_Down 0xfe2f #define XK_ISO_Continuous_Underline 0xfe30 #define XK_ISO_Discontinuous_Underline 0xfe31 #define XK_ISO_Emphasize 0xfe32 #define XK_ISO_Center_Object 0xfe33 #define XK_ISO_Enter 0xfe34 #define XK_dead_grave 0xfe50 #define XK_dead_acute 0xfe51 #define XK_dead_circumflex 0xfe52 #define XK_dead_tilde 0xfe53 #define XK_dead_perispomeni 0xfe53 /* alias for dead_tilde */ #define XK_dead_macron 0xfe54 #define XK_dead_breve 0xfe55 #define XK_dead_abovedot 0xfe56 #define XK_dead_diaeresis 0xfe57 #define XK_dead_abovering 0xfe58 #define XK_dead_doubleacute 0xfe59 #define XK_dead_caron 0xfe5a #define XK_dead_cedilla 0xfe5b #define XK_dead_ogonek 0xfe5c #define XK_dead_iota 0xfe5d #define XK_dead_voiced_sound 0xfe5e #define XK_dead_semivoiced_sound 0xfe5f #define XK_dead_belowdot 0xfe60 #define XK_dead_hook 0xfe61 #define XK_dead_horn 0xfe62 #define XK_dead_stroke 0xfe63 #define XK_dead_abovecomma 0xfe64 #define XK_dead_psili 0xfe64 /* alias for dead_abovecomma */ #define XK_dead_abovereversedcomma 0xfe65 #define XK_dead_dasia 0xfe65 /* alias for dead_abovereversedcomma */ #define XK_dead_doublegrave 0xfe66 #define XK_dead_belowring 0xfe67 #define XK_dead_belowmacron 0xfe68 #define XK_dead_belowcircumflex 0xfe69 #define XK_dead_belowtilde 0xfe6a #define XK_dead_belowbreve 0xfe6b #define XK_dead_belowdiaeresis 0xfe6c #define XK_dead_invertedbreve 0xfe6d #define XK_dead_belowcomma 0xfe6e #define XK_dead_currency 0xfe6f /* extra dead elements for German T3 layout */ #define XK_dead_lowline 0xfe90 #define XK_dead_aboveverticalline 0xfe91 #define XK_dead_belowverticalline 0xfe92 #define XK_dead_longsolidusoverlay 0xfe93 /* dead vowels for universal syllable entry */ #define XK_dead_a 0xfe80 #define XK_dead_A 0xfe81 #define XK_dead_e 0xfe82 #define XK_dead_E 0xfe83 #define XK_dead_i 0xfe84 #define XK_dead_I 0xfe85 #define XK_dead_o 0xfe86 #define XK_dead_O 0xfe87 #define XK_dead_u 0xfe88 #define XK_dead_U 0xfe89 #define XK_dead_small_schwa 0xfe8a #define XK_dead_capital_schwa 0xfe8b #define XK_dead_greek 0xfe8c #define XK_First_Virtual_Screen 0xfed0 #define XK_Prev_Virtual_Screen 0xfed1 #define XK_Next_Virtual_Screen 0xfed2 #define XK_Last_Virtual_Screen 0xfed4 #define XK_Terminate_Server 0xfed5 #define XK_AccessX_Enable 0xfe70 #define XK_AccessX_Feedback_Enable 0xfe71 #define XK_RepeatKeys_Enable 0xfe72 #define XK_SlowKeys_Enable 0xfe73 #define XK_BounceKeys_Enable 0xfe74 #define XK_StickyKeys_Enable 0xfe75 #define XK_MouseKeys_Enable 0xfe76 #define XK_MouseKeys_Accel_Enable 0xfe77 #define XK_Overlay1_Enable 0xfe78 #define XK_Overlay2_Enable 0xfe79 #define XK_AudibleBell_Enable 0xfe7a #define XK_Pointer_Left 0xfee0 #define XK_Pointer_Right 0xfee1 #define XK_Pointer_Up 0xfee2 #define XK_Pointer_Down 0xfee3 #define XK_Pointer_UpLeft 0xfee4 #define XK_Pointer_UpRight 0xfee5 #define XK_Pointer_DownLeft 0xfee6 #define XK_Pointer_DownRight 0xfee7 #define XK_Pointer_Button_Dflt 0xfee8 #define XK_Pointer_Button1 0xfee9 #define XK_Pointer_Button2 0xfeea #define XK_Pointer_Button3 0xfeeb #define XK_Pointer_Button4 0xfeec #define XK_Pointer_Button5 0xfeed #define XK_Pointer_DblClick_Dflt 0xfeee #define XK_Pointer_DblClick1 0xfeef #define XK_Pointer_DblClick2 0xfef0 #define XK_Pointer_DblClick3 0xfef1 #define XK_Pointer_DblClick4 0xfef2 #define XK_Pointer_DblClick5 0xfef3 #define XK_Pointer_Drag_Dflt 0xfef4 #define XK_Pointer_Drag1 0xfef5 #define XK_Pointer_Drag2 0xfef6 #define XK_Pointer_Drag3 0xfef7 #define XK_Pointer_Drag4 0xfef8 #define XK_Pointer_Drag5 0xfefd #define XK_Pointer_EnableKeys 0xfef9 #define XK_Pointer_Accelerate 0xfefa #define XK_Pointer_DfltBtnNext 0xfefb #define XK_Pointer_DfltBtnPrev 0xfefc /* Single-Stroke Multiple-Character N-Graph Keysyms For The X Input Method */ #define XK_ch 0xfea0 #define XK_Ch 0xfea1 #define XK_CH 0xfea2 #define XK_c_h 0xfea3 #define XK_C_h 0xfea4 #define XK_C_H 0xfea5 #endif /* XK_XKB_KEYS */ /* * 3270 Terminal Keys * Byte 3 = 0xfd */ #ifdef XK_3270 #define XK_3270_Duplicate 0xfd01 #define XK_3270_FieldMark 0xfd02 #define XK_3270_Right2 0xfd03 #define XK_3270_Left2 0xfd04 #define XK_3270_BackTab 0xfd05 #define XK_3270_EraseEOF 0xfd06 #define XK_3270_EraseInput 0xfd07 #define XK_3270_Reset 0xfd08 #define XK_3270_Quit 0xfd09 #define XK_3270_PA1 0xfd0a #define XK_3270_PA2 0xfd0b #define XK_3270_PA3 0xfd0c #define XK_3270_Test 0xfd0d #define XK_3270_Attn 0xfd0e #define XK_3270_CursorBlink 0xfd0f #define XK_3270_AltCursor 0xfd10 #define XK_3270_KeyClick 0xfd11 #define XK_3270_Jump 0xfd12 #define XK_3270_Ident 0xfd13 #define XK_3270_Rule 0xfd14 #define XK_3270_Copy 0xfd15 #define XK_3270_Play 0xfd16 #define XK_3270_Setup 0xfd17 #define XK_3270_Record 0xfd18 #define XK_3270_ChangeScreen 0xfd19 #define XK_3270_DeleteWord 0xfd1a #define XK_3270_ExSelect 0xfd1b #define XK_3270_CursorSelect 0xfd1c #define XK_3270_PrintScreen 0xfd1d #define XK_3270_Enter 0xfd1e #endif /* XK_3270 */ /* * Latin 1 * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF) * Byte 3 = 0 */ #ifdef XK_LATIN1 #define XK_space 0x0020 /* U+0020 SPACE */ #define XK_exclam 0x0021 /* U+0021 EXCLAMATION MARK */ #define XK_quotedbl 0x0022 /* U+0022 QUOTATION MARK */ #define XK_numbersign 0x0023 /* U+0023 NUMBER SIGN */ #define XK_dollar 0x0024 /* U+0024 DOLLAR SIGN */ #define XK_percent 0x0025 /* U+0025 PERCENT SIGN */ #define XK_ampersand 0x0026 /* U+0026 AMPERSAND */ #define XK_apostrophe 0x0027 /* U+0027 APOSTROPHE */ #define XK_quoteright 0x0027 /* deprecated */ #define XK_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */ #define XK_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */ #define XK_asterisk 0x002a /* U+002A ASTERISK */ #define XK_plus 0x002b /* U+002B PLUS SIGN */ #define XK_comma 0x002c /* U+002C COMMA */ #define XK_minus 0x002d /* U+002D HYPHEN-MINUS */ #define XK_period 0x002e /* U+002E FULL STOP */ #define XK_slash 0x002f /* U+002F SOLIDUS */ #define XK_0 0x0030 /* U+0030 DIGIT ZERO */ #define XK_1 0x0031 /* U+0031 DIGIT ONE */ #define XK_2 0x0032 /* U+0032 DIGIT TWO */ #define XK_3 0x0033 /* U+0033 DIGIT THREE */ #define XK_4 0x0034 /* U+0034 DIGIT FOUR */ #define XK_5 0x0035 /* U+0035 DIGIT FIVE */ #define XK_6 0x0036 /* U+0036 DIGIT SIX */ #define XK_7 0x0037 /* U+0037 DIGIT SEVEN */ #define XK_8 0x0038 /* U+0038 DIGIT EIGHT */ #define XK_9 0x0039 /* U+0039 DIGIT NINE */ #define XK_colon 0x003a /* U+003A COLON */ #define XK_semicolon 0x003b /* U+003B SEMICOLON */ #define XK_less 0x003c /* U+003C LESS-THAN SIGN */ #define XK_equal 0x003d /* U+003D EQUALS SIGN */ #define XK_greater 0x003e /* U+003E GREATER-THAN SIGN */ #define XK_question 0x003f /* U+003F QUESTION MARK */ #define XK_at 0x0040 /* U+0040 COMMERCIAL AT */ #define XK_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */ #define XK_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */ #define XK_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */ #define XK_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */ #define XK_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */ #define XK_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */ #define XK_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */ #define XK_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */ #define XK_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */ #define XK_J 0x004a /* U+004A LATIN CAPITAL LETTER J */ #define XK_K 0x004b /* U+004B LATIN CAPITAL LETTER K */ #define XK_L 0x004c /* U+004C LATIN CAPITAL LETTER L */ #define XK_M 0x004d /* U+004D LATIN CAPITAL LETTER M */ #define XK_N 0x004e /* U+004E LATIN CAPITAL LETTER N */ #define XK_O 0x004f /* U+004F LATIN CAPITAL LETTER O */ #define XK_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */ #define XK_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */ #define XK_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */ #define XK_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */ #define XK_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */ #define XK_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */ #define XK_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */ #define XK_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */ #define XK_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */ #define XK_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */ #define XK_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */ #define XK_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */ #define XK_backslash 0x005c /* U+005C REVERSE SOLIDUS */ #define XK_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */ #define XK_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */ #define XK_underscore 0x005f /* U+005F LOW LINE */ #define XK_grave 0x0060 /* U+0060 GRAVE ACCENT */ #define XK_quoteleft 0x0060 /* deprecated */ #define XK_a 0x0061 /* U+0061 LATIN SMALL LETTER A */ #define XK_b 0x0062 /* U+0062 LATIN SMALL LETTER B */ #define XK_c 0x0063 /* U+0063 LATIN SMALL LETTER C */ #define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */ #define XK_e 0x0065 /* U+0065 LATIN SMALL LETTER E */ #define XK_f 0x0066 /* U+0066 LATIN SMALL LETTER F */ #define XK_g 0x0067 /* U+0067 LATIN SMALL LETTER G */ #define XK_h 0x0068 /* U+0068 LATIN SMALL LETTER H */ #define XK_i 0x0069 /* U+0069 LATIN SMALL LETTER I */ #define XK_j 0x006a /* U+006A LATIN SMALL LETTER J */ #define XK_k 0x006b /* U+006B LATIN SMALL LETTER K */ #define XK_l 0x006c /* U+006C LATIN SMALL LETTER L */ #define XK_m 0x006d /* U+006D LATIN SMALL LETTER M */ #define XK_n 0x006e /* U+006E LATIN SMALL LETTER N */ #define XK_o 0x006f /* U+006F LATIN SMALL LETTER O */ #define XK_p 0x0070 /* U+0070 LATIN SMALL LETTER P */ #define XK_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */ #define XK_r 0x0072 /* U+0072 LATIN SMALL LETTER R */ #define XK_s 0x0073 /* U+0073 LATIN SMALL LETTER S */ #define XK_t 0x0074 /* U+0074 LATIN SMALL LETTER T */ #define XK_u 0x0075 /* U+0075 LATIN SMALL LETTER U */ #define XK_v 0x0076 /* U+0076 LATIN SMALL LETTER V */ #define XK_w 0x0077 /* U+0077 LATIN SMALL LETTER W */ #define XK_x 0x0078 /* U+0078 LATIN SMALL LETTER X */ #define XK_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */ #define XK_z 0x007a /* U+007A LATIN SMALL LETTER Z */ #define XK_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */ #define XK_bar 0x007c /* U+007C VERTICAL LINE */ #define XK_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */ #define XK_asciitilde 0x007e /* U+007E TILDE */ #define XK_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */ #define XK_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */ #define XK_cent 0x00a2 /* U+00A2 CENT SIGN */ #define XK_sterling 0x00a3 /* U+00A3 POUND SIGN */ #define XK_currency 0x00a4 /* U+00A4 CURRENCY SIGN */ #define XK_yen 0x00a5 /* U+00A5 YEN SIGN */ #define XK_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */ #define XK_section 0x00a7 /* U+00A7 SECTION SIGN */ #define XK_diaeresis 0x00a8 /* U+00A8 DIAERESIS */ #define XK_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */ #define XK_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */ #define XK_guillemotleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ #define XK_notsign 0x00ac /* U+00AC NOT SIGN */ #define XK_hyphen 0x00ad /* U+00AD SOFT HYPHEN */ #define XK_registered 0x00ae /* U+00AE REGISTERED SIGN */ #define XK_macron 0x00af /* U+00AF MACRON */ #define XK_degree 0x00b0 /* U+00B0 DEGREE SIGN */ #define XK_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */ #define XK_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */ #define XK_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */ #define XK_acute 0x00b4 /* U+00B4 ACUTE ACCENT */ #define XK_mu 0x00b5 /* U+00B5 MICRO SIGN */ #define XK_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */ #define XK_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */ #define XK_cedilla 0x00b8 /* U+00B8 CEDILLA */ #define XK_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */ #define XK_masculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */ #define XK_guillemotright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ #define XK_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */ #define XK_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */ #define XK_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */ #define XK_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */ #define XK_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */ #define XK_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */ #define XK_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ #define XK_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */ #define XK_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */ #define XK_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */ #define XK_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */ #define XK_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */ #define XK_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */ #define XK_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */ #define XK_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ #define XK_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */ #define XK_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */ #define XK_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */ #define XK_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ #define XK_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */ #define XK_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */ #define XK_Eth 0x00d0 /* deprecated */ #define XK_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */ #define XK_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */ #define XK_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */ #define XK_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ #define XK_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */ #define XK_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */ #define XK_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */ #define XK_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */ #define XK_Ooblique 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */ #define XK_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */ #define XK_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */ #define XK_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ #define XK_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */ #define XK_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */ #define XK_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */ #define XK_Thorn 0x00de /* deprecated */ #define XK_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */ #define XK_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */ #define XK_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */ #define XK_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */ #define XK_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */ #define XK_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */ #define XK_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */ #define XK_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */ #define XK_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */ #define XK_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */ #define XK_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */ #define XK_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */ #define XK_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */ #define XK_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */ #define XK_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */ #define XK_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */ #define XK_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */ #define XK_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */ #define XK_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */ #define XK_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */ #define XK_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */ #define XK_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */ #define XK_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */ #define XK_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */ #define XK_division 0x00f7 /* U+00F7 DIVISION SIGN */ #define XK_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */ #define XK_ooblique 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */ #define XK_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */ #define XK_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */ #define XK_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */ #define XK_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */ #define XK_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */ #define XK_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */ #define XK_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */ #endif /* XK_LATIN1 */ /* * Latin 2 * Byte 3 = 1 */ #ifdef XK_LATIN2 #define XK_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */ #define XK_breve 0x01a2 /* U+02D8 BREVE */ #define XK_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */ #define XK_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */ #define XK_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */ #define XK_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */ #define XK_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */ #define XK_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */ #define XK_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */ #define XK_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */ #define XK_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */ #define XK_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */ #define XK_ogonek 0x01b2 /* U+02DB OGONEK */ #define XK_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */ #define XK_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */ #define XK_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */ #define XK_caron 0x01b7 /* U+02C7 CARON */ #define XK_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */ #define XK_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */ #define XK_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */ #define XK_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */ #define XK_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */ #define XK_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */ #define XK_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */ #define XK_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */ #define XK_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */ #define XK_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */ #define XK_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */ #define XK_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */ #define XK_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */ #define XK_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */ #define XK_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */ #define XK_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */ #define XK_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */ #define XK_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */ #define XK_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ #define XK_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */ #define XK_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */ #define XK_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ #define XK_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */ #define XK_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */ #define XK_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */ #define XK_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */ #define XK_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */ #define XK_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */ #define XK_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */ #define XK_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */ #define XK_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */ #define XK_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */ #define XK_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */ #define XK_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */ #define XK_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */ #define XK_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */ #define XK_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */ #define XK_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */ #define XK_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */ #define XK_abovedot 0x01ff /* U+02D9 DOT ABOVE */ #endif /* XK_LATIN2 */ /* * Latin 3 * Byte 3 = 2 */ #ifdef XK_LATIN3 #define XK_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */ #define XK_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ #define XK_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */ #define XK_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */ #define XK_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ #define XK_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */ #define XK_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */ #define XK_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */ #define XK_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */ #define XK_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */ #define XK_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */ #define XK_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ #define XK_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */ #define XK_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ #define XK_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */ #define XK_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ #define XK_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */ #define XK_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */ #define XK_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */ #define XK_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */ #define XK_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */ #define XK_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */ #endif /* XK_LATIN3 */ /* * Latin 4 * Byte 3 = 3 */ #ifdef XK_LATIN4 #define XK_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */ #define XK_kappa 0x03a2 /* deprecated */ #define XK_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */ #define XK_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */ #define XK_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */ #define XK_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */ #define XK_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */ #define XK_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */ #define XK_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */ #define XK_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */ #define XK_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */ #define XK_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */ #define XK_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */ #define XK_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */ #define XK_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */ #define XK_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */ #define XK_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */ #define XK_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */ #define XK_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */ #define XK_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */ #define XK_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */ #define XK_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */ #define XK_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */ #define XK_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */ #define XK_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */ #define XK_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */ #define XK_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */ #define XK_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */ #define XK_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */ #define XK_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */ #define XK_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */ #define XK_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */ #define XK_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */ #define XK_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */ #define XK_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */ #define XK_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */ #endif /* XK_LATIN4 */ /* * Latin 8 */ #ifdef XK_LATIN8 #define XK_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */ #define XK_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */ #define XK_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */ #define XK_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */ #define XK_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */ #define XK_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */ #define XK_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */ #define XK_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */ #define XK_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */ #define XK_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */ #define XK_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */ #define XK_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */ #define XK_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */ #define XK_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */ #define XK_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */ #define XK_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */ #define XK_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */ #define XK_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */ #define XK_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */ #define XK_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */ #define XK_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */ #define XK_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */ #define XK_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */ #define XK_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */ #define XK_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */ #define XK_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */ #endif /* XK_LATIN8 */ /* * Latin 9 * Byte 3 = 0x13 */ #ifdef XK_LATIN9 #define XK_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */ #define XK_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */ #define XK_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */ #endif /* XK_LATIN9 */ /* * Katakana * Byte 3 = 4 */ #ifdef XK_KATAKANA #define XK_overline 0x047e /* U+203E OVERLINE */ #define XK_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */ #define XK_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */ #define XK_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */ #define XK_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */ #define XK_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */ #define XK_kana_middledot 0x04a5 /* deprecated */ #define XK_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */ #define XK_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */ #define XK_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */ #define XK_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */ #define XK_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */ #define XK_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */ #define XK_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */ #define XK_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */ #define XK_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */ #define XK_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */ #define XK_kana_tu 0x04af /* deprecated */ #define XK_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */ #define XK_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */ #define XK_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */ #define XK_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */ #define XK_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */ #define XK_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */ #define XK_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */ #define XK_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */ #define XK_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */ #define XK_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */ #define XK_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */ #define XK_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */ #define XK_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */ #define XK_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */ #define XK_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */ #define XK_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */ #define XK_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */ #define XK_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */ #define XK_kana_TI 0x04c1 /* deprecated */ #define XK_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */ #define XK_kana_TU 0x04c2 /* deprecated */ #define XK_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */ #define XK_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */ #define XK_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */ #define XK_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */ #define XK_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */ #define XK_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */ #define XK_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */ #define XK_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */ #define XK_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */ #define XK_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */ #define XK_kana_HU 0x04cc /* deprecated */ #define XK_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */ #define XK_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */ #define XK_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */ #define XK_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */ #define XK_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */ #define XK_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */ #define XK_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */ #define XK_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */ #define XK_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */ #define XK_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */ #define XK_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */ #define XK_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */ #define XK_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */ #define XK_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */ #define XK_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */ #define XK_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */ #define XK_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */ #define XK_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */ #define XK_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */ #define XK_kana_switch 0xff7e /* Alias for mode_switch */ #endif /* XK_KATAKANA */ /* * Arabic * Byte 3 = 5 */ #ifdef XK_ARABIC #define XK_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */ #define XK_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */ #define XK_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */ #define XK_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */ #define XK_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */ #define XK_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */ #define XK_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */ #define XK_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */ #define XK_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */ #define XK_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */ #define XK_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */ #define XK_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */ #define XK_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */ #define XK_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */ #define XK_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */ #define XK_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */ #define XK_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */ #define XK_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */ #define XK_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */ #define XK_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */ #define XK_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */ #define XK_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */ #define XK_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */ #define XK_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */ #define XK_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */ #define XK_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */ #define XK_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */ #define XK_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */ #define XK_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */ #define XK_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */ #define XK_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */ #define XK_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */ #define XK_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */ #define XK_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */ #define XK_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */ #define XK_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */ #define XK_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */ #define XK_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */ #define XK_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */ #define XK_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */ #define XK_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */ #define XK_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */ #define XK_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */ #define XK_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */ #define XK_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */ #define XK_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */ #define XK_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */ #define XK_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */ #define XK_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */ #define XK_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */ #define XK_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */ #define XK_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */ #define XK_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */ #define XK_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */ #define XK_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */ #define XK_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */ #define XK_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */ #define XK_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */ #define XK_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */ #define XK_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */ #define XK_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */ #define XK_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */ #define XK_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */ #define XK_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */ #define XK_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */ #define XK_Arabic_heh 0x05e7 /* deprecated */ #define XK_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */ #define XK_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */ #define XK_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */ #define XK_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */ #define XK_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */ #define XK_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */ #define XK_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */ #define XK_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */ #define XK_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */ #define XK_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */ #define XK_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */ #define XK_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */ #define XK_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */ #define XK_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */ #define XK_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */ #define XK_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */ #define XK_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */ #define XK_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */ #define XK_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */ #define XK_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */ #define XK_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */ #define XK_Arabic_farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */ #define XK_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */ #define XK_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */ #define XK_Arabic_switch 0xff7e /* Alias for mode_switch */ #endif /* XK_ARABIC */ /* * Cyrillic * Byte 3 = 6 */ #ifdef XK_CYRILLIC #define XK_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */ #define XK_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */ #define XK_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */ #define XK_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */ #define XK_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */ #define XK_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */ #define XK_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */ #define XK_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */ #define XK_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */ #define XK_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */ #define XK_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */ #define XK_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */ #define XK_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */ #define XK_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */ #define XK_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */ #define XK_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */ #define XK_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */ #define XK_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */ #define XK_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */ #define XK_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */ #define XK_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */ #define XK_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */ #define XK_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */ #define XK_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */ #define XK_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */ #define XK_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */ #define XK_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */ #define XK_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */ #define XK_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */ #define XK_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */ #define XK_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */ #define XK_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */ #define XK_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */ #define XK_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */ #define XK_Ukranian_je 0x06a4 /* deprecated */ #define XK_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */ #define XK_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ #define XK_Ukranian_i 0x06a6 /* deprecated */ #define XK_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */ #define XK_Ukranian_yi 0x06a7 /* deprecated */ #define XK_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */ #define XK_Serbian_je 0x06a8 /* deprecated */ #define XK_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */ #define XK_Serbian_lje 0x06a9 /* deprecated */ #define XK_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */ #define XK_Serbian_nje 0x06aa /* deprecated */ #define XK_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */ #define XK_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */ #define XK_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */ #define XK_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */ #define XK_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */ #define XK_Serbian_dze 0x06af /* deprecated */ #define XK_numerosign 0x06b0 /* U+2116 NUMERO SIGN */ #define XK_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */ #define XK_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */ #define XK_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */ #define XK_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */ #define XK_Ukranian_JE 0x06b4 /* deprecated */ #define XK_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */ #define XK_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ #define XK_Ukranian_I 0x06b6 /* deprecated */ #define XK_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */ #define XK_Ukranian_YI 0x06b7 /* deprecated */ #define XK_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */ #define XK_Serbian_JE 0x06b8 /* deprecated */ #define XK_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */ #define XK_Serbian_LJE 0x06b9 /* deprecated */ #define XK_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */ #define XK_Serbian_NJE 0x06ba /* deprecated */ #define XK_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */ #define XK_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */ #define XK_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ #define XK_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */ #define XK_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */ #define XK_Serbian_DZE 0x06bf /* deprecated */ #define XK_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */ #define XK_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */ #define XK_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */ #define XK_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */ #define XK_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */ #define XK_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */ #define XK_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */ #define XK_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */ #define XK_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */ #define XK_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */ #define XK_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */ #define XK_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */ #define XK_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */ #define XK_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */ #define XK_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */ #define XK_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */ #define XK_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */ #define XK_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */ #define XK_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */ #define XK_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */ #define XK_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */ #define XK_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */ #define XK_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */ #define XK_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */ #define XK_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */ #define XK_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */ #define XK_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */ #define XK_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */ #define XK_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */ #define XK_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */ #define XK_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */ #define XK_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */ #define XK_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */ #define XK_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */ #define XK_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */ #define XK_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */ #define XK_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */ #define XK_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */ #define XK_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */ #define XK_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */ #define XK_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */ #define XK_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */ #define XK_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */ #define XK_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */ #define XK_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */ #define XK_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */ #define XK_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */ #define XK_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */ #define XK_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */ #define XK_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */ #define XK_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */ #define XK_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */ #define XK_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */ #define XK_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */ #define XK_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */ #define XK_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */ #define XK_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */ #define XK_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */ #define XK_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */ #define XK_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */ #define XK_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */ #define XK_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */ #define XK_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */ #define XK_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */ #endif /* XK_CYRILLIC */ /* * Greek * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7) * Byte 3 = 7 */ #ifdef XK_GREEK #define XK_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */ #define XK_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */ #define XK_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */ #define XK_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */ #define XK_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ #define XK_Greek_IOTAdiaeresis 0x07a5 /* old typo */ #define XK_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */ #define XK_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */ #define XK_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ #define XK_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */ #define XK_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */ #define XK_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */ #define XK_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */ #define XK_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */ #define XK_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */ #define XK_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */ #define XK_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */ #define XK_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ #define XK_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */ #define XK_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */ #define XK_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */ #define XK_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ #define XK_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */ #define XK_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */ #define XK_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */ #define XK_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */ #define XK_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */ #define XK_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */ #define XK_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */ #define XK_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */ #define XK_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */ #define XK_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */ #define XK_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */ #define XK_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */ #define XK_Greek_LAMBDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */ #define XK_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */ #define XK_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */ #define XK_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */ #define XK_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */ #define XK_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */ #define XK_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */ #define XK_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */ #define XK_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */ #define XK_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */ #define XK_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */ #define XK_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */ #define XK_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */ #define XK_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */ #define XK_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */ #define XK_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */ #define XK_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */ #define XK_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */ #define XK_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */ #define XK_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */ #define XK_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */ #define XK_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */ #define XK_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */ #define XK_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */ #define XK_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */ #define XK_Greek_lambda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */ #define XK_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */ #define XK_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */ #define XK_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */ #define XK_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */ #define XK_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */ #define XK_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */ #define XK_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */ #define XK_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */ #define XK_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */ #define XK_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */ #define XK_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */ #define XK_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */ #define XK_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */ #define XK_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */ #define XK_Greek_switch 0xff7e /* Alias for mode_switch */ #endif /* XK_GREEK */ /* * Technical * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html) * Byte 3 = 8 */ #ifdef XK_TECHNICAL #define XK_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */ #define XK_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/ #define XK_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/ #define XK_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */ #define XK_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */ #define XK_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/ #define XK_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */ #define XK_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */ #define XK_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */ #define XK_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */ #define XK_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */ #define XK_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */ #define XK_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */ #define XK_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */ #define XK_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */ #define XK_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */ #define XK_topleftsummation 0x08b1 #define XK_botleftsummation 0x08b2 #define XK_topvertsummationconnector 0x08b3 #define XK_botvertsummationconnector 0x08b4 #define XK_toprightsummation 0x08b5 #define XK_botrightsummation 0x08b6 #define XK_rightmiddlesummation 0x08b7 #define XK_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */ #define XK_notequal 0x08bd /* U+2260 NOT EQUAL TO */ #define XK_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */ #define XK_integral 0x08bf /* U+222B INTEGRAL */ #define XK_therefore 0x08c0 /* U+2234 THEREFORE */ #define XK_variation 0x08c1 /* U+221D PROPORTIONAL TO */ #define XK_infinity 0x08c2 /* U+221E INFINITY */ #define XK_nabla 0x08c5 /* U+2207 NABLA */ #define XK_approximate 0x08c8 /* U+223C TILDE OPERATOR */ #define XK_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */ #define XK_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */ #define XK_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */ #define XK_identical 0x08cf /* U+2261 IDENTICAL TO */ #define XK_radical 0x08d6 /* U+221A SQUARE ROOT */ #define XK_includedin 0x08da /* U+2282 SUBSET OF */ #define XK_includes 0x08db /* U+2283 SUPERSET OF */ #define XK_intersection 0x08dc /* U+2229 INTERSECTION */ #define XK_union 0x08dd /* U+222A UNION */ #define XK_logicaland 0x08de /* U+2227 LOGICAL AND */ #define XK_logicalor 0x08df /* U+2228 LOGICAL OR */ #define XK_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */ #define XK_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */ #define XK_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */ #define XK_uparrow 0x08fc /* U+2191 UPWARDS ARROW */ #define XK_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */ #define XK_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */ #endif /* XK_TECHNICAL */ /* * Special * (from the DEC VT100 Special Graphics Character Set) * Byte 3 = 9 */ #ifdef XK_SPECIAL #define XK_blank 0x09df #define XK_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */ #define XK_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */ #define XK_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */ #define XK_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */ #define XK_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */ #define XK_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */ #define XK_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */ #define XK_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */ #define XK_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */ #define XK_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */ #define XK_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */ #define XK_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */ #define XK_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ #define XK_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */ #define XK_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */ #define XK_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */ #define XK_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */ #define XK_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */ #define XK_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ #define XK_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */ #define XK_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */ #define XK_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ #define XK_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */ #endif /* XK_SPECIAL */ /* * Publishing * (these are probably from a long forgotten DEC Publishing * font that once shipped with DECwrite) * Byte 3 = 0x0a */ #ifdef XK_PUBLISHING #define XK_emspace 0x0aa1 /* U+2003 EM SPACE */ #define XK_enspace 0x0aa2 /* U+2002 EN SPACE */ #define XK_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */ #define XK_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */ #define XK_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */ #define XK_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */ #define XK_thinspace 0x0aa7 /* U+2009 THIN SPACE */ #define XK_hairspace 0x0aa8 /* U+200A HAIR SPACE */ #define XK_emdash 0x0aa9 /* U+2014 EM DASH */ #define XK_endash 0x0aaa /* U+2013 EN DASH */ #define XK_signifblank 0x0aac /*(U+2423 OPEN BOX)*/ #define XK_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */ #define XK_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */ #define XK_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */ #define XK_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */ #define XK_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */ #define XK_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */ #define XK_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */ #define XK_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */ #define XK_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */ #define XK_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */ #define XK_careof 0x0ab8 /* U+2105 CARE OF */ #define XK_figdash 0x0abb /* U+2012 FIGURE DASH */ #define XK_leftanglebracket 0x0abc /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/ #define XK_decimalpoint 0x0abd /*(U+002E FULL STOP)*/ #define XK_rightanglebracket 0x0abe /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/ #define XK_marker 0x0abf #define XK_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */ #define XK_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */ #define XK_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */ #define XK_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */ #define XK_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */ #define XK_signaturemark 0x0aca /*(U+2613 SALTIRE)*/ #define XK_trademarkincircle 0x0acb #define XK_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/ #define XK_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/ #define XK_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/ #define XK_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/ #define XK_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */ #define XK_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */ #define XK_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */ #define XK_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */ #define XK_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */ #define XK_permille 0x0ad5 /* U+2030 PER MILLE SIGN */ #define XK_minutes 0x0ad6 /* U+2032 PRIME */ #define XK_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */ #define XK_latincross 0x0ad9 /* U+271D LATIN CROSS */ #define XK_hexagram 0x0ada #define XK_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/ #define XK_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/ #define XK_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/ #define XK_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/ #define XK_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/ #define XK_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/ #define XK_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/ #define XK_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/ #define XK_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/ #define XK_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/ #define XK_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/ #define XK_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/ #define XK_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/ #define XK_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/ #define XK_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/ #define XK_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/ #define XK_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/ #define XK_club 0x0aec /* U+2663 BLACK CLUB SUIT */ #define XK_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */ #define XK_heart 0x0aee /* U+2665 BLACK HEART SUIT */ #define XK_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */ #define XK_dagger 0x0af1 /* U+2020 DAGGER */ #define XK_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */ #define XK_checkmark 0x0af3 /* U+2713 CHECK MARK */ #define XK_ballotcross 0x0af4 /* U+2717 BALLOT X */ #define XK_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */ #define XK_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */ #define XK_malesymbol 0x0af7 /* U+2642 MALE SIGN */ #define XK_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */ #define XK_telephone 0x0af9 /* U+260E BLACK TELEPHONE */ #define XK_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */ #define XK_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */ #define XK_caret 0x0afc /* U+2038 CARET */ #define XK_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */ #define XK_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */ #define XK_cursor 0x0aff #endif /* XK_PUBLISHING */ /* * APL * Byte 3 = 0x0b */ #ifdef XK_APL #define XK_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/ #define XK_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/ #define XK_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/ #define XK_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/ #define XK_overbar 0x0bc0 /*(U+00AF MACRON)*/ #define XK_downtack 0x0bc2 /* U+22A4 DOWN TACK */ #define XK_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/ #define XK_downstile 0x0bc4 /* U+230A LEFT FLOOR */ #define XK_underbar 0x0bc6 /*(U+005F LOW LINE)*/ #define XK_jot 0x0bca /* U+2218 RING OPERATOR */ #define XK_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */ #define XK_uptack 0x0bce /* U+22A5 UP TACK */ #define XK_circle 0x0bcf /* U+25CB WHITE CIRCLE */ #define XK_upstile 0x0bd3 /* U+2308 LEFT CEILING */ #define XK_downshoe 0x0bd6 /*(U+222A UNION)*/ #define XK_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/ #define XK_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/ #define XK_lefttack 0x0bdc /* U+22A3 LEFT TACK */ #define XK_righttack 0x0bfc /* U+22A2 RIGHT TACK */ #endif /* XK_APL */ /* * Hebrew * Byte 3 = 0x0c */ #ifdef XK_HEBREW #define XK_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */ #define XK_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */ #define XK_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */ #define XK_hebrew_beth 0x0ce1 /* deprecated */ #define XK_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */ #define XK_hebrew_gimmel 0x0ce2 /* deprecated */ #define XK_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */ #define XK_hebrew_daleth 0x0ce3 /* deprecated */ #define XK_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */ #define XK_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */ #define XK_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */ #define XK_hebrew_zayin 0x0ce6 /* deprecated */ #define XK_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */ #define XK_hebrew_het 0x0ce7 /* deprecated */ #define XK_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */ #define XK_hebrew_teth 0x0ce8 /* deprecated */ #define XK_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */ #define XK_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */ #define XK_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */ #define XK_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */ #define XK_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */ #define XK_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */ #define XK_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */ #define XK_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */ #define XK_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */ #define XK_hebrew_samekh 0x0cf1 /* deprecated */ #define XK_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */ #define XK_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */ #define XK_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */ #define XK_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */ #define XK_hebrew_finalzadi 0x0cf5 /* deprecated */ #define XK_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */ #define XK_hebrew_zadi 0x0cf6 /* deprecated */ #define XK_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */ #define XK_hebrew_kuf 0x0cf7 /* deprecated */ #define XK_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */ #define XK_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */ #define XK_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */ #define XK_hebrew_taf 0x0cfa /* deprecated */ #define XK_Hebrew_switch 0xff7e /* Alias for mode_switch */ #endif /* XK_HEBREW */ /* * Thai * Byte 3 = 0x0d */ #ifdef XK_THAI #define XK_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */ #define XK_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */ #define XK_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */ #define XK_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */ #define XK_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */ #define XK_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */ #define XK_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */ #define XK_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */ #define XK_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */ #define XK_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */ #define XK_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */ #define XK_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */ #define XK_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */ #define XK_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */ #define XK_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */ #define XK_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */ #define XK_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */ #define XK_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */ #define XK_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */ #define XK_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */ #define XK_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */ #define XK_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */ #define XK_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */ #define XK_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */ #define XK_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */ #define XK_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */ #define XK_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */ #define XK_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */ #define XK_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */ #define XK_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */ #define XK_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */ #define XK_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */ #define XK_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */ #define XK_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */ #define XK_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */ #define XK_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */ #define XK_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */ #define XK_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */ #define XK_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */ #define XK_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */ #define XK_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */ #define XK_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */ #define XK_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */ #define XK_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */ #define XK_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */ #define XK_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */ #define XK_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */ #define XK_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */ #define XK_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */ #define XK_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */ #define XK_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */ #define XK_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */ #define XK_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */ #define XK_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */ #define XK_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */ #define XK_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */ #define XK_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */ #define XK_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */ #define XK_Thai_maihanakat_maitho 0x0dde #define XK_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */ #define XK_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */ #define XK_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */ #define XK_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */ #define XK_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */ #define XK_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */ #define XK_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */ #define XK_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */ #define XK_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */ #define XK_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */ #define XK_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */ #define XK_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */ #define XK_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */ #define XK_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */ #define XK_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */ #define XK_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */ #define XK_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */ #define XK_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */ #define XK_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */ #define XK_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */ #define XK_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */ #define XK_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */ #define XK_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */ #define XK_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */ #define XK_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */ #endif /* XK_THAI */ /* * Korean * Byte 3 = 0x0e */ #ifdef XK_KOREAN #define XK_Hangul 0xff31 /* Hangul start/stop(toggle) */ #define XK_Hangul_Start 0xff32 /* Hangul start */ #define XK_Hangul_End 0xff33 /* Hangul end, English start */ #define XK_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */ #define XK_Hangul_Jamo 0xff35 /* Hangul Jamo mode */ #define XK_Hangul_Romaja 0xff36 /* Hangul Romaja mode */ #define XK_Hangul_Codeinput 0xff37 /* Hangul code input mode */ #define XK_Hangul_Jeonja 0xff38 /* Jeonja mode */ #define XK_Hangul_Banja 0xff39 /* Banja mode */ #define XK_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */ #define XK_Hangul_PostHanja 0xff3b /* Post Hanja conversion */ #define XK_Hangul_SingleCandidate 0xff3c /* Single candidate */ #define XK_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */ #define XK_Hangul_PreviousCandidate 0xff3e /* Previous candidate */ #define XK_Hangul_Special 0xff3f /* Special symbols */ #define XK_Hangul_switch 0xff7e /* Alias for mode_switch */ /* Hangul Consonant Characters */ #define XK_Hangul_Kiyeog 0x0ea1 #define XK_Hangul_SsangKiyeog 0x0ea2 #define XK_Hangul_KiyeogSios 0x0ea3 #define XK_Hangul_Nieun 0x0ea4 #define XK_Hangul_NieunJieuj 0x0ea5 #define XK_Hangul_NieunHieuh 0x0ea6 #define XK_Hangul_Dikeud 0x0ea7 #define XK_Hangul_SsangDikeud 0x0ea8 #define XK_Hangul_Rieul 0x0ea9 #define XK_Hangul_RieulKiyeog 0x0eaa #define XK_Hangul_RieulMieum 0x0eab #define XK_Hangul_RieulPieub 0x0eac #define XK_Hangul_RieulSios 0x0ead #define XK_Hangul_RieulTieut 0x0eae #define XK_Hangul_RieulPhieuf 0x0eaf #define XK_Hangul_RieulHieuh 0x0eb0 #define XK_Hangul_Mieum 0x0eb1 #define XK_Hangul_Pieub 0x0eb2 #define XK_Hangul_SsangPieub 0x0eb3 #define XK_Hangul_PieubSios 0x0eb4 #define XK_Hangul_Sios 0x0eb5 #define XK_Hangul_SsangSios 0x0eb6 #define XK_Hangul_Ieung 0x0eb7 #define XK_Hangul_Jieuj 0x0eb8 #define XK_Hangul_SsangJieuj 0x0eb9 #define XK_Hangul_Cieuc 0x0eba #define XK_Hangul_Khieuq 0x0ebb #define XK_Hangul_Tieut 0x0ebc #define XK_Hangul_Phieuf 0x0ebd #define XK_Hangul_Hieuh 0x0ebe /* Hangul Vowel Characters */ #define XK_Hangul_A 0x0ebf #define XK_Hangul_AE 0x0ec0 #define XK_Hangul_YA 0x0ec1 #define XK_Hangul_YAE 0x0ec2 #define XK_Hangul_EO 0x0ec3 #define XK_Hangul_E 0x0ec4 #define XK_Hangul_YEO 0x0ec5 #define XK_Hangul_YE 0x0ec6 #define XK_Hangul_O 0x0ec7 #define XK_Hangul_WA 0x0ec8 #define XK_Hangul_WAE 0x0ec9 #define XK_Hangul_OE 0x0eca #define XK_Hangul_YO 0x0ecb #define XK_Hangul_U 0x0ecc #define XK_Hangul_WEO 0x0ecd #define XK_Hangul_WE 0x0ece #define XK_Hangul_WI 0x0ecf #define XK_Hangul_YU 0x0ed0 #define XK_Hangul_EU 0x0ed1 #define XK_Hangul_YI 0x0ed2 #define XK_Hangul_I 0x0ed3 /* Hangul syllable-final (JongSeong) Characters */ #define XK_Hangul_J_Kiyeog 0x0ed4 #define XK_Hangul_J_SsangKiyeog 0x0ed5 #define XK_Hangul_J_KiyeogSios 0x0ed6 #define XK_Hangul_J_Nieun 0x0ed7 #define XK_Hangul_J_NieunJieuj 0x0ed8 #define XK_Hangul_J_NieunHieuh 0x0ed9 #define XK_Hangul_J_Dikeud 0x0eda #define XK_Hangul_J_Rieul 0x0edb #define XK_Hangul_J_RieulKiyeog 0x0edc #define XK_Hangul_J_RieulMieum 0x0edd #define XK_Hangul_J_RieulPieub 0x0ede #define XK_Hangul_J_RieulSios 0x0edf #define XK_Hangul_J_RieulTieut 0x0ee0 #define XK_Hangul_J_RieulPhieuf 0x0ee1 #define XK_Hangul_J_RieulHieuh 0x0ee2 #define XK_Hangul_J_Mieum 0x0ee3 #define XK_Hangul_J_Pieub 0x0ee4 #define XK_Hangul_J_PieubSios 0x0ee5 #define XK_Hangul_J_Sios 0x0ee6 #define XK_Hangul_J_SsangSios 0x0ee7 #define XK_Hangul_J_Ieung 0x0ee8 #define XK_Hangul_J_Jieuj 0x0ee9 #define XK_Hangul_J_Cieuc 0x0eea #define XK_Hangul_J_Khieuq 0x0eeb #define XK_Hangul_J_Tieut 0x0eec #define XK_Hangul_J_Phieuf 0x0eed #define XK_Hangul_J_Hieuh 0x0eee /* Ancient Hangul Consonant Characters */ #define XK_Hangul_RieulYeorinHieuh 0x0eef #define XK_Hangul_SunkyeongeumMieum 0x0ef0 #define XK_Hangul_SunkyeongeumPieub 0x0ef1 #define XK_Hangul_PanSios 0x0ef2 #define XK_Hangul_KkogjiDalrinIeung 0x0ef3 #define XK_Hangul_SunkyeongeumPhieuf 0x0ef4 #define XK_Hangul_YeorinHieuh 0x0ef5 /* Ancient Hangul Vowel Characters */ #define XK_Hangul_AraeA 0x0ef6 #define XK_Hangul_AraeAE 0x0ef7 /* Ancient Hangul syllable-final (JongSeong) Characters */ #define XK_Hangul_J_PanSios 0x0ef8 #define XK_Hangul_J_KkogjiDalrinIeung 0x0ef9 #define XK_Hangul_J_YeorinHieuh 0x0efa /* Korean currency symbol */ #define XK_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/ #endif /* XK_KOREAN */ /* * Armenian */ #ifdef XK_ARMENIAN #define XK_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */ #define XK_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */ #define XK_Armenian_verjaket 0x1000589 /* U+0589 ARMENIAN FULL STOP */ #define XK_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */ #define XK_Armenian_but 0x100055d /* U+055D ARMENIAN COMMA */ #define XK_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */ #define XK_Armenian_yentamna 0x100058a /* U+058A ARMENIAN HYPHEN */ #define XK_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */ #define XK_Armenian_amanak 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */ #define XK_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */ #define XK_Armenian_shesht 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */ #define XK_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */ #define XK_Armenian_paruyk 0x100055e /* U+055E ARMENIAN QUESTION MARK */ #define XK_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */ #define XK_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */ #define XK_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */ #define XK_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */ #define XK_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */ #define XK_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */ #define XK_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */ #define XK_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */ #define XK_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */ #define XK_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */ #define XK_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */ #define XK_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */ #define XK_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */ #define XK_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */ #define XK_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */ #define XK_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */ #define XK_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */ #define XK_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */ #define XK_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */ #define XK_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */ #define XK_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */ #define XK_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */ #define XK_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */ #define XK_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */ #define XK_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */ #define XK_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */ #define XK_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */ #define XK_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */ #define XK_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */ #define XK_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */ #define XK_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */ #define XK_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */ #define XK_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */ #define XK_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */ #define XK_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */ #define XK_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */ #define XK_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */ #define XK_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */ #define XK_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */ #define XK_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */ #define XK_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */ #define XK_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */ #define XK_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */ #define XK_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */ #define XK_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */ #define XK_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */ #define XK_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */ #define XK_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */ #define XK_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */ #define XK_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */ #define XK_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */ #define XK_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */ #define XK_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */ #define XK_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */ #define XK_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */ #define XK_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */ #define XK_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */ #define XK_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */ #define XK_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */ #define XK_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */ #define XK_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */ #define XK_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */ #define XK_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */ #define XK_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */ #define XK_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */ #define XK_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */ #define XK_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */ #define XK_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */ #define XK_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */ #define XK_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */ #define XK_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */ #define XK_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */ #define XK_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */ #define XK_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */ #define XK_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */ #define XK_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */ #define XK_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */ #endif /* XK_ARMENIAN */ /* * Georgian */ #ifdef XK_GEORGIAN #define XK_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */ #define XK_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */ #define XK_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */ #define XK_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */ #define XK_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */ #define XK_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */ #define XK_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */ #define XK_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */ #define XK_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */ #define XK_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */ #define XK_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */ #define XK_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */ #define XK_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */ #define XK_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */ #define XK_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */ #define XK_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */ #define XK_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */ #define XK_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */ #define XK_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */ #define XK_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */ #define XK_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */ #define XK_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */ #define XK_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */ #define XK_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */ #define XK_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */ #define XK_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */ #define XK_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */ #define XK_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */ #define XK_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */ #define XK_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */ #define XK_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */ #define XK_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */ #define XK_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */ #define XK_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */ #define XK_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */ #define XK_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */ #define XK_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */ #define XK_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */ #define XK_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */ #endif /* XK_GEORGIAN */ /* * Azeri (and other Turkic or Caucasian languages) */ #ifdef XK_CAUCASUS /* latin */ #define XK_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */ #define XK_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */ #define XK_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */ #define XK_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */ #define XK_Ocaron 0x10001d1 /* U+01D1 LATIN CAPITAL LETTER O WITH CARON */ #define XK_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */ #define XK_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */ #define XK_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */ #define XK_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */ #define XK_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */ #define XK_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */ #define XK_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */ #define XK_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */ #define XK_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */ #define XK_EZH 0x10001b7 /* U+01B7 LATIN CAPITAL LETTER EZH */ #define XK_ezh 0x1000292 /* U+0292 LATIN SMALL LETTER EZH */ /* those are not really Caucasus */ /* For Inupiak */ #define XK_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */ #define XK_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */ #endif /* XK_CAUCASUS */ /* * Vietnamese */ #ifdef XK_VIETNAMESE #define XK_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */ #define XK_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */ #define XK_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */ #define XK_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */ #define XK_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */ #define XK_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */ #define XK_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */ #define XK_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */ #define XK_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */ #define XK_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */ #define XK_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */ #define XK_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */ #define XK_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */ #define XK_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */ #define XK_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */ #define XK_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */ #define XK_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */ #define XK_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */ #define XK_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */ #define XK_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */ #define XK_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */ #define XK_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */ #define XK_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */ #define XK_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */ #define XK_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */ #define XK_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */ #define XK_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */ #define XK_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */ #define XK_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */ #define XK_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */ #define XK_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */ #define XK_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */ #define XK_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */ #define XK_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */ #define XK_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */ #define XK_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */ #define XK_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */ #define XK_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */ #define XK_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */ #define XK_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */ #define XK_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */ #define XK_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */ #define XK_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */ #define XK_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */ #define XK_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */ #define XK_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */ #define XK_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */ #define XK_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */ #define XK_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */ #define XK_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */ #define XK_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */ #define XK_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */ #define XK_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */ #define XK_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */ #define XK_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */ #define XK_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */ #define XK_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */ #define XK_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */ #define XK_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */ #define XK_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */ #define XK_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */ #define XK_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */ #define XK_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */ #define XK_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */ #define XK_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */ #define XK_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */ #define XK_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */ #define XK_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */ #define XK_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */ #define XK_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */ #define XK_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */ #define XK_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */ #define XK_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */ #define XK_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */ #define XK_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */ #define XK_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */ #define XK_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */ #define XK_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */ #define XK_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */ #define XK_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */ #define XK_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */ #define XK_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */ #define XK_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */ #define XK_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */ #define XK_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */ #define XK_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */ #define XK_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */ #define XK_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */ #define XK_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */ #define XK_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */ #define XK_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */ #define XK_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */ #endif /* XK_VIETNAMESE */ #ifdef XK_CURRENCY #define XK_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */ #define XK_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */ #define XK_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */ #define XK_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */ #define XK_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */ #define XK_MillSign 0x10020a5 /* U+20A5 MILL SIGN */ #define XK_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */ #define XK_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */ #define XK_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */ #define XK_WonSign 0x10020a9 /* U+20A9 WON SIGN */ #define XK_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */ #define XK_DongSign 0x10020ab /* U+20AB DONG SIGN */ #define XK_EuroSign 0x20ac /* U+20AC EURO SIGN */ #endif /* XK_CURRENCY */ #ifdef XK_MATHEMATICAL /* one, two and three are defined above. */ #define XK_zerosuperior 0x1002070 /* U+2070 SUPERSCRIPT ZERO */ #define XK_foursuperior 0x1002074 /* U+2074 SUPERSCRIPT FOUR */ #define XK_fivesuperior 0x1002075 /* U+2075 SUPERSCRIPT FIVE */ #define XK_sixsuperior 0x1002076 /* U+2076 SUPERSCRIPT SIX */ #define XK_sevensuperior 0x1002077 /* U+2077 SUPERSCRIPT SEVEN */ #define XK_eightsuperior 0x1002078 /* U+2078 SUPERSCRIPT EIGHT */ #define XK_ninesuperior 0x1002079 /* U+2079 SUPERSCRIPT NINE */ #define XK_zerosubscript 0x1002080 /* U+2080 SUBSCRIPT ZERO */ #define XK_onesubscript 0x1002081 /* U+2081 SUBSCRIPT ONE */ #define XK_twosubscript 0x1002082 /* U+2082 SUBSCRIPT TWO */ #define XK_threesubscript 0x1002083 /* U+2083 SUBSCRIPT THREE */ #define XK_foursubscript 0x1002084 /* U+2084 SUBSCRIPT FOUR */ #define XK_fivesubscript 0x1002085 /* U+2085 SUBSCRIPT FIVE */ #define XK_sixsubscript 0x1002086 /* U+2086 SUBSCRIPT SIX */ #define XK_sevensubscript 0x1002087 /* U+2087 SUBSCRIPT SEVEN */ #define XK_eightsubscript 0x1002088 /* U+2088 SUBSCRIPT EIGHT */ #define XK_ninesubscript 0x1002089 /* U+2089 SUBSCRIPT NINE */ #define XK_partdifferential 0x1002202 /* U+2202 PARTIAL DIFFERENTIAL */ #define XK_emptyset 0x1002205 /* U+2205 NULL SET */ #define XK_elementof 0x1002208 /* U+2208 ELEMENT OF */ #define XK_notelementof 0x1002209 /* U+2209 NOT AN ELEMENT OF */ #define XK_containsas 0x100220B /* U+220B CONTAINS AS MEMBER */ #define XK_squareroot 0x100221A /* U+221A SQUARE ROOT */ #define XK_cuberoot 0x100221B /* U+221B CUBE ROOT */ #define XK_fourthroot 0x100221C /* U+221C FOURTH ROOT */ #define XK_dintegral 0x100222C /* U+222C DOUBLE INTEGRAL */ #define XK_tintegral 0x100222D /* U+222D TRIPLE INTEGRAL */ #define XK_because 0x1002235 /* U+2235 BECAUSE */ #define XK_approxeq 0x1002248 /* U+2245 ALMOST EQUAL TO */ #define XK_notapproxeq 0x1002247 /* U+2247 NOT ALMOST EQUAL TO */ #define XK_notidentical 0x1002262 /* U+2262 NOT IDENTICAL TO */ #define XK_stricteq 0x1002263 /* U+2263 STRICTLY EQUIVALENT TO */ #endif /* XK_MATHEMATICAL */ #ifdef XK_BRAILLE #define XK_braille_dot_1 0xfff1 #define XK_braille_dot_2 0xfff2 #define XK_braille_dot_3 0xfff3 #define XK_braille_dot_4 0xfff4 #define XK_braille_dot_5 0xfff5 #define XK_braille_dot_6 0xfff6 #define XK_braille_dot_7 0xfff7 #define XK_braille_dot_8 0xfff8 #define XK_braille_dot_9 0xfff9 #define XK_braille_dot_10 0xfffa #define XK_braille_blank 0x1002800 /* U+2800 BRAILLE PATTERN BLANK */ #define XK_braille_dots_1 0x1002801 /* U+2801 BRAILLE PATTERN DOTS-1 */ #define XK_braille_dots_2 0x1002802 /* U+2802 BRAILLE PATTERN DOTS-2 */ #define XK_braille_dots_12 0x1002803 /* U+2803 BRAILLE PATTERN DOTS-12 */ #define XK_braille_dots_3 0x1002804 /* U+2804 BRAILLE PATTERN DOTS-3 */ #define XK_braille_dots_13 0x1002805 /* U+2805 BRAILLE PATTERN DOTS-13 */ #define XK_braille_dots_23 0x1002806 /* U+2806 BRAILLE PATTERN DOTS-23 */ #define XK_braille_dots_123 0x1002807 /* U+2807 BRAILLE PATTERN DOTS-123 */ #define XK_braille_dots_4 0x1002808 /* U+2808 BRAILLE PATTERN DOTS-4 */ #define XK_braille_dots_14 0x1002809 /* U+2809 BRAILLE PATTERN DOTS-14 */ #define XK_braille_dots_24 0x100280a /* U+280a BRAILLE PATTERN DOTS-24 */ #define XK_braille_dots_124 0x100280b /* U+280b BRAILLE PATTERN DOTS-124 */ #define XK_braille_dots_34 0x100280c /* U+280c BRAILLE PATTERN DOTS-34 */ #define XK_braille_dots_134 0x100280d /* U+280d BRAILLE PATTERN DOTS-134 */ #define XK_braille_dots_234 0x100280e /* U+280e BRAILLE PATTERN DOTS-234 */ #define XK_braille_dots_1234 0x100280f /* U+280f BRAILLE PATTERN DOTS-1234 */ #define XK_braille_dots_5 0x1002810 /* U+2810 BRAILLE PATTERN DOTS-5 */ #define XK_braille_dots_15 0x1002811 /* U+2811 BRAILLE PATTERN DOTS-15 */ #define XK_braille_dots_25 0x1002812 /* U+2812 BRAILLE PATTERN DOTS-25 */ #define XK_braille_dots_125 0x1002813 /* U+2813 BRAILLE PATTERN DOTS-125 */ #define XK_braille_dots_35 0x1002814 /* U+2814 BRAILLE PATTERN DOTS-35 */ #define XK_braille_dots_135 0x1002815 /* U+2815 BRAILLE PATTERN DOTS-135 */ #define XK_braille_dots_235 0x1002816 /* U+2816 BRAILLE PATTERN DOTS-235 */ #define XK_braille_dots_1235 0x1002817 /* U+2817 BRAILLE PATTERN DOTS-1235 */ #define XK_braille_dots_45 0x1002818 /* U+2818 BRAILLE PATTERN DOTS-45 */ #define XK_braille_dots_145 0x1002819 /* U+2819 BRAILLE PATTERN DOTS-145 */ #define XK_braille_dots_245 0x100281a /* U+281a BRAILLE PATTERN DOTS-245 */ #define XK_braille_dots_1245 0x100281b /* U+281b BRAILLE PATTERN DOTS-1245 */ #define XK_braille_dots_345 0x100281c /* U+281c BRAILLE PATTERN DOTS-345 */ #define XK_braille_dots_1345 0x100281d /* U+281d BRAILLE PATTERN DOTS-1345 */ #define XK_braille_dots_2345 0x100281e /* U+281e BRAILLE PATTERN DOTS-2345 */ #define XK_braille_dots_12345 0x100281f /* U+281f BRAILLE PATTERN DOTS-12345 */ #define XK_braille_dots_6 0x1002820 /* U+2820 BRAILLE PATTERN DOTS-6 */ #define XK_braille_dots_16 0x1002821 /* U+2821 BRAILLE PATTERN DOTS-16 */ #define XK_braille_dots_26 0x1002822 /* U+2822 BRAILLE PATTERN DOTS-26 */ #define XK_braille_dots_126 0x1002823 /* U+2823 BRAILLE PATTERN DOTS-126 */ #define XK_braille_dots_36 0x1002824 /* U+2824 BRAILLE PATTERN DOTS-36 */ #define XK_braille_dots_136 0x1002825 /* U+2825 BRAILLE PATTERN DOTS-136 */ #define XK_braille_dots_236 0x1002826 /* U+2826 BRAILLE PATTERN DOTS-236 */ #define XK_braille_dots_1236 0x1002827 /* U+2827 BRAILLE PATTERN DOTS-1236 */ #define XK_braille_dots_46 0x1002828 /* U+2828 BRAILLE PATTERN DOTS-46 */ #define XK_braille_dots_146 0x1002829 /* U+2829 BRAILLE PATTERN DOTS-146 */ #define XK_braille_dots_246 0x100282a /* U+282a BRAILLE PATTERN DOTS-246 */ #define XK_braille_dots_1246 0x100282b /* U+282b BRAILLE PATTERN DOTS-1246 */ #define XK_braille_dots_346 0x100282c /* U+282c BRAILLE PATTERN DOTS-346 */ #define XK_braille_dots_1346 0x100282d /* U+282d BRAILLE PATTERN DOTS-1346 */ #define XK_braille_dots_2346 0x100282e /* U+282e BRAILLE PATTERN DOTS-2346 */ #define XK_braille_dots_12346 0x100282f /* U+282f BRAILLE PATTERN DOTS-12346 */ #define XK_braille_dots_56 0x1002830 /* U+2830 BRAILLE PATTERN DOTS-56 */ #define XK_braille_dots_156 0x1002831 /* U+2831 BRAILLE PATTERN DOTS-156 */ #define XK_braille_dots_256 0x1002832 /* U+2832 BRAILLE PATTERN DOTS-256 */ #define XK_braille_dots_1256 0x1002833 /* U+2833 BRAILLE PATTERN DOTS-1256 */ #define XK_braille_dots_356 0x1002834 /* U+2834 BRAILLE PATTERN DOTS-356 */ #define XK_braille_dots_1356 0x1002835 /* U+2835 BRAILLE PATTERN DOTS-1356 */ #define XK_braille_dots_2356 0x1002836 /* U+2836 BRAILLE PATTERN DOTS-2356 */ #define XK_braille_dots_12356 0x1002837 /* U+2837 BRAILLE PATTERN DOTS-12356 */ #define XK_braille_dots_456 0x1002838 /* U+2838 BRAILLE PATTERN DOTS-456 */ #define XK_braille_dots_1456 0x1002839 /* U+2839 BRAILLE PATTERN DOTS-1456 */ #define XK_braille_dots_2456 0x100283a /* U+283a BRAILLE PATTERN DOTS-2456 */ #define XK_braille_dots_12456 0x100283b /* U+283b BRAILLE PATTERN DOTS-12456 */ #define XK_braille_dots_3456 0x100283c /* U+283c BRAILLE PATTERN DOTS-3456 */ #define XK_braille_dots_13456 0x100283d /* U+283d BRAILLE PATTERN DOTS-13456 */ #define XK_braille_dots_23456 0x100283e /* U+283e BRAILLE PATTERN DOTS-23456 */ #define XK_braille_dots_123456 0x100283f /* U+283f BRAILLE PATTERN DOTS-123456 */ #define XK_braille_dots_7 0x1002840 /* U+2840 BRAILLE PATTERN DOTS-7 */ #define XK_braille_dots_17 0x1002841 /* U+2841 BRAILLE PATTERN DOTS-17 */ #define XK_braille_dots_27 0x1002842 /* U+2842 BRAILLE PATTERN DOTS-27 */ #define XK_braille_dots_127 0x1002843 /* U+2843 BRAILLE PATTERN DOTS-127 */ #define XK_braille_dots_37 0x1002844 /* U+2844 BRAILLE PATTERN DOTS-37 */ #define XK_braille_dots_137 0x1002845 /* U+2845 BRAILLE PATTERN DOTS-137 */ #define XK_braille_dots_237 0x1002846 /* U+2846 BRAILLE PATTERN DOTS-237 */ #define XK_braille_dots_1237 0x1002847 /* U+2847 BRAILLE PATTERN DOTS-1237 */ #define XK_braille_dots_47 0x1002848 /* U+2848 BRAILLE PATTERN DOTS-47 */ #define XK_braille_dots_147 0x1002849 /* U+2849 BRAILLE PATTERN DOTS-147 */ #define XK_braille_dots_247 0x100284a /* U+284a BRAILLE PATTERN DOTS-247 */ #define XK_braille_dots_1247 0x100284b /* U+284b BRAILLE PATTERN DOTS-1247 */ #define XK_braille_dots_347 0x100284c /* U+284c BRAILLE PATTERN DOTS-347 */ #define XK_braille_dots_1347 0x100284d /* U+284d BRAILLE PATTERN DOTS-1347 */ #define XK_braille_dots_2347 0x100284e /* U+284e BRAILLE PATTERN DOTS-2347 */ #define XK_braille_dots_12347 0x100284f /* U+284f BRAILLE PATTERN DOTS-12347 */ #define XK_braille_dots_57 0x1002850 /* U+2850 BRAILLE PATTERN DOTS-57 */ #define XK_braille_dots_157 0x1002851 /* U+2851 BRAILLE PATTERN DOTS-157 */ #define XK_braille_dots_257 0x1002852 /* U+2852 BRAILLE PATTERN DOTS-257 */ #define XK_braille_dots_1257 0x1002853 /* U+2853 BRAILLE PATTERN DOTS-1257 */ #define XK_braille_dots_357 0x1002854 /* U+2854 BRAILLE PATTERN DOTS-357 */ #define XK_braille_dots_1357 0x1002855 /* U+2855 BRAILLE PATTERN DOTS-1357 */ #define XK_braille_dots_2357 0x1002856 /* U+2856 BRAILLE PATTERN DOTS-2357 */ #define XK_braille_dots_12357 0x1002857 /* U+2857 BRAILLE PATTERN DOTS-12357 */ #define XK_braille_dots_457 0x1002858 /* U+2858 BRAILLE PATTERN DOTS-457 */ #define XK_braille_dots_1457 0x1002859 /* U+2859 BRAILLE PATTERN DOTS-1457 */ #define XK_braille_dots_2457 0x100285a /* U+285a BRAILLE PATTERN DOTS-2457 */ #define XK_braille_dots_12457 0x100285b /* U+285b BRAILLE PATTERN DOTS-12457 */ #define XK_braille_dots_3457 0x100285c /* U+285c BRAILLE PATTERN DOTS-3457 */ #define XK_braille_dots_13457 0x100285d /* U+285d BRAILLE PATTERN DOTS-13457 */ #define XK_braille_dots_23457 0x100285e /* U+285e BRAILLE PATTERN DOTS-23457 */ #define XK_braille_dots_123457 0x100285f /* U+285f BRAILLE PATTERN DOTS-123457 */ #define XK_braille_dots_67 0x1002860 /* U+2860 BRAILLE PATTERN DOTS-67 */ #define XK_braille_dots_167 0x1002861 /* U+2861 BRAILLE PATTERN DOTS-167 */ #define XK_braille_dots_267 0x1002862 /* U+2862 BRAILLE PATTERN DOTS-267 */ #define XK_braille_dots_1267 0x1002863 /* U+2863 BRAILLE PATTERN DOTS-1267 */ #define XK_braille_dots_367 0x1002864 /* U+2864 BRAILLE PATTERN DOTS-367 */ #define XK_braille_dots_1367 0x1002865 /* U+2865 BRAILLE PATTERN DOTS-1367 */ #define XK_braille_dots_2367 0x1002866 /* U+2866 BRAILLE PATTERN DOTS-2367 */ #define XK_braille_dots_12367 0x1002867 /* U+2867 BRAILLE PATTERN DOTS-12367 */ #define XK_braille_dots_467 0x1002868 /* U+2868 BRAILLE PATTERN DOTS-467 */ #define XK_braille_dots_1467 0x1002869 /* U+2869 BRAILLE PATTERN DOTS-1467 */ #define XK_braille_dots_2467 0x100286a /* U+286a BRAILLE PATTERN DOTS-2467 */ #define XK_braille_dots_12467 0x100286b /* U+286b BRAILLE PATTERN DOTS-12467 */ #define XK_braille_dots_3467 0x100286c /* U+286c BRAILLE PATTERN DOTS-3467 */ #define XK_braille_dots_13467 0x100286d /* U+286d BRAILLE PATTERN DOTS-13467 */ #define XK_braille_dots_23467 0x100286e /* U+286e BRAILLE PATTERN DOTS-23467 */ #define XK_braille_dots_123467 0x100286f /* U+286f BRAILLE PATTERN DOTS-123467 */ #define XK_braille_dots_567 0x1002870 /* U+2870 BRAILLE PATTERN DOTS-567 */ #define XK_braille_dots_1567 0x1002871 /* U+2871 BRAILLE PATTERN DOTS-1567 */ #define XK_braille_dots_2567 0x1002872 /* U+2872 BRAILLE PATTERN DOTS-2567 */ #define XK_braille_dots_12567 0x1002873 /* U+2873 BRAILLE PATTERN DOTS-12567 */ #define XK_braille_dots_3567 0x1002874 /* U+2874 BRAILLE PATTERN DOTS-3567 */ #define XK_braille_dots_13567 0x1002875 /* U+2875 BRAILLE PATTERN DOTS-13567 */ #define XK_braille_dots_23567 0x1002876 /* U+2876 BRAILLE PATTERN DOTS-23567 */ #define XK_braille_dots_123567 0x1002877 /* U+2877 BRAILLE PATTERN DOTS-123567 */ #define XK_braille_dots_4567 0x1002878 /* U+2878 BRAILLE PATTERN DOTS-4567 */ #define XK_braille_dots_14567 0x1002879 /* U+2879 BRAILLE PATTERN DOTS-14567 */ #define XK_braille_dots_24567 0x100287a /* U+287a BRAILLE PATTERN DOTS-24567 */ #define XK_braille_dots_124567 0x100287b /* U+287b BRAILLE PATTERN DOTS-124567 */ #define XK_braille_dots_34567 0x100287c /* U+287c BRAILLE PATTERN DOTS-34567 */ #define XK_braille_dots_134567 0x100287d /* U+287d BRAILLE PATTERN DOTS-134567 */ #define XK_braille_dots_234567 0x100287e /* U+287e BRAILLE PATTERN DOTS-234567 */ #define XK_braille_dots_1234567 0x100287f /* U+287f BRAILLE PATTERN DOTS-1234567 */ #define XK_braille_dots_8 0x1002880 /* U+2880 BRAILLE PATTERN DOTS-8 */ #define XK_braille_dots_18 0x1002881 /* U+2881 BRAILLE PATTERN DOTS-18 */ #define XK_braille_dots_28 0x1002882 /* U+2882 BRAILLE PATTERN DOTS-28 */ #define XK_braille_dots_128 0x1002883 /* U+2883 BRAILLE PATTERN DOTS-128 */ #define XK_braille_dots_38 0x1002884 /* U+2884 BRAILLE PATTERN DOTS-38 */ #define XK_braille_dots_138 0x1002885 /* U+2885 BRAILLE PATTERN DOTS-138 */ #define XK_braille_dots_238 0x1002886 /* U+2886 BRAILLE PATTERN DOTS-238 */ #define XK_braille_dots_1238 0x1002887 /* U+2887 BRAILLE PATTERN DOTS-1238 */ #define XK_braille_dots_48 0x1002888 /* U+2888 BRAILLE PATTERN DOTS-48 */ #define XK_braille_dots_148 0x1002889 /* U+2889 BRAILLE PATTERN DOTS-148 */ #define XK_braille_dots_248 0x100288a /* U+288a BRAILLE PATTERN DOTS-248 */ #define XK_braille_dots_1248 0x100288b /* U+288b BRAILLE PATTERN DOTS-1248 */ #define XK_braille_dots_348 0x100288c /* U+288c BRAILLE PATTERN DOTS-348 */ #define XK_braille_dots_1348 0x100288d /* U+288d BRAILLE PATTERN DOTS-1348 */ #define XK_braille_dots_2348 0x100288e /* U+288e BRAILLE PATTERN DOTS-2348 */ #define XK_braille_dots_12348 0x100288f /* U+288f BRAILLE PATTERN DOTS-12348 */ #define XK_braille_dots_58 0x1002890 /* U+2890 BRAILLE PATTERN DOTS-58 */ #define XK_braille_dots_158 0x1002891 /* U+2891 BRAILLE PATTERN DOTS-158 */ #define XK_braille_dots_258 0x1002892 /* U+2892 BRAILLE PATTERN DOTS-258 */ #define XK_braille_dots_1258 0x1002893 /* U+2893 BRAILLE PATTERN DOTS-1258 */ #define XK_braille_dots_358 0x1002894 /* U+2894 BRAILLE PATTERN DOTS-358 */ #define XK_braille_dots_1358 0x1002895 /* U+2895 BRAILLE PATTERN DOTS-1358 */ #define XK_braille_dots_2358 0x1002896 /* U+2896 BRAILLE PATTERN DOTS-2358 */ #define XK_braille_dots_12358 0x1002897 /* U+2897 BRAILLE PATTERN DOTS-12358 */ #define XK_braille_dots_458 0x1002898 /* U+2898 BRAILLE PATTERN DOTS-458 */ #define XK_braille_dots_1458 0x1002899 /* U+2899 BRAILLE PATTERN DOTS-1458 */ #define XK_braille_dots_2458 0x100289a /* U+289a BRAILLE PATTERN DOTS-2458 */ #define XK_braille_dots_12458 0x100289b /* U+289b BRAILLE PATTERN DOTS-12458 */ #define XK_braille_dots_3458 0x100289c /* U+289c BRAILLE PATTERN DOTS-3458 */ #define XK_braille_dots_13458 0x100289d /* U+289d BRAILLE PATTERN DOTS-13458 */ #define XK_braille_dots_23458 0x100289e /* U+289e BRAILLE PATTERN DOTS-23458 */ #define XK_braille_dots_123458 0x100289f /* U+289f BRAILLE PATTERN DOTS-123458 */ #define XK_braille_dots_68 0x10028a0 /* U+28a0 BRAILLE PATTERN DOTS-68 */ #define XK_braille_dots_168 0x10028a1 /* U+28a1 BRAILLE PATTERN DOTS-168 */ #define XK_braille_dots_268 0x10028a2 /* U+28a2 BRAILLE PATTERN DOTS-268 */ #define XK_braille_dots_1268 0x10028a3 /* U+28a3 BRAILLE PATTERN DOTS-1268 */ #define XK_braille_dots_368 0x10028a4 /* U+28a4 BRAILLE PATTERN DOTS-368 */ #define XK_braille_dots_1368 0x10028a5 /* U+28a5 BRAILLE PATTERN DOTS-1368 */ #define XK_braille_dots_2368 0x10028a6 /* U+28a6 BRAILLE PATTERN DOTS-2368 */ #define XK_braille_dots_12368 0x10028a7 /* U+28a7 BRAILLE PATTERN DOTS-12368 */ #define XK_braille_dots_468 0x10028a8 /* U+28a8 BRAILLE PATTERN DOTS-468 */ #define XK_braille_dots_1468 0x10028a9 /* U+28a9 BRAILLE PATTERN DOTS-1468 */ #define XK_braille_dots_2468 0x10028aa /* U+28aa BRAILLE PATTERN DOTS-2468 */ #define XK_braille_dots_12468 0x10028ab /* U+28ab BRAILLE PATTERN DOTS-12468 */ #define XK_braille_dots_3468 0x10028ac /* U+28ac BRAILLE PATTERN DOTS-3468 */ #define XK_braille_dots_13468 0x10028ad /* U+28ad BRAILLE PATTERN DOTS-13468 */ #define XK_braille_dots_23468 0x10028ae /* U+28ae BRAILLE PATTERN DOTS-23468 */ #define XK_braille_dots_123468 0x10028af /* U+28af BRAILLE PATTERN DOTS-123468 */ #define XK_braille_dots_568 0x10028b0 /* U+28b0 BRAILLE PATTERN DOTS-568 */ #define XK_braille_dots_1568 0x10028b1 /* U+28b1 BRAILLE PATTERN DOTS-1568 */ #define XK_braille_dots_2568 0x10028b2 /* U+28b2 BRAILLE PATTERN DOTS-2568 */ #define XK_braille_dots_12568 0x10028b3 /* U+28b3 BRAILLE PATTERN DOTS-12568 */ #define XK_braille_dots_3568 0x10028b4 /* U+28b4 BRAILLE PATTERN DOTS-3568 */ #define XK_braille_dots_13568 0x10028b5 /* U+28b5 BRAILLE PATTERN DOTS-13568 */ #define XK_braille_dots_23568 0x10028b6 /* U+28b6 BRAILLE PATTERN DOTS-23568 */ #define XK_braille_dots_123568 0x10028b7 /* U+28b7 BRAILLE PATTERN DOTS-123568 */ #define XK_braille_dots_4568 0x10028b8 /* U+28b8 BRAILLE PATTERN DOTS-4568 */ #define XK_braille_dots_14568 0x10028b9 /* U+28b9 BRAILLE PATTERN DOTS-14568 */ #define XK_braille_dots_24568 0x10028ba /* U+28ba BRAILLE PATTERN DOTS-24568 */ #define XK_braille_dots_124568 0x10028bb /* U+28bb BRAILLE PATTERN DOTS-124568 */ #define XK_braille_dots_34568 0x10028bc /* U+28bc BRAILLE PATTERN DOTS-34568 */ #define XK_braille_dots_134568 0x10028bd /* U+28bd BRAILLE PATTERN DOTS-134568 */ #define XK_braille_dots_234568 0x10028be /* U+28be BRAILLE PATTERN DOTS-234568 */ #define XK_braille_dots_1234568 0x10028bf /* U+28bf BRAILLE PATTERN DOTS-1234568 */ #define XK_braille_dots_78 0x10028c0 /* U+28c0 BRAILLE PATTERN DOTS-78 */ #define XK_braille_dots_178 0x10028c1 /* U+28c1 BRAILLE PATTERN DOTS-178 */ #define XK_braille_dots_278 0x10028c2 /* U+28c2 BRAILLE PATTERN DOTS-278 */ #define XK_braille_dots_1278 0x10028c3 /* U+28c3 BRAILLE PATTERN DOTS-1278 */ #define XK_braille_dots_378 0x10028c4 /* U+28c4 BRAILLE PATTERN DOTS-378 */ #define XK_braille_dots_1378 0x10028c5 /* U+28c5 BRAILLE PATTERN DOTS-1378 */ #define XK_braille_dots_2378 0x10028c6 /* U+28c6 BRAILLE PATTERN DOTS-2378 */ #define XK_braille_dots_12378 0x10028c7 /* U+28c7 BRAILLE PATTERN DOTS-12378 */ #define XK_braille_dots_478 0x10028c8 /* U+28c8 BRAILLE PATTERN DOTS-478 */ #define XK_braille_dots_1478 0x10028c9 /* U+28c9 BRAILLE PATTERN DOTS-1478 */ #define XK_braille_dots_2478 0x10028ca /* U+28ca BRAILLE PATTERN DOTS-2478 */ #define XK_braille_dots_12478 0x10028cb /* U+28cb BRAILLE PATTERN DOTS-12478 */ #define XK_braille_dots_3478 0x10028cc /* U+28cc BRAILLE PATTERN DOTS-3478 */ #define XK_braille_dots_13478 0x10028cd /* U+28cd BRAILLE PATTERN DOTS-13478 */ #define XK_braille_dots_23478 0x10028ce /* U+28ce BRAILLE PATTERN DOTS-23478 */ #define XK_braille_dots_123478 0x10028cf /* U+28cf BRAILLE PATTERN DOTS-123478 */ #define XK_braille_dots_578 0x10028d0 /* U+28d0 BRAILLE PATTERN DOTS-578 */ #define XK_braille_dots_1578 0x10028d1 /* U+28d1 BRAILLE PATTERN DOTS-1578 */ #define XK_braille_dots_2578 0x10028d2 /* U+28d2 BRAILLE PATTERN DOTS-2578 */ #define XK_braille_dots_12578 0x10028d3 /* U+28d3 BRAILLE PATTERN DOTS-12578 */ #define XK_braille_dots_3578 0x10028d4 /* U+28d4 BRAILLE PATTERN DOTS-3578 */ #define XK_braille_dots_13578 0x10028d5 /* U+28d5 BRAILLE PATTERN DOTS-13578 */ #define XK_braille_dots_23578 0x10028d6 /* U+28d6 BRAILLE PATTERN DOTS-23578 */ #define XK_braille_dots_123578 0x10028d7 /* U+28d7 BRAILLE PATTERN DOTS-123578 */ #define XK_braille_dots_4578 0x10028d8 /* U+28d8 BRAILLE PATTERN DOTS-4578 */ #define XK_braille_dots_14578 0x10028d9 /* U+28d9 BRAILLE PATTERN DOTS-14578 */ #define XK_braille_dots_24578 0x10028da /* U+28da BRAILLE PATTERN DOTS-24578 */ #define XK_braille_dots_124578 0x10028db /* U+28db BRAILLE PATTERN DOTS-124578 */ #define XK_braille_dots_34578 0x10028dc /* U+28dc BRAILLE PATTERN DOTS-34578 */ #define XK_braille_dots_134578 0x10028dd /* U+28dd BRAILLE PATTERN DOTS-134578 */ #define XK_braille_dots_234578 0x10028de /* U+28de BRAILLE PATTERN DOTS-234578 */ #define XK_braille_dots_1234578 0x10028df /* U+28df BRAILLE PATTERN DOTS-1234578 */ #define XK_braille_dots_678 0x10028e0 /* U+28e0 BRAILLE PATTERN DOTS-678 */ #define XK_braille_dots_1678 0x10028e1 /* U+28e1 BRAILLE PATTERN DOTS-1678 */ #define XK_braille_dots_2678 0x10028e2 /* U+28e2 BRAILLE PATTERN DOTS-2678 */ #define XK_braille_dots_12678 0x10028e3 /* U+28e3 BRAILLE PATTERN DOTS-12678 */ #define XK_braille_dots_3678 0x10028e4 /* U+28e4 BRAILLE PATTERN DOTS-3678 */ #define XK_braille_dots_13678 0x10028e5 /* U+28e5 BRAILLE PATTERN DOTS-13678 */ #define XK_braille_dots_23678 0x10028e6 /* U+28e6 BRAILLE PATTERN DOTS-23678 */ #define XK_braille_dots_123678 0x10028e7 /* U+28e7 BRAILLE PATTERN DOTS-123678 */ #define XK_braille_dots_4678 0x10028e8 /* U+28e8 BRAILLE PATTERN DOTS-4678 */ #define XK_braille_dots_14678 0x10028e9 /* U+28e9 BRAILLE PATTERN DOTS-14678 */ #define XK_braille_dots_24678 0x10028ea /* U+28ea BRAILLE PATTERN DOTS-24678 */ #define XK_braille_dots_124678 0x10028eb /* U+28eb BRAILLE PATTERN DOTS-124678 */ #define XK_braille_dots_34678 0x10028ec /* U+28ec BRAILLE PATTERN DOTS-34678 */ #define XK_braille_dots_134678 0x10028ed /* U+28ed BRAILLE PATTERN DOTS-134678 */ #define XK_braille_dots_234678 0x10028ee /* U+28ee BRAILLE PATTERN DOTS-234678 */ #define XK_braille_dots_1234678 0x10028ef /* U+28ef BRAILLE PATTERN DOTS-1234678 */ #define XK_braille_dots_5678 0x10028f0 /* U+28f0 BRAILLE PATTERN DOTS-5678 */ #define XK_braille_dots_15678 0x10028f1 /* U+28f1 BRAILLE PATTERN DOTS-15678 */ #define XK_braille_dots_25678 0x10028f2 /* U+28f2 BRAILLE PATTERN DOTS-25678 */ #define XK_braille_dots_125678 0x10028f3 /* U+28f3 BRAILLE PATTERN DOTS-125678 */ #define XK_braille_dots_35678 0x10028f4 /* U+28f4 BRAILLE PATTERN DOTS-35678 */ #define XK_braille_dots_135678 0x10028f5 /* U+28f5 BRAILLE PATTERN DOTS-135678 */ #define XK_braille_dots_235678 0x10028f6 /* U+28f6 BRAILLE PATTERN DOTS-235678 */ #define XK_braille_dots_1235678 0x10028f7 /* U+28f7 BRAILLE PATTERN DOTS-1235678 */ #define XK_braille_dots_45678 0x10028f8 /* U+28f8 BRAILLE PATTERN DOTS-45678 */ #define XK_braille_dots_145678 0x10028f9 /* U+28f9 BRAILLE PATTERN DOTS-145678 */ #define XK_braille_dots_245678 0x10028fa /* U+28fa BRAILLE PATTERN DOTS-245678 */ #define XK_braille_dots_1245678 0x10028fb /* U+28fb BRAILLE PATTERN DOTS-1245678 */ #define XK_braille_dots_345678 0x10028fc /* U+28fc BRAILLE PATTERN DOTS-345678 */ #define XK_braille_dots_1345678 0x10028fd /* U+28fd BRAILLE PATTERN DOTS-1345678 */ #define XK_braille_dots_2345678 0x10028fe /* U+28fe BRAILLE PATTERN DOTS-2345678 */ #define XK_braille_dots_12345678 0x10028ff /* U+28ff BRAILLE PATTERN DOTS-12345678 */ #endif /* XK_BRAILLE */ /* * Sinhala (http://unicode.org/charts/PDF/U0D80.pdf) * http://www.nongnu.org/sinhala/doc/transliteration/sinhala-transliteration_6.html */ #ifdef XK_SINHALA #define XK_Sinh_ng 0x1000d82 /* U+0D82 SINHALA ANUSVARAYA */ #define XK_Sinh_h2 0x1000d83 /* U+0D83 SINHALA VISARGAYA */ #define XK_Sinh_a 0x1000d85 /* U+0D85 SINHALA AYANNA */ #define XK_Sinh_aa 0x1000d86 /* U+0D86 SINHALA AAYANNA */ #define XK_Sinh_ae 0x1000d87 /* U+0D87 SINHALA AEYANNA */ #define XK_Sinh_aee 0x1000d88 /* U+0D88 SINHALA AEEYANNA */ #define XK_Sinh_i 0x1000d89 /* U+0D89 SINHALA IYANNA */ #define XK_Sinh_ii 0x1000d8a /* U+0D8A SINHALA IIYANNA */ #define XK_Sinh_u 0x1000d8b /* U+0D8B SINHALA UYANNA */ #define XK_Sinh_uu 0x1000d8c /* U+0D8C SINHALA UUYANNA */ #define XK_Sinh_ri 0x1000d8d /* U+0D8D SINHALA IRUYANNA */ #define XK_Sinh_rii 0x1000d8e /* U+0D8E SINHALA IRUUYANNA */ #define XK_Sinh_lu 0x1000d8f /* U+0D8F SINHALA ILUYANNA */ #define XK_Sinh_luu 0x1000d90 /* U+0D90 SINHALA ILUUYANNA */ #define XK_Sinh_e 0x1000d91 /* U+0D91 SINHALA EYANNA */ #define XK_Sinh_ee 0x1000d92 /* U+0D92 SINHALA EEYANNA */ #define XK_Sinh_ai 0x1000d93 /* U+0D93 SINHALA AIYANNA */ #define XK_Sinh_o 0x1000d94 /* U+0D94 SINHALA OYANNA */ #define XK_Sinh_oo 0x1000d95 /* U+0D95 SINHALA OOYANNA */ #define XK_Sinh_au 0x1000d96 /* U+0D96 SINHALA AUYANNA */ #define XK_Sinh_ka 0x1000d9a /* U+0D9A SINHALA KAYANNA */ #define XK_Sinh_kha 0x1000d9b /* U+0D9B SINHALA MAHA. KAYANNA */ #define XK_Sinh_ga 0x1000d9c /* U+0D9C SINHALA GAYANNA */ #define XK_Sinh_gha 0x1000d9d /* U+0D9D SINHALA MAHA. GAYANNA */ #define XK_Sinh_ng2 0x1000d9e /* U+0D9E SINHALA KANTAJA NAASIKYAYA */ #define XK_Sinh_nga 0x1000d9f /* U+0D9F SINHALA SANYAKA GAYANNA */ #define XK_Sinh_ca 0x1000da0 /* U+0DA0 SINHALA CAYANNA */ #define XK_Sinh_cha 0x1000da1 /* U+0DA1 SINHALA MAHA. CAYANNA */ #define XK_Sinh_ja 0x1000da2 /* U+0DA2 SINHALA JAYANNA */ #define XK_Sinh_jha 0x1000da3 /* U+0DA3 SINHALA MAHA. JAYANNA */ #define XK_Sinh_nya 0x1000da4 /* U+0DA4 SINHALA TAALUJA NAASIKYAYA */ #define XK_Sinh_jnya 0x1000da5 /* U+0DA5 SINHALA TAALUJA SANYOOGA NAASIKYAYA */ #define XK_Sinh_nja 0x1000da6 /* U+0DA6 SINHALA SANYAKA JAYANNA */ #define XK_Sinh_tta 0x1000da7 /* U+0DA7 SINHALA TTAYANNA */ #define XK_Sinh_ttha 0x1000da8 /* U+0DA8 SINHALA MAHA. TTAYANNA */ #define XK_Sinh_dda 0x1000da9 /* U+0DA9 SINHALA DDAYANNA */ #define XK_Sinh_ddha 0x1000daa /* U+0DAA SINHALA MAHA. DDAYANNA */ #define XK_Sinh_nna 0x1000dab /* U+0DAB SINHALA MUURDHAJA NAYANNA */ #define XK_Sinh_ndda 0x1000dac /* U+0DAC SINHALA SANYAKA DDAYANNA */ #define XK_Sinh_tha 0x1000dad /* U+0DAD SINHALA TAYANNA */ #define XK_Sinh_thha 0x1000dae /* U+0DAE SINHALA MAHA. TAYANNA */ #define XK_Sinh_dha 0x1000daf /* U+0DAF SINHALA DAYANNA */ #define XK_Sinh_dhha 0x1000db0 /* U+0DB0 SINHALA MAHA. DAYANNA */ #define XK_Sinh_na 0x1000db1 /* U+0DB1 SINHALA DANTAJA NAYANNA */ #define XK_Sinh_ndha 0x1000db3 /* U+0DB3 SINHALA SANYAKA DAYANNA */ #define XK_Sinh_pa 0x1000db4 /* U+0DB4 SINHALA PAYANNA */ #define XK_Sinh_pha 0x1000db5 /* U+0DB5 SINHALA MAHA. PAYANNA */ #define XK_Sinh_ba 0x1000db6 /* U+0DB6 SINHALA BAYANNA */ #define XK_Sinh_bha 0x1000db7 /* U+0DB7 SINHALA MAHA. BAYANNA */ #define XK_Sinh_ma 0x1000db8 /* U+0DB8 SINHALA MAYANNA */ #define XK_Sinh_mba 0x1000db9 /* U+0DB9 SINHALA AMBA BAYANNA */ #define XK_Sinh_ya 0x1000dba /* U+0DBA SINHALA YAYANNA */ #define XK_Sinh_ra 0x1000dbb /* U+0DBB SINHALA RAYANNA */ #define XK_Sinh_la 0x1000dbd /* U+0DBD SINHALA DANTAJA LAYANNA */ #define XK_Sinh_va 0x1000dc0 /* U+0DC0 SINHALA VAYANNA */ #define XK_Sinh_sha 0x1000dc1 /* U+0DC1 SINHALA TAALUJA SAYANNA */ #define XK_Sinh_ssha 0x1000dc2 /* U+0DC2 SINHALA MUURDHAJA SAYANNA */ #define XK_Sinh_sa 0x1000dc3 /* U+0DC3 SINHALA DANTAJA SAYANNA */ #define XK_Sinh_ha 0x1000dc4 /* U+0DC4 SINHALA HAYANNA */ #define XK_Sinh_lla 0x1000dc5 /* U+0DC5 SINHALA MUURDHAJA LAYANNA */ #define XK_Sinh_fa 0x1000dc6 /* U+0DC6 SINHALA FAYANNA */ #define XK_Sinh_al 0x1000dca /* U+0DCA SINHALA AL-LAKUNA */ #define XK_Sinh_aa2 0x1000dcf /* U+0DCF SINHALA AELA-PILLA */ #define XK_Sinh_ae2 0x1000dd0 /* U+0DD0 SINHALA AEDA-PILLA */ #define XK_Sinh_aee2 0x1000dd1 /* U+0DD1 SINHALA DIGA AEDA-PILLA */ #define XK_Sinh_i2 0x1000dd2 /* U+0DD2 SINHALA IS-PILLA */ #define XK_Sinh_ii2 0x1000dd3 /* U+0DD3 SINHALA DIGA IS-PILLA */ #define XK_Sinh_u2 0x1000dd4 /* U+0DD4 SINHALA PAA-PILLA */ #define XK_Sinh_uu2 0x1000dd6 /* U+0DD6 SINHALA DIGA PAA-PILLA */ #define XK_Sinh_ru2 0x1000dd8 /* U+0DD8 SINHALA GAETTA-PILLA */ #define XK_Sinh_e2 0x1000dd9 /* U+0DD9 SINHALA KOMBUVA */ #define XK_Sinh_ee2 0x1000dda /* U+0DDA SINHALA DIGA KOMBUVA */ #define XK_Sinh_ai2 0x1000ddb /* U+0DDB SINHALA KOMBU DEKA */ #define XK_Sinh_o2 0x1000ddc /* U+0DDC SINHALA KOMBUVA HAA AELA-PILLA*/ #define XK_Sinh_oo2 0x1000ddd /* U+0DDD SINHALA KOMBUVA HAA DIGA AELA-PILLA*/ #define XK_Sinh_au2 0x1000dde /* U+0DDE SINHALA KOMBUVA HAA GAYANUKITTA */ #define XK_Sinh_lu2 0x1000ddf /* U+0DDF SINHALA GAYANUKITTA */ #define XK_Sinh_ruu2 0x1000df2 /* U+0DF2 SINHALA DIGA GAETTA-PILLA */ #define XK_Sinh_luu2 0x1000df3 /* U+0DF3 SINHALA DIGA GAYANUKITTA */ #define XK_Sinh_kunddaliya 0x1000df4 /* U+0DF4 SINHALA KUNDDALIYA */ #endif /* XK_SINHALA */ PKZ&M?? X11/Xpoll.hnu[/* Copyright 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * Copyright © 2005 Daniel Stone * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Daniel Stone not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission. Daniel Stone makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * DANIEL STONE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL * DANIEL STONE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef _XPOLL_H_ #define _XPOLL_H_ #if !defined(WIN32) || defined(__CYGWIN__) #ifndef USE_POLL #include #include /* Get the FD_* macros. */ #include #ifdef CSRG_BASED #include # if BSD < 199103 typedef long fd_mask; # endif #endif #if defined(FD_SETSIZE) && FD_SETSIZE < 512 # define XFD_SETSIZE FD_SETSIZE #else # define XFD_SETSIZE 512 # ifndef FD_SETSIZE # define FD_SETSIZE XFD_SETSIZE # endif #endif #ifndef NBBY #define NBBY 8 /* number of bits in a byte */ #endif #ifndef NFDBITS #define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ #endif #ifndef howmany #define howmany(x,y) (((x)+((y)-1))/(y)) #endif #if defined(BSD) && BSD < 198911 typedef struct fd_set { fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; } fd_set; #endif # define Select(n,r,w,e,t) select(n,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t) #define __X_FDS_BITS __fds_bits #ifndef __FDS_BITS # define __FDS_BITS(p) ((p)->__X_FDS_BITS) #endif #define __XFDS_BITS(p, n) (__FDS_BITS(p))[n] #ifndef FD_SET #define FD_SET(n, p) (__XFDS_BITS(p, ((n)/NFDBITS)) |= ((fd_mask)1 << ((n) % NFDBITS))) #endif #ifndef FD_CLR #define FD_CLR(n, p) (__XFDS_BITS((p), ((n)/NFDBITS)) &= ~((fd_mask)1 << ((n) % NFDBITS))) #endif #ifndef FD_ISSET #define FD_ISSET(n, p) ((__XFDS_BITS((p), ((n)/NFDBITS))) & ((fd_mask)1 << ((n) % NFDBITS))) #endif #ifndef FD_ZERO #define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) #endif /* * The howmany(FD_SETSIZE, NFDBITS) computes the number of elements in the * array. before accessing an element in the array we check it exists. * If it does not exist then the compiler discards the code to access it. */ #define XFD_ANYSET(p) \ ((howmany(FD_SETSIZE, NFDBITS) > 0 && (__XFDS_BITS(p, 0))) || \ (howmany(FD_SETSIZE, NFDBITS) > 1 && (__XFDS_BITS(p, 1))) || \ (howmany(FD_SETSIZE, NFDBITS) > 2 && (__XFDS_BITS(p, 2))) || \ (howmany(FD_SETSIZE, NFDBITS) > 3 && (__XFDS_BITS(p, 3))) || \ (howmany(FD_SETSIZE, NFDBITS) > 4 && (__XFDS_BITS(p, 4))) || \ (howmany(FD_SETSIZE, NFDBITS) > 5 && (__XFDS_BITS(p, 5))) || \ (howmany(FD_SETSIZE, NFDBITS) > 6 && (__XFDS_BITS(p, 6))) || \ (howmany(FD_SETSIZE, NFDBITS) > 7 && (__XFDS_BITS(p, 7))) || \ (howmany(FD_SETSIZE, NFDBITS) > 8 && (__XFDS_BITS(p, 8))) || \ (howmany(FD_SETSIZE, NFDBITS) > 9 && (__XFDS_BITS(p, 9))) || \ (howmany(FD_SETSIZE, NFDBITS) > 10 && (__XFDS_BITS(p, 10))) || \ (howmany(FD_SETSIZE, NFDBITS) > 11 && (__XFDS_BITS(p, 11))) || \ (howmany(FD_SETSIZE, NFDBITS) > 12 && (__XFDS_BITS(p, 12))) || \ (howmany(FD_SETSIZE, NFDBITS) > 13 && (__XFDS_BITS(p, 13))) || \ (howmany(FD_SETSIZE, NFDBITS) > 14 && (__XFDS_BITS(p, 14))) || \ (howmany(FD_SETSIZE, NFDBITS) > 15 && (__XFDS_BITS(p, 15)))) #define XFD_COPYSET(src,dst) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) = __XFDS_BITS((src), __i__); \ } #define XFD_ANDSET(dst,b1,b2) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) & (__XFDS_BITS((b2), __i__))); \ } #define XFD_ORSET(dst,b1,b2) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) = ((__XFDS_BITS((b1), __i__)) | (__XFDS_BITS((b2), __i__))); \ } #define XFD_UNSET(dst,b1) { \ int __i__; \ for (__i__ = 0; __i__ < howmany(FD_SETSIZE, NFDBITS); __i__++) \ __XFDS_BITS((dst), __i__) &= ~(__XFDS_BITS((b1), __i__)); \ } #else /* USE_POLL */ #include #endif /* USE_POLL */ #else /* WIN32 */ #define XFD_SETSIZE 512 #ifndef FD_SETSIZE #define FD_SETSIZE XFD_SETSIZE #endif #include #define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t) #define XFD_SETCOUNT(p) (((fd_set FAR *)(p))->fd_count) #define XFD_FD(p,i) (((fd_set FAR *)(p))->fd_array[i]) #define XFD_ANYSET(p) XFD_SETCOUNT(p) #define XFD_COPYSET(src,dst) { \ u_int __i; \ FD_ZERO(dst); \ for (__i = 0; __i < XFD_SETCOUNT(src) ; __i++) { \ XFD_FD(dst,__i) = XFD_FD(src,__i); \ } \ XFD_SETCOUNT(dst) = XFD_SETCOUNT(src); \ } #define XFD_ANDSET(dst,b1,b2) { \ u_int __i; \ FD_ZERO(dst); \ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \ if (FD_ISSET(XFD_FD(b1,__i), b2)) \ FD_SET(XFD_FD(b1,__i), dst); \ } \ } #define XFD_ORSET(dst,b1,b2) { \ u_int __i; \ if (dst != b1) XFD_COPYSET(b1,dst); \ for (__i = 0; __i < XFD_SETCOUNT(b2) ; __i++) { \ if (!FD_ISSET(XFD_FD(b2,__i), dst)) \ FD_SET(XFD_FD(b2,__i), dst); \ } \ } /* this one is really sub-optimal */ #define XFD_UNSET(dst,b1) { \ u_int __i; \ for (__i = 0; __i < XFD_SETCOUNT(b1) ; __i++) { \ FD_CLR(XFD_FD(b1,__i), dst); \ } \ } /* we have to pay the price of having an array here, unlike with bitmasks calling twice FD_SET with the same fd is not transparent, so be careful */ #undef FD_SET #define FD_SET(fd,set) do { \ if (XFD_SETCOUNT(set) < FD_SETSIZE && !FD_ISSET(fd,set)) \ XFD_FD(set,XFD_SETCOUNT(set)++)=(fd); \ } while(0) #define getdtablesize() FD_SETSIZE #endif /* WIN32 */ #endif /* _XPOLL_H_ */ PKZRf+ + X11/Xosdefs.hnu[/* * O/S-dependent (mis)feature macro definitions * Copyright 1991, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _XOSDEFS_H_ # define _XOSDEFS_H_ /* * X_NOT_POSIX means does not have POSIX header files. Lack of this * symbol does NOT mean that the POSIX environment is the default. * You may still have to define _POSIX_SOURCE to get it. */ # ifdef _SCO_DS # ifndef __SCO__ # define __SCO__ # endif # endif # ifdef __i386__ # ifdef SYSV # if !defined(__SCO__) && \ !defined(__UNIXWARE__) && !defined(__sun) # if !defined(_POSIX_SOURCE) # define X_NOT_POSIX # endif # endif # endif # endif # ifdef __sun /* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4 * This check allows non-Imake configured programs to build correctly. */ # if defined(__SVR4) && !defined(SVR4) # define SVR4 1 # endif # ifdef SVR4 /* define this to whatever it needs to be */ # define X_POSIX_C_SOURCE 199300L # endif # endif # ifdef WIN32 # ifndef _POSIX_ # define X_NOT_POSIX # endif # endif # ifdef __APPLE__ # define NULL_NOT_ZERO /* Defining any of these will sanitize the namespace to JUST want is defined by * that particular standard. If that happens, we don't get some expected * prototypes, typedefs, etc (like fd_mask). We can define _DARWIN_C_SOURCE to * loosen our belts a tad. */ # if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) # ifndef _DARWIN_C_SOURCE # define _DARWIN_C_SOURCE # endif # endif # endif # ifdef __GNU__ # ifndef PATH_MAX # define PATH_MAX 4096 # endif # ifndef MAXPATHLEN # define MAXPATHLEN 4096 # endif # endif # if defined(__SCO__) || defined(__UNIXWARE__) # ifndef PATH_MAX # define PATH_MAX 1024 # endif # ifndef MAXPATHLEN # define MAXPATHLEN 1024 # endif # endif # if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \ || defined(__APPLE__) || defined(__DragonFly__) # ifndef CSRG_BASED # define CSRG_BASED # endif # endif #endif /* _XOSDEFS_H_ */ PKZ'0s X11/Xproto.hnu[/* Definitions for the X window system used by server and c bindings */ /* * This packet-construction scheme makes the following assumptions: * * 1. The compiler is able * to generate code which addresses one- and two-byte quantities. * In the worst case, this would be done with bit-fields. If bit-fields * are used it may be necessary to reorder the request fields in this file, * depending on the order in which the machine assigns bit fields to * machine words. There may also be a problem with sign extension, * as K+R specify that bitfields are always unsigned. * * 2. 2- and 4-byte fields in packet structures must be ordered by hand * such that they are naturally-aligned, so that no compiler will ever * insert padding bytes. * * 3. All packets are hand-padded to a multiple of 4 bytes, for * the same reason. */ #ifndef XPROTO_H #define XPROTO_H /*********************************************************** Copyright 1987, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #include #include /* * Define constants for the sizes of the network packets. The sz_ prefix is * used instead of something more descriptive so that the symbols are no more * than 32 characters in length (which causes problems for some compilers). */ #define sz_xSegment 8 #define sz_xPoint 4 #define sz_xRectangle 8 #define sz_xArc 12 #define sz_xConnClientPrefix 12 #define sz_xConnSetupPrefix 8 #define sz_xConnSetup 32 #define sz_xPixmapFormat 8 #define sz_xDepth 8 #define sz_xVisualType 24 #define sz_xWindowRoot 40 #define sz_xTimecoord 8 #define sz_xHostEntry 4 #define sz_xCharInfo 12 #define sz_xFontProp 8 #define sz_xTextElt 2 #define sz_xColorItem 12 #define sz_xrgb 8 #define sz_xGenericReply 32 #define sz_xGetWindowAttributesReply 44 #define sz_xGetGeometryReply 32 #define sz_xQueryTreeReply 32 #define sz_xInternAtomReply 32 #define sz_xGetAtomNameReply 32 #define sz_xGetPropertyReply 32 #define sz_xListPropertiesReply 32 #define sz_xGetSelectionOwnerReply 32 #define sz_xGrabPointerReply 32 #define sz_xQueryPointerReply 32 #define sz_xGetMotionEventsReply 32 #define sz_xTranslateCoordsReply 32 #define sz_xGetInputFocusReply 32 #define sz_xQueryKeymapReply 40 #define sz_xQueryFontReply 60 #define sz_xQueryTextExtentsReply 32 #define sz_xListFontsReply 32 #define sz_xGetFontPathReply 32 #define sz_xGetImageReply 32 #define sz_xListInstalledColormapsReply 32 #define sz_xAllocColorReply 32 #define sz_xAllocNamedColorReply 32 #define sz_xAllocColorCellsReply 32 #define sz_xAllocColorPlanesReply 32 #define sz_xQueryColorsReply 32 #define sz_xLookupColorReply 32 #define sz_xQueryBestSizeReply 32 #define sz_xQueryExtensionReply 32 #define sz_xListExtensionsReply 32 #define sz_xSetMappingReply 32 #define sz_xGetKeyboardControlReply 52 #define sz_xGetPointerControlReply 32 #define sz_xGetScreenSaverReply 32 #define sz_xListHostsReply 32 #define sz_xSetModifierMappingReply 32 #define sz_xError 32 #define sz_xEvent 32 #define sz_xKeymapEvent 32 #define sz_xReq 4 #define sz_xResourceReq 8 #define sz_xCreateWindowReq 32 #define sz_xChangeWindowAttributesReq 12 #define sz_xChangeSaveSetReq 8 #define sz_xReparentWindowReq 16 #define sz_xConfigureWindowReq 12 #define sz_xCirculateWindowReq 8 #define sz_xInternAtomReq 8 #define sz_xChangePropertyReq 24 #define sz_xDeletePropertyReq 12 #define sz_xGetPropertyReq 24 #define sz_xSetSelectionOwnerReq 16 #define sz_xConvertSelectionReq 24 #define sz_xSendEventReq 44 #define sz_xGrabPointerReq 24 #define sz_xGrabButtonReq 24 #define sz_xUngrabButtonReq 12 #define sz_xChangeActivePointerGrabReq 16 #define sz_xGrabKeyboardReq 16 #define sz_xGrabKeyReq 16 #define sz_xUngrabKeyReq 12 #define sz_xAllowEventsReq 8 #define sz_xGetMotionEventsReq 16 #define sz_xTranslateCoordsReq 16 #define sz_xWarpPointerReq 24 #define sz_xSetInputFocusReq 12 #define sz_xOpenFontReq 12 #define sz_xQueryTextExtentsReq 8 #define sz_xListFontsReq 8 #define sz_xSetFontPathReq 8 #define sz_xCreatePixmapReq 16 #define sz_xCreateGCReq 16 #define sz_xChangeGCReq 12 #define sz_xCopyGCReq 16 #define sz_xSetDashesReq 12 #define sz_xSetClipRectanglesReq 12 #define sz_xCopyAreaReq 28 #define sz_xCopyPlaneReq 32 #define sz_xPolyPointReq 12 #define sz_xPolySegmentReq 12 #define sz_xFillPolyReq 16 #define sz_xPutImageReq 24 #define sz_xGetImageReq 20 #define sz_xPolyTextReq 16 #define sz_xImageTextReq 16 #define sz_xCreateColormapReq 16 #define sz_xCopyColormapAndFreeReq 12 #define sz_xAllocColorReq 16 #define sz_xAllocNamedColorReq 12 #define sz_xAllocColorCellsReq 12 #define sz_xAllocColorPlanesReq 16 #define sz_xFreeColorsReq 12 #define sz_xStoreColorsReq 8 #define sz_xStoreNamedColorReq 16 #define sz_xQueryColorsReq 8 #define sz_xLookupColorReq 12 #define sz_xCreateCursorReq 32 #define sz_xCreateGlyphCursorReq 32 #define sz_xRecolorCursorReq 20 #define sz_xQueryBestSizeReq 12 #define sz_xQueryExtensionReq 8 #define sz_xChangeKeyboardControlReq 8 #define sz_xBellReq 4 #define sz_xChangePointerControlReq 12 #define sz_xSetScreenSaverReq 12 #define sz_xChangeHostsReq 8 #define sz_xListHostsReq 4 #define sz_xChangeModeReq 4 #define sz_xRotatePropertiesReq 12 #define sz_xReply 32 #define sz_xGrabKeyboardReply 32 #define sz_xListFontsWithInfoReply 60 #define sz_xSetPointerMappingReply 32 #define sz_xGetKeyboardMappingReply 32 #define sz_xGetPointerMappingReply 32 #define sz_xGetModifierMappingReply 32 #define sz_xListFontsWithInfoReq 8 #define sz_xPolyLineReq 12 #define sz_xPolyArcReq 12 #define sz_xPolyRectangleReq 12 #define sz_xPolyFillRectangleReq 12 #define sz_xPolyFillArcReq 12 #define sz_xPolyText8Req 16 #define sz_xPolyText16Req 16 #define sz_xImageText8Req 16 #define sz_xImageText16Req 16 #define sz_xSetPointerMappingReq 4 #define sz_xForceScreenSaverReq 4 #define sz_xSetCloseDownModeReq 4 #define sz_xClearAreaReq 16 #define sz_xSetAccessControlReq 4 #define sz_xGetKeyboardMappingReq 8 #define sz_xSetModifierMappingReq 4 #define sz_xPropIconSize 24 #define sz_xChangeKeyboardMappingReq 8 /* For the purpose of the structure definitions in this file, we must redefine the following types in terms of Xmd.h's types, which may include bit fields. All of these are #undef'd at the end of this file, restoring the definitions in X.h. */ #define Window CARD32 #define Drawable CARD32 #define Font CARD32 #define Pixmap CARD32 #define Cursor CARD32 #define Colormap CARD32 #define GContext CARD32 #define Atom CARD32 #define VisualID CARD32 #define Time CARD32 #define KeyCode CARD8 #define KeySym CARD32 #define X_TCP_PORT 6000 /* add display number */ #define xTrue 1 #define xFalse 0 typedef CARD16 KeyButMask; /***************** Connection setup structures. See Chapter 8: Connection Setup of the X Window System Protocol specification for details. *****************/ /* Client initiates handshake with this data, followed by the strings * for the auth protocol & data. */ typedef struct { CARD8 byteOrder; BYTE pad; CARD16 majorVersion, minorVersion; CARD16 nbytesAuthProto; /* Authorization protocol */ CARD16 nbytesAuthString; /* Authorization string */ CARD16 pad2; } xConnClientPrefix; /* Server response to xConnClientPrefix. * * If success == Success, this is followed by xConnSetup and * numRoots xWindowRoot structs. * * If success == Failure, this is followed by a reason string. * * The protocol also defines a case of success == Authenticate, but * that doesn't seem to have ever been implemented by the X Consortium. */ typedef struct { CARD8 success; BYTE lengthReason; /*num bytes in string following if failure */ CARD16 majorVersion, minorVersion; CARD16 length; /* 1/4 additional bytes in setup info */ } xConnSetupPrefix; typedef struct { CARD32 release; CARD32 ridBase, ridMask; CARD32 motionBufferSize; CARD16 nbytesVendor; /* number of bytes in vendor string */ CARD16 maxRequestSize; CARD8 numRoots; /* number of roots structs to follow */ CARD8 numFormats; /* number of pixmap formats */ CARD8 imageByteOrder; /* LSBFirst, MSBFirst */ CARD8 bitmapBitOrder; /* LeastSignificant, MostSign...*/ CARD8 bitmapScanlineUnit, /* 8, 16, 32 */ bitmapScanlinePad; /* 8, 16, 32 */ KeyCode minKeyCode, maxKeyCode; CARD32 pad2; } xConnSetup; typedef struct { CARD8 depth; CARD8 bitsPerPixel; CARD8 scanLinePad; CARD8 pad1; CARD32 pad2; } xPixmapFormat; /* window root */ typedef struct { CARD8 depth; CARD8 pad1; CARD16 nVisuals; /* number of xVisualType structures following */ CARD32 pad2; } xDepth; typedef struct { VisualID visualID; #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD8 bitsPerRGB; CARD16 colormapEntries; CARD32 redMask, greenMask, blueMask; CARD32 pad; } xVisualType; typedef struct { Window windowId; Colormap defaultColormap; CARD32 whitePixel, blackPixel; CARD32 currentInputMask; CARD16 pixWidth, pixHeight; CARD16 mmWidth, mmHeight; CARD16 minInstalledMaps, maxInstalledMaps; VisualID rootVisualID; CARD8 backingStore; BOOL saveUnders; CARD8 rootDepth; CARD8 nDepths; /* number of xDepth structures following */ } xWindowRoot; /***************************************************************** * Structure Defns * Structures needed for replies *****************************************************************/ /* Used in GetMotionEvents */ typedef struct { CARD32 time; INT16 x, y; } xTimecoord; typedef struct { CARD8 family; BYTE pad; CARD16 length; } xHostEntry; typedef struct { INT16 leftSideBearing, rightSideBearing, characterWidth, ascent, descent; CARD16 attributes; } xCharInfo; typedef struct { Atom name; CARD32 value; } xFontProp; /* * non-aligned big-endian font ID follows this struct */ typedef struct { /* followed by string */ CARD8 len; /* number of *characters* in string, or FontChange (255) for font change, or 0 if just delta given */ INT8 delta; } xTextElt; typedef struct { CARD32 pixel; CARD16 red, green, blue; CARD8 flags; /* DoRed, DoGreen, DoBlue booleans */ CARD8 pad; } xColorItem; typedef struct { CARD16 red, green, blue, pad; } xrgb; typedef CARD8 KEYCODE; /***************** * XRep: * meant to be 32 byte quantity *****************/ /* GenericReply is the common format of all replies. The "data" items are specific to each individual reply type. */ typedef struct { BYTE type; /* X_Reply */ BYTE data1; /* depends on reply type */ CARD16 sequenceNumber; /* of last request received by server */ CARD32 length; /* 4 byte quantities beyond size of GenericReply */ CARD32 data00; CARD32 data01; CARD32 data02; CARD32 data03; CARD32 data04; CARD32 data05; } xGenericReply; /* Individual reply formats. */ typedef struct { BYTE type; /* X_Reply */ CARD8 backingStore; CARD16 sequenceNumber; CARD32 length; /* NOT 0; this is an extra-large reply */ VisualID visualID; #if defined(__cplusplus) || defined(c_plusplus) CARD16 c_class; #else CARD16 class; #endif CARD8 bitGravity; CARD8 winGravity; CARD32 backingBitPlanes; CARD32 backingPixel; BOOL saveUnder; BOOL mapInstalled; CARD8 mapState; BOOL override; Colormap colormap; CARD32 allEventMasks; CARD32 yourEventMask; CARD16 doNotPropagateMask; CARD16 pad; } xGetWindowAttributesReply; typedef struct { BYTE type; /* X_Reply */ CARD8 depth; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window root; INT16 x, y; CARD16 width, height; CARD16 borderWidth; CARD16 pad1; CARD32 pad2; CARD32 pad3; } xGetGeometryReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; Window root, parent; CARD16 nChildren; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xQueryTreeReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ Atom atom; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xInternAtomReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* of additional bytes */ CARD16 nameLength; /* # of characters in name */ CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetAtomNameReply; typedef struct { BYTE type; /* X_Reply */ CARD8 format; CARD16 sequenceNumber; CARD32 length; /* of additional bytes */ Atom propertyType; CARD32 bytesAfter; CARD32 nItems; /* # of 8, 16, or 32-bit entities in reply */ CARD32 pad1; CARD32 pad2; CARD32 pad3; } xGetPropertyReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nProperties; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListPropertiesReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window owner; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetSelectionOwnerReply; typedef struct { BYTE type; /* X_Reply */ BYTE status; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGrabPointerReply; typedef xGrabPointerReply xGrabKeyboardReply; typedef struct { BYTE type; /* X_Reply */ BOOL sameScreen; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window root, child; INT16 rootX, rootY, winX, winY; CARD16 mask; CARD16 pad1; CARD32 pad; } xQueryPointerReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 nEvents; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetMotionEventsReply; typedef struct { BYTE type; /* X_Reply */ BOOL sameScreen; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window child; INT16 dstX, dstY; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xTranslateCoordsReply; typedef struct { BYTE type; /* X_Reply */ CARD8 revertTo; CARD16 sequenceNumber; CARD32 length; /* 0 */ Window focus; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xGetInputFocusReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 2, NOT 0; this is an extra-large reply */ BYTE map[32]; } xQueryKeymapReply; /* Warning: this MUST match (up to component renaming) xListFontsWithInfoReply */ typedef struct _xQueryFontReply { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* definitely > 0, even if "nCharInfos" is 0 */ xCharInfo minBounds; CARD32 walign1; xCharInfo maxBounds; CARD32 walign2; CARD16 minCharOrByte2, maxCharOrByte2; CARD16 defaultChar; CARD16 nFontProps; /* followed by this many xFontProp structures */ CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent, fontDescent; CARD32 nCharInfos; /* followed by this many xCharInfo structures */ } xQueryFontReply; typedef struct { BYTE type; /* X_Reply */ CARD8 drawDirection; CARD16 sequenceNumber; CARD32 length; /* 0 */ INT16 fontAscent, fontDescent; INT16 overallAscent, overallDescent; INT32 overallWidth, overallLeft, overallRight; CARD32 pad; } xQueryTextExtentsReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nFonts; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListFontsReply; /* Warning: this MUST match (up to component renaming) xQueryFontReply */ typedef struct { BYTE type; /* X_Reply */ CARD8 nameLength; /* 0 indicates end-of-reply-sequence */ CARD16 sequenceNumber; CARD32 length; /* definitely > 0, even if "nameLength" is 0 */ xCharInfo minBounds; CARD32 walign1; xCharInfo maxBounds; CARD32 walign2; CARD16 minCharOrByte2, maxCharOrByte2; CARD16 defaultChar; CARD16 nFontProps; /* followed by this many xFontProp structures */ CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent, fontDescent; CARD32 nReplies; /* hint as to how many more replies might be coming */ } xListFontsWithInfoReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nPaths; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetFontPathReply; typedef struct { BYTE type; /* X_Reply */ CARD8 depth; CARD16 sequenceNumber; CARD32 length; VisualID visual; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetImageReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nColormaps; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListInstalledColormapsReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 red, green, blue; CARD16 pad2; CARD32 pixel; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xAllocColorReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD32 pixel; CARD16 exactRed, exactGreen, exactBlue; CARD16 screenRed, screenGreen, screenBlue; CARD32 pad2; CARD32 pad3; } xAllocNamedColorReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nPixels, nMasks; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xAllocColorCellsReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nPixels; CARD16 pad2; CARD32 redMask, greenMask, blueMask; CARD32 pad3; CARD32 pad4; } xAllocColorPlanesReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD16 nColors; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xQueryColorsReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 exactRed, exactGreen, exactBlue; CARD16 screenRed, screenGreen, screenBlue; CARD32 pad3; CARD32 pad4; CARD32 pad5; } xLookupColorReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 width, height; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xQueryBestSizeReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ BOOL present; CARD8 major_opcode; CARD8 first_event; CARD8 first_error; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xQueryExtensionReply; typedef struct { BYTE type; /* X_Reply */ CARD8 nExtensions; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListExtensionsReply; typedef struct { BYTE type; /* X_Reply */ CARD8 success; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xSetMappingReply; typedef xSetMappingReply xSetPointerMappingReply; typedef xSetMappingReply xSetModifierMappingReply; typedef struct { BYTE type; /* X_Reply */ CARD8 nElts; /* how many elements does the map have */ CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetPointerMappingReply; typedef struct { BYTE type; CARD8 keySymsPerKeyCode; CARD16 sequenceNumber; CARD32 length; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGetKeyboardMappingReply; typedef struct { BYTE type; CARD8 numKeyPerModifier; CARD16 sequenceNumber; CARD32 length; CARD32 pad1; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetModifierMappingReply; typedef struct { BYTE type; /* X_Reply */ BOOL globalAutoRepeat; CARD16 sequenceNumber; CARD32 length; /* 5 */ CARD32 ledMask; CARD8 keyClickPercent, bellPercent; CARD16 bellPitch, bellDuration; CARD16 pad; BYTE map[32]; /* bit masks start here */ } xGetKeyboardControlReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 accelNumerator, accelDenominator; CARD16 threshold; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetPointerControlReply; typedef struct { BYTE type; /* X_Reply */ BYTE pad1; CARD16 sequenceNumber; CARD32 length; /* 0 */ CARD16 timeout, interval; BOOL preferBlanking; BOOL allowExposures; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xGetScreenSaverReply; typedef struct { BYTE type; /* X_Reply */ BOOL enabled; CARD16 sequenceNumber; CARD32 length; CARD16 nHosts; CARD16 pad1; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xListHostsReply; /***************************************************************** * Xerror * All errors are 32 bytes *****************************************************************/ typedef struct { BYTE type; /* X_Error */ BYTE errorCode; CARD16 sequenceNumber; /* the nth request from this client */ CARD32 resourceID; CARD16 minorCode; CARD8 majorCode; BYTE pad1; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xError; /***************************************************************** * xEvent * All events are 32 bytes *****************************************************************/ typedef struct _xEvent { union { struct { BYTE type; BYTE detail; CARD16 sequenceNumber; } u; struct { CARD32 pad00; Time time; Window root, event, child; INT16 rootX, rootY, eventX, eventY; KeyButMask state; BOOL sameScreen; BYTE pad1; } keyButtonPointer; struct { CARD32 pad00; Time time; Window root, event, child; INT16 rootX, rootY, eventX, eventY; KeyButMask state; BYTE mode; /* really XMode */ BYTE flags; /* sameScreen and focus booleans, packed together */ #define ELFlagFocus (1<<0) #define ELFlagSameScreen (1<<1) } enterLeave; struct { CARD32 pad00; Window window; BYTE mode; /* really XMode */ BYTE pad1, pad2, pad3; } focus; struct { CARD32 pad00; Window window; CARD16 x, y, width, height; CARD16 count; CARD16 pad2; } expose; struct { CARD32 pad00; Drawable drawable; CARD16 x, y, width, height; CARD16 minorEvent; CARD16 count; BYTE majorEvent; BYTE pad1, pad2, pad3; } graphicsExposure; struct { CARD32 pad00; Drawable drawable; CARD16 minorEvent; BYTE majorEvent; BYTE bpad; } noExposure; struct { CARD32 pad00; Window window; CARD8 state; BYTE pad1, pad2, pad3; } visibility; struct { CARD32 pad00; Window parent, window; INT16 x, y; CARD16 width, height, borderWidth; BOOL override; BYTE bpad; } createNotify; /* * The event fields in the structures for DestroyNotify, UnmapNotify, * MapNotify, ReparentNotify, ConfigureNotify, CirculateNotify, GravityNotify, * must be at the same offset because server internal code is depending upon * this to patch up the events before they are delivered. * Also note that MapRequest, ConfigureRequest and CirculateRequest have * the same offset for the event window. */ struct { CARD32 pad00; Window event, window; } destroyNotify; struct { CARD32 pad00; Window event, window; BOOL fromConfigure; BYTE pad1, pad2, pad3; } unmapNotify; struct { CARD32 pad00; Window event, window; BOOL override; BYTE pad1, pad2, pad3; } mapNotify; struct { CARD32 pad00; Window parent, window; } mapRequest; struct { CARD32 pad00; Window event, window, parent; INT16 x, y; BOOL override; BYTE pad1, pad2, pad3; } reparent; struct { CARD32 pad00; Window event, window, aboveSibling; INT16 x, y; CARD16 width, height, borderWidth; BOOL override; BYTE bpad; } configureNotify; struct { CARD32 pad00; Window parent, window, sibling; INT16 x, y; CARD16 width, height, borderWidth; CARD16 valueMask; CARD32 pad1; } configureRequest; struct { CARD32 pad00; Window event, window; INT16 x, y; CARD32 pad1, pad2, pad3, pad4; } gravity; struct { CARD32 pad00; Window window; CARD16 width, height; } resizeRequest; struct { /* The event field in the circulate record is really the parent when this is used as a CirculateRequest instead of a CirculateNotify */ CARD32 pad00; Window event, window, parent; BYTE place; /* Top or Bottom */ BYTE pad1, pad2, pad3; } circulate; struct { CARD32 pad00; Window window; Atom atom; Time time; BYTE state; /* NewValue or Deleted */ BYTE pad1; CARD16 pad2; } property; struct { CARD32 pad00; Time time; Window window; Atom atom; } selectionClear; struct { CARD32 pad00; Time time; Window owner, requestor; Atom selection, target, property; } selectionRequest; struct { CARD32 pad00; Time time; Window requestor; Atom selection, target, property; } selectionNotify; struct { CARD32 pad00; Window window; Colormap colormap; #if defined(__cplusplus) || defined(c_plusplus) BOOL c_new; #else BOOL new; #endif BYTE state; /* Installed or UnInstalled */ BYTE pad1, pad2; } colormap; struct { CARD32 pad00; CARD8 request; KeyCode firstKeyCode; CARD8 count; BYTE pad1; } mappingNotify; struct { CARD32 pad00; Window window; union { struct { Atom type; INT32 longs0; INT32 longs1; INT32 longs2; INT32 longs3; INT32 longs4; } l; struct { Atom type; INT16 shorts0; INT16 shorts1; INT16 shorts2; INT16 shorts3; INT16 shorts4; INT16 shorts5; INT16 shorts6; INT16 shorts7; INT16 shorts8; INT16 shorts9; } s; struct { Atom type; INT8 bytes[20]; } b; } u; } clientMessage; } u; } xEvent; /********************************************************* * * Generic event * * Those events are not part of the core protocol spec and can be used by * various extensions. * type is always GenericEvent * extension is the minor opcode of the extension the event belongs to. * evtype is the actual event type, unique __per extension__. * * GenericEvents can be longer than 32 bytes, with the length field * specifying the number of 4 byte blocks after the first 32 bytes. * * */ typedef struct { BYTE type; CARD8 extension; CARD16 sequenceNumber; CARD32 length; CARD16 evtype; CARD16 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; } xGenericEvent; /* KeymapNotify events are not included in the above union because they are different from all other events: they do not have a "detail" or "sequenceNumber", so there is room for a 248-bit key mask. */ typedef struct { BYTE type; BYTE map[31]; } xKeymapEvent; #define XEventSize (sizeof(xEvent)) /* XReply is the union of all the replies above whose "fixed part" fits in 32 bytes. It does NOT include GetWindowAttributesReply, QueryFontReply, QueryKeymapReply, or GetKeyboardControlReply ListFontsWithInfoReply */ typedef union { xGenericReply generic; xGetGeometryReply geom; xQueryTreeReply tree; xInternAtomReply atom; xGetAtomNameReply atomName; xGetPropertyReply property; xListPropertiesReply listProperties; xGetSelectionOwnerReply selection; xGrabPointerReply grabPointer; xGrabKeyboardReply grabKeyboard; xQueryPointerReply pointer; xGetMotionEventsReply motionEvents; xTranslateCoordsReply coords; xGetInputFocusReply inputFocus; xQueryTextExtentsReply textExtents; xListFontsReply fonts; xGetFontPathReply fontPath; xGetImageReply image; xListInstalledColormapsReply colormaps; xAllocColorReply allocColor; xAllocNamedColorReply allocNamedColor; xAllocColorCellsReply colorCells; xAllocColorPlanesReply colorPlanes; xQueryColorsReply colors; xLookupColorReply lookupColor; xQueryBestSizeReply bestSize; xQueryExtensionReply extension; xListExtensionsReply extensions; xSetModifierMappingReply setModifierMapping; xGetModifierMappingReply getModifierMapping; xSetPointerMappingReply setPointerMapping; xGetKeyboardMappingReply getKeyboardMapping; xGetPointerMappingReply getPointerMapping; xGetPointerControlReply pointerControl; xGetScreenSaverReply screenSaver; xListHostsReply hosts; xError error; xEvent event; } xReply; /***************************************************************** * REQUESTS *****************************************************************/ /* Request structure */ typedef struct _xReq { CARD8 reqType; CARD8 data; /* meaning depends on request type */ CARD16 length; /* length in 4 bytes quantities of whole request, including this header */ } xReq; /***************************************************************** * structures that follow request. *****************************************************************/ /* ResourceReq is used for any request which has a resource ID (or Atom or Time) as its one and only argument. */ typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD32 id; /* a Window, Drawable, Font, GContext, Pixmap, etc. */ } xResourceReq; typedef struct { CARD8 reqType; CARD8 depth; CARD16 length; Window wid, parent; INT16 x, y; CARD16 width, height, borderWidth; #if defined(__cplusplus) || defined(c_plusplus) CARD16 c_class; #else CARD16 class; #endif VisualID visual; CARD32 mask; } xCreateWindowReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; CARD32 valueMask; } xChangeWindowAttributesReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length; Window window; } xChangeSaveSetReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window, parent; INT16 x, y; } xReparentWindowReq; typedef struct { CARD8 reqType; CARD8 pad; CARD16 length; Window window; CARD16 mask; CARD16 pad2; } xConfigureWindowReq; typedef struct { CARD8 reqType; CARD8 direction; CARD16 length; Window window; } xCirculateWindowReq; typedef struct { /* followed by padded string */ CARD8 reqType; BOOL onlyIfExists; CARD16 length; CARD16 nbytes; /* number of bytes in string */ CARD16 pad; } xInternAtomReq; typedef struct { CARD8 reqType; CARD8 mode; CARD16 length; Window window; Atom property, type; CARD8 format; BYTE pad[3]; CARD32 nUnits; /* length of stuff following, depends on format */ } xChangePropertyReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; Atom property; } xDeletePropertyReq; typedef struct { CARD8 reqType; #if defined(__cplusplus) || defined(c_plusplus) BOOL c_delete; #else BOOL delete; #endif CARD16 length; Window window; Atom property, type; CARD32 longOffset; CARD32 longLength; } xGetPropertyReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; Atom selection; Time time; } xSetSelectionOwnerReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window requestor; Atom selection, target, property; Time time; } xConvertSelectionReq; typedef struct { CARD8 reqType; BOOL propagate; CARD16 length; Window destination; CARD32 eventMask; xEvent event; } xSendEventReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; CARD16 eventMask; BYTE pointerMode, keyboardMode; Window confineTo; Cursor cursor; Time time; } xGrabPointerReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; CARD16 eventMask; BYTE pointerMode, keyboardMode; Window confineTo; Cursor cursor; CARD8 button; BYTE pad; CARD16 modifiers; } xGrabButtonReq; typedef struct { CARD8 reqType; CARD8 button; CARD16 length; Window grabWindow; CARD16 modifiers; CARD16 pad; } xUngrabButtonReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cursor; Time time; CARD16 eventMask; CARD16 pad2; } xChangeActivePointerGrabReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; Time time; BYTE pointerMode, keyboardMode; CARD16 pad; } xGrabKeyboardReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length; Window grabWindow; CARD16 modifiers; CARD8 key; BYTE pointerMode, keyboardMode; BYTE pad1, pad2, pad3; } xGrabKeyReq; typedef struct { CARD8 reqType; CARD8 key; CARD16 length; Window grabWindow; CARD16 modifiers; CARD16 pad; } xUngrabKeyReq; typedef struct { CARD8 reqType; CARD8 mode; CARD16 length; Time time; } xAllowEventsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window window; Time start, stop; } xGetMotionEventsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window srcWid, dstWid; INT16 srcX, srcY; } xTranslateCoordsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Window srcWid, dstWid; INT16 srcX, srcY; CARD16 srcWidth, srcHeight; INT16 dstX, dstY; } xWarpPointerReq; typedef struct { CARD8 reqType; CARD8 revertTo; CARD16 length; Window focus; Time time; } xSetInputFocusReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Font fid; CARD16 nbytes; BYTE pad1, pad2; /* string follows on word boundary */ } xOpenFontReq; typedef struct { CARD8 reqType; BOOL oddLength; CARD16 length; Font fid; } xQueryTextExtentsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD16 maxNames; CARD16 nbytes; /* followed immediately by string bytes */ } xListFontsReq; typedef xListFontsReq xListFontsWithInfoReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD16 nFonts; BYTE pad1, pad2; /* LISTofSTRING8 follows on word boundary */ } xSetFontPathReq; typedef struct { CARD8 reqType; CARD8 depth; CARD16 length; Pixmap pid; Drawable drawable; CARD16 width, height; } xCreatePixmapReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext gc; Drawable drawable; CARD32 mask; } xCreateGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext gc; CARD32 mask; } xChangeGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext srcGC, dstGC; CARD32 mask; } xCopyGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; GContext gc; CARD16 dashOffset; CARD16 nDashes; /* length LISTofCARD8 of values following */ } xSetDashesReq; typedef struct { CARD8 reqType; BYTE ordering; CARD16 length; GContext gc; INT16 xOrigin, yOrigin; } xSetClipRectanglesReq; typedef struct { CARD8 reqType; BOOL exposures; CARD16 length; Window window; INT16 x, y; CARD16 width, height; } xClearAreaReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Drawable srcDrawable, dstDrawable; GContext gc; INT16 srcX, srcY, dstX, dstY; CARD16 width, height; } xCopyAreaReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Drawable srcDrawable, dstDrawable; GContext gc; INT16 srcX, srcY, dstX, dstY; CARD16 width, height; CARD32 bitPlane; } xCopyPlaneReq; typedef struct { CARD8 reqType; BYTE coordMode; CARD16 length; Drawable drawable; GContext gc; } xPolyPointReq; typedef xPolyPointReq xPolyLineReq; /* same request structure */ /* The following used for PolySegment, PolyRectangle, PolyArc, PolyFillRectangle, PolyFillArc */ typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Drawable drawable; GContext gc; } xPolySegmentReq; typedef xPolySegmentReq xPolyArcReq; typedef xPolySegmentReq xPolyRectangleReq; typedef xPolySegmentReq xPolyFillRectangleReq; typedef xPolySegmentReq xPolyFillArcReq; typedef struct _FillPolyReq { CARD8 reqType; BYTE pad; CARD16 length; Drawable drawable; GContext gc; BYTE shape; BYTE coordMode; CARD16 pad1; } xFillPolyReq; typedef struct _PutImageReq { CARD8 reqType; CARD8 format; CARD16 length; Drawable drawable; GContext gc; CARD16 width, height; INT16 dstX, dstY; CARD8 leftPad; CARD8 depth; CARD16 pad; } xPutImageReq; typedef struct { CARD8 reqType; CARD8 format; CARD16 length; Drawable drawable; INT16 x, y; CARD16 width, height; CARD32 planeMask; } xGetImageReq; /* the following used by PolyText8 and PolyText16 */ typedef struct { CARD8 reqType; CARD8 pad; CARD16 length; Drawable drawable; GContext gc; INT16 x, y; /* items (xTextElt) start after struct */ } xPolyTextReq; typedef xPolyTextReq xPolyText8Req; typedef xPolyTextReq xPolyText16Req; typedef struct { CARD8 reqType; BYTE nChars; CARD16 length; Drawable drawable; GContext gc; INT16 x, y; } xImageTextReq; typedef xImageTextReq xImageText8Req; typedef xImageTextReq xImageText16Req; typedef struct { CARD8 reqType; BYTE alloc; CARD16 length; Colormap mid; Window window; VisualID visual; } xCreateColormapReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap mid; Colormap srcCmap; } xCopyColormapAndFreeReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD16 red, green, blue; CARD16 pad2; } xAllocColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD16 nbytes; /* followed by structure */ BYTE pad1, pad2; } xAllocNamedColorReq; typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length; Colormap cmap; CARD16 colors, planes; } xAllocColorCellsReq; typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length; Colormap cmap; CARD16 colors, red, green, blue; } xAllocColorPlanesReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD32 planeMask; } xFreeColorsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; } xStoreColorsReq; typedef struct { CARD8 reqType; CARD8 flags; /* DoRed, DoGreen, DoBlue, as in xColorItem */ CARD16 length; Colormap cmap; CARD32 pixel; CARD16 nbytes; /* number of name string bytes following structure */ BYTE pad1, pad2; } xStoreNamedColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; } xQueryColorsReq; typedef struct { /* followed by string of length len */ CARD8 reqType; BYTE pad; CARD16 length; Colormap cmap; CARD16 nbytes; /* number of string bytes following structure*/ BYTE pad1, pad2; } xLookupColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cid; Pixmap source, mask; CARD16 foreRed, foreGreen, foreBlue; CARD16 backRed, backGreen, backBlue; CARD16 x, y; } xCreateCursorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cid; Font source, mask; CARD16 sourceChar, maskChar; CARD16 foreRed, foreGreen, foreBlue; CARD16 backRed, backGreen, backBlue; } xCreateGlyphCursorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Cursor cursor; CARD16 foreRed, foreGreen, foreBlue; CARD16 backRed, backGreen, backBlue; } xRecolorCursorReq; typedef struct { CARD8 reqType; #if defined(__cplusplus) || defined(c_plusplus) CARD8 c_class; #else CARD8 class; #endif CARD16 length; Drawable drawable; CARD16 width, height; } xQueryBestSizeReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD16 nbytes; /* number of string bytes following structure */ BYTE pad1, pad2; } xQueryExtensionReq; typedef struct { CARD8 reqType; CARD8 numKeyPerModifier; CARD16 length; } xSetModifierMappingReq; typedef struct { CARD8 reqType; CARD8 nElts; /* how many elements in the map */ CARD16 length; } xSetPointerMappingReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; KeyCode firstKeyCode; CARD8 count; CARD16 pad1; } xGetKeyboardMappingReq; typedef struct { CARD8 reqType; CARD8 keyCodes; CARD16 length; KeyCode firstKeyCode; CARD8 keySymsPerKeyCode; CARD16 pad1; } xChangeKeyboardMappingReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD32 mask; } xChangeKeyboardControlReq; typedef struct { CARD8 reqType; INT8 percent; /* -100 to 100 */ CARD16 length; } xBellReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; INT16 accelNum, accelDenum; INT16 threshold; BOOL doAccel, doThresh; } xChangePointerControlReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; INT16 timeout, interval; BYTE preferBlank, allowExpose; CARD16 pad2; } xSetScreenSaverReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length; CARD8 hostFamily; BYTE pad; CARD16 hostLength; } xChangeHostsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; } xListHostsReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length; } xChangeModeReq; typedef xChangeModeReq xSetAccessControlReq; typedef xChangeModeReq xSetCloseDownModeReq; typedef xChangeModeReq xForceScreenSaverReq; typedef struct { /* followed by LIST of ATOM */ CARD8 reqType; BYTE pad; CARD16 length; Window window; CARD16 nAtoms; INT16 nPositions; } xRotatePropertiesReq; /* Reply codes */ #define X_Reply 1 /* Normal reply */ #define X_Error 0 /* Error */ /* Request codes */ #define X_CreateWindow 1 #define X_ChangeWindowAttributes 2 #define X_GetWindowAttributes 3 #define X_DestroyWindow 4 #define X_DestroySubwindows 5 #define X_ChangeSaveSet 6 #define X_ReparentWindow 7 #define X_MapWindow 8 #define X_MapSubwindows 9 #define X_UnmapWindow 10 #define X_UnmapSubwindows 11 #define X_ConfigureWindow 12 #define X_CirculateWindow 13 #define X_GetGeometry 14 #define X_QueryTree 15 #define X_InternAtom 16 #define X_GetAtomName 17 #define X_ChangeProperty 18 #define X_DeleteProperty 19 #define X_GetProperty 20 #define X_ListProperties 21 #define X_SetSelectionOwner 22 #define X_GetSelectionOwner 23 #define X_ConvertSelection 24 #define X_SendEvent 25 #define X_GrabPointer 26 #define X_UngrabPointer 27 #define X_GrabButton 28 #define X_UngrabButton 29 #define X_ChangeActivePointerGrab 30 #define X_GrabKeyboard 31 #define X_UngrabKeyboard 32 #define X_GrabKey 33 #define X_UngrabKey 34 #define X_AllowEvents 35 #define X_GrabServer 36 #define X_UngrabServer 37 #define X_QueryPointer 38 #define X_GetMotionEvents 39 #define X_TranslateCoords 40 #define X_WarpPointer 41 #define X_SetInputFocus 42 #define X_GetInputFocus 43 #define X_QueryKeymap 44 #define X_OpenFont 45 #define X_CloseFont 46 #define X_QueryFont 47 #define X_QueryTextExtents 48 #define X_ListFonts 49 #define X_ListFontsWithInfo 50 #define X_SetFontPath 51 #define X_GetFontPath 52 #define X_CreatePixmap 53 #define X_FreePixmap 54 #define X_CreateGC 55 #define X_ChangeGC 56 #define X_CopyGC 57 #define X_SetDashes 58 #define X_SetClipRectangles 59 #define X_FreeGC 60 #define X_ClearArea 61 #define X_CopyArea 62 #define X_CopyPlane 63 #define X_PolyPoint 64 #define X_PolyLine 65 #define X_PolySegment 66 #define X_PolyRectangle 67 #define X_PolyArc 68 #define X_FillPoly 69 #define X_PolyFillRectangle 70 #define X_PolyFillArc 71 #define X_PutImage 72 #define X_GetImage 73 #define X_PolyText8 74 #define X_PolyText16 75 #define X_ImageText8 76 #define X_ImageText16 77 #define X_CreateColormap 78 #define X_FreeColormap 79 #define X_CopyColormapAndFree 80 #define X_InstallColormap 81 #define X_UninstallColormap 82 #define X_ListInstalledColormaps 83 #define X_AllocColor 84 #define X_AllocNamedColor 85 #define X_AllocColorCells 86 #define X_AllocColorPlanes 87 #define X_FreeColors 88 #define X_StoreColors 89 #define X_StoreNamedColor 90 #define X_QueryColors 91 #define X_LookupColor 92 #define X_CreateCursor 93 #define X_CreateGlyphCursor 94 #define X_FreeCursor 95 #define X_RecolorCursor 96 #define X_QueryBestSize 97 #define X_QueryExtension 98 #define X_ListExtensions 99 #define X_ChangeKeyboardMapping 100 #define X_GetKeyboardMapping 101 #define X_ChangeKeyboardControl 102 #define X_GetKeyboardControl 103 #define X_Bell 104 #define X_ChangePointerControl 105 #define X_GetPointerControl 106 #define X_SetScreenSaver 107 #define X_GetScreenSaver 108 #define X_ChangeHosts 109 #define X_ListHosts 110 #define X_SetAccessControl 111 #define X_SetCloseDownMode 112 #define X_KillClient 113 #define X_RotateProperties 114 #define X_ForceScreenSaver 115 #define X_SetPointerMapping 116 #define X_GetPointerMapping 117 #define X_SetModifierMapping 118 #define X_GetModifierMapping 119 #define X_NoOperation 127 /* restore these definitions back to the typedefs in X.h */ #undef Window #undef Drawable #undef Font #undef Pixmap #undef Cursor #undef Colormap #undef GContext #undef Atom #undef VisualID #undef Time #undef KeyCode #undef KeySym #endif /* XPROTO_H */ PKZ_Υz z X11/fonts/fontproto.hnu[/*********************************************************** Copyright (c) 1999 The XFree86 Project Inc. All Rights Reserved. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The XFree86 Project Inc. shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The XFree86 Project Inc.. */ #ifndef _FONTPROTO_H #define _FONTPROTO_H #include /* Externally provided functions required by libXfont */ extern _X_EXPORT int RegisterFPEFunctions ( NameCheckFunc name_func, InitFpeFunc init_func, FreeFpeFunc free_func, ResetFpeFunc reset_func, OpenFontFunc open_func, CloseFontFunc close_func, ListFontsFunc list_func, StartLfwiFunc start_lfwi_func, NextLfwiFunc next_lfwi_func, WakeupFpeFunc wakeup_func, ClientDiedFunc client_died, LoadGlyphsFunc load_glyphs, StartLaFunc start_list_alias_func, NextLaFunc next_list_alias_func, SetPathFunc set_path_func); extern _X_EXPORT int GetDefaultPointSize ( void ); extern _X_EXPORT int init_fs_handlers ( FontPathElementPtr fpe, BlockHandlerProcPtr block_handler); extern _X_EXPORT void remove_fs_handlers ( FontPathElementPtr fpe, BlockHandlerProcPtr block_handler, Bool all ); extern _X_EXPORT int client_auth_generation ( ClientPtr client ); #ifndef ___CLIENTSIGNAL_DEFINED___ #define ___CLIENTSIGNAL_DEFINED___ extern Bool ClientSignal ( ClientPtr client ); #endif /* ___CLIENTSIGNAL_DEFINED___ */ extern _X_EXPORT void DeleteFontClientID ( Font id ); extern _X_EXPORT Font GetNewFontClientID ( void ); extern _X_EXPORT int StoreFontClientFont ( FontPtr pfont, Font id ); extern _X_EXPORT void FontFileRegisterFpeFunctions ( void ); extern _X_EXPORT void FontFileCheckRegisterFpeFunctions ( void ); extern Bool XpClientIsBitmapClient ( ClientPtr client ); extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe ); extern void PrinterFontRegisterFpeFunctions ( void ); extern void fs_register_fpe_functions ( void ); extern void check_fs_register_fpe_functions ( void ); /* util/private.c */ extern FontPtr CreateFontRec (void); extern void DestroyFontRec (FontPtr font); extern Bool _FontSetNewPrivate (FontPtr /* pFont */, int /* n */, void * /* ptr */); extern int AllocateFontPrivateIndex (void); extern void ResetFontPrivateIndex (void); /* Type1/t1funcs.c */ extern void Type1RegisterFontFileFunctions(void); extern void CIDRegisterFontFileFunctions(void); /* Speedo/spfuncs.c */ extern void SpeedoRegisterFontFileFunctions(void); /* FreeType/ftfuncs.c */ extern void FreeTypeRegisterFontFileFunctions(void); #endif PKZgX11/fonts/FS.hnu[/* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of Network Computing Devices or Digital * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. * Network Computing Devices and Digital make no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ /* Portions Copyright 1987, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ #ifndef _FS_H_ #define _FS_H_ #include #include #define FS_PROTOCOL 2 #define FS_PROTOCOL_MINOR 0 #ifndef X_PROTOCOL /* protocol familes */ #define FamilyInternet 0 #define FamilyDECnet 1 #define FamilyChaos 2 #define FamilyInternet6 6 typedef unsigned int FSDrawDirection; #endif #ifndef None #define None 0L #endif #define LeftToRightDrawDirection 0 #define RightToLeftDrawDirection 1 /* font info flags */ #define FontInfoAllCharsExist (1L << 0) #define FontInfoInkInside (1L << 1) #define FontInfoHorizontalOverlap (1L << 2) /* auth status flags */ #define AuthSuccess 0 #define AuthContinue 1 #define AuthBusy 2 #define AuthDenied 3 /* property types */ #define PropTypeString 0 #define PropTypeUnsigned 1 #define PropTypeSigned 2 #ifndef LSBFirst /* byte order */ #define LSBFirst 0 #define MSBFirst 1 #endif /* event masks */ #define CatalogueChangeNotifyMask (1L << 0) #define FontChangeNotifyMask (1L << 1) /* errors */ #define FSSuccess -1 #define FSBadRequest 0 #define FSBadFormat 1 #define FSBadFont 2 #define FSBadRange 3 #define FSBadEventMask 4 #define FSBadAccessContext 5 #define FSBadIDChoice 6 #define FSBadName 7 #define FSBadResolution 8 #define FSBadAlloc 9 #define FSBadLength 10 #define FSBadImplementation 11 #define FirstExtensionError 128 #define LastExtensionError 255 /* events */ #define KeepAlive 0 #define CatalogueChangeNotify 1 #define FontChangeNotify 2 #define FSLASTEvent 3 #endif /* _FS_H_ */ PKZ:˰X11/fonts/font.hnu[/*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef FONT_H #define FONT_H #include #ifndef BitmapFormatByteOrderMask #include "fsmasks.h" #endif /* data structures */ #ifndef _XTYPEDEF_FONTPTR typedef struct _Font *FontPtr; #define _XTYPEDEF_FONTPTR #endif typedef struct _FontInfo *FontInfoPtr; typedef struct _FontProp *FontPropPtr; typedef struct _ExtentInfo *ExtentInfoPtr; typedef struct _FontPathElement *FontPathElementPtr; #ifndef _XTYPEDEF_CHARINFOPTR typedef struct _CharInfo *CharInfoPtr; #define _XTYPEDEF_CHARINFOPTR #endif typedef struct _FontNames *FontNamesPtr; typedef struct _FontResolution *FontResolutionPtr; #define NullCharInfo ((CharInfoPtr) 0) #define NullFont ((FontPtr) 0) #define NullFontInfo ((FontInfoPtr) 0) /* draw direction */ #define LeftToRight 0 #define RightToLeft 1 #define BottomToTop 2 #define TopToBottom 3 typedef int DrawDirection; #define NO_SUCH_CHAR -1 #define FontAliasType 0x1000 #define AllocError 80 #define StillWorking 81 #define FontNameAlias 82 #define BadFontName 83 #define Suspended 84 #define Successful 85 #define BadFontPath 86 #define BadCharRange 87 #define BadFontFormat 88 #define FPEResetFailed 89 /* for when an FPE reset won't work */ /* OpenFont flags */ #define FontLoadInfo 0x0001 #define FontLoadProps 0x0002 #define FontLoadMetrics 0x0004 #define FontLoadBitmaps 0x0008 #define FontLoadAll 0x000f #define FontOpenSync 0x0010 #define FontReopen 0x0020 /* Query flags */ #define LoadAll 0x1 #define FinishRamge 0x2 #define EightBitFont 0x4 #define SixteenBitFont 0x8 /* Glyph Caching Modes */ #define CACHING_OFF 0 #define CACHE_16_BIT_GLYPHS 1 #define CACHE_ALL_GLYPHS 2 #define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS extern int glyphCachingMode; struct _Client; extern int StartListFontsWithInfo( struct _Client * /*client*/, int /*length*/, unsigned char * /*pattern*/, int /*max_names*/ ); extern FontNamesPtr MakeFontNamesRecord( unsigned /* size */ ); extern void FreeFontNames( FontNamesPtr /* pFN*/ ); extern int AddFontNamesName( FontNamesPtr /* names */, char * /* name */, int /* length */ ); #if 0 /* unused */ extern int FontToFSError(); extern FontResolutionPtr GetClientResolution(); #endif typedef struct _FontPatternCache *FontPatternCachePtr; extern FontPatternCachePtr MakeFontPatternCache ( void ); extern void FreeFontPatternCache ( FontPatternCachePtr /* cache */ ); extern void EmptyFontPatternCache ( FontPatternCachePtr /* cache */ ); extern void CacheFontPattern ( FontPatternCachePtr /* cache */, const char * /* pattern */, int /* patlen */, FontPtr /* pFont */ ); extern _X_EXPORT FontResolutionPtr GetClientResolutions( int * /* num */ ); extern FontPtr FindCachedFontPattern ( FontPatternCachePtr /* cache */, const char * /* pattern */, int /* patlen */ ); extern void RemoveCachedFontPattern ( FontPatternCachePtr /* cache */, FontPtr /* pFont */ ); typedef enum { Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit } FontEncoding; #endif /* FONT_H */ PKZ7'ӹ$$X11/fonts/fontstruct.hnu[/*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #ifndef FONTSTR_H #define FONTSTR_H #include #include "font.h" #include #include /* * This version of the server font data structure is only for describing * the in memory data structure. The file structure is not necessarily a * copy of this. That is up to the compiler and the OS layer font loading * machinery. */ #define GLYPHPADOPTIONS 4 /* 1, 2, 4, or 8 */ typedef struct _FontProp { long name; long value; /* assumes ATOM is not larger than INT32 */ } FontPropRec; typedef struct _FontResolution { unsigned short x_resolution; unsigned short y_resolution; unsigned short point_size; } FontResolutionRec; typedef struct _ExtentInfo { DrawDirection drawDirection; int fontAscent; int fontDescent; int overallAscent; int overallDescent; int overallWidth; int overallLeft; int overallRight; } ExtentInfoRec; typedef struct _CharInfo { xCharInfo metrics; /* info preformatted for Queries */ char *bits; /* pointer to glyph image */ } CharInfoRec; /* * Font is created at font load time. It is specific to a single encoding. * e.g. not all of the glyphs in a font may be part of a single encoding. */ typedef struct _FontInfo { unsigned short firstCol; unsigned short lastCol; unsigned short firstRow; unsigned short lastRow; unsigned short defaultCh; unsigned int noOverlap:1; unsigned int terminalFont:1; unsigned int constantMetrics:1; unsigned int constantWidth:1; unsigned int inkInside:1; unsigned int inkMetrics:1; unsigned int allExist:1; unsigned int drawDirection:2; unsigned int cachable:1; unsigned int anamorphic:1; short maxOverlap; short pad; xCharInfo maxbounds; xCharInfo minbounds; xCharInfo ink_maxbounds; xCharInfo ink_minbounds; short fontAscent; short fontDescent; int nprops; FontPropPtr props; char *isStringProp; } FontInfoRec; typedef struct _Font { int refcnt; FontInfoRec info; char bit; char byte; char glyph; char scan; fsBitmapFormat format; int (*get_glyphs) (FontPtr /* font */, unsigned long /* count */, unsigned char * /* chars */, FontEncoding /* encoding */, unsigned long * /* count */, CharInfoPtr * /* glyphs */); int (*get_metrics) (FontPtr /* font */, unsigned long /* count */, unsigned char * /* chars */, FontEncoding /* encoding */, unsigned long * /* count */, xCharInfo ** /* glyphs */); void (*unload_font) (FontPtr /* font */); void (*unload_glyphs) (FontPtr /* font */); FontPathElementPtr fpe; void *svrPrivate; void *fontPrivate; void *fpePrivate; int maxPrivate; void **devPrivates; } FontRec; #define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (void *) 0 : \ (pFont)->devPrivates[n]) #define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \ _FontSetNewPrivate (pFont, n, ptr) : \ ((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE)) typedef struct _FontNames { int nnames; int size; int *length; char **names; } FontNamesRec; /* External view of font paths */ typedef struct _FontPathElement { int name_length; #if FONT_PATH_ELEMENT_NAME_CONST const #endif char *name; int type; int refcount; void *private; } FontPathElementRec; typedef Bool (*NameCheckFunc) (const char *name); typedef int (*InitFpeFunc) (FontPathElementPtr fpe); typedef int (*FreeFpeFunc) (FontPathElementPtr fpe); typedef int (*ResetFpeFunc) (FontPathElementPtr fpe); typedef int (*OpenFontFunc) ( void *client, FontPathElementPtr fpe, Mask flags, const char* name, int namelen, fsBitmapFormat format, fsBitmapFormatMask fmask, XID id, FontPtr* pFont, char** aliasName, FontPtr non_cachable_font); typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont); typedef int (*ListFontsFunc) (void *client, FontPathElementPtr fpe, const char* pat, int len, int max, FontNamesPtr names); typedef int (*StartLfwiFunc) (void *client, FontPathElementPtr fpe, const char* pat, int len, int max, void ** privatep); typedef int (*NextLfwiFunc) (void *client, FontPathElementPtr fpe, char** name, int* namelen, FontInfoPtr* info, int* numFonts, void *private); typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe, unsigned long* LastSelectMask); typedef void (*ClientDiedFunc) (void *client, FontPathElementPtr fpe); typedef int (*LoadGlyphsFunc) (void *client, FontPtr pfont, Bool range_flag, unsigned int nchars, int item_size, unsigned char* data); typedef int (*StartLaFunc) (void *client, FontPathElementPtr fpe, const char* pat, int len, int max, void ** privatep); typedef int (*NextLaFunc) (void *client, FontPathElementPtr fpe, char** namep, int* namelenp, char** resolvedp, int* resolvedlenp, void *private); typedef void (*SetPathFunc)(void); typedef struct _FPEFunctions { NameCheckFunc name_check; InitFpeFunc init_fpe; ResetFpeFunc reset_fpe; FreeFpeFunc free_fpe; OpenFontFunc open_font; CloseFontFunc close_font; ListFontsFunc list_fonts; StartLaFunc start_list_fonts_and_aliases; NextLaFunc list_next_font_or_alias; StartLfwiFunc start_list_fonts_with_info; NextLfwiFunc list_next_font_with_info; WakeupFpeFunc wakeup_fpe; ClientDiedFunc client_died; /* for load_glyphs, range_flag = 0 -> nchars = # of characters in data item_size = bytes/char data = list of characters range_flag = 1 -> nchars = # of fsChar2b's in data item_size is ignored data = list of fsChar2b's */ LoadGlyphsFunc load_glyphs; SetPathFunc set_path_hook; } FPEFunctionsRec, FPEFunctions; /* * Various macros for computing values based on contents of * the above structures */ #define GLYPHWIDTHPIXELS(pci) \ ((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing) #define GLYPHHEIGHTPIXELS(pci) \ ((pci)->metrics.ascent + (pci)->metrics.descent) #define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3) #define GLYPHWIDTHPADDED(bc) (((bc)+7) & ~0x7) #define BYTES_PER_ROW(bits, nbytes) \ ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \ :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \ :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \ :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \ : 0) #define BYTES_FOR_GLYPH(ci,pad) (GLYPHHEIGHTPIXELS(ci) * \ BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad)) /* * Macros for computing different bounding boxes for fonts; from * the font protocol */ #define FONT_MAX_ASCENT(pi) ((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \ (pi)->fontAscent : (pi)->ink_maxbounds.ascent) #define FONT_MAX_DESCENT(pi) ((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \ (pi)->fontDescent : (pi)->ink_maxbounds.descent) #define FONT_MAX_HEIGHT(pi) (FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi)) #define FONT_MIN_LEFT(pi) ((pi)->ink_minbounds.leftSideBearing < 0 ? \ (pi)->ink_minbounds.leftSideBearing : 0) #define FONT_MAX_RIGHT(pi) ((pi)->ink_maxbounds.rightSideBearing > \ (pi)->ink_maxbounds.characterWidth ? \ (pi)->ink_maxbounds.rightSideBearing : \ (pi)->ink_maxbounds.characterWidth) #define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi)) #include "fontproto.h" #endif /* FONTSTR_H */ PKZ/VMMX11/fonts/FSproto.hnu[/* Copyright 1990, 1991, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of Network Computing Devices, or Digital * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. * * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ #ifndef _FS_PROTO_H_ #define _FS_PROTO_H_ #include #define sz_fsPropOffset 20 #define sz_fsPropInfo 8 #define sz_fsResolution 6 #define sz_fsChar2b 2 #define sz_fsChar2b_version1 2 #define sz_fsOffset32 8 #define sz_fsRange 4 #define sz_fsXCharInfo 12 #define sz_fsXFontInfoHeader 40 #define sz_fsConnClientPrefix 8 #define sz_fsConnSetup 12 #define sz_fsConnSetupExtra 8 #define sz_fsConnSetupAccept 12 /* request sizes */ #define sz_fsReq 4 #define sz_fsListExtensionsReq 4 #define sz_fsResourceReq 8 #define sz_fsNoopReq 4 #define sz_fsListExtensionReq 4 #define sz_fsQueryExtensionReq 4 #define sz_fsListCataloguesReq 12 #define sz_fsSetCataloguesReq 4 #define sz_fsGetCataloguesReq 4 #define sz_fsSetEventMaskReq 8 #define sz_fsGetEventMaskReq 4 #define sz_fsCreateACReq 8 #define sz_fsFreeACReq 8 #define sz_fsSetAuthorizationReq 8 #define sz_fsSetResolutionReq 4 #define sz_fsGetResolutionReq 4 #define sz_fsListFontsReq 12 #define sz_fsListFontsWithXInfoReq 12 #define sz_fsOpenBitmapFontReq 16 #define sz_fsQueryXInfoReq 8 #define sz_fsQueryXExtents8Req 12 #define sz_fsQueryXExtents16Req 12 #define sz_fsQueryXBitmaps8Req 16 #define sz_fsQueryXBitmaps16Req 16 #define sz_fsCloseReq 8 /* reply sizes */ #define sz_fsReply 8 #define sz_fsGenericReply 8 #define sz_fsListExtensionsReply 8 #define sz_fsQueryExtensionReply 20 #define sz_fsListCataloguesReply 16 #define sz_fsGetCataloguesReply 8 #define sz_fsGetEventMaskReply 12 #define sz_fsCreateACReply 12 #define sz_fsGetResolutionReply 8 #define sz_fsListFontsReply 16 #define sz_fsListFontsWithXInfoReply (12 + sz_fsXFontInfoHeader) #define sz_fsOpenBitmapFontReply 16 #define sz_fsQueryXInfoReply (8 + sz_fsXFontInfoHeader) #define sz_fsQueryXExtents8Reply 12 #define sz_fsQueryXExtents16Reply 12 #define sz_fsQueryXBitmaps8Reply 20 #define sz_fsQueryXBitmaps16Reply 20 #define sz_fsError 16 #define sz_fsEvent 12 #define sz_fsKeepAliveEvent 12 #define fsTrue 1 #define fsFalse 0 /* temp decls */ #define Mask CARD32 #define Font CARD32 #define AccContext CARD32 typedef CARD32 fsTimestamp; #ifdef NOTDEF /* in fsmasks.h */ typedef CARD32 fsBitmapFormat; typedef CARD32 fsBitmapFormatMask; #endif #define sz_fsBitmapFormat 4 typedef struct { INT16 left, right; INT16 width; INT16 ascent, descent; CARD16 attributes; } fsXCharInfo; typedef struct { CARD8 high; CARD8 low; } fsChar2b; typedef struct { CARD8 low; CARD8 high; } fsChar2b_version1; typedef struct { CARD8 min_char_high; CARD8 min_char_low; CARD8 max_char_high; CARD8 max_char_low; } fsRange; typedef struct { CARD32 position; CARD32 length; } fsOffset32; typedef struct { fsOffset32 name; fsOffset32 value; CARD8 type; BYTE pad0; CARD16 pad1; } fsPropOffset; typedef struct { CARD32 num_offsets; CARD32 data_len; /* offsets */ /* data */ } fsPropInfo; typedef struct { CARD16 x_resolution; CARD16 y_resolution; CARD16 point_size; } fsResolution; typedef struct { CARD32 flags; CARD8 char_range_min_char_high; CARD8 char_range_min_char_low; CARD8 char_range_max_char_high; CARD8 char_range_max_char_low; CARD8 draw_direction; CARD8 pad; CARD8 default_char_high; CARD8 default_char_low; INT16 min_bounds_left; INT16 min_bounds_right; INT16 min_bounds_width; INT16 min_bounds_ascent; INT16 min_bounds_descent; CARD16 min_bounds_attributes; INT16 max_bounds_left; INT16 max_bounds_right; INT16 max_bounds_width; INT16 max_bounds_ascent; INT16 max_bounds_descent; CARD16 max_bounds_attributes; INT16 font_ascent; INT16 font_descent; /* propinfo */ } fsXFontInfoHeader; /* requests */ typedef struct { BYTE byteOrder; CARD8 num_auths; CARD16 major_version; CARD16 minor_version; CARD16 auth_len; /* auth data */ } fsConnClientPrefix; typedef struct { CARD16 status; CARD16 major_version; CARD16 minor_version; CARD8 num_alternates; CARD8 auth_index; CARD16 alternate_len; CARD16 auth_len; /* alternates */ /* auth data */ } fsConnSetup; typedef struct { CARD32 length; CARD16 status; CARD16 pad; /* more auth data */ } fsConnSetupExtra; typedef struct { CARD32 length; CARD16 max_request_len; CARD16 vendor_len; CARD32 release_number; /* vendor string */ } fsConnSetupAccept; typedef struct { CARD8 reqType; CARD8 data; CARD16 length; } fsReq; /* * The fsFakeReq structure is never used in the protocol; it is prepended * to incoming packets when setting up a connection so we can index * through InitialVector. To avoid alignment problems, it is padded * to the size of a word on the largest machine this code runs on. * Hence no sz_fsFakeReq constant is necessary. */ typedef struct { CARD8 reqType; CARD8 data; CARD16 length; CARD32 pad; /* to fill out to multiple of 64 bits */ } fsFakeReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Font id; } fsResourceReq; typedef fsReq fsNoopReq; typedef fsReq fsListExtensionsReq; typedef struct { CARD8 reqType; BYTE nbytes; CARD16 length; /* name */ } fsQueryExtensionReq; typedef struct { CARD8 reqType; CARD8 data; CARD16 length; CARD32 maxNames; CARD16 nbytes; CARD16 pad2; /* pattern */ } fsListCataloguesReq; typedef struct { CARD8 reqType; BYTE num_catalogues; CARD16 length; /* catalogues */ } fsSetCataloguesReq; typedef fsReq fsGetCataloguesReq; typedef struct { CARD8 reqType; CARD8 ext_opcode; CARD16 length; Mask event_mask; } fsSetEventMaskReq; typedef struct { CARD8 reqType; CARD8 ext_opcode; CARD16 length; } fsGetEventMaskReq; typedef struct { CARD8 reqType; BYTE num_auths; CARD16 length; AccContext acid; /* auth protocols */ } fsCreateACReq; typedef fsResourceReq fsFreeACReq; typedef fsResourceReq fsSetAuthorizationReq; typedef struct { CARD8 reqType; BYTE num_resolutions; CARD16 length; /* resolutions */ } fsSetResolutionReq; typedef fsReq fsGetResolutionReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; CARD32 maxNames; CARD16 nbytes; CARD16 pad2; /* pattern */ } fsListFontsReq; typedef fsListFontsReq fsListFontsWithXInfoReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length; Font fid; fsBitmapFormatMask format_mask; fsBitmapFormat format_hint; /* pattern */ } fsOpenBitmapFontReq; typedef fsResourceReq fsQueryXInfoReq; typedef struct { CARD8 reqType; BOOL range; CARD16 length; Font fid; CARD32 num_ranges; /* list of chars */ } fsQueryXExtents8Req; typedef fsQueryXExtents8Req fsQueryXExtents16Req; typedef struct { CARD8 reqType; BOOL range; CARD16 length; Font fid; fsBitmapFormat format; CARD32 num_ranges; /* list of chars */ } fsQueryXBitmaps8Req; typedef fsQueryXBitmaps8Req fsQueryXBitmaps16Req; typedef fsResourceReq fsCloseReq; /* replies */ typedef struct { BYTE type; BYTE data1; CARD16 sequenceNumber; CARD32 length; } fsGenericReply; typedef struct { BYTE type; CARD8 nExtensions; CARD16 sequenceNumber; CARD32 length; /* extension names */ } fsListExtensionsReply; typedef struct { BYTE type; CARD8 present; CARD16 sequenceNumber; CARD32 length; CARD16 major_version; CARD16 minor_version; CARD8 major_opcode; CARD8 first_event; CARD8 num_events; CARD8 first_error; CARD8 num_errors; CARD8 pad1; CARD16 pad2; } fsQueryExtensionReply; typedef struct { BYTE type; BYTE pad; CARD16 sequenceNumber; CARD32 length; CARD32 num_replies; CARD32 num_catalogues; /* catalog names */ } fsListCataloguesReply; typedef struct { BYTE type; CARD8 num_catalogues; CARD16 sequenceNumber; CARD32 length; /* catalogue names */ } fsGetCataloguesReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 event_mask; } fsGetEventMaskReply; typedef struct { BYTE type; CARD8 auth_index; CARD16 sequenceNumber; CARD32 length; CARD16 status; CARD16 pad; /* auth data */ } fsCreateACReply; typedef struct { CARD32 length; CARD16 status; CARD16 pad; /* auth data */ } fsCreateACExtraReply; typedef struct { BYTE type; CARD8 num_resolutions; CARD16 sequenceNumber; CARD32 length; /* resolutions */ } fsGetResolutionReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber; CARD32 length; CARD32 following; CARD32 nFonts; /* font names */ } fsListFontsReply; /* * this one is messy. the reply itself is variable length (unknown * number of replies) and the contents of each is variable (unknown * number of properties) * */ typedef struct { BYTE type; CARD8 nameLength; /* 0 is end-of-reply */ CARD16 sequenceNumber; CARD32 length; CARD32 nReplies; CARD32 font_header_flags; CARD8 font_hdr_char_range_min_char_high; CARD8 font_hdr_char_range_min_char_low; CARD8 font_hdr_char_range_max_char_high; CARD8 font_hdr_char_range_max_char_low; CARD8 font_header_draw_direction; CARD8 font_header_pad; CARD8 font_header_default_char_high; CARD8 font_header_default_char_low; INT16 font_header_min_bounds_left; INT16 font_header_min_bounds_right; INT16 font_header_min_bounds_width; INT16 font_header_min_bounds_ascent; INT16 font_header_min_bounds_descent; CARD16 font_header_min_bounds_attributes; INT16 font_header_max_bounds_left; INT16 font_header_max_bounds_right; INT16 font_header_max_bounds_width; INT16 font_header_max_bounds_ascent; INT16 font_header_max_bounds_descent; CARD16 font_header_max_bounds_attributes; INT16 font_header_font_ascent; INT16 font_header_font_descent; /* propinfo */ /* name */ } fsListFontsWithXInfoReply; typedef struct { BYTE type; CARD8 otherid_valid; CARD16 sequenceNumber; CARD32 length; CARD32 otherid; BYTE cachable; BYTE pad1; CARD16 pad2; } fsOpenBitmapFontReply; typedef struct { BYTE type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 font_header_flags; CARD8 font_hdr_char_range_min_char_high; CARD8 font_hdr_char_range_min_char_low; CARD8 font_hdr_char_range_max_char_high; CARD8 font_hdr_char_range_max_char_low; CARD8 font_header_draw_direction; CARD8 font_header_pad; CARD8 font_header_default_char_high; CARD8 font_header_default_char_low; INT16 font_header_min_bounds_left; INT16 font_header_min_bounds_right; INT16 font_header_min_bounds_width; INT16 font_header_min_bounds_ascent; INT16 font_header_min_bounds_descent; CARD16 font_header_min_bounds_attributes; INT16 font_header_max_bounds_left; INT16 font_header_max_bounds_right; INT16 font_header_max_bounds_width; INT16 font_header_max_bounds_ascent; INT16 font_header_max_bounds_descent; CARD16 font_header_max_bounds_attributes; INT16 font_header_font_ascent; INT16 font_header_font_descent; /* propinfo */ } fsQueryXInfoReply; typedef struct { BYTE type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 num_extents; /* extents */ } fsQueryXExtents8Reply; typedef fsQueryXExtents8Reply fsQueryXExtents16Reply; typedef struct { BYTE type; CARD8 pad0; CARD16 sequenceNumber; CARD32 length; CARD32 replies_hint; CARD32 num_chars; CARD32 nbytes; /* offsets */ /* glyphs */ } fsQueryXBitmaps8Reply; typedef fsQueryXBitmaps8Reply fsQueryXBitmaps16Reply; typedef union { fsGenericReply generic; fsListExtensionsReply extensions; fsGetResolutionReply getres; } fsReply; /* errors */ typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; } fsError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; } fsRequestError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; fsBitmapFormat format; } fsFormatError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; Font fontid; } fsFontError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; fsRange range; } fsRangeError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; Mask event_mask; } fsEventMaskError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; AccContext acid; } fsAccessContextError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; Font fontid; } fsIDChoiceError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; } fsNameError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; fsResolution resolution; } fsResolutionError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; } fsAllocError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; CARD32 bad_length; } fsLengthError; typedef struct { BYTE type; BYTE request; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; CARD8 major_opcode; CARD8 minor_opcode; CARD16 pad; } fsImplementationError; /* events */ typedef struct { BYTE type; BYTE event_code; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; } fsKeepAliveEvent; typedef struct { BYTE type; BYTE event_code; CARD16 sequenceNumber; CARD32 length; fsTimestamp timestamp; BOOL added; BOOL deleted; CARD16 pad; } fsCatalogueChangeNotifyEvent; typedef fsCatalogueChangeNotifyEvent fsFontChangeNotifyEvent; typedef fsCatalogueChangeNotifyEvent fsEvent; /* reply codes */ #define FS_Reply 0 /* normal reply */ #define FS_Error 1 /* error */ #define FS_Event 2 /* request codes */ #define FS_Noop 0 #define FS_ListExtensions 1 #define FS_QueryExtension 2 #define FS_ListCatalogues 3 #define FS_SetCatalogues 4 #define FS_GetCatalogues 5 #define FS_SetEventMask 6 #define FS_GetEventMask 7 #define FS_CreateAC 8 #define FS_FreeAC 9 #define FS_SetAuthorization 10 #define FS_SetResolution 11 #define FS_GetResolution 12 #define FS_ListFonts 13 #define FS_ListFontsWithXInfo 14 #define FS_OpenBitmapFont 15 #define FS_QueryXInfo 16 #define FS_QueryXExtents8 17 #define FS_QueryXExtents16 18 #define FS_QueryXBitmaps8 19 #define FS_QueryXBitmaps16 20 #define FS_CloseFont 21 /* restore decls */ #undef Mask #undef Font #undef AccContext #endif /* _FS_PROTO_H_ */ PKZTcX11/fonts/fsmasks.hnu[/* * Copyright 1990, 1991 Network Computing Devices; * Portions Copyright 1987 by Digital Equipment Corporation * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of Network Computing Devices or Digital * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. * Network Computing Devices and Digital make no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES * OR DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ /* Portions Copyright 1987, 1994, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * masks & values used by the font lib and the font server */ #ifndef _FSMASKS_H_ #define _FSMASKS_H_ #include /* font format macros */ #define BitmapFormatByteOrderMask (1L << 0) #define BitmapFormatBitOrderMask (1L << 1) #define BitmapFormatImageRectMask (3L << 2) #define BitmapFormatScanlinePadMask (3L << 8) #define BitmapFormatScanlineUnitMask (3L << 12) #define BitmapFormatByteOrderLSB (0) #define BitmapFormatByteOrderMSB (1L << 0) #define BitmapFormatBitOrderLSB (0) #define BitmapFormatBitOrderMSB (1L << 1) #define BitmapFormatImageRectMin (0L << 2) #define BitmapFormatImageRectMaxWidth (1L << 2) #define BitmapFormatImageRectMax (2L << 2) #define BitmapFormatScanlinePad8 (0L << 8) #define BitmapFormatScanlinePad16 (1L << 8) #define BitmapFormatScanlinePad32 (2L << 8) #define BitmapFormatScanlinePad64 (3L << 8) #define BitmapFormatScanlineUnit8 (0L << 12) #define BitmapFormatScanlineUnit16 (1L << 12) #define BitmapFormatScanlineUnit32 (2L << 12) #define BitmapFormatScanlineUnit64 (3L << 12) #define BitmapFormatMaskByte (1L << 0) #define BitmapFormatMaskBit (1L << 1) #define BitmapFormatMaskImageRectangle (1L << 2) #define BitmapFormatMaskScanLinePad (1L << 3) #define BitmapFormatMaskScanLineUnit (1L << 4) typedef CARD32 fsBitmapFormat; typedef CARD32 fsBitmapFormatMask; #endif /* _FSMASKS_H_ */ PKZ-$X11/Xwinsock.hnu[/* Copyright 1996, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL- ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ /* * This header file has for sole purpose to allow to include winsock.h * without getting any name conflicts with our code. * Conflicts come from the fact that including winsock.h actually pulls * in the whole Windows API... */ #undef _XFree86Server #ifdef XFree86Server # define _XFree86Server # undef XFree86Server #endif /* * mingw-w64 headers define BOOL as a typedef, protecting against macros * mingw.org headers define BOOL in terms of WINBOOL * ... so try to come up with something which works with both :-) */ #define _NO_BOOL_TYPEDEF #define BOOL WINBOOL #define INT32 wINT32 #undef Status #define Status wStatus #define ATOM wATOM #define BYTE wBYTE #define FreeResource wFreeResource #include #undef Status #define Status int #undef BYTE #undef BOOL #undef INT32 #undef ATOM #undef FreeResource #undef CreateWindowA #undef RT_FONT #undef RT_CURSOR /* * Older version of this header used to name the windows API bool type wBOOL, * rather than more standard name WINBOOL */ #define wBOOL WINBOOL #ifdef _XFree86Server # define XFree86Server # undef _XFree86Server #endif PKZB|ܫregexp.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _REGEXP_H #define _REGEXP_H 1 /* The contents of this header file were originally standardized in the Single Unix Specification, Issue 3 (1992). In Issue 4 (1994) the header was marked as TO BE WITHDRAWN, and new applications were encouraged to use instead. It was officially withdrawn from the standard in Issue 6 (aka POSIX.1-2001). The GNU C Library provided this header through version 2.22. */ #error "The GNU C Library no longer implements ." #error "Please update your code to use instead (no trailing 'p')." #endif /* regexp.h */ PKZ2o o netrose/rose.hnu[/* Definitions for Rose packet radio address family. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* What follows is copied from the 2.1.93 . */ #ifndef _NETROSE_ROSE_H #define _NETROSE_ROSE_H 1 #include #include /* Socket level values. */ #define SOL_ROSE 260 /* These are the public elements of the Linux kernel Rose implementation. For kernel AX.25 see the file ax25.h. This file requires ax25.h for the definition of the ax25_address structure. */ #define ROSE_MTU 251 #define ROSE_MAX_DIGIS 6 #define ROSE_DEFER 1 #define ROSE_T1 2 #define ROSE_T2 3 #define ROSE_T3 4 #define ROSE_IDLE 5 #define ROSE_QBITINCL 6 #define ROSE_HOLDBACK 7 #define SIOCRSGCAUSE (SIOCPROTOPRIVATE + 0) #define SIOCRSSCAUSE (SIOCPROTOPRIVATE + 1) #define SIOCRSL2CALL (SIOCPROTOPRIVATE + 2) #define SIOCRSSL2CALL (SIOCPROTOPRIVATE + 2) #define SIOCRSACCEPT (SIOCPROTOPRIVATE + 3) #define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4) #define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5) #define SIOCRSGFACILITIES (SIOCPROTOPRIVATE + 6) #define ROSE_DTE_ORIGINATED 0x00 #define ROSE_NUMBER_BUSY 0x01 #define ROSE_INVALID_FACILITY 0x03 #define ROSE_NETWORK_CONGESTION 0x05 #define ROSE_OUT_OF_ORDER 0x09 #define ROSE_ACCESS_BARRED 0x0B #define ROSE_NOT_OBTAINABLE 0x0D #define ROSE_REMOTE_PROCEDURE 0x11 #define ROSE_LOCAL_PROCEDURE 0x13 #define ROSE_SHIP_ABSENT 0x39 typedef struct { char rose_addr[5]; } rose_address; struct sockaddr_rose { sa_family_t srose_family; rose_address srose_addr; ax25_address srose_call; int srose_ndigis; ax25_address srose_digi; }; struct full_sockaddr_rose { sa_family_t srose_family; rose_address srose_addr; ax25_address srose_call; unsigned int srose_ndigis; ax25_address srose_digis[ROSE_MAX_DIGIS]; }; struct rose_route_struct { rose_address address; unsigned short int mask; ax25_address neighbour; char device[16]; unsigned char ndigis; ax25_address digipeaters[AX25_MAX_DIGIS]; }; struct rose_cause_struct { unsigned char cause; unsigned char diagnostic; }; struct rose_facilities_struct { rose_address source_addr, dest_addr; ax25_address source_call, dest_call; unsigned char source_ndigis, dest_ndigis; ax25_address source_digis[ROSE_MAX_DIGIS]; ax25_address dest_digis[ROSE_MAX_DIGIS]; unsigned int rand; rose_address fail_addr; ax25_address fail_call; }; #endif /* netrose/rose.h */ PKZB //asm-generic/fcntl.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_FCNTL_H #define _ASM_GENERIC_FCNTL_H #include /* * FMODE_EXEC is 0x20 * FMODE_NONOTIFY is 0x4000000 * These cannot be used by userspace O_* until internal and external open * flags are split. * -Eric Paris */ /* * When introducing new O_* bits, please check its uniqueness in fcntl_init(). */ #define O_ACCMODE 00000003 #define O_RDONLY 00000000 #define O_WRONLY 00000001 #define O_RDWR 00000002 #ifndef O_CREAT #define O_CREAT 00000100 /* not fcntl */ #endif #ifndef O_EXCL #define O_EXCL 00000200 /* not fcntl */ #endif #ifndef O_NOCTTY #define O_NOCTTY 00000400 /* not fcntl */ #endif #ifndef O_TRUNC #define O_TRUNC 00001000 /* not fcntl */ #endif #ifndef O_APPEND #define O_APPEND 00002000 #endif #ifndef O_NONBLOCK #define O_NONBLOCK 00004000 #endif #ifndef O_DSYNC #define O_DSYNC 00010000 /* used to be O_SYNC, see below */ #endif #ifndef FASYNC #define FASYNC 00020000 /* fcntl, for BSD compatibility */ #endif #ifndef O_DIRECT #define O_DIRECT 00040000 /* direct disk access hint */ #endif #ifndef O_LARGEFILE #define O_LARGEFILE 00100000 #endif #ifndef O_DIRECTORY #define O_DIRECTORY 00200000 /* must be a directory */ #endif #ifndef O_NOFOLLOW #define O_NOFOLLOW 00400000 /* don't follow links */ #endif #ifndef O_NOATIME #define O_NOATIME 01000000 #endif #ifndef O_CLOEXEC #define O_CLOEXEC 02000000 /* set close_on_exec */ #endif /* * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using * the O_SYNC flag. We continue to use the existing numerical value * for O_DSYNC semantics now, but using the correct symbolic name for it. * This new value is used to request true Posix O_SYNC semantics. It is * defined in this strange way to make sure applications compiled against * new headers get at least O_DSYNC semantics on older kernels. * * This has the nice side-effect that we can simply test for O_DSYNC * wherever we do not care if O_DSYNC or O_SYNC is used. * * Note: __O_SYNC must never be used directly. */ #ifndef O_SYNC #define __O_SYNC 04000000 #define O_SYNC (__O_SYNC|O_DSYNC) #endif #ifndef O_PATH #define O_PATH 010000000 #endif #ifndef __O_TMPFILE #define __O_TMPFILE 020000000 #endif /* a horrid kludge trying to make sure that this will fail on old kernels */ #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) #define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) #ifndef O_NDELAY #define O_NDELAY O_NONBLOCK #endif #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get close_on_exec */ #define F_SETFD 2 /* set/clear close_on_exec */ #define F_GETFL 3 /* get file->f_flags */ #define F_SETFL 4 /* set file->f_flags */ #ifndef F_GETLK #define F_GETLK 5 #define F_SETLK 6 #define F_SETLKW 7 #endif #ifndef F_SETOWN #define F_SETOWN 8 /* for sockets. */ #define F_GETOWN 9 /* for sockets. */ #endif #ifndef F_SETSIG #define F_SETSIG 10 /* for sockets. */ #define F_GETSIG 11 /* for sockets. */ #endif #ifndef CONFIG_64BIT #ifndef F_GETLK64 #define F_GETLK64 12 /* using 'struct flock64' */ #define F_SETLK64 13 #define F_SETLKW64 14 #endif #endif #ifndef F_SETOWN_EX #define F_SETOWN_EX 15 #define F_GETOWN_EX 16 #endif #ifndef F_GETOWNER_UIDS #define F_GETOWNER_UIDS 17 #endif /* * Open File Description Locks * * Usually record locks held by a process are released on *any* close and are * not inherited across a fork(). * * These cmd values will set locks that conflict with process-associated * record locks, but are "owned" by the open file description, not the * process. This means that they are inherited across fork() like BSD (flock) * locks, and they are only released automatically when the last reference to * the the open file against which they were acquired is put. */ #define F_OFD_GETLK 36 #define F_OFD_SETLK 37 #define F_OFD_SETLKW 38 #define F_OWNER_TID 0 #define F_OWNER_PID 1 #define F_OWNER_PGRP 2 struct f_owner_ex { int type; __kernel_pid_t pid; }; /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ /* for posix fcntl() and lockf() */ #ifndef F_RDLCK #define F_RDLCK 0 #define F_WRLCK 1 #define F_UNLCK 2 #endif /* for old implementation of bsd flock () */ #ifndef F_EXLCK #define F_EXLCK 4 /* or 3 */ #define F_SHLCK 8 /* or 4 */ #endif /* operations for bsd flock(), also used by the kernel implementation */ #define LOCK_SH 1 /* shared lock */ #define LOCK_EX 2 /* exclusive lock */ #define LOCK_NB 4 /* or'd with one of the above to prevent blocking */ #define LOCK_UN 8 /* remove lock */ #define LOCK_MAND 32 /* This is a mandatory flock ... */ #define LOCK_READ 64 /* which allows concurrent read operations */ #define LOCK_WRITE 128 /* which allows concurrent write operations */ #define LOCK_RW 192 /* which allows concurrent read & write ops */ #define F_LINUX_SPECIFIC_BASE 1024 #ifndef HAVE_ARCH_STRUCT_FLOCK #ifndef __ARCH_FLOCK_PAD #define __ARCH_FLOCK_PAD #endif struct flock { short l_type; short l_whence; __kernel_off_t l_start; __kernel_off_t l_len; __kernel_pid_t l_pid; __ARCH_FLOCK_PAD }; #endif #ifndef HAVE_ARCH_STRUCT_FLOCK64 #ifndef __ARCH_FLOCK64_PAD #define __ARCH_FLOCK64_PAD #endif struct flock64 { short l_type; short l_whence; __kernel_loff_t l_start; __kernel_loff_t l_len; __kernel_pid_t l_pid; __ARCH_FLOCK64_PAD }; #endif #endif /* _ASM_GENERIC_FCNTL_H */ PKZ0C asm-generic/ioctl.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_IOCTL_H #define _ASM_GENERIC_IOCTL_H /* ioctl command encoding: 32 bits total, command in lower 16 bits, * size of the parameter structure in the lower 14 bits of the * upper 16 bits. * Encoding the size of the parameter structure in the ioctl request * is useful for catching programs compiled with old versions * and to avoid overwriting user space outside the user buffer area. * The highest 2 bits are reserved for indicating the ``access mode''. * NOTE: This limits the max parameter size to 16kB -1 ! */ /* * The following is for compatibility across the various Linux * platforms. The generic ioctl numbering scheme doesn't really enforce * a type field. De facto, however, the top 8 bits of the lower 16 * bits are indeed used as a type field, so we might just as well make * this explicit here. Please be sure to use the decoding macros * below from now on. */ #define _IOC_NRBITS 8 #define _IOC_TYPEBITS 8 /* * Let any architecture override either of the following before * including this file. */ #ifndef _IOC_SIZEBITS # define _IOC_SIZEBITS 14 #endif #ifndef _IOC_DIRBITS # define _IOC_DIRBITS 2 #endif #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) #define _IOC_NRSHIFT 0 #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) /* * Direction bits, which any architecture can choose to override * before including this file. * * NOTE: _IOC_WRITE means userland is writing and kernel is * reading. _IOC_READ means userland is reading and kernel is writing. */ #ifndef _IOC_NONE # define _IOC_NONE 0U #endif #ifndef _IOC_WRITE # define _IOC_WRITE 1U #endif #ifndef _IOC_READ # define _IOC_READ 2U #endif #define _IOC(dir,type,nr,size) \ (((dir) << _IOC_DIRSHIFT) | \ ((type) << _IOC_TYPESHIFT) | \ ((nr) << _IOC_NRSHIFT) | \ ((size) << _IOC_SIZESHIFT)) #define _IOC_TYPECHECK(t) (sizeof(t)) /* * Used to create numbers. * * NOTE: _IOW means userland is writing and kernel is reading. _IOR * means userland is reading and kernel is writing. */ #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) /* used to decode ioctl numbers.. */ #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) /* ...and for the drivers/sound files... */ #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) #endif /* _ASM_GENERIC_IOCTL_H */ PKZ:xasm-generic/sockios.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SOCKIOS_H #define __ASM_GENERIC_SOCKIOS_H /* Socket-level I/O control calls. */ #define FIOSETOWN 0x8901 #define SIOCSPGRP 0x8902 #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ #endif /* __ASM_GENERIC_SOCKIOS_H */ PKZYPLasm-generic/sembuf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SEMBUF_H #define __ASM_GENERIC_SEMBUF_H #include /* * The semid64_ds structure for x86 architecture. * Note extra padding because this structure is passed back and forth * between kernel and user space. * * semid64_ds was originally meant to be architecture specific, but * everyone just ended up making identical copies without specific * optimizations, so we may just as well all use the same one. * * 64 bit architectures use a 64-bit __kernel_time_t here, while * 32 bit architectures have a pair of unsigned long values. * so they do not need the first two padding words. * * On big-endian systems, the padding is in the wrong place for * historic reasons, so user space has to reconstruct a time_t * value using * * user_semid_ds.sem_otime = kernel_semid64_ds.sem_otime + * ((long long)kernel_semid64_ds.sem_otime_high << 32) * * Pad space is left for 2 miscellaneous 32-bit values */ struct semid64_ds { struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ #if __BITS_PER_LONG == 64 __kernel_time_t sem_otime; /* last semop time */ __kernel_time_t sem_ctime; /* last change time */ #else unsigned long sem_otime; /* last semop time */ unsigned long sem_otime_high; unsigned long sem_ctime; /* last change time */ unsigned long sem_ctime_high; #endif unsigned long sem_nsems; /* no. of semaphores in array */ unsigned long __unused3; unsigned long __unused4; }; #endif /* __ASM_GENERIC_SEMBUF_H */ PKZ¯"asm-generic/shmparam.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SHMPARAM_H #define __ASM_GENERIC_SHMPARAM_H #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ #endif /* _ASM_GENERIC_SHMPARAM_H */ PKZVE/00asm-generic/siginfo.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_SIGINFO_H #define _ASM_GENERIC_SIGINFO_H #include typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; #define SI_MAX_SIZE 128 /* * The default "si_band" type is "long", as specified by POSIX. * However, some architectures want to override this to "int" * for historical compatibility reasons, so we allow that. */ #ifndef __ARCH_SI_BAND_T #define __ARCH_SI_BAND_T long #endif #ifndef __ARCH_SI_CLOCK_T #define __ARCH_SI_CLOCK_T __kernel_clock_t #endif #ifndef __ARCH_SI_ATTRIBUTES #define __ARCH_SI_ATTRIBUTES #endif /* * RHEL8: The old and new siginfo structures have the same offsets for * their fields. They are just constructed in different ways. */ #ifdef __GENKSYMS__ #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) #define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) typedef struct siginfo { int si_signo; #ifndef __ARCH_HAS_SWAPPED_SIGINFO int si_errno; int si_code; #else int si_code; int si_errno; #endif union { int _pad[SI_PAD_SIZE]; /* kill() */ struct { __kernel_pid_t _pid; /* sender's pid */ __kernel_uid32_t _uid; /* sender's uid */ } _kill; /* POSIX.1b timers */ struct { __kernel_timer_t _tid; /* timer id */ int _overrun; /* overrun count */ sigval_t _sigval; /* same as below */ int _sys_private; /* not to be passed to user */ } _timer; /* POSIX.1b signals */ struct { __kernel_pid_t _pid; /* sender's pid */ __kernel_uid32_t _uid; /* sender's uid */ sigval_t _sigval; } _rt; /* SIGCHLD */ struct { __kernel_pid_t _pid; /* which child */ __kernel_uid32_t _uid; /* sender's uid */ int _status; /* exit code */ __ARCH_SI_CLOCK_T _utime; __ARCH_SI_CLOCK_T _stime; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ struct { void *_addr; /* faulting insn/memory ref. */ #ifdef __ARCH_SI_TRAPNO int _trapno; /* TRAP # which caused the signal */ #endif #ifdef __ia64__ int _imm; /* immediate value for "break" */ unsigned int _flags; /* see ia64 si_flags */ unsigned long _isr; /* isr */ #endif #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ sizeof(short) : __alignof__(void *)) union { /* * used when si_code=BUS_MCEERR_AR or * used when si_code=BUS_MCEERR_AO */ short _addr_lsb; /* LSB of the reported address */ /* used when si_code=SEGV_BNDERR */ struct { char _dummy_bnd[__ADDR_BND_PKEY_PAD]; void *_lower; void *_upper; } _addr_bnd; /* used when si_code=SEGV_PKUERR */ struct { char _dummy_pkey[__ADDR_BND_PKEY_PAD]; __u32 _pkey; } _addr_pkey; }; } _sigfault; /* SIGPOLL */ struct { __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; /* SIGSYS */ struct { void *_call_addr; /* calling user insn */ int _syscall; /* triggering system call number */ unsigned int _arch; /* AUDIT_ARCH_* of syscall */ } _sigsys; } _sifields; } __ARCH_SI_ATTRIBUTES siginfo_t; #else /* __GENKSYMS__ */ union __sifields { /* kill() */ struct { __kernel_pid_t _pid; /* sender's pid */ __kernel_uid32_t _uid; /* sender's uid */ } _kill; /* POSIX.1b timers */ struct { __kernel_timer_t _tid; /* timer id */ int _overrun; /* overrun count */ sigval_t _sigval; /* same as below */ int _sys_private; /* not to be passed to user */ } _timer; /* POSIX.1b signals */ struct { __kernel_pid_t _pid; /* sender's pid */ __kernel_uid32_t _uid; /* sender's uid */ sigval_t _sigval; } _rt; /* SIGCHLD */ struct { __kernel_pid_t _pid; /* which child */ __kernel_uid32_t _uid; /* sender's uid */ int _status; /* exit code */ __ARCH_SI_CLOCK_T _utime; __ARCH_SI_CLOCK_T _stime; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */ struct { void *_addr; /* faulting insn/memory ref. */ #ifdef __ARCH_SI_TRAPNO int _trapno; /* TRAP # which caused the signal */ #endif #ifdef __ia64__ int _imm; /* immediate value for "break" */ unsigned int _flags; /* see ia64 si_flags */ unsigned long _isr; /* isr */ #endif #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ sizeof(short) : __alignof__(void *)) union { /* * used when si_code=BUS_MCEERR_AR or * used when si_code=BUS_MCEERR_AO */ short _addr_lsb; /* LSB of the reported address */ /* used when si_code=SEGV_BNDERR */ struct { char _dummy_bnd[__ADDR_BND_PKEY_PAD]; void *_lower; void *_upper; } _addr_bnd; /* used when si_code=SEGV_PKUERR */ struct { char _dummy_pkey[__ADDR_BND_PKEY_PAD]; __u32 _pkey; } _addr_pkey; }; } _sigfault; /* SIGPOLL */ struct { __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; /* SIGSYS */ struct { void *_call_addr; /* calling user insn */ int _syscall; /* triggering system call number */ unsigned int _arch; /* AUDIT_ARCH_* of syscall */ } _sigsys; }; #ifndef __ARCH_HAS_SWAPPED_SIGINFO #define __SIGINFO \ struct { \ int si_signo; \ int si_errno; \ int si_code; \ union __sifields _sifields; \ } #else #define __SIGINFO \ struct { \ int si_signo; \ int si_code; \ int si_errno; \ union __sifields _sifields; \ } #endif /* __ARCH_HAS_SWAPPED_SIGINFO */ typedef struct siginfo { union { __SIGINFO; int _si_pad[SI_MAX_SIZE/sizeof(int)]; }; } __ARCH_SI_ATTRIBUTES siginfo_t; #endif /* __GENKSYMS__ */ /* * How these fields are to be accessed. */ #define si_pid _sifields._kill._pid #define si_uid _sifields._kill._uid #define si_tid _sifields._timer._tid #define si_overrun _sifields._timer._overrun #define si_sys_private _sifields._timer._sys_private #define si_status _sifields._sigchld._status #define si_utime _sifields._sigchld._utime #define si_stime _sifields._sigchld._stime #define si_value _sifields._rt._sigval #define si_int _sifields._rt._sigval.sival_int #define si_ptr _sifields._rt._sigval.sival_ptr #define si_addr _sifields._sigfault._addr #ifdef __ARCH_SI_TRAPNO #define si_trapno _sifields._sigfault._trapno #endif #define si_addr_lsb _sifields._sigfault._addr_lsb #define si_lower _sifields._sigfault._addr_bnd._lower #define si_upper _sifields._sigfault._addr_bnd._upper #define si_pkey _sifields._sigfault._addr_pkey._pkey #define si_band _sifields._sigpoll._band #define si_fd _sifields._sigpoll._fd #define si_call_addr _sifields._sigsys._call_addr #define si_syscall _sifields._sigsys._syscall #define si_arch _sifields._sigsys._arch /* * si_code values * Digital reserves positive values for kernel-generated signals. */ #define SI_USER 0 /* sent by kill, sigsend, raise */ #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ #define SI_QUEUE -1 /* sent by sigqueue */ #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ #define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_TKILL -6 /* sent by tkill system call */ #define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */ #define SI_ASYNCNL -60 /* sent by glibc async name lookup completion */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) /* * SIGILL si_codes */ #define ILL_ILLOPC 1 /* illegal opcode */ #define ILL_ILLOPN 2 /* illegal operand */ #define ILL_ILLADR 3 /* illegal addressing mode */ #define ILL_ILLTRP 4 /* illegal trap */ #define ILL_PRVOPC 5 /* privileged opcode */ #define ILL_PRVREG 6 /* privileged register */ #define ILL_COPROC 7 /* coprocessor error */ #define ILL_BADSTK 8 /* internal stack error */ #define ILL_BADIADDR 9 /* unimplemented instruction address */ #define __ILL_BREAK 10 /* illegal break */ #define __ILL_BNDMOD 11 /* bundle-update (modification) in progress */ #define NSIGILL 11 /* * SIGFPE si_codes */ #define FPE_INTDIV 1 /* integer divide by zero */ #define FPE_INTOVF 2 /* integer overflow */ #define FPE_FLTDIV 3 /* floating point divide by zero */ #define FPE_FLTOVF 4 /* floating point overflow */ #define FPE_FLTUND 5 /* floating point underflow */ #define FPE_FLTRES 6 /* floating point inexact result */ #define FPE_FLTINV 7 /* floating point invalid operation */ #define FPE_FLTSUB 8 /* subscript out of range */ #define __FPE_DECOVF 9 /* decimal overflow */ #define __FPE_DECDIV 10 /* decimal division by zero */ #define __FPE_DECERR 11 /* packed decimal error */ #define __FPE_INVASC 12 /* invalid ASCII digit */ #define __FPE_INVDEC 13 /* invalid decimal digit */ #define FPE_FLTUNK 14 /* undiagnosed floating-point exception */ #define FPE_CONDTRAP 15 /* trap on condition */ #define NSIGFPE 15 /* * SIGSEGV si_codes */ #define SEGV_MAPERR 1 /* address not mapped to object */ #define SEGV_ACCERR 2 /* invalid permissions for mapped object */ #define SEGV_BNDERR 3 /* failed address bound checks */ #ifdef __ia64__ # define __SEGV_PSTKOVF 4 /* paragraph stack overflow */ #else # define SEGV_PKUERR 4 /* failed protection key checks */ #endif #define SEGV_ACCADI 5 /* ADI not enabled for mapped object */ #define SEGV_ADIDERR 6 /* Disrupting MCD error */ #define SEGV_ADIPERR 7 /* Precise MCD exception */ #define NSIGSEGV 7 /* * SIGBUS si_codes */ #define BUS_ADRALN 1 /* invalid address alignment */ #define BUS_ADRERR 2 /* non-existent physical address */ #define BUS_OBJERR 3 /* object specific hardware error */ /* hardware memory error consumed on a machine check: action required */ #define BUS_MCEERR_AR 4 /* hardware memory error detected in process but not consumed: action optional*/ #define BUS_MCEERR_AO 5 #define NSIGBUS 5 /* * SIGTRAP si_codes */ #define TRAP_BRKPT 1 /* process breakpoint */ #define TRAP_TRACE 2 /* process trace trap */ #define TRAP_BRANCH 3 /* process taken branch trap */ #define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */ #define TRAP_UNK 5 /* undiagnosed trap */ #define NSIGTRAP 5 /* * There is an additional set of SIGTRAP si_codes used by ptrace * that are of the form: ((PTRACE_EVENT_XXX << 8) | SIGTRAP) */ /* * SIGCHLD si_codes */ #define CLD_EXITED 1 /* child has exited */ #define CLD_KILLED 2 /* child was killed */ #define CLD_DUMPED 3 /* child terminated abnormally */ #define CLD_TRAPPED 4 /* traced child has trapped */ #define CLD_STOPPED 5 /* child has stopped */ #define CLD_CONTINUED 6 /* stopped child has continued */ #define NSIGCHLD 6 /* * SIGPOLL (or any other signal without signal specific si_codes) si_codes */ #define POLL_IN 1 /* data input available */ #define POLL_OUT 2 /* output buffers available */ #define POLL_MSG 3 /* input message available */ #define POLL_ERR 4 /* i/o error */ #define POLL_PRI 5 /* high priority input available */ #define POLL_HUP 6 /* device disconnected */ #define NSIGPOLL 6 /* * SIGSYS si_codes */ #define SYS_SECCOMP 1 /* seccomp triggered */ #define NSIGSYS 1 /* * SIGEMT si_codes */ #define EMT_TAGOVF 1 /* tag overflow */ #define NSIGEMT 1 /* * sigevent definitions * * It seems likely that SIGEV_THREAD will have to be handled from * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the * thread manager then catches and does the appropriate nonsense. * However, everything is written out here so as to not get lost. */ #define SIGEV_SIGNAL 0 /* notify via signal */ #define SIGEV_NONE 1 /* other notification: meaningless */ #define SIGEV_THREAD 2 /* deliver via thread creation */ #define SIGEV_THREAD_ID 4 /* deliver to thread */ /* * This works because the alignment is ok on all current architectures * but we leave open this being overridden in the future */ #ifndef __ARCH_SIGEV_PREAMBLE_SIZE #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) #endif #define SIGEV_MAX_SIZE 64 #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \ / sizeof(int)) typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[SIGEV_PAD_SIZE]; int _tid; struct { void (*_function)(sigval_t); void *_attribute; /* really pthread_attr_t */ } _sigev_thread; } _sigev_un; } sigevent_t; #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute #define sigev_notify_thread_id _sigev_un._tid #endif /* _ASM_GENERIC_SIGINFO_H */ PKZ<asm-generic/swab.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_SWAB_H #define _ASM_GENERIC_SWAB_H #include /* * 32 bit architectures typically (but not always) want to * set __SWAB_64_THRU_32__. In user space, this is only * valid if the compiler supports 64 bit data types. */ #if __BITS_PER_LONG == 32 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) #define __SWAB_64_THRU_32__ #endif #endif #endif /* _ASM_GENERIC_SWAB_H */ PKZ3cRRasm-generic/msgbuf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_MSGBUF_H #define __ASM_GENERIC_MSGBUF_H #include /* * generic msqid64_ds structure. * * Note extra padding because this structure is passed back and forth * between kernel and user space. * * msqid64_ds was originally meant to be architecture specific, but * everyone just ended up making identical copies without specific * optimizations, so we may just as well all use the same one. * * 64 bit architectures typically define a 64 bit __kernel_time_t, * so they do not need the first three padding words. * On big-endian systems, the padding is in the wrong place. * * Pad space is left for: * - 2 miscellaneous 32-bit values */ struct msqid64_ds { struct ipc64_perm msg_perm; #if __BITS_PER_LONG == 64 __kernel_time_t msg_stime; /* last msgsnd time */ __kernel_time_t msg_rtime; /* last msgrcv time */ __kernel_time_t msg_ctime; /* last change time */ #else unsigned long msg_stime; /* last msgsnd time */ unsigned long msg_stime_high; unsigned long msg_rtime; /* last msgrcv time */ unsigned long msg_rtime_high; unsigned long msg_ctime; /* last change time */ unsigned long msg_ctime_high; #endif unsigned long msg_cbytes; /* current number of bytes on queue */ unsigned long msg_qnum; /* number of messages in queue */ unsigned long msg_qbytes; /* max number of bytes on queue */ __kernel_pid_t msg_lspid; /* pid of last msgsnd */ __kernel_pid_t msg_lrpid; /* last receive pid */ unsigned long __unused4; unsigned long __unused5; }; #endif /* __ASM_GENERIC_MSGBUF_H */ PKZs LLasm-generic/errno-base.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_ERRNO_BASE_H #define _ASM_GENERIC_ERRNO_BASE_H #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Argument list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Try again */ #define ENOMEM 12 /* Out of memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Device or resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument out of domain of func */ #define ERANGE 34 /* Math result not representable */ #endif PKZF/PPasm-generic/resource.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_RESOURCE_H #define _ASM_GENERIC_RESOURCE_H /* * Resource limit IDs * * ( Compatibility detail: there are architectures that have * a different rlimit ID order in the 5-9 range and want * to keep that order for binary compatibility. The reasons * are historic and all new rlimits are identical across all * arches. If an arch has such special order for some rlimits * then it defines them prior including asm-generic/resource.h. ) */ #define RLIMIT_CPU 0 /* CPU time in sec */ #define RLIMIT_FSIZE 1 /* Maximum filesize */ #define RLIMIT_DATA 2 /* max data size */ #define RLIMIT_STACK 3 /* max stack size */ #define RLIMIT_CORE 4 /* max core file size */ #ifndef RLIMIT_RSS # define RLIMIT_RSS 5 /* max resident set size */ #endif #ifndef RLIMIT_NPROC # define RLIMIT_NPROC 6 /* max number of processes */ #endif #ifndef RLIMIT_NOFILE # define RLIMIT_NOFILE 7 /* max number of open files */ #endif #ifndef RLIMIT_MEMLOCK # define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ #endif #ifndef RLIMIT_AS # define RLIMIT_AS 9 /* address space limit */ #endif #define RLIMIT_LOCKS 10 /* maximum file locks held */ #define RLIMIT_SIGPENDING 11 /* max number of pending signals */ #define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */ #define RLIMIT_NICE 13 /* max nice prio allowed to raise to 0-39 for nice level 19 .. -20 */ #define RLIMIT_RTPRIO 14 /* maximum realtime priority */ #define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */ #define RLIM_NLIMITS 16 /* * SuS says limits have to be unsigned. * Which makes a ton more sense anyway. * * Some architectures override this (for compatibility reasons): */ #ifndef RLIM_INFINITY # define RLIM_INFINITY (~0UL) #endif #endif /* _ASM_GENERIC_RESOURCE_H */ PKZj¯ asm-generic/socket.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SOCKET_H #define __ASM_GENERIC_SOCKET_H #include /* For setsockopt(2) */ #define SOL_SOCKET 1 #define SO_DEBUG 1 #define SO_REUSEADDR 2 #define SO_TYPE 3 #define SO_ERROR 4 #define SO_DONTROUTE 5 #define SO_BROADCAST 6 #define SO_SNDBUF 7 #define SO_RCVBUF 8 #define SO_SNDBUFFORCE 32 #define SO_RCVBUFFORCE 33 #define SO_KEEPALIVE 9 #define SO_OOBINLINE 10 #define SO_NO_CHECK 11 #define SO_PRIORITY 12 #define SO_LINGER 13 #define SO_BSDCOMPAT 14 #define SO_REUSEPORT 15 #ifndef SO_PASSCRED /* powerpc only differs in these */ #define SO_PASSCRED 16 #define SO_PEERCRED 17 #define SO_RCVLOWAT 18 #define SO_SNDLOWAT 19 #define SO_RCVTIMEO 20 #define SO_SNDTIMEO 21 #endif /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 22 #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 #define SO_SECURITY_ENCRYPTION_NETWORK 24 #define SO_BINDTODEVICE 25 /* Socket filtering */ #define SO_ATTACH_FILTER 26 #define SO_DETACH_FILTER 27 #define SO_GET_FILTER SO_ATTACH_FILTER #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 #define SO_PASSSEC 34 #define SO_TIMESTAMPNS 35 #define SCM_TIMESTAMPNS SO_TIMESTAMPNS #define SO_MARK 36 #define SO_TIMESTAMPING 37 #define SCM_TIMESTAMPING SO_TIMESTAMPING #define SO_PROTOCOL 38 #define SO_DOMAIN 39 #define SO_RXQ_OVFL 40 #define SO_WIFI_STATUS 41 #define SCM_WIFI_STATUS SO_WIFI_STATUS #define SO_PEEK_OFF 42 /* Instruct lower device to use last 4-bytes of skb data as FCS */ #define SO_NOFCS 43 #define SO_LOCK_FILTER 44 #define SO_SELECT_ERR_QUEUE 45 #define SO_BUSY_POLL 46 #define SO_MAX_PACING_RATE 47 #define SO_BPF_EXTENSIONS 48 #define SO_INCOMING_CPU 49 #define SO_ATTACH_BPF 50 #define SO_DETACH_BPF SO_DETACH_FILTER #define SO_ATTACH_REUSEPORT_CBPF 51 #define SO_ATTACH_REUSEPORT_EBPF 52 #define SO_CNX_ADVICE 53 #define SCM_TIMESTAMPING_OPT_STATS 54 #define SO_MEMINFO 55 #define SO_INCOMING_NAPI_ID 56 #define SO_COOKIE 57 #define SCM_TIMESTAMPING_PKTINFO 58 #define SO_PEERGROUPS 59 #define SO_ZEROCOPY 60 #define SO_TXTIME 61 #define SCM_TXTIME SO_TXTIME #define SO_BINDTOIFINDEX 62 #define SO_DETACH_REUSEPORT_BPF 68 #define SO_PREFER_BUSY_POLL 69 #define SO_BUSY_POLL_BUDGET 70 #endif /* __ASM_GENERIC_SOCKET_H */ PKZ54qasm-generic/int-l64.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * asm-generic/int-l64.h * * Integer declarations for architectures which use "long" * for 64-bit types. */ #ifndef _ASM_GENERIC_INT_L64_H #define _ASM_GENERIC_INT_L64_H #include #ifndef __ASSEMBLY__ /* * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the * header files exported to user space */ typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; typedef __signed__ long __s64; typedef unsigned long __u64; #endif /* __ASSEMBLY__ */ #endif /* _ASM_GENERIC_INT_L64_H */ PKZ.3qaaasm-generic/param.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_PARAM_H #define __ASM_GENERIC_PARAM_H #ifndef HZ #define HZ 100 #endif #ifndef EXEC_PAGESIZE #define EXEC_PAGESIZE 4096 #endif #ifndef NOGROUP #define NOGROUP (-1) #endif #define MAXHOSTNAMELEN 64 /* max length of hostname */ #endif /* __ASM_GENERIC_PARAM_H */ PKZ annasm-generic/poll.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_POLL_H #define __ASM_GENERIC_POLL_H /* These are specified by iBCS2 */ #define POLLIN 0x0001 #define POLLPRI 0x0002 #define POLLOUT 0x0004 #define POLLERR 0x0008 #define POLLHUP 0x0010 #define POLLNVAL 0x0020 /* The rest seem to be more-or-less nonstandard. Check them! */ #define POLLRDNORM 0x0040 #define POLLRDBAND 0x0080 #ifndef POLLWRNORM #define POLLWRNORM 0x0100 #endif #ifndef POLLWRBAND #define POLLWRBAND 0x0200 #endif #ifndef POLLMSG #define POLLMSG 0x0400 #endif #ifndef POLLREMOVE #define POLLREMOVE 0x1000 #endif #ifndef POLLRDHUP #define POLLRDHUP 0x2000 #endif #define POLLFREE (__poll_t)0x4000 /* currently only for epoll */ #define POLL_BUSY_LOOP (__poll_t)0x8000 struct pollfd { int fd; short events; short revents; }; #endif /* __ASM_GENERIC_POLL_H */ PKZ$--asm-generic/shmbuf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SHMBUF_H #define __ASM_GENERIC_SHMBUF_H #include /* * The shmid64_ds structure for x86 architecture. * Note extra padding because this structure is passed back and forth * between kernel and user space. * * shmid64_ds was originally meant to be architecture specific, but * everyone just ended up making identical copies without specific * optimizations, so we may just as well all use the same one. * * 64 bit architectures typically define a 64 bit __kernel_time_t, * so they do not need the first two padding words. * On big-endian systems, the padding is in the wrong place. * * * Pad space is left for: * - 2 miscellaneous 32-bit values */ struct shmid64_ds { struct ipc64_perm shm_perm; /* operation perms */ size_t shm_segsz; /* size of segment (bytes) */ #if __BITS_PER_LONG == 64 __kernel_time_t shm_atime; /* last attach time */ __kernel_time_t shm_dtime; /* last detach time */ __kernel_time_t shm_ctime; /* last change time */ #else unsigned long shm_atime; /* last attach time */ unsigned long shm_atime_high; unsigned long shm_dtime; /* last detach time */ unsigned long shm_dtime_high; unsigned long shm_ctime; /* last change time */ unsigned long shm_ctime_high; #endif __kernel_pid_t shm_cpid; /* pid of creator */ __kernel_pid_t shm_lpid; /* pid of last operator */ unsigned long shm_nattch; /* no. of current attaches */ unsigned long __unused4; unsigned long __unused5; }; struct shminfo64 { unsigned long shmmax; unsigned long shmmin; unsigned long shmmni; unsigned long shmseg; unsigned long shmall; unsigned long __unused1; unsigned long __unused2; unsigned long __unused3; unsigned long __unused4; }; #endif /* __ASM_GENERIC_SHMBUF_H */ PKZ]asm-generic/ipcbuf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_IPCBUF_H #define __ASM_GENERIC_IPCBUF_H /* * The generic ipc64_perm structure: * Note extra padding because this structure is passed back and forth * between kernel and user space. * * ipc64_perm was originally meant to be architecture specific, but * everyone just ended up making identical copies without specific * optimizations, so we may just as well all use the same one. * * Pad space is left for: * - 32-bit mode_t on architectures that only had 16 bit * - 32-bit seq * - 2 miscellaneous 32-bit values */ struct ipc64_perm { __kernel_key_t key; __kernel_uid32_t uid; __kernel_gid32_t gid; __kernel_uid32_t cuid; __kernel_gid32_t cgid; __kernel_mode_t mode; /* pad if mode_t is u16: */ unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; unsigned short seq; unsigned short __pad2; __kernel_ulong_t __unused1; __kernel_ulong_t __unused2; }; #endif /* __ASM_GENERIC_IPCBUF_H */ PKZC"44asm-generic/bitsperlong.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_BITS_PER_LONG #define __ASM_GENERIC_BITS_PER_LONG /* * There seems to be no way of detecting this automatically from user * space, so 64 bit architectures should override this in their * bitsperlong.h. In particular, an architecture that supports * both 32 and 64 bit user space must not rely on CONFIG_64BIT * to decide it, but rather check a compiler provided macro. */ #ifndef __BITS_PER_LONG #define __BITS_PER_LONG 32 #endif #endif /* __ASM_GENERIC_BITS_PER_LONG */ PKZ,9eeasm-generic/ucontext.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_UCONTEXT_H #define __ASM_GENERIC_UCONTEXT_H struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; sigset_t uc_sigmask; /* mask last for extensibility */ }; #endif /* __ASM_GENERIC_UCONTEXT_H */ PKZV'Rasm-generic/types.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_TYPES_H #define _ASM_GENERIC_TYPES_H /* * int-ll64 is used everywhere now. */ #include #endif /* _ASM_GENERIC_TYPES_H */ PKZL+asm-generic/bpf_perf_event.hnu[#ifndef __ASM_GENERIC_BPF_PERF_EVENT_H__ #define __ASM_GENERIC_BPF_PERF_EVENT_H__ #include /* Export kernel pt_regs structure */ typedef struct pt_regs bpf_user_pt_regs_t; #endif /* __ASM_GENERIC_BPF_PERF_EVENT_H__ */ PKZx asm-generic/mman-common.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_MMAN_COMMON_H #define __ASM_GENERIC_MMAN_COMMON_H /* Author: Michael S. Tsirkin , Mellanox Technologies Ltd. Based on: asm-xxx/mman.h */ #define PROT_READ 0x1 /* page can be read */ #define PROT_WRITE 0x2 /* page can be written */ #define PROT_EXEC 0x4 /* page can be executed */ #define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_NONE 0x0 /* page can not be accessed */ #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ #define MAP_SHARED 0x01 /* Share changes */ #define MAP_PRIVATE 0x02 /* Changes are private */ #define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ #define MAP_TYPE 0x0f /* Mask for type of mapping */ #define MAP_FIXED 0x10 /* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20 /* don't use a file */ /* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ #define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */ #define MAP_NONBLOCK 0x010000 /* do not block on IO */ #define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */ #define MAP_HUGETLB 0x040000 /* create a huge page mapping */ #define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */ #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ #define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be * uninitialized */ /* * Flags for mlock */ #define MLOCK_ONFAULT 0x01 /* Lock pages in range after they are faulted in, do not prefault */ #define MS_ASYNC 1 /* sync memory asynchronously */ #define MS_INVALIDATE 2 /* invalidate the caches */ #define MS_SYNC 4 /* synchronous memory sync */ #define MADV_NORMAL 0 /* no further special treatment */ #define MADV_RANDOM 1 /* expect random page references */ #define MADV_SEQUENTIAL 2 /* expect sequential page references */ #define MADV_WILLNEED 3 /* will need these pages */ #define MADV_DONTNEED 4 /* don't need these pages */ /* common parameters: try to keep these consistent across architectures */ #define MADV_FREE 8 /* free pages only if memory pressure */ #define MADV_REMOVE 9 /* remove these pages & resources */ #define MADV_DONTFORK 10 /* don't inherit across fork */ #define MADV_DOFORK 11 /* do inherit across fork */ #define MADV_HWPOISON 100 /* poison a page for testing */ #define MADV_SOFT_OFFLINE 101 /* soft offline page for testing */ #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ #define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, overrides the coredump filter bits */ #define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag */ #define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */ #define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */ #define MADV_COLD 20 /* deactivate these pages */ #define MADV_PAGEOUT 21 /* reclaim these pages */ /* compatibility flags */ #define MAP_FILE 0 #define PKEY_DISABLE_ACCESS 0x1 #define PKEY_DISABLE_WRITE 0x2 #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ PKEY_DISABLE_WRITE) #endif /* __ASM_GENERIC_MMAN_COMMON_H */ PKZrasm-generic/errno.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_ERRNO_H #define _ASM_GENERIC_ERRNO_H #include #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ /* * This error code is special: arch syscall entry code will return * -ENOSYS if users try to call a syscall that doesn't exist. To keep * failures of syscalls that really do exist distinguishable from * failures due to attempts to use a nonexistent syscall, syscall * implementations should refrain from returning -ENOSYS. */ #define ENOSYS 38 /* Invalid system call number */ #define ENOTEMPTY 39 /* Directory not empty */ #define ELOOP 40 /* Too many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would block */ #define ENOMSG 42 /* No message of desired type */ #define EIDRM 43 /* Identifier removed */ #define ECHRNG 44 /* Channel number out of range */ #define EL2NSYNC 45 /* Level 2 not synchronized */ #define EL3HLT 46 /* Level 3 halted */ #define EL3RST 47 /* Level 3 reset */ #define ELNRNG 48 /* Link number out of range */ #define EUNATCH 49 /* Protocol driver not attached */ #define ENOCSI 50 /* No CSI structure available */ #define EL2HLT 51 /* Level 2 halted */ #define EBADE 52 /* Invalid exchange */ #define EBADR 53 /* Invalid request descriptor */ #define EXFULL 54 /* Exchange full */ #define ENOANO 55 /* No anode */ #define EBADRQC 56 /* Invalid request code */ #define EBADSLT 57 /* Invalid slot */ #define EDEADLOCK EDEADLK #define EBFONT 59 /* Bad font file format */ #define ENOSTR 60 /* Device not a stream */ #define ENODATA 61 /* No data available */ #define ETIME 62 /* Timer expired */ #define ENOSR 63 /* Out of streams resources */ #define ENONET 64 /* Machine is not on the network */ #define ENOPKG 65 /* Package not installed */ #define EREMOTE 66 /* Object is remote */ #define ENOLINK 67 /* Link has been severed */ #define EADV 68 /* Advertise error */ #define ESRMNT 69 /* Srmount error */ #define ECOMM 70 /* Communication error on send */ #define EPROTO 71 /* Protocol error */ #define EMULTIHOP 72 /* Multihop attempted */ #define EDOTDOT 73 /* RFS specific error */ #define EBADMSG 74 /* Not a data message */ #define EOVERFLOW 75 /* Value too large for defined data type */ #define ENOTUNIQ 76 /* Name not unique on network */ #define EBADFD 77 /* File descriptor in bad state */ #define EREMCHG 78 /* Remote address changed */ #define ELIBACC 79 /* Can not access a needed shared library */ #define ELIBBAD 80 /* Accessing a corrupted shared library */ #define ELIBSCN 81 /* .lib section in a.out corrupted */ #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ #define ELIBEXEC 83 /* Cannot exec a shared library directly */ #define EILSEQ 84 /* Illegal byte sequence */ #define ERESTART 85 /* Interrupted system call should be restarted */ #define ESTRPIPE 86 /* Streams pipe error */ #define EUSERS 87 /* Too many users */ #define ENOTSOCK 88 /* Socket operation on non-socket */ #define EDESTADDRREQ 89 /* Destination address required */ #define EMSGSIZE 90 /* Message too long */ #define EPROTOTYPE 91 /* Protocol wrong type for socket */ #define ENOPROTOOPT 92 /* Protocol not available */ #define EPROTONOSUPPORT 93 /* Protocol not supported */ #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ #define EPFNOSUPPORT 96 /* Protocol family not supported */ #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ #define EADDRINUSE 98 /* Address already in use */ #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ #define ENETDOWN 100 /* Network is down */ #define ENETUNREACH 101 /* Network is unreachable */ #define ENETRESET 102 /* Network dropped connection because of reset */ #define ECONNABORTED 103 /* Software caused connection abort */ #define ECONNRESET 104 /* Connection reset by peer */ #define ENOBUFS 105 /* No buffer space available */ #define EISCONN 106 /* Transport endpoint is already connected */ #define ENOTCONN 107 /* Transport endpoint is not connected */ #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ #define ETOOMANYREFS 109 /* Too many references: cannot splice */ #define ETIMEDOUT 110 /* Connection timed out */ #define ECONNREFUSED 111 /* Connection refused */ #define EHOSTDOWN 112 /* Host is down */ #define EHOSTUNREACH 113 /* No route to host */ #define EALREADY 114 /* Operation already in progress */ #define EINPROGRESS 115 /* Operation now in progress */ #define ESTALE 116 /* Stale file handle */ #define EUCLEAN 117 /* Structure needs cleaning */ #define ENOTNAM 118 /* Not a XENIX named type file */ #define ENAVAIL 119 /* No XENIX semaphores available */ #define EISNAM 120 /* Is a named type file */ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ #define ECANCELED 125 /* Operation Canceled */ #define ENOKEY 126 /* Required key not available */ #define EKEYEXPIRED 127 /* Key has expired */ #define EKEYREVOKED 128 /* Key has been revoked */ #define EKEYREJECTED 129 /* Key was rejected by service */ /* for robust mutexes */ #define EOWNERDEAD 130 /* Owner died */ #define ENOTRECOVERABLE 131 /* State not recoverable */ #define ERFKILL 132 /* Operation not possible due to RF-kill */ #define EHWPOISON 133 /* Memory page has hardware error */ #endif PKZ"Kasm-generic/ioctls.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_IOCTLS_H #define __ASM_GENERIC_IOCTLS_H #include /* * These are the most common definitions for tty ioctl numbers. * Most of them do not use the recommended _IOC(), but there is * probably some source code out there hardcoding the number, * so we might as well use them for all new platforms. * * The architectures that use different values here typically * try to be compatible with some Unix variants for the same * architecture. */ /* 0x54 is just a magic number to make these relatively unique ('T') */ #define TCGETS 0x5401 #define TCSETS 0x5402 #define TCSETSW 0x5403 #define TCSETSF 0x5404 #define TCGETA 0x5405 #define TCSETA 0x5406 #define TCSETAW 0x5407 #define TCSETAF 0x5408 #define TCSBRK 0x5409 #define TCXONC 0x540A #define TCFLSH 0x540B #define TIOCEXCL 0x540C #define TIOCNXCL 0x540D #define TIOCSCTTY 0x540E #define TIOCGPGRP 0x540F #define TIOCSPGRP 0x5410 #define TIOCOUTQ 0x5411 #define TIOCSTI 0x5412 #define TIOCGWINSZ 0x5413 #define TIOCSWINSZ 0x5414 #define TIOCMGET 0x5415 #define TIOCMBIS 0x5416 #define TIOCMBIC 0x5417 #define TIOCMSET 0x5418 #define TIOCGSOFTCAR 0x5419 #define TIOCSSOFTCAR 0x541A #define FIONREAD 0x541B #define TIOCINQ FIONREAD #define TIOCLINUX 0x541C #define TIOCCONS 0x541D #define TIOCGSERIAL 0x541E #define TIOCSSERIAL 0x541F #define TIOCPKT 0x5420 #define FIONBIO 0x5421 #define TIOCNOTTY 0x5422 #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ #define TCGETS2 _IOR('T', 0x2A, struct termios2) #define TCSETS2 _IOW('T', 0x2B, struct termios2) #define TCSETSW2 _IOW('T', 0x2C, struct termios2) #define TCSETSF2 _IOW('T', 0x2D, struct termios2) #define TIOCGRS485 0x542E #ifndef TIOCSRS485 #define TIOCSRS485 0x542F #endif #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ #define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ #define TCSETX 0x5433 #define TCSETXF 0x5434 #define TCSETXW 0x5435 #define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */ #define TIOCVHANGUP 0x5437 #define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ #define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ #define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ #define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ #define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) #define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) #define FIONCLEX 0x5450 #define FIOCLEX 0x5451 #define FIOASYNC 0x5452 #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 #define TIOCSERSWILD 0x5455 #define TIOCGLCKTRMIOS 0x5456 #define TIOCSLCKTRMIOS 0x5457 #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ #define TIOCSERGETLSR 0x5459 /* Get line status register */ #define TIOCSERGETMULTI 0x545A /* Get multiport config */ #define TIOCSERSETMULTI 0x545B /* Set multiport config */ #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ #define TIOCGICOUNT 0x545D /* read serial port __inline__ interrupt counts */ /* * Some arches already define FIOQSIZE due to a historical * conflict with a Hayes modem-specific ioctl value. */ #ifndef FIOQSIZE # define FIOQSIZE 0x5460 #endif /* Used for packet mode */ #define TIOCPKT_DATA 0 #define TIOCPKT_FLUSHREAD 1 #define TIOCPKT_FLUSHWRITE 2 #define TIOCPKT_STOP 4 #define TIOCPKT_START 8 #define TIOCPKT_NOSTOP 16 #define TIOCPKT_DOSTOP 32 #define TIOCPKT_IOCTL 64 #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ #endif /* __ASM_GENERIC_IOCTLS_H */ PKZ 2I I asm-generic/stat.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_STAT_H #define __ASM_GENERIC_STAT_H /* * Everybody gets this wrong and has to stick with it for all * eternity. Hopefully, this version gets used by new architectures * so they don't fall into the same traps. * * stat64 is copied from powerpc64, with explicit padding added. * stat is the same structure layout on 64-bit, without the 'long long' * types. * * By convention, 64 bit architectures use the stat interface, while * 32 bit architectures use the stat64 interface. Note that we don't * provide an __old_kernel_stat here, which new architecture should * not have to start with. */ #include #define STAT_HAVE_NSEC 1 struct stat { unsigned long st_dev; /* Device. */ unsigned long st_ino; /* File serial number. */ unsigned int st_mode; /* File mode. */ unsigned int st_nlink; /* Link count. */ unsigned int st_uid; /* User ID of the file's owner. */ unsigned int st_gid; /* Group ID of the file's group. */ unsigned long st_rdev; /* Device number, if device. */ unsigned long __pad1; long st_size; /* Size of file, in bytes. */ int st_blksize; /* Optimal block size for I/O. */ int __pad2; long st_blocks; /* Number 512-byte blocks allocated. */ long st_atime; /* Time of last access. */ unsigned long st_atime_nsec; long st_mtime; /* Time of last modification. */ unsigned long st_mtime_nsec; long st_ctime; /* Time of last status change. */ unsigned long st_ctime_nsec; unsigned int __unused4; unsigned int __unused5; }; /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ #if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64) struct stat64 { unsigned long long st_dev; /* Device. */ unsigned long long st_ino; /* File serial number. */ unsigned int st_mode; /* File mode. */ unsigned int st_nlink; /* Link count. */ unsigned int st_uid; /* User ID of the file's owner. */ unsigned int st_gid; /* Group ID of the file's group. */ unsigned long long st_rdev; /* Device number, if device. */ unsigned long long __pad1; long long st_size; /* Size of file, in bytes. */ int st_blksize; /* Optimal block size for I/O. */ int __pad2; long long st_blocks; /* Number 512-byte blocks allocated. */ int st_atime; /* Time of last access. */ unsigned int st_atime_nsec; int st_mtime; /* Time of last modification. */ unsigned int st_mtime_nsec; int st_ctime; /* Time of last status change. */ unsigned int st_ctime_nsec; unsigned int __unused4; unsigned int __unused5; }; #endif #endif /* __ASM_GENERIC_STAT_H */ PKZ9D`H H asm-generic/posix_types.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_POSIX_TYPES_H #define __ASM_GENERIC_POSIX_TYPES_H #include /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. * * First the types that are often defined in different ways across * architectures, so that you can override them. */ #ifndef __kernel_long_t typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; #endif #ifndef __kernel_ino_t typedef __kernel_ulong_t __kernel_ino_t; #endif #ifndef __kernel_mode_t typedef unsigned int __kernel_mode_t; #endif #ifndef __kernel_pid_t typedef int __kernel_pid_t; #endif #ifndef __kernel_ipc_pid_t typedef int __kernel_ipc_pid_t; #endif #ifndef __kernel_uid_t typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; #endif #ifndef __kernel_suseconds_t typedef __kernel_long_t __kernel_suseconds_t; #endif #ifndef __kernel_daddr_t typedef int __kernel_daddr_t; #endif #ifndef __kernel_uid32_t typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; #endif #ifndef __kernel_old_uid_t typedef __kernel_uid_t __kernel_old_uid_t; typedef __kernel_gid_t __kernel_old_gid_t; #endif #ifndef __kernel_old_dev_t typedef unsigned int __kernel_old_dev_t; #endif /* * Most 32 bit architectures use "unsigned int" size_t, * and all 64 bit architectures use "unsigned long" size_t. */ #ifndef __kernel_size_t #if __BITS_PER_LONG != 64 typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; #else typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef __kernel_long_t __kernel_ptrdiff_t; #endif #endif #ifndef __kernel_fsid_t typedef struct { int val[2]; } __kernel_fsid_t; #endif /* * anything below here should be completely generic */ typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_old_time_t; typedef __kernel_long_t __kernel_time_t; typedef long long __kernel_time64_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; #endif /* __ASM_GENERIC_POSIX_TYPES_H */ PKZ]<asm-generic/hugetlb_encode.hnu[#ifndef _ASM_GENERIC_HUGETLB_ENCODE_H_ #define _ASM_GENERIC_HUGETLB_ENCODE_H_ /* * Several system calls take a flag to request "hugetlb" huge pages. * Without further specification, these system calls will use the * system's default huge page size. If a system supports multiple * huge page sizes, the desired huge page size can be specified in * bits [26:31] of the flag arguments. The value in these 6 bits * will encode the log2 of the huge page size. * * The following definitions are associated with this huge page size * encoding in flag arguments. System call specific header files * that use this encoding should include this file. They can then * provide definitions based on these with their own specific prefix. * for example: * #define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT */ #define HUGETLB_FLAG_ENCODE_SHIFT 26 #define HUGETLB_FLAG_ENCODE_MASK 0x3f #define HUGETLB_FLAG_ENCODE_16KB (14 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_32MB (25 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_512MB (29 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) #endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */ PKZ5aaasm-generic/termios.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_TERMIOS_H #define _ASM_GENERIC_TERMIOS_H /* * Most architectures have straight copies of the x86 code, with * varying levels of bug fixes on top. Usually it's a good idea * to use this generic version instead, but be careful to avoid * ABI changes. * New architectures should not provide their own version. */ #include #include struct winsize { unsigned short ws_row; unsigned short ws_col; unsigned short ws_xpixel; unsigned short ws_ypixel; }; #define NCC 8 struct termio { unsigned short c_iflag; /* input mode flags */ unsigned short c_oflag; /* output mode flags */ unsigned short c_cflag; /* control mode flags */ unsigned short c_lflag; /* local mode flags */ unsigned char c_line; /* line discipline */ unsigned char c_cc[NCC]; /* control characters */ }; /* modem lines */ #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 #define TIOCM_RTS 0x004 #define TIOCM_ST 0x008 #define TIOCM_SR 0x010 #define TIOCM_CTS 0x020 #define TIOCM_CAR 0x040 #define TIOCM_RNG 0x080 #define TIOCM_DSR 0x100 #define TIOCM_CD TIOCM_CAR #define TIOCM_RI TIOCM_RNG #define TIOCM_OUT1 0x2000 #define TIOCM_OUT2 0x4000 #define TIOCM_LOOP 0x8000 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ #endif /* _ASM_GENERIC_TERMIOS_H */ PKZ.DKnnasm-generic/unistd.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #include /* * This file contains the system call numbers, based on the * layout of the x86-64 architecture, which embeds the * pointer to the syscall in the table. * * As a basic principle, no duplication of functionality * should be added, e.g. we don't use lseek when llseek * is present. New architectures should use this file * and implement the less feature-full calls in user space. */ #ifndef __SYSCALL #define __SYSCALL(x, y) #endif #if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) #else #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) #endif #ifdef __SYSCALL_COMPAT #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp) #define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp) #else #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) #define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64) #endif #define __NR_io_setup 0 __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) #define __NR_io_destroy 1 __SYSCALL(__NR_io_destroy, sys_io_destroy) #define __NR_io_submit 2 __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) #define __NR_io_cancel 3 __SYSCALL(__NR_io_cancel, sys_io_cancel) #define __NR_io_getevents 4 __SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents) /* fs/xattr.c */ #define __NR_setxattr 5 __SYSCALL(__NR_setxattr, sys_setxattr) #define __NR_lsetxattr 6 __SYSCALL(__NR_lsetxattr, sys_lsetxattr) #define __NR_fsetxattr 7 __SYSCALL(__NR_fsetxattr, sys_fsetxattr) #define __NR_getxattr 8 __SYSCALL(__NR_getxattr, sys_getxattr) #define __NR_lgetxattr 9 __SYSCALL(__NR_lgetxattr, sys_lgetxattr) #define __NR_fgetxattr 10 __SYSCALL(__NR_fgetxattr, sys_fgetxattr) #define __NR_listxattr 11 __SYSCALL(__NR_listxattr, sys_listxattr) #define __NR_llistxattr 12 __SYSCALL(__NR_llistxattr, sys_llistxattr) #define __NR_flistxattr 13 __SYSCALL(__NR_flistxattr, sys_flistxattr) #define __NR_removexattr 14 __SYSCALL(__NR_removexattr, sys_removexattr) #define __NR_lremovexattr 15 __SYSCALL(__NR_lremovexattr, sys_lremovexattr) #define __NR_fremovexattr 16 __SYSCALL(__NR_fremovexattr, sys_fremovexattr) /* fs/dcache.c */ #define __NR_getcwd 17 __SYSCALL(__NR_getcwd, sys_getcwd) /* fs/cookies.c */ #define __NR_lookup_dcookie 18 __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) /* fs/eventfd.c */ #define __NR_eventfd2 19 __SYSCALL(__NR_eventfd2, sys_eventfd2) /* fs/eventpoll.c */ #define __NR_epoll_create1 20 __SYSCALL(__NR_epoll_create1, sys_epoll_create1) #define __NR_epoll_ctl 21 __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) #define __NR_epoll_pwait 22 __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) /* fs/fcntl.c */ #define __NR_dup 23 __SYSCALL(__NR_dup, sys_dup) #define __NR_dup3 24 __SYSCALL(__NR_dup3, sys_dup3) #define __NR3264_fcntl 25 __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) /* fs/inotify_user.c */ #define __NR_inotify_init1 26 __SYSCALL(__NR_inotify_init1, sys_inotify_init1) #define __NR_inotify_add_watch 27 __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) #define __NR_inotify_rm_watch 28 __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) /* fs/ioctl.c */ #define __NR_ioctl 29 __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) /* fs/ioprio.c */ #define __NR_ioprio_set 30 __SYSCALL(__NR_ioprio_set, sys_ioprio_set) #define __NR_ioprio_get 31 __SYSCALL(__NR_ioprio_get, sys_ioprio_get) /* fs/locks.c */ #define __NR_flock 32 __SYSCALL(__NR_flock, sys_flock) /* fs/namei.c */ #define __NR_mknodat 33 __SYSCALL(__NR_mknodat, sys_mknodat) #define __NR_mkdirat 34 __SYSCALL(__NR_mkdirat, sys_mkdirat) #define __NR_unlinkat 35 __SYSCALL(__NR_unlinkat, sys_unlinkat) #define __NR_symlinkat 36 __SYSCALL(__NR_symlinkat, sys_symlinkat) #define __NR_linkat 37 __SYSCALL(__NR_linkat, sys_linkat) #ifdef __ARCH_WANT_RENAMEAT /* renameat is superseded with flags by renameat2 */ #define __NR_renameat 38 __SYSCALL(__NR_renameat, sys_renameat) #endif /* __ARCH_WANT_RENAMEAT */ /* fs/namespace.c */ #define __NR_umount2 39 __SYSCALL(__NR_umount2, sys_umount) #define __NR_mount 40 __SC_COMP(__NR_mount, sys_mount, compat_sys_mount) #define __NR_pivot_root 41 __SYSCALL(__NR_pivot_root, sys_pivot_root) /* fs/nfsctl.c */ #define __NR_nfsservctl 42 __SYSCALL(__NR_nfsservctl, sys_ni_syscall) /* fs/open.c */ #define __NR3264_statfs 43 __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ compat_sys_statfs64) #define __NR3264_fstatfs 44 __SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \ compat_sys_fstatfs64) #define __NR3264_truncate 45 __SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ compat_sys_truncate64) #define __NR3264_ftruncate 46 __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ compat_sys_ftruncate64) #define __NR_fallocate 47 __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) #define __NR_faccessat 48 __SYSCALL(__NR_faccessat, sys_faccessat) #define __NR_chdir 49 __SYSCALL(__NR_chdir, sys_chdir) #define __NR_fchdir 50 __SYSCALL(__NR_fchdir, sys_fchdir) #define __NR_chroot 51 __SYSCALL(__NR_chroot, sys_chroot) #define __NR_fchmod 52 __SYSCALL(__NR_fchmod, sys_fchmod) #define __NR_fchmodat 53 __SYSCALL(__NR_fchmodat, sys_fchmodat) #define __NR_fchownat 54 __SYSCALL(__NR_fchownat, sys_fchownat) #define __NR_fchown 55 __SYSCALL(__NR_fchown, sys_fchown) #define __NR_openat 56 __SC_COMP(__NR_openat, sys_openat, compat_sys_openat) #define __NR_close 57 __SYSCALL(__NR_close, sys_close) #define __NR_vhangup 58 __SYSCALL(__NR_vhangup, sys_vhangup) /* fs/pipe.c */ #define __NR_pipe2 59 __SYSCALL(__NR_pipe2, sys_pipe2) /* fs/quota.c */ #define __NR_quotactl 60 __SYSCALL(__NR_quotactl, sys_quotactl) /* fs/readdir.c */ #define __NR_getdents64 61 __SYSCALL(__NR_getdents64, sys_getdents64) /* fs/read_write.c */ #define __NR3264_lseek 62 __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) #define __NR_read 63 __SYSCALL(__NR_read, sys_read) #define __NR_write 64 __SYSCALL(__NR_write, sys_write) #define __NR_readv 65 __SC_COMP(__NR_readv, sys_readv, compat_sys_readv) #define __NR_writev 66 __SC_COMP(__NR_writev, sys_writev, compat_sys_writev) #define __NR_pread64 67 __SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64) #define __NR_pwrite64 68 __SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) #define __NR_preadv 69 __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) #define __NR_pwritev 70 __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) /* fs/sendfile.c */ #define __NR3264_sendfile 71 __SYSCALL(__NR3264_sendfile, sys_sendfile64) /* fs/select.c */ #define __NR_pselect6 72 __SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6) #define __NR_ppoll 73 __SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll) /* fs/signalfd.c */ #define __NR_signalfd4 74 __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) /* fs/splice.c */ #define __NR_vmsplice 75 __SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice) #define __NR_splice 76 __SYSCALL(__NR_splice, sys_splice) #define __NR_tee 77 __SYSCALL(__NR_tee, sys_tee) /* fs/stat.c */ #define __NR_readlinkat 78 __SYSCALL(__NR_readlinkat, sys_readlinkat) #define __NR3264_fstatat 79 __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) #define __NR3264_fstat 80 __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) /* fs/sync.c */ #define __NR_sync 81 __SYSCALL(__NR_sync, sys_sync) #define __NR_fsync 82 __SYSCALL(__NR_fsync, sys_fsync) #define __NR_fdatasync 83 __SYSCALL(__NR_fdatasync, sys_fdatasync) #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 #define __NR_sync_file_range2 84 __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ compat_sys_sync_file_range2) #else #define __NR_sync_file_range 84 __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ compat_sys_sync_file_range) #endif /* fs/timerfd.c */ #define __NR_timerfd_create 85 __SYSCALL(__NR_timerfd_create, sys_timerfd_create) #define __NR_timerfd_settime 86 __SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \ compat_sys_timerfd_settime) #define __NR_timerfd_gettime 87 __SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \ compat_sys_timerfd_gettime) /* fs/utimes.c */ #define __NR_utimensat 88 __SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat) /* kernel/acct.c */ #define __NR_acct 89 __SYSCALL(__NR_acct, sys_acct) /* kernel/capability.c */ #define __NR_capget 90 __SYSCALL(__NR_capget, sys_capget) #define __NR_capset 91 __SYSCALL(__NR_capset, sys_capset) /* kernel/exec_domain.c */ #define __NR_personality 92 __SYSCALL(__NR_personality, sys_personality) /* kernel/exit.c */ #define __NR_exit 93 __SYSCALL(__NR_exit, sys_exit) #define __NR_exit_group 94 __SYSCALL(__NR_exit_group, sys_exit_group) #define __NR_waitid 95 __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) /* kernel/fork.c */ #define __NR_set_tid_address 96 __SYSCALL(__NR_set_tid_address, sys_set_tid_address) #define __NR_unshare 97 __SYSCALL(__NR_unshare, sys_unshare) /* kernel/futex.c */ #define __NR_futex 98 __SC_COMP(__NR_futex, sys_futex, compat_sys_futex) #define __NR_set_robust_list 99 __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ compat_sys_set_robust_list) #define __NR_get_robust_list 100 __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ compat_sys_get_robust_list) /* kernel/hrtimer.c */ #define __NR_nanosleep 101 __SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep) /* kernel/itimer.c */ #define __NR_getitimer 102 __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) #define __NR_setitimer 103 __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) /* kernel/kexec.c */ #define __NR_kexec_load 104 __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) /* kernel/module.c */ #define __NR_init_module 105 __SYSCALL(__NR_init_module, sys_init_module) #define __NR_delete_module 106 __SYSCALL(__NR_delete_module, sys_delete_module) /* kernel/posix-timers.c */ #define __NR_timer_create 107 __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) #define __NR_timer_gettime 108 __SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime) #define __NR_timer_getoverrun 109 __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) #define __NR_timer_settime 110 __SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime) #define __NR_timer_delete 111 __SYSCALL(__NR_timer_delete, sys_timer_delete) #define __NR_clock_settime 112 __SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime) #define __NR_clock_gettime 113 __SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime) #define __NR_clock_getres 114 __SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres) #define __NR_clock_nanosleep 115 __SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \ compat_sys_clock_nanosleep) /* kernel/printk.c */ #define __NR_syslog 116 __SYSCALL(__NR_syslog, sys_syslog) /* kernel/ptrace.c */ #define __NR_ptrace 117 __SYSCALL(__NR_ptrace, sys_ptrace) /* kernel/sched/core.c */ #define __NR_sched_setparam 118 __SYSCALL(__NR_sched_setparam, sys_sched_setparam) #define __NR_sched_setscheduler 119 __SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) #define __NR_sched_getscheduler 120 __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) #define __NR_sched_getparam 121 __SYSCALL(__NR_sched_getparam, sys_sched_getparam) #define __NR_sched_setaffinity 122 __SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \ compat_sys_sched_setaffinity) #define __NR_sched_getaffinity 123 __SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \ compat_sys_sched_getaffinity) #define __NR_sched_yield 124 __SYSCALL(__NR_sched_yield, sys_sched_yield) #define __NR_sched_get_priority_max 125 __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) #define __NR_sched_get_priority_min 126 __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) #define __NR_sched_rr_get_interval 127 __SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \ compat_sys_sched_rr_get_interval) /* kernel/signal.c */ #define __NR_restart_syscall 128 __SYSCALL(__NR_restart_syscall, sys_restart_syscall) #define __NR_kill 129 __SYSCALL(__NR_kill, sys_kill) #define __NR_tkill 130 __SYSCALL(__NR_tkill, sys_tkill) #define __NR_tgkill 131 __SYSCALL(__NR_tgkill, sys_tgkill) #define __NR_sigaltstack 132 __SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack) #define __NR_rt_sigsuspend 133 __SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) #define __NR_rt_sigaction 134 __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) #define __NR_rt_sigprocmask 135 __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) #define __NR_rt_sigpending 136 __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) #define __NR_rt_sigtimedwait 137 __SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ compat_sys_rt_sigtimedwait) #define __NR_rt_sigqueueinfo 138 __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ compat_sys_rt_sigqueueinfo) #define __NR_rt_sigreturn 139 __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) /* kernel/sys.c */ #define __NR_setpriority 140 __SYSCALL(__NR_setpriority, sys_setpriority) #define __NR_getpriority 141 __SYSCALL(__NR_getpriority, sys_getpriority) #define __NR_reboot 142 __SYSCALL(__NR_reboot, sys_reboot) #define __NR_setregid 143 __SYSCALL(__NR_setregid, sys_setregid) #define __NR_setgid 144 __SYSCALL(__NR_setgid, sys_setgid) #define __NR_setreuid 145 __SYSCALL(__NR_setreuid, sys_setreuid) #define __NR_setuid 146 __SYSCALL(__NR_setuid, sys_setuid) #define __NR_setresuid 147 __SYSCALL(__NR_setresuid, sys_setresuid) #define __NR_getresuid 148 __SYSCALL(__NR_getresuid, sys_getresuid) #define __NR_setresgid 149 __SYSCALL(__NR_setresgid, sys_setresgid) #define __NR_getresgid 150 __SYSCALL(__NR_getresgid, sys_getresgid) #define __NR_setfsuid 151 __SYSCALL(__NR_setfsuid, sys_setfsuid) #define __NR_setfsgid 152 __SYSCALL(__NR_setfsgid, sys_setfsgid) #define __NR_times 153 __SC_COMP(__NR_times, sys_times, compat_sys_times) #define __NR_setpgid 154 __SYSCALL(__NR_setpgid, sys_setpgid) #define __NR_getpgid 155 __SYSCALL(__NR_getpgid, sys_getpgid) #define __NR_getsid 156 __SYSCALL(__NR_getsid, sys_getsid) #define __NR_setsid 157 __SYSCALL(__NR_setsid, sys_setsid) #define __NR_getgroups 158 __SYSCALL(__NR_getgroups, sys_getgroups) #define __NR_setgroups 159 __SYSCALL(__NR_setgroups, sys_setgroups) #define __NR_uname 160 __SYSCALL(__NR_uname, sys_newuname) #define __NR_sethostname 161 __SYSCALL(__NR_sethostname, sys_sethostname) #define __NR_setdomainname 162 __SYSCALL(__NR_setdomainname, sys_setdomainname) #define __NR_getrlimit 163 __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) #define __NR_setrlimit 164 __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) #define __NR_getrusage 165 __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) #define __NR_umask 166 __SYSCALL(__NR_umask, sys_umask) #define __NR_prctl 167 __SYSCALL(__NR_prctl, sys_prctl) #define __NR_getcpu 168 __SYSCALL(__NR_getcpu, sys_getcpu) /* kernel/time.c */ #define __NR_gettimeofday 169 __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) #define __NR_settimeofday 170 __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) #define __NR_adjtimex 171 __SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex) /* kernel/timer.c */ #define __NR_getpid 172 __SYSCALL(__NR_getpid, sys_getpid) #define __NR_getppid 173 __SYSCALL(__NR_getppid, sys_getppid) #define __NR_getuid 174 __SYSCALL(__NR_getuid, sys_getuid) #define __NR_geteuid 175 __SYSCALL(__NR_geteuid, sys_geteuid) #define __NR_getgid 176 __SYSCALL(__NR_getgid, sys_getgid) #define __NR_getegid 177 __SYSCALL(__NR_getegid, sys_getegid) #define __NR_gettid 178 __SYSCALL(__NR_gettid, sys_gettid) #define __NR_sysinfo 179 __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) /* ipc/mqueue.c */ #define __NR_mq_open 180 __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) #define __NR_mq_unlink 181 __SYSCALL(__NR_mq_unlink, sys_mq_unlink) #define __NR_mq_timedsend 182 __SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend) #define __NR_mq_timedreceive 183 __SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \ compat_sys_mq_timedreceive) #define __NR_mq_notify 184 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) #define __NR_mq_getsetattr 185 __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) /* ipc/msg.c */ #define __NR_msgget 186 __SYSCALL(__NR_msgget, sys_msgget) #define __NR_msgctl 187 __SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) #define __NR_msgrcv 188 __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) #define __NR_msgsnd 189 __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) /* ipc/sem.c */ #define __NR_semget 190 __SYSCALL(__NR_semget, sys_semget) #define __NR_semctl 191 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) #define __NR_semtimedop 192 __SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) #define __NR_semop 193 __SYSCALL(__NR_semop, sys_semop) /* ipc/shm.c */ #define __NR_shmget 194 __SYSCALL(__NR_shmget, sys_shmget) #define __NR_shmctl 195 __SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) #define __NR_shmat 196 __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) #define __NR_shmdt 197 __SYSCALL(__NR_shmdt, sys_shmdt) /* net/socket.c */ #define __NR_socket 198 __SYSCALL(__NR_socket, sys_socket) #define __NR_socketpair 199 __SYSCALL(__NR_socketpair, sys_socketpair) #define __NR_bind 200 __SYSCALL(__NR_bind, sys_bind) #define __NR_listen 201 __SYSCALL(__NR_listen, sys_listen) #define __NR_accept 202 __SYSCALL(__NR_accept, sys_accept) #define __NR_connect 203 __SYSCALL(__NR_connect, sys_connect) #define __NR_getsockname 204 __SYSCALL(__NR_getsockname, sys_getsockname) #define __NR_getpeername 205 __SYSCALL(__NR_getpeername, sys_getpeername) #define __NR_sendto 206 __SYSCALL(__NR_sendto, sys_sendto) #define __NR_recvfrom 207 __SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom) #define __NR_setsockopt 208 __SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt) #define __NR_getsockopt 209 __SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt) #define __NR_shutdown 210 __SYSCALL(__NR_shutdown, sys_shutdown) #define __NR_sendmsg 211 __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) #define __NR_recvmsg 212 __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) /* mm/filemap.c */ #define __NR_readahead 213 __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) /* mm/nommu.c, also with MMU */ #define __NR_brk 214 __SYSCALL(__NR_brk, sys_brk) #define __NR_munmap 215 __SYSCALL(__NR_munmap, sys_munmap) #define __NR_mremap 216 __SYSCALL(__NR_mremap, sys_mremap) /* security/keys/keyctl.c */ #define __NR_add_key 217 __SYSCALL(__NR_add_key, sys_add_key) #define __NR_request_key 218 __SYSCALL(__NR_request_key, sys_request_key) #define __NR_keyctl 219 __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) /* arch/example/kernel/sys_example.c */ #define __NR_clone 220 __SYSCALL(__NR_clone, sys_clone) #define __NR_execve 221 __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) #define __NR3264_mmap 222 __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) /* mm/fadvise.c */ #define __NR3264_fadvise64 223 __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) /* mm/, CONFIG_MMU only */ #ifndef __ARCH_NOMMU #define __NR_swapon 224 __SYSCALL(__NR_swapon, sys_swapon) #define __NR_swapoff 225 __SYSCALL(__NR_swapoff, sys_swapoff) #define __NR_mprotect 226 __SYSCALL(__NR_mprotect, sys_mprotect) #define __NR_msync 227 __SYSCALL(__NR_msync, sys_msync) #define __NR_mlock 228 __SYSCALL(__NR_mlock, sys_mlock) #define __NR_munlock 229 __SYSCALL(__NR_munlock, sys_munlock) #define __NR_mlockall 230 __SYSCALL(__NR_mlockall, sys_mlockall) #define __NR_munlockall 231 __SYSCALL(__NR_munlockall, sys_munlockall) #define __NR_mincore 232 __SYSCALL(__NR_mincore, sys_mincore) #define __NR_madvise 233 __SYSCALL(__NR_madvise, sys_madvise) #define __NR_remap_file_pages 234 __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) #define __NR_mbind 235 __SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind) #define __NR_get_mempolicy 236 __SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy) #define __NR_set_mempolicy 237 __SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy) #define __NR_migrate_pages 238 __SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages) #define __NR_move_pages 239 __SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages) #endif #define __NR_rt_tgsigqueueinfo 240 __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ compat_sys_rt_tgsigqueueinfo) #define __NR_perf_event_open 241 __SYSCALL(__NR_perf_event_open, sys_perf_event_open) #define __NR_accept4 242 __SYSCALL(__NR_accept4, sys_accept4) #define __NR_recvmmsg 243 __SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg) /* * Architectures may provide up to 16 syscalls of their own * starting with this value. */ #define __NR_arch_specific_syscall 244 #define __NR_wait4 260 __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) #define __NR_prlimit64 261 __SYSCALL(__NR_prlimit64, sys_prlimit64) #define __NR_fanotify_init 262 __SYSCALL(__NR_fanotify_init, sys_fanotify_init) #define __NR_fanotify_mark 263 __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) #define __NR_name_to_handle_at 264 __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) #define __NR_open_by_handle_at 265 __SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \ compat_sys_open_by_handle_at) #define __NR_clock_adjtime 266 __SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime) #define __NR_syncfs 267 __SYSCALL(__NR_syncfs, sys_syncfs) #define __NR_setns 268 __SYSCALL(__NR_setns, sys_setns) #define __NR_sendmmsg 269 __SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg) #define __NR_process_vm_readv 270 __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ compat_sys_process_vm_readv) #define __NR_process_vm_writev 271 __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ compat_sys_process_vm_writev) #define __NR_kcmp 272 __SYSCALL(__NR_kcmp, sys_kcmp) #define __NR_finit_module 273 __SYSCALL(__NR_finit_module, sys_finit_module) #define __NR_sched_setattr 274 __SYSCALL(__NR_sched_setattr, sys_sched_setattr) #define __NR_sched_getattr 275 __SYSCALL(__NR_sched_getattr, sys_sched_getattr) #define __NR_renameat2 276 __SYSCALL(__NR_renameat2, sys_renameat2) #define __NR_seccomp 277 __SYSCALL(__NR_seccomp, sys_seccomp) #define __NR_getrandom 278 __SYSCALL(__NR_getrandom, sys_getrandom) #define __NR_memfd_create 279 __SYSCALL(__NR_memfd_create, sys_memfd_create) #define __NR_bpf 280 __SYSCALL(__NR_bpf, sys_bpf) #define __NR_execveat 281 __SC_COMP(__NR_execveat, sys_execveat, compat_sys_execveat) #define __NR_userfaultfd 282 __SYSCALL(__NR_userfaultfd, sys_userfaultfd) #define __NR_membarrier 283 __SYSCALL(__NR_membarrier, sys_membarrier) #define __NR_mlock2 284 __SYSCALL(__NR_mlock2, sys_mlock2) #define __NR_copy_file_range 285 __SYSCALL(__NR_copy_file_range, sys_copy_file_range) #define __NR_preadv2 286 __SC_COMP(__NR_preadv2, sys_preadv2, compat_sys_preadv2) #define __NR_pwritev2 287 __SC_COMP(__NR_pwritev2, sys_pwritev2, compat_sys_pwritev2) #define __NR_pkey_mprotect 288 __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect) #define __NR_pkey_alloc 289 __SYSCALL(__NR_pkey_alloc, sys_pkey_alloc) #define __NR_pkey_free 290 __SYSCALL(__NR_pkey_free, sys_pkey_free) #define __NR_statx 291 __SYSCALL(__NR_statx, sys_statx) #define __NR_io_pgetevents 292 __SC_COMP(__NR_io_pgetevents, sys_io_pgetevents, compat_sys_io_pgetevents) #define __NR_rseq 293 __SYSCALL(__NR_rseq, sys_rseq) #define __NR_kexec_file_load 294 __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) #if __BITS_PER_LONG == 32 #define __NR_clock_gettime64 403 __SYSCALL(__NR_clock_gettime64, sys_clock_gettime) #define __NR_clock_settime64 404 __SYSCALL(__NR_clock_settime64, sys_clock_settime) #define __NR_clock_adjtime64 405 __SYSCALL(__NR_clock_adjtime64, sys_clock_adjtime) #define __NR_clock_getres_time64 406 __SYSCALL(__NR_clock_getres_time64, sys_clock_getres) #define __NR_clock_nanosleep_time64 407 __SYSCALL(__NR_clock_nanosleep_time64, sys_clock_nanosleep) #define __NR_timer_gettime64 408 __SYSCALL(__NR_timer_gettime64, sys_timer_gettime) #define __NR_timer_settime64 409 __SYSCALL(__NR_timer_settime64, sys_timer_settime) #define __NR_timerfd_gettime64 410 __SYSCALL(__NR_timerfd_gettime64, sys_timerfd_gettime) #define __NR_timerfd_settime64 411 __SYSCALL(__NR_timerfd_settime64, sys_timerfd_settime) #define __NR_utimensat_time64 412 __SYSCALL(__NR_utimensat_time64, sys_utimensat) #define __NR_io_pgetevents_time64 416 __SYSCALL(__NR_io_pgetevents_time64, sys_io_pgetevents) #define __NR_mq_timedsend_time64 418 __SYSCALL(__NR_mq_timedsend_time64, sys_mq_timedsend) #define __NR_mq_timedreceive_time64 419 __SYSCALL(__NR_mq_timedreceive_time64, sys_mq_timedreceive) #define __NR_semtimedop_time64 420 __SYSCALL(__NR_semtimedop_time64, sys_semtimedop) #define __NR_futex_time64 422 __SYSCALL(__NR_futex_time64, sys_futex) #define __NR_sched_rr_get_interval_time64 423 __SYSCALL(__NR_sched_rr_get_interval_time64, sys_sched_rr_get_interval) #endif #define __NR_pidfd_send_signal 424 __SYSCALL(__NR_pidfd_send_signal, sys_pidfd_send_signal) #define __NR_io_uring_setup 425 __SYSCALL(__NR_io_uring_setup, sys_io_uring_setup) #define __NR_io_uring_enter 426 __SYSCALL(__NR_io_uring_enter, sys_io_uring_enter) #define __NR_io_uring_register 427 __SYSCALL(__NR_io_uring_register, sys_io_uring_register) #define __NR_open_tree 428 __SYSCALL(__NR_open_tree, sys_open_tree) #define __NR_move_mount 429 __SYSCALL(__NR_move_mount, sys_move_mount) #define __NR_fsopen 430 __SYSCALL(__NR_fsopen, sys_fsopen) #define __NR_fsconfig 431 __SYSCALL(__NR_fsconfig, sys_fsconfig) #define __NR_fsmount 432 __SYSCALL(__NR_fsmount, sys_fsmount) #define __NR_fspick 433 __SYSCALL(__NR_fspick, sys_fspick) #define __NR_close_range 436 __SYSCALL(__NR_close_range, sys_close_range) #define __NR_faccessat2 439 __SYSCALL(__NR_faccessat2, sys_faccessat2) #define __NR_openat2 437 __SYSCALL(__NR_openat2, sys_openat2) #undef __NR_syscalls #define __NR_syscalls 441 /* * 32 bit systems traditionally used different * syscalls for off_t and loff_t arguments, while * 64 bit systems only need the off_t version. * For new 32 bit platforms, there is no need to * implement the old 32 bit off_t syscalls, so * they take different names. * Here we map the numbers so that both versions * use the same syscall table layout. */ #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) #define __NR_fcntl __NR3264_fcntl #define __NR_statfs __NR3264_statfs #define __NR_fstatfs __NR3264_fstatfs #define __NR_truncate __NR3264_truncate #define __NR_ftruncate __NR3264_ftruncate #define __NR_lseek __NR3264_lseek #define __NR_sendfile __NR3264_sendfile #define __NR_newfstatat __NR3264_fstatat #define __NR_fstat __NR3264_fstat #define __NR_mmap __NR3264_mmap #define __NR_fadvise64 __NR3264_fadvise64 #ifdef __NR3264_stat #define __NR_stat __NR3264_stat #define __NR_lstat __NR3264_lstat #endif #else #define __NR_fcntl64 __NR3264_fcntl #define __NR_statfs64 __NR3264_statfs #define __NR_fstatfs64 __NR3264_fstatfs #define __NR_truncate64 __NR3264_truncate #define __NR_ftruncate64 __NR3264_ftruncate #define __NR_llseek __NR3264_lseek #define __NR_sendfile64 __NR3264_sendfile #define __NR_fstatat64 __NR3264_fstatat #define __NR_fstat64 __NR3264_fstat #define __NR_mmap2 __NR3264_mmap #define __NR_fadvise64_64 __NR3264_fadvise64 #ifdef __NR3264_stat #define __NR_stat64 __NR3264_stat #define __NR_lstat64 __NR3264_lstat #endif #endif PKZ},llasm-generic/termbits.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_TERMBITS_H #define __ASM_GENERIC_TERMBITS_H #include typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; #define NCCS 19 struct termios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ }; struct termios2 { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ }; struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ }; /* c_cc characters */ #define VINTR 0 #define VQUIT 1 #define VERASE 2 #define VKILL 3 #define VEOF 4 #define VTIME 5 #define VMIN 6 #define VSWTC 7 #define VSTART 8 #define VSTOP 9 #define VSUSP 10 #define VEOL 11 #define VREPRINT 12 #define VDISCARD 13 #define VWERASE 14 #define VLNEXT 15 #define VEOL2 16 /* c_iflag bits */ #define IGNBRK 0000001 #define BRKINT 0000002 #define IGNPAR 0000004 #define PARMRK 0000010 #define INPCK 0000020 #define ISTRIP 0000040 #define INLCR 0000100 #define IGNCR 0000200 #define ICRNL 0000400 #define IUCLC 0001000 #define IXON 0002000 #define IXANY 0004000 #define IXOFF 0010000 #define IMAXBEL 0020000 #define IUTF8 0040000 /* c_oflag bits */ #define OPOST 0000001 #define OLCUC 0000002 #define ONLCR 0000004 #define OCRNL 0000010 #define ONOCR 0000020 #define ONLRET 0000040 #define OFILL 0000100 #define OFDEL 0000200 #define NLDLY 0000400 #define NL0 0000000 #define NL1 0000400 #define CRDLY 0003000 #define CR0 0000000 #define CR1 0001000 #define CR2 0002000 #define CR3 0003000 #define TABDLY 0014000 #define TAB0 0000000 #define TAB1 0004000 #define TAB2 0010000 #define TAB3 0014000 #define XTABS 0014000 #define BSDLY 0020000 #define BS0 0000000 #define BS1 0020000 #define VTDLY 0040000 #define VT0 0000000 #define VT1 0040000 #define FFDLY 0100000 #define FF0 0000000 #define FF1 0100000 /* c_cflag bit meaning */ #define CBAUD 0010017 #define B0 0000000 /* hang up */ #define B50 0000001 #define B75 0000002 #define B110 0000003 #define B134 0000004 #define B150 0000005 #define B200 0000006 #define B300 0000007 #define B600 0000010 #define B1200 0000011 #define B1800 0000012 #define B2400 0000013 #define B4800 0000014 #define B9600 0000015 #define B19200 0000016 #define B38400 0000017 #define EXTA B19200 #define EXTB B38400 #define CSIZE 0000060 #define CS5 0000000 #define CS6 0000020 #define CS7 0000040 #define CS8 0000060 #define CSTOPB 0000100 #define CREAD 0000200 #define PARENB 0000400 #define PARODD 0001000 #define HUPCL 0002000 #define CLOCAL 0004000 #define CBAUDEX 0010000 #define BOTHER 0010000 #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 #define CIBAUD 002003600000 /* input baud rate */ #define CMSPAR 010000000000 /* mark or space (stick) parity */ #define CRTSCTS 020000000000 /* flow control */ #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ /* c_lflag bits */ #define ISIG 0000001 #define ICANON 0000002 #define XCASE 0000004 #define ECHO 0000010 #define ECHOE 0000020 #define ECHOK 0000040 #define ECHONL 0000100 #define NOFLSH 0000200 #define TOSTOP 0000400 #define ECHOCTL 0001000 #define ECHOPRT 0002000 #define ECHOKE 0004000 #define FLUSHO 0010000 #define PENDIN 0040000 #define IEXTEN 0100000 #define EXTPROC 0200000 /* tcflow() and TCXONC use these */ #define TCOOFF 0 #define TCOON 1 #define TCIOFF 2 #define TCION 3 /* tcflush() and TCFLSH use these */ #define TCIFLUSH 0 #define TCOFLUSH 1 #define TCIOFLUSH 2 /* tcsetattr uses these */ #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 #endif /* __ASM_GENERIC_TERMBITS_H */ PKZE  asm-generic/signal-defs.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SIGNAL_DEFS_H #define __ASM_GENERIC_SIGNAL_DEFS_H #ifndef SIG_BLOCK #define SIG_BLOCK 0 /* for blocking signals */ #endif #ifndef SIG_UNBLOCK #define SIG_UNBLOCK 1 /* for unblocking signals */ #endif #ifndef SIG_SETMASK #define SIG_SETMASK 2 /* for setting the signal mask */ #endif #ifndef __ASSEMBLY__ typedef void __signalfn_t(int); typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); typedef __restorefn_t *__sigrestore_t; #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ #endif #endif /* __ASM_GENERIC_SIGNAL_DEFS_H */ PKZLasm-generic/mman.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_MMAN_H #define __ASM_GENERIC_MMAN_H #include #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ #define MAP_LOCKED 0x2000 /* pages are locked */ #define MAP_NORESERVE 0x4000 /* don't check for reservations */ /* * Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h * for MAP_HUGETLB usage */ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ #define MCL_ONFAULT 4 /* lock all pages that are faulted in */ #endif /* __ASM_GENERIC_MMAN_H */ PKZ-$``asm-generic/kvm_para.hnu[/* * There isn't anything here, but the file must not be empty or patch * will delete it. */ PKZ 6>4//asm-generic/statfs.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _GENERIC_STATFS_H #define _GENERIC_STATFS_H #include /* * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. * Yes, they differ in signedness as well as size. * Special cases can override it for themselves -- except for S390x, which * is just a little too special for us. And MIPS, which I'm not touching * with a 10' pole. */ #ifndef __statfs_word #if __BITS_PER_LONG == 64 #define __statfs_word __kernel_long_t #else #define __statfs_word __u32 #endif #endif struct statfs { __statfs_word f_type; __statfs_word f_bsize; __statfs_word f_blocks; __statfs_word f_bfree; __statfs_word f_bavail; __statfs_word f_files; __statfs_word f_ffree; __kernel_fsid_t f_fsid; __statfs_word f_namelen; __statfs_word f_frsize; __statfs_word f_flags; __statfs_word f_spare[4]; }; /* * ARM needs to avoid the 32-bit padding at the end, for consistency * between EABI and OABI */ #ifndef ARCH_PACK_STATFS64 #define ARCH_PACK_STATFS64 #endif struct statfs64 { __statfs_word f_type; __statfs_word f_bsize; __u64 f_blocks; __u64 f_bfree; __u64 f_bavail; __u64 f_files; __u64 f_ffree; __kernel_fsid_t f_fsid; __statfs_word f_namelen; __statfs_word f_frsize; __statfs_word f_flags; __statfs_word f_spare[4]; } ARCH_PACK_STATFS64; /* * IA64 and x86_64 need to avoid the 32-bit padding at the end, * to be compatible with the i386 ABI */ #ifndef ARCH_PACK_COMPAT_STATFS64 #define ARCH_PACK_COMPAT_STATFS64 #endif struct compat_statfs64 { __u32 f_type; __u32 f_bsize; __u64 f_blocks; __u64 f_bfree; __u64 f_bavail; __u64 f_files; __u64 f_ffree; __kernel_fsid_t f_fsid; __u32 f_namelen; __u32 f_frsize; __u32 f_flags; __u32 f_spare[4]; } ARCH_PACK_COMPAT_STATFS64; #endif /* _GENERIC_STATFS_H */ PKZ_c asm-generic/signal.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SIGNAL_H #define __ASM_GENERIC_SIGNAL_H #include #define _NSIG 64 #define _NSIG_BPW __BITS_PER_LONG #define _NSIG_WORDS (_NSIG / _NSIG_BPW) #define SIGHUP 1 #define SIGINT 2 #define SIGQUIT 3 #define SIGILL 4 #define SIGTRAP 5 #define SIGABRT 6 #define SIGIOT 6 #define SIGBUS 7 #define SIGFPE 8 #define SIGKILL 9 #define SIGUSR1 10 #define SIGSEGV 11 #define SIGUSR2 12 #define SIGPIPE 13 #define SIGALRM 14 #define SIGTERM 15 #define SIGSTKFLT 16 #define SIGCHLD 17 #define SIGCONT 18 #define SIGSTOP 19 #define SIGTSTP 20 #define SIGTTIN 21 #define SIGTTOU 22 #define SIGURG 23 #define SIGXCPU 24 #define SIGXFSZ 25 #define SIGVTALRM 26 #define SIGPROF 27 #define SIGWINCH 28 #define SIGIO 29 #define SIGPOLL SIGIO /* #define SIGLOST 29 */ #define SIGPWR 30 #define SIGSYS 31 #define SIGUNUSED 31 /* These should not be considered constants from userland. */ #define SIGRTMIN 32 #ifndef SIGRTMAX #define SIGRTMAX _NSIG #endif /* * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. * SA_NODEFER prevents the current signal from being masked in the handler. * * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single * Unix names RESETHAND and NODEFER respectively. */ #define SA_NOCLDSTOP 0x00000001 #define SA_NOCLDWAIT 0x00000002 #define SA_SIGINFO 0x00000004 #define SA_ONSTACK 0x08000000 #define SA_RESTART 0x10000000 #define SA_NODEFER 0x40000000 #define SA_RESETHAND 0x80000000 #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND /* * New architectures should not define the obsolete * SA_RESTORER 0x04000000 */ #if !defined MINSIGSTKSZ || !defined SIGSTKSZ #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 #endif #ifndef __ASSEMBLY__ typedef struct { unsigned long sig[_NSIG_WORDS]; } sigset_t; /* not actually used, but required for linux/syscalls.h */ typedef unsigned long old_sigset_t; #include #ifdef SA_RESTORER #define __ARCH_HAS_SA_RESTORER #endif struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; #ifdef SA_RESTORER __sigrestore_t sa_restorer; #endif sigset_t sa_mask; /* mask last for extensibility */ }; typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; #endif /* __ASSEMBLY__ */ #endif /* __ASM_GENERIC_SIGNAL_H */ PKZMDwVasm-generic/auxvec.hnu[#ifndef __ASM_GENERIC_AUXVEC_H #define __ASM_GENERIC_AUXVEC_H /* * Not all architectures need their own auxvec.h, the most * common definitions are already in linux/auxvec.h. */ #endif /* __ASM_GENERIC_AUXVEC_H */ PKZac``asm-generic/int-ll64.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * asm-generic/int-ll64.h * * Integer declarations for architectures which use "long long" * for 64-bit types. */ #ifndef _ASM_GENERIC_INT_LL64_H #define _ASM_GENERIC_INT_LL64_H #include #ifndef __ASSEMBLY__ /* * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the * header files exported to user space */ typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; #ifdef __GNUC__ __extension__ typedef __signed__ long long __s64; __extension__ typedef unsigned long long __u64; #else typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif #endif /* __ASSEMBLY__ */ #endif /* _ASM_GENERIC_INT_LL64_H */ PKZ\)asm-generic/setup.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_GENERIC_SETUP_H #define __ASM_GENERIC_SETUP_H #define COMMAND_LINE_SIZE 512 #endif /* __ASM_GENERIC_SETUP_H */ PKZHI ncurses_dll.hnu[/**************************************************************************** * Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /* $Id: ncurses_dll.h.in,v 1.9 2014/08/02 21:30:20 tom Exp $ */ #ifndef NCURSES_DLL_H_incl #define NCURSES_DLL_H_incl 1 /* 2014-08-02 workaround for broken MinGW compiler. * Oddly, only TRACE is mapped to trace - the other -D's are okay. * suggest TDM as an alternative. */ #if defined(__MINGW64__) #elif defined(__MINGW32__) #if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) #ifdef trace #undef trace #define TRACE #endif #endif /* broken compiler */ #endif /* MingW */ /* * For reentrant code, we map the various global variables into SCREEN by * using functions to access them. */ #define NCURSES_PUBLIC_VAR(name) _nc_##name #define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void) /* no longer needed on cygwin or mingw, thanks to auto-import */ /* but this structure may be useful at some point for an MSVC build */ /* so, for now unconditionally define the important flags */ /* "the right way" for proper static and dll+auto-import behavior */ #undef NCURSES_DLL #define NCURSES_STATIC #if defined(__CYGWIN__) || defined(__MINGW32__) # if defined(NCURSES_DLL) # if defined(NCURSES_STATIC) # undef NCURSES_STATIC # endif # endif # undef NCURSES_IMPEXP # undef NCURSES_API # undef NCURSES_EXPORT # undef NCURSES_EXPORT_VAR # if defined(NCURSES_DLL) /* building a DLL */ # define NCURSES_IMPEXP __declspec(dllexport) # elif defined(NCURSES_STATIC) /* building or linking to a static library */ # define NCURSES_IMPEXP /* nothing */ # else /* linking to the DLL */ # define NCURSES_IMPEXP __declspec(dllimport) # endif # define NCURSES_API __cdecl # define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API # define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type #endif /* Take care of non-cygwin platforms */ #if !defined(NCURSES_IMPEXP) # define NCURSES_IMPEXP /* nothing */ #endif #if !defined(NCURSES_API) # define NCURSES_API /* nothing */ #endif #if !defined(NCURSES_EXPORT) # define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API #endif #if !defined(NCURSES_EXPORT_VAR) # define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type #endif #endif /* NCURSES_DLL_H_incl */ PKZtTFkrb5.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* The MIT Kerberos header file krb5.h used to live here. As of the 1.5 release, we're installing multiple Kerberos headers, so they're all moving to a krb5/ subdirectory. This file is present just to keep old software still compiling. Please update your code to use the new path for the header. */ #include PKZUЂ( jconfig.hnu[#ifndef JCONFIG_H_MULTILIB #define JCONFIG_H_MULTILIB #include #if __WORDSIZE == 32 # include "jconfig-32.h" #elif __WORDSIZE == 64 # include "jconfig-64.h" #else # error "unexpected value for __WORDSIZE macro" #endif #endif PKZ* proc_service.hnu[/* Callback interface for libthread_db, functions users must define. Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _PROC_SERVICE_H #define _PROC_SERVICE_H 1 /* The definitions in this file must correspond to those in the debugger. */ #include __BEGIN_DECLS /* Functions in this interface return one of these status codes. */ typedef enum { PS_OK, /* Generic "call succeeded". */ PS_ERR, /* Generic error. */ PS_BADPID, /* Bad process handle. */ PS_BADLID, /* Bad LWP identifier. */ PS_BADADDR, /* Bad address. */ PS_NOSYM, /* Could not find given symbol. */ PS_NOFREGS /* FPU register set not available for given LWP. */ } ps_err_e; /* This type is opaque in this interface. It's defined by the user of libthread_db. */ struct ps_prochandle; /* Read or write process memory at the given address. */ extern ps_err_e ps_pdread (struct ps_prochandle *, psaddr_t, void *, size_t); extern ps_err_e ps_pdwrite (struct ps_prochandle *, psaddr_t, const void *, size_t); extern ps_err_e ps_ptread (struct ps_prochandle *, psaddr_t, void *, size_t); extern ps_err_e ps_ptwrite (struct ps_prochandle *, psaddr_t, const void *, size_t); /* Get and set the given LWP's general or FPU register set. */ extern ps_err_e ps_lgetregs (struct ps_prochandle *, lwpid_t, prgregset_t); extern ps_err_e ps_lsetregs (struct ps_prochandle *, lwpid_t, const prgregset_t); extern ps_err_e ps_lgetfpregs (struct ps_prochandle *, lwpid_t, prfpregset_t *); extern ps_err_e ps_lsetfpregs (struct ps_prochandle *, lwpid_t, const prfpregset_t *); /* Return the PID of the process. */ extern pid_t ps_getpid (struct ps_prochandle *); /* Fetch the special per-thread address associated with the given LWP. This call is only used on a few platforms (most use a normal register). The meaning of the `int' parameter is machine-dependent. */ extern ps_err_e ps_get_thread_area (struct ps_prochandle *, lwpid_t, int, psaddr_t *); /* Look up the named symbol in the named DSO in the symbol tables associated with the process being debugged, filling in *SYM_ADDR with the corresponding run-time address. */ extern ps_err_e ps_pglobal_lookup (struct ps_prochandle *, const char *object_name, const char *sym_name, psaddr_t *sym_addr); /* Stop or continue the entire process. */ extern ps_err_e ps_pstop (struct ps_prochandle *); extern ps_err_e ps_pcontinue (struct ps_prochandle *); /* Stop or continue the given LWP alone. */ extern ps_err_e ps_lstop (struct ps_prochandle *, lwpid_t); extern ps_err_e ps_lcontinue (struct ps_prochandle *, lwpid_t); __END_DECLS #endif /* proc_service.h */ PKZU@$$ punycode.hnu[/* punycode.h --- Declarations for punycode functions. Copyright (C) 2002-2016 Simon Josefsson This file is part of GNU Libidn. GNU Libidn is free software: you can redistribute it and/or modify it under the terms of either: * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. or * the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. or both in parallel, as here. GNU Libidn is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received copies of the GNU General Public License and the GNU Lesser General Public License along with this program. If not, see . */ /* * This file is derived from RFC 3492bis written by Adam M. Costello, * downloaded from http://www.nicemice.net/idn/punycode-spec.gz on * 2015-03-02 with SHA1 a966a8017f6be579d74a50a226accc7607c40133, a * copy of which is stored in the GNU Libidn version controlled * repository under doc/specification/punycode-spec.gz. * * The changes compared to Adam's file include: re-indentation, adding * the license boilerplate and this comment, adding the #ifndef * PUNYCODE_H and IDNAPI blocks, changing the return code of * punycode_encode and punycode_decode from enum to int, simplifying * the definition of punycode_uint by #include'ing idn-int.h and using * uint32_t instead of limit.h-based code, adding Punycode_status and * punycode_strerror, adding 'extern IDNAPI' declarations to function * prototypes, and mentioning variable names in function prototypes. * * Adam's file contains the following: * * punycode-sample.c 2.0.0 (2004-Mar-21-Sun) * http://www.nicemice.net/idn/ * Adam M. Costello * http://www.nicemice.net/amc/ * * This is ANSI C code (C89) implementing Punycode 1.0.x. * * Disclaimer and license: Regarding this entire document or any * portion of it (including the pseudocode and C code), the author * makes no guarantees and is not responsible for any damage resulting * from its use. The author grants irrevocable permission to anyone * to use, modify, and distribute it in any way that does not diminish * the rights of anyone else to use, modify, and distribute it, * provided that redistributed derivative works do not contain * misleading author or version information. Derivative works need * not be licensed under similar terms. */ #ifndef PUNYCODE_H # define PUNYCODE_H # ifndef IDNAPI # if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY # define IDNAPI __attribute__((__visibility__("default"))) # elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC # define IDNAPI __declspec(dllexport) # elif defined _MSC_VER && ! defined LIBIDN_STATIC # define IDNAPI __declspec(dllimport) # else # define IDNAPI # endif # endif #ifdef __cplusplus extern "C" { #endif /************************************************************/ /* Public interface (would normally go in its own .h file): */ #include /* size_t */ #include /* uint32_t */ enum punycode_status { punycode_success = 0, punycode_bad_input = 1, /* Input is invalid. */ punycode_big_output = 2, /* Output would exceed the space provided. */ punycode_overflow = 3 /* Wider integers needed to process input. */ }; typedef enum { PUNYCODE_SUCCESS = punycode_success, PUNYCODE_BAD_INPUT = punycode_bad_input, PUNYCODE_BIG_OUTPUT = punycode_big_output, PUNYCODE_OVERFLOW = punycode_overflow } Punycode_status; extern IDNAPI const char *punycode_strerror (Punycode_status rc); /* punycode_uint needs to be unsigned and needs to be */ /* at least 26 bits wide. The particular type can be */ /* specified by defining PUNYCODE_UINT, otherwise a */ /* suitable type will be chosen automatically. */ typedef uint32_t punycode_uint; extern IDNAPI int punycode_encode (size_t input_length, const punycode_uint input[], const unsigned char case_flags[], size_t * output_length, char output[]); /* punycode_encode() converts a sequence of code points (presumed to be Unicode code points) to Punycode. Input arguments (to be supplied by the caller): input_length The number of code points in the input array and the number of flags in the case_flags array. input An array of code points. They are presumed to be Unicode code points, but that is not strictly necessary. The array contains code points, not code units. UTF-16 uses code units D800 through DFFF to refer to code points 10000..10FFFF. The code points D800..DFFF do not occur in any valid Unicode string. The code points that can occur in Unicode strings (0..D7FF and E000..10FFFF) are also called Unicode scalar values. case_flags A null pointer or an array of boolean values parallel to the input array. Nonzero (true, flagged) suggests that the corresponding Unicode character be forced to uppercase after being decoded (if possible), and zero (false, unflagged) suggests that it be forced to lowercase (if possible). ASCII code points (0..7F) are encoded literally, except that ASCII letters are forced to uppercase or lowercase according to the corresponding case flags. If case_flags is a null pointer then ASCII letters are left as they are, and other code points are treated as unflagged. Output arguments (to be filled in by the function): output An array of ASCII code points. It is *not* null-terminated; it will contain zeros if and only if the input contains zeros. (Of course the caller can leave room for a terminator and add one if needed.) Input/output arguments (to be supplied by the caller and overwritten by the function): output_length The caller passes in the maximum number of ASCII code points that it can receive. On successful return it will contain the number of ASCII code points actually output. Return value: Can be any of the punycode_status values defined above except punycode_bad_input. If not punycode_success, then output_size and output might contain garbage. */ extern IDNAPI int punycode_decode (size_t input_length, const char input[], size_t * output_length, punycode_uint output[], unsigned char case_flags[]); /* punycode_decode() converts Punycode to a sequence of code points (presumed to be Unicode code points). Input arguments (to be supplied by the caller): input_length The number of ASCII code points in the input array. input An array of ASCII code points (0..7F). Output arguments (to be filled in by the function): output An array of code points like the input argument of punycode_encode() (see above). case_flags A null pointer (if the flags are not needed by the caller) or an array of boolean values parallel to the output array. Nonzero (true, flagged) suggests that the corresponding Unicode character be forced to uppercase by the caller (if possible), and zero (false, unflagged) suggests that it be forced to lowercase (if possible). ASCII code points (0..7F) are output already in the proper case, but their flags will be set appropriately so that applying the flags would be harmless. Input/output arguments (to be supplied by the caller and overwritten by the function): output_length The caller passes in the maximum number of code points that it can receive into the output array (which is also the maximum number of flags that it can receive into the case_flags array, if case_flags is not a null pointer). On successful return it will contain the number of code points actually output (which is also the number of flags actually output, if case_flags is not a null pointer). The decoder will never need to output more code points than the number of ASCII code points in the input, because of the way the encoding is defined. The number of code points output cannot exceed the maximum possible value of a punycode_uint, even if the supplied output_length is greater than that. Return value: Can be any of the punycode_status values defined above. If not punycode_success, then output_length, output, and case_flags might contain garbage. */ #ifdef __cplusplus } #endif #endif /* PUNYCODE_H */ PKZT7@ stdio_ext.hnu[/* Functions to access FILE structure internals. Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This header contains the same definitions as the header of the same name on Sun's Solaris OS. */ #ifndef _STDIO_EXT_H #define _STDIO_EXT_H 1 #include enum { /* Query current state of the locking status. */ FSETLOCKING_QUERY = 0, #define FSETLOCKING_QUERY FSETLOCKING_QUERY /* The library protects all uses of the stream functions, except for uses of the *_unlocked functions, by calls equivalent to flockfile(). */ FSETLOCKING_INTERNAL, #define FSETLOCKING_INTERNAL FSETLOCKING_INTERNAL /* The user will take care of locking. */ FSETLOCKING_BYCALLER #define FSETLOCKING_BYCALLER FSETLOCKING_BYCALLER }; __BEGIN_DECLS /* Return the size of the buffer of FP in bytes currently in use by the given stream. */ extern size_t __fbufsize (FILE *__fp) __THROW; /* Return non-zero value iff the stream FP is opened readonly, or if the last operation on the stream was a read operation. */ extern int __freading (FILE *__fp) __THROW; /* Return non-zero value iff the stream FP is opened write-only or append-only, or if the last operation on the stream was a write operation. */ extern int __fwriting (FILE *__fp) __THROW; /* Return non-zero value iff stream FP is not opened write-only or append-only. */ extern int __freadable (FILE *__fp) __THROW; /* Return non-zero value iff stream FP is not opened read-only. */ extern int __fwritable (FILE *__fp) __THROW; /* Return non-zero value iff the stream FP is line-buffered. */ extern int __flbf (FILE *__fp) __THROW; /* Discard all pending buffered I/O on the stream FP. */ extern void __fpurge (FILE *__fp) __THROW; /* Return amount of output in bytes pending on a stream FP. */ extern size_t __fpending (FILE *__fp) __THROW; /* Flush all line-buffered files. */ extern void _flushlbf (void); /* Set locking status of stream FP to TYPE. */ extern int __fsetlocking (FILE *__fp, int __type) __THROW; __END_DECLS #endif /* stdio_ext.h */ PKZ*J:: jmorecfg.hnu[/* * jmorecfg.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1997, Thomas G. Lane. * Modified 1997-2009 by Guido Vollbeding. * libjpeg-turbo Modifications: * Copyright (C) 2009, 2011, 2014-2015, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file contains additional configuration options that customize the * JPEG software for special applications or support machine-dependent * optimizations. Most users will not need to touch this file. */ /* * Maximum number of components (color channels) allowed in JPEG image. * To meet the letter of the JPEG spec, set this to 255. However, darn * few applications need more than 4 channels (maybe 5 for CMYK + alpha * mask). We recommend 10 as a reasonable compromise; use 4 if you are * really short on memory. (Each allowed component costs a hundred or so * bytes of storage, whether actually used in an image or not.) */ #define MAX_COMPONENTS 10 /* maximum number of image components */ /* * Basic data types. * You may need to change these if you have a machine with unusual data * type sizes; for example, "char" not 8 bits, "short" not 16 bits, * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, * but it had better be at least 16. */ /* Representation of a single sample (pixel element value). * We frequently allocate large arrays of these, so it's important to keep * them small. But if you have memory to burn and access to char or short * arrays is very slow on your hardware, you might want to change these. */ #if BITS_IN_JSAMPLE == 8 /* JSAMPLE should be the smallest type that will hold the values 0..255. * You can use a signed char by having GETJSAMPLE mask it with 0xFF. */ #ifdef HAVE_UNSIGNED_CHAR typedef unsigned char JSAMPLE; #define GETJSAMPLE(value) ((int) (value)) #else /* not HAVE_UNSIGNED_CHAR */ typedef char JSAMPLE; #ifdef __CHAR_UNSIGNED__ #define GETJSAMPLE(value) ((int) (value)) #else #define GETJSAMPLE(value) ((int) (value) & 0xFF) #endif /* __CHAR_UNSIGNED__ */ #endif /* HAVE_UNSIGNED_CHAR */ #define MAXJSAMPLE 255 #define CENTERJSAMPLE 128 #endif /* BITS_IN_JSAMPLE == 8 */ #if BITS_IN_JSAMPLE == 12 /* JSAMPLE should be the smallest type that will hold the values 0..4095. * On nearly all machines "short" will do nicely. */ typedef short JSAMPLE; #define GETJSAMPLE(value) ((int) (value)) #define MAXJSAMPLE 4095 #define CENTERJSAMPLE 2048 #endif /* BITS_IN_JSAMPLE == 12 */ /* Representation of a DCT frequency coefficient. * This should be a signed value of at least 16 bits; "short" is usually OK. * Again, we allocate large arrays of these, but you can change to int * if you have memory to burn and "short" is really slow. */ typedef short JCOEF; /* Compressed datastreams are represented as arrays of JOCTET. * These must be EXACTLY 8 bits wide, at least once they are written to * external storage. Note that when using the stdio data source/destination * managers, this is also the data type passed to fread/fwrite. */ #ifdef HAVE_UNSIGNED_CHAR typedef unsigned char JOCTET; #define GETJOCTET(value) (value) #else /* not HAVE_UNSIGNED_CHAR */ typedef char JOCTET; #ifdef __CHAR_UNSIGNED__ #define GETJOCTET(value) (value) #else #define GETJOCTET(value) ((value) & 0xFF) #endif /* __CHAR_UNSIGNED__ */ #endif /* HAVE_UNSIGNED_CHAR */ /* These typedefs are used for various table entries and so forth. * They must be at least as wide as specified; but making them too big * won't cost a huge amount of memory, so we don't provide special * extraction code like we did for JSAMPLE. (In other words, these * typedefs live at a different point on the speed/space tradeoff curve.) */ /* UINT8 must hold at least the values 0..255. */ #ifdef HAVE_UNSIGNED_CHAR typedef unsigned char UINT8; #else /* not HAVE_UNSIGNED_CHAR */ #ifdef __CHAR_UNSIGNED__ typedef char UINT8; #else /* not __CHAR_UNSIGNED__ */ typedef short UINT8; #endif /* __CHAR_UNSIGNED__ */ #endif /* HAVE_UNSIGNED_CHAR */ /* UINT16 must hold at least the values 0..65535. */ #ifdef HAVE_UNSIGNED_SHORT typedef unsigned short UINT16; #else /* not HAVE_UNSIGNED_SHORT */ typedef unsigned int UINT16; #endif /* HAVE_UNSIGNED_SHORT */ /* INT16 must hold at least the values -32768..32767. */ #ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ typedef short INT16; #endif /* INT32 must hold at least signed 32-bit values. * * NOTE: The INT32 typedef dates back to libjpeg v5 (1994.) Integers were * sometimes 16-bit back then (MS-DOS), which is why INT32 is typedef'd to * long. It also wasn't common (or at least as common) in 1994 for INT32 to be * defined by platform headers. Since then, however, INT32 is defined in * several other common places: * * Xmd.h (X11 header) typedefs INT32 to int on 64-bit platforms and long on * 32-bit platforms (i.e always a 32-bit signed type.) * * basetsd.h (Win32 header) typedefs INT32 to int (always a 32-bit signed type * on modern platforms.) * * qglobal.h (Qt header) typedefs INT32 to int (always a 32-bit signed type on * modern platforms.) * * This is a recipe for conflict, since "long" and "int" aren't always * compatible types. Since the definition of INT32 has technically been part * of the libjpeg API for more than 20 years, we can't remove it, but we do not * use it internally any longer. We instead define a separate type (JLONG) * for internal use, which ensures that internal behavior will always be the * same regardless of any external headers that may be included. */ #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ #ifndef _BASETSD_H /* MinGW is slightly different */ #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ typedef long INT32; #endif #endif #endif #endif /* Datatype used for image dimensions. The JPEG standard only supports * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore * "unsigned int" is sufficient on all machines. However, if you need to * handle larger images and you don't mind deviating from the spec, you * can change this datatype. (Note that changing this datatype will * potentially require modifying the SIMD code. The x86-64 SIMD extensions, * in particular, assume a 32-bit JDIMENSION.) */ typedef unsigned int JDIMENSION; #define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ /* These macros are used in all function definitions and extern declarations. * You could modify them if you need to change function linkage conventions; * in particular, you'll need to do that to make the library a Windows DLL. * Another application is to make all functions global for use with debuggers * or code profilers that require it. */ /* a function called through method pointers: */ #define METHODDEF(type) static type /* a function used only in its module: */ #define LOCAL(type) static type /* a function referenced thru EXTERNs: */ #define GLOBAL(type) type /* a reference to a GLOBAL function: */ #define EXTERN(type) extern type /* Originally, this macro was used as a way of defining function prototypes * for both modern compilers as well as older compilers that did not support * prototype parameters. libjpeg-turbo has never supported these older, * non-ANSI compilers, but the macro is still included because there is some * software out there that uses it. */ #define JMETHOD(type,methodname,arglist) type (*methodname) arglist /* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS), * but again, some software relies on this macro. */ #undef FAR #define FAR /* * On a few systems, type boolean and/or its values FALSE, TRUE may appear * in standard header files. Or you may have conflicts with application- * specific header files that you want to include together with these files. * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. */ #ifndef HAVE_BOOLEAN typedef int boolean; #endif #ifndef FALSE /* in case these macros already exist */ #define FALSE 0 /* values of boolean */ #endif #ifndef TRUE #define TRUE 1 #endif /* * The remaining options affect code selection within the JPEG library, * but they don't need to be visible to most applications using the library. * To minimize application namespace pollution, the symbols won't be * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. */ #ifdef JPEG_INTERNALS #define JPEG_INTERNAL_OPTIONS #endif #ifdef JPEG_INTERNAL_OPTIONS /* * These defines indicate whether to include various optional functions. * Undefining some of these symbols will produce a smaller but less capable * library. Note that you can leave certain source files out of the * compilation/linking process if you've #undef'd the corresponding symbols. * (You may HAVE to do that if your compiler doesn't like null source files.) */ /* Capability options common to encoder and decoder: */ #define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ #define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ #define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ /* Encoder capability options: */ #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ /* Note: if you selected 12-bit data precision, it is dangerous to turn off * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit * precision, so jchuff.c normally uses entropy optimization to compute * usable tables for higher precision. If you don't want to do optimization, * you'll have to supply different default Huffman tables. * The exact same statements apply for progressive JPEG: the default tables * don't work for progressive mode. (This may get fixed, however.) */ #define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ /* Decoder capability options: */ #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ #define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ #define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ #define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ #define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ #undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ #define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ #define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ #define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ /* more capability options later, no doubt */ /* * The RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros are a vestigial * feature of libjpeg. The idea was that, if an application developer needed * to compress from/decompress to a BGR/BGRX/RGBX/XBGR/XRGB buffer, they could * change these macros, rebuild libjpeg, and link their application statically * with it. In reality, few people ever did this, because there were some * severe restrictions involved (cjpeg and djpeg no longer worked properly, * compressing/decompressing RGB JPEGs no longer worked properly, and the color * quantizer wouldn't work with pixel sizes other than 3.) Further, since all * of the O/S-supplied versions of libjpeg were built with the default values * of RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE, many applications have * come to regard these values as immutable. * * The libjpeg-turbo colorspace extensions provide a much cleaner way of * compressing from/decompressing to buffers with arbitrary component orders * and pixel sizes. Thus, we do not support changing the values of RGB_RED, * RGB_GREEN, RGB_BLUE, or RGB_PIXELSIZE. In addition to the restrictions * listed above, changing these values will also break the SIMD extensions and * the regression tests. */ #define RGB_RED 0 /* Offset of Red in an RGB scanline element */ #define RGB_GREEN 1 /* Offset of Green */ #define RGB_BLUE 2 /* Offset of Blue */ #define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ #define JPEG_NUMCS 17 #define EXT_RGB_RED 0 #define EXT_RGB_GREEN 1 #define EXT_RGB_BLUE 2 #define EXT_RGB_PIXELSIZE 3 #define EXT_RGBX_RED 0 #define EXT_RGBX_GREEN 1 #define EXT_RGBX_BLUE 2 #define EXT_RGBX_PIXELSIZE 4 #define EXT_BGR_RED 2 #define EXT_BGR_GREEN 1 #define EXT_BGR_BLUE 0 #define EXT_BGR_PIXELSIZE 3 #define EXT_BGRX_RED 2 #define EXT_BGRX_GREEN 1 #define EXT_BGRX_BLUE 0 #define EXT_BGRX_PIXELSIZE 4 #define EXT_XBGR_RED 3 #define EXT_XBGR_GREEN 2 #define EXT_XBGR_BLUE 1 #define EXT_XBGR_PIXELSIZE 4 #define EXT_XRGB_RED 1 #define EXT_XRGB_GREEN 2 #define EXT_XRGB_BLUE 3 #define EXT_XRGB_PIXELSIZE 4 static const int rgb_red[JPEG_NUMCS] = { -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED, EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, -1 }; static const int rgb_green[JPEG_NUMCS] = { -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN, EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, -1 }; static const int rgb_blue[JPEG_NUMCS] = { -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE, EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, -1 }; static const int rgb_pixelsize[JPEG_NUMCS] = { -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE, EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, -1 }; /* Definitions for speed-related optimizations. */ /* On some machines (notably 68000 series) "int" is 32 bits, but multiplying * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER * as short on such a machine. MULTIPLIER must be at least 16 bits wide. */ #ifndef MULTIPLIER #ifndef WITH_SIMD #define MULTIPLIER int /* type for fastest integer multiply */ #else #define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */ #endif #endif /* FAST_FLOAT should be either float or double, whichever is done faster * by your compiler. (Note that this type is only used in the floating point * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) */ #ifndef FAST_FLOAT #define FAST_FLOAT float #endif #endif /* JPEG_INTERNAL_OPTIONS */ PKZu;memory.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * SVID */ #ifndef _MEMORY_H #define _MEMORY_H 1 #include #ifndef _STRING_H # include #endif /* string.h */ #endif /* memory.h */ PKZ}HHmysql/my_list.hnu[/* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MY_LIST_INCLUDED #define MY_LIST_INCLUDED /** @file include/my_list.h */ typedef struct LIST { struct LIST *prev, *next; void *data; } LIST; typedef int (*list_walk_action)(void *, void *); extern LIST *list_add(LIST *root, LIST *element); extern LIST *list_delete(LIST *root, LIST *element); extern LIST *list_cons(void *data, LIST *root); extern LIST *list_reverse(LIST *root); extern void list_free(LIST *root, unsigned int free_data); extern unsigned int list_length(LIST *); extern int list_walk(LIST *, list_walk_action action, unsigned char *argument); #define list_rest(a) ((a)->next) #endif // MY_LIST_INCLUDED PKZR}mysql/mysqld_error.hnu[/* Copyright (c) 2000, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Autogenerated file, please don't edit */ #ifndef MYSQLD_ERROR_INCLUDED #define MYSQLD_ERROR_INCLUDED static const int errmsg_section_start[] = { 1000, 3000, 3500, 10000 }; static const int errmsg_section_size[] = { 888, 239, 667, 4078 }; static const int total_error_count = 5872; //#define OBSOLETE_ER_HASHCHK 1000 //#define OBSOLETE_ER_NISAMCHK 1001 #define ER_NO 1002 #define ER_YES 1003 #define ER_CANT_CREATE_FILE 1004 #define ER_CANT_CREATE_TABLE 1005 #define ER_CANT_CREATE_DB 1006 #define ER_DB_CREATE_EXISTS 1007 #define ER_DB_DROP_EXISTS 1008 //#define OBSOLETE_ER_DB_DROP_DELETE 1009 #define ER_DB_DROP_RMDIR 1010 //#define OBSOLETE_ER_CANT_DELETE_FILE 1011 #define ER_CANT_FIND_SYSTEM_REC 1012 #define ER_CANT_GET_STAT 1013 //#define OBSOLETE_ER_CANT_GET_WD 1014 #define ER_CANT_LOCK 1015 #define ER_CANT_OPEN_FILE 1016 #define ER_FILE_NOT_FOUND 1017 #define ER_CANT_READ_DIR 1018 //#define OBSOLETE_ER_CANT_SET_WD 1019 #define ER_CHECKREAD 1020 //#define OBSOLETE_ER_DISK_FULL 1021 #define ER_DUP_KEY 1022 //#define OBSOLETE_ER_ERROR_ON_CLOSE 1023 #define ER_ERROR_ON_READ 1024 #define ER_ERROR_ON_RENAME 1025 #define ER_ERROR_ON_WRITE 1026 #define ER_FILE_USED 1027 //#define OBSOLETE_ER_FILSORT_ABORT 1028 //#define OBSOLETE_ER_FORM_NOT_FOUND 1029 #define ER_GET_ERRNO 1030 #define ER_ILLEGAL_HA 1031 #define ER_KEY_NOT_FOUND 1032 #define ER_NOT_FORM_FILE 1033 #define ER_NOT_KEYFILE 1034 #define ER_OLD_KEYFILE 1035 #define ER_OPEN_AS_READONLY 1036 #define ER_OUTOFMEMORY 1037 #define ER_OUT_OF_SORTMEMORY 1038 //#define OBSOLETE_ER_UNEXPECTED_EOF 1039 #define ER_CON_COUNT_ERROR 1040 #define ER_OUT_OF_RESOURCES 1041 #define ER_BAD_HOST_ERROR 1042 #define ER_HANDSHAKE_ERROR 1043 #define ER_DBACCESS_DENIED_ERROR 1044 #define ER_ACCESS_DENIED_ERROR 1045 #define ER_NO_DB_ERROR 1046 #define ER_UNKNOWN_COM_ERROR 1047 #define ER_BAD_NULL_ERROR 1048 #define ER_BAD_DB_ERROR 1049 #define ER_TABLE_EXISTS_ERROR 1050 #define ER_BAD_TABLE_ERROR 1051 #define ER_NON_UNIQ_ERROR 1052 #define ER_SERVER_SHUTDOWN 1053 #define ER_BAD_FIELD_ERROR 1054 #define ER_WRONG_FIELD_WITH_GROUP 1055 #define ER_WRONG_GROUP_FIELD 1056 #define ER_WRONG_SUM_SELECT 1057 #define ER_WRONG_VALUE_COUNT 1058 #define ER_TOO_LONG_IDENT 1059 #define ER_DUP_FIELDNAME 1060 #define ER_DUP_KEYNAME 1061 #define ER_DUP_ENTRY 1062 #define ER_WRONG_FIELD_SPEC 1063 #define ER_PARSE_ERROR 1064 #define ER_EMPTY_QUERY 1065 #define ER_NONUNIQ_TABLE 1066 #define ER_INVALID_DEFAULT 1067 #define ER_MULTIPLE_PRI_KEY 1068 #define ER_TOO_MANY_KEYS 1069 #define ER_TOO_MANY_KEY_PARTS 1070 #define ER_TOO_LONG_KEY 1071 #define ER_KEY_COLUMN_DOES_NOT_EXITS 1072 #define ER_BLOB_USED_AS_KEY 1073 #define ER_TOO_BIG_FIELDLENGTH 1074 #define ER_WRONG_AUTO_KEY 1075 #define ER_READY 1076 //#define OBSOLETE_ER_NORMAL_SHUTDOWN 1077 //#define OBSOLETE_ER_GOT_SIGNAL 1078 #define ER_SHUTDOWN_COMPLETE 1079 #define ER_FORCING_CLOSE 1080 #define ER_IPSOCK_ERROR 1081 #define ER_NO_SUCH_INDEX 1082 #define ER_WRONG_FIELD_TERMINATORS 1083 #define ER_BLOBS_AND_NO_TERMINATED 1084 #define ER_TEXTFILE_NOT_READABLE 1085 #define ER_FILE_EXISTS_ERROR 1086 #define ER_LOAD_INFO 1087 #define ER_ALTER_INFO 1088 #define ER_WRONG_SUB_KEY 1089 #define ER_CANT_REMOVE_ALL_FIELDS 1090 #define ER_CANT_DROP_FIELD_OR_KEY 1091 #define ER_INSERT_INFO 1092 #define ER_UPDATE_TABLE_USED 1093 #define ER_NO_SUCH_THREAD 1094 #define ER_KILL_DENIED_ERROR 1095 #define ER_NO_TABLES_USED 1096 #define ER_TOO_BIG_SET 1097 #define ER_NO_UNIQUE_LOGFILE 1098 #define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099 #define ER_TABLE_NOT_LOCKED 1100 #define ER_BLOB_CANT_HAVE_DEFAULT 1101 #define ER_WRONG_DB_NAME 1102 #define ER_WRONG_TABLE_NAME 1103 #define ER_TOO_BIG_SELECT 1104 #define ER_UNKNOWN_ERROR 1105 #define ER_UNKNOWN_PROCEDURE 1106 #define ER_WRONG_PARAMCOUNT_TO_PROCEDURE 1107 #define ER_WRONG_PARAMETERS_TO_PROCEDURE 1108 #define ER_UNKNOWN_TABLE 1109 #define ER_FIELD_SPECIFIED_TWICE 1110 #define ER_INVALID_GROUP_FUNC_USE 1111 #define ER_UNSUPPORTED_EXTENSION 1112 #define ER_TABLE_MUST_HAVE_COLUMNS 1113 #define ER_RECORD_FILE_FULL 1114 #define ER_UNKNOWN_CHARACTER_SET 1115 #define ER_TOO_MANY_TABLES 1116 #define ER_TOO_MANY_FIELDS 1117 #define ER_TOO_BIG_ROWSIZE 1118 #define ER_STACK_OVERRUN 1119 #define ER_WRONG_OUTER_JOIN_UNUSED 1120 #define ER_NULL_COLUMN_IN_INDEX 1121 #define ER_CANT_FIND_UDF 1122 #define ER_CANT_INITIALIZE_UDF 1123 #define ER_UDF_NO_PATHS 1124 #define ER_UDF_EXISTS 1125 #define ER_CANT_OPEN_LIBRARY 1126 #define ER_CANT_FIND_DL_ENTRY 1127 #define ER_FUNCTION_NOT_DEFINED 1128 #define ER_HOST_IS_BLOCKED 1129 #define ER_HOST_NOT_PRIVILEGED 1130 #define ER_PASSWORD_ANONYMOUS_USER 1131 #define ER_PASSWORD_NOT_ALLOWED 1132 #define ER_PASSWORD_NO_MATCH 1133 #define ER_UPDATE_INFO 1134 #define ER_CANT_CREATE_THREAD 1135 #define ER_WRONG_VALUE_COUNT_ON_ROW 1136 #define ER_CANT_REOPEN_TABLE 1137 #define ER_INVALID_USE_OF_NULL 1138 #define ER_REGEXP_ERROR 1139 #define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140 #define ER_NONEXISTING_GRANT 1141 #define ER_TABLEACCESS_DENIED_ERROR 1142 #define ER_COLUMNACCESS_DENIED_ERROR 1143 #define ER_ILLEGAL_GRANT_FOR_TABLE 1144 #define ER_GRANT_WRONG_HOST_OR_USER 1145 #define ER_NO_SUCH_TABLE 1146 #define ER_NONEXISTING_TABLE_GRANT 1147 #define ER_NOT_ALLOWED_COMMAND 1148 #define ER_SYNTAX_ERROR 1149 //#define OBSOLETE_ER_UNUSED1 1150 //#define OBSOLETE_ER_UNUSED2 1151 #define ER_ABORTING_CONNECTION 1152 #define ER_NET_PACKET_TOO_LARGE 1153 #define ER_NET_READ_ERROR_FROM_PIPE 1154 #define ER_NET_FCNTL_ERROR 1155 #define ER_NET_PACKETS_OUT_OF_ORDER 1156 #define ER_NET_UNCOMPRESS_ERROR 1157 #define ER_NET_READ_ERROR 1158 #define ER_NET_READ_INTERRUPTED 1159 #define ER_NET_ERROR_ON_WRITE 1160 #define ER_NET_WRITE_INTERRUPTED 1161 #define ER_TOO_LONG_STRING 1162 #define ER_TABLE_CANT_HANDLE_BLOB 1163 #define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164 //#define OBSOLETE_ER_UNUSED3 1165 #define ER_WRONG_COLUMN_NAME 1166 #define ER_WRONG_KEY_COLUMN 1167 #define ER_WRONG_MRG_TABLE 1168 #define ER_DUP_UNIQUE 1169 #define ER_BLOB_KEY_WITHOUT_LENGTH 1170 #define ER_PRIMARY_CANT_HAVE_NULL 1171 #define ER_TOO_MANY_ROWS 1172 #define ER_REQUIRES_PRIMARY_KEY 1173 //#define OBSOLETE_ER_NO_RAID_COMPILED 1174 #define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175 #define ER_KEY_DOES_NOT_EXITS 1176 #define ER_CHECK_NO_SUCH_TABLE 1177 #define ER_CHECK_NOT_IMPLEMENTED 1178 #define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179 #define ER_ERROR_DURING_COMMIT 1180 #define ER_ERROR_DURING_ROLLBACK 1181 #define ER_ERROR_DURING_FLUSH_LOGS 1182 //#define OBSOLETE_ER_ERROR_DURING_CHECKPOINT 1183 #define ER_NEW_ABORTING_CONNECTION 1184 //#define OBSOLETE_ER_DUMP_NOT_IMPLEMENTED 1185 //#define OBSOLETE_ER_FLUSH_MASTER_BINLOG_CLOSED 1186 //#define OBSOLETE_ER_INDEX_REBUILD 1187 #define ER_SOURCE 1188 #define ER_SOURCE_NET_READ 1189 #define ER_SOURCE_NET_WRITE 1190 #define ER_FT_MATCHING_KEY_NOT_FOUND 1191 #define ER_LOCK_OR_ACTIVE_TRANSACTION 1192 #define ER_UNKNOWN_SYSTEM_VARIABLE 1193 #define ER_CRASHED_ON_USAGE 1194 #define ER_CRASHED_ON_REPAIR 1195 #define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196 #define ER_TRANS_CACHE_FULL 1197 //#define OBSOLETE_ER_SLAVE_MUST_STOP 1198 #define ER_REPLICA_NOT_RUNNING 1199 #define ER_BAD_REPLICA 1200 #define ER_CONNECTION_METADATA 1201 #define ER_REPLICA_THREAD 1202 #define ER_TOO_MANY_USER_CONNECTIONS 1203 #define ER_SET_CONSTANTS_ONLY 1204 #define ER_LOCK_WAIT_TIMEOUT 1205 #define ER_LOCK_TABLE_FULL 1206 #define ER_READ_ONLY_TRANSACTION 1207 //#define OBSOLETE_ER_DROP_DB_WITH_READ_LOCK 1208 //#define OBSOLETE_ER_CREATE_DB_WITH_READ_LOCK 1209 #define ER_WRONG_ARGUMENTS 1210 #define ER_NO_PERMISSION_TO_CREATE_USER 1211 //#define OBSOLETE_ER_UNION_TABLES_IN_DIFFERENT_DIR 1212 #define ER_LOCK_DEADLOCK 1213 #define ER_TABLE_CANT_HANDLE_FT 1214 #define ER_CANNOT_ADD_FOREIGN 1215 #define ER_NO_REFERENCED_ROW 1216 #define ER_ROW_IS_REFERENCED 1217 #define ER_CONNECT_TO_SOURCE 1218 //#define OBSOLETE_ER_QUERY_ON_MASTER 1219 #define ER_ERROR_WHEN_EXECUTING_COMMAND 1220 #define ER_WRONG_USAGE 1221 #define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222 #define ER_CANT_UPDATE_WITH_READLOCK 1223 #define ER_MIXING_NOT_ALLOWED 1224 #define ER_DUP_ARGUMENT 1225 #define ER_USER_LIMIT_REACHED 1226 #define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227 #define ER_LOCAL_VARIABLE 1228 #define ER_GLOBAL_VARIABLE 1229 #define ER_NO_DEFAULT 1230 #define ER_WRONG_VALUE_FOR_VAR 1231 #define ER_WRONG_TYPE_FOR_VAR 1232 #define ER_VAR_CANT_BE_READ 1233 #define ER_CANT_USE_OPTION_HERE 1234 #define ER_NOT_SUPPORTED_YET 1235 #define ER_SOURCE_FATAL_ERROR_READING_BINLOG 1236 #define ER_REPLICA_IGNORED_TABLE 1237 #define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238 #define ER_WRONG_FK_DEF 1239 #define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240 #define ER_OPERAND_COLUMNS 1241 #define ER_SUBQUERY_NO_1_ROW 1242 #define ER_UNKNOWN_STMT_HANDLER 1243 #define ER_CORRUPT_HELP_DB 1244 //#define OBSOLETE_ER_CYCLIC_REFERENCE 1245 #define ER_AUTO_CONVERT 1246 #define ER_ILLEGAL_REFERENCE 1247 #define ER_DERIVED_MUST_HAVE_ALIAS 1248 #define ER_SELECT_REDUCED 1249 #define ER_TABLENAME_NOT_ALLOWED_HERE 1250 #define ER_NOT_SUPPORTED_AUTH_MODE 1251 #define ER_SPATIAL_CANT_HAVE_NULL 1252 #define ER_COLLATION_CHARSET_MISMATCH 1253 //#define OBSOLETE_ER_SLAVE_WAS_RUNNING 1254 //#define OBSOLETE_ER_SLAVE_WAS_NOT_RUNNING 1255 #define ER_TOO_BIG_FOR_UNCOMPRESS 1256 #define ER_ZLIB_Z_MEM_ERROR 1257 #define ER_ZLIB_Z_BUF_ERROR 1258 #define ER_ZLIB_Z_DATA_ERROR 1259 #define ER_CUT_VALUE_GROUP_CONCAT 1260 #define ER_WARN_TOO_FEW_RECORDS 1261 #define ER_WARN_TOO_MANY_RECORDS 1262 #define ER_WARN_NULL_TO_NOTNULL 1263 #define ER_WARN_DATA_OUT_OF_RANGE 1264 #define WARN_DATA_TRUNCATED 1265 #define ER_WARN_USING_OTHER_HANDLER 1266 #define ER_CANT_AGGREGATE_2COLLATIONS 1267 //#define OBSOLETE_ER_DROP_USER 1268 #define ER_REVOKE_GRANTS 1269 #define ER_CANT_AGGREGATE_3COLLATIONS 1270 #define ER_CANT_AGGREGATE_NCOLLATIONS 1271 #define ER_VARIABLE_IS_NOT_STRUCT 1272 #define ER_UNKNOWN_COLLATION 1273 #define ER_REPLICA_IGNORED_SSL_PARAMS 1274 //#define OBSOLETE_ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275 #define ER_WARN_FIELD_RESOLVED 1276 #define ER_BAD_REPLICA_UNTIL_COND 1277 #define ER_MISSING_SKIP_REPLICA 1278 #define ER_UNTIL_COND_IGNORED 1279 #define ER_WRONG_NAME_FOR_INDEX 1280 #define ER_WRONG_NAME_FOR_CATALOG 1281 //#define OBSOLETE_ER_WARN_QC_RESIZE 1282 #define ER_BAD_FT_COLUMN 1283 #define ER_UNKNOWN_KEY_CACHE 1284 #define ER_WARN_HOSTNAME_WONT_WORK 1285 #define ER_UNKNOWN_STORAGE_ENGINE 1286 #define ER_WARN_DEPRECATED_SYNTAX 1287 #define ER_NON_UPDATABLE_TABLE 1288 #define ER_FEATURE_DISABLED 1289 #define ER_OPTION_PREVENTS_STATEMENT 1290 #define ER_DUPLICATED_VALUE_IN_TYPE 1291 #define ER_TRUNCATED_WRONG_VALUE 1292 //#define OBSOLETE_ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293 #define ER_INVALID_ON_UPDATE 1294 #define ER_UNSUPPORTED_PS 1295 #define ER_GET_ERRMSG 1296 #define ER_GET_TEMPORARY_ERRMSG 1297 #define ER_UNKNOWN_TIME_ZONE 1298 #define ER_WARN_INVALID_TIMESTAMP 1299 #define ER_INVALID_CHARACTER_STRING 1300 #define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301 #define ER_CONFLICTING_DECLARATIONS 1302 #define ER_SP_NO_RECURSIVE_CREATE 1303 #define ER_SP_ALREADY_EXISTS 1304 #define ER_SP_DOES_NOT_EXIST 1305 #define ER_SP_DROP_FAILED 1306 #define ER_SP_STORE_FAILED 1307 #define ER_SP_LILABEL_MISMATCH 1308 #define ER_SP_LABEL_REDEFINE 1309 #define ER_SP_LABEL_MISMATCH 1310 #define ER_SP_UNINIT_VAR 1311 #define ER_SP_BADSELECT 1312 #define ER_SP_BADRETURN 1313 #define ER_SP_BADSTATEMENT 1314 #define ER_UPDATE_LOG_DEPRECATED_IGNORED 1315 #define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1316 #define ER_QUERY_INTERRUPTED 1317 #define ER_SP_WRONG_NO_OF_ARGS 1318 #define ER_SP_COND_MISMATCH 1319 #define ER_SP_NORETURN 1320 #define ER_SP_NORETURNEND 1321 #define ER_SP_BAD_CURSOR_QUERY 1322 #define ER_SP_BAD_CURSOR_SELECT 1323 #define ER_SP_CURSOR_MISMATCH 1324 #define ER_SP_CURSOR_ALREADY_OPEN 1325 #define ER_SP_CURSOR_NOT_OPEN 1326 #define ER_SP_UNDECLARED_VAR 1327 #define ER_SP_WRONG_NO_OF_FETCH_ARGS 1328 #define ER_SP_FETCH_NO_DATA 1329 #define ER_SP_DUP_PARAM 1330 #define ER_SP_DUP_VAR 1331 #define ER_SP_DUP_COND 1332 #define ER_SP_DUP_CURS 1333 #define ER_SP_CANT_ALTER 1334 #define ER_SP_SUBSELECT_NYI 1335 #define ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 1336 #define ER_SP_VARCOND_AFTER_CURSHNDLR 1337 #define ER_SP_CURSOR_AFTER_HANDLER 1338 #define ER_SP_CASE_NOT_FOUND 1339 #define ER_FPARSER_TOO_BIG_FILE 1340 #define ER_FPARSER_BAD_HEADER 1341 #define ER_FPARSER_EOF_IN_COMMENT 1342 #define ER_FPARSER_ERROR_IN_PARAMETER 1343 #define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1344 #define ER_VIEW_NO_EXPLAIN 1345 //#define OBSOLETE_ER_FRM_UNKNOWN_TYPE 1346 #define ER_WRONG_OBJECT 1347 #define ER_NONUPDATEABLE_COLUMN 1348 //#define OBSOLETE_ER_VIEW_SELECT_DERIVED_UNUSED 1349 #define ER_VIEW_SELECT_CLAUSE 1350 #define ER_VIEW_SELECT_VARIABLE 1351 #define ER_VIEW_SELECT_TMPTABLE 1352 #define ER_VIEW_WRONG_LIST 1353 #define ER_WARN_VIEW_MERGE 1354 #define ER_WARN_VIEW_WITHOUT_KEY 1355 #define ER_VIEW_INVALID 1356 #define ER_SP_NO_DROP_SP 1357 //#define OBSOLETE_ER_SP_GOTO_IN_HNDLR 1358 #define ER_TRG_ALREADY_EXISTS 1359 #define ER_TRG_DOES_NOT_EXIST 1360 #define ER_TRG_ON_VIEW_OR_TEMP_TABLE 1361 #define ER_TRG_CANT_CHANGE_ROW 1362 #define ER_TRG_NO_SUCH_ROW_IN_TRG 1363 #define ER_NO_DEFAULT_FOR_FIELD 1364 #define ER_DIVISION_BY_ZERO 1365 #define ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 1366 #define ER_ILLEGAL_VALUE_FOR_TYPE 1367 #define ER_VIEW_NONUPD_CHECK 1368 #define ER_VIEW_CHECK_FAILED 1369 #define ER_PROCACCESS_DENIED_ERROR 1370 #define ER_RELAY_LOG_FAIL 1371 //#define OBSOLETE_ER_PASSWD_LENGTH 1372 #define ER_UNKNOWN_TARGET_BINLOG 1373 #define ER_IO_ERR_LOG_INDEX_READ 1374 #define ER_BINLOG_PURGE_PROHIBITED 1375 #define ER_FSEEK_FAIL 1376 #define ER_BINLOG_PURGE_FATAL_ERR 1377 #define ER_LOG_IN_USE 1378 #define ER_LOG_PURGE_UNKNOWN_ERR 1379 #define ER_RELAY_LOG_INIT 1380 #define ER_NO_BINARY_LOGGING 1381 #define ER_RESERVED_SYNTAX 1382 //#define OBSOLETE_ER_WSAS_FAILED 1383 //#define OBSOLETE_ER_DIFF_GROUPS_PROC 1384 //#define OBSOLETE_ER_NO_GROUP_FOR_PROC 1385 //#define OBSOLETE_ER_ORDER_WITH_PROC 1386 //#define OBSOLETE_ER_LOGGING_PROHIBIT_CHANGING_OF 1387 //#define OBSOLETE_ER_NO_FILE_MAPPING 1388 //#define OBSOLETE_ER_WRONG_MAGIC 1389 #define ER_PS_MANY_PARAM 1390 #define ER_KEY_PART_0 1391 #define ER_VIEW_CHECKSUM 1392 #define ER_VIEW_MULTIUPDATE 1393 #define ER_VIEW_NO_INSERT_FIELD_LIST 1394 #define ER_VIEW_DELETE_MERGE_VIEW 1395 #define ER_CANNOT_USER 1396 #define ER_XAER_NOTA 1397 #define ER_XAER_INVAL 1398 #define ER_XAER_RMFAIL 1399 #define ER_XAER_OUTSIDE 1400 #define ER_XAER_RMERR 1401 #define ER_XA_RBROLLBACK 1402 #define ER_NONEXISTING_PROC_GRANT 1403 #define ER_PROC_AUTO_GRANT_FAIL 1404 #define ER_PROC_AUTO_REVOKE_FAIL 1405 #define ER_DATA_TOO_LONG 1406 #define ER_SP_BAD_SQLSTATE 1407 #define ER_STARTUP 1408 #define ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR 1409 #define ER_CANT_CREATE_USER_WITH_GRANT 1410 #define ER_WRONG_VALUE_FOR_TYPE 1411 #define ER_TABLE_DEF_CHANGED 1412 #define ER_SP_DUP_HANDLER 1413 #define ER_SP_NOT_VAR_ARG 1414 #define ER_SP_NO_RETSET 1415 #define ER_CANT_CREATE_GEOMETRY_OBJECT 1416 //#define OBSOLETE_ER_FAILED_ROUTINE_BREAK_BINLOG 1417 #define ER_BINLOG_UNSAFE_ROUTINE 1418 #define ER_BINLOG_CREATE_ROUTINE_NEED_SUPER 1419 //#define OBSOLETE_ER_EXEC_STMT_WITH_OPEN_CURSOR 1420 #define ER_STMT_HAS_NO_OPEN_CURSOR 1421 #define ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG 1422 #define ER_NO_DEFAULT_FOR_VIEW_FIELD 1423 #define ER_SP_NO_RECURSION 1424 #define ER_TOO_BIG_SCALE 1425 #define ER_TOO_BIG_PRECISION 1426 #define ER_M_BIGGER_THAN_D 1427 #define ER_WRONG_LOCK_OF_SYSTEM_TABLE 1428 #define ER_CONNECT_TO_FOREIGN_DATA_SOURCE 1429 #define ER_QUERY_ON_FOREIGN_DATA_SOURCE 1430 #define ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST 1431 #define ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE 1432 #define ER_FOREIGN_DATA_STRING_INVALID 1433 //#define OBSOLETE_ER_CANT_CREATE_FEDERATED_TABLE 1434 #define ER_TRG_IN_WRONG_SCHEMA 1435 #define ER_STACK_OVERRUN_NEED_MORE 1436 #define ER_TOO_LONG_BODY 1437 #define ER_WARN_CANT_DROP_DEFAULT_KEYCACHE 1438 #define ER_TOO_BIG_DISPLAYWIDTH 1439 #define ER_XAER_DUPID 1440 #define ER_DATETIME_FUNCTION_OVERFLOW 1441 #define ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG 1442 #define ER_VIEW_PREVENT_UPDATE 1443 #define ER_PS_NO_RECURSION 1444 #define ER_SP_CANT_SET_AUTOCOMMIT 1445 //#define OBSOLETE_ER_MALFORMED_DEFINER 1446 #define ER_VIEW_FRM_NO_USER 1447 #define ER_VIEW_OTHER_USER 1448 #define ER_NO_SUCH_USER 1449 #define ER_FORBID_SCHEMA_CHANGE 1450 #define ER_ROW_IS_REFERENCED_2 1451 #define ER_NO_REFERENCED_ROW_2 1452 #define ER_SP_BAD_VAR_SHADOW 1453 #define ER_TRG_NO_DEFINER 1454 #define ER_OLD_FILE_FORMAT 1455 #define ER_SP_RECURSION_LIMIT 1456 //#define OBSOLETE_ER_SP_PROC_TABLE_CORRUPT 1457 #define ER_SP_WRONG_NAME 1458 #define ER_TABLE_NEEDS_UPGRADE 1459 #define ER_SP_NO_AGGREGATE 1460 #define ER_MAX_PREPARED_STMT_COUNT_REACHED 1461 #define ER_VIEW_RECURSIVE 1462 #define ER_NON_GROUPING_FIELD_USED 1463 #define ER_TABLE_CANT_HANDLE_SPKEYS 1464 #define ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA 1465 #define ER_REMOVED_SPACES 1466 #define ER_AUTOINC_READ_FAILED 1467 #define ER_USERNAME 1468 #define ER_HOSTNAME 1469 #define ER_WRONG_STRING_LENGTH 1470 #define ER_NON_INSERTABLE_TABLE 1471 #define ER_ADMIN_WRONG_MRG_TABLE 1472 #define ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT 1473 #define ER_NAME_BECOMES_EMPTY 1474 #define ER_AMBIGUOUS_FIELD_TERM 1475 #define ER_FOREIGN_SERVER_EXISTS 1476 #define ER_FOREIGN_SERVER_DOESNT_EXIST 1477 #define ER_ILLEGAL_HA_CREATE_OPTION 1478 #define ER_PARTITION_REQUIRES_VALUES_ERROR 1479 #define ER_PARTITION_WRONG_VALUES_ERROR 1480 #define ER_PARTITION_MAXVALUE_ERROR 1481 //#define OBSOLETE_ER_PARTITION_SUBPARTITION_ERROR 1482 //#define OBSOLETE_ER_PARTITION_SUBPART_MIX_ERROR 1483 #define ER_PARTITION_WRONG_NO_PART_ERROR 1484 #define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485 #define ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR 1486 //#define OBSOLETE_ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487 #define ER_FIELD_NOT_FOUND_PART_ERROR 1488 //#define OBSOLETE_ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489 #define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490 #define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491 #define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492 #define ER_RANGE_NOT_INCREASING_ERROR 1493 #define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494 #define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495 #define ER_PARTITION_ENTRY_ERROR 1496 #define ER_MIX_HANDLER_ERROR 1497 #define ER_PARTITION_NOT_DEFINED_ERROR 1498 #define ER_TOO_MANY_PARTITIONS_ERROR 1499 #define ER_SUBPARTITION_ERROR 1500 #define ER_CANT_CREATE_HANDLER_FILE 1501 #define ER_BLOB_FIELD_IN_PART_FUNC_ERROR 1502 #define ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF 1503 #define ER_NO_PARTS_ERROR 1504 #define ER_PARTITION_MGMT_ON_NONPARTITIONED 1505 #define ER_FOREIGN_KEY_ON_PARTITIONED 1506 #define ER_DROP_PARTITION_NON_EXISTENT 1507 #define ER_DROP_LAST_PARTITION 1508 #define ER_COALESCE_ONLY_ON_HASH_PARTITION 1509 #define ER_REORG_HASH_ONLY_ON_SAME_NO 1510 #define ER_REORG_NO_PARAM_ERROR 1511 #define ER_ONLY_ON_RANGE_LIST_PARTITION 1512 #define ER_ADD_PARTITION_SUBPART_ERROR 1513 #define ER_ADD_PARTITION_NO_NEW_PARTITION 1514 #define ER_COALESCE_PARTITION_NO_PARTITION 1515 #define ER_REORG_PARTITION_NOT_EXIST 1516 #define ER_SAME_NAME_PARTITION 1517 #define ER_NO_BINLOG_ERROR 1518 #define ER_CONSECUTIVE_REORG_PARTITIONS 1519 #define ER_REORG_OUTSIDE_RANGE 1520 #define ER_PARTITION_FUNCTION_FAILURE 1521 //#define OBSOLETE_ER_PART_STATE_ERROR 1522 #define ER_LIMITED_PART_RANGE 1523 #define ER_PLUGIN_IS_NOT_LOADED 1524 #define ER_WRONG_VALUE 1525 #define ER_NO_PARTITION_FOR_GIVEN_VALUE 1526 #define ER_FILEGROUP_OPTION_ONLY_ONCE 1527 #define ER_CREATE_FILEGROUP_FAILED 1528 #define ER_DROP_FILEGROUP_FAILED 1529 #define ER_TABLESPACE_AUTO_EXTEND_ERROR 1530 #define ER_WRONG_SIZE_NUMBER 1531 #define ER_SIZE_OVERFLOW_ERROR 1532 #define ER_ALTER_FILEGROUP_FAILED 1533 #define ER_BINLOG_ROW_LOGGING_FAILED 1534 //#define OBSOLETE_ER_BINLOG_ROW_WRONG_TABLE_DEF 1535 //#define OBSOLETE_ER_BINLOG_ROW_RBR_TO_SBR 1536 #define ER_EVENT_ALREADY_EXISTS 1537 //#define OBSOLETE_ER_EVENT_STORE_FAILED 1538 #define ER_EVENT_DOES_NOT_EXIST 1539 //#define OBSOLETE_ER_EVENT_CANT_ALTER 1540 //#define OBSOLETE_ER_EVENT_DROP_FAILED 1541 #define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542 #define ER_EVENT_ENDS_BEFORE_STARTS 1543 #define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544 //#define OBSOLETE_ER_EVENT_OPEN_TABLE_FAILED 1545 //#define OBSOLETE_ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546 //#define OBSOLETE_ER_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547 //#define OBSOLETE_ER_CANNOT_LOAD_FROM_TABLE 1548 //#define OBSOLETE_ER_EVENT_CANNOT_DELETE 1549 //#define OBSOLETE_ER_EVENT_COMPILE_ERROR 1550 #define ER_EVENT_SAME_NAME 1551 //#define OBSOLETE_ER_EVENT_DATA_TOO_LONG 1552 #define ER_DROP_INDEX_FK 1553 #define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554 //#define OBSOLETE_ER_CANT_WRITE_LOCK_LOG_TABLE 1555 #define ER_CANT_LOCK_LOG_TABLE 1556 #define ER_FOREIGN_DUPLICATE_KEY_OLD_UNUSED 1557 #define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558 //#define OBSOLETE_ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR 1559 #define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT 1560 //#define OBSOLETE_ER_NDB_CANT_SWITCH_BINLOG_FORMAT 1561 #define ER_PARTITION_NO_TEMPORARY 1562 #define ER_PARTITION_CONST_DOMAIN_ERROR 1563 #define ER_PARTITION_FUNCTION_IS_NOT_ALLOWED 1564 //#define OBSOLETE_ER_DDL_LOG_ERROR_UNUSED 1565 #define ER_NULL_IN_VALUES_LESS_THAN 1566 #define ER_WRONG_PARTITION_NAME 1567 #define ER_CANT_CHANGE_TX_CHARACTERISTICS 1568 #define ER_DUP_ENTRY_AUTOINCREMENT_CASE 1569 //#define OBSOLETE_ER_EVENT_MODIFY_QUEUE_ERROR 1570 #define ER_EVENT_SET_VAR_ERROR 1571 #define ER_PARTITION_MERGE_ERROR 1572 //#define OBSOLETE_ER_CANT_ACTIVATE_LOG 1573 //#define OBSOLETE_ER_RBR_NOT_AVAILABLE 1574 #define ER_BASE64_DECODE_ERROR 1575 #define ER_EVENT_RECURSION_FORBIDDEN 1576 //#define OBSOLETE_ER_EVENTS_DB_ERROR 1577 #define ER_ONLY_INTEGERS_ALLOWED 1578 #define ER_UNSUPORTED_LOG_ENGINE 1579 #define ER_BAD_LOG_STATEMENT 1580 #define ER_CANT_RENAME_LOG_TABLE 1581 #define ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 1582 #define ER_WRONG_PARAMETERS_TO_NATIVE_FCT 1583 #define ER_WRONG_PARAMETERS_TO_STORED_FCT 1584 #define ER_NATIVE_FCT_NAME_COLLISION 1585 #define ER_DUP_ENTRY_WITH_KEY_NAME 1586 #define ER_BINLOG_PURGE_EMFILE 1587 #define ER_EVENT_CANNOT_CREATE_IN_THE_PAST 1588 #define ER_EVENT_CANNOT_ALTER_IN_THE_PAST 1589 //#define OBSOLETE_ER_SLAVE_INCIDENT 1590 #define ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT 1591 #define ER_BINLOG_UNSAFE_STATEMENT 1592 #define ER_BINLOG_FATAL_ERROR 1593 //#define OBSOLETE_ER_SLAVE_RELAY_LOG_READ_FAILURE 1594 //#define OBSOLETE_ER_SLAVE_RELAY_LOG_WRITE_FAILURE 1595 //#define OBSOLETE_ER_SLAVE_CREATE_EVENT_FAILURE 1596 //#define OBSOLETE_ER_SLAVE_MASTER_COM_FAILURE 1597 #define ER_BINLOG_LOGGING_IMPOSSIBLE 1598 #define ER_VIEW_NO_CREATION_CTX 1599 #define ER_VIEW_INVALID_CREATION_CTX 1600 //#define OBSOLETE_ER_SR_INVALID_CREATION_CTX 1601 #define ER_TRG_CORRUPTED_FILE 1602 #define ER_TRG_NO_CREATION_CTX 1603 #define ER_TRG_INVALID_CREATION_CTX 1604 #define ER_EVENT_INVALID_CREATION_CTX 1605 #define ER_TRG_CANT_OPEN_TABLE 1606 //#define OBSOLETE_ER_CANT_CREATE_SROUTINE 1607 //#define OBSOLETE_ER_NEVER_USED 1608 #define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609 #define ER_REPLICA_CORRUPT_EVENT 1610 //#define OBSOLETE_ER_LOAD_DATA_INVALID_COLUMN_UNUSED 1611 #define ER_LOG_PURGE_NO_FILE 1612 #define ER_XA_RBTIMEOUT 1613 #define ER_XA_RBDEADLOCK 1614 #define ER_NEED_REPREPARE 1615 //#define OBSOLETE_ER_DELAYED_NOT_SUPPORTED 1616 #define WARN_NO_CONNECTION_METADATA 1617 #define WARN_OPTION_IGNORED 1618 #define ER_PLUGIN_DELETE_BUILTIN 1619 #define WARN_PLUGIN_BUSY 1620 #define ER_VARIABLE_IS_READONLY 1621 #define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622 //#define OBSOLETE_ER_SLAVE_HEARTBEAT_FAILURE 1623 #define ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE 1624 #define ER_NDB_REPLICATION_SCHEMA_ERROR 1625 #define ER_CONFLICT_FN_PARSE_ERROR 1626 #define ER_EXCEPTIONS_WRITE_ERROR 1627 #define ER_TOO_LONG_TABLE_COMMENT 1628 #define ER_TOO_LONG_FIELD_COMMENT 1629 #define ER_FUNC_INEXISTENT_NAME_COLLISION 1630 #define ER_DATABASE_NAME 1631 #define ER_TABLE_NAME 1632 #define ER_PARTITION_NAME 1633 #define ER_SUBPARTITION_NAME 1634 #define ER_TEMPORARY_NAME 1635 #define ER_RENAMED_NAME 1636 #define ER_TOO_MANY_CONCURRENT_TRXS 1637 #define WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED 1638 #define ER_DEBUG_SYNC_TIMEOUT 1639 #define ER_DEBUG_SYNC_HIT_LIMIT 1640 #define ER_DUP_SIGNAL_SET 1641 #define ER_SIGNAL_WARN 1642 #define ER_SIGNAL_NOT_FOUND 1643 #define ER_SIGNAL_EXCEPTION 1644 #define ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 1645 #define ER_SIGNAL_BAD_CONDITION_TYPE 1646 #define WARN_COND_ITEM_TRUNCATED 1647 #define ER_COND_ITEM_TOO_LONG 1648 #define ER_UNKNOWN_LOCALE 1649 #define ER_REPLICA_IGNORE_SERVER_IDS 1650 //#define OBSOLETE_ER_QUERY_CACHE_DISABLED 1651 #define ER_SAME_NAME_PARTITION_FIELD 1652 #define ER_PARTITION_COLUMN_LIST_ERROR 1653 #define ER_WRONG_TYPE_COLUMN_VALUE_ERROR 1654 #define ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR 1655 #define ER_MAXVALUE_IN_VALUES_IN 1656 #define ER_TOO_MANY_VALUES_ERROR 1657 #define ER_ROW_SINGLE_PARTITION_FIELD_ERROR 1658 #define ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD 1659 #define ER_PARTITION_FIELDS_TOO_LONG 1660 #define ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE 1661 #define ER_BINLOG_ROW_MODE_AND_STMT_ENGINE 1662 #define ER_BINLOG_UNSAFE_AND_STMT_ENGINE 1663 #define ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE 1664 #define ER_BINLOG_STMT_MODE_AND_ROW_ENGINE 1665 #define ER_BINLOG_ROW_INJECTION_AND_STMT_MODE 1666 #define ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1667 #define ER_BINLOG_UNSAFE_LIMIT 1668 //#define OBSOLETE_ER_UNUSED4 1669 #define ER_BINLOG_UNSAFE_SYSTEM_TABLE 1670 #define ER_BINLOG_UNSAFE_AUTOINC_COLUMNS 1671 #define ER_BINLOG_UNSAFE_UDF 1672 #define ER_BINLOG_UNSAFE_SYSTEM_VARIABLE 1673 #define ER_BINLOG_UNSAFE_SYSTEM_FUNCTION 1674 #define ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS 1675 #define ER_MESSAGE_AND_STATEMENT 1676 //#define OBSOLETE_ER_SLAVE_CONVERSION_FAILED 1677 #define ER_REPLICA_CANT_CREATE_CONVERSION 1678 #define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT 1679 #define ER_PATH_LENGTH 1680 #define ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT 1681 #define ER_WRONG_NATIVE_TABLE_STRUCTURE 1682 #define ER_WRONG_PERFSCHEMA_USAGE 1683 #define ER_WARN_I_S_SKIPPED_TABLE 1684 #define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT 1685 #define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT 1686 #define ER_SPATIAL_MUST_HAVE_GEOM_COL 1687 #define ER_TOO_LONG_INDEX_COMMENT 1688 #define ER_LOCK_ABORTED 1689 #define ER_DATA_OUT_OF_RANGE 1690 //#define OBSOLETE_ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691 #define ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1692 #define ER_BINLOG_UNSAFE_MIXED_STATEMENT 1693 #define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN 1694 #define ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN 1695 #define ER_FAILED_READ_FROM_PAR_FILE 1696 #define ER_VALUES_IS_NOT_INT_TYPE_ERROR 1697 #define ER_ACCESS_DENIED_NO_PASSWORD_ERROR 1698 //#define OBSOLETE_ER_SET_PASSWORD_AUTH_PLUGIN 1699 //#define OBSOLETE_ER_GRANT_PLUGIN_USER_EXISTS 1700 #define ER_TRUNCATE_ILLEGAL_FK 1701 #define ER_PLUGIN_IS_PERMANENT 1702 #define ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN 1703 #define ER_REPLICA_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX 1704 #define ER_STMT_CACHE_FULL 1705 #define ER_MULTI_UPDATE_KEY_CONFLICT 1706 #define ER_TABLE_NEEDS_REBUILD 1707 #define WARN_OPTION_BELOW_LIMIT 1708 #define ER_INDEX_COLUMN_TOO_LONG 1709 #define ER_ERROR_IN_TRIGGER_BODY 1710 #define ER_ERROR_IN_UNKNOWN_TRIGGER_BODY 1711 #define ER_INDEX_CORRUPT 1712 #define ER_UNDO_RECORD_TOO_BIG 1713 #define ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT 1714 #define ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE 1715 #define ER_BINLOG_UNSAFE_REPLACE_SELECT 1716 #define ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT 1717 #define ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT 1718 #define ER_BINLOG_UNSAFE_UPDATE_IGNORE 1719 #define ER_PLUGIN_NO_UNINSTALL 1720 #define ER_PLUGIN_NO_INSTALL 1721 #define ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT 1722 #define ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC 1723 #define ER_BINLOG_UNSAFE_INSERT_TWO_KEYS 1724 #define ER_TABLE_IN_FK_CHECK 1725 #define ER_UNSUPPORTED_ENGINE 1726 #define ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST 1727 #define ER_CANNOT_LOAD_FROM_TABLE_V2 1728 #define ER_SOURCE_DELAY_VALUE_OUT_OF_RANGE 1729 #define ER_ONLY_FD_AND_RBR_EVENTS_ALLOWED_IN_BINLOG_STATEMENT 1730 #define ER_PARTITION_EXCHANGE_DIFFERENT_OPTION 1731 #define ER_PARTITION_EXCHANGE_PART_TABLE 1732 #define ER_PARTITION_EXCHANGE_TEMP_TABLE 1733 #define ER_PARTITION_INSTEAD_OF_SUBPARTITION 1734 #define ER_UNKNOWN_PARTITION 1735 #define ER_TABLES_DIFFERENT_METADATA 1736 #define ER_ROW_DOES_NOT_MATCH_PARTITION 1737 #define ER_BINLOG_CACHE_SIZE_GREATER_THAN_MAX 1738 #define ER_WARN_INDEX_NOT_APPLICABLE 1739 #define ER_PARTITION_EXCHANGE_FOREIGN_KEY 1740 //#define OBSOLETE_ER_NO_SUCH_KEY_VALUE 1741 #define ER_RPL_INFO_DATA_TOO_LONG 1742 //#define OBSOLETE_ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE 1743 //#define OBSOLETE_ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE 1744 #define ER_BINLOG_STMT_CACHE_SIZE_GREATER_THAN_MAX 1745 #define ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT 1746 #define ER_PARTITION_CLAUSE_ON_NONPARTITIONED 1747 #define ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET 1748 //#define OBSOLETE_ER_NO_SUCH_PARTITION__UNUSED 1749 #define ER_CHANGE_RPL_INFO_REPOSITORY_FAILURE 1750 #define ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE 1751 #define ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_DROPPED_TEMP_TABLE 1752 #define ER_MTA_FEATURE_IS_NOT_SUPPORTED 1753 #define ER_MTA_UPDATED_DBS_GREATER_MAX 1754 #define ER_MTA_CANT_PARALLEL 1755 #define ER_MTA_INCONSISTENT_DATA 1756 #define ER_FULLTEXT_NOT_SUPPORTED_WITH_PARTITIONING 1757 #define ER_DA_INVALID_CONDITION_NUMBER 1758 #define ER_INSECURE_PLAIN_TEXT 1759 #define ER_INSECURE_CHANGE_SOURCE 1760 #define ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO 1761 #define ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO 1762 #define ER_SQLTHREAD_WITH_SECURE_REPLICA 1763 #define ER_TABLE_HAS_NO_FT 1764 #define ER_VARIABLE_NOT_SETTABLE_IN_SF_OR_TRIGGER 1765 #define ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION 1766 //#define OBSOLETE_ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST 1767 //#define OBSOLETE_ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION 1768 #define ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION 1769 #define ER_GTID_NEXT_CANT_BE_AUTOMATIC_IF_GTID_NEXT_LIST_IS_NON_NULL 1770 //#define OBSOLETE_ER_SKIPPING_LOGGED_TRANSACTION 1771 #define ER_MALFORMED_GTID_SET_SPECIFICATION 1772 #define ER_MALFORMED_GTID_SET_ENCODING 1773 #define ER_MALFORMED_GTID_SPECIFICATION 1774 #define ER_GNO_EXHAUSTED 1775 #define ER_BAD_REPLICA_AUTO_POSITION 1776 #define ER_AUTO_POSITION_REQUIRES_GTID_MODE_NOT_OFF 1777 #define ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET 1778 #define ER_GTID_MODE_ON_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON 1779 //#define OBSOLETE_ER_GTID_MODE_REQUIRES_BINLOG 1780 #define ER_CANT_SET_GTID_NEXT_TO_GTID_WHEN_GTID_MODE_IS_OFF 1781 #define ER_CANT_SET_GTID_NEXT_TO_ANONYMOUS_WHEN_GTID_MODE_IS_ON 1782 #define ER_CANT_SET_GTID_NEXT_LIST_TO_NON_NULL_WHEN_GTID_MODE_IS_OFF 1783 //#define OBSOLETE_ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF__UNUSED 1784 #define ER_GTID_UNSAFE_NON_TRANSACTIONAL_TABLE 1785 #define ER_GTID_UNSAFE_CREATE_SELECT 1786 //#define OBSOLETE_ER_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRANSACTION 1787 #define ER_GTID_MODE_CAN_ONLY_CHANGE_ONE_STEP_AT_A_TIME 1788 #define ER_SOURCE_HAS_PURGED_REQUIRED_GTIDS 1789 #define ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID 1790 #define ER_UNKNOWN_EXPLAIN_FORMAT 1791 #define ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION 1792 #define ER_TOO_LONG_TABLE_PARTITION_COMMENT 1793 #define ER_REPLICA_CONFIGURATION 1794 #define ER_INNODB_FT_LIMIT 1795 #define ER_INNODB_NO_FT_TEMP_TABLE 1796 #define ER_INNODB_FT_WRONG_DOCID_COLUMN 1797 #define ER_INNODB_FT_WRONG_DOCID_INDEX 1798 #define ER_INNODB_ONLINE_LOG_TOO_BIG 1799 #define ER_UNKNOWN_ALTER_ALGORITHM 1800 #define ER_UNKNOWN_ALTER_LOCK 1801 #define ER_MTA_CHANGE_SOURCE_CANT_RUN_WITH_GAPS 1802 #define ER_MTA_RECOVERY_FAILURE 1803 #define ER_MTA_RESET_WORKERS 1804 #define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2 1805 #define ER_REPLICA_SILENT_RETRY_TRANSACTION 1806 #define ER_DISCARD_FK_CHECKS_RUNNING 1807 #define ER_TABLE_SCHEMA_MISMATCH 1808 #define ER_TABLE_IN_SYSTEM_TABLESPACE 1809 #define ER_IO_READ_ERROR 1810 #define ER_IO_WRITE_ERROR 1811 #define ER_TABLESPACE_MISSING 1812 #define ER_TABLESPACE_EXISTS 1813 #define ER_TABLESPACE_DISCARDED 1814 #define ER_INTERNAL_ERROR 1815 #define ER_INNODB_IMPORT_ERROR 1816 #define ER_INNODB_INDEX_CORRUPT 1817 #define ER_INVALID_YEAR_COLUMN_LENGTH 1818 #define ER_NOT_VALID_PASSWORD 1819 #define ER_MUST_CHANGE_PASSWORD 1820 #define ER_FK_NO_INDEX_CHILD 1821 #define ER_FK_NO_INDEX_PARENT 1822 #define ER_FK_FAIL_ADD_SYSTEM 1823 #define ER_FK_CANNOT_OPEN_PARENT 1824 #define ER_FK_INCORRECT_OPTION 1825 #define ER_FK_DUP_NAME 1826 #define ER_PASSWORD_FORMAT 1827 #define ER_FK_COLUMN_CANNOT_DROP 1828 #define ER_FK_COLUMN_CANNOT_DROP_CHILD 1829 #define ER_FK_COLUMN_NOT_NULL 1830 #define ER_DUP_INDEX 1831 #define ER_FK_COLUMN_CANNOT_CHANGE 1832 #define ER_FK_COLUMN_CANNOT_CHANGE_CHILD 1833 //#define OBSOLETE_ER_UNUSED5 1834 #define ER_MALFORMED_PACKET 1835 #define ER_READ_ONLY_MODE 1836 #define ER_GTID_NEXT_TYPE_UNDEFINED_GTID 1837 #define ER_VARIABLE_NOT_SETTABLE_IN_SP 1838 //#define OBSOLETE_ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF 1839 #define ER_CANT_SET_GTID_PURGED_WHEN_GTID_EXECUTED_IS_NOT_EMPTY 1840 #define ER_CANT_SET_GTID_PURGED_WHEN_OWNED_GTIDS_IS_NOT_EMPTY 1841 #define ER_GTID_PURGED_WAS_CHANGED 1842 #define ER_GTID_EXECUTED_WAS_CHANGED 1843 #define ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES 1844 #define ER_ALTER_OPERATION_NOT_SUPPORTED 1845 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON 1846 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COPY 1847 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_PARTITION 1848 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME 1849 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE 1850 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_CHECK 1851 //#define OBSOLETE_ER_UNUSED6 1852 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOPK 1853 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTOINC 1854 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS 1855 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_CHANGE_FTS 1856 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS 1857 //#define OBSOLETE_ER_SQL_REPLICA_SKIP_COUNTER_NOT_SETTABLE_IN_GTID_MODE 1858 #define ER_DUP_UNKNOWN_IN_INDEX 1859 #define ER_IDENT_CAUSES_TOO_LONG_PATH 1860 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL 1861 #define ER_MUST_CHANGE_PASSWORD_LOGIN 1862 #define ER_ROW_IN_WRONG_PARTITION 1863 #define ER_MTA_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX 1864 //#define OBSOLETE_ER_INNODB_NO_FT_USES_PARSER 1865 #define ER_BINLOG_LOGICAL_CORRUPTION 1866 #define ER_WARN_PURGE_LOG_IN_USE 1867 #define ER_WARN_PURGE_LOG_IS_ACTIVE 1868 #define ER_AUTO_INCREMENT_CONFLICT 1869 #define WARN_ON_BLOCKHOLE_IN_RBR 1870 #define ER_REPLICA_CM_INIT_REPOSITORY 1871 #define ER_REPLICA_AM_INIT_REPOSITORY 1872 #define ER_ACCESS_DENIED_CHANGE_USER_ERROR 1873 #define ER_INNODB_READ_ONLY 1874 #define ER_STOP_REPLICA_SQL_THREAD_TIMEOUT 1875 #define ER_STOP_REPLICA_IO_THREAD_TIMEOUT 1876 #define ER_TABLE_CORRUPT 1877 #define ER_TEMP_FILE_WRITE_FAILURE 1878 #define ER_INNODB_FT_AUX_NOT_HEX_ID 1879 #define ER_OLD_TEMPORALS_UPGRADED 1880 #define ER_INNODB_FORCED_RECOVERY 1881 #define ER_AES_INVALID_IV 1882 #define ER_PLUGIN_CANNOT_BE_UNINSTALLED 1883 #define ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_ASSIGNED_GTID 1884 #define ER_REPLICA_HAS_MORE_GTIDS_THAN_SOURCE 1885 #define ER_MISSING_KEY 1886 #define WARN_NAMED_PIPE_ACCESS_EVERYONE 1887 #define ER_FILE_CORRUPT 3000 #define ER_ERROR_ON_SOURCE 3001 //#define OBSOLETE_ER_INCONSISTENT_ERROR 3002 #define ER_STORAGE_ENGINE_NOT_LOADED 3003 #define ER_GET_STACKED_DA_WITHOUT_ACTIVE_HANDLER 3004 #define ER_WARN_LEGACY_SYNTAX_CONVERTED 3005 #define ER_BINLOG_UNSAFE_FULLTEXT_PLUGIN 3006 #define ER_CANNOT_DISCARD_TEMPORARY_TABLE 3007 #define ER_FK_DEPTH_EXCEEDED 3008 #define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2 3009 #define ER_WARN_TRIGGER_DOESNT_HAVE_CREATED 3010 #define ER_REFERENCED_TRG_DOES_NOT_EXIST 3011 #define ER_EXPLAIN_NOT_SUPPORTED 3012 #define ER_INVALID_FIELD_SIZE 3013 #define ER_MISSING_HA_CREATE_OPTION 3014 #define ER_ENGINE_OUT_OF_MEMORY 3015 #define ER_PASSWORD_EXPIRE_ANONYMOUS_USER 3016 #define ER_REPLICA_SQL_THREAD_MUST_STOP 3017 #define ER_NO_FT_MATERIALIZED_SUBQUERY 3018 #define ER_INNODB_UNDO_LOG_FULL 3019 #define ER_INVALID_ARGUMENT_FOR_LOGARITHM 3020 #define ER_REPLICA_CHANNEL_IO_THREAD_MUST_STOP 3021 #define ER_WARN_OPEN_TEMP_TABLES_MUST_BE_ZERO 3022 #define ER_WARN_ONLY_SOURCE_LOG_FILE_NO_POS 3023 #define ER_QUERY_TIMEOUT 3024 #define ER_NON_RO_SELECT_DISABLE_TIMER 3025 #define ER_DUP_LIST_ENTRY 3026 //#define OBSOLETE_ER_SQL_MODE_NO_EFFECT 3027 #define ER_AGGREGATE_ORDER_FOR_UNION 3028 #define ER_AGGREGATE_ORDER_NON_AGG_QUERY 3029 #define ER_REPLICA_WORKER_STOPPED_PREVIOUS_THD_ERROR 3030 #define ER_DONT_SUPPORT_REPLICA_PRESERVE_COMMIT_ORDER 3031 #define ER_SERVER_OFFLINE_MODE 3032 #define ER_GIS_DIFFERENT_SRIDS 3033 #define ER_GIS_UNSUPPORTED_ARGUMENT 3034 #define ER_GIS_UNKNOWN_ERROR 3035 #define ER_GIS_UNKNOWN_EXCEPTION 3036 #define ER_GIS_INVALID_DATA 3037 #define ER_BOOST_GEOMETRY_EMPTY_INPUT_EXCEPTION 3038 #define ER_BOOST_GEOMETRY_CENTROID_EXCEPTION 3039 #define ER_BOOST_GEOMETRY_OVERLAY_INVALID_INPUT_EXCEPTION 3040 #define ER_BOOST_GEOMETRY_TURN_INFO_EXCEPTION 3041 #define ER_BOOST_GEOMETRY_SELF_INTERSECTION_POINT_EXCEPTION 3042 #define ER_BOOST_GEOMETRY_UNKNOWN_EXCEPTION 3043 #define ER_STD_BAD_ALLOC_ERROR 3044 #define ER_STD_DOMAIN_ERROR 3045 #define ER_STD_LENGTH_ERROR 3046 #define ER_STD_INVALID_ARGUMENT 3047 #define ER_STD_OUT_OF_RANGE_ERROR 3048 #define ER_STD_OVERFLOW_ERROR 3049 #define ER_STD_RANGE_ERROR 3050 #define ER_STD_UNDERFLOW_ERROR 3051 #define ER_STD_LOGIC_ERROR 3052 #define ER_STD_RUNTIME_ERROR 3053 #define ER_STD_UNKNOWN_EXCEPTION 3054 #define ER_GIS_DATA_WRONG_ENDIANESS 3055 #define ER_CHANGE_SOURCE_PASSWORD_LENGTH 3056 #define ER_USER_LOCK_WRONG_NAME 3057 #define ER_USER_LOCK_DEADLOCK 3058 #define ER_REPLACE_INACCESSIBLE_ROWS 3059 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_GIS 3060 #define ER_ILLEGAL_USER_VAR 3061 #define ER_GTID_MODE_OFF 3062 //#define OBSOLETE_ER_UNSUPPORTED_BY_REPLICATION_THREAD 3063 #define ER_INCORRECT_TYPE 3064 #define ER_FIELD_IN_ORDER_NOT_SELECT 3065 #define ER_AGGREGATE_IN_ORDER_NOT_SELECT 3066 #define ER_INVALID_RPL_WILD_TABLE_FILTER_PATTERN 3067 #define ER_NET_OK_PACKET_TOO_LARGE 3068 #define ER_INVALID_JSON_DATA 3069 #define ER_INVALID_GEOJSON_MISSING_MEMBER 3070 #define ER_INVALID_GEOJSON_WRONG_TYPE 3071 #define ER_INVALID_GEOJSON_UNSPECIFIED 3072 #define ER_DIMENSION_UNSUPPORTED 3073 #define ER_REPLICA_CHANNEL_DOES_NOT_EXIST 3074 //#define OBSOLETE_ER_SLAVE_MULTIPLE_CHANNELS_HOST_PORT 3075 #define ER_REPLICA_CHANNEL_NAME_INVALID_OR_TOO_LONG 3076 #define ER_REPLICA_NEW_CHANNEL_WRONG_REPOSITORY 3077 //#define OBSOLETE_ER_SLAVE_CHANNEL_DELETE 3078 #define ER_REPLICA_MULTIPLE_CHANNELS_CMD 3079 #define ER_REPLICA_MAX_CHANNELS_EXCEEDED 3080 #define ER_REPLICA_CHANNEL_MUST_STOP 3081 #define ER_REPLICA_CHANNEL_NOT_RUNNING 3082 #define ER_REPLICA_CHANNEL_WAS_RUNNING 3083 #define ER_REPLICA_CHANNEL_WAS_NOT_RUNNING 3084 #define ER_REPLICA_CHANNEL_SQL_THREAD_MUST_STOP 3085 #define ER_REPLICA_CHANNEL_SQL_SKIP_COUNTER 3086 #define ER_WRONG_FIELD_WITH_GROUP_V2 3087 #define ER_MIX_OF_GROUP_FUNC_AND_FIELDS_V2 3088 #define ER_WARN_DEPRECATED_SYSVAR_UPDATE 3089 #define ER_WARN_DEPRECATED_SQLMODE 3090 #define ER_CANNOT_LOG_PARTIAL_DROP_DATABASE_WITH_GTID 3091 #define ER_GROUP_REPLICATION_CONFIGURATION 3092 #define ER_GROUP_REPLICATION_RUNNING 3093 #define ER_GROUP_REPLICATION_APPLIER_INIT_ERROR 3094 #define ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT 3095 #define ER_GROUP_REPLICATION_COMMUNICATION_LAYER_SESSION_ERROR 3096 #define ER_GROUP_REPLICATION_COMMUNICATION_LAYER_JOIN_ERROR 3097 #define ER_BEFORE_DML_VALIDATION_ERROR 3098 #define ER_PREVENTS_VARIABLE_WITHOUT_RBR 3099 #define ER_RUN_HOOK_ERROR 3100 #define ER_TRANSACTION_ROLLBACK_DURING_COMMIT 3101 #define ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED 3102 #define ER_UNSUPPORTED_ALTER_INPLACE_ON_VIRTUAL_COLUMN 3103 #define ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN 3104 #define ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN 3105 #define ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN 3106 #define ER_GENERATED_COLUMN_NON_PRIOR 3107 #define ER_DEPENDENT_BY_GENERATED_COLUMN 3108 #define ER_GENERATED_COLUMN_REF_AUTO_INC 3109 #define ER_FEATURE_NOT_AVAILABLE 3110 #define ER_CANT_SET_GTID_MODE 3111 #define ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF 3112 //#define OBSOLETE_ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION 3113 //#define OBSOLETE_ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON 3114 //#define OBSOLETE_ER_CANT_REPLICATE_GTID_WITH_GTID_MODE_OFF 3115 #define ER_CANT_ENFORCE_GTID_CONSISTENCY_WITH_ONGOING_GTID_VIOLATING_TX 3116 #define ER_ENFORCE_GTID_CONSISTENCY_WARN_WITH_ONGOING_GTID_VIOLATING_TX 3117 #define ER_ACCOUNT_HAS_BEEN_LOCKED 3118 #define ER_WRONG_TABLESPACE_NAME 3119 #define ER_TABLESPACE_IS_NOT_EMPTY 3120 #define ER_WRONG_FILE_NAME 3121 #define ER_BOOST_GEOMETRY_INCONSISTENT_TURNS_EXCEPTION 3122 #define ER_WARN_OPTIMIZER_HINT_SYNTAX_ERROR 3123 #define ER_WARN_BAD_MAX_EXECUTION_TIME 3124 #define ER_WARN_UNSUPPORTED_MAX_EXECUTION_TIME 3125 #define ER_WARN_CONFLICTING_HINT 3126 #define ER_WARN_UNKNOWN_QB_NAME 3127 #define ER_UNRESOLVED_HINT_NAME 3128 #define ER_WARN_ON_MODIFYING_GTID_EXECUTED_TABLE 3129 #define ER_PLUGGABLE_PROTOCOL_COMMAND_NOT_SUPPORTED 3130 #define ER_LOCKING_SERVICE_WRONG_NAME 3131 #define ER_LOCKING_SERVICE_DEADLOCK 3132 #define ER_LOCKING_SERVICE_TIMEOUT 3133 #define ER_GIS_MAX_POINTS_IN_GEOMETRY_OVERFLOWED 3134 #define ER_SQL_MODE_MERGED 3135 #define ER_VTOKEN_PLUGIN_TOKEN_MISMATCH 3136 #define ER_VTOKEN_PLUGIN_TOKEN_NOT_FOUND 3137 #define ER_CANT_SET_VARIABLE_WHEN_OWNING_GTID 3138 #define ER_REPLICA_CHANNEL_OPERATION_NOT_ALLOWED 3139 #define ER_INVALID_JSON_TEXT 3140 #define ER_INVALID_JSON_TEXT_IN_PARAM 3141 #define ER_INVALID_JSON_BINARY_DATA 3142 #define ER_INVALID_JSON_PATH 3143 #define ER_INVALID_JSON_CHARSET 3144 #define ER_INVALID_JSON_CHARSET_IN_FUNCTION 3145 #define ER_INVALID_TYPE_FOR_JSON 3146 #define ER_INVALID_CAST_TO_JSON 3147 #define ER_INVALID_JSON_PATH_CHARSET 3148 #define ER_INVALID_JSON_PATH_WILDCARD 3149 #define ER_JSON_VALUE_TOO_BIG 3150 #define ER_JSON_KEY_TOO_BIG 3151 #define ER_JSON_USED_AS_KEY 3152 #define ER_JSON_VACUOUS_PATH 3153 #define ER_JSON_BAD_ONE_OR_ALL_ARG 3154 #define ER_NUMERIC_JSON_VALUE_OUT_OF_RANGE 3155 #define ER_INVALID_JSON_VALUE_FOR_CAST 3156 #define ER_JSON_DOCUMENT_TOO_DEEP 3157 #define ER_JSON_DOCUMENT_NULL_KEY 3158 #define ER_SECURE_TRANSPORT_REQUIRED 3159 #define ER_NO_SECURE_TRANSPORTS_CONFIGURED 3160 #define ER_DISABLED_STORAGE_ENGINE 3161 #define ER_USER_DOES_NOT_EXIST 3162 #define ER_USER_ALREADY_EXISTS 3163 #define ER_AUDIT_API_ABORT 3164 #define ER_INVALID_JSON_PATH_ARRAY_CELL 3165 #define ER_BUFPOOL_RESIZE_INPROGRESS 3166 #define ER_FEATURE_DISABLED_SEE_DOC 3167 #define ER_SERVER_ISNT_AVAILABLE 3168 #define ER_SESSION_WAS_KILLED 3169 #define ER_CAPACITY_EXCEEDED 3170 #define ER_CAPACITY_EXCEEDED_IN_RANGE_OPTIMIZER 3171 //#define OBSOLETE_ER_TABLE_NEEDS_UPG_PART 3172 #define ER_CANT_WAIT_FOR_EXECUTED_GTID_SET_WHILE_OWNING_A_GTID 3173 #define ER_CANNOT_ADD_FOREIGN_BASE_COL_VIRTUAL 3174 #define ER_CANNOT_CREATE_VIRTUAL_INDEX_CONSTRAINT 3175 #define ER_ERROR_ON_MODIFYING_GTID_EXECUTED_TABLE 3176 #define ER_LOCK_REFUSED_BY_ENGINE 3177 #define ER_UNSUPPORTED_ALTER_ONLINE_ON_VIRTUAL_COLUMN 3178 #define ER_MASTER_KEY_ROTATION_NOT_SUPPORTED_BY_SE 3179 //#define OBSOLETE_ER_MASTER_KEY_ROTATION_ERROR_BY_SE 3180 #define ER_MASTER_KEY_ROTATION_BINLOG_FAILED 3181 #define ER_MASTER_KEY_ROTATION_SE_UNAVAILABLE 3182 #define ER_TABLESPACE_CANNOT_ENCRYPT 3183 #define ER_INVALID_ENCRYPTION_OPTION 3184 #define ER_CANNOT_FIND_KEY_IN_KEYRING 3185 #define ER_CAPACITY_EXCEEDED_IN_PARSER 3186 #define ER_UNSUPPORTED_ALTER_ENCRYPTION_INPLACE 3187 #define ER_KEYRING_UDF_KEYRING_SERVICE_ERROR 3188 #define ER_USER_COLUMN_OLD_LENGTH 3189 #define ER_CANT_RESET_SOURCE 3190 #define ER_GROUP_REPLICATION_MAX_GROUP_SIZE 3191 #define ER_CANNOT_ADD_FOREIGN_BASE_COL_STORED 3192 #define ER_TABLE_REFERENCED 3193 //#define OBSOLETE_ER_PARTITION_ENGINE_DEPRECATED_FOR_TABLE 3194 //#define OBSOLETE_ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID_ZERO 3195 //#define OBSOLETE_ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID 3196 #define ER_XA_RETRY 3197 #define ER_KEYRING_AWS_UDF_AWS_KMS_ERROR 3198 #define ER_BINLOG_UNSAFE_XA 3199 #define ER_UDF_ERROR 3200 #define ER_KEYRING_MIGRATION_FAILURE 3201 #define ER_KEYRING_ACCESS_DENIED_ERROR 3202 #define ER_KEYRING_MIGRATION_STATUS 3203 //#define OBSOLETE_ER_PLUGIN_FAILED_TO_OPEN_TABLES 3204 //#define OBSOLETE_ER_PLUGIN_FAILED_TO_OPEN_TABLE 3205 //#define OBSOLETE_ER_AUDIT_LOG_NO_KEYRING_PLUGIN_INSTALLED 3206 //#define OBSOLETE_ER_AUDIT_LOG_ENCRYPTION_PASSWORD_HAS_NOT_BEEN_SET 3207 //#define OBSOLETE_ER_AUDIT_LOG_COULD_NOT_CREATE_AES_KEY 3208 //#define OBSOLETE_ER_AUDIT_LOG_ENCRYPTION_PASSWORD_CANNOT_BE_FETCHED 3209 //#define OBSOLETE_ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED 3210 //#define OBSOLETE_ER_AUDIT_LOG_UDF_INSUFFICIENT_PRIVILEGE 3211 //#define OBSOLETE_ER_AUDIT_LOG_SUPER_PRIVILEGE_REQUIRED 3212 //#define OBSOLETE_ER_COULD_NOT_REINITIALIZE_AUDIT_LOG_FILTERS 3213 //#define OBSOLETE_ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_TYPE 3214 //#define OBSOLETE_ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_COUNT 3215 //#define OBSOLETE_ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED 3216 //#define OBSOLETE_ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_TYPE 3217 #define ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_VALUE 3218 //#define OBSOLETE_ER_AUDIT_LOG_JSON_FILTER_PARSING_ERROR 3219 //#define OBSOLETE_ER_AUDIT_LOG_JSON_FILTER_NAME_CANNOT_BE_EMPTY 3220 //#define OBSOLETE_ER_AUDIT_LOG_JSON_USER_NAME_CANNOT_BE_EMPTY 3221 //#define OBSOLETE_ER_AUDIT_LOG_JSON_FILTER_DOES_NOT_EXISTS 3222 //#define OBSOLETE_ER_AUDIT_LOG_USER_FIRST_CHARACTER_MUST_BE_ALPHANUMERIC 3223 //#define OBSOLETE_ER_AUDIT_LOG_USER_NAME_INVALID_CHARACTER 3224 //#define OBSOLETE_ER_AUDIT_LOG_HOST_NAME_INVALID_CHARACTER 3225 #define OBSOLETE_WARN_DEPRECATED_MAXDB_SQL_MODE_FOR_TIMESTAMP 3226 //#define OBSOLETE_ER_XA_REPLICATION_FILTERS 3227 //#define OBSOLETE_ER_CANT_OPEN_ERROR_LOG 3228 //#define OBSOLETE_ER_GROUPING_ON_TIMESTAMP_IN_DST 3229 //#define OBSOLETE_ER_CANT_START_SERVER_NAMED_PIPE 3230 #define ER_WRITE_SET_EXCEEDS_LIMIT 3231 //#define OBSOLETE_ER_DEPRECATED_TLS_VERSION_SESSION_57 3232 //#define OBSOLETE_ER_WARN_DEPRECATED_TLS_VERSION_57 3233 //#define OBSOLETE_ER_WARN_WRONG_NATIVE_TABLE_STRUCTURE 3234 #define ER_AES_INVALID_KDF_NAME 3235 #define ER_AES_INVALID_KDF_ITERATIONS 3236 #define WARN_AES_KEY_SIZE 3237 #define ER_AES_INVALID_KDF_OPTION_SIZE 3238 #define ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE 3500 #define ER_ACL_OPERATION_FAILED 3501 #define ER_UNSUPPORTED_INDEX_ALGORITHM 3502 #define ER_NO_SUCH_DB 3503 #define ER_TOO_BIG_ENUM 3504 #define ER_TOO_LONG_SET_ENUM_VALUE 3505 #define ER_INVALID_DD_OBJECT 3506 #define ER_UPDATING_DD_TABLE 3507 #define ER_INVALID_DD_OBJECT_ID 3508 #define ER_INVALID_DD_OBJECT_NAME 3509 #define ER_TABLESPACE_MISSING_WITH_NAME 3510 #define ER_TOO_LONG_ROUTINE_COMMENT 3511 #define ER_SP_LOAD_FAILED 3512 #define ER_INVALID_BITWISE_OPERANDS_SIZE 3513 #define ER_INVALID_BITWISE_AGGREGATE_OPERANDS_SIZE 3514 #define ER_WARN_UNSUPPORTED_HINT 3515 #define ER_UNEXPECTED_GEOMETRY_TYPE 3516 #define ER_SRS_PARSE_ERROR 3517 #define ER_SRS_PROJ_PARAMETER_MISSING 3518 #define ER_WARN_SRS_NOT_FOUND 3519 #define ER_SRS_NOT_CARTESIAN 3520 #define ER_SRS_NOT_CARTESIAN_UNDEFINED 3521 #define ER_PK_INDEX_CANT_BE_INVISIBLE 3522 #define ER_UNKNOWN_AUTHID 3523 #define ER_FAILED_ROLE_GRANT 3524 #define ER_OPEN_ROLE_TABLES 3525 #define ER_FAILED_DEFAULT_ROLES 3526 #define ER_COMPONENTS_NO_SCHEME 3527 #define ER_COMPONENTS_NO_SCHEME_SERVICE 3528 #define ER_COMPONENTS_CANT_LOAD 3529 #define ER_ROLE_NOT_GRANTED 3530 #define ER_FAILED_REVOKE_ROLE 3531 #define ER_RENAME_ROLE 3532 #define ER_COMPONENTS_CANT_ACQUIRE_SERVICE_IMPLEMENTATION 3533 #define ER_COMPONENTS_CANT_SATISFY_DEPENDENCY 3534 #define ER_COMPONENTS_LOAD_CANT_REGISTER_SERVICE_IMPLEMENTATION 3535 #define ER_COMPONENTS_LOAD_CANT_INITIALIZE 3536 #define ER_COMPONENTS_UNLOAD_NOT_LOADED 3537 #define ER_COMPONENTS_UNLOAD_CANT_DEINITIALIZE 3538 #define ER_COMPONENTS_CANT_RELEASE_SERVICE 3539 #define ER_COMPONENTS_UNLOAD_CANT_UNREGISTER_SERVICE 3540 #define ER_COMPONENTS_CANT_UNLOAD 3541 #define ER_WARN_UNLOAD_THE_NOT_PERSISTED 3542 #define ER_COMPONENT_TABLE_INCORRECT 3543 #define ER_COMPONENT_MANIPULATE_ROW_FAILED 3544 #define ER_COMPONENTS_UNLOAD_DUPLICATE_IN_GROUP 3545 #define ER_CANT_SET_GTID_PURGED_DUE_SETS_CONSTRAINTS 3546 #define ER_CANNOT_LOCK_USER_MANAGEMENT_CACHES 3547 #define ER_SRS_NOT_FOUND 3548 #define ER_VARIABLE_NOT_PERSISTED 3549 #define ER_IS_QUERY_INVALID_CLAUSE 3550 #define ER_UNABLE_TO_STORE_STATISTICS 3551 #define ER_NO_SYSTEM_SCHEMA_ACCESS 3552 #define ER_NO_SYSTEM_TABLESPACE_ACCESS 3553 #define ER_NO_SYSTEM_TABLE_ACCESS 3554 #define ER_NO_SYSTEM_TABLE_ACCESS_FOR_DICTIONARY_TABLE 3555 #define ER_NO_SYSTEM_TABLE_ACCESS_FOR_SYSTEM_TABLE 3556 #define ER_NO_SYSTEM_TABLE_ACCESS_FOR_TABLE 3557 #define ER_INVALID_OPTION_KEY 3558 #define ER_INVALID_OPTION_VALUE 3559 #define ER_INVALID_OPTION_KEY_VALUE_PAIR 3560 #define ER_INVALID_OPTION_START_CHARACTER 3561 #define ER_INVALID_OPTION_END_CHARACTER 3562 #define ER_INVALID_OPTION_CHARACTERS 3563 #define ER_DUPLICATE_OPTION_KEY 3564 #define ER_WARN_SRS_NOT_FOUND_AXIS_ORDER 3565 #define ER_NO_ACCESS_TO_NATIVE_FCT 3566 #define ER_RESET_SOURCE_TO_VALUE_OUT_OF_RANGE 3567 #define ER_UNRESOLVED_TABLE_LOCK 3568 #define ER_DUPLICATE_TABLE_LOCK 3569 #define ER_BINLOG_UNSAFE_SKIP_LOCKED 3570 #define ER_BINLOG_UNSAFE_NOWAIT 3571 #define ER_LOCK_NOWAIT 3572 #define ER_CTE_RECURSIVE_REQUIRES_UNION 3573 #define ER_CTE_RECURSIVE_REQUIRES_NONRECURSIVE_FIRST 3574 #define ER_CTE_RECURSIVE_FORBIDS_AGGREGATION 3575 #define ER_CTE_RECURSIVE_FORBIDDEN_JOIN_ORDER 3576 #define ER_CTE_RECURSIVE_REQUIRES_SINGLE_REFERENCE 3577 #define ER_SWITCH_TMP_ENGINE 3578 #define ER_WINDOW_NO_SUCH_WINDOW 3579 #define ER_WINDOW_CIRCULARITY_IN_WINDOW_GRAPH 3580 #define ER_WINDOW_NO_CHILD_PARTITIONING 3581 #define ER_WINDOW_NO_INHERIT_FRAME 3582 #define ER_WINDOW_NO_REDEFINE_ORDER_BY 3583 #define ER_WINDOW_FRAME_START_ILLEGAL 3584 #define ER_WINDOW_FRAME_END_ILLEGAL 3585 #define ER_WINDOW_FRAME_ILLEGAL 3586 #define ER_WINDOW_RANGE_FRAME_ORDER_TYPE 3587 #define ER_WINDOW_RANGE_FRAME_TEMPORAL_TYPE 3588 #define ER_WINDOW_RANGE_FRAME_NUMERIC_TYPE 3589 #define ER_WINDOW_RANGE_BOUND_NOT_CONSTANT 3590 #define ER_WINDOW_DUPLICATE_NAME 3591 #define ER_WINDOW_ILLEGAL_ORDER_BY 3592 #define ER_WINDOW_INVALID_WINDOW_FUNC_USE 3593 #define ER_WINDOW_INVALID_WINDOW_FUNC_ALIAS_USE 3594 #define ER_WINDOW_NESTED_WINDOW_FUNC_USE_IN_WINDOW_SPEC 3595 #define ER_WINDOW_ROWS_INTERVAL_USE 3596 #define ER_WINDOW_NO_GROUP_ORDER_UNUSED 3597 #define ER_WINDOW_EXPLAIN_JSON 3598 #define ER_WINDOW_FUNCTION_IGNORES_FRAME 3599 #define ER_WL9236_NOW_UNUSED 3600 #define ER_INVALID_NO_OF_ARGS 3601 #define ER_FIELD_IN_GROUPING_NOT_GROUP_BY 3602 #define ER_TOO_LONG_TABLESPACE_COMMENT 3603 #define ER_ENGINE_CANT_DROP_TABLE 3604 #define ER_ENGINE_CANT_DROP_MISSING_TABLE 3605 #define ER_TABLESPACE_DUP_FILENAME 3606 #define ER_DB_DROP_RMDIR2 3607 #define ER_IMP_NO_FILES_MATCHED 3608 #define ER_IMP_SCHEMA_DOES_NOT_EXIST 3609 #define ER_IMP_TABLE_ALREADY_EXISTS 3610 #define ER_IMP_INCOMPATIBLE_MYSQLD_VERSION 3611 #define ER_IMP_INCOMPATIBLE_DD_VERSION 3612 #define ER_IMP_INCOMPATIBLE_SDI_VERSION 3613 #define ER_WARN_INVALID_HINT 3614 #define ER_VAR_DOES_NOT_EXIST 3615 #define ER_LONGITUDE_OUT_OF_RANGE 3616 #define ER_LATITUDE_OUT_OF_RANGE 3617 #define ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS 3618 #define ER_ILLEGAL_PRIVILEGE_LEVEL 3619 #define ER_NO_SYSTEM_VIEW_ACCESS 3620 #define ER_COMPONENT_FILTER_FLABBERGASTED 3621 #define ER_PART_EXPR_TOO_LONG 3622 #define ER_UDF_DROP_DYNAMICALLY_REGISTERED 3623 #define ER_UNABLE_TO_STORE_COLUMN_STATISTICS 3624 #define ER_UNABLE_TO_UPDATE_COLUMN_STATISTICS 3625 #define ER_UNABLE_TO_DROP_COLUMN_STATISTICS 3626 #define ER_UNABLE_TO_BUILD_HISTOGRAM 3627 #define ER_MANDATORY_ROLE 3628 #define ER_MISSING_TABLESPACE_FILE 3629 #define ER_PERSIST_ONLY_ACCESS_DENIED_ERROR 3630 #define ER_CMD_NEED_SUPER 3631 #define ER_PATH_IN_DATADIR 3632 #define ER_CLONE_DDL_IN_PROGRESS 3633 #define ER_CLONE_TOO_MANY_CONCURRENT_CLONES 3634 #define ER_APPLIER_LOG_EVENT_VALIDATION_ERROR 3635 #define ER_CTE_MAX_RECURSION_DEPTH 3636 #define ER_NOT_HINT_UPDATABLE_VARIABLE 3637 #define ER_CREDENTIALS_CONTRADICT_TO_HISTORY 3638 #define ER_WARNING_PASSWORD_HISTORY_CLAUSES_VOID 3639 #define ER_CLIENT_DOES_NOT_SUPPORT 3640 #define ER_I_S_SKIPPED_TABLESPACE 3641 #define ER_TABLESPACE_ENGINE_MISMATCH 3642 #define ER_WRONG_SRID_FOR_COLUMN 3643 #define ER_CANNOT_ALTER_SRID_DUE_TO_INDEX 3644 #define ER_WARN_BINLOG_PARTIAL_UPDATES_DISABLED 3645 #define ER_WARN_BINLOG_V1_ROW_EVENTS_DISABLED 3646 #define ER_WARN_BINLOG_PARTIAL_UPDATES_SUGGESTS_PARTIAL_IMAGES 3647 #define ER_COULD_NOT_APPLY_JSON_DIFF 3648 #define ER_CORRUPTED_JSON_DIFF 3649 #define ER_RESOURCE_GROUP_EXISTS 3650 #define ER_RESOURCE_GROUP_NOT_EXISTS 3651 #define ER_INVALID_VCPU_ID 3652 #define ER_INVALID_VCPU_RANGE 3653 #define ER_INVALID_THREAD_PRIORITY 3654 #define ER_DISALLOWED_OPERATION 3655 #define ER_RESOURCE_GROUP_BUSY 3656 #define ER_RESOURCE_GROUP_DISABLED 3657 #define ER_FEATURE_UNSUPPORTED 3658 #define ER_ATTRIBUTE_IGNORED 3659 #define ER_INVALID_THREAD_ID 3660 #define ER_RESOURCE_GROUP_BIND_FAILED 3661 #define ER_INVALID_USE_OF_FORCE_OPTION 3662 #define ER_GROUP_REPLICATION_COMMAND_FAILURE 3663 #define ER_SDI_OPERATION_FAILED 3664 #define ER_MISSING_JSON_TABLE_VALUE 3665 #define ER_WRONG_JSON_TABLE_VALUE 3666 #define ER_TF_MUST_HAVE_ALIAS 3667 #define ER_TF_FORBIDDEN_JOIN_TYPE 3668 #define ER_JT_VALUE_OUT_OF_RANGE 3669 #define ER_JT_MAX_NESTED_PATH 3670 #define ER_PASSWORD_EXPIRATION_NOT_SUPPORTED_BY_AUTH_METHOD 3671 #define ER_INVALID_GEOJSON_CRS_NOT_TOP_LEVEL 3672 #define ER_BAD_NULL_ERROR_NOT_IGNORED 3673 #define WARN_USELESS_SPATIAL_INDEX 3674 #define ER_DISK_FULL_NOWAIT 3675 #define ER_PARSE_ERROR_IN_DIGEST_FN 3676 #define ER_UNDISCLOSED_PARSE_ERROR_IN_DIGEST_FN 3677 #define ER_SCHEMA_DIR_EXISTS 3678 #define ER_SCHEMA_DIR_MISSING 3679 #define ER_SCHEMA_DIR_CREATE_FAILED 3680 #define ER_SCHEMA_DIR_UNKNOWN 3681 #define ER_ONLY_IMPLEMENTED_FOR_SRID_0_AND_4326 3682 #define ER_BINLOG_EXPIRE_LOG_DAYS_AND_SECS_USED_TOGETHER 3683 #define ER_REGEXP_BUFFER_OVERFLOW 3684 #define ER_REGEXP_ILLEGAL_ARGUMENT 3685 #define ER_REGEXP_INDEX_OUTOFBOUNDS_ERROR 3686 #define ER_REGEXP_INTERNAL_ERROR 3687 #define ER_REGEXP_RULE_SYNTAX 3688 #define ER_REGEXP_BAD_ESCAPE_SEQUENCE 3689 #define ER_REGEXP_UNIMPLEMENTED 3690 #define ER_REGEXP_MISMATCHED_PAREN 3691 #define ER_REGEXP_BAD_INTERVAL 3692 #define ER_REGEXP_MAX_LT_MIN 3693 #define ER_REGEXP_INVALID_BACK_REF 3694 #define ER_REGEXP_LOOK_BEHIND_LIMIT 3695 #define ER_REGEXP_MISSING_CLOSE_BRACKET 3696 #define ER_REGEXP_INVALID_RANGE 3697 #define ER_REGEXP_STACK_OVERFLOW 3698 #define ER_REGEXP_TIME_OUT 3699 #define ER_REGEXP_PATTERN_TOO_BIG 3700 #define ER_CANT_SET_ERROR_LOG_SERVICE 3701 #define ER_EMPTY_PIPELINE_FOR_ERROR_LOG_SERVICE 3702 #define ER_COMPONENT_FILTER_DIAGNOSTICS 3703 #define ER_NOT_IMPLEMENTED_FOR_CARTESIAN_SRS 3704 #define ER_NOT_IMPLEMENTED_FOR_PROJECTED_SRS 3705 #define ER_NONPOSITIVE_RADIUS 3706 #define ER_RESTART_SERVER_FAILED 3707 #define ER_SRS_MISSING_MANDATORY_ATTRIBUTE 3708 #define ER_SRS_MULTIPLE_ATTRIBUTE_DEFINITIONS 3709 #define ER_SRS_NAME_CANT_BE_EMPTY_OR_WHITESPACE 3710 #define ER_SRS_ORGANIZATION_CANT_BE_EMPTY_OR_WHITESPACE 3711 #define ER_SRS_ID_ALREADY_EXISTS 3712 #define ER_WARN_SRS_ID_ALREADY_EXISTS 3713 #define ER_CANT_MODIFY_SRID_0 3714 #define ER_WARN_RESERVED_SRID_RANGE 3715 #define ER_CANT_MODIFY_SRS_USED_BY_COLUMN 3716 #define ER_SRS_INVALID_CHARACTER_IN_ATTRIBUTE 3717 #define ER_SRS_ATTRIBUTE_STRING_TOO_LONG 3718 #define ER_DEPRECATED_UTF8_ALIAS 3719 #define ER_DEPRECATED_NATIONAL 3720 #define ER_INVALID_DEFAULT_UTF8MB4_COLLATION 3721 #define ER_UNABLE_TO_COLLECT_LOG_STATUS 3722 #define ER_RESERVED_TABLESPACE_NAME 3723 #define ER_UNABLE_TO_SET_OPTION 3724 #define ER_REPLICA_POSSIBLY_DIVERGED_AFTER_DDL 3725 #define ER_SRS_NOT_GEOGRAPHIC 3726 #define ER_POLYGON_TOO_LARGE 3727 #define ER_SPATIAL_UNIQUE_INDEX 3728 #define ER_INDEX_TYPE_NOT_SUPPORTED_FOR_SPATIAL_INDEX 3729 #define ER_FK_CANNOT_DROP_PARENT 3730 #define ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE 3731 #define ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE 3732 #define ER_FK_CANNOT_USE_VIRTUAL_COLUMN 3733 #define ER_FK_NO_COLUMN_PARENT 3734 #define ER_CANT_SET_ERROR_SUPPRESSION_LIST 3735 #define ER_SRS_GEOGCS_INVALID_AXES 3736 #define ER_SRS_INVALID_SEMI_MAJOR_AXIS 3737 #define ER_SRS_INVALID_INVERSE_FLATTENING 3738 #define ER_SRS_INVALID_ANGULAR_UNIT 3739 #define ER_SRS_INVALID_PRIME_MERIDIAN 3740 #define ER_TRANSFORM_SOURCE_SRS_NOT_SUPPORTED 3741 #define ER_TRANSFORM_TARGET_SRS_NOT_SUPPORTED 3742 #define ER_TRANSFORM_SOURCE_SRS_MISSING_TOWGS84 3743 #define ER_TRANSFORM_TARGET_SRS_MISSING_TOWGS84 3744 #define ER_TEMP_TABLE_PREVENTS_SWITCH_SESSION_BINLOG_FORMAT 3745 #define ER_TEMP_TABLE_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT 3746 #define ER_RUNNING_APPLIER_PREVENTS_SWITCH_GLOBAL_BINLOG_FORMAT 3747 #define ER_CLIENT_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRX_IN_SBR 3748 //#define OBSOLETE_ER_XA_CANT_CREATE_MDL_BACKUP 3749 #define ER_TABLE_WITHOUT_PK 3750 #define ER_WARN_DATA_TRUNCATED_FUNCTIONAL_INDEX 3751 #define ER_WARN_DATA_OUT_OF_RANGE_FUNCTIONAL_INDEX 3752 #define ER_FUNCTIONAL_INDEX_ON_JSON_OR_GEOMETRY_FUNCTION 3753 #define ER_FUNCTIONAL_INDEX_REF_AUTO_INCREMENT 3754 #define ER_CANNOT_DROP_COLUMN_FUNCTIONAL_INDEX 3755 #define ER_FUNCTIONAL_INDEX_PRIMARY_KEY 3756 #define ER_FUNCTIONAL_INDEX_ON_LOB 3757 #define ER_FUNCTIONAL_INDEX_FUNCTION_IS_NOT_ALLOWED 3758 #define ER_FULLTEXT_FUNCTIONAL_INDEX 3759 #define ER_SPATIAL_FUNCTIONAL_INDEX 3760 #define ER_WRONG_KEY_COLUMN_FUNCTIONAL_INDEX 3761 #define ER_FUNCTIONAL_INDEX_ON_FIELD 3762 #define ER_GENERATED_COLUMN_NAMED_FUNCTION_IS_NOT_ALLOWED 3763 #define ER_GENERATED_COLUMN_ROW_VALUE 3764 #define ER_GENERATED_COLUMN_VARIABLES 3765 #define ER_DEPENDENT_BY_DEFAULT_GENERATED_VALUE 3766 #define ER_DEFAULT_VAL_GENERATED_NON_PRIOR 3767 #define ER_DEFAULT_VAL_GENERATED_REF_AUTO_INC 3768 #define ER_DEFAULT_VAL_GENERATED_FUNCTION_IS_NOT_ALLOWED 3769 #define ER_DEFAULT_VAL_GENERATED_NAMED_FUNCTION_IS_NOT_ALLOWED 3770 #define ER_DEFAULT_VAL_GENERATED_ROW_VALUE 3771 #define ER_DEFAULT_VAL_GENERATED_VARIABLES 3772 #define ER_DEFAULT_AS_VAL_GENERATED 3773 #define ER_UNSUPPORTED_ACTION_ON_DEFAULT_VAL_GENERATED 3774 #define ER_GTID_UNSAFE_ALTER_ADD_COL_WITH_DEFAULT_EXPRESSION 3775 #define ER_FK_CANNOT_CHANGE_ENGINE 3776 #define ER_WARN_DEPRECATED_USER_SET_EXPR 3777 #define ER_WARN_DEPRECATED_UTF8MB3_COLLATION 3778 #define ER_WARN_DEPRECATED_NESTED_COMMENT_SYNTAX 3779 #define ER_FK_INCOMPATIBLE_COLUMNS 3780 #define ER_GR_HOLD_WAIT_TIMEOUT 3781 #define ER_GR_HOLD_KILLED 3782 #define ER_GR_HOLD_MEMBER_STATUS_ERROR 3783 #define ER_RPL_ENCRYPTION_FAILED_TO_FETCH_KEY 3784 #define ER_RPL_ENCRYPTION_KEY_NOT_FOUND 3785 #define ER_RPL_ENCRYPTION_KEYRING_INVALID_KEY 3786 #define ER_RPL_ENCRYPTION_HEADER_ERROR 3787 #define ER_RPL_ENCRYPTION_FAILED_TO_ROTATE_LOGS 3788 #define ER_RPL_ENCRYPTION_KEY_EXISTS_UNEXPECTED 3789 #define ER_RPL_ENCRYPTION_FAILED_TO_GENERATE_KEY 3790 #define ER_RPL_ENCRYPTION_FAILED_TO_STORE_KEY 3791 #define ER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY 3792 #define ER_RPL_ENCRYPTION_UNABLE_TO_CHANGE_OPTION 3793 #define ER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED 3794 #define ER_SLOW_LOG_MODE_IGNORED_WHEN_NOT_LOGGING_TO_FILE 3795 #define ER_GRP_TRX_CONSISTENCY_NOT_ALLOWED 3796 #define ER_GRP_TRX_CONSISTENCY_BEFORE 3797 #define ER_GRP_TRX_CONSISTENCY_AFTER_ON_TRX_BEGIN 3798 #define ER_GRP_TRX_CONSISTENCY_BEGIN_NOT_ALLOWED 3799 #define ER_FUNCTIONAL_INDEX_ROW_VALUE_IS_NOT_ALLOWED 3800 #define ER_RPL_ENCRYPTION_FAILED_TO_ENCRYPT 3801 #define ER_PAGE_TRACKING_NOT_STARTED 3802 #define ER_PAGE_TRACKING_RANGE_NOT_TRACKED 3803 #define ER_PAGE_TRACKING_CANNOT_PURGE 3804 #define ER_RPL_ENCRYPTION_CANNOT_ROTATE_BINLOG_MASTER_KEY 3805 #define ER_BINLOG_MASTER_KEY_RECOVERY_OUT_OF_COMBINATION 3806 #define ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_OPERATE_KEY 3807 #define ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_ROTATE_LOGS 3808 #define ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_REENCRYPT_LOG 3809 #define ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_UNUSED_KEYS 3810 #define ER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_AUX_KEY 3811 #define ER_NON_BOOLEAN_EXPR_FOR_CHECK_CONSTRAINT 3812 #define ER_COLUMN_CHECK_CONSTRAINT_REFERENCES_OTHER_COLUMN 3813 #define ER_CHECK_CONSTRAINT_NAMED_FUNCTION_IS_NOT_ALLOWED 3814 #define ER_CHECK_CONSTRAINT_FUNCTION_IS_NOT_ALLOWED 3815 #define ER_CHECK_CONSTRAINT_VARIABLES 3816 #define ER_CHECK_CONSTRAINT_ROW_VALUE 3817 #define ER_CHECK_CONSTRAINT_REFERS_AUTO_INCREMENT_COLUMN 3818 #define ER_CHECK_CONSTRAINT_VIOLATED 3819 #define ER_CHECK_CONSTRAINT_REFERS_UNKNOWN_COLUMN 3820 #define ER_CHECK_CONSTRAINT_NOT_FOUND 3821 #define ER_CHECK_CONSTRAINT_DUP_NAME 3822 #define ER_CHECK_CONSTRAINT_CLAUSE_USING_FK_REFER_ACTION_COLUMN 3823 #define WARN_UNENCRYPTED_TABLE_IN_ENCRYPTED_DB 3824 #define ER_INVALID_ENCRYPTION_REQUEST 3825 #define ER_CANNOT_SET_TABLE_ENCRYPTION 3826 #define ER_CANNOT_SET_DATABASE_ENCRYPTION 3827 #define ER_CANNOT_SET_TABLESPACE_ENCRYPTION 3828 #define ER_TABLESPACE_CANNOT_BE_ENCRYPTED 3829 #define ER_TABLESPACE_CANNOT_BE_DECRYPTED 3830 #define ER_TABLESPACE_TYPE_UNKNOWN 3831 #define ER_TARGET_TABLESPACE_UNENCRYPTED 3832 #define ER_CANNOT_USE_ENCRYPTION_CLAUSE 3833 #define ER_INVALID_MULTIPLE_CLAUSES 3834 #define ER_UNSUPPORTED_USE_OF_GRANT_AS 3835 #define ER_UKNOWN_AUTH_ID_OR_ACCESS_DENIED_FOR_GRANT_AS 3836 #define ER_DEPENDENT_BY_FUNCTIONAL_INDEX 3837 #define ER_PLUGIN_NOT_EARLY 3838 #define ER_INNODB_REDO_LOG_ARCHIVE_START_SUBDIR_PATH 3839 #define ER_INNODB_REDO_LOG_ARCHIVE_START_TIMEOUT 3840 #define ER_INNODB_REDO_LOG_ARCHIVE_DIRS_INVALID 3841 #define ER_INNODB_REDO_LOG_ARCHIVE_LABEL_NOT_FOUND 3842 #define ER_INNODB_REDO_LOG_ARCHIVE_DIR_EMPTY 3843 #define ER_INNODB_REDO_LOG_ARCHIVE_NO_SUCH_DIR 3844 #define ER_INNODB_REDO_LOG_ARCHIVE_DIR_CLASH 3845 #define ER_INNODB_REDO_LOG_ARCHIVE_DIR_PERMISSIONS 3846 #define ER_INNODB_REDO_LOG_ARCHIVE_FILE_CREATE 3847 #define ER_INNODB_REDO_LOG_ARCHIVE_ACTIVE 3848 #define ER_INNODB_REDO_LOG_ARCHIVE_INACTIVE 3849 #define ER_INNODB_REDO_LOG_ARCHIVE_FAILED 3850 #define ER_INNODB_REDO_LOG_ARCHIVE_SESSION 3851 #define ER_STD_REGEX_ERROR 3852 #define ER_INVALID_JSON_TYPE 3853 #define ER_CANNOT_CONVERT_STRING 3854 #define ER_DEPENDENT_BY_PARTITION_FUNC 3855 #define ER_WARN_DEPRECATED_FLOAT_AUTO_INCREMENT 3856 #define ER_RPL_CANT_STOP_REPLICA_WHILE_LOCKED_BACKUP 3857 #define ER_WARN_DEPRECATED_FLOAT_DIGITS 3858 #define ER_WARN_DEPRECATED_FLOAT_UNSIGNED 3859 #define ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH 3860 #define ER_WARN_DEPRECATED_ZEROFILL 3861 #define ER_CLONE_DONOR 3862 #define ER_CLONE_PROTOCOL 3863 #define ER_CLONE_DONOR_VERSION 3864 #define ER_CLONE_OS 3865 #define ER_CLONE_PLATFORM 3866 #define ER_CLONE_CHARSET 3867 #define ER_CLONE_CONFIG 3868 #define ER_CLONE_SYS_CONFIG 3869 #define ER_CLONE_PLUGIN_MATCH 3870 #define ER_CLONE_LOOPBACK 3871 #define ER_CLONE_ENCRYPTION 3872 #define ER_CLONE_DISK_SPACE 3873 #define ER_CLONE_IN_PROGRESS 3874 #define ER_CLONE_DISALLOWED 3875 #define ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER 3876 #define ER_SECONDARY_ENGINE_PLUGIN 3877 #define ER_SECOND_PASSWORD_CANNOT_BE_EMPTY 3878 #define ER_DB_ACCESS_DENIED 3879 #define ER_DA_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES 3880 #define ER_DA_RPL_GTID_TABLE_CANNOT_OPEN 3881 #define ER_GEOMETRY_IN_UNKNOWN_LENGTH_UNIT 3882 #define ER_DA_PLUGIN_INSTALL_ERROR 3883 #define ER_NO_SESSION_TEMP 3884 #define ER_DA_UNKNOWN_ERROR_NUMBER 3885 #define ER_COLUMN_CHANGE_SIZE 3886 #define ER_REGEXP_INVALID_CAPTURE_GROUP_NAME 3887 #define ER_DA_SSL_LIBRARY_ERROR 3888 #define ER_SECONDARY_ENGINE 3889 #define ER_SECONDARY_ENGINE_DDL 3890 #define ER_INCORRECT_CURRENT_PASSWORD 3891 #define ER_MISSING_CURRENT_PASSWORD 3892 #define ER_CURRENT_PASSWORD_NOT_REQUIRED 3893 #define ER_PASSWORD_CANNOT_BE_RETAINED_ON_PLUGIN_CHANGE 3894 #define ER_CURRENT_PASSWORD_CANNOT_BE_RETAINED 3895 #define ER_PARTIAL_REVOKES_EXIST 3896 #define ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE 3897 #define ER_XA_REPLICATION_FILTERS 3898 #define ER_UNSUPPORTED_SQL_MODE 3899 #define ER_REGEXP_INVALID_FLAG 3900 #define ER_PARTIAL_REVOKE_AND_DB_GRANT_BOTH_EXISTS 3901 #define ER_UNIT_NOT_FOUND 3902 #define ER_INVALID_JSON_VALUE_FOR_FUNC_INDEX 3903 #define ER_JSON_VALUE_OUT_OF_RANGE_FOR_FUNC_INDEX 3904 #define ER_EXCEEDED_MV_KEYS_NUM 3905 #define ER_EXCEEDED_MV_KEYS_SPACE 3906 #define ER_FUNCTIONAL_INDEX_DATA_IS_TOO_LONG 3907 #define ER_WRONG_MVI_VALUE 3908 #define ER_WARN_FUNC_INDEX_NOT_APPLICABLE 3909 #define ER_GRP_RPL_UDF_ERROR 3910 #define ER_UPDATE_GTID_PURGED_WITH_GR 3911 #define ER_GROUPING_ON_TIMESTAMP_IN_DST 3912 #define ER_TABLE_NAME_CAUSES_TOO_LONG_PATH 3913 #define ER_AUDIT_LOG_INSUFFICIENT_PRIVILEGE 3914 //#define OBSOLETE_ER_AUDIT_LOG_PASSWORD_HAS_BEEN_COPIED 3915 #define ER_DA_GRP_RPL_STARTED_AUTO_REJOIN 3916 #define ER_SYSVAR_CHANGE_DURING_QUERY 3917 #define ER_GLOBSTAT_CHANGE_DURING_QUERY 3918 #define ER_GRP_RPL_MESSAGE_SERVICE_INIT_FAILURE 3919 #define ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_CLIENT 3920 #define ER_CHANGE_SOURCE_WRONG_COMPRESSION_LEVEL_CLIENT 3921 #define ER_WRONG_COMPRESSION_ALGORITHM_CLIENT 3922 #define ER_WRONG_COMPRESSION_LEVEL_CLIENT 3923 #define ER_CHANGE_SOURCE_WRONG_COMPRESSION_ALGORITHM_LIST_CLIENT 3924 #define ER_CLIENT_PRIVILEGE_CHECKS_USER_CANNOT_BE_ANONYMOUS 3925 #define ER_CLIENT_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST 3926 #define ER_CLIENT_PRIVILEGE_CHECKS_USER_CORRUPT 3927 #define ER_CLIENT_PRIVILEGE_CHECKS_USER_NEEDS_RPL_APPLIER_PRIV 3928 #define ER_WARN_DA_PRIVILEGE_NOT_REGISTERED 3929 #define ER_CLIENT_KEYRING_UDF_KEY_INVALID 3930 #define ER_CLIENT_KEYRING_UDF_KEY_TYPE_INVALID 3931 #define ER_CLIENT_KEYRING_UDF_KEY_TOO_LONG 3932 #define ER_CLIENT_KEYRING_UDF_KEY_TYPE_TOO_LONG 3933 #define ER_JSON_SCHEMA_VALIDATION_ERROR_WITH_DETAILED_REPORT 3934 #define ER_DA_UDF_INVALID_CHARSET_SPECIFIED 3935 #define ER_DA_UDF_INVALID_CHARSET 3936 #define ER_DA_UDF_INVALID_COLLATION 3937 #define ER_DA_UDF_INVALID_EXTENSION_ARGUMENT_TYPE 3938 #define ER_MULTIPLE_CONSTRAINTS_WITH_SAME_NAME 3939 #define ER_CONSTRAINT_NOT_FOUND 3940 #define ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED 3941 #define ER_TABLE_VALUE_CONSTRUCTOR_MUST_HAVE_COLUMNS 3942 #define ER_TABLE_VALUE_CONSTRUCTOR_CANNOT_HAVE_DEFAULT 3943 #define ER_CLIENT_QUERY_FAILURE_INVALID_NON_ROW_FORMAT 3944 #define ER_REQUIRE_ROW_FORMAT_INVALID_VALUE 3945 #define ER_FAILED_TO_DETERMINE_IF_ROLE_IS_MANDATORY 3946 #define ER_FAILED_TO_FETCH_MANDATORY_ROLE_LIST 3947 #define ER_CLIENT_LOCAL_FILES_DISABLED 3948 #define ER_IMP_INCOMPATIBLE_CFG_VERSION 3949 #define ER_DA_OOM 3950 #define ER_DA_UDF_INVALID_ARGUMENT_TO_SET_CHARSET 3951 #define ER_DA_UDF_INVALID_RETURN_TYPE_TO_SET_CHARSET 3952 #define ER_MULTIPLE_INTO_CLAUSES 3953 #define ER_MISPLACED_INTO 3954 #define ER_USER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK 3955 #define ER_WARN_DEPRECATED_YEAR_UNSIGNED 3956 #define ER_CLONE_NETWORK_PACKET 3957 #define ER_SDI_OPERATION_FAILED_MISSING_RECORD 3958 #define ER_DEPENDENT_BY_CHECK_CONSTRAINT 3959 #define ER_GRP_OPERATION_NOT_ALLOWED_GR_MUST_STOP 3960 #define ER_WARN_DEPRECATED_JSON_TABLE_ON_ERROR_ON_EMPTY 3961 #define ER_WARN_DEPRECATED_INNER_INTO 3962 #define ER_WARN_DEPRECATED_VALUES_FUNCTION_ALWAYS_NULL 3963 #define ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS 3964 #define ER_WARN_DEPRECATED_FOUND_ROWS 3965 #define ER_MISSING_JSON_VALUE 3966 #define ER_MULTIPLE_JSON_VALUES 3967 #define ER_HOSTNAME_TOO_LONG 3968 #define ER_WARN_CLIENT_DEPRECATED_PARTITION_PREFIX_KEY 3969 #define ER_GROUP_REPLICATION_USER_EMPTY_MSG 3970 #define ER_GROUP_REPLICATION_USER_MANDATORY_MSG 3971 #define ER_GROUP_REPLICATION_PASSWORD_LENGTH 3972 #define ER_SUBQUERY_TRANSFORM_REJECTED 3973 #define ER_DA_GRP_RPL_RECOVERY_ENDPOINT_FORMAT 3974 #define ER_DA_GRP_RPL_RECOVERY_ENDPOINT_INVALID 3975 #define ER_WRONG_VALUE_FOR_VAR_PLUS_ACTIONABLE_PART 3976 #define ER_STATEMENT_NOT_ALLOWED_AFTER_START_TRANSACTION 3977 #define ER_FOREIGN_KEY_WITH_ATOMIC_CREATE_SELECT 3978 #define ER_NOT_ALLOWED_WITH_START_TRANSACTION 3979 #define ER_INVALID_JSON_ATTRIBUTE 3980 #define ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED 3981 #define ER_INVALID_USER_ATTRIBUTE_JSON 3982 #define ER_INNODB_REDO_DISABLED 3983 #define ER_INNODB_REDO_ARCHIVING_ENABLED 3984 #define ER_MDL_OUT_OF_RESOURCES 3985 #define ER_IMPLICIT_COMPARISON_FOR_JSON 3986 #define ER_FUNCTION_DOES_NOT_SUPPORT_CHARACTER_SET 3987 #define ER_IMPOSSIBLE_STRING_CONVERSION 3988 #define ER_SCHEMA_READ_ONLY 3989 #define ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF 3990 #define ER_RPL_ASYNC_RECONNECT_AUTO_POSITION_OFF 3991 #define ER_DISABLE_GTID_MODE_REQUIRES_ASYNC_RECONNECT_OFF 3992 #define ER_DISABLE_AUTO_POSITION_REQUIRES_ASYNC_RECONNECT_OFF 3993 #define ER_INVALID_PARAMETER_USE 3994 #define ER_CHARACTER_SET_MISMATCH 3995 #define ER_WARN_VAR_VALUE_CHANGE_NOT_SUPPORTED 3996 #define ER_INVALID_TIME_ZONE_INTERVAL 3997 #define ER_INVALID_CAST 3998 #define ER_HYPERGRAPH_NOT_SUPPORTED_YET 3999 #define ER_WARN_HYPERGRAPH_EXPERIMENTAL 4000 #define ER_DA_NO_ERROR_LOG_PARSER_CONFIGURED 4001 #define ER_DA_ERROR_LOG_TABLE_DISABLED 4002 #define ER_DA_ERROR_LOG_MULTIPLE_FILTERS 4003 #define ER_DA_CANT_OPEN_ERROR_LOG 4004 #define ER_USER_REFERENCED_AS_DEFINER 4005 #define ER_CANNOT_USER_REFERENCED_AS_DEFINER 4006 #define ER_REGEX_NUMBER_TOO_BIG 4007 #define ER_SPVAR_NONINTEGER_TYPE 4008 #define WARN_UNSUPPORTED_ACL_TABLES_READ 4009 #define ER_BINLOG_UNSAFE_ACL_TABLE_READ_IN_DML_DDL 4010 #define ER_STOP_REPLICA_MONITOR_IO_THREAD_TIMEOUT 4011 #define ER_STARTING_REPLICA_MONITOR_IO_THREAD 4012 #define ER_CANT_USE_ANONYMOUS_TO_GTID_WITH_GTID_MODE_NOT_ON 4013 #define ER_CANT_COMBINE_ANONYMOUS_TO_GTID_AND_AUTOPOSITION 4014 #define ER_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_REQUIRES_GTID_MODE_ON 4015 #define ER_SQL_REPLICA_SKIP_COUNTER_USED_WITH_GTID_MODE_ON 4016 #define ER_USING_ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS_AS_LOCAL_OR_UUID 4017 #define ER_CANT_SET_ANONYMOUS_TO_GTID_AND_WAIT_UNTIL_SQL_THD_AFTER_GTIDS 4018 #define ER_CANT_SET_SQL_AFTER_OR_BEFORE_GTIDS_WITH_ANONYMOUS_TO_GTID 4019 #define ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME 4020 #define ER_CANT_USE_SAME_UUID_AS_GROUP_NAME 4021 #define ER_GRP_RPL_RECOVERY_CHANNEL_STILL_RUNNING 4022 #define ER_INNODB_INVALID_AUTOEXTEND_SIZE_VALUE 4023 #define ER_INNODB_INCOMPATIBLE_WITH_TABLESPACE 4024 #define ER_INNODB_AUTOEXTEND_SIZE_OUT_OF_RANGE 4025 #define ER_CANNOT_USE_AUTOEXTEND_SIZE_CLAUSE 4026 #define ER_ROLE_GRANTED_TO_ITSELF 4027 #define ER_TABLE_MUST_HAVE_A_VISIBLE_COLUMN 4028 #define ER_INNODB_COMPRESSION_FAILURE 4029 #define ER_WARN_ASYNC_CONN_FAILOVER_NETWORK_NAMESPACE 4030 #define ER_CLIENT_INTERACTION_TIMEOUT 4031 #define ER_INVALID_CAST_TO_GEOMETRY 4032 #define ER_INVALID_CAST_POLYGON_RING_DIRECTION 4033 #define ER_GIS_DIFFERENT_SRIDS_AGGREGATION 4034 #define ER_RELOAD_KEYRING_FAILURE 4035 #define ER_SDI_GET_KEYS_INVALID_TABLESPACE 4036 #define ER_CHANGE_RPL_SRC_WRONG_COMPRESSION_ALGORITHM_SIZE 4037 //#define OBSOLETE_ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL_CLI 4038 #define ER_CANT_USE_SAME_UUID_AS_VIEW_CHANGE_UUID 4039 #define ER_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID 4040 #define ER_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE 4041 #define ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS 4042 #define ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE 4043 #define ER_KERBEROS_CREATE_USER 4044 #define ER_INSTALL_PLUGIN_CONFLICT_CLIENT 4045 #define ER_DA_ERROR_LOG_COMPONENT_FLUSH_FAILED 4046 #define ER_WARN_SQL_AFTER_MTS_GAPS_GAP_NOT_CALCULATED 4047 #define ER_INVALID_ASSIGNMENT_TARGET 4048 #define ER_OPERATION_NOT_ALLOWED_ON_GR_SECONDARY 4049 #define ER_GRP_RPL_FAILOVER_CHANNEL_STATUS_PROPAGATION 4050 #define ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON 4051 #define ER_INVALID_MFA_PLUGIN_SPECIFIED 4052 #define ER_IDENTIFIED_BY_UNSUPPORTED 4053 #define ER_INVALID_PLUGIN_FOR_REGISTRATION 4054 #define ER_PLUGIN_REQUIRES_REGISTRATION 4055 #define ER_MFA_METHOD_EXISTS 4056 #define ER_MFA_METHOD_NOT_EXISTS 4057 #define ER_AUTHENTICATION_POLICY_MISMATCH 4058 #define ER_PLUGIN_REGISTRATION_DONE 4059 #define ER_INVALID_USER_FOR_REGISTRATION 4060 #define ER_USER_REGISTRATION_FAILED 4061 #define ER_MFA_METHODS_INVALID_ORDER 4062 #define ER_MFA_METHODS_IDENTICAL 4063 #define ER_INVALID_MFA_OPERATIONS_FOR_PASSWORDLESS_USER 4064 #define ER_CHANGE_REPLICATION_SOURCE_NO_OPTIONS_FOR_GTID_ONLY 4065 #define ER_CHANGE_REP_SOURCE_CANT_DISABLE_REQ_ROW_FORMAT_WITH_GTID_ONLY 4066 #define ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POSITION_WITH_GTID_ONLY 4067 #define ER_CHANGE_REP_SOURCE_CANT_DISABLE_GTID_ONLY_WITHOUT_POSITIONS 4068 #define ER_CHANGE_REP_SOURCE_CANT_DISABLE_AUTO_POS_WITHOUT_POSITIONS 4069 #define ER_CHANGE_REP_SOURCE_GR_CHANNEL_WITH_GTID_MODE_NOT_ON 4070 #define ER_CANT_USE_GTID_ONLY_WITH_GTID_MODE_NOT_ON 4071 #define ER_WARN_C_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS 4072 #define ER_DA_SSL_FIPS_MODE_ERROR 4073 #define ER_VALUE_OUT_OF_RANGE 4074 #define ER_FULLTEXT_WITH_ROLLUP 4075 #define ER_REGEXP_MISSING_RESOURCE 4076 #define ER_WARN_REGEXP_USING_DEFAULT 4077 #define ER_REGEXP_MISSING_FILE 4078 #define ER_WARN_DEPRECATED_COLLATION 4079 #define ER_CONCURRENT_PROCEDURE_USAGE 4080 #define ER_DA_GLOBAL_CONN_LIMIT 4081 #define ER_DA_CONN_LIMIT 4082 #define ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE_INSTANT 4083 #define ER_WARN_SF_UDF_NAME_COLLISION 4084 #define ER_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK 4085 #define ER_TOO_MANY_WINDOWS 4086 #define ER_MYSQLBACKUP_CLIENT_MSG 4087 #define ER_COMMENT_CONTAINS_INVALID_STRING 4088 #define ER_DEFINITION_CONTAINS_INVALID_STRING 4089 #define ER_CANT_EXECUTE_COMMAND_WITH_ASSIGNED_GTID_NEXT 4090 #define ER_XA_TEMP_TABLE 4091 #define ER_INNODB_MAX_ROW_VERSION 4092 //#define OBSOLETE_ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_SIZE 4093 #define ER_OPERATION_NOT_ALLOWED_WHILE_PRIMARY_CHANGE_IS_RUNNING 4094 #define ER_WARN_DEPRECATED_DATETIME_DELIMITER 4095 #define ER_WARN_DEPRECATED_SUPERFLUOUS_DELIMITER 4096 #define ER_CANNOT_PERSIST_SENSITIVE_VARIABLES 4097 #define ER_WARN_CANNOT_SECURELY_PERSIST_SENSITIVE_VARIABLES 4098 #define ER_WARN_TRG_ALREADY_EXISTS 4099 #define ER_IF_NOT_EXISTS_UNSUPPORTED_TRG_EXISTS_ON_DIFFERENT_TABLE 4100 #define ER_IF_NOT_EXISTS_UNSUPPORTED_UDF_NATIVE_FCT_NAME_COLLISION 4101 #define ER_SET_PASSWORD_AUTH_PLUGIN_ERROR 4102 //#define OBSOLETE_ER_REDUCED_DBLWR_FILE_CORRUPTED 4103 //#define OBSOLETE_ER_REDUCED_DBLWR_PAGE_FOUND 4104 #define ER_SRS_INVALID_LATITUDE_OF_ORIGIN 4105 #define ER_SRS_INVALID_LONGITUDE_OF_ORIGIN 4106 #define ER_SRS_UNUSED_PROJ_PARAMETER_PRESENT 4107 #define ER_GIPK_COLUMN_EXISTS 4108 #define ER_GIPK_FAILED_AUTOINC_COLUMN_EXISTS 4109 #define ER_GIPK_COLUMN_ALTER_NOT_ALLOWED 4110 #define ER_DROP_PK_COLUMN_TO_DROP_GIPK 4111 #define ER_CREATE_SELECT_WITH_GIPK_DISALLOWED_IN_SBR 4112 #define ER_DA_EXPIRE_LOGS_DAYS_IGNORED 4113 #define ER_CTE_RECURSIVE_NOT_UNION 4114 #define ER_COMMAND_BACKEND_FAILED_TO_FETCH_SECURITY_CTX 4115 #define ER_COMMAND_SERVICE_BACKEND_FAILED 4116 #define ER_CLIENT_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS 4117 #define ER_GROUP_REPLICATION_FORCE_MEMBERS_COMMAND_FAILURE 4118 #define ER_WARN_DEPRECATED_IDENT 4119 #define ER_INTERSECT_ALL_MAX_DUPLICATES_EXCEEDED 4120 #define ER_TP_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT 4121 #define ER_BAD_TIMESTAMP_FORMAT 4122 #define ER_SHAPE_PRIDICTION_UDF 4123 #define ER_SRS_INVALID_HEIGHT 4124 #define ER_SRS_INVALID_SCALING 4125 #define ER_SRS_INVALID_ZONE_WIDTH 4126 #define ER_SRS_INVALID_LATITUDE_POLAR_STERE_VAR_A 4127 #define ER_WARN_DEPRECATED_CLIENT_NO_SCHEMA_OPTION 4128 #define ER_TABLE_NOT_EMPTY 4129 #define ER_TABLE_NO_PRIMARY_KEY 4130 #define ER_TABLE_IN_SHARED_TABLESPACE 4131 #define ER_INDEX_OTHER_THAN_PK 4132 #define ER_LOAD_BULK_DATA_UNSORTED 4133 #define ER_BULK_EXECUTOR_ERROR 4134 #define ER_BULK_READER_LIBCURL_INIT_FAILED 4135 #define ER_BULK_READER_LIBCURL_ERROR 4136 #define ER_BULK_READER_SERVER_ERROR 4137 #define ER_BULK_READER_COMMUNICATION_ERROR 4138 #define ER_BULK_LOAD_DATA_FAILED 4139 #define ER_BULK_LOADER_COLUMN_TOO_BIG_FOR_LEFTOVER_BUFFER 4140 #define ER_BULK_LOADER_COMPONENT_ERROR 4141 #define ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE 4142 #define ER_BULK_PARSER_MISSING_ENCLOSED_BY 4143 #define ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED 4144 #define ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED 4145 #define ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT 4146 #define ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR 4147 #define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY 4148 #define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE 4149 #define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR 4150 #define ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE 4151 #define ER_LOAD_BULK_DATA_FAILED 4152 #define ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD 4153 #define ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL 4154 #define ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR 4155 #define ER_CANT_CHANGE_SYS_VAR_IN_READ_ONLY_MODE 4156 #define ER_INNODB_INSTANT_ADD_DROP_NOT_SUPPORTED_MAX_SIZE 4157 #define ER_INNODB_INSTANT_ADD_NOT_SUPPORTED_MAX_FIELDS 4158 #define ER_CANT_SET_PERSISTED 4159 #define ER_INSTALL_COMPONENT_SET_NULL_VALUE 4160 #define ER_INSTALL_COMPONENT_SET_UNUSED_VALUE 4161 #define ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS 4162 #define ER_USER_LOCK_OVERLONG_NAME 4163 #define ER_WARN_NO_SPACE_VERSION_COMMENT 4164 #define ER_VALIDATE_PASSWORD_INSUFFICIENT_CHANGED_CHARACTERS 4165 #define ER_WARN_DEPRECATED_WITH_NOTE 4166 #define ER_PARSER_TRACE 10000 #define ER_BOOTSTRAP_CANT_THREAD 10001 #define ER_TRIGGER_INVALID_VALUE 10002 #define ER_OPT_WRONG_TREE 10003 #define ER_DD_FAILSAFE 10004 #define ER_DD_NO_WRITES_NO_REPOPULATION 10005 #define ER_DD_VERSION_FOUND 10006 #define ER_DD_VERSION_INSTALLED 10007 #define ER_DD_VERSION_UNSUPPORTED 10008 //#define OBSOLETE_ER_LOG_SYSLOG_FACILITY_FAIL 10009 #define ER_LOG_SYSLOG_CANNOT_OPEN 10010 #define ER_LOG_SLOW_CANNOT_OPEN 10011 #define ER_LOG_GENERAL_CANNOT_OPEN 10012 #define ER_LOG_CANNOT_WRITE 10013 //#define OBSOLETE_ER_RPL_ZOMBIE_ENCOUNTERED 10014 #define ER_RPL_GTID_TABLE_CANNOT_OPEN 10015 #define ER_SYSTEM_SCHEMA_NOT_FOUND 10016 #define ER_DD_INIT_UPGRADE_FAILED 10017 #define ER_VIEW_UNKNOWN_CHARSET_OR_COLLATION 10018 #define ER_DD_VIEW_CANT_ALLOC_CHARSET 10019 #define ER_DD_INIT_FAILED 10020 #define ER_DD_UPDATING_PLUGIN_MD_FAILED 10021 #define ER_DD_POPULATING_TABLES_FAILED 10022 #define ER_DD_VIEW_CANT_CREATE 10023 #define ER_DD_METADATA_NOT_FOUND 10024 #define ER_DD_CACHE_NOT_EMPTY_AT_SHUTDOWN 10025 #define ER_DD_OBJECT_REMAINS 10026 #define ER_DD_OBJECT_REMAINS_IN_RELEASER 10027 #define ER_DD_OBJECT_RELEASER_REMAINS 10028 #define ER_DD_CANT_GET_OBJECT_KEY 10029 #define ER_DD_CANT_CREATE_OBJECT_KEY 10030 #define ER_CANT_CREATE_HANDLE_MGR_THREAD 10031 #define ER_RPL_REPO_HAS_GAPS 10032 #define ER_INVALID_VALUE_FOR_ENFORCE_GTID_CONSISTENCY 10033 #define ER_CHANGED_ENFORCE_GTID_CONSISTENCY 10034 #define ER_CHANGED_GTID_MODE 10035 #define ER_DISABLED_STORAGE_ENGINE_AS_DEFAULT 10036 #define ER_DEBUG_SYNC_HIT 10037 #define ER_DEBUG_SYNC_EXECUTED 10038 #define ER_DEBUG_SYNC_THREAD_MAX 10039 #define ER_DEBUG_SYNC_OOM 10040 #define ER_CANT_INIT_TC_LOG 10041 #define ER_EVENT_CANT_INIT_QUEUE 10042 #define ER_EVENT_PURGING_QUEUE 10043 #define ER_EVENT_LAST_EXECUTION 10044 #define ER_EVENT_MESSAGE_STACK 10045 #define ER_EVENT_EXECUTION_FAILED 10046 #define ER_CANT_INIT_SCHEDULER_THREAD 10047 #define ER_SCHEDULER_STOPPED 10048 #define ER_CANT_CREATE_SCHEDULER_THREAD 10049 #define ER_SCHEDULER_WAITING 10050 #define ER_SCHEDULER_STARTED 10051 #define ER_SCHEDULER_STOPPING_FAILED_TO_GET_EVENT 10052 #define ER_SCHEDULER_STOPPING_FAILED_TO_CREATE_WORKER 10053 #define ER_SCHEDULER_KILLING 10054 #define ER_UNABLE_TO_RESOLVE_IP 10055 #define ER_UNABLE_TO_RESOLVE_HOSTNAME 10056 #define ER_HOSTNAME_RESEMBLES_IPV4 10057 #define ER_HOSTNAME_DOESNT_RESOLVE_TO 10058 #define ER_ADDRESSES_FOR_HOSTNAME_HEADER 10059 #define ER_ADDRESSES_FOR_HOSTNAME_LIST_ITEM 10060 #define ER_TRG_WITHOUT_DEFINER 10061 #define ER_TRG_NO_CLIENT_CHARSET 10062 #define ER_PARSING_VIEW 10063 #define ER_COMPONENTS_INFRASTRUCTURE_BOOTSTRAP 10064 #define ER_COMPONENTS_INFRASTRUCTURE_SHUTDOWN 10065 #define ER_COMPONENTS_PERSIST_LOADER_BOOTSTRAP 10066 #define ER_DEPART_WITH_GRACE 10067 #define ER_CA_SELF_SIGNED 10068 #define ER_SSL_LIBRARY_ERROR 10069 #define ER_NO_THD_NO_UUID 10070 #define ER_UUID_SALT 10071 #define ER_UUID_IS 10072 #define ER_UUID_INVALID 10073 #define ER_UUID_SCRUB 10074 #define ER_CREATING_NEW_UUID 10075 #define ER_CANT_CREATE_UUID 10076 #define ER_UNKNOWN_UNSUPPORTED_STORAGE_ENGINE 10077 #define ER_SECURE_AUTH_VALUE_UNSUPPORTED 10078 #define ER_INVALID_INSTRUMENT 10079 #define ER_INNODB_MANDATORY 10080 //#define OBSOLETE_ER_INNODB_CANNOT_BE_IGNORED 10081 //#define OBSOLETE_ER_OLD_PASSWORDS_NO_MIDDLE_GROUND 10082 #define ER_VERBOSE_REQUIRES_HELP 10083 #define ER_POINTLESS_WITHOUT_SLOWLOG 10084 #define ER_WASTEFUL_NET_BUFFER_SIZE 10085 #define ER_DEPRECATED_TIMESTAMP_IMPLICIT_DEFAULTS 10086 #define ER_FT_BOOL_SYNTAX_INVALID 10087 #define ER_CREDENTIALLESS_AUTO_USER_BAD 10088 #define ER_CONNECTION_HANDLING_OOM 10089 #define ER_THREAD_HANDLING_OOM 10090 #define ER_CANT_CREATE_TEST_FILE 10091 #define ER_CANT_CREATE_PID_FILE 10092 #define ER_CANT_REMOVE_PID_FILE 10093 #define ER_CANT_CREATE_SHUTDOWN_THREAD 10094 #define ER_SEC_FILE_PRIV_CANT_ACCESS_DIR 10095 #define ER_SEC_FILE_PRIV_IGNORED 10096 #define ER_SEC_FILE_PRIV_EMPTY 10097 #define ER_SEC_FILE_PRIV_NULL 10098 #define ER_SEC_FILE_PRIV_DIRECTORY_INSECURE 10099 #define ER_SEC_FILE_PRIV_CANT_STAT 10100 #define ER_SEC_FILE_PRIV_DIRECTORY_PERMISSIONS 10101 #define ER_SEC_FILE_PRIV_ARGUMENT_TOO_LONG 10102 #define ER_CANT_CREATE_NAMED_PIPES_THREAD 10103 #define ER_CANT_CREATE_TCPIP_THREAD 10104 #define ER_CANT_CREATE_SHM_THREAD 10105 #define ER_CANT_CREATE_INTERRUPT_THREAD 10106 #define ER_WRITABLE_CONFIG_REMOVED 10107 #define ER_CORE_VALUES 10108 #define ER_WRONG_DATETIME_SPEC 10109 #define ER_RPL_BINLOG_FILTERS_OOM 10110 #define ER_KEYCACHE_OOM 10111 #define ER_CONFIRMING_THE_FUTURE 10112 #define ER_BACK_IN_TIME 10113 #define ER_FUTURE_DATE 10114 #define ER_UNSUPPORTED_DATE 10115 #define ER_STARTING_AS 10116 #define ER_SHUTTING_DOWN_REPLICA_THREADS 10117 #define ER_DISCONNECTING_REMAINING_CLIENTS 10118 #define ER_ABORTING 10119 #define ER_BINLOG_END 10120 #define ER_CALL_ME_LOCALHOST 10121 #define ER_USER_REQUIRES_ROOT 10122 #define ER_REALLY_RUN_AS_ROOT 10123 #define ER_USER_WHAT_USER 10124 #define ER_TRANSPORTS_WHAT_TRANSPORTS 10125 #define ER_FAIL_SETGID 10126 #define ER_FAIL_SETUID 10127 #define ER_FAIL_SETREGID 10128 #define ER_FAIL_SETREUID 10129 #define ER_FAIL_CHROOT 10130 #define ER_WIN_LISTEN_BUT_HOW 10131 #define ER_NOT_RIGHT_NOW 10132 #define ER_FIXING_CLIENT_CHARSET 10133 #define ER_OOM 10134 #define ER_FAILED_TO_LOCK_MEM 10135 #define ER_MYINIT_FAILED 10136 #define ER_BEG_INITFILE 10137 #define ER_END_INITFILE 10138 #define ER_CHANGED_MAX_OPEN_FILES 10139 #define ER_CANT_INCREASE_MAX_OPEN_FILES 10140 #define ER_CHANGED_MAX_CONNECTIONS 10141 #define ER_CHANGED_TABLE_OPEN_CACHE 10142 #define ER_THE_USER_ABIDES 10143 #define ER_RPL_CANT_ADD_DO_TABLE 10144 #define ER_RPL_CANT_ADD_IGNORE_TABLE 10145 #define ER_TRACK_VARIABLES_BOGUS 10146 #define ER_EXCESS_ARGUMENTS 10147 #define ER_VERBOSE_HINT 10148 #define ER_CANT_READ_ERRMSGS 10149 #define ER_CANT_INIT_DBS 10150 #define ER_LOG_OUTPUT_CONTRADICTORY 10151 #define ER_NO_CSV_NO_LOG_TABLES 10152 #define ER_RPL_REWRITEDB_MISSING_ARROW 10153 #define ER_RPL_REWRITEDB_EMPTY_FROM 10154 #define ER_RPL_REWRITEDB_EMPTY_TO 10155 #define ER_LOG_FILES_GIVEN_LOG_OUTPUT_IS_TABLE 10156 #define ER_LOG_FILE_INVALID 10157 #define ER_LOWER_CASE_TABLE_NAMES_CS_DD_ON_CI_FS_UNSUPPORTED 10158 #define ER_LOWER_CASE_TABLE_NAMES_USING_2 10159 #define ER_LOWER_CASE_TABLE_NAMES_USING_0 10160 #define ER_NEED_LOG_BIN 10161 #define ER_NEED_FILE_INSTEAD_OF_DIR 10162 #define ER_LOG_BIN_BETTER_WITH_NAME 10163 #define ER_BINLOG_NEEDS_SERVERID 10164 #define ER_RPL_CANT_MAKE_PATHS 10165 #define ER_CANT_INITIALIZE_GTID 10166 #define ER_CANT_INITIALIZE_EARLY_PLUGINS 10167 #define ER_CANT_INITIALIZE_BUILTIN_PLUGINS 10168 #define ER_CANT_INITIALIZE_DYNAMIC_PLUGINS 10169 #define ER_PERFSCHEMA_INIT_FAILED 10170 #define ER_STACKSIZE_UNEXPECTED 10171 //#define OBSOLETE_ER_CANT_SET_DATADIR 10172 #define ER_CANT_STAT_DATADIR 10173 #define ER_CANT_CHOWN_DATADIR 10174 #define ER_CANT_SET_UP_PERSISTED_VALUES 10175 #define ER_CANT_SAVE_GTIDS 10176 #define ER_AUTH_CANT_SET_DEFAULT_PLUGIN 10177 #define ER_CANT_JOIN_SHUTDOWN_THREAD 10178 #define ER_CANT_HASH_DO_AND_IGNORE_RULES 10179 #define ER_CANT_OPEN_CA 10180 #define ER_CANT_ACCESS_CAPATH 10181 #define ER_SSL_TRYING_DATADIR_DEFAULTS 10182 #define ER_AUTO_OPTIONS_FAILED 10183 #define ER_CANT_INIT_TIMER 10184 #define ER_SERVERID_TOO_LARGE 10185 #define ER_DEFAULT_SE_UNAVAILABLE 10186 #define ER_CANT_OPEN_ERROR_LOG 10187 #define ER_INVALID_ERROR_LOG_NAME 10188 #define ER_RPL_INFINITY_DENIED 10189 #define ER_RPL_INFINITY_IGNORED 10190 //#define OBSOLETE_ER_NDB_TABLES_NOT_READY 10191 #define ER_TABLE_CHECK_INTACT 10192 #define ER_DD_TABLESPACE_NOT_FOUND 10193 #define ER_DD_TRG_CONNECTION_COLLATION_MISSING 10194 #define ER_DD_TRG_DB_COLLATION_MISSING 10195 #define ER_DD_TRG_DEFINER_OOM 10196 #define ER_DD_TRG_FILE_UNREADABLE 10197 #define ER_TRG_CANT_PARSE 10198 #define ER_DD_TRG_CANT_ADD 10199 #define ER_DD_CANT_RESOLVE_VIEW 10200 #define ER_DD_VIEW_WITHOUT_DEFINER 10201 #define ER_PLUGIN_INIT_FAILED 10202 #define ER_RPL_TRX_DELEGATES_INIT_FAILED 10203 #define ER_RPL_BINLOG_STORAGE_DELEGATES_INIT_FAILED 10204 #define ER_RPL_BINLOG_TRANSMIT_DELEGATES_INIT_FAILED 10205 #define ER_RPL_BINLOG_RELAY_DELEGATES_INIT_FAILED 10206 #define ER_RPL_PLUGIN_FUNCTION_FAILED 10207 #define ER_SQL_HA_READ_FAILED 10208 #define ER_SR_BOGUS_VALUE 10209 #define ER_SR_INVALID_CONTEXT 10210 #define ER_READING_TABLE_FAILED 10211 #define ER_DES_FILE_WRONG_KEY 10212 //#define OBSOLETE_ER_CANT_SET_PERSISTED 10213 #define ER_JSON_PARSE_ERROR 10214 #define ER_CONFIG_OPTION_WITHOUT_GROUP 10215 #define ER_VALGRIND_DO_QUICK_LEAK_CHECK 10216 #define ER_VALGRIND_COUNT_LEAKS 10217 #define ER_LOAD_DATA_INFILE_FAILED_IN_UNEXPECTED_WAY 10218 #define ER_UNKNOWN_ERROR_NUMBER 10219 #define ER_UDF_CANT_ALLOC_FOR_STRUCTURES 10220 #define ER_UDF_CANT_ALLOC_FOR_FUNCTION 10221 #define ER_UDF_INVALID_ROW_IN_FUNCTION_TABLE 10222 #define ER_UDF_CANT_OPEN_FUNCTION_TABLE 10223 #define ER_XA_RECOVER_FOUND_TRX_IN_SE 10224 #define ER_XA_RECOVER_FOUND_XA_TRX 10225 //#define OBSOLETE_ER_XA_IGNORING_XID 10226 //#define OBSOLETE_ER_XA_COMMITTING_XID 10227 //#define OBSOLETE_ER_XA_ROLLING_BACK_XID 10228 #define ER_XA_STARTING_RECOVERY 10229 #define ER_XA_NO_MULTI_2PC_HEURISTIC_RECOVER 10230 #define ER_XA_RECOVER_EXPLANATION 10231 #define ER_XA_RECOVERY_DONE 10232 #define ER_TRX_GTID_COLLECT_REJECT 10233 #define ER_SQL_AUTHOR_DEFAULT_ROLES_FAIL 10234 #define ER_SQL_USER_TABLE_CREATE_WARNING 10235 #define ER_SQL_USER_TABLE_ALTER_WARNING 10236 #define ER_ROW_IN_WRONG_PARTITION_PLEASE_REPAIR 10237 #define ER_MYISAM_CRASHED_ERROR_IN_THREAD 10238 #define ER_MYISAM_CRASHED_ERROR_IN 10239 #define ER_TOO_MANY_STORAGE_ENGINES 10240 #define ER_SE_TYPECODE_CONFLICT 10241 #define ER_TRX_WRITE_SET_OOM 10242 #define ER_HANDLERTON_OOM 10243 #define ER_CONN_SHM_LISTENER 10244 #define ER_CONN_SHM_CANT_CREATE_SERVICE 10245 #define ER_CONN_SHM_CANT_CREATE_CONNECTION 10246 #define ER_CONN_PIP_CANT_CREATE_EVENT 10247 #define ER_CONN_PIP_CANT_CREATE_PIPE 10248 #define ER_CONN_PER_THREAD_NO_THREAD 10249 #define ER_CONN_TCP_NO_SOCKET 10250 #define ER_CONN_TCP_CREATED 10251 #define ER_CONN_TCP_ADDRESS 10252 #define ER_CONN_TCP_IPV6_AVAILABLE 10253 #define ER_CONN_TCP_IPV6_UNAVAILABLE 10254 #define ER_CONN_TCP_ERROR_WITH_STRERROR 10255 #define ER_CONN_TCP_CANT_RESOLVE_HOSTNAME 10256 #define ER_CONN_TCP_IS_THERE_ANOTHER_USING_PORT 10257 #define ER_CONN_UNIX_IS_THERE_ANOTHER_USING_SOCKET 10258 #define ER_CONN_UNIX_PID_CLAIMED_SOCKET_FILE 10259 #define ER_CONN_TCP_CANT_RESET_V6ONLY 10260 #define ER_CONN_TCP_BIND_RETRY 10261 #define ER_CONN_TCP_BIND_FAIL 10262 #define ER_CONN_TCP_IP_NOT_LOGGED 10263 #define ER_CONN_TCP_RESOLVE_INFO 10264 #define ER_CONN_TCP_START_FAIL 10265 #define ER_CONN_TCP_LISTEN_FAIL 10266 #define ER_CONN_UNIX_PATH_TOO_LONG 10267 #define ER_CONN_UNIX_LOCK_FILE_FAIL 10268 #define ER_CONN_UNIX_NO_FD 10269 #define ER_CONN_UNIX_NO_BIND_NO_START 10270 #define ER_CONN_UNIX_LISTEN_FAILED 10271 #define ER_CONN_UNIX_LOCK_FILE_GIVING_UP 10272 #define ER_CONN_UNIX_LOCK_FILE_CANT_CREATE 10273 #define ER_CONN_UNIX_LOCK_FILE_CANT_OPEN 10274 #define ER_CONN_UNIX_LOCK_FILE_CANT_READ 10275 #define ER_CONN_UNIX_LOCK_FILE_EMPTY 10276 #define ER_CONN_UNIX_LOCK_FILE_PIDLESS 10277 #define ER_CONN_UNIX_LOCK_FILE_CANT_WRITE 10278 #define ER_CONN_UNIX_LOCK_FILE_CANT_DELETE 10279 #define ER_CONN_UNIX_LOCK_FILE_CANT_SYNC 10280 #define ER_CONN_UNIX_LOCK_FILE_CANT_CLOSE 10281 #define ER_CONN_SOCKET_SELECT_FAILED 10282 #define ER_CONN_SOCKET_ACCEPT_FAILED 10283 #define ER_AUTH_RSA_CANT_FIND 10284 #define ER_AUTH_RSA_CANT_PARSE 10285 #define ER_AUTH_RSA_CANT_READ 10286 #define ER_AUTH_RSA_FILES_NOT_FOUND 10287 #define ER_CONN_ATTR_TRUNCATED 10288 #define ER_X509_CIPHERS_MISMATCH 10289 #define ER_X509_ISSUER_MISMATCH 10290 #define ER_X509_SUBJECT_MISMATCH 10291 #define ER_AUTH_CANT_ACTIVATE_ROLE 10292 #define ER_X509_NEEDS_RSA_PRIVKEY 10293 #define ER_X509_CANT_WRITE_KEY 10294 #define ER_X509_CANT_CHMOD_KEY 10295 #define ER_X509_CANT_READ_CA_KEY 10296 #define ER_X509_CANT_READ_CA_CERT 10297 #define ER_X509_CANT_CREATE_CERT 10298 #define ER_X509_CANT_WRITE_CERT 10299 #define ER_AUTH_CANT_CREATE_RSA_PAIR 10300 #define ER_AUTH_CANT_WRITE_PRIVKEY 10301 #define ER_AUTH_CANT_WRITE_PUBKEY 10302 #define ER_AUTH_SSL_CONF_PREVENTS_CERT_GENERATION 10303 #define ER_AUTH_USING_EXISTING_CERTS 10304 #define ER_AUTH_CERTS_SAVED_TO_DATADIR 10305 #define ER_AUTH_CERT_GENERATION_DISABLED 10306 #define ER_AUTH_RSA_CONF_PREVENTS_KEY_GENERATION 10307 #define ER_AUTH_KEY_GENERATION_SKIPPED_PAIR_PRESENT 10308 #define ER_AUTH_KEYS_SAVED_TO_DATADIR 10309 #define ER_AUTH_KEY_GENERATION_DISABLED 10310 #define ER_AUTHCACHE_PROXIES_PRIV_SKIPPED_NEEDS_RESOLVE 10311 #define ER_AUTHCACHE_PLUGIN_MISSING 10312 #define ER_AUTHCACHE_PLUGIN_CONFIG 10313 //#define OBSOLETE_ER_AUTHCACHE_ROLE_TABLES_DODGY 10314 #define ER_AUTHCACHE_USER_SKIPPED_NEEDS_RESOLVE 10315 #define ER_AUTHCACHE_USER_TABLE_DODGY 10316 #define ER_AUTHCACHE_USER_IGNORED_DEPRECATED_PASSWORD 10317 #define ER_AUTHCACHE_USER_IGNORED_NEEDS_PLUGIN 10318 #define ER_AUTHCACHE_USER_IGNORED_INVALID_PASSWORD 10319 #define ER_AUTHCACHE_EXPIRED_PASSWORD_UNSUPPORTED 10320 #define ER_NO_SUPER_WITHOUT_USER_PLUGIN 10321 #define ER_AUTHCACHE_DB_IGNORED_EMPTY_NAME 10322 #define ER_AUTHCACHE_DB_SKIPPED_NEEDS_RESOLVE 10323 #define ER_AUTHCACHE_DB_ENTRY_LOWERCASED_REVOKE_WILL_FAIL 10324 #define ER_AUTHCACHE_TABLE_PROXIES_PRIV_MISSING 10325 #define ER_AUTHCACHE_CANT_OPEN_AND_LOCK_PRIVILEGE_TABLES 10326 #define ER_AUTHCACHE_CANT_INIT_GRANT_SUBSYSTEM 10327 #define ER_AUTHCACHE_PROCS_PRIV_SKIPPED_NEEDS_RESOLVE 10328 #define ER_AUTHCACHE_PROCS_PRIV_ENTRY_IGNORED_BAD_ROUTINE_TYPE 10329 #define ER_AUTHCACHE_TABLES_PRIV_SKIPPED_NEEDS_RESOLVE 10330 #define ER_USER_NOT_IN_EXTRA_USERS_BINLOG_POSSIBLY_INCOMPLETE 10331 #define ER_DD_SCHEMA_NOT_FOUND 10332 #define ER_DD_TABLE_NOT_FOUND 10333 #define ER_DD_SE_INIT_FAILED 10334 #define ER_DD_ABORTING_PARTIAL_UPGRADE 10335 #define ER_DD_FRM_EXISTS_FOR_TABLE 10336 #define ER_DD_CREATED_FOR_UPGRADE 10337 #define ER_ERRMSG_CANT_FIND_FILE 10338 #define ER_ERRMSG_LOADING_55_STYLE 10339 #define ER_ERRMSG_MISSING_IN_FILE 10340 #define ER_ERRMSG_OOM 10341 #define ER_ERRMSG_CANT_READ 10342 #define ER_TABLE_INCOMPATIBLE_DECIMAL_FIELD 10343 #define ER_TABLE_INCOMPATIBLE_YEAR_FIELD 10344 #define ER_INVALID_CHARSET_AND_DEFAULT_IS_MB 10345 #define ER_TABLE_WRONG_KEY_DEFINITION 10346 #define ER_CANT_OPEN_FRM_FILE 10347 #define ER_CANT_READ_FRM_FILE 10348 #define ER_TABLE_CREATED_WITH_DIFFERENT_VERSION 10349 #define ER_VIEW_UNPARSABLE 10350 #define ER_FILE_TYPE_UNKNOWN 10351 #define ER_INVALID_INFO_IN_FRM 10352 #define ER_CANT_OPEN_AND_LOCK_PRIVILEGE_TABLES 10353 #define ER_AUDIT_PLUGIN_DOES_NOT_SUPPORT_AUDIT_AUTH_EVENTS 10354 #define ER_AUDIT_PLUGIN_HAS_INVALID_DATA 10355 #define ER_TZ_OOM_INITIALIZING_TIME_ZONES 10356 #define ER_TZ_CANT_OPEN_AND_LOCK_TIME_ZONE_TABLE 10357 #define ER_TZ_OOM_LOADING_LEAP_SECOND_TABLE 10358 #define ER_TZ_TOO_MANY_LEAPS_IN_LEAP_SECOND_TABLE 10359 #define ER_TZ_ERROR_LOADING_LEAP_SECOND_TABLE 10360 #define ER_TZ_UNKNOWN_OR_ILLEGAL_DEFAULT_TIME_ZONE 10361 #define ER_TZ_CANT_FIND_DESCRIPTION_FOR_TIME_ZONE 10362 #define ER_TZ_CANT_FIND_DESCRIPTION_FOR_TIME_ZONE_ID 10363 #define ER_TZ_TRANSITION_TYPE_TABLE_TYPE_TOO_LARGE 10364 #define ER_TZ_TRANSITION_TYPE_TABLE_ABBREVIATIONS_EXCEED_SPACE 10365 #define ER_TZ_TRANSITION_TYPE_TABLE_LOAD_ERROR 10366 #define ER_TZ_TRANSITION_TABLE_TOO_MANY_TRANSITIONS 10367 #define ER_TZ_TRANSITION_TABLE_BAD_TRANSITION_TYPE 10368 #define ER_TZ_TRANSITION_TABLE_LOAD_ERROR 10369 #define ER_TZ_NO_TRANSITION_TYPES_IN_TIME_ZONE 10370 #define ER_TZ_OOM_LOADING_TIME_ZONE_DESCRIPTION 10371 #define ER_TZ_CANT_BUILD_MKTIME_MAP 10372 #define ER_TZ_OOM_WHILE_LOADING_TIME_ZONE 10373 #define ER_TZ_OOM_WHILE_SETTING_TIME_ZONE 10374 #define ER_REPLICA_SQL_THREAD_STOPPED_UNTIL_CONDITION_BAD 10375 #define ER_REPLICA_SQL_THREAD_STOPPED_UNTIL_POSITION_REACHED 10376 #define ER_REPLICA_SQL_THREAD_STOPPED_BEFORE_GTIDS_ALREADY_APPLIED 10377 #define ER_REPLICA_SQL_THREAD_STOPPED_BEFORE_GTIDS_REACHED 10378 #define ER_REPLICA_SQL_THREAD_STOPPED_AFTER_GTIDS_REACHED 10379 #define ER_REPLICA_SQL_THREAD_STOPPED_GAP_TRX_PROCESSED 10380 #define ER_GROUP_REPLICATION_PLUGIN_NOT_INSTALLED 10381 #define ER_GTID_ALREADY_ADDED_BY_USER 10382 #define ER_FAILED_TO_DELETE_FROM_GTID_EXECUTED_TABLE 10383 #define ER_FAILED_TO_COMPRESS_GTID_EXECUTED_TABLE 10384 #define ER_FAILED_TO_COMPRESS_GTID_EXECUTED_TABLE_OOM 10385 #define ER_FAILED_TO_INIT_THREAD_ATTR_FOR_GTID_TABLE_COMPRESSION 10386 #define ER_FAILED_TO_CREATE_GTID_TABLE_COMPRESSION_THREAD 10387 #define ER_FAILED_TO_JOIN_GTID_TABLE_COMPRESSION_THREAD 10388 #define ER_NPIPE_FAILED_TO_INIT_SECURITY_DESCRIPTOR 10389 #define ER_NPIPE_FAILED_TO_SET_SECURITY_DESCRIPTOR 10390 #define ER_NPIPE_PIPE_ALREADY_IN_USE 10391 //#define OBSOLETE_ER_NDB_SLAVE_SAW_EPOCH_LOWER_THAN_PREVIOUS_ON_START 10392 //#define OBSOLETE_ER_NDB_SLAVE_SAW_EPOCH_LOWER_THAN_PREVIOUS 10393 //#define OBSOLETE_ER_NDB_SLAVE_SAW_ALREADY_COMMITTED_EPOCH 10394 //#define OBSOLETE_ER_NDB_SLAVE_PREVIOUS_EPOCH_NOT_COMMITTED 10395 //#define OBSOLETE_ER_NDB_SLAVE_MISSING_DATA_FOR_TIMESTAMP_COLUMN 10396 //#define OBSOLETE_ER_NDB_SLAVE_LOGGING_EXCEPTIONS_TO 10397 //#define OBSOLETE_ER_NDB_SLAVE_LOW_EPOCH_RESOLUTION 10398 //#define OBSOLETE_ER_NDB_INFO_FOUND_UNEXPECTED_FIELD_TYPE 10399 //#define OBSOLETE_ER_NDB_INFO_FAILED_TO_CREATE_NDBINFO 10400 //#define OBSOLETE_ER_NDB_INFO_FAILED_TO_INIT_NDBINFO 10401 //#define OBSOLETE_ER_NDB_CLUSTER_WRONG_NUMBER_OF_FUNCTION_ARGUMENTS 10402 //#define OBSOLETE_ER_NDB_CLUSTER_SCHEMA_INFO 10403 //#define OBSOLETE_ER_NDB_CLUSTER_GENERIC_MESSAGE 10404 #define ER_RPL_CANT_OPEN_INFO_TABLE 10405 #define ER_RPL_CANT_SCAN_INFO_TABLE 10406 #define ER_RPL_CORRUPTED_INFO_TABLE 10407 #define ER_RPL_CORRUPTED_KEYS_IN_INFO_TABLE 10408 #define ER_RPL_WORKER_ID_IS 10409 #define ER_RPL_INCONSISTENT_TIMESTAMPS_IN_TRX 10410 #define ER_RPL_INCONSISTENT_SEQUENCE_NO_IN_TRX 10411 #define ER_RPL_CHANNELS_REQUIRE_TABLES_AS_INFO_REPOSITORIES 10412 #define ER_RPL_CHANNELS_REQUIRE_NON_ZERO_SERVER_ID 10413 #define ER_RPL_REPO_SHOULD_BE_TABLE 10414 #define ER_RPL_ERROR_CREATING_CONNECTION_METADATA 10415 #define ER_RPL_ERROR_CHANGING_CONNECTION_METADATA_REPO_TYPE 10416 #define ER_RPL_CHANGING_APPLIER_METADATA_REPO_TYPE_FAILED_DUE_TO_GAPS 10417 #define ER_RPL_ERROR_CREATING_APPLIER_METADATA 10418 #define ER_RPL_ERROR_CHANGING_APPLIER_METADATA_REPO_TYPE 10419 #define ER_RPL_FAILED_TO_DELETE_FROM_REPLICA_WORKERS_INFO_REPOSITORY 10420 #define ER_RPL_FAILED_TO_RESET_STATE_IN_REPLICA_INFO_REPOSITORY 10421 #define ER_RPL_ERROR_CHECKING_REPOSITORY 10422 #define ER_RPL_REPLICA_GENERIC_MESSAGE 10423 #define ER_RPL_REPLICA_COULD_NOT_CREATE_CHANNEL_LIST 10424 #define ER_RPL_MULTISOURCE_REQUIRES_TABLE_TYPE_REPOSITORIES 10425 #define ER_RPL_REPLICA_FAILED_TO_INIT_A_CONNECTION_METADATA_STRUCTURE 10426 #define ER_RPL_REPLICA_FAILED_TO_INIT_CONNECTION_METADATA_STRUCTURE 10427 #define ER_RPL_REPLICA_FAILED_TO_CREATE_CHANNEL_FROM_CONNECTION_METADATA 10428 #define ER_RPL_FAILED_TO_CREATE_NEW_INFO_FILE 10429 #define ER_RPL_FAILED_TO_CREATE_CACHE_FOR_INFO_FILE 10430 #define ER_RPL_FAILED_TO_OPEN_INFO_FILE 10431 #define ER_RPL_GTID_MEMORY_FINALLY_AVAILABLE 10432 #define ER_SERVER_COST_UNKNOWN_COST_CONSTANT 10433 #define ER_SERVER_COST_INVALID_COST_CONSTANT 10434 #define ER_ENGINE_COST_UNKNOWN_COST_CONSTANT 10435 #define ER_ENGINE_COST_UNKNOWN_STORAGE_ENGINE 10436 #define ER_ENGINE_COST_INVALID_DEVICE_TYPE_FOR_SE 10437 #define ER_ENGINE_COST_INVALID_CONST_CONSTANT_FOR_SE_AND_DEVICE 10438 #define ER_SERVER_COST_FAILED_TO_READ 10439 #define ER_ENGINE_COST_FAILED_TO_READ 10440 #define ER_FAILED_TO_OPEN_COST_CONSTANT_TABLES 10441 #define ER_RPL_UNSUPPORTED_UNIGNORABLE_EVENT_IN_STREAM 10442 #define ER_RPL_GTID_LOG_EVENT_IN_STREAM 10443 #define ER_RPL_UNEXPECTED_BEGIN_IN_STREAM 10444 #define ER_RPL_UNEXPECTED_COMMIT_ROLLBACK_OR_XID_LOG_EVENT_IN_STREAM 10445 #define ER_RPL_UNEXPECTED_XA_ROLLBACK_IN_STREAM 10446 #define ER_EVENT_EXECUTION_FAILED_CANT_AUTHENTICATE_USER 10447 #define ER_EVENT_EXECUTION_FAILED_USER_LOST_EVEN_PRIVILEGE 10448 #define ER_EVENT_ERROR_DURING_COMPILATION 10449 #define ER_EVENT_DROPPING 10450 //#define OBSOLETE_ER_NDB_SCHEMA_GENERIC_MESSAGE 10451 #define ER_RPL_INCOMPATIBLE_DECIMAL_IN_RBR 10452 #define ER_INIT_ROOT_WITHOUT_PASSWORD 10453 #define ER_INIT_GENERATING_TEMP_PASSWORD_FOR_ROOT 10454 #define ER_INIT_CANT_OPEN_BOOTSTRAP_FILE 10455 #define ER_INIT_BOOTSTRAP_COMPLETE 10456 #define ER_INIT_DATADIR_NOT_EMPTY_WONT_INITIALIZE 10457 #define ER_INIT_DATADIR_EXISTS_WONT_INITIALIZE 10458 #define ER_INIT_DATADIR_EXISTS_AND_PATH_TOO_LONG_WONT_INITIALIZE 10459 #define ER_INIT_DATADIR_EXISTS_AND_NOT_WRITABLE_WONT_INITIALIZE 10460 #define ER_INIT_CREATING_DD 10461 #define ER_RPL_BINLOG_STARTING_DUMP 10462 #define ER_RPL_BINLOG_SOURCE_SENDS_HEARTBEAT 10463 #define ER_RPL_BINLOG_SKIPPING_REMAINING_HEARTBEAT_INFO 10464 #define ER_RPL_BINLOG_SOURCE_USES_CHECKSUM_AND_REPLICA_CANT 10465 //#define OBSOLETE_ER_NDB_QUERY_FAILED 10466 #define ER_KILLING_THREAD 10467 #define ER_DETACHING_SESSION_LEFT_BY_PLUGIN 10468 #define ER_CANT_DETACH_SESSION_LEFT_BY_PLUGIN 10469 #define ER_DETACHED_SESSIONS_LEFT_BY_PLUGIN 10470 #define ER_FAILED_TO_DECREMENT_NUMBER_OF_THREADS 10471 #define ER_PLUGIN_DID_NOT_DEINITIALIZE_THREADS 10472 #define ER_KILLED_THREADS_OF_PLUGIN 10473 //#define OBSOLETE_ER_NDB_SLAVE_MAX_REPLICATED_EPOCH_UNKNOWN 10474 //#define OBSOLETE_ER_NDB_SLAVE_MAX_REPLICATED_EPOCH_SET_TO 10475 //#define OBSOLETE_ER_NDB_NODE_ID_AND_MANAGEMENT_SERVER_INFO 10476 //#define OBSOLETE_ER_NDB_DISCONNECT_INFO 10477 //#define OBSOLETE_ER_NDB_COLUMN_DEFAULTS_DIFFER 10478 //#define OBSOLETE_ER_NDB_COLUMN_SHOULD_NOT_HAVE_NATIVE_DEFAULT 10479 //#define OBSOLETE_ER_NDB_FIELD_INFO 10480 //#define OBSOLETE_ER_NDB_COLUMN_INFO 10481 //#define OBSOLETE_ER_NDB_OOM_IN_FIX_UNIQUE_INDEX_ATTR_ORDER 10482 //#define OBSOLETE_ER_NDB_SLAVE_MALFORMED_EVENT_RECEIVED_ON_TABLE 10483 //#define OBSOLETE_ER_NDB_SLAVE_CONFLICT_FUNCTION_REQUIRES_ROLE 10484 //#define OBSOLETE_ER_NDB_SLAVE_CONFLICT_TRANSACTION_IDS 10485 //#define OBSOLETE_ER_NDB_SLAVE_BINLOG_MISSING_INFO_FOR_CONFLICT_DETECTION 10486 //#define OBSOLETE_ER_NDB_ERROR_IN_READAUTOINCREMENTVALUE 10487 //#define OBSOLETE_ER_NDB_FOUND_UNCOMMITTED_AUTOCOMMIT 10488 //#define OBSOLETE_ER_NDB_SLAVE_TOO_MANY_RETRIES 10489 //#define OBSOLETE_ER_NDB_SLAVE_ERROR_IN_UPDATE_CREATE_INFO 10490 //#define OBSOLETE_ER_NDB_SLAVE_CANT_ALLOCATE_TABLE_SHARE 10491 //#define OBSOLETE_ER_NDB_BINLOG_ERROR_INFO_FROM_DA 10492 //#define OBSOLETE_ER_NDB_BINLOG_CREATE_TABLE_EVENT 10493 //#define OBSOLETE_ER_NDB_BINLOG_FAILED_CREATE_TABLE_EVENT_OPERATIONS 10494 //#define OBSOLETE_ER_NDB_BINLOG_RENAME_EVENT 10495 //#define OBSOLETE_ER_NDB_BINLOG_FAILED_CREATE_DURING_RENAME 10496 //#define OBSOLETE_ER_NDB_UNEXPECTED_RENAME_TYPE 10497 //#define OBSOLETE_ER_NDB_ERROR_IN_GET_AUTO_INCREMENT 10498 //#define OBSOLETE_ER_NDB_CREATING_SHARE_IN_OPEN 10499 //#define OBSOLETE_ER_NDB_TABLE_OPENED_READ_ONLY 10500 //#define OBSOLETE_ER_NDB_INITIALIZE_GIVEN_CLUSTER_PLUGIN_DISABLED 10501 //#define OBSOLETE_ER_NDB_BINLOG_FORMAT_CHANGED_FROM_STMT_TO_MIXED 10502 //#define OBSOLETE_ER_NDB_TRAILING_SHARE_RELEASED_BY_CLOSE_CACHED_TABLES 10503 //#define OBSOLETE_ER_NDB_SHARE_ALREADY_EXISTS 10504 //#define OBSOLETE_ER_NDB_HANDLE_TRAILING_SHARE_INFO 10505 //#define OBSOLETE_ER_NDB_CLUSTER_GET_SHARE_INFO 10506 //#define OBSOLETE_ER_NDB_CLUSTER_REAL_FREE_SHARE_INFO 10507 //#define OBSOLETE_ER_NDB_CLUSTER_REAL_FREE_SHARE_DROP_FAILED 10508 //#define OBSOLETE_ER_NDB_CLUSTER_FREE_SHARE_INFO 10509 //#define OBSOLETE_ER_NDB_CLUSTER_MARK_SHARE_DROPPED_INFO 10510 //#define OBSOLETE_ER_NDB_CLUSTER_MARK_SHARE_DROPPED_DESTROYING_SHARE 10511 //#define OBSOLETE_ER_NDB_CLUSTER_OOM_THD_NDB 10512 //#define OBSOLETE_ER_NDB_BINLOG_NDB_TABLES_INITIALLY_READ_ONLY 10513 //#define OBSOLETE_ER_NDB_UTIL_THREAD_OOM 10514 //#define OBSOLETE_ER_NDB_ILLEGAL_VALUE_FOR_NDB_RECV_THREAD_CPU_MASK 10515 //#define OBSOLETE_ER_NDB_TOO_MANY_CPUS_IN_NDB_RECV_THREAD_CPU_MASK 10516 #define ER_DBUG_CHECK_SHARES_OPEN 10517 #define ER_DBUG_CHECK_SHARES_INFO 10518 #define ER_DBUG_CHECK_SHARES_DROPPED 10519 #define ER_INVALID_OR_OLD_TABLE_OR_DB_NAME 10520 #define ER_TC_RECOVERING_AFTER_CRASH_USING 10521 #define ER_TC_CANT_AUTO_RECOVER_WITH_TC_HEURISTIC_RECOVER 10522 #define ER_TC_BAD_MAGIC_IN_TC_LOG 10523 #define ER_TC_NEED_N_SE_SUPPORTING_2PC_FOR_RECOVERY 10524 #define ER_TC_RECOVERY_FAILED_THESE_ARE_YOUR_OPTIONS 10525 #define ER_TC_HEURISTIC_RECOVERY_MODE 10526 #define ER_TC_HEURISTIC_RECOVERY_FAILED 10527 #define ER_TC_RESTART_WITHOUT_TC_HEURISTIC_RECOVER 10528 #define ER_RPL_REPLICA_FAILED_TO_CREATE_OR_RECOVER_INFO_REPOSITORIES 10529 #define ER_RPL_REPLICA_AUTO_POSITION_IS_1_AND_GTID_MODE_IS_OFF 10530 #define ER_RPL_REPLICA_CANT_START_REPLICA_FOR_CHANNEL 10531 #define ER_RPL_REPLICA_CANT_STOP_REPLICA_FOR_CHANNEL 10532 #define ER_RPL_RECOVERY_NO_ROTATE_EVENT_FROM_SOURCE 10533 #define ER_RPL_RECOVERY_ERROR_READ_RELAY_LOG 10534 //#define OBSOLETE_ER_RPL_RECOVERY_ERROR_FREEING_IO_CACHE 10535 #define ER_RPL_RECOVERY_SKIPPED_GROUP_REPLICATION_CHANNEL 10536 #define ER_RPL_RECOVERY_ERROR 10537 #define ER_RPL_RECOVERY_IO_ERROR_READING_RELAY_LOG_INDEX 10538 #define ER_RPL_RECOVERY_FILE_SOURCE_POS_INFO 10539 #define ER_RPL_RECOVERY_REPLICATE_SAME_SERVER_ID_REQUIRES_POSITION 10540 #define ER_RPL_MTA_RECOVERY_STARTING_COORDINATOR 10541 #define ER_RPL_MTA_RECOVERY_FAILED_TO_START_COORDINATOR 10542 #define ER_RPL_MTA_AUTOMATIC_RECOVERY_FAILED 10543 #define ER_RPL_MTA_RECOVERY_CANT_OPEN_RELAY_LOG 10544 #define ER_RPL_MTA_RECOVERY_SUCCESSFUL 10545 #define ER_RPL_SERVER_ID_MISSING 10546 #define ER_RPL_CANT_CREATE_REPLICA_THREAD 10547 #define ER_RPL_REPLICA_IO_THREAD_WAS_KILLED 10548 //#define OBSOLETE_ER_RPL_REPLICA_SOURCE_UUID_HAS_CHANGED 10549 #define ER_RPL_REPLICA_USES_CHECKSUM_AND_SOURCE_PRE_50 10550 #define ER_RPL_REPLICA_SECONDS_BEHIND_SOURCE_DUBIOUS 10551 #define ER_RPL_REPLICA_CANT_FLUSH_CONNECTION_METADATA_REPOS 10552 #define ER_RPL_REPLICA_REPORT_HOST_TOO_LONG 10553 #define ER_RPL_REPLICA_REPORT_USER_TOO_LONG 10554 #define ER_RPL_REPLICA_REPORT_PASSWORD_TOO_LONG 10555 #define ER_RPL_REPLICA_ERROR_RETRYING 10556 #define ER_RPL_REPLICA_ERROR_READING_FROM_SERVER 10557 #define ER_RPL_REPLICA_DUMP_THREAD_KILLED_BY_SOURCE 10558 #define ER_RPL_MTA_STATISTICS 10559 #define ER_RPL_MTA_RECOVERY_COMPLETE 10560 #define ER_RPL_REPLICA_CANT_INIT_RELAY_LOG_POSITION 10561 //#define OBSOLETE_ER_RPL_REPLICA_CONNECTED_TO_SOURCE_REPLICATION_STARTED 10562 #define ER_RPL_REPLICA_IO_THREAD_KILLED 10563 #define ER_RPL_REPLICA_IO_THREAD_CANT_REGISTER_ON_SOURCE 10564 #define ER_RPL_REPLICA_FORCING_TO_RECONNECT_IO_THREAD 10565 #define ER_RPL_REPLICA_ERROR_REQUESTING_BINLOG_DUMP 10566 #define ER_RPL_LOG_ENTRY_EXCEEDS_REPLICA_MAX_ALLOWED_PACKET 10567 #define ER_RPL_REPLICA_STOPPING_AS_SOURCE_OOM 10568 #define ER_RPL_REPLICA_IO_THREAD_ABORTED_WAITING_FOR_RELAY_LOG_SPACE 10569 #define ER_RPL_REPLICA_IO_THREAD_EXITING 10570 #define ER_RPL_REPLICA_CANT_INITIALIZE_REPLICA_WORKER 10571 #define ER_RPL_MTA_GROUP_RECOVERY_APPLIER_METADATA_FOR_WORKER 10572 #define ER_RPL_ERROR_LOOKING_FOR_LOG 10573 #define ER_RPL_MTA_GROUP_RECOVERY_APPLIER_METADATA 10574 #define ER_RPL_CANT_FIND_FOLLOWUP_FILE 10575 #define ER_RPL_MTA_CHECKPOINT_PERIOD_DIFFERS_FROM_CNT 10576 #define ER_RPL_REPLICA_WORKER_THREAD_CREATION_FAILED 10577 #define ER_RPL_REPLICA_WORKER_THREAD_CREATION_FAILED_WITH_ERRNO 10578 #define ER_RPL_REPLICA_FAILED_TO_INIT_PARTITIONS_HASH 10579 //#define OBSOLETE_ER_RPL_SLAVE_NDB_TABLES_NOT_AVAILABLE 10580 #define ER_RPL_REPLICA_SQL_THREAD_STARTING 10581 #define ER_RPL_REPLICA_SKIP_COUNTER_EXECUTED 10582 #define ER_RPL_REPLICA_ADDITIONAL_ERROR_INFO_FROM_DA 10583 #define ER_RPL_REPLICA_ERROR_INFO_FROM_DA 10584 #define ER_RPL_REPLICA_ERROR_LOADING_USER_DEFINED_LIBRARY 10585 #define ER_RPL_REPLICA_ERROR_RUNNING_QUERY 10586 #define ER_RPL_REPLICA_SQL_THREAD_EXITING 10587 #define ER_RPL_REPLICA_READ_INVALID_EVENT_FROM_SOURCE 10588 #define ER_RPL_REPLICA_QUEUE_EVENT_FAILED_INVALID_CONFIGURATION 10589 #define ER_RPL_REPLICA_IO_THREAD_DETECTED_UNEXPECTED_EVENT_SEQUENCE 10590 #define ER_RPL_REPLICA_CANT_USE_CHARSET 10591 #define ER_RPL_REPLICA_CONNECTED_TO_SOURCE_REPLICATION_RESUMED 10592 #define ER_RPL_REPLICA_NEXT_LOG_IS_ACTIVE 10593 #define ER_RPL_REPLICA_NEXT_LOG_IS_INACTIVE 10594 #define ER_RPL_REPLICA_SQL_THREAD_IO_ERROR_READING_EVENT 10595 #define ER_RPL_REPLICA_ERROR_READING_RELAY_LOG_EVENTS 10596 #define ER_REPLICA_CHANGE_SOURCE_TO_EXECUTED 10597 #define ER_RPL_REPLICA_NEW_C_M_NEEDS_REPOS_TYPE_OTHER_THAN_FILE 10598 #define ER_RPL_FAILED_TO_STAT_LOG_IN_INDEX 10599 #define ER_RPL_LOG_NOT_FOUND_WHILE_COUNTING_RELAY_LOG_SPACE 10600 #define ER_REPLICA_CANT_USE_TEMPDIR 10601 #define ER_RPL_RELAY_LOG_NEEDS_FILE_NOT_DIRECTORY 10602 #define ER_RPL_RELAY_LOG_INDEX_NEEDS_FILE_NOT_DIRECTORY 10603 #define ER_RPL_PLEASE_USE_OPTION_RELAY_LOG 10604 #define ER_RPL_OPEN_INDEX_FILE_FAILED 10605 #define ER_RPL_CANT_INITIALIZE_GTID_SETS_IN_AM_INIT_INFO 10606 #define ER_RPL_CANT_OPEN_LOG_IN_AM_INIT_INFO 10607 #define ER_RPL_ERROR_WRITING_RELAY_LOG_CONFIGURATION 10608 //#define OBSOLETE_ER_NDB_OOM_GET_NDB_BLOBS_VALUE 10609 //#define OBSOLETE_ER_NDB_THREAD_TIMED_OUT 10610 //#define OBSOLETE_ER_NDB_TABLE_IS_NOT_DISTRIBUTED 10611 //#define OBSOLETE_ER_NDB_CREATING_TABLE 10612 //#define OBSOLETE_ER_NDB_FLUSHING_TABLE_INFO 10613 //#define OBSOLETE_ER_NDB_CLEANING_STRAY_TABLES 10614 //#define OBSOLETE_ER_NDB_DISCOVERED_MISSING_DB 10615 //#define OBSOLETE_ER_NDB_DISCOVERED_REMAINING_DB 10616 //#define OBSOLETE_ER_NDB_CLUSTER_FIND_ALL_DBS_RETRY 10617 //#define OBSOLETE_ER_NDB_CLUSTER_FIND_ALL_DBS_FAIL 10618 //#define OBSOLETE_ER_NDB_SKIPPING_SETUP_TABLE 10619 //#define OBSOLETE_ER_NDB_FAILED_TO_SET_UP_TABLE 10620 //#define OBSOLETE_ER_NDB_MISSING_FRM_DISCOVERING 10621 //#define OBSOLETE_ER_NDB_MISMATCH_IN_FRM_DISCOVERING 10622 //#define OBSOLETE_ER_NDB_BINLOG_CLEANING_UP_SETUP_LEFTOVERS 10623 //#define OBSOLETE_ER_NDB_WAITING_INFO 10624 //#define OBSOLETE_ER_NDB_WAITING_INFO_WITH_MAP 10625 //#define OBSOLETE_ER_NDB_TIMEOUT_WHILE_DISTRIBUTING 10626 //#define OBSOLETE_ER_NDB_NOT_WAITING_FOR_DISTRIBUTING 10627 //#define OBSOLETE_ER_NDB_DISTRIBUTED_INFO 10628 //#define OBSOLETE_ER_NDB_DISTRIBUTION_COMPLETE 10629 //#define OBSOLETE_ER_NDB_SCHEMA_DISTRIBUTION_FAILED 10630 //#define OBSOLETE_ER_NDB_SCHEMA_DISTRIBUTION_REPORTS_SUBSCRIBE 10631 //#define OBSOLETE_ER_NDB_SCHEMA_DISTRIBUTION_REPORTS_UNSUBSCRIBE 10632 //#define OBSOLETE_ER_NDB_BINLOG_CANT_DISCOVER_TABLE_FROM_SCHEMA_EVENT 10633 //#define OBSOLETE_ER_NDB_BINLOG_SIGNALLING_UNKNOWN_VALUE 10634 //#define OBSOLETE_ER_NDB_BINLOG_REPLY_TO 10635 //#define OBSOLETE_ER_NDB_BINLOG_CANT_RELEASE_SLOCK 10636 //#define OBSOLETE_ER_NDB_CANT_FIND_TABLE 10637 //#define OBSOLETE_ER_NDB_DISCARDING_EVENT_NO_OBJ 10638 //#define OBSOLETE_ER_NDB_DISCARDING_EVENT_ID_VERSION_MISMATCH 10639 //#define OBSOLETE_ER_NDB_CLEAR_SLOCK_INFO 10640 //#define OBSOLETE_ER_NDB_BINLOG_SKIPPING_LOCAL_TABLE 10641 //#define OBSOLETE_ER_NDB_BINLOG_ONLINE_ALTER_RENAME 10642 //#define OBSOLETE_ER_NDB_BINLOG_CANT_REOPEN_SHADOW_TABLE 10643 //#define OBSOLETE_ER_NDB_BINLOG_ONLINE_ALTER_RENAME_COMPLETE 10644 //#define OBSOLETE_ER_NDB_BINLOG_SKIPPING_DROP_OF_LOCAL_TABLE 10645 //#define OBSOLETE_ER_NDB_BINLOG_SKIPPING_RENAME_OF_LOCAL_TABLE 10646 //#define OBSOLETE_ER_NDB_BINLOG_SKIPPING_DROP_OF_TABLES 10647 //#define OBSOLETE_ER_NDB_BINLOG_GOT_DIST_PRIV_EVENT_FLUSHING_PRIVILEGES 10648 //#define OBSOLETE_ER_NDB_BINLOG_GOT_SCHEMA_EVENT 10649 //#define OBSOLETE_ER_NDB_BINLOG_SKIPPING_OLD_SCHEMA_OPERATION 10650 //#define OBSOLETE_ER_NDB_CLUSTER_FAILURE 10651 //#define OBSOLETE_ER_NDB_TABLES_INITIALLY_READ_ONLY_ON_RECONNECT 10652 //#define OBSOLETE_ER_NDB_IGNORING_UNKNOWN_EVENT 10653 //#define OBSOLETE_ER_NDB_BINLOG_OPENING_INDEX 10654 //#define OBSOLETE_ER_NDB_BINLOG_CANT_LOCK_NDB_BINLOG_INDEX 10655 //#define OBSOLETE_ER_NDB_BINLOG_INJECTING_RANDOM_WRITE_FAILURE 10656 //#define OBSOLETE_ER_NDB_BINLOG_CANT_WRITE_TO_NDB_BINLOG_INDEX 10657 //#define OBSOLETE_ER_NDB_BINLOG_WRITING_TO_NDB_BINLOG_INDEX 10658 //#define OBSOLETE_ER_NDB_BINLOG_CANT_COMMIT_TO_NDB_BINLOG_INDEX 10659 //#define OBSOLETE_ER_NDB_BINLOG_WRITE_INDEX_FAILED_AFTER_KILL 10660 //#define OBSOLETE_ER_NDB_BINLOG_USING_SERVER_ID_0_SLAVES_WILL_NOT 10661 //#define OBSOLETE_ER_NDB_SERVER_ID_RESERVED_OR_TOO_LARGE 10662 //#define OBSOLETE_ER_NDB_BINLOG_REQUIRES_V2_ROW_EVENTS 10663 //#define OBSOLETE_ER_NDB_BINLOG_STATUS_FORCING_FULL_USE_WRITE 10664 //#define OBSOLETE_ER_NDB_BINLOG_GENERIC_MESSAGE 10665 //#define OBSOLETE_ER_NDB_CONFLICT_GENERIC_MESSAGE 10666 //#define OBSOLETE_ER_NDB_TRANS_DEPENDENCY_TRACKER_ERROR 10667 //#define OBSOLETE_ER_NDB_CONFLICT_FN_PARSE_ERROR 10668 //#define OBSOLETE_ER_NDB_CONFLICT_FN_SETUP_ERROR 10669 //#define OBSOLETE_ER_NDB_BINLOG_FAILED_TO_GET_TABLE 10670 //#define OBSOLETE_ER_NDB_BINLOG_NOT_LOGGING 10671 //#define OBSOLETE_ER_NDB_BINLOG_CREATE_TABLE_EVENT_FAILED 10672 //#define OBSOLETE_ER_NDB_BINLOG_CREATE_TABLE_EVENT_INFO 10673 //#define OBSOLETE_ER_NDB_BINLOG_DISCOVER_TABLE_EVENT_INFO 10674 //#define OBSOLETE_ER_NDB_BINLOG_BLOB_REQUIRES_PK 10675 //#define OBSOLETE_ER_NDB_BINLOG_CANT_CREATE_EVENT_IN_DB 10676 //#define OBSOLETE_ER_NDB_BINLOG_CANT_CREATE_EVENT_IN_DB_AND_CANT_DROP 10677 //#define OBSOLETE_ER_NDB_BINLOG_CANT_CREATE_EVENT_IN_DB_DROPPED 10678 //#define OBSOLETE_ER_NDB_BINLOG_DISCOVER_REUSING_OLD_EVENT_OPS 10679 //#define OBSOLETE_ER_NDB_BINLOG_CREATING_NDBEVENTOPERATION_FAILED 10680 //#define OBSOLETE_ER_NDB_BINLOG_CANT_CREATE_BLOB 10681 //#define OBSOLETE_ER_NDB_BINLOG_NDBEVENT_EXECUTE_FAILED 10682 //#define OBSOLETE_ER_NDB_CREATE_EVENT_OPS_LOGGING_INFO 10683 //#define OBSOLETE_ER_NDB_BINLOG_CANT_DROP_EVENT_FROM_DB 10684 //#define OBSOLETE_ER_NDB_TIMED_OUT_IN_DROP_TABLE 10685 //#define OBSOLETE_ER_NDB_BINLOG_UNHANDLED_ERROR_FOR_TABLE 10686 //#define OBSOLETE_ER_NDB_BINLOG_CLUSTER_FAILURE 10687 //#define OBSOLETE_ER_NDB_BINLOG_UNKNOWN_NON_DATA_EVENT 10688 //#define OBSOLETE_ER_NDB_BINLOG_INJECTOR_DISCARDING_ROW_EVENT_METADATA 10689 //#define OBSOLETE_ER_NDB_REMAINING_OPEN_TABLES 10690 //#define OBSOLETE_ER_NDB_REMAINING_OPEN_TABLE_INFO 10691 //#define OBSOLETE_ER_NDB_COULD_NOT_GET_APPLY_STATUS_SHARE 10692 //#define OBSOLETE_ER_NDB_BINLOG_SERVER_SHUTDOWN_DURING_NDB_CLUSTER_START 10693 //#define OBSOLETE_ER_NDB_BINLOG_CLUSTER_RESTARTED_RESET_MASTER_SUGGESTED 10694 //#define OBSOLETE_ER_NDB_BINLOG_CLUSTER_HAS_RECONNECTED 10695 //#define OBSOLETE_ER_NDB_BINLOG_STARTING_LOG_AT_EPOCH 10696 //#define OBSOLETE_ER_NDB_BINLOG_NDB_TABLES_WRITABLE 10697 //#define OBSOLETE_ER_NDB_BINLOG_SHUTDOWN_DETECTED 10698 //#define OBSOLETE_ER_NDB_BINLOG_LOST_SCHEMA_CONNECTION_WAITING 10699 //#define OBSOLETE_ER_NDB_BINLOG_LOST_SCHEMA_CONNECTION_CONTINUING 10700 //#define OBSOLETE_ER_NDB_BINLOG_ERROR_HANDLING_SCHEMA_EVENT 10701 //#define OBSOLETE_ER_NDB_BINLOG_CANT_INJECT_APPLY_STATUS_WRITE_ROW 10702 //#define OBSOLETE_ER_NDB_BINLOG_ERROR_DURING_GCI_ROLLBACK 10703 //#define OBSOLETE_ER_NDB_BINLOG_ERROR_DURING_GCI_COMMIT 10704 //#define OBSOLETE_ER_NDB_BINLOG_LATEST_TRX_IN_EPOCH_NOT_IN_BINLOG 10705 //#define OBSOLETE_ER_NDB_BINLOG_RELEASING_EXTRA_SHARE_REFERENCES 10706 //#define OBSOLETE_ER_NDB_BINLOG_REMAINING_OPEN_TABLES 10707 //#define OBSOLETE_ER_NDB_BINLOG_REMAINING_OPEN_TABLE_INFO 10708 #define ER_TREE_CORRUPT_PARENT_SHOULD_POINT_AT_PARENT 10709 #define ER_TREE_CORRUPT_ROOT_SHOULD_BE_BLACK 10710 #define ER_TREE_CORRUPT_2_CONSECUTIVE_REDS 10711 #define ER_TREE_CORRUPT_RIGHT_IS_LEFT 10712 #define ER_TREE_CORRUPT_INCORRECT_BLACK_COUNT 10713 #define ER_WRONG_COUNT_FOR_ORIGIN 10714 #define ER_WRONG_COUNT_FOR_KEY 10715 #define ER_WRONG_COUNT_OF_ELEMENTS 10716 #define ER_RPL_ERROR_READING_REPLICA_WORKER_CONFIGURATION 10717 //#define OBSOLETE_ER_RPL_ERROR_WRITING_SLAVE_WORKER_CONFIGURATION 10718 #define ER_RPL_FAILED_TO_OPEN_RELAY_LOG 10719 #define ER_RPL_WORKER_CANT_READ_RELAY_LOG 10720 #define ER_RPL_WORKER_CANT_FIND_NEXT_RELAY_LOG 10721 #define ER_RPL_MTA_REPLICA_COORDINATOR_HAS_WAITED 10722 #define ER_BINLOG_FAILED_TO_WRITE_DROP_FOR_TEMP_TABLES 10723 #define ER_BINLOG_OOM_WRITING_DELETE_WHILE_OPENING_HEAP_TABLE 10724 #define ER_FAILED_TO_REPAIR_TABLE 10725 #define ER_FAILED_TO_REMOVE_TEMP_TABLE 10726 #define ER_SYSTEM_TABLE_NOT_TRANSACTIONAL 10727 #define ER_RPL_ERROR_WRITING_SOURCE_CONFIGURATION 10728 #define ER_RPL_ERROR_READING_SOURCE_CONFIGURATION 10729 #define ER_RPL_SSL_INFO_IN_CONNECTION_METADATA_IGNORED 10730 #define ER_PLUGIN_FAILED_DEINITIALIZATION 10731 #define ER_PLUGIN_HAS_NONZERO_REFCOUNT_AFTER_DEINITIALIZATION 10732 #define ER_PLUGIN_SHUTTING_DOWN_PLUGIN 10733 #define ER_PLUGIN_REGISTRATION_FAILED 10734 #define ER_PLUGIN_CANT_OPEN_PLUGIN_TABLE 10735 #define ER_PLUGIN_CANT_LOAD 10736 #define ER_PLUGIN_LOAD_PARAMETER_TOO_LONG 10737 #define ER_PLUGIN_FORCING_SHUTDOWN 10738 #define ER_PLUGIN_HAS_NONZERO_REFCOUNT_AFTER_SHUTDOWN 10739 #define ER_PLUGIN_UNKNOWN_VARIABLE_TYPE 10740 #define ER_PLUGIN_VARIABLE_SET_READ_ONLY 10741 #define ER_PLUGIN_VARIABLE_MISSING_NAME 10742 #define ER_PLUGIN_VARIABLE_NOT_ALLOCATED_THREAD_LOCAL 10743 #define ER_PLUGIN_OOM 10744 #define ER_PLUGIN_BAD_OPTIONS 10745 #define ER_PLUGIN_PARSING_OPTIONS_FAILED 10746 #define ER_PLUGIN_DISABLED 10747 #define ER_PLUGIN_HAS_CONFLICTING_SYSTEM_VARIABLES 10748 #define ER_PLUGIN_CANT_SET_PERSISTENT_OPTIONS 10749 #define ER_MY_NET_WRITE_FAILED_FALLING_BACK_ON_STDERR 10750 #define ER_RETRYING_REPAIR_WITHOUT_QUICK 10751 #define ER_RETRYING_REPAIR_WITH_KEYCACHE 10752 #define ER_FOUND_ROWS_WHILE_REPAIRING 10753 #define ER_ERROR_DURING_OPTIMIZE_TABLE 10754 #define ER_ERROR_ENABLING_KEYS 10755 #define ER_CHECKING_TABLE 10756 #define ER_RECOVERING_TABLE 10757 #define ER_CANT_CREATE_TABLE_SHARE_FROM_FRM 10758 #define ER_CANT_LOCK_TABLE 10759 #define ER_CANT_ALLOC_TABLE_OBJECT 10760 #define ER_CANT_CREATE_HANDLER_OBJECT_FOR_TABLE 10761 #define ER_CANT_SET_HANDLER_REFERENCE_FOR_TABLE 10762 #define ER_CANT_LOCK_TABLESPACE 10763 #define ER_CANT_UPGRADE_GENERATED_COLUMNS_TO_DD 10764 #define ER_DD_ERROR_CREATING_ENTRY 10765 #define ER_DD_CANT_FETCH_TABLE_DATA 10766 #define ER_DD_CANT_FIX_SE_DATA 10767 #define ER_DD_CANT_CREATE_SP 10768 #define ER_CANT_OPEN_DB_OPT_USING_DEFAULT_CHARSET 10769 #define ER_CANT_CREATE_CACHE_FOR_DB_OPT 10770 #define ER_CANT_IDENTIFY_CHARSET_USING_DEFAULT 10771 #define ER_DB_OPT_NOT_FOUND_USING_DEFAULT_CHARSET 10772 #define ER_EVENT_CANT_GET_TIMEZONE_FROM_FIELD 10773 #define ER_EVENT_CANT_FIND_TIMEZONE 10774 #define ER_EVENT_CANT_GET_CHARSET 10775 #define ER_EVENT_CANT_GET_COLLATION 10776 #define ER_EVENT_CANT_OPEN_TABLE_MYSQL_EVENT 10777 #define ER_CANT_PARSE_STORED_ROUTINE_BODY 10778 #define ER_CANT_OPEN_TABLE_MYSQL_PROC 10779 #define ER_CANT_READ_TABLE_MYSQL_PROC 10780 #define ER_FILE_EXISTS_DURING_UPGRADE 10781 #define ER_CANT_OPEN_DATADIR_AFTER_UPGRADE_FAILURE 10782 #define ER_CANT_SET_PATH_FOR 10783 #define ER_CANT_OPEN_DIR 10784 //#define OBSOLETE_ER_NDB_CLUSTER_CONNECTION_POOL_NODEIDS 10785 //#define OBSOLETE_ER_NDB_CANT_PARSE_NDB_CLUSTER_CONNECTION_POOL_NODEIDS 10786 //#define OBSOLETE_ER_NDB_INVALID_CLUSTER_CONNECTION_POOL_NODEIDS 10787 //#define OBSOLETE_ER_NDB_DUPLICATE_CLUSTER_CONNECTION_POOL_NODEIDS 10788 //#define OBSOLETE_ER_NDB_POOL_SIZE_CLUSTER_CONNECTION_POOL_NODEIDS 10789 //#define OBSOLETE_ER_NDB_NODEID_NOT_FIRST_CONNECTION_POOL_NODEIDS 10790 //#define OBSOLETE_ER_NDB_USING_NODEID 10791 //#define OBSOLETE_ER_NDB_CANT_ALLOC_GLOBAL_NDB_CLUSTER_CONNECTION 10792 //#define OBSOLETE_ER_NDB_CANT_ALLOC_GLOBAL_NDB_OBJECT 10793 //#define OBSOLETE_ER_NDB_USING_NODEID_LIST 10794 //#define OBSOLETE_ER_NDB_CANT_ALLOC_NDB_CLUSTER_CONNECTION 10795 //#define OBSOLETE_ER_NDB_STARTING_CONNECT_THREAD 10796 //#define OBSOLETE_ER_NDB_NODE_INFO 10797 //#define OBSOLETE_ER_NDB_CANT_START_CONNECT_THREAD 10798 //#define OBSOLETE_ER_NDB_GENERIC_ERROR 10799 //#define OBSOLETE_ER_NDB_CPU_MASK_TOO_SHORT 10800 #define ER_EVENT_ERROR_CREATING_QUERY_TO_WRITE_TO_BINLOG 10801 #define ER_EVENT_SCHEDULER_ERROR_LOADING_FROM_DB 10802 #define ER_EVENT_SCHEDULER_ERROR_GETTING_EVENT_OBJECT 10803 #define ER_EVENT_SCHEDULER_GOT_BAD_DATA_FROM_TABLE 10804 #define ER_EVENT_CANT_GET_LOCK_FOR_DROPPING_EVENT 10805 #define ER_EVENT_UNABLE_TO_DROP_EVENT 10806 //#define OBSOLETE_ER_BINLOG_ATTACHING_THREAD_MEMORY_FINALLY_AVAILABLE 10807 #define ER_BINLOG_CANT_RESIZE_CACHE 10808 #define ER_BINLOG_FILE_BEING_READ_NOT_PURGED 10809 #define ER_BINLOG_IO_ERROR_READING_HEADER 10810 //#define OBSOLETE_ER_BINLOG_CANT_OPEN_LOG 10811 //#define OBSOLETE_ER_BINLOG_CANT_CREATE_CACHE_FOR_LOG 10812 #define ER_BINLOG_FILE_EXTENSION_NUMBER_EXHAUSTED 10813 #define ER_BINLOG_FILE_NAME_TOO_LONG 10814 #define ER_BINLOG_FILE_EXTENSION_NUMBER_RUNNING_LOW 10815 #define ER_BINLOG_CANT_OPEN_FOR_LOGGING 10816 #define ER_BINLOG_FAILED_TO_SYNC_INDEX_FILE 10817 #define ER_BINLOG_ERROR_READING_GTIDS_FROM_RELAY_LOG 10818 #define ER_BINLOG_EVENTS_READ_FROM_APPLIER_METADATA 10819 #define ER_BINLOG_ERROR_READING_GTIDS_FROM_BINARY_LOG 10820 #define ER_BINLOG_EVENTS_READ_FROM_BINLOG_INFO 10821 #define ER_BINLOG_CANT_GENERATE_NEW_FILE_NAME 10822 #define ER_BINLOG_FAILED_TO_SYNC_INDEX_FILE_IN_OPEN 10823 #define ER_BINLOG_CANT_USE_FOR_LOGGING 10824 #define ER_BINLOG_FAILED_TO_CLOSE_INDEX_FILE_WHILE_REBUILDING 10825 #define ER_BINLOG_FAILED_TO_DELETE_INDEX_FILE_WHILE_REBUILDING 10826 #define ER_BINLOG_FAILED_TO_RENAME_INDEX_FILE_WHILE_REBUILDING 10827 #define ER_BINLOG_FAILED_TO_OPEN_INDEX_FILE_AFTER_REBUILDING 10828 #define ER_BINLOG_CANT_APPEND_LOG_TO_TMP_INDEX 10829 #define ER_BINLOG_CANT_LOCATE_OLD_BINLOG_OR_RELAY_LOG_FILES 10830 #define ER_BINLOG_CANT_DELETE_FILE 10831 #define ER_BINLOG_CANT_SET_TMP_INDEX_NAME 10832 #define ER_BINLOG_FAILED_TO_OPEN_TEMPORARY_INDEX_FILE 10833 //#define OBSOLETE_ER_BINLOG_ERROR_GETTING_NEXT_LOG_FROM_INDEX 10834 #define ER_BINLOG_CANT_OPEN_TMP_INDEX 10835 #define ER_BINLOG_CANT_COPY_INDEX_TO_TMP 10836 #define ER_BINLOG_CANT_CLOSE_TMP_INDEX 10837 #define ER_BINLOG_CANT_MOVE_TMP_TO_INDEX 10838 #define ER_BINLOG_PURGE_LOGS_CALLED_WITH_FILE_NOT_IN_INDEX 10839 #define ER_BINLOG_PURGE_LOGS_CANT_SYNC_INDEX_FILE 10840 #define ER_BINLOG_PURGE_LOGS_CANT_COPY_TO_REGISTER_FILE 10841 #define ER_BINLOG_PURGE_LOGS_CANT_FLUSH_REGISTER_FILE 10842 #define ER_BINLOG_PURGE_LOGS_CANT_UPDATE_INDEX_FILE 10843 #define ER_BINLOG_PURGE_LOGS_FAILED_TO_PURGE_LOG 10844 #define ER_BINLOG_FAILED_TO_SET_PURGE_INDEX_FILE_NAME 10845 #define ER_BINLOG_FAILED_TO_OPEN_REGISTER_FILE 10846 #define ER_BINLOG_FAILED_TO_REINIT_REGISTER_FILE 10847 #define ER_BINLOG_FAILED_TO_READ_REGISTER_FILE 10848 #define ER_CANT_STAT_FILE 10849 #define ER_BINLOG_CANT_DELETE_LOG_FILE_DOES_INDEX_MATCH_FILES 10850 #define ER_BINLOG_CANT_DELETE_FILE_AND_READ_BINLOG_INDEX 10851 #define ER_BINLOG_FAILED_TO_DELETE_LOG_FILE 10852 #define ER_BINLOG_LOGGING_INCIDENT_TO_STOP_REPLICAS 10853 #define ER_BINLOG_CANT_FIND_LOG_IN_INDEX 10854 #define ER_BINLOG_RECOVERING_AFTER_CRASH_USING 10855 #define ER_BINLOG_CANT_OPEN_CRASHED_BINLOG 10856 #define ER_BINLOG_CANT_TRIM_CRASHED_BINLOG 10857 #define ER_BINLOG_CRASHED_BINLOG_TRIMMED 10858 #define ER_BINLOG_CANT_CLEAR_IN_USE_FLAG_FOR_CRASHED_BINLOG 10859 #define ER_BINLOG_FAILED_TO_RUN_AFTER_SYNC_HOOK 10860 #define ER_TURNING_LOGGING_OFF_FOR_THE_DURATION 10861 #define ER_BINLOG_FAILED_TO_RUN_AFTER_FLUSH_HOOK 10862 //#define OBSOLETE_ER_BINLOG_CRASH_RECOVERY_FAILED 10863 #define ER_BINLOG_WARNING_SUPPRESSED 10864 #define ER_NDB_LOG_ENTRY 10865 #define ER_NDB_LOG_ENTRY_WITH_PREFIX 10866 //#define OBSOLETE_ER_NDB_BINLOG_CANT_CREATE_PURGE_THD 10867 #define ER_INNODB_UNKNOWN_COLLATION 10868 #define ER_INNODB_INVALID_LOG_GROUP_HOME_DIR 10869 #define ER_INNODB_INVALID_INNODB_UNDO_DIRECTORY 10870 #define ER_INNODB_ILLEGAL_COLON_IN_POOL 10871 #define ER_INNODB_INVALID_PAGE_SIZE 10872 #define ER_INNODB_DIRTY_WATER_MARK_NOT_LOW 10873 #define ER_INNODB_IO_CAPACITY_EXCEEDS_MAX 10874 #define ER_INNODB_FILES_SAME 10875 #define ER_INNODB_UNREGISTERED_TRX_ACTIVE 10876 #define ER_INNODB_CLOSING_CONNECTION_ROLLS_BACK 10877 #define ER_INNODB_TRX_XLATION_TABLE_OOM 10878 #define ER_INNODB_CANT_FIND_INDEX_IN_INNODB_DD 10879 #define ER_INNODB_INDEX_COLUMN_INFO_UNLIKE_MYSQLS 10880 //#define OBSOLETE_ER_INNODB_CANT_OPEN_TABLE 10881 #define ER_INNODB_CANT_BUILD_INDEX_XLATION_TABLE_FOR 10882 #define ER_INNODB_PK_NOT_IN_MYSQL 10883 #define ER_INNODB_PK_ONLY_IN_MYSQL 10884 #define ER_INNODB_CLUSTERED_INDEX_PRIVATE 10885 //#define OBSOLETE_ER_INNODB_PARTITION_TABLE_LOWERCASED 10886 #define ER_ERRMSG_REPLACEMENT_DODGY 10887 #define ER_ERRMSG_REPLACEMENTS_FAILED 10888 #define ER_NPIPE_CANT_CREATE 10889 #define ER_PARTITION_MOVE_CREATED_DUPLICATE_ROW_PLEASE_FIX 10890 #define ER_AUDIT_CANT_ABORT_COMMAND 10891 #define ER_AUDIT_CANT_ABORT_EVENT 10892 #define ER_AUDIT_WARNING 10893 //#define OBSOLETE_ER_NDB_NUMBER_OF_CHANNELS 10894 //#define OBSOLETE_ER_NDB_REPLICA_PARALLEL_WORKERS 10895 //#define OBSOLETE_ER_NDB_DISTRIBUTING_ERR 10896 #define ER_RPL_REPLICA_INSECURE_CHANGE_SOURCE 10897 //#define OBSOLETE_ER_RPL_SLAVE_FLUSH_RELAY_LOGS_NOT_ALLOWED 10898 #define ER_RPL_REPLICA_INCORRECT_CHANNEL 10899 #define ER_FAILED_TO_FIND_DL_ENTRY 10900 #define ER_FAILED_TO_OPEN_SHARED_LIBRARY 10901 #define ER_THREAD_PRIORITY_IGNORED 10902 #define ER_BINLOG_CACHE_SIZE_TOO_LARGE 10903 #define ER_BINLOG_STMT_CACHE_SIZE_TOO_LARGE 10904 #define ER_FAILED_TO_GENERATE_UNIQUE_LOGFILE 10905 #define ER_FAILED_TO_READ_FILE 10906 #define ER_FAILED_TO_WRITE_TO_FILE 10907 #define ER_BINLOG_UNSAFE_MESSAGE_AND_STATEMENT 10908 #define ER_FORCE_CLOSE_THREAD 10909 #define ER_SERVER_SHUTDOWN_COMPLETE 10910 #define ER_RPL_CANT_HAVE_SAME_BASENAME 10911 #define ER_RPL_GTID_MODE_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON 10912 #define ER_WARN_NO_SERVERID_SPECIFIED 10913 #define ER_ABORTING_USER_CONNECTION 10914 #define ER_SQL_MODE_MERGED_WITH_STRICT_MODE 10915 #define ER_GTID_PURGED_WAS_UPDATED 10916 #define ER_GTID_EXECUTED_WAS_UPDATED 10917 #define ER_DEPRECATE_MSG_WITH_REPLACEMENT 10918 #define ER_TRG_CREATION_CTX_NOT_SET 10919 #define ER_FILE_HAS_OLD_FORMAT 10920 #define ER_VIEW_CREATION_CTX_NOT_SET 10921 //#define OBSOLETE_ER_TABLE_NAME_CAUSES_TOO_LONG_PATH 10922 #define ER_TABLE_UPGRADE_REQUIRED 10923 #define ER_GET_ERRNO_FROM_STORAGE_ENGINE 10924 #define ER_ACCESS_DENIED_ERROR_WITHOUT_PASSWORD 10925 #define ER_ACCESS_DENIED_ERROR_WITH_PASSWORD 10926 #define ER_ACCESS_DENIED_FOR_USER_ACCOUNT_LOCKED 10927 //#define OBSOLETE_ER_MUST_CHANGE_EXPIRED_PASSWORD 10928 #define ER_SYSTEM_TABLES_NOT_SUPPORTED_BY_STORAGE_ENGINE 10929 //#define OBSOLETE_ER_FILESORT_TERMINATED 10930 #define ER_SERVER_STARTUP_MSG 10931 #define ER_FAILED_TO_FIND_LOCALE_NAME 10932 #define ER_FAILED_TO_FIND_COLLATION_NAME 10933 #define ER_SERVER_OUT_OF_RESOURCES 10934 #define ER_SERVER_OUTOFMEMORY 10935 #define ER_INVALID_COLLATION_FOR_CHARSET 10936 #define ER_CANT_START_ERROR_LOG_SERVICE 10937 #define ER_CREATING_NEW_UUID_FIRST_START 10938 #define ER_FAILED_TO_GET_ABSOLUTE_PATH 10939 #define ER_PERFSCHEMA_COMPONENTS_INFRASTRUCTURE_BOOTSTRAP 10940 #define ER_PERFSCHEMA_COMPONENTS_INFRASTRUCTURE_SHUTDOWN 10941 #define ER_DUP_FD_OPEN_FAILED 10942 #define ER_SYSTEM_VIEW_INIT_FAILED 10943 #define ER_RESOURCE_GROUP_POST_INIT_FAILED 10944 #define ER_RESOURCE_GROUP_SUBSYSTEM_INIT_FAILED 10945 #define ER_FAILED_START_MYSQLD_DAEMON 10946 #define ER_CANNOT_CHANGE_TO_ROOT_DIR 10947 #define ER_PERSISTENT_PRIVILEGES_BOOTSTRAP 10948 #define ER_BASEDIR_SET_TO 10949 #define ER_RPL_FILTER_ADD_WILD_DO_TABLE_FAILED 10950 #define ER_RPL_FILTER_ADD_WILD_IGNORE_TABLE_FAILED 10951 #define ER_PRIVILEGE_SYSTEM_INIT_FAILED 10952 #define ER_CANNOT_SET_LOG_ERROR_SERVICES 10953 #define ER_PERFSCHEMA_TABLES_INIT_FAILED 10954 #define ER_TX_EXTRACTION_ALGORITHM_FOR_BINLOG_TX_DEPEDENCY_TRACKING 10955 //#define OBSOLETE_ER_INVALID_REPLICATION_TIMESTAMPS 10956 //#define OBSOLETE_ER_RPL_TIMESTAMPS_RETURNED_TO_NORMAL 10957 #define ER_BINLOG_FILE_OPEN_FAILED 10958 #define ER_BINLOG_EVENT_WRITE_TO_STMT_CACHE_FAILED 10959 #define ER_REPLICA_RELAY_LOG_TRUNCATE_INFO 10960 #define ER_REPLICA_RELAY_LOG_PURGE_FAILED 10961 #define ER_RPL_REPLICA_FILTER_CREATE_FAILED 10962 #define ER_RPL_REPLICA_GLOBAL_FILTERS_COPY_FAILED 10963 #define ER_RPL_REPLICA_RESET_FILTER_OPTIONS 10964 #define ER_MISSING_GRANT_SYSTEM_TABLE 10965 #define ER_MISSING_ACL_SYSTEM_TABLE 10966 #define ER_ANONYMOUS_AUTH_ID_NOT_ALLOWED_IN_MANDATORY_ROLES 10967 #define ER_UNKNOWN_AUTH_ID_IN_MANDATORY_ROLE 10968 #define ER_WRITE_ROW_TO_PARTITION_FAILED 10969 #define ER_RESOURCE_GROUP_METADATA_UPDATE_SKIPPED 10970 #define ER_FAILED_TO_PERSIST_RESOURCE_GROUP_METADATA 10971 #define ER_FAILED_TO_DESERIALIZE_RESOURCE_GROUP 10972 #define ER_FAILED_TO_UPDATE_RESOURCE_GROUP 10973 #define ER_RESOURCE_GROUP_VALIDATION_FAILED 10974 #define ER_FAILED_TO_ALLOCATE_MEMORY_FOR_RESOURCE_GROUP 10975 #define ER_FAILED_TO_ALLOCATE_MEMORY_FOR_RESOURCE_GROUP_HASH 10976 #define ER_FAILED_TO_ADD_RESOURCE_GROUP_TO_MAP 10977 #define ER_RESOURCE_GROUP_IS_DISABLED 10978 #define ER_FAILED_TO_APPLY_RESOURCE_GROUP_CONTROLLER 10979 #define ER_FAILED_TO_ACQUIRE_LOCK_ON_RESOURCE_GROUP 10980 #define ER_PFS_NOTIFICATION_FUNCTION_REGISTER_FAILED 10981 #define ER_RES_GRP_SET_THR_AFFINITY_FAILED 10982 #define ER_RES_GRP_SET_THR_AFFINITY_TO_CPUS_FAILED 10983 #define ER_RES_GRP_THD_UNBIND_FROM_CPU_FAILED 10984 #define ER_RES_GRP_SET_THREAD_PRIORITY_FAILED 10985 #define ER_RES_GRP_FAILED_TO_DETERMINE_NICE_CAPABILITY 10986 #define ER_RES_GRP_FAILED_TO_GET_THREAD_HANDLE 10987 #define ER_RES_GRP_GET_THREAD_PRIO_NOT_SUPPORTED 10988 #define ER_RES_GRP_FAILED_DETERMINE_CPU_COUNT 10989 #define ER_RES_GRP_FEATURE_NOT_AVAILABLE 10990 #define ER_RES_GRP_INVALID_THREAD_PRIORITY 10991 #define ER_RES_GRP_SOLARIS_PROCESSOR_BIND_TO_CPUID_FAILED 10992 #define ER_RES_GRP_SOLARIS_PROCESSOR_BIND_TO_THREAD_FAILED 10993 #define ER_RES_GRP_SOLARIS_PROCESSOR_AFFINITY_FAILED 10994 #define ER_DD_UPGRADE_RENAME_IDX_STATS_FILE_FAILED 10995 #define ER_DD_UPGRADE_DD_OPEN_FAILED 10996 #define ER_DD_UPGRADE_FAILED_TO_FETCH_TABLESPACES 10997 #define ER_DD_UPGRADE_FAILED_TO_ACQUIRE_TABLESPACE 10998 #define ER_DD_UPGRADE_FAILED_TO_RESOLVE_TABLESPACE_ENGINE 10999 #define ER_FAILED_TO_CREATE_SDI_FOR_TABLESPACE 11000 #define ER_FAILED_TO_STORE_SDI_FOR_TABLESPACE 11001 #define ER_DD_UPGRADE_FAILED_TO_FETCH_TABLES 11002 #define ER_DD_UPGRADE_DD_POPULATED 11003 #define ER_DD_UPGRADE_INFO_FILE_OPEN_FAILED 11004 #define ER_DD_UPGRADE_INFO_FILE_CLOSE_FAILED 11005 #define ER_DD_UPGRADE_TABLESPACE_MIGRATION_FAILED 11006 #define ER_DD_UPGRADE_FAILED_TO_CREATE_TABLE_STATS 11007 #define ER_DD_UPGRADE_TABLE_STATS_MIGRATE_COMPLETED 11008 #define ER_DD_UPGRADE_FAILED_TO_CREATE_INDEX_STATS 11009 #define ER_DD_UPGRADE_INDEX_STATS_MIGRATE_COMPLETED 11010 #define ER_DD_UPGRADE_FAILED_FIND_VALID_DATA_DIR 11011 #define ER_DD_UPGRADE_START 11012 #define ER_DD_UPGRADE_FAILED_INIT_DD_SE 11013 #define ER_DD_UPGRADE_FOUND_PARTIALLY_UPGRADED_DD_ABORT 11014 #define ER_DD_UPGRADE_FOUND_PARTIALLY_UPGRADED_DD_CONTINUE 11015 #define ER_DD_UPGRADE_SE_LOGS_FAILED 11016 #define ER_DD_UPGRADE_SDI_INFO_UPDATE_FAILED 11017 #define ER_SKIP_UPDATING_METADATA_IN_SE_RO_MODE 11018 #define ER_CREATED_SYSTEM_WITH_VERSION 11019 #define ER_UNKNOWN_ERROR_DETECTED_IN_SE 11020 #define ER_READ_LOG_EVENT_FAILED 11021 #define ER_ROW_DATA_TOO_BIG_TO_WRITE_IN_BINLOG 11022 #define ER_FAILED_TO_CONSTRUCT_DROP_EVENT_QUERY 11023 #define ER_FAILED_TO_BINLOG_DROP_EVENT 11024 #define ER_FAILED_TO_START_REPLICA_THREAD 11025 #define ER_RPL_IO_THREAD_KILLED 11026 #define ER_REPLICA_RECONNECT_FAILED 11027 #define ER_REPLICA_KILLED_AFTER_RECONNECT 11028 #define ER_REPLICA_NOT_STARTED_ON_SOME_CHANNELS 11029 #define ER_FAILED_TO_ADD_RPL_FILTER 11030 #define ER_PER_CHANNEL_RPL_FILTER_CONF_FOR_GRP_RPL 11031 #define ER_RPL_FILTERS_NOT_ATTACHED_TO_CHANNEL 11032 #define ER_FAILED_TO_BUILD_DO_AND_IGNORE_TABLE_HASHES 11033 #define ER_CLONE_PLUGIN_NOT_LOADED_TRACE 11034 #define ER_CLONE_HANDLER_EXIST_TRACE 11035 #define ER_CLONE_CREATE_HANDLER_FAIL_TRACE 11036 #define ER_CYCLE_TIMER_IS_NOT_AVAILABLE 11037 #define ER_NANOSECOND_TIMER_IS_NOT_AVAILABLE 11038 #define ER_MICROSECOND_TIMER_IS_NOT_AVAILABLE 11039 #define ER_PFS_MALLOC_ARRAY_OVERFLOW 11040 #define ER_PFS_MALLOC_ARRAY_OOM 11041 #define ER_INNODB_FAILED_TO_FIND_IDX_WITH_KEY_NO 11042 #define ER_INNODB_FAILED_TO_FIND_IDX 11043 #define ER_INNODB_FAILED_TO_FIND_IDX_FROM_DICT_CACHE 11044 #define ER_INNODB_ACTIVE_INDEX_CHANGE_FAILED 11045 #define ER_INNODB_DIFF_IN_REF_LEN 11046 #define ER_WRONG_TYPE_FOR_COLUMN_PREFIX_IDX_FLD 11047 #define ER_INNODB_CANNOT_CREATE_TABLE 11048 #define ER_INNODB_INTERNAL_INDEX 11049 #define ER_INNODB_IDX_CNT_MORE_THAN_DEFINED_IN_MYSQL 11050 #define ER_INNODB_IDX_CNT_FEWER_THAN_DEFINED_IN_MYSQL 11051 #define ER_INNODB_IDX_COLUMN_CNT_DIFF 11052 #define ER_INNODB_USE_MONITOR_GROUP_NAME 11053 #define ER_INNODB_MONITOR_DEFAULT_VALUE_NOT_DEFINED 11054 #define ER_INNODB_MONITOR_IS_ENABLED 11055 #define ER_INNODB_INVALID_MONITOR_COUNTER_NAME 11056 #define ER_WIN_LOAD_LIBRARY_FAILED 11057 #define ER_PARTITION_HANDLER_ADMIN_MSG 11058 #define ER_RPL_AM_INIT_INFO_MSG 11059 #define ER_DD_UPGRADE_TABLE_INTACT_ERROR 11060 #define ER_SERVER_INIT_COMPILED_IN_COMMANDS 11061 #define ER_MYISAM_CHECK_METHOD_ERROR 11062 #define ER_MYISAM_CRASHED_ERROR 11063 #define ER_WAITPID_FAILED 11064 #define ER_FAILED_TO_FIND_MYSQLD_STATUS 11065 #define ER_INNODB_ERROR_LOGGER_MSG 11066 #define ER_INNODB_ERROR_LOGGER_FATAL_MSG 11067 #define ER_DEPRECATED_SYNTAX_WITH_REPLACEMENT 11068 #define ER_DEPRECATED_SYNTAX_NO_REPLACEMENT 11069 #define ER_DEPRECATE_MSG_NO_REPLACEMENT 11070 #define ER_LOG_PRINTF_MSG 11071 #define ER_BINLOG_LOGGING_NOT_POSSIBLE 11072 #define ER_FAILED_TO_SET_PERSISTED_OPTIONS 11073 #define ER_COMPONENTS_FAILED_TO_ACQUIRE_SERVICE_IMPLEMENTATION 11074 #define ER_RES_GRP_INVALID_VCPU_RANGE 11075 #define ER_RES_GRP_INVALID_VCPU_ID 11076 #define ER_ERROR_DURING_FLUSH_LOG_COMMIT_PHASE 11077 #define ER_DROP_DATABASE_FAILED_RMDIR_MANUALLY 11078 #define ER_EXPIRE_LOGS_DAYS_IGNORED 11079 #define ER_BINLOG_MALFORMED_OR_OLD_RELAY_LOG 11080 #define ER_DD_UPGRADE_VIEW_COLUMN_NAME_TOO_LONG 11081 #define ER_TABLE_NEEDS_DUMP_UPGRADE 11082 #define ER_DD_UPGRADE_FAILED_TO_UPDATE_VER_NO_IN_TABLESPACE 11083 #define ER_KEYRING_MIGRATION_FAILED 11084 #define ER_KEYRING_MIGRATION_SUCCESSFUL 11085 #define ER_RESTART_RECEIVED_INFO 11086 #define ER_LCTN_CHANGED 11087 #define ER_DD_INITIALIZE 11088 #define ER_DD_RESTART 11089 #define ER_DD_UPGRADE 11090 #define ER_DD_UPGRADE_OFF 11091 #define ER_DD_UPGRADE_VERSION_NOT_SUPPORTED 11092 #define ER_DD_UPGRADE_SCHEMA_UNAVAILABLE 11093 #define ER_DD_MINOR_DOWNGRADE 11094 #define ER_DD_MINOR_DOWNGRADE_VERSION_NOT_SUPPORTED 11095 #define ER_DD_NO_VERSION_FOUND 11096 #define ER_THREAD_POOL_NOT_SUPPORTED_ON_PLATFORM 11097 #define ER_THREAD_POOL_SIZE_TOO_LOW 11098 #define ER_THREAD_POOL_SIZE_TOO_HIGH 11099 #define ER_THREAD_POOL_ALGORITHM_INVALID 11100 #define ER_THREAD_POOL_INVALID_STALL_LIMIT 11101 #define ER_THREAD_POOL_INVALID_PRIO_KICKUP_TIMER 11102 #define ER_THREAD_POOL_MAX_UNUSED_THREADS_INVALID 11103 #define ER_THREAD_POOL_CON_HANDLER_INIT_FAILED 11104 #define ER_THREAD_POOL_INIT_FAILED 11105 //#define OBSOLETE_ER_THREAD_POOL_PLUGIN_STARTED 11106 #define ER_THREAD_POOL_CANNOT_SET_THREAD_SPECIFIC_DATA 11107 #define ER_THREAD_POOL_FAILED_TO_CREATE_CONNECT_HANDLER_THD 11108 #define ER_THREAD_POOL_FAILED_TO_CREATE_THD_AND_AUTH_CONN 11109 #define ER_THREAD_POOL_FAILED_PROCESS_CONNECT_EVENT 11110 #define ER_THREAD_POOL_FAILED_TO_CREATE_POOL 11111 #define ER_THREAD_POOL_RATE_LIMITED_ERROR_MSGS 11112 #define ER_TRHEAD_POOL_LOW_LEVEL_INIT_FAILED 11113 #define ER_THREAD_POOL_LOW_LEVEL_REARM_FAILED 11114 #define ER_THREAD_POOL_BUFFER_TOO_SMALL 11115 #define ER_MECAB_NOT_SUPPORTED 11116 #define ER_MECAB_NOT_VERIFIED 11117 #define ER_MECAB_CREATING_MODEL 11118 #define ER_MECAB_FAILED_TO_CREATE_MODEL 11119 #define ER_MECAB_FAILED_TO_CREATE_TRIGGER 11120 #define ER_MECAB_UNSUPPORTED_CHARSET 11121 #define ER_MECAB_CHARSET_LOADED 11122 #define ER_MECAB_PARSE_FAILED 11123 #define ER_MECAB_OOM_WHILE_PARSING_TEXT 11124 #define ER_MECAB_CREATE_LATTICE_FAILED 11125 #define ER_SEMISYNC_TRACE_ENTER_FUNC 11126 #define ER_SEMISYNC_TRACE_EXIT_WITH_INT_EXIT_CODE 11127 #define ER_SEMISYNC_TRACE_EXIT_WITH_BOOL_EXIT_CODE 11128 #define ER_SEMISYNC_TRACE_EXIT 11129 #define ER_SEMISYNC_RPL_INIT_FOR_TRX 11130 #define ER_SEMISYNC_FAILED_TO_ALLOCATE_TRX_NODE 11131 #define ER_SEMISYNC_BINLOG_WRITE_OUT_OF_ORDER 11132 #define ER_SEMISYNC_INSERT_LOG_INFO_IN_ENTRY 11133 #define ER_SEMISYNC_PROBE_LOG_INFO_IN_ENTRY 11134 #define ER_SEMISYNC_CLEARED_ALL_ACTIVE_TRANSACTION_NODES 11135 #define ER_SEMISYNC_CLEARED_ACTIVE_TRANSACTION_TILL_POS 11136 #define ER_SEMISYNC_REPLY_MAGIC_NO_ERROR 11137 #define ER_SEMISYNC_REPLY_PKT_LENGTH_TOO_SMALL 11138 #define ER_SEMISYNC_REPLY_BINLOG_FILE_TOO_LARGE 11139 #define ER_SEMISYNC_SERVER_REPLY 11140 #define ER_SEMISYNC_FUNCTION_CALLED_TWICE 11141 #define ER_SEMISYNC_RPL_ENABLED_ON_SOURCE 11142 #define ER_SEMISYNC_SOURCE_OOM 11143 #define ER_SEMISYNC_DISABLED_ON_SOURCE 11144 #define ER_SEMISYNC_FORCED_SHUTDOWN 11145 #define ER_SEMISYNC_SOURCE_GOT_REPLY_AT_POS 11146 #define ER_SEMISYNC_SOURCE_SIGNAL_ALL_WAITING_THREADS 11147 #define ER_SEMISYNC_SOURCE_TRX_WAIT_POS 11148 #define ER_SEMISYNC_BINLOG_REPLY_IS_AHEAD 11149 #define ER_SEMISYNC_MOVE_BACK_WAIT_POS 11150 #define ER_SEMISYNC_INIT_WAIT_POS 11151 #define ER_SEMISYNC_WAIT_TIME_FOR_BINLOG_SENT 11152 #define ER_SEMISYNC_WAIT_FOR_BINLOG_TIMEDOUT 11153 #define ER_SEMISYNC_WAIT_TIME_ASSESSMENT_FOR_COMMIT_TRX_FAILED 11154 #define ER_SEMISYNC_RPL_SWITCHED_OFF 11155 #define ER_SEMISYNC_RPL_SWITCHED_ON 11156 #define ER_SEMISYNC_NO_SPACE_IN_THE_PKT 11157 #define ER_SEMISYNC_SYNC_HEADER_UPDATE_INFO 11158 #define ER_SEMISYNC_FAILED_TO_INSERT_TRX_NODE 11159 #define ER_SEMISYNC_TRX_SKIPPED_AT_POS 11160 #define ER_SEMISYNC_SOURCE_FAILED_ON_NET_FLUSH 11161 #define ER_SEMISYNC_RECEIVED_ACK_IS_SMALLER 11162 #define ER_SEMISYNC_ADD_ACK_TO_SLOT 11163 #define ER_SEMISYNC_UPDATE_EXISTING_REPLICA_ACK 11164 #define ER_SEMISYNC_FAILED_TO_START_ACK_RECEIVER_THD 11165 #define ER_SEMISYNC_STARTING_ACK_RECEIVER_THD 11166 #define ER_SEMISYNC_FAILED_TO_WAIT_ON_DUMP_SOCKET 11167 #define ER_SEMISYNC_STOPPING_ACK_RECEIVER_THREAD 11168 #define ER_SEMISYNC_FAILED_REGISTER_REPLICA_TO_RECEIVER 11169 #define ER_SEMISYNC_START_BINLOG_DUMP_TO_REPLICA 11170 #define ER_SEMISYNC_STOP_BINLOG_DUMP_TO_REPLICA 11171 #define ER_SEMISYNC_UNREGISTER_TRX_OBSERVER_FAILED 11172 #define ER_SEMISYNC_UNREGISTER_BINLOG_STORAGE_OBSERVER_FAILED 11173 #define ER_SEMISYNC_UNREGISTER_BINLOG_TRANSMIT_OBSERVER_FAILED 11174 #define ER_SEMISYNC_UNREGISTERED_REPLICATOR 11175 #define ER_SEMISYNC_SOCKET_FD_TOO_LARGE 11176 #define ER_SEMISYNC_REPLICA_REPLY 11177 #define ER_SEMISYNC_MISSING_MAGIC_NO_FOR_SEMISYNC_PKT 11178 #define ER_SEMISYNC_REPLICA_START 11179 #define ER_SEMISYNC_REPLICA_REPLY_WITH_BINLOG_INFO 11180 #define ER_SEMISYNC_REPLICA_NET_FLUSH_REPLY_FAILED 11181 #define ER_SEMISYNC_REPLICA_SEND_REPLY_FAILED 11182 #define ER_SEMISYNC_EXECUTION_FAILED_ON_SOURCE 11183 #define ER_SEMISYNC_NOT_SUPPORTED_BY_SOURCE 11184 #define ER_SEMISYNC_REPLICA_SET_FAILED 11185 #define ER_SEMISYNC_FAILED_TO_STOP_ACK_RECEIVER_THD 11186 #define ER_FIREWALL_FAILED_TO_READ_FIREWALL_TABLES 11187 #define ER_FIREWALL_FAILED_TO_REG_DYNAMIC_PRIVILEGES 11188 #define ER_FIREWALL_RECORDING_STMT_WAS_TRUNCATED 11189 #define ER_FIREWALL_RECORDING_STMT_WITHOUT_TEXT 11190 #define ER_FIREWALL_SUSPICIOUS_STMT 11191 #define ER_FIREWALL_ACCESS_DENIED 11192 #define ER_FIREWALL_SKIPPED_UNKNOWN_USER_MODE 11193 #define ER_FIREWALL_RELOADING_CACHE 11194 #define ER_FIREWALL_RESET_FOR_USER 11195 #define ER_FIREWALL_STATUS_FLUSHED 11196 #define ER_KEYRING_LOGGER_ERROR_MSG 11197 #define ER_AUDIT_LOG_FILTER_IS_NOT_INSTALLED 11198 #define ER_AUDIT_LOG_SWITCHING_TO_INCLUDE_LIST 11199 #define ER_AUDIT_LOG_CANNOT_SET_LOG_POLICY_WITH_OTHER_POLICIES 11200 #define ER_AUDIT_LOG_ONLY_INCLUDE_LIST_USED 11201 #define ER_AUDIT_LOG_INDEX_MAP_CANNOT_ACCESS_DIR 11202 #define ER_AUDIT_LOG_WRITER_RENAME_FILE_FAILED 11203 #define ER_AUDIT_LOG_WRITER_DEST_FILE_ALREADY_EXISTS 11204 #define ER_AUDIT_LOG_WRITER_RENAME_FILE_FAILED_REMOVE_FILE_MANUALLY 11205 #define ER_AUDIT_LOG_WRITER_INCOMPLETE_FILE_RENAMED 11206 #define ER_AUDIT_LOG_WRITER_FAILED_TO_WRITE_TO_FILE 11207 #define ER_AUDIT_LOG_EC_WRITER_FAILED_TO_INIT_ENCRYPTION 11208 #define ER_AUDIT_LOG_EC_WRITER_FAILED_TO_INIT_COMPRESSION 11209 #define ER_AUDIT_LOG_EC_WRITER_FAILED_TO_CREATE_FILE 11210 #define ER_AUDIT_LOG_RENAME_LOG_FILE_BEFORE_FLUSH 11211 #define ER_AUDIT_LOG_FILTER_RESULT_MSG 11212 #define ER_AUDIT_LOG_JSON_READER_FAILED_TO_PARSE 11213 #define ER_AUDIT_LOG_JSON_READER_BUF_TOO_SMALL 11214 #define ER_AUDIT_LOG_JSON_READER_FAILED_TO_OPEN_FILE 11215 #define ER_AUDIT_LOG_JSON_READER_FILE_PARSING_ERROR 11216 //#define OBSOLETE_ER_AUDIT_LOG_FILTER_INVALID_COLUMN_COUNT 11217 //#define OBSOLETE_ER_AUDIT_LOG_FILTER_INVALID_COLUMN_DEFINITION 11218 #define ER_AUDIT_LOG_FILTER_FAILED_TO_STORE_TABLE_FLDS 11219 #define ER_AUDIT_LOG_FILTER_FAILED_TO_UPDATE_TABLE 11220 #define ER_AUDIT_LOG_FILTER_FAILED_TO_INSERT_INTO_TABLE 11221 #define ER_AUDIT_LOG_FILTER_FAILED_TO_DELETE_FROM_TABLE 11222 #define ER_AUDIT_LOG_FILTER_FAILED_TO_INIT_TABLE_FOR_READ 11223 #define ER_AUDIT_LOG_FILTER_FAILED_TO_READ_TABLE 11224 #define ER_AUDIT_LOG_FILTER_FAILED_TO_CLOSE_TABLE_AFTER_READING 11225 #define ER_AUDIT_LOG_FILTER_USER_AND_HOST_CANNOT_BE_EMPTY 11226 #define ER_AUDIT_LOG_FILTER_FLD_FILTERNAME_CANNOT_BE_EMPTY 11227 #define ER_VALIDATE_PWD_DICT_FILE_NOT_SPECIFIED 11228 #define ER_VALIDATE_PWD_DICT_FILE_NOT_LOADED 11229 #define ER_VALIDATE_PWD_DICT_FILE_TOO_BIG 11230 #define ER_VALIDATE_PWD_FAILED_TO_READ_DICT_FILE 11231 #define ER_VALIDATE_PWD_FAILED_TO_GET_FLD_FROM_SECURITY_CTX 11232 #define ER_VALIDATE_PWD_FAILED_TO_GET_SECURITY_CTX 11233 #define ER_VALIDATE_PWD_LENGTH_CHANGED 11234 #define ER_REWRITER_QUERY_ERROR_MSG 11235 #define ER_REWRITER_QUERY_FAILED 11236 #define ER_XPLUGIN_STARTUP_FAILED 11237 //#define OBSOLETE_ER_XPLUGIN_SERVER_EXITING 11238 //#define OBSOLETE_ER_XPLUGIN_SERVER_EXITED 11239 #define ER_XPLUGIN_USING_SSL_CONF_FROM_SERVER 11240 #define ER_XPLUGIN_USING_SSL_CONF_FROM_MYSQLX 11241 #define ER_XPLUGIN_FAILED_TO_USE_SSL_CONF 11242 #define ER_XPLUGIN_USING_SSL_FOR_TLS_CONNECTION 11243 #define ER_XPLUGIN_REFERENCE_TO_SECURE_CONN_WITH_XPLUGIN 11244 #define ER_XPLUGIN_ERROR_MSG 11245 #define ER_SHA_PWD_FAILED_TO_PARSE_AUTH_STRING 11246 #define ER_SHA_PWD_FAILED_TO_GENERATE_MULTI_ROUND_HASH 11247 #define ER_SHA_PWD_AUTH_REQUIRES_RSA_OR_SSL 11248 #define ER_SHA_PWD_RSA_KEY_TOO_LONG 11249 #define ER_PLUGIN_COMMON_FAILED_TO_OPEN_FILTER_TABLES 11250 #define ER_PLUGIN_COMMON_FAILED_TO_OPEN_TABLE 11251 #define ER_AUTH_LDAP_ERROR_LOGGER_ERROR_MSG 11252 #define ER_CONN_CONTROL_ERROR_MSG 11253 #define ER_GRP_RPL_ERROR_MSG 11254 #define ER_SHA_PWD_SALT_FOR_USER_CORRUPT 11255 #define ER_SYS_VAR_COMPONENT_OOM 11256 #define ER_SYS_VAR_COMPONENT_VARIABLE_SET_READ_ONLY 11257 #define ER_SYS_VAR_COMPONENT_UNKNOWN_VARIABLE_TYPE 11258 #define ER_SYS_VAR_COMPONENT_FAILED_TO_PARSE_VARIABLE_OPTIONS 11259 #define ER_SYS_VAR_COMPONENT_FAILED_TO_MAKE_VARIABLE_PERSISTENT 11260 #define ER_COMPONENT_FILTER_CONFUSED 11261 #define ER_STOP_REPLICA_IO_THREAD_DISK_SPACE 11262 #define ER_LOG_FILE_CANNOT_OPEN 11263 //#define OBSOLETE_ER_UNABLE_TO_COLLECT_LOG_STATUS 11264 //#define OBSOLETE_ER_DEPRECATED_UTF8_ALIAS 11265 //#define OBSOLETE_ER_DEPRECATED_NATIONAL 11266 //#define OBSOLETE_ER_SLAVE_POSSIBLY_DIVERGED_AFTER_DDL 11267 #define ER_PERSIST_OPTION_STATUS 11268 #define ER_NOT_IMPLEMENTED_GET_TABLESPACE_STATISTICS 11269 //#define OBSOLETE_ER_UNABLE_TO_SET_OPTION 11270 //#define OBSOLETE_ER_RESERVED_TABLESPACE_NAME 11271 #define ER_SSL_FIPS_MODE_ERROR 11272 #define ER_CONN_INIT_CONNECT_IGNORED 11273 //#define OBSOLETE_ER_UNSUPPORTED_SQL_MODE 11274 #define ER_REWRITER_OOM 11275 #define ER_REWRITER_TABLE_MALFORMED_ERROR 11276 #define ER_REWRITER_LOAD_FAILED 11277 #define ER_REWRITER_READ_FAILED 11278 #define ER_CONN_CONTROL_EVENT_COORDINATOR_INIT_FAILED 11279 #define ER_CONN_CONTROL_STAT_CONN_DELAY_TRIGGERED_UPDATE_FAILED 11280 #define ER_CONN_CONTROL_STAT_CONN_DELAY_TRIGGERED_RESET_FAILED 11281 #define ER_CONN_CONTROL_INVALID_CONN_DELAY_TYPE 11282 #define ER_CONN_CONTROL_DELAY_ACTION_INIT_FAILED 11283 #define ER_CONN_CONTROL_FAILED_TO_SET_CONN_DELAY 11284 #define ER_CONN_CONTROL_FAILED_TO_UPDATE_CONN_DELAY_HASH 11285 #define ER_XPLUGIN_FORCE_STOP_CLIENT 11286 #define ER_XPLUGIN_MAX_AUTH_ATTEMPTS_REACHED 11287 #define ER_XPLUGIN_BUFFER_PAGE_ALLOC_FAILED 11288 #define ER_XPLUGIN_DETECTED_HANGING_CLIENTS 11289 #define ER_XPLUGIN_FAILED_TO_ACCEPT_CLIENT 11290 #define ER_XPLUGIN_FAILED_TO_SCHEDULE_CLIENT 11291 #define ER_XPLUGIN_FAILED_TO_PREPARE_IO_INTERFACES 11292 #define ER_XPLUGIN_SRV_SESSION_INIT_THREAD_FAILED 11293 #define ER_XPLUGIN_UNABLE_TO_USE_USER_SESSION_ACCOUNT 11294 #define ER_XPLUGIN_REFERENCE_TO_USER_ACCOUNT_DOC_SECTION 11295 #define ER_XPLUGIN_UNEXPECTED_EXCEPTION_DISPATCHING_CMD 11296 #define ER_XPLUGIN_EXCEPTION_IN_TASK_SCHEDULER 11297 #define ER_XPLUGIN_TASK_SCHEDULING_FAILED 11298 #define ER_XPLUGIN_EXCEPTION_IN_EVENT_LOOP 11299 #define ER_XPLUGIN_LISTENER_SETUP_FAILED 11300 #define ER_XPLUING_NET_STARTUP_FAILED 11301 #define ER_XPLUGIN_FAILED_AT_SSL_CONF 11302 //#define OBSOLETE_ER_XPLUGIN_CLIENT_SSL_HANDSHAKE_FAILED 11303 //#define OBSOLETE_ER_XPLUGIN_SSL_HANDSHAKE_WITH_SERVER_FAILED 11304 #define ER_XPLUGIN_FAILED_TO_CREATE_SESSION_FOR_CONN 11305 #define ER_XPLUGIN_FAILED_TO_INITIALIZE_SESSION 11306 #define ER_XPLUGIN_MESSAGE_TOO_LONG 11307 #define ER_XPLUGIN_UNINITIALIZED_MESSAGE 11308 #define ER_XPLUGIN_FAILED_TO_SET_MIN_NUMBER_OF_WORKERS 11309 #define ER_XPLUGIN_UNABLE_TO_ACCEPT_CONNECTION 11310 #define ER_XPLUGIN_ALL_IO_INTERFACES_DISABLED 11311 //#define OBSOLETE_ER_XPLUGIN_INVALID_MSG_DURING_CLIENT_INIT 11312 //#define OBSOLETE_ER_XPLUGIN_CLOSING_CLIENTS_ON_SHUTDOWN 11313 #define ER_XPLUGIN_ERROR_READING_SOCKET 11314 #define ER_XPLUGIN_PEER_DISCONNECTED_WHILE_READING_MSG_BODY 11315 #define ER_XPLUGIN_READ_FAILED_CLOSING_CONNECTION 11316 //#define OBSOLETE_ER_XPLUGIN_INVALID_AUTH_METHOD 11317 //#define OBSOLETE_ER_XPLUGIN_UNEXPECTED_MSG_DURING_AUTHENTICATION 11318 //#define OBSOLETE_ER_XPLUGIN_ERROR_WRITING_TO_CLIENT 11319 //#define OBSOLETE_ER_XPLUGIN_SCHEDULER_STARTED 11320 //#define OBSOLETE_ER_XPLUGIN_SCHEDULER_STOPPED 11321 #define ER_XPLUGIN_LISTENER_SYS_VARIABLE_ERROR 11322 #define ER_XPLUGIN_LISTENER_STATUS_MSG 11323 #define ER_XPLUGIN_RETRYING_BIND_ON_PORT 11324 //#define OBSOLETE_ER_XPLUGIN_SHUTDOWN_TRIGGERED 11325 //#define OBSOLETE_ER_XPLUGIN_USER_ACCOUNT_WITH_ALL_PERMISSIONS 11326 #define ER_XPLUGIN_EXISTING_USER_ACCOUNT_WITH_INCOMPLETE_GRANTS 11327 //#define OBSOLETE_ER_XPLUGIN_SERVER_STARTS_HANDLING_CONNECTIONS 11328 //#define OBSOLETE_ER_XPLUGIN_SERVER_STOPPED_HANDLING_CONNECTIONS 11329 //#define OBSOLETE_ER_XPLUGIN_FAILED_TO_INTERRUPT_SESSION 11330 //#define OBSOLETE_ER_XPLUGIN_CLIENT_RELEASE_TRIGGERED 11331 #define ER_XPLUGIN_IPv6_AVAILABLE 11332 //#define OBSOLETE_ER_XPLUGIN_UNIX_SOCKET_NOT_CONFIGURED 11333 #define ER_XPLUGIN_CLIENT_KILL_MSG 11334 #define ER_XPLUGIN_FAILED_TO_GET_SECURITY_CTX 11335 //#define OBSOLETE_ER_XPLUGIN_FAILED_TO_SWITCH_SECURITY_CTX_TO_ROOT 11336 #define ER_XPLUGIN_FAILED_TO_CLOSE_SQL_SESSION 11337 #define ER_XPLUGIN_FAILED_TO_EXECUTE_ADMIN_CMD 11338 #define ER_XPLUGIN_EMPTY_ADMIN_CMD 11339 #define ER_XPLUGIN_FAILED_TO_GET_SYS_VAR 11340 #define ER_XPLUGIN_FAILED_TO_GET_CREATION_STMT 11341 #define ER_XPLUGIN_FAILED_TO_GET_ENGINE_INFO 11342 //#define OBSOLETE_ER_XPLUGIN_FAIL_TO_GET_RESULT_DATA 11343 //#define OBSOLETE_ER_XPLUGIN_CAPABILITY_EXPIRED_PASSWORD 11344 #define ER_XPLUGIN_FAILED_TO_SET_SO_REUSEADDR_FLAG 11345 #define ER_XPLUGIN_FAILED_TO_OPEN_INTERNAL_SESSION 11346 #define ER_XPLUGIN_FAILED_TO_SWITCH_CONTEXT 11347 #define ER_XPLUGIN_FAILED_TO_UNREGISTER_UDF 11348 //#define OBSOLETE_ER_XPLUGIN_GET_PEER_ADDRESS_FAILED 11349 //#define OBSOLETE_ER_XPLUGIN_CAPABILITY_CLIENT_INTERACTIVE_FAILED 11350 #define ER_XPLUGIN_FAILED_TO_RESET_IPV6_V6ONLY_FLAG 11351 #define ER_KEYRING_INVALID_KEY_TYPE 11352 #define ER_KEYRING_INVALID_KEY_LENGTH 11353 #define ER_KEYRING_FAILED_TO_CREATE_KEYRING_DIR 11354 #define ER_KEYRING_FILE_INIT_FAILED 11355 #define ER_KEYRING_INTERNAL_EXCEPTION_FAILED_FILE_INIT 11356 #define ER_KEYRING_FAILED_TO_GENERATE_KEY 11357 #define ER_KEYRING_CHECK_KEY_FAILED_DUE_TO_INVALID_KEY 11358 #define ER_KEYRING_CHECK_KEY_FAILED_DUE_TO_EMPTY_KEY_ID 11359 #define ER_KEYRING_OPERATION_FAILED_DUE_TO_INTERNAL_ERROR 11360 #define ER_KEYRING_INCORRECT_FILE 11361 #define ER_KEYRING_FOUND_MALFORMED_BACKUP_FILE 11362 #define ER_KEYRING_FAILED_TO_RESTORE_FROM_BACKUP_FILE 11363 #define ER_KEYRING_FAILED_TO_FLUSH_KEYRING_TO_FILE 11364 #define ER_KEYRING_FAILED_TO_GET_FILE_STAT 11365 #define ER_KEYRING_FAILED_TO_REMOVE_FILE 11366 #define ER_KEYRING_FAILED_TO_TRUNCATE_FILE 11367 #define ER_KEYRING_UNKNOWN_ERROR 11368 #define ER_KEYRING_FAILED_TO_SET_KEYRING_FILE_DATA 11369 #define ER_KEYRING_FILE_IO_ERROR 11370 #define ER_KEYRING_FAILED_TO_LOAD_KEYRING_CONTENT 11371 #define ER_KEYRING_FAILED_TO_FLUSH_KEYS_TO_KEYRING 11372 #define ER_KEYRING_FAILED_TO_FLUSH_KEYS_TO_KEYRING_BACKUP 11373 #define ER_KEYRING_KEY_FETCH_FAILED_DUE_TO_EMPTY_KEY_ID 11374 #define ER_KEYRING_FAILED_TO_REMOVE_KEY_DUE_TO_EMPTY_ID 11375 #define ER_KEYRING_OKV_INCORRECT_KEY_VAULT_CONFIGURED 11376 #define ER_KEYRING_OKV_INIT_FAILED_DUE_TO_INCORRECT_CONF 11377 #define ER_KEYRING_OKV_INIT_FAILED_DUE_TO_INTERNAL_ERROR 11378 #define ER_KEYRING_OKV_INVALID_KEY_TYPE 11379 #define ER_KEYRING_OKV_INVALID_KEY_LENGTH_FOR_CIPHER 11380 #define ER_KEYRING_OKV_FAILED_TO_GENERATE_KEY_DUE_TO_INTERNAL_ERROR 11381 #define ER_KEYRING_OKV_FAILED_TO_FIND_SERVER_ENTRY 11382 #define ER_KEYRING_OKV_FAILED_TO_FIND_STANDBY_SERVER_ENTRY 11383 #define ER_KEYRING_OKV_FAILED_TO_PARSE_CONF_FILE 11384 #define ER_KEYRING_OKV_FAILED_TO_LOAD_KEY_UID 11385 #define ER_KEYRING_OKV_FAILED_TO_INIT_SSL_LAYER 11386 #define ER_KEYRING_OKV_FAILED_TO_INIT_CLIENT 11387 #define ER_KEYRING_OKV_CONNECTION_TO_SERVER_FAILED 11388 #define ER_KEYRING_OKV_FAILED_TO_REMOVE_KEY 11389 #define ER_KEYRING_OKV_FAILED_TO_ADD_ATTRIBUTE 11390 #define ER_KEYRING_OKV_FAILED_TO_GENERATE_KEY 11391 #define ER_KEYRING_OKV_FAILED_TO_STORE_KEY 11392 #define ER_KEYRING_OKV_FAILED_TO_ACTIVATE_KEYS 11393 #define ER_KEYRING_OKV_FAILED_TO_FETCH_KEY 11394 #define ER_KEYRING_OKV_FAILED_TO_STORE_OR_GENERATE_KEY 11395 #define ER_KEYRING_OKV_FAILED_TO_RETRIEVE_KEY_SIGNATURE 11396 #define ER_KEYRING_OKV_FAILED_TO_RETRIEVE_KEY 11397 #define ER_KEYRING_OKV_FAILED_TO_LOAD_SSL_TRUST_STORE 11398 #define ER_KEYRING_OKV_FAILED_TO_SET_CERTIFICATE_FILE 11399 #define ER_KEYRING_OKV_FAILED_TO_SET_KEY_FILE 11400 #define ER_KEYRING_OKV_KEY_MISMATCH 11401 #define ER_KEYRING_ENCRYPTED_FILE_INCORRECT_KEYRING_FILE 11402 #define ER_KEYRING_ENCRYPTED_FILE_DECRYPTION_FAILED 11403 #define ER_KEYRING_ENCRYPTED_FILE_FOUND_MALFORMED_BACKUP_FILE 11404 #define ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_RESTORE_KEYRING 11405 #define ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_FLUSH_KEYRING 11406 #define ER_KEYRING_ENCRYPTED_FILE_ENCRYPTION_FAILED 11407 #define ER_KEYRING_ENCRYPTED_FILE_INVALID_KEYRING_DIR 11408 #define ER_KEYRING_ENCRYPTED_FILE_FAILED_TO_CREATE_KEYRING_DIR 11409 #define ER_KEYRING_ENCRYPTED_FILE_PASSWORD_IS_INVALID 11410 #define ER_KEYRING_ENCRYPTED_FILE_PASSWORD_IS_TOO_LONG 11411 #define ER_KEYRING_ENCRYPTED_FILE_INIT_FAILURE 11412 #define ER_KEYRING_ENCRYPTED_FILE_INIT_FAILED_DUE_TO_INTERNAL_ERROR 11413 #define ER_KEYRING_ENCRYPTED_FILE_GEN_KEY_FAILED_DUE_TO_INTERNAL_ERROR 11414 #define ER_KEYRING_AWS_FAILED_TO_SET_CMK_ID 11415 #define ER_KEYRING_AWS_FAILED_TO_SET_REGION 11416 #define ER_KEYRING_AWS_FAILED_TO_OPEN_CONF_FILE 11417 #define ER_KEYRING_AWS_FAILED_TO_ACCESS_KEY_ID_FROM_CONF_FILE 11418 #define ER_KEYRING_AWS_FAILED_TO_ACCESS_KEY_FROM_CONF_FILE 11419 #define ER_KEYRING_AWS_INVALID_CONF_FILE_PATH 11420 #define ER_KEYRING_AWS_INVALID_DATA_FILE_PATH 11421 #define ER_KEYRING_AWS_FAILED_TO_ACCESS_OR_CREATE_KEYRING_DIR 11422 #define ER_KEYRING_AWS_FAILED_TO_ACCESS_OR_CREATE_KEYRING_DATA_FILE 11423 #define ER_KEYRING_AWS_FAILED_TO_INIT_DUE_TO_INTERNAL_ERROR 11424 #define ER_KEYRING_AWS_FAILED_TO_ACCESS_DATA_FILE 11425 #define ER_KEYRING_AWS_CMK_ID_NOT_SET 11426 #define ER_KEYRING_AWS_FAILED_TO_GET_KMS_CREDENTIAL_FROM_CONF_FILE 11427 #define ER_KEYRING_AWS_INIT_FAILURE 11428 #define ER_KEYRING_AWS_FAILED_TO_INIT_DUE_TO_PLUGIN_INTERNAL_ERROR 11429 #define ER_KEYRING_AWS_INVALID_KEY_LENGTH_FOR_CIPHER 11430 #define ER_KEYRING_AWS_FAILED_TO_GENERATE_KEY_DUE_TO_INTERNAL_ERROR 11431 #define ER_KEYRING_AWS_INCORRECT_FILE 11432 #define ER_KEYRING_AWS_FOUND_MALFORMED_BACKUP_FILE 11433 #define ER_KEYRING_AWS_FAILED_TO_RESTORE_FROM_BACKUP_FILE 11434 #define ER_KEYRING_AWS_FAILED_TO_FLUSH_KEYRING_TO_FILE 11435 #define ER_KEYRING_AWS_INCORRECT_REGION 11436 #define ER_KEYRING_AWS_FAILED_TO_CONNECT_KMS 11437 #define ER_KEYRING_AWS_FAILED_TO_GENERATE_NEW_KEY 11438 #define ER_KEYRING_AWS_FAILED_TO_ENCRYPT_KEY 11439 #define ER_KEYRING_AWS_FAILED_TO_RE_ENCRYPT_KEY 11440 #define ER_KEYRING_AWS_FAILED_TO_DECRYPT_KEY 11441 #define ER_KEYRING_AWS_FAILED_TO_ROTATE_CMK 11442 #define ER_GRP_RPL_GTID_ALREADY_USED 11443 #define ER_GRP_RPL_APPLIER_THD_KILLED 11444 #define ER_GRP_RPL_EVENT_HANDLING_ERROR 11445 #define ER_GRP_RPL_ERROR_GTID_EXECUTION_INFO 11446 #define ER_GRP_RPL_CERTIFICATE_SIZE_ERROR 11447 #define ER_GRP_RPL_CREATE_APPLIER_CACHE_ERROR 11448 #define ER_GRP_RPL_UNBLOCK_WAITING_THD 11449 #define ER_GRP_RPL_APPLIER_PIPELINE_NOT_DISPOSED 11450 #define ER_GRP_RPL_APPLIER_THD_EXECUTION_ABORTED 11451 #define ER_GRP_RPL_APPLIER_EXECUTION_FATAL_ERROR 11452 #define ER_GRP_RPL_ERROR_STOPPING_CHANNELS 11453 #define ER_GRP_RPL_ERROR_SENDING_SINGLE_PRIMARY_MSSG 11454 #define ER_GRP_RPL_UPDATE_TRANS_SNAPSHOT_VER_ERROR 11455 #define ER_GRP_RPL_SIDNO_FETCH_ERROR 11456 #define ER_GRP_RPL_BROADCAST_COMMIT_TRANS_MSSG_FAILED 11457 #define ER_GRP_RPL_GROUP_NAME_PARSE_ERROR 11458 #define ER_GRP_RPL_ADD_GRPSID_TO_GRPGTIDSID_MAP_ERROR 11459 #define ER_GRP_RPL_UPDATE_GRPGTID_EXECUTED_ERROR 11460 #define ER_GRP_RPL_DONOR_TRANS_INFO_ERROR 11461 #define ER_GRP_RPL_SERVER_CONN_ERROR 11462 #define ER_GRP_RPL_ERROR_FETCHING_GTID_EXECUTED_SET 11463 #define ER_GRP_RPL_ADD_GTID_TO_GRPGTID_EXECUTED_ERROR 11464 #define ER_GRP_RPL_ERROR_FETCHING_GTID_SET 11465 #define ER_GRP_RPL_ADD_RETRIEVED_SET_TO_GRP_GTID_EXECUTED_ERROR 11466 #define ER_GRP_RPL_CERTIFICATION_INITIALIZATION_FAILURE 11467 #define ER_GRP_RPL_UPDATE_LAST_CONFLICT_FREE_TRANS_ERROR 11468 #define ER_GRP_RPL_UPDATE_TRANS_SNAPSHOT_REF_VER_ERROR 11469 #define ER_GRP_RPL_FETCH_TRANS_SIDNO_ERROR 11470 #define ER_GRP_RPL_ERROR_VERIFYING_SIDNO 11471 #define ER_GRP_RPL_CANT_GENERATE_GTID 11472 #define ER_GRP_RPL_INVALID_GTID_SET 11473 #define ER_GRP_RPL_UPDATE_GTID_SET_ERROR 11474 #define ER_GRP_RPL_RECEIVED_SET_MISSING_GTIDS 11475 //#define OBSOLETE_ER_GRP_RPL_SKIP_COMPUTATION_TRANS_COMMITTED 11476 #define ER_GRP_RPL_NULL_PACKET 11477 #define ER_GRP_RPL_CANT_READ_GTID 11478 #define ER_GRP_RPL_PROCESS_GTID_SET_ERROR 11479 #define ER_GRP_RPL_PROCESS_INTERSECTION_GTID_SET_ERROR 11480 #define ER_GRP_RPL_SET_STABLE_TRANS_ERROR 11481 #define ER_GRP_RPL_CANT_READ_GRP_GTID_EXTRACTED 11482 #define ER_GRP_RPL_CANT_READ_WRITE_SET_ITEM 11483 #define ER_GRP_RPL_INIT_CERTIFICATION_INFO_FAILURE 11484 #define ER_GRP_RPL_CONFLICT_DETECTION_DISABLED 11485 #define ER_GRP_RPL_MSG_DISCARDED 11486 #define ER_GRP_RPL_MISSING_GRP_RPL_APPLIER 11487 #define ER_GRP_RPL_CERTIFIER_MSSG_PROCESS_ERROR 11488 #define ER_GRP_RPL_SRV_NOT_ONLINE 11489 #define ER_GRP_RPL_SRV_ONLINE 11490 #define ER_GRP_RPL_DISABLE_SRV_READ_MODE_RESTRICTED 11491 #define ER_GRP_RPL_MEM_ONLINE 11492 #define ER_GRP_RPL_MEM_UNREACHABLE 11493 #define ER_GRP_RPL_MEM_REACHABLE 11494 #define ER_GRP_RPL_SRV_BLOCKED 11495 #define ER_GRP_RPL_SRV_BLOCKED_FOR_SECS 11496 #define ER_GRP_RPL_CHANGE_GRP_MEM_NOT_PROCESSED 11497 #define ER_GRP_RPL_MEMBER_CONTACT_RESTORED 11498 #define ER_GRP_RPL_MEMBER_REMOVED 11499 #define ER_GRP_RPL_PRIMARY_MEMBER_LEFT_GRP 11500 #define ER_GRP_RPL_MEMBER_ADDED 11501 #define ER_GRP_RPL_MEMBER_EXIT_PLUGIN_ERROR 11502 #define ER_GRP_RPL_MEMBER_CHANGE 11503 #define ER_GRP_RPL_MEMBER_LEFT_GRP 11504 #define ER_GRP_RPL_MEMBER_EXPELLED 11505 #define ER_GRP_RPL_SESSION_OPEN_FAILED 11506 #define ER_GRP_RPL_NEW_PRIMARY_ELECTED 11507 #define ER_GRP_RPL_DISABLE_READ_ONLY_FAILED 11508 #define ER_GRP_RPL_ENABLE_READ_ONLY_FAILED 11509 #define ER_GRP_RPL_SRV_PRIMARY_MEM 11510 #define ER_GRP_RPL_SRV_SECONDARY_MEM 11511 #define ER_GRP_RPL_NO_SUITABLE_PRIMARY_MEM 11512 #define ER_GRP_RPL_SUPER_READ_ONLY_ACTIVATE_ERROR 11513 #define ER_GRP_RPL_EXCEEDS_AUTO_INC_VALUE 11514 #define ER_GRP_RPL_DATA_NOT_PROVIDED_BY_MEM 11515 #define ER_GRP_RPL_MEMBER_ALREADY_EXISTS 11516 //#define OBSOLETE_ER_GRP_RPL_GRP_CHANGE_INFO_EXTRACT_ERROR 11517 #define ER_GRP_RPL_GTID_EXECUTED_EXTRACT_ERROR 11518 #define ER_GRP_RPL_GTID_SET_EXTRACT_ERROR 11519 #define ER_GRP_RPL_START_FAILED 11520 #define ER_GRP_RPL_MEMBER_VER_INCOMPATIBLE 11521 #define ER_GRP_RPL_TRANS_NOT_PRESENT_IN_GRP 11522 #define ER_GRP_RPL_TRANS_GREATER_THAN_GRP 11523 #define ER_GRP_RPL_MEMBER_VERSION_LOWER_THAN_GRP 11524 #define ER_GRP_RPL_LOCAL_GTID_SETS_PROCESS_ERROR 11525 #define ER_GRP_RPL_MEMBER_TRANS_GREATER_THAN_GRP 11526 #define ER_GRP_RPL_BLOCK_SIZE_DIFF_FROM_GRP 11527 #define ER_GRP_RPL_TRANS_WRITE_SET_EXTRACT_DIFF_FROM_GRP 11528 #define ER_GRP_RPL_MEMBER_CFG_INCOMPATIBLE_WITH_GRP_CFG 11529 #define ER_GRP_RPL_MEMBER_STOP_RPL_CHANNELS_ERROR 11530 #define ER_GRP_RPL_PURGE_APPLIER_LOGS 11531 #define ER_GRP_RPL_RESET_APPLIER_MODULE_LOGS_ERROR 11532 #define ER_GRP_RPL_APPLIER_THD_SETUP_ERROR 11533 #define ER_GRP_RPL_APPLIER_THD_START_ERROR 11534 #define ER_GRP_RPL_APPLIER_THD_STOP_ERROR 11535 #define ER_GRP_RPL_FETCH_TRANS_DATA_FAILED 11536 #define ER_GRP_RPL_REPLICA_IO_THD_PRIMARY_UNKNOWN 11537 #define ER_GRP_RPL_SALVE_IO_THD_ON_SECONDARY_MEMBER 11538 #define ER_GRP_RPL_REPLICA_SQL_THD_PRIMARY_UNKNOWN 11539 #define ER_GRP_RPL_REPLICA_SQL_THD_ON_SECONDARY_MEMBER 11540 #define ER_GRP_RPL_NEEDS_INNODB_TABLE 11541 #define ER_GRP_RPL_PRIMARY_KEY_NOT_DEFINED 11542 #define ER_GRP_RPL_FK_WITH_CASCADE_UNSUPPORTED 11543 #define ER_GRP_RPL_AUTO_INC_RESET 11544 #define ER_GRP_RPL_AUTO_INC_OFFSET_RESET 11545 #define ER_GRP_RPL_AUTO_INC_SET 11546 #define ER_GRP_RPL_AUTO_INC_OFFSET_SET 11547 #define ER_GRP_RPL_FETCH_TRANS_CONTEXT_FAILED 11548 #define ER_GRP_RPL_FETCH_FORMAT_DESC_LOG_EVENT_FAILED 11549 #define ER_GRP_RPL_FETCH_TRANS_CONTEXT_LOG_EVENT_FAILED 11550 #define ER_GRP_RPL_FETCH_SNAPSHOT_VERSION_FAILED 11551 #define ER_GRP_RPL_FETCH_GTID_LOG_EVENT_FAILED 11552 #define ER_GRP_RPL_UPDATE_SERV_CERTIFICATE_FAILED 11553 #define ER_GRP_RPL_ADD_GTID_INFO_WITH_LOCAL_GTID_FAILED 11554 #define ER_GRP_RPL_ADD_GTID_INFO_WITHOUT_LOCAL_GTID_FAILED 11555 #define ER_GRP_RPL_NOTIFY_CERTIFICATION_OUTCOME_FAILED 11556 #define ER_GRP_RPL_ADD_GTID_INFO_WITH_REMOTE_GTID_FAILED 11557 #define ER_GRP_RPL_ADD_GTID_INFO_WITHOUT_REMOTE_GTID_FAILED 11558 #define ER_GRP_RPL_FETCH_VIEW_CHANGE_LOG_EVENT_FAILED 11559 //#define OBSOLETE_ER_GRP_RPL_CONTACT_WITH_SRV_FAILED 11560 //#define OBSOLETE_ER_GRP_RPL_SRV_WAIT_TIME_OUT 11561 #define ER_GRP_RPL_FETCH_LOG_EVENT_FAILED 11562 #define ER_GRP_RPL_START_GRP_RPL_FAILED 11563 #define ER_GRP_RPL_CONN_INTERNAL_PLUGIN_FAIL 11564 #define ER_GRP_RPL_SUPER_READ_ON 11565 #define ER_GRP_RPL_SUPER_READ_OFF 11566 #define ER_GRP_RPL_KILLED_SESSION_ID 11567 #define ER_GRP_RPL_KILLED_FAILED_ID 11568 #define ER_GRP_RPL_INTERNAL_QUERY 11569 #define ER_GRP_RPL_COPY_FROM_EMPTY_STRING 11570 #define ER_GRP_RPL_QUERY_FAIL 11571 #define ER_GRP_RPL_CREATE_SESSION_UNABLE 11572 #define ER_GRP_RPL_MEMBER_NOT_FOUND 11573 #define ER_GRP_RPL_MAXIMUM_CONNECTION_RETRIES_REACHED 11574 #define ER_GRP_RPL_ALL_DONORS_LEFT_ABORT_RECOVERY 11575 #define ER_GRP_RPL_ESTABLISH_RECOVERY_WITH_DONOR 11576 #define ER_GRP_RPL_ESTABLISH_RECOVERY_WITH_ANOTHER_DONOR 11577 #define ER_GRP_RPL_NO_VALID_DONOR 11578 #define ER_GRP_RPL_CONFIG_RECOVERY 11579 #define ER_GRP_RPL_ESTABLISHING_CONN_GRP_REC_DONOR 11580 #define ER_GRP_RPL_CREATE_GRP_RPL_REC_CHANNEL 11581 #define ER_GRP_RPL_DONOR_SERVER_CONN 11582 #define ER_GRP_RPL_CHECK_STATUS_TABLE 11583 #define ER_GRP_RPL_STARTING_GRP_REC 11584 #define ER_GRP_RPL_DONOR_CONN_TERMINATION 11585 #define ER_GRP_RPL_STOPPING_GRP_REC 11586 #define ER_GRP_RPL_PURGE_REC 11587 #define ER_GRP_RPL_UNABLE_TO_KILL_CONN_REC_DONOR_APPLIER 11588 #define ER_GRP_RPL_UNABLE_TO_KILL_CONN_REC_DONOR_FAILOVER 11589 #define ER_GRP_RPL_FAILED_TO_NOTIFY_GRP_MEMBERSHIP_EVENT 11590 #define ER_GRP_RPL_FAILED_TO_BROADCAST_GRP_MEMBERSHIP_NOTIFICATION 11591 #define ER_GRP_RPL_FAILED_TO_BROADCAST_MEMBER_STATUS_NOTIFICATION 11592 #define ER_GRP_RPL_OOM_FAILED_TO_GENERATE_IDENTIFICATION_HASH 11593 #define ER_GRP_RPL_WRITE_IDENT_HASH_BASE64_ENCODING_FAILED 11594 #define ER_GRP_RPL_INVALID_BINLOG_FORMAT 11595 //#define OBSOLETE_ER_GRP_RPL_BINLOG_CHECKSUM_SET 11596 #define ER_GRP_RPL_TRANS_WRITE_SET_EXTRACTION_NOT_SET 11597 #define ER_GRP_RPL_UNSUPPORTED_TRANS_ISOLATION 11598 #define ER_GRP_RPL_CANNOT_EXECUTE_TRANS_WHILE_STOPPING 11599 #define ER_GRP_RPL_CANNOT_EXECUTE_TRANS_WHILE_RECOVERING 11600 #define ER_GRP_RPL_CANNOT_EXECUTE_TRANS_IN_ERROR_STATE 11601 #define ER_GRP_RPL_CANNOT_EXECUTE_TRANS_IN_OFFLINE_MODE 11602 #define ER_GRP_RPL_MULTIPLE_CACHE_TYPE_NOT_SUPPORTED_FOR_SESSION 11603 #define ER_GRP_RPL_FAILED_TO_REINIT_BINLOG_CACHE_FOR_READ 11604 #define ER_GRP_RPL_FAILED_TO_CREATE_TRANS_CONTEXT 11605 #define ER_GRP_RPL_FAILED_TO_EXTRACT_TRANS_WRITE_SET 11606 #define ER_GRP_RPL_FAILED_TO_GATHER_TRANS_WRITE_SET 11607 #define ER_GRP_RPL_TRANS_SIZE_EXCEEDS_LIMIT 11608 //#define OBSOLETE_ER_GRP_RPL_REINIT_OF_INTERNAL_CACHE_FOR_READ_FAILED 11609 //#define OBSOLETE_ER_GRP_RPL_APPENDING_DATA_TO_INTERNAL_CACHE_FAILED 11610 #define ER_GRP_RPL_WRITE_TO_TRANSACTION_MESSAGE_FAILED 11611 #define ER_GRP_RPL_FAILED_TO_REGISTER_TRANS_OUTCOME_NOTIFICTION 11612 #define ER_GRP_RPL_MSG_TOO_LONG_BROADCASTING_TRANS_FAILED 11613 #define ER_GRP_RPL_BROADCASTING_TRANS_TO_GRP_FAILED 11614 #define ER_GRP_RPL_ERROR_WHILE_WAITING_FOR_CONFLICT_DETECTION 11615 //#define OBSOLETE_ER_GRP_RPL_REINIT_OF_INTERNAL_CACHE_FOR_WRITE_FAILED 11616 //#define OBSOLETE_ER_GRP_RPL_FAILED_TO_CREATE_COMMIT_CACHE 11617 //#define OBSOLETE_ER_GRP_RPL_REINIT_OF_COMMIT_CACHE_FOR_WRITE_FAILED 11618 //#define OBSOLETE_ER_GRP_RPL_PREV_REC_SESSION_RUNNING 11619 #define ER_GRP_RPL_FATAL_REC_PROCESS 11620 //#define OBSOLETE_ER_GRP_RPL_WHILE_STOPPING_REP_CHANNEL 11621 #define ER_GRP_RPL_UNABLE_TO_EVALUATE_APPLIER_STATUS 11622 #define ER_GRP_RPL_ONLY_ONE_SERVER_ALIVE 11623 #define ER_GRP_RPL_CERTIFICATION_REC_PROCESS 11624 #define ER_GRP_RPL_UNABLE_TO_ENSURE_EXECUTION_REC 11625 #define ER_GRP_RPL_WHILE_SENDING_MSG_REC 11626 //#define OBSOLETE_ER_GRP_RPL_READ_UNABLE_FOR_SUPER_READ_ONLY 11627 #define ER_GRP_RPL_READ_UNABLE_FOR_READ_ONLY_SUPER_READ_ONLY 11628 #define ER_GRP_RPL_UNABLE_TO_RESET_SERVER_READ_MODE 11629 #define ER_GRP_RPL_UNABLE_TO_CERTIFY_PLUGIN_TRANS 11630 #define ER_GRP_RPL_UNBLOCK_CERTIFIED_TRANS 11631 //#define OBSOLETE_ER_GRP_RPL_SERVER_WORKING_AS_SECONDARY 11632 #define ER_GRP_RPL_FAILED_TO_START_WITH_INVALID_SERVER_ID 11633 #define ER_GRP_RPL_FORCE_MEMBERS_MUST_BE_EMPTY 11634 #define ER_GRP_RPL_PLUGIN_STRUCT_INIT_NOT_POSSIBLE_ON_SERVER_START 11635 #define ER_GRP_RPL_FAILED_TO_ENABLE_SUPER_READ_ONLY_MODE 11636 #define ER_GRP_RPL_FAILED_TO_INIT_COMMUNICATION_ENGINE 11637 #define ER_GRP_RPL_FAILED_TO_START_ON_SECONDARY_WITH_ASYNC_CHANNELS 11638 #define ER_GRP_RPL_FAILED_TO_START_COMMUNICATION_ENGINE 11639 #define ER_GRP_RPL_TIMEOUT_ON_VIEW_AFTER_JOINING_GRP 11640 #define ER_GRP_RPL_FAILED_TO_CALL_GRP_COMMUNICATION_INTERFACE 11641 #define ER_GRP_RPL_MEMBER_SERVER_UUID_IS_INCOMPATIBLE_WITH_GRP 11642 #define ER_GRP_RPL_MEMBER_CONF_INFO 11643 #define ER_GRP_RPL_FAILED_TO_CONFIRM_IF_SERVER_LEFT_GRP 11644 #define ER_GRP_RPL_SERVER_IS_ALREADY_LEAVING 11645 #define ER_GRP_RPL_SERVER_ALREADY_LEFT 11646 #define ER_GRP_RPL_WAITING_FOR_VIEW_UPDATE 11647 #define ER_GRP_RPL_TIMEOUT_RECEIVING_VIEW_CHANGE_ON_SHUTDOWN 11648 #define ER_GRP_RPL_REQUESTING_NON_MEMBER_SERVER_TO_LEAVE 11649 #define ER_GRP_RPL_IS_STOPPING 11650 #define ER_GRP_RPL_IS_STOPPED 11651 #define ER_GRP_RPL_FAILED_TO_ENABLE_READ_ONLY_MODE_ON_SHUTDOWN 11652 #define ER_GRP_RPL_RECOVERY_MODULE_TERMINATION_TIMED_OUT_ON_SHUTDOWN 11653 #define ER_GRP_RPL_APPLIER_TERMINATION_TIMED_OUT_ON_SHUTDOWN 11654 #define ER_GRP_RPL_FAILED_TO_SHUTDOWN_REGISTRY_MODULE 11655 #define ER_GRP_RPL_FAILED_TO_INIT_HANDLER 11656 #define ER_GRP_RPL_FAILED_TO_REGISTER_SERVER_STATE_OBSERVER 11657 #define ER_GRP_RPL_FAILED_TO_REGISTER_TRANS_STATE_OBSERVER 11658 #define ER_GRP_RPL_FAILED_TO_REGISTER_BINLOG_STATE_OBSERVER 11659 #define ER_GRP_RPL_FAILED_TO_START_ON_BOOT 11660 #define ER_GRP_RPL_FAILED_TO_STOP_ON_PLUGIN_UNINSTALL 11661 #define ER_GRP_RPL_FAILED_TO_UNREGISTER_SERVER_STATE_OBSERVER 11662 #define ER_GRP_RPL_FAILED_TO_UNREGISTER_TRANS_STATE_OBSERVER 11663 #define ER_GRP_RPL_FAILED_TO_UNREGISTER_BINLOG_STATE_OBSERVER 11664 #define ER_GRP_RPL_ALL_OBSERVERS_UNREGISTERED 11665 #define ER_GRP_RPL_FAILED_TO_PARSE_THE_GRP_NAME 11666 #define ER_GRP_RPL_FAILED_TO_GENERATE_SIDNO_FOR_GRP 11667 #define ER_GRP_RPL_APPLIER_NOT_STARTED_DUE_TO_RUNNING_PREV_SHUTDOWN 11668 #define ER_GRP_RPL_FAILED_TO_INIT_APPLIER_MODULE 11669 #define ER_GRP_RPL_APPLIER_INITIALIZED 11670 #define ER_GRP_RPL_COMMUNICATION_SSL_CONF_INFO 11671 #define ER_GRP_RPL_ABORTS_AS_SSL_NOT_SUPPORTED_BY_MYSQLD 11672 #define ER_GRP_RPL_SSL_DISABLED 11673 #define ER_GRP_RPL_UNABLE_TO_INIT_COMMUNICATION_ENGINE 11674 #define ER_GRP_RPL_BINLOG_DISABLED 11675 #define ER_GRP_RPL_GTID_MODE_OFF 11676 #define ER_GRP_RPL_LOG_REPLICA_UPDATES_NOT_SET 11677 #define ER_GRP_RPL_INVALID_TRANS_WRITE_SET_EXTRACTION_VALUE 11678 #define ER_GRP_RPL_APPLIER_METADATA_REPO_MUST_BE_TABLE 11679 #define ER_GRP_RPL_CONNECTION_METADATA_REPO_MUST_BE_TABLE 11680 #define ER_GRP_RPL_INCORRECT_TYPE_SET_FOR_PARALLEL_APPLIER 11681 #define ER_GRP_RPL_REPLICA_PRESERVE_COMMIT_ORDER_NOT_SET 11682 #define ER_GRP_RPL_SINGLE_PRIM_MODE_NOT_ALLOWED_WITH_UPDATE_EVERYWHERE 11683 #define ER_GRP_RPL_MODULE_TERMINATE_ERROR 11684 #define ER_GRP_RPL_GRP_NAME_OPTION_MANDATORY 11685 #define ER_GRP_RPL_GRP_NAME_IS_TOO_LONG 11686 #define ER_GRP_RPL_GRP_NAME_IS_NOT_VALID_UUID 11687 #define ER_GRP_RPL_FLOW_CTRL_MIN_QUOTA_GREATER_THAN_MAX_QUOTA 11688 #define ER_GRP_RPL_FLOW_CTRL_MIN_RECOVERY_QUOTA_GREATER_THAN_MAX_QUOTA 11689 #define ER_GRP_RPL_FLOW_CTRL_MAX_QUOTA_SMALLER_THAN_MIN_QUOTAS 11690 #define ER_GRP_RPL_INVALID_SSL_RECOVERY_STRING 11691 //#define OBSOLETE_ER_GRP_RPL_SUPPORTS_ONLY_ONE_FORCE_MEMBERS_SET 11692 //#define OBSOLETE_ER_GRP_RPL_FORCE_MEMBERS_SET_UPDATE_NOT_ALLOWED 11693 #define ER_GRP_RPL_GRP_COMMUNICATION_INIT_WITH_CONF 11694 #define ER_GRP_RPL_UNKNOWN_GRP_RPL_APPLIER_PIPELINE_REQUESTED 11695 #define ER_GRP_RPL_FAILED_TO_BOOTSTRAP_EVENT_HANDLING_INFRASTRUCTURE 11696 #define ER_GRP_RPL_APPLIER_HANDLER_NOT_INITIALIZED 11697 #define ER_GRP_RPL_APPLIER_HANDLER_IS_IN_USE 11698 #define ER_GRP_RPL_APPLIER_HANDLER_ROLE_IS_IN_USE 11699 #define ER_GRP_RPL_FAILED_TO_INIT_APPLIER_HANDLER 11700 #define ER_GRP_RPL_SQL_SERVICE_FAILED_TO_INIT_SESSION_THREAD 11701 #define ER_GRP_RPL_SQL_SERVICE_COMM_SESSION_NOT_INITIALIZED 11702 #define ER_GRP_RPL_SQL_SERVICE_SERVER_SESSION_KILLED 11703 #define ER_GRP_RPL_SQL_SERVICE_FAILED_TO_RUN_SQL_QUERY 11704 #define ER_GRP_RPL_SQL_SERVICE_SERVER_INTERNAL_FAILURE 11705 #define ER_GRP_RPL_SQL_SERVICE_RETRIES_EXCEEDED_ON_SESSION_STATE 11706 #define ER_GRP_RPL_SQL_SERVICE_FAILED_TO_FETCH_SECURITY_CTX 11707 #define ER_GRP_RPL_SQL_SERVICE_SERVER_ACCESS_DENIED_FOR_USER 11708 #define ER_GRP_RPL_SQL_SERVICE_MAX_CONN_ERROR_FROM_SERVER 11709 #define ER_GRP_RPL_SQL_SERVICE_SERVER_ERROR_ON_CONN 11710 #define ER_GRP_RPL_UNREACHABLE_MAJORITY_TIMEOUT_FOR_MEMBER 11711 #define ER_GRP_RPL_SERVER_SET_TO_READ_ONLY_DUE_TO_ERRORS 11712 #define ER_GRP_RPL_GMS_LISTENER_FAILED_TO_LOG_NOTIFICATION 11713 #define ER_GRP_RPL_GRP_COMMUNICATION_ENG_INIT_FAILED 11714 #define ER_GRP_RPL_SET_GRP_COMMUNICATION_ENG_LOGGER_FAILED 11715 #define ER_GRP_RPL_DEBUG_OPTIONS 11716 #define ER_GRP_RPL_INVALID_DEBUG_OPTIONS 11717 #define ER_GRP_RPL_EXIT_GRP_GCS_ERROR 11718 #define ER_GRP_RPL_GRP_MEMBER_OFFLINE 11719 #define ER_GRP_RPL_GCS_INTERFACE_ERROR 11720 #define ER_GRP_RPL_FORCE_MEMBER_VALUE_SET_ERROR 11721 #define ER_GRP_RPL_FORCE_MEMBER_VALUE_SET 11722 #define ER_GRP_RPL_FORCE_MEMBER_VALUE_TIME_OUT 11723 #define ER_GRP_RPL_BROADCAST_COMMIT_MSSG_TOO_BIG 11724 #define ER_GRP_RPL_SEND_STATS_ERROR 11725 #define ER_GRP_RPL_MEMBER_STATS_INFO 11726 #define ER_GRP_RPL_FLOW_CONTROL_STATS 11727 #define ER_GRP_RPL_UNABLE_TO_CONVERT_PACKET_TO_EVENT 11728 #define ER_GRP_RPL_PIPELINE_CREATE_FAILED 11729 #define ER_GRP_RPL_PIPELINE_REINIT_FAILED_WRITE 11730 #define ER_GRP_RPL_UNABLE_TO_CONVERT_EVENT_TO_PACKET 11731 #define ER_GRP_RPL_PIPELINE_FLUSH_FAIL 11732 #define ER_GRP_RPL_PIPELINE_REINIT_FAILED_READ 11733 //#define OBSOLETE_ER_GRP_RPL_STOP_REP_CHANNEL 11734 #define ER_GRP_RPL_GCS_GR_ERROR_MSG 11735 #define ER_GRP_RPL_REPLICA_IO_THREAD_UNBLOCKED 11736 #define ER_GRP_RPL_REPLICA_IO_THREAD_ERROR_OUT 11737 #define ER_GRP_RPL_REPLICA_APPLIER_THREAD_UNBLOCKED 11738 #define ER_GRP_RPL_REPLICA_APPLIER_THREAD_ERROR_OUT 11739 #define ER_LDAP_AUTH_FAILED_TO_CREATE_OR_GET_CONNECTION 11740 #define ER_LDAP_AUTH_DEINIT_FAILED 11741 #define ER_LDAP_AUTH_SKIPPING_USER_GROUP_SEARCH 11742 #define ER_LDAP_AUTH_POOL_DISABLE_MAX_SIZE_ZERO 11743 #define ER_LDAP_AUTH_FAILED_TO_CREATE_LDAP_OBJECT_CREATOR 11744 #define ER_LDAP_AUTH_FAILED_TO_CREATE_LDAP_OBJECT 11745 #define ER_LDAP_AUTH_TLS_CONF 11746 #define ER_LDAP_AUTH_TLS_CONNECTION 11747 #define ER_LDAP_AUTH_CONN_POOL_NOT_CREATED 11748 #define ER_LDAP_AUTH_CONN_POOL_INITIALIZING 11749 #define ER_LDAP_AUTH_CONN_POOL_DEINITIALIZING 11750 #define ER_LDAP_AUTH_ZERO_MAX_POOL_SIZE_UNCHANGED 11751 #define ER_LDAP_AUTH_POOL_REINITIALIZING 11752 #define ER_LDAP_AUTH_FAILED_TO_WRITE_PACKET 11753 #define ER_LDAP_AUTH_SETTING_USERNAME 11754 #define ER_LDAP_AUTH_USER_AUTH_DATA 11755 #define ER_LDAP_AUTH_INFO_FOR_USER 11756 #define ER_LDAP_AUTH_USER_GROUP_SEARCH_INFO 11757 #define ER_LDAP_AUTH_GRP_SEARCH_SPECIAL_HDL 11758 #define ER_LDAP_AUTH_GRP_IS_FULL_DN 11759 #define ER_LDAP_AUTH_USER_NOT_FOUND_IN_ANY_GRP 11760 #define ER_LDAP_AUTH_USER_FOUND_IN_MANY_GRPS 11761 #define ER_LDAP_AUTH_USER_HAS_MULTIPLE_GRP_NAMES 11762 #define ER_LDAP_AUTH_SEARCHED_USER_GRP_NAME 11763 #define ER_LDAP_AUTH_OBJECT_CREATE_TIMESTAMP 11764 #define ER_LDAP_AUTH_CERTIFICATE_NAME 11765 #define ER_LDAP_AUTH_FAILED_TO_POOL_DEINIT 11766 #define ER_LDAP_AUTH_FAILED_TO_INITIALIZE_POOL_IN_RECONSTRUCTING 11767 #define ER_LDAP_AUTH_FAILED_TO_INITIALIZE_POOL_IN_INIT_STATE 11768 #define ER_LDAP_AUTH_FAILED_TO_INITIALIZE_POOL_IN_DEINIT_STATE 11769 #define ER_LDAP_AUTH_FAILED_TO_DEINITIALIZE_POOL_IN_RECONSTRUCT_STATE 11770 #define ER_LDAP_AUTH_FAILED_TO_DEINITIALIZE_NOT_READY_POOL 11771 #define ER_LDAP_AUTH_FAILED_TO_GET_CONNECTION_AS_PLUGIN_NOT_READY 11772 #define ER_LDAP_AUTH_CONNECTION_POOL_INIT_FAILED 11773 #define ER_LDAP_AUTH_MAX_ALLOWED_CONNECTION_LIMIT_HIT 11774 #define ER_LDAP_AUTH_MAX_POOL_SIZE_SET_FAILED 11775 #define ER_LDAP_AUTH_PLUGIN_FAILED_TO_READ_PACKET 11776 #define ER_LDAP_AUTH_CREATING_LDAP_CONNECTION 11777 #define ER_LDAP_AUTH_GETTING_CONNECTION_FROM_POOL 11778 #define ER_LDAP_AUTH_RETURNING_CONNECTION_TO_POOL 11779 #define ER_LDAP_AUTH_SEARCH_USER_GROUP_ATTR_NOT_FOUND 11780 #define ER_LDAP_AUTH_LDAP_INFO_NULL 11781 #define ER_LDAP_AUTH_FREEING_CONNECTION 11782 #define ER_LDAP_AUTH_CONNECTION_PUSHED_TO_POOL 11783 #define ER_LDAP_AUTH_CONNECTION_CREATOR_ENTER 11784 #define ER_LDAP_AUTH_STARTING_TLS 11785 #define ER_LDAP_AUTH_CONNECTION_GET_LDAP_INFO_NULL 11786 #define ER_LDAP_AUTH_DELETING_CONNECTION_KEY 11787 #define ER_LDAP_AUTH_POOLED_CONNECTION_KEY 11788 #define ER_LDAP_AUTH_CREATE_CONNECTION_KEY 11789 #define ER_LDAP_AUTH_COMMUNICATION_HOST_INFO 11790 #define ER_LDAP_AUTH_METHOD_TO_CLIENT 11791 #define ER_LDAP_AUTH_SASL_REQUEST_FROM_CLIENT 11792 #define ER_LDAP_AUTH_SASL_PROCESS_SASL 11793 #define ER_LDAP_AUTH_SASL_BIND_SUCCESS_INFO 11794 #define ER_LDAP_AUTH_STARTED_FOR_USER 11795 #define ER_LDAP_AUTH_DISTINGUISHED_NAME 11796 #define ER_LDAP_AUTH_INIT_FAILED 11797 #define ER_LDAP_AUTH_OR_GROUP_RETRIEVAL_FAILED 11798 #define ER_LDAP_AUTH_USER_GROUP_SEARCH_FAILED 11799 #define ER_LDAP_AUTH_USER_BIND_FAILED 11800 #define ER_LDAP_AUTH_POOL_GET_FAILED_TO_CREATE_CONNECTION 11801 #define ER_LDAP_AUTH_FAILED_TO_CREATE_LDAP_CONNECTION 11802 #define ER_LDAP_AUTH_FAILED_TO_ESTABLISH_TLS_CONNECTION 11803 #define ER_LDAP_AUTH_FAILED_TO_SEARCH_DN 11804 #define ER_LDAP_AUTH_CONNECTION_POOL_REINIT_ENTER 11805 #define ER_SYSTEMD_NOTIFY_PATH_TOO_LONG 11806 #define ER_SYSTEMD_NOTIFY_CONNECT_FAILED 11807 #define ER_SYSTEMD_NOTIFY_WRITE_FAILED 11808 #define ER_FOUND_MISSING_GTIDS 11809 #define ER_PID_FILE_PRIV_DIRECTORY_INSECURE 11810 #define ER_CANT_CHECK_PID_PATH 11811 #define ER_VALIDATE_PWD_STATUS_VAR_REGISTRATION_FAILED 11812 #define ER_VALIDATE_PWD_STATUS_VAR_UNREGISTRATION_FAILED 11813 #define ER_VALIDATE_PWD_DICT_FILE_OPEN_FAILED 11814 #define ER_VALIDATE_PWD_COULD_BE_NULL 11815 #define ER_VALIDATE_PWD_STRING_CONV_TO_LOWERCASE_FAILED 11816 #define ER_VALIDATE_PWD_STRING_CONV_TO_BUFFER_FAILED 11817 #define ER_VALIDATE_PWD_STRING_HANDLER_MEM_ALLOCATION_FAILED 11818 #define ER_VALIDATE_PWD_STRONG_POLICY_DICT_FILE_UNSPECIFIED 11819 #define ER_VALIDATE_PWD_CONVERT_TO_BUFFER_FAILED 11820 #define ER_VALIDATE_PWD_VARIABLE_REGISTRATION_FAILED 11821 #define ER_VALIDATE_PWD_VARIABLE_UNREGISTRATION_FAILED 11822 #define ER_KEYRING_MIGRATION_EXTRA_OPTIONS 11823 //#define OBSOLETE_ER_INVALID_DEFAULT_UTF8MB4_COLLATION 11824 #define ER_IB_MSG_0 11825 #define ER_IB_MSG_1 11826 #define ER_IB_MSG_2 11827 #define ER_IB_MSG_3 11828 #define ER_IB_MSG_4 11829 #define ER_IB_MSG_5 11830 #define ER_IB_MSG_6 11831 #define ER_IB_MSG_7 11832 #define ER_IB_MSG_8 11833 #define ER_IB_MSG_9 11834 #define ER_IB_MSG_10 11835 #define ER_IB_MSG_11 11836 #define ER_IB_MSG_12 11837 #define ER_IB_MSG_13 11838 #define ER_IB_MSG_14 11839 #define ER_IB_MSG_15 11840 #define ER_IB_MSG_16 11841 #define ER_IB_MSG_17 11842 #define ER_IB_MSG_18 11843 #define ER_IB_MSG_19 11844 #define ER_IB_MSG_20 11845 #define ER_IB_MSG_21 11846 #define ER_IB_MSG_22 11847 #define ER_IB_MSG_23 11848 #define ER_IB_MSG_24 11849 #define ER_IB_MSG_25 11850 #define ER_IB_MSG_26 11851 #define ER_IB_MSG_27 11852 #define ER_IB_MSG_28 11853 #define ER_IB_MSG_29 11854 #define ER_IB_MSG_30 11855 #define ER_IB_MSG_31 11856 #define ER_IB_MSG_32 11857 #define ER_IB_MSG_33 11858 #define ER_IB_MSG_34 11859 #define ER_IB_MSG_35 11860 #define ER_IB_MSG_36 11861 #define ER_IB_MSG_37 11862 #define ER_IB_MSG_38 11863 #define ER_IB_MSG_39 11864 #define ER_IB_MSG_40 11865 #define ER_IB_MSG_41 11866 #define ER_IB_MSG_42 11867 #define ER_IB_MSG_43 11868 #define ER_IB_MSG_44 11869 #define ER_IB_MSG_45 11870 #define ER_IB_MSG_46 11871 #define ER_IB_MSG_47 11872 #define ER_IB_MSG_48 11873 #define ER_IB_MSG_49 11874 #define ER_IB_MSG_50 11875 #define ER_IB_MSG_51 11876 #define ER_IB_MSG_52 11877 #define ER_IB_MSG_53 11878 #define ER_IB_MSG_54 11879 #define ER_IB_MSG_55 11880 #define ER_IB_MSG_56 11881 #define ER_IB_MSG_57 11882 #define ER_IB_MSG_58 11883 #define ER_IB_MSG_59 11884 #define ER_IB_MSG_60 11885 #define ER_IB_MSG_61 11886 #define ER_IB_MSG_62 11887 #define ER_IB_MSG_63 11888 #define ER_IB_MSG_64 11889 #define ER_IB_MSG_65 11890 #define ER_IB_MSG_66 11891 #define ER_IB_MSG_67 11892 #define ER_IB_MSG_68 11893 #define ER_IB_MSG_69 11894 #define ER_IB_MSG_70 11895 #define ER_IB_MSG_71 11896 #define ER_IB_MSG_72 11897 #define ER_IB_MSG_73 11898 #define ER_IB_MSG_74 11899 #define ER_IB_MSG_75 11900 #define ER_IB_MSG_76 11901 #define ER_IB_MSG_77 11902 #define ER_IB_MSG_78 11903 #define ER_IB_MSG_79 11904 #define ER_IB_MSG_80 11905 #define ER_IB_MSG_81 11906 #define ER_IB_MSG_82 11907 #define ER_IB_MSG_83 11908 #define ER_IB_MSG_84 11909 #define ER_IB_MSG_85 11910 #define ER_IB_MSG_86 11911 //#define OBSOLETE_ER_IB_MSG_87 11912 //#define OBSOLETE_ER_IB_MSG_88 11913 //#define OBSOLETE_ER_IB_MSG_89 11914 //#define OBSOLETE_ER_IB_MSG_90 11915 //#define OBSOLETE_ER_IB_MSG_91 11916 //#define OBSOLETE_ER_IB_MSG_92 11917 //#define OBSOLETE_ER_IB_MSG_93 11918 //#define OBSOLETE_ER_IB_MSG_94 11919 #define ER_IB_MSG_95 11920 #define ER_IB_MSG_96 11921 #define ER_IB_MSG_97 11922 #define ER_IB_MSG_98 11923 #define ER_IB_MSG_99 11924 #define ER_IB_MSG_100 11925 #define ER_IB_MSG_101 11926 #define ER_IB_MSG_102 11927 #define ER_IB_MSG_103 11928 #define ER_IB_MSG_104 11929 #define ER_IB_MSG_105 11930 #define ER_IB_MSG_106 11931 #define ER_IB_MSG_107 11932 #define ER_IB_MSG_108 11933 #define ER_IB_MSG_109 11934 #define ER_IB_MSG_110 11935 #define ER_IB_MSG_111 11936 #define ER_IB_MSG_112 11937 //#define OBSOLETE_ER_IB_MSG_113 11938 //#define OBSOLETE_ER_IB_MSG_114 11939 //#define OBSOLETE_ER_IB_MSG_115 11940 //#define OBSOLETE_ER_IB_MSG_116 11941 //#define OBSOLETE_ER_IB_MSG_117 11942 //#define OBSOLETE_ER_IB_MSG_118 11943 #define ER_IB_MSG_119 11944 #define ER_IB_MSG_120 11945 #define ER_IB_MSG_121 11946 #define ER_IB_MSG_122 11947 #define ER_IB_MSG_123 11948 #define ER_IB_MSG_124 11949 #define ER_IB_MSG_125 11950 #define ER_IB_MSG_126 11951 #define ER_IB_MSG_127 11952 #define ER_IB_MSG_128 11953 #define ER_IB_MSG_129 11954 #define ER_IB_MSG_130 11955 #define ER_IB_MSG_131 11956 #define ER_IB_MSG_132 11957 #define ER_IB_MSG_133 11958 #define ER_IB_MSG_134 11959 #define ER_IB_MSG_135 11960 #define ER_IB_MSG_136 11961 #define ER_IB_MSG_137 11962 #define ER_IB_MSG_138 11963 #define ER_IB_MSG_139 11964 #define ER_IB_MSG_140 11965 #define ER_IB_MSG_141 11966 #define ER_IB_MSG_142 11967 #define ER_IB_MSG_143 11968 #define ER_IB_MSG_144 11969 #define ER_IB_MSG_145 11970 #define ER_IB_MSG_146 11971 #define ER_IB_MSG_147 11972 #define ER_IB_MSG_148 11973 #define ER_IB_CLONE_INTERNAL 11974 #define ER_IB_CLONE_TIMEOUT 11975 #define ER_IB_CLONE_STATUS_FILE 11976 #define ER_IB_CLONE_SQL 11977 #define ER_IB_CLONE_VALIDATE 11978 #define ER_IB_CLONE_PUNCH_HOLE 11979 #define ER_IB_CLONE_GTID_PERSIST 11980 #define ER_IB_MSG_156 11981 #define ER_IB_MSG_157 11982 #define ER_IB_MSG_158 11983 #define ER_IB_MSG_159 11984 #define ER_IB_MSG_160 11985 #define ER_IB_MSG_161 11986 #define ER_IB_MSG_162 11987 #define ER_IB_MSG_163 11988 #define ER_IB_MSG_164 11989 #define ER_IB_MSG_165 11990 #define ER_IB_MSG_166 11991 #define ER_IB_MSG_167 11992 #define ER_IB_MSG_168 11993 #define ER_IB_MSG_169 11994 #define ER_IB_MSG_170 11995 #define ER_IB_MSG_171 11996 #define ER_IB_MSG_172 11997 #define ER_IB_MSG_173 11998 #define ER_IB_MSG_174 11999 #define ER_IB_MSG_175 12000 #define ER_IB_MSG_176 12001 #define ER_IB_MSG_177 12002 #define ER_IB_MSG_178 12003 #define ER_IB_MSG_179 12004 #define ER_IB_MSG_180 12005 #define ER_IB_LONG_AHI_DISABLE_WAIT 12006 #define ER_IB_MSG_182 12007 #define ER_IB_MSG_183 12008 #define ER_IB_MSG_184 12009 #define ER_IB_MSG_185 12010 #define ER_IB_MSG_186 12011 #define ER_IB_MSG_187 12012 #define ER_IB_MSG_188 12013 #define ER_IB_MSG_189 12014 #define ER_IB_MSG_190 12015 #define ER_IB_MSG_191 12016 #define ER_IB_MSG_192 12017 #define ER_IB_MSG_193 12018 #define ER_IB_MSG_194 12019 #define ER_IB_MSG_195 12020 #define ER_IB_MSG_196 12021 #define ER_IB_MSG_197 12022 #define ER_IB_MSG_198 12023 #define ER_IB_MSG_199 12024 #define ER_IB_MSG_200 12025 #define ER_IB_MSG_201 12026 #define ER_IB_MSG_202 12027 #define ER_IB_MSG_203 12028 #define ER_IB_MSG_204 12029 #define ER_IB_MSG_205 12030 #define ER_IB_MSG_206 12031 #define ER_IB_MSG_207 12032 #define ER_IB_MSG_208 12033 #define ER_IB_MSG_209 12034 #define ER_IB_MSG_210 12035 #define ER_IB_MSG_211 12036 #define ER_IB_MSG_212 12037 #define ER_IB_MSG_213 12038 #define ER_IB_MSG_214 12039 #define ER_IB_MSG_215 12040 #define ER_IB_MSG_216 12041 #define ER_IB_MSG_217 12042 #define ER_IB_MSG_218 12043 #define ER_IB_MSG_219 12044 #define ER_IB_MSG_220 12045 #define ER_IB_MSG_221 12046 #define ER_IB_MSG_222 12047 #define ER_IB_MSG_223 12048 #define ER_IB_MSG_224 12049 #define ER_IB_MSG_225 12050 #define ER_IB_MSG_226 12051 #define ER_IB_MSG_227 12052 #define ER_IB_MSG_228 12053 #define ER_IB_MSG_229 12054 #define ER_IB_MSG_230 12055 #define ER_IB_MSG_231 12056 #define ER_IB_MSG_232 12057 #define ER_IB_MSG_233 12058 #define ER_IB_MSG_234 12059 #define ER_IB_MSG_235 12060 #define ER_IB_MSG_236 12061 #define ER_IB_MSG_237 12062 #define ER_IB_MSG_238 12063 #define ER_IB_MSG_239 12064 #define ER_IB_MSG_240 12065 #define ER_IB_MSG_241 12066 #define ER_IB_MSG_242 12067 #define ER_IB_MSG_243 12068 #define ER_IB_MSG_244 12069 #define ER_IB_MSG_245 12070 #define ER_IB_MSG_246 12071 #define ER_IB_MSG_247 12072 #define ER_IB_MSG_248 12073 #define ER_IB_MSG_249 12074 #define ER_IB_MSG_250 12075 #define ER_IB_MSG_251 12076 #define ER_IB_MSG_252 12077 #define ER_IB_MSG_253 12078 #define ER_IB_MSG_254 12079 #define ER_IB_MSG_255 12080 #define ER_IB_MSG_256 12081 #define ER_IB_MSG_257 12082 #define ER_IB_MSG_258 12083 #define ER_IB_MSG_259 12084 #define ER_IB_MSG_260 12085 #define ER_IB_MSG_261 12086 #define ER_IB_MSG_262 12087 #define ER_IB_MSG_263 12088 #define ER_IB_MSG_264 12089 #define ER_IB_MSG_265 12090 #define ER_IB_MSG_266 12091 #define ER_IB_MSG_267 12092 #define ER_IB_MSG_268 12093 #define ER_IB_MSG_269 12094 #define ER_IB_MSG_270 12095 #define ER_IB_MSG_271 12096 #define ER_IB_MSG_272 12097 #define ER_IB_MSG_273 12098 //#define OBSOLETE_ER_IB_MSG_274 12099 //#define OBSOLETE_ER_IB_MSG_275 12100 //#define OBSOLETE_ER_IB_MSG_276 12101 //#define OBSOLETE_ER_IB_MSG_277 12102 #define ER_IB_MSG_278 12103 //#define OBSOLETE_ER_IB_MSG_279 12104 #define ER_IB_MSG_280 12105 #define ER_IB_MSG_281 12106 #define ER_IB_MSG_282 12107 #define ER_IB_MSG_283 12108 #define ER_IB_MSG_284 12109 #define ER_IB_MSG_285 12110 #define ER_IB_WARN_ACCESSING_NONEXISTINC_SPACE 12111 #define ER_IB_MSG_287 12112 #define ER_IB_MSG_288 12113 #define ER_IB_MSG_289 12114 //#define OBSOLETE_ER_IB_MSG_290 12115 #define ER_IB_MSG_291 12116 #define ER_IB_MSG_292 12117 #define ER_IB_MSG_293 12118 #define ER_IB_MSG_294 12119 #define ER_IB_MSG_295 12120 #define ER_IB_MSG_296 12121 #define ER_IB_MSG_297 12122 #define ER_IB_MSG_298 12123 #define ER_IB_MSG_299 12124 #define ER_IB_MSG_300 12125 #define ER_IB_MSG_301 12126 #define ER_IB_MSG_UNEXPECTED_FILE_EXISTS 12127 #define ER_IB_MSG_303 12128 #define ER_IB_MSG_304 12129 #define ER_IB_MSG_305 12130 #define ER_IB_MSG_306 12131 #define ER_IB_MSG_307 12132 #define ER_IB_MSG_308 12133 #define ER_IB_MSG_309 12134 #define ER_IB_MSG_310 12135 #define ER_IB_MSG_311 12136 #define ER_IB_MSG_312 12137 #define ER_IB_MSG_313 12138 #define ER_IB_MSG_314 12139 #define ER_IB_MSG_315 12140 #define ER_IB_MSG_316 12141 #define ER_IB_MSG_317 12142 #define ER_IB_MSG_318 12143 #define ER_IB_MSG_319 12144 #define ER_IB_MSG_320 12145 #define ER_IB_MSG_321 12146 #define ER_IB_MSG_322 12147 #define ER_IB_MSG_323 12148 #define ER_IB_MSG_324 12149 #define ER_IB_MSG_325 12150 #define ER_IB_MSG_326 12151 //#define OBSOLETE_ER_IB_MSG_327 12152 #define ER_IB_MSG_328 12153 #define ER_IB_MSG_329 12154 #define ER_IB_MSG_330 12155 #define ER_IB_MSG_331 12156 #define ER_IB_MSG_332 12157 #define ER_IB_MSG_333 12158 #define ER_IB_MSG_334 12159 #define ER_IB_MSG_335 12160 #define ER_IB_MSG_336 12161 #define ER_IB_MSG_337 12162 #define ER_IB_MSG_338 12163 #define ER_IB_MSG_339 12164 #define ER_IB_MSG_340 12165 #define ER_IB_MSG_341 12166 #define ER_IB_MSG_342 12167 #define ER_IB_MSG_343 12168 #define ER_IB_MSG_344 12169 #define ER_IB_MSG_345 12170 #define ER_IB_MSG_346 12171 #define ER_IB_MSG_347 12172 #define ER_IB_MSG_348 12173 #define ER_IB_MSG_349 12174 #define ER_IB_MSG_350 12175 //#define OBSOLETE_ER_IB_MSG_351 12176 #define ER_IB_MSG_UNPROTECTED_LOCATION_ALLOWED 12177 //#define OBSOLETE_ER_IB_MSG_353 12178 #define ER_IB_MSG_354 12179 #define ER_IB_MSG_355 12180 #define ER_IB_MSG_356 12181 #define ER_IB_MSG_357 12182 #define ER_IB_MSG_358 12183 #define ER_IB_MSG_359 12184 #define ER_IB_MSG_360 12185 #define ER_IB_MSG_361 12186 #define ER_IB_MSG_362 12187 //#define OBSOLETE_ER_IB_MSG_363 12188 #define ER_IB_MSG_364 12189 #define ER_IB_MSG_365 12190 #define ER_IB_MSG_IGNORE_SCAN_PATH 12191 #define ER_IB_MSG_367 12192 #define ER_IB_MSG_368 12193 #define ER_IB_MSG_369 12194 #define ER_IB_MSG_370 12195 #define ER_IB_MSG_371 12196 #define ER_IB_MSG_372 12197 #define ER_IB_MSG_373 12198 #define ER_IB_MSG_374 12199 #define ER_IB_MSG_375 12200 #define ER_IB_MSG_376 12201 #define ER_IB_MSG_377 12202 #define ER_IB_MSG_378 12203 #define ER_IB_MSG_379 12204 #define ER_IB_MSG_380 12205 #define ER_IB_MSG_381 12206 #define ER_IB_MSG_382 12207 #define ER_IB_MSG_383 12208 #define ER_IB_MSG_384 12209 #define ER_IB_MSG_385 12210 #define ER_IB_MSG_386 12211 #define ER_IB_MSG_387 12212 #define ER_IB_MSG_GENERAL_TABLESPACE_UNDER_DATADIR 12213 #define ER_IB_MSG_IMPLICIT_TABLESPACE_IN_DATADIR 12214 #define ER_IB_MSG_390 12215 #define ER_IB_MSG_391 12216 #define ER_IB_MSG_392 12217 #define ER_IB_MSG_393 12218 #define ER_IB_MSG_394 12219 #define ER_IB_MSG_395 12220 #define ER_IB_MSG_396 12221 #define ER_IB_MSG_397 12222 #define ER_IB_MSG_398 12223 #define ER_IB_MSG_399 12224 //#define OBSOLETE_ER_IB_MSG_400 12225 #define ER_IB_MSG_401 12226 #define ER_IB_MSG_402 12227 #define ER_IB_MSG_403 12228 #define ER_IB_MSG_404 12229 #define ER_IB_MSG_405 12230 #define ER_IB_MSG_406 12231 #define ER_IB_MSG_407 12232 #define ER_IB_MSG_408 12233 #define ER_IB_MSG_409 12234 #define ER_IB_MSG_410 12235 #define ER_IB_MSG_411 12236 #define ER_IB_MSG_412 12237 #define ER_IB_MSG_413 12238 #define ER_IB_MSG_414 12239 #define ER_IB_MSG_415 12240 #define ER_IB_MSG_416 12241 #define ER_IB_MSG_417 12242 #define ER_IB_MSG_418 12243 #define ER_IB_MSG_419 12244 #define ER_IB_MSG_420 12245 #define ER_IB_MSG_421 12246 #define ER_IB_MSG_422 12247 #define ER_IB_MSG_423 12248 #define ER_IB_MSG_424 12249 #define ER_IB_MSG_425 12250 #define ER_IB_MSG_426 12251 #define ER_IB_MSG_427 12252 #define ER_IB_MSG_428 12253 #define ER_IB_MSG_429 12254 #define ER_IB_MSG_430 12255 #define ER_IB_MSG_431 12256 #define ER_IB_MSG_432 12257 #define ER_IB_MSG_433 12258 #define ER_IB_MSG_434 12259 #define ER_IB_MSG_435 12260 #define ER_IB_MSG_436 12261 #define ER_IB_MSG_437 12262 #define ER_IB_MSG_438 12263 #define ER_IB_MSG_439 12264 #define ER_IB_MSG_440 12265 #define ER_IB_MSG_441 12266 #define ER_IB_MSG_442 12267 #define ER_IB_MSG_443 12268 //#define OBSOLETE_ER_IB_MSG_444 12269 #define ER_IB_MSG_445 12270 #define ER_IB_MSG_446 12271 #define ER_IB_MSG_447 12272 #define ER_IB_MSG_448 12273 #define ER_IB_MSG_449 12274 #define ER_IB_MSG_450 12275 #define ER_IB_MSG_451 12276 #define ER_IB_MSG_452 12277 #define ER_IB_MSG_453 12278 #define ER_IB_MSG_454 12279 #define ER_IB_MSG_455 12280 #define ER_IB_MSG_456 12281 #define ER_IB_MSG_457 12282 #define ER_IB_MSG_458 12283 #define ER_IB_MSG_459 12284 #define ER_IB_MSG_460 12285 #define ER_IB_MSG_461 12286 #define ER_IB_MSG_462 12287 #define ER_IB_MSG_463 12288 #define ER_IB_MSG_464 12289 #define ER_IB_MSG_465 12290 #define ER_IB_MSG_466 12291 #define ER_IB_MSG_467 12292 #define ER_IB_MSG_468 12293 #define ER_IB_MSG_469 12294 #define ER_IB_MSG_470 12295 #define ER_IB_MSG_471 12296 #define ER_IB_MSG_472 12297 #define ER_IB_MSG_473 12298 #define ER_IB_MSG_474 12299 #define ER_IB_MSG_475 12300 #define ER_IB_MSG_476 12301 #define ER_IB_MSG_477 12302 #define ER_IB_MSG_478 12303 #define ER_IB_MSG_479 12304 #define ER_IB_MSG_480 12305 #define ER_IB_MSG_481 12306 #define ER_IB_MSG_482 12307 #define ER_IB_MSG_483 12308 #define ER_IB_MSG_484 12309 #define ER_IB_MSG_485 12310 #define ER_IB_MSG_486 12311 #define ER_IB_MSG_487 12312 #define ER_IB_MSG_488 12313 #define ER_IB_MSG_489 12314 #define ER_IB_MSG_490 12315 #define ER_IB_MSG_491 12316 #define ER_IB_MSG_492 12317 #define ER_IB_MSG_493 12318 #define ER_IB_MSG_494 12319 #define ER_IB_MSG_495 12320 #define ER_IB_MSG_496 12321 #define ER_IB_MSG_497 12322 #define ER_IB_MSG_498 12323 #define ER_IB_MSG_499 12324 #define ER_IB_MSG_500 12325 #define ER_IB_MSG_501 12326 #define ER_IB_MSG_502 12327 #define ER_IB_MSG_503 12328 #define ER_IB_MSG_504 12329 #define ER_IB_MSG_505 12330 #define ER_IB_MSG_506 12331 #define ER_IB_MSG_507 12332 #define ER_IB_MSG_508 12333 #define ER_IB_MSG_509 12334 #define ER_IB_MSG_510 12335 #define ER_IB_MSG_511 12336 #define ER_IB_MSG_512 12337 #define ER_IB_MSG_513 12338 #define ER_IB_MSG_514 12339 #define ER_IB_MSG_515 12340 #define ER_IB_MSG_516 12341 #define ER_IB_MSG_517 12342 #define ER_IB_MSG_518 12343 #define ER_IB_MSG_519 12344 #define ER_IB_MSG_520 12345 #define ER_IB_MSG_521 12346 #define ER_IB_MSG_522 12347 #define ER_IB_MSG_523 12348 #define ER_IB_MSG_524 12349 #define ER_IB_MSG_525 12350 #define ER_IB_MSG_526 12351 #define ER_IB_MSG_527 12352 //#define OBSOLETE_ER_IB_MSG_528 12353 //#define OBSOLETE_ER_IB_MSG_529 12354 #define ER_IB_MSG_530 12355 #define ER_IB_MSG_531 12356 #define ER_IB_MSG_532 12357 #define ER_IB_MSG_533 12358 #define ER_IB_MSG_534 12359 //#define OBSOLETE_ER_IB_MSG_535 12360 //#define OBSOLETE_ER_IB_MSG_536 12361 #define ER_IB_MSG_537 12362 #define ER_IB_MSG_538 12363 #define ER_IB_MSG_539 12364 #define ER_IB_MSG_540 12365 #define ER_IB_MSG_541 12366 #define ER_IB_MSG_542 12367 #define ER_IB_MSG_543 12368 #define ER_IB_MSG_544 12369 #define ER_IB_MSG_545 12370 #define ER_IB_MSG_546 12371 #define ER_IB_MSG_547 12372 #define ER_IB_MSG_548 12373 #define ER_IB_MSG_549 12374 #define ER_IB_MSG_550 12375 #define ER_IB_MSG_551 12376 #define ER_IB_MSG_552 12377 #define ER_IB_MSG_553 12378 #define ER_IB_MSG_554 12379 #define ER_IB_MSG_555 12380 #define ER_IB_MSG_556 12381 #define ER_IB_MSG_557 12382 #define ER_IB_MSG_558 12383 #define ER_IB_MSG_559 12384 #define ER_IB_MSG_560 12385 #define ER_IB_MSG_561 12386 #define ER_IB_MSG_562 12387 #define ER_IB_MSG_563 12388 #define ER_IB_MSG_564 12389 #define ER_IB_MSG_INVALID_LOCATION_FOR_TABLE 12390 #define ER_IB_MSG_566 12391 #define ER_IB_MSG_567 12392 #define ER_IB_MSG_568 12393 #define ER_IB_MSG_569 12394 #define ER_IB_MSG_570 12395 #define ER_IB_MSG_571 12396 //#define OBSOLETE_ER_IB_MSG_572 12397 #define ER_IB_MSG_573 12398 #define ER_IB_MSG_574 12399 //#define OBSOLETE_ER_IB_MSG_575 12400 //#define OBSOLETE_ER_IB_MSG_576 12401 //#define OBSOLETE_ER_IB_MSG_577 12402 #define ER_IB_MSG_578 12403 #define ER_IB_MSG_579 12404 #define ER_IB_MSG_580 12405 #define ER_IB_MSG_581 12406 #define ER_IB_MSG_582 12407 #define ER_IB_MSG_583 12408 #define ER_IB_MSG_584 12409 #define ER_IB_MSG_585 12410 #define ER_IB_MSG_586 12411 #define ER_IB_MSG_587 12412 #define ER_IB_MSG_588 12413 #define ER_IB_MSG_589 12414 #define ER_IB_MSG_590 12415 #define ER_IB_MSG_591 12416 #define ER_IB_MSG_592 12417 #define ER_IB_MSG_593 12418 #define ER_IB_MSG_594 12419 #define ER_IB_MSG_595 12420 #define ER_IB_MSG_596 12421 #define ER_IB_MSG_597 12422 #define ER_IB_MSG_598 12423 #define ER_IB_MSG_599 12424 #define ER_IB_MSG_600 12425 #define ER_IB_MSG_601 12426 #define ER_IB_MSG_602 12427 #define ER_IB_MSG_603 12428 #define ER_IB_MSG_604 12429 #define ER_IB_MSG_605 12430 #define ER_IB_MSG_606 12431 #define ER_IB_MSG_607 12432 #define ER_IB_MSG_608 12433 #define ER_IB_MSG_609 12434 #define ER_IB_MSG_610 12435 #define ER_IB_MSG_611 12436 #define ER_IB_MSG_612 12437 #define ER_IB_MSG_613 12438 #define ER_IB_MSG_614 12439 #define ER_IB_MSG_615 12440 #define ER_IB_MSG_616 12441 #define ER_IB_MSG_617 12442 #define ER_IB_MSG_618 12443 #define ER_IB_MSG_619 12444 #define ER_IB_MSG_620 12445 #define ER_IB_MSG_621 12446 #define ER_IB_MSG_622 12447 #define ER_IB_MSG_623 12448 #define ER_IB_MSG_624 12449 #define ER_IB_MSG_625 12450 #define ER_IB_MSG_626 12451 #define ER_IB_MSG_627 12452 #define ER_IB_MSG_628 12453 #define ER_IB_MSG_629 12454 #define ER_IB_MSG_630 12455 #define ER_IB_MSG_631 12456 #define ER_IB_MSG_632 12457 #define ER_IB_MSG_633 12458 #define ER_IB_MSG_634 12459 #define ER_IB_MSG_635 12460 #define ER_IB_MSG_636 12461 #define ER_IB_MSG_637 12462 #define ER_IB_MSG_638 12463 #define ER_IB_MSG_639 12464 //#define OBSOLETE_ER_IB_MSG_640 12465 //#define OBSOLETE_ER_IB_MSG_641 12466 #define ER_IB_MSG_642 12467 #define ER_IB_MSG_643 12468 #define ER_IB_MSG_644 12469 #define ER_IB_MSG_645 12470 #define ER_IB_MSG_646 12471 #define ER_IB_MSG_647 12472 #define ER_IB_MSG_648 12473 #define ER_IB_MSG_649 12474 #define ER_IB_MSG_650 12475 #define ER_IB_MSG_651 12476 #define ER_IB_MSG_652 12477 #define ER_IB_MSG_DDL_LOG_DELETE_BY_ID_OK 12478 #define ER_IB_MSG_654 12479 #define ER_IB_MSG_655 12480 #define ER_IB_MSG_656 12481 #define ER_IB_MSG_657 12482 #define ER_IB_MSG_658 12483 #define ER_IB_MSG_659 12484 #define ER_IB_MSG_660 12485 #define ER_IB_MSG_661 12486 #define ER_IB_MSG_662 12487 #define ER_IB_MSG_663 12488 //#define OBSOLETE_ER_IB_MSG_664 12489 //#define OBSOLETE_ER_IB_MSG_665 12490 //#define OBSOLETE_ER_IB_MSG_666 12491 //#define OBSOLETE_ER_IB_MSG_667 12492 //#define OBSOLETE_ER_IB_MSG_668 12493 //#define OBSOLETE_ER_IB_MSG_669 12494 //#define OBSOLETE_ER_IB_MSG_670 12495 //#define OBSOLETE_ER_IB_MSG_671 12496 //#define OBSOLETE_ER_IB_MSG_672 12497 //#define OBSOLETE_ER_IB_MSG_673 12498 //#define OBSOLETE_ER_IB_MSG_674 12499 //#define OBSOLETE_ER_IB_MSG_675 12500 //#define OBSOLETE_ER_IB_MSG_676 12501 //#define OBSOLETE_ER_IB_MSG_677 12502 //#define OBSOLETE_ER_IB_MSG_678 12503 //#define OBSOLETE_ER_IB_MSG_679 12504 //#define OBSOLETE_ER_IB_MSG_680 12505 //#define OBSOLETE_ER_IB_MSG_681 12506 //#define OBSOLETE_ER_IB_MSG_682 12507 //#define OBSOLETE_ER_IB_MSG_683 12508 //#define OBSOLETE_ER_IB_MSG_684 12509 //#define OBSOLETE_ER_IB_MSG_685 12510 //#define OBSOLETE_ER_IB_MSG_686 12511 //#define OBSOLETE_ER_IB_MSG_687 12512 //#define OBSOLETE_ER_IB_MSG_688 12513 //#define OBSOLETE_ER_IB_MSG_689 12514 //#define OBSOLETE_ER_IB_MSG_690 12515 //#define OBSOLETE_ER_IB_MSG_691 12516 //#define OBSOLETE_ER_IB_MSG_692 12517 //#define OBSOLETE_ER_IB_MSG_693 12518 #define ER_IB_MSG_694 12519 #define ER_IB_MSG_695 12520 #define ER_IB_MSG_696 12521 #define ER_IB_MSG_697 12522 #define ER_IB_MSG_LOG_CORRUPT 12523 #define ER_IB_MSG_699 12524 #define ER_IB_MSG_LOG_FORMAT_OLD_AND_LOG_CORRUPTED 12525 #define ER_IB_MSG_LOG_FORMAT_OLD_AND_NO_CLEAN_SHUTDOWN 12526 //#define OBSOLETE_ER_IB_MSG_702 12527 //#define OBSOLETE_ER_IB_MSG_703 12528 #define ER_IB_MSG_LOG_FORMAT_BEFORE_8_0_30 12529 #define ER_IB_MSG_LOG_FILE_FORMAT_UNKNOWN 12530 #define ER_IB_MSG_RECOVERY_CHECKPOINT_NOT_FOUND 12531 #define ER_IB_MSG_707 12532 #define ER_IB_MSG_708 12533 #define ER_IB_MSG_709 12534 #define ER_IB_MSG_710 12535 #define ER_IB_MSG_711 12536 #define ER_IB_MSG_712 12537 #define ER_IB_MSG_713 12538 #define ER_IB_MSG_714 12539 #define ER_IB_MSG_715 12540 #define ER_IB_MSG_716 12541 #define ER_IB_MSG_717 12542 #define ER_IB_MSG_718 12543 #define ER_IB_MSG_719 12544 #define ER_IB_MSG_720 12545 #define ER_IB_MSG_RECOVERY_SKIPPED_IN_READ_ONLY_MODE 12546 #define ER_IB_MSG_722 12547 #define ER_IB_MSG_723 12548 #define ER_IB_MSG_724 12549 #define ER_IB_MSG_725 12550 #define ER_IB_MSG_726 12551 #define ER_IB_MSG_727 12552 #define ER_IB_MSG_728 12553 #define ER_IB_MSG_LOG_FILES_CREATED_BY_MEB_AND_READ_ONLY_MODE 12554 #define ER_IB_MSG_LOG_FILES_CREATED_BY_MEB 12555 #define ER_IB_MSG_LOG_FILES_CREATED_BY_CLONE 12556 #define ER_IB_MSG_LOG_FORMAT_OLD 12557 //#define OBSOLETE_ER_IB_MSG_LOG_FORMAT_NOT_SUPPORTED 12558 #define ER_IB_MSG_RECOVERY_CHECKPOINT_FROM_BEFORE_CLEAN_SHUTDOWN 12559 #define ER_IB_MSG_RECOVERY_IS_NEEDED 12560 #define ER_IB_MSG_RECOVERY_IN_READ_ONLY 12561 #define ER_IB_MSG_737 12562 #define ER_IB_MSG_738 12563 #define ER_IB_MSG_739 12564 #define ER_IB_MSG_740 12565 #define ER_IB_MSG_741 12566 #define ER_IB_MSG_742 12567 #define ER_IB_MSG_743 12568 #define ER_IB_MSG_744 12569 #define ER_IB_MSG_745 12570 #define ER_IB_MSG_746 12571 #define ER_IB_MSG_747 12572 #define ER_IB_MSG_748 12573 #define ER_IB_MSG_749 12574 #define ER_IB_MSG_750 12575 #define ER_IB_MSG_751 12576 #define ER_IB_MSG_752 12577 #define ER_IB_MSG_753 12578 #define ER_IB_MSG_754 12579 #define ER_IB_MSG_755 12580 #define ER_IB_MSG_756 12581 #define ER_IB_MSG_757 12582 #define ER_IB_MSG_758 12583 #define ER_IB_MSG_759 12584 #define ER_IB_MSG_760 12585 #define ER_IB_MSG_761 12586 #define ER_IB_MSG_762 12587 #define ER_IB_MSG_763 12588 #define ER_IB_MSG_764 12589 #define ER_IB_MSG_765 12590 #define ER_IB_MSG_766 12591 #define ER_IB_MSG_767 12592 #define ER_IB_MSG_768 12593 #define ER_IB_MSG_769 12594 #define ER_IB_MSG_770 12595 #define ER_IB_MSG_771 12596 #define ER_IB_MSG_772 12597 #define ER_IB_MSG_773 12598 #define ER_IB_MSG_774 12599 #define ER_IB_MSG_775 12600 #define ER_IB_MSG_776 12601 #define ER_IB_MSG_777 12602 #define ER_IB_MSG_778 12603 #define ER_IB_MSG_779 12604 #define ER_IB_MSG_780 12605 #define ER_IB_MSG_781 12606 #define ER_IB_MSG_782 12607 #define ER_IB_MSG_783 12608 #define ER_IB_MSG_784 12609 #define ER_IB_MSG_785 12610 #define ER_IB_MSG_786 12611 #define ER_IB_MSG_787 12612 #define ER_IB_MSG_788 12613 #define ER_IB_MSG_789 12614 #define ER_IB_MSG_790 12615 #define ER_IB_MSG_791 12616 #define ER_IB_MSG_792 12617 #define ER_IB_MSG_793 12618 #define ER_IB_MSG_794 12619 #define ER_IB_MSG_795 12620 #define ER_IB_MSG_796 12621 #define ER_IB_MSG_797 12622 #define ER_IB_MSG_798 12623 #define ER_IB_MSG_799 12624 //#define OBSOLETE_ER_IB_MSG_800 12625 #define ER_IB_MSG_801 12626 #define ER_IB_MSG_802 12627 #define ER_IB_MSG_803 12628 #define ER_IB_MSG_804 12629 #define ER_IB_MSG_805 12630 #define ER_IB_MSG_806 12631 #define ER_IB_MSG_807 12632 #define ER_IB_MSG_808 12633 #define ER_IB_MSG_809 12634 #define ER_IB_MSG_810 12635 #define ER_IB_MSG_811 12636 #define ER_IB_MSG_812 12637 #define ER_IB_MSG_813 12638 #define ER_IB_MSG_814 12639 #define ER_IB_MSG_815 12640 #define ER_IB_MSG_816 12641 #define ER_IB_MSG_817 12642 #define ER_IB_MSG_818 12643 #define ER_IB_MSG_819 12644 #define ER_IB_MSG_820 12645 #define ER_IB_MSG_821 12646 #define ER_IB_MSG_822 12647 #define ER_IB_MSG_823 12648 #define ER_IB_MSG_824 12649 #define ER_IB_MSG_825 12650 #define ER_IB_MSG_826 12651 #define ER_IB_MSG_827 12652 #define ER_IB_MSG_828 12653 #define ER_IB_MSG_829 12654 #define ER_IB_MSG_830 12655 #define ER_IB_MSG_831 12656 #define ER_IB_MSG_832 12657 #define ER_IB_MSG_833 12658 #define ER_IB_MSG_834 12659 #define ER_IB_MSG_835 12660 #define ER_IB_MSG_836 12661 #define ER_IB_MSG_837 12662 #define ER_IB_MSG_838 12663 #define ER_IB_MSG_839 12664 #define ER_IB_MSG_840 12665 #define ER_IB_MSG_841 12666 #define ER_IB_MSG_842 12667 #define ER_IB_MSG_CANT_ENCRYPT_REDO_LOG_DATA 12668 #define ER_IB_MSG_844 12669 #define ER_IB_MSG_845 12670 #define ER_IB_MSG_CANT_DECRYPT_REDO_LOG 12671 #define ER_IB_MSG_847 12672 #define ER_IB_MSG_848 12673 #define ER_IB_MSG_849 12674 #define ER_IB_MSG_850 12675 #define ER_IB_MSG_851 12676 #define ER_IB_MSG_852 12677 #define ER_IB_MSG_853 12678 #define ER_IB_MSG_854 12679 #define ER_IB_MSG_855 12680 #define ER_IB_MSG_856 12681 #define ER_IB_MSG_857 12682 #define ER_IB_MSG_858 12683 #define ER_IB_MSG_859 12684 #define ER_IB_MSG_860 12685 #define ER_IB_MSG_861 12686 #define ER_IB_MSG_862 12687 #define ER_IB_MSG_863 12688 #define ER_IB_MSG_864 12689 #define ER_IB_MSG_865 12690 #define ER_IB_MSG_866 12691 #define ER_IB_MSG_867 12692 #define ER_IB_MSG_868 12693 #define ER_IB_MSG_869 12694 #define ER_IB_MSG_870 12695 #define ER_IB_MSG_871 12696 #define ER_IB_MSG_872 12697 #define ER_IB_MSG_873 12698 #define ER_IB_MSG_874 12699 #define ER_IB_MSG_875 12700 #define ER_IB_MSG_876 12701 #define ER_IB_MSG_877 12702 #define ER_IB_MSG_878 12703 #define ER_IB_MSG_879 12704 #define ER_IB_MSG_880 12705 #define ER_IB_MSG_881 12706 #define ER_IB_MSG_882 12707 #define ER_IB_MSG_883 12708 #define ER_IB_MSG_884 12709 #define ER_IB_MSG_885 12710 #define ER_IB_MSG_886 12711 #define ER_IB_MSG_887 12712 #define ER_IB_MSG_888 12713 #define ER_IB_MSG_889 12714 #define ER_IB_MSG_890 12715 #define ER_IB_MSG_891 12716 #define ER_IB_MSG_892 12717 #define ER_IB_MSG_893 12718 #define ER_IB_MSG_894 12719 #define ER_IB_MSG_895 12720 #define ER_IB_MSG_896 12721 #define ER_IB_MSG_897 12722 #define ER_IB_MSG_898 12723 #define ER_IB_MSG_899 12724 #define ER_IB_MSG_900 12725 #define ER_IB_MSG_901 12726 #define ER_IB_MSG_902 12727 #define ER_IB_MSG_903 12728 #define ER_IB_MSG_904 12729 #define ER_IB_MSG_905 12730 #define ER_IB_MSG_906 12731 #define ER_IB_MSG_907 12732 #define ER_IB_MSG_908 12733 #define ER_IB_MSG_909 12734 #define ER_IB_MSG_910 12735 #define ER_IB_MSG_911 12736 #define ER_IB_MSG_912 12737 #define ER_IB_MSG_913 12738 #define ER_IB_MSG_914 12739 #define ER_IB_MSG_915 12740 #define ER_IB_MSG_916 12741 #define ER_IB_MSG_917 12742 #define ER_IB_MSG_918 12743 #define ER_IB_MSG_919 12744 #define ER_IB_MSG_920 12745 #define ER_IB_MSG_921 12746 #define ER_IB_MSG_922 12747 #define ER_IB_MSG_923 12748 #define ER_IB_MSG_924 12749 #define ER_IB_MSG_925 12750 #define ER_IB_MSG_926 12751 #define ER_IB_MSG_927 12752 #define ER_IB_MSG_928 12753 #define ER_IB_MSG_929 12754 #define ER_IB_MSG_930 12755 #define ER_IB_MSG_931 12756 #define ER_IB_MSG_932 12757 #define ER_IB_MSG_933 12758 #define ER_IB_MSG_934 12759 #define ER_IB_MSG_935 12760 #define ER_IB_MSG_936 12761 #define ER_IB_MSG_937 12762 #define ER_IB_MSG_938 12763 #define ER_IB_MSG_939 12764 #define ER_IB_MSG_940 12765 #define ER_IB_MSG_941 12766 #define ER_IB_MSG_942 12767 #define ER_IB_MSG_943 12768 #define ER_IB_MSG_944 12769 #define ER_IB_MSG_945 12770 #define ER_IB_MSG_946 12771 #define ER_IB_MSG_947 12772 #define ER_IB_MSG_948 12773 #define ER_IB_MSG_949 12774 #define ER_IB_MSG_950 12775 #define ER_IB_MSG_951 12776 #define ER_IB_MSG_952 12777 #define ER_IB_MSG_953 12778 #define ER_IB_MSG_954 12779 #define ER_IB_MSG_955 12780 #define ER_IB_MSG_956 12781 #define ER_IB_MSG_957 12782 #define ER_IB_MSG_958 12783 #define ER_IB_MSG_959 12784 #define ER_IB_MSG_960 12785 #define ER_IB_MSG_961 12786 #define ER_IB_MSG_962 12787 #define ER_IB_MSG_963 12788 #define ER_IB_MSG_964 12789 #define ER_IB_MSG_965 12790 #define ER_IB_MSG_966 12791 #define ER_IB_MSG_967 12792 #define ER_IB_MSG_968 12793 #define ER_IB_MSG_969 12794 #define ER_IB_MSG_970 12795 #define ER_IB_MSG_971 12796 #define ER_IB_MSG_972 12797 #define ER_IB_MSG_973 12798 #define ER_IB_MSG_974 12799 #define ER_IB_MSG_975 12800 #define ER_IB_MSG_976 12801 #define ER_IB_MSG_977 12802 #define ER_IB_MSG_978 12803 #define ER_IB_MSG_979 12804 #define ER_IB_MSG_980 12805 #define ER_IB_MSG_981 12806 #define ER_IB_MSG_982 12807 #define ER_IB_MSG_983 12808 #define ER_IB_MSG_984 12809 #define ER_IB_MSG_985 12810 #define ER_IB_MSG_986 12811 #define ER_IB_MSG_987 12812 #define ER_IB_MSG_988 12813 #define ER_IB_MSG_989 12814 #define ER_IB_MSG_990 12815 #define ER_IB_MSG_991 12816 #define ER_IB_MSG_992 12817 #define ER_IB_MSG_993 12818 #define ER_IB_MSG_994 12819 #define ER_IB_MSG_995 12820 #define ER_IB_MSG_996 12821 #define ER_IB_MSG_997 12822 #define ER_IB_MSG_998 12823 #define ER_IB_MSG_999 12824 #define ER_IB_MSG_1000 12825 #define ER_IB_MSG_1001 12826 #define ER_IB_MSG_1002 12827 #define ER_IB_MSG_1003 12828 #define ER_IB_MSG_1004 12829 #define ER_IB_MSG_1005 12830 #define ER_IB_MSG_1006 12831 #define ER_IB_MSG_1007 12832 #define ER_IB_MSG_1008 12833 #define ER_IB_MSG_1009 12834 #define ER_IB_MSG_1010 12835 #define ER_IB_MSG_1011 12836 #define ER_IB_MSG_1012 12837 #define ER_IB_MSG_1013 12838 #define ER_IB_MSG_1014 12839 #define ER_IB_MSG_1015 12840 #define ER_IB_MSG_1016 12841 #define ER_IB_MSG_1017 12842 #define ER_IB_MSG_1018 12843 #define ER_IB_MSG_1019 12844 #define ER_IB_MSG_1020 12845 #define ER_IB_MSG_1021 12846 #define ER_IB_MSG_1022 12847 #define ER_IB_MSG_1023 12848 #define ER_IB_MSG_1024 12849 #define ER_IB_MSG_1025 12850 #define ER_IB_MSG_1026 12851 #define ER_IB_MSG_1027 12852 #define ER_IB_MSG_1028 12853 #define ER_IB_MSG_1029 12854 #define ER_IB_MSG_1030 12855 #define ER_IB_MSG_1031 12856 #define ER_IB_MSG_1032 12857 #define ER_IB_MSG_1033 12858 #define ER_IB_MSG_1034 12859 #define ER_IB_MSG_1035 12860 #define ER_IB_MSG_1036 12861 #define ER_IB_MSG_1037 12862 #define ER_IB_MSG_1038 12863 #define ER_IB_MSG_1039 12864 #define ER_IB_MSG_1040 12865 #define ER_IB_MSG_1041 12866 #define ER_IB_MSG_1042 12867 #define ER_IB_MSG_1043 12868 #define ER_IB_MSG_1044 12869 #define ER_IB_MSG_1045 12870 #define ER_IB_MSG_1046 12871 #define ER_IB_MSG_1047 12872 #define ER_IB_MSG_1048 12873 #define ER_IB_MSG_1049 12874 //#define OBSOLETE_ER_IB_MSG_1050 12875 #define ER_IB_MSG_1051 12876 #define ER_IB_MSG_1052 12877 #define ER_IB_MSG_1053 12878 #define ER_IB_MSG_1054 12879 #define ER_IB_MSG_1055 12880 #define ER_IB_MSG_1056 12881 #define ER_IB_MSG_1057 12882 #define ER_IB_MSG_1058 12883 #define ER_IB_MSG_1059 12884 #define ER_IB_MSG_1060 12885 #define ER_IB_MSG_LOG_FILE_OS_CREATE_FAILED 12886 #define ER_IB_MSG_FILE_RESIZE 12887 #define ER_IB_MSG_LOG_FILE_RESIZE_FAILED 12888 #define ER_IB_MSG_LOG_FILES_CREATE_AND_READ_ONLY_MODE 12889 #define ER_IB_MSG_1065 12890 #define ER_IB_MSG_LOG_FILE_PREPARE_ON_CREATE_FAILED 12891 //#define OBSOLETE_ER_IB_MSG_1067 12892 #define ER_IB_MSG_LOG_FILES_INITIALIZED 12893 #define ER_IB_MSG_LOG_FILE_OPEN_FAILED 12894 #define ER_IB_MSG_1070 12895 #define ER_IB_MSG_1071 12896 #define ER_IB_MSG_1072 12897 #define ER_IB_MSG_1073 12898 #define ER_IB_MSG_1074 12899 #define ER_IB_MSG_1075 12900 #define ER_IB_MSG_1076 12901 #define ER_IB_MSG_1077 12902 #define ER_IB_MSG_1078 12903 #define ER_IB_MSG_1079 12904 #define ER_IB_MSG_1080 12905 #define ER_IB_MSG_1081 12906 #define ER_IB_MSG_1082 12907 #define ER_IB_MSG_1083 12908 #define ER_IB_MSG_CANNOT_OPEN_57_UNDO 12909 #define ER_IB_MSG_1085 12910 #define ER_IB_MSG_1086 12911 #define ER_IB_MSG_1087 12912 #define ER_IB_MSG_1088 12913 #define ER_IB_MSG_1089 12914 #define ER_IB_MSG_1090 12915 #define ER_IB_MSG_1091 12916 #define ER_IB_MSG_1092 12917 #define ER_IB_MSG_1093 12918 #define ER_IB_MSG_1094 12919 #define ER_IB_MSG_1095 12920 #define ER_IB_MSG_1096 12921 #define ER_IB_MSG_1097 12922 #define ER_IB_MSG_1098 12923 #define ER_IB_MSG_1099 12924 #define ER_IB_MSG_1100 12925 #define ER_IB_MSG_1101 12926 #define ER_IB_MSG_1102 12927 #define ER_IB_MSG_1103 12928 #define ER_IB_MSG_1104 12929 #define ER_IB_MSG_1105 12930 #define ER_IB_MSG_BUF_PENDING_IO 12931 #define ER_IB_MSG_1107 12932 #define ER_IB_MSG_1108 12933 #define ER_IB_MSG_1109 12934 #define ER_IB_MSG_1110 12935 #define ER_IB_MSG_1111 12936 #define ER_IB_MSG_1112 12937 #define ER_IB_MSG_1113 12938 #define ER_IB_MSG_1114 12939 #define ER_IB_MSG_1115 12940 #define ER_IB_MSG_1116 12941 #define ER_IB_MSG_1117 12942 //#define OBSOLETE_ER_IB_MSG_1118 12943 #define ER_IB_MSG_1119 12944 #define ER_IB_MSG_1120 12945 #define ER_IB_MSG_1121 12946 #define ER_IB_MSG_1122 12947 #define ER_IB_MSG_1123 12948 #define ER_IB_MSG_1124 12949 #define ER_IB_MSG_1125 12950 #define ER_IB_MSG_1126 12951 #define ER_IB_MSG_1127 12952 #define ER_IB_MSG_1128 12953 #define ER_IB_MSG_1129 12954 #define ER_IB_MSG_1130 12955 #define ER_IB_MSG_1131 12956 #define ER_IB_MSG_1132 12957 #define ER_IB_MSG_1133 12958 #define ER_IB_MSG_1134 12959 #define ER_IB_MSG_DATA_DIRECTORY_NOT_INITIALIZED_OR_CORRUPTED 12960 #define ER_IB_MSG_LOG_FILES_INVALID_SET 12961 #define ER_IB_MSG_LOG_FILE_SIZE_INVALID 12962 #define ER_IB_MSG_LOG_FILES_DIFFERENT_SIZES 12963 #define ER_IB_MSG_1139 12964 #define ER_IB_MSG_RECOVERY_CORRUPT 12965 //#define OBSOLETE_ER_IB_MSG_LOG_FILES_RESIZE_ON_START_IN_READ_ONLY_MODE 12966 #define ER_IB_MSG_1142 12967 #define ER_IB_MSG_LOG_FILES_REWRITING 12968 #define ER_IB_MSG_1144 12969 #define ER_IB_MSG_1145 12970 #define ER_IB_MSG_1146 12971 #define ER_IB_MSG_1147 12972 #define ER_IB_MSG_1148 12973 #define ER_IB_MSG_1149 12974 #define ER_IB_MSG_1150 12975 #define ER_IB_MSG_1151 12976 #define ER_IB_MSG_1152 12977 //#define OBSOLETE_ER_IB_MSG_1153 12978 #define ER_IB_MSG_1154 12979 #define ER_IB_MSG_1155 12980 #define ER_IB_MSG_1156 12981 #define ER_IB_MSG_1157 12982 #define ER_IB_MSG_1158 12983 #define ER_IB_MSG_1159 12984 #define ER_IB_MSG_1160 12985 #define ER_IB_MSG_1161 12986 #define ER_IB_MSG_1162 12987 #define ER_IB_MSG_1163 12988 #define ER_IB_MSG_1164 12989 #define ER_IB_MSG_1165 12990 #define ER_IB_MSG_UNDO_TRUNCATE_FAIL_TO_READ_LOG_FILE 12991 #define ER_IB_MSG_UNDO_MARKED_FOR_TRUNCATE 12992 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_MDL 12993 #define ER_IB_MSG_UNDO_TRUNCATE_START 12994 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_DDL_LOG_START 12995 #define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_LOG_CREATE 12996 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_TRUNCATE 12997 #define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_FAILURE 12998 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_STATE_UPDATE 12999 #define ER_IB_MSG_UNDO_TRUNCATE_COMPLETE 13000 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_TRUNCATE_DONE 13001 #define ER_IB_MSG_1177 13002 #define ER_IB_MSG_1178 13003 #define ER_IB_MSG_1179 13004 #define ER_IB_MSG_1180 13005 #define ER_IB_MSG_1181 13006 #define ER_IB_MSG_1182 13007 #define ER_IB_MSG_1183 13008 #define ER_IB_MSG_1184 13009 #define ER_IB_MSG_1185 13010 #define ER_IB_MSG_1186 13011 #define ER_IB_MSG_1187 13012 #define ER_IB_MSG_1188 13013 #define ER_IB_MSG_1189 13014 #define ER_IB_MSG_TRX_RECOVERY_ROLLBACK_COMPLETED 13015 #define ER_IB_MSG_1191 13016 #define ER_IB_MSG_1192 13017 #define ER_IB_MSG_1193 13018 #define ER_IB_MSG_1194 13019 #define ER_IB_MSG_1195 13020 #define ER_IB_MSG_1196 13021 #define ER_IB_MSG_1197 13022 #define ER_IB_MSG_1198 13023 #define ER_IB_MSG_1199 13024 #define ER_IB_MSG_1200 13025 #define ER_IB_MSG_1201 13026 #define ER_IB_MSG_1202 13027 #define ER_IB_MSG_1203 13028 #define ER_IB_MSG_1204 13029 #define ER_IB_MSG_1205 13030 #define ER_IB_MSG_1206 13031 #define ER_IB_MSG_1207 13032 #define ER_IB_MSG_1208 13033 #define ER_IB_MSG_1209 13034 #define ER_IB_MSG_1210 13035 #define ER_IB_MSG_1211 13036 #define ER_IB_MSG_1212 13037 #define ER_IB_MSG_1213 13038 #define ER_IB_MSG_1214 13039 #define ER_IB_MSG_1215 13040 #define ER_IB_MSG_LOG_FILES_RESIZE_ON_START 13041 #define ER_IB_MSG_1217 13042 #define ER_IB_MSG_1218 13043 #define ER_IB_MSG_1219 13044 #define ER_IB_MSG_1220 13045 #define ER_IB_MSG_1221 13046 #define ER_IB_MSG_1222 13047 #define ER_IB_MSG_1223 13048 #define ER_IB_MSG_1224 13049 #define ER_IB_MSG_1225 13050 #define ER_IB_MSG_1226 13051 #define ER_IB_MSG_1227 13052 #define ER_IB_MSG_1228 13053 #define ER_IB_MSG_1229 13054 //#define OBSOLETE_ER_IB_MSG_1230 13055 #define ER_IB_MSG_1231 13056 //#define OBSOLETE_ER_IB_MSG_1232 13057 #define ER_IB_MSG_1233 13058 #define ER_IB_MSG_LOG_WRITER_OUT_OF_SPACE 13059 #define ER_IB_MSG_1235 13060 #define ER_IB_MSG_LOG_WRITER_ABORTS_LOG_ARCHIVER 13061 #define ER_IB_MSG_LOG_WRITER_WAITING_FOR_ARCHIVER 13062 #define ER_IB_MSG_1238 13063 #define ER_IB_MSG_1239 13064 //#define OBSOLETE_ER_IB_MSG_1240 13065 #define ER_IB_MSG_1241 13066 #define ER_IB_MSG_LOG_FILES_CANNOT_ENCRYPT_IN_READ_ONLY 13067 #define ER_IB_MSG_LOG_FILES_ENCRYPTION_INIT_FAILED 13068 //#define OBSOLETE_ER_IB_MSG_1244 13069 #define ER_IB_MSG_1245 13070 #define ER_IB_MSG_1246 13071 #define ER_IB_MSG_1247 13072 #define ER_IB_MSG_1248 13073 #define ER_IB_MSG_1249 13074 #define ER_IB_MSG_1250 13075 #define ER_IB_MSG_1251 13076 #define ER_IB_MSG_BUF_PENDING_IO_ON_SHUTDOWN 13077 #define ER_IB_MSG_1253 13078 //#define OBSOLETE_ER_IB_MSG_1254 13079 #define ER_IB_MSG_1255 13080 #define ER_IB_MSG_1256 13081 #define ER_IB_MSG_1257 13082 #define ER_IB_MSG_1258 13083 #define ER_IB_MSG_1259 13084 #define ER_IB_MSG_1260 13085 #define ER_IB_MSG_1261 13086 #define ER_IB_MSG_1262 13087 #define ER_IB_MSG_1263 13088 #define ER_IB_MSG_LOG_FILE_HEADER_INVALID_CHECKSUM 13089 #define ER_IB_MSG_LOG_FORMAT_BEFORE_5_7_9 13090 #define ER_IB_MSG_1266 13091 #define ER_IB_MSG_LOG_PARAMS_CONCURRENCY_MARGIN_UNSAFE 13092 #define ER_IB_MSG_1268 13093 #define ER_IB_MSG_1269 13094 #define ER_IB_MSG_THREAD_CONCURRENCY_CHANGED 13095 #define ER_RPL_REPLICA_SQL_THREAD_STOP_CMD_EXEC_TIMEOUT 13096 #define ER_RPL_REPLICA_IO_THREAD_STOP_CMD_EXEC_TIMEOUT 13097 #define ER_RPL_GTID_UNSAFE_STMT_ON_NON_TRANS_TABLE 13098 #define ER_RPL_GTID_UNSAFE_STMT_CREATE_SELECT 13099 //#define OBSOLETE_ER_RPL_GTID_UNSAFE_STMT_ON_TEMPORARY_TABLE 13100 #define ER_BINLOG_ROW_VALUE_OPTION_IGNORED 13101 #define ER_BINLOG_USE_V1_ROW_EVENTS_IGNORED 13102 #define ER_BINLOG_ROW_VALUE_OPTION_USED_ONLY_FOR_AFTER_IMAGES 13103 #define ER_CONNECTION_ABORTED 13104 #define ER_NORMAL_SERVER_SHUTDOWN 13105 #define ER_KEYRING_MIGRATE_FAILED 13106 #define ER_GRP_RPL_LOWER_CASE_TABLE_NAMES_DIFF_FROM_GRP 13107 #define ER_OOM_SAVE_GTIDS 13108 #define ER_LCTN_NOT_FOUND 13109 //#define OBSOLETE_ER_REGEXP_INVALID_CAPTURE_GROUP_NAME 13110 #define ER_COMPONENT_FILTER_WRONG_VALUE 13111 #define ER_XPLUGIN_FAILED_TO_STOP_SERVICES 13112 #define ER_INCONSISTENT_ERROR 13113 #define ER_SERVER_SOURCE_FATAL_ERROR_READING_BINLOG 13114 #define ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE 13115 #define ER_REPLICA_CREATE_EVENT_FAILURE 13116 #define ER_REPLICA_FATAL_ERROR 13117 #define ER_REPLICA_HEARTBEAT_FAILURE 13118 #define ER_REPLICA_INCIDENT 13119 #define ER_REPLICA_SOURCE_COM_FAILURE 13120 #define ER_REPLICA_RELAY_LOG_READ_FAILURE 13121 #define ER_REPLICA_RELAY_LOG_WRITE_FAILURE 13122 #define ER_SERVER_REPLICA_CM_INIT_REPOSITORY 13123 #define ER_SERVER_REPLICA_AM_INIT_REPOSITORY 13124 #define ER_SERVER_NET_PACKET_TOO_LARGE 13125 #define ER_SERVER_NO_SYSTEM_TABLE_ACCESS 13126 //#define OBSOLETE_ER_SERVER_UNKNOWN_ERROR 13127 #define ER_SERVER_UNKNOWN_SYSTEM_VARIABLE 13128 #define ER_SERVER_NO_SESSION_TO_SEND_TO 13129 #define ER_SERVER_NEW_ABORTING_CONNECTION 13130 #define ER_SERVER_OUT_OF_SORTMEMORY 13131 #define ER_SERVER_RECORD_FILE_FULL 13132 #define ER_SERVER_DISK_FULL_NOWAIT 13133 #define ER_SERVER_HANDLER_ERROR 13134 #define ER_SERVER_NOT_FORM_FILE 13135 #define ER_SERVER_CANT_OPEN_FILE 13136 #define ER_SERVER_FILE_NOT_FOUND 13137 #define ER_SERVER_FILE_USED 13138 #define ER_SERVER_CANNOT_LOAD_FROM_TABLE_V2 13139 #define ER_ERROR_INFO_FROM_DA 13140 #define ER_SERVER_TABLE_CHECK_FAILED 13141 #define ER_SERVER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE_V2 13142 #define ER_SERVER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2 13143 #define ER_SERVER_ACL_TABLE_ERROR 13144 #define ER_SERVER_REPLICA_INIT_QUERY_FAILED 13145 #define ER_SERVER_REPLICA_CONVERSION_FAILED 13146 #define ER_SERVER_REPLICA_IGNORED_TABLE 13147 #define ER_CANT_REPLICATE_ANONYMOUS_WITH_AUTO_POSITION 13148 #define ER_CANT_REPLICATE_ANONYMOUS_WITH_GTID_MODE_ON 13149 #define ER_CANT_REPLICATE_GTID_WITH_GTID_MODE_OFF 13150 #define ER_SERVER_TEST_MESSAGE 13151 #define ER_AUDIT_LOG_JSON_FILTER_PARSING_ERROR 13152 #define ER_AUDIT_LOG_JSON_FILTERING_NOT_ENABLED 13153 #define ER_PLUGIN_FAILED_TO_OPEN_TABLES 13154 #define ER_PLUGIN_FAILED_TO_OPEN_TABLE 13155 #define ER_AUDIT_LOG_JSON_FILTER_NAME_CANNOT_BE_EMPTY 13156 #define ER_AUDIT_LOG_USER_NAME_INVALID_CHARACTER 13157 #define ER_AUDIT_LOG_UDF_INSUFFICIENT_PRIVILEGE 13158 #define ER_AUDIT_LOG_NO_KEYRING_PLUGIN_INSTALLED 13159 #define ER_AUDIT_LOG_HOST_NAME_INVALID_CHARACTER 13160 #define ER_AUDIT_LOG_ENCRYPTION_PASSWORD_HAS_NOT_BEEN_SET 13161 #define ER_AUDIT_LOG_COULD_NOT_CREATE_AES_KEY 13162 #define ER_AUDIT_LOG_ENCRYPTION_PASSWORD_CANNOT_BE_FETCHED 13163 #define ER_COULD_NOT_REINITIALIZE_AUDIT_LOG_FILTERS 13164 #define ER_AUDIT_LOG_JSON_USER_NAME_CANNOT_BE_EMPTY 13165 #define ER_AUDIT_LOG_USER_FIRST_CHARACTER_MUST_BE_ALPHANUMERIC 13166 #define ER_AUDIT_LOG_JSON_FILTER_DOES_NOT_EXIST 13167 #define ER_IB_MSG_1271 13168 #define ER_STARTING_INIT 13169 #define ER_ENDING_INIT 13170 #define ER_IB_MSG_1272 13171 #define ER_SERVER_SHUTDOWN_INFO 13172 #define ER_GRP_RPL_PLUGIN_ABORT 13173 //#define OBSOLETE_ER_REGEXP_INVALID_FLAG 13174 //#define OBSOLETE_ER_XA_REPLICATION_FILTERS 13175 //#define OBSOLETE_ER_UPDATE_GTID_PURGED_WITH_GR 13176 #define ER_AUDIT_LOG_TABLE_DEFINITION_NOT_UPDATED 13177 #define ER_DD_INITIALIZE_SQL_ERROR 13178 #define ER_NO_PATH_FOR_SHARED_LIBRARY 13179 #define ER_UDF_ALREADY_EXISTS 13180 #define ER_SET_EVENT_FAILED 13181 #define ER_FAILED_TO_ALLOCATE_SSL_BIO 13182 #define ER_IB_MSG_1273 13183 #define ER_PID_FILEPATH_LOCATIONS_INACCESSIBLE 13184 #define ER_UNKNOWN_VARIABLE_IN_PERSISTED_CONFIG_FILE 13185 #define ER_FAILED_TO_HANDLE_DEFAULTS_FILE 13186 #define ER_DUPLICATE_SYS_VAR 13187 #define ER_FAILED_TO_INIT_SYS_VAR 13188 #define ER_SYS_VAR_NOT_FOUND 13189 #define ER_IB_MSG_1274 13190 #define ER_IB_MSG_1275 13191 //#define OBSOLETE_ER_TARGET_TS_UNENCRYPTED 13192 #define ER_IB_MSG_WAIT_FOR_ENCRYPT_THREAD 13193 #define ER_IB_MSG_1277 13194 #define ER_IB_MSG_NO_ENCRYPT_PROGRESS_FOUND 13195 #define ER_IB_MSG_RESUME_OP_FOR_SPACE 13196 #define ER_IB_MSG_1280 13197 #define ER_IB_MSG_1281 13198 #define ER_IB_MSG_1282 13199 #define ER_IB_MSG_1283 13200 #define ER_IB_MSG_1284 13201 #define ER_CANT_SET_ERROR_SUPPRESSION_LIST_FROM_COMMAND_LINE 13202 #define ER_INVALID_VALUE_OF_BIND_ADDRESSES 13203 #define ER_RELAY_LOG_SPACE_LIMIT_DISABLED 13204 #define ER_GRP_RPL_ERROR_GTID_SET_EXTRACTION 13205 #define ER_GRP_RPL_MISSING_GRP_RPL_ACTION_COORDINATOR 13206 #define ER_GRP_RPL_JOIN_WHEN_GROUP_ACTION_RUNNING 13207 #define ER_GRP_RPL_JOINER_EXIT_WHEN_GROUP_ACTION_RUNNING 13208 #define ER_GRP_RPL_CHANNEL_THREAD_WHEN_GROUP_ACTION_RUNNING 13209 #define ER_GRP_RPL_APPOINTED_PRIMARY_NOT_PRESENT 13210 #define ER_GRP_RPL_ERROR_ON_MESSAGE_SENDING 13211 #define ER_GRP_RPL_CONFIGURATION_ACTION_ERROR 13212 #define ER_GRP_RPL_CONFIGURATION_ACTION_LOCAL_TERMINATION 13213 #define ER_GRP_RPL_CONFIGURATION_ACTION_START 13214 #define ER_GRP_RPL_CONFIGURATION_ACTION_END 13215 #define ER_GRP_RPL_CONFIGURATION_ACTION_KILLED_ERROR 13216 #define ER_GRP_RPL_PRIMARY_ELECTION_PROCESS_ERROR 13217 #define ER_GRP_RPL_PRIMARY_ELECTION_STOP_ERROR 13218 #define ER_GRP_RPL_NO_STAGE_SERVICE 13219 #define ER_GRP_RPL_UDF_REGISTER_ERROR 13220 #define ER_GRP_RPL_UDF_UNREGISTER_ERROR 13221 #define ER_GRP_RPL_UDF_REGISTER_SERVICE_ERROR 13222 #define ER_GRP_RPL_SERVER_UDF_ERROR 13223 //#define OBSOLETE_ER_CURRENT_PASSWORD_NOT_REQUIRED 13224 //#define OBSOLETE_ER_INCORRECT_CURRENT_PASSWORD 13225 //#define OBSOLETE_ER_MISSING_CURRENT_PASSWORD 13226 #define ER_SERVER_WRONG_VALUE_FOR_VAR 13227 #define ER_COULD_NOT_CREATE_WINDOWS_REGISTRY_KEY 13228 #define ER_SERVER_GTID_UNSAFE_CREATE_DROP_TEMP_TABLE_IN_TRX_IN_SBR 13229 //#define OBSOLETE_ER_SECONDARY_ENGINE 13230 //#define OBSOLETE_ER_SECONDARY_ENGINE_DDL 13231 //#define OBSOLETE_ER_NO_SESSION_TEMP 13232 #define ER_XPLUGIN_FAILED_TO_SWITCH_SECURITY_CTX 13233 #define ER_RPL_GTID_UNSAFE_ALTER_ADD_COL_WITH_DEFAULT_EXPRESSION 13234 #define ER_UPGRADE_PARSE_ERROR 13235 #define ER_DATA_DIRECTORY_UNUSABLE 13236 #define ER_LDAP_AUTH_USER_GROUP_SEARCH_ROOT_BIND 13237 #define ER_PLUGIN_INSTALL_ERROR 13238 #define ER_PLUGIN_UNINSTALL_ERROR 13239 #define ER_SHARED_TABLESPACE_USED_BY_PARTITIONED_TABLE 13240 #define ER_UNKNOWN_TABLESPACE_TYPE 13241 #define ER_WARN_DEPRECATED_UTF8_ALIAS_OPTION 13242 #define ER_WARN_DEPRECATED_UTF8MB3_CHARSET_OPTION 13243 #define ER_WARN_DEPRECATED_UTF8MB3_COLLATION_OPTION 13244 #define ER_SSL_MEMORY_INSTRUMENTATION_INIT_FAILED 13245 #define ER_IB_MSG_MADV_DONTDUMP_UNSUPPORTED 13246 #define ER_IB_MSG_MADVISE_FAILED 13247 //#define OBSOLETE_ER_COLUMN_CHANGE_SIZE 13248 #define ER_WARN_REMOVED_SQL_MODE 13249 #define ER_IB_MSG_FAILED_TO_ALLOCATE_WAIT 13250 //#define OBSOLETE_ER_IB_MSG_NUM_POOLS 13251 #define ER_IB_MSG_USING_UNDO_SPACE 13252 #define ER_IB_MSG_FAIL_TO_SAVE_SPACE_STATE 13253 #define ER_IB_MSG_MAX_UNDO_SPACES_REACHED 13254 #define ER_IB_MSG_ERROR_OPENING_NEW_UNDO_SPACE 13255 #define ER_IB_MSG_FAILED_SDI_Z_BUF_ERROR 13256 #define ER_IB_MSG_FAILED_SDI_Z_MEM_ERROR 13257 #define ER_IB_MSG_SDI_Z_STREAM_ERROR 13258 #define ER_IB_MSG_SDI_Z_UNKNOWN_ERROR 13259 #define ER_IB_MSG_FOUND_WRONG_UNDO_SPACE 13260 #define ER_IB_MSG_NOT_END_WITH_IBU 13261 //#define OBSOLETE_ER_IB_MSG_UNDO_TRUNCATE_EMPTY_FILE 13262 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_DD_UPDATE 13263 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_UNDO_LOGGING 13264 //#define OBSOLETE_ER_IB_MSG_UNDO_INJECT_BEFORE_RSEG 13265 #define ER_IB_MSG_FAILED_TO_FINISH_TRUNCATE 13266 #define ER_IB_MSG_DEPRECATED_INNODB_UNDO_TABLESPACES 13267 #define ER_IB_MSG_WRONG_TABLESPACE_DIR 13268 #define ER_IB_MSG_LOCK_FREE_HASH_USAGE_STATS 13269 #define ER_CLONE_DONOR_TRACE 13270 #define ER_CLONE_PROTOCOL_TRACE 13271 #define ER_CLONE_CLIENT_TRACE 13272 #define ER_CLONE_SERVER_TRACE 13273 #define ER_THREAD_POOL_PFS_TABLES_INIT_FAILED 13274 #define ER_THREAD_POOL_PFS_TABLES_ADD_FAILED 13275 #define ER_CANT_SET_DATA_DIR 13276 #define ER_INNODB_INVALID_INNODB_UNDO_DIRECTORY_LOCATION 13277 #define ER_SERVER_RPL_ENCRYPTION_FAILED_TO_FETCH_KEY 13278 #define ER_SERVER_RPL_ENCRYPTION_KEY_NOT_FOUND 13279 #define ER_SERVER_RPL_ENCRYPTION_KEYRING_INVALID_KEY 13280 #define ER_SERVER_RPL_ENCRYPTION_HEADER_ERROR 13281 #define ER_SERVER_RPL_ENCRYPTION_FAILED_TO_ROTATE_LOGS 13282 #define ER_SERVER_RPL_ENCRYPTION_KEY_EXISTS_UNEXPECTED 13283 #define ER_SERVER_RPL_ENCRYPTION_FAILED_TO_GENERATE_KEY 13284 #define ER_SERVER_RPL_ENCRYPTION_FAILED_TO_STORE_KEY 13285 #define ER_SERVER_RPL_ENCRYPTION_FAILED_TO_REMOVE_KEY 13286 #define ER_SERVER_RPL_ENCRYPTION_MASTER_KEY_RECOVERY_FAILED 13287 #define ER_SERVER_RPL_ENCRYPTION_UNABLE_TO_INITIALIZE 13288 #define ER_SERVER_RPL_ENCRYPTION_UNABLE_TO_ROTATE_MASTER_KEY_AT_STARTUP 13289 #define ER_SERVER_RPL_ENCRYPTION_IGNORE_ROTATE_MASTER_KEY_AT_STARTUP 13290 #define ER_INVALID_ADMIN_ADDRESS 13291 #define ER_SERVER_STARTUP_ADMIN_INTERFACE 13292 #define ER_CANT_CREATE_ADMIN_THREAD 13293 #define ER_WARNING_RETAIN_CURRENT_PASSWORD_CLAUSE_VOID 13294 #define ER_WARNING_DISCARD_OLD_PASSWORD_CLAUSE_VOID 13295 //#define OBSOLETE_ER_SECOND_PASSWORD_CANNOT_BE_EMPTY 13296 //#define OBSOLETE_ER_PASSWORD_CANNOT_BE_RETAINED_ON_PLUGIN_CHANGE 13297 //#define OBSOLETE_ER_CURRENT_PASSWORD_CANNOT_BE_RETAINED 13298 #define ER_WARNING_AUTHCACHE_INVALID_USER_ATTRIBUTES 13299 #define ER_MYSQL_NATIVE_PASSWORD_SECOND_PASSWORD_USED_INFORMATION 13300 #define ER_SHA256_PASSWORD_SECOND_PASSWORD_USED_INFORMATION 13301 #define ER_CACHING_SHA2_PASSWORD_SECOND_PASSWORD_USED_INFORMATION 13302 #define ER_GRP_RPL_SEND_TRX_PREPARED_MESSAGE_FAILED 13303 #define ER_GRP_RPL_RELEASE_COMMIT_AFTER_GROUP_PREPARE_FAILED 13304 #define ER_GRP_RPL_TRX_ALREADY_EXISTS_ON_TCM_ON_AFTER_CERTIFICATION 13305 #define ER_GRP_RPL_FAILED_TO_INSERT_TRX_ON_TCM_ON_AFTER_CERTIFICATION 13306 #define ER_GRP_RPL_REGISTER_TRX_TO_WAIT_FOR_GROUP_PREPARE_FAILED 13307 #define ER_GRP_RPL_TRX_WAIT_FOR_GROUP_PREPARE_FAILED 13308 #define ER_GRP_RPL_TRX_DOES_NOT_EXIST_ON_TCM_ON_HANDLE_REMOTE_PREPARE 13309 #define ER_GRP_RPL_RELEASE_BEGIN_TRX_AFTER_DEPENDENCIES_COMMIT_FAILED 13310 #define ER_GRP_RPL_REGISTER_TRX_TO_WAIT_FOR_DEPENDENCIES_FAILED 13311 #define ER_GRP_RPL_WAIT_FOR_DEPENDENCIES_FAILED 13312 #define ER_GRP_RPL_REGISTER_TRX_TO_WAIT_FOR_SYNC_BEFORE_EXECUTION_FAILED 13313 #define ER_GRP_RPL_SEND_TRX_SYNC_BEFORE_EXECUTION_FAILED 13314 #define ER_GRP_RPL_TRX_WAIT_FOR_SYNC_BEFORE_EXECUTION_FAILED 13315 #define ER_GRP_RPL_RELEASE_BEGIN_TRX_AFTER_WAIT_FOR_SYNC_BEFORE_EXEC 13316 #define ER_GRP_RPL_TRX_WAIT_FOR_GROUP_GTID_EXECUTED 13317 //#define OBSOLETE_ER_UNIT_NOT_FOUND 13318 //#define OBSOLETE_ER_GEOMETRY_IN_UNKNOWN_LENGTH_UNIT 13319 #define ER_WARN_PROPERTY_STRING_PARSE_FAILED 13320 #define ER_INVALID_PROPERTY_KEY 13321 #define ER_GRP_RPL_GTID_SET_EXTRACT_ERROR_DURING_RECOVERY 13322 #define ER_SERVER_RPL_ENCRYPTION_FAILED_TO_ENCRYPT 13323 #define ER_CANNOT_GET_SERVER_VERSION_FROM_TABLESPACE_HEADER 13324 #define ER_CANNOT_SET_SERVER_VERSION_IN_TABLESPACE_HEADER 13325 #define ER_SERVER_UPGRADE_VERSION_NOT_SUPPORTED 13326 #define ER_SERVER_UPGRADE_FROM_VERSION 13327 #define ER_GRP_RPL_ERROR_ON_CERT_DB_INSTALL 13328 #define ER_GRP_RPL_FORCE_MEMBERS_WHEN_LEAVING 13329 #define ER_TRG_WRONG_ORDER 13330 //#define OBSOLETE_ER_SECONDARY_ENGINE_PLUGIN 13331 #define ER_LDAP_AUTH_GRP_SEARCH_NOT_SPECIAL_HDL 13332 #define ER_LDAP_AUTH_GRP_USER_OBJECT_HAS_GROUP_INFO 13333 #define ER_LDAP_AUTH_GRP_INFO_FOUND_IN_MANY_OBJECTS 13334 #define ER_LDAP_AUTH_GRP_INCORRECT_ATTRIBUTE 13335 #define ER_LDAP_AUTH_GRP_NULL_ATTRIBUTE_VALUE 13336 #define ER_LDAP_AUTH_GRP_DN_PARSING_FAILED 13337 #define ER_LDAP_AUTH_GRP_OBJECT_HAS_USER_INFO 13338 #define ER_LDAP_AUTH_LDAPS 13339 #define ER_LDAP_MAPPING_GET_USER_PROXY 13340 #define ER_LDAP_MAPPING_USER_DONT_BELONG_GROUP 13341 #define ER_LDAP_MAPPING_INFO 13342 #define ER_LDAP_MAPPING_EMPTY_MAPPING 13343 #define ER_LDAP_MAPPING_PROCESS_MAPPING 13344 #define ER_LDAP_MAPPING_CHECK_DELIMI_QUOTE 13345 #define ER_LDAP_MAPPING_PROCESS_DELIMITER 13346 #define ER_LDAP_MAPPING_PROCESS_DELIMITER_EQUAL_NOT_FOUND 13347 #define ER_LDAP_MAPPING_PROCESS_DELIMITER_TRY_COMMA 13348 #define ER_LDAP_MAPPING_PROCESS_DELIMITER_COMMA_NOT_FOUND 13349 #define ER_LDAP_MAPPING_NO_SEPEARATOR_END_OF_GROUP 13350 #define ER_LDAP_MAPPING_GETTING_NEXT_MAPPING 13351 #define ER_LDAP_MAPPING_PARSING_CURRENT_STATE 13352 #define ER_LDAP_MAPPING_PARSING_MAPPING_INFO 13353 #define ER_LDAP_MAPPING_PARSING_ERROR 13354 #define ER_LDAP_MAPPING_TRIMMING_SPACES 13355 #define ER_LDAP_MAPPING_IS_QUOTE 13356 #define ER_LDAP_MAPPING_NON_DESIRED_STATE 13357 #define ER_INVALID_NAMED_PIPE_FULL_ACCESS_GROUP 13358 #define ER_PREPARE_FOR_SECONDARY_ENGINE 13359 #define ER_SERVER_WARN_DEPRECATED 13360 #define ER_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES 13361 #define ER_SERVER_BINLOG_MASTER_KEY_RECOVERY_OUT_OF_COMBINATION 13362 #define ER_SERVER_BINLOG_MASTER_KEY_ROTATION_FAIL_TO_CLEANUP_AUX_KEY 13363 //#define OBSOLETE_ER_CANNOT_GRANT_SYSTEM_PRIV_TO_MANDATORY_ROLE 13364 //#define OBSOLETE_ER_PARTIAL_REVOKE_AND_DB_GRANT_BOTH_EXISTS 13365 //#define OBSOLETE_ER_DB_ACCESS_DENIED 13366 //#define OBSOLETE_ER_PARTIAL_REVOKES_EXIST 13367 #define ER_TURNING_ON_PARTIAL_REVOKES 13368 #define ER_WARN_PARTIAL_REVOKE_AND_DB_GRANT 13369 #define ER_WARN_INCORRECT_PRIVILEGE_FOR_DB_RESTRICTIONS 13370 #define ER_WARN_INVALID_DB_RESTRICTIONS 13371 #define ER_GRP_RPL_INVALID_COMMUNICATION_PROTOCOL 13372 #define ER_GRP_RPL_STARTED_AUTO_REJOIN 13373 #define ER_GRP_RPL_TIMEOUT_RECEIVED_VC_ON_REJOIN 13374 #define ER_GRP_RPL_FINISHED_AUTO_REJOIN 13375 #define ER_GRP_RPL_DEFAULT_TABLE_ENCRYPTION_DIFF_FROM_GRP 13376 #define ER_SERVER_UPGRADE_OFF 13377 #define ER_SERVER_UPGRADE_SKIP 13378 #define ER_SERVER_UPGRADE_PENDING 13379 #define ER_SERVER_UPGRADE_FAILED 13380 #define ER_SERVER_UPGRADE_STATUS 13381 #define ER_SERVER_UPGRADE_REPAIR_REQUIRED 13382 #define ER_SERVER_UPGRADE_REPAIR_STATUS 13383 #define ER_SERVER_UPGRADE_INFO_FILE 13384 #define ER_SERVER_UPGRADE_SYS_SCHEMA 13385 #define ER_SERVER_UPGRADE_MYSQL_TABLES 13386 #define ER_SERVER_UPGRADE_SYSTEM_TABLES 13387 #define ER_SERVER_UPGRADE_EMPTY_SYS 13388 #define ER_SERVER_UPGRADE_NO_SYS_VERSION 13389 #define ER_SERVER_UPGRADE_SYS_VERSION_EMPTY 13390 #define ER_SERVER_UPGRADE_SYS_SCHEMA_OUTDATED 13391 #define ER_SERVER_UPGRADE_SYS_SCHEMA_UP_TO_DATE 13392 #define ER_SERVER_UPGRADE_SYS_SCHEMA_OBJECT_COUNT 13393 #define ER_SERVER_UPGRADE_CHECKING_DB 13394 #define ER_IB_MSG_DDL_LOG_DELETE_BY_ID_TMCT 13395 #define ER_IB_MSG_POST_RECOVER_DDL_LOG_RECOVER 13396 #define ER_IB_MSG_POST_RECOVER_POST_TS_ENCRYPT 13397 #define ER_IB_MSG_DDL_LOG_FAIL_POST_DDL 13398 #define ER_SERVER_BINLOG_UNSAFE_SYSTEM_FUNCTION 13399 #define ER_SERVER_UPGRADE_HELP_TABLE_STATUS 13400 //#define OBSOLETE_ER_GRP_RPL_SRV_GTID_WAIT_ERROR 13401 //#define OBSOLETE_ER_GRP_DELAYED_VCLE_LOGGING 13402 //#define OBSOLETE_ER_CANNOT_GRANT_ROLES_TO_ANONYMOUS_USER 13403 #define ER_BINLOG_UNABLE_TO_ROTATE_GTID_TABLE_READONLY 13404 #define ER_NETWORK_NAMESPACES_NOT_SUPPORTED 13405 #define ER_UNKNOWN_NETWORK_NAMESPACE 13406 #define ER_NETWORK_NAMESPACE_NOT_ALLOWED_FOR_WILDCARD_ADDRESS 13407 #define ER_SETNS_FAILED 13408 #define ER_WILDCARD_NOT_ALLOWED_FOR_MULTIADDRESS_BIND 13409 #define ER_NETWORK_NAMESPACE_FILE_PATH_TOO_LONG 13410 #define ER_IB_MSG_TOO_LONG_PATH 13411 #define ER_IB_RECV_FIRST_REC_GROUP_INVALID 13412 #define ER_DD_UPGRADE_COMPLETED 13413 #define ER_SSL_SERVER_CERT_VERIFY_FAILED 13414 #define ER_PERSIST_OPTION_USER_TRUNCATED 13415 #define ER_PERSIST_OPTION_HOST_TRUNCATED 13416 #define ER_NET_WAIT_ERROR 13417 #define ER_IB_MSG_1285 13418 #define ER_IB_MSG_CLOCK_MONOTONIC_UNSUPPORTED 13419 #define ER_IB_MSG_CLOCK_GETTIME_FAILED 13420 #define ER_PLUGIN_NOT_EARLY_DUP 13421 #define ER_PLUGIN_NO_INSTALL_DUP 13422 //#define OBSOLETE_ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS 13423 //#define OBSOLETE_ER_WARN_DEPRECATED_FOUND_ROWS 13424 #define ER_BINLOG_UNSAFE_DEFAULT_EXPRESSION_IN_SUBSTATEMENT 13425 #define ER_GRP_RPL_MEMBER_VER_READ_COMPATIBLE 13426 #define ER_LOCK_ORDER_INIT_FAILED 13427 #define ER_AUDIT_LOG_KEYRING_ID_TIMESTAMP_VALUE_IS_INVALID 13428 #define ER_AUDIT_LOG_FILE_NAME_TIMESTAMP_VALUE_IS_MISSING_OR_INVALID 13429 #define ER_AUDIT_LOG_FILE_NAME_DOES_NOT_HAVE_REQUIRED_FORMAT 13430 #define ER_AUDIT_LOG_FILE_NAME_KEYRING_ID_VALUE_IS_MISSING 13431 #define ER_AUDIT_LOG_FILE_HAS_BEEN_SUCCESSFULLY_PROCESSED 13432 #define ER_AUDIT_LOG_COULD_NOT_OPEN_FILE_FOR_READING 13433 #define ER_AUDIT_LOG_INVALID_FILE_CONTENT 13434 #define ER_AUDIT_LOG_CANNOT_READ_PASSWORD 13435 #define ER_AUDIT_LOG_CANNOT_STORE_PASSWORD 13436 #define ER_AUDIT_LOG_CANNOT_REMOVE_PASSWORD 13437 #define ER_AUDIT_LOG_PASSWORD_HAS_BEEN_COPIED 13438 //#define OBSOLETE_ER_AUDIT_LOG_INSUFFICIENT_PRIVILEGE 13439 //#define OBSOLETE_ER_WRONG_MVI_VALUE 13440 //#define OBSOLETE_ER_WARN_FUNC_INDEX_NOT_APPLICABLE 13441 //#define OBSOLETE_ER_EXCEEDED_MV_KEYS_NUM 13442 //#define OBSOLETE_ER_EXCEEDED_MV_KEYS_SPACE 13443 //#define OBSOLETE_ER_FUNCTIONAL_INDEX_DATA_IS_TOO_LONG 13444 //#define OBSOLETE_ER_INVALID_JSON_VALUE_FOR_FUNC_INDEX 13445 //#define OBSOLETE_ER_JSON_VALUE_OUT_OF_RANGE_FOR_FUNC_INDEX 13446 #define ER_LDAP_EMPTY_USERDN_PASSWORD 13447 //#define OBSOLETE_ER_GROUPING_ON_TIMESTAMP_IN_DST 13448 #define ER_ACL_WRONG_OR_MISSING_ACL_TABLES_LOG 13449 #define ER_LOCK_ORDER_FAILED_WRITE_FILE 13450 #define ER_LOCK_ORDER_FAILED_READ_FILE 13451 #define ER_LOCK_ORDER_MESSAGE 13452 #define ER_LOCK_ORDER_DEPENDENCIES_SYNTAX 13453 #define ER_LOCK_ORDER_SCANNER_SYNTAX 13454 #define ER_DATA_DIRECTORY_UNUSABLE_DELETABLE 13455 #define ER_IB_MSG_BTREE_LEVEL_LIMIT_EXCEEDED 13456 #define ER_IB_CLONE_START_STOP 13457 #define ER_IB_CLONE_OPERATION 13458 #define ER_IB_CLONE_RESTART 13459 #define ER_IB_CLONE_USER_DATA 13460 #define ER_IB_CLONE_NON_INNODB_TABLE 13461 #define ER_CLONE_SHUTDOWN_TRACE 13462 #define ER_GRP_RPL_GTID_PURGED_EXTRACT_ERROR 13463 #define ER_GRP_RPL_CLONE_PROCESS_PREPARE_ERROR 13464 #define ER_GRP_RPL_CLONE_PROCESS_EXEC_ERROR 13465 #define ER_GRP_RPL_RECOVERY_EVAL_ERROR 13466 #define ER_GRP_RPL_NO_POSSIBLE_RECOVERY 13467 #define ER_GRP_RPL_CANT_KILL_THREAD 13468 #define ER_GRP_RPL_RECOVERY_STRAT_CLONE_THRESHOLD 13469 #define ER_GRP_RPL_RECOVERY_STRAT_CLONE_PURGED 13470 #define ER_GRP_RPL_RECOVERY_STRAT_CHOICE 13471 #define ER_GRP_RPL_RECOVERY_STRAT_FALLBACK 13472 #define ER_GRP_RPL_RECOVERY_STRAT_NO_FALLBACK 13473 #define ER_GRP_RPL_REPLICA_THREAD_ERROR_ON_CLONE 13474 #define ER_UNKNOWN_TABLE_IN_UPGRADE 13475 #define ER_IDENT_CAUSES_TOO_LONG_PATH_IN_UPGRADE 13476 #define ER_XA_CANT_CREATE_MDL_BACKUP 13477 #define ER_AUDIT_LOG_SUPER_PRIVILEGE_REQUIRED 13478 #define ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_TYPE 13479 #define ER_AUDIT_LOG_UDF_INVALID_ARGUMENT_COUNT 13480 #define ER_AUDIT_LOG_HAS_NOT_BEEN_INSTALLED 13481 #define ER_AUDIT_LOG_UDF_READ_INVALID_MAX_ARRAY_LENGTH_ARG_TYPE 13482 #define ER_LOG_CANNOT_WRITE_EXTENDED 13483 //#define OBSOLETE_ER_UPGRADE_WITH_PARTITIONED_TABLES_REJECTED 13484 #define ER_KEYRING_AWS_INCORRECT_PROXY 13485 #define ER_GRP_RPL_SERVER_SET_TO_OFFLINE_MODE_DUE_TO_ERRORS 13486 #define ER_GRP_RPL_MESSAGE_SERVICE_FATAL_ERROR 13487 #define ER_WARN_WRONG_COMPRESSION_ALGORITHM_LOG 13488 #define ER_WARN_WRONG_COMPRESSION_LEVEL_LOG 13489 #define ER_PROTOCOL_COMPRESSION_RESET_LOG 13490 #define ER_XPLUGIN_COMPRESSION_ERROR 13491 #define ER_MYSQLBACKUP_MSG 13492 #define ER_WARN_UNKNOWN_KEYRING_AWS_REGION 13493 #define ER_WARN_LOG_PRIVILEGE_CHECKS_USER_DOES_NOT_EXIST 13494 #define ER_WARN_LOG_PRIVILEGE_CHECKS_USER_CORRUPT 13495 #define ER_WARN_LOG_PRIVILEGE_CHECKS_USER_NEEDS_RPL_APPLIER_PRIV 13496 #define ER_OBSOLETE_FILE_PRIVILEGE_FOR_REPLICATION_CHECKS 13497 #define ER_RPL_REPLICA_SQL_THREAD_STARTING_WITH_PRIVILEGE_CHECKS 13498 #define ER_AUDIT_LOG_CANNOT_GENERATE_PASSWORD 13499 #define ER_INIT_FAILED_TO_GENERATE_ROOT_PASSWORD 13500 #define ER_PLUGIN_LOAD_OPTIONS_IGNORED 13501 #define ER_WARN_AUTH_ID_WITH_SYSTEM_USER_PRIV_IN_MANDATORY_ROLES 13502 #define ER_IB_MSG_SKIP_HIDDEN_DIR 13503 #define ER_WARN_RPL_RECOVERY_NO_ROTATE_EVENT_FROM_SOURCE_EOF 13504 #define ER_IB_LOB_ROLLBACK_INDEX_LEN 13505 #define ER_CANT_PROCESS_EXPRESSION_FOR_GENERATED_COLUMN_TO_DD 13506 #define ER_RPL_REPLICA_QUEUE_EVENT_FAILED_INVALID_NON_ROW_FORMAT 13507 #define ER_OBSOLETE_REQUIRE_ROW_FORMAT_VIOLATION 13508 #define ER_LOG_PRIV_CHECKS_REQUIRE_ROW_FORMAT_NOT_SET 13509 #define ER_RPL_REPLICA_SQL_THREAD_DETECTED_UNEXPECTED_EVENT_SEQUENCE 13510 #define ER_IB_MSG_UPGRADE_PARTITION_FILE 13511 #define ER_IB_MSG_DOWNGRADE_PARTITION_FILE 13512 #define ER_IB_MSG_UPGRADE_PARTITION_FILE_IMPORT 13513 #define ER_IB_WARN_OPEN_PARTITION_FILE 13514 #define ER_IB_MSG_FIL_STATE_MOVED_CORRECTED 13515 #define ER_IB_MSG_FIL_STATE_MOVED_CHANGED_PATH 13516 #define ER_IB_MSG_FIL_STATE_MOVED_CHANGED_NAME 13517 #define ER_IB_MSG_FIL_STATE_MOVED_TOO_MANY 13518 #define ER_GR_ELECTED_PRIMARY_GTID_INFORMATION 13519 #define ER_SCHEMA_NAME_IN_UPPER_CASE_NOT_ALLOWED 13520 #define ER_TABLE_NAME_IN_UPPER_CASE_NOT_ALLOWED 13521 #define ER_SCHEMA_NAME_IN_UPPER_CASE_NOT_ALLOWED_FOR_FK 13522 #define ER_TABLE_NAME_IN_UPPER_CASE_NOT_ALLOWED_FOR_FK 13523 #define ER_IB_MSG_DICT_PARTITION_NOT_FOUND 13524 #define ER_ACCESS_DENIED_FOR_USER_ACCOUNT_BLOCKED_BY_PASSWORD_LOCK 13525 #define ER_INNODB_OUT_OF_RESOURCES 13526 #define ER_DD_UPGRADE_FOUND_PREPARED_XA_TRANSACTION 13527 #define ER_MIGRATE_TABLE_TO_DD_OOM 13528 #define ER_RPL_RELAY_LOG_RECOVERY_INFO_AFTER_CLONE 13529 #define ER_IB_MSG_57_UNDO_SPACE_DELETE_FAIL 13530 #define ER_IB_MSG_DBLWR_1285 13531 #define ER_IB_MSG_DBLWR_1286 13532 #define ER_IB_MSG_DBLWR_1287 13533 #define ER_IB_MSG_DBLWR_1288 13534 #define ER_IB_MSG_DBLWR_1290 13535 #define ER_IB_MSG_BAD_DBLWR_FILE_NAME 13536 //#define OBSOLETE_ER_IB_MSG_DBLWR_1292 13537 #define ER_IB_MSG_DBLWR_1293 13538 #define ER_IB_MSG_DBLWR_1294 13539 #define ER_IB_MSG_DBLWR_1295 13540 #define ER_IB_MSG_DBLWR_1296 13541 #define ER_IB_MSG_DBLWR_1297 13542 #define ER_IB_MSG_DBLWR_1298 13543 #define ER_IB_MSG_DBLWR_1300 13544 #define ER_IB_MSG_DBLWR_1301 13545 #define ER_IB_MSG_DBLWR_1304 13546 #define ER_IB_MSG_DBLWR_1305 13547 #define ER_IB_MSG_DBLWR_1306 13548 #define ER_IB_MSG_DBLWR_1307 13549 #define ER_IB_MSG_DBLWR_1308 13550 #define ER_IB_MSG_DBLWR_1309 13551 #define ER_IB_MSG_DBLWR_1310 13552 #define ER_IB_MSG_DBLWR_1311 13553 #define ER_IB_MSG_DBLWR_1312 13554 #define ER_IB_MSG_DBLWR_1313 13555 #define ER_IB_MSG_DBLWR_1314 13556 #define ER_IB_MSG_DBLWR_1315 13557 #define ER_IB_MSG_DBLWR_1316 13558 #define ER_IB_MSG_DBLWR_1317 13559 #define ER_IB_MSG_DBLWR_1318 13560 #define ER_IB_MSG_DBLWR_1319 13561 #define ER_IB_MSG_DBLWR_1320 13562 #define ER_IB_MSG_DBLWR_1321 13563 #define ER_IB_MSG_DBLWR_1322 13564 #define ER_IB_MSG_DBLWR_1323 13565 #define ER_IB_MSG_DBLWR_1324 13566 #define ER_IB_MSG_DBLWR_1325 13567 #define ER_IB_MSG_DBLWR_1326 13568 #define ER_IB_MSG_DBLWR_1327 13569 #define ER_IB_MSG_GTID_FLUSH_AT_SHUTDOWN 13570 #define ER_IB_MSG_57_STAT_SPACE_DELETE_FAIL 13571 #define ER_NDBINFO_UPGRADING_SCHEMA 13572 #define ER_NDBINFO_NOT_UPGRADING_SCHEMA 13573 #define ER_NDBINFO_UPGRADING_SCHEMA_FAIL 13574 //#define OBSOLETE_ER_IB_MSG_CREATE_LOG_FILE 13575 #define ER_IB_MSG_INNODB_START_INITIALIZE 13576 #define ER_IB_MSG_INNODB_END_INITIALIZE 13577 #define ER_IB_MSG_PAGE_ARCH_NO_RESET_POINTS 13578 #define ER_IB_WRN_PAGE_ARCH_FLUSH_DATA 13579 #define ER_IB_ERR_PAGE_ARCH_INVALID_DOUBLE_WRITE_BUF 13580 #define ER_IB_ERR_PAGE_ARCH_RECOVERY_FAILED 13581 #define ER_IB_ERR_PAGE_ARCH_INVALID_FORMAT 13582 #define ER_INVALID_XPLUGIN_SOCKET_SAME_AS_SERVER 13583 #define ER_INNODB_UNABLE_TO_ACQUIRE_DD_OBJECT 13584 #define ER_WARN_LOG_DEPRECATED_PARTITION_PREFIX_KEY 13585 #define ER_IB_MSG_UNDO_TRUNCATE_TOO_OFTEN 13586 #define ER_GRP_RPL_IS_STARTING 13587 #define ER_IB_MSG_INVALID_LOCATION_FOR_TABLESPACE 13588 #define ER_IB_MSG_INVALID_LOCATION_WRONG_DB 13589 #define ER_IB_MSG_CANNOT_FIND_DD_UNDO_SPACE 13590 #define ER_GRP_RPL_RECOVERY_ENDPOINT_FORMAT 13591 #define ER_GRP_RPL_RECOVERY_ENDPOINT_INVALID 13592 #define ER_GRP_RPL_RECOVERY_ENDPOINT_INVALID_DONOR_ENDPOINT 13593 #define ER_GRP_RPL_RECOVERY_ENDPOINT_INTERFACES_IPS 13594 #define ER_WARN_TLS_CHANNEL_INITIALIZATION_ERROR 13595 #define ER_XPLUGIN_FAILED_TO_VALIDATE_ADDRESS 13596 #define ER_XPLUGIN_FAILED_TO_BIND_INTERFACE_ADDRESS 13597 #define ER_IB_ERR_RECOVERY_REDO_DISABLED 13598 #define ER_IB_WRN_FAST_SHUTDOWN_REDO_DISABLED 13599 #define ER_IB_WRN_REDO_DISABLED 13600 #define ER_IB_WRN_REDO_ENABLED 13601 #define ER_TLS_CONFIGURED_FOR_CHANNEL 13602 #define ER_TLS_CONFIGURATION_REUSED 13603 #define ER_IB_TABLESPACE_PATH_VALIDATION_SKIPPED 13604 #define ER_IB_CANNOT_UPGRADE_WITH_DISCARDED_TABLESPACES 13605 #define ER_USERNAME_TRUNKATED 13606 #define ER_HOSTNAME_TRUNKATED 13607 #define ER_IB_MSG_TRX_RECOVERY_ROLLBACK_NOT_COMPLETED 13608 #define ER_AUTHCACHE_ROLE_EDGES_IGNORED_EMPTY_NAME 13609 #define ER_AUTHCACHE_ROLE_EDGES_UNKNOWN_AUTHORIZATION_ID 13610 #define ER_AUTHCACHE_DEFAULT_ROLES_IGNORED_EMPTY_NAME 13611 #define ER_AUTHCACHE_DEFAULT_ROLES_UNKNOWN_AUTHORIZATION_ID 13612 #define ER_IB_ERR_DDL_LOG_INSERT_FAILURE 13613 #define ER_IB_LOCK_VALIDATE_LATCH_ORDER_VIOLATION 13614 #define ER_IB_RELOCK_LATCH_ORDER_VIOLATION 13615 //#define OBSOLETE_ER_IB_MSG_1352 13616 //#define OBSOLETE_ER_IB_MSG_1353 13617 //#define OBSOLETE_ER_IB_MSG_1354 13618 //#define OBSOLETE_ER_IB_MSG_1355 13619 //#define OBSOLETE_ER_IB_MSG_1356 13620 #define ER_IB_MSG_1357 13621 #define ER_IB_MSG_1358 13622 #define ER_IB_MSG_1359 13623 #define ER_IB_FAILED_TO_DELETE_TABLESPACE_FILE 13624 #define ER_IB_UNABLE_TO_EXPAND_TEMPORARY_TABLESPACE_POOL 13625 #define ER_IB_TMP_TABLESPACE_CANNOT_CREATE_DIRECTORY 13626 #define ER_IB_MSG_SCANNING_TEMP_TABLESPACE_DIR 13627 #define ER_IB_ERR_TEMP_TABLESPACE_DIR_DOESNT_EXIST 13628 #define ER_IB_ERR_TEMP_TABLESPACE_DIR_EMPTY 13629 #define ER_IB_ERR_TEMP_TABLESPACE_DIR_CONTAINS_SEMICOLON 13630 #define ER_IB_ERR_TEMP_TABLESPACE_DIR_SUBDIR_OF_DATADIR 13631 #define ER_IB_ERR_SCHED_SETAFFNINITY_FAILED 13632 #define ER_IB_ERR_UNKNOWN_PAGE_FETCH_MODE 13633 #define ER_IB_ERR_LOG_PARSING_BUFFER_OVERFLOW 13634 #define ER_IB_ERR_NOT_ENOUGH_MEMORY_FOR_PARSE_BUFFER 13635 #define ER_IB_MSG_1372 13636 #define ER_IB_MSG_1373 13637 #define ER_IB_MSG_1374 13638 #define ER_IB_MSG_1375 13639 #define ER_IB_ERR_ZLIB_UNCOMPRESS_FAILED 13640 #define ER_IB_ERR_ZLIB_BUF_ERROR 13641 #define ER_IB_ERR_ZLIB_MEM_ERROR 13642 #define ER_IB_ERR_ZLIB_DATA_ERROR 13643 #define ER_IB_ERR_ZLIB_UNKNOWN_ERROR 13644 #define ER_IB_MSG_1381 13645 #define ER_IB_ERR_INDEX_RECORDS_WRONG_ORDER 13646 #define ER_IB_ERR_INDEX_DUPLICATE_KEY 13647 #define ER_IB_ERR_FOUND_N_DUPLICATE_KEYS 13648 #define ER_IB_ERR_FOUND_N_RECORDS_WRONG_ORDER 13649 #define ER_IB_ERR_PARALLEL_READ_OOM 13650 #define ER_IB_MSG_UNDO_MARKED_ACTIVE 13651 #define ER_IB_MSG_UNDO_ALTERED_ACTIVE 13652 #define ER_IB_MSG_UNDO_ALTERED_INACTIVE 13653 #define ER_IB_MSG_UNDO_MARKED_EMPTY 13654 #define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_CLONE 13655 #define ER_IB_MSG_UNDO_TRUNCATE_DELAY_BY_MDL 13656 #define ER_IB_MSG_INJECT_CRASH 13657 #define ER_IB_MSG_INJECT_FAILURE 13658 #define ER_GRP_RPL_TIMEOUT_RECEIVED_VC_LEAVE_ON_REJOIN 13659 #define ER_RPL_ASYNC_RECONNECT_FAIL_NO_SOURCE 13660 #define ER_UDF_REGISTER_SERVICE_ERROR 13661 #define ER_UDF_REGISTER_ERROR 13662 #define ER_UDF_UNREGISTER_ERROR 13663 #define ER_EMPTY_PRIVILEGE_NAME_IGNORED 13664 #define ER_IB_MSG_INCORRECT_SIZE 13665 #define ER_TMPDIR_PATH_TOO_LONG 13666 #define ER_ERROR_LOG_DESTINATION_NOT_A_FILE 13667 #define ER_NO_ERROR_LOG_PARSER_CONFIGURED 13668 #define ER_UPGRADE_NONEXISTENT_SCHEMA 13669 #define ER_IB_MSG_CREATED_UNDO_SPACE 13670 #define ER_IB_MSG_DROPPED_UNDO_SPACE 13671 #define ER_IB_MSG_MASTER_KEY_ROTATED 13672 #define ER_IB_DBLWR_DECOMPRESS_FAILED 13673 #define ER_IB_DBLWR_DECRYPT_FAILED 13674 #define ER_IB_DBLWR_KEY_MISSING 13675 #define ER_INNODB_IO_WRITE_ERROR_RETRYING 13676 #define ER_INNODB_IO_WRITE_FAILED 13677 #define ER_LOG_COMPONENT_CANNOT_INIT 13678 #define ER_RPL_ASYNC_CHANNEL_CANT_CONNECT 13679 #define ER_RPL_ASYNC_SENDER_ADDED 13680 #define ER_RPL_ASYNC_SENDER_REMOVED 13681 #define ER_RPL_ASYNC_CHANNEL_STOPPED_QUORUM_LOST 13682 #define ER_RPL_ASYNC_CHANNEL_CANT_CONNECT_NO_QUORUM 13683 #define ER_RPL_ASYNC_EXECUTING_QUERY 13684 #define ER_RPL_REPLICA_MONITOR_IO_THREAD_EXITING 13685 #define ER_RPL_ASYNC_MANAGED_NAME_REMOVED 13686 #define ER_RPL_ASYNC_MANAGED_NAME_ADDED 13687 #define ER_RPL_ASYNC_READ_FAILOVER_TABLE 13688 #define ER_RPL_REPLICA_MONITOR_IO_THREAD_RECONNECT_CHANNEL 13689 #define ER_REPLICA_ANON_TO_GTID_IS_LOCAL_OR_UUID_AND_GTID_MODE_NOT_ON 13690 #define ER_REPLICA_ANONYMOUS_TO_GTID_UUID_SAME_AS_GROUP_NAME 13691 #define ER_GRP_RPL_GRP_NAME_IS_SAME_AS_ANONYMOUS_TO_GTID_UUID 13692 #define ER_WARN_GTID_THRESHOLD_BREACH 13693 #define ER_HEALTH_INFO 13694 #define ER_HEALTH_WARNING 13695 #define ER_HEALTH_ERROR 13696 #define ER_HEALTH_WARNING_DISK_USAGE_LEVEL_1 13697 #define ER_HEALTH_WARNING_DISK_USAGE_LEVEL_2 13698 #define ER_HEALTH_WARNING_DISK_USAGE_LEVEL_3 13699 #define ER_IB_INNODB_TBSP_OUT_OF_SPACE 13700 #define ER_GRP_RPL_APPLIER_CHANNEL_STILL_RUNNING 13701 #define ER_RPL_ASYNC_RECONNECT_GTID_MODE_OFF_CHANNEL 13702 #define ER_FIREWALL_SERVICES_NOT_ACQUIRED 13703 #define ER_FIREWALL_UDF_REGISTER_FAILED 13704 #define ER_FIREWALL_PFS_TABLE_REGISTER_FAILED 13705 #define ER_IB_MSG_STATS_SAMPLING_TOO_LARGE 13706 #define ER_AUDIT_LOG_FILE_PRUNE_FAILED 13707 #define ER_AUDIT_LOG_FILE_AUTO_PRUNED 13708 #define ER_COMPONENTS_INFRASTRUCTURE_MANIFEST_INIT 13709 #define ER_COMPONENTS_INFRASTRUCTURE_MANIFEST_DEINIT 13710 #define ER_WARN_COMPONENTS_INFRASTRUCTURE_MANIFEST_NOT_RO 13711 #define ER_WARN_NO_KEYRING_COMPONENT_SERVICE_FOUND 13712 #define ER_NOTE_KEYRING_COMPONENT_INITIALIZED 13713 #define ER_KEYRING_COMPONENT_NOT_INITIALIZED 13714 #define ER_KEYRING_COMPONENT_EXCEPTION 13715 #define ER_KEYRING_COMPONENT_MEMORY_ALLOCATION_ERROR 13716 #define ER_NOTE_KEYRING_COMPONENT_AES_INVALID_MODE_BLOCK_SIZE 13717 #define ER_NOTE_KEYRING_COMPONENT_AES_DATA_IDENTIFIER_EMPTY 13718 #define ER_NOTE_KEYRING_COMPONENT_AES_INVALID_KEY 13719 #define ER_NOTE_KEYRING_COMPONENT_AES_OPERATION_ERROR 13720 #define ER_NOTE_KEYRING_COMPONENT_READ_DATA_NOT_FOUND 13721 #define ER_NOTE_KEYRING_COMPONENT_WRITE_MAXIMUM_DATA_LENGTH 13722 #define ER_NOTE_KEYRING_COMPONENT_STORE_FAILED 13723 #define ER_NOTE_KEYRING_COMPONENT_REMOVE_FAILED 13724 #define ER_NOTE_KEYRING_COMPONENT_GENERATE_FAILED 13725 #define ER_NOTE_KEYRING_COMPONENT_KEYS_METADATA_ITERATOR_FETCH_FAILED 13726 #define ER_NOTE_KEYRING_COMPONENT_METADATA_ITERATOR_INVALID_OUT_PARAM 13727 #define ER_IB_WRN_FAILED_TO_ACQUIRE_SERVICE 13728 #define ER_IB_WRN_OLD_GEOMETRY_TYPE 13729 #define ER_NET_WAIT_ERROR2 13730 #define ER_GRP_RPL_MEMBER_ACTION_TRIGGERED 13731 #define ER_GRP_RPL_MEMBER_ACTION_FAILURE_IGNORE 13732 #define ER_GRP_RPL_MEMBER_ACTION_FAILURE 13733 #define ER_GRP_RPL_MEMBER_ACTION_PARSE_ON_RECEIVE 13734 #define ER_GRP_RPL_MEMBER_ACTION_UPDATE_ACTIONS 13735 #define ER_GRP_RPL_MEMBER_ACTION_GET_EXCHANGEABLE_DATA 13736 #define ER_GRP_RPL_MEMBER_ACTION_DEFAULT_CONFIGURATION 13737 #define ER_GRP_RPL_MEMBER_ACTION_UNABLE_TO_SET_DEFAULT_CONFIGURATION 13738 #define ER_GRP_RPL_MEMBER_ACTION_PARSE_ON_MEMBER_JOIN 13739 #define ER_GRP_RPL_MEMBER_ACTION_UPDATE_ACTIONS_ON_MEMBER_JOIN 13740 #define ER_GRP_RPL_MEMBER_ACTION_INVALID_ACTIONS_ON_MEMBER_JOIN 13741 #define ER_GRP_RPL_MEMBER_ACTION_ENABLED 13742 #define ER_GRP_RPL_MEMBER_ACTION_DISABLED 13743 #define ER_GRP_RPL_MEMBER_ACTIONS_RESET 13744 //#define OBSOLETE_ER_DEPRECATED_TLS_VERSION_SESSION 13745 //#define OBSOLETE_ER_WARN_DEPRECATED_TLS_VERSION_FOR_CHANNEL 13746 #define ER_FIREWALL_DEPRECATED_USER_PROFILE 13747 #define ER_GRP_RPL_VIEW_CHANGE_UUID_INVALID 13748 #define ER_GRP_RPL_VIEW_CHANGE_UUID_SAME_AS_GROUP_NAME 13749 #define ER_GRP_RPL_GROUP_NAME_SAME_AS_VIEW_CHANGE_UUID 13750 #define ER_GRP_RPL_VIEW_CHANGE_UUID_IS_SAME_AS_ANONYMOUS_TO_GTID_UUID 13751 #define ER_GRP_RPL_GRP_VIEW_CHANGE_UUID_IS_INCOMPATIBLE_WITH_SERVER_UUID 13752 #define ER_GRP_RPL_VIEW_CHANGE_UUID_DIFF_FROM_GRP 13753 #define ER_WARN_REPLICA_ANONYMOUS_TO_GTID_UUID_SAME_AS_VIEW_CHANGE_UUID 13754 #define ER_GRP_RPL_FAILED_TO_PARSE_THE_VIEW_CHANGE_UUID 13755 #define ER_GRP_RPL_FAILED_TO_GENERATE_SIDNO_FOR_VIEW_CHANGE_UUID 13756 #define ER_GRP_RPL_VIEW_CHANGE_UUID_PARSE_ERROR 13757 #define ER_GRP_RPL_UPDATE_GRPGTID_VIEW_CHANGE_UUID_EXECUTED_ERROR 13758 #define ER_GRP_RPL_ADD_VIEW_CHANGE_UUID_TO_GRP_SID_MAP_ERROR 13759 #define ER_GRP_RPL_DONOR_VIEW_CHANGE_UUID_TRANS_INFO_ERROR 13760 #define ER_WARN_GRP_RPL_VIEW_CHANGE_UUID_FAIL_GET_VARIABLE 13761 #define ER_WARN_ADUIT_LOG_MAX_SIZE_AND_PRUNE_SECONDS_LOG 13762 #define ER_WARN_ADUIT_LOG_MAX_SIZE_CLOSE_TO_ROTATE_ON_SIZE_LOG 13763 #define ER_PLUGIN_INVALID_TABLE_DEFINITION 13764 #define ER_AUTH_KERBEROS_LOGGER_GENERIC_MSG 13765 #define ER_INSTALL_PLUGIN_CONFLICT_LOG 13766 #define ER_DEPRECATED_PERSISTED_VARIABLE_WITH_ALIAS 13767 #define ER_LOG_COMPONENT_FLUSH_FAILED 13768 #define ER_IB_MSG_REENCRYPTED_TABLESPACE_KEY 13769 #define ER_IB_MSG_REENCRYPTED_GENERAL_TABLESPACE_KEY 13770 #define ER_IB_ERR_PAGE_ARCH_DBLWR_INIT_FAILED 13771 #define ER_IB_MSG_RECOVERY_NO_SPACE_IN_REDO_LOG__SKIP_IBUF_MERGES 13772 #define ER_IB_MSG_RECOVERY_NO_SPACE_IN_REDO_LOG__UNEXPECTED 13773 #define ER_WARN_AUDIT_LOG_FORMAT_UNIX_TIMESTAMP_ONLY_WHEN_JSON_LOG 13774 #define ER_PREPARE_FOR_PRIMARY_ENGINE 13775 #define ER_IB_MSG_PAR_RSEG_INIT_COMPLETE_MSG 13776 #define ER_IB_MSG_PAR_RSEG_INIT_TIME_MSG 13777 #define ER_DDL_MSG_1 13778 #define ER_MTR_MSG_1 13779 #define ER_GRP_RPL_MYSQL_NETWORK_PROVIDER_CLIENT_ERROR_CONN_ERR 13780 #define ER_GRP_RPL_MYSQL_NETWORK_PROVIDER_CLIENT_ERROR_COMMAND_ERR 13781 #define ER_GRP_RPL_FAILOVER_CONF_GET_EXCHANGEABLE_DATA 13782 #define ER_GRP_RPL_FAILOVER_CONF_DEFAULT_CONFIGURATION 13783 #define ER_GRP_RPL_FAILOVER_CONF_UNABLE_TO_SET_DEFAULT_CONFIGURATION 13784 #define ER_GRP_RPL_FAILOVER_CONF_PARSE_ON_MEMBER_JOIN 13785 #define ER_GRP_RPL_FAILOVER_CONF_CHANNEL_DOES_NOT_EXIST 13786 #define ER_GRP_RPL_FAILOVER_REGISTER_MESSAGE_LISTENER_SERVICE 13787 #define ER_GRP_RPL_FAILOVER_PRIMARY_WITHOUT_MAJORITY 13788 #define ER_GRP_RPL_FAILOVER_PRIMARY_BACK_TO_MAJORITY 13789 #define ER_RPL_INCREMENTING_MEMBER_ACTION_VERSION 13790 #define ER_GRP_RPL_REPLICA_THREAD_ERROR_ON_SECONDARY_MEMBER 13791 #define ER_IB_MSG_CLONE_DDL_NTFN 13792 #define ER_IB_MSG_CLONE_DDL_APPLY 13793 #define ER_IB_MSG_CLONE_DDL_INVALIDATE 13794 #define ER_IB_MSG_UNDO_ENCRYPTION_INFO_LOADED 13795 #define ER_IB_WRN_ENCRYPTION_INFO_SIZE_MISMATCH 13796 #define ER_INVALID_AUTHENTICATION_POLICY 13797 #define ER_AUTHENTICATION_PLUGIN_REGISTRATION_FAILED 13798 #define ER_AUTHENTICATION_PLUGIN_REGISTRATION_INSUFFICIENT_BUFFER 13799 #define ER_AUTHENTICATION_PLUGIN_AUTH_DATA_CORRUPT 13800 #define ER_AUTHENTICATION_PLUGIN_SIGNATURE_CORRUPT 13801 #define ER_AUTHENTICATION_PLUGIN_VERIFY_SIGNATURE_FAILED 13802 #define ER_AUTHENTICATION_PLUGIN_OOM 13803 #define ER_AUTHENTICATION_PLUGIN_LOG 13804 #define ER_WARN_REPLICA_GTID_ONLY_AND_GTID_MODE_NOT_ON 13805 #define ER_WARN_L_DISABLE_GTID_ONLY_WITH_SOURCE_AUTO_POS_INVALID_POS 13806 #define ER_RPL_CANNOT_OPEN_RELAY_LOG 13807 #define ER_AUTHENTICATION_OCI_PLUGIN_NOT_INITIALIZED 13808 #define ER_AUTHENTICATION_OCI_PRIVATE_KEY_ERROR 13809 #define ER_AUTHENTICATION_OCI_DOWNLOAD_PUBLIC_KEY 13810 #define ER_AUTHENTICATION_OCI_IMDS 13811 #define ER_AUTHENTICATION_OCI_IAM 13812 #define ER_AUTHENTICATION_OCI_INVALID_AUTHENTICATION_STRING 13813 #define ER_AUTHENTICATION_OCI_NO_MATCHING_GROUPS 13814 #define ER_AUTHENTICATION_OCI_NO_GROUPS_FOUND 13815 #define ER_AUTHENTICATION_OCI_NONCE 13816 #define ER_HEALTH_WARNING_MEMORY_USAGE_LEVEL_1 13817 #define ER_HEALTH_WARNING_MEMORY_USAGE_LEVEL_2 13818 #define ER_HEALTH_WARNING_MEMORY_USAGE_LEVEL_3 13819 #define ER_GRP_RPL_SET_SINGLE_CONSENSUS_LEADER 13820 #define ER_GRP_RPL_ERROR_SET_SINGLE_CONSENSUS_LEADER 13821 #define ER_GRP_RPL_SET_MULTI_CONSENSUS_LEADER 13822 #define ER_GRP_RPL_ERROR_SET_MULTI_CONSENSUS_LEADER 13823 #define ER_GRP_RPL_PAXOS_SINGLE_LEADER_DIFF_FROM_GRP 13824 #define ER_MFA_USER_ATTRIBUTES_CORRUPT 13825 #define ER_MFA_PLUGIN_NOT_LOADED 13826 #define ER_WARN_DEPRECATED_CHARSET_OPTION 13827 #define ER_WARN_DEPRECATED_COLLATION_OPTION 13828 #define ER_REGEXP_MISSING_ICU_DATADIR 13829 #define ER_IB_WARN_MANY_NON_LRU_FILES_OPENED 13830 #define ER_IB_MSG_TRYING_TO_OPEN_FILE_FOR_LONG_TIME 13831 #define ER_GLOBAL_CONN_LIMIT 13832 #define ER_CONN_LIMIT 13833 #define ER_WARN_AUDIT_LOG_DISABLED 13834 #define ER_INVALID_TLS_VERSION 13835 #define ER_RPL_RELAY_LOG_RECOVERY_GTID_ONLY 13836 #define ER_KEYRING_OKV_STANDBY_SERVER_COUNT_EXCEEDED 13837 #define ER_WARN_MIGRATION_EMPTY_SOURCE_KEYRING 13838 #define ER_WARN_CANNOT_PERSIST_SENSITIVE_VARIABLES 13839 #define ER_CANNOT_INTERPRET_PERSISTED_SENSITIVE_VARIABLES 13840 #define ER_PERSISTED_VARIABLES_KEYRING_SUPPORT_REQUIRED 13841 #define ER_PERSISTED_VARIABLES_MASTER_KEY_NOT_FOUND 13842 #define ER_PERSISTED_VARIABLES_MASTER_KEY_CANNOT_BE_GENERATED 13843 #define ER_PERSISTED_VARIABLES_ENCRYPTION_FAILED 13844 #define ER_PERSISTED_VARIABLES_DECRYPTION_FAILED 13845 #define ER_PERSISTED_VARIABLES_LACK_KEYRING_SUPPORT 13846 #define ER_MY_MALLOC_USING_JEMALLOC 13847 #define ER_MY_MALLOC_USING_STD_MALLOC 13848 #define ER_MY_MALLOC_LOADLIBRARY_FAILED 13849 #define ER_MY_MALLOC_GETPROCADDRESS_FAILED 13850 #define ER_ACCOUNT_WITH_EXPIRED_PASSWORD 13851 #define ER_THREAD_POOL_PLUGIN_STARTED 13852 #define ER_THREAD_POOL_DEDICATED_LISTENERS_INVALID 13853 #define ER_IB_DBLWR_BYTES_INFO 13854 #define ER_IB_RDBLWR_BYTES_INFO 13855 #define ER_IB_MSG_LOG_FILE_IS_EMPTY 13856 #define ER_IB_MSG_LOG_FILE_TOO_SMALL 13857 #define ER_IB_MSG_LOG_FILE_TOO_BIG 13858 #define ER_IB_MSG_LOG_FILE_HEADER_READ_FAILED 13859 #define ER_IB_MSG_LOG_INIT_DIR_NOT_EMPTY_WONT_INITIALIZE 13860 #define ER_IB_MSG_LOG_INIT_DIR_LIST_FAILED 13861 #define ER_IB_MSG_LOG_INIT_DIR_MISSING_SUBDIR 13862 #define ER_IB_MSG_LOG_FILES_CREATED_BY_CLONE_AND_READ_ONLY_MODE 13863 #define ER_IB_MSG_LOG_WRITER_WRITE_FAILED 13864 #define ER_IB_MSG_LOG_WRITER_WAIT_ON_NEW_LOG_FILE 13865 #define ER_IB_MSG_RECOVERY_CHECKPOINT_OUTSIDE_LOG_FILE 13866 #define ER_IB_MSG_LOG_WRITER_ENTERED_EXTRA_MARGIN 13867 #define ER_IB_MSG_LOG_WRITER_EXITED_EXTRA_MARGIN 13868 #define ER_IB_MSG_LOG_PARAMS_FILE_SIZE_UNUSED 13869 #define ER_IB_MSG_LOG_PARAMS_N_FILES_UNUSED 13870 #define ER_IB_MSG_LOG_UPGRADE_FORCED_RECV 13871 #define ER_IB_MSG_LOG_UPGRADE_IN_READ_ONLY_MODE 13872 #define ER_IB_MSG_LOG_UPGRADE_CLONED_DB 13873 #define ER_IB_MSG_LOG_UPGRADE_UNINITIALIZED_FILES 13874 #define ER_IB_MSG_LOG_UPGRADE_CORRUPTION__UNEXPECTED 13875 //#define OBSOLETE_ER_IB_MSG_LOG_UPGRADE_NON_PERSISTED_DD_METADATA 13876 //#define OBSOLETE_ER_IB_MSG_LOG_UPGRADE_FLUSH_FAILED__UNEXPECTED 13877 //#define OBSOLETE_ER_IB_MSG_LOG_FILES_RESIZE_ON_START_FAILED__UNEXPECTED 13878 #define ER_IB_MSG_LOG_FILE_FOREIGN_UUID 13879 #define ER_IB_MSG_LOG_FILE_INVALID_START_LSN 13880 #define ER_IB_MSG_LOG_FILE_INVALID_LSN_RANGES 13881 #define ER_IB_MSG_LOG_FILE_MISSING_FOR_ID 13882 #define ER_IB_MSG_LOG_CHECKPOINT_FOUND 13883 #define ER_IB_MSG_LOG_FILES_CAPACITY_CHANGED 13884 #define ER_IB_MSG_LOG_FILES_RESIZE_REQUESTED 13885 #define ER_IB_MSG_LOG_FILES_RESIZE_CANCELLED 13886 #define ER_IB_MSG_LOG_FILES_RESIZE_FINISHED 13887 #define ER_IB_MSG_LOG_FILES_UPGRADE 13888 #define ER_IB_MSG_LOG_FILE_MARK_CURRENT_AS_INCOMPLETE 13889 #define ER_IB_MSG_LOG_FILE_REMOVE_FAILED 13890 #define ER_IB_MSG_LOG_FILE_RENAME_ON_CREATE_FAILED 13891 #define ER_IB_MSG_LOG_FILES_CREATED_BY_UNKNOWN_CREATOR 13892 #define ER_IB_MSG_LOG_FILES_FOUND_MISSING 13893 #define ER_IB_MSG_LOG_FILE_FORMAT_TOO_NEW 13894 #define ER_IB_MSG_LOG_FILE_FORMAT_TOO_OLD 13895 #define ER_IB_MSG_LOG_FILE_DIFFERENT_FORMATS 13896 #define ER_IB_MSG_LOG_PRE_8_0_30_MISSING_FILE0 13897 #define ER_IB_MSG_LOG_PFS_ACQUIRE_SERVICES_FAILED 13898 #define ER_IB_MSG_LOG_PFS_CREATE_TABLES_FAILED 13899 #define ER_IB_MSG_LOG_FILE_TRUNCATE 13900 #define ER_IB_MSG_LOG_FILE_UNUSED_RESIZE_FAILED 13901 #define ER_IB_MSG_LOG_FILE_UNUSED_REMOVE_FAILED 13902 #define ER_IB_MSG_LOG_FILE_UNUSED_RENAME_FAILED 13903 #define ER_IB_MSG_LOG_FILE_UNUSED_MARK_AS_IN_USE_FAILED 13904 #define ER_IB_MSG_LOG_FILE_MARK_AS_UNUSED_FAILED 13905 #define ER_IB_MSG_LOG_PARAMS_DEDICATED_SERVER_IGNORED 13906 #define ER_IB_MSG_LOG_PARAMS_LEGACY_USAGE 13907 #define ER_GRP_RPL_FAILED_TO_LOG_VIEW_CHANGE 13908 #define ER_BINLOG_CRASH_RECOVERY_MALFORMED_LOG 13909 #define ER_BINLOG_CRASH_RECOVERY_ERROR_RETURNED_SE 13910 #define ER_BINLOG_CRASH_RECOVERY_ENGINE_RESULTS 13911 #define ER_BINLOG_CRASH_RECOVERY_COMMIT_FAILED 13912 #define ER_BINLOG_CRASH_RECOVERY_ROLLBACK_FAILED 13913 #define ER_BINLOG_CRASH_RECOVERY_PREPARE_FAILED 13914 #define ER_COMPONENT_EE_SYS_VAR_REGISTRATION_FAILURE 13915 #define ER_COMPONENT_EE_SYS_VAR_DEREGISTRATION_FAILURE 13916 #define ER_COMPONENT_EE_FUNCTION_REGISTRATION_FAILURE 13917 #define ER_COMPONENT_EE_FUNCTION_DEREGISTRATION_FAILURE 13918 #define ER_COMPONENT_EE_FUNCTION_INVALID_ARGUMENTS 13919 #define ER_COMPONENT_EE_FUNCTION_INVALID_ALGORITHM 13920 #define ER_COMPONENT_EE_FUNCTION_KEY_LENGTH_OUT_OF_RANGE 13921 #define ER_COMPONENT_EE_FUNCTION_PRIVATE_KEY_GENERATION_FAILURE 13922 #define ER_COMPONENT_EE_FUNCTION_PUBLIC_KEY_GENERATION_FAILURE 13923 #define ER_COMPONENT_EE_DATA_LENGTH_OUT_OF_RAGE 13924 #define ER_COMPONENT_EE_DATA_ENCRYPTION_ERROR 13925 #define ER_COMPONENT_EE_DATA_DECRYPTION_ERROR 13926 #define ER_COMPONENT_EE_DATA_SIGN_ERROR 13927 #define ER_COMPONENT_EE_OPENSSL_ERROR 13928 #define ER_COMPONENT_EE_INSUFFICIENT_LENGTH 13929 #define ER_SYSTEMD_NOTIFY_DEBUG 13930 #define ER_TMP_SESSION_FOR_VAR 13931 #define ER_BUILD_ID 13932 #define ER_THREAD_POOL_CANNOT_REGISTER_DYNAMIC_PRIVILEGE 13933 #define ER_IB_MSG_LOG_WRITER_WAIT_ON_CONSUMER 13934 #define ER_CONDITIONAL_DEBUG 13935 #define ER_IB_MSG_PARSE_OLD_REDO_INDEX_VERSION 13936 //#define OBSOLETE_ER_RES_GRP_FAILED_TO_SWITCH_RESOURCE_GROUP 13937 //#define OBSOLETE_ER_RES_GRP_SWITCH_FAILED_COULD_NOT_ACQUIRE_GLOBAL_LOCK 13938 //#define OBSOLETE_ER_RES_GRP_SWITCH_FAILED_COULD_NOT_ACQUIRE_LOCK 13939 //#define OBSOLETE_ER_RES_GRP_SWITCH_FAILED_UNABLE_TO_APPLY_RES_GRP 13940 #define ER_IB_MSG_CLEAR_INSTANT_DROP_COLUMN_METADATA 13941 #define ER_COMPONENT_KEYRING_OCI_OPEN_KEY_FILE 13942 #define ER_COMPONENT_KEYRING_OCI_CREATE_PRIVATE_KEY 13943 #define ER_COMPONENT_KEYRING_OCI_READ_KEY_FILE 13944 #define ER_NOTE_COMPONENT_KEYRING_OCI_MISSING_NAME_OR_TYPE 13945 #define ER_WARN_COMPONENT_KEYRING_OCI_DUPLICATE_KEY 13946 #define ER_KEYRING_OCI_PARSE_JSON 13947 #define ER_KEYRING_OCI_INVALID_JSON 13948 #define ER_KEYRING_OCI_HTTP_REQUEST 13949 #define ER_THREAD_POOL_SYSVAR_CHANGE 13950 #define ER_STACK_BACKTRACE 13951 #define ER_IB_MSG_BUF_POOL_RESIZE_COMPLETE_CUR_CODE 13952 #define ER_IB_MSG_BUF_POOL_RESIZE_PROGRESS_UPDATE 13953 #define ER_IB_MSG_BUF_POOL_RESIZE_CODE_STATUS 13954 #define ER_THREAD_POOL_QUERY_THREADS_PER_GROUP_INVALID 13955 #define ER_THREAD_POOL_QUERY_THRS_PER_GRP_EXCEEDS_TXN_THR_LIMIT 13956 #define ER_IB_MSG_INVALID_PAGE_TYPE 13957 #define ER_IB_PARALLEL_READER_WORKER_INFO 13958 #define ER_IB_BULK_LOAD_SUBTREE_INFO 13959 #define ER_IB_BULK_FLUSHER_INFO 13960 #define ER_IB_BUFFER_POOL_OVERUSE 13961 #define ER_IB_BUFFER_POOL_FULL 13962 #define ER_IB_DUPLICATE_KEY 13963 #define ER_REPLICATION_INCOMPATIBLE_TABLE_WITH_GIPK 13964 #define ER_BULK_EXECUTOR_INFO 13965 #define ER_BULK_LOADER_INFO 13966 #define ER_BULK_LOADER_FILE_CONTAINS_LESS_LINES_THAN_IGNORE_CLAUSE_LOG 13967 #define ER_BULK_READER_INFO 13968 #define ER_BULK_READER_LIBCURL_INIT_FAILED_LOG 13969 #define ER_BULK_READER_LIBCURL_ERROR_LOG 13970 #define ER_BULK_READER_SERVER_ERROR_LOG 13971 #define ER_BULK_READER_COMMUNICATION_ERROR_LOG 13972 #define ER_BULK_PARSER_MISSING_ENCLOSED_BY_LOG 13973 #define ER_BULK_PARSER_ROW_BUFFER_MAX_TOTAL_COLS_EXCEEDED_LOG 13974 #define ER_BULK_PARSER_COPY_BUFFER_SIZE_EXCEEDED_LOG 13975 #define ER_BULK_PARSER_UNEXPECTED_END_OF_INPUT_LOG 13976 #define ER_BULK_PARSER_UNEXPECTED_ROW_TERMINATOR_LOG 13977 #define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_ENDING_ENCLOSED_BY_LOG 13978 #define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_NULL_ESCAPE_LOG 13979 #define ER_BULK_PARSER_UNEXPECTED_CHAR_AFTER_COLUMN_TERMINATOR_LOG 13980 #define ER_BULK_PARSER_INCOMPLETE_ESCAPE_SEQUENCE_LOG 13981 #define ER_LOAD_BULK_DATA_WRONG_VALUE_FOR_FIELD_LOG 13982 #define ER_LOAD_BULK_DATA_WARN_NULL_TO_NOTNULL_LOG 13983 #define ER_IB_BULK_LOAD_THREAD_FAIL 13984 #define ER_IB_BULK_LOAD_MERGE_FAIL 13985 #define ER_IB_LOAD_BULK_CONCURRENCY_REDUCED 13986 #define ER_PLUGIN_EXCEPTION_OPERATION_FAILED 13987 #define ER_REQUIRE_TABLE_PRIMARY_KEY_CHECK_GENERATE_WITH_GR_IN_REPO 13988 #define ER_CHECK_TABLE_INSTANT_VERSION_BIT_SET 13989 #define ER_GRP_RPL_PAXOS_SINGLE_LEADER_DIFF_FROM_OLD_GRP 13990 #define ER_IB_WRN_IGNORE_REDO_LOG_CAPACITY 13991 #define ER_IB_PRIMARY_KEY_IS_INSTANT 13992 #define ER_THREAD_POOL_IDLE_CONNECTION_CLOSED 13993 #define ER_IB_HIDDEN_NAME_CONFLICT 13994 #define ER_IB_DICT_INVALID_COLUMN_POSITION 13995 #define ER_IB_DICT_LOG_TABLE_INFO 13996 #define ER_RPL_ASYNC_NEXT_FAILOVER_CHANNEL_SELECTED 13997 #define ER_RPL_REPLICA_SOURCE_UUID_HAS_NOT_CHANGED 13998 #define ER_RPL_REPLICA_SOURCE_UUID_HAS_CHANGED_HOST_PORT_UNCHANGED 13999 #define ER_RPL_REPLICA_SOURCE_UUID_HOST_PORT_HAS_CHANGED 14000 #define ER_RPL_REPLICA_CONNECTED_TO_SOURCE_RPL_STARTED_FILE_BASED 14001 #define ER_RPL_REPLICA_CONNECTED_TO_SOURCE_RPL_STARTED_GTID_BASED 14002 #define ER_IB_INDEX_LOADER_DONE 14003 #define ER_IB_INDEX_BUILDER_DONE 14004 #define ER_WARN_DEPRECATED_USER_DEFINED_COLLATIONS_OPTION 14005 #define ER_IB_INDEX_BUILDER_INIT 14006 #define ER_IB_SELECT_COUNT_STAR 14007 #define ER_IB_INDEX_LOG_VERSION_MISMATCH 14008 #define ER_WARN_COMPONENTS_INFRASTRUCTURE_MANIFEST_MULTIPLE_KEYRING 14009 #define ER_GRP_RPL_HAS_STARTED 14010 #define ER_CHECK_TABLE_MIN_REC_FLAG_SET 14011 #define ER_CHECK_TABLE_MIN_REC_FLAG_NOT_SET 14012 #define ER_NOTE_COMPONENT_SLOT_REGISTRATION_SUCCESS 14013 #define ER_NOTE_COMPONENT_SLOT_DEREGISTRATION_SUCCESS 14014 #define ER_WARN_CANNOT_FREE_COMPONENT_DATA_DEALLOCATION_FAILED 14015 #define ER_IB_RESURRECT_TRX_INSERT 14016 #define ER_IB_RESURRECT_TRX_UPDATE 14017 #define ER_IB_RESURRECT_IDENTIFY_TABLE_TO_LOCK 14018 #define ER_IB_RESURRECT_ACQUIRE_TABLE_LOCK 14019 #define ER_IB_RESURRECT_RECORD_PROGRESS 14020 #define ER_IB_RESURRECT_RECORD_COMPLETE 14021 #define ER_IB_RESURRECT_TRX_INSERT_COMPLETE 14022 #define ER_IB_RESURRECT_TRX_UPDATE_COMPLETE 14023 #define ER_AUTHENTICATION_OCI_INVALID_TOKEN 14024 #define ER_AUTHENTICATION_OCI_TOKEN_DETAILS_MISMATCH 14025 #define ER_AUTHENTICATION_OCI_TOKEN_NOT_VERIFIED 14026 #define ER_AUTHENTICATION_OCI_DOWNLOAD_IDDP_PUBLIC_KEY 14027 //#define OBSOLETE_ER_AUTHENTICATION_OCI_NO_MATCHING_GROUPS_IN_TOKEN 14028 #define ER_SYS_VAR_REGISTRATION 14029 #define ER_SYS_VAR_DEREGISTRATION 14030 #define ER_UDF_REGISTRATION 14031 #define ER_UDF_DEREGISTRATION 14032 #define ER_PRIVILEGE_REGISTRATION 14033 #define ER_PRIVILEGE_DEREGISTRATION 14034 #define ER_UDF_EXEC_FAILURE 14035 #define ER_UDF_EXEC_FAILURE_REASON 14036 #define ER_COMPONENT_SERVICE_CALL 14037 #define ER_COMPONENT_SERVICE_CALL_RESULT 14038 #define ER_COMPONENT_LOCK 14039 #define ER_COMPONENT_UNLOCK 14040 #define ER_COMPONENT_MASKING_OTHER_ERROR 14041 #define ER_COMPONENT_MASKING_ABI 14042 #define ER_COMPONENT_MASKING_ABI_REASON 14043 #define ER_COMPONENT_MASKING_RANDOM_CREATE 14044 #define ER_COMPONENT_MASKING_RANDOM_CREATE_REASON 14045 #define ER_COMPONENT_MASKING_CANNOT_ACCESS_TABLE 14046 #define ER_REDUCED_DBLWR_FILE_CORRUPTED 14047 #define ER_REDUCED_DBLWR_PAGE_FOUND 14048 #define ER_CONN_INIT_CONNECT_IGNORED_MFA 14049 #define ER_SECONDARY_ENGINE_DDL_FAILED 14050 #define ER_THREAD_POOL_CONNECTION_REPORT 14051 #define ER_WARN_SCHEDULED_TASK_RUN_FAILED 14052 #define ER_AUDIT_LOG_INVALID_FLUSH_INTERVAL_VALUE 14053 #define ER_LOG_CANNOT_PURGE_BINLOG_WITH_BACKUP_LOCK 14054 #define ER_CONVERT_MULTI_VALUE 14055 #define ER_IB_DDL_CONVERT_HEAP_NOT_FOUND 14056 #define ER_SERVER_DOWNGRADE_FROM_VERSION 14057 #define ER_BEYOND_SERVER_DOWNGRADE_THRESHOLD 14058 #define ER_BEYOND_SERVER_UPGRADE_THRESHOLD 14059 #define ER_INVALID_SERVER_UPGRADE_NOT_LTS 14060 #define ER_INVALID_SERVER_DOWNGRADE_NOT_PATCH 14061 #define ER_FAILED_GET_DD_PROPERTY 14062 #define ER_FAILED_SET_DD_PROPERTY 14063 #define ER_SERVER_DOWNGRADE_STATUS 14064 #define ER_INFORMATION_SCHEMA_VERSION_CHANGE 14065 #define ER_PERFORMANCE_SCHEMA_VERSION_CHANGE 14066 #define ER_WARN_DEPRECATED_OR_BLOCKED_CIPHER 14067 #define ER_IB_MSG_DDL_FAIL_NO_BUILDER 14068 #define ER_GRP_RPL_MEMBER_INFO_DOES_NOT_EXIST 14069 #define ER_USAGE_DEPRECATION_COUNTER 14070 #define ER_WAITING_FOR_NO_CONNECTIONS 14071 #define ER_WAITING_FOR_NO_THDS 14072 #define ER_IB_INDEX_PART_TOO_LONG 14073 #define ER_DD_UPDATE_DATADIR_FLAG_FAIL 14074 #define ER_IB_MSG_FIL_STATE_MOVED_PREV 14075 #define ER_RPL_KILL_OLD_DUMP_THREAD_ENCOUNTERED 14076 #define ER_RPL_MTA_ALLOW_COMMIT_OUT_OF_ORDER 14077 static const int obsolete_error_count = 557; static const int pfs_no_error_stat_count = 2; static const int pfs_session_error_stat_count = 1639; static const int pfs_global_error_stat_count = 3674; #endif PKZǿ[##$mysql/mysql/udf_registration_types.hnu[/* Copyright (c) 2017, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef UDF_REGISTRATION_TYPES_H #define UDF_REGISTRATION_TYPES_H #ifndef MYSQL_ABI_CHECK #include #endif /** Type of the user defined function return slot and arguments */ enum Item_result { INVALID_RESULT = -1, /** not valid for UDFs */ STRING_RESULT = 0, /** char * */ REAL_RESULT, /** double */ INT_RESULT, /** long long */ ROW_RESULT, /** not valid for UDFs */ DECIMAL_RESULT /** char *, to be converted to/from a decimal */ }; typedef struct UDF_ARGS { unsigned int arg_count; /**< Number of arguments */ enum Item_result *arg_type; /**< Pointer to item_results */ char **args; /**< Pointer to argument */ unsigned long *lengths; /**< Length of string arguments */ char *maybe_null; /**< Set to 1 for all maybe_null args */ char **attributes; /**< Pointer to attribute name */ unsigned long *attribute_lengths; /**< Length of attribute arguments */ void *extension; } UDF_ARGS; /** Information about the result of a user defined function @todo add a notion for determinism of the UDF. @sa Item_udf_func::update_used_tables() */ typedef struct UDF_INIT { bool maybe_null; /** 1 if function can return NULL */ unsigned int decimals; /** for real functions */ unsigned long max_length; /** For string functions */ char *ptr; /** free pointer for function data */ bool const_item; /** 1 if function always returns the same value */ void *extension; } UDF_INIT; enum Item_udftype { UDFTYPE_FUNCTION = 1, UDFTYPE_AGGREGATE }; typedef void (*Udf_func_clear)(UDF_INIT *, unsigned char *, unsigned char *); typedef void (*Udf_func_add)(UDF_INIT *, UDF_ARGS *, unsigned char *, unsigned char *); typedef void (*Udf_func_deinit)(UDF_INIT *); typedef bool (*Udf_func_init)(UDF_INIT *, UDF_ARGS *, char *); typedef void (*Udf_func_any)(void); typedef double (*Udf_func_double)(UDF_INIT *, UDF_ARGS *, unsigned char *, unsigned char *); typedef long long (*Udf_func_longlong)(UDF_INIT *, UDF_ARGS *, unsigned char *, unsigned char *); typedef char *(*Udf_func_string)(UDF_INIT *, UDF_ARGS *, char *, unsigned long *, unsigned char *, unsigned char *); #endif /* UDF_REGISTRATION_TYPES_H */ PKZ mysql/mysql/plugin_auth_common.hnu[#ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED /* Copyright (c) 2010, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file include/mysql/plugin_auth_common.h This file defines constants and data structures that are the same for both client- and server-side authentication plugins. */ #define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED /** the max allowed length for a user name */ #define MYSQL_USERNAME_LENGTH 96 /** return values of the plugin authenticate_user() method. */ /** Authentication failed, plugin internal error. An error occurred in the authentication plugin itself. These errors are reported in table performance_schema.host_cache, column COUNT_AUTH_PLUGIN_ERRORS. */ #define CR_AUTH_PLUGIN_ERROR 3 /** Authentication failed, client server handshake. An error occurred during the client server handshake. These errors are reported in table performance_schema.host_cache, column COUNT_HANDSHAKE_ERRORS. */ #define CR_AUTH_HANDSHAKE 2 /** Authentication failed, user credentials. For example, wrong passwords. These errors are reported in table performance_schema.host_cache, column COUNT_AUTHENTICATION_ERRORS. */ #define CR_AUTH_USER_CREDENTIALS 1 /** Authentication failed. Additionally, all other CR_xxx values (libmysql error code) can be used too. The client plugin may set the error code and the error message directly in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error code was returned, an error message in the MYSQL structure will be overwritten. If CR_ERROR is returned without setting the error in MYSQL, CR_UNKNOWN_ERROR will be user. */ #define CR_ERROR 0 /** Authentication (client part) was successful. It does not mean that the authentication as a whole was successful, usually it only means that the client was able to send the user name and the password to the server. If CR_OK is returned, the libmysql reads the next packet expecting it to be one of OK, ERROR, or CHANGE_PLUGIN packets. */ #define CR_OK -1 /** Authentication was successful. It means that the client has done its part successfully and also that a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN). In this case, libmysql will not read a packet from the server, but it will use the data at mysql->net.read_pos. A plugin may return this value if the number of roundtrips in the authentication protocol is not known in advance, and the client plugin needs to read one packet more to determine if the authentication is finished or not. */ #define CR_OK_HANDSHAKE_COMPLETE -2 /** Authentication was successful with limited operations. It means that the both client and server side plugins decided to allow authentication with very limited operations ALTER USER to do registration. */ #define CR_OK_AUTH_IN_SANDBOX_MODE -3 /** Flag to be passed back to server from authentication plugins via authenticated_as when proxy mapping should be done by the server. */ #define PROXY_FLAG 0 /* We need HANDLE definition if on Windows. Define WIN32_LEAN_AND_MEAN (if not already done) to minimize amount of imported declarations. */ #if defined(_WIN32) && !defined(MYSQL_ABI_CHECK) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include #endif struct MYSQL_PLUGIN_VIO_INFO { enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET, MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol; int socket; /**< it's set, if the protocol is SOCKET or TCP */ #if defined(_WIN32) && !defined(MYSQL_ABI_CHECK) HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */ #endif }; /* state of an asynchronous operation */ enum net_async_status { NET_ASYNC_COMPLETE = 0, NET_ASYNC_NOT_READY, NET_ASYNC_ERROR, NET_ASYNC_COMPLETE_NO_MORE_RESULTS }; /** Provides plugin access to communication channel */ typedef struct MYSQL_PLUGIN_VIO { /** Plugin provides a pointer reference and this function sets it to the contents of any incoming packet. Returns the packet length, or -1 if the plugin should terminate. */ int (*read_packet)(struct MYSQL_PLUGIN_VIO *vio, unsigned char **buf); /** Plugin provides a buffer with data and the length and this function sends it as a packet. Returns 0 on success, 1 on failure. */ int (*write_packet)(struct MYSQL_PLUGIN_VIO *vio, const unsigned char *packet, int packet_len); /** Fills in a MYSQL_PLUGIN_VIO_INFO structure, providing the information about the connection. */ void (*info)(struct MYSQL_PLUGIN_VIO *vio, struct MYSQL_PLUGIN_VIO_INFO *info); /** Non blocking version of read_packet. This function points buf to starting position of incoming packet. When this function returns NET_ASYNC_NOT_READY plugin should call this function again until all incoming packets are read. If return code is NET_ASYNC_COMPLETE, plugin can do further processing of read packets. */ enum net_async_status (*read_packet_nonblocking)(struct MYSQL_PLUGIN_VIO *vio, unsigned char **buf, int *result); /** Non blocking version of write_packet. Sends data available in pkt of length pkt_len to server in asynchronous way. */ enum net_async_status (*write_packet_nonblocking)( struct MYSQL_PLUGIN_VIO *vio, const unsigned char *pkt, int pkt_len, int *result); } MYSQL_PLUGIN_VIO; #endif PKZb mysql/mysql/client_plugin.hnu[#ifndef MYSQL_CLIENT_PLUGIN_INCLUDED /* Copyright (c) 2010, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file include/mysql/client_plugin.h MySQL Client Plugin API. This file defines the API for plugins that work on the client side */ #define MYSQL_CLIENT_PLUGIN_INCLUDED #ifndef MYSQL_ABI_CHECK #include #include #endif /* On Windows, exports from DLL need to be declared. Also, plugin needs to be declared as extern "C" because MSVC unlike other compilers, uses C++ mangling for variables not only for functions. */ #if defined(_MSC_VER) #if defined(MYSQL_DYNAMIC_CLIENT_PLUGIN) #ifdef __cplusplus #define MYSQL_CLIENT_PLUGIN_EXPORT extern "C" __declspec(dllexport) #else #define MYSQL_CLIENT_PLUGIN_EXPORT __declspec(dllexport) #endif #else /* MYSQL_DYNAMIC_CLIENT_PLUGIN */ #ifdef __cplusplus #define MYSQL_CLIENT_PLUGIN_EXPORT extern "C" #else #define MYSQL_CLIENT_PLUGIN_EXPORT #endif #endif /*MYSQL_DYNAMIC_CLIENT_PLUGIN */ #else /*_MSC_VER */ #if defined(MYSQL_DYNAMIC_CLIENT_PLUGIN) #define MYSQL_CLIENT_PLUGIN_EXPORT MY_ATTRIBUTE((visibility("default"))) #else #define MYSQL_CLIENT_PLUGIN_EXPORT #endif #endif #ifdef __cplusplus extern "C" { #endif /* known plugin types */ #define MYSQL_CLIENT_reserved1 0 #define MYSQL_CLIENT_reserved2 1 #define MYSQL_CLIENT_AUTHENTICATION_PLUGIN 2 #define MYSQL_CLIENT_TRACE_PLUGIN 3 #define MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION 0x0200 #define MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION 0x0200 #define MYSQL_CLIENT_MAX_PLUGINS 4 #define MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE "Oracle Corporation" #define mysql_declare_client_plugin(X) \ MYSQL_CLIENT_PLUGIN_EXPORT st_mysql_client_plugin_##X \ _mysql_client_plugin_declaration_ = { \ MYSQL_CLIENT_##X##_PLUGIN, \ MYSQL_CLIENT_##X##_PLUGIN_INTERFACE_VERSION, #define mysql_end_client_plugin } /* generic plugin header structure */ #define MYSQL_CLIENT_PLUGIN_HEADER \ int type; \ unsigned int interface_version; \ const char *name; \ const char *author; \ const char *desc; \ unsigned int version[3]; \ const char *license; \ void *mysql_api; \ int (*init)(char *, size_t, int, va_list); \ int (*deinit)(void); \ int (*options)(const char *option, const void *); \ int (*get_options)(const char *option, void *); struct st_mysql_client_plugin { MYSQL_CLIENT_PLUGIN_HEADER }; struct MYSQL; /******** authentication plugin specific declarations *********/ #include "plugin_auth_common.h" struct auth_plugin_t { MYSQL_CLIENT_PLUGIN_HEADER int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct MYSQL *mysql); enum net_async_status (*authenticate_user_nonblocking)(MYSQL_PLUGIN_VIO *vio, struct MYSQL *mysql, int *result); }; // Needed for the mysql_declare_client_plugin() macro. Do not use elsewhere. typedef struct auth_plugin_t st_mysql_client_plugin_AUTHENTICATION; /******** using plugins ************/ /** loads a plugin and initializes it @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded, -1 to disable type check @param argc number of arguments to pass to the plugin initialization function @param ... arguments for the plugin initialization function @retval a pointer to the loaded plugin, or NULL in case of a failure */ struct st_mysql_client_plugin *mysql_load_plugin(struct MYSQL *mysql, const char *name, int type, int argc, ...); /** loads a plugin and initializes it, taking va_list as an argument This is the same as mysql_load_plugin, but take va_list instead of a list of arguments. @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded, -1 to disable type check @param argc number of arguments to pass to the plugin initialization function @param args arguments for the plugin initialization function @retval a pointer to the loaded plugin, or NULL in case of a failure */ struct st_mysql_client_plugin *mysql_load_plugin_v(struct MYSQL *mysql, const char *name, int type, int argc, va_list args); /** finds an already loaded plugin by name, or loads it, if necessary @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded @retval a pointer to the plugin, or NULL in case of a failure */ struct st_mysql_client_plugin *mysql_client_find_plugin(struct MYSQL *mysql, const char *name, int type); /** adds a plugin structure to the list of loaded plugins This is useful if an application has the necessary functionality (for example, a special load data handler) statically linked into the application binary. It can use this function to register the plugin directly, avoiding the need to factor it out into a shared object. @param mysql MYSQL structure. It is only used for error reporting @param plugin an st_mysql_client_plugin structure to register @retval a pointer to the plugin, or NULL in case of a failure */ struct st_mysql_client_plugin *mysql_client_register_plugin( struct MYSQL *mysql, struct st_mysql_client_plugin *plugin); /** set plugin options Can be used to set extra options and affect behavior for a plugin. This function may be called multiple times to set several options @param plugin an st_mysql_client_plugin structure @param option a string which specifies the option to set @param value value for the option. @retval 0 on success, 1 in case of failure **/ int mysql_plugin_options(struct st_mysql_client_plugin *plugin, const char *option, const void *value); /** get plugin options Can be used to get options from a plugin. This function may be called multiple times to get several options @param plugin an st_mysql_client_plugin structure @param option a string which specifies the option to get @param[out] value value for the option. @retval 0 on success, 1 in case of failure **/ int mysql_plugin_get_option(struct st_mysql_client_plugin *plugin, const char *option, void *value); #ifdef __cplusplus } #endif #endif PKZ>mysql/mysql_time.hnu[/* Copyright (c) 2004, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _mysql_time_h_ #define _mysql_time_h_ /** @file include/mysql_time.h Time declarations shared between the server and client API: you should not add anything to this header unless it's used (and hence should be visible) in mysql.h. If you're looking for a place to add new time-related declaration, it's most likely my_time.h. See also "C API Handling of Date and Time Values" chapter in documentation. */ // Do not not pull in the server header "my_inttypes.h" from client code. // IWYU pragma: no_include "my_inttypes.h" enum enum_mysql_timestamp_type { MYSQL_TIMESTAMP_NONE = -2, MYSQL_TIMESTAMP_ERROR = -1, /// Stores year, month and day components. MYSQL_TIMESTAMP_DATE = 0, /** Stores all date and time components. Value is in UTC for `TIMESTAMP` type. Value is in local time zone for `DATETIME` type. */ MYSQL_TIMESTAMP_DATETIME = 1, /// Stores hour, minute, second and microsecond. MYSQL_TIMESTAMP_TIME = 2, /** A temporary type for `DATETIME` or `TIMESTAMP` types equipped with time zone information. After the time zone information is reconciled, the type is converted to MYSQL_TIMESTAMP_DATETIME. */ MYSQL_TIMESTAMP_DATETIME_TZ = 3 }; /* Structure which is used to represent datetime values inside MySQL. We assume that values in this structure are normalized, i.e. year <= 9999, month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions in server such as my_system_gmt_sec() or make_time() family of functions rely on this (actually now usage of make_*() family relies on a bit weaker restriction). Also functions that produce MYSQL_TIME as result ensure this. There is one exception to this rule though if this structure holds time value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold bigger values. */ typedef struct MYSQL_TIME { unsigned int year, month, day, hour, minute, second; unsigned long second_part; /**< microseconds */ bool neg; enum enum_mysql_timestamp_type time_type; /// The time zone displacement, specified in seconds. int time_zone_displacement; } MYSQL_TIME; #endif /* _mysql_time_h_ */ PKZR mysql/mysql_com.hnu[/* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file include/mysql_com.h Common definition between mysql server & client. */ #ifndef _mysql_com_h #define _mysql_com_h #ifndef MYSQL_ABI_CHECK #include #include #endif #include "my_command.h" #include "my_compress.h" /* We need a definition for my_socket. On the client, already provides it, but on the server side, we need to get it from a header. */ #ifndef my_socket_defined #include "my_io.h" #include "mysql/components/services/bits/my_io_bits.h" #endif #ifndef MYSQL_ABI_CHECK #include #endif #define SYSTEM_CHARSET_MBMAXLEN 3 #define FILENAME_CHARSET_MBMAXLEN 5 #define NAME_CHAR_LEN 64 /**< Field/table name length */ #define PARTITION_EXPR_CHAR_LEN \ 2048 /**< Maximum expression length in chars \ */ #define USERNAME_CHAR_LENGTH 32 #define USERNAME_CHAR_LENGTH_STR "32" #ifndef NAME_LEN #define NAME_LEN (NAME_CHAR_LEN * SYSTEM_CHARSET_MBMAXLEN) #endif #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH * SYSTEM_CHARSET_MBMAXLEN) #define CONNECT_STRING_MAXLEN 1024 #define MYSQL_AUTODETECT_CHARSET_NAME "auto" #define SERVER_VERSION_LENGTH 60 #define SQLSTATE_LENGTH 5 /* In FIDO terminology, relying party is the server where required services are running. Relying party ID is unique name given to server. */ #define RELYING_PARTY_ID_LENGTH 255 /* Length of random salt sent during fido registration */ #define CHALLENGE_LENGTH 32 /* Maximum authentication factors server supports */ #define MAX_AUTH_FACTORS 3 /** Maximum length of comments pre 5.6: 60 characters */ #define TABLE_COMMENT_INLINE_MAXLEN 180 #define TABLE_COMMENT_MAXLEN 2048 #define COLUMN_COMMENT_MAXLEN 1024 #define INDEX_COMMENT_MAXLEN 1024 #define TABLE_PARTITION_COMMENT_MAXLEN 1024 #define TABLESPACE_COMMENT_MAXLEN 2048 /** Maximum length of protocol packet. @ref page_protocol_basic_ok_packet length limit also restricted to this value as any length greater than this value will have first byte of @ref page_protocol_basic_ok_packet to be 254 thus does not provide a means to identify if this is @ref page_protocol_basic_ok_packet or @ref page_protocol_basic_eof_packet. */ #define MAX_PACKET_LENGTH (256L * 256L * 256L - 1) #define LOCAL_HOST "localhost" #define LOCAL_HOST_NAMEDPIPE "." #if defined(_WIN32) #define MYSQL_NAMEDPIPE "MySQL" #define MYSQL_SERVICENAME "MySQL" #endif /* _WIN32 */ /** The length of the header part for each generated column in the .frm file.*/ #define FRM_GCOL_HEADER_SIZE 4 /** Maximum length of the expression statement defined for generated columns. */ #define GENERATED_COLUMN_EXPRESSION_MAXLEN 65535 - FRM_GCOL_HEADER_SIZE /** Length of random string sent by server on handshake; this is also length of obfuscated password, received from client */ #define SCRAMBLE_LENGTH 20 #define AUTH_PLUGIN_DATA_PART_1_LENGTH 8 /** length of password stored in the db: new passwords are preceded with '*'*/ #define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH * 2 + 1) /** @defgroup group_cs_column_definition_flags Column Definition Flags @ingroup group_cs @brief Values for the flags bitmask used by ::Send_field:flags Currently need to fit into 32 bits. Each bit represents an optional feature of the protocol. Both the client and the server are sending these. The intersection of the two determines what optional parts of the protocol will be used. */ /** @addtogroup group_cs_column_definition_flags @{ */ #define NOT_NULL_FLAG 1 /**< Field can't be NULL */ #define PRI_KEY_FLAG 2 /**< Field is part of a primary key */ #define UNIQUE_KEY_FLAG 4 /**< Field is part of a unique key */ #define MULTIPLE_KEY_FLAG 8 /**< Field is part of a key */ #define BLOB_FLAG 16 /**< Field is a blob */ #define UNSIGNED_FLAG 32 /**< Field is unsigned */ #define ZEROFILL_FLAG 64 /**< Field is zerofill */ #define BINARY_FLAG 128 /**< Field is binary */ /* The following are only sent to new clients */ #define ENUM_FLAG 256 /**< field is an enum */ #define AUTO_INCREMENT_FLAG 512 /**< field is a autoincrement field */ #define TIMESTAMP_FLAG 1024 /**< Field is a timestamp */ #define SET_FLAG 2048 /**< field is a set */ #define NO_DEFAULT_VALUE_FLAG 4096 /**< Field doesn't have default value */ #define ON_UPDATE_NOW_FLAG 8192 /**< Field is set to NOW on UPDATE */ #define NUM_FLAG 32768 /**< Field is num (for clients) */ #define PART_KEY_FLAG 16384 /**< Intern; Part of some key */ #define GROUP_FLAG 32768 /**< Intern: Group field */ #define UNIQUE_FLAG 65536 /**< Intern: Used by sql_yacc */ #define BINCMP_FLAG 131072 /**< Intern: Used by sql_yacc */ #define GET_FIXED_FIELDS_FLAG \ (1 << 18) /**< Used to get fields in item tree \ */ #define FIELD_IN_PART_FUNC_FLAG (1 << 19) /**< Field part of partition func */ /** Intern: Field in TABLE object for new version of altered table, which participates in a newly added index. */ #define FIELD_IN_ADD_INDEX (1 << 20) #define FIELD_IS_RENAMED (1 << 21) /**< Intern: Field is being renamed */ #define FIELD_FLAGS_STORAGE_MEDIA 22 /**< Field storage media, bit 22-23 */ #define FIELD_FLAGS_STORAGE_MEDIA_MASK (3 << FIELD_FLAGS_STORAGE_MEDIA) #define FIELD_FLAGS_COLUMN_FORMAT 24 /**< Field column format, bit 24-25 */ #define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT) #define FIELD_IS_DROPPED (1 << 26) /**< Intern: Field is being dropped */ #define EXPLICIT_NULL_FLAG \ (1 << 27) /**< Field is explicitly specified as \ NULL by the user */ /* 1 << 28 is unused. */ /** Field will not be loaded in secondary engine. */ #define NOT_SECONDARY_FLAG (1 << 29) /** Field is explicitly marked as invisible by the user. */ #define FIELD_IS_INVISIBLE (1 << 30) /** @}*/ /** @defgroup group_cs_com_refresh_flags COM_REFRESH Flags @ingroup group_cs @brief Values for the `sub_command` in ::COM_REFRESH Currently the protocol carries only 8 bits of these flags. The rest (8-end) are used only internally in the server. */ /** @addtogroup group_cs_com_refresh_flags @{ */ #define REFRESH_GRANT 1 /**< Refresh grant tables, FLUSH PRIVILEGES */ #define REFRESH_LOG 2 /**< Start on new log file, FLUSH LOGS */ #define REFRESH_TABLES 4 /**< close all tables, FLUSH TABLES */ #define REFRESH_HOSTS 8 /**< Flush host cache, FLUSH HOSTS */ #define REFRESH_STATUS 16 /**< Flush status variables, FLUSH STATUS */ #define REFRESH_THREADS 32 /**< Flush thread cache */ #define REFRESH_REPLICA \ 64 /**< Reset master info and restart replica \ thread, RESET REPLICA */ #define REFRESH_SLAVE \ REFRESH_REPLICA /**< Reset master info and restart replica \ thread, RESET REPLICA. This is deprecated, \ use REFRESH_REPLICA instead. */ #define REFRESH_MASTER \ 128 /**< Remove all bin logs in the index \ and truncate the index, RESET MASTER */ #define REFRESH_ERROR_LOG 256 /**< Rotate only the error log */ #define REFRESH_ENGINE_LOG 512 /**< Flush all storage engine logs */ #define REFRESH_BINARY_LOG 1024 /**< Flush the binary log */ #define REFRESH_RELAY_LOG 2048 /**< Flush the relay log */ #define REFRESH_GENERAL_LOG 4096 /**< Flush the general log */ #define REFRESH_SLOW_LOG 8192 /**< Flush the slow query log */ #define REFRESH_READ_LOCK 16384 /**< Lock tables for read. */ /** Wait for an impending flush before closing the tables. @sa REFRESH_READ_LOCK, handle_reload_request, close_cached_tables */ #define REFRESH_FAST 32768 #define REFRESH_USER_RESOURCES \ 0x80000L /** FLUSH RESOURCES. @sa ::reset_mqh \ */ #define REFRESH_FOR_EXPORT 0x100000L /** FLUSH TABLES ... FOR EXPORT */ #define REFRESH_OPTIMIZER_COSTS 0x200000L /** FLUSH OPTIMIZER_COSTS */ #define REFRESH_PERSIST 0x400000L /** RESET PERSIST */ /** @}*/ /** @defgroup group_cs_capabilities_flags Capabilities Flags @ingroup group_cs @brief Values for the capabilities flag bitmask used by the MySQL protocol Currently need to fit into 32 bits. Each bit represents an optional feature of the protocol. Both the client and the server are sending these. The intersection of the two determines whast optional parts of the protocol will be used. */ /** @addtogroup group_cs_capabilities_flags @{ */ /** Use the improved version of Old Password Authentication. Not used. @note Assumed to be set since 4.1.1. */ #define CLIENT_LONG_PASSWORD 1 /** Send found rows instead of affected rows in @ref page_protocol_basic_eof_packet */ #define CLIENT_FOUND_ROWS 2 /** @brief Get all column flags Longer flags in Protocol::ColumnDefinition320. @todo Reference Protocol::ColumnDefinition320 Server ------ Supports longer flags. Client ------ Expects longer flags. */ #define CLIENT_LONG_FLAG 4 /** Database (schema) name can be specified on connect in Handshake Response Packet. @todo Reference Handshake Response Packet. Server ------ Supports schema-name in Handshake Response Packet. Client ------ Handshake Response Packet contains a schema-name. @sa send_client_reply_packet() */ #define CLIENT_CONNECT_WITH_DB 8 #define CLIENT_NO_SCHEMA \ 16 /**< DEPRECATED: Don't allow database.table.column */ /** Compression protocol supported. @todo Reference Compression Server ------ Supports compression. Client ------ Switches to Compression compressed protocol after successful authentication. */ #define CLIENT_COMPRESS 32 /** Special handling of ODBC behavior. @note No special behavior since 3.22. */ #define CLIENT_ODBC 64 /** Can use LOAD DATA LOCAL. Server ------ Enables the LOCAL INFILE request of LOAD DATA|XML. Client ------ Will handle LOCAL INFILE request. */ #define CLIENT_LOCAL_FILES 128 /** Ignore spaces before '(' Server ------ Parser can ignore spaces before '('. Client ------ Let the parser ignore spaces before '('. */ #define CLIENT_IGNORE_SPACE 256 /** New 4.1 protocol @todo Reference the new 4.1 protocol Server ------ Supports the 4.1 protocol. Client ------ Uses the 4.1 protocol. @note this value was CLIENT_CHANGE_USER in 3.22, unused in 4.0 */ #define CLIENT_PROTOCOL_41 512 /** This is an interactive client Use @ref System_variables::net_wait_timeout versus @ref System_variables::net_interactive_timeout. Server ------ Supports interactive and noninteractive clients. Client ------ Client is interactive. @sa mysql_real_connect() */ #define CLIENT_INTERACTIVE 1024 /** Use SSL encryption for the session @todo Reference SSL Server ------ Supports SSL Client ------ Switch to SSL after sending the capability-flags. */ #define CLIENT_SSL 2048 /** Client only flag. Not used. Client ------ Do not issue SIGPIPE if network failures occur (libmysqlclient only). @sa mysql_real_connect() */ #define CLIENT_IGNORE_SIGPIPE 4096 /** Client knows about transactions Server ------ Can send status flags in @ref page_protocol_basic_ok_packet / @ref page_protocol_basic_eof_packet. Client ------ Expects status flags in @ref page_protocol_basic_ok_packet / @ref page_protocol_basic_eof_packet. @note This flag is optional in 3.23, but always set by the server since 4.0. @sa send_server_handshake_packet(), parse_client_handshake_packet(), net_send_ok(), net_send_eof() */ #define CLIENT_TRANSACTIONS 8192 #define CLIENT_RESERVED 16384 /**< DEPRECATED: Old flag for 4.1 protocol */ #define CLIENT_RESERVED2 \ 32768 /**< DEPRECATED: Old flag for 4.1 authentication \ CLIENT_SECURE_CONNECTION */ /** Enable/disable multi-stmt support Also sets @ref CLIENT_MULTI_RESULTS. Currently not checked anywhere. Server ------ Can handle multiple statements per COM_QUERY and COM_STMT_PREPARE. Client ------- May send multiple statements per COM_QUERY and COM_STMT_PREPARE. @note Was named ::CLIENT_MULTI_QUERIES in 4.1.0, renamed later. Requires -------- ::CLIENT_PROTOCOL_41 @todo Reference COM_QUERY and COM_STMT_PREPARE */ #define CLIENT_MULTI_STATEMENTS (1UL << 16) /** Enable/disable multi-results Server ------ Can send multiple resultsets for COM_QUERY. Error if the server needs to send them and client does not support them. Client ------- Can handle multiple resultsets for COM_QUERY. Requires -------- ::CLIENT_PROTOCOL_41 @sa mysql_execute_command(), sp_head::MULTI_RESULTS */ #define CLIENT_MULTI_RESULTS (1UL << 17) /** Multi-results and OUT parameters in PS-protocol. Server ------ Can send multiple resultsets for COM_STMT_EXECUTE. Client ------ Can handle multiple resultsets for COM_STMT_EXECUTE. Requires -------- ::CLIENT_PROTOCOL_41 @todo Reference COM_STMT_EXECUTE and PS-protocol @sa Protocol_binary::send_out_parameters */ #define CLIENT_PS_MULTI_RESULTS (1UL << 18) /** Client supports plugin authentication Server ------ Sends extra data in Initial Handshake Packet and supports the pluggable authentication protocol. Client ------ Supports authentication plugins. Requires -------- ::CLIENT_PROTOCOL_41 @todo Reference plugin authentication, Initial Handshake Packet, Authentication plugins @sa send_change_user_packet(), send_client_reply_packet(), run_plugin_auth(), parse_com_change_user_packet(), parse_client_handshake_packet() */ #define CLIENT_PLUGIN_AUTH (1UL << 19) /** Client supports connection attributes Server ------ Permits connection attributes in Protocol::HandshakeResponse41. Client ------ Sends connection attributes in Protocol::HandshakeResponse41. @todo Reference Protocol::HandshakeResponse41 @sa send_client_connect_attrs(), read_client_connect_attrs() */ #define CLIENT_CONNECT_ATTRS (1UL << 20) /** Enable authentication response packet to be larger than 255 bytes. When the ability to change default plugin require that the initial password field in the Protocol::HandshakeResponse41 paclet can be of arbitrary size. However, the 4.1 client-server protocol limits the length of the auth-data-field sent from client to server to 255 bytes. The solution is to change the type of the field to a true length encoded string and indicate the protocol change with this client capability flag. Server ------ Understands length-encoded integer for auth response data in Protocol::HandshakeResponse41. Client ------ Length of auth response data in Protocol::HandshakeResponse41 is a length-encoded integer. @todo Reference Protocol::HandshakeResponse41 @note The flag was introduced in 5.6.6, but had the wrong value. @sa send_client_reply_packet(), parse_client_handshake_packet(), get_56_lenc_string(), get_41_lenc_string() */ #define CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA (1UL << 21) /** Don't close the connection for a user account with expired password. Server ------ Announces support for expired password extension. Client ------ Can handle expired passwords. @todo Reference expired password @sa MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, disconnect_on_expired_password ACL_USER::password_expired, check_password_lifetime(), acl_authenticate() */ #define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22) /** Capable of handling server state change information. Its a hint to the server to include the state change information in @ref page_protocol_basic_ok_packet. Server ------ Can set ::SERVER_SESSION_STATE_CHANGED in the ::SERVER_STATUS_flags_enum and send @ref sect_protocol_basic_ok_packet_sessinfo in a @ref page_protocol_basic_ok_packet. Client ------ Expects the server to send @ref sect_protocol_basic_ok_packet_sessinfo in a @ref page_protocol_basic_ok_packet. @sa enum_session_state_type, read_ok_ex(), net_send_ok(), Session_tracker, State_tracker */ #define CLIENT_SESSION_TRACK (1UL << 23) /** Client no longer needs @ref page_protocol_basic_eof_packet and will use @ref page_protocol_basic_ok_packet instead. @sa net_send_ok() Server ------ Can send OK after a Text Resultset. Client ------ Expects an @ref page_protocol_basic_ok_packet (instead of @ref page_protocol_basic_eof_packet) after the resultset rows of a Text Resultset. Background ---------- To support ::CLIENT_SESSION_TRACK, additional information must be sent after all successful commands. Although the @ref page_protocol_basic_ok_packet is extensible, the @ref page_protocol_basic_eof_packet is not due to the overlap of its bytes with the content of the Text Resultset Row. Therefore, the @ref page_protocol_basic_eof_packet in the Text Resultset is replaced with an @ref page_protocol_basic_ok_packet. @ref page_protocol_basic_eof_packet is deprecated as of MySQL 5.7.5. @todo Reference Text Resultset @sa cli_safe_read_with_ok(), read_ok_ex(), net_send_ok(), net_send_eof() */ #define CLIENT_DEPRECATE_EOF (1UL << 24) /** The client can handle optional metadata information in the resultset. */ #define CLIENT_OPTIONAL_RESULTSET_METADATA (1UL << 25) /** Compression protocol extended to support zstd compression method This capability flag is used to send zstd compression level between client and server provided both client and server are enabled with this flag. Server ------ Server sets this flag when global variable protocol-compression-algorithms has zstd in its list of supported values. Client ------ Client sets this flag when it is configured to use zstd compression method. */ #define CLIENT_ZSTD_COMPRESSION_ALGORITHM (1UL << 26) /** Support optional extension for query parameters into the @ref page_protocol_com_query and @ref page_protocol_com_stmt_execute packets. Server ------ Expects an optional part containing the query parameter set(s). Executes the query for each set of parameters or returns an error if more than 1 set of parameters is sent and the server can't execute it. Client ------ Can send the optional part containing the query parameter set(s). */ #define CLIENT_QUERY_ATTRIBUTES (1UL << 27) /** Support Multi factor authentication. Server ------ Server sends AuthNextFactor packet after every nth factor authentication method succeeds, except the last factor authentication. Client ------ Client reads AuthNextFactor packet sent by server and initiates next factor authentication method. */ #define MULTI_FACTOR_AUTHENTICATION (1UL << 28) /** This flag will be reserved to extend the 32bit capabilities structure to 64bits. */ #define CLIENT_CAPABILITY_EXTENSION (1UL << 29) /** Verify server certificate. Client only flag. @deprecated in favor of --ssl-mode. */ #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) /** Don't reset the options after an unsuccessful connect Client only flag. Typically passed via ::mysql_real_connect() 's client_flag parameter. @sa mysql_real_connect() */ #define CLIENT_REMEMBER_OPTIONS (1UL << 31) /** @}*/ /** a compatibility alias for CLIENT_COMPRESS */ #define CAN_CLIENT_COMPRESS CLIENT_COMPRESS /** Gather all possible capabilities (flags) supported by the server */ #define CLIENT_ALL_FLAGS \ (CLIENT_LONG_PASSWORD | CLIENT_FOUND_ROWS | CLIENT_LONG_FLAG | \ CLIENT_CONNECT_WITH_DB | CLIENT_NO_SCHEMA | CLIENT_COMPRESS | CLIENT_ODBC | \ CLIENT_LOCAL_FILES | CLIENT_IGNORE_SPACE | CLIENT_PROTOCOL_41 | \ CLIENT_INTERACTIVE | CLIENT_SSL | CLIENT_IGNORE_SIGPIPE | \ CLIENT_TRANSACTIONS | CLIENT_RESERVED | CLIENT_RESERVED2 | \ CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS | CLIENT_PS_MULTI_RESULTS | \ CLIENT_SSL_VERIFY_SERVER_CERT | CLIENT_REMEMBER_OPTIONS | \ CLIENT_PLUGIN_AUTH | CLIENT_CONNECT_ATTRS | \ CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | \ CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS | CLIENT_SESSION_TRACK | \ CLIENT_DEPRECATE_EOF | CLIENT_OPTIONAL_RESULTSET_METADATA | \ CLIENT_ZSTD_COMPRESSION_ALGORITHM | CLIENT_QUERY_ATTRIBUTES | \ MULTI_FACTOR_AUTHENTICATION) /** Switch off from ::CLIENT_ALL_FLAGS the flags that are optional and depending on build flags. If any of the optional flags is supported by the build it will be switched on before sending to the client during the connection handshake. */ #define CLIENT_BASIC_FLAGS \ (CLIENT_ALL_FLAGS & \ ~(CLIENT_SSL | CLIENT_COMPRESS | CLIENT_SSL_VERIFY_SERVER_CERT | \ CLIENT_ZSTD_COMPRESSION_ALGORITHM)) /** The status flags are a bit-field */ enum SERVER_STATUS_flags_enum { /** Is raised when a multi-statement transaction has been started, either explicitly, by means of BEGIN or COMMIT AND CHAIN, or implicitly, by the first transactional statement, when autocommit=off. */ SERVER_STATUS_IN_TRANS = 1, SERVER_STATUS_AUTOCOMMIT = 2, /**< Server in auto_commit mode */ SERVER_MORE_RESULTS_EXISTS = 8, /**< Multi query - next query exists */ SERVER_QUERY_NO_GOOD_INDEX_USED = 16, SERVER_QUERY_NO_INDEX_USED = 32, /** The server was able to fulfill the clients request and opened a read-only non-scrollable cursor for a query. This flag comes in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. Used by Binary Protocol Resultset to signal that COM_STMT_FETCH must be used to fetch the row-data. @todo Refify "Binary Protocol Resultset" and "COM_STMT_FETCH". */ SERVER_STATUS_CURSOR_EXISTS = 64, /** This flag is sent when a read-only cursor is exhausted, in reply to COM_STMT_FETCH command. */ SERVER_STATUS_LAST_ROW_SENT = 128, SERVER_STATUS_DB_DROPPED = 256, /**< A database was dropped */ SERVER_STATUS_NO_BACKSLASH_ESCAPES = 512, /** Sent to the client if after a prepared statement reprepare we discovered that the new statement returns a different number of result set columns. */ SERVER_STATUS_METADATA_CHANGED = 1024, SERVER_QUERY_WAS_SLOW = 2048, /** To mark ResultSet containing output parameter values. */ SERVER_PS_OUT_PARAMS = 4096, /** Set at the same time as SERVER_STATUS_IN_TRANS if the started multi-statement transaction is a read-only transaction. Cleared when the transaction commits or aborts. Since this flag is sent to clients in OK and EOF packets, the flag indicates the transaction status at the end of command execution. */ SERVER_STATUS_IN_TRANS_READONLY = 8192, /** This status flag, when on, implies that one of the state information has changed on the server because of the execution of the last statement. */ SERVER_SESSION_STATE_CHANGED = (1UL << 14) }; /** Server status flags that must be cleared when starting execution of a new SQL statement. Flags from this set are only added to the current server status by the execution engine, but never removed -- the execution engine expects them to disappear automagically by the next command. */ #define SERVER_STATUS_CLEAR_SET \ (SERVER_QUERY_NO_GOOD_INDEX_USED | SERVER_QUERY_NO_INDEX_USED | \ SERVER_MORE_RESULTS_EXISTS | SERVER_STATUS_METADATA_CHANGED | \ SERVER_QUERY_WAS_SLOW | SERVER_STATUS_DB_DROPPED | \ SERVER_STATUS_CURSOR_EXISTS | SERVER_STATUS_LAST_ROW_SENT | \ SERVER_SESSION_STATE_CHANGED) /** Max length of a error message. Should be kept in sync with ::ERRMSGSIZE. */ #define MYSQL_ERRMSG_SIZE 512 #define NET_READ_TIMEOUT 30 /**< Timeout on read */ #define NET_WRITE_TIMEOUT 60 /**< Timeout on write */ #define NET_WAIT_TIMEOUT 8 * 60 * 60 /**< Wait for new query */ /** Flag used by the parser. Kill only the query and not the connection. @sa SQLCOM_KILL, sql_kill(), LEX::type */ #define ONLY_KILL_QUERY 1 #ifndef MYSQL_VIO struct Vio; #define MYSQL_VIO struct Vio * #endif #define MAX_TINYINT_WIDTH 3 /**< Max width for a TINY w.o. sign */ #define MAX_SMALLINT_WIDTH 5 /**< Max width for a SHORT w.o. sign */ #define MAX_MEDIUMINT_WIDTH 8 /**< Max width for a INT24 w.o. sign */ #define MAX_INT_WIDTH 10 /**< Max width for a LONG w.o. sign */ #define MAX_BIGINT_WIDTH 20 /**< Max width for a LONGLONG */ /// Max width for a CHAR column, in number of characters #define MAX_CHAR_WIDTH 255 /// Default width for blob in bytes @todo - align this with sizes from field.h #define MAX_BLOB_WIDTH 16777216 #define NET_ERROR_UNSET 0 /**< No error has occurred yet */ #define NET_ERROR_SOCKET_RECOVERABLE 1 /**< Socket still usable */ #define NET_ERROR_SOCKET_UNUSABLE 2 /**< Do not use the socket */ #define NET_ERROR_SOCKET_NOT_READABLE 3 /**< Try write and close socket */ #define NET_ERROR_SOCKET_NOT_WRITABLE 4 /**< Try read and close socket */ typedef struct NET { MYSQL_VIO vio; unsigned char *buff, *buff_end, *write_pos, *read_pos; my_socket fd; /* For Perl DBI/dbd */ /** Set if we are doing several queries in one command ( as in LOAD TABLE ... FROM MASTER ), and do not want to confuse the client with OK at the wrong time */ unsigned long remain_in_buf, length, buf_length, where_b; unsigned long max_packet, max_packet_size; unsigned int pkt_nr, compress_pkt_nr; unsigned int write_timeout, read_timeout, retry_count; int fcntl; unsigned int *return_status; unsigned char reading_or_writing; unsigned char save_char; bool compress; unsigned int last_errno; unsigned char error; /** Client library error message buffer. Actually belongs to struct MYSQL. */ char last_error[MYSQL_ERRMSG_SIZE]; /** Client library sqlstate buffer. Set along with the error message. */ char sqlstate[SQLSTATE_LENGTH + 1]; /** Extension pointer, for the caller private use. Any program linking with the networking library can use this pointer, which is handy when private connection specific data needs to be maintained. The mysqld server process uses this pointer internally, to maintain the server internal instrumentation for the connection. */ void *extension; } NET; #define packet_error (~(unsigned long)0) /** @addtogroup group_cs_backward_compatibility Backward compatibility @ingroup group_cs @{ */ #define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS #define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL #define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL #define FIELD_TYPE_TINY MYSQL_TYPE_TINY #define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT #define FIELD_TYPE_LONG MYSQL_TYPE_LONG #define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT #define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE #define FIELD_TYPE_NULL MYSQL_TYPE_NULL #define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP #define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG #define FIELD_TYPE_INT24 MYSQL_TYPE_INT24 #define FIELD_TYPE_DATE MYSQL_TYPE_DATE #define FIELD_TYPE_TIME MYSQL_TYPE_TIME #define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME #define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR #define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE #define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM #define FIELD_TYPE_SET MYSQL_TYPE_SET #define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB #define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB #define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB #define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB #define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING #define FIELD_TYPE_STRING MYSQL_TYPE_STRING #define FIELD_TYPE_CHAR MYSQL_TYPE_TINY #define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM #define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY #define FIELD_TYPE_BIT MYSQL_TYPE_BIT /** @}*/ /** @addtogroup group_cs_shutdown_kill_constants Shutdown/kill enums and constants @ingroup group_cs @sa THD::is_killable @{ */ #define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) #define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) #define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) #define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) /** We want levels to be in growing order of hardness (because we use number comparisons). @note ::SHUTDOWN_DEFAULT does not respect the growing property, but it's ok. */ enum mysql_enum_shutdown_level { SHUTDOWN_DEFAULT = 0, /** Wait for existing connections to finish */ SHUTDOWN_WAIT_CONNECTIONS = MYSQL_SHUTDOWN_KILLABLE_CONNECT, /** Wait for existing transactons to finish */ SHUTDOWN_WAIT_TRANSACTIONS = MYSQL_SHUTDOWN_KILLABLE_TRANS, /** Wait for existing updates to finish (=> no partial MyISAM update) */ SHUTDOWN_WAIT_UPDATES = MYSQL_SHUTDOWN_KILLABLE_UPDATE, /** Flush InnoDB buffers and other storage engines' buffers*/ SHUTDOWN_WAIT_ALL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1), /** Don't flush InnoDB buffers, flush other storage engines' buffers*/ SHUTDOWN_WAIT_CRITICAL_BUFFERS = (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1, /** Query level of the KILL command */ KILL_QUERY = 254, /** Connection level of the KILL command */ KILL_CONNECTION = 255 }; /** @}*/ enum enum_resultset_metadata { /** No metadata will be sent. */ RESULTSET_METADATA_NONE = 0, /** The server will send all metadata. */ RESULTSET_METADATA_FULL = 1 }; #if defined(__clang__) // disable -Wdocumentation to workaround // https://bugs.llvm.org/show_bug.cgi?id=38905 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdocumentation" #endif /** The flags used in COM_STMT_EXECUTE. @sa @ref Protocol_classic::parse_packet, @ref mysql_int_serialize_param_data */ #if defined(__clang__) #pragma clang diagnostic pop #endif enum enum_cursor_type { CURSOR_TYPE_NO_CURSOR = 0, CURSOR_TYPE_READ_ONLY = 1, CURSOR_TYPE_FOR_UPDATE = 2, CURSOR_TYPE_SCROLLABLE = 4, /** On when the client will send the parameter count even for 0 parameters. */ PARAMETER_COUNT_AVAILABLE = 8 }; /** options for ::mysql_options() */ enum enum_mysql_set_option { MYSQL_OPTION_MULTI_STATEMENTS_ON, MYSQL_OPTION_MULTI_STATEMENTS_OFF }; /** Type of state change information that the server can include in the Ok packet. @note - session_state_type shouldn't go past 255 (i.e. 1-byte boundary). - Modify the definition of ::SESSION_TRACK_END when a new member is added. */ enum enum_session_state_type { SESSION_TRACK_SYSTEM_VARIABLES, /**< Session system variables */ SESSION_TRACK_SCHEMA, /**< Current schema */ SESSION_TRACK_STATE_CHANGE, /**< track session state changes */ SESSION_TRACK_GTIDS, /**< See also: session_track_gtids */ SESSION_TRACK_TRANSACTION_CHARACTERISTICS, /**< Transaction chistics */ SESSION_TRACK_TRANSACTION_STATE /**< Transaction state */ }; /** start of ::enum_session_state_type */ #define SESSION_TRACK_BEGIN SESSION_TRACK_SYSTEM_VARIABLES /** End of ::enum_session_state_type */ #define SESSION_TRACK_END SESSION_TRACK_TRANSACTION_STATE /** is T a valid session state type */ #define IS_SESSION_STATE_TYPE(T) \ (((int)(T) >= SESSION_TRACK_BEGIN) && ((T) <= SESSION_TRACK_END)) #define net_new_transaction(net) ((net)->pkt_nr = 0) bool my_net_init(struct NET *net, MYSQL_VIO vio); void my_net_local_init(struct NET *net); void net_end(struct NET *net); void net_clear(struct NET *net, bool check_buffer); void net_claim_memory_ownership(struct NET *net, bool claim); bool net_realloc(struct NET *net, size_t length); bool net_flush(struct NET *net); bool my_net_write(struct NET *net, const unsigned char *packet, size_t len); bool net_write_command(struct NET *net, unsigned char command, const unsigned char *header, size_t head_len, const unsigned char *packet, size_t len); bool net_write_packet(struct NET *net, const unsigned char *packet, size_t length); unsigned long my_net_read(struct NET *net); void my_net_set_write_timeout(struct NET *net, unsigned int timeout); void my_net_set_read_timeout(struct NET *net, unsigned int timeout); void my_net_set_retry_count(struct NET *net, unsigned int retry_count); struct rand_struct { unsigned long seed1, seed2, max_value; double max_value_dbl; }; /* Include the types here so existing UDFs can keep compiling */ #include "mysql/udf_registration_types.h" /** @addtogroup group_cs_compresson_constants Constants when using compression @ingroup group_cs @{ */ #define NET_HEADER_SIZE 4 /**< standard header size */ #define COMP_HEADER_SIZE 3 /**< compression header extra size */ /** @}*/ /* Prototypes to password functions */ /* These functions are used for authentication by client and server and implemented in sql/password.c */ void randominit(struct rand_struct *, unsigned long seed1, unsigned long seed2); double my_rnd(struct rand_struct *); void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st); void hash_password(unsigned long *to, const char *password, unsigned int password_len); void make_scrambled_password_323(char *to, const char *password); void scramble_323(char *to, const char *message, const char *password); bool check_scramble_323(const unsigned char *reply, const char *message, unsigned long *salt); void get_salt_from_password_323(unsigned long *res, const char *password); void make_password_from_salt_323(char *to, const unsigned long *salt); void make_scrambled_password(char *to, const char *password); void scramble(char *to, const char *message, const char *password); bool check_scramble(const unsigned char *reply, const char *message, const unsigned char *hash_stage2); void get_salt_from_password(unsigned char *res, const char *password); void make_password_from_salt(char *to, const unsigned char *hash_stage2); char *octet2hex(char *to, const char *str, unsigned int len); /* end of password.c */ bool generate_sha256_scramble(unsigned char *dst, size_t dst_size, const char *src, size_t src_size, const char *rnd, size_t rnd_size); // extern "C" since it is an (undocumented) part of the libmysql ABI. #ifdef __cplusplus extern "C" { #endif char *get_tty_password(const char *opt_message); #ifdef __cplusplus } #endif const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); /* Some other useful functions */ // Need to be extern "C" for the time being, due to memcached. #ifdef __cplusplus extern "C" { #endif bool my_thread_init(void); void my_thread_end(void); #ifdef __cplusplus } #endif #ifdef STDCALL unsigned long STDCALL net_field_length(unsigned char **packet); unsigned long STDCALL net_field_length_checked(unsigned char **packet, unsigned long max_length); #endif uint64_t net_field_length_ll(unsigned char **packet); unsigned char *net_store_length(unsigned char *pkg, unsigned long long length); unsigned int net_length_size(unsigned long long num); unsigned int net_field_length_size(const unsigned char *pos); #define NULL_LENGTH ((unsigned long)~0) /**< For ::net_store_length() */ #define MYSQL_STMT_HEADER 4 #define MYSQL_LONG_DATA_HEADER 6 #endif PKZTqttmysql/my_command.hnu[/* Copyright (c) 2015, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _mysql_command_h #define _mysql_command_h /** @file include/my_command.h */ /** @enum enum_server_command @brief A list of all MySQL protocol commands. These are the top level commands the server can receive while it listens for a new command in ::dispatch_command @par Warning Add new commands to the end of this list, otherwise old servers won't be able to handle them as 'unsupported'. */ enum enum_server_command { /** Currently refused by the server. See ::dispatch_command. Also used internally to mark the start of a session. */ COM_SLEEP, COM_QUIT, /**< See @ref page_protocol_com_quit */ COM_INIT_DB, /**< See @ref page_protocol_com_init_db */ COM_QUERY, /**< See @ref page_protocol_com_query */ COM_FIELD_LIST, /**< Deprecated. See @ref page_protocol_com_field_list */ COM_CREATE_DB, /**< Currently refused by the server. See ::dispatch_command */ COM_DROP_DB, /**< Currently refused by the server. See ::dispatch_command */ COM_REFRESH, /**< Deprecated. See @ref page_protocol_com_refresh */ COM_DEPRECATED_1, /**< Deprecated, used to be COM_SHUTDOWN */ COM_STATISTICS, /**< See @ref page_protocol_com_statistics */ COM_PROCESS_INFO, /**< Deprecated. See @ref page_protocol_com_process_info */ COM_CONNECT, /**< Currently refused by the server. */ COM_PROCESS_KILL, /**< Deprecated. See @ref page_protocol_com_process_kill */ COM_DEBUG, /**< See @ref page_protocol_com_debug */ COM_PING, /**< See @ref page_protocol_com_ping */ COM_TIME, /**< Currently refused by the server. */ COM_DELAYED_INSERT, /**< Functionality removed. */ COM_CHANGE_USER, /**< See @ref page_protocol_com_change_user */ COM_BINLOG_DUMP, /**< See @ref page_protocol_com_binlog_dump */ COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE, COM_STMT_PREPARE, /**< See @ref page_protocol_com_stmt_prepare */ COM_STMT_EXECUTE, /**< See @ref page_protocol_com_stmt_execute */ /** See @ref page_protocol_com_stmt_send_long_data */ COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE, /**< See @ref page_protocol_com_stmt_close */ COM_STMT_RESET, /**< See @ref page_protocol_com_stmt_reset */ COM_SET_OPTION, /**< See @ref page_protocol_com_set_option */ COM_STMT_FETCH, /**< See @ref page_protocol_com_stmt_fetch */ /** Currently refused by the server. See ::dispatch_command. Also used internally to mark the session as a "daemon", i.e. non-client THD. Currently the scheduler and the GTID code does use this state. These threads won't be killed by `KILL` @sa Event_scheduler::start, ::init_thd, ::kill_one_thread, ::Find_thd_with_id */ COM_DAEMON, COM_BINLOG_DUMP_GTID, COM_RESET_CONNECTION, /**< See @ref page_protocol_com_reset_connection */ COM_CLONE, COM_SUBSCRIBE_GROUP_REPLICATION_STREAM, /* don't forget to update std::string Command_names::m_names[] in sql_parse.cc */ /* Must be last */ COM_END /**< Not a real command. Refused. */ }; #endif /* _mysql_command_h */ PKZ0N nAA mysql/mysql.hnu[/* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file include/mysql.h This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient. The ABI should never be changed in a released product of MySQL, thus you need to take great care when changing the file. In case the file is changed so the ABI is broken, you must also update the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake */ #ifndef _mysql_h #define _mysql_h #ifndef MYSQL_ABI_CHECK #include #include #include #include #endif // Legacy definition for the benefit of old code. Use uint64_t in new code. // If you get warnings from printf, use the PRIu64 macro, or, if you need // compatibility with older versions of the client library, cast // before printing. typedef uint64_t my_ulonglong; #ifndef my_socket_defined #define my_socket_defined #if defined(_WIN32) && !defined(MYSQL_ABI_CHECK) #include #ifdef WIN32_LEAN_AND_MEAN #include #endif #define my_socket SOCKET #else typedef int my_socket; #endif /* _WIN32 && ! MYSQL_ABI_CHECK */ #endif /* my_socket_defined */ // Small extra definition to avoid pulling in my_compiler.h in client code. // IWYU pragma: no_include "my_compiler.h" #ifndef MY_COMPILER_INCLUDED #if !defined(_WIN32) || defined(MYSQL_ABI_CHECK) #define STDCALL #else #define STDCALL __stdcall #endif #endif /* MY_COMPILER_INCLUDED */ #include "field_types.h" #include "my_list.h" #include "mysql_com.h" /* Include declarations of plug-in API */ #include "mysql/client_plugin.h" // IWYU pragma: keep /* The client should be able to know which version it is compiled against, even if mysql.h doesn't use this information directly. */ #include "mysql_version.h" // IWYU pragma: keep // MYSQL_TIME is part of our public API. #include "mysql_time.h" // IWYU pragma: keep // The error messages are part of our public API. #include "errmsg.h" // IWYU pragma: keep #ifdef __cplusplus extern "C" { #endif extern unsigned int mysql_port; extern char *mysql_unix_port; #define CLIENT_NET_RETRY_COUNT 1 /* Retry count */ #define CLIENT_NET_READ_TIMEOUT 365 * 24 * 3600 /* Timeout on read */ #define CLIENT_NET_WRITE_TIMEOUT 365 * 24 * 3600 /* Timeout on write */ #define IS_PRI_KEY(n) ((n)&PRI_KEY_FLAG) #define IS_NOT_NULL(n) ((n)&NOT_NULL_FLAG) #define IS_BLOB(n) ((n)&BLOB_FLAG) /** Returns true if the value is a number which does not need quotes for the sql_lex.cc parser to parse correctly. */ #define IS_NUM(t) \ (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || \ (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) #define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING) typedef struct MYSQL_FIELD { char *name; /* Name of column */ char *org_name; /* Original column name, if an alias */ char *table; /* Table of column if column was a field */ char *org_table; /* Org table name, if table was an alias */ char *db; /* Database for table */ char *catalog; /* Catalog for table */ char *def; /* Default value (set by mysql_list_fields) */ unsigned long length; /* Width of column (create length) */ unsigned long max_length; /* Max width for selected set */ unsigned int name_length; unsigned int org_name_length; unsigned int table_length; unsigned int org_table_length; unsigned int db_length; unsigned int catalog_length; unsigned int def_length; unsigned int flags; /* Div flags */ unsigned int decimals; /* Number of decimals in field */ unsigned int charsetnr; /* Character set */ enum enum_field_types type; /* Type of field. See mysql_com.h for types */ void *extension; } MYSQL_FIELD; typedef char **MYSQL_ROW; /* return data as array of strings */ typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */ #define MYSQL_COUNT_ERROR (~(uint64_t)0) /* backward compatibility define - to be removed eventually */ #define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED typedef struct MYSQL_ROWS { struct MYSQL_ROWS *next; /* list of rows */ MYSQL_ROW data; unsigned long length; } MYSQL_ROWS; typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */ struct MEM_ROOT; typedef struct MYSQL_DATA { MYSQL_ROWS *data; struct MEM_ROOT *alloc; uint64_t rows; unsigned int fields; } MYSQL_DATA; enum mysql_option { MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE, MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT, MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT, MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH, MYSQL_OPT_BIND, MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT, MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER, MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH, MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD, MYSQL_OPT_CONNECT_ATTR_DELETE, MYSQL_SERVER_PUBLIC_KEY, MYSQL_ENABLE_CLEARTEXT_PLUGIN, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, MYSQL_OPT_MAX_ALLOWED_PACKET, MYSQL_OPT_NET_BUFFER_LENGTH, MYSQL_OPT_TLS_VERSION, MYSQL_OPT_SSL_MODE, MYSQL_OPT_GET_SERVER_PUBLIC_KEY, MYSQL_OPT_RETRY_COUNT, MYSQL_OPT_OPTIONAL_RESULTSET_METADATA, MYSQL_OPT_SSL_FIPS_MODE, MYSQL_OPT_TLS_CIPHERSUITES, MYSQL_OPT_COMPRESSION_ALGORITHMS, MYSQL_OPT_ZSTD_COMPRESSION_LEVEL, MYSQL_OPT_LOAD_DATA_LOCAL_DIR, MYSQL_OPT_USER_PASSWORD, MYSQL_OPT_SSL_SESSION_DATA }; /** @todo remove the "extension", move st_mysql_options completely out of mysql.h */ struct st_mysql_options_extention; struct st_mysql_options { unsigned int connect_timeout, read_timeout, write_timeout; unsigned int port, protocol; unsigned long client_flag; char *host, *user, *password, *unix_socket, *db; struct Init_commands_array *init_commands; char *my_cnf_file, *my_cnf_group, *charset_dir, *charset_name; char *ssl_key; /* PEM key file */ char *ssl_cert; /* PEM cert file */ char *ssl_ca; /* PEM CA file */ char *ssl_capath; /* PEM directory of CA-s? */ char *ssl_cipher; /* cipher to use */ char *shared_memory_base_name; unsigned long max_allowed_packet; bool compress, named_pipe; /** The local address to bind when connecting to remote server. */ char *bind_address; /* 0 - never report, 1 - always report (default) */ bool report_data_truncation; /* function pointers for local infile support */ int (*local_infile_init)(void **, const char *, void *); int (*local_infile_read)(void *, char *, unsigned int); void (*local_infile_end)(void *); int (*local_infile_error)(void *, char *, unsigned int); void *local_infile_userdata; struct st_mysql_options_extention *extension; }; enum mysql_status { MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT, MYSQL_STATUS_STATEMENT_GET_RESULT }; enum mysql_protocol_type { MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY }; enum mysql_ssl_mode { SSL_MODE_DISABLED = 1, SSL_MODE_PREFERRED, SSL_MODE_REQUIRED, SSL_MODE_VERIFY_CA, SSL_MODE_VERIFY_IDENTITY }; enum mysql_ssl_fips_mode { SSL_FIPS_MODE_OFF = 0, SSL_FIPS_MODE_ON = 1, SSL_FIPS_MODE_STRICT }; typedef struct character_set { unsigned int number; /* character set number */ unsigned int state; /* character set state */ const char *csname; /* character set name */ const char *name; /* collation name */ const char *comment; /* comment */ const char *dir; /* character set directory */ unsigned int mbminlen; /* min. length for multibyte strings */ unsigned int mbmaxlen; /* max. length for multibyte strings */ } MY_CHARSET_INFO; struct MYSQL_METHODS; struct MYSQL_STMT; typedef struct MYSQL { NET net; /* Communication parameters */ unsigned char *connector_fd; /* ConnectorFd for SSL */ char *host, *user, *passwd, *unix_socket, *server_version, *host_info; char *info, *db; struct CHARSET_INFO *charset; MYSQL_FIELD *fields; struct MEM_ROOT *field_alloc; uint64_t affected_rows; uint64_t insert_id; /* id if insert on table with NEXTNR */ uint64_t extra_info; /* Not used */ unsigned long thread_id; /* Id for connection in server */ unsigned long packet_length; unsigned int port; unsigned long client_flag, server_capabilities; unsigned int protocol_version; unsigned int field_count; unsigned int server_status; unsigned int server_language; unsigned int warning_count; struct st_mysql_options options; enum mysql_status status; enum enum_resultset_metadata resultset_metadata; bool free_me; /* If free in mysql_close */ bool reconnect; /* set to 1 if automatic reconnect */ /* session-wide random string */ char scramble[SCRAMBLE_LENGTH + 1]; LIST *stmts; /* list of all statements */ const struct MYSQL_METHODS *methods; void *thd; /* Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag from mysql_stmt_close if close had to cancel result set of this object. */ bool *unbuffered_fetch_owner; void *extension; } MYSQL; typedef struct MYSQL_RES { uint64_t row_count; MYSQL_FIELD *fields; struct MYSQL_DATA *data; MYSQL_ROWS *data_cursor; unsigned long *lengths; /* column lengths of current row */ MYSQL *handle; /* for unbuffered reads */ const struct MYSQL_METHODS *methods; MYSQL_ROW row; /* If unbuffered read */ MYSQL_ROW current_row; /* buffer to current row */ struct MEM_ROOT *field_alloc; unsigned int field_count, current_field; bool eof; /* Used by mysql_fetch_row */ /* mysql_stmt_close() had to cancel this result */ bool unbuffered_fetch_cancelled; enum enum_resultset_metadata metadata; void *extension; } MYSQL_RES; /** Flag to indicate that COM_BINLOG_DUMP_GTID should be used rather than COM_BINLOG_DUMP in the @sa mysql_binlog_open(). */ #define MYSQL_RPL_GTID (1 << 16) /** Skip HEARBEAT events in the @sa mysql_binlog_fetch(). */ #define MYSQL_RPL_SKIP_HEARTBEAT (1 << 17) /** Flag to indicate that the heartbeat_event being generated is using the class Heartbeat_event_v2 */ #define USE_HEARTBEAT_EVENT_V2 (1 << 1) /** Struct for information about a replication stream. @sa mysql_binlog_open() @sa mysql_binlog_fetch() @sa mysql_binlog_close() */ typedef struct MYSQL_RPL { size_t file_name_length; /** Length of the 'file_name' or 0 */ const char *file_name; /** Filename of the binary log to read */ uint64_t start_position; /** Position in the binary log to */ /* start reading from */ unsigned int server_id; /** Server ID to use when identifying */ /* with the master */ unsigned int flags; /** Flags, e.g. MYSQL_RPL_GTID */ /** Size of gtid set data */ size_t gtid_set_encoded_size; /** Callback function which is called */ /* from @sa mysql_binlog_open() to */ /* fill command packet gtid set */ void (*fix_gtid_set)(struct MYSQL_RPL *rpl, unsigned char *packet_gtid_set); void *gtid_set_arg; /** GTID set data or an argument for */ /* fix_gtid_set() callback function */ unsigned long size; /** Size of the packet returned by */ /* mysql_binlog_fetch() */ const unsigned char *buffer; /** Pointer to returned data */ } MYSQL_RPL; /* Set up and bring down the server; to ensure that applications will work when linked against either the standard client library or the embedded server library, these functions should be called. */ int STDCALL mysql_server_init(int argc, char **argv, char **groups); void STDCALL mysql_server_end(void); /* mysql_server_init/end need to be called when using libmysqld or libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so you don't need to call it explicitly; but you need to call mysql_server_end() to free memory). The names are a bit misleading (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general names which suit well whether you're using libmysqld or libmysqlclient. We intend to promote these aliases over the mysql_server* ones. */ #define mysql_library_init mysql_server_init #define mysql_library_end mysql_server_end /* Set up and bring down a thread; these function should be called for each thread in an application which opens at least one MySQL connection. All uses of the connection(s) should be between these function calls. */ bool STDCALL mysql_thread_init(void); void STDCALL mysql_thread_end(void); /* Functions to get information from the MYSQL and MYSQL_RES structures Should definitely be used if one uses shared libraries. */ uint64_t STDCALL mysql_num_rows(MYSQL_RES *res); unsigned int STDCALL mysql_num_fields(MYSQL_RES *res); bool STDCALL mysql_eof(MYSQL_RES *res); MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res, unsigned int fieldnr); MYSQL_FIELD *STDCALL mysql_fetch_fields(MYSQL_RES *res); MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res); MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res); enum enum_resultset_metadata STDCALL mysql_result_metadata(MYSQL_RES *result); unsigned int STDCALL mysql_field_count(MYSQL *mysql); uint64_t STDCALL mysql_affected_rows(MYSQL *mysql); uint64_t STDCALL mysql_insert_id(MYSQL *mysql); unsigned int STDCALL mysql_errno(MYSQL *mysql); const char *STDCALL mysql_error(MYSQL *mysql); const char *STDCALL mysql_sqlstate(MYSQL *mysql); unsigned int STDCALL mysql_warning_count(MYSQL *mysql); const char *STDCALL mysql_info(MYSQL *mysql); unsigned long STDCALL mysql_thread_id(MYSQL *mysql); const char *STDCALL mysql_character_set_name(MYSQL *mysql); int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname); MYSQL *STDCALL mysql_init(MYSQL *mysql); #if defined(__cplusplus) && (__cplusplus >= 201402L) [[deprecated("Use mysql_options() instead.")]] #endif bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca, const char *capath, const char *cipher); const char *STDCALL mysql_get_ssl_cipher(MYSQL *mysql); bool STDCALL mysql_get_ssl_session_reused(MYSQL *mysql); void *STDCALL mysql_get_ssl_session_data(MYSQL *mysql, unsigned int n_ticket, unsigned int *out_len); bool STDCALL mysql_free_ssl_session_data(MYSQL *mysql, void *data); bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db); MYSQL *STDCALL mysql_real_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag); int STDCALL mysql_select_db(MYSQL *mysql, const char *db); int STDCALL mysql_query(MYSQL *mysql, const char *q); int STDCALL mysql_send_query(MYSQL *mysql, const char *q, unsigned long length); int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned long length); MYSQL_RES *STDCALL mysql_store_result(MYSQL *mysql); MYSQL_RES *STDCALL mysql_use_result(MYSQL *mysql); enum net_async_status STDCALL mysql_real_connect_nonblocking( MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag); enum net_async_status STDCALL mysql_send_query_nonblocking( MYSQL *mysql, const char *query, unsigned long length); enum net_async_status STDCALL mysql_real_query_nonblocking( MYSQL *mysql, const char *query, unsigned long length); enum net_async_status STDCALL mysql_store_result_nonblocking(MYSQL *mysql, MYSQL_RES **result); enum net_async_status STDCALL mysql_next_result_nonblocking(MYSQL *mysql); enum net_async_status STDCALL mysql_select_db_nonblocking(MYSQL *mysql, const char *db, bool *error); void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *charset); int STDCALL mysql_session_track_get_first(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length); int STDCALL mysql_session_track_get_next(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length); /* local infile support */ #define LOCAL_INFILE_ERROR_LEN 512 void mysql_set_local_infile_handler( MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, unsigned int), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, unsigned int), void *); void mysql_set_local_infile_default(MYSQL *mysql); int STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level); int STDCALL mysql_dump_debug_info(MYSQL *mysql); int STDCALL mysql_refresh(MYSQL *mysql, unsigned int refresh_options); int STDCALL mysql_kill(MYSQL *mysql, unsigned long pid); int STDCALL mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option); int STDCALL mysql_ping(MYSQL *mysql); const char *STDCALL mysql_stat(MYSQL *mysql); const char *STDCALL mysql_get_server_info(MYSQL *mysql); const char *STDCALL mysql_get_client_info(void); unsigned long STDCALL mysql_get_client_version(void); const char *STDCALL mysql_get_host_info(MYSQL *mysql); unsigned long STDCALL mysql_get_server_version(MYSQL *mysql); unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql); MYSQL_RES *STDCALL mysql_list_dbs(MYSQL *mysql, const char *wild); MYSQL_RES *STDCALL mysql_list_tables(MYSQL *mysql, const char *wild); MYSQL_RES *STDCALL mysql_list_processes(MYSQL *mysql); int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, const void *arg); int STDCALL mysql_options4(MYSQL *mysql, enum mysql_option option, const void *arg1, const void *arg2); int STDCALL mysql_get_option(MYSQL *mysql, enum mysql_option option, const void *arg); void STDCALL mysql_free_result(MYSQL_RES *result); enum net_async_status STDCALL mysql_free_result_nonblocking(MYSQL_RES *result); void STDCALL mysql_data_seek(MYSQL_RES *result, uint64_t offset); MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET offset); MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset); MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result); enum net_async_status STDCALL mysql_fetch_row_nonblocking(MYSQL_RES *res, MYSQL_ROW *row); unsigned long *STDCALL mysql_fetch_lengths(MYSQL_RES *result); MYSQL_FIELD *STDCALL mysql_fetch_field(MYSQL_RES *result); MYSQL_RES *STDCALL mysql_list_fields(MYSQL *mysql, const char *table, const char *wild); unsigned long STDCALL mysql_escape_string(char *to, const char *from, unsigned long from_length); unsigned long STDCALL mysql_hex_string(char *to, const char *from, unsigned long from_length); unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, char *to, const char *from, unsigned long length); unsigned long STDCALL mysql_real_escape_string_quote(MYSQL *mysql, char *to, const char *from, unsigned long length, char quote); void STDCALL mysql_debug(const char *debug); void STDCALL myodbc_remove_escape(MYSQL *mysql, char *name); unsigned int STDCALL mysql_thread_safe(void); bool STDCALL mysql_read_query_result(MYSQL *mysql); int STDCALL mysql_reset_connection(MYSQL *mysql); int STDCALL mysql_binlog_open(MYSQL *mysql, MYSQL_RPL *rpl); int STDCALL mysql_binlog_fetch(MYSQL *mysql, MYSQL_RPL *rpl); void STDCALL mysql_binlog_close(MYSQL *mysql, MYSQL_RPL *rpl); /* The following definitions are added for the enhanced client-server protocol */ /* statement state */ enum enum_mysql_stmt_state { MYSQL_STMT_INIT_DONE = 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE, MYSQL_STMT_FETCH_DONE }; /* This structure is used to define bind information, and internally by the client library. Public members with their descriptions are listed below (conventionally `On input' refers to the binds given to mysql_stmt_bind_param, `On output' refers to the binds given to mysql_stmt_bind_result): buffer_type - One of the MYSQL_* types, used to describe the host language type of buffer. On output: if column type is different from buffer_type, column value is automatically converted to buffer_type before it is stored in the buffer. buffer - On input: points to the buffer with input data. On output: points to the buffer capable to store output data. The type of memory pointed by buffer must correspond to buffer_type. See the correspondence table in the comment to mysql_stmt_bind_param. The two above members are mandatory for any kind of bind. buffer_length - the length of the buffer. You don't have to set it for any fixed length buffer: float, double, int, etc. It must be set however for variable-length types, such as BLOBs or STRINGs. length - On input: in case when lengths of input values are different for each execute, you can set this to point at a variable containing value length. This way the value length can be different in each execute. If length is not NULL, buffer_length is not used. Note, length can even point at buffer_length if you keep bind structures around while fetching: this way you can change buffer_length before each execution, everything will work ok. On output: if length is set, mysql_stmt_fetch will write column length into it. is_null - On input: points to a boolean variable that should be set to TRUE for NULL values. This member is useful only if your data may be NULL in some but not all cases. If your data is never NULL, is_null should be set to 0. If your data is always NULL, set buffer_type to MYSQL_TYPE_NULL, and is_null will not be used. is_unsigned - On input: used to signify that values provided for one of numeric types are unsigned. On output describes signedness of the output buffer. If, taking into account is_unsigned flag, column data is out of range of the output buffer, data for this column is regarded truncated. Note that this has no correspondence to the sign of result set column, if you need to find it out use mysql_stmt_result_metadata. error - where to write a truncation error if it is present. possible error value is: 0 no truncation 1 value is out of range or buffer is too small Please note that MYSQL_BIND also has internals members. */ typedef struct MYSQL_BIND { unsigned long *length; /* output length pointer */ bool *is_null; /* Pointer to null indicator */ void *buffer; /* buffer to get/put data */ /* set this if you want to track data truncations happened during fetch */ bool *error; unsigned char *row_ptr; /* for the current data position */ void (*store_param_func)(NET *net, struct MYSQL_BIND *param); void (*fetch_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row); void (*skip_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row); /* output buffer length, must be set when fetching str/binary */ unsigned long buffer_length; unsigned long offset; /* offset position for char/binary fetch */ unsigned long length_value; /* Used if length is 0 */ unsigned int param_number; /* For null count and error messages */ unsigned int pack_length; /* Internal length for packed data */ enum enum_field_types buffer_type; /* buffer type */ bool error_value; /* used if error is 0 */ bool is_unsigned; /* set if integer type is unsigned */ bool long_data_used; /* If used with mysql_send_long_data */ bool is_null_value; /* Used if is_null is 0 */ void *extension; } MYSQL_BIND; struct MYSQL_STMT_EXT; /* statement handler */ typedef struct MYSQL_STMT { struct MEM_ROOT *mem_root; /* root allocations */ LIST list; /* list to keep track of all stmts */ MYSQL *mysql; /* connection handle */ MYSQL_BIND *params; /* input parameters */ MYSQL_BIND *bind; /* output parameters */ MYSQL_FIELD *fields; /* result set metadata */ MYSQL_DATA result; /* cached result set */ MYSQL_ROWS *data_cursor; /* current row in cached result */ /* mysql_stmt_fetch() calls this function to fetch one row (it's different for buffered, unbuffered and cursor fetch). */ int (*read_row_func)(struct MYSQL_STMT *stmt, unsigned char **row); /* copy of mysql->affected_rows after statement execution */ uint64_t affected_rows; uint64_t insert_id; /* copy of mysql->insert_id */ unsigned long stmt_id; /* Id for prepared statement */ unsigned long flags; /* i.e. type of cursor to open */ unsigned long prefetch_rows; /* number of rows per one COM_FETCH */ /* Copied from mysql->server_status after execute/fetch to know server-side cursor status for this statement. */ unsigned int server_status; unsigned int last_errno; /* error code */ unsigned int param_count; /* input parameter count */ unsigned int field_count; /* number of columns in result set */ enum enum_mysql_stmt_state state; /* statement state */ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ char sqlstate[SQLSTATE_LENGTH + 1]; /* Types of input parameters should be sent to server */ bool send_types_to_server; bool bind_param_done; /* input buffers were supplied */ unsigned char bind_result_done; /* output buffers were supplied */ /* mysql_stmt_close() had to cancel this result */ bool unbuffered_fetch_cancelled; /* Is set to true if we need to calculate field->max_length for metadata fields when doing mysql_stmt_store_result. */ bool update_max_length; struct MYSQL_STMT_EXT *extension; } MYSQL_STMT; enum enum_stmt_attr_type { /* When doing mysql_stmt_store_result calculate max_length attribute of statement metadata. This is to be consistent with the old API, where this was done automatically. In the new API we do that only by request because it slows down mysql_stmt_store_result sufficiently. */ STMT_ATTR_UPDATE_MAX_LENGTH, /* unsigned long with combination of cursor flags (read only, for update, etc) */ STMT_ATTR_CURSOR_TYPE, /* Amount of rows to retrieve from server per one fetch if using cursors. Accepts unsigned long attribute in the range 1 - ulong_max */ STMT_ATTR_PREFETCH_ROWS }; bool STDCALL mysql_bind_param(MYSQL *mysql, unsigned n_params, MYSQL_BIND *binds, const char **names); MYSQL_STMT *STDCALL mysql_stmt_init(MYSQL *mysql); int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length); int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt); int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt); int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsigned int column, unsigned long offset); int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt); unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt); bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *attr); bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *attr); bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bnd); bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bnd); bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt); bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt); bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt); bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length); MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt); MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt); unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT *stmt); const char *STDCALL mysql_stmt_error(MYSQL_STMT *stmt); const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT *stmt); MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET offset); MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt); void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, uint64_t offset); uint64_t STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt); uint64_t STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt); uint64_t STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt); unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt); bool STDCALL mysql_commit(MYSQL *mysql); bool STDCALL mysql_rollback(MYSQL *mysql); bool STDCALL mysql_autocommit(MYSQL *mysql, bool auto_mode); bool STDCALL mysql_more_results(MYSQL *mysql); int STDCALL mysql_next_result(MYSQL *mysql); int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt); void STDCALL mysql_close(MYSQL *sock); /* Public key reset */ void STDCALL mysql_reset_server_public_key(void); /* status return codes */ #define MYSQL_NO_DATA 100 #define MYSQL_DATA_TRUNCATED 101 #define mysql_reload(mysql) mysql_refresh((mysql), REFRESH_GRANT) #define HAVE_MYSQL_REAL_CONNECT MYSQL *STDCALL mysql_real_connect_dns_srv(MYSQL *mysql, const char *dns_srv_name, const char *user, const char *passwd, const char *db, unsigned long client_flag); #ifdef __cplusplus } #endif #endif /* _mysql_h */ PKZqqmysql/my_compress.hnu[/* Copyright (c) 2019, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MY_COMPRESS_INCLUDED #define MY_COMPRESS_INCLUDED /* List of valid values for compression_algorithm */ enum enum_compression_algorithm { MYSQL_UNCOMPRESSED = 1, MYSQL_ZLIB, MYSQL_ZSTD, MYSQL_INVALID }; /** Compress context information. relating to zlib compression. */ typedef struct mysql_zlib_compress_context { /** Compression level to use in zlib compression. */ unsigned int compression_level; } mysql_zlib_compress_context; typedef struct ZSTD_CCtx_s ZSTD_CCtx; typedef struct ZSTD_DCtx_s ZSTD_DCtx; /** Compress context information relating to zstd compression. */ typedef struct mysql_zstd_compress_context { /** Pointer to compressor context. */ ZSTD_CCtx *cctx; /** Pointer to decompressor context. */ ZSTD_DCtx *dctx; /** Compression level to use in zstd compression. */ unsigned int compression_level; } mysql_zstd_compress_context; /** Compression context information. It encapsulate the context information based on compression method and presents a generic struct. */ typedef struct mysql_compress_context { enum enum_compression_algorithm algorithm; ///< Compression algorithm name. union { mysql_zlib_compress_context zlib_ctx; ///< Context information of zlib. mysql_zstd_compress_context zstd_ctx; ///< Context information of zstd. } u; } mysql_compress_context; /** Get default compression level corresponding to a given compression method. @param algorithm Compression Method. Possible values are zlib or zstd. @return an unsigned int representing default compression level. 6 is the default compression level for zlib and 3 is the default compression level for zstd. */ unsigned int mysql_default_compression_level( enum enum_compression_algorithm algorithm); /** Initialize a compress context object to be associated with a NET object. @param cmp_ctx Pointer to compression context. @param algorithm Compression algorithm. @param compression_level Compression level corresponding to the compression algorithm. */ void mysql_compress_context_init(mysql_compress_context *cmp_ctx, enum enum_compression_algorithm algorithm, unsigned int compression_level); /** Deinitialize the compression context allocated. @param mysql_compress_ctx Pointer to Compression context. */ void mysql_compress_context_deinit(mysql_compress_context *mysql_compress_ctx); #endif // MY_COMPRESS_INCLUDED PKZUIVVmysql/mysqlx_ername.hnu[/* * Copyright (c) 2016, 2024, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, * as published by the Free Software Foundation. * * This program is designed to work with certain software (including * but not limited to OpenSSL) that is licensed under separate terms, * as designated in a particular file or component or in included license * documentation. The authors of MySQL hereby grant you an additional * permission to link the program and your derivative works with the * separately licensed software that they have either included with * the program or referenced in the documentation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License, version 2.0, for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Autogenerated file, please don't edit */ #include "mysqlx_error.h" {"ER_X_BAD_MESSAGE", ER_X_BAD_MESSAGE, "", NULL, NULL, 0 }, {"ER_X_CAPABILITIES_PREPARE_FAILED", ER_X_CAPABILITIES_PREPARE_FAILED, "", NULL, NULL, 0 }, {"ER_X_CAPABILITY_NOT_FOUND", ER_X_CAPABILITY_NOT_FOUND, "", NULL, NULL, 0 }, {"ER_X_INVALID_PROTOCOL_DATA", ER_X_INVALID_PROTOCOL_DATA, "", NULL, NULL, 0 }, {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_VALUE_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_VALUE_LENGTH, "", NULL, NULL, 0 }, {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_KEY_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_KEY_LENGTH, "", NULL, NULL, 0 }, {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_EMPTY_KEY", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_EMPTY_KEY, "", NULL, NULL, 0 }, {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_LENGTH", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_LENGTH, "", NULL, NULL, 0 }, {"ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_TYPE", ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_TYPE, "", NULL, NULL, 0 }, {"ER_X_CAPABILITY_SET_NOT_ALLOWED", ER_X_CAPABILITY_SET_NOT_ALLOWED, "", NULL, NULL, 0 }, {"ER_X_SERVICE_ERROR", ER_X_SERVICE_ERROR, "", NULL, NULL, 0 }, {"ER_X_SESSION", ER_X_SESSION, "", NULL, NULL, 0 }, {"ER_X_INVALID_ARGUMENT", ER_X_INVALID_ARGUMENT, "", NULL, NULL, 0 }, {"ER_X_MISSING_ARGUMENT", ER_X_MISSING_ARGUMENT, "", NULL, NULL, 0 }, {"ER_X_BAD_INSERT_DATA", ER_X_BAD_INSERT_DATA, "", NULL, NULL, 0 }, {"ER_X_CMD_NUM_ARGUMENTS", ER_X_CMD_NUM_ARGUMENTS, "", NULL, NULL, 0 }, {"ER_X_CMD_ARGUMENT_TYPE", ER_X_CMD_ARGUMENT_TYPE, "", NULL, NULL, 0 }, {"ER_X_CMD_ARGUMENT_VALUE", ER_X_CMD_ARGUMENT_VALUE, "", NULL, NULL, 0 }, {"ER_X_BAD_UPSERT_DATA", ER_X_BAD_UPSERT_DATA, "", NULL, NULL, 0 }, {"ER_X_DUPLICATED_CAPABILITIES", ER_X_DUPLICATED_CAPABILITIES, "", NULL, NULL, 0 }, {"ER_X_CMD_ARGUMENT_OBJECT_EMPTY", ER_X_CMD_ARGUMENT_OBJECT_EMPTY, "", NULL, NULL, 0 }, {"ER_X_CMD_INVALID_ARGUMENT", ER_X_CMD_INVALID_ARGUMENT, "", NULL, NULL, 0 }, {"ER_X_BAD_UPDATE_DATA", ER_X_BAD_UPDATE_DATA, "", NULL, NULL, 0 }, {"ER_X_BAD_TYPE_OF_UPDATE", ER_X_BAD_TYPE_OF_UPDATE, "", NULL, NULL, 0 }, {"ER_X_BAD_COLUMN_TO_UPDATE", ER_X_BAD_COLUMN_TO_UPDATE, "", NULL, NULL, 0 }, {"ER_X_BAD_MEMBER_TO_UPDATE", ER_X_BAD_MEMBER_TO_UPDATE, "", NULL, NULL, 0 }, {"ER_X_BAD_STATEMENT_ID", ER_X_BAD_STATEMENT_ID, "", NULL, NULL, 0 }, {"ER_X_BAD_CURSOR_ID", ER_X_BAD_CURSOR_ID, "", NULL, NULL, 0 }, {"ER_X_BAD_SCHEMA", ER_X_BAD_SCHEMA, "", NULL, NULL, 0 }, {"ER_X_BAD_TABLE", ER_X_BAD_TABLE, "", NULL, NULL, 0 }, {"ER_X_BAD_PROJECTION", ER_X_BAD_PROJECTION, "", NULL, NULL, 0 }, {"ER_X_DOC_ID_MISSING", ER_X_DOC_ID_MISSING, "", NULL, NULL, 0 }, {"ER_X_DUPLICATE_ENTRY", ER_X_DUPLICATE_ENTRY, "", NULL, NULL, 0 }, {"ER_X_DOC_REQUIRED_FIELD_MISSING", ER_X_DOC_REQUIRED_FIELD_MISSING, "", NULL, NULL, 0 }, {"ER_X_PROJ_BAD_KEY_NAME", ER_X_PROJ_BAD_KEY_NAME, "", NULL, NULL, 0 }, {"ER_X_BAD_DOC_PATH", ER_X_BAD_DOC_PATH, "", NULL, NULL, 0 }, {"ER_X_CURSOR_EXISTS", ER_X_CURSOR_EXISTS, "", NULL, NULL, 0 }, {"ER_X_CURSOR_REACHED_EOF", ER_X_CURSOR_REACHED_EOF, "", NULL, NULL, 0 }, {"ER_X_PREPARED_STATMENT_CAN_HAVE_ONE_CURSOR", ER_X_PREPARED_STATMENT_CAN_HAVE_ONE_CURSOR, "", NULL, NULL, 0 }, {"ER_X_PREPARED_EXECUTE_ARGUMENT_NOT_SUPPORTED", ER_X_PREPARED_EXECUTE_ARGUMENT_NOT_SUPPORTED, "", NULL, NULL, 0 }, {"ER_X_PREPARED_EXECUTE_ARGUMENT_CONSISTENCY", ER_X_PREPARED_EXECUTE_ARGUMENT_CONSISTENCY, "", NULL, NULL, 0 }, {"ER_X_EXPR_BAD_OPERATOR", ER_X_EXPR_BAD_OPERATOR, "", NULL, NULL, 0 }, {"ER_X_EXPR_BAD_NUM_ARGS", ER_X_EXPR_BAD_NUM_ARGS, "", NULL, NULL, 0 }, {"ER_X_EXPR_MISSING_ARG", ER_X_EXPR_MISSING_ARG, "", NULL, NULL, 0 }, {"ER_X_EXPR_BAD_TYPE_VALUE", ER_X_EXPR_BAD_TYPE_VALUE, "", NULL, NULL, 0 }, {"ER_X_EXPR_BAD_VALUE", ER_X_EXPR_BAD_VALUE, "", NULL, NULL, 0 }, {"ER_X_INVALID_COLLECTION", ER_X_INVALID_COLLECTION, "", NULL, NULL, 0 }, {"ER_X_INVALID_ADMIN_COMMAND", ER_X_INVALID_ADMIN_COMMAND, "", NULL, NULL, 0 }, {"ER_X_EXPECT_NOT_OPEN", ER_X_EXPECT_NOT_OPEN, "", NULL, NULL, 0 }, {"ER_X_EXPECT_NO_ERROR_FAILED", ER_X_EXPECT_NO_ERROR_FAILED, "", NULL, NULL, 0 }, {"ER_X_EXPECT_BAD_CONDITION", ER_X_EXPECT_BAD_CONDITION, "", NULL, NULL, 0 }, {"ER_X_EXPECT_BAD_CONDITION_VALUE", ER_X_EXPECT_BAD_CONDITION_VALUE, "", NULL, NULL, 0 }, {"ER_X_INVALID_NAMESPACE", ER_X_INVALID_NAMESPACE, "", NULL, NULL, 0 }, {"ER_X_BAD_NOTICE", ER_X_BAD_NOTICE, "", NULL, NULL, 0 }, {"ER_X_CANNOT_DISABLE_NOTICE", ER_X_CANNOT_DISABLE_NOTICE, "", NULL, NULL, 0 }, {"ER_X_BAD_CONFIGURATION", ER_X_BAD_CONFIGURATION, "", NULL, NULL, 0 }, {"ER_X_MYSQLX_ACCOUNT_MISSING_PERMISSIONS", ER_X_MYSQLX_ACCOUNT_MISSING_PERMISSIONS, "", NULL, NULL, 0 }, {"ER_X_EXPECT_FIELD_EXISTS_FAILED", ER_X_EXPECT_FIELD_EXISTS_FAILED, "", NULL, NULL, 0 }, {"ER_X_BAD_LOCKING", ER_X_BAD_LOCKING, "", NULL, NULL, 0 }, {"ER_X_FRAME_COMPRESSION_DISABLED", ER_X_FRAME_COMPRESSION_DISABLED, "", NULL, NULL, 0 }, {"ER_X_DECOMPRESSION_FAILED", ER_X_DECOMPRESSION_FAILED, "", NULL, NULL, 0 }, {"ER_X_BAD_COMPRESSED_FRAME", ER_X_BAD_COMPRESSED_FRAME, "", NULL, NULL, 0 }, {"ER_X_CAPABILITY_COMPRESSION_INVALID_ALGORITHM", ER_X_CAPABILITY_COMPRESSION_INVALID_ALGORITHM, "", NULL, NULL, 0 }, {"ER_X_CAPABILITY_COMPRESSION_INVALID_SERVER_STYLE", ER_X_CAPABILITY_COMPRESSION_INVALID_SERVER_STYLE, "", NULL, NULL, 0 }, {"ER_X_CAPABILITY_COMPRESSION_INVALID_CLIENT_STYLE", ER_X_CAPABILITY_COMPRESSION_INVALID_CLIENT_STYLE, "", NULL, NULL, 0 }, {"ER_X_CAPABILITY_COMPRESSION_INVALID_OPTION", ER_X_CAPABILITY_COMPRESSION_INVALID_OPTION, "", NULL, NULL, 0 }, {"ER_X_CAPABILITY_COMPRESSION_MISSING_REQUIRED_FIELDS", ER_X_CAPABILITY_COMPRESSION_MISSING_REQUIRED_FIELDS, "", NULL, NULL, 0 }, {"ER_X_DOCUMENT_DOESNT_MATCH_EXPECTED_SCHEMA", ER_X_DOCUMENT_DOESNT_MATCH_EXPECTED_SCHEMA, "", NULL, NULL, 0 }, {"ER_X_COLLECTION_OPTION_DOESNT_EXISTS", ER_X_COLLECTION_OPTION_DOESNT_EXISTS, "", NULL, NULL, 0 }, {"ER_X_INVALID_VALIDATION_SCHEMA", ER_X_INVALID_VALIDATION_SCHEMA, "", NULL, NULL, 0 }, PKZ")θmysql/errmsg.hnu[#ifndef ERRMSG_INCLUDED #define ERRMSG_INCLUDED /* Copyright (c) 2000, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file include/errmsg.h Error messages for MySQL clients. These are constant and use the CR_ prefix. will contain auto-generated mappings containing the symbolic name and the number from this file, and the english error messages in libmysql/errmsg.c. Dynamic error messages for the daemon are in share/language/errmsg.sys. The server equivalent to is . The server equivalent to is . Note that the auth subsystem also uses codes with a CR_ prefix. */ void init_client_errs(void); void finish_client_errs(void); extern const char *client_errors[]; /* Error messages */ #define CR_MIN_ERROR 2000 /* For easier client code */ #define CR_MAX_ERROR 2999 #define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ /* Do not add error numbers before CR_ERROR_FIRST. */ /* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */ #define CR_ERROR_FIRST 2000 /*Copy first error nr.*/ #define CR_UNKNOWN_ERROR 2000 #define CR_SOCKET_CREATE_ERROR 2001 #define CR_CONNECTION_ERROR 2002 #define CR_CONN_HOST_ERROR 2003 #define CR_IPSOCK_ERROR 2004 #define CR_UNKNOWN_HOST 2005 #define CR_SERVER_GONE_ERROR 2006 #define CR_VERSION_ERROR 2007 #define CR_OUT_OF_MEMORY 2008 #define CR_WRONG_HOST_INFO 2009 #define CR_LOCALHOST_CONNECTION 2010 #define CR_TCP_CONNECTION 2011 #define CR_SERVER_HANDSHAKE_ERR 2012 #define CR_SERVER_LOST 2013 #define CR_COMMANDS_OUT_OF_SYNC 2014 #define CR_NAMEDPIPE_CONNECTION 2015 #define CR_NAMEDPIPEWAIT_ERROR 2016 #define CR_NAMEDPIPEOPEN_ERROR 2017 #define CR_NAMEDPIPESETSTATE_ERROR 2018 #define CR_CANT_READ_CHARSET 2019 #define CR_NET_PACKET_TOO_LARGE 2020 #define CR_EMBEDDED_CONNECTION 2021 #define CR_PROBE_REPLICA_STATUS 2022 #define CR_PROBE_REPLICA_HOSTS 2023 #define CR_PROBE_REPLICA_CONNECT 2024 #define CR_PROBE_SOURCE_CONNECT 2025 #define CR_SSL_CONNECTION_ERROR 2026 #define CR_MALFORMED_PACKET 2027 #define CR_WRONG_LICENSE 2028 /* new 4.1 error codes */ #define CR_NULL_POINTER 2029 #define CR_NO_PREPARE_STMT 2030 #define CR_PARAMS_NOT_BOUND 2031 #define CR_DATA_TRUNCATED 2032 #define CR_NO_PARAMETERS_EXISTS 2033 #define CR_INVALID_PARAMETER_NO 2034 #define CR_INVALID_BUFFER_USE 2035 #define CR_UNSUPPORTED_PARAM_TYPE 2036 #define CR_SHARED_MEMORY_CONNECTION 2037 #define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038 #define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039 #define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040 #define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041 #define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042 #define CR_SHARED_MEMORY_MAP_ERROR 2043 #define CR_SHARED_MEMORY_EVENT_ERROR 2044 #define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045 #define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046 #define CR_CONN_UNKNOW_PROTOCOL 2047 #define CR_INVALID_CONN_HANDLE 2048 #define CR_UNUSED_1 2049 #define CR_FETCH_CANCELED 2050 #define CR_NO_DATA 2051 #define CR_NO_STMT_METADATA 2052 #define CR_NO_RESULT_SET 2053 #define CR_NOT_IMPLEMENTED 2054 #define CR_SERVER_LOST_EXTENDED 2055 #define CR_STMT_CLOSED 2056 #define CR_NEW_STMT_METADATA 2057 #define CR_ALREADY_CONNECTED 2058 #define CR_AUTH_PLUGIN_CANNOT_LOAD 2059 #define CR_DUPLICATE_CONNECTION_ATTR 2060 #define CR_AUTH_PLUGIN_ERR 2061 #define CR_INSECURE_API_ERR 2062 #define CR_FILE_NAME_TOO_LONG 2063 #define CR_SSL_FIPS_MODE_ERR 2064 #define CR_DEPRECATED_COMPRESSION_NOT_SUPPORTED 2065 #define CR_COMPRESSION_WRONGLY_CONFIGURED 2066 #define CR_KERBEROS_USER_NOT_FOUND 2067 #define CR_LOAD_DATA_LOCAL_INFILE_REJECTED 2068 #define CR_LOAD_DATA_LOCAL_INFILE_REALPATH_FAIL 2069 #define CR_DNS_SRV_LOOKUP_FAILED 2070 #define CR_MANDATORY_TRACKER_NOT_FOUND 2071 #define CR_INVALID_FACTOR_NO 2072 #define CR_CANT_GET_SESSION_DATA 2073 #define CR_INVALID_CLIENT_CHARSET 2074 #define CR_ERROR_LAST /*Copy last error nr:*/ 2074 /* Add error numbers before CR_ERROR_LAST and change it accordingly. */ /* Visual Studio requires '__inline' for C code */ static inline const char *ER_CLIENT(int client_errno) { if (client_errno >= CR_ERROR_FIRST && client_errno <= CR_ERROR_LAST) return client_errors[client_errno - CR_ERROR_FIRST]; return client_errors[CR_UNKNOWN_ERROR - CR_ERROR_FIRST]; } #endif /* ERRMSG_INCLUDED */ PKZݍeuumysql/mysql_version.hnu[/* Copyright Abandoned 1996,1999 TCX DataKonsult AB & Monty Program KB & Detron HB, 1996, 1999-2004, 2007 MySQL AB. This file is public domain and comes with NO WARRANTY of any kind */ /* Version numbers for protocol & mysqld */ #ifndef _mysql_version_h #define _mysql_version_h #define PROTOCOL_VERSION 10 #define MYSQL_SERVER_VERSION "8.0.41" #define MYSQL_BASE_VERSION "mysqld-8.0" #define MYSQL_SERVER_SUFFIX_DEF "" #define MYSQL_VERSION_ID 80041 #define MYSQL_VERSION_STABILITY "LTS" #define MYSQL_PORT 3306 #define MYSQL_ADMIN_PORT 33062 #define MYSQL_PORT_DEFAULT 0 #define MYSQL_UNIX_ADDR "/var/lib/mysql/mysql.sock" #define MYSQL_CONFIG_NAME "my" #define MYSQL_PERSIST_CONFIG_NAME "mysqld-auto" #define MYSQL_COMPILATION_COMMENT "MySQL Community - GPL" #define MYSQL_COMPILATION_COMMENT_SERVER "MySQL Community Server - GPL" #define LIBMYSQL_VERSION "8.0.41" #define LIBMYSQL_VERSION_ID 80041 #ifndef LICENSE #define LICENSE GPL #endif /* LICENSE */ #endif /* _mysql_version_h */ PKZpt mysql/field_types.hnu[/* Copyright (c) 2014, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. Without limiting anything contained in the foregoing, this file, which is part of C Driver for MySQL (Connector/C), is also subject to the Universal FOSS Exception, version 1.0, a copy of which can be found at http://oss.oracle.com/licenses/universal-foss-exception. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file field_types.h @brief This file contains the field type. @note This file can be imported both from C and C++ code, so the definitions have to be constructed to support this. */ #ifndef FIELD_TYPES_INCLUDED #define FIELD_TYPES_INCLUDED #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* * Constants exported from this package. */ /** Column types for MySQL */ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY, MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG, MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP, MYSQL_TYPE_LONGLONG, MYSQL_TYPE_INT24, MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR, MYSQL_TYPE_NEWDATE, /**< Internal to MySQL. Not used in protocol */ MYSQL_TYPE_VARCHAR, MYSQL_TYPE_BIT, MYSQL_TYPE_TIMESTAMP2, MYSQL_TYPE_DATETIME2, /**< Internal to MySQL. Not used in protocol */ MYSQL_TYPE_TIME2, /**< Internal to MySQL. Not used in protocol */ MYSQL_TYPE_TYPED_ARRAY, /**< Used for replication only */ MYSQL_TYPE_INVALID = 243, MYSQL_TYPE_BOOL = 244, /**< Currently just a placeholder */ MYSQL_TYPE_JSON = 245, MYSQL_TYPE_NEWDECIMAL = 246, MYSQL_TYPE_ENUM = 247, MYSQL_TYPE_SET = 248, MYSQL_TYPE_TINY_BLOB = 249, MYSQL_TYPE_MEDIUM_BLOB = 250, MYSQL_TYPE_LONG_BLOB = 251, MYSQL_TYPE_BLOB = 252, MYSQL_TYPE_VAR_STRING = 253, MYSQL_TYPE_STRING = 254, MYSQL_TYPE_GEOMETRY = 255 }; #ifdef __cplusplus } // extern "C" #else typedef enum enum_field_types enum_field_types; #endif /* __cplusplus */ #endif /* FIELD_TYPES_INCLUDED */ PKZ9RAAmysql/mysqlx_error.hnu[/* Copyright (c) 2015, 2024, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (including but not limited to OpenSSL) that is licensed under separate terms, as designated in a particular file or component or in included license documentation. The authors of MySQL hereby grant you an additional permission to link the program and your derivative works with the separately licensed software that they have either included with the program or referenced in the documentation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _MYSQLX_ERROR_H_ #define _MYSQLX_ERROR_H_ #define ER_X_BAD_MESSAGE 5000 #define ER_X_CAPABILITIES_PREPARE_FAILED 5001 #define ER_X_CAPABILITY_NOT_FOUND 5002 #define ER_X_INVALID_PROTOCOL_DATA 5003 #define ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_VALUE_LENGTH 5004 #define ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_KEY_LENGTH 5005 #define ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_EMPTY_KEY 5006 #define ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_LENGTH 5007 #define ER_X_BAD_CONNECTION_SESSION_ATTRIBUTE_TYPE 5008 #define ER_X_CAPABILITY_SET_NOT_ALLOWED 5009 #define ER_X_SERVICE_ERROR 5010 #define ER_X_SESSION 5011 #define ER_X_INVALID_ARGUMENT 5012 #define ER_X_MISSING_ARGUMENT 5013 #define ER_X_BAD_INSERT_DATA 5014 #define ER_X_CMD_NUM_ARGUMENTS 5015 #define ER_X_CMD_ARGUMENT_TYPE 5016 #define ER_X_CMD_ARGUMENT_VALUE 5017 #define ER_X_BAD_UPSERT_DATA 5018 #define ER_X_DUPLICATED_CAPABILITIES 5019 #define ER_X_CMD_ARGUMENT_OBJECT_EMPTY 5020 #define ER_X_CMD_INVALID_ARGUMENT 5021 #define ER_X_BAD_UPDATE_DATA 5050 #define ER_X_BAD_TYPE_OF_UPDATE 5051 #define ER_X_BAD_COLUMN_TO_UPDATE 5052 #define ER_X_BAD_MEMBER_TO_UPDATE 5053 #define ER_X_BAD_STATEMENT_ID 5110 #define ER_X_BAD_CURSOR_ID 5111 #define ER_X_BAD_SCHEMA 5112 #define ER_X_BAD_TABLE 5113 #define ER_X_BAD_PROJECTION 5114 #define ER_X_DOC_ID_MISSING 5115 #define ER_X_DUPLICATE_ENTRY 5116 #define ER_X_DOC_REQUIRED_FIELD_MISSING 5117 #define ER_X_PROJ_BAD_KEY_NAME 5120 #define ER_X_BAD_DOC_PATH 5121 #define ER_X_CURSOR_EXISTS 5122 #define ER_X_CURSOR_REACHED_EOF 5123 #define ER_X_PREPARED_STATMENT_CAN_HAVE_ONE_CURSOR 5131 #define ER_X_PREPARED_EXECUTE_ARGUMENT_NOT_SUPPORTED 5133 #define ER_X_PREPARED_EXECUTE_ARGUMENT_CONSISTENCY 5134 #define ER_X_EXPR_BAD_OPERATOR 5150 #define ER_X_EXPR_BAD_NUM_ARGS 5151 #define ER_X_EXPR_MISSING_ARG 5152 #define ER_X_EXPR_BAD_TYPE_VALUE 5153 #define ER_X_EXPR_BAD_VALUE 5154 #define ER_X_INVALID_COLLECTION 5156 #define ER_X_INVALID_ADMIN_COMMAND 5157 #define ER_X_EXPECT_NOT_OPEN 5158 #define ER_X_EXPECT_NO_ERROR_FAILED 5159 #define ER_X_EXPECT_BAD_CONDITION 5160 #define ER_X_EXPECT_BAD_CONDITION_VALUE 5161 #define ER_X_INVALID_NAMESPACE 5162 #define ER_X_BAD_NOTICE 5163 #define ER_X_CANNOT_DISABLE_NOTICE 5164 #define ER_X_BAD_CONFIGURATION 5165 #define ER_X_MYSQLX_ACCOUNT_MISSING_PERMISSIONS 5167 #define ER_X_EXPECT_FIELD_EXISTS_FAILED 5168 #define ER_X_BAD_LOCKING 5169 #define ER_X_FRAME_COMPRESSION_DISABLED 5170 #define ER_X_DECOMPRESSION_FAILED 5171 #define ER_X_BAD_COMPRESSED_FRAME 5174 #define ER_X_CAPABILITY_COMPRESSION_INVALID_ALGORITHM 5175 #define ER_X_CAPABILITY_COMPRESSION_INVALID_SERVER_STYLE 5176 #define ER_X_CAPABILITY_COMPRESSION_INVALID_CLIENT_STYLE 5177 #define ER_X_CAPABILITY_COMPRESSION_INVALID_OPTION 5178 #define ER_X_CAPABILITY_COMPRESSION_MISSING_REQUIRED_FIELDS 5179 #define ER_X_DOCUMENT_DOESNT_MATCH_EXPECTED_SCHEMA 5180 #define ER_X_COLLECTION_OPTION_DOESNT_EXISTS 5181 #define ER_X_INVALID_VALIDATION_SCHEMA 5182 #endif // _MYSQLX_ERROR_H_ PKZY7@@mysql/mysqlx_version.hnu[/* * Copyright (c) 2016, 2024, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, * as published by the Free Software Foundation. * * This program is designed to work with certain software (including * but not limited to OpenSSL) that is licensed under separate terms, * as designated in a particular file or component or in included license * documentation. The authors of MySQL hereby grant you an additional * permission to link the program and your derivative works with the * separately licensed software that they have either included with * the program or referenced in the documentation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License, version 2.0, for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Version numbers for X Plugin */ #ifndef _MYSQLX_VERSION_H_ #define _MYSQLX_VERSION_H_ #define MYSQLX_PLUGIN_VERSION_MAJOR 1 #define MYSQLX_PLUGIN_VERSION_MINOR 0 #define MYSQLX_PLUGIN_VERSION_PATCH 2 #define MYSQLX_PLUGIN_NAME "mysqlx" #define MYSQLX_STATUS_VARIABLE_PREFIX(NAME) "Mysqlx_" NAME #define MYSQLX_SYSTEM_VARIABLE_PREFIX(NAME) "mysqlx_" NAME #define MYSQLX_TCP_PORT 33060U #define MYSQLX_UNIX_ADDR "/var/run/mysqld/mysqlx.sock" #define MYSQLX_PLUGIN_VERSION ( (MYSQLX_PLUGIN_VERSION_MAJOR << 8) | MYSQLX_PLUGIN_VERSION_MINOR ) #define MYSQLX_PLUGIN_VERSION_STRING "1.0.2" #endif // _MYSQLX_VERSION_H_ PKZ:  unctrl.hnu[/**************************************************************************** * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * ****************************************************************************/ /* * unctrl.h * * Display a printable version of a control character. * Control characters are displayed in caret notation (^x), DELETE is displayed * as ^?. Printable characters are displayed as is. */ /* $Id: unctrl.h.in,v 1.11 2009/04/18 21:00:52 tom Exp $ */ #ifndef NCURSES_UNCTRL_H_incl #define NCURSES_UNCTRL_H_incl 1 #undef NCURSES_VERSION #define NCURSES_VERSION "6.1" #ifdef __cplusplus extern "C" { #endif #include #undef unctrl NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype); #if 1 NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype); #endif #ifdef __cplusplus } #endif #endif /* NCURSES_UNCTRL_H_incl */ PKZGA<< jpegint.hnu[/* * jpegint.h * * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1997, Thomas G. Lane. * Modified 1997-2009 by Guido Vollbeding. * libjpeg-turbo Modifications: * Copyright (C) 2015-2016, D. R. Commander. * Copyright (C) 2015, Google, Inc. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file provides common declarations for the various JPEG modules. * These declarations are considered internal to the JPEG library; most * applications using the library shouldn't need to include this file. */ /* Declarations for both compression & decompression */ typedef enum { /* Operating modes for buffer controllers */ JBUF_PASS_THRU, /* Plain stripwise operation */ /* Remaining modes require a full-image buffer to have been created */ JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ } J_BUF_MODE; /* Values of global_state field (jdapi.c has some dependencies on ordering!) */ #define CSTATE_START 100 /* after create_compress */ #define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ #define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ #define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ #define DSTATE_START 200 /* after create_decompress */ #define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ #define DSTATE_READY 202 /* found SOS, ready for start_decompress */ #define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ #define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ #define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ #define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ #define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ #define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ #define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ #define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ /* JLONG must hold at least signed 32-bit values. */ typedef long JLONG; /* * Left shift macro that handles a negative operand without causing any * sanitizer warnings */ #define LEFT_SHIFT(a, b) ((JLONG)((unsigned long)(a) << (b))) /* Declarations for compression modules */ /* Master control module */ struct jpeg_comp_master { void (*prepare_for_pass) (j_compress_ptr cinfo); void (*pass_startup) (j_compress_ptr cinfo); void (*finish_pass) (j_compress_ptr cinfo); /* State variables made visible to other modules */ boolean call_pass_startup; /* True if pass_startup must be called */ boolean is_last_pass; /* True during last pass */ }; /* Main buffer control (downsampled-data buffer) */ struct jpeg_c_main_controller { void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); void (*process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail); }; /* Compression preprocessing (downsampling input buffer control) */ struct jpeg_c_prep_controller { void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); void (*pre_process_data) (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail, JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, JDIMENSION out_row_groups_avail); }; /* Coefficient buffer control */ struct jpeg_c_coef_controller { void (*start_pass) (j_compress_ptr cinfo, J_BUF_MODE pass_mode); boolean (*compress_data) (j_compress_ptr cinfo, JSAMPIMAGE input_buf); }; /* Colorspace conversion */ struct jpeg_color_converter { void (*start_pass) (j_compress_ptr cinfo); void (*color_convert) (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows); }; /* Downsampling */ struct jpeg_downsampler { void (*start_pass) (j_compress_ptr cinfo); void (*downsample) (j_compress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION in_row_index, JSAMPIMAGE output_buf, JDIMENSION out_row_group_index); boolean need_context_rows; /* TRUE if need rows above & below */ }; /* Forward DCT (also controls coefficient quantization) */ struct jpeg_forward_dct { void (*start_pass) (j_compress_ptr cinfo); /* perhaps this should be an array??? */ void (*forward_DCT) (j_compress_ptr cinfo, jpeg_component_info *compptr, JSAMPARRAY sample_data, JBLOCKROW coef_blocks, JDIMENSION start_row, JDIMENSION start_col, JDIMENSION num_blocks); }; /* Entropy encoding */ struct jpeg_entropy_encoder { void (*start_pass) (j_compress_ptr cinfo, boolean gather_statistics); boolean (*encode_mcu) (j_compress_ptr cinfo, JBLOCKROW *MCU_data); void (*finish_pass) (j_compress_ptr cinfo); }; /* Marker writing */ struct jpeg_marker_writer { void (*write_file_header) (j_compress_ptr cinfo); void (*write_frame_header) (j_compress_ptr cinfo); void (*write_scan_header) (j_compress_ptr cinfo); void (*write_file_trailer) (j_compress_ptr cinfo); void (*write_tables_only) (j_compress_ptr cinfo); /* These routines are exported to allow insertion of extra markers */ /* Probably only COM and APPn markers should be written this way */ void (*write_marker_header) (j_compress_ptr cinfo, int marker, unsigned int datalen); void (*write_marker_byte) (j_compress_ptr cinfo, int val); }; /* Declarations for decompression modules */ /* Master control module */ struct jpeg_decomp_master { void (*prepare_for_output_pass) (j_decompress_ptr cinfo); void (*finish_output_pass) (j_decompress_ptr cinfo); /* State variables made visible to other modules */ boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ /* Partial decompression variables */ JDIMENSION first_iMCU_col; JDIMENSION last_iMCU_col; JDIMENSION first_MCU_col[MAX_COMPONENTS]; JDIMENSION last_MCU_col[MAX_COMPONENTS]; boolean jinit_upsampler_no_alloc; }; /* Input control module */ struct jpeg_input_controller { int (*consume_input) (j_decompress_ptr cinfo); void (*reset_input_controller) (j_decompress_ptr cinfo); void (*start_input_pass) (j_decompress_ptr cinfo); void (*finish_input_pass) (j_decompress_ptr cinfo); /* State variables made visible to other modules */ boolean has_multiple_scans; /* True if file has multiple scans */ boolean eoi_reached; /* True when EOI has been consumed */ }; /* Main buffer control (downsampled-data buffer) */ struct jpeg_d_main_controller { void (*start_pass) (j_decompress_ptr cinfo, J_BUF_MODE pass_mode); void (*process_data) (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); }; /* Coefficient buffer control */ struct jpeg_d_coef_controller { void (*start_input_pass) (j_decompress_ptr cinfo); int (*consume_data) (j_decompress_ptr cinfo); void (*start_output_pass) (j_decompress_ptr cinfo); int (*decompress_data) (j_decompress_ptr cinfo, JSAMPIMAGE output_buf); /* Pointer to array of coefficient virtual arrays, or NULL if none */ jvirt_barray_ptr *coef_arrays; }; /* Decompression postprocessing (color quantization buffer control) */ struct jpeg_d_post_controller { void (*start_pass) (j_decompress_ptr cinfo, J_BUF_MODE pass_mode); void (*post_process_data) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); }; /* Marker reading & parsing */ struct jpeg_marker_reader { void (*reset_marker_reader) (j_decompress_ptr cinfo); /* Read markers until SOS or EOI. * Returns same codes as are defined for jpeg_consume_input: * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. */ int (*read_markers) (j_decompress_ptr cinfo); /* Read a restart marker --- exported for use by entropy decoder only */ jpeg_marker_parser_method read_restart_marker; /* State of marker reader --- nominally internal, but applications * supplying COM or APPn handlers might like to know the state. */ boolean saw_SOI; /* found SOI? */ boolean saw_SOF; /* found SOF? */ int next_restart_num; /* next restart number expected (0-7) */ unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ }; /* Entropy decoding */ struct jpeg_entropy_decoder { void (*start_pass) (j_decompress_ptr cinfo); boolean (*decode_mcu) (j_decompress_ptr cinfo, JBLOCKROW *MCU_data); /* This is here to share code between baseline and progressive decoders; */ /* other modules probably should not use it */ boolean insufficient_data; /* set TRUE after emitting warning */ }; /* Inverse DCT (also performs dequantization) */ typedef void (*inverse_DCT_method_ptr) (j_decompress_ptr cinfo, jpeg_component_info *compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col); struct jpeg_inverse_dct { void (*start_pass) (j_decompress_ptr cinfo); /* It is useful to allow each component to have a separate IDCT method. */ inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; }; /* Upsampling (note that upsampler must also call color converter) */ struct jpeg_upsampler { void (*start_pass) (j_decompress_ptr cinfo); void (*upsample) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, JDIMENSION in_row_groups_avail, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail); boolean need_context_rows; /* TRUE if need rows above & below */ }; /* Colorspace conversion */ struct jpeg_color_deconverter { void (*start_pass) (j_decompress_ptr cinfo); void (*color_convert) (j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows); }; /* Color quantization or color precision reduction */ struct jpeg_color_quantizer { void (*start_pass) (j_decompress_ptr cinfo, boolean is_pre_scan); void (*color_quantize) (j_decompress_ptr cinfo, JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows); void (*finish_pass) (j_decompress_ptr cinfo); void (*new_color_map) (j_decompress_ptr cinfo); }; /* Miscellaneous useful macros */ #undef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) #undef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) /* We assume that right shift corresponds to signed division by 2 with * rounding towards minus infinity. This is correct for typical "arithmetic * shift" instructions that shift in copies of the sign bit. But some * C compilers implement >> with an unsigned shift. For these machines you * must define RIGHT_SHIFT_IS_UNSIGNED. * RIGHT_SHIFT provides a proper signed right shift of a JLONG quantity. * It is only applied with constant shift counts. SHIFT_TEMPS must be * included in the variables of any routine using RIGHT_SHIFT. */ #ifdef RIGHT_SHIFT_IS_UNSIGNED #define SHIFT_TEMPS JLONG shift_temp; #define RIGHT_SHIFT(x,shft) \ ((shift_temp = (x)) < 0 ? \ (shift_temp >> (shft)) | ((~((JLONG) 0)) << (32-(shft))) : \ (shift_temp >> (shft))) #else #define SHIFT_TEMPS #define RIGHT_SHIFT(x,shft) ((x) >> (shft)) #endif /* Compression module initialization routines */ EXTERN(void) jinit_compress_master (j_compress_ptr cinfo); EXTERN(void) jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only); EXTERN(void) jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_color_converter (j_compress_ptr cinfo); EXTERN(void) jinit_downsampler (j_compress_ptr cinfo); EXTERN(void) jinit_forward_dct (j_compress_ptr cinfo); EXTERN(void) jinit_huff_encoder (j_compress_ptr cinfo); EXTERN(void) jinit_phuff_encoder (j_compress_ptr cinfo); EXTERN(void) jinit_arith_encoder (j_compress_ptr cinfo); EXTERN(void) jinit_marker_writer (j_compress_ptr cinfo); /* Decompression module initialization routines */ EXTERN(void) jinit_master_decompress (j_decompress_ptr cinfo); EXTERN(void) jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer); EXTERN(void) jinit_input_controller (j_decompress_ptr cinfo); EXTERN(void) jinit_marker_reader (j_decompress_ptr cinfo); EXTERN(void) jinit_huff_decoder (j_decompress_ptr cinfo); EXTERN(void) jinit_phuff_decoder (j_decompress_ptr cinfo); EXTERN(void) jinit_arith_decoder (j_decompress_ptr cinfo); EXTERN(void) jinit_inverse_dct (j_decompress_ptr cinfo); EXTERN(void) jinit_upsampler (j_decompress_ptr cinfo); EXTERN(void) jinit_color_deconverter (j_decompress_ptr cinfo); EXTERN(void) jinit_1pass_quantizer (j_decompress_ptr cinfo); EXTERN(void) jinit_2pass_quantizer (j_decompress_ptr cinfo); EXTERN(void) jinit_merged_upsampler (j_decompress_ptr cinfo); /* Memory manager initialization */ EXTERN(void) jinit_memory_mgr (j_common_ptr cinfo); /* Utility routines in jutils.c */ EXTERN(long) jdiv_round_up (long a, long b); EXTERN(long) jround_up (long a, long b); EXTERN(void) jcopy_sample_rows (JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols); EXTERN(void) jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, JDIMENSION num_blocks); EXTERN(void) jzero_far (void *target, size_t bytestozero); /* Constant tables in jutils.c */ #if 0 /* This table is not actually needed in v6a */ extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ #endif extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ /* Arithmetic coding probability estimation tables in jaricom.c */ extern const JLONG jpeg_aritab[]; /* Suppress undefined-structure complaints if necessary. */ #ifdef INCOMPLETE_TYPES_BROKEN #ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ struct jvirt_sarray_control { long dummy; }; struct jvirt_barray_control { long dummy; }; #endif #endif /* INCOMPLETE_TYPES_BROKEN */ PKZ؊,, openssl/evp.hnu[/* * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ENVELOPE_H # define HEADER_ENVELOPE_H # include # include # include # include # include # define EVP_MAX_MD_SIZE 64/* longest known is SHA512 */ # define EVP_MAX_KEY_LENGTH 64 # define EVP_MAX_IV_LENGTH 16 # define EVP_MAX_BLOCK_LENGTH 32 # define PKCS5_SALT_LEN 8 /* Default PKCS#5 iteration count */ # define PKCS5_DEFAULT_ITER 2048 # include # define EVP_PK_RSA 0x0001 # define EVP_PK_DSA 0x0002 # define EVP_PK_DH 0x0004 # define EVP_PK_EC 0x0008 # define EVP_PKT_SIGN 0x0010 # define EVP_PKT_ENC 0x0020 # define EVP_PKT_EXCH 0x0040 # define EVP_PKS_RSA 0x0100 # define EVP_PKS_DSA 0x0200 # define EVP_PKS_EC 0x0400 # define EVP_PKEY_NONE NID_undef # define EVP_PKEY_RSA NID_rsaEncryption # define EVP_PKEY_RSA2 NID_rsa # define EVP_PKEY_RSA_PSS NID_rsassaPss # define EVP_PKEY_DSA NID_dsa # define EVP_PKEY_DSA1 NID_dsa_2 # define EVP_PKEY_DSA2 NID_dsaWithSHA # define EVP_PKEY_DSA3 NID_dsaWithSHA1 # define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 # define EVP_PKEY_DH NID_dhKeyAgreement # define EVP_PKEY_DHX NID_dhpublicnumber # define EVP_PKEY_EC NID_X9_62_id_ecPublicKey # define EVP_PKEY_SM2 NID_sm2 # define EVP_PKEY_HMAC NID_hmac # define EVP_PKEY_CMAC NID_cmac # define EVP_PKEY_SCRYPT NID_id_scrypt # define EVP_PKEY_TLS1_PRF NID_tls1_prf # define EVP_PKEY_HKDF NID_hkdf # define EVP_PKEY_POLY1305 NID_poly1305 # define EVP_PKEY_SIPHASH NID_siphash # define EVP_PKEY_X25519 NID_X25519 # define EVP_PKEY_ED25519 NID_ED25519 # define EVP_PKEY_X448 NID_X448 # define EVP_PKEY_ED448 NID_ED448 #ifdef __cplusplus extern "C" { #endif # define EVP_PKEY_MO_SIGN 0x0001 # define EVP_PKEY_MO_VERIFY 0x0002 # define EVP_PKEY_MO_ENCRYPT 0x0004 # define EVP_PKEY_MO_DECRYPT 0x0008 # ifndef EVP_MD EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); void EVP_MD_meth_free(EVP_MD *md); int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize); int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize); int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize); int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags); int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx)); int EVP_MD_meth_set_update(EVP_MD *md, int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count)); int EVP_MD_meth_set_final(EVP_MD *md, int (*final)(EVP_MD_CTX *ctx, unsigned char *md)); int EVP_MD_meth_set_copy(EVP_MD *md, int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from)); int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx)); int EVP_MD_meth_set_ctrl(EVP_MD *md, int (*ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)); int EVP_MD_meth_get_input_blocksize(const EVP_MD *md); int EVP_MD_meth_get_result_size(const EVP_MD *md); int EVP_MD_meth_get_app_datasize(const EVP_MD *md); unsigned long EVP_MD_meth_get_flags(const EVP_MD *md); int (*EVP_MD_meth_get_init(const EVP_MD *md))(EVP_MD_CTX *ctx); int (*EVP_MD_meth_get_update(const EVP_MD *md))(EVP_MD_CTX *ctx, const void *data, size_t count); int (*EVP_MD_meth_get_final(const EVP_MD *md))(EVP_MD_CTX *ctx, unsigned char *md); int (*EVP_MD_meth_get_copy(const EVP_MD *md))(EVP_MD_CTX *to, const EVP_MD_CTX *from); int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx); int (*EVP_MD_meth_get_ctrl(const EVP_MD *md))(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); /* digest can only handle a single block */ # define EVP_MD_FLAG_ONESHOT 0x0001 /* digest is extensible-output function, XOF */ # define EVP_MD_FLAG_XOF 0x0002 /* DigestAlgorithmIdentifier flags... */ # define EVP_MD_FLAG_DIGALGID_MASK 0x0018 /* NULL or absent parameter accepted. Use NULL */ # define EVP_MD_FLAG_DIGALGID_NULL 0x0000 /* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */ # define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008 /* Custom handling via ctrl */ # define EVP_MD_FLAG_DIGALGID_CUSTOM 0x0018 /* Note if suitable for use in FIPS mode */ # define EVP_MD_FLAG_FIPS 0x0400 /* Digest ctrls */ # define EVP_MD_CTRL_DIGALGID 0x1 # define EVP_MD_CTRL_MICALG 0x2 # define EVP_MD_CTRL_XOF_LEN 0x3 /* Minimum Algorithm specific ctrl value */ # define EVP_MD_CTRL_ALG_CTRL 0x1000 # endif /* !EVP_MD */ /* values for EVP_MD_CTX flags */ # define EVP_MD_CTX_FLAG_ONESHOT 0x0001/* digest update will be * called once only */ # define EVP_MD_CTX_FLAG_CLEANED 0x0002/* context has already been * cleaned */ # define EVP_MD_CTX_FLAG_REUSE 0x0004/* Don't free up ctx->md_data * in EVP_MD_CTX_reset */ /* * FIPS and pad options are ignored in 1.0.0, definitions are here so we * don't accidentally reuse the values for other purposes. */ # define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008/* Allow use of non FIPS * digest in FIPS mode */ /* * The following PAD options are also currently ignored in 1.0.0, digest * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*() * instead. */ # define EVP_MD_CTX_FLAG_PAD_MASK 0xF0/* RSA mode to use */ # define EVP_MD_CTX_FLAG_PAD_PKCS1 0x00/* PKCS#1 v1.5 mode */ # define EVP_MD_CTX_FLAG_PAD_X931 0x10/* X9.31 mode */ # define EVP_MD_CTX_FLAG_PAD_PSS 0x20/* PSS mode */ # define EVP_MD_CTX_FLAG_NO_INIT 0x0100/* Don't initialize md_data */ /* * Some functions such as EVP_DigestSign only finalise copies of internal * contexts so additional data can be included after the finalisation call. * This is inefficient if this functionality is not required: it is disabled * if the following flag is set. */ # define EVP_MD_CTX_FLAG_FINALISE 0x0200 /* NOTE: 0x0400 is reserved for internal usage */ EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len); EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher); void EVP_CIPHER_meth_free(EVP_CIPHER *cipher); int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len); int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags); int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size); int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc)); int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)); int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, int (*cleanup) (EVP_CIPHER_CTX *)); int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *)); int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *)); int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr)); int (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc); int (*EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl); int (*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *); int (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, ASN1_TYPE *); int (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, ASN1_TYPE *); int (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Values for cipher flags */ /* Modes for ciphers */ # define EVP_CIPH_STREAM_CIPHER 0x0 # define EVP_CIPH_ECB_MODE 0x1 # define EVP_CIPH_CBC_MODE 0x2 # define EVP_CIPH_CFB_MODE 0x3 # define EVP_CIPH_OFB_MODE 0x4 # define EVP_CIPH_CTR_MODE 0x5 # define EVP_CIPH_GCM_MODE 0x6 # define EVP_CIPH_CCM_MODE 0x7 # define EVP_CIPH_XTS_MODE 0x10001 # define EVP_CIPH_WRAP_MODE 0x10002 # define EVP_CIPH_OCB_MODE 0x10003 # define EVP_CIPH_MODE 0xF0007 /* Set if variable length cipher */ # define EVP_CIPH_VARIABLE_LENGTH 0x8 /* Set if the iv handling should be done by the cipher itself */ # define EVP_CIPH_CUSTOM_IV 0x10 /* Set if the cipher's init() function should be called if key is NULL */ # define EVP_CIPH_ALWAYS_CALL_INIT 0x20 /* Call ctrl() to init cipher parameters */ # define EVP_CIPH_CTRL_INIT 0x40 /* Don't use standard key length function */ # define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 /* Don't use standard block padding */ # define EVP_CIPH_NO_PADDING 0x100 /* cipher handles random key generation */ # define EVP_CIPH_RAND_KEY 0x200 /* cipher has its own additional copying logic */ # define EVP_CIPH_CUSTOM_COPY 0x400 /* Don't use standard iv length function */ # define EVP_CIPH_CUSTOM_IV_LENGTH 0x800 /* Allow use default ASN1 get/set iv */ # define EVP_CIPH_FLAG_DEFAULT_ASN1 0x1000 /* Buffer length in bits not bytes: CFB1 mode only */ # define EVP_CIPH_FLAG_LENGTH_BITS 0x2000 /* Note if suitable for use in FIPS mode */ # define EVP_CIPH_FLAG_FIPS 0x4000 /* Allow non FIPS cipher in FIPS mode */ # define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x8000 /* * Cipher handles any and all padding logic as well as finalisation. */ # define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000 # define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000 # define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000 /* Cipher can handle pipeline operations */ # define EVP_CIPH_FLAG_PIPELINE 0X800000 /* * Cipher context flag to indicate we can handle wrap mode: if allowed in * older applications it could overflow buffers. */ # define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0x1 /* ctrl() values */ # define EVP_CTRL_INIT 0x0 # define EVP_CTRL_SET_KEY_LENGTH 0x1 # define EVP_CTRL_GET_RC2_KEY_BITS 0x2 # define EVP_CTRL_SET_RC2_KEY_BITS 0x3 # define EVP_CTRL_GET_RC5_ROUNDS 0x4 # define EVP_CTRL_SET_RC5_ROUNDS 0x5 # define EVP_CTRL_RAND_KEY 0x6 # define EVP_CTRL_PBE_PRF_NID 0x7 # define EVP_CTRL_COPY 0x8 # define EVP_CTRL_AEAD_SET_IVLEN 0x9 # define EVP_CTRL_AEAD_GET_TAG 0x10 # define EVP_CTRL_AEAD_SET_TAG 0x11 # define EVP_CTRL_AEAD_SET_IV_FIXED 0x12 # define EVP_CTRL_GCM_SET_IVLEN EVP_CTRL_AEAD_SET_IVLEN # define EVP_CTRL_GCM_GET_TAG EVP_CTRL_AEAD_GET_TAG # define EVP_CTRL_GCM_SET_TAG EVP_CTRL_AEAD_SET_TAG # define EVP_CTRL_GCM_SET_IV_FIXED EVP_CTRL_AEAD_SET_IV_FIXED # define EVP_CTRL_GCM_IV_GEN 0x13 # define EVP_CTRL_CCM_SET_IVLEN EVP_CTRL_AEAD_SET_IVLEN # define EVP_CTRL_CCM_GET_TAG EVP_CTRL_AEAD_GET_TAG # define EVP_CTRL_CCM_SET_TAG EVP_CTRL_AEAD_SET_TAG # define EVP_CTRL_CCM_SET_IV_FIXED EVP_CTRL_AEAD_SET_IV_FIXED # define EVP_CTRL_CCM_SET_L 0x14 # define EVP_CTRL_CCM_SET_MSGLEN 0x15 /* * AEAD cipher deduces payload length and returns number of bytes required to * store MAC and eventual padding. Subsequent call to EVP_Cipher even * appends/verifies MAC. */ # define EVP_CTRL_AEAD_TLS1_AAD 0x16 /* Used by composite AEAD ciphers, no-op in GCM, CCM... */ # define EVP_CTRL_AEAD_SET_MAC_KEY 0x17 /* Set the GCM invocation field, decrypt only */ # define EVP_CTRL_GCM_SET_IV_INV 0x18 # define EVP_CTRL_TLS1_1_MULTIBLOCK_AAD 0x19 # define EVP_CTRL_TLS1_1_MULTIBLOCK_ENCRYPT 0x1a # define EVP_CTRL_TLS1_1_MULTIBLOCK_DECRYPT 0x1b # define EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE 0x1c # define EVP_CTRL_SSL3_MASTER_SECRET 0x1d /* EVP_CTRL_SET_SBOX takes the char * specifying S-boxes */ # define EVP_CTRL_SET_SBOX 0x1e /* * EVP_CTRL_SBOX_USED takes a 'size_t' and 'char *', pointing at a * pre-allocated buffer with specified size */ # define EVP_CTRL_SBOX_USED 0x1f /* EVP_CTRL_KEY_MESH takes 'size_t' number of bytes to mesh the key after, * 0 switches meshing off */ # define EVP_CTRL_KEY_MESH 0x20 /* EVP_CTRL_BLOCK_PADDING_MODE takes the padding mode */ # define EVP_CTRL_BLOCK_PADDING_MODE 0x21 /* Set the output buffers to use for a pipelined operation */ # define EVP_CTRL_SET_PIPELINE_OUTPUT_BUFS 0x22 /* Set the input buffers to use for a pipelined operation */ # define EVP_CTRL_SET_PIPELINE_INPUT_BUFS 0x23 /* Set the input buffer lengths to use for a pipelined operation */ # define EVP_CTRL_SET_PIPELINE_INPUT_LENS 0x24 # define EVP_CTRL_GET_IVLEN 0x25 /* Padding modes */ #define EVP_PADDING_PKCS7 1 #define EVP_PADDING_ISO7816_4 2 #define EVP_PADDING_ANSI923 3 #define EVP_PADDING_ISO10126 4 #define EVP_PADDING_ZERO 5 /* RFC 5246 defines additional data to be 13 bytes in length */ # define EVP_AEAD_TLS1_AAD_LEN 13 typedef struct { unsigned char *out; const unsigned char *inp; size_t len; unsigned int interleave; } EVP_CTRL_TLS1_1_MULTIBLOCK_PARAM; /* GCM TLS constants */ /* Length of fixed part of IV derived from PRF */ # define EVP_GCM_TLS_FIXED_IV_LEN 4 /* Length of explicit part of IV part of TLS records */ # define EVP_GCM_TLS_EXPLICIT_IV_LEN 8 /* Length of tag for TLS */ # define EVP_GCM_TLS_TAG_LEN 16 /* CCM TLS constants */ /* Length of fixed part of IV derived from PRF */ # define EVP_CCM_TLS_FIXED_IV_LEN 4 /* Length of explicit part of IV part of TLS records */ # define EVP_CCM_TLS_EXPLICIT_IV_LEN 8 /* Total length of CCM IV length for TLS */ # define EVP_CCM_TLS_IV_LEN 12 /* Length of tag for TLS */ # define EVP_CCM_TLS_TAG_LEN 16 /* Length of CCM8 tag for TLS */ # define EVP_CCM8_TLS_TAG_LEN 8 /* Length of tag for TLS */ # define EVP_CHACHAPOLY_TLS_TAG_LEN 16 typedef struct evp_cipher_info_st { const EVP_CIPHER *cipher; unsigned char iv[EVP_MAX_IV_LENGTH]; } EVP_CIPHER_INFO; /* Password based encryption function */ typedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de); # ifndef OPENSSL_NO_RSA # define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ (char *)(rsa)) # endif # ifndef OPENSSL_NO_DSA # define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ (char *)(dsa)) # endif # ifndef OPENSSL_NO_DH # define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\ (char *)(dh)) # endif # ifndef OPENSSL_NO_EC # define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ (char *)(eckey)) # endif # ifndef OPENSSL_NO_SIPHASH # define EVP_PKEY_assign_SIPHASH(pkey,shkey) EVP_PKEY_assign((pkey),EVP_PKEY_SIPHASH,\ (char *)(shkey)) # endif # ifndef OPENSSL_NO_POLY1305 # define EVP_PKEY_assign_POLY1305(pkey,polykey) EVP_PKEY_assign((pkey),EVP_PKEY_POLY1305,\ (char *)(polykey)) # endif /* Add some extra combinations */ # define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a)) # define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a)) # define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) # define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) int EVP_MD_type(const EVP_MD *md); # define EVP_MD_nid(e) EVP_MD_type(e) # define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) int EVP_MD_pkey_type(const EVP_MD *md); int EVP_MD_size(const EVP_MD *md); int EVP_MD_block_size(const EVP_MD *md); unsigned long EVP_MD_flags(const EVP_MD *md); const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx, const void *data, size_t count); void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx, int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count)); # define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) # define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) # define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx); void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); int EVP_CIPHER_nid(const EVP_CIPHER *cipher); # define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) int EVP_CIPHER_block_size(const EVP_CIPHER *cipher); int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *cipher); int EVP_CIPHER_key_length(const EVP_CIPHER *cipher); int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); # define EVP_CIPHER_mode(e) (EVP_CIPHER_flags(e) & EVP_CIPH_MODE) const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx); const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx); const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx); unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx); unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_num(const EVP_CIPHER_CTX *ctx); void EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num); int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx); void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data); # define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) # if OPENSSL_API_COMPAT < 0x10100000L # define EVP_CIPHER_CTX_flags(c) EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(c)) # endif # define EVP_CIPHER_CTX_mode(c) EVP_CIPHER_mode(EVP_CIPHER_CTX_cipher(c)) # define EVP_ENCODE_LENGTH(l) ((((l)+2)/3*4)+((l)/48+1)*2+80) # define EVP_DECODE_LENGTH(l) (((l)+3)/4*3+80) # define EVP_SignInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) # define EVP_SignInit(a,b) EVP_DigestInit(a,b) # define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) # define EVP_VerifyInit_ex(a,b,c) EVP_DigestInit_ex(a,b,c) # define EVP_VerifyInit(a,b) EVP_DigestInit(a,b) # define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) # define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e) # define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e) # define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) # define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) # ifdef CONST_STRICT void BIO_set_md(BIO *, const EVP_MD *md); # else # define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)(md)) # endif # define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)(mdp)) # define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0, \ (char *)(mdcp)) # define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0, \ (char *)(mdcp)) # define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) # define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0, \ (char *)(c_pp)) /*__owur*/ int EVP_Cipher(EVP_CIPHER_CTX *c, unsigned char *out, const unsigned char *in, unsigned int inl); # define EVP_add_cipher_alias(n,alias) \ OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n)) # define EVP_add_digest_alias(n,alias) \ OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n)) # define EVP_delete_cipher_alias(alias) \ OBJ_NAME_remove(alias,OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS); # define EVP_delete_digest_alias(alias) \ OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS); int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); EVP_MD_CTX *EVP_MD_CTX_new(void); int EVP_MD_CTX_reset(EVP_MD_CTX *ctx); void EVP_MD_CTX_free(EVP_MD_CTX *ctx); # define EVP_MD_CTX_create() EVP_MD_CTX_new() # define EVP_MD_CTX_init(ctx) EVP_MD_CTX_reset((ctx)) # define EVP_MD_CTX_destroy(ctx) EVP_MD_CTX_free((ctx)) __owur int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in); void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags); __owur int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); __owur int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt); __owur int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s); __owur int EVP_Digest(const void *data, size_t count, unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl); __owur int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in); __owur int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); __owur int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s); __owur int EVP_DigestFinalXOF(EVP_MD_CTX *ctx, unsigned char *md, size_t len); int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify); int EVP_read_pw_string_min(char *buf, int minlen, int maxlen, const char *prompt, int verify); void EVP_set_pw_prompt(const char *prompt); char *EVP_get_pw_prompt(void); __owur int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, const unsigned char *salt, const unsigned char *data, int datal, int count, unsigned char *key, unsigned char *iv); void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags); void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags); int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags); __owur int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv); /*__owur*/ int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv); /*__owur*/ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); /*__owur*/ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); /*__owur*/ int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); __owur int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv); /*__owur*/ int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv); /*__owur*/ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); __owur int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); /*__owur*/ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); __owur int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, const unsigned char *key, const unsigned char *iv, int enc); /*__owur*/ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc); __owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); __owur int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); __owur int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); __owur int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s, EVP_PKEY *pkey); __owur int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen, const unsigned char *tbs, size_t tbslen); __owur int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, unsigned int siglen, EVP_PKEY *pkey); __owur int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen, const unsigned char *tbs, size_t tbslen); /*__owur*/ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); __owur int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen); __owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey); __owur int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen); # ifndef OPENSSL_NO_RSA __owur int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, const unsigned char *ek, int ekl, const unsigned char *iv, EVP_PKEY *priv); __owur int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); __owur int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, int *ekl, unsigned char *iv, EVP_PKEY **pubk, int npubk); __owur int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); # endif EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void); void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx); int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, EVP_ENCODE_CTX *sctx); int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx); void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl); int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); # if OPENSSL_API_COMPAT < 0x10100000L # define EVP_CIPHER_CTX_init(c) EVP_CIPHER_CTX_reset(c) # define EVP_CIPHER_CTX_cleanup(c) EVP_CIPHER_CTX_reset(c) # endif EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c); void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *c); int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad); int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); const BIO_METHOD *BIO_f_md(void); const BIO_METHOD *BIO_f_base64(void); const BIO_METHOD *BIO_f_cipher(void); const BIO_METHOD *BIO_f_reliable(void); __owur int BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k, const unsigned char *i, int enc); const EVP_MD *EVP_md_null(void); # ifndef OPENSSL_NO_MD2 const EVP_MD *EVP_md2(void); # endif # ifndef OPENSSL_NO_MD4 const EVP_MD *EVP_md4(void); # endif # ifndef OPENSSL_NO_MD5 const EVP_MD *EVP_md5(void); const EVP_MD *EVP_md5_sha1(void); # endif # ifndef OPENSSL_NO_BLAKE2 const EVP_MD *EVP_blake2b512(void); const EVP_MD *EVP_blake2s256(void); # endif const EVP_MD *EVP_sha1(void); const EVP_MD *EVP_sha224(void); const EVP_MD *EVP_sha256(void); const EVP_MD *EVP_sha384(void); const EVP_MD *EVP_sha512(void); const EVP_MD *EVP_sha512_224(void); const EVP_MD *EVP_sha512_256(void); const EVP_MD *EVP_sha3_224(void); const EVP_MD *EVP_sha3_256(void); const EVP_MD *EVP_sha3_384(void); const EVP_MD *EVP_sha3_512(void); const EVP_MD *EVP_shake128(void); const EVP_MD *EVP_shake256(void); # ifndef OPENSSL_NO_MDC2 const EVP_MD *EVP_mdc2(void); # endif # ifndef OPENSSL_NO_RMD160 const EVP_MD *EVP_ripemd160(void); # endif # ifndef OPENSSL_NO_WHIRLPOOL const EVP_MD *EVP_whirlpool(void); # endif # ifndef OPENSSL_NO_SM3 const EVP_MD *EVP_sm3(void); # endif const EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */ # ifndef OPENSSL_NO_DES const EVP_CIPHER *EVP_des_ecb(void); const EVP_CIPHER *EVP_des_ede(void); const EVP_CIPHER *EVP_des_ede3(void); const EVP_CIPHER *EVP_des_ede_ecb(void); const EVP_CIPHER *EVP_des_ede3_ecb(void); const EVP_CIPHER *EVP_des_cfb64(void); # define EVP_des_cfb EVP_des_cfb64 const EVP_CIPHER *EVP_des_cfb1(void); const EVP_CIPHER *EVP_des_cfb8(void); const EVP_CIPHER *EVP_des_ede_cfb64(void); # define EVP_des_ede_cfb EVP_des_ede_cfb64 const EVP_CIPHER *EVP_des_ede3_cfb64(void); # define EVP_des_ede3_cfb EVP_des_ede3_cfb64 const EVP_CIPHER *EVP_des_ede3_cfb1(void); const EVP_CIPHER *EVP_des_ede3_cfb8(void); const EVP_CIPHER *EVP_des_ofb(void); const EVP_CIPHER *EVP_des_ede_ofb(void); const EVP_CIPHER *EVP_des_ede3_ofb(void); const EVP_CIPHER *EVP_des_cbc(void); const EVP_CIPHER *EVP_des_ede_cbc(void); const EVP_CIPHER *EVP_des_ede3_cbc(void); const EVP_CIPHER *EVP_desx_cbc(void); const EVP_CIPHER *EVP_des_ede3_wrap(void); /* * This should now be supported through the dev_crypto ENGINE. But also, why * are rc4 and md5 declarations made here inside a "NO_DES" precompiler * branch? */ # endif # ifndef OPENSSL_NO_RC4 const EVP_CIPHER *EVP_rc4(void); const EVP_CIPHER *EVP_rc4_40(void); # ifndef OPENSSL_NO_MD5 const EVP_CIPHER *EVP_rc4_hmac_md5(void); # endif # endif # ifndef OPENSSL_NO_IDEA const EVP_CIPHER *EVP_idea_ecb(void); const EVP_CIPHER *EVP_idea_cfb64(void); # define EVP_idea_cfb EVP_idea_cfb64 const EVP_CIPHER *EVP_idea_ofb(void); const EVP_CIPHER *EVP_idea_cbc(void); # endif # ifndef OPENSSL_NO_RC2 const EVP_CIPHER *EVP_rc2_ecb(void); const EVP_CIPHER *EVP_rc2_cbc(void); const EVP_CIPHER *EVP_rc2_40_cbc(void); const EVP_CIPHER *EVP_rc2_64_cbc(void); const EVP_CIPHER *EVP_rc2_cfb64(void); # define EVP_rc2_cfb EVP_rc2_cfb64 const EVP_CIPHER *EVP_rc2_ofb(void); # endif # ifndef OPENSSL_NO_BF const EVP_CIPHER *EVP_bf_ecb(void); const EVP_CIPHER *EVP_bf_cbc(void); const EVP_CIPHER *EVP_bf_cfb64(void); # define EVP_bf_cfb EVP_bf_cfb64 const EVP_CIPHER *EVP_bf_ofb(void); # endif # ifndef OPENSSL_NO_CAST const EVP_CIPHER *EVP_cast5_ecb(void); const EVP_CIPHER *EVP_cast5_cbc(void); const EVP_CIPHER *EVP_cast5_cfb64(void); # define EVP_cast5_cfb EVP_cast5_cfb64 const EVP_CIPHER *EVP_cast5_ofb(void); # endif # ifndef OPENSSL_NO_RC5 const EVP_CIPHER *EVP_rc5_32_12_16_cbc(void); const EVP_CIPHER *EVP_rc5_32_12_16_ecb(void); const EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void); # define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64 const EVP_CIPHER *EVP_rc5_32_12_16_ofb(void); # endif const EVP_CIPHER *EVP_aes_128_ecb(void); const EVP_CIPHER *EVP_aes_128_cbc(void); const EVP_CIPHER *EVP_aes_128_cfb1(void); const EVP_CIPHER *EVP_aes_128_cfb8(void); const EVP_CIPHER *EVP_aes_128_cfb128(void); # define EVP_aes_128_cfb EVP_aes_128_cfb128 const EVP_CIPHER *EVP_aes_128_ofb(void); const EVP_CIPHER *EVP_aes_128_ctr(void); const EVP_CIPHER *EVP_aes_128_ccm(void); const EVP_CIPHER *EVP_aes_128_gcm(void); const EVP_CIPHER *EVP_aes_128_xts(void); const EVP_CIPHER *EVP_aes_128_wrap(void); const EVP_CIPHER *EVP_aes_128_wrap_pad(void); # ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_128_ocb(void); # endif const EVP_CIPHER *EVP_aes_192_ecb(void); const EVP_CIPHER *EVP_aes_192_cbc(void); const EVP_CIPHER *EVP_aes_192_cfb1(void); const EVP_CIPHER *EVP_aes_192_cfb8(void); const EVP_CIPHER *EVP_aes_192_cfb128(void); # define EVP_aes_192_cfb EVP_aes_192_cfb128 const EVP_CIPHER *EVP_aes_192_ofb(void); const EVP_CIPHER *EVP_aes_192_ctr(void); const EVP_CIPHER *EVP_aes_192_ccm(void); const EVP_CIPHER *EVP_aes_192_gcm(void); const EVP_CIPHER *EVP_aes_192_wrap(void); const EVP_CIPHER *EVP_aes_192_wrap_pad(void); # ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_192_ocb(void); # endif const EVP_CIPHER *EVP_aes_256_ecb(void); const EVP_CIPHER *EVP_aes_256_cbc(void); const EVP_CIPHER *EVP_aes_256_cfb1(void); const EVP_CIPHER *EVP_aes_256_cfb8(void); const EVP_CIPHER *EVP_aes_256_cfb128(void); # define EVP_aes_256_cfb EVP_aes_256_cfb128 const EVP_CIPHER *EVP_aes_256_ofb(void); const EVP_CIPHER *EVP_aes_256_ctr(void); const EVP_CIPHER *EVP_aes_256_ccm(void); const EVP_CIPHER *EVP_aes_256_gcm(void); const EVP_CIPHER *EVP_aes_256_xts(void); const EVP_CIPHER *EVP_aes_256_wrap(void); const EVP_CIPHER *EVP_aes_256_wrap_pad(void); # ifndef OPENSSL_NO_OCB const EVP_CIPHER *EVP_aes_256_ocb(void); # endif const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void); const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void); const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void); const EVP_CIPHER *EVP_aes_256_cbc_hmac_sha256(void); # ifndef OPENSSL_NO_ARIA const EVP_CIPHER *EVP_aria_128_ecb(void); const EVP_CIPHER *EVP_aria_128_cbc(void); const EVP_CIPHER *EVP_aria_128_cfb1(void); const EVP_CIPHER *EVP_aria_128_cfb8(void); const EVP_CIPHER *EVP_aria_128_cfb128(void); # define EVP_aria_128_cfb EVP_aria_128_cfb128 const EVP_CIPHER *EVP_aria_128_ctr(void); const EVP_CIPHER *EVP_aria_128_ofb(void); const EVP_CIPHER *EVP_aria_128_gcm(void); const EVP_CIPHER *EVP_aria_128_ccm(void); const EVP_CIPHER *EVP_aria_192_ecb(void); const EVP_CIPHER *EVP_aria_192_cbc(void); const EVP_CIPHER *EVP_aria_192_cfb1(void); const EVP_CIPHER *EVP_aria_192_cfb8(void); const EVP_CIPHER *EVP_aria_192_cfb128(void); # define EVP_aria_192_cfb EVP_aria_192_cfb128 const EVP_CIPHER *EVP_aria_192_ctr(void); const EVP_CIPHER *EVP_aria_192_ofb(void); const EVP_CIPHER *EVP_aria_192_gcm(void); const EVP_CIPHER *EVP_aria_192_ccm(void); const EVP_CIPHER *EVP_aria_256_ecb(void); const EVP_CIPHER *EVP_aria_256_cbc(void); const EVP_CIPHER *EVP_aria_256_cfb1(void); const EVP_CIPHER *EVP_aria_256_cfb8(void); const EVP_CIPHER *EVP_aria_256_cfb128(void); # define EVP_aria_256_cfb EVP_aria_256_cfb128 const EVP_CIPHER *EVP_aria_256_ctr(void); const EVP_CIPHER *EVP_aria_256_ofb(void); const EVP_CIPHER *EVP_aria_256_gcm(void); const EVP_CIPHER *EVP_aria_256_ccm(void); # endif # ifndef OPENSSL_NO_CAMELLIA const EVP_CIPHER *EVP_camellia_128_ecb(void); const EVP_CIPHER *EVP_camellia_128_cbc(void); const EVP_CIPHER *EVP_camellia_128_cfb1(void); const EVP_CIPHER *EVP_camellia_128_cfb8(void); const EVP_CIPHER *EVP_camellia_128_cfb128(void); # define EVP_camellia_128_cfb EVP_camellia_128_cfb128 const EVP_CIPHER *EVP_camellia_128_ofb(void); const EVP_CIPHER *EVP_camellia_128_ctr(void); const EVP_CIPHER *EVP_camellia_192_ecb(void); const EVP_CIPHER *EVP_camellia_192_cbc(void); const EVP_CIPHER *EVP_camellia_192_cfb1(void); const EVP_CIPHER *EVP_camellia_192_cfb8(void); const EVP_CIPHER *EVP_camellia_192_cfb128(void); # define EVP_camellia_192_cfb EVP_camellia_192_cfb128 const EVP_CIPHER *EVP_camellia_192_ofb(void); const EVP_CIPHER *EVP_camellia_192_ctr(void); const EVP_CIPHER *EVP_camellia_256_ecb(void); const EVP_CIPHER *EVP_camellia_256_cbc(void); const EVP_CIPHER *EVP_camellia_256_cfb1(void); const EVP_CIPHER *EVP_camellia_256_cfb8(void); const EVP_CIPHER *EVP_camellia_256_cfb128(void); # define EVP_camellia_256_cfb EVP_camellia_256_cfb128 const EVP_CIPHER *EVP_camellia_256_ofb(void); const EVP_CIPHER *EVP_camellia_256_ctr(void); # endif # ifndef OPENSSL_NO_CHACHA const EVP_CIPHER *EVP_chacha20(void); # ifndef OPENSSL_NO_POLY1305 const EVP_CIPHER *EVP_chacha20_poly1305(void); # endif # endif # ifndef OPENSSL_NO_SEED const EVP_CIPHER *EVP_seed_ecb(void); const EVP_CIPHER *EVP_seed_cbc(void); const EVP_CIPHER *EVP_seed_cfb128(void); # define EVP_seed_cfb EVP_seed_cfb128 const EVP_CIPHER *EVP_seed_ofb(void); # endif # ifndef OPENSSL_NO_SM4 const EVP_CIPHER *EVP_sm4_ecb(void); const EVP_CIPHER *EVP_sm4_cbc(void); const EVP_CIPHER *EVP_sm4_cfb128(void); # define EVP_sm4_cfb EVP_sm4_cfb128 const EVP_CIPHER *EVP_sm4_ofb(void); const EVP_CIPHER *EVP_sm4_ctr(void); # endif # if OPENSSL_API_COMPAT < 0x10100000L # define OPENSSL_add_all_algorithms_conf() \ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \ | OPENSSL_INIT_ADD_ALL_DIGESTS \ | OPENSSL_INIT_LOAD_CONFIG, NULL) # define OPENSSL_add_all_algorithms_noconf() \ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \ | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL) # ifdef OPENSSL_LOAD_CONF # define OpenSSL_add_all_algorithms() OPENSSL_add_all_algorithms_conf() # else # define OpenSSL_add_all_algorithms() OPENSSL_add_all_algorithms_noconf() # endif # define OpenSSL_add_all_ciphers() \ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS, NULL) # define OpenSSL_add_all_digests() \ OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL) # define EVP_cleanup() while(0) continue # endif int EVP_add_cipher(const EVP_CIPHER *cipher); int EVP_add_digest(const EVP_MD *digest); const EVP_CIPHER *EVP_get_cipherbyname(const char *name); const EVP_MD *EVP_get_digestbyname(const char *name); void EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph, const char *from, const char *to, void *x), void *arg); void EVP_CIPHER_do_all_sorted(void (*fn) (const EVP_CIPHER *ciph, const char *from, const char *to, void *x), void *arg); void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph, const char *from, const char *to, void *x), void *arg); void EVP_MD_do_all_sorted(void (*fn) (const EVP_MD *ciph, const char *from, const char *to, void *x), void *arg); int EVP_PKEY_decrypt_old(unsigned char *dec_key, const unsigned char *enc_key, int enc_key_len, EVP_PKEY *private_key); int EVP_PKEY_encrypt_old(unsigned char *enc_key, const unsigned char *key, int key_len, EVP_PKEY *pub_key); int EVP_PKEY_type(int type); int EVP_PKEY_id(const EVP_PKEY *pkey); int EVP_PKEY_base_id(const EVP_PKEY *pkey); int EVP_PKEY_bits(const EVP_PKEY *pkey); int EVP_PKEY_security_bits(const EVP_PKEY *pkey); int EVP_PKEY_size(const EVP_PKEY *pkey); int EVP_PKEY_set_type(EVP_PKEY *pkey, int type); int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len); int EVP_PKEY_set_alias_type(EVP_PKEY *pkey, int type); # ifndef OPENSSL_NO_ENGINE int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e); ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey); # endif int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key); void *EVP_PKEY_get0(const EVP_PKEY *pkey); const unsigned char *EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len); # ifndef OPENSSL_NO_POLY1305 const unsigned char *EVP_PKEY_get0_poly1305(const EVP_PKEY *pkey, size_t *len); # endif # ifndef OPENSSL_NO_SIPHASH const unsigned char *EVP_PKEY_get0_siphash(const EVP_PKEY *pkey, size_t *len); # endif # ifndef OPENSSL_NO_RSA struct rsa_st; int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key); struct rsa_st *EVP_PKEY_get0_RSA(EVP_PKEY *pkey); struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey); # endif # ifndef OPENSSL_NO_DSA struct dsa_st; int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key); struct dsa_st *EVP_PKEY_get0_DSA(EVP_PKEY *pkey); struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey); # endif # ifndef OPENSSL_NO_DH struct dh_st; int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key); struct dh_st *EVP_PKEY_get0_DH(EVP_PKEY *pkey); struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); # endif # ifndef OPENSSL_NO_EC struct ec_key_st; int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key); struct ec_key_st *EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey); struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); # endif EVP_PKEY *EVP_PKEY_new(void); int EVP_PKEY_up_ref(EVP_PKEY *pkey); void EVP_PKEY_free(EVP_PKEY *pkey); EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length); int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length); EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length); int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode); int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx); int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx); int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx); int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); int EVP_PKEY_set1_tls_encodedpoint(EVP_PKEY *pkey, const unsigned char *pt, size_t ptlen); size_t EVP_PKEY_get1_tls_encodedpoint(EVP_PKEY *pkey, unsigned char **ppt); int EVP_CIPHER_type(const EVP_CIPHER *ctx); /* calls methods */ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); /* These are used by EVP_CIPHER methods */ int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); /* PKCS5 password based encryption */ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de); int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, int keylen, unsigned char *out); int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, const EVP_MD *digest, int keylen, unsigned char *out); int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de); #ifndef OPENSSL_NO_SCRYPT int EVP_PBE_scrypt(const char *pass, size_t passlen, const unsigned char *salt, size_t saltlen, uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem, unsigned char *key, size_t keylen); int PKCS5_v2_scrypt_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de); #endif void PKCS5_PBE_add(void); int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); /* PBE type */ /* Can appear as the outermost AlgorithmIdentifier */ # define EVP_PBE_TYPE_OUTER 0x0 /* Is an PRF type OID */ # define EVP_PBE_TYPE_PRF 0x1 /* Is a PKCS#5 v2.0 KDF */ # define EVP_PBE_TYPE_KDF 0x2 int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid, EVP_PBE_KEYGEN *keygen); int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, EVP_PBE_KEYGEN *keygen); int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid, EVP_PBE_KEYGEN **pkeygen); void EVP_PBE_cleanup(void); int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num); # define ASN1_PKEY_ALIAS 0x1 # define ASN1_PKEY_DYNAMIC 0x2 # define ASN1_PKEY_SIGPARAM_NULL 0x4 # define ASN1_PKEY_CTRL_PKCS7_SIGN 0x1 # define ASN1_PKEY_CTRL_PKCS7_ENCRYPT 0x2 # define ASN1_PKEY_CTRL_DEFAULT_MD_NID 0x3 # define ASN1_PKEY_CTRL_CMS_SIGN 0x5 # define ASN1_PKEY_CTRL_CMS_ENVELOPE 0x7 # define ASN1_PKEY_CTRL_CMS_RI_TYPE 0x8 # define ASN1_PKEY_CTRL_SET1_TLS_ENCPT 0x9 # define ASN1_PKEY_CTRL_GET1_TLS_ENCPT 0xa int EVP_PKEY_asn1_get_count(void); const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx); const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type); const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe, const char *str, int len); int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth); int EVP_PKEY_asn1_add_alias(int to, int from); int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, int *ppkey_flags, const char **pinfo, const char **ppem_str, const EVP_PKEY_ASN1_METHOD *ameth); const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey); EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info); void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst, const EVP_PKEY_ASN1_METHOD *src); void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth); void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, int (*pub_decode) (EVP_PKEY *pk, X509_PUBKEY *pub), int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk), int (*pub_cmp) (const EVP_PKEY *a, const EVP_PKEY *b), int (*pub_print) (BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx), int (*pkey_size) (const EVP_PKEY *pk), int (*pkey_bits) (const EVP_PKEY *pk)); void EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth, int (*priv_decode) (EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf), int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk), int (*priv_print) (BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)); void EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth, int (*param_decode) (EVP_PKEY *pkey, const unsigned char **pder, int derlen), int (*param_encode) (const EVP_PKEY *pkey, unsigned char **pder), int (*param_missing) (const EVP_PKEY *pk), int (*param_copy) (EVP_PKEY *to, const EVP_PKEY *from), int (*param_cmp) (const EVP_PKEY *a, const EVP_PKEY *b), int (*param_print) (BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)); void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, void (*pkey_free) (EVP_PKEY *pkey)); void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_ctrl) (EVP_PKEY *pkey, int op, long arg1, void *arg2)); void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth, int (*item_verify) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, X509_ALGOR *a, ASN1_BIT_STRING *sig, EVP_PKEY *pkey), int (*item_sign) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, X509_ALGOR *alg1, X509_ALGOR *alg2, ASN1_BIT_STRING *sig)); void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth, int (*siginf_set) (X509_SIG_INFO *siginf, const X509_ALGOR *alg, const ASN1_STRING *sig)); void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_check) (const EVP_PKEY *pk)); void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_pub_check) (const EVP_PKEY *pk)); void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_param_check) (const EVP_PKEY *pk)); void EVP_PKEY_asn1_set_set_priv_key(EVP_PKEY_ASN1_METHOD *ameth, int (*set_priv_key) (EVP_PKEY *pk, const unsigned char *priv, size_t len)); void EVP_PKEY_asn1_set_set_pub_key(EVP_PKEY_ASN1_METHOD *ameth, int (*set_pub_key) (EVP_PKEY *pk, const unsigned char *pub, size_t len)); void EVP_PKEY_asn1_set_get_priv_key(EVP_PKEY_ASN1_METHOD *ameth, int (*get_priv_key) (const EVP_PKEY *pk, unsigned char *priv, size_t *len)); void EVP_PKEY_asn1_set_get_pub_key(EVP_PKEY_ASN1_METHOD *ameth, int (*get_pub_key) (const EVP_PKEY *pk, unsigned char *pub, size_t *len)); void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_security_bits) (const EVP_PKEY *pk)); # define EVP_PKEY_OP_UNDEFINED 0 # define EVP_PKEY_OP_PARAMGEN (1<<1) # define EVP_PKEY_OP_KEYGEN (1<<2) # define EVP_PKEY_OP_SIGN (1<<3) # define EVP_PKEY_OP_VERIFY (1<<4) # define EVP_PKEY_OP_VERIFYRECOVER (1<<5) # define EVP_PKEY_OP_SIGNCTX (1<<6) # define EVP_PKEY_OP_VERIFYCTX (1<<7) # define EVP_PKEY_OP_ENCRYPT (1<<8) # define EVP_PKEY_OP_DECRYPT (1<<9) # define EVP_PKEY_OP_DERIVE (1<<10) # define EVP_PKEY_OP_TYPE_SIG \ (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \ | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX) # define EVP_PKEY_OP_TYPE_CRYPT \ (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT) # define EVP_PKEY_OP_TYPE_NOGEN \ (EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT | EVP_PKEY_OP_DERIVE) # define EVP_PKEY_OP_TYPE_GEN \ (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) # define EVP_PKEY_CTX_set_signature_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ EVP_PKEY_CTRL_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_get_signature_md(ctx, pmd) \ EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ EVP_PKEY_CTRL_GET_MD, 0, (void *)(pmd)) # define EVP_PKEY_CTX_set_mac_key(ctx, key, len) \ EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_SET_MAC_KEY, len, (void *)(key)) # define EVP_PKEY_CTRL_MD 1 # define EVP_PKEY_CTRL_PEER_KEY 2 # define EVP_PKEY_CTRL_PKCS7_ENCRYPT 3 # define EVP_PKEY_CTRL_PKCS7_DECRYPT 4 # define EVP_PKEY_CTRL_PKCS7_SIGN 5 # define EVP_PKEY_CTRL_SET_MAC_KEY 6 # define EVP_PKEY_CTRL_DIGESTINIT 7 /* Used by GOST key encryption in TLS */ # define EVP_PKEY_CTRL_SET_IV 8 # define EVP_PKEY_CTRL_CMS_ENCRYPT 9 # define EVP_PKEY_CTRL_CMS_DECRYPT 10 # define EVP_PKEY_CTRL_CMS_SIGN 11 # define EVP_PKEY_CTRL_CIPHER 12 # define EVP_PKEY_CTRL_GET_MD 13 # define EVP_PKEY_CTRL_SET_DIGEST_SIZE 14 # define EVP_PKEY_ALG_CTRL 0x1000 # define EVP_PKEY_FLAG_AUTOARGLEN 2 /* * Method handles all operations: don't assume any digest related defaults. */ # define EVP_PKEY_FLAG_SIGCTX_CUSTOM 4 /* Downstream modification, large value to avoid conflict */ # define EVP_PKEY_FLAG_FIPS 0x4000 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type); EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags); void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, const EVP_PKEY_METHOD *meth); void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src); void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth); int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth); int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth); size_t EVP_PKEY_meth_get_count(void); const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx); EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx); void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, int p1, void *p2); int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value); int EVP_PKEY_CTX_ctrl_uint64(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, uint64_t value); int EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str); int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex); int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md); int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx); void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen); EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, const unsigned char *key, int keylen); EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *e, const unsigned char *priv, size_t len); EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *e, const unsigned char *pub, size_t len); int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, unsigned char *priv, size_t *len); int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, unsigned char *pub, size_t *len); EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len, const EVP_CIPHER *cipher); void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data); void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx); EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx); EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx); void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data); void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx); int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen); int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen); int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, unsigned char *rout, size_t *routlen, const unsigned char *sig, size_t siglen); int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen); int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen); int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer); int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx); int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); int EVP_PKEY_check(EVP_PKEY_CTX *ctx); int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx); int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx); int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx); void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, int (*init) (EVP_PKEY_CTX *ctx)); void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, int (*copy) (EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)); void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, void (*cleanup) (EVP_PKEY_CTX *ctx)); void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, int (*paramgen_init) (EVP_PKEY_CTX *ctx), int (*paramgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, int (*keygen_init) (EVP_PKEY_CTX *ctx), int (*keygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, int (*sign_init) (EVP_PKEY_CTX *ctx), int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, int (*verify_init) (EVP_PKEY_CTX *ctx), int (*verify) (EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, int (*verify_recover_init) (EVP_PKEY_CTX *ctx), int (*verify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, int (*signctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), int (*signctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, EVP_MD_CTX *mctx)); void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, int (*verifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), int (*verifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen, EVP_MD_CTX *mctx)); void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, int (*encrypt_init) (EVP_PKEY_CTX *ctx), int (*encryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen)); void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, int (*decrypt_init) (EVP_PKEY_CTX *ctx), int (*decrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen)); void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, int (*derive_init) (EVP_PKEY_CTX *ctx), int (*derive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)); void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2), int (*ctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value)); void EVP_PKEY_meth_set_digestsign(EVP_PKEY_METHOD *pmeth, int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_set_digestverify(EVP_PKEY_METHOD *pmeth, int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey)); void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey)); void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey)); void EVP_PKEY_meth_set_digest_custom(EVP_PKEY_METHOD *pmeth, int (*digest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)); void EVP_PKEY_meth_get_init(const EVP_PKEY_METHOD *pmeth, int (**pinit) (EVP_PKEY_CTX *ctx)); void EVP_PKEY_meth_get_copy(const EVP_PKEY_METHOD *pmeth, int (**pcopy) (EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)); void EVP_PKEY_meth_get_cleanup(const EVP_PKEY_METHOD *pmeth, void (**pcleanup) (EVP_PKEY_CTX *ctx)); void EVP_PKEY_meth_get_paramgen(const EVP_PKEY_METHOD *pmeth, int (**pparamgen_init) (EVP_PKEY_CTX *ctx), int (**pparamgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); void EVP_PKEY_meth_get_keygen(const EVP_PKEY_METHOD *pmeth, int (**pkeygen_init) (EVP_PKEY_CTX *ctx), int (**pkeygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); void EVP_PKEY_meth_get_sign(const EVP_PKEY_METHOD *pmeth, int (**psign_init) (EVP_PKEY_CTX *ctx), int (**psign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_get_verify(const EVP_PKEY_METHOD *pmeth, int (**pverify_init) (EVP_PKEY_CTX *ctx), int (**pverify) (EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_get_verify_recover(const EVP_PKEY_METHOD *pmeth, int (**pverify_recover_init) (EVP_PKEY_CTX *ctx), int (**pverify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_get_signctx(const EVP_PKEY_METHOD *pmeth, int (**psignctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), int (**psignctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, EVP_MD_CTX *mctx)); void EVP_PKEY_meth_get_verifyctx(const EVP_PKEY_METHOD *pmeth, int (**pverifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), int (**pverifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen, EVP_MD_CTX *mctx)); void EVP_PKEY_meth_get_encrypt(const EVP_PKEY_METHOD *pmeth, int (**pencrypt_init) (EVP_PKEY_CTX *ctx), int (**pencryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen)); void EVP_PKEY_meth_get_decrypt(const EVP_PKEY_METHOD *pmeth, int (**pdecrypt_init) (EVP_PKEY_CTX *ctx), int (**pdecrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen)); void EVP_PKEY_meth_get_derive(const EVP_PKEY_METHOD *pmeth, int (**pderive_init) (EVP_PKEY_CTX *ctx), int (**pderive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)); void EVP_PKEY_meth_get_ctrl(const EVP_PKEY_METHOD *pmeth, int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2), int (**pctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value)); void EVP_PKEY_meth_get_digestsign(EVP_PKEY_METHOD *pmeth, int (**digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_get_digestverify(EVP_PKEY_METHOD *pmeth, int (**digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen)); void EVP_PKEY_meth_get_check(const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey)); void EVP_PKEY_meth_get_public_check(const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey)); void EVP_PKEY_meth_get_param_check(const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey)); void EVP_PKEY_meth_get_digest_custom(EVP_PKEY_METHOD *pmeth, int (**pdigest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)); void EVP_add_alg_module(void); # ifdef __cplusplus } # endif #endif PKZ  openssl/stack.hnu[/* * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_STACK_H # define HEADER_STACK_H #ifdef __cplusplus extern "C" { #endif typedef struct stack_st OPENSSL_STACK; /* Use STACK_OF(...) instead */ typedef int (*OPENSSL_sk_compfunc)(const void *, const void *); typedef void (*OPENSSL_sk_freefunc)(void *); typedef void *(*OPENSSL_sk_copyfunc)(const void *); int OPENSSL_sk_num(const OPENSSL_STACK *); void *OPENSSL_sk_value(const OPENSSL_STACK *, int); void *OPENSSL_sk_set(OPENSSL_STACK *st, int i, const void *data); OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc cmp); OPENSSL_STACK *OPENSSL_sk_new_null(void); OPENSSL_STACK *OPENSSL_sk_new_reserve(OPENSSL_sk_compfunc c, int n); int OPENSSL_sk_reserve(OPENSSL_STACK *st, int n); void OPENSSL_sk_free(OPENSSL_STACK *); void OPENSSL_sk_pop_free(OPENSSL_STACK *st, void (*func) (void *)); OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *, OPENSSL_sk_copyfunc c, OPENSSL_sk_freefunc f); int OPENSSL_sk_insert(OPENSSL_STACK *sk, const void *data, int where); void *OPENSSL_sk_delete(OPENSSL_STACK *st, int loc); void *OPENSSL_sk_delete_ptr(OPENSSL_STACK *st, const void *p); int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data); int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data); int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data); int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data); void *OPENSSL_sk_shift(OPENSSL_STACK *st); void *OPENSSL_sk_pop(OPENSSL_STACK *st); void OPENSSL_sk_zero(OPENSSL_STACK *st); OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk, OPENSSL_sk_compfunc cmp); OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st); void OPENSSL_sk_sort(OPENSSL_STACK *st); int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st); # if OPENSSL_API_COMPAT < 0x10100000L # define _STACK OPENSSL_STACK # define sk_num OPENSSL_sk_num # define sk_value OPENSSL_sk_value # define sk_set OPENSSL_sk_set # define sk_new OPENSSL_sk_new # define sk_new_null OPENSSL_sk_new_null # define sk_free OPENSSL_sk_free # define sk_pop_free OPENSSL_sk_pop_free # define sk_deep_copy OPENSSL_sk_deep_copy # define sk_insert OPENSSL_sk_insert # define sk_delete OPENSSL_sk_delete # define sk_delete_ptr OPENSSL_sk_delete_ptr # define sk_find OPENSSL_sk_find # define sk_find_ex OPENSSL_sk_find_ex # define sk_push OPENSSL_sk_push # define sk_unshift OPENSSL_sk_unshift # define sk_shift OPENSSL_sk_shift # define sk_pop OPENSSL_sk_pop # define sk_zero OPENSSL_sk_zero # define sk_set_cmp_func OPENSSL_sk_set_cmp_func # define sk_dup OPENSSL_sk_dup # define sk_sort OPENSSL_sk_sort # define sk_is_sorted OPENSSL_sk_is_sorted # endif #ifdef __cplusplus } #endif #endif PKZB 2""openssl/opensslconf-x86_64.hnu[/* Prepended at openssl package build-time. Don't include this file directly, * use instead. */ #ifndef openssl_opensslconf_multilib_redirection_h #error "Don't include this file directly, use instead!" #endif /* * WARNING: do not edit! * Generated by Makefile from include/openssl/opensslconf.h.in * * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #include #ifdef __cplusplus extern "C" { #endif #ifdef OPENSSL_ALGORITHM_DEFINES # error OPENSSL_ALGORITHM_DEFINES no longer supported #endif /* * OpenSSL was configured with the following options: */ #ifndef OPENSSL_NO_MDC2 # define OPENSSL_NO_MDC2 #endif #ifndef OPENSSL_NO_SM2 # define OPENSSL_NO_SM2 #endif #ifndef OPENSSL_NO_SM4 # define OPENSSL_NO_SM4 #endif #ifndef OPENSSL_THREADS # define OPENSSL_THREADS #endif #ifndef OPENSSL_RAND_SEED_OS # define OPENSSL_RAND_SEED_OS #endif #ifndef OPENSSL_NO_ASAN # define OPENSSL_NO_ASAN #endif #ifndef OPENSSL_NO_CRYPTO_MDEBUG # define OPENSSL_NO_CRYPTO_MDEBUG #endif #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE #endif #ifndef OPENSSL_NO_DEVCRYPTOENG # define OPENSSL_NO_DEVCRYPTOENG #endif #ifndef OPENSSL_NO_EC2M # define OPENSSL_NO_EC2M #endif #ifndef OPENSSL_NO_EGD # define OPENSSL_NO_EGD #endif #ifndef OPENSSL_NO_EXTERNAL_TESTS # define OPENSSL_NO_EXTERNAL_TESTS #endif #ifndef OPENSSL_NO_FUZZ_AFL # define OPENSSL_NO_FUZZ_AFL #endif #ifndef OPENSSL_NO_FUZZ_LIBFUZZER # define OPENSSL_NO_FUZZ_LIBFUZZER #endif #ifndef OPENSSL_NO_HEARTBEATS # define OPENSSL_NO_HEARTBEATS #endif #ifndef OPENSSL_NO_MSAN # define OPENSSL_NO_MSAN #endif #ifndef OPENSSL_NO_SSL_TRACE # define OPENSSL_NO_SSL_TRACE #endif #ifndef OPENSSL_NO_SSL3 # define OPENSSL_NO_SSL3 #endif #ifndef OPENSSL_NO_SSL3_METHOD # define OPENSSL_NO_SSL3_METHOD #endif #ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN #endif #ifndef OPENSSL_NO_UNIT_TEST # define OPENSSL_NO_UNIT_TEST #endif #ifndef OPENSSL_NO_STATIC_ENGINE # define OPENSSL_NO_STATIC_ENGINE #endif /* * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers * don't like that. This will hopefully silence them. */ #define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy; /* * Applications should use -DOPENSSL_API_COMPAT= to suppress the * declarations of functions deprecated in or before . Otherwise, they * still won't see them if the library has been built to disable deprecated * functions. */ #ifndef DECLARE_DEPRECATED # define DECLARE_DEPRECATED(f) f; # ifdef __GNUC__ # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) # undef DECLARE_DEPRECATED # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); # endif # elif defined(__SUNPRO_C) # if (__SUNPRO_C >= 0x5130) # undef DECLARE_DEPRECATED # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); # endif # endif #endif #ifndef OPENSSL_FILE # ifdef OPENSSL_NO_FILENAMES # define OPENSSL_FILE "" # define OPENSSL_LINE 0 # else # define OPENSSL_FILE __FILE__ # define OPENSSL_LINE __LINE__ # endif #endif #ifndef OPENSSL_MIN_API # define OPENSSL_MIN_API 0 #endif #if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API # undef OPENSSL_API_COMPAT # define OPENSSL_API_COMPAT OPENSSL_MIN_API #endif /* * Do not deprecate things to be deprecated in version 1.2.0 before the * OpenSSL version number matches. */ #if OPENSSL_VERSION_NUMBER < 0x10200000L # define DEPRECATEDIN_1_2_0(f) f; #elif OPENSSL_API_COMPAT < 0x10200000L # define DEPRECATEDIN_1_2_0(f) DECLARE_DEPRECATED(f) #else # define DEPRECATEDIN_1_2_0(f) #endif #if OPENSSL_API_COMPAT < 0x10100000L # define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f) #else # define DEPRECATEDIN_1_1_0(f) #endif #if OPENSSL_API_COMPAT < 0x10000000L # define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f) #else # define DEPRECATEDIN_1_0_0(f) #endif #if OPENSSL_API_COMPAT < 0x00908000L # define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f) #else # define DEPRECATEDIN_0_9_8(f) #endif /* Generate 80386 code? */ #undef I386_ONLY #undef OPENSSL_UNISTD #define OPENSSL_UNISTD #undef OPENSSL_EXPORT_VAR_AS_FUNCTION /* * The following are cipher-specific, but are part of the public API. */ #if !defined(OPENSSL_SYS_UEFI) # undef BN_LLONG /* Only one for the following should be defined */ # define SIXTY_FOUR_BIT_LONG # undef SIXTY_FOUR_BIT # undef THIRTY_TWO_BIT #endif #define RC4_INT unsigned int /* Always build FIPS module */ #ifndef OPENSSL_FIPS # define OPENSSL_FIPS #endif #ifdef __cplusplus } #endif PKZ\ TTopenssl/sslerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_SSLERR_H # define HEADER_SSLERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_SSL_strings(void); /* * SSL function codes. */ # define SSL_F_ADD_CLIENT_KEY_SHARE_EXT 438 # define SSL_F_ADD_KEY_SHARE 512 # define SSL_F_BYTES_TO_CIPHER_LIST 519 # define SSL_F_CHECK_SUITEB_CIPHER_LIST 331 # define SSL_F_CIPHERSUITE_CB 622 # define SSL_F_CONSTRUCT_CA_NAMES 552 # define SSL_F_CONSTRUCT_KEY_EXCHANGE_TBS 553 # define SSL_F_CONSTRUCT_STATEFUL_TICKET 636 # define SSL_F_CONSTRUCT_STATELESS_TICKET 637 # define SSL_F_CREATE_SYNTHETIC_MESSAGE_HASH 539 # define SSL_F_CREATE_TICKET_PREQUEL 638 # define SSL_F_CT_MOVE_SCTS 345 # define SSL_F_CT_STRICT 349 # define SSL_F_CUSTOM_EXT_ADD 554 # define SSL_F_CUSTOM_EXT_PARSE 555 # define SSL_F_D2I_SSL_SESSION 103 # define SSL_F_DANE_CTX_ENABLE 347 # define SSL_F_DANE_MTYPE_SET 393 # define SSL_F_DANE_TLSA_ADD 394 # define SSL_F_DERIVE_SECRET_KEY_AND_IV 514 # define SSL_F_DO_DTLS1_WRITE 245 # define SSL_F_DO_SSL3_WRITE 104 # define SSL_F_DTLS1_BUFFER_RECORD 247 # define SSL_F_DTLS1_CHECK_TIMEOUT_NUM 318 # define SSL_F_DTLS1_HEARTBEAT 305 # define SSL_F_DTLS1_HM_FRAGMENT_NEW 623 # define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288 # define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 # define SSL_F_DTLS1_PROCESS_RECORD 257 # define SSL_F_DTLS1_READ_BYTES 258 # define SSL_F_DTLS1_READ_FAILED 339 # define SSL_F_DTLS1_RETRANSMIT_MESSAGE 390 # define SSL_F_DTLS1_WRITE_APP_DATA_BYTES 268 # define SSL_F_DTLS1_WRITE_BYTES 545 # define SSL_F_DTLSV1_LISTEN 350 # define SSL_F_DTLS_CONSTRUCT_CHANGE_CIPHER_SPEC 371 # define SSL_F_DTLS_CONSTRUCT_HELLO_VERIFY_REQUEST 385 # define SSL_F_DTLS_GET_REASSEMBLED_MESSAGE 370 # define SSL_F_DTLS_PROCESS_HELLO_VERIFY 386 # define SSL_F_DTLS_RECORD_LAYER_NEW 635 # define SSL_F_DTLS_WAIT_FOR_DRY 592 # define SSL_F_EARLY_DATA_COUNT_OK 532 # define SSL_F_FINAL_EARLY_DATA 556 # define SSL_F_FINAL_EC_PT_FORMATS 485 # define SSL_F_FINAL_EMS 486 # define SSL_F_FINAL_KEY_SHARE 503 # define SSL_F_FINAL_MAXFRAGMENTLEN 557 # define SSL_F_FINAL_RENEGOTIATE 483 # define SSL_F_FINAL_SERVER_NAME 558 # define SSL_F_FINAL_SIG_ALGS 497 # define SSL_F_GET_CERT_VERIFY_TBS_DATA 588 # define SSL_F_NSS_KEYLOG_INT 500 # define SSL_F_OPENSSL_INIT_SSL 342 # define SSL_F_OSSL_STATEM_CLIENT13_READ_TRANSITION 436 # define SSL_F_OSSL_STATEM_CLIENT13_WRITE_TRANSITION 598 # define SSL_F_OSSL_STATEM_CLIENT_CONSTRUCT_MESSAGE 430 # define SSL_F_OSSL_STATEM_CLIENT_POST_PROCESS_MESSAGE 593 # define SSL_F_OSSL_STATEM_CLIENT_PROCESS_MESSAGE 594 # define SSL_F_OSSL_STATEM_CLIENT_READ_TRANSITION 417 # define SSL_F_OSSL_STATEM_CLIENT_WRITE_TRANSITION 599 # define SSL_F_OSSL_STATEM_SERVER13_READ_TRANSITION 437 # define SSL_F_OSSL_STATEM_SERVER13_WRITE_TRANSITION 600 # define SSL_F_OSSL_STATEM_SERVER_CONSTRUCT_MESSAGE 431 # define SSL_F_OSSL_STATEM_SERVER_POST_PROCESS_MESSAGE 601 # define SSL_F_OSSL_STATEM_SERVER_POST_WORK 602 # define SSL_F_OSSL_STATEM_SERVER_PRE_WORK 640 # define SSL_F_OSSL_STATEM_SERVER_PROCESS_MESSAGE 603 # define SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION 418 # define SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION 604 # define SSL_F_PARSE_CA_NAMES 541 # define SSL_F_PITEM_NEW 624 # define SSL_F_PQUEUE_NEW 625 # define SSL_F_PROCESS_KEY_SHARE_EXT 439 # define SSL_F_READ_STATE_MACHINE 352 # define SSL_F_SET_CLIENT_CIPHERSUITE 540 # define SSL_F_SRP_GENERATE_CLIENT_MASTER_SECRET 595 # define SSL_F_SRP_GENERATE_SERVER_MASTER_SECRET 589 # define SSL_F_SRP_VERIFY_SERVER_PARAM 596 # define SSL_F_SSL3_CHANGE_CIPHER_STATE 129 # define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130 # define SSL_F_SSL3_CTRL 213 # define SSL_F_SSL3_CTX_CTRL 133 # define SSL_F_SSL3_DIGEST_CACHED_RECORDS 293 # define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC 292 # define SSL_F_SSL3_ENC 608 # define SSL_F_SSL3_FINAL_FINISH_MAC 285 # define SSL_F_SSL3_FINISH_MAC 587 # define SSL_F_SSL3_GENERATE_KEY_BLOCK 238 # define SSL_F_SSL3_GENERATE_MASTER_SECRET 388 # define SSL_F_SSL3_GET_RECORD 143 # define SSL_F_SSL3_INIT_FINISHED_MAC 397 # define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147 # define SSL_F_SSL3_READ_BYTES 148 # define SSL_F_SSL3_READ_N 149 # define SSL_F_SSL3_SETUP_KEY_BLOCK 157 # define SSL_F_SSL3_SETUP_READ_BUFFER 156 # define SSL_F_SSL3_SETUP_WRITE_BUFFER 291 # define SSL_F_SSL3_WRITE_BYTES 158 # define SSL_F_SSL3_WRITE_PENDING 159 # define SSL_F_SSL_ADD_CERT_CHAIN 316 # define SSL_F_SSL_ADD_CERT_TO_BUF 319 # define SSL_F_SSL_ADD_CERT_TO_WPACKET 493 # define SSL_F_SSL_ADD_CLIENTHELLO_RENEGOTIATE_EXT 298 # define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT 277 # define SSL_F_SSL_ADD_CLIENTHELLO_USE_SRTP_EXT 307 # define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 # define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 # define SSL_F_SSL_ADD_SERVERHELLO_RENEGOTIATE_EXT 299 # define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT 278 # define SSL_F_SSL_ADD_SERVERHELLO_USE_SRTP_EXT 308 # define SSL_F_SSL_BAD_METHOD 160 # define SSL_F_SSL_BUILD_CERT_CHAIN 332 # define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 # define SSL_F_SSL_CACHE_CIPHERLIST 520 # define SSL_F_SSL_CERT_ADD0_CHAIN_CERT 346 # define SSL_F_SSL_CERT_DUP 221 # define SSL_F_SSL_CERT_NEW 162 # define SSL_F_SSL_CERT_SET0_CHAIN 340 # define SSL_F_SSL_CHECK_PRIVATE_KEY 163 # define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT 280 # define SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO 606 # define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG 279 # define SSL_F_SSL_CHOOSE_CLIENT_VERSION 607 # define SSL_F_SSL_CIPHER_DESCRIPTION 626 # define SSL_F_SSL_CIPHER_LIST_TO_BYTES 425 # define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 # define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 # define SSL_F_SSL_CLEAR 164 # define SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT 627 # define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165 # define SSL_F_SSL_CONF_CMD 334 # define SSL_F_SSL_CREATE_CIPHER_LIST 166 # define SSL_F_SSL_CTRL 232 # define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168 # define SSL_F_SSL_CTX_ENABLE_CT 398 # define SSL_F_SSL_CTX_MAKE_PROFILES 309 # define SSL_F_SSL_CTX_NEW 169 # define SSL_F_SSL_CTX_SET_ALPN_PROTOS 343 # define SSL_F_SSL_CTX_SET_CIPHER_LIST 269 # define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE 290 # define SSL_F_SSL_CTX_SET_CT_VALIDATION_CALLBACK 396 # define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219 # define SSL_F_SSL_CTX_SET_SSL_VERSION 170 # define SSL_F_SSL_CTX_SET_TLSEXT_MAX_FRAGMENT_LENGTH 551 # define SSL_F_SSL_CTX_USE_CERTIFICATE 171 # define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172 # define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 173 # define SSL_F_SSL_CTX_USE_PRIVATEKEY 174 # define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 175 # define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 176 # define SSL_F_SSL_CTX_USE_PSK_IDENTITY_HINT 272 # define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 177 # define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178 # define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179 # define SSL_F_SSL_CTX_USE_SERVERINFO 336 # define SSL_F_SSL_CTX_USE_SERVERINFO_EX 543 # define SSL_F_SSL_CTX_USE_SERVERINFO_FILE 337 # define SSL_F_SSL_DANE_DUP 403 # define SSL_F_SSL_DANE_ENABLE 395 # define SSL_F_SSL_DERIVE 590 # define SSL_F_SSL_DO_CONFIG 391 # define SSL_F_SSL_DO_HANDSHAKE 180 # define SSL_F_SSL_DUP_CA_LIST 408 # define SSL_F_SSL_ENABLE_CT 402 # define SSL_F_SSL_GENERATE_PKEY_GROUP 559 # define SSL_F_SSL_GENERATE_SESSION_ID 547 # define SSL_F_SSL_GET_NEW_SESSION 181 # define SSL_F_SSL_GET_PREV_SESSION 217 # define SSL_F_SSL_GET_SERVER_CERT_INDEX 322 # define SSL_F_SSL_GET_SIGN_PKEY 183 # define SSL_F_SSL_HANDSHAKE_HASH 560 # define SSL_F_SSL_INIT_WBIO_BUFFER 184 # define SSL_F_SSL_KEY_UPDATE 515 # define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185 # define SSL_F_SSL_LOG_MASTER_SECRET 498 # define SSL_F_SSL_LOG_RSA_CLIENT_KEY_EXCHANGE 499 # define SSL_F_SSL_MODULE_INIT 392 # define SSL_F_SSL_NEW 186 # define SSL_F_SSL_NEXT_PROTO_VALIDATE 565 # define SSL_F_SSL_PARSE_CLIENTHELLO_RENEGOTIATE_EXT 300 # define SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT 302 # define SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT 310 # define SSL_F_SSL_PARSE_SERVERHELLO_RENEGOTIATE_EXT 301 # define SSL_F_SSL_PARSE_SERVERHELLO_TLSEXT 303 # define SSL_F_SSL_PARSE_SERVERHELLO_USE_SRTP_EXT 311 # define SSL_F_SSL_PEEK 270 # define SSL_F_SSL_PEEK_EX 432 # define SSL_F_SSL_PEEK_INTERNAL 522 # define SSL_F_SSL_READ 223 # define SSL_F_SSL_READ_EARLY_DATA 529 # define SSL_F_SSL_READ_EX 434 # define SSL_F_SSL_READ_INTERNAL 523 # define SSL_F_SSL_RENEGOTIATE 516 # define SSL_F_SSL_RENEGOTIATE_ABBREVIATED 546 # define SSL_F_SSL_SCAN_CLIENTHELLO_TLSEXT 320 # define SSL_F_SSL_SCAN_SERVERHELLO_TLSEXT 321 # define SSL_F_SSL_SESSION_DUP 348 # define SSL_F_SSL_SESSION_NEW 189 # define SSL_F_SSL_SESSION_PRINT_FP 190 # define SSL_F_SSL_SESSION_SET1_ID 423 # define SSL_F_SSL_SESSION_SET1_ID_CONTEXT 312 # define SSL_F_SSL_SET_ALPN_PROTOS 344 # define SSL_F_SSL_SET_CERT 191 # define SSL_F_SSL_SET_CERT_AND_KEY 621 # define SSL_F_SSL_SET_CIPHER_LIST 271 # define SSL_F_SSL_SET_CT_VALIDATION_CALLBACK 399 # define SSL_F_SSL_SET_FD 192 # define SSL_F_SSL_SET_PKEY 193 # define SSL_F_SSL_SET_RFD 194 # define SSL_F_SSL_SET_SESSION 195 # define SSL_F_SSL_SET_SESSION_ID_CONTEXT 218 # define SSL_F_SSL_SET_SESSION_TICKET_EXT 294 # define SSL_F_SSL_SET_TLSEXT_MAX_FRAGMENT_LENGTH 550 # define SSL_F_SSL_SET_WFD 196 # define SSL_F_SSL_SHUTDOWN 224 # define SSL_F_SSL_SRP_CTX_INIT 313 # define SSL_F_SSL_START_ASYNC_JOB 389 # define SSL_F_SSL_UNDEFINED_FUNCTION 197 # define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244 # define SSL_F_SSL_USE_CERTIFICATE 198 # define SSL_F_SSL_USE_CERTIFICATE_ASN1 199 # define SSL_F_SSL_USE_CERTIFICATE_FILE 200 # define SSL_F_SSL_USE_PRIVATEKEY 201 # define SSL_F_SSL_USE_PRIVATEKEY_ASN1 202 # define SSL_F_SSL_USE_PRIVATEKEY_FILE 203 # define SSL_F_SSL_USE_PSK_IDENTITY_HINT 273 # define SSL_F_SSL_USE_RSAPRIVATEKEY 204 # define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 205 # define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206 # define SSL_F_SSL_VALIDATE_CT 400 # define SSL_F_SSL_VERIFY_CERT_CHAIN 207 # define SSL_F_SSL_VERIFY_CLIENT_POST_HANDSHAKE 616 # define SSL_F_SSL_WRITE 208 # define SSL_F_SSL_WRITE_EARLY_DATA 526 # define SSL_F_SSL_WRITE_EARLY_FINISH 527 # define SSL_F_SSL_WRITE_EX 433 # define SSL_F_SSL_WRITE_INTERNAL 524 # define SSL_F_STATE_MACHINE 353 # define SSL_F_TLS12_CHECK_PEER_SIGALG 333 # define SSL_F_TLS12_COPY_SIGALGS 533 # define SSL_F_TLS13_CHANGE_CIPHER_STATE 440 # define SSL_F_TLS13_ENC 609 # define SSL_F_TLS13_FINAL_FINISH_MAC 605 # define SSL_F_TLS13_GENERATE_SECRET 591 # define SSL_F_TLS13_HKDF_EXPAND 561 # define SSL_F_TLS13_RESTORE_HANDSHAKE_DIGEST_FOR_PHA 617 # define SSL_F_TLS13_SAVE_HANDSHAKE_DIGEST_FOR_PHA 618 # define SSL_F_TLS13_SETUP_KEY_BLOCK 441 # define SSL_F_TLS1_CHANGE_CIPHER_STATE 209 # define SSL_F_TLS1_CHECK_DUPLICATE_EXTENSIONS 341 # define SSL_F_TLS1_ENC 401 # define SSL_F_TLS1_EXPORT_KEYING_MATERIAL 314 # define SSL_F_TLS1_GET_CURVELIST 338 # define SSL_F_TLS1_PRF 284 # define SSL_F_TLS1_SAVE_U16 628 # define SSL_F_TLS1_SETUP_KEY_BLOCK 211 # define SSL_F_TLS1_SET_GROUPS 629 # define SSL_F_TLS1_SET_RAW_SIGALGS 630 # define SSL_F_TLS1_SET_SERVER_SIGALGS 335 # define SSL_F_TLS1_SET_SHARED_SIGALGS 631 # define SSL_F_TLS1_SET_SIGALGS 632 # define SSL_F_TLS_CHOOSE_SIGALG 513 # define SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK 354 # define SSL_F_TLS_COLLECT_EXTENSIONS 435 # define SSL_F_TLS_CONSTRUCT_CERTIFICATE_AUTHORITIES 542 # define SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST 372 # define SSL_F_TLS_CONSTRUCT_CERT_STATUS 429 # define SSL_F_TLS_CONSTRUCT_CERT_STATUS_BODY 494 # define SSL_F_TLS_CONSTRUCT_CERT_VERIFY 496 # define SSL_F_TLS_CONSTRUCT_CHANGE_CIPHER_SPEC 427 # define SSL_F_TLS_CONSTRUCT_CKE_DHE 404 # define SSL_F_TLS_CONSTRUCT_CKE_ECDHE 405 # define SSL_F_TLS_CONSTRUCT_CKE_GOST 406 # define SSL_F_TLS_CONSTRUCT_CKE_PSK_PREAMBLE 407 # define SSL_F_TLS_CONSTRUCT_CKE_RSA 409 # define SSL_F_TLS_CONSTRUCT_CKE_SRP 410 # define SSL_F_TLS_CONSTRUCT_CLIENT_CERTIFICATE 484 # define SSL_F_TLS_CONSTRUCT_CLIENT_HELLO 487 # define SSL_F_TLS_CONSTRUCT_CLIENT_KEY_EXCHANGE 488 # define SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY 489 # define SSL_F_TLS_CONSTRUCT_CTOS_ALPN 466 # define SSL_F_TLS_CONSTRUCT_CTOS_CERTIFICATE 355 # define SSL_F_TLS_CONSTRUCT_CTOS_COOKIE 535 # define SSL_F_TLS_CONSTRUCT_CTOS_EARLY_DATA 530 # define SSL_F_TLS_CONSTRUCT_CTOS_EC_PT_FORMATS 467 # define SSL_F_TLS_CONSTRUCT_CTOS_EMS 468 # define SSL_F_TLS_CONSTRUCT_CTOS_ETM 469 # define SSL_F_TLS_CONSTRUCT_CTOS_HELLO 356 # define SSL_F_TLS_CONSTRUCT_CTOS_KEY_EXCHANGE 357 # define SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE 470 # define SSL_F_TLS_CONSTRUCT_CTOS_MAXFRAGMENTLEN 549 # define SSL_F_TLS_CONSTRUCT_CTOS_NPN 471 # define SSL_F_TLS_CONSTRUCT_CTOS_PADDING 472 # define SSL_F_TLS_CONSTRUCT_CTOS_POST_HANDSHAKE_AUTH 619 # define SSL_F_TLS_CONSTRUCT_CTOS_PSK 501 # define SSL_F_TLS_CONSTRUCT_CTOS_PSK_KEX_MODES 509 # define SSL_F_TLS_CONSTRUCT_CTOS_RENEGOTIATE 473 # define SSL_F_TLS_CONSTRUCT_CTOS_SCT 474 # define SSL_F_TLS_CONSTRUCT_CTOS_SERVER_NAME 475 # define SSL_F_TLS_CONSTRUCT_CTOS_SESSION_TICKET 476 # define SSL_F_TLS_CONSTRUCT_CTOS_SIG_ALGS 477 # define SSL_F_TLS_CONSTRUCT_CTOS_SRP 478 # define SSL_F_TLS_CONSTRUCT_CTOS_STATUS_REQUEST 479 # define SSL_F_TLS_CONSTRUCT_CTOS_SUPPORTED_GROUPS 480 # define SSL_F_TLS_CONSTRUCT_CTOS_SUPPORTED_VERSIONS 481 # define SSL_F_TLS_CONSTRUCT_CTOS_USE_SRTP 482 # define SSL_F_TLS_CONSTRUCT_CTOS_VERIFY 358 # define SSL_F_TLS_CONSTRUCT_ENCRYPTED_EXTENSIONS 443 # define SSL_F_TLS_CONSTRUCT_END_OF_EARLY_DATA 536 # define SSL_F_TLS_CONSTRUCT_EXTENSIONS 447 # define SSL_F_TLS_CONSTRUCT_FINISHED 359 # define SSL_F_TLS_CONSTRUCT_HELLO_REQUEST 373 # define SSL_F_TLS_CONSTRUCT_HELLO_RETRY_REQUEST 510 # define SSL_F_TLS_CONSTRUCT_KEY_UPDATE 517 # define SSL_F_TLS_CONSTRUCT_NEW_SESSION_TICKET 428 # define SSL_F_TLS_CONSTRUCT_NEXT_PROTO 426 # define SSL_F_TLS_CONSTRUCT_SERVER_CERTIFICATE 490 # define SSL_F_TLS_CONSTRUCT_SERVER_HELLO 491 # define SSL_F_TLS_CONSTRUCT_SERVER_KEY_EXCHANGE 492 # define SSL_F_TLS_CONSTRUCT_STOC_ALPN 451 # define SSL_F_TLS_CONSTRUCT_STOC_CERTIFICATE 374 # define SSL_F_TLS_CONSTRUCT_STOC_COOKIE 613 # define SSL_F_TLS_CONSTRUCT_STOC_CRYPTOPRO_BUG 452 # define SSL_F_TLS_CONSTRUCT_STOC_DONE 375 # define SSL_F_TLS_CONSTRUCT_STOC_EARLY_DATA 531 # define SSL_F_TLS_CONSTRUCT_STOC_EARLY_DATA_INFO 525 # define SSL_F_TLS_CONSTRUCT_STOC_EC_PT_FORMATS 453 # define SSL_F_TLS_CONSTRUCT_STOC_EMS 454 # define SSL_F_TLS_CONSTRUCT_STOC_ETM 455 # define SSL_F_TLS_CONSTRUCT_STOC_HELLO 376 # define SSL_F_TLS_CONSTRUCT_STOC_KEY_EXCHANGE 377 # define SSL_F_TLS_CONSTRUCT_STOC_KEY_SHARE 456 # define SSL_F_TLS_CONSTRUCT_STOC_MAXFRAGMENTLEN 548 # define SSL_F_TLS_CONSTRUCT_STOC_NEXT_PROTO_NEG 457 # define SSL_F_TLS_CONSTRUCT_STOC_PSK 504 # define SSL_F_TLS_CONSTRUCT_STOC_RENEGOTIATE 458 # define SSL_F_TLS_CONSTRUCT_STOC_SERVER_NAME 459 # define SSL_F_TLS_CONSTRUCT_STOC_SESSION_TICKET 460 # define SSL_F_TLS_CONSTRUCT_STOC_STATUS_REQUEST 461 # define SSL_F_TLS_CONSTRUCT_STOC_SUPPORTED_GROUPS 544 # define SSL_F_TLS_CONSTRUCT_STOC_SUPPORTED_VERSIONS 611 # define SSL_F_TLS_CONSTRUCT_STOC_USE_SRTP 462 # define SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO 521 # define SSL_F_TLS_FINISH_HANDSHAKE 597 # define SSL_F_TLS_GET_MESSAGE_BODY 351 # define SSL_F_TLS_GET_MESSAGE_HEADER 387 # define SSL_F_TLS_HANDLE_ALPN 562 # define SSL_F_TLS_HANDLE_STATUS_REQUEST 563 # define SSL_F_TLS_PARSE_CERTIFICATE_AUTHORITIES 566 # define SSL_F_TLS_PARSE_CLIENTHELLO_TLSEXT 449 # define SSL_F_TLS_PARSE_CTOS_ALPN 567 # define SSL_F_TLS_PARSE_CTOS_COOKIE 614 # define SSL_F_TLS_PARSE_CTOS_EARLY_DATA 568 # define SSL_F_TLS_PARSE_CTOS_EC_PT_FORMATS 569 # define SSL_F_TLS_PARSE_CTOS_EMS 570 # define SSL_F_TLS_PARSE_CTOS_KEY_SHARE 463 # define SSL_F_TLS_PARSE_CTOS_MAXFRAGMENTLEN 571 # define SSL_F_TLS_PARSE_CTOS_POST_HANDSHAKE_AUTH 620 # define SSL_F_TLS_PARSE_CTOS_PSK 505 # define SSL_F_TLS_PARSE_CTOS_PSK_KEX_MODES 572 # define SSL_F_TLS_PARSE_CTOS_RENEGOTIATE 464 # define SSL_F_TLS_PARSE_CTOS_SERVER_NAME 573 # define SSL_F_TLS_PARSE_CTOS_SESSION_TICKET 574 # define SSL_F_TLS_PARSE_CTOS_SIG_ALGS 575 # define SSL_F_TLS_PARSE_CTOS_SIG_ALGS_CERT 615 # define SSL_F_TLS_PARSE_CTOS_SRP 576 # define SSL_F_TLS_PARSE_CTOS_STATUS_REQUEST 577 # define SSL_F_TLS_PARSE_CTOS_SUPPORTED_GROUPS 578 # define SSL_F_TLS_PARSE_CTOS_USE_SRTP 465 # define SSL_F_TLS_PARSE_STOC_ALPN 579 # define SSL_F_TLS_PARSE_STOC_COOKIE 534 # define SSL_F_TLS_PARSE_STOC_EARLY_DATA 538 # define SSL_F_TLS_PARSE_STOC_EARLY_DATA_INFO 528 # define SSL_F_TLS_PARSE_STOC_EC_PT_FORMATS 580 # define SSL_F_TLS_PARSE_STOC_KEY_SHARE 445 # define SSL_F_TLS_PARSE_STOC_MAXFRAGMENTLEN 581 # define SSL_F_TLS_PARSE_STOC_NPN 582 # define SSL_F_TLS_PARSE_STOC_PSK 502 # define SSL_F_TLS_PARSE_STOC_RENEGOTIATE 448 # define SSL_F_TLS_PARSE_STOC_SCT 564 # define SSL_F_TLS_PARSE_STOC_SERVER_NAME 583 # define SSL_F_TLS_PARSE_STOC_SESSION_TICKET 584 # define SSL_F_TLS_PARSE_STOC_STATUS_REQUEST 585 # define SSL_F_TLS_PARSE_STOC_SUPPORTED_VERSIONS 612 # define SSL_F_TLS_PARSE_STOC_USE_SRTP 446 # define SSL_F_TLS_POST_PROCESS_CLIENT_HELLO 378 # define SSL_F_TLS_POST_PROCESS_CLIENT_KEY_EXCHANGE 384 # define SSL_F_TLS_PREPARE_CLIENT_CERTIFICATE 360 # define SSL_F_TLS_PROCESS_AS_HELLO_RETRY_REQUEST 610 # define SSL_F_TLS_PROCESS_CERTIFICATE_REQUEST 361 # define SSL_F_TLS_PROCESS_CERT_STATUS 362 # define SSL_F_TLS_PROCESS_CERT_STATUS_BODY 495 # define SSL_F_TLS_PROCESS_CERT_VERIFY 379 # define SSL_F_TLS_PROCESS_CHANGE_CIPHER_SPEC 363 # define SSL_F_TLS_PROCESS_CKE_DHE 411 # define SSL_F_TLS_PROCESS_CKE_ECDHE 412 # define SSL_F_TLS_PROCESS_CKE_GOST 413 # define SSL_F_TLS_PROCESS_CKE_PSK_PREAMBLE 414 # define SSL_F_TLS_PROCESS_CKE_RSA 415 # define SSL_F_TLS_PROCESS_CKE_SRP 416 # define SSL_F_TLS_PROCESS_CLIENT_CERTIFICATE 380 # define SSL_F_TLS_PROCESS_CLIENT_HELLO 381 # define SSL_F_TLS_PROCESS_CLIENT_KEY_EXCHANGE 382 # define SSL_F_TLS_PROCESS_ENCRYPTED_EXTENSIONS 444 # define SSL_F_TLS_PROCESS_END_OF_EARLY_DATA 537 # define SSL_F_TLS_PROCESS_FINISHED 364 # define SSL_F_TLS_PROCESS_HELLO_REQ 507 # define SSL_F_TLS_PROCESS_HELLO_RETRY_REQUEST 511 # define SSL_F_TLS_PROCESS_INITIAL_SERVER_FLIGHT 442 # define SSL_F_TLS_PROCESS_KEY_EXCHANGE 365 # define SSL_F_TLS_PROCESS_KEY_UPDATE 518 # define SSL_F_TLS_PROCESS_NEW_SESSION_TICKET 366 # define SSL_F_TLS_PROCESS_NEXT_PROTO 383 # define SSL_F_TLS_PROCESS_SERVER_CERTIFICATE 367 # define SSL_F_TLS_PROCESS_SERVER_DONE 368 # define SSL_F_TLS_PROCESS_SERVER_HELLO 369 # define SSL_F_TLS_PROCESS_SKE_DHE 419 # define SSL_F_TLS_PROCESS_SKE_ECDHE 420 # define SSL_F_TLS_PROCESS_SKE_PSK_PREAMBLE 421 # define SSL_F_TLS_PROCESS_SKE_SRP 422 # define SSL_F_TLS_PSK_DO_BINDER 506 # define SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT 450 # define SSL_F_TLS_SETUP_HANDSHAKE 508 # define SSL_F_USE_CERTIFICATE_CHAIN_FILE 220 # define SSL_F_WPACKET_INTERN_INIT_LEN 633 # define SSL_F_WPACKET_START_SUB_PACKET_LEN__ 634 # define SSL_F_WRITE_STATE_MACHINE 586 /* * SSL reason codes. */ # define SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY 291 # define SSL_R_APP_DATA_IN_HANDSHAKE 100 # define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272 # define SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE 143 # define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE 158 # define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 # define SSL_R_BAD_CIPHER 186 # define SSL_R_BAD_DATA 390 # define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106 # define SSL_R_BAD_DECOMPRESSION 107 # define SSL_R_BAD_DH_VALUE 102 # define SSL_R_BAD_DIGEST_LENGTH 111 # define SSL_R_BAD_EARLY_DATA 233 # define SSL_R_BAD_ECC_CERT 304 # define SSL_R_BAD_ECPOINT 306 # define SSL_R_BAD_EXTENSION 110 # define SSL_R_BAD_HANDSHAKE_LENGTH 332 # define SSL_R_BAD_HANDSHAKE_STATE 236 # define SSL_R_BAD_HELLO_REQUEST 105 # define SSL_R_BAD_HRR_VERSION 263 # define SSL_R_BAD_KEY_SHARE 108 # define SSL_R_BAD_KEY_UPDATE 122 # define SSL_R_BAD_LEGACY_VERSION 292 # define SSL_R_BAD_LENGTH 271 # define SSL_R_BAD_PACKET 240 # define SSL_R_BAD_PACKET_LENGTH 115 # define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116 # define SSL_R_BAD_PSK 219 # define SSL_R_BAD_PSK_IDENTITY 114 # define SSL_R_BAD_RECORD_TYPE 443 # define SSL_R_BAD_RSA_ENCRYPT 119 # define SSL_R_BAD_SIGNATURE 123 # define SSL_R_BAD_SRP_A_LENGTH 347 # define SSL_R_BAD_SRP_PARAMETERS 371 # define SSL_R_BAD_SRTP_MKI_VALUE 352 # define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST 353 # define SSL_R_BAD_SSL_FILETYPE 124 # define SSL_R_BAD_VALUE 384 # define SSL_R_BAD_WRITE_RETRY 127 # define SSL_R_BINDER_DOES_NOT_VERIFY 253 # define SSL_R_BIO_NOT_SET 128 # define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129 # define SSL_R_BN_LIB 130 # define SSL_R_CALLBACK_FAILED 234 # define SSL_R_CANNOT_CHANGE_CIPHER 109 # define SSL_R_CA_DN_LENGTH_MISMATCH 131 # define SSL_R_CA_KEY_TOO_SMALL 397 # define SSL_R_CA_MD_TOO_WEAK 398 # define SSL_R_CCS_RECEIVED_EARLY 133 # define SSL_R_CERTIFICATE_VERIFY_FAILED 134 # define SSL_R_CERT_CB_ERROR 377 # define SSL_R_CERT_LENGTH_MISMATCH 135 # define SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED 218 # define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 # define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138 # define SSL_R_CLIENTHELLO_TLSEXT 226 # define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 # define SSL_R_COMPRESSION_DISABLED 343 # define SSL_R_COMPRESSION_FAILURE 141 # define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE 307 # define SSL_R_COMPRESSION_LIBRARY_ERROR 142 # define SSL_R_CONNECTION_TYPE_NOT_SET 144 # define SSL_R_CONTEXT_NOT_DANE_ENABLED 167 # define SSL_R_COOKIE_GEN_CALLBACK_FAILURE 400 # define SSL_R_COOKIE_MISMATCH 308 # define SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED 206 # define SSL_R_DANE_ALREADY_ENABLED 172 # define SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL 173 # define SSL_R_DANE_NOT_ENABLED 175 # define SSL_R_DANE_TLSA_BAD_CERTIFICATE 180 # define SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE 184 # define SSL_R_DANE_TLSA_BAD_DATA_LENGTH 189 # define SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH 192 # define SSL_R_DANE_TLSA_BAD_MATCHING_TYPE 200 # define SSL_R_DANE_TLSA_BAD_PUBLIC_KEY 201 # define SSL_R_DANE_TLSA_BAD_SELECTOR 202 # define SSL_R_DANE_TLSA_NULL_DATA 203 # define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145 # define SSL_R_DATA_LENGTH_TOO_LONG 146 # define SSL_R_DECRYPTION_FAILED 147 # define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281 # define SSL_R_DH_KEY_TOO_SMALL 394 # define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148 # define SSL_R_DIGEST_CHECK_FAILED 149 # define SSL_R_DTLS_MESSAGE_TOO_BIG 334 # define SSL_R_DUPLICATE_COMPRESSION_ID 309 # define SSL_R_ECC_CERT_NOT_FOR_SIGNING 318 # define SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE 374 # define SSL_R_EE_KEY_TOO_SMALL 399 # define SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST 354 # define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150 # define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151 # define SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN 204 # define SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE 194 # define SSL_R_EXCESSIVE_MESSAGE_SIZE 152 # define SSL_R_EXTENSION_NOT_RECEIVED 279 # define SSL_R_EXTRA_DATA_IN_MESSAGE 153 # define SSL_R_EXT_LENGTH_MISMATCH 163 # define SSL_R_FAILED_TO_INIT_ASYNC 405 # define SSL_R_FRAGMENTED_CLIENT_HELLO 401 # define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154 # define SSL_R_HTTPS_PROXY_REQUEST 155 # define SSL_R_HTTP_REQUEST 156 # define SSL_R_ILLEGAL_POINT_COMPRESSION 162 # define SSL_R_ILLEGAL_SUITEB_DIGEST 380 # define SSL_R_INAPPROPRIATE_FALLBACK 373 # define SSL_R_INCONSISTENT_COMPRESSION 340 # define SSL_R_INCONSISTENT_EARLY_DATA_ALPN 222 # define SSL_R_INCONSISTENT_EARLY_DATA_SNI 231 # define SSL_R_INCONSISTENT_EXTMS 104 # define SSL_R_INSUFFICIENT_SECURITY 241 # define SSL_R_INVALID_ALERT 205 # define SSL_R_INVALID_CCS_MESSAGE 260 # define SSL_R_INVALID_CERTIFICATE_OR_ALG 238 # define SSL_R_INVALID_COMMAND 280 # define SSL_R_INVALID_COMPRESSION_ALGORITHM 341 # define SSL_R_INVALID_CONFIG 283 # define SSL_R_INVALID_CONFIGURATION_NAME 113 # define SSL_R_INVALID_CONTEXT 282 # define SSL_R_INVALID_CT_VALIDATION_TYPE 212 # define SSL_R_INVALID_KEY_UPDATE_TYPE 120 # define SSL_R_INVALID_MAX_EARLY_DATA 174 # define SSL_R_INVALID_NULL_CMD_NAME 385 # define SSL_R_INVALID_SEQUENCE_NUMBER 402 # define SSL_R_INVALID_SERVERINFO_DATA 388 # define SSL_R_INVALID_SESSION_ID 999 # define SSL_R_INVALID_SRP_USERNAME 357 # define SSL_R_INVALID_STATUS_RESPONSE 328 # define SSL_R_INVALID_TICKET_KEYS_LENGTH 325 # define SSL_R_LENGTH_MISMATCH 159 # define SSL_R_LENGTH_TOO_LONG 404 # define SSL_R_LENGTH_TOO_SHORT 160 # define SSL_R_LIBRARY_BUG 274 # define SSL_R_LIBRARY_HAS_NO_CIPHERS 161 # define SSL_R_MISSING_DSA_SIGNING_CERT 165 # define SSL_R_MISSING_ECDSA_SIGNING_CERT 381 # define SSL_R_MISSING_FATAL 256 # define SSL_R_MISSING_PARAMETERS 290 # define SSL_R_MISSING_RSA_CERTIFICATE 168 # define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169 # define SSL_R_MISSING_RSA_SIGNING_CERT 170 # define SSL_R_MISSING_SIGALGS_EXTENSION 112 # define SSL_R_MISSING_SIGNING_CERT 221 # define SSL_R_MISSING_SRP_PARAM 358 # define SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION 209 # define SSL_R_MISSING_TMP_DH_KEY 171 # define SSL_R_MISSING_TMP_ECDH_KEY 311 # define SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA 293 # define SSL_R_NOT_ON_RECORD_BOUNDARY 182 # define SSL_R_NOT_REPLACING_CERTIFICATE 289 # define SSL_R_NOT_SERVER 284 # define SSL_R_NO_APPLICATION_PROTOCOL 235 # define SSL_R_NO_CERTIFICATES_RETURNED 176 # define SSL_R_NO_CERTIFICATE_ASSIGNED 177 # define SSL_R_NO_CERTIFICATE_SET 179 # define SSL_R_NO_CHANGE_FOLLOWING_HRR 214 # define SSL_R_NO_CIPHERS_AVAILABLE 181 # define SSL_R_NO_CIPHERS_SPECIFIED 183 # define SSL_R_NO_CIPHER_MATCH 185 # define SSL_R_NO_CLIENT_CERT_METHOD 331 # define SSL_R_NO_COMPRESSION_SPECIFIED 187 # define SSL_R_NO_COOKIE_CALLBACK_SET 287 # define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER 330 # define SSL_R_NO_METHOD_SPECIFIED 188 # define SSL_R_NO_PEM_EXTENSIONS 389 # define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190 # define SSL_R_NO_PROTOCOLS_AVAILABLE 191 # define SSL_R_NO_RENEGOTIATION 339 # define SSL_R_NO_REQUIRED_DIGEST 324 # define SSL_R_NO_SHARED_CIPHER 193 # define SSL_R_NO_SHARED_GROUPS 410 # define SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS 376 # define SSL_R_NO_SRTP_PROFILES 359 # define SSL_R_NO_SUITABLE_KEY_SHARE 101 # define SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM 118 # define SSL_R_NO_VALID_SCTS 216 # define SSL_R_NO_VERIFY_COOKIE_CALLBACK 403 # define SSL_R_NULL_SSL_CTX 195 # define SSL_R_NULL_SSL_METHOD_PASSED 196 # define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 # define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344 # define SSL_R_OVERFLOW_ERROR 237 # define SSL_R_PACKET_LENGTH_TOO_LONG 198 # define SSL_R_PARSE_TLSEXT 227 # define SSL_R_PATH_TOO_LONG 270 # define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199 # define SSL_R_PEM_NAME_BAD_PREFIX 391 # define SSL_R_PEM_NAME_TOO_SHORT 392 # define SSL_R_PIPELINE_FAILURE 406 # define SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR 278 # define SSL_R_PRIVATE_KEY_MISMATCH 288 # define SSL_R_PROTOCOL_IS_SHUTDOWN 207 # define SSL_R_PSK_IDENTITY_NOT_FOUND 223 # define SSL_R_PSK_NO_CLIENT_CB 224 # define SSL_R_PSK_NO_SERVER_CB 225 # define SSL_R_READ_BIO_NOT_SET 211 # define SSL_R_READ_TIMEOUT_EXPIRED 312 # define SSL_R_RECORD_LENGTH_MISMATCH 213 # define SSL_R_RECORD_TOO_SMALL 298 # define SSL_R_RENEGOTIATE_EXT_TOO_LONG 335 # define SSL_R_RENEGOTIATION_ENCODING_ERR 336 # define SSL_R_RENEGOTIATION_MISMATCH 337 # define SSL_R_REQUEST_PENDING 285 # define SSL_R_REQUEST_SENT 286 # define SSL_R_REQUIRED_CIPHER_MISSING 215 # define SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING 342 # define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING 345 # define SSL_R_SCT_VERIFICATION_FAILED 208 # define SSL_R_SERVERHELLO_TLSEXT 275 # define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277 # define SSL_R_SHUTDOWN_WHILE_IN_INIT 407 # define SSL_R_SIGNATURE_ALGORITHMS_ERROR 360 # define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 # define SSL_R_SRP_A_CALC 361 # define SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES 362 # define SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG 363 # define SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE 364 # define SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH 232 # define SSL_R_SSL3_EXT_INVALID_SERVERNAME 319 # define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE 320 # define SSL_R_SSL3_SESSION_ID_TOO_LONG 300 # define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 # define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 # define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 # define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 # define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 # define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 # define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 # define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 # define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 # define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 # define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 # define SSL_R_SSL_COMMAND_SECTION_EMPTY 117 # define SSL_R_SSL_COMMAND_SECTION_NOT_FOUND 125 # define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 228 # define SSL_R_SSL_HANDSHAKE_FAILURE 229 # define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 230 # define SSL_R_SSL_NEGATIVE_LENGTH 372 # define SSL_R_SSL_SECTION_EMPTY 126 # define SSL_R_SSL_SECTION_NOT_FOUND 136 # define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED 301 # define SSL_R_SSL_SESSION_ID_CONFLICT 302 # define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG 273 # define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH 303 # define SSL_R_SSL_SESSION_ID_TOO_LONG 408 # define SSL_R_SSL_SESSION_VERSION_MISMATCH 210 # define SSL_R_STILL_IN_INIT 121 # define SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED 1116 # define SSL_R_TLSV13_ALERT_MISSING_EXTENSION 1109 # define SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049 # define SSL_R_TLSV1_ALERT_DECODE_ERROR 1050 # define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021 # define SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051 # define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060 # define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK 1086 # define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071 # define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080 # define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100 # define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070 # define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022 # define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048 # define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090 # define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE 1114 # define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE 1113 # define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE 1111 # define SSL_R_TLSV1_UNRECOGNIZED_NAME 1112 # define SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110 # define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT 365 # define SSL_R_TLS_HEARTBEAT_PENDING 366 # define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL 367 # define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 157 # define SSL_R_TOO_MANY_KEY_UPDATES 132 # define SSL_R_TOO_MANY_WARN_ALERTS 409 # define SSL_R_TOO_MUCH_EARLY_DATA 164 # define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 314 # define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239 # define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 242 # define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243 # define SSL_R_UNEXPECTED_CCS_MESSAGE 262 # define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178 # define SSL_R_UNEXPECTED_MESSAGE 244 # define SSL_R_UNEXPECTED_RECORD 245 # define SSL_R_UNINITIALIZED 276 # define SSL_R_UNKNOWN_ALERT_TYPE 246 # define SSL_R_UNKNOWN_CERTIFICATE_TYPE 247 # define SSL_R_UNKNOWN_CIPHER_RETURNED 248 # define SSL_R_UNKNOWN_CIPHER_TYPE 249 # define SSL_R_UNKNOWN_CMD_NAME 386 # define SSL_R_UNKNOWN_COMMAND 139 # define SSL_R_UNKNOWN_DIGEST 368 # define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 250 # define SSL_R_UNKNOWN_PKEY_TYPE 251 # define SSL_R_UNKNOWN_PROTOCOL 252 # define SSL_R_UNKNOWN_SSL_VERSION 254 # define SSL_R_UNKNOWN_STATE 255 # define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED 338 # define SSL_R_UNSOLICITED_EXTENSION 217 # define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257 # define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315 # define SSL_R_UNSUPPORTED_PROTOCOL 258 # define SSL_R_UNSUPPORTED_SSL_VERSION 259 # define SSL_R_UNSUPPORTED_STATUS_TYPE 329 # define SSL_R_USE_SRTP_NOT_NEGOTIATED 369 # define SSL_R_VERSION_TOO_HIGH 166 # define SSL_R_VERSION_TOO_LOW 396 # define SSL_R_WRONG_CERTIFICATE_TYPE 383 # define SSL_R_WRONG_CIPHER_RETURNED 261 # define SSL_R_WRONG_CURVE 378 # define SSL_R_WRONG_SIGNATURE_LENGTH 264 # define SSL_R_WRONG_SIGNATURE_SIZE 265 # define SSL_R_WRONG_SIGNATURE_TYPE 370 # define SSL_R_WRONG_SSL_VERSION 266 # define SSL_R_WRONG_VERSION_NUMBER 267 # define SSL_R_X509_LIB 268 # define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 #endif PKZj 99 openssl/rc4.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RC4_H # define HEADER_RC4_H # include # ifndef OPENSSL_NO_RC4 # include #ifdef __cplusplus extern "C" { #endif typedef struct rc4_key_st { RC4_INT x, y; RC4_INT data[256]; } RC4_KEY; const char *RC4_options(void); void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, unsigned char *outdata); # ifdef __cplusplus } # endif # endif #endif PKZef[[ openssl/bio.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_BIO_H # define HEADER_BIO_H # include # ifndef OPENSSL_NO_STDIO # include # endif # include # include # include #ifdef __cplusplus extern "C" { #endif /* There are the classes of BIOs */ # define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */ # define BIO_TYPE_FILTER 0x0200 # define BIO_TYPE_SOURCE_SINK 0x0400 /* These are the 'types' of BIOs */ # define BIO_TYPE_NONE 0 # define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK) # define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK) # define BIO_TYPE_FD ( 4|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) # define BIO_TYPE_SOCKET ( 5|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) # define BIO_TYPE_NULL ( 6|BIO_TYPE_SOURCE_SINK) # define BIO_TYPE_SSL ( 7|BIO_TYPE_FILTER) # define BIO_TYPE_MD ( 8|BIO_TYPE_FILTER) # define BIO_TYPE_BUFFER ( 9|BIO_TYPE_FILTER) # define BIO_TYPE_CIPHER (10|BIO_TYPE_FILTER) # define BIO_TYPE_BASE64 (11|BIO_TYPE_FILTER) # define BIO_TYPE_CONNECT (12|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) # define BIO_TYPE_ACCEPT (13|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) # define BIO_TYPE_NBIO_TEST (16|BIO_TYPE_FILTER)/* server proxy BIO */ # define BIO_TYPE_NULL_FILTER (17|BIO_TYPE_FILTER) # define BIO_TYPE_BIO (19|BIO_TYPE_SOURCE_SINK)/* half a BIO pair */ # define BIO_TYPE_LINEBUFFER (20|BIO_TYPE_FILTER) # define BIO_TYPE_DGRAM (21|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) # define BIO_TYPE_ASN1 (22|BIO_TYPE_FILTER) # define BIO_TYPE_COMP (23|BIO_TYPE_FILTER) # ifndef OPENSSL_NO_SCTP # define BIO_TYPE_DGRAM_SCTP (24|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR) # endif #define BIO_TYPE_START 128 /* * BIO_FILENAME_READ|BIO_CLOSE to open or close on free. * BIO_set_fp(in,stdin,BIO_NOCLOSE); */ # define BIO_NOCLOSE 0x00 # define BIO_CLOSE 0x01 /* * These are used in the following macros and are passed to BIO_ctrl() */ # define BIO_CTRL_RESET 1/* opt - rewind/zero etc */ # define BIO_CTRL_EOF 2/* opt - are we at the eof */ # define BIO_CTRL_INFO 3/* opt - extra tit-bits */ # define BIO_CTRL_SET 4/* man - set the 'IO' type */ # define BIO_CTRL_GET 5/* man - get the 'IO' type */ # define BIO_CTRL_PUSH 6/* opt - internal, used to signify change */ # define BIO_CTRL_POP 7/* opt - internal, used to signify change */ # define BIO_CTRL_GET_CLOSE 8/* man - set the 'close' on free */ # define BIO_CTRL_SET_CLOSE 9/* man - set the 'close' on free */ # define BIO_CTRL_PENDING 10/* opt - is their more data buffered */ # define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */ # define BIO_CTRL_DUP 12/* man - extra stuff for 'duped' BIO */ # define BIO_CTRL_WPENDING 13/* opt - number of bytes still to write */ # define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */ # define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */ # define BIO_CTRL_PEEK 29/* BIO_f_buffer special */ # define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */ /* dgram BIO stuff */ # define BIO_CTRL_DGRAM_CONNECT 31/* BIO dgram special */ # define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected * socket to be passed in */ # define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */ # define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */ # define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */ # define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */ # define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */ # define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation tiemd out */ /* #ifdef IP_MTU_DISCOVER */ # define BIO_CTRL_DGRAM_MTU_DISCOVER 39/* set DF bit on egress packets */ /* #endif */ # define BIO_CTRL_DGRAM_QUERY_MTU 40/* as kernel for current MTU */ # define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47 # define BIO_CTRL_DGRAM_GET_MTU 41/* get cached value for MTU */ # define BIO_CTRL_DGRAM_SET_MTU 42/* set cached value for MTU. * want to use this if asking * the kernel fails */ # define BIO_CTRL_DGRAM_MTU_EXCEEDED 43/* check whether the MTU was * exceed in the previous write * operation */ # define BIO_CTRL_DGRAM_GET_PEER 46 # define BIO_CTRL_DGRAM_SET_PEER 44/* Destination for the data */ # define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45/* Next DTLS handshake timeout * to adjust socket timeouts */ # define BIO_CTRL_DGRAM_SET_DONT_FRAG 48 # define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49 /* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */ # define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50 # ifndef OPENSSL_NO_SCTP /* SCTP stuff */ # define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51 # define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52 # define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53 # define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60 # define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61 # define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62 # define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63 # define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64 # define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65 # define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70 # endif # define BIO_CTRL_DGRAM_SET_PEEK_MODE 71 /* modifiers */ # define BIO_FP_READ 0x02 # define BIO_FP_WRITE 0x04 # define BIO_FP_APPEND 0x08 # define BIO_FP_TEXT 0x10 # define BIO_FLAGS_READ 0x01 # define BIO_FLAGS_WRITE 0x02 # define BIO_FLAGS_IO_SPECIAL 0x04 # define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL) # define BIO_FLAGS_SHOULD_RETRY 0x08 # ifndef BIO_FLAGS_UPLINK /* * "UPLINK" flag denotes file descriptors provided by application. It * defaults to 0, as most platforms don't require UPLINK interface. */ # define BIO_FLAGS_UPLINK 0 # endif # define BIO_FLAGS_BASE64_NO_NL 0x100 /* * This is used with memory BIOs: * BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way; * BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset. */ # define BIO_FLAGS_MEM_RDONLY 0x200 # define BIO_FLAGS_NONCLEAR_RST 0x400 # define BIO_FLAGS_IN_EOF 0x800 typedef union bio_addr_st BIO_ADDR; typedef struct bio_addrinfo_st BIO_ADDRINFO; int BIO_get_new_index(void); void BIO_set_flags(BIO *b, int flags); int BIO_test_flags(const BIO *b, int flags); void BIO_clear_flags(BIO *b, int flags); # define BIO_get_flags(b) BIO_test_flags(b, ~(0x0)) # define BIO_set_retry_special(b) \ BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY)) # define BIO_set_retry_read(b) \ BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY)) # define BIO_set_retry_write(b) \ BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY)) /* These are normally used internally in BIOs */ # define BIO_clear_retry_flags(b) \ BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) # define BIO_get_retry_flags(b) \ BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY)) /* These should be used by the application to tell why we should retry */ # define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ) # define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE) # define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL) # define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS) # define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY) /* * The next three are used in conjunction with the BIO_should_io_special() * condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int * *reason); will walk the BIO stack and return the 'reason' for the special * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return * the code. */ /* * Returned from the SSL bio when the certificate retrieval code had an error */ # define BIO_RR_SSL_X509_LOOKUP 0x01 /* Returned from the connect BIO when a connect would have blocked */ # define BIO_RR_CONNECT 0x02 /* Returned from the accept BIO when an accept would have blocked */ # define BIO_RR_ACCEPT 0x03 /* These are passed by the BIO callback */ # define BIO_CB_FREE 0x01 # define BIO_CB_READ 0x02 # define BIO_CB_WRITE 0x03 # define BIO_CB_PUTS 0x04 # define BIO_CB_GETS 0x05 # define BIO_CB_CTRL 0x06 /* * The callback is called before and after the underling operation, The * BIO_CB_RETURN flag indicates if it is after the call */ # define BIO_CB_RETURN 0x80 # define BIO_CB_return(a) ((a)|BIO_CB_RETURN) # define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN)) # define BIO_cb_post(a) ((a)&BIO_CB_RETURN) typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi, long argl, long ret); typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp, size_t len, int argi, long argl, int ret, size_t *processed); BIO_callback_fn BIO_get_callback(const BIO *b); void BIO_set_callback(BIO *b, BIO_callback_fn callback); BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b); void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback); char *BIO_get_callback_arg(const BIO *b); void BIO_set_callback_arg(BIO *b, char *arg); typedef struct bio_method_st BIO_METHOD; const char *BIO_method_name(const BIO *b); int BIO_method_type(const BIO *b); typedef int BIO_info_cb(BIO *, int, int); typedef BIO_info_cb bio_info_cb; /* backward compatibility */ DEFINE_STACK_OF(BIO) /* Prefix and suffix callback in ASN1 BIO */ typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen, void *parg); # ifndef OPENSSL_NO_SCTP /* SCTP parameter structs */ struct bio_dgram_sctp_sndinfo { uint16_t snd_sid; uint16_t snd_flags; uint32_t snd_ppid; uint32_t snd_context; }; struct bio_dgram_sctp_rcvinfo { uint16_t rcv_sid; uint16_t rcv_ssn; uint16_t rcv_flags; uint32_t rcv_ppid; uint32_t rcv_tsn; uint32_t rcv_cumtsn; uint32_t rcv_context; }; struct bio_dgram_sctp_prinfo { uint16_t pr_policy; uint32_t pr_value; }; # endif /* * #define BIO_CONN_get_param_hostname BIO_ctrl */ # define BIO_C_SET_CONNECT 100 # define BIO_C_DO_STATE_MACHINE 101 # define BIO_C_SET_NBIO 102 /* # define BIO_C_SET_PROXY_PARAM 103 */ # define BIO_C_SET_FD 104 # define BIO_C_GET_FD 105 # define BIO_C_SET_FILE_PTR 106 # define BIO_C_GET_FILE_PTR 107 # define BIO_C_SET_FILENAME 108 # define BIO_C_SET_SSL 109 # define BIO_C_GET_SSL 110 # define BIO_C_SET_MD 111 # define BIO_C_GET_MD 112 # define BIO_C_GET_CIPHER_STATUS 113 # define BIO_C_SET_BUF_MEM 114 # define BIO_C_GET_BUF_MEM_PTR 115 # define BIO_C_GET_BUFF_NUM_LINES 116 # define BIO_C_SET_BUFF_SIZE 117 # define BIO_C_SET_ACCEPT 118 # define BIO_C_SSL_MODE 119 # define BIO_C_GET_MD_CTX 120 /* # define BIO_C_GET_PROXY_PARAM 121 */ # define BIO_C_SET_BUFF_READ_DATA 122/* data to read first */ # define BIO_C_GET_CONNECT 123 # define BIO_C_GET_ACCEPT 124 # define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125 # define BIO_C_GET_SSL_NUM_RENEGOTIATES 126 # define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127 # define BIO_C_FILE_SEEK 128 # define BIO_C_GET_CIPHER_CTX 129 # define BIO_C_SET_BUF_MEM_EOF_RETURN 130/* return end of input * value */ # define BIO_C_SET_BIND_MODE 131 # define BIO_C_GET_BIND_MODE 132 # define BIO_C_FILE_TELL 133 # define BIO_C_GET_SOCKS 134 # define BIO_C_SET_SOCKS 135 # define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */ # define BIO_C_GET_WRITE_BUF_SIZE 137 # define BIO_C_MAKE_BIO_PAIR 138 # define BIO_C_DESTROY_BIO_PAIR 139 # define BIO_C_GET_WRITE_GUARANTEE 140 # define BIO_C_GET_READ_REQUEST 141 # define BIO_C_SHUTDOWN_WR 142 # define BIO_C_NREAD0 143 # define BIO_C_NREAD 144 # define BIO_C_NWRITE0 145 # define BIO_C_NWRITE 146 # define BIO_C_RESET_READ_REQUEST 147 # define BIO_C_SET_MD_CTX 148 # define BIO_C_SET_PREFIX 149 # define BIO_C_GET_PREFIX 150 # define BIO_C_SET_SUFFIX 151 # define BIO_C_GET_SUFFIX 152 # define BIO_C_SET_EX_ARG 153 # define BIO_C_GET_EX_ARG 154 # define BIO_C_SET_CONNECT_MODE 155 # define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg) # define BIO_get_app_data(s) BIO_get_ex_data(s,0) # define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) # ifndef OPENSSL_NO_SOCK /* IP families we support, for BIO_s_connect() and BIO_s_accept() */ /* Note: the underlying operating system may not support some of them */ # define BIO_FAMILY_IPV4 4 # define BIO_FAMILY_IPV6 6 # define BIO_FAMILY_IPANY 256 /* BIO_s_connect() */ # define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0, \ (char *)(name)) # define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1, \ (char *)(port)) # define BIO_set_conn_address(b,addr) BIO_ctrl(b,BIO_C_SET_CONNECT,2, \ (char *)(addr)) # define BIO_set_conn_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,f) # define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)) # define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)) # define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)) # define BIO_get_conn_ip_family(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL) # define BIO_set_conn_mode(b,n) BIO_ctrl(b,BIO_C_SET_CONNECT_MODE,(n),NULL) /* BIO_s_accept() */ # define BIO_set_accept_name(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0, \ (char *)(name)) # define BIO_set_accept_port(b,port) BIO_ctrl(b,BIO_C_SET_ACCEPT,1, \ (char *)(port)) # define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0)) # define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,1)) # define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,2)) # define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,3)) /* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */ # define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(n)?(void *)"a":NULL) # define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,3, \ (char *)(bio)) # define BIO_set_accept_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_ACCEPT,4,f) # define BIO_get_accept_ip_family(b) BIO_ctrl(b,BIO_C_GET_ACCEPT,4,NULL) /* Aliases kept for backward compatibility */ # define BIO_BIND_NORMAL 0 # define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR # define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR # define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL) # define BIO_get_bind_mode(b) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL) /* BIO_s_accept() and BIO_s_connect() */ # define BIO_do_connect(b) BIO_do_handshake(b) # define BIO_do_accept(b) BIO_do_handshake(b) # endif /* OPENSSL_NO_SOCK */ # define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL) /* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */ # define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd) # define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)(c)) /* BIO_s_file() */ # define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)(fp)) # define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)(fpp)) /* BIO_s_fd() and BIO_s_file() */ # define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL) # define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL) /* * name is cast to lose const, but might be better to route through a * function so we can do it safely */ # ifdef CONST_STRICT /* * If you are wondering why this isn't defined, its because CONST_STRICT is * purely a compile-time kludge to allow const to be checked. */ int BIO_read_filename(BIO *b, const char *name); # else # define BIO_read_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ BIO_CLOSE|BIO_FP_READ,(char *)(name)) # endif # define BIO_write_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ BIO_CLOSE|BIO_FP_WRITE,name) # define BIO_append_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ BIO_CLOSE|BIO_FP_APPEND,name) # define BIO_rw_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \ BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name) /* * WARNING WARNING, this ups the reference count on the read bio of the SSL * structure. This is because the ssl read BIO is now pointed to by the * next_bio field in the bio. So when you free the BIO, make sure you are * doing a BIO_free_all() to catch the underlying BIO. */ # define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)(ssl)) # define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)(sslp)) # define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL) # define BIO_set_ssl_renegotiate_bytes(b,num) \ BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL) # define BIO_get_num_renegotiates(b) \ BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL) # define BIO_set_ssl_renegotiate_timeout(b,seconds) \ BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL) /* defined in evp.h */ /* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */ # define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)(pp)) # define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)(bm)) # define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0, \ (char *)(pp)) # define BIO_set_mem_eof_return(b,v) \ BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL) /* For the BIO_f_buffer() type */ # define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL) # define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL) # define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0) # define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1) # define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf) /* Don't use the next one unless you know what you are doing :-) */ # define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret)) # define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL) # define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL) # define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL) # define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL) # define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) # define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL) /* ...pending macros have inappropriate return type */ size_t BIO_ctrl_pending(BIO *b); size_t BIO_ctrl_wpending(BIO *b); # define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) # define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \ cbp) # define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb) /* For the BIO_f_buffer() type */ # define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL) # define BIO_buffer_peek(b,s,l) BIO_ctrl(b,BIO_CTRL_PEEK,(l),(s)) /* For BIO_s_bio() */ # define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL) # define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL) # define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2) # define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL) # define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL) /* macros with inappropriate type -- but ...pending macros use int too: */ # define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL) # define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL) size_t BIO_ctrl_get_write_guarantee(BIO *b); size_t BIO_ctrl_get_read_request(BIO *b); int BIO_ctrl_reset_read_request(BIO *b); /* ctrl macros for dgram */ # define BIO_ctrl_dgram_connect(b,peer) \ (int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)(peer)) # define BIO_ctrl_set_connected(b,peer) \ (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer)) # define BIO_dgram_recv_timedout(b) \ (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL) # define BIO_dgram_send_timedout(b) \ (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL) # define BIO_dgram_get_peer(b,peer) \ (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer)) # define BIO_dgram_set_peer(b,peer) \ (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer)) # define BIO_dgram_get_mtu_overhead(b) \ (unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL) #define BIO_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef) int BIO_set_ex_data(BIO *bio, int idx, void *data); void *BIO_get_ex_data(BIO *bio, int idx); uint64_t BIO_number_read(BIO *bio); uint64_t BIO_number_written(BIO *bio); /* For BIO_f_asn1() */ int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, asn1_ps_func *prefix_free); int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix, asn1_ps_func **pprefix_free); int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, asn1_ps_func *suffix_free); int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, asn1_ps_func **psuffix_free); const BIO_METHOD *BIO_s_file(void); BIO *BIO_new_file(const char *filename, const char *mode); # ifndef OPENSSL_NO_STDIO BIO *BIO_new_fp(FILE *stream, int close_flag); # endif BIO *BIO_new(const BIO_METHOD *type); int BIO_free(BIO *a); void BIO_set_data(BIO *a, void *ptr); void *BIO_get_data(BIO *a); void BIO_set_init(BIO *a, int init); int BIO_get_init(BIO *a); void BIO_set_shutdown(BIO *a, int shut); int BIO_get_shutdown(BIO *a); void BIO_vfree(BIO *a); int BIO_up_ref(BIO *a); int BIO_read(BIO *b, void *data, int dlen); int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes); int BIO_gets(BIO *bp, char *buf, int size); int BIO_write(BIO *b, const void *data, int dlen); int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written); int BIO_puts(BIO *bp, const char *buf); int BIO_indent(BIO *b, int indent, int max); long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg); long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp); void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg); long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg); BIO *BIO_push(BIO *b, BIO *append); BIO *BIO_pop(BIO *b); void BIO_free_all(BIO *a); BIO *BIO_find_type(BIO *b, int bio_type); BIO *BIO_next(BIO *b); void BIO_set_next(BIO *b, BIO *next); BIO *BIO_get_retry_BIO(BIO *bio, int *reason); int BIO_get_retry_reason(BIO *bio); void BIO_set_retry_reason(BIO *bio, int reason); BIO *BIO_dup_chain(BIO *in); int BIO_nread0(BIO *bio, char **buf); int BIO_nread(BIO *bio, char **buf, int num); int BIO_nwrite0(BIO *bio, char **buf); int BIO_nwrite(BIO *bio, char **buf, int num); long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); const BIO_METHOD *BIO_s_mem(void); const BIO_METHOD *BIO_s_secmem(void); BIO *BIO_new_mem_buf(const void *buf, int len); # ifndef OPENSSL_NO_SOCK const BIO_METHOD *BIO_s_socket(void); const BIO_METHOD *BIO_s_connect(void); const BIO_METHOD *BIO_s_accept(void); # endif const BIO_METHOD *BIO_s_fd(void); const BIO_METHOD *BIO_s_log(void); const BIO_METHOD *BIO_s_bio(void); const BIO_METHOD *BIO_s_null(void); const BIO_METHOD *BIO_f_null(void); const BIO_METHOD *BIO_f_buffer(void); const BIO_METHOD *BIO_f_linebuffer(void); const BIO_METHOD *BIO_f_nbio_test(void); # ifndef OPENSSL_NO_DGRAM const BIO_METHOD *BIO_s_datagram(void); int BIO_dgram_non_fatal_error(int error); BIO *BIO_new_dgram(int fd, int close_flag); # ifndef OPENSSL_NO_SCTP const BIO_METHOD *BIO_s_datagram_sctp(void); BIO *BIO_new_dgram_sctp(int fd, int close_flag); int BIO_dgram_is_sctp(BIO *bio); int BIO_dgram_sctp_notification_cb(BIO *b, void (*handle_notifications) (BIO *bio, void *context, void *buf), void *context); int BIO_dgram_sctp_wait_for_dry(BIO *b); int BIO_dgram_sctp_msg_waiting(BIO *b); # endif # endif # ifndef OPENSSL_NO_SOCK int BIO_sock_should_retry(int i); int BIO_sock_non_fatal_error(int error); # endif int BIO_fd_should_retry(int i); int BIO_fd_non_fatal_error(int error); int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u), void *u, const char *s, int len); int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u), void *u, const char *s, int len, int indent); int BIO_dump(BIO *b, const char *bytes, int len); int BIO_dump_indent(BIO *b, const char *bytes, int len, int indent); # ifndef OPENSSL_NO_STDIO int BIO_dump_fp(FILE *fp, const char *s, int len); int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent); # endif int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data, int datalen); # ifndef OPENSSL_NO_SOCK BIO_ADDR *BIO_ADDR_new(void); int BIO_ADDR_rawmake(BIO_ADDR *ap, int family, const void *where, size_t wherelen, unsigned short port); void BIO_ADDR_free(BIO_ADDR *); void BIO_ADDR_clear(BIO_ADDR *ap); int BIO_ADDR_family(const BIO_ADDR *ap); int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l); unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap); char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric); char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric); char *BIO_ADDR_path_string(const BIO_ADDR *ap); const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai); int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai); int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai); int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai); const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai); void BIO_ADDRINFO_free(BIO_ADDRINFO *bai); enum BIO_hostserv_priorities { BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV }; int BIO_parse_hostserv(const char *hostserv, char **host, char **service, enum BIO_hostserv_priorities hostserv_prio); enum BIO_lookup_type { BIO_LOOKUP_CLIENT, BIO_LOOKUP_SERVER }; int BIO_lookup(const char *host, const char *service, enum BIO_lookup_type lookup_type, int family, int socktype, BIO_ADDRINFO **res); int BIO_lookup_ex(const char *host, const char *service, int lookup_type, int family, int socktype, int protocol, BIO_ADDRINFO **res); int BIO_sock_error(int sock); int BIO_socket_ioctl(int fd, long type, void *arg); int BIO_socket_nbio(int fd, int mode); int BIO_sock_init(void); # if OPENSSL_API_COMPAT < 0x10100000L # define BIO_sock_cleanup() while(0) continue # endif int BIO_set_tcp_ndelay(int sock, int turn_on); DEPRECATEDIN_1_1_0(struct hostent *BIO_gethostbyname(const char *name)) DEPRECATEDIN_1_1_0(int BIO_get_port(const char *str, unsigned short *port_ptr)) DEPRECATEDIN_1_1_0(int BIO_get_host_ip(const char *str, unsigned char *ip)) DEPRECATEDIN_1_1_0(int BIO_get_accept_socket(char *host_port, int mode)) DEPRECATEDIN_1_1_0(int BIO_accept(int sock, char **ip_port)) union BIO_sock_info_u { BIO_ADDR *addr; }; enum BIO_sock_info_type { BIO_SOCK_INFO_ADDRESS }; int BIO_sock_info(int sock, enum BIO_sock_info_type type, union BIO_sock_info_u *info); # define BIO_SOCK_REUSEADDR 0x01 # define BIO_SOCK_V6_ONLY 0x02 # define BIO_SOCK_KEEPALIVE 0x04 # define BIO_SOCK_NONBLOCK 0x08 # define BIO_SOCK_NODELAY 0x10 int BIO_socket(int domain, int socktype, int protocol, int options); int BIO_connect(int sock, const BIO_ADDR *addr, int options); int BIO_bind(int sock, const BIO_ADDR *addr, int options); int BIO_listen(int sock, const BIO_ADDR *addr, int options); int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options); int BIO_closesocket(int sock); BIO *BIO_new_socket(int sock, int close_flag); BIO *BIO_new_connect(const char *host_port); BIO *BIO_new_accept(const char *host_port); # endif /* OPENSSL_NO_SOCK*/ BIO *BIO_new_fd(int fd, int close_flag); int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2); /* * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints. * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default * value. */ void BIO_copy_next_retry(BIO *b); /* * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg); */ # define ossl_bio__attr__(x) # if defined(__GNUC__) && defined(__STDC_VERSION__) \ && !defined(__APPLE__) /* * Because we support the 'z' modifier, which made its appearance in C99, * we can't use __attribute__ with pre C99 dialects. */ # if __STDC_VERSION__ >= 199901L # undef ossl_bio__attr__ # define ossl_bio__attr__ __attribute__ # if __GNUC__*10 + __GNUC_MINOR__ >= 44 # define ossl_bio__printf__ __gnu_printf__ # else # define ossl_bio__printf__ __printf__ # endif # endif # endif int BIO_printf(BIO *bio, const char *format, ...) ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3))); int BIO_vprintf(BIO *bio, const char *format, va_list args) ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0))); int BIO_snprintf(char *buf, size_t n, const char *format, ...) ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4))); int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0))); # undef ossl_bio__attr__ # undef ossl_bio__printf__ BIO_METHOD *BIO_meth_new(int type, const char *name); void BIO_meth_free(BIO_METHOD *biom); int (*BIO_meth_get_write(const BIO_METHOD *biom)) (BIO *, const char *, int); int (*BIO_meth_get_write_ex(const BIO_METHOD *biom)) (BIO *, const char *, size_t, size_t *); int BIO_meth_set_write(BIO_METHOD *biom, int (*write) (BIO *, const char *, int)); int BIO_meth_set_write_ex(BIO_METHOD *biom, int (*bwrite) (BIO *, const char *, size_t, size_t *)); int (*BIO_meth_get_read(const BIO_METHOD *biom)) (BIO *, char *, int); int (*BIO_meth_get_read_ex(const BIO_METHOD *biom)) (BIO *, char *, size_t, size_t *); int BIO_meth_set_read(BIO_METHOD *biom, int (*read) (BIO *, char *, int)); int BIO_meth_set_read_ex(BIO_METHOD *biom, int (*bread) (BIO *, char *, size_t, size_t *)); int (*BIO_meth_get_puts(const BIO_METHOD *biom)) (BIO *, const char *); int BIO_meth_set_puts(BIO_METHOD *biom, int (*puts) (BIO *, const char *)); int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int); int BIO_meth_set_gets(BIO_METHOD *biom, int (*gets) (BIO *, char *, int)); long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *); int BIO_meth_set_ctrl(BIO_METHOD *biom, long (*ctrl) (BIO *, int, long, void *)); int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *); int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *)); int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *); int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *)); long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom)) (BIO *, int, BIO_info_cb *); int BIO_meth_set_callback_ctrl(BIO_METHOD *biom, long (*callback_ctrl) (BIO *, int, BIO_info_cb *)); # ifdef __cplusplus } # endif #endif PKZeopenssl/pem2.hnu[/* * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_PEM2_H # define HEADER_PEM2_H # include #endif PKZ@** openssl/md4.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_MD4_H # define HEADER_MD4_H # include # ifndef OPENSSL_NO_MD4 # include # include # ifdef __cplusplus extern "C" { # endif /*- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * ! MD4_LONG has to be at least 32 bits wide. ! * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ # define MD4_LONG unsigned int # define MD4_CBLOCK 64 # define MD4_LBLOCK (MD4_CBLOCK/4) # define MD4_DIGEST_LENGTH 16 typedef struct MD4state_st { MD4_LONG A, B, C, D; MD4_LONG Nl, Nh; MD4_LONG data[MD4_LBLOCK]; unsigned int num; } MD4_CTX; int MD4_Init(MD4_CTX *c); int MD4_Update(MD4_CTX *c, const void *data, size_t len); int MD4_Final(unsigned char *md, MD4_CTX *c); unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); void MD4_Transform(MD4_CTX *c, const unsigned char *b); # ifdef __cplusplus } # endif # endif #endif PKZ A openssl/sha.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_SHA_H # define HEADER_SHA_H # include # include #ifdef __cplusplus extern "C" { #endif /*- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * ! SHA_LONG has to be at least 32 bits wide. ! * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ # define SHA_LONG unsigned int # define SHA_LBLOCK 16 # define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a * contiguous array of 32 bit wide * big-endian values. */ # define SHA_LAST_BLOCK (SHA_CBLOCK-8) # define SHA_DIGEST_LENGTH 20 typedef struct SHAstate_st { SHA_LONG h0, h1, h2, h3, h4; SHA_LONG Nl, Nh; SHA_LONG data[SHA_LBLOCK]; unsigned int num; } SHA_CTX; int SHA1_Init(SHA_CTX *c); int SHA1_Update(SHA_CTX *c, const void *data, size_t len); int SHA1_Final(unsigned char *md, SHA_CTX *c); unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); void SHA1_Transform(SHA_CTX *c, const unsigned char *data); # define SHA256_CBLOCK (SHA_LBLOCK*4)/* SHA-256 treats input data as a * contiguous array of 32 bit wide * big-endian values. */ typedef struct SHA256state_st { SHA_LONG h[8]; SHA_LONG Nl, Nh; SHA_LONG data[SHA_LBLOCK]; unsigned int num, md_len; } SHA256_CTX; int SHA224_Init(SHA256_CTX *c); int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); int SHA224_Final(unsigned char *md, SHA256_CTX *c); unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); int SHA256_Init(SHA256_CTX *c); int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); int SHA256_Final(unsigned char *md, SHA256_CTX *c); unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); void SHA256_Transform(SHA256_CTX *c, const unsigned char *data); # define SHA224_DIGEST_LENGTH 28 # define SHA256_DIGEST_LENGTH 32 # define SHA384_DIGEST_LENGTH 48 # define SHA512_DIGEST_LENGTH 64 /* * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 * being exactly 64-bit wide. See Implementation Notes in sha512.c * for further details. */ /* * SHA-512 treats input data as a * contiguous array of 64 bit * wide big-endian values. */ # define SHA512_CBLOCK (SHA_LBLOCK*8) # if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) # define SHA_LONG64 unsigned __int64 # define U64(C) C##UI64 # elif defined(__arch64__) # define SHA_LONG64 unsigned long # define U64(C) C##UL # else # define SHA_LONG64 unsigned long long # define U64(C) C##ULL # endif typedef struct SHA512state_st { SHA_LONG64 h[8]; SHA_LONG64 Nl, Nh; union { SHA_LONG64 d[SHA_LBLOCK]; unsigned char p[SHA512_CBLOCK]; } u; unsigned int num, md_len; } SHA512_CTX; int SHA384_Init(SHA512_CTX *c); int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); int SHA384_Final(unsigned char *md, SHA512_CTX *c); unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); int SHA512_Init(SHA512_CTX *c); int SHA512_Update(SHA512_CTX *c, const void *data, size_t len); int SHA512_Final(unsigned char *md, SHA512_CTX *c); unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md); void SHA512_Transform(SHA512_CTX *c, const unsigned char *data); #ifdef __cplusplus } #endif #endif PKZ ^ openssl/ec.hnu[/* * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_EC_H # define HEADER_EC_H # include # ifndef OPENSSL_NO_EC # include # include # if OPENSSL_API_COMPAT < 0x10100000L # include # endif # include # ifdef __cplusplus extern "C" { # endif # ifndef OPENSSL_ECC_MAX_FIELD_BITS # define OPENSSL_ECC_MAX_FIELD_BITS 661 # endif /** Enum for the point conversion form as defined in X9.62 (ECDSA) * for the encoding of a elliptic curve point (x,y) */ typedef enum { /** the point is encoded as z||x, where the octet z specifies * which solution of the quadratic equation y is */ POINT_CONVERSION_COMPRESSED = 2, /** the point is encoded as z||x||y, where z is the octet 0x04 */ POINT_CONVERSION_UNCOMPRESSED = 4, /** the point is encoded as z||x||y, where the octet z specifies * which solution of the quadratic equation y is */ POINT_CONVERSION_HYBRID = 6 } point_conversion_form_t; typedef struct ec_method_st EC_METHOD; typedef struct ec_group_st EC_GROUP; typedef struct ec_point_st EC_POINT; typedef struct ecpk_parameters_st ECPKPARAMETERS; typedef struct ec_parameters_st ECPARAMETERS; /********************************************************************/ /* EC_METHODs for curves over GF(p) */ /********************************************************************/ /** Returns the basic GFp ec methods which provides the basis for the * optimized methods. * \return EC_METHOD object */ const EC_METHOD *EC_GFp_simple_method(void); /** Returns GFp methods using montgomery multiplication. * \return EC_METHOD object */ const EC_METHOD *EC_GFp_mont_method(void); /** Returns GFp methods using optimized methods for NIST recommended curves * \return EC_METHOD object */ const EC_METHOD *EC_GFp_nist_method(void); # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 /** Returns 64-bit optimized methods for nistp224 * \return EC_METHOD object */ const EC_METHOD *EC_GFp_nistp224_method(void); /** Returns 64-bit optimized methods for nistp256 * \return EC_METHOD object */ const EC_METHOD *EC_GFp_nistp256_method(void); /** Returns 64-bit optimized methods for nistp521 * \return EC_METHOD object */ const EC_METHOD *EC_GFp_nistp521_method(void); # endif # ifndef OPENSSL_NO_EC2M /********************************************************************/ /* EC_METHOD for curves over GF(2^m) */ /********************************************************************/ /** Returns the basic GF2m ec method * \return EC_METHOD object */ const EC_METHOD *EC_GF2m_simple_method(void); # endif /********************************************************************/ /* EC_GROUP functions */ /********************************************************************/ /** Creates a new EC_GROUP object * \param meth EC_METHOD to use * \return newly created EC_GROUP object or NULL in case of an error. */ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); /** Frees a EC_GROUP object * \param group EC_GROUP object to be freed. */ void EC_GROUP_free(EC_GROUP *group); /** Clears and frees a EC_GROUP object * \param group EC_GROUP object to be cleared and freed. */ void EC_GROUP_clear_free(EC_GROUP *group); /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD. * \param dst destination EC_GROUP object * \param src source EC_GROUP object * \return 1 on success and 0 if an error occurred. */ int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src); /** Creates a new EC_GROUP object and copies the copies the content * form src to the newly created EC_KEY object * \param src source EC_GROUP object * \return newly created EC_GROUP object or NULL in case of an error. */ EC_GROUP *EC_GROUP_dup(const EC_GROUP *src); /** Returns the EC_METHOD of the EC_GROUP object. * \param group EC_GROUP object * \return EC_METHOD used in this EC_GROUP object. */ const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group); /** Returns the field type of the EC_METHOD. * \param meth EC_METHOD object * \return NID of the underlying field type OID. */ int EC_METHOD_get_field_type(const EC_METHOD *meth); /** Sets the generator and its order/cofactor of a EC_GROUP object. * \param group EC_GROUP object * \param generator EC_POINT object with the generator. * \param order the order of the group generated by the generator. * \param cofactor the index of the sub-group generated by the generator * in the group of all points on the elliptic curve. * \return 1 on success and 0 if an error occurred */ int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor); /** Returns the generator of a EC_GROUP object. * \param group EC_GROUP object * \return the currently used generator (possibly NULL). */ const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group); /** Returns the montgomery data for order(Generator) * \param group EC_GROUP object * \return the currently used montgomery data (possibly NULL). */ BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group); /** Gets the order of a EC_GROUP * \param group EC_GROUP object * \param order BIGNUM to which the order is copied * \param ctx unused * \return 1 on success and 0 if an error occurred */ int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx); /** Gets the order of an EC_GROUP * \param group EC_GROUP object * \return the group order */ const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group); /** Gets the number of bits of the order of an EC_GROUP * \param group EC_GROUP object * \return number of bits of group order. */ int EC_GROUP_order_bits(const EC_GROUP *group); /** Gets the cofactor of a EC_GROUP * \param group EC_GROUP object * \param cofactor BIGNUM to which the cofactor is copied * \param ctx unused * \return 1 on success and 0 if an error occurred */ int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx); /** Gets the cofactor of an EC_GROUP * \param group EC_GROUP object * \return the group cofactor */ const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group); /** Sets the name of a EC_GROUP object * \param group EC_GROUP object * \param nid NID of the curve name OID */ void EC_GROUP_set_curve_name(EC_GROUP *group, int nid); /** Returns the curve name of a EC_GROUP object * \param group EC_GROUP object * \return NID of the curve name OID or 0 if not set. */ int EC_GROUP_get_curve_name(const EC_GROUP *group); void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag); int EC_GROUP_get_asn1_flag(const EC_GROUP *group); void EC_GROUP_set_point_conversion_form(EC_GROUP *group, point_conversion_form_t form); point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *); unsigned char *EC_GROUP_get0_seed(const EC_GROUP *x); size_t EC_GROUP_get_seed_len(const EC_GROUP *); size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len); /** Sets the parameters of a ec curve defined by y^2 = x^3 + a*x + b (for GFp) * or y^2 + x*y = x^3 + a*x^2 + b (for GF2m) * \param group EC_GROUP object * \param p BIGNUM with the prime number (GFp) or the polynomial * defining the underlying field (GF2m) * \param a BIGNUM with parameter a of the equation * \param b BIGNUM with parameter b of the equation * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /** Gets the parameters of the ec curve defined by y^2 = x^3 + a*x + b (for GFp) * or y^2 + x*y = x^3 + a*x^2 + b (for GF2m) * \param group EC_GROUP object * \param p BIGNUM with the prime number (GFp) or the polynomial * defining the underlying field (GF2m) * \param a BIGNUM for parameter a of the equation * \param b BIGNUM for parameter b of the equation * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx); /** Sets the parameters of an ec curve. Synonym for EC_GROUP_set_curve * \param group EC_GROUP object * \param p BIGNUM with the prime number (GFp) or the polynomial * defining the underlying field (GF2m) * \param a BIGNUM with parameter a of the equation * \param b BIGNUM with parameter b of the equation * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)) /** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve * \param group EC_GROUP object * \param p BIGNUM with the prime number (GFp) or the polynomial * defining the underlying field (GF2m) * \param a BIGNUM for parameter a of the equation * \param b BIGNUM for parameter b of the equation * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)) # ifndef OPENSSL_NO_EC2M /** Sets the parameter of an ec curve. Synonym for EC_GROUP_set_curve * \param group EC_GROUP object * \param p BIGNUM with the prime number (GFp) or the polynomial * defining the underlying field (GF2m) * \param a BIGNUM with parameter a of the equation * \param b BIGNUM with parameter b of the equation * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)) /** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve * \param group EC_GROUP object * \param p BIGNUM with the prime number (GFp) or the polynomial * defining the underlying field (GF2m) * \param a BIGNUM for parameter a of the equation * \param b BIGNUM for parameter b of the equation * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)) # endif /** Returns the number of bits needed to represent a field element * \param group EC_GROUP object * \return number of bits needed to represent a field element */ int EC_GROUP_get_degree(const EC_GROUP *group); /** Checks whether the parameter in the EC_GROUP define a valid ec group * \param group EC_GROUP object * \param ctx BN_CTX object (optional) * \return 1 if group is a valid ec group and 0 otherwise */ int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); /** Checks whether the discriminant of the elliptic curve is zero or not * \param group EC_GROUP object * \param ctx BN_CTX object (optional) * \return 1 if the discriminant is not zero and 0 otherwise */ int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx); /** Compares two EC_GROUP objects * \param a first EC_GROUP object * \param b second EC_GROUP object * \param ctx BN_CTX object (optional) * \return 0 if the groups are equal, 1 if not, or -1 on error */ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx); /* * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after * choosing an appropriate EC_METHOD */ /** Creates a new EC_GROUP object with the specified parameters defined * over GFp (defined by the equation y^2 = x^3 + a*x + b) * \param p BIGNUM with the prime number * \param a BIGNUM with the parameter a of the equation * \param b BIGNUM with the parameter b of the equation * \param ctx BN_CTX object (optional) * \return newly created EC_GROUP object with the specified parameters */ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); # ifndef OPENSSL_NO_EC2M /** Creates a new EC_GROUP object with the specified parameters defined * over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b) * \param p BIGNUM with the polynomial defining the underlying field * \param a BIGNUM with the parameter a of the equation * \param b BIGNUM with the parameter b of the equation * \param ctx BN_CTX object (optional) * \return newly created EC_GROUP object with the specified parameters */ EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); # endif /** Creates a EC_GROUP object with a curve specified by a NID * \param nid NID of the OID of the curve name * \return newly created EC_GROUP object with specified curve or NULL * if an error occurred */ EC_GROUP *EC_GROUP_new_by_curve_name(int nid); /** Creates a new EC_GROUP object from an ECPARAMETERS object * \param params pointer to the ECPARAMETERS object * \return newly created EC_GROUP object with specified curve or NULL * if an error occurred */ EC_GROUP *EC_GROUP_new_from_ecparameters(const ECPARAMETERS *params); /** Creates an ECPARAMETERS object for the given EC_GROUP object. * \param group pointer to the EC_GROUP object * \param params pointer to an existing ECPARAMETERS object or NULL * \return pointer to the new ECPARAMETERS object or NULL * if an error occurred. */ ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group, ECPARAMETERS *params); /** Creates a new EC_GROUP object from an ECPKPARAMETERS object * \param params pointer to an existing ECPKPARAMETERS object, or NULL * \return newly created EC_GROUP object with specified curve, or NULL * if an error occurred */ EC_GROUP *EC_GROUP_new_from_ecpkparameters(const ECPKPARAMETERS *params); /** Creates an ECPKPARAMETERS object for the given EC_GROUP object. * \param group pointer to the EC_GROUP object * \param params pointer to an existing ECPKPARAMETERS object or NULL * \return pointer to the new ECPKPARAMETERS object or NULL * if an error occurred. */ ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group, ECPKPARAMETERS *params); /********************************************************************/ /* handling of internal curves */ /********************************************************************/ typedef struct { int nid; const char *comment; } EC_builtin_curve; /* * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all * available curves or zero if a error occurred. In case r is not zero, * nitems EC_builtin_curve structures are filled with the data of the first * nitems internal groups */ size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems); const char *EC_curve_nid2nist(int nid); int EC_curve_nist2nid(const char *name); /********************************************************************/ /* EC_POINT functions */ /********************************************************************/ /** Creates a new EC_POINT object for the specified EC_GROUP * \param group EC_GROUP the underlying EC_GROUP object * \return newly created EC_POINT object or NULL if an error occurred */ EC_POINT *EC_POINT_new(const EC_GROUP *group); /** Frees a EC_POINT object * \param point EC_POINT object to be freed */ void EC_POINT_free(EC_POINT *point); /** Clears and frees a EC_POINT object * \param point EC_POINT object to be cleared and freed */ void EC_POINT_clear_free(EC_POINT *point); /** Copies EC_POINT object * \param dst destination EC_POINT object * \param src source EC_POINT object * \return 1 on success and 0 if an error occurred */ int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src); /** Creates a new EC_POINT object and copies the content of the supplied * EC_POINT * \param src source EC_POINT object * \param group underlying the EC_GROUP object * \return newly created EC_POINT object or NULL if an error occurred */ EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group); /** Returns the EC_METHOD used in EC_POINT object * \param point EC_POINT object * \return the EC_METHOD used */ const EC_METHOD *EC_POINT_method_of(const EC_POINT *point); /** Sets a point to infinity (neutral element) * \param group underlying EC_GROUP object * \param point EC_POINT to set to infinity * \return 1 on success and 0 if an error occurred */ int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point); /** Sets the jacobian projective coordinates of a EC_POINT over GFp * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM with the x-coordinate * \param y BIGNUM with the y-coordinate * \param z BIGNUM with the z-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx); /** Gets the jacobian projective coordinates of a EC_POINT over GFp * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM for the x-coordinate * \param y BIGNUM for the y-coordinate * \param z BIGNUM for the z-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); /** Sets the affine coordinates of an EC_POINT * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM with the x-coordinate * \param y BIGNUM with the y-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx); /** Gets the affine coordinates of an EC_POINT. * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM for the x-coordinate * \param y BIGNUM for the y-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx); /** Sets the affine coordinates of an EC_POINT. A synonym of * EC_POINT_set_affine_coordinates * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM with the x-coordinate * \param y BIGNUM with the y-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)) /** Gets the affine coordinates of an EC_POINT. A synonym of * EC_POINT_get_affine_coordinates * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM for the x-coordinate * \param y BIGNUM for the y-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)) /** Sets the x9.62 compressed coordinates of a EC_POINT * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM with x-coordinate * \param y_bit integer with the y-Bit (either 0 or 1) * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, int y_bit, BN_CTX *ctx); /** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of * EC_POINT_set_compressed_coordinates * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM with x-coordinate * \param y_bit integer with the y-Bit (either 0 or 1) * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, int y_bit, BN_CTX *ctx)) # ifndef OPENSSL_NO_EC2M /** Sets the affine coordinates of an EC_POINT. A synonym of * EC_POINT_set_affine_coordinates * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM with the x-coordinate * \param y BIGNUM with the y-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)) /** Gets the affine coordinates of an EC_POINT. A synonym of * EC_POINT_get_affine_coordinates * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM for the x-coordinate * \param y BIGNUM for the y-coordinate * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)) /** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of * EC_POINT_set_compressed_coordinates * \param group underlying EC_GROUP object * \param p EC_POINT object * \param x BIGNUM with x-coordinate * \param y_bit integer with the y-Bit (either 0 or 1) * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ DEPRECATEDIN_1_2_0(int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p, const BIGNUM *x, int y_bit, BN_CTX *ctx)) # endif /** Encodes a EC_POINT object to a octet string * \param group underlying EC_GROUP object * \param p EC_POINT object * \param form point conversion form * \param buf memory buffer for the result. If NULL the function returns * required buffer size. * \param len length of the memory buffer * \param ctx BN_CTX object (optional) * \return the length of the encoded octet string or 0 if an error occurred */ size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx); /** Decodes a EC_POINT from a octet string * \param group underlying EC_GROUP object * \param p EC_POINT object * \param buf memory buffer with the encoded ec point * \param len length of the encoded ec point * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p, const unsigned char *buf, size_t len, BN_CTX *ctx); /** Encodes an EC_POINT object to an allocated octet string * \param group underlying EC_GROUP object * \param point EC_POINT object * \param form point conversion form * \param pbuf returns pointer to allocated buffer * \param ctx BN_CTX object (optional) * \return the length of the encoded octet string or 0 if an error occurred */ size_t EC_POINT_point2buf(const EC_GROUP *group, const EC_POINT *point, point_conversion_form_t form, unsigned char **pbuf, BN_CTX *ctx); /* other interfaces to point2oct/oct2point: */ BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, BIGNUM *, BN_CTX *); EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *, EC_POINT *, BN_CTX *); char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, BN_CTX *); EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *, EC_POINT *, BN_CTX *); /********************************************************************/ /* functions for doing EC_POINT arithmetic */ /********************************************************************/ /** Computes the sum of two EC_POINT * \param group underlying EC_GROUP object * \param r EC_POINT object for the result (r = a + b) * \param a EC_POINT object with the first summand * \param b EC_POINT object with the second summand * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx); /** Computes the double of a EC_POINT * \param group underlying EC_GROUP object * \param r EC_POINT object for the result (r = 2 * a) * \param a EC_POINT object * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx); /** Computes the inverse of a EC_POINT * \param group underlying EC_GROUP object * \param a EC_POINT object to be inverted (it's used for the result as well) * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx); /** Checks whether the point is the neutral element of the group * \param group the underlying EC_GROUP object * \param p EC_POINT object * \return 1 if the point is the neutral element and 0 otherwise */ int EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p); /** Checks whether the point is on the curve * \param group underlying EC_GROUP object * \param point EC_POINT object to check * \param ctx BN_CTX object (optional) * \return 1 if the point is on the curve, 0 if not, or -1 on error */ int EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx); /** Compares two EC_POINTs * \param group underlying EC_GROUP object * \param a first EC_POINT object * \param b second EC_POINT object * \param ctx BN_CTX object (optional) * \return 1 if the points are not equal, 0 if they are, or -1 on error */ int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx); int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx); int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx); /** Computes r = generator * n + sum_{i=0}^{num-1} p[i] * m[i] * \param group underlying EC_GROUP object * \param r EC_POINT object for the result * \param n BIGNUM with the multiplier for the group generator (optional) * \param num number further summands * \param p array of size num of EC_POINT objects * \param m array of size num of BIGNUM objects * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, size_t num, const EC_POINT *p[], const BIGNUM *m[], BN_CTX *ctx); /** Computes r = generator * n + q * m * \param group underlying EC_GROUP object * \param r EC_POINT object for the result * \param n BIGNUM with the multiplier for the group generator (optional) * \param q EC_POINT object with the first factor of the second summand * \param m BIGNUM with the second factor of the second summand * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx); /** Stores multiples of generator for faster point multiplication * \param group EC_GROUP object * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx); /** Reports whether a precomputation has been done * \param group EC_GROUP object * \return 1 if a pre-computation has been done and 0 otherwise */ int EC_GROUP_have_precompute_mult(const EC_GROUP *group); /********************************************************************/ /* ASN1 stuff */ /********************************************************************/ DECLARE_ASN1_ITEM(ECPKPARAMETERS) DECLARE_ASN1_ALLOC_FUNCTIONS(ECPKPARAMETERS) DECLARE_ASN1_ITEM(ECPARAMETERS) DECLARE_ASN1_ALLOC_FUNCTIONS(ECPARAMETERS) /* * EC_GROUP_get_basis_type() returns the NID of the basis type used to * represent the field elements */ int EC_GROUP_get_basis_type(const EC_GROUP *); # ifndef OPENSSL_NO_EC2M int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k); int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, unsigned int *k2, unsigned int *k3); # endif # define OPENSSL_EC_EXPLICIT_CURVE 0x000 # define OPENSSL_EC_NAMED_CURVE 0x001 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len); int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out); # define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x) # define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x) # define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \ (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x)) # define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \ (unsigned char *)(x)) int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); # ifndef OPENSSL_NO_STDIO int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); # endif /********************************************************************/ /* EC_KEY functions */ /********************************************************************/ /* some values for the encoding_flag */ # define EC_PKEY_NO_PARAMETERS 0x001 # define EC_PKEY_NO_PUBKEY 0x002 /* some values for the flags field */ # define EC_FLAG_NON_FIPS_ALLOW 0x1 # define EC_FLAG_FIPS_CHECKED 0x2 # define EC_FLAG_COFACTOR_ECDH 0x1000 /** Creates a new EC_KEY object. * \return EC_KEY object or NULL if an error occurred. */ EC_KEY *EC_KEY_new(void); int EC_KEY_get_flags(const EC_KEY *key); void EC_KEY_set_flags(EC_KEY *key, int flags); void EC_KEY_clear_flags(EC_KEY *key, int flags); int EC_KEY_decoded_from_explicit_params(const EC_KEY *key); /** Creates a new EC_KEY object using a named curve as underlying * EC_GROUP object. * \param nid NID of the named curve. * \return EC_KEY object or NULL if an error occurred. */ EC_KEY *EC_KEY_new_by_curve_name(int nid); /** Frees a EC_KEY object. * \param key EC_KEY object to be freed. */ void EC_KEY_free(EC_KEY *key); /** Copies a EC_KEY object. * \param dst destination EC_KEY object * \param src src EC_KEY object * \return dst or NULL if an error occurred. */ EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src); /** Creates a new EC_KEY object and copies the content from src to it. * \param src the source EC_KEY object * \return newly created EC_KEY object or NULL if an error occurred. */ EC_KEY *EC_KEY_dup(const EC_KEY *src); /** Increases the internal reference count of a EC_KEY object. * \param key EC_KEY object * \return 1 on success and 0 if an error occurred. */ int EC_KEY_up_ref(EC_KEY *key); /** Returns the ENGINE object of a EC_KEY object * \param eckey EC_KEY object * \return the ENGINE object (possibly NULL). */ ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey); /** Returns the EC_GROUP object of a EC_KEY object * \param key EC_KEY object * \return the EC_GROUP object (possibly NULL). */ const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key); /** Sets the EC_GROUP of a EC_KEY object. * \param key EC_KEY object * \param group EC_GROUP to use in the EC_KEY object (note: the EC_KEY * object will use an own copy of the EC_GROUP). * \return 1 on success and 0 if an error occurred. */ int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group); /** Returns the private key of a EC_KEY object. * \param key EC_KEY object * \return a BIGNUM with the private key (possibly NULL). */ const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key); /** Sets the private key of a EC_KEY object. * \param key EC_KEY object * \param prv BIGNUM with the private key (note: the EC_KEY object * will use an own copy of the BIGNUM). * \return 1 on success and 0 if an error occurred. */ int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv); /** Returns the public key of a EC_KEY object. * \param key the EC_KEY object * \return a EC_POINT object with the public key (possibly NULL) */ const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key); /** Sets the public key of a EC_KEY object. * \param key EC_KEY object * \param pub EC_POINT object with the public key (note: the EC_KEY object * will use an own copy of the EC_POINT object). * \return 1 on success and 0 if an error occurred. */ int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub); unsigned EC_KEY_get_enc_flags(const EC_KEY *key); void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags); point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key); void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform); #define EC_KEY_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_EC_KEY, l, p, newf, dupf, freef) int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg); void *EC_KEY_get_ex_data(const EC_KEY *key, int idx); /* wrapper functions for the underlying EC_GROUP object */ void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag); /** Creates a table of pre-computed multiples of the generator to * accelerate further EC_KEY operations. * \param key EC_KEY object * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred. */ int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx); /** Creates a new ec private (and optional a new public) key. * \param key EC_KEY object * \return 1 on success and 0 if an error occurred. */ int EC_KEY_generate_key(EC_KEY *key); /** Verifies that a private and/or public key is valid. * \param key the EC_KEY object * \return 1 on success and 0 otherwise. */ int EC_KEY_check_key(const EC_KEY *key); /** Indicates if an EC_KEY can be used for signing. * \param eckey the EC_KEY object * \return 1 if can can sign and 0 otherwise. */ int EC_KEY_can_sign(const EC_KEY *eckey); /** Sets a public key from affine coordinates performing * necessary NIST PKV tests. * \param key the EC_KEY object * \param x public key x coordinate * \param y public key y coordinate * \return 1 on success and 0 otherwise. */ int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, BIGNUM *y); /** Encodes an EC_KEY public key to an allocated octet string * \param key key to encode * \param form point conversion form * \param pbuf returns pointer to allocated buffer * \param ctx BN_CTX object (optional) * \return the length of the encoded octet string or 0 if an error occurred */ size_t EC_KEY_key2buf(const EC_KEY *key, point_conversion_form_t form, unsigned char **pbuf, BN_CTX *ctx); /** Decodes a EC_KEY public key from a octet string * \param key key to decode * \param buf memory buffer with the encoded ec point * \param len length of the encoded ec point * \param ctx BN_CTX object (optional) * \return 1 on success and 0 if an error occurred */ int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, size_t len, BN_CTX *ctx); /** Decodes an EC_KEY private key from an octet string * \param key key to decode * \param buf memory buffer with the encoded private key * \param len length of the encoded key * \return 1 on success and 0 if an error occurred */ int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf, size_t len); /** Encodes a EC_KEY private key to an octet string * \param key key to encode * \param buf memory buffer for the result. If NULL the function returns * required buffer size. * \param len length of the memory buffer * \return the length of the encoded octet string or 0 if an error occurred */ size_t EC_KEY_priv2oct(const EC_KEY *key, unsigned char *buf, size_t len); /** Encodes an EC_KEY private key to an allocated octet string * \param eckey key to encode * \param pbuf returns pointer to allocated buffer * \return the length of the encoded octet string or 0 if an error occurred */ size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf); /********************************************************************/ /* de- and encoding functions for SEC1 ECPrivateKey */ /********************************************************************/ /** Decodes a private key from a memory buffer. * \param key a pointer to a EC_KEY object which should be used (or NULL) * \param in pointer to memory with the DER encoded private key * \param len length of the DER encoded private key * \return the decoded private key or NULL if an error occurred. */ EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len); /** Encodes a private key object and stores the result in a buffer. * \param key the EC_KEY object to encode * \param out the buffer for the result (if NULL the function returns number * of bytes needed). * \return 1 on success and 0 if an error occurred. */ int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out); /********************************************************************/ /* de- and encoding functions for EC parameters */ /********************************************************************/ /** Decodes ec parameter from a memory buffer. * \param key a pointer to a EC_KEY object which should be used (or NULL) * \param in pointer to memory with the DER encoded ec parameters * \param len length of the DER encoded ec parameters * \return a EC_KEY object with the decoded parameters or NULL if an error * occurred. */ EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len); /** Encodes ec parameter and stores the result in a buffer. * \param key the EC_KEY object with ec parameters to encode * \param out the buffer for the result (if NULL the function returns number * of bytes needed). * \return 1 on success and 0 if an error occurred. */ int i2d_ECParameters(EC_KEY *key, unsigned char **out); /********************************************************************/ /* de- and encoding functions for EC public key */ /* (octet string, not DER -- hence 'o2i' and 'i2o') */ /********************************************************************/ /** Decodes a ec public key from a octet string. * \param key a pointer to a EC_KEY object which should be used * \param in memory buffer with the encoded public key * \param len length of the encoded public key * \return EC_KEY object with decoded public key or NULL if an error * occurred. */ EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len); /** Encodes a ec public key in an octet string. * \param key the EC_KEY object with the public key * \param out the buffer for the result (if NULL the function returns number * of bytes needed). * \return 1 on success and 0 if an error occurred */ int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out); /** Prints out the ec parameters on human readable form. * \param bp BIO object to which the information is printed * \param key EC_KEY object * \return 1 on success and 0 if an error occurred */ int ECParameters_print(BIO *bp, const EC_KEY *key); /** Prints out the contents of a EC_KEY object * \param bp BIO object to which the information is printed * \param key EC_KEY object * \param off line offset * \return 1 on success and 0 if an error occurred */ int EC_KEY_print(BIO *bp, const EC_KEY *key, int off); # ifndef OPENSSL_NO_STDIO /** Prints out the ec parameters on human readable form. * \param fp file descriptor to which the information is printed * \param key EC_KEY object * \return 1 on success and 0 if an error occurred */ int ECParameters_print_fp(FILE *fp, const EC_KEY *key); /** Prints out the contents of a EC_KEY object * \param fp file descriptor to which the information is printed * \param key EC_KEY object * \param off line offset * \return 1 on success and 0 if an error occurred */ int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off); # endif const EC_KEY_METHOD *EC_KEY_OpenSSL(void); const EC_KEY_METHOD *EC_KEY_get_default_method(void); void EC_KEY_set_default_method(const EC_KEY_METHOD *meth); const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key); int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth); EC_KEY *EC_KEY_new_method(ENGINE *engine); /** The old name for ecdh_KDF_X9_63 * The ECDH KDF specification has been mistakingly attributed to ANSI X9.62, * it is actually specified in ANSI X9.63. * This identifier is retained for backwards compatibility */ int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, const unsigned char *Z, size_t Zlen, const unsigned char *sinfo, size_t sinfolen, const EVP_MD *md); int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, const EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)); typedef struct ECDSA_SIG_st ECDSA_SIG; /** Allocates and initialize a ECDSA_SIG structure * \return pointer to a ECDSA_SIG structure or NULL if an error occurred */ ECDSA_SIG *ECDSA_SIG_new(void); /** frees a ECDSA_SIG structure * \param sig pointer to the ECDSA_SIG structure */ void ECDSA_SIG_free(ECDSA_SIG *sig); /** DER encode content of ECDSA_SIG object (note: this function modifies *pp * (*pp += length of the DER encoded signature)). * \param sig pointer to the ECDSA_SIG object * \param pp pointer to a unsigned char pointer for the output or NULL * \return the length of the DER encoded ECDSA_SIG object or a negative value * on error */ int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp); /** Decodes a DER encoded ECDSA signature (note: this function changes *pp * (*pp += len)). * \param sig pointer to ECDSA_SIG pointer (may be NULL) * \param pp memory buffer with the DER encoded signature * \param len length of the buffer * \return pointer to the decoded ECDSA_SIG structure (or NULL) */ ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len); /** Accessor for r and s fields of ECDSA_SIG * \param sig pointer to ECDSA_SIG structure * \param pr pointer to BIGNUM pointer for r (may be NULL) * \param ps pointer to BIGNUM pointer for s (may be NULL) */ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); /** Accessor for r field of ECDSA_SIG * \param sig pointer to ECDSA_SIG structure */ const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig); /** Accessor for s field of ECDSA_SIG * \param sig pointer to ECDSA_SIG structure */ const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig); /** Setter for r and s fields of ECDSA_SIG * \param sig pointer to ECDSA_SIG structure * \param r pointer to BIGNUM for r (may be NULL) * \param s pointer to BIGNUM for s (may be NULL) */ int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s); /** Computes the ECDSA signature of the given hash value using * the supplied private key and returns the created signature. * \param dgst pointer to the hash value * \param dgst_len length of the hash value * \param eckey EC_KEY object containing a private EC key * \return pointer to a ECDSA_SIG structure or NULL if an error occurred */ ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, EC_KEY *eckey); /** Computes ECDSA signature of a given hash value using the supplied * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). * \param dgst pointer to the hash value to sign * \param dgstlen length of the hash value * \param kinv BIGNUM with a pre-computed inverse k (optional) * \param rp BIGNUM with a pre-computed rp value (optional), * see ECDSA_sign_setup * \param eckey EC_KEY object containing a private EC key * \return pointer to a ECDSA_SIG structure or NULL if an error occurred */ ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen, const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey); /** Verifies that the supplied signature is a valid ECDSA * signature of the supplied hash value using the supplied public key. * \param dgst pointer to the hash value * \param dgst_len length of the hash value * \param sig ECDSA_SIG structure * \param eckey EC_KEY object containing a public EC key * \return 1 if the signature is valid, 0 if the signature is invalid * and -1 on error */ int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey); /** Precompute parts of the signing operation * \param eckey EC_KEY object containing a private EC key * \param ctx BN_CTX object (optional) * \param kinv BIGNUM pointer for the inverse of k * \param rp BIGNUM pointer for x coordinate of k * generator * \return 1 on success and 0 otherwise */ int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp); /** Computes ECDSA signature of a given hash value using the supplied * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). * \param type this parameter is ignored * \param dgst pointer to the hash value to sign * \param dgstlen length of the hash value * \param sig memory for the DER encoded created signature * \param siglen pointer to the length of the returned signature * \param eckey EC_KEY object containing a private EC key * \return 1 on success and 0 otherwise */ int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen, unsigned char *sig, unsigned int *siglen, EC_KEY *eckey); /** Computes ECDSA signature of a given hash value using the supplied * private key (note: sig must point to ECDSA_size(eckey) bytes of memory). * \param type this parameter is ignored * \param dgst pointer to the hash value to sign * \param dgstlen length of the hash value * \param sig buffer to hold the DER encoded signature * \param siglen pointer to the length of the returned signature * \param kinv BIGNUM with a pre-computed inverse k (optional) * \param rp BIGNUM with a pre-computed rp value (optional), * see ECDSA_sign_setup * \param eckey EC_KEY object containing a private EC key * \return 1 on success and 0 otherwise */ int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen, unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey); /** Verifies that the given signature is valid ECDSA signature * of the supplied hash value using the specified public key. * \param type this parameter is ignored * \param dgst pointer to the hash value * \param dgstlen length of the hash value * \param sig pointer to the DER encoded signature * \param siglen length of the DER encoded signature * \param eckey EC_KEY object containing a public EC key * \return 1 if the signature is valid, 0 if the signature is invalid * and -1 on error */ int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen, const unsigned char *sig, int siglen, EC_KEY *eckey); /** Returns the maximum length of the DER encoded signature * \param eckey EC_KEY object * \return numbers of bytes required for the DER encoded signature */ int ECDSA_size(const EC_KEY *eckey); /********************************************************************/ /* EC_KEY_METHOD constructors, destructors, writers and accessors */ /********************************************************************/ EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth); void EC_KEY_METHOD_free(EC_KEY_METHOD *meth); void EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth, int (*init)(EC_KEY *key), void (*finish)(EC_KEY *key), int (*copy)(EC_KEY *dest, const EC_KEY *src), int (*set_group)(EC_KEY *key, const EC_GROUP *grp), int (*set_private)(EC_KEY *key, const BIGNUM *priv_key), int (*set_public)(EC_KEY *key, const EC_POINT *pub_key)); void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, int (*keygen)(EC_KEY *key)); void EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth, int (*ckey)(unsigned char **psec, size_t *pseclen, const EC_POINT *pub_key, const EC_KEY *ecdh)); void EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, int (*sign)(int type, const unsigned char *dgst, int dlen, unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey), int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp), ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey)); void EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth, int (*verify)(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sigbuf, int sig_len, EC_KEY *eckey), int (*verify_sig)(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey)); void EC_KEY_METHOD_get_init(const EC_KEY_METHOD *meth, int (**pinit)(EC_KEY *key), void (**pfinish)(EC_KEY *key), int (**pcopy)(EC_KEY *dest, const EC_KEY *src), int (**pset_group)(EC_KEY *key, const EC_GROUP *grp), int (**pset_private)(EC_KEY *key, const BIGNUM *priv_key), int (**pset_public)(EC_KEY *key, const EC_POINT *pub_key)); void EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth, int (**pkeygen)(EC_KEY *key)); void EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth, int (**pck)(unsigned char **psec, size_t *pseclen, const EC_POINT *pub_key, const EC_KEY *ecdh)); void EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth, int (**psign)(int type, const unsigned char *dgst, int dlen, unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey), int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp), ECDSA_SIG *(**psign_sig)(const unsigned char *dgst, int dgst_len, const BIGNUM *in_kinv, const BIGNUM *in_r, EC_KEY *eckey)); void EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, int (**pverify)(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sigbuf, int sig_len, EC_KEY *eckey), int (**pverify_sig)(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey)); # define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x) # ifndef __cplusplus # if defined(__SUNPRO_C) # if __SUNPRO_C >= 0x520 # pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) # endif # endif # endif # define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL) # define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_EC_PARAM_ENC, flag, NULL) # define EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, flag) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_EC_ECDH_COFACTOR, flag, NULL) # define EVP_PKEY_CTX_get_ecdh_cofactor_mode(ctx) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_EC_ECDH_COFACTOR, -2, NULL) # define EVP_PKEY_CTX_set_ecdh_kdf_type(ctx, kdf) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_EC_KDF_TYPE, kdf, NULL) # define EVP_PKEY_CTX_get_ecdh_kdf_type(ctx) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_EC_KDF_TYPE, -2, NULL) # define EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_EC_KDF_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_get_ecdh_kdf_md(ctx, pmd) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_GET_EC_KDF_MD, 0, (void *)(pmd)) # define EVP_PKEY_CTX_set_ecdh_kdf_outlen(ctx, len) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_EC_KDF_OUTLEN, len, NULL) # define EVP_PKEY_CTX_get_ecdh_kdf_outlen(ctx, plen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN, 0, \ (void *)(plen)) # define EVP_PKEY_CTX_set0_ecdh_kdf_ukm(ctx, p, plen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_EC_KDF_UKM, plen, (void *)(p)) # define EVP_PKEY_CTX_get0_ecdh_kdf_ukm(ctx, p) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_GET_EC_KDF_UKM, 0, (void *)(p)) /* SM2 will skip the operation check so no need to pass operation here */ # define EVP_PKEY_CTX_set1_id(ctx, id, id_len) \ EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ EVP_PKEY_CTRL_SET1_ID, (int)id_len, (void*)(id)) # define EVP_PKEY_CTX_get1_id(ctx, id) \ EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ EVP_PKEY_CTRL_GET1_ID, 0, (void*)(id)) # define EVP_PKEY_CTX_get1_id_len(ctx, id_len) \ EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ EVP_PKEY_CTRL_GET1_ID_LEN, 0, (void*)(id_len)) # define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID (EVP_PKEY_ALG_CTRL + 1) # define EVP_PKEY_CTRL_EC_PARAM_ENC (EVP_PKEY_ALG_CTRL + 2) # define EVP_PKEY_CTRL_EC_ECDH_COFACTOR (EVP_PKEY_ALG_CTRL + 3) # define EVP_PKEY_CTRL_EC_KDF_TYPE (EVP_PKEY_ALG_CTRL + 4) # define EVP_PKEY_CTRL_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 5) # define EVP_PKEY_CTRL_GET_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 6) # define EVP_PKEY_CTRL_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 7) # define EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 8) # define EVP_PKEY_CTRL_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 9) # define EVP_PKEY_CTRL_GET_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 10) # define EVP_PKEY_CTRL_SET1_ID (EVP_PKEY_ALG_CTRL + 11) # define EVP_PKEY_CTRL_GET1_ID (EVP_PKEY_ALG_CTRL + 12) # define EVP_PKEY_CTRL_GET1_ID_LEN (EVP_PKEY_ALG_CTRL + 13) /* KDF types */ # define EVP_PKEY_ECDH_KDF_NONE 1 # define EVP_PKEY_ECDH_KDF_X9_63 2 /** The old name for EVP_PKEY_ECDH_KDF_X9_63 * The ECDH KDF specification has been mistakingly attributed to ANSI X9.62, * it is actually specified in ANSI X9.63. * This identifier is retained for backwards compatibility */ # define EVP_PKEY_ECDH_KDF_X9_62 EVP_PKEY_ECDH_KDF_X9_63 # ifdef __cplusplus } # endif # endif #endif PKZ ;openssl/pkcs12err.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_PKCS12ERR_H # define HEADER_PKCS12ERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_PKCS12_strings(void); /* * PKCS12 function codes. */ # define PKCS12_F_OPENSSL_ASC2UNI 121 # define PKCS12_F_OPENSSL_UNI2ASC 124 # define PKCS12_F_OPENSSL_UNI2UTF8 127 # define PKCS12_F_OPENSSL_UTF82UNI 129 # define PKCS12_F_PKCS12_CREATE 105 # define PKCS12_F_PKCS12_GEN_MAC 107 # define PKCS12_F_PKCS12_INIT 109 # define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I 106 # define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT 108 # define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG 117 # define PKCS12_F_PKCS12_KEY_GEN_ASC 110 # define PKCS12_F_PKCS12_KEY_GEN_UNI 111 # define PKCS12_F_PKCS12_KEY_GEN_UTF8 116 # define PKCS12_F_PKCS12_NEWPASS 128 # define PKCS12_F_PKCS12_PACK_P7DATA 114 # define PKCS12_F_PKCS12_PACK_P7ENCDATA 115 # define PKCS12_F_PKCS12_PARSE 118 # define PKCS12_F_PKCS12_PBE_CRYPT 119 # define PKCS12_F_PKCS12_PBE_KEYIVGEN 120 # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_P8INF 112 # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_PKCS8 113 # define PKCS12_F_PKCS12_SAFEBAG_CREATE_PKCS8_ENCRYPT 133 # define PKCS12_F_PKCS12_SETUP_MAC 122 # define PKCS12_F_PKCS12_SET_MAC 123 # define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 130 # define PKCS12_F_PKCS12_UNPACK_P7DATA 131 # define PKCS12_F_PKCS12_VERIFY_MAC 126 # define PKCS12_F_PKCS8_ENCRYPT 125 # define PKCS12_F_PKCS8_SET0_PBE 132 /* * PKCS12 reason codes. */ # define PKCS12_R_CANT_PACK_STRUCTURE 100 # define PKCS12_R_CONTENT_TYPE_NOT_DATA 121 # define PKCS12_R_DECODE_ERROR 101 # define PKCS12_R_ENCODE_ERROR 102 # define PKCS12_R_ENCRYPT_ERROR 103 # define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120 # define PKCS12_R_INVALID_NULL_ARGUMENT 104 # define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 # define PKCS12_R_IV_GEN_ERROR 106 # define PKCS12_R_KEY_GEN_ERROR 107 # define PKCS12_R_MAC_ABSENT 108 # define PKCS12_R_MAC_GENERATION_ERROR 109 # define PKCS12_R_MAC_SETUP_ERROR 110 # define PKCS12_R_MAC_STRING_SET_ERROR 111 # define PKCS12_R_MAC_VERIFY_FAILURE 113 # define PKCS12_R_PARSE_ERROR 114 # define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR 115 # define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 # define PKCS12_R_PKCS12_PBE_CRYPT_ERROR 117 # define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 # define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 #endif PKZnopenssl/ssl2.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_SSL2_H # define HEADER_SSL2_H #ifdef __cplusplus extern "C" { #endif # define SSL2_VERSION 0x0002 # define SSL2_MT_CLIENT_HELLO 1 #ifdef __cplusplus } #endif #endif PKZ~@>>openssl/x509.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_X509_H # define HEADER_X509_H # include # include # include # include # include # include # include # include # include # if OPENSSL_API_COMPAT < 0x10100000L # include # include # include # endif # include # include #ifdef __cplusplus extern "C" { #endif /* Flags for X509_get_signature_info() */ /* Signature info is valid */ # define X509_SIG_INFO_VALID 0x1 /* Signature is suitable for TLS use */ # define X509_SIG_INFO_TLS 0x2 # define X509_FILETYPE_PEM 1 # define X509_FILETYPE_ASN1 2 # define X509_FILETYPE_DEFAULT 3 # define X509v3_KU_DIGITAL_SIGNATURE 0x0080 # define X509v3_KU_NON_REPUDIATION 0x0040 # define X509v3_KU_KEY_ENCIPHERMENT 0x0020 # define X509v3_KU_DATA_ENCIPHERMENT 0x0010 # define X509v3_KU_KEY_AGREEMENT 0x0008 # define X509v3_KU_KEY_CERT_SIGN 0x0004 # define X509v3_KU_CRL_SIGN 0x0002 # define X509v3_KU_ENCIPHER_ONLY 0x0001 # define X509v3_KU_DECIPHER_ONLY 0x8000 # define X509v3_KU_UNDEF 0xffff struct X509_algor_st { ASN1_OBJECT *algorithm; ASN1_TYPE *parameter; } /* X509_ALGOR */ ; typedef STACK_OF(X509_ALGOR) X509_ALGORS; typedef struct X509_val_st { ASN1_TIME *notBefore; ASN1_TIME *notAfter; } X509_VAL; typedef struct X509_sig_st X509_SIG; typedef struct X509_name_entry_st X509_NAME_ENTRY; DEFINE_STACK_OF(X509_NAME_ENTRY) DEFINE_STACK_OF(X509_NAME) # define X509_EX_V_NETSCAPE_HACK 0x8000 # define X509_EX_V_INIT 0x0001 typedef struct X509_extension_st X509_EXTENSION; typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS; DEFINE_STACK_OF(X509_EXTENSION) typedef struct x509_attributes_st X509_ATTRIBUTE; DEFINE_STACK_OF(X509_ATTRIBUTE) typedef struct X509_req_info_st X509_REQ_INFO; typedef struct X509_req_st X509_REQ; typedef struct x509_cert_aux_st X509_CERT_AUX; typedef struct x509_cinf_st X509_CINF; DEFINE_STACK_OF(X509) /* This is used for a table of trust checking functions */ typedef struct x509_trust_st { int trust; int flags; int (*check_trust) (struct x509_trust_st *, X509 *, int); char *name; int arg1; void *arg2; } X509_TRUST; DEFINE_STACK_OF(X509_TRUST) /* standard trust ids */ # define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */ # define X509_TRUST_COMPAT 1 # define X509_TRUST_SSL_CLIENT 2 # define X509_TRUST_SSL_SERVER 3 # define X509_TRUST_EMAIL 4 # define X509_TRUST_OBJECT_SIGN 5 # define X509_TRUST_OCSP_SIGN 6 # define X509_TRUST_OCSP_REQUEST 7 # define X509_TRUST_TSA 8 /* Keep these up to date! */ # define X509_TRUST_MIN 1 # define X509_TRUST_MAX 8 /* trust_flags values */ # define X509_TRUST_DYNAMIC (1U << 0) # define X509_TRUST_DYNAMIC_NAME (1U << 1) /* No compat trust if self-signed, preempts "DO_SS" */ # define X509_TRUST_NO_SS_COMPAT (1U << 2) /* Compat trust if no explicit accepted trust EKUs */ # define X509_TRUST_DO_SS_COMPAT (1U << 3) /* Accept "anyEKU" as a wildcard trust OID */ # define X509_TRUST_OK_ANY_EKU (1U << 4) /* check_trust return codes */ # define X509_TRUST_TRUSTED 1 # define X509_TRUST_REJECTED 2 # define X509_TRUST_UNTRUSTED 3 /* Flags for X509_print_ex() */ # define X509_FLAG_COMPAT 0 # define X509_FLAG_NO_HEADER 1L # define X509_FLAG_NO_VERSION (1L << 1) # define X509_FLAG_NO_SERIAL (1L << 2) # define X509_FLAG_NO_SIGNAME (1L << 3) # define X509_FLAG_NO_ISSUER (1L << 4) # define X509_FLAG_NO_VALIDITY (1L << 5) # define X509_FLAG_NO_SUBJECT (1L << 6) # define X509_FLAG_NO_PUBKEY (1L << 7) # define X509_FLAG_NO_EXTENSIONS (1L << 8) # define X509_FLAG_NO_SIGDUMP (1L << 9) # define X509_FLAG_NO_AUX (1L << 10) # define X509_FLAG_NO_ATTRIBUTES (1L << 11) # define X509_FLAG_NO_IDS (1L << 12) /* Flags specific to X509_NAME_print_ex() */ /* The field separator information */ # define XN_FLAG_SEP_MASK (0xf << 16) # define XN_FLAG_COMPAT 0/* Traditional; use old X509_NAME_print */ # define XN_FLAG_SEP_COMMA_PLUS (1 << 16)/* RFC2253 ,+ */ # define XN_FLAG_SEP_CPLUS_SPC (2 << 16)/* ,+ spaced: more readable */ # define XN_FLAG_SEP_SPLUS_SPC (3 << 16)/* ;+ spaced */ # define XN_FLAG_SEP_MULTILINE (4 << 16)/* One line per field */ # define XN_FLAG_DN_REV (1 << 20)/* Reverse DN order */ /* How the field name is shown */ # define XN_FLAG_FN_MASK (0x3 << 21) # define XN_FLAG_FN_SN 0/* Object short name */ # define XN_FLAG_FN_LN (1 << 21)/* Object long name */ # define XN_FLAG_FN_OID (2 << 21)/* Always use OIDs */ # define XN_FLAG_FN_NONE (3 << 21)/* No field names */ # define XN_FLAG_SPC_EQ (1 << 23)/* Put spaces round '=' */ /* * This determines if we dump fields we don't recognise: RFC2253 requires * this. */ # define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24) # define XN_FLAG_FN_ALIGN (1 << 25)/* Align field names to 20 * characters */ /* Complete set of RFC2253 flags */ # define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \ XN_FLAG_SEP_COMMA_PLUS | \ XN_FLAG_DN_REV | \ XN_FLAG_FN_SN | \ XN_FLAG_DUMP_UNKNOWN_FIELDS) /* readable oneline form */ # define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \ ASN1_STRFLGS_ESC_QUOTE | \ XN_FLAG_SEP_CPLUS_SPC | \ XN_FLAG_SPC_EQ | \ XN_FLAG_FN_SN) /* readable multiline form */ # define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \ ASN1_STRFLGS_ESC_MSB | \ XN_FLAG_SEP_MULTILINE | \ XN_FLAG_SPC_EQ | \ XN_FLAG_FN_LN | \ XN_FLAG_FN_ALIGN) DEFINE_STACK_OF(X509_REVOKED) typedef struct X509_crl_info_st X509_CRL_INFO; DEFINE_STACK_OF(X509_CRL) typedef struct private_key_st { int version; /* The PKCS#8 data types */ X509_ALGOR *enc_algor; ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */ /* When decrypted, the following will not be NULL */ EVP_PKEY *dec_pkey; /* used to encrypt and decrypt */ int key_length; char *key_data; int key_free; /* true if we should auto free key_data */ /* expanded version of 'enc_algor' */ EVP_CIPHER_INFO cipher; } X509_PKEY; typedef struct X509_info_st { X509 *x509; X509_CRL *crl; X509_PKEY *x_pkey; EVP_CIPHER_INFO enc_cipher; int enc_len; char *enc_data; } X509_INFO; DEFINE_STACK_OF(X509_INFO) /* * The next 2 structures and their 8 routines are used to manipulate Netscape's * spki structures - useful if you are writing a CA web page */ typedef struct Netscape_spkac_st { X509_PUBKEY *pubkey; ASN1_IA5STRING *challenge; /* challenge sent in atlas >= PR2 */ } NETSCAPE_SPKAC; typedef struct Netscape_spki_st { NETSCAPE_SPKAC *spkac; /* signed public key and challenge */ X509_ALGOR sig_algor; ASN1_BIT_STRING *signature; } NETSCAPE_SPKI; /* Netscape certificate sequence structure */ typedef struct Netscape_certificate_sequence { ASN1_OBJECT *type; STACK_OF(X509) *certs; } NETSCAPE_CERT_SEQUENCE; /*- Unused (and iv length is wrong) typedef struct CBCParameter_st { unsigned char iv[8]; } CBC_PARAM; */ /* Password based encryption structure */ typedef struct PBEPARAM_st { ASN1_OCTET_STRING *salt; ASN1_INTEGER *iter; } PBEPARAM; /* Password based encryption V2 structures */ typedef struct PBE2PARAM_st { X509_ALGOR *keyfunc; X509_ALGOR *encryption; } PBE2PARAM; typedef struct PBKDF2PARAM_st { /* Usually OCTET STRING but could be anything */ ASN1_TYPE *salt; ASN1_INTEGER *iter; ASN1_INTEGER *keylength; X509_ALGOR *prf; } PBKDF2PARAM; #ifndef OPENSSL_NO_SCRYPT typedef struct SCRYPT_PARAMS_st { ASN1_OCTET_STRING *salt; ASN1_INTEGER *costParameter; ASN1_INTEGER *blockSize; ASN1_INTEGER *parallelizationParameter; ASN1_INTEGER *keyLength; } SCRYPT_PARAMS; #endif #ifdef __cplusplus } #endif # include # include #ifdef __cplusplus extern "C" { #endif # define X509_EXT_PACK_UNKNOWN 1 # define X509_EXT_PACK_STRING 2 # define X509_extract_key(x) X509_get_pubkey(x)/*****/ # define X509_REQ_extract_key(a) X509_REQ_get_pubkey(a) # define X509_name_cmp(a,b) X509_NAME_cmp((a),(b)) void X509_CRL_set_default_method(const X509_CRL_METHOD *meth); X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl), int (*crl_free) (X509_CRL *crl), int (*crl_lookup) (X509_CRL *crl, X509_REVOKED **ret, ASN1_INTEGER *ser, X509_NAME *issuer), int (*crl_verify) (X509_CRL *crl, EVP_PKEY *pk)); void X509_CRL_METHOD_free(X509_CRL_METHOD *m); void X509_CRL_set_meth_data(X509_CRL *crl, void *dat); void *X509_CRL_get_meth_data(X509_CRL *crl); const char *X509_verify_cert_error_string(long n); int X509_verify(X509 *a, EVP_PKEY *r); int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r); int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r); NETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len); char *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x); EVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x); int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey); int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki); int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent); int X509_signature_print(BIO *bp, const X509_ALGOR *alg, const ASN1_STRING *sig); int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx); # ifndef OPENSSL_NO_OCSP int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert); # endif int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx); int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx); # ifndef OPENSSL_NO_OCSP int X509_CRL_http_nbio(OCSP_REQ_CTX *rctx, X509_CRL **pcrl); # endif int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); int X509_pubkey_digest(const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len); int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len); int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md, unsigned int *len); int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type, unsigned char *md, unsigned int *len); int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, unsigned char *md, unsigned int *len); # ifndef OPENSSL_NO_STDIO X509 *d2i_X509_fp(FILE *fp, X509 **x509); int i2d_X509_fp(FILE *fp, X509 *x509); X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl); int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl); X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req); int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req); # ifndef OPENSSL_NO_RSA RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa); int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa); RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa); int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa); RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa); int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa); # endif # ifndef OPENSSL_NO_DSA DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa); int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); # endif # ifndef OPENSSL_NO_EC EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey); int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey); EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey); int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey); # endif X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8); int i2d_PKCS8_fp(FILE *fp, X509_SIG *p8); PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO **p8inf); int i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf); int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key); int i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey); EVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a); int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey); EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); # endif X509 *d2i_X509_bio(BIO *bp, X509 **x509); int i2d_X509_bio(BIO *bp, X509 *x509); X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl); int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl); X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req); int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req); # ifndef OPENSSL_NO_RSA RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa); int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa); RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa); int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa); RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa); int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa); # endif # ifndef OPENSSL_NO_DSA DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa); int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); # endif # ifndef OPENSSL_NO_EC EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey); int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey); EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey); int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey); # endif X509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8); int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8); PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO **p8inf); int i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf); int i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key); int i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey); EVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a); int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey); EVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a); X509 *X509_dup(X509 *x509); X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa); X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex); X509_CRL *X509_CRL_dup(X509_CRL *crl); X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *rev); X509_REQ *X509_REQ_dup(X509_REQ *req); X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype, const void **ppval, const X509_ALGOR *algor); void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src); X509_NAME *X509_NAME_dup(X509_NAME *xn); X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); int X509_cmp_time(const ASN1_TIME *s, time_t *t); int X509_cmp_current_time(const ASN1_TIME *s); ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t); ASN1_TIME *X509_time_adj_ex(ASN1_TIME *s, int offset_day, long offset_sec, time_t *t); ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj); const char *X509_get_default_cert_area(void); const char *X509_get_default_cert_dir(void); const char *X509_get_default_cert_file(void); const char *X509_get_default_cert_dir_env(void); const char *X509_get_default_cert_file_env(void); const char *X509_get_default_private_dir(void); X509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey); DECLARE_ASN1_FUNCTIONS(X509_ALGOR) DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS) DECLARE_ASN1_FUNCTIONS(X509_VAL) DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey); EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key); EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key); int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain); long X509_get_pathlen(X509 *x); int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp); EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length); # ifndef OPENSSL_NO_RSA int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp); RSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length); # endif # ifndef OPENSSL_NO_DSA int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp); DSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length); # endif # ifndef OPENSSL_NO_EC int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp); EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length); # endif DECLARE_ASN1_FUNCTIONS(X509_SIG) void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg, const ASN1_OCTET_STRING **pdigest); void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, ASN1_OCTET_STRING **pdigest); DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) DECLARE_ASN1_FUNCTIONS(X509_REQ) DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS) DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) DECLARE_ASN1_FUNCTIONS(X509_NAME) int X509_NAME_set(X509_NAME **xn, X509_NAME *name); DECLARE_ASN1_FUNCTIONS(X509_CINF) DECLARE_ASN1_FUNCTIONS(X509) DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) #define X509_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509, l, p, newf, dupf, freef) int X509_set_ex_data(X509 *r, int idx, void *arg); void *X509_get_ex_data(X509 *r, int idx); int i2d_X509_AUX(X509 *a, unsigned char **pp); X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length); int i2d_re_X509_tbs(X509 *x, unsigned char **pp); int X509_SIG_INFO_get(const X509_SIG_INFO *siginf, int *mdnid, int *pknid, int *secbits, uint32_t *flags); void X509_SIG_INFO_set(X509_SIG_INFO *siginf, int mdnid, int pknid, int secbits, uint32_t flags); int X509_get_signature_info(X509 *x, int *mdnid, int *pknid, int *secbits, uint32_t *flags); void X509_get0_signature(const ASN1_BIT_STRING **psig, const X509_ALGOR **palg, const X509 *x); int X509_get_signature_nid(const X509 *x); int X509_trusted(const X509 *x); int X509_alias_set1(X509 *x, const unsigned char *name, int len); int X509_keyid_set1(X509 *x, const unsigned char *id, int len); unsigned char *X509_alias_get0(X509 *x, int *len); unsigned char *X509_keyid_get0(X509 *x, int *len); int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *, int); int X509_TRUST_set(int *t, int trust); int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj); int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj); void X509_trust_clear(X509 *x); void X509_reject_clear(X509 *x); STACK_OF(ASN1_OBJECT) *X509_get0_trust_objects(X509 *x); STACK_OF(ASN1_OBJECT) *X509_get0_reject_objects(X509 *x); DECLARE_ASN1_FUNCTIONS(X509_REVOKED) DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO) DECLARE_ASN1_FUNCTIONS(X509_CRL) int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); int X509_CRL_get0_by_serial(X509_CRL *crl, X509_REVOKED **ret, ASN1_INTEGER *serial); int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x); X509_PKEY *X509_PKEY_new(void); void X509_PKEY_free(X509_PKEY *a); DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) X509_INFO *X509_INFO_new(void); void X509_INFO_free(X509_INFO *a); char *X509_NAME_oneline(const X509_NAME *a, char *buf, int size); int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey); int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, unsigned char *md, unsigned int *len); int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey, const EVP_MD *type); int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data, unsigned char *md, unsigned int *len); int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1, ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey); int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey, const EVP_MD *type); int ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx); long X509_get_version(const X509 *x); int X509_set_version(X509 *x, long version); int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); ASN1_INTEGER *X509_get_serialNumber(X509 *x); const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x); int X509_set_issuer_name(X509 *x, X509_NAME *name); X509_NAME *X509_get_issuer_name(const X509 *a); int X509_set_subject_name(X509 *x, X509_NAME *name); X509_NAME *X509_get_subject_name(const X509 *a); const ASN1_TIME * X509_get0_notBefore(const X509 *x); ASN1_TIME *X509_getm_notBefore(const X509 *x); int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm); const ASN1_TIME *X509_get0_notAfter(const X509 *x); ASN1_TIME *X509_getm_notAfter(const X509 *x); int X509_set1_notAfter(X509 *x, const ASN1_TIME *tm); int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); int X509_up_ref(X509 *x); int X509_get_signature_type(const X509 *x); # if OPENSSL_API_COMPAT < 0x10100000L # define X509_get_notBefore X509_getm_notBefore # define X509_get_notAfter X509_getm_notAfter # define X509_set_notBefore X509_set1_notBefore # define X509_set_notAfter X509_set1_notAfter #endif /* * This one is only used so that a binary form can output, as in * i2d_X509_PUBKEY(X509_get_X509_PUBKEY(x), &buf) */ X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x); const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x); void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid, const ASN1_BIT_STRING **psuid); const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x); EVP_PKEY *X509_get0_pubkey(const X509 *x); EVP_PKEY *X509_get_pubkey(X509 *x); ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x); int X509_certificate_type(const X509 *x, const EVP_PKEY *pubkey); long X509_REQ_get_version(const X509_REQ *req); int X509_REQ_set_version(X509_REQ *x, long version); X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req); int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name); void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, const X509_ALGOR **palg); void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psig); int X509_REQ_set1_signature_algo(X509_REQ *req, X509_ALGOR *palg); int X509_REQ_get_signature_nid(const X509_REQ *req); int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp); int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey); EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req); EVP_PKEY *X509_REQ_get0_pubkey(X509_REQ *req); X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req); int X509_REQ_extension_nid(int nid); int *X509_REQ_get_extension_nids(void); void X509_REQ_set_extension_nids(int *nids); STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req); int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, int nid); int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts); int X509_REQ_get_attr_count(const X509_REQ *req); int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos); int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj, int lastpos); X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc); X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc); int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr); int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, const ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len); int X509_REQ_add1_attr_by_NID(X509_REQ *req, int nid, int type, const unsigned char *bytes, int len); int X509_REQ_add1_attr_by_txt(X509_REQ *req, const char *attrname, int type, const unsigned char *bytes, int len); int X509_CRL_set_version(X509_CRL *x, long version); int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm); int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm); int X509_CRL_sort(X509_CRL *crl); int X509_CRL_up_ref(X509_CRL *crl); # if OPENSSL_API_COMPAT < 0x10100000L # define X509_CRL_set_lastUpdate X509_CRL_set1_lastUpdate # define X509_CRL_set_nextUpdate X509_CRL_set1_nextUpdate #endif long X509_CRL_get_version(const X509_CRL *crl); const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl); const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl); DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl)) DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl)) X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl); const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl); STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl); void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, const X509_ALGOR **palg); int X509_CRL_get_signature_nid(const X509_CRL *crl); int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp); const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x); int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x); int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); const STACK_OF(X509_EXTENSION) * X509_REVOKED_get0_extensions(const X509_REVOKED *r); X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer, EVP_PKEY *skey, const EVP_MD *md, unsigned int flags); int X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey); int X509_check_private_key(const X509 *x509, const EVP_PKEY *pkey); int X509_chain_check_suiteb(int *perror_depth, X509 *x, STACK_OF(X509) *chain, unsigned long flags); int X509_CRL_check_suiteb(X509_CRL *crl, EVP_PKEY *pk, unsigned long flags); STACK_OF(X509) *X509_chain_up_ref(STACK_OF(X509) *chain); int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); unsigned long X509_issuer_and_serial_hash(X509 *a); int X509_issuer_name_cmp(const X509 *a, const X509 *b); unsigned long X509_issuer_name_hash(X509 *a); int X509_subject_name_cmp(const X509 *a, const X509 *b); unsigned long X509_subject_name_hash(X509 *x); # ifndef OPENSSL_NO_MD5 unsigned long X509_issuer_name_hash_old(X509 *a); unsigned long X509_subject_name_hash_old(X509 *x); # endif int X509_cmp(const X509 *a, const X509 *b); int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b); unsigned long X509_NAME_hash(X509_NAME *x); unsigned long X509_NAME_hash_old(X509_NAME *x); int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b); int X509_CRL_match(const X509_CRL *a, const X509_CRL *b); int X509_aux_print(BIO *out, X509 *x, int indent); # ifndef OPENSSL_NO_STDIO int X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag, unsigned long cflag); int X509_print_fp(FILE *bp, X509 *x); int X509_CRL_print_fp(FILE *bp, X509_CRL *x); int X509_REQ_print_fp(FILE *bp, X509_REQ *req); int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, unsigned long flags); # endif int X509_NAME_print(BIO *bp, const X509_NAME *name, int obase); int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent, unsigned long flags); int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag, unsigned long cflag); int X509_print(BIO *bp, X509 *x); int X509_ocspid_print(BIO *bp, X509 *x); int X509_CRL_print_ex(BIO *out, X509_CRL *x, unsigned long nmflag); int X509_CRL_print(BIO *bp, X509_CRL *x); int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag, unsigned long cflag); int X509_REQ_print(BIO *bp, X509_REQ *req); int X509_NAME_entry_count(const X509_NAME *name); int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len); int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, char *buf, int len); /* * NOTE: you should be passing -1, not 0 as lastpos. The functions that use * lastpos, search after that position on. */ int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos); int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int lastpos); X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc); X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, int set); int X509_NAME_add_entry_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len, int loc, int set); int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, const unsigned char *bytes, int len, int loc, int set); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field, int type, const unsigned char *bytes, int len); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type, const unsigned char *bytes, int len); int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, const unsigned char *bytes, int len, int loc, int set); X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, const ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len); int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj); int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, const unsigned char *bytes, int len); ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne); ASN1_STRING * X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne); int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne); int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder, size_t *pderlen); int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x); int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, int nid, int lastpos); int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x, const ASN1_OBJECT *obj, int lastpos); int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x, int crit, int lastpos); X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc); X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc); STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, X509_EXTENSION *ex, int loc); int X509_get_ext_count(const X509 *x); int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos); int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos); int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos); X509_EXTENSION *X509_get_ext(const X509 *x, int loc); X509_EXTENSION *X509_delete_ext(X509 *x, int loc); int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc); void *X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx); int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, unsigned long flags); int X509_CRL_get_ext_count(const X509_CRL *x); int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos); int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj, int lastpos); int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos); X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc); X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc); int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc); void *X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int *idx); int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, unsigned long flags); int X509_REVOKED_get_ext_count(const X509_REVOKED *x); int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos); int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj, int lastpos); int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos); X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc); X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); void *X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit, int *idx); int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, unsigned long flags); X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, int nid, int crit, ASN1_OCTET_STRING *data); X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, const ASN1_OBJECT *obj, int crit, ASN1_OCTET_STRING *data); int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj); int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit); int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data); ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex); ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne); int X509_EXTENSION_get_critical(const X509_EXTENSION *ex); int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x); int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, int lastpos); int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, const ASN1_OBJECT *obj, int lastpos); X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc); X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc); STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, X509_ATTRIBUTE *attr); STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, const ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len); STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, int nid, int type, const unsigned char *bytes, int len); STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, const char *attrname, int type, const unsigned char *bytes, int len); void *X509at_get0_data_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj, int lastpos, int type); X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, int atrtype, const void *data, int len); X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, const ASN1_OBJECT *obj, int atrtype, const void *data, int len); X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, const char *atrname, int type, const unsigned char *bytes, int len); int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj); int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len); void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype, void *data); int X509_ATTRIBUTE_count(const X509_ATTRIBUTE *attr); ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); int EVP_PKEY_get_attr_count(const EVP_PKEY *key); int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos); int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, int lastpos); X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr); int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len); int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type, const unsigned char *bytes, int len); int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, const unsigned char *bytes, int len); int X509_verify_cert(X509_STORE_CTX *ctx); /* lookup a cert from a X509 STACK */ X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name, ASN1_INTEGER *serial); X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name); DECLARE_ASN1_FUNCTIONS(PBEPARAM) DECLARE_ASN1_FUNCTIONS(PBE2PARAM) DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM) #ifndef OPENSSL_NO_SCRYPT DECLARE_ASN1_FUNCTIONS(SCRYPT_PARAMS) #endif int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, const unsigned char *salt, int saltlen); X509_ALGOR *PKCS5_pbe_set(int alg, int iter, const unsigned char *salt, int saltlen); X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, unsigned char *salt, int saltlen); X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter, unsigned char *salt, int saltlen, unsigned char *aiv, int prf_nid); #ifndef OPENSSL_NO_SCRYPT X509_ALGOR *PKCS5_pbe2_set_scrypt(const EVP_CIPHER *cipher, const unsigned char *salt, int saltlen, unsigned char *aiv, uint64_t N, uint64_t r, uint64_t p); #endif X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, int prf_nid, int keylen); /* PKCS#8 utilities */ DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO) EVP_PKEY *EVP_PKCS82PKEY(const PKCS8_PRIV_KEY_INFO *p8); PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey); int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj, int version, int ptype, void *pval, unsigned char *penc, int penclen); int PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg, const unsigned char **pk, int *ppklen, const X509_ALGOR **pa, const PKCS8_PRIV_KEY_INFO *p8); const STACK_OF(X509_ATTRIBUTE) * PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8); int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, const unsigned char *bytes, int len); int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj, int ptype, void *pval, unsigned char *penc, int penclen); int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, const unsigned char **pk, int *ppklen, X509_ALGOR **pa, X509_PUBKEY *pub); int X509_check_trust(X509 *x, int id, int flags); int X509_TRUST_get_count(void); X509_TRUST *X509_TRUST_get0(int idx); int X509_TRUST_get_by_id(int id); int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int), const char *name, int arg1, void *arg2); void X509_TRUST_cleanup(void); int X509_TRUST_get_flags(const X509_TRUST *xp); char *X509_TRUST_get0_name(const X509_TRUST *xp); int X509_TRUST_get_trust(const X509_TRUST *xp); # ifdef __cplusplus } # endif #endif PKZܴ77openssl/hmac.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_HMAC_H # define HEADER_HMAC_H # include # include # if OPENSSL_API_COMPAT < 0x10200000L # define HMAC_MAX_MD_CBLOCK 128 /* Deprecated */ # endif #ifdef __cplusplus extern "C" { #endif size_t HMAC_size(const HMAC_CTX *e); HMAC_CTX *HMAC_CTX_new(void); int HMAC_CTX_reset(HMAC_CTX *ctx); void HMAC_CTX_free(HMAC_CTX *ctx); DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md)) /*__owur*/ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, ENGINE *impl); /*__owur*/ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); /*__owur*/ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, const unsigned char *d, size_t n, unsigned char *md, unsigned int *md_len); __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); #ifdef __cplusplus } #endif #endif PKZ͕E   openssl/ocsperr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OCSPERR_H # define HEADER_OCSPERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_OCSP # ifdef __cplusplus extern "C" # endif int ERR_load_OCSP_strings(void); /* * OCSP function codes. */ # define OCSP_F_D2I_OCSP_NONCE 102 # define OCSP_F_OCSP_BASIC_ADD1_STATUS 103 # define OCSP_F_OCSP_BASIC_SIGN 104 # define OCSP_F_OCSP_BASIC_SIGN_CTX 119 # define OCSP_F_OCSP_BASIC_VERIFY 105 # define OCSP_F_OCSP_CERT_ID_NEW 101 # define OCSP_F_OCSP_CHECK_DELEGATED 106 # define OCSP_F_OCSP_CHECK_IDS 107 # define OCSP_F_OCSP_CHECK_ISSUER 108 # define OCSP_F_OCSP_CHECK_VALIDITY 115 # define OCSP_F_OCSP_MATCH_ISSUERID 109 # define OCSP_F_OCSP_PARSE_URL 114 # define OCSP_F_OCSP_REQUEST_SIGN 110 # define OCSP_F_OCSP_REQUEST_VERIFY 116 # define OCSP_F_OCSP_RESPONSE_GET1_BASIC 111 # define OCSP_F_PARSE_HTTP_LINE1 118 /* * OCSP reason codes. */ # define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 # define OCSP_R_DIGEST_ERR 102 # define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 # define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 # define OCSP_R_ERROR_PARSING_URL 121 # define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 # define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 # define OCSP_R_NOT_BASIC_RESPONSE 104 # define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105 # define OCSP_R_NO_RESPONSE_DATA 108 # define OCSP_R_NO_REVOKED_TIME 109 # define OCSP_R_NO_SIGNER_KEY 130 # define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110 # define OCSP_R_REQUEST_NOT_SIGNED 128 # define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 # define OCSP_R_ROOT_CA_NOT_TRUSTED 112 # define OCSP_R_SERVER_RESPONSE_ERROR 114 # define OCSP_R_SERVER_RESPONSE_PARSE_ERROR 115 # define OCSP_R_SIGNATURE_FAILURE 117 # define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 # define OCSP_R_STATUS_EXPIRED 125 # define OCSP_R_STATUS_NOT_YET_VALID 126 # define OCSP_R_STATUS_TOO_OLD 127 # define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119 # define OCSP_R_UNKNOWN_NID 120 # define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129 # endif #endif PKZoeeopenssl/engine.hnu[/* * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ENGINE_H # define HEADER_ENGINE_H # include # ifndef OPENSSL_NO_ENGINE # if OPENSSL_API_COMPAT < 0x10100000L # include # include # include # include # include # include # include # include # endif # include # include # include # include # ifdef __cplusplus extern "C" { # endif /* * These flags are used to control combinations of algorithm (methods) by * bitwise "OR"ing. */ # define ENGINE_METHOD_RSA (unsigned int)0x0001 # define ENGINE_METHOD_DSA (unsigned int)0x0002 # define ENGINE_METHOD_DH (unsigned int)0x0004 # define ENGINE_METHOD_RAND (unsigned int)0x0008 # define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 # define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 # define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200 # define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400 # define ENGINE_METHOD_EC (unsigned int)0x0800 /* Obvious all-or-nothing cases. */ # define ENGINE_METHOD_ALL (unsigned int)0xFFFF # define ENGINE_METHOD_NONE (unsigned int)0x0000 /* * This(ese) flag(s) controls behaviour of the ENGINE_TABLE mechanism used * internally to control registration of ENGINE implementations, and can be * set by ENGINE_set_table_flags(). The "NOINIT" flag prevents attempts to * initialise registered ENGINEs if they are not already initialised. */ # define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001 /* ENGINE flags that can be set by ENGINE_set_flags(). */ /* Not used */ /* #define ENGINE_FLAGS_MALLOCED 0x0001 */ /* * This flag is for ENGINEs that wish to handle the various 'CMD'-related * control commands on their own. Without this flag, ENGINE_ctrl() handles * these control commands on behalf of the ENGINE using their "cmd_defns" * data. */ # define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002 /* * This flag is for ENGINEs who return new duplicate structures when found * via "ENGINE_by_id()". When an ENGINE must store state (eg. if * ENGINE_ctrl() commands are called in sequence as part of some stateful * process like key-generation setup and execution), it can set this flag - * then each attempt to obtain the ENGINE will result in it being copied into * a new structure. Normally, ENGINEs don't declare this flag so * ENGINE_by_id() just increments the existing ENGINE's structural reference * count. */ # define ENGINE_FLAGS_BY_ID_COPY (int)0x0004 /* * This flag if for an ENGINE that does not want its methods registered as * part of ENGINE_register_all_complete() for example if the methods are not * usable as default methods. */ # define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008 /* * ENGINEs can support their own command types, and these flags are used in * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input * each command expects. Currently only numeric and string input is * supported. If a control command supports none of the _NUMERIC, _STRING, or * _NO_INPUT options, then it is regarded as an "internal" control command - * and not for use in config setting situations. As such, they're not * available to the ENGINE_ctrl_cmd_string() function, only raw ENGINE_ctrl() * access. Changes to this list of 'command types' should be reflected * carefully in ENGINE_cmd_is_executable() and ENGINE_ctrl_cmd_string(). */ /* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */ # define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001 /* * accepts string input (cast from 'void*' to 'const char *', 4th parameter * to ENGINE_ctrl) */ # define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002 /* * Indicates that the control command takes *no* input. Ie. the control * command is unparameterised. */ # define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004 /* * Indicates that the control command is internal. This control command won't * be shown in any output, and is only usable through the ENGINE_ctrl_cmd() * function. */ # define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008 /* * NB: These 3 control commands are deprecated and should not be used. * ENGINEs relying on these commands should compile conditional support for * compatibility (eg. if these symbols are defined) but should also migrate * the same functionality to their own ENGINE-specific control functions that * can be "discovered" by calling applications. The fact these control * commands wouldn't be "executable" (ie. usable by text-based config) * doesn't change the fact that application code can find and use them * without requiring per-ENGINE hacking. */ /* * These flags are used to tell the ctrl function what should be done. All * command numbers are shared between all engines, even if some don't make * sense to some engines. In such a case, they do nothing but return the * error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. */ # define ENGINE_CTRL_SET_LOGSTREAM 1 # define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2 # define ENGINE_CTRL_HUP 3/* Close and reinitialise * any handles/connections * etc. */ # define ENGINE_CTRL_SET_USER_INTERFACE 4/* Alternative to callback */ # define ENGINE_CTRL_SET_CALLBACK_DATA 5/* User-specific data, used * when calling the password * callback and the user * interface */ # define ENGINE_CTRL_LOAD_CONFIGURATION 6/* Load a configuration, * given a string that * represents a file name * or so */ # define ENGINE_CTRL_LOAD_SECTION 7/* Load data from a given * section in the already * loaded configuration */ /* * These control commands allow an application to deal with an arbitrary * engine in a dynamic way. Warn: Negative return values indicate errors FOR * THESE COMMANDS because zero is used to indicate 'end-of-list'. Other * commands, including ENGINE-specific command types, return zero for an * error. An ENGINE can choose to implement these ctrl functions, and can * internally manage things however it chooses - it does so by setting the * ENGINE_FLAGS_MANUAL_CMD_CTRL flag (using ENGINE_set_flags()). Otherwise * the ENGINE_ctrl() code handles this on the ENGINE's behalf using the * cmd_defns data (set using ENGINE_set_cmd_defns()). This means an ENGINE's * ctrl() handler need only implement its own commands - the above "meta" * commands will be taken care of. */ /* * Returns non-zero if the supplied ENGINE has a ctrl() handler. If "not", * then all the remaining control commands will return failure, so it is * worth checking this first if the caller is trying to "discover" the * engine's capabilities and doesn't want errors generated unnecessarily. */ # define ENGINE_CTRL_HAS_CTRL_FUNCTION 10 /* * Returns a positive command number for the first command supported by the * engine. Returns zero if no ctrl commands are supported. */ # define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11 /* * The 'long' argument specifies a command implemented by the engine, and the * return value is the next command supported, or zero if there are no more. */ # define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12 /* * The 'void*' argument is a command name (cast from 'const char *'), and the * return value is the command that corresponds to it. */ # define ENGINE_CTRL_GET_CMD_FROM_NAME 13 /* * The next two allow a command to be converted into its corresponding string * form. In each case, the 'long' argument supplies the command. In the * NAME_LEN case, the return value is the length of the command name (not * counting a trailing EOL). In the NAME case, the 'void*' argument must be a * string buffer large enough, and it will be populated with the name of the * command (WITH a trailing EOL). */ # define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14 # define ENGINE_CTRL_GET_NAME_FROM_CMD 15 /* The next two are similar but give a "short description" of a command. */ # define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16 # define ENGINE_CTRL_GET_DESC_FROM_CMD 17 /* * With this command, the return value is the OR'd combination of * ENGINE_CMD_FLAG_*** values that indicate what kind of input a given * engine-specific ctrl command expects. */ # define ENGINE_CTRL_GET_CMD_FLAGS 18 /* * ENGINE implementations should start the numbering of their own control * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc). */ # define ENGINE_CMD_BASE 200 /* * NB: These 2 nCipher "chil" control commands are deprecated, and their * functionality is now available through ENGINE-specific control commands * (exposed through the above-mentioned 'CMD'-handling). Code using these 2 * commands should be migrated to the more general command handling before * these are removed. */ /* Flags specific to the nCipher "chil" engine */ # define ENGINE_CTRL_CHIL_SET_FORKCHECK 100 /* * Depending on the value of the (long)i argument, this sets or * unsets the SimpleForkCheck flag in the CHIL API to enable or * disable checking and workarounds for applications that fork(). */ # define ENGINE_CTRL_CHIL_NO_LOCKING 101 /* * This prevents the initialisation function from providing mutex * callbacks to the nCipher library. */ /* * If an ENGINE supports its own specific control commands and wishes the * framework to handle the above 'ENGINE_CMD_***'-manipulation commands on * its behalf, it should supply a null-terminated array of ENGINE_CMD_DEFN * entries to ENGINE_set_cmd_defns(). It should also implement a ctrl() * handler that supports the stated commands (ie. the "cmd_num" entries as * described by the array). NB: The array must be ordered in increasing order * of cmd_num. "null-terminated" means that the last ENGINE_CMD_DEFN element * has cmd_num set to zero and/or cmd_name set to NULL. */ typedef struct ENGINE_CMD_DEFN_st { unsigned int cmd_num; /* The command number */ const char *cmd_name; /* The command name itself */ const char *cmd_desc; /* A short description of the command */ unsigned int cmd_flags; /* The input the command expects */ } ENGINE_CMD_DEFN; /* Generic function pointer */ typedef int (*ENGINE_GEN_FUNC_PTR) (void); /* Generic function pointer taking no arguments */ typedef int (*ENGINE_GEN_INT_FUNC_PTR) (ENGINE *); /* Specific control function pointer */ typedef int (*ENGINE_CTRL_FUNC_PTR) (ENGINE *, int, long, void *, void (*f) (void)); /* Generic load_key function pointer */ typedef EVP_PKEY *(*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *, UI_METHOD *ui_method, void *callback_data); typedef int (*ENGINE_SSL_CLIENT_CERT_PTR) (ENGINE *, SSL *ssl, STACK_OF(X509_NAME) *ca_dn, X509 **pcert, EVP_PKEY **pkey, STACK_OF(X509) **pother, UI_METHOD *ui_method, void *callback_data); /*- * These callback types are for an ENGINE's handler for cipher and digest logic. * These handlers have these prototypes; * int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid); * int foo(ENGINE *e, const EVP_MD **digest, const int **nids, int nid); * Looking at how to implement these handlers in the case of cipher support, if * the framework wants the EVP_CIPHER for 'nid', it will call; * foo(e, &p_evp_cipher, NULL, nid); (return zero for failure) * If the framework wants a list of supported 'nid's, it will call; * foo(e, NULL, &p_nids, 0); (returns number of 'nids' or -1 for error) */ /* * Returns to a pointer to the array of supported cipher 'nid's. If the * second parameter is non-NULL it is set to the size of the returned array. */ typedef int (*ENGINE_CIPHERS_PTR) (ENGINE *, const EVP_CIPHER **, const int **, int); typedef int (*ENGINE_DIGESTS_PTR) (ENGINE *, const EVP_MD **, const int **, int); typedef int (*ENGINE_PKEY_METHS_PTR) (ENGINE *, EVP_PKEY_METHOD **, const int **, int); typedef int (*ENGINE_PKEY_ASN1_METHS_PTR) (ENGINE *, EVP_PKEY_ASN1_METHOD **, const int **, int); /* * STRUCTURE functions ... all of these functions deal with pointers to * ENGINE structures where the pointers have a "structural reference". This * means that their reference is to allowed access to the structure but it * does not imply that the structure is functional. To simply increment or * decrement the structural reference count, use ENGINE_by_id and * ENGINE_free. NB: This is not required when iterating using ENGINE_get_next * as it will automatically decrement the structural reference count of the * "current" ENGINE and increment the structural reference count of the * ENGINE it returns (unless it is NULL). */ /* Get the first/last "ENGINE" type available. */ ENGINE *ENGINE_get_first(void); ENGINE *ENGINE_get_last(void); /* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ ENGINE *ENGINE_get_next(ENGINE *e); ENGINE *ENGINE_get_prev(ENGINE *e); /* Add another "ENGINE" type into the array. */ int ENGINE_add(ENGINE *e); /* Remove an existing "ENGINE" type from the array. */ int ENGINE_remove(ENGINE *e); /* Retrieve an engine from the list by its unique "id" value. */ ENGINE *ENGINE_by_id(const char *id); #if OPENSSL_API_COMPAT < 0x10100000L # define ENGINE_load_openssl() \ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_OPENSSL, NULL) # define ENGINE_load_dynamic() \ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_DYNAMIC, NULL) # ifndef OPENSSL_NO_STATIC_ENGINE # define ENGINE_load_padlock() \ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_PADLOCK, NULL) # define ENGINE_load_capi() \ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CAPI, NULL) # define ENGINE_load_afalg() \ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_AFALG, NULL) # endif # define ENGINE_load_cryptodev() \ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CRYPTODEV, NULL) # define ENGINE_load_rdrand() \ OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_RDRAND, NULL) #endif void ENGINE_load_builtin_engines(void); /* * Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation * "registry" handling. */ unsigned int ENGINE_get_table_flags(void); void ENGINE_set_table_flags(unsigned int flags); /*- Manage registration of ENGINEs per "table". For each type, there are 3 * functions; * ENGINE_register_***(e) - registers the implementation from 'e' (if it has one) * ENGINE_unregister_***(e) - unregister the implementation from 'e' * ENGINE_register_all_***() - call ENGINE_register_***() for each 'e' in the list * Cleanup is automatically registered from each table when required. */ int ENGINE_register_RSA(ENGINE *e); void ENGINE_unregister_RSA(ENGINE *e); void ENGINE_register_all_RSA(void); int ENGINE_register_DSA(ENGINE *e); void ENGINE_unregister_DSA(ENGINE *e); void ENGINE_register_all_DSA(void); int ENGINE_register_EC(ENGINE *e); void ENGINE_unregister_EC(ENGINE *e); void ENGINE_register_all_EC(void); int ENGINE_register_DH(ENGINE *e); void ENGINE_unregister_DH(ENGINE *e); void ENGINE_register_all_DH(void); int ENGINE_register_RAND(ENGINE *e); void ENGINE_unregister_RAND(ENGINE *e); void ENGINE_register_all_RAND(void); int ENGINE_register_ciphers(ENGINE *e); void ENGINE_unregister_ciphers(ENGINE *e); void ENGINE_register_all_ciphers(void); int ENGINE_register_digests(ENGINE *e); void ENGINE_unregister_digests(ENGINE *e); void ENGINE_register_all_digests(void); int ENGINE_register_pkey_meths(ENGINE *e); void ENGINE_unregister_pkey_meths(ENGINE *e); void ENGINE_register_all_pkey_meths(void); int ENGINE_register_pkey_asn1_meths(ENGINE *e); void ENGINE_unregister_pkey_asn1_meths(ENGINE *e); void ENGINE_register_all_pkey_asn1_meths(void); /* * These functions register all support from the above categories. Note, use * of these functions can result in static linkage of code your application * may not need. If you only need a subset of functionality, consider using * more selective initialisation. */ int ENGINE_register_complete(ENGINE *e); int ENGINE_register_all_complete(void); /* * Send parameterised control commands to the engine. The possibilities to * send down an integer, a pointer to data or a function pointer are * provided. Any of the parameters may or may not be NULL, depending on the * command number. In actuality, this function only requires a structural * (rather than functional) reference to an engine, but many control commands * may require the engine be functional. The caller should be aware of trying * commands that require an operational ENGINE, and only use functional * references in such situations. */ int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)); /* * This function tests if an ENGINE-specific command is usable as a * "setting". Eg. in an application's config file that gets processed through * ENGINE_ctrl_cmd_string(). If this returns zero, it is not available to * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl(). */ int ENGINE_cmd_is_executable(ENGINE *e, int cmd); /* * This function works like ENGINE_ctrl() with the exception of taking a * command name instead of a command number, and can handle optional * commands. See the comment on ENGINE_ctrl_cmd_string() for an explanation * on how to use the cmd_name and cmd_optional. */ int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, long i, void *p, void (*f) (void), int cmd_optional); /* * This function passes a command-name and argument to an ENGINE. The * cmd_name is converted to a command number and the control command is * called using 'arg' as an argument (unless the ENGINE doesn't support such * a command, in which case no control command is called). The command is * checked for input flags, and if necessary the argument will be converted * to a numeric value. If cmd_optional is non-zero, then if the ENGINE * doesn't support the given cmd_name the return value will be success * anyway. This function is intended for applications to use so that users * (or config files) can supply engine-specific config data to the ENGINE at * run-time to control behaviour of specific engines. As such, it shouldn't * be used for calling ENGINE_ctrl() functions that return data, deal with * binary data, or that are otherwise supposed to be used directly through * ENGINE_ctrl() in application code. Any "return" data from an ENGINE_ctrl() * operation in this function will be lost - the return value is interpreted * as failure if the return value is zero, success otherwise, and this * function returns a boolean value as a result. In other words, vendors of * 'ENGINE'-enabled devices should write ENGINE implementations with * parameterisations that work in this scheme, so that compliant ENGINE-based * applications can work consistently with the same configuration for the * same ENGINE-enabled devices, across applications. */ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg, int cmd_optional); /* * These functions are useful for manufacturing new ENGINE structures. They * don't address reference counting at all - one uses them to populate an * ENGINE structure with personalised implementations of things prior to * using it directly or adding it to the builtin ENGINE list in OpenSSL. * These are also here so that the ENGINE structure doesn't have to be * exposed and break binary compatibility! */ ENGINE *ENGINE_new(void); int ENGINE_free(ENGINE *e); int ENGINE_up_ref(ENGINE *e); int ENGINE_set_id(ENGINE *e, const char *id); int ENGINE_set_name(ENGINE *e, const char *name); int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth); int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f); int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f); int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f); int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f); int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f); int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f); int ENGINE_set_load_ssl_client_cert_function(ENGINE *e, ENGINE_SSL_CLIENT_CERT_PTR loadssl_f); int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f); int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f); int ENGINE_set_flags(ENGINE *e, int flags); int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); /* These functions allow control over any per-structure ENGINE data. */ #define ENGINE_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ENGINE, l, p, newf, dupf, freef) int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg); void *ENGINE_get_ex_data(const ENGINE *e, int idx); #if OPENSSL_API_COMPAT < 0x10100000L /* * This function previously cleaned up anything that needs it. Auto-deinit will * now take care of it so it is no longer required to call this function. */ # define ENGINE_cleanup() while(0) continue #endif /* * These return values from within the ENGINE structure. These can be useful * with functional references as well as structural references - it depends * which you obtained. Using the result for functional purposes if you only * obtained a structural reference may be problematic! */ const char *ENGINE_get_id(const ENGINE *e); const char *ENGINE_get_name(const ENGINE *e); const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e); const DH_METHOD *ENGINE_get_DH(const ENGINE *e); const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e); ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e); ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e); ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e); ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e); ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e); ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e); ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e); ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e); ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e); ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e); const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid); const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid); const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid); const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid); const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e, const char *str, int len); const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe, const char *str, int len); const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e); int ENGINE_get_flags(const ENGINE *e); /* * FUNCTIONAL functions. These functions deal with ENGINE structures that * have (or will) be initialised for use. Broadly speaking, the structural * functions are useful for iterating the list of available engine types, * creating new engine types, and other "list" operations. These functions * actually deal with ENGINEs that are to be used. As such these functions * can fail (if applicable) when particular engines are unavailable - eg. if * a hardware accelerator is not attached or not functioning correctly. Each * ENGINE has 2 reference counts; structural and functional. Every time a * functional reference is obtained or released, a corresponding structural * reference is automatically obtained or released too. */ /* * Initialise a engine type for use (or up its reference count if it's * already in use). This will fail if the engine is not currently operational * and cannot initialise. */ int ENGINE_init(ENGINE *e); /* * Free a functional reference to a engine type. This does not require a * corresponding call to ENGINE_free as it also releases a structural * reference. */ int ENGINE_finish(ENGINE *e); /* * The following functions handle keys that are stored in some secondary * location, handled by the engine. The storage may be on a card or * whatever. */ EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, UI_METHOD *ui_method, void *callback_data); EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, UI_METHOD *ui_method, void *callback_data); int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, STACK_OF(X509_NAME) *ca_dn, X509 **pcert, EVP_PKEY **ppkey, STACK_OF(X509) **pother, UI_METHOD *ui_method, void *callback_data); /* * This returns a pointer for the current ENGINE structure that is (by * default) performing any RSA operations. The value returned is an * incremented reference, so it should be free'd (ENGINE_finish) before it is * discarded. */ ENGINE *ENGINE_get_default_RSA(void); /* Same for the other "methods" */ ENGINE *ENGINE_get_default_DSA(void); ENGINE *ENGINE_get_default_EC(void); ENGINE *ENGINE_get_default_DH(void); ENGINE *ENGINE_get_default_RAND(void); /* * These functions can be used to get a functional reference to perform * ciphering or digesting corresponding to "nid". */ ENGINE *ENGINE_get_cipher_engine(int nid); ENGINE *ENGINE_get_digest_engine(int nid); ENGINE *ENGINE_get_pkey_meth_engine(int nid); ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid); /* * This sets a new default ENGINE structure for performing RSA operations. If * the result is non-zero (success) then the ENGINE structure will have had * its reference count up'd so the caller should still free their own * reference 'e'. */ int ENGINE_set_default_RSA(ENGINE *e); int ENGINE_set_default_string(ENGINE *e, const char *def_list); /* Same for the other "methods" */ int ENGINE_set_default_DSA(ENGINE *e); int ENGINE_set_default_EC(ENGINE *e); int ENGINE_set_default_DH(ENGINE *e); int ENGINE_set_default_RAND(ENGINE *e); int ENGINE_set_default_ciphers(ENGINE *e); int ENGINE_set_default_digests(ENGINE *e); int ENGINE_set_default_pkey_meths(ENGINE *e); int ENGINE_set_default_pkey_asn1_meths(ENGINE *e); /* * The combination "set" - the flags are bitwise "OR"d from the * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()" * function, this function can result in unnecessary static linkage. If your * application requires only specific functionality, consider using more * selective functions. */ int ENGINE_set_default(ENGINE *e, unsigned int flags); void ENGINE_add_conf_module(void); /* Deprecated functions ... */ /* int ENGINE_clear_defaults(void); */ /**************************/ /* DYNAMIC ENGINE SUPPORT */ /**************************/ /* Binary/behaviour compatibility levels */ # define OSSL_DYNAMIC_VERSION (unsigned long)0x00030000 /* * Binary versions older than this are too old for us (whether we're a loader * or a loadee) */ # define OSSL_DYNAMIC_OLDEST (unsigned long)0x00030000 /* * When compiling an ENGINE entirely as an external shared library, loadable * by the "dynamic" ENGINE, these types are needed. The 'dynamic_fns' * structure type provides the calling application's (or library's) error * functionality and memory management function pointers to the loaded * library. These should be used/set in the loaded library code so that the * loading application's 'state' will be used/changed in all operations. The * 'static_state' pointer allows the loaded library to know if it shares the * same static data as the calling application (or library), and thus whether * these callbacks need to be set or not. */ typedef void *(*dyn_MEM_malloc_fn) (size_t, const char *, int); typedef void *(*dyn_MEM_realloc_fn) (void *, size_t, const char *, int); typedef void (*dyn_MEM_free_fn) (void *, const char *, int); typedef struct st_dynamic_MEM_fns { dyn_MEM_malloc_fn malloc_fn; dyn_MEM_realloc_fn realloc_fn; dyn_MEM_free_fn free_fn; } dynamic_MEM_fns; /* * FIXME: Perhaps the memory and locking code (crypto.h) should declare and * use these types so we (and any other dependent code) can simplify a bit?? */ /* The top-level structure */ typedef struct st_dynamic_fns { void *static_state; dynamic_MEM_fns mem_fns; } dynamic_fns; /* * The version checking function should be of this prototype. NB: The * ossl_version value passed in is the OSSL_DYNAMIC_VERSION of the loading * code. If this function returns zero, it indicates a (potential) version * incompatibility and the loaded library doesn't believe it can proceed. * Otherwise, the returned value is the (latest) version supported by the * loading library. The loader may still decide that the loaded code's * version is unsatisfactory and could veto the load. The function is * expected to be implemented with the symbol name "v_check", and a default * implementation can be fully instantiated with * IMPLEMENT_DYNAMIC_CHECK_FN(). */ typedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version); # define IMPLEMENT_DYNAMIC_CHECK_FN() \ OPENSSL_EXPORT unsigned long v_check(unsigned long v); \ OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \ if (v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \ return 0; } /* * This function is passed the ENGINE structure to initialise with its own * function and command settings. It should not adjust the structural or * functional reference counts. If this function returns zero, (a) the load * will be aborted, (b) the previous ENGINE state will be memcpy'd back onto * the structure, and (c) the shared library will be unloaded. So * implementations should do their own internal cleanup in failure * circumstances otherwise they could leak. The 'id' parameter, if non-NULL, * represents the ENGINE id that the loader is looking for. If this is NULL, * the shared library can choose to return failure or to initialise a * 'default' ENGINE. If non-NULL, the shared library must initialise only an * ENGINE matching the passed 'id'. The function is expected to be * implemented with the symbol name "bind_engine". A standard implementation * can be instantiated with IMPLEMENT_DYNAMIC_BIND_FN(fn) where the parameter * 'fn' is a callback function that populates the ENGINE structure and * returns an int value (zero for failure). 'fn' should have prototype; * [static] int fn(ENGINE *e, const char *id); */ typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id, const dynamic_fns *fns); # define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ OPENSSL_EXPORT \ int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \ OPENSSL_EXPORT \ int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \ if (ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \ CRYPTO_set_mem_functions(fns->mem_fns.malloc_fn, \ fns->mem_fns.realloc_fn, \ fns->mem_fns.free_fn); \ skip_cbs: \ if (!fn(e, id)) return 0; \ return 1; } /* * If the loading application (or library) and the loaded ENGINE library * share the same static data (eg. they're both dynamically linked to the * same libcrypto.so) we need a way to avoid trying to set system callbacks - * this would fail, and for the same reason that it's unnecessary to try. If * the loaded ENGINE has (or gets from through the loader) its own copy of * the libcrypto static data, we will need to set the callbacks. The easiest * way to detect this is to have a function that returns a pointer to some * static data and let the loading application and loaded ENGINE compare * their respective values. */ void *ENGINE_get_static_state(void); # if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) DEPRECATEDIN_1_1_0(void ENGINE_setup_bsd_cryptodev(void)) # endif # ifdef __cplusplus } # endif # endif #endif PKZg@@openssl/buffer.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_BUFFER_H # define HEADER_BUFFER_H # include # ifndef HEADER_CRYPTO_H # include # endif # include #ifdef __cplusplus extern "C" { #endif # include # include /* * These names are outdated as of OpenSSL 1.1; a future release * will move them to be deprecated. */ # define BUF_strdup(s) OPENSSL_strdup(s) # define BUF_strndup(s, size) OPENSSL_strndup(s, size) # define BUF_memdup(data, size) OPENSSL_memdup(data, size) # define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) struct buf_mem_st { size_t length; /* current number of bytes */ char *data; size_t max; /* size of buffer */ unsigned long flags; }; # define BUF_MEM_FLAG_SECURE 0x01 BUF_MEM *BUF_MEM_new(void); BUF_MEM *BUF_MEM_new_ex(unsigned long flags); void BUF_MEM_free(BUF_MEM *a); size_t BUF_MEM_grow(BUF_MEM *str, size_t len); size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len); void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); # ifdef __cplusplus } # endif #endif PKZ. openssl/cterr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CTERR_H # define HEADER_CTERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_CT # ifdef __cplusplus extern "C" # endif int ERR_load_CT_strings(void); /* * CT function codes. */ # define CT_F_CTLOG_NEW 117 # define CT_F_CTLOG_NEW_FROM_BASE64 118 # define CT_F_CTLOG_NEW_FROM_CONF 119 # define CT_F_CTLOG_STORE_LOAD_CTX_NEW 122 # define CT_F_CTLOG_STORE_LOAD_FILE 123 # define CT_F_CTLOG_STORE_LOAD_LOG 130 # define CT_F_CTLOG_STORE_NEW 131 # define CT_F_CT_BASE64_DECODE 124 # define CT_F_CT_POLICY_EVAL_CTX_NEW 133 # define CT_F_CT_V1_LOG_ID_FROM_PKEY 125 # define CT_F_I2O_SCT 107 # define CT_F_I2O_SCT_LIST 108 # define CT_F_I2O_SCT_SIGNATURE 109 # define CT_F_O2I_SCT 110 # define CT_F_O2I_SCT_LIST 111 # define CT_F_O2I_SCT_SIGNATURE 112 # define CT_F_SCT_CTX_NEW 126 # define CT_F_SCT_CTX_VERIFY 128 # define CT_F_SCT_NEW 100 # define CT_F_SCT_NEW_FROM_BASE64 127 # define CT_F_SCT_SET0_LOG_ID 101 # define CT_F_SCT_SET1_EXTENSIONS 114 # define CT_F_SCT_SET1_LOG_ID 115 # define CT_F_SCT_SET1_SIGNATURE 116 # define CT_F_SCT_SET_LOG_ENTRY_TYPE 102 # define CT_F_SCT_SET_SIGNATURE_NID 103 # define CT_F_SCT_SET_VERSION 104 /* * CT reason codes. */ # define CT_R_BASE64_DECODE_ERROR 108 # define CT_R_INVALID_LOG_ID_LENGTH 100 # define CT_R_LOG_CONF_INVALID 109 # define CT_R_LOG_CONF_INVALID_KEY 110 # define CT_R_LOG_CONF_MISSING_DESCRIPTION 111 # define CT_R_LOG_CONF_MISSING_KEY 112 # define CT_R_LOG_KEY_INVALID 113 # define CT_R_SCT_FUTURE_TIMESTAMP 116 # define CT_R_SCT_INVALID 104 # define CT_R_SCT_INVALID_SIGNATURE 107 # define CT_R_SCT_LIST_INVALID 105 # define CT_R_SCT_LOG_ID_MISMATCH 114 # define CT_R_SCT_NOT_SET 106 # define CT_R_SCT_UNSUPPORTED_VERSION 115 # define CT_R_UNRECOGNIZED_SIGNATURE_NID 101 # define CT_R_UNSUPPORTED_ENTRY_TYPE 102 # define CT_R_UNSUPPORTED_VERSION 103 # endif #endif PKZBGopenssl/asn1t.hnu[/* * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ASN1T_H # define HEADER_ASN1T_H # include # include # include # ifdef OPENSSL_BUILD_SHLIBCRYPTO # undef OPENSSL_EXTERN # define OPENSSL_EXTERN OPENSSL_EXPORT # endif /* ASN1 template defines, structures and functions */ #ifdef __cplusplus extern "C" { #endif # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION /* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ # define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr)) /* Macros for start and end of ASN1_ITEM definition */ # define ASN1_ITEM_start(itname) \ const ASN1_ITEM itname##_it = { # define static_ASN1_ITEM_start(itname) \ static const ASN1_ITEM itname##_it = { # define ASN1_ITEM_end(itname) \ }; # else /* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ # define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)())) /* Macros for start and end of ASN1_ITEM definition */ # define ASN1_ITEM_start(itname) \ const ASN1_ITEM * itname##_it(void) \ { \ static const ASN1_ITEM local_it = { # define static_ASN1_ITEM_start(itname) \ static ASN1_ITEM_start(itname) # define ASN1_ITEM_end(itname) \ }; \ return &local_it; \ } # endif /* Macros to aid ASN1 template writing */ # define ASN1_ITEM_TEMPLATE(tname) \ static const ASN1_TEMPLATE tname##_item_tt # define ASN1_ITEM_TEMPLATE_END(tname) \ ;\ ASN1_ITEM_start(tname) \ ASN1_ITYPE_PRIMITIVE,\ -1,\ &tname##_item_tt,\ 0,\ NULL,\ 0,\ #tname \ ASN1_ITEM_end(tname) # define static_ASN1_ITEM_TEMPLATE_END(tname) \ ;\ static_ASN1_ITEM_start(tname) \ ASN1_ITYPE_PRIMITIVE,\ -1,\ &tname##_item_tt,\ 0,\ NULL,\ 0,\ #tname \ ASN1_ITEM_end(tname) /* This is a ASN1 type which just embeds a template */ /*- * This pair helps declare a SEQUENCE. We can do: * * ASN1_SEQUENCE(stname) = { * ... SEQUENCE components ... * } ASN1_SEQUENCE_END(stname) * * This will produce an ASN1_ITEM called stname_it * for a structure called stname. * * If you want the same structure but a different * name then use: * * ASN1_SEQUENCE(itname) = { * ... SEQUENCE components ... * } ASN1_SEQUENCE_END_name(stname, itname) * * This will create an item called itname_it using * a structure called stname. */ # define ASN1_SEQUENCE(tname) \ static const ASN1_TEMPLATE tname##_seq_tt[] # define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname) # define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname) # define ASN1_SEQUENCE_END_name(stname, tname) \ ;\ ASN1_ITEM_start(tname) \ ASN1_ITYPE_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ NULL,\ sizeof(stname),\ #tname \ ASN1_ITEM_end(tname) # define static_ASN1_SEQUENCE_END_name(stname, tname) \ ;\ static_ASN1_ITEM_start(tname) \ ASN1_ITYPE_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ NULL,\ sizeof(stname),\ #stname \ ASN1_ITEM_end(tname) # define ASN1_NDEF_SEQUENCE(tname) \ ASN1_SEQUENCE(tname) # define ASN1_NDEF_SEQUENCE_cb(tname, cb) \ ASN1_SEQUENCE_cb(tname, cb) # define ASN1_SEQUENCE_cb(tname, cb) \ static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ ASN1_SEQUENCE(tname) # define ASN1_BROKEN_SEQUENCE(tname) \ static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \ ASN1_SEQUENCE(tname) # define ASN1_SEQUENCE_ref(tname, cb) \ static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0}; \ ASN1_SEQUENCE(tname) # define ASN1_SEQUENCE_enc(tname, enc, cb) \ static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc)}; \ ASN1_SEQUENCE(tname) # define ASN1_NDEF_SEQUENCE_END(tname) \ ;\ ASN1_ITEM_start(tname) \ ASN1_ITYPE_NDEF_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ NULL,\ sizeof(tname),\ #tname \ ASN1_ITEM_end(tname) # define static_ASN1_NDEF_SEQUENCE_END(tname) \ ;\ static_ASN1_ITEM_start(tname) \ ASN1_ITYPE_NDEF_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ NULL,\ sizeof(tname),\ #tname \ ASN1_ITEM_end(tname) # define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname) # define static_ASN1_BROKEN_SEQUENCE_END(stname) \ static_ASN1_SEQUENCE_END_ref(stname, stname) # define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) # define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) # define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname) # define ASN1_SEQUENCE_END_ref(stname, tname) \ ;\ ASN1_ITEM_start(tname) \ ASN1_ITYPE_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ &tname##_aux,\ sizeof(stname),\ #tname \ ASN1_ITEM_end(tname) # define static_ASN1_SEQUENCE_END_ref(stname, tname) \ ;\ static_ASN1_ITEM_start(tname) \ ASN1_ITYPE_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ &tname##_aux,\ sizeof(stname),\ #stname \ ASN1_ITEM_end(tname) # define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \ ;\ ASN1_ITEM_start(tname) \ ASN1_ITYPE_NDEF_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ &tname##_aux,\ sizeof(stname),\ #stname \ ASN1_ITEM_end(tname) /*- * This pair helps declare a CHOICE type. We can do: * * ASN1_CHOICE(chname) = { * ... CHOICE options ... * ASN1_CHOICE_END(chname) * * This will produce an ASN1_ITEM called chname_it * for a structure called chname. The structure * definition must look like this: * typedef struct { * int type; * union { * ASN1_SOMETHING *opt1; * ASN1_SOMEOTHER *opt2; * } value; * } chname; * * the name of the selector must be 'type'. * to use an alternative selector name use the * ASN1_CHOICE_END_selector() version. */ # define ASN1_CHOICE(tname) \ static const ASN1_TEMPLATE tname##_ch_tt[] # define ASN1_CHOICE_cb(tname, cb) \ static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \ ASN1_CHOICE(tname) # define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname) # define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname) # define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type) # define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type) # define ASN1_CHOICE_END_selector(stname, tname, selname) \ ;\ ASN1_ITEM_start(tname) \ ASN1_ITYPE_CHOICE,\ offsetof(stname,selname) ,\ tname##_ch_tt,\ sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ NULL,\ sizeof(stname),\ #stname \ ASN1_ITEM_end(tname) # define static_ASN1_CHOICE_END_selector(stname, tname, selname) \ ;\ static_ASN1_ITEM_start(tname) \ ASN1_ITYPE_CHOICE,\ offsetof(stname,selname) ,\ tname##_ch_tt,\ sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ NULL,\ sizeof(stname),\ #stname \ ASN1_ITEM_end(tname) # define ASN1_CHOICE_END_cb(stname, tname, selname) \ ;\ ASN1_ITEM_start(tname) \ ASN1_ITYPE_CHOICE,\ offsetof(stname,selname) ,\ tname##_ch_tt,\ sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ &tname##_aux,\ sizeof(stname),\ #stname \ ASN1_ITEM_end(tname) /* This helps with the template wrapper form of ASN1_ITEM */ # define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \ (flags), (tag), 0,\ #name, ASN1_ITEM_ref(type) } /* These help with SEQUENCE or CHOICE components */ /* used to declare other types */ # define ASN1_EX_TYPE(flags, tag, stname, field, type) { \ (flags), (tag), offsetof(stname, field),\ #field, ASN1_ITEM_ref(type) } /* implicit and explicit helper macros */ # define ASN1_IMP_EX(stname, field, type, tag, ex) \ ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | (ex), tag, stname, field, type) # define ASN1_EXP_EX(stname, field, type, tag, ex) \ ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | (ex), tag, stname, field, type) /* Any defined by macros: the field used is in the table itself */ # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION # define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } # define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } # else # define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb } # define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb } # endif /* Plain simple type */ # define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type) /* Embedded simple type */ # define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED,0, stname, field, type) /* OPTIONAL simple type */ # define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type) # define ASN1_OPT_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED, 0, stname, field, type) /* IMPLICIT tagged simple type */ # define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0) # define ASN1_IMP_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_EMBED) /* IMPLICIT tagged OPTIONAL simple type */ # define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) # define ASN1_IMP_OPT_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED) /* Same as above but EXPLICIT */ # define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0) # define ASN1_EXP_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_EMBED) # define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL) # define ASN1_EXP_OPT_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED) /* SEQUENCE OF type */ # define ASN1_SEQUENCE_OF(stname, field, type) \ ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type) /* OPTIONAL SEQUENCE OF */ # define ASN1_SEQUENCE_OF_OPT(stname, field, type) \ ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) /* Same as above but for SET OF */ # define ASN1_SET_OF(stname, field, type) \ ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type) # define ASN1_SET_OF_OPT(stname, field, type) \ ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type) /* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */ # define ASN1_IMP_SET_OF(stname, field, type, tag) \ ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) # define ASN1_EXP_SET_OF(stname, field, type, tag) \ ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF) # define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \ ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) # define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \ ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL) # define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \ ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) # define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \ ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) # define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \ ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF) # define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \ ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL) /* EXPLICIT using indefinite length constructed form */ # define ASN1_NDEF_EXP(stname, field, type, tag) \ ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF) /* EXPLICIT OPTIONAL using indefinite length constructed form */ # define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \ ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF) /* Macros for the ASN1_ADB structure */ # define ASN1_ADB(name) \ static const ASN1_ADB_TABLE name##_adbtbl[] # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION # define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ ;\ static const ASN1_ADB name##_adb = {\ flags,\ offsetof(name, field),\ adb_cb,\ name##_adbtbl,\ sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ def,\ none\ } # else # define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \ ;\ static const ASN1_ITEM *name##_adb(void) \ { \ static const ASN1_ADB internal_adb = \ {\ flags,\ offsetof(name, field),\ adb_cb,\ name##_adbtbl,\ sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ def,\ none\ }; \ return (const ASN1_ITEM *) &internal_adb; \ } \ void dummy_function(void) # endif # define ADB_ENTRY(val, template) {val, template} # define ASN1_ADB_TEMPLATE(name) \ static const ASN1_TEMPLATE name##_tt /* * This is the ASN1 template structure that defines a wrapper round the * actual type. It determines the actual position of the field in the value * structure, various flags such as OPTIONAL and the field name. */ struct ASN1_TEMPLATE_st { unsigned long flags; /* Various flags */ long tag; /* tag, not used if no tagging */ unsigned long offset; /* Offset of this field in structure */ const char *field_name; /* Field name */ ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */ }; /* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */ # define ASN1_TEMPLATE_item(t) (t->item_ptr) # define ASN1_TEMPLATE_adb(t) (t->item_ptr) typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE; typedef struct ASN1_ADB_st ASN1_ADB; struct ASN1_ADB_st { unsigned long flags; /* Various flags */ unsigned long offset; /* Offset of selector field */ int (*adb_cb)(long *psel); /* Application callback */ const ASN1_ADB_TABLE *tbl; /* Table of possible types */ long tblcount; /* Number of entries in tbl */ const ASN1_TEMPLATE *default_tt; /* Type to use if no match */ const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */ }; struct ASN1_ADB_TABLE_st { long value; /* NID for an object or value for an int */ const ASN1_TEMPLATE tt; /* item for this value */ }; /* template flags */ /* Field is optional */ # define ASN1_TFLG_OPTIONAL (0x1) /* Field is a SET OF */ # define ASN1_TFLG_SET_OF (0x1 << 1) /* Field is a SEQUENCE OF */ # define ASN1_TFLG_SEQUENCE_OF (0x2 << 1) /* * Special case: this refers to a SET OF that will be sorted into DER order * when encoded *and* the corresponding STACK will be modified to match the * new order. */ # define ASN1_TFLG_SET_ORDER (0x3 << 1) /* Mask for SET OF or SEQUENCE OF */ # define ASN1_TFLG_SK_MASK (0x3 << 1) /* * These flags mean the tag should be taken from the tag field. If EXPLICIT * then the underlying type is used for the inner tag. */ /* IMPLICIT tagging */ # define ASN1_TFLG_IMPTAG (0x1 << 3) /* EXPLICIT tagging, inner tag from underlying type */ # define ASN1_TFLG_EXPTAG (0x2 << 3) # define ASN1_TFLG_TAG_MASK (0x3 << 3) /* context specific IMPLICIT */ # define ASN1_TFLG_IMPLICIT (ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT) /* context specific EXPLICIT */ # define ASN1_TFLG_EXPLICIT (ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT) /* * If tagging is in force these determine the type of tag to use. Otherwise * the tag is determined by the underlying type. These values reflect the * actual octet format. */ /* Universal tag */ # define ASN1_TFLG_UNIVERSAL (0x0<<6) /* Application tag */ # define ASN1_TFLG_APPLICATION (0x1<<6) /* Context specific tag */ # define ASN1_TFLG_CONTEXT (0x2<<6) /* Private tag */ # define ASN1_TFLG_PRIVATE (0x3<<6) # define ASN1_TFLG_TAG_CLASS (0x3<<6) /* * These are for ANY DEFINED BY type. In this case the 'item' field points to * an ASN1_ADB structure which contains a table of values to decode the * relevant type */ # define ASN1_TFLG_ADB_MASK (0x3<<8) # define ASN1_TFLG_ADB_OID (0x1<<8) # define ASN1_TFLG_ADB_INT (0x1<<9) /* * This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes * indefinite length constructed encoding to be used if required. */ # define ASN1_TFLG_NDEF (0x1<<11) /* Field is embedded and not a pointer */ # define ASN1_TFLG_EMBED (0x1 << 12) /* This is the actual ASN1 item itself */ struct ASN1_ITEM_st { char itype; /* The item type, primitive, SEQUENCE, CHOICE * or extern */ long utype; /* underlying type */ const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains * the contents */ long tcount; /* Number of templates if SEQUENCE or CHOICE */ const void *funcs; /* functions that handle this type */ long size; /* Structure size (usually) */ const char *sname; /* Structure name */ }; /*- * These are values for the itype field and * determine how the type is interpreted. * * For PRIMITIVE types the underlying type * determines the behaviour if items is NULL. * * Otherwise templates must contain a single * template and the type is treated in the * same way as the type specified in the template. * * For SEQUENCE types the templates field points * to the members, the size field is the * structure size. * * For CHOICE types the templates field points * to each possible member (typically a union) * and the 'size' field is the offset of the * selector. * * The 'funcs' field is used for application * specific functions. * * The EXTERN type uses a new style d2i/i2d. * The new style should be used where possible * because it avoids things like the d2i IMPLICIT * hack. * * MSTRING is a multiple string type, it is used * for a CHOICE of character strings where the * actual strings all occupy an ASN1_STRING * structure. In this case the 'utype' field * has a special meaning, it is used as a mask * of acceptable types using the B_ASN1 constants. * * NDEF_SEQUENCE is the same as SEQUENCE except * that it will use indefinite length constructed * encoding if requested. * */ # define ASN1_ITYPE_PRIMITIVE 0x0 # define ASN1_ITYPE_SEQUENCE 0x1 # define ASN1_ITYPE_CHOICE 0x2 # define ASN1_ITYPE_EXTERN 0x4 # define ASN1_ITYPE_MSTRING 0x5 # define ASN1_ITYPE_NDEF_SEQUENCE 0x6 /* * Cache for ASN1 tag and length, so we don't keep re-reading it for things * like CHOICE */ struct ASN1_TLC_st { char valid; /* Values below are valid */ int ret; /* return value */ long plen; /* length */ int ptag; /* class value */ int pclass; /* class value */ int hdrlen; /* header length */ }; /* Typedefs for ASN1 function pointers */ typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx); typedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, int tag, int aclass); typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it); typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it); typedef int ASN1_ex_print_func(BIO *out, ASN1_VALUE **pval, int indent, const char *fname, const ASN1_PCTX *pctx); typedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, const ASN1_ITEM *it); typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); typedef int ASN1_primitive_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, int indent, const ASN1_PCTX *pctx); typedef struct ASN1_EXTERN_FUNCS_st { void *app_data; ASN1_ex_new_func *asn1_ex_new; ASN1_ex_free_func *asn1_ex_free; ASN1_ex_free_func *asn1_ex_clear; ASN1_ex_d2i *asn1_ex_d2i; ASN1_ex_i2d *asn1_ex_i2d; ASN1_ex_print_func *asn1_ex_print; } ASN1_EXTERN_FUNCS; typedef struct ASN1_PRIMITIVE_FUNCS_st { void *app_data; unsigned long flags; ASN1_ex_new_func *prim_new; ASN1_ex_free_func *prim_free; ASN1_ex_free_func *prim_clear; ASN1_primitive_c2i *prim_c2i; ASN1_primitive_i2c *prim_i2c; ASN1_primitive_print *prim_print; } ASN1_PRIMITIVE_FUNCS; /* * This is the ASN1_AUX structure: it handles various miscellaneous * requirements. For example the use of reference counts and an informational * callback. The "informational callback" is called at various points during * the ASN1 encoding and decoding. It can be used to provide minor * customisation of the structures used. This is most useful where the * supplied routines *almost* do the right thing but need some extra help at * a few points. If the callback returns zero then it is assumed a fatal * error has occurred and the main operation should be abandoned. If major * changes in the default behaviour are required then an external type is * more appropriate. */ typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it, void *exarg); typedef struct ASN1_AUX_st { void *app_data; int flags; int ref_offset; /* Offset of reference value */ int ref_lock; /* Lock type to use */ ASN1_aux_cb *asn1_cb; int enc_offset; /* Offset of ASN1_ENCODING structure */ } ASN1_AUX; /* For print related callbacks exarg points to this structure */ typedef struct ASN1_PRINT_ARG_st { BIO *out; int indent; const ASN1_PCTX *pctx; } ASN1_PRINT_ARG; /* For streaming related callbacks exarg points to this structure */ typedef struct ASN1_STREAM_ARG_st { /* BIO to stream through */ BIO *out; /* BIO with filters appended */ BIO *ndef_bio; /* Streaming I/O boundary */ unsigned char **boundary; } ASN1_STREAM_ARG; /* Flags in ASN1_AUX */ /* Use a reference count */ # define ASN1_AFLG_REFCOUNT 1 /* Save the encoding of structure (useful for signatures) */ # define ASN1_AFLG_ENCODING 2 /* The Sequence length is invalid */ # define ASN1_AFLG_BROKEN 4 /* operation values for asn1_cb */ # define ASN1_OP_NEW_PRE 0 # define ASN1_OP_NEW_POST 1 # define ASN1_OP_FREE_PRE 2 # define ASN1_OP_FREE_POST 3 # define ASN1_OP_D2I_PRE 4 # define ASN1_OP_D2I_POST 5 # define ASN1_OP_I2D_PRE 6 # define ASN1_OP_I2D_POST 7 # define ASN1_OP_PRINT_PRE 8 # define ASN1_OP_PRINT_POST 9 # define ASN1_OP_STREAM_PRE 10 # define ASN1_OP_STREAM_POST 11 # define ASN1_OP_DETACHED_PRE 12 # define ASN1_OP_DETACHED_POST 13 /* Macro to implement a primitive type */ # define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0) # define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \ ASN1_ITEM_start(itname) \ ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \ ASN1_ITEM_end(itname) /* Macro to implement a multi string type */ # define IMPLEMENT_ASN1_MSTRING(itname, mask) \ ASN1_ITEM_start(itname) \ ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \ ASN1_ITEM_end(itname) # define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \ ASN1_ITEM_start(sname) \ ASN1_ITYPE_EXTERN, \ tag, \ NULL, \ 0, \ &fptrs, \ 0, \ #sname \ ASN1_ITEM_end(sname) /* Macro to implement standard functions in terms of ASN1_ITEM structures */ # define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname) # define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname) # define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \ IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname) # define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \ IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname) # define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \ IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname) # define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \ pre stname *fname##_new(void) \ { \ return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \ } \ pre void fname##_free(stname *a) \ { \ ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \ } # define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \ stname *fname##_new(void) \ { \ return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \ } \ void fname##_free(stname *a) \ { \ ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \ } # define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \ IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) # define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ { \ return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ } \ int i2d_##fname(stname *a, unsigned char **out) \ { \ return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ } # define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \ int i2d_##stname##_NDEF(stname *a, unsigned char **out) \ { \ return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\ } # define IMPLEMENT_STATIC_ASN1_ENCODE_FUNCTIONS(stname) \ static stname *d2i_##stname(stname **a, \ const unsigned char **in, long len) \ { \ return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \ ASN1_ITEM_rptr(stname)); \ } \ static int i2d_##stname(stname *a, unsigned char **out) \ { \ return ASN1_item_i2d((ASN1_VALUE *)a, out, \ ASN1_ITEM_rptr(stname)); \ } /* * This includes evil casts to remove const: they will go away when full ASN1 * constification is done. */ # define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ { \ return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\ } \ int i2d_##fname(const stname *a, unsigned char **out) \ { \ return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\ } # define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \ stname * stname##_dup(stname *x) \ { \ return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \ } # define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \ IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname) # define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \ int fname##_print_ctx(BIO *out, stname *x, int indent, \ const ASN1_PCTX *pctx) \ { \ return ASN1_item_print(out, (ASN1_VALUE *)x, indent, \ ASN1_ITEM_rptr(itname), pctx); \ } # define IMPLEMENT_ASN1_FUNCTIONS_const(name) \ IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name) # define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname) \ IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \ IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) /* external definitions for primitive types */ DECLARE_ASN1_ITEM(ASN1_BOOLEAN) DECLARE_ASN1_ITEM(ASN1_TBOOLEAN) DECLARE_ASN1_ITEM(ASN1_FBOOLEAN) DECLARE_ASN1_ITEM(ASN1_SEQUENCE) DECLARE_ASN1_ITEM(CBIGNUM) DECLARE_ASN1_ITEM(BIGNUM) DECLARE_ASN1_ITEM(INT32) DECLARE_ASN1_ITEM(ZINT32) DECLARE_ASN1_ITEM(UINT32) DECLARE_ASN1_ITEM(ZUINT32) DECLARE_ASN1_ITEM(INT64) DECLARE_ASN1_ITEM(ZINT64) DECLARE_ASN1_ITEM(UINT64) DECLARE_ASN1_ITEM(ZUINT64) # if OPENSSL_API_COMPAT < 0x10200000L /* * LONG and ZLONG are strongly discouraged for use as stored data, as the * underlying C type (long) differs in size depending on the architecture. * They are designed with 32-bit longs in mind. */ DECLARE_ASN1_ITEM(LONG) DECLARE_ASN1_ITEM(ZLONG) # endif DEFINE_STACK_OF(ASN1_VALUE) /* Functions used internally by the ASN1 code */ int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it); void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it); int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx); int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, int tag, int aclass); #ifdef __cplusplus } #endif #endif PKZP openssl/rc5.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RC5_H # define HEADER_RC5_H # include # ifndef OPENSSL_NO_RC5 # ifdef __cplusplus extern "C" { # endif # define RC5_ENCRYPT 1 # define RC5_DECRYPT 0 # define RC5_32_INT unsigned int # define RC5_32_BLOCK 8 # define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ /* * This are the only values supported. Tweak the code if you want more The * most supported modes will be RC5-32/12/16 RC5-32/16/8 */ # define RC5_8_ROUNDS 8 # define RC5_12_ROUNDS 12 # define RC5_16_ROUNDS 16 typedef struct rc5_key_st { /* Number of rounds */ int rounds; RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)]; } RC5_32_KEY; void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, int rounds); void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out, RC5_32_KEY *key, int enc); void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, RC5_32_KEY *ks, unsigned char *iv, int enc); void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, RC5_32_KEY *schedule, unsigned char *ivec, int *num, int enc); void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, RC5_32_KEY *schedule, unsigned char *ivec, int *num); # ifdef __cplusplus } # endif # endif #endif PKZC,ffopenssl/ecdsa.hnu[/* * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #include PKZ|openssl/conf.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CONF_H # define HEADER_CONF_H # include # include # include # include # include # include #ifdef __cplusplus extern "C" { #endif typedef struct { char *section; char *name; char *value; } CONF_VALUE; DEFINE_STACK_OF(CONF_VALUE) DEFINE_LHASH_OF(CONF_VALUE); struct conf_st; struct conf_method_st; typedef struct conf_method_st CONF_METHOD; struct conf_method_st { const char *name; CONF *(*create) (CONF_METHOD *meth); int (*init) (CONF *conf); int (*destroy) (CONF *conf); int (*destroy_data) (CONF *conf); int (*load_bio) (CONF *conf, BIO *bp, long *eline); int (*dump) (const CONF *conf, BIO *bp); int (*is_number) (const CONF *conf, char c); int (*to_int) (const CONF *conf, char c); int (*load) (CONF *conf, const char *name, long *eline); }; /* Module definitions */ typedef struct conf_imodule_st CONF_IMODULE; typedef struct conf_module_st CONF_MODULE; DEFINE_STACK_OF(CONF_MODULE) DEFINE_STACK_OF(CONF_IMODULE) /* DSO module function typedefs */ typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf); typedef void conf_finish_func (CONF_IMODULE *md); # define CONF_MFLAGS_IGNORE_ERRORS 0x1 # define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2 # define CONF_MFLAGS_SILENT 0x4 # define CONF_MFLAGS_NO_DSO 0x8 # define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10 # define CONF_MFLAGS_DEFAULT_SECTION 0x20 int CONF_set_default_method(CONF_METHOD *meth); void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash); LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline); # ifndef OPENSSL_NO_STDIO LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline); # endif LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline); STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section); char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, const char *name); long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, const char *name); void CONF_free(LHASH_OF(CONF_VALUE) *conf); #ifndef OPENSSL_NO_STDIO int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out); #endif int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out); DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name)) #if OPENSSL_API_COMPAT < 0x10100000L # define OPENSSL_no_config() \ OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL) #endif /* * New conf code. The semantics are different from the functions above. If * that wasn't the case, the above functions would have been replaced */ struct conf_st { CONF_METHOD *meth; void *meth_data; LHASH_OF(CONF_VALUE) *data; }; CONF *NCONF_new(CONF_METHOD *meth); CONF_METHOD *NCONF_default(void); CONF_METHOD *NCONF_WIN32(void); void NCONF_free(CONF *conf); void NCONF_free_data(CONF *conf); int NCONF_load(CONF *conf, const char *file, long *eline); # ifndef OPENSSL_NO_STDIO int NCONF_load_fp(CONF *conf, FILE *fp, long *eline); # endif int NCONF_load_bio(CONF *conf, BIO *bp, long *eline); STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, const char *section); char *NCONF_get_string(const CONF *conf, const char *group, const char *name); int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, long *result); #ifndef OPENSSL_NO_STDIO int NCONF_dump_fp(const CONF *conf, FILE *out); #endif int NCONF_dump_bio(const CONF *conf, BIO *out); #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) /* Module functions */ int CONF_modules_load(const CONF *cnf, const char *appname, unsigned long flags); int CONF_modules_load_file(const char *filename, const char *appname, unsigned long flags); void CONF_modules_unload(int all); void CONF_modules_finish(void); #if OPENSSL_API_COMPAT < 0x10100000L # define CONF_modules_free() while(0) continue #endif int CONF_module_add(const char *name, conf_init_func *ifunc, conf_finish_func *ffunc); const char *CONF_imodule_get_name(const CONF_IMODULE *md); const char *CONF_imodule_get_value(const CONF_IMODULE *md); void *CONF_imodule_get_usr_data(const CONF_IMODULE *md); void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data); CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md); unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md); void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags); void *CONF_module_get_usr_data(CONF_MODULE *pmod); void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data); char *CONF_get1_default_config_file(void); int CONF_parse_list(const char *list, int sep, int nospc, int (*list_cb) (const char *elem, int len, void *usr), void *arg); void OPENSSL_load_builtin_modules(void); # ifdef __cplusplus } # endif #endif PKZC3m$$openssl/objectserr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OBJERR_H # define HEADER_OBJERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_OBJ_strings(void); /* * OBJ function codes. */ # define OBJ_F_OBJ_ADD_OBJECT 105 # define OBJ_F_OBJ_ADD_SIGID 107 # define OBJ_F_OBJ_CREATE 100 # define OBJ_F_OBJ_DUP 101 # define OBJ_F_OBJ_NAME_NEW_INDEX 106 # define OBJ_F_OBJ_NID2LN 102 # define OBJ_F_OBJ_NID2OBJ 103 # define OBJ_F_OBJ_NID2SN 104 # define OBJ_F_OBJ_TXT2OBJ 108 /* * OBJ reason codes. */ # define OBJ_R_OID_EXISTS 102 # define OBJ_R_UNKNOWN_NID 101 #endif PKZOopenssl/comperr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_COMPERR_H # define HEADER_COMPERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_COMP # ifdef __cplusplus extern "C" # endif int ERR_load_COMP_strings(void); /* * COMP function codes. */ # define COMP_F_BIO_ZLIB_FLUSH 99 # define COMP_F_BIO_ZLIB_NEW 100 # define COMP_F_BIO_ZLIB_READ 101 # define COMP_F_BIO_ZLIB_WRITE 102 # define COMP_F_COMP_CTX_NEW 103 /* * COMP reason codes. */ # define COMP_R_ZLIB_DEFLATE_ERROR 99 # define COMP_R_ZLIB_INFLATE_ERROR 100 # define COMP_R_ZLIB_NOT_SUPPORTED 101 # endif #endif PKZ⌽aaopenssl/whrlpool.hnu[/* * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_WHRLPOOL_H # define HEADER_WHRLPOOL_H #include # ifndef OPENSSL_NO_WHIRLPOOL # include # include # ifdef __cplusplus extern "C" { # endif # define WHIRLPOOL_DIGEST_LENGTH (512/8) # define WHIRLPOOL_BBLOCK 512 # define WHIRLPOOL_COUNTER (256/8) typedef struct { union { unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; /* double q is here to ensure 64-bit alignment */ double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)]; } H; unsigned char data[WHIRLPOOL_BBLOCK / 8]; unsigned int bitoff; size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; } WHIRLPOOL_CTX; int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); # ifdef __cplusplus } # endif # endif #endif PKZMo[&[&openssl/rsaerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RSAERR_H # define HEADER_RSAERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_RSA_strings(void); /* * RSA function codes. */ # define RSA_F_CHECK_PADDING_MD 140 # define RSA_F_ENCODE_PKCS1 146 # define RSA_F_FIPS_RSA_BUILTIN_KEYGEN 206 # define RSA_F_INT_RSA_VERIFY 145 # define RSA_F_OLD_RSA_PRIV_DECODE 147 # define RSA_F_PKEY_PSS_INIT 165 # define RSA_F_PKEY_RSA_CTRL 143 # define RSA_F_PKEY_RSA_CTRL_STR 144 # define RSA_F_PKEY_RSA_SIGN 142 # define RSA_F_PKEY_RSA_VERIFY 149 # define RSA_F_PKEY_RSA_VERIFYRECOVER 141 # define RSA_F_RSA_ALGOR_TO_MD 156 # define RSA_F_RSA_BUILTIN_KEYGEN 129 # define RSA_F_RSA_CHECK_KEY 123 # define RSA_F_RSA_CHECK_KEY_EX 160 # define RSA_F_RSA_CMS_DECRYPT 159 # define RSA_F_RSA_CMS_VERIFY 158 # define RSA_F_RSA_GENERATE_KEY_EX 204 # define RSA_F_RSA_GENERATE_MULTI_PRIME_KEY 207 # define RSA_F_RSA_ITEM_VERIFY 148 # define RSA_F_RSA_METH_DUP 161 # define RSA_F_RSA_METH_NEW 162 # define RSA_F_RSA_METH_SET1_NAME 163 # define RSA_F_RSA_MGF1_TO_MD 157 # define RSA_F_RSA_MULTIP_INFO_NEW 166 # define RSA_F_RSA_NEW_METHOD 106 # define RSA_F_RSA_NULL 124 # define RSA_F_RSA_NULL_PRIVATE_DECRYPT 132 # define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 133 # define RSA_F_RSA_NULL_PUBLIC_DECRYPT 134 # define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 135 # define RSA_F_RSA_OSSL_PRIVATE_DECRYPT 101 # define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT 102 # define RSA_F_RSA_OSSL_PUBLIC_DECRYPT 103 # define RSA_F_RSA_OSSL_PUBLIC_ENCRYPT 104 # define RSA_F_RSA_PADDING_ADD_NONE 107 # define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 121 # define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1 154 # define RSA_F_RSA_PADDING_ADD_PKCS1_PSS 125 # define RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1 152 # define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 108 # define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 109 # define RSA_F_RSA_PADDING_ADD_SSLV23 110 # define RSA_F_RSA_PADDING_ADD_X931 127 # define RSA_F_RSA_PADDING_CHECK_NONE 111 # define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP 122 # define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP_MGF1 153 # define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 112 # define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 113 # define RSA_F_RSA_PADDING_CHECK_SSLV23 114 # define RSA_F_RSA_PADDING_CHECK_X931 128 # define RSA_F_RSA_PARAM_DECODE 164 # define RSA_F_RSA_PRINT 115 # define RSA_F_RSA_PRINT_FP 116 # define RSA_F_RSA_PRIV_DECODE 150 # define RSA_F_RSA_PRIV_ENCODE 138 # define RSA_F_RSA_PRIVATE_DECRYPT 200 # define RSA_F_RSA_PRIVATE_ENCRYPT 201 # define RSA_F_RSA_PSS_GET_PARAM 151 # define RSA_F_RSA_PSS_TO_CTX 155 # define RSA_F_RSA_PUB_DECODE 139 # define RSA_F_RSA_PUBLIC_DECRYPT 202 # define RSA_F_RSA_PUBLIC_ENCRYPT 203 # define RSA_F_RSA_SETUP_BLINDING 136 # define RSA_F_RSA_SET_DEFAULT_METHOD 205 # define RSA_F_RSA_SET_METHOD 204 # define RSA_F_RSA_SIGN 117 # define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118 # define RSA_F_RSA_VERIFY 119 # define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120 # define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 126 # define RSA_F_SETUP_TBUF 167 /* * RSA reason codes. */ # define RSA_R_ALGORITHM_MISMATCH 100 # define RSA_R_BAD_E_VALUE 101 # define RSA_R_BAD_FIXED_HEADER_DECRYPT 102 # define RSA_R_BAD_PAD_BYTE_COUNT 103 # define RSA_R_BAD_SIGNATURE 104 # define RSA_R_BLOCK_TYPE_IS_NOT_01 106 # define RSA_R_BLOCK_TYPE_IS_NOT_02 107 # define RSA_R_DATA_GREATER_THAN_MOD_LEN 108 # define RSA_R_DATA_TOO_LARGE 109 # define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110 # define RSA_R_DATA_TOO_LARGE_FOR_MODULUS 132 # define RSA_R_DATA_TOO_SMALL 111 # define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122 # define RSA_R_DIGEST_DOES_NOT_MATCH 158 # define RSA_R_DIGEST_NOT_ALLOWED 145 # define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112 # define RSA_R_DMP1_NOT_CONGRUENT_TO_D 124 # define RSA_R_DMQ1_NOT_CONGRUENT_TO_D 125 # define RSA_R_D_E_NOT_CONGRUENT_TO_1 123 # define RSA_R_FIRST_OCTET_INVALID 133 # define RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE 144 # define RSA_R_INVALID_DIGEST 157 # define RSA_R_INVALID_DIGEST_LENGTH 143 # define RSA_R_INVALID_HEADER 137 # define RSA_R_INVALID_LABEL 160 # define RSA_R_INVALID_MESSAGE_LENGTH 131 # define RSA_R_INVALID_MGF1_MD 156 # define RSA_R_INVALID_MULTI_PRIME_KEY 167 # define RSA_R_INVALID_OAEP_PARAMETERS 161 # define RSA_R_INVALID_PADDING 138 # define RSA_R_INVALID_PADDING_MODE 141 # define RSA_R_INVALID_PSS_PARAMETERS 149 # define RSA_R_INVALID_PSS_SALTLEN 146 # define RSA_R_INVALID_SALT_LENGTH 150 # define RSA_R_INVALID_TRAILER 139 # define RSA_R_INVALID_X931_DIGEST 142 # define RSA_R_IQMP_NOT_INVERSE_OF_Q 126 # define RSA_R_KEY_PRIME_NUM_INVALID 165 # define RSA_R_KEY_SIZE_TOO_SMALL 120 # define RSA_R_LAST_OCTET_INVALID 134 # define RSA_R_MISSING_PRIVATE_KEY 179 # define RSA_R_MGF1_DIGEST_NOT_ALLOWED 152 # define RSA_R_MODULUS_TOO_LARGE 105 # define RSA_R_MP_COEFFICIENT_NOT_INVERSE_OF_R 168 # define RSA_R_MP_EXPONENT_NOT_CONGRUENT_TO_D 169 # define RSA_R_MP_R_NOT_PRIME 170 # define RSA_R_NO_PUBLIC_EXPONENT 140 # define RSA_R_NON_FIPS_RSA_METHOD 200 # define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 # define RSA_R_N_DOES_NOT_EQUAL_PRODUCT_OF_PRIMES 172 # define RSA_R_N_DOES_NOT_EQUAL_P_Q 127 # define RSA_R_OAEP_DECODING_ERROR 121 # define RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE 201 # define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 148 # define RSA_R_PADDING_CHECK_FAILED 114 # define RSA_R_PKCS_DECODING_ERROR 159 # define RSA_R_PSS_SALTLEN_TOO_SMALL 164 # define RSA_R_P_NOT_PRIME 128 # define RSA_R_Q_NOT_PRIME 129 # define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130 # define RSA_R_SLEN_CHECK_FAILED 136 # define RSA_R_SLEN_RECOVERY_FAILED 135 # define RSA_R_SSLV3_ROLLBACK_ATTACK 115 # define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116 # define RSA_R_UNKNOWN_ALGORITHM_TYPE 117 # define RSA_R_UNKNOWN_DIGEST 166 # define RSA_R_UNKNOWN_MASK_DIGEST 151 # define RSA_R_UNKNOWN_PADDING_TYPE 118 # define RSA_R_UNSUPPORTED_ENCRYPTION_TYPE 162 # define RSA_R_UNSUPPORTED_LABEL_SOURCE 163 # define RSA_R_UNSUPPORTED_MASK_ALGORITHM 153 # define RSA_R_UNSUPPORTED_MASK_PARAMETER 154 # define RSA_R_UNSUPPORTED_PARAMETERS 202 # define RSA_R_UNSUPPORTED_SIGNATURE_TYPE 155 # define RSA_R_VALUE_MISSING 147 # define RSA_R_WRONG_SIGNATURE_LENGTH 119 #endif PKZ^ ^ openssl/async.hnu[/* * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #include #ifndef HEADER_ASYNC_H # define HEADER_ASYNC_H #if defined(_WIN32) # if defined(BASETYPES) || defined(_WINDEF_H) /* application has to include to use this */ #define OSSL_ASYNC_FD HANDLE #define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE # endif #else #define OSSL_ASYNC_FD int #define OSSL_BAD_ASYNC_FD -1 #endif # include # ifdef __cplusplus extern "C" { # endif typedef struct async_job_st ASYNC_JOB; typedef struct async_wait_ctx_st ASYNC_WAIT_CTX; #define ASYNC_ERR 0 #define ASYNC_NO_JOBS 1 #define ASYNC_PAUSE 2 #define ASYNC_FINISH 3 int ASYNC_init_thread(size_t max_size, size_t init_size); void ASYNC_cleanup_thread(void); #ifdef OSSL_ASYNC_FD ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void); void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx); int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key, OSSL_ASYNC_FD fd, void *custom_data, void (*cleanup)(ASYNC_WAIT_CTX *, const void *, OSSL_ASYNC_FD, void *)); int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key, OSSL_ASYNC_FD *fd, void **custom_data); int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, size_t *numfds); int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd, size_t *numaddfds, OSSL_ASYNC_FD *delfd, size_t *numdelfds); int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key); #endif int ASYNC_is_capable(void); int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret, int (*func)(void *), void *args, size_t size); int ASYNC_pause_job(void); ASYNC_JOB *ASYNC_get_current_job(void); ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job); void ASYNC_block_pause(void); void ASYNC_unblock_pause(void); # ifdef __cplusplus } # endif #endif PKZ#dopenssl/fips_rand.hnu[/* ==================================================================== * Copyright (c) 2003 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.openssl.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef HEADER_FIPS_RAND_H # define HEADER_FIPS_RAND_H # include # include # include # include # ifdef OPENSSL_FIPS # ifdef __cplusplus extern "C" { # endif /* * IMPORTANT NOTE: * All functions in this header file are deprecated and should not be used * as they use the old FIPS_drbg implementation that is not FIPS validated * anymore. * To provide backwards compatibility for applications that need FIPS compliant * RNG number generation and use FIPS_drbg_generate, this function was * re-wired to call the FIPS validated DRBG instance instead through * the RAND_bytes() call. * * All these functions will be removed in future. */ typedef struct drbg_ctx_st DRBG_CTX; /* DRBG external flags */ /* Flag for CTR mode only: use derivation function ctr_df */ # define DRBG_FLAG_CTR_USE_DF 0x1 /* PRNG is in test state */ # define DRBG_FLAG_TEST 0x2 DRBG_CTX *FIPS_drbg_new(int type, unsigned int flags); int FIPS_drbg_init(DRBG_CTX *dctx, int type, unsigned int flags); int FIPS_drbg_instantiate(DRBG_CTX *dctx, const unsigned char *pers, size_t perslen); int FIPS_drbg_reseed(DRBG_CTX *dctx, const unsigned char *adin, size_t adinlen); int FIPS_drbg_generate(DRBG_CTX *dctx, unsigned char *out, size_t outlen, int prediction_resistance, const unsigned char *adin, size_t adinlen); int FIPS_drbg_uninstantiate(DRBG_CTX *dctx); void FIPS_drbg_free(DRBG_CTX *dctx); int FIPS_drbg_set_callbacks(DRBG_CTX *dctx, size_t (*get_entropy) (DRBG_CTX *ctx, unsigned char **pout, int entropy, size_t min_len, size_t max_len), void (*cleanup_entropy) (DRBG_CTX *ctx, unsigned char *out, size_t olen), size_t entropy_blocklen, size_t (*get_nonce) (DRBG_CTX *ctx, unsigned char **pout, int entropy, size_t min_len, size_t max_len), void (*cleanup_nonce) (DRBG_CTX *ctx, unsigned char *out, size_t olen)); int FIPS_drbg_set_rand_callbacks(DRBG_CTX *dctx, size_t (*get_adin) (DRBG_CTX *ctx, unsigned char **pout), void (*cleanup_adin) (DRBG_CTX *ctx, unsigned char *out, size_t olen), int (*rand_seed_cb) (DRBG_CTX *ctx, const void *buf, int num), int (*rand_add_cb) (DRBG_CTX *ctx, const void *buf, int num, double entropy)); void *FIPS_drbg_get_app_data(DRBG_CTX *ctx); void FIPS_drbg_set_app_data(DRBG_CTX *ctx, void *app_data); size_t FIPS_drbg_get_blocklength(DRBG_CTX *dctx); int FIPS_drbg_get_strength(DRBG_CTX *dctx); void FIPS_drbg_set_check_interval(DRBG_CTX *dctx, int interval); void FIPS_drbg_set_reseed_interval(DRBG_CTX *dctx, int interval); int FIPS_drbg_health_check(DRBG_CTX *dctx); DRBG_CTX *FIPS_get_default_drbg(void); const RAND_METHOD *FIPS_drbg_method(void); int FIPS_rand_set_method(const RAND_METHOD *meth); const RAND_METHOD *FIPS_rand_get_method(void); void FIPS_rand_set_bits(int nbits); int FIPS_rand_strength(void); /* 1.0.0 compat functions */ int FIPS_rand_seed(const void *buf, int num); int FIPS_rand_bytes(unsigned char *out, int outlen); void FIPS_rand_reset(void); int FIPS_rand_status(void); # ifdef __cplusplus } # endif # endif #endif PKZ  openssl/aes.hnu[/* * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_AES_H # define HEADER_AES_H # include # include # ifdef __cplusplus extern "C" { # endif # define AES_ENCRYPT 1 # define AES_DECRYPT 0 /* * Because array size can't be a const in C, the following two are macros. * Both sizes are in bytes. */ # define AES_MAXNR 14 # define AES_BLOCK_SIZE 16 /* This should be a hidden type, but EVP requires that the size be known */ struct aes_key_st { # ifdef AES_LONG unsigned long rd_key[4 * (AES_MAXNR + 1)]; # else unsigned int rd_key[4 * (AES_MAXNR + 1)]; # endif int rounds; }; typedef struct aes_key_st AES_KEY; const char *AES_options(void); int AES_set_encrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key); int AES_set_decrypt_key(const unsigned char *userKey, const int bits, AES_KEY *key); void AES_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key); void AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key); void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key, const int enc); void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, const int enc); void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc); void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc); void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc); void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num); /* NB: the IV is _two_ blocks long */ void AES_ige_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, const int enc); /* NB: the IV is _four_ blocks long */ void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, const AES_KEY *key2, const unsigned char *ivec, const int enc); int AES_wrap_key(AES_KEY *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, unsigned int inlen); int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, unsigned int inlen); # ifdef __cplusplus } # endif #endif PKZJ-copenssl/ebcdic.hnu[/* * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_EBCDIC_H # define HEADER_EBCDIC_H # include #ifdef __cplusplus extern "C" { #endif /* Avoid name clashes with other applications */ # define os_toascii _openssl_os_toascii # define os_toebcdic _openssl_os_toebcdic # define ebcdic2ascii _openssl_ebcdic2ascii # define ascii2ebcdic _openssl_ascii2ebcdic extern const unsigned char os_toascii[256]; extern const unsigned char os_toebcdic[256]; void *ebcdic2ascii(void *dest, const void *srce, size_t count); void *ascii2ebcdic(void *dest, const void *srce, size_t count); #ifdef __cplusplus } #endif #endif PKZkrP openssl/rc2.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RC2_H # define HEADER_RC2_H # include # ifndef OPENSSL_NO_RC2 # ifdef __cplusplus extern "C" { # endif typedef unsigned int RC2_INT; # define RC2_ENCRYPT 1 # define RC2_DECRYPT 0 # define RC2_BLOCK 8 # define RC2_KEY_LENGTH 16 typedef struct rc2_key_st { RC2_INT data[64]; } RC2_KEY; void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits); void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, RC2_KEY *key, int enc); void RC2_encrypt(unsigned long *data, RC2_KEY *key); void RC2_decrypt(unsigned long *data, RC2_KEY *key); void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, RC2_KEY *ks, unsigned char *iv, int enc); void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, RC2_KEY *schedule, unsigned char *ivec, int *num, int enc); void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, RC2_KEY *schedule, unsigned char *ivec, int *num); # ifdef __cplusplus } # endif # endif #endif PKZropenssl/bioerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_BIOERR_H # define HEADER_BIOERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_BIO_strings(void); /* * BIO function codes. */ # define BIO_F_ACPT_STATE 100 # define BIO_F_ADDRINFO_WRAP 148 # define BIO_F_ADDR_STRINGS 134 # define BIO_F_BIO_ACCEPT 101 # define BIO_F_BIO_ACCEPT_EX 137 # define BIO_F_BIO_ACCEPT_NEW 152 # define BIO_F_BIO_ADDR_NEW 144 # define BIO_F_BIO_BIND 147 # define BIO_F_BIO_CALLBACK_CTRL 131 # define BIO_F_BIO_CONNECT 138 # define BIO_F_BIO_CONNECT_NEW 153 # define BIO_F_BIO_CTRL 103 # define BIO_F_BIO_GETS 104 # define BIO_F_BIO_GET_HOST_IP 106 # define BIO_F_BIO_GET_NEW_INDEX 102 # define BIO_F_BIO_GET_PORT 107 # define BIO_F_BIO_LISTEN 139 # define BIO_F_BIO_LOOKUP 135 # define BIO_F_BIO_LOOKUP_EX 143 # define BIO_F_BIO_MAKE_PAIR 121 # define BIO_F_BIO_METH_NEW 146 # define BIO_F_BIO_NEW 108 # define BIO_F_BIO_NEW_DGRAM_SCTP 145 # define BIO_F_BIO_NEW_FILE 109 # define BIO_F_BIO_NEW_MEM_BUF 126 # define BIO_F_BIO_NREAD 123 # define BIO_F_BIO_NREAD0 124 # define BIO_F_BIO_NWRITE 125 # define BIO_F_BIO_NWRITE0 122 # define BIO_F_BIO_PARSE_HOSTSERV 136 # define BIO_F_BIO_PUTS 110 # define BIO_F_BIO_READ 111 # define BIO_F_BIO_READ_EX 105 # define BIO_F_BIO_READ_INTERN 120 # define BIO_F_BIO_SOCKET 140 # define BIO_F_BIO_SOCKET_NBIO 142 # define BIO_F_BIO_SOCK_INFO 141 # define BIO_F_BIO_SOCK_INIT 112 # define BIO_F_BIO_WRITE 113 # define BIO_F_BIO_WRITE_EX 119 # define BIO_F_BIO_WRITE_INTERN 128 # define BIO_F_BUFFER_CTRL 114 # define BIO_F_CONN_CTRL 127 # define BIO_F_CONN_STATE 115 # define BIO_F_DGRAM_SCTP_NEW 149 # define BIO_F_DGRAM_SCTP_READ 132 # define BIO_F_DGRAM_SCTP_WRITE 133 # define BIO_F_DOAPR_OUTCH 150 # define BIO_F_FILE_CTRL 116 # define BIO_F_FILE_READ 130 # define BIO_F_LINEBUFFER_CTRL 129 # define BIO_F_LINEBUFFER_NEW 151 # define BIO_F_MEM_WRITE 117 # define BIO_F_NBIOF_NEW 154 # define BIO_F_SLG_WRITE 155 # define BIO_F_SSL_NEW 118 /* * BIO reason codes. */ # define BIO_R_ACCEPT_ERROR 100 # define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141 # define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129 # define BIO_R_BAD_FOPEN_MODE 101 # define BIO_R_BROKEN_PIPE 124 # define BIO_R_CONNECT_ERROR 103 # define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 # define BIO_R_GETSOCKNAME_ERROR 132 # define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133 # define BIO_R_GETTING_SOCKTYPE 134 # define BIO_R_INVALID_ARGUMENT 125 # define BIO_R_INVALID_SOCKET 135 # define BIO_R_IN_USE 123 # define BIO_R_LENGTH_TOO_LONG 102 # define BIO_R_LISTEN_V6_ONLY 136 # define BIO_R_LOOKUP_RETURNED_NOTHING 142 # define BIO_R_MALFORMED_HOST_OR_SERVICE 130 # define BIO_R_NBIO_CONNECT_ERROR 110 # define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143 # define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144 # define BIO_R_NO_PORT_DEFINED 113 # define BIO_R_NO_SUCH_FILE 128 # define BIO_R_NULL_PARAMETER 115 # define BIO_R_UNABLE_TO_BIND_SOCKET 117 # define BIO_R_UNABLE_TO_CREATE_SOCKET 118 # define BIO_R_UNABLE_TO_KEEPALIVE 137 # define BIO_R_UNABLE_TO_LISTEN_SOCKET 119 # define BIO_R_UNABLE_TO_NODELAY 138 # define BIO_R_UNABLE_TO_REUSEADDR 139 # define BIO_R_UNAVAILABLE_IP_FAMILY 145 # define BIO_R_UNINITIALIZED 120 # define BIO_R_UNKNOWN_INFO_TYPE 140 # define BIO_R_UNSUPPORTED_IP_FAMILY 146 # define BIO_R_UNSUPPORTED_METHOD 121 # define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131 # define BIO_R_WRITE_TO_READ_ONLY_BIO 126 # define BIO_R_WSASTARTUP 122 #endif PKZE((openssl/cmac.hnu[/* * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CMAC_H # define HEADER_CMAC_H # ifndef OPENSSL_NO_CMAC #ifdef __cplusplus extern "C" { #endif # include /* Opaque */ typedef struct CMAC_CTX_st CMAC_CTX; CMAC_CTX *CMAC_CTX_new(void); void CMAC_CTX_cleanup(CMAC_CTX *ctx); void CMAC_CTX_free(CMAC_CTX *ctx); EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, const EVP_CIPHER *cipher, ENGINE *impl); int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); int CMAC_resume(CMAC_CTX *ctx); #ifdef __cplusplus } #endif # endif #endif PKZ openssl/seed.hnu[/* * Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ /* * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Neither the name of author nor the names of its contributors may * be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef HEADER_SEED_H # define HEADER_SEED_H # include # ifndef OPENSSL_NO_SEED # include # include #ifdef __cplusplus extern "C" { #endif /* look whether we need 'long' to get 32 bits */ # ifdef AES_LONG # ifndef SEED_LONG # define SEED_LONG 1 # endif # endif # include # define SEED_BLOCK_SIZE 16 # define SEED_KEY_LENGTH 16 typedef struct seed_key_st { # ifdef SEED_LONG unsigned long data[32]; # else unsigned int data[32]; # endif } SEED_KEY_SCHEDULE; void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks); void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], unsigned char d[SEED_BLOCK_SIZE], const SEED_KEY_SCHEDULE *ks); void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE], unsigned char d[SEED_BLOCK_SIZE], const SEED_KEY_SCHEDULE *ks); void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out, const SEED_KEY_SCHEDULE *ks, int enc); void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, const SEED_KEY_SCHEDULE *ks, unsigned char ivec[SEED_BLOCK_SIZE], int enc); void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const SEED_KEY_SCHEDULE *ks, unsigned char ivec[SEED_BLOCK_SIZE], int *num, int enc); void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const SEED_KEY_SCHEDULE *ks, unsigned char ivec[SEED_BLOCK_SIZE], int *num); # ifdef __cplusplus } # endif # endif #endif PKZRsVAAopenssl/ecerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ECERR_H # define HEADER_ECERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_EC # ifdef __cplusplus extern "C" # endif int ERR_load_EC_strings(void); /* * EC function codes. */ # define EC_F_BN_TO_FELEM 224 # define EC_F_D2I_ECPARAMETERS 144 # define EC_F_D2I_ECPKPARAMETERS 145 # define EC_F_D2I_ECPRIVATEKEY 146 # define EC_F_DO_EC_KEY_PRINT 221 # define EC_F_ECDH_CMS_DECRYPT 238 # define EC_F_ECDH_CMS_SET_SHARED_INFO 239 # define EC_F_ECDH_COMPUTE_KEY 246 # define EC_F_ECDH_SIMPLE_COMPUTE_KEY 257 # define EC_F_ECDSA_DO_SIGN_EX 251 # define EC_F_ECDSA_DO_VERIFY 252 # define EC_F_ECDSA_SIGN_EX 254 # define EC_F_ECDSA_SIGN_SETUP 248 # define EC_F_ECDSA_SIG_NEW 265 # define EC_F_ECDSA_VERIFY 253 # define EC_F_ECDSA_SIMPLE_SIGN_SETUP 310 # define EC_F_ECDSA_SIMPLE_SIGN_SIG 311 # define EC_F_ECDSA_SIMPLE_VERIFY_SIG 312 # define EC_F_ECDSA_S390X_NISTP_SIGN_SIG 313 # define EC_F_ECDSA_S390X_NISTP_VERIFY_SIG 314 # define EC_F_ECD_ITEM_VERIFY 270 # define EC_F_ECKEY_PARAM2TYPE 223 # define EC_F_ECKEY_PARAM_DECODE 212 # define EC_F_ECKEY_PRIV_DECODE 213 # define EC_F_ECKEY_PRIV_ENCODE 214 # define EC_F_ECKEY_PUB_DECODE 215 # define EC_F_ECKEY_PUB_ENCODE 216 # define EC_F_ECKEY_TYPE2PARAM 220 # define EC_F_ECPARAMETERS_PRINT 147 # define EC_F_ECPARAMETERS_PRINT_FP 148 # define EC_F_ECPKPARAMETERS_PRINT 149 # define EC_F_ECPKPARAMETERS_PRINT_FP 150 # define EC_F_ECP_NISTZ256_GET_AFFINE 240 # define EC_F_ECP_NISTZ256_INV_MOD_ORD 275 # define EC_F_ECP_NISTZ256_MULT_PRECOMPUTE 243 # define EC_F_ECP_NISTZ256_POINTS_MUL 241 # define EC_F_ECP_NISTZ256_PRE_COMP_NEW 244 # define EC_F_ECP_NISTZ256_WINDOWED_MUL 242 # define EC_F_ECX_KEY_OP 266 # define EC_F_ECX_PRIV_ENCODE 267 # define EC_F_ECX_PUB_ENCODE 268 # define EC_F_EC_ASN1_GROUP2CURVE 153 # define EC_F_EC_ASN1_GROUP2FIELDID 154 # define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY 208 # define EC_F_EC_GF2M_SIMPLE_FIELD_INV 296 # define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 159 # define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE 195 # define EC_F_EC_GF2M_SIMPLE_LADDER_POST 285 # define EC_F_EC_GF2M_SIMPLE_LADDER_PRE 288 # define EC_F_EC_GF2M_SIMPLE_OCT2POINT 160 # define EC_F_EC_GF2M_SIMPLE_POINT2OCT 161 # define EC_F_EC_GF2M_SIMPLE_POINTS_MUL 289 # define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162 # define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163 # define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 164 # define EC_F_EC_GFP_MONT_FIELD_DECODE 133 # define EC_F_EC_GFP_MONT_FIELD_ENCODE 134 # define EC_F_EC_GFP_MONT_FIELD_INV 297 # define EC_F_EC_GFP_MONT_FIELD_MUL 131 # define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE 209 # define EC_F_EC_GFP_MONT_FIELD_SQR 132 # define EC_F_EC_GFP_MONT_GROUP_SET_CURVE 189 # define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE 225 # define EC_F_EC_GFP_NISTP224_POINTS_MUL 228 # define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 226 # define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE 230 # define EC_F_EC_GFP_NISTP256_POINTS_MUL 231 # define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 232 # define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE 233 # define EC_F_EC_GFP_NISTP521_POINTS_MUL 234 # define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 235 # define EC_F_EC_GFP_NIST_FIELD_MUL 200 # define EC_F_EC_GFP_NIST_FIELD_SQR 201 # define EC_F_EC_GFP_NIST_GROUP_SET_CURVE 202 # define EC_F_EC_GFP_SIMPLE_BLIND_COORDINATES 287 # define EC_F_EC_GFP_SIMPLE_FIELD_INV 298 # define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 165 # define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 166 # define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102 # define EC_F_EC_GFP_SIMPLE_OCT2POINT 103 # define EC_F_EC_GFP_SIMPLE_POINT2OCT 104 # define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137 # define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 167 # define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 168 # define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 169 # define EC_F_EC_GROUP_CHECK 170 # define EC_F_EC_GROUP_CHECK_DISCRIMINANT 171 # define EC_F_EC_GROUP_COPY 106 # define EC_F_EC_GROUP_GET_CURVE 291 # define EC_F_EC_GROUP_GET_CURVE_GF2M 172 # define EC_F_EC_GROUP_GET_CURVE_GFP 130 # define EC_F_EC_GROUP_GET_DEGREE 173 # define EC_F_EC_GROUP_GET_ECPARAMETERS 261 # define EC_F_EC_GROUP_GET_ECPKPARAMETERS 262 # define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS 193 # define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194 # define EC_F_EC_GROUP_NEW 108 # define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 174 # define EC_F_EC_GROUP_NEW_FROM_DATA 175 # define EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS 263 # define EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS 264 # define EC_F_EC_GROUP_SET_CURVE 292 # define EC_F_EC_GROUP_SET_CURVE_GF2M 176 # define EC_F_EC_GROUP_SET_CURVE_GFP 109 # define EC_F_EC_GROUP_SET_GENERATOR 111 # define EC_F_EC_GROUP_SET_SEED 286 # define EC_F_EC_KEY_CHECK_KEY 177 # define EC_F_EC_KEY_COPY 178 # define EC_F_EC_KEY_GENERATE_KEY 179 # define EC_F_EC_KEY_NEW 182 # define EC_F_EC_KEY_NEW_METHOD 245 # define EC_F_EC_KEY_OCT2PRIV 255 # define EC_F_EC_KEY_PRINT 180 # define EC_F_EC_KEY_PRINT_FP 181 # define EC_F_EC_KEY_PRIV2BUF 279 # define EC_F_EC_KEY_PRIV2OCT 256 # define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229 # define EC_F_EC_KEY_SIMPLE_CHECK_KEY 258 # define EC_F_EC_KEY_SIMPLE_OCT2PRIV 259 # define EC_F_EC_KEY_SIMPLE_PRIV2OCT 260 # define EC_F_EC_PKEY_CHECK 273 # define EC_F_EC_PKEY_PARAM_CHECK 274 # define EC_F_EC_POINTS_MAKE_AFFINE 136 # define EC_F_EC_POINTS_MUL 290 # define EC_F_EC_POINT_ADD 112 # define EC_F_EC_POINT_BN2POINT 280 # define EC_F_EC_POINT_CMP 113 # define EC_F_EC_POINT_COPY 114 # define EC_F_EC_POINT_DBL 115 # define EC_F_EC_POINT_GET_AFFINE_COORDINATES 293 # define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 183 # define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116 # define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117 # define EC_F_EC_POINT_INVERT 210 # define EC_F_EC_POINT_IS_AT_INFINITY 118 # define EC_F_EC_POINT_IS_ON_CURVE 119 # define EC_F_EC_POINT_MAKE_AFFINE 120 # define EC_F_EC_POINT_NEW 121 # define EC_F_EC_POINT_OCT2POINT 122 # define EC_F_EC_POINT_POINT2BUF 281 # define EC_F_EC_POINT_POINT2OCT 123 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES 294 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 # define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES 295 # define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 186 # define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125 # define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126 # define EC_F_EC_POINT_SET_TO_INFINITY 127 # define EC_F_EC_PRE_COMP_NEW 196 # define EC_F_EC_SCALAR_MUL_LADDER 284 # define EC_F_EC_WNAF_MUL 187 # define EC_F_EC_WNAF_PRECOMPUTE_MULT 188 # define EC_F_I2D_ECPARAMETERS 190 # define EC_F_I2D_ECPKPARAMETERS 191 # define EC_F_I2D_ECPRIVATEKEY 192 # define EC_F_I2O_ECPUBLICKEY 151 # define EC_F_NISTP224_PRE_COMP_NEW 227 # define EC_F_NISTP256_PRE_COMP_NEW 236 # define EC_F_NISTP521_PRE_COMP_NEW 237 # define EC_F_O2I_ECPUBLICKEY 152 # define EC_F_OLD_EC_PRIV_DECODE 222 # define EC_F_OSSL_ECDH_COMPUTE_KEY 247 # define EC_F_OSSL_ECDSA_SIGN_SETUP 300 # define EC_F_OSSL_ECDSA_SIGN_SIG 249 # define EC_F_OSSL_ECDSA_VERIFY_SIG 250 # define EC_F_PKEY_ECD_CTRL 271 # define EC_F_PKEY_ECD_DIGESTSIGN 272 # define EC_F_PKEY_ECD_DIGESTSIGN25519 276 # define EC_F_PKEY_ECD_DIGESTSIGN448 277 # define EC_F_PKEY_ECX_DERIVE 269 # define EC_F_PKEY_EC_CTRL 197 # define EC_F_PKEY_EC_CTRL_STR 198 # define EC_F_PKEY_EC_DERIVE 217 # define EC_F_PKEY_EC_INIT 282 # define EC_F_PKEY_EC_KDF_DERIVE 283 # define EC_F_PKEY_EC_KEYGEN 199 # define EC_F_PKEY_EC_PARAMGEN 219 # define EC_F_PKEY_EC_SIGN 218 # define EC_F_S390X_PKEY_ECD_DIGESTSIGN25519 320 # define EC_F_S390X_PKEY_ECD_DIGESTSIGN448 321 # define EC_F_S390X_PKEY_ECD_KEYGEN25519 322 # define EC_F_S390X_PKEY_ECD_KEYGEN448 323 # define EC_F_S390X_PKEY_ECX_KEYGEN25519 324 # define EC_F_S390X_PKEY_ECX_KEYGEN448 325 # define EC_F_VALIDATE_ECX_DERIVE 278 /* * EC reason codes. */ # define EC_R_ASN1_ERROR 115 # define EC_R_BAD_SIGNATURE 156 # define EC_R_BIGNUM_OUT_OF_RANGE 144 # define EC_R_BUFFER_TOO_SMALL 100 # define EC_R_CANNOT_INVERT 165 # define EC_R_COORDINATES_OUT_OF_RANGE 146 # define EC_R_CURVE_DOES_NOT_SUPPORT_ECDH 160 # define EC_R_CURVE_DOES_NOT_SUPPORT_ECDSA 170 # define EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING 159 # define EC_R_D2I_ECPKPARAMETERS_FAILURE 117 # define EC_R_DECODE_ERROR 142 # define EC_R_DISCRIMINANT_IS_ZERO 118 # define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 119 # define EC_R_FIELD_TOO_LARGE 143 # define EC_R_GF2M_NOT_SUPPORTED 147 # define EC_R_GROUP2PKPARAMETERS_FAILURE 120 # define EC_R_I2D_ECPKPARAMETERS_FAILURE 121 # define EC_R_INCOMPATIBLE_OBJECTS 101 # define EC_R_INVALID_ARGUMENT 112 # define EC_R_INVALID_COMPRESSED_POINT 110 # define EC_R_INVALID_COMPRESSION_BIT 109 # define EC_R_INVALID_CURVE 141 # define EC_R_INVALID_DIGEST 151 # define EC_R_INVALID_DIGEST_TYPE 138 # define EC_R_INVALID_ENCODING 102 # define EC_R_INVALID_FIELD 103 # define EC_R_INVALID_FORM 104 # define EC_R_INVALID_GROUP_ORDER 122 # define EC_R_INVALID_KEY 116 # define EC_R_INVALID_OUTPUT_LENGTH 161 # define EC_R_INVALID_PEER_KEY 133 # define EC_R_INVALID_PENTANOMIAL_BASIS 132 # define EC_R_INVALID_PRIVATE_KEY 123 # define EC_R_INVALID_TRINOMIAL_BASIS 137 # define EC_R_KDF_PARAMETER_ERROR 148 # define EC_R_KEYS_NOT_SET 140 # define EC_R_LADDER_POST_FAILURE 136 # define EC_R_LADDER_PRE_FAILURE 153 # define EC_R_LADDER_STEP_FAILURE 162 # define EC_R_MISSING_OID 167 # define EC_R_MISSING_PARAMETERS 124 # define EC_R_MISSING_PRIVATE_KEY 125 # define EC_R_NEED_NEW_SETUP_VALUES 157 # define EC_R_NOT_A_NIST_PRIME 135 # define EC_R_NOT_IMPLEMENTED 126 # define EC_R_NOT_INITIALIZED 111 # define EC_R_NO_PARAMETERS_SET 139 # define EC_R_NO_PRIVATE_VALUE 154 # define EC_R_OPERATION_NOT_SUPPORTED 152 # define EC_R_PASSED_NULL_PARAMETER 134 # define EC_R_PEER_KEY_ERROR 149 # define EC_R_PKPARAMETERS2GROUP_FAILURE 127 # define EC_R_POINT_ARITHMETIC_FAILURE 155 # define EC_R_POINT_AT_INFINITY 106 # define EC_R_POINT_COORDINATES_BLIND_FAILURE 163 # define EC_R_POINT_IS_NOT_ON_CURVE 107 # define EC_R_RANDOM_NUMBER_GENERATION_FAILED 158 # define EC_R_SHARED_INFO_ERROR 150 # define EC_R_SLOT_FULL 108 # define EC_R_UNDEFINED_GENERATOR 113 # define EC_R_UNDEFINED_ORDER 128 # define EC_R_UNKNOWN_COFACTOR 164 # define EC_R_UNKNOWN_GROUP 129 # define EC_R_UNKNOWN_ORDER 114 # define EC_R_UNSUPPORTED_FIELD 131 # define EC_R_WRONG_CURVE_PARAMETERS 145 # define EC_R_WRONG_ORDER 130 # endif #endif PKZ^(#  openssl/dsaerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_DSAERR_H # define HEADER_DSAERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_DSA # ifdef __cplusplus extern "C" # endif int ERR_load_DSA_strings(void); /* * DSA function codes. */ # define DSA_F_DSAPARAMS_PRINT 100 # define DSA_F_DSAPARAMS_PRINT_FP 101 # define DSA_F_DSA_BUILTIN_KEYGEN 202 # define DSA_F_DSA_BUILTIN_PARAMGEN 125 # define DSA_F_DSA_BUILTIN_PARAMGEN2 126 # define DSA_F_DSA_GENERATE_KEY 201 # define DSA_F_DSA_GENERATE_PARAMETERS_EX 200 # define DSA_F_DSA_DO_SIGN 112 # define DSA_F_DSA_DO_VERIFY 113 # define DSA_F_DSA_METH_DUP 127 # define DSA_F_DSA_METH_NEW 128 # define DSA_F_DSA_METH_SET1_NAME 129 # define DSA_F_DSA_NEW_METHOD 103 # define DSA_F_DSA_PARAM_DECODE 119 # define DSA_F_DSA_PRINT_FP 105 # define DSA_F_DSA_PRIV_DECODE 115 # define DSA_F_DSA_PRIV_ENCODE 116 # define DSA_F_DSA_PUB_DECODE 117 # define DSA_F_DSA_PUB_ENCODE 118 # define DSA_F_DSA_SIGN 106 # define DSA_F_DSA_SIGN_SETUP 107 # define DSA_F_DSA_SIG_NEW 102 # define DSA_F_OLD_DSA_PRIV_DECODE 122 # define DSA_F_PKEY_DSA_CTRL 120 # define DSA_F_PKEY_DSA_CTRL_STR 104 # define DSA_F_PKEY_DSA_KEYGEN 121 /* * DSA reason codes. */ # define DSA_R_BAD_Q_VALUE 102 # define DSA_R_BN_DECODE_ERROR 108 # define DSA_R_BN_ERROR 109 # define DSA_R_DECODE_ERROR 104 # define DSA_R_INVALID_DIGEST_TYPE 106 # define DSA_R_INVALID_PARAMETERS 112 # define DSA_R_KEY_SIZE_INVALID 201 # define DSA_R_KEY_SIZE_TOO_SMALL 202 # define DSA_R_MISSING_PARAMETERS 101 # define DSA_R_MISSING_PRIVATE_KEY 111 # define DSA_R_MODULUS_TOO_LARGE 103 # define DSA_R_NO_PARAMETERS_SET 107 # define DSA_R_NON_FIPS_DSA_METHOD 200 # define DSA_R_PARAMETER_ENCODING_ERROR 105 # define DSA_R_Q_NOT_PRIME 113 # define DSA_R_SEED_LEN_SMALL 110 # endif #endif PKZJw'w' openssl/dsa.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_DSA_H # define HEADER_DSA_H # include # ifndef OPENSSL_NO_DSA # ifdef __cplusplus extern "C" { # endif # include # include # include # include # include # if OPENSSL_API_COMPAT < 0x10100000L # include # endif # include # ifndef OPENSSL_DSA_MAX_MODULUS_BITS # define OPENSSL_DSA_MAX_MODULUS_BITS 10000 # endif # define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024 # define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS_GEN 2048 # define DSA_FLAG_CACHE_MONT_P 0x01 # if OPENSSL_API_COMPAT < 0x10100000L /* * Does nothing. Previously this switched off constant time behaviour. */ # define DSA_FLAG_NO_EXP_CONSTTIME 0x00 # endif /* * If this flag is set the DSA method is FIPS compliant and can be used in * FIPS mode. This is set in the validated module method. If an application * sets this flag in its own methods it is its responsibility to ensure the * result is compliant. */ # define DSA_FLAG_FIPS_METHOD 0x0400 /* * If this flag is set the operations normally disabled in FIPS mode are * permitted it is then the applications responsibility to ensure that the * usage is compliant. */ # define DSA_FLAG_NON_FIPS_ALLOW 0x0400 # define DSA_FLAG_FIPS_CHECKED 0x0800 /* Already defined in ossl_typ.h */ /* typedef struct dsa_st DSA; */ /* typedef struct dsa_method DSA_METHOD; */ typedef struct DSA_SIG_st DSA_SIG; # define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \ (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x)) # define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \ (unsigned char *)(x)) # define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x) # define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x) DSA *DSAparams_dup(DSA *x); DSA_SIG *DSA_SIG_new(void); void DSA_SIG_free(DSA_SIG *a); int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp); DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length); void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); int DSA_do_verify(const unsigned char *dgst, int dgst_len, DSA_SIG *sig, DSA *dsa); const DSA_METHOD *DSA_OpenSSL(void); void DSA_set_default_method(const DSA_METHOD *); const DSA_METHOD *DSA_get_default_method(void); int DSA_set_method(DSA *dsa, const DSA_METHOD *); const DSA_METHOD *DSA_get_method(DSA *d); DSA *DSA_new(void); DSA *DSA_new_method(ENGINE *engine); void DSA_free(DSA *r); /* "up" the DSA object's reference count */ int DSA_up_ref(DSA *r); int DSA_size(const DSA *); int DSA_bits(const DSA *d); int DSA_security_bits(const DSA *d); /* next 4 return -1 on error */ DEPRECATEDIN_1_2_0(int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)) int DSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, unsigned int *siglen, DSA *dsa); int DSA_verify(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sigbuf, int siglen, DSA *dsa); #define DSA_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, l, p, newf, dupf, freef) int DSA_set_ex_data(DSA *d, int idx, void *arg); void *DSA_get_ex_data(DSA *d, int idx); DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length); DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length); DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length); /* Deprecated version */ DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits, unsigned char *seed, int seed_len, int *counter_ret, unsigned long *h_ret, void (*callback) (int, int, void *), void *cb_arg)) /* New version */ int DSA_generate_parameters_ex(DSA *dsa, int bits, const unsigned char *seed, int seed_len, int *counter_ret, unsigned long *h_ret, BN_GENCB *cb); int DSA_generate_key(DSA *a); int i2d_DSAPublicKey(const DSA *a, unsigned char **pp); int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp); int i2d_DSAparams(const DSA *a, unsigned char **pp); int DSAparams_print(BIO *bp, const DSA *x); int DSA_print(BIO *bp, const DSA *x, int off); # ifndef OPENSSL_NO_STDIO int DSAparams_print_fp(FILE *fp, const DSA *x); int DSA_print_fp(FILE *bp, const DSA *x, int off); # endif # define DSS_prime_checks 64 /* * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only * have one value here we set the number of checks to 64 which is the 128 bit * security level that is the highest level and valid for creating a 3072 bit * DSA key. */ # define DSA_is_prime(n, callback, cb_arg) \ BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg) # ifndef OPENSSL_NO_DH /* * Convert DSA structure (key or just parameters) into DH structure (be * careful to avoid small subgroup attacks when using this!) */ DH *DSA_dup_DH(const DSA *r); # endif # define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL) # define EVP_PKEY_CTX_set_dsa_paramgen_q_bits(ctx, qbits) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, qbits, NULL) # define EVP_PKEY_CTX_set_dsa_paramgen_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, (void *)(md)) # define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1) # define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) # define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); const BIGNUM *DSA_get0_p(const DSA *d); const BIGNUM *DSA_get0_q(const DSA *d); const BIGNUM *DSA_get0_g(const DSA *d); const BIGNUM *DSA_get0_pub_key(const DSA *d); const BIGNUM *DSA_get0_priv_key(const DSA *d); void DSA_clear_flags(DSA *d, int flags); int DSA_test_flags(const DSA *d, int flags); void DSA_set_flags(DSA *d, int flags); ENGINE *DSA_get0_engine(DSA *d); DSA_METHOD *DSA_meth_new(const char *name, int flags); void DSA_meth_free(DSA_METHOD *dsam); DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam); const char *DSA_meth_get0_name(const DSA_METHOD *dsam); int DSA_meth_set1_name(DSA_METHOD *dsam, const char *name); int DSA_meth_get_flags(const DSA_METHOD *dsam); int DSA_meth_set_flags(DSA_METHOD *dsam, int flags); void *DSA_meth_get0_app_data(const DSA_METHOD *dsam); int DSA_meth_set0_app_data(DSA_METHOD *dsam, void *app_data); DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam)) (const unsigned char *, int, DSA *); int DSA_meth_set_sign(DSA_METHOD *dsam, DSA_SIG *(*sign) (const unsigned char *, int, DSA *)); int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam)) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **); int DSA_meth_set_sign_setup(DSA_METHOD *dsam, int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **)); int (*DSA_meth_get_verify(const DSA_METHOD *dsam)) (const unsigned char *, int, DSA_SIG *, DSA *); int DSA_meth_set_verify(DSA_METHOD *dsam, int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *)); int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam)) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *); int DSA_meth_set_mod_exp(DSA_METHOD *dsam, int (*mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *)); int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam)) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *); int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam, int (*bn_mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *)); int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *); int DSA_meth_set_init(DSA_METHOD *dsam, int (*init)(DSA *)); int (*DSA_meth_get_finish(const DSA_METHOD *dsam)) (DSA *); int DSA_meth_set_finish(DSA_METHOD *dsam, int (*finish) (DSA *)); int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam)) (DSA *, int, const unsigned char *, int, int *, unsigned long *, BN_GENCB *); int DSA_meth_set_paramgen(DSA_METHOD *dsam, int (*paramgen) (DSA *, int, const unsigned char *, int, int *, unsigned long *, BN_GENCB *)); int (*DSA_meth_get_keygen(const DSA_METHOD *dsam)) (DSA *); int DSA_meth_set_keygen(DSA_METHOD *dsam, int (*keygen) (DSA *)); # ifdef __cplusplus } # endif # endif #endif PKZ1//openssl/storeerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OSSL_STOREERR_H # define HEADER_OSSL_STOREERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_OSSL_STORE_strings(void); /* * OSSL_STORE function codes. */ # define OSSL_STORE_F_FILE_CTRL 129 # define OSSL_STORE_F_FILE_FIND 138 # define OSSL_STORE_F_FILE_GET_PASS 118 # define OSSL_STORE_F_FILE_LOAD 119 # define OSSL_STORE_F_FILE_LOAD_TRY_DECODE 124 # define OSSL_STORE_F_FILE_NAME_TO_URI 126 # define OSSL_STORE_F_FILE_OPEN 120 # define OSSL_STORE_F_OSSL_STORE_ATTACH_PEM_BIO 127 # define OSSL_STORE_F_OSSL_STORE_EXPECT 130 # define OSSL_STORE_F_OSSL_STORE_FILE_ATTACH_PEM_BIO_INT 128 # define OSSL_STORE_F_OSSL_STORE_FIND 131 # define OSSL_STORE_F_OSSL_STORE_GET0_LOADER_INT 100 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CERT 101 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CRL 102 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME 103 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME_DESCRIPTION 135 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PARAMS 104 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PKEY 105 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CERT 106 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CRL 107 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_EMBEDDED 123 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_NAME 109 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PARAMS 110 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PKEY 111 # define OSSL_STORE_F_OSSL_STORE_INFO_SET0_NAME_DESCRIPTION 134 # define OSSL_STORE_F_OSSL_STORE_INIT_ONCE 112 # define OSSL_STORE_F_OSSL_STORE_LOADER_NEW 113 # define OSSL_STORE_F_OSSL_STORE_OPEN 114 # define OSSL_STORE_F_OSSL_STORE_OPEN_INT 115 # define OSSL_STORE_F_OSSL_STORE_REGISTER_LOADER_INT 117 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ALIAS 132 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ISSUER_SERIAL 133 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 136 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_NAME 137 # define OSSL_STORE_F_OSSL_STORE_UNREGISTER_LOADER_INT 116 # define OSSL_STORE_F_TRY_DECODE_PARAMS 121 # define OSSL_STORE_F_TRY_DECODE_PKCS12 122 # define OSSL_STORE_F_TRY_DECODE_PKCS8ENCRYPTED 125 /* * OSSL_STORE reason codes. */ # define OSSL_STORE_R_AMBIGUOUS_CONTENT_TYPE 107 # define OSSL_STORE_R_BAD_PASSWORD_READ 115 # define OSSL_STORE_R_ERROR_VERIFYING_PKCS12_MAC 113 # define OSSL_STORE_R_FINGERPRINT_SIZE_DOES_NOT_MATCH_DIGEST 121 # define OSSL_STORE_R_INVALID_SCHEME 106 # define OSSL_STORE_R_IS_NOT_A 112 # define OSSL_STORE_R_LOADER_INCOMPLETE 116 # define OSSL_STORE_R_LOADING_STARTED 117 # define OSSL_STORE_R_NOT_A_CERTIFICATE 100 # define OSSL_STORE_R_NOT_A_CRL 101 # define OSSL_STORE_R_NOT_A_KEY 102 # define OSSL_STORE_R_NOT_A_NAME 103 # define OSSL_STORE_R_NOT_PARAMETERS 104 # define OSSL_STORE_R_PASSPHRASE_CALLBACK_ERROR 114 # define OSSL_STORE_R_PATH_MUST_BE_ABSOLUTE 108 # define OSSL_STORE_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES 119 # define OSSL_STORE_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED 109 # define OSSL_STORE_R_UNREGISTERED_SCHEME 105 # define OSSL_STORE_R_UNSUPPORTED_CONTENT_TYPE 110 # define OSSL_STORE_R_UNSUPPORTED_OPERATION 118 # define OSSL_STORE_R_UNSUPPORTED_SEARCH_TYPE 120 # define OSSL_STORE_R_URI_AUTHORITY_UNSUPPORTED 111 #endif PKZYoopenssl/ripemd.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RIPEMD_H # define HEADER_RIPEMD_H # include #ifndef OPENSSL_NO_RMD160 # include # include # ifdef __cplusplus extern "C" { # endif # define RIPEMD160_LONG unsigned int # define RIPEMD160_CBLOCK 64 # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) # define RIPEMD160_DIGEST_LENGTH 20 typedef struct RIPEMD160state_st { RIPEMD160_LONG A, B, C, D, E; RIPEMD160_LONG Nl, Nh; RIPEMD160_LONG data[RIPEMD160_LBLOCK]; unsigned int num; } RIPEMD160_CTX; int RIPEMD160_Init(RIPEMD160_CTX *c); int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); # ifdef __cplusplus } # endif # endif #endif PKZ1E$$openssl/srtp.hnu[/* * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ /* * DTLS code by Eric Rescorla * * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc. */ #ifndef HEADER_D1_SRTP_H # define HEADER_D1_SRTP_H # include #ifdef __cplusplus extern "C" { #endif # define SRTP_AES128_CM_SHA1_80 0x0001 # define SRTP_AES128_CM_SHA1_32 0x0002 # define SRTP_AES128_F8_SHA1_80 0x0003 # define SRTP_AES128_F8_SHA1_32 0x0004 # define SRTP_NULL_SHA1_80 0x0005 # define SRTP_NULL_SHA1_32 0x0006 /* AEAD SRTP protection profiles from RFC 7714 */ # define SRTP_AEAD_AES_128_GCM 0x0007 # define SRTP_AEAD_AES_256_GCM 0x0008 # ifndef OPENSSL_NO_SRTP __owur int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); __owur int SSL_set_tlsext_use_srtp(SSL *ssl, const char *profiles); __owur STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); __owur SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); # endif #ifdef __cplusplus } #endif #endif PKZ>jopenssl/x509err.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_X509ERR_H # define HEADER_X509ERR_H # include # ifdef __cplusplus extern "C" # endif int ERR_load_X509_strings(void); /* * X509 function codes. */ # define X509_F_ADD_CERT_DIR 100 # define X509_F_BUILD_CHAIN 106 # define X509_F_BY_FILE_CTRL 101 # define X509_F_CHECK_NAME_CONSTRAINTS 149 # define X509_F_CHECK_POLICY 145 # define X509_F_DANE_I2D 107 # define X509_F_DIR_CTRL 102 # define X509_F_GET_CERT_BY_SUBJECT 103 # define X509_F_I2D_X509_AUX 151 # define X509_F_LOOKUP_CERTS_SK 152 # define X509_F_NETSCAPE_SPKI_B64_DECODE 129 # define X509_F_NETSCAPE_SPKI_B64_ENCODE 130 # define X509_F_NEW_DIR 153 # define X509_F_X509AT_ADD1_ATTR 135 # define X509_F_X509V3_ADD_EXT 104 # define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 136 # define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 137 # define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 140 # define X509_F_X509_ATTRIBUTE_GET0_DATA 139 # define X509_F_X509_ATTRIBUTE_SET1_DATA 138 # define X509_F_X509_CHECK_PRIVATE_KEY 128 # define X509_F_X509_CRL_DIFF 105 # define X509_F_X509_CRL_METHOD_NEW 154 # define X509_F_X509_CRL_PRINT_FP 147 # define X509_F_X509_EXTENSION_CREATE_BY_NID 108 # define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 # define X509_F_X509_GET_PUBKEY_PARAMETERS 110 # define X509_F_X509_LOAD_CERT_CRL_FILE 132 # define X509_F_X509_LOAD_CERT_FILE 111 # define X509_F_X509_LOAD_CRL_FILE 112 # define X509_F_X509_LOOKUP_METH_NEW 160 # define X509_F_X509_LOOKUP_NEW 155 # define X509_F_X509_NAME_ADD_ENTRY 113 # define X509_F_X509_NAME_CANON 156 # define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 114 # define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT 131 # define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 # define X509_F_X509_NAME_ONELINE 116 # define X509_F_X509_NAME_PRINT 117 # define X509_F_X509_OBJECT_NEW 150 # define X509_F_X509_PRINT_EX_FP 118 # define X509_F_X509_PUBKEY_DECODE 148 # define X509_F_X509_PUBKEY_GET 161 # define X509_F_X509_PUBKEY_GET0 119 # define X509_F_X509_PUBKEY_SET 120 # define X509_F_X509_REQ_CHECK_PRIVATE_KEY 144 # define X509_F_X509_REQ_PRINT_EX 121 # define X509_F_X509_REQ_PRINT_FP 122 # define X509_F_X509_REQ_TO_X509 123 # define X509_F_X509_STORE_ADD_CERT 124 # define X509_F_X509_STORE_ADD_CRL 125 # define X509_F_X509_STORE_ADD_LOOKUP 157 # define X509_F_X509_STORE_CTX_GET1_ISSUER 146 # define X509_F_X509_STORE_CTX_INIT 143 # define X509_F_X509_STORE_CTX_NEW 142 # define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 # define X509_F_X509_STORE_NEW 158 # define X509_F_X509_TO_X509_REQ 126 # define X509_F_X509_TRUST_ADD 133 # define X509_F_X509_TRUST_SET 141 # define X509_F_X509_VERIFY_CERT 127 # define X509_F_X509_VERIFY_PARAM_NEW 159 /* * X509 reason codes. */ # define X509_R_AKID_MISMATCH 110 # define X509_R_BAD_SELECTOR 133 # define X509_R_BAD_X509_FILETYPE 100 # define X509_R_BASE64_DECODE_ERROR 118 # define X509_R_CANT_CHECK_DH_KEY 114 # define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 # define X509_R_CRL_ALREADY_DELTA 127 # define X509_R_CRL_VERIFY_FAILURE 131 # define X509_R_IDP_MISMATCH 128 # define X509_R_INVALID_ATTRIBUTES 138 # define X509_R_INVALID_DIRECTORY 113 # define X509_R_INVALID_FIELD_NAME 119 # define X509_R_INVALID_TRUST 123 # define X509_R_ISSUER_MISMATCH 129 # define X509_R_KEY_TYPE_MISMATCH 115 # define X509_R_KEY_VALUES_MISMATCH 116 # define X509_R_LOADING_CERT_DIR 103 # define X509_R_LOADING_DEFAULTS 104 # define X509_R_METHOD_NOT_SUPPORTED 124 # define X509_R_NAME_TOO_LONG 134 # define X509_R_NEWER_CRL_NOT_NEWER 132 # define X509_R_NO_CERTIFICATE_FOUND 135 # define X509_R_NO_CERTIFICATE_OR_CRL_FOUND 136 # define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 # define X509_R_NO_CRL_FOUND 137 # define X509_R_NO_CRL_NUMBER 130 # define X509_R_PUBLIC_KEY_DECODE_ERROR 125 # define X509_R_PUBLIC_KEY_ENCODE_ERROR 126 # define X509_R_SHOULD_RETRY 106 # define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 107 # define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 108 # define X509_R_UNKNOWN_KEY_TYPE 117 # define X509_R_UNKNOWN_NID 109 # define X509_R_UNKNOWN_PURPOSE_ID 121 # define X509_R_UNKNOWN_TRUST_ID 120 # define X509_R_UNSUPPORTED_ALGORITHM 111 # define X509_R_WRONG_LOOKUP_TYPE 112 # define X509_R_WRONG_TYPE 122 #endif PKZ0"ݮWW openssl/ts.hnu[/* * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_TS_H # define HEADER_TS_H # include # ifndef OPENSSL_NO_TS # include # include # include # include # include # include # include # include # include # include # ifdef __cplusplus extern "C" { # endif # include # include typedef struct TS_msg_imprint_st TS_MSG_IMPRINT; typedef struct TS_req_st TS_REQ; typedef struct TS_accuracy_st TS_ACCURACY; typedef struct TS_tst_info_st TS_TST_INFO; /* Possible values for status. */ # define TS_STATUS_GRANTED 0 # define TS_STATUS_GRANTED_WITH_MODS 1 # define TS_STATUS_REJECTION 2 # define TS_STATUS_WAITING 3 # define TS_STATUS_REVOCATION_WARNING 4 # define TS_STATUS_REVOCATION_NOTIFICATION 5 /* Possible values for failure_info. */ # define TS_INFO_BAD_ALG 0 # define TS_INFO_BAD_REQUEST 2 # define TS_INFO_BAD_DATA_FORMAT 5 # define TS_INFO_TIME_NOT_AVAILABLE 14 # define TS_INFO_UNACCEPTED_POLICY 15 # define TS_INFO_UNACCEPTED_EXTENSION 16 # define TS_INFO_ADD_INFO_NOT_AVAILABLE 17 # define TS_INFO_SYSTEM_FAILURE 25 typedef struct TS_status_info_st TS_STATUS_INFO; typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL; typedef struct ESS_cert_id ESS_CERT_ID; typedef struct ESS_signing_cert ESS_SIGNING_CERT; DEFINE_STACK_OF(ESS_CERT_ID) typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2; typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2; DEFINE_STACK_OF(ESS_CERT_ID_V2) typedef struct TS_resp_st TS_RESP; TS_REQ *TS_REQ_new(void); void TS_REQ_free(TS_REQ *a); int i2d_TS_REQ(const TS_REQ *a, unsigned char **pp); TS_REQ *d2i_TS_REQ(TS_REQ **a, const unsigned char **pp, long length); TS_REQ *TS_REQ_dup(TS_REQ *a); #ifndef OPENSSL_NO_STDIO TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a); int i2d_TS_REQ_fp(FILE *fp, TS_REQ *a); #endif TS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a); int i2d_TS_REQ_bio(BIO *fp, TS_REQ *a); TS_MSG_IMPRINT *TS_MSG_IMPRINT_new(void); void TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *a); int i2d_TS_MSG_IMPRINT(const TS_MSG_IMPRINT *a, unsigned char **pp); TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT(TS_MSG_IMPRINT **a, const unsigned char **pp, long length); TS_MSG_IMPRINT *TS_MSG_IMPRINT_dup(TS_MSG_IMPRINT *a); #ifndef OPENSSL_NO_STDIO TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a); int i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a); #endif TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *bio, TS_MSG_IMPRINT **a); int i2d_TS_MSG_IMPRINT_bio(BIO *bio, TS_MSG_IMPRINT *a); TS_RESP *TS_RESP_new(void); void TS_RESP_free(TS_RESP *a); int i2d_TS_RESP(const TS_RESP *a, unsigned char **pp); TS_RESP *d2i_TS_RESP(TS_RESP **a, const unsigned char **pp, long length); TS_TST_INFO *PKCS7_to_TS_TST_INFO(PKCS7 *token); TS_RESP *TS_RESP_dup(TS_RESP *a); #ifndef OPENSSL_NO_STDIO TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a); int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a); #endif TS_RESP *d2i_TS_RESP_bio(BIO *bio, TS_RESP **a); int i2d_TS_RESP_bio(BIO *bio, TS_RESP *a); TS_STATUS_INFO *TS_STATUS_INFO_new(void); void TS_STATUS_INFO_free(TS_STATUS_INFO *a); int i2d_TS_STATUS_INFO(const TS_STATUS_INFO *a, unsigned char **pp); TS_STATUS_INFO *d2i_TS_STATUS_INFO(TS_STATUS_INFO **a, const unsigned char **pp, long length); TS_STATUS_INFO *TS_STATUS_INFO_dup(TS_STATUS_INFO *a); TS_TST_INFO *TS_TST_INFO_new(void); void TS_TST_INFO_free(TS_TST_INFO *a); int i2d_TS_TST_INFO(const TS_TST_INFO *a, unsigned char **pp); TS_TST_INFO *d2i_TS_TST_INFO(TS_TST_INFO **a, const unsigned char **pp, long length); TS_TST_INFO *TS_TST_INFO_dup(TS_TST_INFO *a); #ifndef OPENSSL_NO_STDIO TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a); int i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a); #endif TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *bio, TS_TST_INFO **a); int i2d_TS_TST_INFO_bio(BIO *bio, TS_TST_INFO *a); TS_ACCURACY *TS_ACCURACY_new(void); void TS_ACCURACY_free(TS_ACCURACY *a); int i2d_TS_ACCURACY(const TS_ACCURACY *a, unsigned char **pp); TS_ACCURACY *d2i_TS_ACCURACY(TS_ACCURACY **a, const unsigned char **pp, long length); TS_ACCURACY *TS_ACCURACY_dup(TS_ACCURACY *a); ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_new(void); void ESS_ISSUER_SERIAL_free(ESS_ISSUER_SERIAL *a); int i2d_ESS_ISSUER_SERIAL(const ESS_ISSUER_SERIAL *a, unsigned char **pp); ESS_ISSUER_SERIAL *d2i_ESS_ISSUER_SERIAL(ESS_ISSUER_SERIAL **a, const unsigned char **pp, long length); ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_dup(ESS_ISSUER_SERIAL *a); ESS_CERT_ID *ESS_CERT_ID_new(void); void ESS_CERT_ID_free(ESS_CERT_ID *a); int i2d_ESS_CERT_ID(const ESS_CERT_ID *a, unsigned char **pp); ESS_CERT_ID *d2i_ESS_CERT_ID(ESS_CERT_ID **a, const unsigned char **pp, long length); ESS_CERT_ID *ESS_CERT_ID_dup(ESS_CERT_ID *a); ESS_SIGNING_CERT *ESS_SIGNING_CERT_new(void); void ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a); int i2d_ESS_SIGNING_CERT(const ESS_SIGNING_CERT *a, unsigned char **pp); ESS_SIGNING_CERT *d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a, const unsigned char **pp, long length); ESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a); ESS_CERT_ID_V2 *ESS_CERT_ID_V2_new(void); void ESS_CERT_ID_V2_free(ESS_CERT_ID_V2 *a); int i2d_ESS_CERT_ID_V2(const ESS_CERT_ID_V2 *a, unsigned char **pp); ESS_CERT_ID_V2 *d2i_ESS_CERT_ID_V2(ESS_CERT_ID_V2 **a, const unsigned char **pp, long length); ESS_CERT_ID_V2 *ESS_CERT_ID_V2_dup(ESS_CERT_ID_V2 *a); ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_new(void); void ESS_SIGNING_CERT_V2_free(ESS_SIGNING_CERT_V2 *a); int i2d_ESS_SIGNING_CERT_V2(const ESS_SIGNING_CERT_V2 *a, unsigned char **pp); ESS_SIGNING_CERT_V2 *d2i_ESS_SIGNING_CERT_V2(ESS_SIGNING_CERT_V2 **a, const unsigned char **pp, long length); ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_dup(ESS_SIGNING_CERT_V2 *a); int TS_REQ_set_version(TS_REQ *a, long version); long TS_REQ_get_version(const TS_REQ *a); int TS_STATUS_INFO_set_status(TS_STATUS_INFO *a, int i); const ASN1_INTEGER *TS_STATUS_INFO_get0_status(const TS_STATUS_INFO *a); const STACK_OF(ASN1_UTF8STRING) * TS_STATUS_INFO_get0_text(const TS_STATUS_INFO *a); const ASN1_BIT_STRING * TS_STATUS_INFO_get0_failure_info(const TS_STATUS_INFO *a); int TS_REQ_set_msg_imprint(TS_REQ *a, TS_MSG_IMPRINT *msg_imprint); TS_MSG_IMPRINT *TS_REQ_get_msg_imprint(TS_REQ *a); int TS_MSG_IMPRINT_set_algo(TS_MSG_IMPRINT *a, X509_ALGOR *alg); X509_ALGOR *TS_MSG_IMPRINT_get_algo(TS_MSG_IMPRINT *a); int TS_MSG_IMPRINT_set_msg(TS_MSG_IMPRINT *a, unsigned char *d, int len); ASN1_OCTET_STRING *TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a); int TS_REQ_set_policy_id(TS_REQ *a, const ASN1_OBJECT *policy); ASN1_OBJECT *TS_REQ_get_policy_id(TS_REQ *a); int TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce); const ASN1_INTEGER *TS_REQ_get_nonce(const TS_REQ *a); int TS_REQ_set_cert_req(TS_REQ *a, int cert_req); int TS_REQ_get_cert_req(const TS_REQ *a); STACK_OF(X509_EXTENSION) *TS_REQ_get_exts(TS_REQ *a); void TS_REQ_ext_free(TS_REQ *a); int TS_REQ_get_ext_count(TS_REQ *a); int TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos); int TS_REQ_get_ext_by_OBJ(TS_REQ *a, const ASN1_OBJECT *obj, int lastpos); int TS_REQ_get_ext_by_critical(TS_REQ *a, int crit, int lastpos); X509_EXTENSION *TS_REQ_get_ext(TS_REQ *a, int loc); X509_EXTENSION *TS_REQ_delete_ext(TS_REQ *a, int loc); int TS_REQ_add_ext(TS_REQ *a, X509_EXTENSION *ex, int loc); void *TS_REQ_get_ext_d2i(TS_REQ *a, int nid, int *crit, int *idx); /* Function declarations for TS_REQ defined in ts/ts_req_print.c */ int TS_REQ_print_bio(BIO *bio, TS_REQ *a); /* Function declarations for TS_RESP defined in ts/ts_resp_utils.c */ int TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *info); TS_STATUS_INFO *TS_RESP_get_status_info(TS_RESP *a); /* Caller loses ownership of PKCS7 and TS_TST_INFO objects. */ void TS_RESP_set_tst_info(TS_RESP *a, PKCS7 *p7, TS_TST_INFO *tst_info); PKCS7 *TS_RESP_get_token(TS_RESP *a); TS_TST_INFO *TS_RESP_get_tst_info(TS_RESP *a); int TS_TST_INFO_set_version(TS_TST_INFO *a, long version); long TS_TST_INFO_get_version(const TS_TST_INFO *a); int TS_TST_INFO_set_policy_id(TS_TST_INFO *a, ASN1_OBJECT *policy_id); ASN1_OBJECT *TS_TST_INFO_get_policy_id(TS_TST_INFO *a); int TS_TST_INFO_set_msg_imprint(TS_TST_INFO *a, TS_MSG_IMPRINT *msg_imprint); TS_MSG_IMPRINT *TS_TST_INFO_get_msg_imprint(TS_TST_INFO *a); int TS_TST_INFO_set_serial(TS_TST_INFO *a, const ASN1_INTEGER *serial); const ASN1_INTEGER *TS_TST_INFO_get_serial(const TS_TST_INFO *a); int TS_TST_INFO_set_time(TS_TST_INFO *a, const ASN1_GENERALIZEDTIME *gtime); const ASN1_GENERALIZEDTIME *TS_TST_INFO_get_time(const TS_TST_INFO *a); int TS_TST_INFO_set_accuracy(TS_TST_INFO *a, TS_ACCURACY *accuracy); TS_ACCURACY *TS_TST_INFO_get_accuracy(TS_TST_INFO *a); int TS_ACCURACY_set_seconds(TS_ACCURACY *a, const ASN1_INTEGER *seconds); const ASN1_INTEGER *TS_ACCURACY_get_seconds(const TS_ACCURACY *a); int TS_ACCURACY_set_millis(TS_ACCURACY *a, const ASN1_INTEGER *millis); const ASN1_INTEGER *TS_ACCURACY_get_millis(const TS_ACCURACY *a); int TS_ACCURACY_set_micros(TS_ACCURACY *a, const ASN1_INTEGER *micros); const ASN1_INTEGER *TS_ACCURACY_get_micros(const TS_ACCURACY *a); int TS_TST_INFO_set_ordering(TS_TST_INFO *a, int ordering); int TS_TST_INFO_get_ordering(const TS_TST_INFO *a); int TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce); const ASN1_INTEGER *TS_TST_INFO_get_nonce(const TS_TST_INFO *a); int TS_TST_INFO_set_tsa(TS_TST_INFO *a, GENERAL_NAME *tsa); GENERAL_NAME *TS_TST_INFO_get_tsa(TS_TST_INFO *a); STACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a); void TS_TST_INFO_ext_free(TS_TST_INFO *a); int TS_TST_INFO_get_ext_count(TS_TST_INFO *a); int TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos); int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, const ASN1_OBJECT *obj, int lastpos); int TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos); X509_EXTENSION *TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc); X509_EXTENSION *TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc); int TS_TST_INFO_add_ext(TS_TST_INFO *a, X509_EXTENSION *ex, int loc); void *TS_TST_INFO_get_ext_d2i(TS_TST_INFO *a, int nid, int *crit, int *idx); /* * Declarations related to response generation, defined in ts/ts_resp_sign.c. */ /* Optional flags for response generation. */ /* Don't include the TSA name in response. */ # define TS_TSA_NAME 0x01 /* Set ordering to true in response. */ # define TS_ORDERING 0x02 /* * Include the signer certificate and the other specified certificates in * the ESS signing certificate attribute beside the PKCS7 signed data. * Only the signer certificates is included by default. */ # define TS_ESS_CERT_ID_CHAIN 0x04 /* Forward declaration. */ struct TS_resp_ctx; /* This must return a unique number less than 160 bits long. */ typedef ASN1_INTEGER *(*TS_serial_cb) (struct TS_resp_ctx *, void *); /* * This must return the seconds and microseconds since Jan 1, 1970 in the sec * and usec variables allocated by the caller. Return non-zero for success * and zero for failure. */ typedef int (*TS_time_cb) (struct TS_resp_ctx *, void *, long *sec, long *usec); /* * This must process the given extension. It can modify the TS_TST_INFO * object of the context. Return values: !0 (processed), 0 (error, it must * set the status info/failure info of the response). */ typedef int (*TS_extension_cb) (struct TS_resp_ctx *, X509_EXTENSION *, void *); typedef struct TS_resp_ctx TS_RESP_CTX; DEFINE_STACK_OF_CONST(EVP_MD) /* Creates a response context that can be used for generating responses. */ TS_RESP_CTX *TS_RESP_CTX_new(void); void TS_RESP_CTX_free(TS_RESP_CTX *ctx); /* This parameter must be set. */ int TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer); /* This parameter must be set. */ int TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key); int TS_RESP_CTX_set_signer_digest(TS_RESP_CTX *ctx, const EVP_MD *signer_digest); int TS_RESP_CTX_set_ess_cert_id_digest(TS_RESP_CTX *ctx, const EVP_MD *md); /* This parameter must be set. */ int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *def_policy); /* No additional certs are included in the response by default. */ int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs); /* * Adds a new acceptable policy, only the default policy is accepted by * default. */ int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *policy); /* * Adds a new acceptable message digest. Note that no message digests are * accepted by default. The md argument is shared with the caller. */ int TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md); /* Accuracy is not included by default. */ int TS_RESP_CTX_set_accuracy(TS_RESP_CTX *ctx, int secs, int millis, int micros); /* * Clock precision digits, i.e. the number of decimal digits: '0' means sec, * '3' msec, '6' usec, and so on. Default is 0. */ int TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx, unsigned clock_precision_digits); /* At most we accept usec precision. */ # define TS_MAX_CLOCK_PRECISION_DIGITS 6 /* Maximum status message length */ # define TS_MAX_STATUS_LENGTH (1024 * 1024) /* No flags are set by default. */ void TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags); /* Default callback always returns a constant. */ void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data); /* Default callback uses the gettimeofday() and gmtime() system calls. */ void TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data); /* * Default callback rejects all extensions. The extension callback is called * when the TS_TST_INFO object is already set up and not signed yet. */ /* FIXME: extension handling is not tested yet. */ void TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx, TS_extension_cb cb, void *data); /* The following methods can be used in the callbacks. */ int TS_RESP_CTX_set_status_info(TS_RESP_CTX *ctx, int status, const char *text); /* Sets the status info only if it is still TS_STATUS_GRANTED. */ int TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx, int status, const char *text); int TS_RESP_CTX_add_failure_info(TS_RESP_CTX *ctx, int failure); /* The get methods below can be used in the extension callback. */ TS_REQ *TS_RESP_CTX_get_request(TS_RESP_CTX *ctx); TS_TST_INFO *TS_RESP_CTX_get_tst_info(TS_RESP_CTX *ctx); /* * Creates the signed TS_TST_INFO and puts it in TS_RESP. * In case of errors it sets the status info properly. * Returns NULL only in case of memory allocation/fatal error. */ TS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio); /* * Declarations related to response verification, * they are defined in ts/ts_resp_verify.c. */ int TS_RESP_verify_signature(PKCS7 *token, STACK_OF(X509) *certs, X509_STORE *store, X509 **signer_out); /* Context structure for the generic verify method. */ /* Verify the signer's certificate and the signature of the response. */ # define TS_VFY_SIGNATURE (1u << 0) /* Verify the version number of the response. */ # define TS_VFY_VERSION (1u << 1) /* Verify if the policy supplied by the user matches the policy of the TSA. */ # define TS_VFY_POLICY (1u << 2) /* * Verify the message imprint provided by the user. This flag should not be * specified with TS_VFY_DATA. */ # define TS_VFY_IMPRINT (1u << 3) /* * Verify the message imprint computed by the verify method from the user * provided data and the MD algorithm of the response. This flag should not * be specified with TS_VFY_IMPRINT. */ # define TS_VFY_DATA (1u << 4) /* Verify the nonce value. */ # define TS_VFY_NONCE (1u << 5) /* Verify if the TSA name field matches the signer certificate. */ # define TS_VFY_SIGNER (1u << 6) /* Verify if the TSA name field equals to the user provided name. */ # define TS_VFY_TSA_NAME (1u << 7) /* You can use the following convenience constants. */ # define TS_VFY_ALL_IMPRINT (TS_VFY_SIGNATURE \ | TS_VFY_VERSION \ | TS_VFY_POLICY \ | TS_VFY_IMPRINT \ | TS_VFY_NONCE \ | TS_VFY_SIGNER \ | TS_VFY_TSA_NAME) # define TS_VFY_ALL_DATA (TS_VFY_SIGNATURE \ | TS_VFY_VERSION \ | TS_VFY_POLICY \ | TS_VFY_DATA \ | TS_VFY_NONCE \ | TS_VFY_SIGNER \ | TS_VFY_TSA_NAME) typedef struct TS_verify_ctx TS_VERIFY_CTX; int TS_RESP_verify_response(TS_VERIFY_CTX *ctx, TS_RESP *response); int TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token); /* * Declarations related to response verification context, */ TS_VERIFY_CTX *TS_VERIFY_CTX_new(void); void TS_VERIFY_CTX_init(TS_VERIFY_CTX *ctx); void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx); void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx); int TS_VERIFY_CTX_set_flags(TS_VERIFY_CTX *ctx, int f); int TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int f); BIO *TS_VERIFY_CTX_set_data(TS_VERIFY_CTX *ctx, BIO *b); unsigned char *TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx, unsigned char *hexstr, long len); X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *s); STACK_OF(X509) *TS_VERIFY_CTS_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs); /*- * If ctx is NULL, it allocates and returns a new object, otherwise * it returns ctx. It initialises all the members as follows: * flags = TS_VFY_ALL_IMPRINT & ~(TS_VFY_TSA_NAME | TS_VFY_SIGNATURE) * certs = NULL * store = NULL * policy = policy from the request or NULL if absent (in this case * TS_VFY_POLICY is cleared from flags as well) * md_alg = MD algorithm from request * imprint, imprint_len = imprint from request * data = NULL * nonce, nonce_len = nonce from the request or NULL if absent (in this case * TS_VFY_NONCE is cleared from flags as well) * tsa_name = NULL * Important: after calling this method TS_VFY_SIGNATURE should be added! */ TS_VERIFY_CTX *TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx); /* Function declarations for TS_RESP defined in ts/ts_resp_print.c */ int TS_RESP_print_bio(BIO *bio, TS_RESP *a); int TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a); int TS_TST_INFO_print_bio(BIO *bio, TS_TST_INFO *a); /* Common utility functions defined in ts/ts_lib.c */ int TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num); int TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj); int TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions); int TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg); int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *msg); /* * Function declarations for handling configuration options, defined in * ts/ts_conf.c */ X509 *TS_CONF_load_cert(const char *file); STACK_OF(X509) *TS_CONF_load_certs(const char *file); EVP_PKEY *TS_CONF_load_key(const char *file, const char *pass); const char *TS_CONF_get_tsa_section(CONF *conf, const char *section); int TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb, TS_RESP_CTX *ctx); #ifndef OPENSSL_NO_ENGINE int TS_CONF_set_crypto_device(CONF *conf, const char *section, const char *device); int TS_CONF_set_default_engine(const char *name); #endif int TS_CONF_set_signer_cert(CONF *conf, const char *section, const char *cert, TS_RESP_CTX *ctx); int TS_CONF_set_certs(CONF *conf, const char *section, const char *certs, TS_RESP_CTX *ctx); int TS_CONF_set_signer_key(CONF *conf, const char *section, const char *key, const char *pass, TS_RESP_CTX *ctx); int TS_CONF_set_signer_digest(CONF *conf, const char *section, const char *md, TS_RESP_CTX *ctx); int TS_CONF_set_def_policy(CONF *conf, const char *section, const char *policy, TS_RESP_CTX *ctx); int TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_clock_precision_digits(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, TS_RESP_CTX *ctx); int TS_CONF_set_ess_cert_id_digest(CONF *conf, const char *section, TS_RESP_CTX *ctx); # ifdef __cplusplus } # endif # endif #endif PKZxڠwVwV openssl/bn.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_BN_H # define HEADER_BN_H # include # ifndef OPENSSL_NO_STDIO # include # endif # include # include # include # include #ifdef __cplusplus extern "C" { #endif /* * 64-bit processor with LP64 ABI */ # ifdef SIXTY_FOUR_BIT_LONG # define BN_ULONG unsigned long # define BN_BYTES 8 # endif /* * 64-bit processor other than LP64 ABI */ # ifdef SIXTY_FOUR_BIT # define BN_ULONG unsigned long long # define BN_BYTES 8 # endif # ifdef THIRTY_TWO_BIT # define BN_ULONG unsigned int # define BN_BYTES 4 # endif # define BN_BITS2 (BN_BYTES * 8) # define BN_BITS (BN_BITS2 * 2) # define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1)) # define BN_FLG_MALLOCED 0x01 # define BN_FLG_STATIC_DATA 0x02 /* * avoid leaking exponent information through timing, * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime, * BN_div() will call BN_div_no_branch, * BN_mod_inverse() will call bn_mod_inverse_no_branch. */ # define BN_FLG_CONSTTIME 0x04 # define BN_FLG_SECURE 0x08 # if OPENSSL_API_COMPAT < 0x00908000L /* deprecated name for the flag */ # define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME # define BN_FLG_FREE 0x8000 /* used for debugging */ # endif void BN_set_flags(BIGNUM *b, int n); int BN_get_flags(const BIGNUM *b, int n); /* Values for |top| in BN_rand() */ #define BN_RAND_TOP_ANY -1 #define BN_RAND_TOP_ONE 0 #define BN_RAND_TOP_TWO 1 /* Values for |bottom| in BN_rand() */ #define BN_RAND_BOTTOM_ANY 0 #define BN_RAND_BOTTOM_ODD 1 /* * get a clone of a BIGNUM with changed flags, for *temporary* use only (the * two BIGNUMs cannot be used in parallel!). Also only for *read only* use. The * value |dest| should be a newly allocated BIGNUM obtained via BN_new() that * has not been otherwise initialised or used. */ void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags); /* Wrapper function to make using BN_GENCB easier */ int BN_GENCB_call(BN_GENCB *cb, int a, int b); BN_GENCB *BN_GENCB_new(void); void BN_GENCB_free(BN_GENCB *cb); /* Populate a BN_GENCB structure with an "old"-style callback */ void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback) (int, int, void *), void *cb_arg); /* Populate a BN_GENCB structure with a "new"-style callback */ void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *), void *cb_arg); void *BN_GENCB_get_arg(BN_GENCB *cb); # define BN_prime_checks 0 /* default: select number of iterations based * on the size of the number */ /* * BN_prime_checks_for_size() returns the number of Miller-Rabin iterations * that will be done for checking that a random number is probably prime. The * error rate for accepting a composite number as prime depends on the size of * the prime |b|. The error rates used are for calculating an RSA key with 2 primes, * and so the level is what you would expect for a key of double the size of the * prime. * * This table is generated using the algorithm of FIPS PUB 186-4 * Digital Signature Standard (DSS), section F.1, page 117. * (https://dx.doi.org/10.6028/NIST.FIPS.186-4) * * The following magma script was used to generate the output: * securitybits:=125; * k:=1024; * for t:=1 to 65 do * for M:=3 to Floor(2*Sqrt(k-1)-1) do * S:=0; * // Sum over m * for m:=3 to M do * s:=0; * // Sum over j * for j:=2 to m do * s+:=(RealField(32)!2)^-(j+(k-1)/j); * end for; * S+:=2^(m-(m-1)*t)*s; * end for; * A:=2^(k-2-M*t); * B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S; * pkt:=2.00743*Log(2)*k*2^-k*(A+B); * seclevel:=Floor(-Log(2,pkt)); * if seclevel ge securitybits then * printf "k: %5o, security: %o bits (t: %o, M: %o)\n",k,seclevel,t,M; * break; * end if; * end for; * if seclevel ge securitybits then break; end if; * end for; * * It can be run online at: * http://magma.maths.usyd.edu.au/calc * * And will output: * k: 1024, security: 129 bits (t: 6, M: 23) * * k is the number of bits of the prime, securitybits is the level we want to * reach. * * prime length | RSA key size | # MR tests | security level * -------------+--------------|------------+--------------- * (b) >= 6394 | >= 12788 | 3 | 256 bit * (b) >= 3747 | >= 7494 | 3 | 192 bit * (b) >= 1345 | >= 2690 | 4 | 128 bit * (b) >= 1080 | >= 2160 | 5 | 128 bit * (b) >= 852 | >= 1704 | 5 | 112 bit * (b) >= 476 | >= 952 | 5 | 80 bit * (b) >= 400 | >= 800 | 6 | 80 bit * (b) >= 347 | >= 694 | 7 | 80 bit * (b) >= 308 | >= 616 | 8 | 80 bit * (b) >= 55 | >= 110 | 27 | 64 bit * (b) >= 6 | >= 12 | 34 | 64 bit */ # define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : \ (b) >= 1345 ? 4 : \ (b) >= 476 ? 5 : \ (b) >= 400 ? 6 : \ (b) >= 347 ? 7 : \ (b) >= 308 ? 8 : \ (b) >= 55 ? 27 : \ /* b >= 6 */ 34) # define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w); int BN_is_zero(const BIGNUM *a); int BN_is_one(const BIGNUM *a); int BN_is_word(const BIGNUM *a, const BN_ULONG w); int BN_is_odd(const BIGNUM *a); # define BN_one(a) (BN_set_word((a),1)) void BN_zero_ex(BIGNUM *a); # if OPENSSL_API_COMPAT >= 0x00908000L # define BN_zero(a) BN_zero_ex(a) # else # define BN_zero(a) (BN_set_word((a),0)) # endif const BIGNUM *BN_value_one(void); char *BN_options(void); BN_CTX *BN_CTX_new(void); BN_CTX *BN_CTX_secure_new(void); void BN_CTX_free(BN_CTX *c); void BN_CTX_start(BN_CTX *ctx); BIGNUM *BN_CTX_get(BN_CTX *ctx); void BN_CTX_end(BN_CTX *ctx); int BN_rand(BIGNUM *rnd, int bits, int top, int bottom); int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom); int BN_rand_range(BIGNUM *rnd, const BIGNUM *range); int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range); int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom); int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range); int BN_num_bits(const BIGNUM *a); int BN_num_bits_word(BN_ULONG l); int BN_security_bits(int L, int N); BIGNUM *BN_new(void); BIGNUM *BN_secure_new(void); void BN_clear_free(BIGNUM *a); BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); void BN_swap(BIGNUM *a, BIGNUM *b); BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); int BN_bn2bin(const BIGNUM *a, unsigned char *to); int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen); BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen); BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret); int BN_bn2mpi(const BIGNUM *a, unsigned char *to); int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); /** BN_set_negative sets sign of a BIGNUM * \param b pointer to the BIGNUM object * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise */ void BN_set_negative(BIGNUM *b, int n); /** BN_is_negative returns 1 if the BIGNUM is negative * \param b pointer to the BIGNUM object * \return 1 if a < 0 and 0 otherwise */ int BN_is_negative(const BIGNUM *b); int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); # define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx)) int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx); int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m); int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m); int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m); int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx); int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m); BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w); BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w); int BN_mul_word(BIGNUM *a, BN_ULONG w); int BN_add_word(BIGNUM *a, BN_ULONG w); int BN_sub_word(BIGNUM *a, BN_ULONG w); int BN_set_word(BIGNUM *a, BN_ULONG w); BN_ULONG BN_get_word(const BIGNUM *a); int BN_cmp(const BIGNUM *a, const BIGNUM *b); void BN_free(BIGNUM *a); int BN_is_bit_set(const BIGNUM *a, int n); int BN_lshift(BIGNUM *r, const BIGNUM *a, int n); int BN_lshift1(BIGNUM *r, const BIGNUM *a); int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1, const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); int BN_mask_bits(BIGNUM *a, int n); # ifndef OPENSSL_NO_STDIO int BN_print_fp(FILE *fp, const BIGNUM *a); # endif int BN_print(BIO *bio, const BIGNUM *a); int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx); int BN_rshift(BIGNUM *r, const BIGNUM *a, int n); int BN_rshift1(BIGNUM *r, const BIGNUM *a); void BN_clear(BIGNUM *a); BIGNUM *BN_dup(const BIGNUM *a); int BN_ucmp(const BIGNUM *a, const BIGNUM *b); int BN_set_bit(BIGNUM *a, int n); int BN_clear_bit(BIGNUM *a, int n); char *BN_bn2hex(const BIGNUM *a); char *BN_bn2dec(const BIGNUM *a); int BN_hex2bn(BIGNUM **a, const char *str); int BN_dec2bn(BIGNUM **a, const char *str); int BN_asc2bn(BIGNUM **a, const char *str); int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns * -2 for * error */ BIGNUM *BN_mod_inverse(BIGNUM *ret, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); BIGNUM *BN_mod_sqrt(BIGNUM *ret, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); /* Deprecated versions */ DEPRECATEDIN_0_9_8(BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, const BIGNUM *add, const BIGNUM *rem, void (*callback) (int, int, void *), void *cb_arg)) DEPRECATEDIN_0_9_8(int BN_is_prime(const BIGNUM *p, int nchecks, void (*callback) (int, int, void *), BN_CTX *ctx, void *cb_arg)) DEPRECATEDIN_0_9_8(int BN_is_prime_fasttest(const BIGNUM *p, int nchecks, void (*callback) (int, int, void *), BN_CTX *ctx, void *cb_arg, int do_trial_division)) /* Newer versions */ int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb); int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb); int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, int do_trial_division, BN_GENCB *cb); int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx); int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb); int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1, BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb); BN_MONT_CTX *BN_MONT_CTX_new(void); int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_MONT_CTX *mont, BN_CTX *ctx); int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); void BN_MONT_CTX_free(BN_MONT_CTX *mont); int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx); BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from); BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock, const BIGNUM *mod, BN_CTX *ctx); /* BN_BLINDING flags */ # define BN_BLINDING_NO_UPDATE 0x00000001 # define BN_BLINDING_NO_RECREATE 0x00000002 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod); void BN_BLINDING_free(BN_BLINDING *b); int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx); int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *); int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *); int BN_BLINDING_is_current_thread(BN_BLINDING *b); void BN_BLINDING_set_current_thread(BN_BLINDING *b); int BN_BLINDING_lock(BN_BLINDING *b); int BN_BLINDING_unlock(BN_BLINDING *b); unsigned long BN_BLINDING_get_flags(const BN_BLINDING *); void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long); BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b, const BIGNUM *e, BIGNUM *m, BN_CTX *ctx, int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx), BN_MONT_CTX *m_ctx); DEPRECATEDIN_0_9_8(void BN_set_params(int mul, int high, int low, int mont)) DEPRECATEDIN_0_9_8(int BN_get_params(int which)) /* 0, mul, 1 high, 2 low, 3 * mont */ BN_RECP_CTX *BN_RECP_CTX_new(void); void BN_RECP_CTX_free(BN_RECP_CTX *recp); int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx); int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, BN_RECP_CTX *recp, BN_CTX *ctx); int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, BN_CTX *ctx); # ifndef OPENSSL_NO_EC2M /* * Functions for arithmetic over binary polynomials represented by BIGNUMs. * The BIGNUM::neg property of BIGNUMs representing binary polynomials is * ignored. Note that input arguments are not const so that their bit arrays * can be expanded to the appropriate size if needed. */ /* * r = a + b */ int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); # define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) /* * r=a mod p */ int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); /* r = (a * b) mod p */ int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a * a) mod p */ int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r = (1 / b) mod p */ int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a / b) mod p */ int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a ^ b) mod p */ int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = sqrt(a) mod p */ int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r^2 + r = a mod p */ int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); # define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) /*- * Some functions allow for representation of the irreducible polynomials * as an unsigned int[], say p. The irreducible f(t) is then of the form: * t^p[0] + t^p[1] + ... + t^p[k] * where m = p[0] > p[1] > ... > p[k] = 0. */ /* r = a mod p */ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]); /* r = (a * b) mod p */ int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const int p[], BN_CTX *ctx); /* r = (a * a) mod p */ int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[], BN_CTX *ctx); /* r = (1 / b) mod p */ int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[], BN_CTX *ctx); /* r = (a / b) mod p */ int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const int p[], BN_CTX *ctx); /* r = (a ^ b) mod p */ int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const int p[], BN_CTX *ctx); /* r = sqrt(a) mod p */ int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const int p[], BN_CTX *ctx); /* r^2 + r = a mod p */ int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a, const int p[], BN_CTX *ctx); int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max); int BN_GF2m_arr2poly(const int p[], BIGNUM *a); # endif /* * faster mod functions for the 'NIST primes' 0 <= a < p^2 */ int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); const BIGNUM *BN_get0_nist_prime_192(void); const BIGNUM *BN_get0_nist_prime_224(void); const BIGNUM *BN_get0_nist_prime_256(void); const BIGNUM *BN_get0_nist_prime_384(void); const BIGNUM *BN_get0_nist_prime_521(void); int (*BN_nist_mod_func(const BIGNUM *p)) (BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx); int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range, const BIGNUM *priv, const unsigned char *message, size_t message_len, BN_CTX *ctx); /* Primes from RFC 2409 */ BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn); BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn); /* Primes from RFC 3526 */ BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn); BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn); BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn); BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn); BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn); BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn); # if OPENSSL_API_COMPAT < 0x10100000L # define get_rfc2409_prime_768 BN_get_rfc2409_prime_768 # define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024 # define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536 # define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048 # define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072 # define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096 # define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144 # define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192 # endif int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom); # ifdef __cplusplus } # endif #endif PKZ<_e e openssl/conferr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CONFERR_H # define HEADER_CONFERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_CONF_strings(void); /* * CONF function codes. */ # define CONF_F_CONF_DUMP_FP 104 # define CONF_F_CONF_LOAD 100 # define CONF_F_CONF_LOAD_FP 103 # define CONF_F_CONF_PARSE_LIST 119 # define CONF_F_DEF_LOAD 120 # define CONF_F_DEF_LOAD_BIO 121 # define CONF_F_GET_NEXT_FILE 107 # define CONF_F_MODULE_ADD 122 # define CONF_F_MODULE_INIT 115 # define CONF_F_MODULE_LOAD_DSO 117 # define CONF_F_MODULE_RUN 118 # define CONF_F_NCONF_DUMP_BIO 105 # define CONF_F_NCONF_DUMP_FP 106 # define CONF_F_NCONF_GET_NUMBER_E 112 # define CONF_F_NCONF_GET_SECTION 108 # define CONF_F_NCONF_GET_STRING 109 # define CONF_F_NCONF_LOAD 113 # define CONF_F_NCONF_LOAD_BIO 110 # define CONF_F_NCONF_LOAD_FP 114 # define CONF_F_NCONF_NEW 111 # define CONF_F_PROCESS_INCLUDE 116 # define CONF_F_SSL_MODULE_INIT 123 # define CONF_F_STR_COPY 101 /* * CONF reason codes. */ # define CONF_R_ERROR_LOADING_DSO 110 # define CONF_R_LIST_CANNOT_BE_NULL 115 # define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 # define CONF_R_MISSING_EQUAL_SIGN 101 # define CONF_R_MISSING_INIT_FUNCTION 112 # define CONF_R_MODULE_INITIALIZATION_ERROR 109 # define CONF_R_NO_CLOSE_BRACE 102 # define CONF_R_NO_CONF 105 # define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106 # define CONF_R_NO_SECTION 107 # define CONF_R_NO_SUCH_FILE 114 # define CONF_R_NO_VALUE 108 # define CONF_R_NUMBER_TOO_LARGE 121 # define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111 # define CONF_R_SSL_COMMAND_SECTION_EMPTY 117 # define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118 # define CONF_R_SSL_SECTION_EMPTY 119 # define CONF_R_SSL_SECTION_NOT_FOUND 120 # define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 # define CONF_R_UNKNOWN_MODULE_NAME 113 # define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116 # define CONF_R_VARIABLE_HAS_NO_VALUE 104 #endif PKZ855 openssl/dh.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_DH_H # define HEADER_DH_H # include # ifndef OPENSSL_NO_DH # include # include # include # include # if OPENSSL_API_COMPAT < 0x10100000L # include # endif # include # ifdef __cplusplus extern "C" { # endif # ifndef OPENSSL_DH_MAX_MODULUS_BITS # define OPENSSL_DH_MAX_MODULUS_BITS 10000 # endif # ifndef OPENSSL_DH_CHECK_MAX_MODULUS_BITS # define OPENSSL_DH_CHECK_MAX_MODULUS_BITS 32768 # endif # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024 # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS_GEN 2048 # define DH_FLAG_CACHE_MONT_P 0x01 # if OPENSSL_API_COMPAT < 0x10100000L /* * Does nothing. Previously this switched off constant time behaviour. */ # define DH_FLAG_NO_EXP_CONSTTIME 0x00 # endif /* * If this flag is set the DH method is FIPS compliant and can be used in * FIPS mode. This is set in the validated module method. If an application * sets this flag in its own methods it is its responsibility to ensure the * result is compliant. */ # define DH_FLAG_FIPS_METHOD 0x0400 /* * If this flag is set the operations normally disabled in FIPS mode are * permitted it is then the applications responsibility to ensure that the * usage is compliant. */ # define DH_FLAG_NON_FIPS_ALLOW 0x0400 /* Already defined in ossl_typ.h */ /* typedef struct dh_st DH; */ /* typedef struct dh_method DH_METHOD; */ DECLARE_ASN1_ITEM(DHparams) # define DH_GENERATOR_2 2 /* #define DH_GENERATOR_3 3 */ # define DH_GENERATOR_5 5 /* DH_check error codes, some of them shared with DH_check_pub_key */ # define DH_CHECK_P_NOT_PRIME 0x01 # define DH_CHECK_P_NOT_SAFE_PRIME 0x02 # define DH_UNABLE_TO_CHECK_GENERATOR 0x04 # define DH_NOT_SUITABLE_GENERATOR 0x08 # define DH_CHECK_Q_NOT_PRIME 0x10 # define DH_CHECK_INVALID_Q_VALUE 0x20 /* +DH_check_pub_key */ # define DH_CHECK_INVALID_J_VALUE 0x40 /* DH_MODULUS_TOO_SMALL is 0x80 upstream */ # define DH_MODULUS_TOO_LARGE 0x100 /* +DH_check_pub_key */ /* DH_check_pub_key error codes */ # define DH_CHECK_PUBKEY_TOO_SMALL 0x01 # define DH_CHECK_PUBKEY_TOO_LARGE 0x02 # define DH_CHECK_PUBKEY_INVALID 0x04 /* * primes p where (p-1)/2 is prime too are called "safe"; we define this for * backward compatibility: */ # define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME # define d2i_DHparams_fp(fp,x) \ (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ (char *(*)())d2i_DHparams, \ (fp), \ (unsigned char **)(x)) # define i2d_DHparams_fp(fp,x) \ ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x)) # define d2i_DHparams_bio(bp,x) \ ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x) # define i2d_DHparams_bio(bp,x) \ ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x) # define d2i_DHxparams_fp(fp,x) \ (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ (char *(*)())d2i_DHxparams, \ (fp), \ (unsigned char **)(x)) # define i2d_DHxparams_fp(fp,x) \ ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x)) # define d2i_DHxparams_bio(bp,x) \ ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x) # define i2d_DHxparams_bio(bp,x) \ ASN1_i2d_bio_of_const(DH, i2d_DHxparams, bp, x) DH *DHparams_dup(DH *); const DH_METHOD *DH_OpenSSL(void); void DH_set_default_method(const DH_METHOD *meth); const DH_METHOD *DH_get_default_method(void); int DH_set_method(DH *dh, const DH_METHOD *meth); DH *DH_new_method(ENGINE *engine); DH *DH_new(void); void DH_free(DH *dh); int DH_up_ref(DH *dh); int DH_bits(const DH *dh); int DH_size(const DH *dh); int DH_security_bits(const DH *dh); #define DH_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef) int DH_set_ex_data(DH *d, int idx, void *arg); void *DH_get_ex_data(DH *d, int idx); /* Deprecated version */ DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator, void (*callback) (int, int, void *), void *cb_arg)) /* New version */ int DH_generate_parameters_ex(DH *dh, int prime_len, int generator, BN_GENCB *cb); int DH_check_params_ex(const DH *dh); int DH_check_ex(const DH *dh); int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); int DH_check_params(const DH *dh, int *ret); int DH_check(const DH *dh, int *codes); int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes); int DH_generate_key(DH *dh); int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh); DH *d2i_DHparams(DH **a, const unsigned char **pp, long length); int i2d_DHparams(const DH *a, unsigned char **pp); DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length); int i2d_DHxparams(const DH *a, unsigned char **pp); # ifndef OPENSSL_NO_STDIO int DHparams_print_fp(FILE *fp, const DH *x); # endif int DHparams_print(BIO *bp, const DH *x); /* RFC 5114 parameters */ DH *DH_get_1024_160(void); DH *DH_get_2048_224(void); DH *DH_get_2048_256(void); /* Named parameters, currently RFC7919 */ DH *DH_new_by_nid(int nid); int DH_get_nid(const DH *dh); # ifndef OPENSSL_NO_CMS /* RFC2631 KDF */ int DH_KDF_X9_42(unsigned char *out, size_t outlen, const unsigned char *Z, size_t Zlen, ASN1_OBJECT *key_oid, const unsigned char *ukm, size_t ukmlen, const EVP_MD *md); # endif void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); const BIGNUM *DH_get0_p(const DH *dh); const BIGNUM *DH_get0_q(const DH *dh); const BIGNUM *DH_get0_g(const DH *dh); const BIGNUM *DH_get0_priv_key(const DH *dh); const BIGNUM *DH_get0_pub_key(const DH *dh); void DH_clear_flags(DH *dh, int flags); int DH_test_flags(const DH *dh, int flags); void DH_set_flags(DH *dh, int flags); ENGINE *DH_get0_engine(DH *d); long DH_get_length(const DH *dh); int DH_set_length(DH *dh, long length); DH_METHOD *DH_meth_new(const char *name, int flags); void DH_meth_free(DH_METHOD *dhm); DH_METHOD *DH_meth_dup(const DH_METHOD *dhm); const char *DH_meth_get0_name(const DH_METHOD *dhm); int DH_meth_set1_name(DH_METHOD *dhm, const char *name); int DH_meth_get_flags(const DH_METHOD *dhm); int DH_meth_set_flags(DH_METHOD *dhm, int flags); void *DH_meth_get0_app_data(const DH_METHOD *dhm); int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data); int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *); int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key) (DH *)); int (*DH_meth_get_compute_key(const DH_METHOD *dhm)) (unsigned char *key, const BIGNUM *pub_key, DH *dh); int DH_meth_set_compute_key(DH_METHOD *dhm, int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh)); int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm)) (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *); int DH_meth_set_bn_mod_exp(DH_METHOD *dhm, int (*bn_mod_exp) (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *)); int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *); int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *)); int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *); int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *)); int (*DH_meth_get_generate_params(const DH_METHOD *dhm)) (DH *, int, int, BN_GENCB *); int DH_meth_set_generate_params(DH_METHOD *dhm, int (*generate_params) (DH *, int, int, BN_GENCB *)); # define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL) # define EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN, len, NULL) # define EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DH_PARAMGEN_TYPE, typ, NULL) # define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL) # define EVP_PKEY_CTX_set_dh_rfc5114(ctx, gen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) # define EVP_PKEY_CTX_set_dhx_rfc5114(ctx, gen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) # define EVP_PKEY_CTX_set_dh_nid(ctx, nid) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, \ EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_DH_NID, nid, NULL) # define EVP_PKEY_CTX_set_dh_pad(ctx, pad) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_DH_PAD, pad, NULL) # define EVP_PKEY_CTX_set_dh_kdf_type(ctx, kdf) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_DH_KDF_TYPE, kdf, NULL) # define EVP_PKEY_CTX_get_dh_kdf_type(ctx) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_DH_KDF_TYPE, -2, NULL) # define EVP_PKEY_CTX_set0_dh_kdf_oid(ctx, oid) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_DH_KDF_OID, 0, (void *)(oid)) # define EVP_PKEY_CTX_get0_dh_kdf_oid(ctx, poid) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_GET_DH_KDF_OID, 0, (void *)(poid)) # define EVP_PKEY_CTX_set_dh_kdf_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_DH_KDF_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_get_dh_kdf_md(ctx, pmd) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_GET_DH_KDF_MD, 0, (void *)(pmd)) # define EVP_PKEY_CTX_set_dh_kdf_outlen(ctx, len) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_DH_KDF_OUTLEN, len, NULL) # define EVP_PKEY_CTX_get_dh_kdf_outlen(ctx, plen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN, 0, (void *)(plen)) # define EVP_PKEY_CTX_set0_dh_kdf_ukm(ctx, p, plen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_DH_KDF_UKM, plen, (void *)(p)) # define EVP_PKEY_CTX_get0_dh_kdf_ukm(ctx, p) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_GET_DH_KDF_UKM, 0, (void *)(p)) # define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1) # define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2) # define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3) # define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4) # define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5) # define EVP_PKEY_CTRL_DH_KDF_TYPE (EVP_PKEY_ALG_CTRL + 6) # define EVP_PKEY_CTRL_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 7) # define EVP_PKEY_CTRL_GET_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 8) # define EVP_PKEY_CTRL_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 9) # define EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 10) # define EVP_PKEY_CTRL_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 11) # define EVP_PKEY_CTRL_GET_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 12) # define EVP_PKEY_CTRL_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 13) # define EVP_PKEY_CTRL_GET_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 14) # define EVP_PKEY_CTRL_DH_NID (EVP_PKEY_ALG_CTRL + 15) # define EVP_PKEY_CTRL_DH_PAD (EVP_PKEY_ALG_CTRL + 16) /* KDF types */ # define EVP_PKEY_DH_KDF_NONE 1 # ifndef OPENSSL_NO_CMS # define EVP_PKEY_DH_KDF_X9_42 2 # endif # ifdef __cplusplus } # endif # endif #endif PKZ5%#++openssl/store.hnu[/* * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OSSL_STORE_H # define HEADER_OSSL_STORE_H # include # include # include # include # ifdef __cplusplus extern "C" { # endif /*- * The main OSSL_STORE functions. * ------------------------------ * * These allow applications to open a channel to a resource with supported * data (keys, certs, crls, ...), read the data a piece at a time and decide * what to do with it, and finally close. */ typedef struct ossl_store_ctx_st OSSL_STORE_CTX; /* * Typedef for the OSSL_STORE_INFO post processing callback. This can be used * to massage the given OSSL_STORE_INFO, or to drop it entirely (by returning * NULL). */ typedef OSSL_STORE_INFO *(*OSSL_STORE_post_process_info_fn)(OSSL_STORE_INFO *, void *); /* * Open a channel given a URI. The given UI method will be used any time the * loader needs extra input, for example when a password or pin is needed, and * will be passed the same user data every time it's needed in this context. * * Returns a context reference which represents the channel to communicate * through. */ OSSL_STORE_CTX *OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, void *ui_data, OSSL_STORE_post_process_info_fn post_process, void *post_process_data); /* * Control / fine tune the OSSL_STORE channel. |cmd| determines what is to be * done, and depends on the underlying loader (use OSSL_STORE_get0_scheme to * determine which loader is used), except for common commands (see below). * Each command takes different arguments. */ int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, ... /* args */); int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, va_list args); /* * Common ctrl commands that different loaders may choose to support. */ /* int on = 0 or 1; STORE_ctrl(ctx, STORE_C_USE_SECMEM, &on); */ # define OSSL_STORE_C_USE_SECMEM 1 /* Where custom commands start */ # define OSSL_STORE_C_CUSTOM_START 100 /* * Read one data item (a key, a cert, a CRL) that is supported by the OSSL_STORE * functionality, given a context. * Returns a OSSL_STORE_INFO pointer, from which OpenSSL typed data can be * extracted with OSSL_STORE_INFO_get0_PKEY(), OSSL_STORE_INFO_get0_CERT(), ... * NULL is returned on error, which may include that the data found at the URI * can't be figured out for certain or is ambiguous. */ OSSL_STORE_INFO *OSSL_STORE_load(OSSL_STORE_CTX *ctx); /* * Check if end of data (end of file) is reached * Returns 1 on end, 0 otherwise. */ int OSSL_STORE_eof(OSSL_STORE_CTX *ctx); /* * Check if an error occurred * Returns 1 if it did, 0 otherwise. */ int OSSL_STORE_error(OSSL_STORE_CTX *ctx); /* * Close the channel * Returns 1 on success, 0 on error. */ int OSSL_STORE_close(OSSL_STORE_CTX *ctx); /*- * Extracting OpenSSL types from and creating new OSSL_STORE_INFOs * --------------------------------------------------------------- */ /* * Types of data that can be ossl_stored in a OSSL_STORE_INFO. * OSSL_STORE_INFO_NAME is typically found when getting a listing of * available "files" / "tokens" / what have you. */ # define OSSL_STORE_INFO_NAME 1 /* char * */ # define OSSL_STORE_INFO_PARAMS 2 /* EVP_PKEY * */ # define OSSL_STORE_INFO_PKEY 3 /* EVP_PKEY * */ # define OSSL_STORE_INFO_CERT 4 /* X509 * */ # define OSSL_STORE_INFO_CRL 5 /* X509_CRL * */ /* * Functions to generate OSSL_STORE_INFOs, one function for each type we * support having in them, as well as a generic constructor. * * In all cases, ownership of the object is transferred to the OSSL_STORE_INFO * and will therefore be freed when the OSSL_STORE_INFO is freed. */ OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name); int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc); OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params); OSSL_STORE_INFO *OSSL_STORE_INFO_new_PKEY(EVP_PKEY *pkey); OSSL_STORE_INFO *OSSL_STORE_INFO_new_CERT(X509 *x509); OSSL_STORE_INFO *OSSL_STORE_INFO_new_CRL(X509_CRL *crl); /* * Functions to try to extract data from a OSSL_STORE_INFO. */ int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info); const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info); char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info); const char *OSSL_STORE_INFO_get0_NAME_description(const OSSL_STORE_INFO *info); char *OSSL_STORE_INFO_get1_NAME_description(const OSSL_STORE_INFO *info); EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info); EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info); EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info); EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info); X509 *OSSL_STORE_INFO_get0_CERT(const OSSL_STORE_INFO *info); X509 *OSSL_STORE_INFO_get1_CERT(const OSSL_STORE_INFO *info); X509_CRL *OSSL_STORE_INFO_get0_CRL(const OSSL_STORE_INFO *info); X509_CRL *OSSL_STORE_INFO_get1_CRL(const OSSL_STORE_INFO *info); const char *OSSL_STORE_INFO_type_string(int type); /* * Free the OSSL_STORE_INFO */ void OSSL_STORE_INFO_free(OSSL_STORE_INFO *info); /*- * Functions to construct a search URI from a base URI and search criteria * ----------------------------------------------------------------------- */ /* OSSL_STORE search types */ # define OSSL_STORE_SEARCH_BY_NAME 1 /* subject in certs, issuer in CRLs */ # define OSSL_STORE_SEARCH_BY_ISSUER_SERIAL 2 # define OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 3 # define OSSL_STORE_SEARCH_BY_ALIAS 4 /* To check what search types the scheme handler supports */ int OSSL_STORE_supports_search(OSSL_STORE_CTX *ctx, int search_type); /* Search term constructors */ /* * The input is considered to be owned by the caller, and must therefore * remain present throughout the lifetime of the returned OSSL_STORE_SEARCH */ OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_name(X509_NAME *name); OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_issuer_serial(X509_NAME *name, const ASN1_INTEGER *serial); OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_key_fingerprint(const EVP_MD *digest, const unsigned char *bytes, size_t len); OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_alias(const char *alias); /* Search term destructor */ void OSSL_STORE_SEARCH_free(OSSL_STORE_SEARCH *search); /* Search term accessors */ int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion); X509_NAME *OSSL_STORE_SEARCH_get0_name(OSSL_STORE_SEARCH *criterion); const ASN1_INTEGER *OSSL_STORE_SEARCH_get0_serial(const OSSL_STORE_SEARCH *criterion); const unsigned char *OSSL_STORE_SEARCH_get0_bytes(const OSSL_STORE_SEARCH *criterion, size_t *length); const char *OSSL_STORE_SEARCH_get0_string(const OSSL_STORE_SEARCH *criterion); const EVP_MD *OSSL_STORE_SEARCH_get0_digest(const OSSL_STORE_SEARCH *criterion); /* * Add search criterion and expected return type (which can be unspecified) * to the loading channel. This MUST happen before the first OSSL_STORE_load(). */ int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type); int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search); /*- * Function to register a loader for the given URI scheme. * ------------------------------------------------------- * * The loader receives all the main components of an URI except for the * scheme. */ typedef struct ossl_store_loader_st OSSL_STORE_LOADER; OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme); const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); const char *OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); /* struct ossl_store_loader_ctx_st is defined differently by each loader */ typedef struct ossl_store_loader_ctx_st OSSL_STORE_LOADER_CTX; typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_fn)(const OSSL_STORE_LOADER *loader, const char *uri, const UI_METHOD *ui_method, void *ui_data); int OSSL_STORE_LOADER_set_open(OSSL_STORE_LOADER *loader, OSSL_STORE_open_fn open_function); typedef int (*OSSL_STORE_ctrl_fn)(OSSL_STORE_LOADER_CTX *ctx, int cmd, va_list args); int OSSL_STORE_LOADER_set_ctrl(OSSL_STORE_LOADER *loader, OSSL_STORE_ctrl_fn ctrl_function); typedef int (*OSSL_STORE_expect_fn)(OSSL_STORE_LOADER_CTX *ctx, int expected); int OSSL_STORE_LOADER_set_expect(OSSL_STORE_LOADER *loader, OSSL_STORE_expect_fn expect_function); typedef int (*OSSL_STORE_find_fn)(OSSL_STORE_LOADER_CTX *ctx, OSSL_STORE_SEARCH *criteria); int OSSL_STORE_LOADER_set_find(OSSL_STORE_LOADER *loader, OSSL_STORE_find_fn find_function); typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn)(OSSL_STORE_LOADER_CTX *ctx, const UI_METHOD *ui_method, void *ui_data); int OSSL_STORE_LOADER_set_load(OSSL_STORE_LOADER *loader, OSSL_STORE_load_fn load_function); typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx); int OSSL_STORE_LOADER_set_eof(OSSL_STORE_LOADER *loader, OSSL_STORE_eof_fn eof_function); typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx); int OSSL_STORE_LOADER_set_error(OSSL_STORE_LOADER *loader, OSSL_STORE_error_fn error_function); typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx); int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader, OSSL_STORE_close_fn close_function); void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader); int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader); OSSL_STORE_LOADER *OSSL_STORE_unregister_loader(const char *scheme); /*- * Functions to list STORE loaders * ------------------------------- */ int OSSL_STORE_do_all_loaders(void (*do_function) (const OSSL_STORE_LOADER *loader, void *do_arg), void *do_arg); # ifdef __cplusplus } # endif #endif PKZ.44openssl/buffererr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_BUFERR_H # define HEADER_BUFERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_BUF_strings(void); /* * BUF function codes. */ # define BUF_F_BUF_MEM_GROW 100 # define BUF_F_BUF_MEM_GROW_CLEAN 105 # define BUF_F_BUF_MEM_NEW 101 /* * BUF reason codes. */ #endif PKZM? openssl/asn1_mac.hnu[/* * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #error "This file is obsolete; please update your software." PKZ!mopenssl/conf_api.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CONF_API_H # define HEADER_CONF_API_H # include # include #ifdef __cplusplus extern "C" { #endif /* Up until OpenSSL 0.9.5a, this was new_section */ CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); /* Up until OpenSSL 0.9.5a, this was get_section */ CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, const char *section); int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); char *_CONF_get_string(const CONF *conf, const char *section, const char *name); long _CONF_get_number(const CONF *conf, const char *section, const char *name); int _CONF_new_data(CONF *conf); void _CONF_free_data(CONF *conf); #ifdef __cplusplus } #endif #endif PKZ1S88 openssl/ssl.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_SSL_H # define HEADER_SSL_H # include # include # include # include # if OPENSSL_API_COMPAT < 0x10100000L # include # include # include # endif # include # include # include # include # include # include # include # include #ifdef __cplusplus extern "C" { #endif /* OpenSSL version number for ASN.1 encoding of the session information */ /*- * Version 0 - initial version * Version 1 - added the optional peer certificate */ # define SSL_SESSION_ASN1_VERSION 0x0001 # define SSL_MAX_SSL_SESSION_ID_LENGTH 32 # define SSL_MAX_SID_CTX_LENGTH 32 # define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES (512/8) # define SSL_MAX_KEY_ARG_LENGTH 8 # define SSL_MAX_MASTER_KEY_LENGTH 48 /* The maximum number of encrypt/decrypt pipelines we can support */ # define SSL_MAX_PIPELINES 32 /* text strings for the ciphers */ /* These are used to specify which ciphers to use and not to use */ # define SSL_TXT_LOW "LOW" # define SSL_TXT_MEDIUM "MEDIUM" # define SSL_TXT_HIGH "HIGH" # define SSL_TXT_FIPS "FIPS" # define SSL_TXT_aNULL "aNULL" # define SSL_TXT_eNULL "eNULL" # define SSL_TXT_NULL "NULL" # define SSL_TXT_kRSA "kRSA" # define SSL_TXT_kDHr "kDHr"/* this cipher class has been removed */ # define SSL_TXT_kDHd "kDHd"/* this cipher class has been removed */ # define SSL_TXT_kDH "kDH"/* this cipher class has been removed */ # define SSL_TXT_kEDH "kEDH"/* alias for kDHE */ # define SSL_TXT_kDHE "kDHE" # define SSL_TXT_kECDHr "kECDHr"/* this cipher class has been removed */ # define SSL_TXT_kECDHe "kECDHe"/* this cipher class has been removed */ # define SSL_TXT_kECDH "kECDH"/* this cipher class has been removed */ # define SSL_TXT_kEECDH "kEECDH"/* alias for kECDHE */ # define SSL_TXT_kECDHE "kECDHE" # define SSL_TXT_kPSK "kPSK" # define SSL_TXT_kRSAPSK "kRSAPSK" # define SSL_TXT_kECDHEPSK "kECDHEPSK" # define SSL_TXT_kDHEPSK "kDHEPSK" # define SSL_TXT_kGOST "kGOST" # define SSL_TXT_kSRP "kSRP" # define SSL_TXT_aRSA "aRSA" # define SSL_TXT_aDSS "aDSS" # define SSL_TXT_aDH "aDH"/* this cipher class has been removed */ # define SSL_TXT_aECDH "aECDH"/* this cipher class has been removed */ # define SSL_TXT_aECDSA "aECDSA" # define SSL_TXT_aPSK "aPSK" # define SSL_TXT_aGOST94 "aGOST94" # define SSL_TXT_aGOST01 "aGOST01" # define SSL_TXT_aGOST12 "aGOST12" # define SSL_TXT_aGOST "aGOST" # define SSL_TXT_aSRP "aSRP" # define SSL_TXT_DSS "DSS" # define SSL_TXT_DH "DH" # define SSL_TXT_DHE "DHE"/* same as "kDHE:-ADH" */ # define SSL_TXT_EDH "EDH"/* alias for DHE */ # define SSL_TXT_ADH "ADH" # define SSL_TXT_RSA "RSA" # define SSL_TXT_ECDH "ECDH" # define SSL_TXT_EECDH "EECDH"/* alias for ECDHE" */ # define SSL_TXT_ECDHE "ECDHE"/* same as "kECDHE:-AECDH" */ # define SSL_TXT_AECDH "AECDH" # define SSL_TXT_ECDSA "ECDSA" # define SSL_TXT_PSK "PSK" # define SSL_TXT_SRP "SRP" # define SSL_TXT_DES "DES" # define SSL_TXT_3DES "3DES" # define SSL_TXT_RC4 "RC4" # define SSL_TXT_RC2 "RC2" # define SSL_TXT_IDEA "IDEA" # define SSL_TXT_SEED "SEED" # define SSL_TXT_AES128 "AES128" # define SSL_TXT_AES256 "AES256" # define SSL_TXT_AES "AES" # define SSL_TXT_AES_GCM "AESGCM" # define SSL_TXT_AES_CCM "AESCCM" # define SSL_TXT_AES_CCM_8 "AESCCM8" # define SSL_TXT_CAMELLIA128 "CAMELLIA128" # define SSL_TXT_CAMELLIA256 "CAMELLIA256" # define SSL_TXT_CAMELLIA "CAMELLIA" # define SSL_TXT_CHACHA20 "CHACHA20" # define SSL_TXT_GOST "GOST89" # define SSL_TXT_ARIA "ARIA" # define SSL_TXT_ARIA_GCM "ARIAGCM" # define SSL_TXT_ARIA128 "ARIA128" # define SSL_TXT_ARIA256 "ARIA256" # define SSL_TXT_MD5 "MD5" # define SSL_TXT_SHA1 "SHA1" # define SSL_TXT_SHA "SHA"/* same as "SHA1" */ # define SSL_TXT_GOST94 "GOST94" # define SSL_TXT_GOST89MAC "GOST89MAC" # define SSL_TXT_GOST12 "GOST12" # define SSL_TXT_GOST89MAC12 "GOST89MAC12" # define SSL_TXT_SHA256 "SHA256" # define SSL_TXT_SHA384 "SHA384" # define SSL_TXT_SSLV3 "SSLv3" # define SSL_TXT_TLSV1 "TLSv1" # define SSL_TXT_TLSV1_1 "TLSv1.1" # define SSL_TXT_TLSV1_2 "TLSv1.2" # define SSL_TXT_ALL "ALL" /*- * COMPLEMENTOF* definitions. These identifiers are used to (de-select) * ciphers normally not being used. * Example: "RC4" will activate all ciphers using RC4 including ciphers * without authentication, which would normally disabled by DEFAULT (due * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT" * will make sure that it is also disabled in the specific selection. * COMPLEMENTOF* identifiers are portable between version, as adjustments * to the default cipher setup will also be included here. * * COMPLEMENTOFDEFAULT does not experience the same special treatment that * DEFAULT gets, as only selection is being done and no sorting as needed * for DEFAULT. */ # define SSL_TXT_CMPALL "COMPLEMENTOFALL" # define SSL_TXT_CMPDEF "COMPLEMENTOFDEFAULT" /* * The following cipher list is used by default. It also is substituted when * an application-defined cipher list string starts with 'DEFAULT'. * This applies to ciphersuites for TLSv1.2 and below. */ # define SSL_DEFAULT_CIPHER_LIST "ALL:!COMPLEMENTOFDEFAULT:!eNULL" /* This is the default set of TLSv1.3 ciphersuites */ # if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) # define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \ "TLS_CHACHA20_POLY1305_SHA256:" \ "TLS_AES_128_GCM_SHA256" # else # define TLS_DEFAULT_CIPHERSUITES "TLS_AES_256_GCM_SHA384:" \ "TLS_AES_128_GCM_SHA256" #endif /* * As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always * starts with a reasonable order, and all we have to do for DEFAULT is * throwing out anonymous and unencrypted ciphersuites! (The latter are not * actually enabled by ALL, but "ALL:RSA" would enable some of them.) */ # ifdef SYSTEM_CIPHERS_FILE # define SSL_SYSTEM_DEFAULT_CIPHER_LIST "PROFILE=SYSTEM" # else # define SSL_SYSTEM_DEFAULT_CIPHER_LIST SSL_DEFAULT_CIPHER_LIST # endif /* Used in SSL_set_shutdown()/SSL_get_shutdown(); */ # define SSL_SENT_SHUTDOWN 1 # define SSL_RECEIVED_SHUTDOWN 2 #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif # define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1 # define SSL_FILETYPE_PEM X509_FILETYPE_PEM /* * This is needed to stop compilers complaining about the 'struct ssl_st *' * function parameters used to prototype callbacks in SSL_CTX. */ typedef struct ssl_st *ssl_crock_st; typedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT; typedef struct ssl_method_st SSL_METHOD; typedef struct ssl_cipher_st SSL_CIPHER; typedef struct ssl_session_st SSL_SESSION; typedef struct tls_sigalgs_st TLS_SIGALGS; typedef struct ssl_conf_ctx_st SSL_CONF_CTX; typedef struct ssl_comp_st SSL_COMP; STACK_OF(SSL_CIPHER); STACK_OF(SSL_COMP); /* SRTP protection profiles for use with the use_srtp extension (RFC 5764)*/ typedef struct srtp_protection_profile_st { const char *name; unsigned long id; } SRTP_PROTECTION_PROFILE; DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE) typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data, int len, void *arg); typedef int (*tls_session_secret_cb_fn)(SSL *s, void *secret, int *secret_len, STACK_OF(SSL_CIPHER) *peer_ciphers, const SSL_CIPHER **cipher, void *arg); /* Extension context codes */ /* This extension is only allowed in TLS */ #define SSL_EXT_TLS_ONLY 0x0001 /* This extension is only allowed in DTLS */ #define SSL_EXT_DTLS_ONLY 0x0002 /* Some extensions may be allowed in DTLS but we don't implement them for it */ #define SSL_EXT_TLS_IMPLEMENTATION_ONLY 0x0004 /* Most extensions are not defined for SSLv3 but EXT_TYPE_renegotiate is */ #define SSL_EXT_SSL3_ALLOWED 0x0008 /* Extension is only defined for TLS1.2 and below */ #define SSL_EXT_TLS1_2_AND_BELOW_ONLY 0x0010 /* Extension is only defined for TLS1.3 and above */ #define SSL_EXT_TLS1_3_ONLY 0x0020 /* Ignore this extension during parsing if we are resuming */ #define SSL_EXT_IGNORE_ON_RESUMPTION 0x0040 #define SSL_EXT_CLIENT_HELLO 0x0080 /* Really means TLS1.2 or below */ #define SSL_EXT_TLS1_2_SERVER_HELLO 0x0100 #define SSL_EXT_TLS1_3_SERVER_HELLO 0x0200 #define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x0400 #define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x0800 #define SSL_EXT_TLS1_3_CERTIFICATE 0x1000 #define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x2000 #define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x4000 /* Typedefs for handling custom extensions */ typedef int (*custom_ext_add_cb)(SSL *s, unsigned int ext_type, const unsigned char **out, size_t *outlen, int *al, void *add_arg); typedef void (*custom_ext_free_cb)(SSL *s, unsigned int ext_type, const unsigned char *out, void *add_arg); typedef int (*custom_ext_parse_cb)(SSL *s, unsigned int ext_type, const unsigned char *in, size_t inlen, int *al, void *parse_arg); typedef int (*SSL_custom_ext_add_cb_ex)(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char **out, size_t *outlen, X509 *x, size_t chainidx, int *al, void *add_arg); typedef void (*SSL_custom_ext_free_cb_ex)(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char *out, void *add_arg); typedef int (*SSL_custom_ext_parse_cb_ex)(SSL *s, unsigned int ext_type, unsigned int context, const unsigned char *in, size_t inlen, X509 *x, size_t chainidx, int *al, void *parse_arg); /* Typedef for verification callback */ typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx); /* * Some values are reserved until OpenSSL 1.2.0 because they were previously * included in SSL_OP_ALL in a 1.1.x release. * * Reserved value (until OpenSSL 1.2.0) 0x00000001U * Reserved value (until OpenSSL 1.2.0) 0x00000002U */ /* Allow initial connection to servers that don't support RI */ # define SSL_OP_LEGACY_SERVER_CONNECT 0x00000004U /* Reserved value (until OpenSSL 1.2.0) 0x00000008U */ # define SSL_OP_TLSEXT_PADDING 0x00000010U /* Reserved value (until OpenSSL 1.2.0) 0x00000020U */ # define SSL_OP_SAFARI_ECDHE_ECDSA_BUG 0x00000040U /* * Reserved value (until OpenSSL 1.2.0) 0x00000080U * Reserved value (until OpenSSL 1.2.0) 0x00000100U * Reserved value (until OpenSSL 1.2.0) 0x00000200U */ /* In TLSv1.3 allow a non-(ec)dhe based kex_mode */ # define SSL_OP_ALLOW_NO_DHE_KEX 0x00000400U /* * Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added in * OpenSSL 0.9.6d. Usually (depending on the application protocol) the * workaround is not needed. Unfortunately some broken SSL/TLS * implementations cannot handle it at all, which is why we include it in * SSL_OP_ALL. Added in 0.9.6e */ # define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 0x00000800U /* DTLS options */ # define SSL_OP_NO_QUERY_MTU 0x00001000U /* Turn on Cookie Exchange (on relevant for servers) */ # define SSL_OP_COOKIE_EXCHANGE 0x00002000U /* Don't use RFC4507 ticket extension */ # define SSL_OP_NO_TICKET 0x00004000U # ifndef OPENSSL_NO_DTLS1_METHOD /* Use Cisco's "speshul" version of DTLS_BAD_VER * (only with deprecated DTLSv1_client_method()) */ # define SSL_OP_CISCO_ANYCONNECT 0x00008000U # endif /* As server, disallow session resumption on renegotiation */ # define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000U /* Don't use compression even if supported */ # define SSL_OP_NO_COMPRESSION 0x00020000U /* Permit unsafe legacy renegotiation */ # define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION 0x00040000U /* Disable encrypt-then-mac */ # define SSL_OP_NO_ENCRYPT_THEN_MAC 0x00080000U /* * Enable TLSv1.3 Compatibility mode. This is on by default. A future version * of OpenSSL may have this disabled by default. */ # define SSL_OP_ENABLE_MIDDLEBOX_COMPAT 0x00100000U /* Prioritize Chacha20Poly1305 when client does. * Modifies SSL_OP_CIPHER_SERVER_PREFERENCE */ # define SSL_OP_PRIORITIZE_CHACHA 0x00200000U /* * Set on servers to choose the cipher according to the server's preferences */ # define SSL_OP_CIPHER_SERVER_PREFERENCE 0x00400000U /* * If set, a server will allow a client to issue a SSLv3.0 version number as * latest version supported in the premaster secret, even when TLSv1.0 * (version 3.1) was announced in the client hello. Normally this is * forbidden to prevent version rollback attacks. */ # define SSL_OP_TLS_ROLLBACK_BUG 0x00800000U /* * Switches off automatic TLSv1.3 anti-replay protection for early data. This * is a server-side option only (no effect on the client). */ # define SSL_OP_NO_ANTI_REPLAY 0x01000000U # define SSL_OP_NO_SSLv3 0x02000000U # define SSL_OP_NO_TLSv1 0x04000000U # define SSL_OP_NO_TLSv1_2 0x08000000U # define SSL_OP_NO_TLSv1_1 0x10000000U # define SSL_OP_NO_TLSv1_3 0x20000000U # define SSL_OP_NO_DTLSv1 0x04000000U # define SSL_OP_NO_DTLSv1_2 0x08000000U # define SSL_OP_NO_SSL_MASK (SSL_OP_NO_SSLv3|\ SSL_OP_NO_TLSv1|SSL_OP_NO_TLSv1_1|SSL_OP_NO_TLSv1_2|SSL_OP_NO_TLSv1_3) # define SSL_OP_NO_DTLS_MASK (SSL_OP_NO_DTLSv1|SSL_OP_NO_DTLSv1_2) /* Disallow all renegotiation */ # define SSL_OP_NO_RENEGOTIATION 0x40000000U /* * Make server add server-hello extension from early version of cryptopro * draft, when GOST ciphersuite is negotiated. Required for interoperability * with CryptoPro CSP 3.x */ # define SSL_OP_CRYPTOPRO_TLSEXT_BUG 0x80000000U /* * SSL_OP_ALL: various bug workarounds that should be rather harmless. * This used to be 0x000FFFFFL before 0.9.7. * This used to be 0x80000BFFU before 1.1.1. */ # define SSL_OP_ALL (SSL_OP_CRYPTOPRO_TLSEXT_BUG|\ SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS|\ SSL_OP_LEGACY_SERVER_CONNECT|\ SSL_OP_TLSEXT_PADDING|\ SSL_OP_SAFARI_ECDHE_ECDSA_BUG) /* OBSOLETE OPTIONS: retained for compatibility */ /* Removed from OpenSSL 1.1.0. Was 0x00000001L */ /* Related to removed SSLv2. */ # define SSL_OP_MICROSOFT_SESS_ID_BUG 0x0 /* Removed from OpenSSL 1.1.0. Was 0x00000002L */ /* Related to removed SSLv2. */ # define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x0 /* Removed from OpenSSL 0.9.8q and 1.0.0c. Was 0x00000008L */ /* Dead forever, see CVE-2010-4180 */ # define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x0 /* Removed from OpenSSL 1.0.1h and 1.0.2. Was 0x00000010L */ /* Refers to ancient SSLREF and SSLv2. */ # define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x0 /* Removed from OpenSSL 1.1.0. Was 0x00000020 */ # define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x0 /* Removed from OpenSSL 0.9.7h and 0.9.8b. Was 0x00000040L */ # define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x0 /* Removed from OpenSSL 1.1.0. Was 0x00000080 */ /* Ancient SSLeay version. */ # define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x0 /* Removed from OpenSSL 1.1.0. Was 0x00000100L */ # define SSL_OP_TLS_D5_BUG 0x0 /* Removed from OpenSSL 1.1.0. Was 0x00000200L */ # define SSL_OP_TLS_BLOCK_PADDING_BUG 0x0 /* Removed from OpenSSL 1.1.0. Was 0x00080000L */ # define SSL_OP_SINGLE_ECDH_USE 0x0 /* Removed from OpenSSL 1.1.0. Was 0x00100000L */ # define SSL_OP_SINGLE_DH_USE 0x0 /* Removed from OpenSSL 1.0.1k and 1.0.2. Was 0x00200000L */ # define SSL_OP_EPHEMERAL_RSA 0x0 /* Removed from OpenSSL 1.1.0. Was 0x01000000L */ # define SSL_OP_NO_SSLv2 0x0 /* Removed from OpenSSL 1.0.1. Was 0x08000000L */ # define SSL_OP_PKCS1_CHECK_1 0x0 /* Removed from OpenSSL 1.0.1. Was 0x10000000L */ # define SSL_OP_PKCS1_CHECK_2 0x0 /* Removed from OpenSSL 1.1.0. Was 0x20000000L */ # define SSL_OP_NETSCAPE_CA_DN_BUG 0x0 /* Removed from OpenSSL 1.1.0. Was 0x40000000L */ # define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x0 /* * Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success * when just a single record has been written): */ # define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001U /* * Make it possible to retry SSL_write() with changed buffer location (buffer * contents must stay the same!); this is not the default to avoid the * misconception that non-blocking SSL_write() behaves like non-blocking * write(): */ # define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002U /* * Never bother the application with retries if the transport is blocking: */ # define SSL_MODE_AUTO_RETRY 0x00000004U /* Don't attempt to automatically build certificate chain */ # define SSL_MODE_NO_AUTO_CHAIN 0x00000008U /* * Save RAM by releasing read and write buffers when they're empty. (SSL3 and * TLS only.) Released buffers are freed. */ # define SSL_MODE_RELEASE_BUFFERS 0x00000010U /* * Send the current time in the Random fields of the ClientHello and * ServerHello records for compatibility with hypothetical implementations * that require it. */ # define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020U # define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040U /* * Send TLS_FALLBACK_SCSV in the ClientHello. To be set only by applications * that reconnect with a downgraded protocol version; see * draft-ietf-tls-downgrade-scsv-00 for details. DO NOT ENABLE THIS if your * application attempts a normal handshake. Only use this in explicit * fallback retries, following the guidance in * draft-ietf-tls-downgrade-scsv-00. */ # define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U /* * Support Asynchronous operation */ # define SSL_MODE_ASYNC 0x00000100U /* * When using DTLS/SCTP, include the terminating zero in the label * used for computing the endpoint-pair shared secret. Required for * interoperability with implementations having this bug like these * older version of OpenSSL: * - OpenSSL 1.0.0 series * - OpenSSL 1.0.1 series * - OpenSSL 1.0.2 series * - OpenSSL 1.1.0 series * - OpenSSL 1.1.1 and 1.1.1a */ # define SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG 0x00000400U /* Cert related flags */ /* * Many implementations ignore some aspects of the TLS standards such as * enforcing certificate chain algorithms. When this is set we enforce them. */ # define SSL_CERT_FLAG_TLS_STRICT 0x00000001U /* Suite B modes, takes same values as certificate verify flags */ # define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000 /* Suite B 192 bit only mode */ # define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000 /* Suite B 128 bit mode allowing 192 bit algorithms */ # define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000 /* Perform all sorts of protocol violations for testing purposes */ # define SSL_CERT_FLAG_BROKEN_PROTOCOL 0x10000000 /* Flags for building certificate chains */ /* Treat any existing certificates as untrusted CAs */ # define SSL_BUILD_CHAIN_FLAG_UNTRUSTED 0x1 /* Don't include root CA in chain */ # define SSL_BUILD_CHAIN_FLAG_NO_ROOT 0x2 /* Just check certificates already there */ # define SSL_BUILD_CHAIN_FLAG_CHECK 0x4 /* Ignore verification errors */ # define SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR 0x8 /* Clear verification errors from queue */ # define SSL_BUILD_CHAIN_FLAG_CLEAR_ERROR 0x10 /* Flags returned by SSL_check_chain */ /* Certificate can be used with this session */ # define CERT_PKEY_VALID 0x1 /* Certificate can also be used for signing */ # define CERT_PKEY_SIGN 0x2 /* EE certificate signing algorithm OK */ # define CERT_PKEY_EE_SIGNATURE 0x10 /* CA signature algorithms OK */ # define CERT_PKEY_CA_SIGNATURE 0x20 /* EE certificate parameters OK */ # define CERT_PKEY_EE_PARAM 0x40 /* CA certificate parameters OK */ # define CERT_PKEY_CA_PARAM 0x80 /* Signing explicitly allowed as opposed to SHA1 fallback */ # define CERT_PKEY_EXPLICIT_SIGN 0x100 /* Client CA issuer names match (always set for server cert) */ # define CERT_PKEY_ISSUER_NAME 0x200 /* Cert type matches client types (always set for server cert) */ # define CERT_PKEY_CERT_TYPE 0x400 /* Cert chain suitable to Suite B */ # define CERT_PKEY_SUITEB 0x800 # define SSL_CONF_FLAG_CMDLINE 0x1 # define SSL_CONF_FLAG_FILE 0x2 # define SSL_CONF_FLAG_CLIENT 0x4 # define SSL_CONF_FLAG_SERVER 0x8 # define SSL_CONF_FLAG_SHOW_ERRORS 0x10 # define SSL_CONF_FLAG_CERTIFICATE 0x20 # define SSL_CONF_FLAG_REQUIRE_PRIVATE 0x40 /* Configuration value types */ # define SSL_CONF_TYPE_UNKNOWN 0x0 # define SSL_CONF_TYPE_STRING 0x1 # define SSL_CONF_TYPE_FILE 0x2 # define SSL_CONF_TYPE_DIR 0x3 # define SSL_CONF_TYPE_NONE 0x4 /* Maximum length of the application-controlled segment of a a TLSv1.3 cookie */ # define SSL_COOKIE_LENGTH 4096 /* * Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, they * cannot be used to clear bits. */ unsigned long SSL_CTX_get_options(const SSL_CTX *ctx); unsigned long SSL_get_options(const SSL *s); unsigned long SSL_CTX_clear_options(SSL_CTX *ctx, unsigned long op); unsigned long SSL_clear_options(SSL *s, unsigned long op); unsigned long SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op); unsigned long SSL_set_options(SSL *s, unsigned long op); # define SSL_CTX_set_mode(ctx,op) \ SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL) # define SSL_CTX_clear_mode(ctx,op) \ SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_MODE,(op),NULL) # define SSL_CTX_get_mode(ctx) \ SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL) # define SSL_clear_mode(ssl,op) \ SSL_ctrl((ssl),SSL_CTRL_CLEAR_MODE,(op),NULL) # define SSL_set_mode(ssl,op) \ SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL) # define SSL_get_mode(ssl) \ SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL) # define SSL_set_mtu(ssl, mtu) \ SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL) # define DTLS_set_link_mtu(ssl, mtu) \ SSL_ctrl((ssl),DTLS_CTRL_SET_LINK_MTU,(mtu),NULL) # define DTLS_get_link_min_mtu(ssl) \ SSL_ctrl((ssl),DTLS_CTRL_GET_LINK_MIN_MTU,0,NULL) # define SSL_get_secure_renegotiation_support(ssl) \ SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL) # ifndef OPENSSL_NO_HEARTBEATS # define SSL_heartbeat(ssl) \ SSL_ctrl((ssl),SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT,0,NULL) # endif # define SSL_CTX_set_cert_flags(ctx,op) \ SSL_CTX_ctrl((ctx),SSL_CTRL_CERT_FLAGS,(op),NULL) # define SSL_set_cert_flags(s,op) \ SSL_ctrl((s),SSL_CTRL_CERT_FLAGS,(op),NULL) # define SSL_CTX_clear_cert_flags(ctx,op) \ SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_CERT_FLAGS,(op),NULL) # define SSL_clear_cert_flags(s,op) \ SSL_ctrl((s),SSL_CTRL_CLEAR_CERT_FLAGS,(op),NULL) void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb) (int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); void SSL_set_msg_callback(SSL *ssl, void (*cb) (int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); # define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) # define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) # define SSL_get_extms_support(s) \ SSL_ctrl((s),SSL_CTRL_GET_EXTMS_SUPPORT,0,NULL) # ifndef OPENSSL_NO_SRP /* see tls_srp.c */ __owur int SSL_SRP_CTX_init(SSL *s); __owur int SSL_CTX_SRP_CTX_init(SSL_CTX *ctx); int SSL_SRP_CTX_free(SSL *ctx); int SSL_CTX_SRP_CTX_free(SSL_CTX *ctx); __owur int SSL_srp_server_param_with_username(SSL *s, int *ad); __owur int SRP_Calc_A_param(SSL *s); # endif /* 100k max cert list */ # define SSL_MAX_CERT_LIST_DEFAULT 1024*100 # define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20) /* * This callback type is used inside SSL_CTX, SSL, and in the functions that * set them. It is used to override the generation of SSL/TLS session IDs in * a server. Return value should be zero on an error, non-zero to proceed. * Also, callbacks should themselves check if the id they generate is unique * otherwise the SSL handshake will fail with an error - callbacks can do * this using the 'ssl' value they're passed by; * SSL_has_matching_session_id(ssl, id, *id_len) The length value passed in * is set at the maximum size the session ID can be. In SSLv3/TLSv1 it is 32 * bytes. The callback can alter this length to be less if desired. It is * also an error for the callback to set the size to zero. */ typedef int (*GEN_SESSION_CB) (SSL *ssl, unsigned char *id, unsigned int *id_len); # define SSL_SESS_CACHE_OFF 0x0000 # define SSL_SESS_CACHE_CLIENT 0x0001 # define SSL_SESS_CACHE_SERVER 0x0002 # define SSL_SESS_CACHE_BOTH (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER) # define SSL_SESS_CACHE_NO_AUTO_CLEAR 0x0080 /* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */ # define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100 # define SSL_SESS_CACHE_NO_INTERNAL_STORE 0x0200 # define SSL_SESS_CACHE_NO_INTERNAL \ (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE) LHASH_OF(SSL_SESSION) *SSL_CTX_sessions(SSL_CTX *ctx); # define SSL_CTX_sess_number(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL) # define SSL_CTX_sess_connect(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL) # define SSL_CTX_sess_connect_good(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL) # define SSL_CTX_sess_connect_renegotiate(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL) # define SSL_CTX_sess_accept(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL) # define SSL_CTX_sess_accept_renegotiate(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL) # define SSL_CTX_sess_accept_good(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL) # define SSL_CTX_sess_hits(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL) # define SSL_CTX_sess_cb_hits(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL) # define SSL_CTX_sess_misses(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL) # define SSL_CTX_sess_timeouts(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL) # define SSL_CTX_sess_cache_full(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL) void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb) (struct ssl_st *ssl, SSL_SESSION *sess)); int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, SSL_SESSION *sess); void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*remove_session_cb) (struct ssl_ctx_st *ctx, SSL_SESSION *sess)); void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (struct ssl_ctx_st *ctx, SSL_SESSION *sess); void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*get_session_cb) (struct ssl_st *ssl, const unsigned char *data, int len, int *copy)); SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (struct ssl_st *ssl, const unsigned char *data, int len, int *copy); void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb) (const SSL *ssl, int type, int val)); void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type, int val); void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb) (SSL *ssl, X509 **x509, EVP_PKEY **pkey)); int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509, EVP_PKEY **pkey); # ifndef OPENSSL_NO_ENGINE __owur int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); # endif void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb) (SSL *ssl, unsigned char *cookie, unsigned int *cookie_len)); void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb) (SSL *ssl, const unsigned char *cookie, unsigned int cookie_len)); void SSL_CTX_set_stateless_cookie_generate_cb( SSL_CTX *ctx, int (*gen_stateless_cookie_cb) (SSL *ssl, unsigned char *cookie, size_t *cookie_len)); void SSL_CTX_set_stateless_cookie_verify_cb( SSL_CTX *ctx, int (*verify_stateless_cookie_cb) (SSL *ssl, const unsigned char *cookie, size_t cookie_len)); # ifndef OPENSSL_NO_NEXTPROTONEG typedef int (*SSL_CTX_npn_advertised_cb_func)(SSL *ssl, const unsigned char **out, unsigned int *outlen, void *arg); void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s, SSL_CTX_npn_advertised_cb_func cb, void *arg); # define SSL_CTX_set_npn_advertised_cb SSL_CTX_set_next_protos_advertised_cb typedef int (*SSL_CTX_npn_select_cb_func)(SSL *s, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg); void SSL_CTX_set_next_proto_select_cb(SSL_CTX *s, SSL_CTX_npn_select_cb_func cb, void *arg); # define SSL_CTX_set_npn_select_cb SSL_CTX_set_next_proto_select_cb void SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, unsigned *len); # define SSL_get0_npn_negotiated SSL_get0_next_proto_negotiated # endif __owur int SSL_select_next_proto(unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, const unsigned char *client, unsigned int client_len); # define OPENSSL_NPN_UNSUPPORTED 0 # define OPENSSL_NPN_NEGOTIATED 1 # define OPENSSL_NPN_NO_OVERLAP 2 __owur int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, unsigned int protos_len); __owur int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos, unsigned int protos_len); typedef int (*SSL_CTX_alpn_select_cb_func)(SSL *ssl, const unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg); void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx, SSL_CTX_alpn_select_cb_func cb, void *arg); void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data, unsigned int *len); # ifndef OPENSSL_NO_PSK /* * the maximum length of the buffer given to callbacks containing the * resulting identity/psk */ # define PSK_MAX_IDENTITY_LEN 128 # define PSK_MAX_PSK_LEN 256 typedef unsigned int (*SSL_psk_client_cb_func)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len); void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, SSL_psk_client_cb_func cb); void SSL_set_psk_client_callback(SSL *ssl, SSL_psk_client_cb_func cb); typedef unsigned int (*SSL_psk_server_cb_func)(SSL *ssl, const char *identity, unsigned char *psk, unsigned int max_psk_len); void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, SSL_psk_server_cb_func cb); void SSL_set_psk_server_callback(SSL *ssl, SSL_psk_server_cb_func cb); __owur int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint); __owur int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint); const char *SSL_get_psk_identity_hint(const SSL *s); const char *SSL_get_psk_identity(const SSL *s); # endif typedef int (*SSL_psk_find_session_cb_func)(SSL *ssl, const unsigned char *identity, size_t identity_len, SSL_SESSION **sess); typedef int (*SSL_psk_use_session_cb_func)(SSL *ssl, const EVP_MD *md, const unsigned char **id, size_t *idlen, SSL_SESSION **sess); void SSL_set_psk_find_session_callback(SSL *s, SSL_psk_find_session_cb_func cb); void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx, SSL_psk_find_session_cb_func cb); void SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb); void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx, SSL_psk_use_session_cb_func cb); /* Register callbacks to handle custom TLS Extensions for client or server. */ __owur int SSL_CTX_has_client_custom_ext(const SSL_CTX *ctx, unsigned int ext_type); __owur int SSL_CTX_add_client_custom_ext(SSL_CTX *ctx, unsigned int ext_type, custom_ext_add_cb add_cb, custom_ext_free_cb free_cb, void *add_arg, custom_ext_parse_cb parse_cb, void *parse_arg); __owur int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, unsigned int ext_type, custom_ext_add_cb add_cb, custom_ext_free_cb free_cb, void *add_arg, custom_ext_parse_cb parse_cb, void *parse_arg); __owur int SSL_CTX_add_custom_ext(SSL_CTX *ctx, unsigned int ext_type, unsigned int context, SSL_custom_ext_add_cb_ex add_cb, SSL_custom_ext_free_cb_ex free_cb, void *add_arg, SSL_custom_ext_parse_cb_ex parse_cb, void *parse_arg); __owur int SSL_extension_supported(unsigned int ext_type); # define SSL_NOTHING 1 # define SSL_WRITING 2 # define SSL_READING 3 # define SSL_X509_LOOKUP 4 # define SSL_ASYNC_PAUSED 5 # define SSL_ASYNC_NO_JOBS 6 # define SSL_CLIENT_HELLO_CB 7 /* These will only be used when doing non-blocking IO */ # define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING) # define SSL_want_read(s) (SSL_want(s) == SSL_READING) # define SSL_want_write(s) (SSL_want(s) == SSL_WRITING) # define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP) # define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED) # define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS) # define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB) # define SSL_MAC_FLAG_READ_MAC_STREAM 1 # define SSL_MAC_FLAG_WRITE_MAC_STREAM 2 /* * A callback for logging out TLS key material. This callback should log out * |line| followed by a newline. */ typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line); /* * SSL_CTX_set_keylog_callback configures a callback to log key material. This * is intended for debugging use with tools like Wireshark. The cb function * should log line followed by a newline. */ void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb); /* * SSL_CTX_get_keylog_callback returns the callback configured by * SSL_CTX_set_keylog_callback. */ SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx); int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data); uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx); int SSL_set_max_early_data(SSL *s, uint32_t max_early_data); uint32_t SSL_get_max_early_data(const SSL *s); int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data); uint32_t SSL_CTX_get_recv_max_early_data(const SSL_CTX *ctx); int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data); uint32_t SSL_get_recv_max_early_data(const SSL *s); #ifdef __cplusplus } #endif # include # include # include /* This is mostly sslv3 with a few tweaks */ # include /* Datagram TLS */ # include /* Support for the use_srtp extension */ #ifdef __cplusplus extern "C" { #endif /* * These need to be after the above set of includes due to a compiler bug * in VisualStudio 2015 */ DEFINE_STACK_OF_CONST(SSL_CIPHER) DEFINE_STACK_OF(SSL_COMP) /* compatibility */ # define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)(arg))) # define SSL_get_app_data(s) (SSL_get_ex_data(s,0)) # define SSL_SESSION_set_app_data(s,a) (SSL_SESSION_set_ex_data(s,0, \ (char *)(a))) # define SSL_SESSION_get_app_data(s) (SSL_SESSION_get_ex_data(s,0)) # define SSL_CTX_get_app_data(ctx) (SSL_CTX_get_ex_data(ctx,0)) # define SSL_CTX_set_app_data(ctx,arg) (SSL_CTX_set_ex_data(ctx,0, \ (char *)(arg))) DEPRECATEDIN_1_1_0(void SSL_set_debug(SSL *s, int debug)) /* TLSv1.3 KeyUpdate message types */ /* -1 used so that this is an invalid value for the on-the-wire protocol */ #define SSL_KEY_UPDATE_NONE -1 /* Values as defined for the on-the-wire protocol */ #define SSL_KEY_UPDATE_NOT_REQUESTED 0 #define SSL_KEY_UPDATE_REQUESTED 1 /* * The valid handshake states (one for each type message sent and one for each * type of message received). There are also two "special" states: * TLS = TLS or DTLS state * DTLS = DTLS specific state * CR/SR = Client Read/Server Read * CW/SW = Client Write/Server Write * * The "special" states are: * TLS_ST_BEFORE = No handshake has been initiated yet * TLS_ST_OK = A handshake has been successfully completed */ typedef enum { TLS_ST_BEFORE, TLS_ST_OK, DTLS_ST_CR_HELLO_VERIFY_REQUEST, TLS_ST_CR_SRVR_HELLO, TLS_ST_CR_CERT, TLS_ST_CR_CERT_STATUS, TLS_ST_CR_KEY_EXCH, TLS_ST_CR_CERT_REQ, TLS_ST_CR_SRVR_DONE, TLS_ST_CR_SESSION_TICKET, TLS_ST_CR_CHANGE, TLS_ST_CR_FINISHED, TLS_ST_CW_CLNT_HELLO, TLS_ST_CW_CERT, TLS_ST_CW_KEY_EXCH, TLS_ST_CW_CERT_VRFY, TLS_ST_CW_CHANGE, TLS_ST_CW_NEXT_PROTO, TLS_ST_CW_FINISHED, TLS_ST_SW_HELLO_REQ, TLS_ST_SR_CLNT_HELLO, DTLS_ST_SW_HELLO_VERIFY_REQUEST, TLS_ST_SW_SRVR_HELLO, TLS_ST_SW_CERT, TLS_ST_SW_KEY_EXCH, TLS_ST_SW_CERT_REQ, TLS_ST_SW_SRVR_DONE, TLS_ST_SR_CERT, TLS_ST_SR_KEY_EXCH, TLS_ST_SR_CERT_VRFY, TLS_ST_SR_NEXT_PROTO, TLS_ST_SR_CHANGE, TLS_ST_SR_FINISHED, TLS_ST_SW_SESSION_TICKET, TLS_ST_SW_CERT_STATUS, TLS_ST_SW_CHANGE, TLS_ST_SW_FINISHED, TLS_ST_SW_ENCRYPTED_EXTENSIONS, TLS_ST_CR_ENCRYPTED_EXTENSIONS, TLS_ST_CR_CERT_VRFY, TLS_ST_SW_CERT_VRFY, TLS_ST_CR_HELLO_REQ, TLS_ST_SW_KEY_UPDATE, TLS_ST_CW_KEY_UPDATE, TLS_ST_SR_KEY_UPDATE, TLS_ST_CR_KEY_UPDATE, TLS_ST_EARLY_DATA, TLS_ST_PENDING_EARLY_DATA_END, TLS_ST_CW_END_OF_EARLY_DATA, TLS_ST_SR_END_OF_EARLY_DATA } OSSL_HANDSHAKE_STATE; /* * Most of the following state values are no longer used and are defined to be * the closest equivalent value in the current state machine code. Not all * defines have an equivalent and are set to a dummy value (-1). SSL_ST_CONNECT * and SSL_ST_ACCEPT are still in use in the definition of SSL_CB_ACCEPT_LOOP, * SSL_CB_ACCEPT_EXIT, SSL_CB_CONNECT_LOOP and SSL_CB_CONNECT_EXIT. */ # define SSL_ST_CONNECT 0x1000 # define SSL_ST_ACCEPT 0x2000 # define SSL_ST_MASK 0x0FFF # define SSL_CB_LOOP 0x01 # define SSL_CB_EXIT 0x02 # define SSL_CB_READ 0x04 # define SSL_CB_WRITE 0x08 # define SSL_CB_ALERT 0x4000/* used in callback */ # define SSL_CB_READ_ALERT (SSL_CB_ALERT|SSL_CB_READ) # define SSL_CB_WRITE_ALERT (SSL_CB_ALERT|SSL_CB_WRITE) # define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT|SSL_CB_LOOP) # define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT|SSL_CB_EXIT) # define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT|SSL_CB_LOOP) # define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT|SSL_CB_EXIT) # define SSL_CB_HANDSHAKE_START 0x10 # define SSL_CB_HANDSHAKE_DONE 0x20 /* Is the SSL_connection established? */ # define SSL_in_connect_init(a) (SSL_in_init(a) && !SSL_is_server(a)) # define SSL_in_accept_init(a) (SSL_in_init(a) && SSL_is_server(a)) int SSL_in_init(const SSL *s); int SSL_in_before(const SSL *s); int SSL_is_init_finished(const SSL *s); /* * The following 3 states are kept in ssl->rlayer.rstate when reads fail, you * should not need these */ # define SSL_ST_READ_HEADER 0xF0 # define SSL_ST_READ_BODY 0xF1 # define SSL_ST_READ_DONE 0xF2 /*- * Obtain latest Finished message * -- that we sent (SSL_get_finished) * -- that we expected from peer (SSL_get_peer_finished). * Returns length (0 == no Finished so far), copies up to 'count' bytes. */ size_t SSL_get_finished(const SSL *s, void *buf, size_t count); size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count); /* * use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 3 options are * 'ored' with SSL_VERIFY_PEER if they are desired */ # define SSL_VERIFY_NONE 0x00 # define SSL_VERIFY_PEER 0x01 # define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02 # define SSL_VERIFY_CLIENT_ONCE 0x04 # define SSL_VERIFY_POST_HANDSHAKE 0x08 # if OPENSSL_API_COMPAT < 0x10100000L # define OpenSSL_add_ssl_algorithms() SSL_library_init() # define SSLeay_add_ssl_algorithms() SSL_library_init() # endif /* More backward compatibility */ # define SSL_get_cipher(s) \ SSL_CIPHER_get_name(SSL_get_current_cipher(s)) # define SSL_get_cipher_bits(s,np) \ SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np) # define SSL_get_cipher_version(s) \ SSL_CIPHER_get_version(SSL_get_current_cipher(s)) # define SSL_get_cipher_name(s) \ SSL_CIPHER_get_name(SSL_get_current_cipher(s)) # define SSL_get_time(a) SSL_SESSION_get_time(a) # define SSL_set_time(a,b) SSL_SESSION_set_time((a),(b)) # define SSL_get_timeout(a) SSL_SESSION_get_timeout(a) # define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b)) # define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id) # define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id) DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) # define SSL_AD_REASON_OFFSET 1000/* offset to get SSL_R_... value * from SSL_AD_... */ /* These alert types are for SSLv3 and TLSv1 */ # define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY /* fatal */ # define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE /* fatal */ # define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC # define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED # define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW /* fatal */ # define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE /* fatal */ # define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE /* Not for TLS */ # define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE # define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE # define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE # define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED # define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED # define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN /* fatal */ # define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER /* fatal */ # define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA /* fatal */ # define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED /* fatal */ # define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR # define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR /* fatal */ # define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION /* fatal */ # define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION /* fatal */ # define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY /* fatal */ # define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR # define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED # define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION # define SSL_AD_MISSING_EXTENSION TLS13_AD_MISSING_EXTENSION # define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED # define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION # define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE # define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME # define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE # define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE /* fatal */ # define SSL_AD_UNKNOWN_PSK_IDENTITY TLS1_AD_UNKNOWN_PSK_IDENTITY /* fatal */ # define SSL_AD_INAPPROPRIATE_FALLBACK TLS1_AD_INAPPROPRIATE_FALLBACK # define SSL_AD_NO_APPLICATION_PROTOCOL TLS1_AD_NO_APPLICATION_PROTOCOL # define SSL_ERROR_NONE 0 # define SSL_ERROR_SSL 1 # define SSL_ERROR_WANT_READ 2 # define SSL_ERROR_WANT_WRITE 3 # define SSL_ERROR_WANT_X509_LOOKUP 4 # define SSL_ERROR_SYSCALL 5/* look at error stack/return * value/errno */ # define SSL_ERROR_ZERO_RETURN 6 # define SSL_ERROR_WANT_CONNECT 7 # define SSL_ERROR_WANT_ACCEPT 8 # define SSL_ERROR_WANT_ASYNC 9 # define SSL_ERROR_WANT_ASYNC_JOB 10 # define SSL_ERROR_WANT_CLIENT_HELLO_CB 11 # define SSL_CTRL_SET_TMP_DH 3 # define SSL_CTRL_SET_TMP_ECDH 4 # define SSL_CTRL_SET_TMP_DH_CB 6 # define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9 # define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10 # define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11 # define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12 # define SSL_CTRL_GET_FLAGS 13 # define SSL_CTRL_EXTRA_CHAIN_CERT 14 # define SSL_CTRL_SET_MSG_CALLBACK 15 # define SSL_CTRL_SET_MSG_CALLBACK_ARG 16 /* only applies to datagram connections */ # define SSL_CTRL_SET_MTU 17 /* Stats */ # define SSL_CTRL_SESS_NUMBER 20 # define SSL_CTRL_SESS_CONNECT 21 # define SSL_CTRL_SESS_CONNECT_GOOD 22 # define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23 # define SSL_CTRL_SESS_ACCEPT 24 # define SSL_CTRL_SESS_ACCEPT_GOOD 25 # define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26 # define SSL_CTRL_SESS_HIT 27 # define SSL_CTRL_SESS_CB_HIT 28 # define SSL_CTRL_SESS_MISSES 29 # define SSL_CTRL_SESS_TIMEOUTS 30 # define SSL_CTRL_SESS_CACHE_FULL 31 # define SSL_CTRL_MODE 33 # define SSL_CTRL_GET_READ_AHEAD 40 # define SSL_CTRL_SET_READ_AHEAD 41 # define SSL_CTRL_SET_SESS_CACHE_SIZE 42 # define SSL_CTRL_GET_SESS_CACHE_SIZE 43 # define SSL_CTRL_SET_SESS_CACHE_MODE 44 # define SSL_CTRL_GET_SESS_CACHE_MODE 45 # define SSL_CTRL_GET_MAX_CERT_LIST 50 # define SSL_CTRL_SET_MAX_CERT_LIST 51 # define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52 /* see tls1.h for macros based on these */ # define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53 # define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54 # define SSL_CTRL_SET_TLSEXT_HOSTNAME 55 # define SSL_CTRL_SET_TLSEXT_DEBUG_CB 56 # define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57 # define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58 # define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59 /*# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT 60 */ /*# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB 61 */ /*# define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG 62 */ # define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB 63 # define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64 # define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65 # define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66 # define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67 # define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68 # define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69 # define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70 # define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71 # define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB 72 # define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB 75 # define SSL_CTRL_SET_SRP_VERIFY_PARAM_CB 76 # define SSL_CTRL_SET_SRP_GIVE_CLIENT_PWD_CB 77 # define SSL_CTRL_SET_SRP_ARG 78 # define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79 # define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH 80 # define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81 # ifndef OPENSSL_NO_HEARTBEATS # define SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT 85 # define SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING 86 # define SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS 87 # endif # define DTLS_CTRL_GET_TIMEOUT 73 # define DTLS_CTRL_HANDLE_TIMEOUT 74 # define SSL_CTRL_GET_RI_SUPPORT 76 # define SSL_CTRL_CLEAR_MODE 78 # define SSL_CTRL_SET_NOT_RESUMABLE_SESS_CB 79 # define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82 # define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS 83 # define SSL_CTRL_CHAIN 88 # define SSL_CTRL_CHAIN_CERT 89 # define SSL_CTRL_GET_GROUPS 90 # define SSL_CTRL_SET_GROUPS 91 # define SSL_CTRL_SET_GROUPS_LIST 92 # define SSL_CTRL_GET_SHARED_GROUP 93 # define SSL_CTRL_SET_SIGALGS 97 # define SSL_CTRL_SET_SIGALGS_LIST 98 # define SSL_CTRL_CERT_FLAGS 99 # define SSL_CTRL_CLEAR_CERT_FLAGS 100 # define SSL_CTRL_SET_CLIENT_SIGALGS 101 # define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102 # define SSL_CTRL_GET_CLIENT_CERT_TYPES 103 # define SSL_CTRL_SET_CLIENT_CERT_TYPES 104 # define SSL_CTRL_BUILD_CERT_CHAIN 105 # define SSL_CTRL_SET_VERIFY_CERT_STORE 106 # define SSL_CTRL_SET_CHAIN_CERT_STORE 107 # define SSL_CTRL_GET_PEER_SIGNATURE_NID 108 # define SSL_CTRL_GET_PEER_TMP_KEY 109 # define SSL_CTRL_GET_RAW_CIPHERLIST 110 # define SSL_CTRL_GET_EC_POINT_FORMATS 111 # define SSL_CTRL_GET_CHAIN_CERTS 115 # define SSL_CTRL_SELECT_CURRENT_CERT 116 # define SSL_CTRL_SET_CURRENT_CERT 117 # define SSL_CTRL_SET_DH_AUTO 118 # define DTLS_CTRL_SET_LINK_MTU 120 # define DTLS_CTRL_GET_LINK_MIN_MTU 121 # define SSL_CTRL_GET_EXTMS_SUPPORT 122 # define SSL_CTRL_SET_MIN_PROTO_VERSION 123 # define SSL_CTRL_SET_MAX_PROTO_VERSION 124 # define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125 # define SSL_CTRL_SET_MAX_PIPELINES 126 # define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127 # define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128 # define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129 # define SSL_CTRL_GET_MIN_PROTO_VERSION 130 # define SSL_CTRL_GET_MAX_PROTO_VERSION 131 # define SSL_CTRL_GET_SIGNATURE_NID 132 # define SSL_CTRL_GET_TMP_KEY 133 # define SSL_CERT_SET_FIRST 1 # define SSL_CERT_SET_NEXT 2 # define SSL_CERT_SET_SERVER 3 # define DTLSv1_get_timeout(ssl, arg) \ SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)(arg)) # define DTLSv1_handle_timeout(ssl) \ SSL_ctrl(ssl,DTLS_CTRL_HANDLE_TIMEOUT,0, NULL) # define SSL_num_renegotiations(ssl) \ SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL) # define SSL_clear_num_renegotiations(ssl) \ SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL) # define SSL_total_renegotiations(ssl) \ SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL) # define SSL_CTX_set_tmp_dh(ctx,dh) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)(dh)) # define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh)) # define SSL_CTX_set_dh_auto(ctx, onoff) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_DH_AUTO,onoff,NULL) # define SSL_set_dh_auto(s, onoff) \ SSL_ctrl(s,SSL_CTRL_SET_DH_AUTO,onoff,NULL) # define SSL_set_tmp_dh(ssl,dh) \ SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)(dh)) # define SSL_set_tmp_ecdh(ssl,ecdh) \ SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh)) # define SSL_CTX_add_extra_chain_cert(ctx,x509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)(x509)) # define SSL_CTX_get_extra_chain_certs(ctx,px509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_EXTRA_CHAIN_CERTS,0,px509) # define SSL_CTX_get_extra_chain_certs_only(ctx,px509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_EXTRA_CHAIN_CERTS,1,px509) # define SSL_CTX_clear_extra_chain_certs(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS,0,NULL) # define SSL_CTX_set0_chain(ctx,sk) \ SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN,0,(char *)(sk)) # define SSL_CTX_set1_chain(ctx,sk) \ SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN,1,(char *)(sk)) # define SSL_CTX_add0_chain_cert(ctx,x509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN_CERT,0,(char *)(x509)) # define SSL_CTX_add1_chain_cert(ctx,x509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_CHAIN_CERT,1,(char *)(x509)) # define SSL_CTX_get0_chain_certs(ctx,px509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_CHAIN_CERTS,0,px509) # define SSL_CTX_clear_chain_certs(ctx) \ SSL_CTX_set0_chain(ctx,NULL) # define SSL_CTX_build_cert_chain(ctx, flags) \ SSL_CTX_ctrl(ctx,SSL_CTRL_BUILD_CERT_CHAIN, flags, NULL) # define SSL_CTX_select_current_cert(ctx,x509) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SELECT_CURRENT_CERT,0,(char *)(x509)) # define SSL_CTX_set_current_cert(ctx, op) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CURRENT_CERT, op, NULL) # define SSL_CTX_set0_verify_cert_store(ctx,st) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_VERIFY_CERT_STORE,0,(char *)(st)) # define SSL_CTX_set1_verify_cert_store(ctx,st) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_VERIFY_CERT_STORE,1,(char *)(st)) # define SSL_CTX_set0_chain_cert_store(ctx,st) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CHAIN_CERT_STORE,0,(char *)(st)) # define SSL_CTX_set1_chain_cert_store(ctx,st) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CHAIN_CERT_STORE,1,(char *)(st)) # define SSL_set0_chain(s,sk) \ SSL_ctrl(s,SSL_CTRL_CHAIN,0,(char *)(sk)) # define SSL_set1_chain(s,sk) \ SSL_ctrl(s,SSL_CTRL_CHAIN,1,(char *)(sk)) # define SSL_add0_chain_cert(s,x509) \ SSL_ctrl(s,SSL_CTRL_CHAIN_CERT,0,(char *)(x509)) # define SSL_add1_chain_cert(s,x509) \ SSL_ctrl(s,SSL_CTRL_CHAIN_CERT,1,(char *)(x509)) # define SSL_get0_chain_certs(s,px509) \ SSL_ctrl(s,SSL_CTRL_GET_CHAIN_CERTS,0,px509) # define SSL_clear_chain_certs(s) \ SSL_set0_chain(s,NULL) # define SSL_build_cert_chain(s, flags) \ SSL_ctrl(s,SSL_CTRL_BUILD_CERT_CHAIN, flags, NULL) # define SSL_select_current_cert(s,x509) \ SSL_ctrl(s,SSL_CTRL_SELECT_CURRENT_CERT,0,(char *)(x509)) # define SSL_set_current_cert(s,op) \ SSL_ctrl(s,SSL_CTRL_SET_CURRENT_CERT, op, NULL) # define SSL_set0_verify_cert_store(s,st) \ SSL_ctrl(s,SSL_CTRL_SET_VERIFY_CERT_STORE,0,(char *)(st)) # define SSL_set1_verify_cert_store(s,st) \ SSL_ctrl(s,SSL_CTRL_SET_VERIFY_CERT_STORE,1,(char *)(st)) # define SSL_set0_chain_cert_store(s,st) \ SSL_ctrl(s,SSL_CTRL_SET_CHAIN_CERT_STORE,0,(char *)(st)) # define SSL_set1_chain_cert_store(s,st) \ SSL_ctrl(s,SSL_CTRL_SET_CHAIN_CERT_STORE,1,(char *)(st)) # define SSL_get1_groups(s, glist) \ SSL_ctrl(s,SSL_CTRL_GET_GROUPS,0,(int*)(glist)) # define SSL_CTX_set1_groups(ctx, glist, glistlen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS,glistlen,(int *)(glist)) # define SSL_CTX_set1_groups_list(ctx, s) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_GROUPS_LIST,0,(char *)(s)) # define SSL_set1_groups(s, glist, glistlen) \ SSL_ctrl(s,SSL_CTRL_SET_GROUPS,glistlen,(char *)(glist)) # define SSL_set1_groups_list(s, str) \ SSL_ctrl(s,SSL_CTRL_SET_GROUPS_LIST,0,(char *)(str)) # define SSL_get_shared_group(s, n) \ SSL_ctrl(s,SSL_CTRL_GET_SHARED_GROUP,n,NULL) # define SSL_CTX_set1_sigalgs(ctx, slist, slistlen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS,slistlen,(int *)(slist)) # define SSL_CTX_set1_sigalgs_list(ctx, s) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)(s)) # define SSL_set1_sigalgs(s, slist, slistlen) \ SSL_ctrl(s,SSL_CTRL_SET_SIGALGS,slistlen,(int *)(slist)) # define SSL_set1_sigalgs_list(s, str) \ SSL_ctrl(s,SSL_CTRL_SET_SIGALGS_LIST,0,(char *)(str)) # define SSL_CTX_set1_client_sigalgs(ctx, slist, slistlen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS,slistlen,(int *)(slist)) # define SSL_CTX_set1_client_sigalgs_list(ctx, s) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_SIGALGS_LIST,0,(char *)(s)) # define SSL_set1_client_sigalgs(s, slist, slistlen) \ SSL_ctrl(s,SSL_CTRL_SET_CLIENT_SIGALGS,slistlen,(int *)(slist)) # define SSL_set1_client_sigalgs_list(s, str) \ SSL_ctrl(s,SSL_CTRL_SET_CLIENT_SIGALGS_LIST,0,(char *)(str)) # define SSL_get0_certificate_types(s, clist) \ SSL_ctrl(s, SSL_CTRL_GET_CLIENT_CERT_TYPES, 0, (char *)(clist)) # define SSL_CTX_set1_client_certificate_types(ctx, clist, clistlen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen, \ (char *)(clist)) # define SSL_set1_client_certificate_types(s, clist, clistlen) \ SSL_ctrl(s,SSL_CTRL_SET_CLIENT_CERT_TYPES,clistlen,(char *)(clist)) # define SSL_get_signature_nid(s, pn) \ SSL_ctrl(s,SSL_CTRL_GET_SIGNATURE_NID,0,pn) # define SSL_get_peer_signature_nid(s, pn) \ SSL_ctrl(s,SSL_CTRL_GET_PEER_SIGNATURE_NID,0,pn) # define SSL_get_peer_tmp_key(s, pk) \ SSL_ctrl(s,SSL_CTRL_GET_PEER_TMP_KEY,0,pk) # define SSL_get_tmp_key(s, pk) \ SSL_ctrl(s,SSL_CTRL_GET_TMP_KEY,0,pk) # define SSL_get0_raw_cipherlist(s, plst) \ SSL_ctrl(s,SSL_CTRL_GET_RAW_CIPHERLIST,0,plst) # define SSL_get0_ec_point_formats(s, plst) \ SSL_ctrl(s,SSL_CTRL_GET_EC_POINT_FORMATS,0,plst) # define SSL_CTX_set_min_proto_version(ctx, version) \ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL) # define SSL_CTX_set_max_proto_version(ctx, version) \ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL) # define SSL_CTX_get_min_proto_version(ctx) \ SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, NULL) # define SSL_CTX_get_max_proto_version(ctx) \ SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) # define SSL_set_min_proto_version(s, version) \ SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL) # define SSL_set_max_proto_version(s, version) \ SSL_ctrl(s, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL) # define SSL_get_min_proto_version(s) \ SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, NULL) # define SSL_get_max_proto_version(s) \ SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) /* Backwards compatibility, original 1.1.0 names */ # define SSL_CTRL_GET_SERVER_TMP_KEY \ SSL_CTRL_GET_PEER_TMP_KEY # define SSL_get_server_tmp_key(s, pk) \ SSL_get_peer_tmp_key(s, pk) /* * The following symbol names are old and obsolete. They are kept * for compatibility reasons only and should not be used anymore. */ # define SSL_CTRL_GET_CURVES SSL_CTRL_GET_GROUPS # define SSL_CTRL_SET_CURVES SSL_CTRL_SET_GROUPS # define SSL_CTRL_SET_CURVES_LIST SSL_CTRL_SET_GROUPS_LIST # define SSL_CTRL_GET_SHARED_CURVE SSL_CTRL_GET_SHARED_GROUP # define SSL_get1_curves SSL_get1_groups # define SSL_CTX_set1_curves SSL_CTX_set1_groups # define SSL_CTX_set1_curves_list SSL_CTX_set1_groups_list # define SSL_set1_curves SSL_set1_groups # define SSL_set1_curves_list SSL_set1_groups_list # define SSL_get_shared_curve SSL_get_shared_group # if OPENSSL_API_COMPAT < 0x10100000L /* Provide some compatibility macros for removed functionality. */ # define SSL_CTX_need_tmp_RSA(ctx) 0 # define SSL_CTX_set_tmp_rsa(ctx,rsa) 1 # define SSL_need_tmp_RSA(ssl) 0 # define SSL_set_tmp_rsa(ssl,rsa) 1 # define SSL_CTX_set_ecdh_auto(dummy, onoff) ((onoff) != 0) # define SSL_set_ecdh_auto(dummy, onoff) ((onoff) != 0) /* * We "pretend" to call the callback to avoid warnings about unused static * functions. */ # define SSL_CTX_set_tmp_rsa_callback(ctx, cb) while(0) (cb)(NULL, 0, 0) # define SSL_set_tmp_rsa_callback(ssl, cb) while(0) (cb)(NULL, 0, 0) # endif __owur const BIO_METHOD *BIO_f_ssl(void); __owur BIO *BIO_new_ssl(SSL_CTX *ctx, int client); __owur BIO *BIO_new_ssl_connect(SSL_CTX *ctx); __owur BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx); __owur int BIO_ssl_copy_session_id(BIO *to, BIO *from); void BIO_ssl_shutdown(BIO *ssl_bio); __owur int SSL_CTX_set_cipher_list(SSL_CTX *, const char *str); __owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth); int SSL_CTX_up_ref(SSL_CTX *ctx); void SSL_CTX_free(SSL_CTX *); __owur long SSL_CTX_set_timeout(SSL_CTX *ctx, long t); __owur long SSL_CTX_get_timeout(const SSL_CTX *ctx); __owur X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *); void SSL_CTX_set_cert_store(SSL_CTX *, X509_STORE *); void SSL_CTX_set1_cert_store(SSL_CTX *, X509_STORE *); __owur int SSL_want(const SSL *s); __owur int SSL_clear(SSL *s); void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm); __owur const SSL_CIPHER *SSL_get_current_cipher(const SSL *s); __owur const SSL_CIPHER *SSL_get_pending_cipher(const SSL *s); __owur int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits); __owur const char *SSL_CIPHER_get_version(const SSL_CIPHER *c); __owur const char *SSL_CIPHER_get_name(const SSL_CIPHER *c); __owur const char *SSL_CIPHER_standard_name(const SSL_CIPHER *c); __owur const char *OPENSSL_cipher_name(const char *rfc_name); __owur uint32_t SSL_CIPHER_get_id(const SSL_CIPHER *c); __owur uint16_t SSL_CIPHER_get_protocol_id(const SSL_CIPHER *c); __owur int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c); __owur int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *c); __owur const EVP_MD *SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *c); __owur int SSL_CIPHER_is_aead(const SSL_CIPHER *c); __owur int SSL_get_fd(const SSL *s); __owur int SSL_get_rfd(const SSL *s); __owur int SSL_get_wfd(const SSL *s); __owur const char *SSL_get_cipher_list(const SSL *s, int n); __owur char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size); __owur int SSL_get_read_ahead(const SSL *s); __owur int SSL_pending(const SSL *s); __owur int SSL_has_pending(const SSL *s); # ifndef OPENSSL_NO_SOCK __owur int SSL_set_fd(SSL *s, int fd); __owur int SSL_set_rfd(SSL *s, int fd); __owur int SSL_set_wfd(SSL *s, int fd); # endif void SSL_set0_rbio(SSL *s, BIO *rbio); void SSL_set0_wbio(SSL *s, BIO *wbio); void SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio); __owur BIO *SSL_get_rbio(const SSL *s); __owur BIO *SSL_get_wbio(const SSL *s); __owur int SSL_set_cipher_list(SSL *s, const char *str); __owur int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str); __owur int SSL_set_ciphersuites(SSL *s, const char *str); void SSL_set_read_ahead(SSL *s, int yes); __owur int SSL_get_verify_mode(const SSL *s); __owur int SSL_get_verify_depth(const SSL *s); __owur SSL_verify_cb SSL_get_verify_callback(const SSL *s); void SSL_set_verify(SSL *s, int mode, SSL_verify_cb callback); void SSL_set_verify_depth(SSL *s, int depth); void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg); # ifndef OPENSSL_NO_RSA __owur int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa); __owur int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len); # endif __owur int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey); __owur int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d, long len); __owur int SSL_use_certificate(SSL *ssl, X509 *x); __owur int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len); __owur int SSL_use_cert_and_key(SSL *ssl, X509 *x509, EVP_PKEY *privatekey, STACK_OF(X509) *chain, int override); /* serverinfo file format versions */ # define SSL_SERVERINFOV1 1 # define SSL_SERVERINFOV2 2 /* Set serverinfo data for the current active cert. */ __owur int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo, size_t serverinfo_length); __owur int SSL_CTX_use_serverinfo_ex(SSL_CTX *ctx, unsigned int version, const unsigned char *serverinfo, size_t serverinfo_length); __owur int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file); #ifndef OPENSSL_NO_RSA __owur int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type); #endif __owur int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type); __owur int SSL_use_certificate_file(SSL *ssl, const char *file, int type); #ifndef OPENSSL_NO_RSA __owur int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type); #endif __owur int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type); __owur int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type); /* PEM type */ __owur int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); __owur int SSL_use_certificate_chain_file(SSL *ssl, const char *file); __owur STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); __owur int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, const char *file); int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs, const char *dir); # if OPENSSL_API_COMPAT < 0x10100000L # define SSL_load_error_strings() \ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \ | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) # endif __owur const char *SSL_state_string(const SSL *s); __owur const char *SSL_rstate_string(const SSL *s); __owur const char *SSL_state_string_long(const SSL *s); __owur const char *SSL_rstate_string_long(const SSL *s); __owur long SSL_SESSION_get_time(const SSL_SESSION *s); __owur long SSL_SESSION_set_time(SSL_SESSION *s, long t); __owur long SSL_SESSION_get_timeout(const SSL_SESSION *s); __owur long SSL_SESSION_set_timeout(SSL_SESSION *s, long t); __owur int SSL_SESSION_get_protocol_version(const SSL_SESSION *s); __owur int SSL_SESSION_set_protocol_version(SSL_SESSION *s, int version); __owur const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s); __owur int SSL_SESSION_set1_hostname(SSL_SESSION *s, const char *hostname); void SSL_SESSION_get0_alpn_selected(const SSL_SESSION *s, const unsigned char **alpn, size_t *len); __owur int SSL_SESSION_set1_alpn_selected(SSL_SESSION *s, const unsigned char *alpn, size_t len); __owur const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s); __owur int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher); __owur int SSL_SESSION_has_ticket(const SSL_SESSION *s); __owur unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s); void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, size_t *len); __owur uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s); __owur int SSL_SESSION_set_max_early_data(SSL_SESSION *s, uint32_t max_early_data); __owur int SSL_copy_session_id(SSL *to, const SSL *from); __owur X509 *SSL_SESSION_get0_peer(SSL_SESSION *s); __owur int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, unsigned int sid_ctx_len); __owur int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, unsigned int sid_len); __owur int SSL_SESSION_is_resumable(const SSL_SESSION *s); __owur SSL_SESSION *SSL_SESSION_new(void); __owur SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *src); const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len); const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s, unsigned int *len); __owur unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s); # ifndef OPENSSL_NO_STDIO int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses); # endif int SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses); int SSL_SESSION_print_keylog(BIO *bp, const SSL_SESSION *x); int SSL_SESSION_up_ref(SSL_SESSION *ses); void SSL_SESSION_free(SSL_SESSION *ses); __owur int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); __owur int SSL_set_session(SSL *to, SSL_SESSION *session); int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *session); int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *session); __owur int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb); __owur int SSL_set_generate_session_id(SSL *s, GEN_SESSION_CB cb); __owur int SSL_has_matching_session_id(const SSL *s, const unsigned char *id, unsigned int id_len); SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length); # ifdef HEADER_X509_H __owur X509 *SSL_get_peer_certificate(const SSL *s); # endif __owur STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s); __owur int SSL_CTX_get_verify_mode(const SSL_CTX *ctx); __owur int SSL_CTX_get_verify_depth(const SSL_CTX *ctx); __owur SSL_verify_cb SSL_CTX_get_verify_callback(const SSL_CTX *ctx); void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, SSL_verify_cb callback); void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth); void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb) (X509_STORE_CTX *, void *), void *arg); void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), void *arg); # ifndef OPENSSL_NO_RSA __owur int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa); __owur int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len); # endif __owur int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey); __owur int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx, const unsigned char *d, long len); __owur int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x); __owur int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d); __owur int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x509, EVP_PKEY *privatekey, STACK_OF(X509) *chain, int override); void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb); void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u); pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx); void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx); void SSL_set_default_passwd_cb(SSL *s, pem_password_cb *cb); void SSL_set_default_passwd_cb_userdata(SSL *s, void *u); pem_password_cb *SSL_get_default_passwd_cb(SSL *s); void *SSL_get_default_passwd_cb_userdata(SSL *s); __owur int SSL_CTX_check_private_key(const SSL_CTX *ctx); __owur int SSL_check_private_key(const SSL *ctx); __owur int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, unsigned int sid_ctx_len); SSL *SSL_new(SSL_CTX *ctx); int SSL_up_ref(SSL *s); int SSL_is_dtls(const SSL *s); __owur int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, unsigned int sid_ctx_len); __owur int SSL_CTX_set_purpose(SSL_CTX *ctx, int purpose); __owur int SSL_set_purpose(SSL *ssl, int purpose); __owur int SSL_CTX_set_trust(SSL_CTX *ctx, int trust); __owur int SSL_set_trust(SSL *ssl, int trust); __owur int SSL_set1_host(SSL *s, const char *hostname); __owur int SSL_add1_host(SSL *s, const char *hostname); __owur const char *SSL_get0_peername(SSL *s); void SSL_set_hostflags(SSL *s, unsigned int flags); __owur int SSL_CTX_dane_enable(SSL_CTX *ctx); __owur int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, uint8_t mtype, uint8_t ord); __owur int SSL_dane_enable(SSL *s, const char *basedomain); __owur int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector, uint8_t mtype, unsigned const char *data, size_t dlen); __owur int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki); __owur int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector, uint8_t *mtype, unsigned const char **data, size_t *dlen); /* * Bridge opacity barrier between libcrypt and libssl, also needed to support * offline testing in test/danetest.c */ SSL_DANE *SSL_get0_dane(SSL *ssl); /* * DANE flags */ unsigned long SSL_CTX_dane_set_flags(SSL_CTX *ctx, unsigned long flags); unsigned long SSL_CTX_dane_clear_flags(SSL_CTX *ctx, unsigned long flags); unsigned long SSL_dane_set_flags(SSL *ssl, unsigned long flags); unsigned long SSL_dane_clear_flags(SSL *ssl, unsigned long flags); __owur int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm); __owur int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm); __owur X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx); __owur X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl); # ifndef OPENSSL_NO_SRP int SSL_CTX_set_srp_username(SSL_CTX *ctx, char *name); int SSL_CTX_set_srp_password(SSL_CTX *ctx, char *password); int SSL_CTX_set_srp_strength(SSL_CTX *ctx, int strength); int SSL_CTX_set_srp_client_pwd_callback(SSL_CTX *ctx, char *(*cb) (SSL *, void *)); int SSL_CTX_set_srp_verify_param_callback(SSL_CTX *ctx, int (*cb) (SSL *, void *)); int SSL_CTX_set_srp_username_callback(SSL_CTX *ctx, int (*cb) (SSL *, int *, void *)); int SSL_CTX_set_srp_cb_arg(SSL_CTX *ctx, void *arg); int SSL_set_srp_server_param(SSL *s, const BIGNUM *N, const BIGNUM *g, BIGNUM *sa, BIGNUM *v, char *info); int SSL_set_srp_server_param_pw(SSL *s, const char *user, const char *pass, const char *grp); __owur BIGNUM *SSL_get_srp_g(SSL *s); __owur BIGNUM *SSL_get_srp_N(SSL *s); __owur char *SSL_get_srp_username(SSL *s); __owur char *SSL_get_srp_userinfo(SSL *s); # endif /* * ClientHello callback and helpers. */ # define SSL_CLIENT_HELLO_SUCCESS 1 # define SSL_CLIENT_HELLO_ERROR 0 # define SSL_CLIENT_HELLO_RETRY (-1) typedef int (*SSL_client_hello_cb_fn) (SSL *s, int *al, void *arg); void SSL_CTX_set_client_hello_cb(SSL_CTX *c, SSL_client_hello_cb_fn cb, void *arg); int SSL_client_hello_isv2(SSL *s); unsigned int SSL_client_hello_get0_legacy_version(SSL *s); size_t SSL_client_hello_get0_random(SSL *s, const unsigned char **out); size_t SSL_client_hello_get0_session_id(SSL *s, const unsigned char **out); size_t SSL_client_hello_get0_ciphers(SSL *s, const unsigned char **out); size_t SSL_client_hello_get0_compression_methods(SSL *s, const unsigned char **out); int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen); int SSL_client_hello_get0_ext(SSL *s, unsigned int type, const unsigned char **out, size_t *outlen); void SSL_certs_clear(SSL *s); void SSL_free(SSL *ssl); # ifdef OSSL_ASYNC_FD /* * Windows application developer has to include windows.h to use these. */ __owur int SSL_waiting_for_async(SSL *s); __owur int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fds, size_t *numfds); __owur int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, size_t *numaddfds, OSSL_ASYNC_FD *delfd, size_t *numdelfds); # endif __owur int SSL_accept(SSL *ssl); __owur int SSL_stateless(SSL *s); __owur int SSL_connect(SSL *ssl); __owur int SSL_read(SSL *ssl, void *buf, int num); __owur int SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes); # define SSL_READ_EARLY_DATA_ERROR 0 # define SSL_READ_EARLY_DATA_SUCCESS 1 # define SSL_READ_EARLY_DATA_FINISH 2 __owur int SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes); __owur int SSL_peek(SSL *ssl, void *buf, int num); __owur int SSL_peek_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes); __owur int SSL_write(SSL *ssl, const void *buf, int num); __owur int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written); __owur int SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written); long SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg); long SSL_callback_ctrl(SSL *, int, void (*)(void)); long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg); long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void)); # define SSL_EARLY_DATA_NOT_SENT 0 # define SSL_EARLY_DATA_REJECTED 1 # define SSL_EARLY_DATA_ACCEPTED 2 __owur int SSL_get_early_data_status(const SSL *s); __owur int SSL_get_error(const SSL *s, int ret_code); __owur const char *SSL_get_version(const SSL *s); /* This sets the 'default' SSL version that SSL_new() will create */ __owur int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth); #define SSLv23_method TLS_method #define SSLv23_server_method TLS_server_method #define SSLv23_client_method TLS_client_method /* Negotiate highest available SSL/TLS version */ __owur const SSL_METHOD *TLS_method(void); __owur const SSL_METHOD *TLS_server_method(void); __owur const SSL_METHOD *TLS_client_method(void); # ifndef OPENSSL_NO_TLS1_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_method(void)) /* TLSv1.0 */ DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) # endif # ifndef OPENSSL_NO_TLS1_1_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* TLSv1.1 */ DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) # endif # ifndef OPENSSL_NO_TLS1_2_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* TLSv1.2 */ DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) # endif # ifndef OPENSSL_NO_DTLS1_METHOD DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */ DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_server_method(void)) DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_client_method(void)) # endif # ifndef OPENSSL_NO_DTLS1_2_METHOD /* DTLSv1.2 */ DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_method(void)) DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_server_method(void)) DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_2_client_method(void)) # endif __owur const SSL_METHOD *DTLS_method(void); /* DTLS 1.0 and 1.2 */ __owur const SSL_METHOD *DTLS_server_method(void); /* DTLS 1.0 and 1.2 */ __owur const SSL_METHOD *DTLS_client_method(void); /* DTLS 1.0 and 1.2 */ __owur size_t DTLS_get_data_mtu(const SSL *s); __owur STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s); __owur STACK_OF(SSL_CIPHER) *SSL_CTX_get_ciphers(const SSL_CTX *ctx); __owur STACK_OF(SSL_CIPHER) *SSL_get_client_ciphers(const SSL *s); __owur STACK_OF(SSL_CIPHER) *SSL_get1_supported_ciphers(SSL *s); __owur int SSL_do_handshake(SSL *s); int SSL_key_update(SSL *s, int updatetype); int SSL_get_key_update_type(const SSL *s); int SSL_renegotiate(SSL *s); int SSL_renegotiate_abbreviated(SSL *s); __owur int SSL_renegotiate_pending(const SSL *s); int SSL_shutdown(SSL *s); __owur int SSL_verify_client_post_handshake(SSL *s); void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val); void SSL_set_post_handshake_auth(SSL *s, int val); __owur const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx); __owur const SSL_METHOD *SSL_get_ssl_method(const SSL *s); __owur int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); __owur const char *SSL_alert_type_string_long(int value); __owur const char *SSL_alert_type_string(int value); __owur const char *SSL_alert_desc_string_long(int value); __owur const char *SSL_alert_desc_string(int value); void SSL_set0_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); void SSL_CTX_set0_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); __owur const STACK_OF(X509_NAME) *SSL_get0_CA_list(const SSL *s); __owur const STACK_OF(X509_NAME) *SSL_CTX_get0_CA_list(const SSL_CTX *ctx); __owur int SSL_add1_to_CA_list(SSL *ssl, const X509 *x); __owur int SSL_CTX_add1_to_CA_list(SSL_CTX *ctx, const X509 *x); __owur const STACK_OF(X509_NAME) *SSL_get0_peer_CA_list(const SSL *s); void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list); void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list); __owur STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s); __owur STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s); __owur int SSL_add_client_CA(SSL *ssl, X509 *x); __owur int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x); void SSL_set_connect_state(SSL *s); void SSL_set_accept_state(SSL *s); __owur long SSL_get_default_timeout(const SSL *s); # if OPENSSL_API_COMPAT < 0x10100000L # define SSL_library_init() OPENSSL_init_ssl(0, NULL) # endif __owur char *SSL_CIPHER_description(const SSL_CIPHER *, char *buf, int size); __owur STACK_OF(X509_NAME) *SSL_dup_CA_list(const STACK_OF(X509_NAME) *sk); __owur SSL *SSL_dup(SSL *ssl); __owur X509 *SSL_get_certificate(const SSL *ssl); /* * EVP_PKEY */ struct evp_pkey_st *SSL_get_privatekey(const SSL *ssl); __owur X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx); __owur EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx); void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode); __owur int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx); void SSL_set_quiet_shutdown(SSL *ssl, int mode); __owur int SSL_get_quiet_shutdown(const SSL *ssl); void SSL_set_shutdown(SSL *ssl, int mode); __owur int SSL_get_shutdown(const SSL *ssl); __owur int SSL_version(const SSL *ssl); __owur int SSL_client_version(const SSL *s); __owur int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx); __owur int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx); __owur int SSL_CTX_set_default_verify_file(SSL_CTX *ctx); __owur int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath); # define SSL_get0_session SSL_get_session/* just peek at pointer */ __owur SSL_SESSION *SSL_get_session(const SSL *ssl); __owur SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */ __owur SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl); SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx); void SSL_set_info_callback(SSL *ssl, void (*cb) (const SSL *ssl, int type, int val)); void (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type, int val); __owur OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl); void SSL_set_verify_result(SSL *ssl, long v); __owur long SSL_get_verify_result(const SSL *ssl); __owur STACK_OF(X509) *SSL_get0_verified_chain(const SSL *s); __owur size_t SSL_get_client_random(const SSL *ssl, unsigned char *out, size_t outlen); __owur size_t SSL_get_server_random(const SSL *ssl, unsigned char *out, size_t outlen); __owur size_t SSL_SESSION_get_master_key(const SSL_SESSION *sess, unsigned char *out, size_t outlen); __owur int SSL_SESSION_set1_master_key(SSL_SESSION *sess, const unsigned char *in, size_t len); uint8_t SSL_SESSION_get_max_fragment_length(const SSL_SESSION *sess); #define SSL_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, l, p, newf, dupf, freef) __owur int SSL_set_ex_data(SSL *ssl, int idx, void *data); void *SSL_get_ex_data(const SSL *ssl, int idx); #define SSL_SESSION_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_SESSION, l, p, newf, dupf, freef) __owur int SSL_SESSION_set_ex_data(SSL_SESSION *ss, int idx, void *data); void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss, int idx); #define SSL_CTX_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, l, p, newf, dupf, freef) __owur int SSL_CTX_set_ex_data(SSL_CTX *ssl, int idx, void *data); void *SSL_CTX_get_ex_data(const SSL_CTX *ssl, int idx); __owur int SSL_get_ex_data_X509_STORE_CTX_idx(void); # define SSL_CTX_sess_set_cache_size(ctx,t) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL) # define SSL_CTX_sess_get_cache_size(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL) # define SSL_CTX_set_session_cache_mode(ctx,m) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL) # define SSL_CTX_get_session_cache_mode(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL) # define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx) # define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m) # define SSL_CTX_get_read_ahead(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL) # define SSL_CTX_set_read_ahead(ctx,m) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL) # define SSL_CTX_get_max_cert_list(ctx) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) # define SSL_CTX_set_max_cert_list(ctx,m) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) # define SSL_get_max_cert_list(ssl) \ SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL) # define SSL_set_max_cert_list(ssl,m) \ SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL) # define SSL_CTX_set_max_send_fragment(ctx,m) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL) # define SSL_set_max_send_fragment(ssl,m) \ SSL_ctrl(ssl,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL) # define SSL_CTX_set_split_send_fragment(ctx,m) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SPLIT_SEND_FRAGMENT,m,NULL) # define SSL_set_split_send_fragment(ssl,m) \ SSL_ctrl(ssl,SSL_CTRL_SET_SPLIT_SEND_FRAGMENT,m,NULL) # define SSL_CTX_set_max_pipelines(ctx,m) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_PIPELINES,m,NULL) # define SSL_set_max_pipelines(ssl,m) \ SSL_ctrl(ssl,SSL_CTRL_SET_MAX_PIPELINES,m,NULL) void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len); void SSL_set_default_read_buffer_len(SSL *s, size_t len); # ifndef OPENSSL_NO_DH /* NB: the |keylength| is only applicable when is_export is true */ void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*dh) (SSL *ssl, int is_export, int keylength)); void SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh) (SSL *ssl, int is_export, int keylength)); # endif __owur const COMP_METHOD *SSL_get_current_compression(const SSL *s); __owur const COMP_METHOD *SSL_get_current_expansion(const SSL *s); __owur const char *SSL_COMP_get_name(const COMP_METHOD *comp); __owur const char *SSL_COMP_get0_name(const SSL_COMP *comp); __owur int SSL_COMP_get_id(const SSL_COMP *comp); STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void); __owur STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP) *meths); # if OPENSSL_API_COMPAT < 0x10100000L # define SSL_COMP_free_compression_methods() while(0) continue # endif __owur int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm); const SSL_CIPHER *SSL_CIPHER_find(SSL *ssl, const unsigned char *ptr); int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c); int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c); int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len, int isv2format, STACK_OF(SSL_CIPHER) **sk, STACK_OF(SSL_CIPHER) **scsvs); /* TLS extensions functions */ __owur int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len); __owur int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb, void *arg); /* Pre-shared secret session resumption functions */ __owur int SSL_set_session_secret_cb(SSL *s, tls_session_secret_cb_fn session_secret_cb, void *arg); void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx, int (*cb) (SSL *ssl, int is_forward_secure)); void SSL_set_not_resumable_session_callback(SSL *ssl, int (*cb) (SSL *ssl, int is_forward_secure)); void SSL_CTX_set_record_padding_callback(SSL_CTX *ctx, size_t (*cb) (SSL *ssl, int type, size_t len, void *arg)); void SSL_CTX_set_record_padding_callback_arg(SSL_CTX *ctx, void *arg); void *SSL_CTX_get_record_padding_callback_arg(const SSL_CTX *ctx); int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size); void SSL_set_record_padding_callback(SSL *ssl, size_t (*cb) (SSL *ssl, int type, size_t len, void *arg)); void SSL_set_record_padding_callback_arg(SSL *ssl, void *arg); void *SSL_get_record_padding_callback_arg(const SSL *ssl); int SSL_set_block_padding(SSL *ssl, size_t block_size); int SSL_set_num_tickets(SSL *s, size_t num_tickets); size_t SSL_get_num_tickets(const SSL *s); int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets); size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx); # if OPENSSL_API_COMPAT < 0x10100000L # define SSL_cache_hit(s) SSL_session_reused(s) # endif __owur int SSL_session_reused(const SSL *s); __owur int SSL_is_server(const SSL *s); __owur __owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx); void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx); unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags); __owur unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx, unsigned int flags); __owur int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *pre); void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl); void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx); __owur int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value); __owur int SSL_CONF_cmd_argv(SSL_CONF_CTX *cctx, int *pargc, char ***pargv); __owur int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd); void SSL_add_ssl_module(void); int SSL_config(SSL *s, const char *name); int SSL_CTX_config(SSL_CTX *ctx, const char *name); # ifndef OPENSSL_NO_SSL_TRACE void SSL_trace(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg); # endif # ifndef OPENSSL_NO_SOCK int DTLSv1_listen(SSL *s, BIO_ADDR *client); # endif # ifndef OPENSSL_NO_CT /* * A callback for verifying that the received SCTs are sufficient. * Expected to return 1 if they are sufficient, otherwise 0. * May return a negative integer if an error occurs. * A connection should be aborted if the SCTs are deemed insufficient. */ typedef int (*ssl_ct_validation_cb)(const CT_POLICY_EVAL_CTX *ctx, const STACK_OF(SCT) *scts, void *arg); /* * Sets a |callback| that is invoked upon receipt of ServerHelloDone to validate * the received SCTs. * If the callback returns a non-positive result, the connection is terminated. * Call this function before beginning a handshake. * If a NULL |callback| is provided, SCT validation is disabled. * |arg| is arbitrary userdata that will be passed to the callback whenever it * is invoked. Ownership of |arg| remains with the caller. * * NOTE: A side-effect of setting a CT callback is that an OCSP stapled response * will be requested. */ int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback, void *arg); int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx, ssl_ct_validation_cb callback, void *arg); #define SSL_disable_ct(s) \ ((void) SSL_set_validation_callback((s), NULL, NULL)) #define SSL_CTX_disable_ct(ctx) \ ((void) SSL_CTX_set_validation_callback((ctx), NULL, NULL)) /* * The validation type enumerates the available behaviours of the built-in SSL * CT validation callback selected via SSL_enable_ct() and SSL_CTX_enable_ct(). * The underlying callback is a static function in libssl. */ enum { SSL_CT_VALIDATION_PERMISSIVE = 0, SSL_CT_VALIDATION_STRICT }; /* * Enable CT by setting up a callback that implements one of the built-in * validation variants. The SSL_CT_VALIDATION_PERMISSIVE variant always * continues the handshake, the application can make appropriate decisions at * handshake completion. The SSL_CT_VALIDATION_STRICT variant requires at * least one valid SCT, or else handshake termination will be requested. The * handshake may continue anyway if SSL_VERIFY_NONE is in effect. */ int SSL_enable_ct(SSL *s, int validation_mode); int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode); /* * Report whether a non-NULL callback is enabled. */ int SSL_ct_is_enabled(const SSL *s); int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx); /* Gets the SCTs received from a connection */ const STACK_OF(SCT) *SSL_get0_peer_scts(SSL *s); /* * Loads the CT log list from the default location. * If a CTLOG_STORE has previously been set using SSL_CTX_set_ctlog_store, * the log information loaded from this file will be appended to the * CTLOG_STORE. * Returns 1 on success, 0 otherwise. */ int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx); /* * Loads the CT log list from the specified file path. * If a CTLOG_STORE has previously been set using SSL_CTX_set_ctlog_store, * the log information loaded from this file will be appended to the * CTLOG_STORE. * Returns 1 on success, 0 otherwise. */ int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path); /* * Sets the CT log list used by all SSL connections created from this SSL_CTX. * Ownership of the CTLOG_STORE is transferred to the SSL_CTX. */ void SSL_CTX_set0_ctlog_store(SSL_CTX *ctx, CTLOG_STORE *logs); /* * Gets the CT log list used by all SSL connections created from this SSL_CTX. * This will be NULL unless one of the following functions has been called: * - SSL_CTX_set_default_ctlog_list_file * - SSL_CTX_set_ctlog_list_file * - SSL_CTX_set_ctlog_store */ const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx); # endif /* OPENSSL_NO_CT */ /* What the "other" parameter contains in security callback */ /* Mask for type */ # define SSL_SECOP_OTHER_TYPE 0xffff0000 # define SSL_SECOP_OTHER_NONE 0 # define SSL_SECOP_OTHER_CIPHER (1 << 16) # define SSL_SECOP_OTHER_CURVE (2 << 16) # define SSL_SECOP_OTHER_DH (3 << 16) # define SSL_SECOP_OTHER_PKEY (4 << 16) # define SSL_SECOP_OTHER_SIGALG (5 << 16) # define SSL_SECOP_OTHER_CERT (6 << 16) /* Indicated operation refers to peer key or certificate */ # define SSL_SECOP_PEER 0x1000 /* Values for "op" parameter in security callback */ /* Called to filter ciphers */ /* Ciphers client supports */ # define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER) /* Cipher shared by client/server */ # define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER) /* Sanity check of cipher server selects */ # define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER) /* Curves supported by client */ # define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE) /* Curves shared by client/server */ # define SSL_SECOP_CURVE_SHARED (5 | SSL_SECOP_OTHER_CURVE) /* Sanity check of curve server selects */ # define SSL_SECOP_CURVE_CHECK (6 | SSL_SECOP_OTHER_CURVE) /* Temporary DH key */ # define SSL_SECOP_TMP_DH (7 | SSL_SECOP_OTHER_PKEY) /* SSL/TLS version */ # define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE) /* Session tickets */ # define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE) /* Supported signature algorithms sent to peer */ # define SSL_SECOP_SIGALG_SUPPORTED (11 | SSL_SECOP_OTHER_SIGALG) /* Shared signature algorithm */ # define SSL_SECOP_SIGALG_SHARED (12 | SSL_SECOP_OTHER_SIGALG) /* Sanity check signature algorithm allowed */ # define SSL_SECOP_SIGALG_CHECK (13 | SSL_SECOP_OTHER_SIGALG) /* Used to get mask of supported public key signature algorithms */ # define SSL_SECOP_SIGALG_MASK (14 | SSL_SECOP_OTHER_SIGALG) /* Use to see if compression is allowed */ # define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE) /* EE key in certificate */ # define SSL_SECOP_EE_KEY (16 | SSL_SECOP_OTHER_CERT) /* CA key in certificate */ # define SSL_SECOP_CA_KEY (17 | SSL_SECOP_OTHER_CERT) /* CA digest algorithm in certificate */ # define SSL_SECOP_CA_MD (18 | SSL_SECOP_OTHER_CERT) /* Peer EE key in certificate */ # define SSL_SECOP_PEER_EE_KEY (SSL_SECOP_EE_KEY | SSL_SECOP_PEER) /* Peer CA key in certificate */ # define SSL_SECOP_PEER_CA_KEY (SSL_SECOP_CA_KEY | SSL_SECOP_PEER) /* Peer CA digest algorithm in certificate */ # define SSL_SECOP_PEER_CA_MD (SSL_SECOP_CA_MD | SSL_SECOP_PEER) void SSL_set_security_level(SSL *s, int level); __owur int SSL_get_security_level(const SSL *s); void SSL_set_security_callback(SSL *s, int (*cb) (const SSL *s, const SSL_CTX *ctx, int op, int bits, int nid, void *other, void *ex)); int (*SSL_get_security_callback(const SSL *s)) (const SSL *s, const SSL_CTX *ctx, int op, int bits, int nid, void *other, void *ex); void SSL_set0_security_ex_data(SSL *s, void *ex); __owur void *SSL_get0_security_ex_data(const SSL *s); void SSL_CTX_set_security_level(SSL_CTX *ctx, int level); __owur int SSL_CTX_get_security_level(const SSL_CTX *ctx); void SSL_CTX_set_security_callback(SSL_CTX *ctx, int (*cb) (const SSL *s, const SSL_CTX *ctx, int op, int bits, int nid, void *other, void *ex)); int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s, const SSL_CTX *ctx, int op, int bits, int nid, void *other, void *ex); void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex); __owur void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx); /* OPENSSL_INIT flag 0x010000 reserved for internal use */ # define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L # define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L # define OPENSSL_INIT_SSL_DEFAULT \ (OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS) int OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); # ifndef OPENSSL_NO_UNIT_TEST __owur const struct openssl_ssl_test_functions *SSL_test_functions(void); # endif __owur int SSL_free_buffers(SSL *ssl); __owur int SSL_alloc_buffers(SSL *ssl); /* Status codes passed to the decrypt session ticket callback. Some of these * are for internal use only and are never passed to the callback. */ typedef int SSL_TICKET_STATUS; /* Support for ticket appdata */ /* fatal error, malloc failure */ # define SSL_TICKET_FATAL_ERR_MALLOC 0 /* fatal error, either from parsing or decrypting the ticket */ # define SSL_TICKET_FATAL_ERR_OTHER 1 /* No ticket present */ # define SSL_TICKET_NONE 2 /* Empty ticket present */ # define SSL_TICKET_EMPTY 3 /* the ticket couldn't be decrypted */ # define SSL_TICKET_NO_DECRYPT 4 /* a ticket was successfully decrypted */ # define SSL_TICKET_SUCCESS 5 /* same as above but the ticket needs to be renewed */ # define SSL_TICKET_SUCCESS_RENEW 6 /* Return codes for the decrypt session ticket callback */ typedef int SSL_TICKET_RETURN; /* An error occurred */ #define SSL_TICKET_RETURN_ABORT 0 /* Do not use the ticket, do not send a renewed ticket to the client */ #define SSL_TICKET_RETURN_IGNORE 1 /* Do not use the ticket, send a renewed ticket to the client */ #define SSL_TICKET_RETURN_IGNORE_RENEW 2 /* Use the ticket, do not send a renewed ticket to the client */ #define SSL_TICKET_RETURN_USE 3 /* Use the ticket, send a renewed ticket to the client */ #define SSL_TICKET_RETURN_USE_RENEW 4 typedef int (*SSL_CTX_generate_session_ticket_fn)(SSL *s, void *arg); typedef SSL_TICKET_RETURN (*SSL_CTX_decrypt_session_ticket_fn)(SSL *s, SSL_SESSION *ss, const unsigned char *keyname, size_t keyname_length, SSL_TICKET_STATUS status, void *arg); int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx, SSL_CTX_generate_session_ticket_fn gen_cb, SSL_CTX_decrypt_session_ticket_fn dec_cb, void *arg); int SSL_SESSION_set1_ticket_appdata(SSL_SESSION *ss, const void *data, size_t len); int SSL_SESSION_get0_ticket_appdata(SSL_SESSION *ss, void **data, size_t *len); extern const char SSL_version_str[]; typedef unsigned int (*DTLS_timer_cb)(SSL *s, unsigned int timer_us); void DTLS_set_timer_cb(SSL *s, DTLS_timer_cb cb); typedef int (*SSL_allow_early_data_cb_fn)(SSL *s, void *arg); void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx, SSL_allow_early_data_cb_fn cb, void *arg); void SSL_set_allow_early_data_cb(SSL *s, SSL_allow_early_data_cb_fn cb, void *arg); # ifdef __cplusplus } # endif #endif PKZ~,, openssl/err.hnu[/* * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ERR_H # define HEADER_ERR_H # include # ifndef OPENSSL_NO_STDIO # include # include # endif # include # include # include #ifdef __cplusplus extern "C" { #endif # ifndef OPENSSL_NO_ERR # define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,d,e) # else # define ERR_PUT_error(a,b,c,d,e) ERR_put_error(a,b,c,NULL,0) # endif # include # define ERR_TXT_MALLOCED 0x01 # define ERR_TXT_STRING 0x02 # define ERR_FLAG_MARK 0x01 # define ERR_FLAG_CLEAR 0x02 # define ERR_NUM_ERRORS 16 typedef struct err_state_st { int err_flags[ERR_NUM_ERRORS]; unsigned long err_buffer[ERR_NUM_ERRORS]; char *err_data[ERR_NUM_ERRORS]; int err_data_flags[ERR_NUM_ERRORS]; const char *err_file[ERR_NUM_ERRORS]; int err_line[ERR_NUM_ERRORS]; int top, bottom; } ERR_STATE; /* library */ # define ERR_LIB_NONE 1 # define ERR_LIB_SYS 2 # define ERR_LIB_BN 3 # define ERR_LIB_RSA 4 # define ERR_LIB_DH 5 # define ERR_LIB_EVP 6 # define ERR_LIB_BUF 7 # define ERR_LIB_OBJ 8 # define ERR_LIB_PEM 9 # define ERR_LIB_DSA 10 # define ERR_LIB_X509 11 /* #define ERR_LIB_METH 12 */ # define ERR_LIB_ASN1 13 # define ERR_LIB_CONF 14 # define ERR_LIB_CRYPTO 15 # define ERR_LIB_EC 16 # define ERR_LIB_SSL 20 /* #define ERR_LIB_SSL23 21 */ /* #define ERR_LIB_SSL2 22 */ /* #define ERR_LIB_SSL3 23 */ /* #define ERR_LIB_RSAREF 30 */ /* #define ERR_LIB_PROXY 31 */ # define ERR_LIB_BIO 32 # define ERR_LIB_PKCS7 33 # define ERR_LIB_X509V3 34 # define ERR_LIB_PKCS12 35 # define ERR_LIB_RAND 36 # define ERR_LIB_DSO 37 # define ERR_LIB_ENGINE 38 # define ERR_LIB_OCSP 39 # define ERR_LIB_UI 40 # define ERR_LIB_COMP 41 # define ERR_LIB_ECDSA 42 # define ERR_LIB_ECDH 43 # define ERR_LIB_OSSL_STORE 44 # define ERR_LIB_FIPS 45 # define ERR_LIB_CMS 46 # define ERR_LIB_TS 47 # define ERR_LIB_HMAC 48 /* # define ERR_LIB_JPAKE 49 */ # define ERR_LIB_CT 50 # define ERR_LIB_ASYNC 51 # define ERR_LIB_KDF 52 # define ERR_LIB_SM2 53 # define ERR_LIB_USER 128 # define SYSerr(f,r) ERR_PUT_error(ERR_LIB_SYS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define BNerr(f,r) ERR_PUT_error(ERR_LIB_BN,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define RSAerr(f,r) ERR_PUT_error(ERR_LIB_RSA,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define DHerr(f,r) ERR_PUT_error(ERR_LIB_DH,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define EVPerr(f,r) ERR_PUT_error(ERR_LIB_EVP,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define BUFerr(f,r) ERR_PUT_error(ERR_LIB_BUF,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define OBJerr(f,r) ERR_PUT_error(ERR_LIB_OBJ,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define PEMerr(f,r) ERR_PUT_error(ERR_LIB_PEM,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define DSAerr(f,r) ERR_PUT_error(ERR_LIB_DSA,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ECerr(f,r) ERR_PUT_error(ERR_LIB_EC,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define BIOerr(f,r) ERR_PUT_error(ERR_LIB_BIO,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ECDSAerr(f,r) ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ECDHerr(f,r) ERR_PUT_error(ERR_LIB_ECDH,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define OSSL_STOREerr(f,r) ERR_PUT_error(ERR_LIB_OSSL_STORE,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define CTerr(f,r) ERR_PUT_error(ERR_LIB_CT,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ASYNCerr(f,r) ERR_PUT_error(ERR_LIB_ASYNC,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define KDFerr(f,r) ERR_PUT_error(ERR_LIB_KDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define SM2err(f,r) ERR_PUT_error(ERR_LIB_SM2,(f),(r),OPENSSL_FILE,OPENSSL_LINE) # define ERR_PACK(l,f,r) ( \ (((unsigned int)(l) & 0x0FF) << 24L) | \ (((unsigned int)(f) & 0xFFF) << 12L) | \ (((unsigned int)(r) & 0xFFF) ) ) # define ERR_GET_LIB(l) (int)(((l) >> 24L) & 0x0FFL) # define ERR_GET_FUNC(l) (int)(((l) >> 12L) & 0xFFFL) # define ERR_GET_REASON(l) (int)( (l) & 0xFFFL) # define ERR_FATAL_ERROR(l) (int)( (l) & ERR_R_FATAL) /* OS functions */ # define SYS_F_FOPEN 1 # define SYS_F_CONNECT 2 # define SYS_F_GETSERVBYNAME 3 # define SYS_F_SOCKET 4 # define SYS_F_IOCTLSOCKET 5 # define SYS_F_BIND 6 # define SYS_F_LISTEN 7 # define SYS_F_ACCEPT 8 # define SYS_F_WSASTARTUP 9/* Winsock stuff */ # define SYS_F_OPENDIR 10 # define SYS_F_FREAD 11 # define SYS_F_GETADDRINFO 12 # define SYS_F_GETNAMEINFO 13 # define SYS_F_SETSOCKOPT 14 # define SYS_F_GETSOCKOPT 15 # define SYS_F_GETSOCKNAME 16 # define SYS_F_GETHOSTBYNAME 17 # define SYS_F_FFLUSH 18 # define SYS_F_OPEN 19 # define SYS_F_CLOSE 20 # define SYS_F_IOCTL 21 # define SYS_F_STAT 22 # define SYS_F_FCNTL 23 # define SYS_F_FSTAT 24 /* reasons */ # define ERR_R_SYS_LIB ERR_LIB_SYS/* 2 */ # define ERR_R_BN_LIB ERR_LIB_BN/* 3 */ # define ERR_R_RSA_LIB ERR_LIB_RSA/* 4 */ # define ERR_R_DH_LIB ERR_LIB_DH/* 5 */ # define ERR_R_EVP_LIB ERR_LIB_EVP/* 6 */ # define ERR_R_BUF_LIB ERR_LIB_BUF/* 7 */ # define ERR_R_OBJ_LIB ERR_LIB_OBJ/* 8 */ # define ERR_R_PEM_LIB ERR_LIB_PEM/* 9 */ # define ERR_R_DSA_LIB ERR_LIB_DSA/* 10 */ # define ERR_R_X509_LIB ERR_LIB_X509/* 11 */ # define ERR_R_ASN1_LIB ERR_LIB_ASN1/* 13 */ # define ERR_R_EC_LIB ERR_LIB_EC/* 16 */ # define ERR_R_BIO_LIB ERR_LIB_BIO/* 32 */ # define ERR_R_PKCS7_LIB ERR_LIB_PKCS7/* 33 */ # define ERR_R_X509V3_LIB ERR_LIB_X509V3/* 34 */ # define ERR_R_ENGINE_LIB ERR_LIB_ENGINE/* 38 */ # define ERR_R_UI_LIB ERR_LIB_UI/* 40 */ # define ERR_R_ECDSA_LIB ERR_LIB_ECDSA/* 42 */ # define ERR_R_OSSL_STORE_LIB ERR_LIB_OSSL_STORE/* 44 */ # define ERR_R_NESTED_ASN1_ERROR 58 # define ERR_R_MISSING_ASN1_EOS 63 /* fatal error */ # define ERR_R_FATAL 64 # define ERR_R_MALLOC_FAILURE (1|ERR_R_FATAL) # define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) # define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) # define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) # define ERR_R_DISABLED (5|ERR_R_FATAL) # define ERR_R_INIT_FAIL (6|ERR_R_FATAL) # define ERR_R_PASSED_INVALID_ARGUMENT (7) # define ERR_R_OPERATION_FAIL (8|ERR_R_FATAL) /* * 99 is the maximum possible ERR_R_... code, higher values are reserved for * the individual libraries */ typedef struct ERR_string_data_st { unsigned long error; const char *string; } ERR_STRING_DATA; DEFINE_LHASH_OF(ERR_STRING_DATA); void ERR_put_error(int lib, int func, int reason, const char *file, int line); void ERR_set_error_data(char *data, int flags); unsigned long ERR_get_error(void); unsigned long ERR_get_error_line(const char **file, int *line); unsigned long ERR_get_error_line_data(const char **file, int *line, const char **data, int *flags); unsigned long ERR_peek_error(void); unsigned long ERR_peek_error_line(const char **file, int *line); unsigned long ERR_peek_error_line_data(const char **file, int *line, const char **data, int *flags); unsigned long ERR_peek_last_error(void); unsigned long ERR_peek_last_error_line(const char **file, int *line); unsigned long ERR_peek_last_error_line_data(const char **file, int *line, const char **data, int *flags); void ERR_clear_error(void); char *ERR_error_string(unsigned long e, char *buf); void ERR_error_string_n(unsigned long e, char *buf, size_t len); const char *ERR_lib_error_string(unsigned long e); const char *ERR_func_error_string(unsigned long e); const char *ERR_reason_error_string(unsigned long e); void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u), void *u); # ifndef OPENSSL_NO_STDIO void ERR_print_errors_fp(FILE *fp); # endif void ERR_print_errors(BIO *bp); void ERR_add_error_data(int num, ...); void ERR_add_error_vdata(int num, va_list args); int ERR_load_strings(int lib, ERR_STRING_DATA *str); int ERR_load_strings_const(const ERR_STRING_DATA *str); int ERR_unload_strings(int lib, ERR_STRING_DATA *str); int ERR_load_ERR_strings(void); #if OPENSSL_API_COMPAT < 0x10100000L # define ERR_load_crypto_strings() \ OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) # define ERR_free_strings() while(0) continue #endif DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *)) DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid)) ERR_STATE *ERR_get_state(void); int ERR_get_next_error_library(void); int ERR_set_mark(void); int ERR_pop_to_mark(void); int ERR_clear_last_mark(void); #ifdef __cplusplus } #endif #endif PKZ~k k openssl/camellia.hnu[/* * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CAMELLIA_H # define HEADER_CAMELLIA_H # include # ifndef OPENSSL_NO_CAMELLIA # include #ifdef __cplusplus extern "C" { #endif # define CAMELLIA_ENCRYPT 1 # define CAMELLIA_DECRYPT 0 /* * Because array size can't be a const in C, the following two are macros. * Both sizes are in bytes. */ /* This should be a hidden type, but EVP requires that the size be known */ # define CAMELLIA_BLOCK_SIZE 16 # define CAMELLIA_TABLE_BYTE_LEN 272 # define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match * with WORD */ struct camellia_key_st { union { double d; /* ensures 64-bit align */ KEY_TABLE_TYPE rd_key; } u; int grand_rounds; }; typedef struct camellia_key_st CAMELLIA_KEY; int Camellia_set_key(const unsigned char *userKey, const int bits, CAMELLIA_KEY *key); void Camellia_encrypt(const unsigned char *in, unsigned char *out, const CAMELLIA_KEY *key); void Camellia_decrypt(const unsigned char *in, unsigned char *out, const CAMELLIA_KEY *key); void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAMELLIA_KEY *key, const int enc); void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, const int enc); void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int *num, const int enc); void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int *num, const int enc); void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int *num, const int enc); void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, size_t length, const CAMELLIA_KEY *key, unsigned char *ivec, int *num); void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, size_t length, const CAMELLIA_KEY *key, unsigned char ivec[CAMELLIA_BLOCK_SIZE], unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], unsigned int *num); # ifdef __cplusplus } # endif # endif #endif PKZopenssl/pkcs7err.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_PKCS7ERR_H # define HEADER_PKCS7ERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_PKCS7_strings(void); /* * PKCS7 function codes. */ # define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB 136 # define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME 135 # define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 118 # define PKCS7_F_PKCS7_ADD_CERTIFICATE 100 # define PKCS7_F_PKCS7_ADD_CRL 101 # define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 102 # define PKCS7_F_PKCS7_ADD_SIGNATURE 131 # define PKCS7_F_PKCS7_ADD_SIGNER 103 # define PKCS7_F_PKCS7_BIO_ADD_DIGEST 125 # define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST 138 # define PKCS7_F_PKCS7_CTRL 104 # define PKCS7_F_PKCS7_DATADECODE 112 # define PKCS7_F_PKCS7_DATAFINAL 128 # define PKCS7_F_PKCS7_DATAINIT 105 # define PKCS7_F_PKCS7_DATAVERIFY 107 # define PKCS7_F_PKCS7_DECRYPT 114 # define PKCS7_F_PKCS7_DECRYPT_RINFO 133 # define PKCS7_F_PKCS7_ENCODE_RINFO 132 # define PKCS7_F_PKCS7_ENCRYPT 115 # define PKCS7_F_PKCS7_FINAL 134 # define PKCS7_F_PKCS7_FIND_DIGEST 127 # define PKCS7_F_PKCS7_GET0_SIGNERS 124 # define PKCS7_F_PKCS7_RECIP_INFO_SET 130 # define PKCS7_F_PKCS7_SET_CIPHER 108 # define PKCS7_F_PKCS7_SET_CONTENT 109 # define PKCS7_F_PKCS7_SET_DIGEST 126 # define PKCS7_F_PKCS7_SET_TYPE 110 # define PKCS7_F_PKCS7_SIGN 116 # define PKCS7_F_PKCS7_SIGNATUREVERIFY 113 # define PKCS7_F_PKCS7_SIGNER_INFO_SET 129 # define PKCS7_F_PKCS7_SIGNER_INFO_SIGN 139 # define PKCS7_F_PKCS7_SIGN_ADD_SIGNER 137 # define PKCS7_F_PKCS7_SIMPLE_SMIMECAP 119 # define PKCS7_F_PKCS7_VERIFY 117 /* * PKCS7 reason codes. */ # define PKCS7_R_CERTIFICATE_VERIFY_ERROR 117 # define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 144 # define PKCS7_R_CIPHER_NOT_INITIALIZED 116 # define PKCS7_R_CONTENT_AND_DATA_PRESENT 118 # define PKCS7_R_CTRL_ERROR 152 # define PKCS7_R_DECRYPT_ERROR 119 # define PKCS7_R_DIGEST_FAILURE 101 # define PKCS7_R_ENCRYPTION_CTRL_FAILURE 149 # define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150 # define PKCS7_R_ERROR_ADDING_RECIPIENT 120 # define PKCS7_R_ERROR_SETTING_CIPHER 121 # define PKCS7_R_INVALID_NULL_POINTER 143 # define PKCS7_R_INVALID_SIGNED_DATA_TYPE 155 # define PKCS7_R_NO_CONTENT 122 # define PKCS7_R_NO_DEFAULT_DIGEST 151 # define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND 154 # define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 115 # define PKCS7_R_NO_SIGNATURES_ON_DATA 123 # define PKCS7_R_NO_SIGNERS 142 # define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 104 # define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 124 # define PKCS7_R_PKCS7_ADD_SIGNER_ERROR 153 # define PKCS7_R_PKCS7_DATASIGN 145 # define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 127 # define PKCS7_R_SIGNATURE_FAILURE 105 # define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 128 # define PKCS7_R_SIGNING_CTRL_FAILURE 147 # define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 148 # define PKCS7_R_SMIME_TEXT_ERROR 129 # define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 106 # define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 107 # define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 108 # define PKCS7_R_UNKNOWN_DIGEST_TYPE 109 # define PKCS7_R_UNKNOWN_OPERATION 110 # define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 111 # define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 112 # define PKCS7_R_WRONG_CONTENT_TYPE 113 # define PKCS7_R_WRONG_PKCS7_TYPE 114 #endif PKZqC{qopenssl/kdferr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_KDFERR_H # define HEADER_KDFERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_KDF_strings(void); /* * KDF function codes. */ # define KDF_F_HKDF_EXTRACT 112 # define KDF_F_KBKDF_CTRL 134 # define KDF_F_KBKDF_CTRL_STR 135 # define KDF_F_KBKDF_DERIVE 136 # define KDF_F_KBKDF_NEW 137 # define KDF_F_KDF_CIPHER2CTRL 138 # define KDF_F_KDF_HKDF_DERIVE 113 # define KDF_F_KDF_HKDF_NEW 114 # define KDF_F_KDF_HKDF_SIZE 115 # define KDF_F_KDF_MD2CTRL 116 # define KDF_F_KDF_PBKDF2_CTRL_STR 117 # define KDF_F_KDF_PBKDF2_DERIVE 118 # define KDF_F_KDF_PBKDF2_NEW 119 # define KDF_F_KDF_SCRYPT_CTRL_STR 120 # define KDF_F_KDF_SCRYPT_CTRL_UINT32 121 # define KDF_F_KDF_SCRYPT_CTRL_UINT64 122 # define KDF_F_KDF_SCRYPT_DERIVE 123 # define KDF_F_KDF_SCRYPT_NEW 124 # define KDF_F_KDF_SSHKDF_CTRL 130 # define KDF_F_KDF_SSHKDF_CTRL_STR 131 # define KDF_F_KDF_SSHKDF_DERIVE 132 # define KDF_F_KDF_SSHKDF_NEW 133 # define KDF_F_KDF_TLS1_PRF_CTRL_STR 125 # define KDF_F_KDF_TLS1_PRF_DERIVE 126 # define KDF_F_KDF_TLS1_PRF_NEW 127 # define KDF_F_KRB5KDF 139 # define KDF_F_KRB5KDF_DERIVE 140 # define KDF_F_PBKDF2_SET_MEMBUF 128 # define KDF_F_PKEY_HKDF_CTRL_STR 103 # define KDF_F_PKEY_HKDF_DERIVE 102 # define KDF_F_PKEY_HKDF_INIT 108 # define KDF_F_PKEY_SCRYPT_CTRL_STR 104 # define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105 # define KDF_F_PKEY_SCRYPT_DERIVE 109 # define KDF_F_PKEY_SCRYPT_INIT 106 # define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107 # define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100 # define KDF_F_PKEY_TLS1_PRF_DERIVE 101 # define KDF_F_PKEY_TLS1_PRF_INIT 110 # define KDF_F_SCRYPT_SET_MEMBUF 129 # define KDF_F_SSKDF_DERIVE 141 # define KDF_F_SSKDF_NEW 142 # define KDF_F_SSKDF_SIZE 143 # define KDF_F_TLS1_PRF_ALG 111 /* * KDF reason codes. */ # define KDF_R_FAILED_TO_GENERATE_KEY 118 # define KDF_R_INVALID_CIPHER 116 # define KDF_R_INVALID_CONSTANT_LENGTH 119 # define KDF_R_INVALID_DIGEST 100 # define KDF_R_INVALID_SEED_LENGTH 117 # define KDF_R_MISSING_CIPHER 120 # define KDF_R_MISSING_CONSTANT 121 # define KDF_R_MISSING_ITERATION_COUNT 109 # define KDF_R_MISSING_KEY 104 # define KDF_R_MISSING_MESSAGE_DIGEST 105 # define KDF_R_MISSING_PARAMETER 101 # define KDF_R_MISSING_PASS 110 # define KDF_R_MISSING_SALT 111 # define KDF_R_MISSING_SECRET 107 # define KDF_R_MISSING_SEED 106 # define KDF_R_MISSING_SESSION_ID 113 # define KDF_R_MISSING_TYPE 114 # define KDF_R_MISSING_XCGHASH 115 # define KDF_R_UNKNOWN_PARAMETER_TYPE 103 # define KDF_R_VALUE_ERROR 108 # define KDF_R_VALUE_MISSING 102 # define KDF_R_WRONG_FINAL_BLOCK_LENGTH 122 # define KDF_R_WRONG_OUTPUT_BUFFER_SIZE 112 #endif PKZAu&&openssl/pkcs12.hnu[/* * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_PKCS12_H # define HEADER_PKCS12_H # include # include # include #ifdef __cplusplus extern "C" { #endif # define PKCS12_KEY_ID 1 # define PKCS12_IV_ID 2 # define PKCS12_MAC_ID 3 /* Default iteration count */ # ifndef PKCS12_DEFAULT_ITER # define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER # endif # define PKCS12_MAC_KEY_LENGTH 20 # define PKCS12_SALT_LEN 8 /* It's not clear if these are actually needed... */ # define PKCS12_key_gen PKCS12_key_gen_utf8 # define PKCS12_add_friendlyname PKCS12_add_friendlyname_utf8 /* MS key usage constants */ # define KEY_EX 0x10 # define KEY_SIG 0x80 typedef struct PKCS12_MAC_DATA_st PKCS12_MAC_DATA; typedef struct PKCS12_st PKCS12; typedef struct PKCS12_SAFEBAG_st PKCS12_SAFEBAG; DEFINE_STACK_OF(PKCS12_SAFEBAG) typedef struct pkcs12_bag_st PKCS12_BAGS; # define PKCS12_ERROR 0 # define PKCS12_OK 1 /* Compatibility macros */ #if OPENSSL_API_COMPAT < 0x10100000L # define M_PKCS12_bag_type PKCS12_bag_type # define M_PKCS12_cert_bag_type PKCS12_cert_bag_type # define M_PKCS12_crl_bag_type PKCS12_cert_bag_type # define PKCS12_certbag2x509 PKCS12_SAFEBAG_get1_cert # define PKCS12_certbag2scrl PKCS12_SAFEBAG_get1_crl # define PKCS12_bag_type PKCS12_SAFEBAG_get_nid # define PKCS12_cert_bag_type PKCS12_SAFEBAG_get_bag_nid # define PKCS12_x5092certbag PKCS12_SAFEBAG_create_cert # define PKCS12_x509crl2certbag PKCS12_SAFEBAG_create_crl # define PKCS12_MAKE_KEYBAG PKCS12_SAFEBAG_create0_p8inf # define PKCS12_MAKE_SHKEYBAG PKCS12_SAFEBAG_create_pkcs8_encrypt #endif DEPRECATEDIN_1_1_0(ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag, int attr_nid)) ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid); int PKCS12_mac_present(const PKCS12 *p12); void PKCS12_get0_mac(const ASN1_OCTET_STRING **pmac, const X509_ALGOR **pmacalg, const ASN1_OCTET_STRING **psalt, const ASN1_INTEGER **piter, const PKCS12 *p12); const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag, int attr_nid); const ASN1_OBJECT *PKCS12_SAFEBAG_get0_type(const PKCS12_SAFEBAG *bag); int PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag); int PKCS12_SAFEBAG_get_bag_nid(const PKCS12_SAFEBAG *bag); X509 *PKCS12_SAFEBAG_get1_cert(const PKCS12_SAFEBAG *bag); X509_CRL *PKCS12_SAFEBAG_get1_crl(const PKCS12_SAFEBAG *bag); const STACK_OF(PKCS12_SAFEBAG) * PKCS12_SAFEBAG_get0_safes(const PKCS12_SAFEBAG *bag); const PKCS8_PRIV_KEY_INFO *PKCS12_SAFEBAG_get0_p8inf(const PKCS12_SAFEBAG *bag); const X509_SIG *PKCS12_SAFEBAG_get0_pkcs8(const PKCS12_SAFEBAG *bag); PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_cert(X509 *x509); PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_crl(X509_CRL *crl); PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8); PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8); PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_pkcs8_encrypt(int pbe_nid, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8inf); PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, int nid1, int nid2); PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass, int passlen); PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag, const char *pass, int passlen); X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8); X509_SIG *PKCS8_set0_pbe(const char *pass, int passlen, PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe); PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7); PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, STACK_OF(PKCS12_SAFEBAG) *bags); STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass, int passlen); int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12); int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name, int namelen); int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name, int namelen); int PKCS12_add_friendlyname_utf8(PKCS12_SAFEBAG *bag, const char *name, int namelen); int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name, int namelen); int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag, const unsigned char *name, int namelen); int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage); ASN1_TYPE *PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs, int attr_nid); char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag); const STACK_OF(X509_ATTRIBUTE) * PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag); unsigned char *PKCS12_pbe_crypt(const X509_ALGOR *algor, const char *pass, int passlen, const unsigned char *in, int inlen, unsigned char **data, int *datalen, int en_de); void *PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it, const char *pass, int passlen, const ASN1_OCTET_STRING *oct, int zbuf); ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *it, const char *pass, int passlen, void *obj, int zbuf); PKCS12 *PKCS12_init(int mode); int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type); int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type); int PKCS12_key_gen_utf8(const char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type); int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md_type, int en_de); int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *mac, unsigned int *maclen); int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type); int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, const EVP_MD *md_type); unsigned char *OPENSSL_asc2uni(const char *asc, int asclen, unsigned char **uni, int *unilen); char *OPENSSL_uni2asc(const unsigned char *uni, int unilen); unsigned char *OPENSSL_utf82uni(const char *asc, int asclen, unsigned char **uni, int *unilen); char *OPENSSL_uni2utf8(const unsigned char *uni, int unilen); DECLARE_ASN1_FUNCTIONS(PKCS12) DECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA) DECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG) DECLARE_ASN1_FUNCTIONS(PKCS12_BAGS) DECLARE_ASN1_ITEM(PKCS12_SAFEBAGS) DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES) void PKCS12_PBE_add(void); int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca); PKCS12 *PKCS12_create(const char *pass, const char *name, EVP_PKEY *pkey, X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert, int iter, int mac_iter, int keytype); PKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert); PKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags, EVP_PKEY *key, int key_usage, int iter, int key_nid, const char *pass); int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags, int safe_nid, int iter, const char *pass); PKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid); int i2d_PKCS12_bio(BIO *bp, PKCS12 *p12); # ifndef OPENSSL_NO_STDIO int i2d_PKCS12_fp(FILE *fp, PKCS12 *p12); # endif PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12); # ifndef OPENSSL_NO_STDIO PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12); # endif int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass); # ifdef __cplusplus } # endif #endif PKZud6 6 openssl/rand.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RAND_H # define HEADER_RAND_H # include # include # include # include #ifdef __cplusplus extern "C" { #endif struct rand_meth_st { int (*seed) (const void *buf, int num); int (*bytes) (unsigned char *buf, int num); void (*cleanup) (void); int (*add) (const void *buf, int num, double randomness); int (*pseudorand) (unsigned char *buf, int num); int (*status) (void); }; int RAND_set_rand_method(const RAND_METHOD *meth); const RAND_METHOD *RAND_get_rand_method(void); # ifndef OPENSSL_NO_ENGINE int RAND_set_rand_engine(ENGINE *engine); # endif RAND_METHOD *RAND_OpenSSL(void); # if OPENSSL_API_COMPAT < 0x10100000L # define RAND_cleanup() while(0) continue # endif int RAND_bytes(unsigned char *buf, int num); int RAND_priv_bytes(unsigned char *buf, int num); DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num)) void RAND_seed(const void *buf, int num); void RAND_keep_random_devices_open(int keep); # if defined(__ANDROID__) && defined(__NDK_FPABI__) __NDK_FPABI__ /* __attribute__((pcs("aapcs"))) on ARM */ # endif void RAND_add(const void *buf, int num, double randomness); int RAND_load_file(const char *file, long max_bytes); int RAND_write_file(const char *file); const char *RAND_file_name(char *file, size_t num); int RAND_status(void); # ifndef OPENSSL_NO_EGD int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); int RAND_egd(const char *path); int RAND_egd_bytes(const char *path, int bytes); # endif int RAND_poll(void); # if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H)) /* application has to include in order to use these */ DEPRECATEDIN_1_1_0(void RAND_screen(void)) DEPRECATEDIN_1_1_0(int RAND_event(UINT, WPARAM, LPARAM)) # endif # ifdef OPENSSL_FIPS /* just stubs for API compatibility */ void RAND_set_fips_drbg_type(int type, int flags); int RAND_init_fips(void); # endif #ifdef __cplusplus } #endif #endif PKZ}D[ openssl/srp.hnu[/* * Copyright 2004-2018 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2004, EdelKey Project. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html * * Originally written by Christophe Renou and Peter Sylvester, * for the EdelKey project. */ #ifndef HEADER_SRP_H # define HEADER_SRP_H #include #ifndef OPENSSL_NO_SRP # include # include # include # include # include # ifdef __cplusplus extern "C" { # endif typedef struct SRP_gN_cache_st { char *b64_bn; BIGNUM *bn; } SRP_gN_cache; DEFINE_STACK_OF(SRP_gN_cache) typedef struct SRP_user_pwd_st { /* Owned by us. */ char *id; BIGNUM *s; BIGNUM *v; /* Not owned by us. */ const BIGNUM *g; const BIGNUM *N; /* Owned by us. */ char *info; } SRP_user_pwd; void SRP_user_pwd_free(SRP_user_pwd *user_pwd); DEFINE_STACK_OF(SRP_user_pwd) typedef struct SRP_VBASE_st { STACK_OF(SRP_user_pwd) *users_pwd; STACK_OF(SRP_gN_cache) *gN_cache; /* to simulate a user */ char *seed_key; const BIGNUM *default_g; const BIGNUM *default_N; } SRP_VBASE; /* * Internal structure storing N and g pair */ typedef struct SRP_gN_st { char *id; const BIGNUM *g; const BIGNUM *N; } SRP_gN; DEFINE_STACK_OF(SRP_gN) SRP_VBASE *SRP_VBASE_new(char *seed_key); void SRP_VBASE_free(SRP_VBASE *vb); int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file); /* This method ignores the configured seed and fails for an unknown user. */ DEPRECATEDIN_1_1_0(SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username)) /* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/ SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username); char *SRP_create_verifier(const char *user, const char *pass, char **salt, char **verifier, const char *N, const char *g); int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, BIGNUM **verifier, const BIGNUM *N, const BIGNUM *g); # define SRP_NO_ERROR 0 # define SRP_ERR_VBASE_INCOMPLETE_FILE 1 # define SRP_ERR_VBASE_BN_LIB 2 # define SRP_ERR_OPEN_FILE 3 # define SRP_ERR_MEMORY 4 # define DB_srptype 0 # define DB_srpverifier 1 # define DB_srpsalt 2 # define DB_srpid 3 # define DB_srpgN 4 # define DB_srpinfo 5 # undef DB_NUMBER # define DB_NUMBER 6 # define DB_SRP_INDEX 'I' # define DB_SRP_VALID 'V' # define DB_SRP_REVOKED 'R' # define DB_SRP_MODIF 'v' /* see srp.c */ char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N); SRP_gN *SRP_get_default_gN(const char *id); /* server side .... */ BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u, const BIGNUM *b, const BIGNUM *N); BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g, const BIGNUM *v); int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N); BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N); /* client side .... */ BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass); BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g); BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, const BIGNUM *x, const BIGNUM *a, const BIGNUM *u); int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N); # define SRP_MINIMAL_N 1024 # ifdef __cplusplus } # endif # endif #endif PKZp%""openssl/e_os2.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_E_OS2_H # define HEADER_E_OS2_H # include #ifdef __cplusplus extern "C" { #endif /****************************************************************************** * Detect operating systems. This probably needs completing. * The result is that at least one OPENSSL_SYS_os macro should be defined. * However, if none is defined, Unix is assumed. **/ # define OPENSSL_SYS_UNIX /* --------------------- Microsoft operating systems ---------------------- */ /* * Note that MSDOS actually denotes 32-bit environments running on top of * MS-DOS, such as DJGPP one. */ # if defined(OPENSSL_SYS_MSDOS) # undef OPENSSL_SYS_UNIX # endif /* * For 32 bit environment, there seems to be the CygWin environment and then * all the others that try to do the same thing Microsoft does... */ /* * UEFI lives here because it might be built with a Microsoft toolchain and * we need to avoid the false positive match on Windows. */ # if defined(OPENSSL_SYS_UEFI) # undef OPENSSL_SYS_UNIX # elif defined(OPENSSL_SYS_UWIN) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WIN32_UWIN # else # if defined(__CYGWIN__) || defined(OPENSSL_SYS_CYGWIN) # define OPENSSL_SYS_WIN32_CYGWIN # else # if defined(_WIN32) || defined(OPENSSL_SYS_WIN32) # undef OPENSSL_SYS_UNIX # if !defined(OPENSSL_SYS_WIN32) # define OPENSSL_SYS_WIN32 # endif # endif # if defined(_WIN64) || defined(OPENSSL_SYS_WIN64) # undef OPENSSL_SYS_UNIX # if !defined(OPENSSL_SYS_WIN64) # define OPENSSL_SYS_WIN64 # endif # endif # if defined(OPENSSL_SYS_WINNT) # undef OPENSSL_SYS_UNIX # endif # if defined(OPENSSL_SYS_WINCE) # undef OPENSSL_SYS_UNIX # endif # endif # endif /* Anything that tries to look like Microsoft is "Windows" */ # if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN64) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE) # undef OPENSSL_SYS_UNIX # define OPENSSL_SYS_WINDOWS # ifndef OPENSSL_SYS_MSDOS # define OPENSSL_SYS_MSDOS # endif # endif /* * DLL settings. This part is a bit tough, because it's up to the * application implementor how he or she will link the application, so it * requires some macro to be used. */ # ifdef OPENSSL_SYS_WINDOWS # ifndef OPENSSL_OPT_WINDLL # if defined(_WINDLL) /* This is used when building OpenSSL to * indicate that DLL linkage should be used */ # define OPENSSL_OPT_WINDLL # endif # endif # endif /* ------------------------------- OpenVMS -------------------------------- */ # if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYS_VMS) # if !defined(OPENSSL_SYS_VMS) # undef OPENSSL_SYS_UNIX # endif # define OPENSSL_SYS_VMS # if defined(__DECC) # define OPENSSL_SYS_VMS_DECC # elif defined(__DECCXX) # define OPENSSL_SYS_VMS_DECC # define OPENSSL_SYS_VMS_DECCXX # else # define OPENSSL_SYS_VMS_NODECC # endif # endif /* -------------------------------- Unix ---------------------------------- */ # ifdef OPENSSL_SYS_UNIX # if defined(linux) || defined(__linux__) && !defined(OPENSSL_SYS_LINUX) # define OPENSSL_SYS_LINUX # endif # if defined(_AIX) && !defined(OPENSSL_SYS_AIX) # define OPENSSL_SYS_AIX # endif # endif /* -------------------------------- VOS ----------------------------------- */ # if defined(__VOS__) && !defined(OPENSSL_SYS_VOS) # define OPENSSL_SYS_VOS # ifdef __HPPA__ # define OPENSSL_SYS_VOS_HPPA # endif # ifdef __IA32__ # define OPENSSL_SYS_VOS_IA32 # endif # endif /** * That's it for OS-specific stuff *****************************************************************************/ /* Specials for I/O an exit */ # ifdef OPENSSL_SYS_MSDOS # define OPENSSL_UNISTD_IO # define OPENSSL_DECLARE_EXIT extern void exit(int); # else # define OPENSSL_UNISTD_IO OPENSSL_UNISTD # define OPENSSL_DECLARE_EXIT /* declared in unistd.h */ # endif /*- * OPENSSL_EXTERN is normally used to declare a symbol with possible extra * attributes to handle its presence in a shared library. * OPENSSL_EXPORT is used to define a symbol with extra possible attributes * to make it visible in a shared library. * Care needs to be taken when a header file is used both to declare and * define symbols. Basically, for any library that exports some global * variables, the following code must be present in the header file that * declares them, before OPENSSL_EXTERN is used: * * #ifdef SOME_BUILD_FLAG_MACRO * # undef OPENSSL_EXTERN * # define OPENSSL_EXTERN OPENSSL_EXPORT * #endif * * The default is to have OPENSSL_EXPORT and OPENSSL_EXTERN * have some generally sensible values. */ # if defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL) # define OPENSSL_EXPORT extern __declspec(dllexport) # define OPENSSL_EXTERN extern __declspec(dllimport) # else # define OPENSSL_EXPORT extern # define OPENSSL_EXTERN extern # endif /*- * Macros to allow global variables to be reached through function calls when * required (if a shared library version requires it, for example. * The way it's done allows definitions like this: * * // in foobar.c * OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0) * // in foobar.h * OPENSSL_DECLARE_GLOBAL(int,foobar); * #define foobar OPENSSL_GLOBAL_REF(foobar) */ # ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \ type *_shadow_##name(void) \ { static type _hide_##name=value; return &_hide_##name; } # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) # else # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) type _shadow_##name=value; # define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name # define OPENSSL_GLOBAL_REF(name) _shadow_##name # endif # ifdef _WIN32 # ifdef _WIN64 # define ossl_ssize_t __int64 # define OSSL_SSIZE_MAX _I64_MAX # else # define ossl_ssize_t int # define OSSL_SSIZE_MAX INT_MAX # endif # endif # if defined(OPENSSL_SYS_UEFI) && !defined(ossl_ssize_t) # define ossl_ssize_t INTN # define OSSL_SSIZE_MAX MAX_INTN # endif # ifndef ossl_ssize_t # define ossl_ssize_t ssize_t # if defined(SSIZE_MAX) # define OSSL_SSIZE_MAX SSIZE_MAX # elif defined(_POSIX_SSIZE_MAX) # define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX # else # define OSSL_SSIZE_MAX ((ssize_t)(SIZE_MAX>>1)) # endif # endif # ifdef DEBUG_UNUSED # define __owur __attribute__((__warn_unused_result__)) # else # define __owur # endif /* Standard integer types */ # if defined(OPENSSL_SYS_UEFI) typedef INT8 int8_t; typedef UINT8 uint8_t; typedef INT16 int16_t; typedef UINT16 uint16_t; typedef INT32 int32_t; typedef UINT32 uint32_t; typedef INT64 int64_t; typedef UINT64 uint64_t; # elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ defined(__osf__) || defined(__sgi) || defined(__hpux) || \ defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__) # include # elif defined(_MSC_VER) && _MSC_VER<1600 /* * minimally required typdefs for systems not supporting inttypes.h or * stdint.h: currently just older VC++ */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned int uint32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; # else # include # endif /* ossl_inline: portable inline definition usable in public headers */ # if !defined(inline) && !defined(__cplusplus) # if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L /* just use inline */ # define ossl_inline inline # elif defined(__GNUC__) && __GNUC__>=2 # define ossl_inline __inline__ # elif defined(_MSC_VER) /* * Visual Studio: inline is available in C++ only, however * __inline is available for C, see * http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx */ # define ossl_inline __inline # else # define ossl_inline # endif # else # define ossl_inline inline # endif # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L # define ossl_noreturn _Noreturn # elif defined(__GNUC__) && __GNUC__ >= 2 # define ossl_noreturn __attribute__((noreturn)) # else # define ossl_noreturn # endif /* ossl_unused: portable unused attribute for use in public headers */ # if defined(__GNUC__) # define ossl_unused __attribute__((unused)) # else # define ossl_unused # endif #ifdef __cplusplus } #endif #endif PKZHȑopenssl/objects.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OBJECTS_H # define HEADER_OBJECTS_H # include # include # include # include # define OBJ_NAME_TYPE_UNDEF 0x00 # define OBJ_NAME_TYPE_MD_METH 0x01 # define OBJ_NAME_TYPE_CIPHER_METH 0x02 # define OBJ_NAME_TYPE_PKEY_METH 0x03 # define OBJ_NAME_TYPE_COMP_METH 0x04 # define OBJ_NAME_TYPE_NUM 0x05 # define OBJ_NAME_ALIAS 0x8000 # define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01 # define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02 #ifdef __cplusplus extern "C" { #endif typedef struct obj_name_st { int type; int alias; const char *name; const char *data; } OBJ_NAME; # define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) int OBJ_NAME_init(void); int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *), int (*cmp_func) (const char *, const char *), void (*free_func) (const char *, int, const char *)); const char *OBJ_NAME_get(const char *name, int type); int OBJ_NAME_add(const char *name, int type, const char *data); int OBJ_NAME_remove(const char *name, int type); void OBJ_NAME_cleanup(int type); /* -1 for everything */ void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg), void *arg); void OBJ_NAME_do_all_sorted(int type, void (*fn) (const OBJ_NAME *, void *arg), void *arg); ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o); ASN1_OBJECT *OBJ_nid2obj(int n); const char *OBJ_nid2ln(int n); const char *OBJ_nid2sn(int n); int OBJ_obj2nid(const ASN1_OBJECT *o); ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name); int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name); int OBJ_txt2nid(const char *s); int OBJ_ln2nid(const char *s); int OBJ_sn2nid(const char *s); int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b); const void *OBJ_bsearch_(const void *key, const void *base, int num, int size, int (*cmp) (const void *, const void *)); const void *OBJ_bsearch_ex_(const void *key, const void *base, int num, int size, int (*cmp) (const void *, const void *), int flags); # define _DECLARE_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm) \ static int nm##_cmp_BSEARCH_CMP_FN(const void *, const void *); \ static int nm##_cmp(type1 const *, type2 const *); \ scope type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) # define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \ _DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp) # define DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) /*- * Unsolved problem: if a type is actually a pointer type, like * nid_triple is, then its impossible to get a const where you need * it. Consider: * * typedef int nid_triple[3]; * const void *a_; * const nid_triple const *a = a_; * * The assignment discards a const because what you really want is: * * const int const * const *a = a_; * * But if you do that, you lose the fact that a is an array of 3 ints, * which breaks comparison functions. * * Thus we end up having to cast, sadly, or unpack the * declarations. Or, as I finally did in this case, declare nid_triple * to be a struct, which it should have been in the first place. * * Ben, August 2008. * * Also, strictly speaking not all types need be const, but handling * the non-constness means a lot of complication, and in practice * comparison routines do always not touch their arguments. */ # define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm) \ static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ { \ type1 const *a = a_; \ type2 const *b = b_; \ return nm##_cmp(a,b); \ } \ static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ { \ return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ nm##_cmp_BSEARCH_CMP_FN); \ } \ extern void dummy_prototype(void) # define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \ static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \ { \ type1 const *a = a_; \ type2 const *b = b_; \ return nm##_cmp(a,b); \ } \ type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \ { \ return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \ nm##_cmp_BSEARCH_CMP_FN); \ } \ extern void dummy_prototype(void) # define OBJ_bsearch(type1,key,type2,base,num,cmp) \ ((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ num,sizeof(type2), \ ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ (void)CHECKED_PTR_OF(type2,cmp##_type_2), \ cmp##_BSEARCH_CMP_FN))) # define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags) \ ((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \ num,sizeof(type2), \ ((void)CHECKED_PTR_OF(type1,cmp##_type_1), \ (void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \ cmp##_BSEARCH_CMP_FN)),flags) int OBJ_new_nid(int num); int OBJ_add_object(const ASN1_OBJECT *obj); int OBJ_create(const char *oid, const char *sn, const char *ln); #if OPENSSL_API_COMPAT < 0x10100000L # define OBJ_cleanup() while(0) continue #endif int OBJ_create_objects(BIO *in); size_t OBJ_length(const ASN1_OBJECT *obj); const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj); int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); int OBJ_add_sigid(int signid, int dig_id, int pkey_id); void OBJ_sigid_free(void); # ifdef __cplusplus } # endif #endif PKZ0Oopenssl/mdc2.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_MDC2_H # define HEADER_MDC2_H # include #ifndef OPENSSL_NO_MDC2 # include # include # ifdef __cplusplus extern "C" { # endif # define MDC2_BLOCK 8 # define MDC2_DIGEST_LENGTH 16 typedef struct mdc2_ctx_st { unsigned int num; unsigned char data[MDC2_BLOCK]; DES_cblock h, hh; int pad_type; /* either 1 or 2, default 1 */ } MDC2_CTX; int MDC2_Init(MDC2_CTX *c); int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); int MDC2_Final(unsigned char *md, MDC2_CTX *c); unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); # ifdef __cplusplus } # endif # endif #endif PKZLWLW openssl/rsa.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RSA_H # define HEADER_RSA_H # include # ifndef OPENSSL_NO_RSA # include # include # include # include # if OPENSSL_API_COMPAT < 0x10100000L # include # endif # include # ifdef __cplusplus extern "C" { # endif /* The types RSA and RSA_METHOD are defined in ossl_typ.h */ # ifndef OPENSSL_RSA_MAX_MODULUS_BITS # define OPENSSL_RSA_MAX_MODULUS_BITS 16384 # endif # define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 1024 # ifndef OPENSSL_RSA_SMALL_MODULUS_BITS # define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 # endif # ifndef OPENSSL_RSA_MAX_PUBEXP_BITS /* exponent limit enforced for "large" modulus only */ # define OPENSSL_RSA_MAX_PUBEXP_BITS 64 # endif # define RSA_3 0x3L # define RSA_F4 0x10001L /* based on RFC 8017 appendix A.1.2 */ # define RSA_ASN1_VERSION_DEFAULT 0 # define RSA_ASN1_VERSION_MULTI 1 # define RSA_DEFAULT_PRIME_NUM 2 # define RSA_METHOD_FLAG_NO_CHECK 0x0001/* don't check pub/private * match */ # define RSA_FLAG_CACHE_PUBLIC 0x0002 # define RSA_FLAG_CACHE_PRIVATE 0x0004 # define RSA_FLAG_BLINDING 0x0008 # define RSA_FLAG_THREAD_SAFE 0x0010 /* * This flag means the private key operations will be handled by rsa_mod_exp * and that they do not depend on the private key components being present: * for example a key stored in external hardware. Without this flag * bn_mod_exp gets called when private key components are absent. */ # define RSA_FLAG_EXT_PKEY 0x0020 /* * new with 0.9.6j and 0.9.7b; the built-in * RSA implementation now uses blinding by * default (ignoring RSA_FLAG_BLINDING), * but other engines might not need it */ # define RSA_FLAG_NO_BLINDING 0x0080 # if OPENSSL_API_COMPAT < 0x10100000L /* * Does nothing. Previously this switched off constant time behaviour. */ # define RSA_FLAG_NO_CONSTTIME 0x0000 # endif # if OPENSSL_API_COMPAT < 0x00908000L /* deprecated name for the flag*/ /* * new with 0.9.7h; the built-in RSA * implementation now uses constant time * modular exponentiation for secret exponents * by default. This flag causes the * faster variable sliding window method to * be used for all exponents. */ # define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME # endif # define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \ RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_RSA_PADDING, pad, NULL) # define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \ RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad) # define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \ RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) /* Salt length matches digest */ # define RSA_PSS_SALTLEN_DIGEST -1 /* Verify only: auto detect salt length */ # define RSA_PSS_SALTLEN_AUTO -2 /* Set salt length to maximum possible */ # define RSA_PSS_SALTLEN_MAX -3 /* Old compatible max salt length for sign only */ # define RSA_PSS_SALTLEN_MAX_SIGN -2 # define EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) # define EVP_PKEY_CTX_get_rsa_pss_saltlen(ctx, plen) \ RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN, 0, plen) # define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \ RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL) # define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \ RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP, 0, pubexp) # define EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) \ RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES, primes, NULL) # define EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, md) \ RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_get_rsa_mgf1_md(ctx, pmd) \ RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_GET_RSA_MGF1_MD, 0, (void *)(pmd)) # define EVP_PKEY_CTX_get_rsa_oaep_md(ctx, pmd) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_GET_RSA_OAEP_MD, 0, (void *)(pmd)) # define EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, l, llen) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_RSA_OAEP_LABEL, llen, (void *)(l)) # define EVP_PKEY_CTX_get0_rsa_oaep_label(ctx, l) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, 0, (void *)(l)) # define EVP_PKEY_CTX_set_rsa_pss_keygen_md(ctx, md) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, \ EVP_PKEY_OP_KEYGEN, EVP_PKEY_CTRL_MD, \ 0, (void *)(md)) # define EVP_PKEY_CTRL_RSA_PADDING (EVP_PKEY_ALG_CTRL + 1) # define EVP_PKEY_CTRL_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 2) # define EVP_PKEY_CTRL_RSA_KEYGEN_BITS (EVP_PKEY_ALG_CTRL + 3) # define EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP (EVP_PKEY_ALG_CTRL + 4) # define EVP_PKEY_CTRL_RSA_MGF1_MD (EVP_PKEY_ALG_CTRL + 5) # define EVP_PKEY_CTRL_GET_RSA_PADDING (EVP_PKEY_ALG_CTRL + 6) # define EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 7) # define EVP_PKEY_CTRL_GET_RSA_MGF1_MD (EVP_PKEY_ALG_CTRL + 8) # define EVP_PKEY_CTRL_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 9) # define EVP_PKEY_CTRL_RSA_OAEP_LABEL (EVP_PKEY_ALG_CTRL + 10) # define EVP_PKEY_CTRL_GET_RSA_OAEP_MD (EVP_PKEY_ALG_CTRL + 11) # define EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL (EVP_PKEY_ALG_CTRL + 12) # define EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES (EVP_PKEY_ALG_CTRL + 13) # define EVP_PKEY_CTRL_RSA_IMPLICIT_REJECTION (EVP_PKEY_ALG_CTRL + 14) # define RSA_PKCS1_PADDING 1 # define RSA_SSLV23_PADDING 2 # define RSA_NO_PADDING 3 # define RSA_PKCS1_OAEP_PADDING 4 # define RSA_X931_PADDING 5 /* EVP_PKEY_ only */ # define RSA_PKCS1_PSS_PADDING 6 /* internal RSA_ only */ # define RSA_PKCS1_NO_IMPLICIT_REJECT_PADDING 8 # define RSA_PKCS1_PADDING_SIZE 11 # define RSA_set_app_data(s,arg) RSA_set_ex_data(s,0,arg) # define RSA_get_app_data(s) RSA_get_ex_data(s,0) RSA *RSA_new(void); RSA *RSA_new_method(ENGINE *engine); int RSA_bits(const RSA *rsa); int RSA_size(const RSA *rsa); int RSA_security_bits(const RSA *rsa); int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); int RSA_set0_crt_params(RSA *r,BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], BIGNUM *coeffs[], int pnum); void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d); void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); int RSA_get_multi_prime_extra_count(const RSA *r); int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]); void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp); int RSA_get0_multi_prime_crt_params(const RSA *r, const BIGNUM *exps[], const BIGNUM *coeffs[]); const BIGNUM *RSA_get0_n(const RSA *d); const BIGNUM *RSA_get0_e(const RSA *d); const BIGNUM *RSA_get0_d(const RSA *d); const BIGNUM *RSA_get0_p(const RSA *d); const BIGNUM *RSA_get0_q(const RSA *d); const BIGNUM *RSA_get0_dmp1(const RSA *r); const BIGNUM *RSA_get0_dmq1(const RSA *r); const BIGNUM *RSA_get0_iqmp(const RSA *r); const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r); void RSA_clear_flags(RSA *r, int flags); int RSA_test_flags(const RSA *r, int flags); void RSA_set_flags(RSA *r, int flags); int RSA_get_version(RSA *r); ENGINE *RSA_get0_engine(const RSA *r); /* Deprecated version */ DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void (*callback) (int, int, void *), void *cb_arg)) /* New version */ int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); /* Multi-prime version */ int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb); int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, BIGNUM *q2, const BIGNUM *Xp1, const BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *Xq1, const BIGNUM *Xq2, const BIGNUM *Xq, const BIGNUM *e, BN_GENCB *cb); int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, BN_GENCB *cb); int RSA_check_key(const RSA *); int RSA_check_key_ex(const RSA *, BN_GENCB *cb); /* next 4 return -1 on error */ int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); void RSA_free(RSA *r); /* "up" the RSA object's reference count */ int RSA_up_ref(RSA *r); int RSA_flags(const RSA *r); void RSA_set_default_method(const RSA_METHOD *meth); const RSA_METHOD *RSA_get_default_method(void); const RSA_METHOD *RSA_null_method(void); const RSA_METHOD *RSA_get_method(const RSA *rsa); int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); /* these are the actual RSA functions */ const RSA_METHOD *RSA_PKCS1_OpenSSL(void); int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2); DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey) DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey) struct rsa_pss_params_st { X509_ALGOR *hashAlgorithm; X509_ALGOR *maskGenAlgorithm; ASN1_INTEGER *saltLength; ASN1_INTEGER *trailerField; /* Decoded hash algorithm from maskGenAlgorithm */ X509_ALGOR *maskHash; }; DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS) typedef struct rsa_oaep_params_st { X509_ALGOR *hashFunc; X509_ALGOR *maskGenFunc; X509_ALGOR *pSourceFunc; /* Decoded hash algorithm from maskGenFunc */ X509_ALGOR *maskHash; } RSA_OAEP_PARAMS; DECLARE_ASN1_FUNCTIONS(RSA_OAEP_PARAMS) # ifndef OPENSSL_NO_STDIO int RSA_print_fp(FILE *fp, const RSA *r, int offset); # endif int RSA_print(BIO *bp, const RSA *r, int offset); /* * The following 2 functions sign and verify a X509_SIG ASN1 object inside * PKCS#1 padded RSA encryption */ int RSA_sign(int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, RSA *rsa); int RSA_verify(int type, const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, RSA *rsa); /* * The following 2 function sign and verify a ASN1_OCTET_STRING object inside * PKCS#1 padded RSA encryption */ int RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, RSA *rsa); int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_length, unsigned char *sigbuf, unsigned int siglen, RSA *rsa); int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); void RSA_blinding_off(RSA *rsa); BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, const unsigned char *f, int fl); int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, const unsigned char *f, int fl, int rsa_len); int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen, const unsigned char *f, int fl); int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, const unsigned char *f, int fl, int rsa_len); int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed, long seedlen, const EVP_MD *dgst); int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, const unsigned char *f, int fl, const unsigned char *p, int pl); int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, const unsigned char *f, int fl, int rsa_len, const unsigned char *p, int pl); int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, const unsigned char *from, int flen, const unsigned char *param, int plen, const EVP_MD *md, const EVP_MD *mgf1md); int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, const unsigned char *from, int flen, int num, const unsigned char *param, int plen, const EVP_MD *md, const EVP_MD *mgf1md); int RSA_padding_add_SSLv23(unsigned char *to, int tlen, const unsigned char *f, int fl); int RSA_padding_check_SSLv23(unsigned char *to, int tlen, const unsigned char *f, int fl, int rsa_len); int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f, int fl); int RSA_padding_check_none(unsigned char *to, int tlen, const unsigned char *f, int fl, int rsa_len); int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f, int fl); int RSA_padding_check_X931(unsigned char *to, int tlen, const unsigned char *f, int fl, int rsa_len); int RSA_X931_hash_id(int nid); int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, const EVP_MD *Hash, const unsigned char *EM, int sLen); int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, const unsigned char *mHash, const EVP_MD *Hash, int sLen); int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, const EVP_MD *Hash, const EVP_MD *mgf1Hash, const unsigned char *EM, int sLen); int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, const unsigned char *mHash, const EVP_MD *Hash, const EVP_MD *mgf1Hash, int sLen); #define RSA_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, l, p, newf, dupf, freef) int RSA_set_ex_data(RSA *r, int idx, void *arg); void *RSA_get_ex_data(const RSA *r, int idx); RSA *RSAPublicKey_dup(RSA *rsa); RSA *RSAPrivateKey_dup(RSA *rsa); /* * If this flag is set the RSA method is FIPS compliant and can be used in * FIPS mode. This is set in the validated module method. If an application * sets this flag in its own methods it is its responsibility to ensure the * result is compliant. */ # define RSA_FLAG_FIPS_METHOD 0x0400 /* * If this flag is set the operations normally disabled in FIPS mode are * permitted it is then the applications responsibility to ensure that the * usage is compliant. */ # define RSA_FLAG_NON_FIPS_ALLOW 0x0400 /* * Application has decided PRNG is good enough to generate a key: don't * check. */ # define RSA_FLAG_CHECKED 0x0800 RSA_METHOD *RSA_meth_new(const char *name, int flags); void RSA_meth_free(RSA_METHOD *meth); RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); const char *RSA_meth_get0_name(const RSA_METHOD *meth); int RSA_meth_set1_name(RSA_METHOD *meth, const char *name); int RSA_meth_get_flags(const RSA_METHOD *meth); int RSA_meth_set_flags(RSA_METHOD *meth, int flags); void *RSA_meth_get0_app_data(const RSA_METHOD *meth); int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data); int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth)) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_meth_set_pub_enc(RSA_METHOD *rsa, int (*pub_enc) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth)) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_meth_set_pub_dec(RSA_METHOD *rsa, int (*pub_dec) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth)) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_meth_set_priv_enc(RSA_METHOD *rsa, int (*priv_enc) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth)) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_meth_set_priv_dec(RSA_METHOD *rsa, int (*priv_dec) (int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding)); int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx); int RSA_meth_set_mod_exp(RSA_METHOD *rsa, int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx)); int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa, int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)); int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa); int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa)); int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa); int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa)); int (*RSA_meth_get_sign(const RSA_METHOD *meth)) (int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa); int RSA_meth_set_sign(RSA_METHOD *rsa, int (*sign) (int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const RSA *rsa)); int (*RSA_meth_get_verify(const RSA_METHOD *meth)) (int dtype, const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa); int RSA_meth_set_verify(RSA_METHOD *rsa, int (*verify) (int dtype, const unsigned char *m, unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)); int (*RSA_meth_get_keygen(const RSA_METHOD *meth)) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); int RSA_meth_set_keygen(RSA_METHOD *rsa, int (*keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb)); int (*RSA_meth_get_multi_prime_keygen(const RSA_METHOD *meth)) (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb); int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth, int (*keygen) (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb)); # ifdef __cplusplus } # endif # endif #endif PKZJ*HGGopenssl/engineerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ENGINEERR_H # define HEADER_ENGINEERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_ENGINE # ifdef __cplusplus extern "C" # endif int ERR_load_ENGINE_strings(void); /* * ENGINE function codes. */ # define ENGINE_F_DIGEST_UPDATE 198 # define ENGINE_F_DYNAMIC_CTRL 180 # define ENGINE_F_DYNAMIC_GET_DATA_CTX 181 # define ENGINE_F_DYNAMIC_LOAD 182 # define ENGINE_F_DYNAMIC_SET_DATA_CTX 183 # define ENGINE_F_ENGINE_ADD 105 # define ENGINE_F_ENGINE_BY_ID 106 # define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 170 # define ENGINE_F_ENGINE_CTRL 142 # define ENGINE_F_ENGINE_CTRL_CMD 178 # define ENGINE_F_ENGINE_CTRL_CMD_STRING 171 # define ENGINE_F_ENGINE_FINISH 107 # define ENGINE_F_ENGINE_GET_CIPHER 185 # define ENGINE_F_ENGINE_GET_DIGEST 186 # define ENGINE_F_ENGINE_GET_FIRST 195 # define ENGINE_F_ENGINE_GET_LAST 196 # define ENGINE_F_ENGINE_GET_NEXT 115 # define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 193 # define ENGINE_F_ENGINE_GET_PKEY_METH 192 # define ENGINE_F_ENGINE_GET_PREV 116 # define ENGINE_F_ENGINE_INIT 119 # define ENGINE_F_ENGINE_LIST_ADD 120 # define ENGINE_F_ENGINE_LIST_REMOVE 121 # define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150 # define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151 # define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 194 # define ENGINE_F_ENGINE_NEW 122 # define ENGINE_F_ENGINE_PKEY_ASN1_FIND_STR 197 # define ENGINE_F_ENGINE_REMOVE 123 # define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189 # define ENGINE_F_ENGINE_SET_ID 129 # define ENGINE_F_ENGINE_SET_NAME 130 # define ENGINE_F_ENGINE_TABLE_REGISTER 184 # define ENGINE_F_ENGINE_UNLOCKED_FINISH 191 # define ENGINE_F_ENGINE_UP_REF 190 # define ENGINE_F_INT_CLEANUP_ITEM 199 # define ENGINE_F_INT_CTRL_HELPER 172 # define ENGINE_F_INT_ENGINE_CONFIGURE 188 # define ENGINE_F_INT_ENGINE_MODULE_INIT 187 # define ENGINE_F_OSSL_HMAC_INIT 200 /* * ENGINE reason codes. */ # define ENGINE_R_ALREADY_LOADED 100 # define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER 133 # define ENGINE_R_CMD_NOT_EXECUTABLE 134 # define ENGINE_R_COMMAND_TAKES_INPUT 135 # define ENGINE_R_COMMAND_TAKES_NO_INPUT 136 # define ENGINE_R_CONFLICTING_ENGINE_ID 103 # define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED 119 # define ENGINE_R_DSO_FAILURE 104 # define ENGINE_R_DSO_NOT_FOUND 132 # define ENGINE_R_ENGINES_SECTION_ERROR 148 # define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102 # define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 # define ENGINE_R_ENGINE_SECTION_ERROR 149 # define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 # define ENGINE_R_FAILED_LOADING_PUBLIC_KEY 129 # define ENGINE_R_FINISH_FAILED 106 # define ENGINE_R_ID_OR_NAME_MISSING 108 # define ENGINE_R_INIT_FAILED 109 # define ENGINE_R_INTERNAL_LIST_ERROR 110 # define ENGINE_R_INVALID_ARGUMENT 143 # define ENGINE_R_INVALID_CMD_NAME 137 # define ENGINE_R_INVALID_CMD_NUMBER 138 # define ENGINE_R_INVALID_INIT_VALUE 151 # define ENGINE_R_INVALID_STRING 150 # define ENGINE_R_NOT_INITIALISED 117 # define ENGINE_R_NOT_LOADED 112 # define ENGINE_R_NO_CONTROL_FUNCTION 120 # define ENGINE_R_NO_INDEX 144 # define ENGINE_R_NO_LOAD_FUNCTION 125 # define ENGINE_R_NO_REFERENCE 130 # define ENGINE_R_NO_SUCH_ENGINE 116 # define ENGINE_R_UNIMPLEMENTED_CIPHER 146 # define ENGINE_R_UNIMPLEMENTED_DIGEST 147 # define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101 # define ENGINE_R_VERSION_INCOMPATIBILITY 145 # endif #endif PKZ[f7$7$openssl/lhash.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ /* * Header for dynamic hash table routines Author - Eric Young */ #ifndef HEADER_LHASH_H # define HEADER_LHASH_H # include # include #ifdef __cplusplus extern "C" { #endif typedef struct lhash_node_st OPENSSL_LH_NODE; typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *); typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *); typedef void (*OPENSSL_LH_DOALL_FUNC) (void *); typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *); typedef struct lhash_st OPENSSL_LHASH; /* * Macros for declaring and implementing type-safe wrappers for LHASH * callbacks. This way, callbacks can be provided to LHASH structures without * function pointer casting and the macro-defined callbacks provide * per-variable casting before deferring to the underlying type-specific * callbacks. NB: It is possible to place a "static" in front of both the * DECLARE and IMPLEMENT macros if the functions are strictly internal. */ /* First: "hash" functions */ # define DECLARE_LHASH_HASH_FN(name, o_type) \ unsigned long name##_LHASH_HASH(const void *); # define IMPLEMENT_LHASH_HASH_FN(name, o_type) \ unsigned long name##_LHASH_HASH(const void *arg) { \ const o_type *a = arg; \ return name##_hash(a); } # define LHASH_HASH_FN(name) name##_LHASH_HASH /* Second: "compare" functions */ # define DECLARE_LHASH_COMP_FN(name, o_type) \ int name##_LHASH_COMP(const void *, const void *); # define IMPLEMENT_LHASH_COMP_FN(name, o_type) \ int name##_LHASH_COMP(const void *arg1, const void *arg2) { \ const o_type *a = arg1; \ const o_type *b = arg2; \ return name##_cmp(a,b); } # define LHASH_COMP_FN(name) name##_LHASH_COMP /* Fourth: "doall_arg" functions */ # define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ void name##_LHASH_DOALL_ARG(void *, void *); # define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \ o_type *a = arg1; \ a_type *b = arg2; \ name##_doall_arg(a, b); } # define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG # define LH_LOAD_MULT 256 int OPENSSL_LH_error(OPENSSL_LHASH *lh); OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c); void OPENSSL_LH_free(OPENSSL_LHASH *lh); void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data); void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data); void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data); void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func); void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg); unsigned long OPENSSL_LH_strhash(const char *c); unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh); unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh); void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load); # ifndef OPENSSL_NO_STDIO void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp); void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp); void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp); # endif void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out); void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out); void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out); # if OPENSSL_API_COMPAT < 0x10100000L # define _LHASH OPENSSL_LHASH # define LHASH_NODE OPENSSL_LH_NODE # define lh_error OPENSSL_LH_error # define lh_new OPENSSL_LH_new # define lh_free OPENSSL_LH_free # define lh_insert OPENSSL_LH_insert # define lh_delete OPENSSL_LH_delete # define lh_retrieve OPENSSL_LH_retrieve # define lh_doall OPENSSL_LH_doall # define lh_doall_arg OPENSSL_LH_doall_arg # define lh_strhash OPENSSL_LH_strhash # define lh_num_items OPENSSL_LH_num_items # ifndef OPENSSL_NO_STDIO # define lh_stats OPENSSL_LH_stats # define lh_node_stats OPENSSL_LH_node_stats # define lh_node_usage_stats OPENSSL_LH_node_usage_stats # endif # define lh_stats_bio OPENSSL_LH_stats_bio # define lh_node_stats_bio OPENSSL_LH_node_stats_bio # define lh_node_usage_stats_bio OPENSSL_LH_node_usage_stats_bio # endif /* Type checking... */ # define LHASH_OF(type) struct lhash_st_##type # define DEFINE_LHASH_OF(type) \ LHASH_OF(type) { union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; }; \ static ossl_unused ossl_inline LHASH_OF(type) *lh_##type##_new(unsigned long (*hfn)(const type *), \ int (*cfn)(const type *, const type *)) \ { \ return (LHASH_OF(type) *) \ OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn); \ } \ static ossl_unused ossl_inline void lh_##type##_free(LHASH_OF(type) *lh) \ { \ OPENSSL_LH_free((OPENSSL_LHASH *)lh); \ } \ static ossl_unused ossl_inline type *lh_##type##_insert(LHASH_OF(type) *lh, type *d) \ { \ return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \ } \ static ossl_unused ossl_inline type *lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \ { \ return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \ } \ static ossl_unused ossl_inline type *lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \ { \ return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \ } \ static ossl_unused ossl_inline int lh_##type##_error(LHASH_OF(type) *lh) \ { \ return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \ } \ static ossl_unused ossl_inline unsigned long lh_##type##_num_items(LHASH_OF(type) *lh) \ { \ return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \ } \ static ossl_unused ossl_inline void lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ { \ OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \ } \ static ossl_unused ossl_inline void lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ { \ OPENSSL_LH_node_usage_stats_bio((const OPENSSL_LHASH *)lh, out); \ } \ static ossl_unused ossl_inline void lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ { \ OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \ } \ static ossl_unused ossl_inline unsigned long lh_##type##_get_down_load(LHASH_OF(type) *lh) \ { \ return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \ } \ static ossl_unused ossl_inline void lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \ { \ OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \ } \ static ossl_unused ossl_inline void lh_##type##_doall(LHASH_OF(type) *lh, \ void (*doall)(type *)) \ { \ OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \ } \ LHASH_OF(type) #define IMPLEMENT_LHASH_DOALL_ARG_CONST(type, argtype) \ int_implement_lhash_doall(type, argtype, const type) #define IMPLEMENT_LHASH_DOALL_ARG(type, argtype) \ int_implement_lhash_doall(type, argtype, type) #define int_implement_lhash_doall(type, argtype, cbargtype) \ static ossl_unused ossl_inline void \ lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \ void (*fn)(cbargtype *, argtype *), \ argtype *arg) \ { \ OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)fn, (void *)arg); \ } \ LHASH_OF(type) DEFINE_LHASH_OF(OPENSSL_STRING); # ifdef _MSC_VER /* * push and pop this warning: * warning C4090: 'function': different 'const' qualifiers */ # pragma warning (push) # pragma warning (disable: 4090) # endif DEFINE_LHASH_OF(OPENSSL_CSTRING); # ifdef _MSC_VER # pragma warning (pop) # endif /* * If called without higher optimization (min. -xO3) the Oracle Developer * Studio compiler generates code for the defined (static inline) functions * above. * This would later lead to the linker complaining about missing symbols when * this header file is included but the resulting object is not linked against * the Crypto library (openssl#6912). */ # ifdef __SUNPRO_C # pragma weak OPENSSL_LH_new # pragma weak OPENSSL_LH_free # pragma weak OPENSSL_LH_insert # pragma weak OPENSSL_LH_delete # pragma weak OPENSSL_LH_retrieve # pragma weak OPENSSL_LH_error # pragma weak OPENSSL_LH_num_items # pragma weak OPENSSL_LH_node_stats_bio # pragma weak OPENSSL_LH_node_usage_stats_bio # pragma weak OPENSSL_LH_stats_bio # pragma weak OPENSSL_LH_get_down_load # pragma weak OPENSSL_LH_set_down_load # pragma weak OPENSSL_LH_doall # pragma weak OPENSSL_LH_doall_arg # endif /* __SUNPRO_C */ #ifdef __cplusplus } #endif #endif PKZl**openssl/tls1.hnu[/* * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * Copyright 2005 Nokia. All rights reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_TLS1_H # define HEADER_TLS1_H # include # include #ifdef __cplusplus extern "C" { #endif /* Default security level if not overridden at config time */ # ifndef OPENSSL_TLS_SECURITY_LEVEL # define OPENSSL_TLS_SECURITY_LEVEL 1 # endif # define TLS1_VERSION 0x0301 # define TLS1_1_VERSION 0x0302 # define TLS1_2_VERSION 0x0303 # define TLS1_3_VERSION 0x0304 # define TLS_MAX_VERSION TLS1_3_VERSION /* Special value for method supporting multiple versions */ # define TLS_ANY_VERSION 0x10000 # define TLS1_VERSION_MAJOR 0x03 # define TLS1_VERSION_MINOR 0x01 # define TLS1_1_VERSION_MAJOR 0x03 # define TLS1_1_VERSION_MINOR 0x02 # define TLS1_2_VERSION_MAJOR 0x03 # define TLS1_2_VERSION_MINOR 0x03 # define TLS1_get_version(s) \ ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0) # define TLS1_get_client_version(s) \ ((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0) # define TLS1_AD_DECRYPTION_FAILED 21 # define TLS1_AD_RECORD_OVERFLOW 22 # define TLS1_AD_UNKNOWN_CA 48/* fatal */ # define TLS1_AD_ACCESS_DENIED 49/* fatal */ # define TLS1_AD_DECODE_ERROR 50/* fatal */ # define TLS1_AD_DECRYPT_ERROR 51 # define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */ # define TLS1_AD_PROTOCOL_VERSION 70/* fatal */ # define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */ # define TLS1_AD_INTERNAL_ERROR 80/* fatal */ # define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */ # define TLS1_AD_USER_CANCELLED 90 # define TLS1_AD_NO_RENEGOTIATION 100 /* TLSv1.3 alerts */ # define TLS13_AD_MISSING_EXTENSION 109 /* fatal */ # define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */ /* codes 110-114 are from RFC3546 */ # define TLS1_AD_UNSUPPORTED_EXTENSION 110 # define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111 # define TLS1_AD_UNRECOGNIZED_NAME 112 # define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113 # define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 # define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */ # define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */ /* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */ # define TLSEXT_TYPE_server_name 0 # define TLSEXT_TYPE_max_fragment_length 1 # define TLSEXT_TYPE_client_certificate_url 2 # define TLSEXT_TYPE_trusted_ca_keys 3 # define TLSEXT_TYPE_truncated_hmac 4 # define TLSEXT_TYPE_status_request 5 /* ExtensionType values from RFC4681 */ # define TLSEXT_TYPE_user_mapping 6 /* ExtensionType values from RFC5878 */ # define TLSEXT_TYPE_client_authz 7 # define TLSEXT_TYPE_server_authz 8 /* ExtensionType values from RFC6091 */ # define TLSEXT_TYPE_cert_type 9 /* ExtensionType values from RFC4492 */ /* * Prior to TLSv1.3 the supported_groups extension was known as * elliptic_curves */ # define TLSEXT_TYPE_supported_groups 10 # define TLSEXT_TYPE_elliptic_curves TLSEXT_TYPE_supported_groups # define TLSEXT_TYPE_ec_point_formats 11 /* ExtensionType value from RFC5054 */ # define TLSEXT_TYPE_srp 12 /* ExtensionType values from RFC5246 */ # define TLSEXT_TYPE_signature_algorithms 13 /* ExtensionType value from RFC5764 */ # define TLSEXT_TYPE_use_srtp 14 /* ExtensionType value from RFC5620 */ # define TLSEXT_TYPE_heartbeat 15 /* ExtensionType value from RFC7301 */ # define TLSEXT_TYPE_application_layer_protocol_negotiation 16 /* * Extension type for Certificate Transparency * https://tools.ietf.org/html/rfc6962#section-3.3.1 */ # define TLSEXT_TYPE_signed_certificate_timestamp 18 /* * ExtensionType value for TLS padding extension. * http://tools.ietf.org/html/draft-agl-tls-padding */ # define TLSEXT_TYPE_padding 21 /* ExtensionType value from RFC7366 */ # define TLSEXT_TYPE_encrypt_then_mac 22 /* ExtensionType value from RFC7627 */ # define TLSEXT_TYPE_extended_master_secret 23 /* ExtensionType value from RFC4507 */ # define TLSEXT_TYPE_session_ticket 35 /* As defined for TLS1.3 */ # define TLSEXT_TYPE_psk 41 # define TLSEXT_TYPE_early_data 42 # define TLSEXT_TYPE_supported_versions 43 # define TLSEXT_TYPE_cookie 44 # define TLSEXT_TYPE_psk_kex_modes 45 # define TLSEXT_TYPE_certificate_authorities 47 # define TLSEXT_TYPE_post_handshake_auth 49 # define TLSEXT_TYPE_signature_algorithms_cert 50 # define TLSEXT_TYPE_key_share 51 /* Temporary extension type */ # define TLSEXT_TYPE_renegotiate 0xff01 # ifndef OPENSSL_NO_NEXTPROTONEG /* This is not an IANA defined extension number */ # define TLSEXT_TYPE_next_proto_neg 13172 # endif /* NameType value from RFC3546 */ # define TLSEXT_NAMETYPE_host_name 0 /* status request value from RFC3546 */ # define TLSEXT_STATUSTYPE_ocsp 1 /* ECPointFormat values from RFC4492 */ # define TLSEXT_ECPOINTFORMAT_first 0 # define TLSEXT_ECPOINTFORMAT_uncompressed 0 # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1 # define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2 # define TLSEXT_ECPOINTFORMAT_last 2 /* Signature and hash algorithms from RFC5246 */ # define TLSEXT_signature_anonymous 0 # define TLSEXT_signature_rsa 1 # define TLSEXT_signature_dsa 2 # define TLSEXT_signature_ecdsa 3 # define TLSEXT_signature_gostr34102001 237 # define TLSEXT_signature_gostr34102012_256 238 # define TLSEXT_signature_gostr34102012_512 239 /* Total number of different signature algorithms */ # define TLSEXT_signature_num 7 # define TLSEXT_hash_none 0 # define TLSEXT_hash_md5 1 # define TLSEXT_hash_sha1 2 # define TLSEXT_hash_sha224 3 # define TLSEXT_hash_sha256 4 # define TLSEXT_hash_sha384 5 # define TLSEXT_hash_sha512 6 # define TLSEXT_hash_gostr3411 237 # define TLSEXT_hash_gostr34112012_256 238 # define TLSEXT_hash_gostr34112012_512 239 /* Total number of different digest algorithms */ # define TLSEXT_hash_num 10 /* Flag set for unrecognised algorithms */ # define TLSEXT_nid_unknown 0x1000000 /* ECC curves */ # define TLSEXT_curve_P_256 23 # define TLSEXT_curve_P_384 24 /* OpenSSL value to disable maximum fragment length extension */ # define TLSEXT_max_fragment_length_DISABLED 0 /* Allowed values for max fragment length extension */ # define TLSEXT_max_fragment_length_512 1 # define TLSEXT_max_fragment_length_1024 2 # define TLSEXT_max_fragment_length_2048 3 # define TLSEXT_max_fragment_length_4096 4 int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode); int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode); # define TLSEXT_MAXLEN_host_name 255 __owur const char *SSL_get_servername(const SSL *s, const int type); __owur int SSL_get_servername_type(const SSL *s); /* * SSL_export_keying_material exports a value derived from the master secret, * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and * optional context. (Since a zero length context is allowed, the |use_context| * flag controls whether a context is included.) It returns 1 on success and * 0 or -1 otherwise. */ __owur int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, const char *label, size_t llen, const unsigned char *context, size_t contextlen, int use_context); /* * SSL_export_keying_material_early exports a value derived from the * early exporter master secret, as specified in * https://tools.ietf.org/html/draft-ietf-tls-tls13-23. It writes * |olen| bytes to |out| given a label and optional context. It * returns 1 on success and 0 otherwise. */ __owur int SSL_export_keying_material_early(SSL *s, unsigned char *out, size_t olen, const char *label, size_t llen, const unsigned char *context, size_t contextlen); int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid); int SSL_get_signature_type_nid(const SSL *s, int *pnid); int SSL_get_sigalgs(SSL *s, int idx, int *psign, int *phash, int *psignandhash, unsigned char *rsig, unsigned char *rhash); int SSL_get_shared_sigalgs(SSL *s, int idx, int *psign, int *phash, int *psignandhash, unsigned char *rsig, unsigned char *rhash); __owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain); # define SSL_set_tlsext_host_name(s,name) \ SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,\ (void *)name) # define SSL_set_tlsext_debug_callback(ssl, cb) \ SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,\ (void (*)(void))cb) # define SSL_set_tlsext_debug_arg(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0,arg) # define SSL_get_tlsext_status_type(ssl) \ SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL) # define SSL_set_tlsext_status_type(ssl, type) \ SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL) # define SSL_get_tlsext_status_exts(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0,arg) # define SSL_set_tlsext_status_exts(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0,arg) # define SSL_get_tlsext_status_ids(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0,arg) # define SSL_set_tlsext_status_ids(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0,arg) # define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0,arg) # define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \ SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen,arg) # define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \ SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,\ (void (*)(void))cb) # define SSL_TLSEXT_ERR_OK 0 # define SSL_TLSEXT_ERR_ALERT_WARNING 1 # define SSL_TLSEXT_ERR_ALERT_FATAL 2 # define SSL_TLSEXT_ERR_NOACK 3 # define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0,arg) # define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_TICKET_KEYS,keylen,keys) # define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_TICKET_KEYS,keylen,keys) # define SSL_CTX_get_tlsext_status_cb(ssl, cb) \ SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0,(void *)cb) # define SSL_CTX_set_tlsext_status_cb(ssl, cb) \ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,\ (void (*)(void))cb) # define SSL_CTX_get_tlsext_status_arg(ssl, arg) \ SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG,0,arg) # define SSL_CTX_set_tlsext_status_arg(ssl, arg) \ SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0,arg) # define SSL_CTX_set_tlsext_status_type(ssl, type) \ SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL) # define SSL_CTX_get_tlsext_status_type(ssl) \ SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL) # define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,\ (void (*)(void))cb) # ifndef OPENSSL_NO_HEARTBEATS # define SSL_DTLSEXT_HB_ENABLED 0x01 # define SSL_DTLSEXT_HB_DONT_SEND_REQUESTS 0x02 # define SSL_DTLSEXT_HB_DONT_RECV_REQUESTS 0x04 # define SSL_get_dtlsext_heartbeat_pending(ssl) \ SSL_ctrl(ssl,SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING,0,NULL) # define SSL_set_dtlsext_heartbeat_no_requests(ssl, arg) \ SSL_ctrl(ssl,SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL) # if OPENSSL_API_COMPAT < 0x10100000L # define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT \ SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT # define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING \ SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING # define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS \ SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS # define SSL_TLSEXT_HB_ENABLED \ SSL_DTLSEXT_HB_ENABLED # define SSL_TLSEXT_HB_DONT_SEND_REQUESTS \ SSL_DTLSEXT_HB_DONT_SEND_REQUESTS # define SSL_TLSEXT_HB_DONT_RECV_REQUESTS \ SSL_DTLSEXT_HB_DONT_RECV_REQUESTS # define SSL_get_tlsext_heartbeat_pending(ssl) \ SSL_get_dtlsext_heartbeat_pending(ssl) # define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \ SSL_set_dtlsext_heartbeat_no_requests(ssl,arg) # endif # endif /* PSK ciphersuites from 4279 */ # define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A # define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D # define TLS1_CK_DHE_PSK_WITH_RC4_128_SHA 0x0300008E # define TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008F # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA 0x03000090 # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA 0x03000091 # define TLS1_CK_RSA_PSK_WITH_RC4_128_SHA 0x03000092 # define TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x03000093 # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA 0x03000094 # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA 0x03000095 /* PSK ciphersuites from 5487 */ # define TLS1_CK_PSK_WITH_AES_128_GCM_SHA256 0x030000A8 # define TLS1_CK_PSK_WITH_AES_256_GCM_SHA384 0x030000A9 # define TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256 0x030000AA # define TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384 0x030000AB # define TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256 0x030000AC # define TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384 0x030000AD # define TLS1_CK_PSK_WITH_AES_128_CBC_SHA256 0x030000AE # define TLS1_CK_PSK_WITH_AES_256_CBC_SHA384 0x030000AF # define TLS1_CK_PSK_WITH_NULL_SHA256 0x030000B0 # define TLS1_CK_PSK_WITH_NULL_SHA384 0x030000B1 # define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256 0x030000B2 # define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384 0x030000B3 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA256 0x030000B4 # define TLS1_CK_DHE_PSK_WITH_NULL_SHA384 0x030000B5 # define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256 0x030000B6 # define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384 0x030000B7 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA256 0x030000B8 # define TLS1_CK_RSA_PSK_WITH_NULL_SHA384 0x030000B9 /* NULL PSK ciphersuites from RFC4785 */ # define TLS1_CK_PSK_WITH_NULL_SHA 0x0300002C # define TLS1_CK_DHE_PSK_WITH_NULL_SHA 0x0300002D # define TLS1_CK_RSA_PSK_WITH_NULL_SHA 0x0300002E /* AES ciphersuites from RFC3268 */ # define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F # define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030 # define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031 # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032 # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033 # define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034 # define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035 # define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036 # define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037 # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038 # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039 # define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A /* TLS v1.2 ciphersuites */ # define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B # define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C # define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D # define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E # define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F # define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040 /* Camellia ciphersuites from RFC4132 */ # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045 # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046 /* TLS v1.2 ciphersuites */ # define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067 # define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068 # define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069 # define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A # define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B # define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C # define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D /* Camellia ciphersuites from RFC4132 */ # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088 # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089 /* SEED ciphersuites from RFC4162 */ # define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096 # define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097 # define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098 # define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099 # define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A # define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B /* TLS v1.2 GCM ciphersuites from RFC5288 */ # define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C # define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D # define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E # define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F # define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0 # define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1 # define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2 # define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3 # define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4 # define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5 # define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6 # define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7 /* CCM ciphersuites from RFC6655 */ # define TLS1_CK_RSA_WITH_AES_128_CCM 0x0300C09C # define TLS1_CK_RSA_WITH_AES_256_CCM 0x0300C09D # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM 0x0300C09E # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM 0x0300C09F # define TLS1_CK_RSA_WITH_AES_128_CCM_8 0x0300C0A0 # define TLS1_CK_RSA_WITH_AES_256_CCM_8 0x0300C0A1 # define TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8 0x0300C0A2 # define TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8 0x0300C0A3 # define TLS1_CK_PSK_WITH_AES_128_CCM 0x0300C0A4 # define TLS1_CK_PSK_WITH_AES_256_CCM 0x0300C0A5 # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM 0x0300C0A6 # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM 0x0300C0A7 # define TLS1_CK_PSK_WITH_AES_128_CCM_8 0x0300C0A8 # define TLS1_CK_PSK_WITH_AES_256_CCM_8 0x0300C0A9 # define TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8 0x0300C0AA # define TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8 0x0300C0AB /* CCM ciphersuites from RFC7251 */ # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM 0x0300C0AC # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM 0x0300C0AD # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8 0x0300C0AE # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8 0x0300C0AF /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */ # define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BA # define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BB # define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BC # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BD # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BE # define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256 0x030000BF # define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C0 # define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C1 # define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C2 # define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C3 # define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C4 # define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256 0x030000C5 /* ECC ciphersuites from RFC4492 */ # define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001 # define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002 # define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005 # define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006 # define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007 # define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A # define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B # define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C # define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D # define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E # define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F # define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010 # define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011 # define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014 # define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015 # define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016 # define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017 # define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018 # define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019 /* SRP ciphersuites from RFC 5054 */ # define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A # define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B # define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C # define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D # define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E # define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F # define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020 # define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021 # define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022 /* ECDH HMAC based ciphersuites from RFC5289 */ # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023 # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024 # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025 # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026 # define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027 # define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028 # define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029 # define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A /* ECDH GCM based ciphersuites from RFC5289 */ # define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B # define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C # define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D # define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E # define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F # define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030 # define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031 # define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032 /* ECDHE PSK ciphersuites from RFC5489 */ # define TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA 0x0300C033 # define TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300C034 # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA 0x0300C035 # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA 0x0300C036 # define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0x0300C037 # define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0x0300C038 /* NULL PSK ciphersuites from RFC4785 */ # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA 0x0300C039 # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256 0x0300C03A # define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384 0x0300C03B /* Camellia-CBC ciphersuites from RFC6367 */ # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C072 # define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C073 # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C074 # define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C075 # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C076 # define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C077 # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C078 # define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C079 # define TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C094 # define TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C095 # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C096 # define TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C097 # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C098 # define TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C099 # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C09A # define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C09B /* draft-ietf-tls-chacha20-poly1305-03 */ # define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCA8 # define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 0x0300CCA9 # define TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCAA # define TLS1_CK_PSK_WITH_CHACHA20_POLY1305 0x0300CCAB # define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAC # define TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAD # define TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305 0x0300CCAE /* TLS v1.3 ciphersuites */ # define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301 # define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302 # define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303 # define TLS1_3_CK_AES_128_CCM_SHA256 0x03001304 # define TLS1_3_CK_AES_128_CCM_8_SHA256 0x03001305 /* Aria ciphersuites from RFC6209 */ # define TLS1_CK_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C050 # define TLS1_CK_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C051 # define TLS1_CK_DHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C052 # define TLS1_CK_DHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C053 # define TLS1_CK_DH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C054 # define TLS1_CK_DH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C055 # define TLS1_CK_DHE_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C056 # define TLS1_CK_DHE_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C057 # define TLS1_CK_DH_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C058 # define TLS1_CK_DH_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C059 # define TLS1_CK_DH_anon_WITH_ARIA_128_GCM_SHA256 0x0300C05A # define TLS1_CK_DH_anon_WITH_ARIA_256_GCM_SHA384 0x0300C05B # define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05C # define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05D # define TLS1_CK_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05E # define TLS1_CK_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05F # define TLS1_CK_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C060 # define TLS1_CK_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C061 # define TLS1_CK_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C062 # define TLS1_CK_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C063 # define TLS1_CK_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06A # define TLS1_CK_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06B # define TLS1_CK_DHE_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06C # define TLS1_CK_DHE_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06D # define TLS1_CK_RSA_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06E # define TLS1_CK_RSA_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06F /* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */ # define TLS1_RFC_RSA_WITH_AES_128_SHA "TLS_RSA_WITH_AES_128_CBC_SHA" # define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" # define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" # define TLS1_RFC_ADH_WITH_AES_128_SHA "TLS_DH_anon_WITH_AES_128_CBC_SHA" # define TLS1_RFC_RSA_WITH_AES_256_SHA "TLS_RSA_WITH_AES_256_CBC_SHA" # define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" # define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" # define TLS1_RFC_ADH_WITH_AES_256_SHA "TLS_DH_anon_WITH_AES_256_CBC_SHA" # define TLS1_RFC_RSA_WITH_NULL_SHA256 "TLS_RSA_WITH_NULL_SHA256" # define TLS1_RFC_RSA_WITH_AES_128_SHA256 "TLS_RSA_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_RSA_WITH_AES_256_SHA256 "TLS_RSA_WITH_AES_256_CBC_SHA256" # define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA256 "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA256 "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA256 "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" # define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA256 "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256" # define TLS1_RFC_ADH_WITH_AES_128_SHA256 "TLS_DH_anon_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_ADH_WITH_AES_256_SHA256 "TLS_DH_anon_WITH_AES_256_CBC_SHA256" # define TLS1_RFC_RSA_WITH_AES_128_GCM_SHA256 "TLS_RSA_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_RSA_WITH_AES_256_GCM_SHA384 "TLS_RSA_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_DHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_DHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_DHE_DSS_WITH_AES_128_GCM_SHA256 "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_DHE_DSS_WITH_AES_256_GCM_SHA384 "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_ADH_WITH_AES_128_GCM_SHA256 "TLS_DH_anon_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_ADH_WITH_AES_256_GCM_SHA384 "TLS_DH_anon_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_RSA_WITH_AES_128_CCM "TLS_RSA_WITH_AES_128_CCM" # define TLS1_RFC_RSA_WITH_AES_256_CCM "TLS_RSA_WITH_AES_256_CCM" # define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM "TLS_DHE_RSA_WITH_AES_128_CCM" # define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM "TLS_DHE_RSA_WITH_AES_256_CCM" # define TLS1_RFC_RSA_WITH_AES_128_CCM_8 "TLS_RSA_WITH_AES_128_CCM_8" # define TLS1_RFC_RSA_WITH_AES_256_CCM_8 "TLS_RSA_WITH_AES_256_CCM_8" # define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM_8 "TLS_DHE_RSA_WITH_AES_128_CCM_8" # define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM_8 "TLS_DHE_RSA_WITH_AES_256_CCM_8" # define TLS1_RFC_PSK_WITH_AES_128_CCM "TLS_PSK_WITH_AES_128_CCM" # define TLS1_RFC_PSK_WITH_AES_256_CCM "TLS_PSK_WITH_AES_256_CCM" # define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM "TLS_DHE_PSK_WITH_AES_128_CCM" # define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM "TLS_DHE_PSK_WITH_AES_256_CCM" # define TLS1_RFC_PSK_WITH_AES_128_CCM_8 "TLS_PSK_WITH_AES_128_CCM_8" # define TLS1_RFC_PSK_WITH_AES_256_CCM_8 "TLS_PSK_WITH_AES_256_CCM_8" # define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM_8 "TLS_PSK_DHE_WITH_AES_128_CCM_8" # define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM_8 "TLS_PSK_DHE_WITH_AES_256_CCM_8" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM "TLS_ECDHE_ECDSA_WITH_AES_128_CCM" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM "TLS_ECDHE_ECDSA_WITH_AES_256_CCM" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8" # define TLS1_3_RFC_AES_128_GCM_SHA256 "TLS_AES_128_GCM_SHA256" # define TLS1_3_RFC_AES_256_GCM_SHA384 "TLS_AES_256_GCM_SHA384" # define TLS1_3_RFC_CHACHA20_POLY1305_SHA256 "TLS_CHACHA20_POLY1305_SHA256" # define TLS1_3_RFC_AES_128_CCM_SHA256 "TLS_AES_128_CCM_SHA256" # define TLS1_3_RFC_AES_128_CCM_8_SHA256 "TLS_AES_128_CCM_8_SHA256" # define TLS1_RFC_ECDHE_ECDSA_WITH_NULL_SHA "TLS_ECDHE_ECDSA_WITH_NULL_SHA" # define TLS1_RFC_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" # define TLS1_RFC_ECDHE_RSA_WITH_NULL_SHA "TLS_ECDHE_RSA_WITH_NULL_SHA" # define TLS1_RFC_ECDHE_RSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" # define TLS1_RFC_ECDH_anon_WITH_NULL_SHA "TLS_ECDH_anon_WITH_NULL_SHA" # define TLS1_RFC_ECDH_anon_WITH_DES_192_CBC3_SHA "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_ECDH_anon_WITH_AES_128_CBC_SHA "TLS_ECDH_anon_WITH_AES_128_CBC_SHA" # define TLS1_RFC_ECDH_anon_WITH_AES_256_CBC_SHA "TLS_ECDH_anon_WITH_AES_256_CBC_SHA" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_PSK_WITH_NULL_SHA "TLS_PSK_WITH_NULL_SHA" # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA "TLS_DHE_PSK_WITH_NULL_SHA" # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA "TLS_RSA_PSK_WITH_NULL_SHA" # define TLS1_RFC_PSK_WITH_3DES_EDE_CBC_SHA "TLS_PSK_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA "TLS_PSK_WITH_AES_128_CBC_SHA" # define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA "TLS_PSK_WITH_AES_256_CBC_SHA" # define TLS1_RFC_DHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA "TLS_DHE_PSK_WITH_AES_128_CBC_SHA" # define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA "TLS_DHE_PSK_WITH_AES_256_CBC_SHA" # define TLS1_RFC_RSA_PSK_WITH_3DES_EDE_CBC_SHA "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA "TLS_RSA_PSK_WITH_AES_128_CBC_SHA" # define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA "TLS_RSA_PSK_WITH_AES_256_CBC_SHA" # define TLS1_RFC_PSK_WITH_AES_128_GCM_SHA256 "TLS_PSK_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_PSK_WITH_AES_256_GCM_SHA384 "TLS_PSK_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_DHE_PSK_WITH_AES_128_GCM_SHA256 "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_DHE_PSK_WITH_AES_256_GCM_SHA384 "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_RSA_PSK_WITH_AES_128_GCM_SHA256 "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256" # define TLS1_RFC_RSA_PSK_WITH_AES_256_GCM_SHA384 "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384" # define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA256 "TLS_PSK_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA384 "TLS_PSK_WITH_AES_256_CBC_SHA384" # define TLS1_RFC_PSK_WITH_NULL_SHA256 "TLS_PSK_WITH_NULL_SHA256" # define TLS1_RFC_PSK_WITH_NULL_SHA384 "TLS_PSK_WITH_NULL_SHA384" # define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384" # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA256 "TLS_DHE_PSK_WITH_NULL_SHA256" # define TLS1_RFC_DHE_PSK_WITH_NULL_SHA384 "TLS_DHE_PSK_WITH_NULL_SHA384" # define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA256 "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA384 "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384" # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA256 "TLS_RSA_PSK_WITH_NULL_SHA256" # define TLS1_RFC_RSA_PSK_WITH_NULL_SHA384 "TLS_RSA_PSK_WITH_NULL_SHA384" # define TLS1_RFC_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA" # define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA" # define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256" # define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384" # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA "TLS_ECDHE_PSK_WITH_NULL_SHA" # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA256 "TLS_ECDHE_PSK_WITH_NULL_SHA256" # define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA384 "TLS_ECDHE_PSK_WITH_NULL_SHA384" # define TLS1_RFC_SRP_SHA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA" # define TLS1_RFC_SRP_SHA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_WITH_AES_128_CBC_SHA" # define TLS1_RFC_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA" # define TLS1_RFC_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA" # define TLS1_RFC_SRP_SHA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_WITH_AES_256_CBC_SHA" # define TLS1_RFC_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA" # define TLS1_RFC_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA" # define TLS1_RFC_DHE_RSA_WITH_CHACHA20_POLY1305 "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256" # define TLS1_RFC_ECDHE_RSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256" # define TLS1_RFC_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256" # define TLS1_RFC_PSK_WITH_CHACHA20_POLY1305 "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256" # define TLS1_RFC_ECDHE_PSK_WITH_CHACHA20_POLY1305 "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256" # define TLS1_RFC_DHE_PSK_WITH_CHACHA20_POLY1305 "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256" # define TLS1_RFC_RSA_PSK_WITH_CHACHA20_POLY1305 "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256" # define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256" # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256" # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256" # define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256" # define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA" # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA" # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA" # define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA" # define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA" # define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA" # define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA" # define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA" # define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384" # define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384" # define TLS1_RFC_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384" # define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384" # define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384" # define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256" # define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384" # define TLS1_RFC_RSA_WITH_SEED_SHA "TLS_RSA_WITH_SEED_CBC_SHA" # define TLS1_RFC_DHE_DSS_WITH_SEED_SHA "TLS_DHE_DSS_WITH_SEED_CBC_SHA" # define TLS1_RFC_DHE_RSA_WITH_SEED_SHA "TLS_DHE_RSA_WITH_SEED_CBC_SHA" # define TLS1_RFC_ADH_WITH_SEED_SHA "TLS_DH_anon_WITH_SEED_CBC_SHA" # define TLS1_RFC_ECDHE_PSK_WITH_RC4_128_SHA "TLS_ECDHE_PSK_WITH_RC4_128_SHA" # define TLS1_RFC_ECDH_anon_WITH_RC4_128_SHA "TLS_ECDH_anon_WITH_RC4_128_SHA" # define TLS1_RFC_ECDHE_ECDSA_WITH_RC4_128_SHA "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA" # define TLS1_RFC_ECDHE_RSA_WITH_RC4_128_SHA "TLS_ECDHE_RSA_WITH_RC4_128_SHA" # define TLS1_RFC_PSK_WITH_RC4_128_SHA "TLS_PSK_WITH_RC4_128_SHA" # define TLS1_RFC_RSA_PSK_WITH_RC4_128_SHA "TLS_RSA_PSK_WITH_RC4_128_SHA" # define TLS1_RFC_DHE_PSK_WITH_RC4_128_SHA "TLS_DHE_PSK_WITH_RC4_128_SHA" # define TLS1_RFC_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_DH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_DH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_DH_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_DH_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_DH_anon_WITH_ARIA_128_GCM_SHA256 "TLS_DH_anon_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_DH_anon_WITH_ARIA_256_GCM_SHA384 "TLS_DH_anon_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_PSK_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_PSK_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384" # define TLS1_RFC_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256" # define TLS1_RFC_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384" /* * XXX Backward compatibility alert: Older versions of OpenSSL gave some DHE * ciphers names with "EDH" instead of "DHE". Going forward, we should be * using DHE everywhere, though we may indefinitely maintain aliases for * users or configurations that used "EDH" */ # define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA" # define TLS1_TXT_PSK_WITH_NULL_SHA "PSK-NULL-SHA" # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA "DHE-PSK-NULL-SHA" # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA "RSA-PSK-NULL-SHA" /* AES ciphersuites from RFC3268 */ # define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA" # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA" # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA" # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA" # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA" # define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA" # define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA" # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA" # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA" # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA" # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA" # define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA" /* ECC ciphersuites from RFC4492 */ # define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA" # define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA" # define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA" # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA" # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA" # define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA" # define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA" # define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA" # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA" # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA" # define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA" # define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA" # define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA" # define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA" # define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA" # define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA" # define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA" # define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA" # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA" # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA" # define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA" # define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA" # define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA" # define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" # define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" /* PSK ciphersuites from RFC 4279 */ # define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA" # define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA" # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA" # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA" # define TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA "DHE-PSK-RC4-SHA" # define TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA "DHE-PSK-3DES-EDE-CBC-SHA" # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA "DHE-PSK-AES128-CBC-SHA" # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA "DHE-PSK-AES256-CBC-SHA" # define TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA "RSA-PSK-RC4-SHA" # define TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA "RSA-PSK-3DES-EDE-CBC-SHA" # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA "RSA-PSK-AES128-CBC-SHA" # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA "RSA-PSK-AES256-CBC-SHA" /* PSK ciphersuites from RFC 5487 */ # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256" # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384" # define TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256 "DHE-PSK-AES128-GCM-SHA256" # define TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384 "DHE-PSK-AES256-GCM-SHA384" # define TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256 "RSA-PSK-AES128-GCM-SHA256" # define TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384 "RSA-PSK-AES256-GCM-SHA384" # define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256 "PSK-AES128-CBC-SHA256" # define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384 "PSK-AES256-CBC-SHA384" # define TLS1_TXT_PSK_WITH_NULL_SHA256 "PSK-NULL-SHA256" # define TLS1_TXT_PSK_WITH_NULL_SHA384 "PSK-NULL-SHA384" # define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256 "DHE-PSK-AES128-CBC-SHA256" # define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384 "DHE-PSK-AES256-CBC-SHA384" # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA256 "DHE-PSK-NULL-SHA256" # define TLS1_TXT_DHE_PSK_WITH_NULL_SHA384 "DHE-PSK-NULL-SHA384" # define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256 "RSA-PSK-AES128-CBC-SHA256" # define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384 "RSA-PSK-AES256-CBC-SHA384" # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA256 "RSA-PSK-NULL-SHA256" # define TLS1_TXT_RSA_PSK_WITH_NULL_SHA384 "RSA-PSK-NULL-SHA384" /* SRP ciphersuite from RFC 5054 */ # define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA" # define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA" # define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA" # define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA" # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA" # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA" # define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA" # define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA" # define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA" /* Camellia ciphersuites from RFC4132 */ # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA" # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA" # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA" # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA" # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA" # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA" # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA" # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA" # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA" # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA" /* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */ # define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256 "CAMELLIA128-SHA256" # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DH-DSS-CAMELLIA128-SHA256" # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DH-RSA-CAMELLIA128-SHA256" # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DHE-DSS-CAMELLIA128-SHA256" # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DHE-RSA-CAMELLIA128-SHA256" # define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256 "ADH-CAMELLIA128-SHA256" # define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256 "CAMELLIA256-SHA256" # define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DH-DSS-CAMELLIA256-SHA256" # define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DH-RSA-CAMELLIA256-SHA256" # define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DHE-DSS-CAMELLIA256-SHA256" # define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DHE-RSA-CAMELLIA256-SHA256" # define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256 "ADH-CAMELLIA256-SHA256" # define TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256 "PSK-CAMELLIA128-SHA256" # define TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384 "PSK-CAMELLIA256-SHA384" # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "DHE-PSK-CAMELLIA128-SHA256" # define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "DHE-PSK-CAMELLIA256-SHA384" # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "RSA-PSK-CAMELLIA128-SHA256" # define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "RSA-PSK-CAMELLIA256-SHA384" # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-PSK-CAMELLIA128-SHA256" # define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-PSK-CAMELLIA256-SHA384" /* SEED ciphersuites from RFC4162 */ # define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA" # define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA" # define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA" # define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA" # define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" # define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" /* TLS v1.2 ciphersuites */ # define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256" # define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256" # define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256" # define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256" # define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256" # define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256" # define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256" # define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256" # define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256" # define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256" # define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256" # define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256" # define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256" /* TLS v1.2 GCM ciphersuites from RFC5288 */ # define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256" # define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384" # define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256" # define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384" # define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256" # define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384" # define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256" # define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384" # define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256" # define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384" # define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256" # define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384" /* CCM ciphersuites from RFC6655 */ # define TLS1_TXT_RSA_WITH_AES_128_CCM "AES128-CCM" # define TLS1_TXT_RSA_WITH_AES_256_CCM "AES256-CCM" # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM "DHE-RSA-AES128-CCM" # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM "DHE-RSA-AES256-CCM" # define TLS1_TXT_RSA_WITH_AES_128_CCM_8 "AES128-CCM8" # define TLS1_TXT_RSA_WITH_AES_256_CCM_8 "AES256-CCM8" # define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8 "DHE-RSA-AES128-CCM8" # define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8 "DHE-RSA-AES256-CCM8" # define TLS1_TXT_PSK_WITH_AES_128_CCM "PSK-AES128-CCM" # define TLS1_TXT_PSK_WITH_AES_256_CCM "PSK-AES256-CCM" # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM "DHE-PSK-AES128-CCM" # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM "DHE-PSK-AES256-CCM" # define TLS1_TXT_PSK_WITH_AES_128_CCM_8 "PSK-AES128-CCM8" # define TLS1_TXT_PSK_WITH_AES_256_CCM_8 "PSK-AES256-CCM8" # define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8 "DHE-PSK-AES128-CCM8" # define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8 "DHE-PSK-AES256-CCM8" /* CCM ciphersuites from RFC7251 */ # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM "ECDHE-ECDSA-AES128-CCM" # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM "ECDHE-ECDSA-AES256-CCM" # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8 "ECDHE-ECDSA-AES128-CCM8" # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8 "ECDHE-ECDSA-AES256-CCM8" /* ECDH HMAC based ciphersuites from RFC5289 */ # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256" # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384" # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256" # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384" # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256" # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384" # define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256" # define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384" /* ECDH GCM based ciphersuites from RFC5289 */ # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "ECDHE-ECDSA-AES128-GCM-SHA256" # define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "ECDHE-ECDSA-AES256-GCM-SHA384" # define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 "ECDH-ECDSA-AES128-GCM-SHA256" # define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 "ECDH-ECDSA-AES256-GCM-SHA384" # define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256" # define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384" # define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256" # define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384" /* TLS v1.2 PSK GCM ciphersuites from RFC5487 */ # define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256" # define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384" /* ECDHE PSK ciphersuites from RFC 5489 */ # define TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA "ECDHE-PSK-RC4-SHA" # define TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "ECDHE-PSK-3DES-EDE-CBC-SHA" # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA "ECDHE-PSK-AES128-CBC-SHA" # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA "ECDHE-PSK-AES256-CBC-SHA" # define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "ECDHE-PSK-AES128-CBC-SHA256" # define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "ECDHE-PSK-AES256-CBC-SHA384" # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA "ECDHE-PSK-NULL-SHA" # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256 "ECDHE-PSK-NULL-SHA256" # define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384 "ECDHE-PSK-NULL-SHA384" /* Camellia-CBC ciphersuites from RFC6367 */ # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-ECDSA-CAMELLIA128-SHA256" # define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-ECDSA-CAMELLIA256-SHA384" # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-ECDSA-CAMELLIA128-SHA256" # define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-ECDSA-CAMELLIA256-SHA384" # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-RSA-CAMELLIA128-SHA256" # define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-RSA-CAMELLIA256-SHA384" # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-RSA-CAMELLIA128-SHA256" # define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-RSA-CAMELLIA256-SHA384" /* draft-ietf-tls-chacha20-poly1305-03 */ # define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 "ECDHE-RSA-CHACHA20-POLY1305" # define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "ECDHE-ECDSA-CHACHA20-POLY1305" # define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305 "DHE-RSA-CHACHA20-POLY1305" # define TLS1_TXT_PSK_WITH_CHACHA20_POLY1305 "PSK-CHACHA20-POLY1305" # define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305 "ECDHE-PSK-CHACHA20-POLY1305" # define TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305 "DHE-PSK-CHACHA20-POLY1305" # define TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305 "RSA-PSK-CHACHA20-POLY1305" /* Aria ciphersuites from RFC6209 */ # define TLS1_TXT_RSA_WITH_ARIA_128_GCM_SHA256 "ARIA128-GCM-SHA256" # define TLS1_TXT_RSA_WITH_ARIA_256_GCM_SHA384 "ARIA256-GCM-SHA384" # define TLS1_TXT_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "DHE-RSA-ARIA128-GCM-SHA256" # define TLS1_TXT_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "DHE-RSA-ARIA256-GCM-SHA384" # define TLS1_TXT_DH_RSA_WITH_ARIA_128_GCM_SHA256 "DH-RSA-ARIA128-GCM-SHA256" # define TLS1_TXT_DH_RSA_WITH_ARIA_256_GCM_SHA384 "DH-RSA-ARIA256-GCM-SHA384" # define TLS1_TXT_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "DHE-DSS-ARIA128-GCM-SHA256" # define TLS1_TXT_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "DHE-DSS-ARIA256-GCM-SHA384" # define TLS1_TXT_DH_DSS_WITH_ARIA_128_GCM_SHA256 "DH-DSS-ARIA128-GCM-SHA256" # define TLS1_TXT_DH_DSS_WITH_ARIA_256_GCM_SHA384 "DH-DSS-ARIA256-GCM-SHA384" # define TLS1_TXT_DH_anon_WITH_ARIA_128_GCM_SHA256 "ADH-ARIA128-GCM-SHA256" # define TLS1_TXT_DH_anon_WITH_ARIA_256_GCM_SHA384 "ADH-ARIA256-GCM-SHA384" # define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ECDSA-ARIA128-GCM-SHA256" # define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ECDSA-ARIA256-GCM-SHA384" # define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ECDSA-ARIA128-GCM-SHA256" # define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ECDSA-ARIA256-GCM-SHA384" # define TLS1_TXT_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ARIA128-GCM-SHA256" # define TLS1_TXT_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ARIA256-GCM-SHA384" # define TLS1_TXT_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ARIA128-GCM-SHA256" # define TLS1_TXT_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ARIA256-GCM-SHA384" # define TLS1_TXT_PSK_WITH_ARIA_128_GCM_SHA256 "PSK-ARIA128-GCM-SHA256" # define TLS1_TXT_PSK_WITH_ARIA_256_GCM_SHA384 "PSK-ARIA256-GCM-SHA384" # define TLS1_TXT_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "DHE-PSK-ARIA128-GCM-SHA256" # define TLS1_TXT_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "DHE-PSK-ARIA256-GCM-SHA384" # define TLS1_TXT_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "RSA-PSK-ARIA128-GCM-SHA256" # define TLS1_TXT_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "RSA-PSK-ARIA256-GCM-SHA384" # define TLS_CT_RSA_SIGN 1 # define TLS_CT_DSS_SIGN 2 # define TLS_CT_RSA_FIXED_DH 3 # define TLS_CT_DSS_FIXED_DH 4 # define TLS_CT_ECDSA_SIGN 64 # define TLS_CT_RSA_FIXED_ECDH 65 # define TLS_CT_ECDSA_FIXED_ECDH 66 # define TLS_CT_GOST01_SIGN 22 # define TLS_CT_GOST12_SIGN 238 # define TLS_CT_GOST12_512_SIGN 239 /* * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see * comment there) */ # define TLS_CT_NUMBER 10 # if defined(SSL3_CT_NUMBER) # if TLS_CT_NUMBER != SSL3_CT_NUMBER # error "SSL/TLS CT_NUMBER values do not match" # endif # endif # define TLS1_FINISH_MAC_LENGTH 12 # define TLS_MD_MAX_CONST_SIZE 22 # define TLS_MD_CLIENT_FINISH_CONST "client finished" # define TLS_MD_CLIENT_FINISH_CONST_SIZE 15 # define TLS_MD_SERVER_FINISH_CONST "server finished" # define TLS_MD_SERVER_FINISH_CONST_SIZE 15 # define TLS_MD_KEY_EXPANSION_CONST "key expansion" # define TLS_MD_KEY_EXPANSION_CONST_SIZE 13 # define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key" # define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16 # define TLS_MD_SERVER_WRITE_KEY_CONST "server write key" # define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16 # define TLS_MD_IV_BLOCK_CONST "IV block" # define TLS_MD_IV_BLOCK_CONST_SIZE 8 # define TLS_MD_MASTER_SECRET_CONST "master secret" # define TLS_MD_MASTER_SECRET_CONST_SIZE 13 # define TLS_MD_EXTENDED_MASTER_SECRET_CONST "extended master secret" # define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE 22 # ifdef CHARSET_EBCDIC # undef TLS_MD_CLIENT_FINISH_CONST /* * client finished */ # define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64" # undef TLS_MD_SERVER_FINISH_CONST /* * server finished */ # define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64" # undef TLS_MD_SERVER_WRITE_KEY_CONST /* * server write key */ # define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" # undef TLS_MD_KEY_EXPANSION_CONST /* * key expansion */ # define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e" # undef TLS_MD_CLIENT_WRITE_KEY_CONST /* * client write key */ # define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" # undef TLS_MD_SERVER_WRITE_KEY_CONST /* * server write key */ # define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79" # undef TLS_MD_IV_BLOCK_CONST /* * IV block */ # define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b" # undef TLS_MD_MASTER_SECRET_CONST /* * master secret */ # define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" # undef TLS_MD_EXTENDED_MASTER_SECRET_CONST /* * extended master secret */ # define TLS_MD_EXTENDED_MASTER_SECRET_CONST "\x65\x78\x74\x65\x6e\x64\x65\x64\x20\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74" # endif /* TLS Session Ticket extension struct */ struct tls_session_ticket_ext_st { unsigned short length; void *data; }; #ifdef __cplusplus } #endif #endif PKZrF77openssl/blowfish.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_BLOWFISH_H # define HEADER_BLOWFISH_H # include # ifndef OPENSSL_NO_BF # include # ifdef __cplusplus extern "C" { # endif # define BF_ENCRYPT 1 # define BF_DECRYPT 0 /*- * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * ! BF_LONG has to be at least 32 bits wide. ! * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ # define BF_LONG unsigned int # define BF_ROUNDS 16 # define BF_BLOCK 8 typedef struct bf_key_st { BF_LONG P[BF_ROUNDS + 2]; BF_LONG S[4 * 256]; } BF_KEY; void BF_set_key(BF_KEY *key, int len, const unsigned char *data); void BF_encrypt(BF_LONG *data, const BF_KEY *key); void BF_decrypt(BF_LONG *data, const BF_KEY *key); void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, const BF_KEY *key, int enc); void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, const BF_KEY *schedule, unsigned char *ivec, int enc); void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, const BF_KEY *schedule, unsigned char *ivec, int *num, int enc); void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, const BF_KEY *schedule, unsigned char *ivec, int *num); const char *BF_options(void); # ifdef __cplusplus } # endif # endif #endif PKZ< openssl/uierr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_UIERR_H # define HEADER_UIERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_UI_strings(void); /* * UI function codes. */ # define UI_F_CLOSE_CONSOLE 115 # define UI_F_ECHO_CONSOLE 116 # define UI_F_GENERAL_ALLOCATE_BOOLEAN 108 # define UI_F_GENERAL_ALLOCATE_PROMPT 109 # define UI_F_NOECHO_CONSOLE 117 # define UI_F_OPEN_CONSOLE 114 # define UI_F_UI_CONSTRUCT_PROMPT 121 # define UI_F_UI_CREATE_METHOD 112 # define UI_F_UI_CTRL 111 # define UI_F_UI_DUP_ERROR_STRING 101 # define UI_F_UI_DUP_INFO_STRING 102 # define UI_F_UI_DUP_INPUT_BOOLEAN 110 # define UI_F_UI_DUP_INPUT_STRING 103 # define UI_F_UI_DUP_USER_DATA 118 # define UI_F_UI_DUP_VERIFY_STRING 106 # define UI_F_UI_GET0_RESULT 107 # define UI_F_UI_GET_RESULT_LENGTH 119 # define UI_F_UI_NEW_METHOD 104 # define UI_F_UI_PROCESS 113 # define UI_F_UI_SET_RESULT 105 # define UI_F_UI_SET_RESULT_EX 120 /* * UI reason codes. */ # define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS 104 # define UI_R_INDEX_TOO_LARGE 102 # define UI_R_INDEX_TOO_SMALL 103 # define UI_R_NO_RESULT_BUFFER 105 # define UI_R_PROCESSING_ERROR 107 # define UI_R_RESULT_TOO_LARGE 100 # define UI_R_RESULT_TOO_SMALL 101 # define UI_R_SYSASSIGN_ERROR 109 # define UI_R_SYSDASSGN_ERROR 110 # define UI_R_SYSQIOW_ERROR 111 # define UI_R_UNKNOWN_CONTROL_COMMAND 106 # define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108 # define UI_R_USER_DATA_DUPLICATION_UNSUPPORTED 112 #endif PKZ openssl/des.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_DES_H # define HEADER_DES_H # include # ifndef OPENSSL_NO_DES # ifdef __cplusplus extern "C" { # endif # include typedef unsigned int DES_LONG; # ifdef OPENSSL_BUILD_SHLIBCRYPTO # undef OPENSSL_EXTERN # define OPENSSL_EXTERN OPENSSL_EXPORT # endif typedef unsigned char DES_cblock[8]; typedef /* const */ unsigned char const_DES_cblock[8]; /* * With "const", gcc 2.8.1 on Solaris thinks that DES_cblock * and * const_DES_cblock * are incompatible pointer types. */ typedef struct DES_ks { union { DES_cblock cblock; /* * make sure things are correct size on machines with 8 byte longs */ DES_LONG deslong[2]; } ks[16]; } DES_key_schedule; # define DES_KEY_SZ (sizeof(DES_cblock)) # define DES_SCHEDULE_SZ (sizeof(DES_key_schedule)) # define DES_ENCRYPT 1 # define DES_DECRYPT 0 # define DES_CBC_MODE 0 # define DES_PCBC_MODE 1 # define DES_ecb2_encrypt(i,o,k1,k2,e) \ DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) # define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) # define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) # define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) OPENSSL_DECLARE_GLOBAL(int, DES_check_key); /* defaults to false */ # define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key) const char *DES_options(void); void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, int enc); DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output, long length, DES_key_schedule *schedule, const_DES_cblock *ivec); /* DES_cbc_encrypt does not update the IV! Use DES_ncbc_encrypt instead. */ void DES_cbc_encrypt(const unsigned char *input, unsigned char *output, long length, DES_key_schedule *schedule, DES_cblock *ivec, int enc); void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output, long length, DES_key_schedule *schedule, DES_cblock *ivec, int enc); void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output, long length, DES_key_schedule *schedule, DES_cblock *ivec, const_DES_cblock *inw, const_DES_cblock *outw, int enc); void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, long length, DES_key_schedule *schedule, DES_cblock *ivec, int enc); void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, DES_key_schedule *ks, int enc); /* * This is the DES encryption function that gets called by just about every * other DES routine in the library. You should not use this function except * to implement 'modes' of DES. I say this because the functions that call * this routine do the conversion from 'char *' to long, and this needs to be * done to make sure 'non-aligned' memory access do not occur. The * characters are loaded 'little endian'. Data is a pointer to 2 unsigned * long's and ks is the DES_key_schedule to use. enc, is non zero specifies * encryption, zero if decryption. */ void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc); /* * This functions is the same as DES_encrypt1() except that the DES initial * permutation (IP) and final permutation (FP) have been left out. As for * DES_encrypt1(), you should not use this function. It is used by the * routines in the library that implement triple DES. IP() DES_encrypt2() * DES_encrypt2() DES_encrypt2() FP() is the same as DES_encrypt1() * DES_encrypt1() DES_encrypt1() except faster :-). */ void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc); void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3); void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3); void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, long length, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec, int enc); void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec, int *num, int enc); void DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, long length, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec, int enc); void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *ivec, int *num); char *DES_fcrypt(const char *buf, const char *salt, char *ret); char *DES_crypt(const char *buf, const char *salt); void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits, long length, DES_key_schedule *schedule, DES_cblock *ivec); void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output, long length, DES_key_schedule *schedule, DES_cblock *ivec, int enc); DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], long length, int out_count, DES_cblock *seed); int DES_random_key(DES_cblock *ret); void DES_set_odd_parity(DES_cblock *key); int DES_check_key_parity(const_DES_cblock *key); int DES_is_weak_key(const_DES_cblock *key); /* * DES_set_key (= set_key = DES_key_sched = key_sched) calls * DES_set_key_checked if global variable DES_check_key is set, * DES_set_key_unchecked otherwise. */ int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule); int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule); int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule); void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule); void DES_string_to_key(const char *str, DES_cblock *key); void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2); void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, DES_key_schedule *schedule, DES_cblock *ivec, int *num, int enc); void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, DES_key_schedule *schedule, DES_cblock *ivec, int *num); # define DES_fixup_key_parity DES_set_odd_parity # ifdef __cplusplus } # endif # endif #endif PKZ+avUvUopenssl/obj_mac.hnu[/* * WARNING: do not edit! * Generated by crypto/objects/objects.pl * * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #define SN_undef "UNDEF" #define LN_undef "undefined" #define NID_undef 0 #define OBJ_undef 0L #define SN_itu_t "ITU-T" #define LN_itu_t "itu-t" #define NID_itu_t 645 #define OBJ_itu_t 0L #define NID_ccitt 404 #define OBJ_ccitt OBJ_itu_t #define SN_iso "ISO" #define LN_iso "iso" #define NID_iso 181 #define OBJ_iso 1L #define SN_joint_iso_itu_t "JOINT-ISO-ITU-T" #define LN_joint_iso_itu_t "joint-iso-itu-t" #define NID_joint_iso_itu_t 646 #define OBJ_joint_iso_itu_t 2L #define NID_joint_iso_ccitt 393 #define OBJ_joint_iso_ccitt OBJ_joint_iso_itu_t #define SN_member_body "member-body" #define LN_member_body "ISO Member Body" #define NID_member_body 182 #define OBJ_member_body OBJ_iso,2L #define SN_identified_organization "identified-organization" #define NID_identified_organization 676 #define OBJ_identified_organization OBJ_iso,3L #define SN_hmac_md5 "HMAC-MD5" #define LN_hmac_md5 "hmac-md5" #define NID_hmac_md5 780 #define OBJ_hmac_md5 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,1L #define SN_hmac_sha1 "HMAC-SHA1" #define LN_hmac_sha1 "hmac-sha1" #define NID_hmac_sha1 781 #define OBJ_hmac_sha1 OBJ_identified_organization,6L,1L,5L,5L,8L,1L,2L #define SN_x509ExtAdmission "x509ExtAdmission" #define LN_x509ExtAdmission "Professional Information or basis for Admission" #define NID_x509ExtAdmission 1093 #define OBJ_x509ExtAdmission OBJ_identified_organization,36L,8L,3L,3L #define SN_certicom_arc "certicom-arc" #define NID_certicom_arc 677 #define OBJ_certicom_arc OBJ_identified_organization,132L #define SN_ieee "ieee" #define NID_ieee 1170 #define OBJ_ieee OBJ_identified_organization,111L #define SN_ieee_siswg "ieee-siswg" #define LN_ieee_siswg "IEEE Security in Storage Working Group" #define NID_ieee_siswg 1171 #define OBJ_ieee_siswg OBJ_ieee,2L,1619L #define SN_international_organizations "international-organizations" #define LN_international_organizations "International Organizations" #define NID_international_organizations 647 #define OBJ_international_organizations OBJ_joint_iso_itu_t,23L #define SN_wap "wap" #define NID_wap 678 #define OBJ_wap OBJ_international_organizations,43L #define SN_wap_wsg "wap-wsg" #define NID_wap_wsg 679 #define OBJ_wap_wsg OBJ_wap,1L #define SN_selected_attribute_types "selected-attribute-types" #define LN_selected_attribute_types "Selected Attribute Types" #define NID_selected_attribute_types 394 #define OBJ_selected_attribute_types OBJ_joint_iso_itu_t,5L,1L,5L #define SN_clearance "clearance" #define NID_clearance 395 #define OBJ_clearance OBJ_selected_attribute_types,55L #define SN_ISO_US "ISO-US" #define LN_ISO_US "ISO US Member Body" #define NID_ISO_US 183 #define OBJ_ISO_US OBJ_member_body,840L #define SN_X9_57 "X9-57" #define LN_X9_57 "X9.57" #define NID_X9_57 184 #define OBJ_X9_57 OBJ_ISO_US,10040L #define SN_X9cm "X9cm" #define LN_X9cm "X9.57 CM ?" #define NID_X9cm 185 #define OBJ_X9cm OBJ_X9_57,4L #define SN_ISO_CN "ISO-CN" #define LN_ISO_CN "ISO CN Member Body" #define NID_ISO_CN 1140 #define OBJ_ISO_CN OBJ_member_body,156L #define SN_oscca "oscca" #define NID_oscca 1141 #define OBJ_oscca OBJ_ISO_CN,10197L #define SN_sm_scheme "sm-scheme" #define NID_sm_scheme 1142 #define OBJ_sm_scheme OBJ_oscca,1L #define SN_dsa "DSA" #define LN_dsa "dsaEncryption" #define NID_dsa 116 #define OBJ_dsa OBJ_X9cm,1L #define SN_dsaWithSHA1 "DSA-SHA1" #define LN_dsaWithSHA1 "dsaWithSHA1" #define NID_dsaWithSHA1 113 #define OBJ_dsaWithSHA1 OBJ_X9cm,3L #define SN_ansi_X9_62 "ansi-X9-62" #define LN_ansi_X9_62 "ANSI X9.62" #define NID_ansi_X9_62 405 #define OBJ_ansi_X9_62 OBJ_ISO_US,10045L #define OBJ_X9_62_id_fieldType OBJ_ansi_X9_62,1L #define SN_X9_62_prime_field "prime-field" #define NID_X9_62_prime_field 406 #define OBJ_X9_62_prime_field OBJ_X9_62_id_fieldType,1L #define SN_X9_62_characteristic_two_field "characteristic-two-field" #define NID_X9_62_characteristic_two_field 407 #define OBJ_X9_62_characteristic_two_field OBJ_X9_62_id_fieldType,2L #define SN_X9_62_id_characteristic_two_basis "id-characteristic-two-basis" #define NID_X9_62_id_characteristic_two_basis 680 #define OBJ_X9_62_id_characteristic_two_basis OBJ_X9_62_characteristic_two_field,3L #define SN_X9_62_onBasis "onBasis" #define NID_X9_62_onBasis 681 #define OBJ_X9_62_onBasis OBJ_X9_62_id_characteristic_two_basis,1L #define SN_X9_62_tpBasis "tpBasis" #define NID_X9_62_tpBasis 682 #define OBJ_X9_62_tpBasis OBJ_X9_62_id_characteristic_two_basis,2L #define SN_X9_62_ppBasis "ppBasis" #define NID_X9_62_ppBasis 683 #define OBJ_X9_62_ppBasis OBJ_X9_62_id_characteristic_two_basis,3L #define OBJ_X9_62_id_publicKeyType OBJ_ansi_X9_62,2L #define SN_X9_62_id_ecPublicKey "id-ecPublicKey" #define NID_X9_62_id_ecPublicKey 408 #define OBJ_X9_62_id_ecPublicKey OBJ_X9_62_id_publicKeyType,1L #define OBJ_X9_62_ellipticCurve OBJ_ansi_X9_62,3L #define OBJ_X9_62_c_TwoCurve OBJ_X9_62_ellipticCurve,0L #define SN_X9_62_c2pnb163v1 "c2pnb163v1" #define NID_X9_62_c2pnb163v1 684 #define OBJ_X9_62_c2pnb163v1 OBJ_X9_62_c_TwoCurve,1L #define SN_X9_62_c2pnb163v2 "c2pnb163v2" #define NID_X9_62_c2pnb163v2 685 #define OBJ_X9_62_c2pnb163v2 OBJ_X9_62_c_TwoCurve,2L #define SN_X9_62_c2pnb163v3 "c2pnb163v3" #define NID_X9_62_c2pnb163v3 686 #define OBJ_X9_62_c2pnb163v3 OBJ_X9_62_c_TwoCurve,3L #define SN_X9_62_c2pnb176v1 "c2pnb176v1" #define NID_X9_62_c2pnb176v1 687 #define OBJ_X9_62_c2pnb176v1 OBJ_X9_62_c_TwoCurve,4L #define SN_X9_62_c2tnb191v1 "c2tnb191v1" #define NID_X9_62_c2tnb191v1 688 #define OBJ_X9_62_c2tnb191v1 OBJ_X9_62_c_TwoCurve,5L #define SN_X9_62_c2tnb191v2 "c2tnb191v2" #define NID_X9_62_c2tnb191v2 689 #define OBJ_X9_62_c2tnb191v2 OBJ_X9_62_c_TwoCurve,6L #define SN_X9_62_c2tnb191v3 "c2tnb191v3" #define NID_X9_62_c2tnb191v3 690 #define OBJ_X9_62_c2tnb191v3 OBJ_X9_62_c_TwoCurve,7L #define SN_X9_62_c2onb191v4 "c2onb191v4" #define NID_X9_62_c2onb191v4 691 #define OBJ_X9_62_c2onb191v4 OBJ_X9_62_c_TwoCurve,8L #define SN_X9_62_c2onb191v5 "c2onb191v5" #define NID_X9_62_c2onb191v5 692 #define OBJ_X9_62_c2onb191v5 OBJ_X9_62_c_TwoCurve,9L #define SN_X9_62_c2pnb208w1 "c2pnb208w1" #define NID_X9_62_c2pnb208w1 693 #define OBJ_X9_62_c2pnb208w1 OBJ_X9_62_c_TwoCurve,10L #define SN_X9_62_c2tnb239v1 "c2tnb239v1" #define NID_X9_62_c2tnb239v1 694 #define OBJ_X9_62_c2tnb239v1 OBJ_X9_62_c_TwoCurve,11L #define SN_X9_62_c2tnb239v2 "c2tnb239v2" #define NID_X9_62_c2tnb239v2 695 #define OBJ_X9_62_c2tnb239v2 OBJ_X9_62_c_TwoCurve,12L #define SN_X9_62_c2tnb239v3 "c2tnb239v3" #define NID_X9_62_c2tnb239v3 696 #define OBJ_X9_62_c2tnb239v3 OBJ_X9_62_c_TwoCurve,13L #define SN_X9_62_c2onb239v4 "c2onb239v4" #define NID_X9_62_c2onb239v4 697 #define OBJ_X9_62_c2onb239v4 OBJ_X9_62_c_TwoCurve,14L #define SN_X9_62_c2onb239v5 "c2onb239v5" #define NID_X9_62_c2onb239v5 698 #define OBJ_X9_62_c2onb239v5 OBJ_X9_62_c_TwoCurve,15L #define SN_X9_62_c2pnb272w1 "c2pnb272w1" #define NID_X9_62_c2pnb272w1 699 #define OBJ_X9_62_c2pnb272w1 OBJ_X9_62_c_TwoCurve,16L #define SN_X9_62_c2pnb304w1 "c2pnb304w1" #define NID_X9_62_c2pnb304w1 700 #define OBJ_X9_62_c2pnb304w1 OBJ_X9_62_c_TwoCurve,17L #define SN_X9_62_c2tnb359v1 "c2tnb359v1" #define NID_X9_62_c2tnb359v1 701 #define OBJ_X9_62_c2tnb359v1 OBJ_X9_62_c_TwoCurve,18L #define SN_X9_62_c2pnb368w1 "c2pnb368w1" #define NID_X9_62_c2pnb368w1 702 #define OBJ_X9_62_c2pnb368w1 OBJ_X9_62_c_TwoCurve,19L #define SN_X9_62_c2tnb431r1 "c2tnb431r1" #define NID_X9_62_c2tnb431r1 703 #define OBJ_X9_62_c2tnb431r1 OBJ_X9_62_c_TwoCurve,20L #define OBJ_X9_62_primeCurve OBJ_X9_62_ellipticCurve,1L #define SN_X9_62_prime192v1 "prime192v1" #define NID_X9_62_prime192v1 409 #define OBJ_X9_62_prime192v1 OBJ_X9_62_primeCurve,1L #define SN_X9_62_prime192v2 "prime192v2" #define NID_X9_62_prime192v2 410 #define OBJ_X9_62_prime192v2 OBJ_X9_62_primeCurve,2L #define SN_X9_62_prime192v3 "prime192v3" #define NID_X9_62_prime192v3 411 #define OBJ_X9_62_prime192v3 OBJ_X9_62_primeCurve,3L #define SN_X9_62_prime239v1 "prime239v1" #define NID_X9_62_prime239v1 412 #define OBJ_X9_62_prime239v1 OBJ_X9_62_primeCurve,4L #define SN_X9_62_prime239v2 "prime239v2" #define NID_X9_62_prime239v2 413 #define OBJ_X9_62_prime239v2 OBJ_X9_62_primeCurve,5L #define SN_X9_62_prime239v3 "prime239v3" #define NID_X9_62_prime239v3 414 #define OBJ_X9_62_prime239v3 OBJ_X9_62_primeCurve,6L #define SN_X9_62_prime256v1 "prime256v1" #define NID_X9_62_prime256v1 415 #define OBJ_X9_62_prime256v1 OBJ_X9_62_primeCurve,7L #define OBJ_X9_62_id_ecSigType OBJ_ansi_X9_62,4L #define SN_ecdsa_with_SHA1 "ecdsa-with-SHA1" #define NID_ecdsa_with_SHA1 416 #define OBJ_ecdsa_with_SHA1 OBJ_X9_62_id_ecSigType,1L #define SN_ecdsa_with_Recommended "ecdsa-with-Recommended" #define NID_ecdsa_with_Recommended 791 #define OBJ_ecdsa_with_Recommended OBJ_X9_62_id_ecSigType,2L #define SN_ecdsa_with_Specified "ecdsa-with-Specified" #define NID_ecdsa_with_Specified 792 #define OBJ_ecdsa_with_Specified OBJ_X9_62_id_ecSigType,3L #define SN_ecdsa_with_SHA224 "ecdsa-with-SHA224" #define NID_ecdsa_with_SHA224 793 #define OBJ_ecdsa_with_SHA224 OBJ_ecdsa_with_Specified,1L #define SN_ecdsa_with_SHA256 "ecdsa-with-SHA256" #define NID_ecdsa_with_SHA256 794 #define OBJ_ecdsa_with_SHA256 OBJ_ecdsa_with_Specified,2L #define SN_ecdsa_with_SHA384 "ecdsa-with-SHA384" #define NID_ecdsa_with_SHA384 795 #define OBJ_ecdsa_with_SHA384 OBJ_ecdsa_with_Specified,3L #define SN_ecdsa_with_SHA512 "ecdsa-with-SHA512" #define NID_ecdsa_with_SHA512 796 #define OBJ_ecdsa_with_SHA512 OBJ_ecdsa_with_Specified,4L #define OBJ_secg_ellipticCurve OBJ_certicom_arc,0L #define SN_secp112r1 "secp112r1" #define NID_secp112r1 704 #define OBJ_secp112r1 OBJ_secg_ellipticCurve,6L #define SN_secp112r2 "secp112r2" #define NID_secp112r2 705 #define OBJ_secp112r2 OBJ_secg_ellipticCurve,7L #define SN_secp128r1 "secp128r1" #define NID_secp128r1 706 #define OBJ_secp128r1 OBJ_secg_ellipticCurve,28L #define SN_secp128r2 "secp128r2" #define NID_secp128r2 707 #define OBJ_secp128r2 OBJ_secg_ellipticCurve,29L #define SN_secp160k1 "secp160k1" #define NID_secp160k1 708 #define OBJ_secp160k1 OBJ_secg_ellipticCurve,9L #define SN_secp160r1 "secp160r1" #define NID_secp160r1 709 #define OBJ_secp160r1 OBJ_secg_ellipticCurve,8L #define SN_secp160r2 "secp160r2" #define NID_secp160r2 710 #define OBJ_secp160r2 OBJ_secg_ellipticCurve,30L #define SN_secp192k1 "secp192k1" #define NID_secp192k1 711 #define OBJ_secp192k1 OBJ_secg_ellipticCurve,31L #define SN_secp224k1 "secp224k1" #define NID_secp224k1 712 #define OBJ_secp224k1 OBJ_secg_ellipticCurve,32L #define SN_secp224r1 "secp224r1" #define NID_secp224r1 713 #define OBJ_secp224r1 OBJ_secg_ellipticCurve,33L #define SN_secp256k1 "secp256k1" #define NID_secp256k1 714 #define OBJ_secp256k1 OBJ_secg_ellipticCurve,10L #define SN_secp384r1 "secp384r1" #define NID_secp384r1 715 #define OBJ_secp384r1 OBJ_secg_ellipticCurve,34L #define SN_secp521r1 "secp521r1" #define NID_secp521r1 716 #define OBJ_secp521r1 OBJ_secg_ellipticCurve,35L #define SN_sect113r1 "sect113r1" #define NID_sect113r1 717 #define OBJ_sect113r1 OBJ_secg_ellipticCurve,4L #define SN_sect113r2 "sect113r2" #define NID_sect113r2 718 #define OBJ_sect113r2 OBJ_secg_ellipticCurve,5L #define SN_sect131r1 "sect131r1" #define NID_sect131r1 719 #define OBJ_sect131r1 OBJ_secg_ellipticCurve,22L #define SN_sect131r2 "sect131r2" #define NID_sect131r2 720 #define OBJ_sect131r2 OBJ_secg_ellipticCurve,23L #define SN_sect163k1 "sect163k1" #define NID_sect163k1 721 #define OBJ_sect163k1 OBJ_secg_ellipticCurve,1L #define SN_sect163r1 "sect163r1" #define NID_sect163r1 722 #define OBJ_sect163r1 OBJ_secg_ellipticCurve,2L #define SN_sect163r2 "sect163r2" #define NID_sect163r2 723 #define OBJ_sect163r2 OBJ_secg_ellipticCurve,15L #define SN_sect193r1 "sect193r1" #define NID_sect193r1 724 #define OBJ_sect193r1 OBJ_secg_ellipticCurve,24L #define SN_sect193r2 "sect193r2" #define NID_sect193r2 725 #define OBJ_sect193r2 OBJ_secg_ellipticCurve,25L #define SN_sect233k1 "sect233k1" #define NID_sect233k1 726 #define OBJ_sect233k1 OBJ_secg_ellipticCurve,26L #define SN_sect233r1 "sect233r1" #define NID_sect233r1 727 #define OBJ_sect233r1 OBJ_secg_ellipticCurve,27L #define SN_sect239k1 "sect239k1" #define NID_sect239k1 728 #define OBJ_sect239k1 OBJ_secg_ellipticCurve,3L #define SN_sect283k1 "sect283k1" #define NID_sect283k1 729 #define OBJ_sect283k1 OBJ_secg_ellipticCurve,16L #define SN_sect283r1 "sect283r1" #define NID_sect283r1 730 #define OBJ_sect283r1 OBJ_secg_ellipticCurve,17L #define SN_sect409k1 "sect409k1" #define NID_sect409k1 731 #define OBJ_sect409k1 OBJ_secg_ellipticCurve,36L #define SN_sect409r1 "sect409r1" #define NID_sect409r1 732 #define OBJ_sect409r1 OBJ_secg_ellipticCurve,37L #define SN_sect571k1 "sect571k1" #define NID_sect571k1 733 #define OBJ_sect571k1 OBJ_secg_ellipticCurve,38L #define SN_sect571r1 "sect571r1" #define NID_sect571r1 734 #define OBJ_sect571r1 OBJ_secg_ellipticCurve,39L #define OBJ_wap_wsg_idm_ecid OBJ_wap_wsg,4L #define SN_wap_wsg_idm_ecid_wtls1 "wap-wsg-idm-ecid-wtls1" #define NID_wap_wsg_idm_ecid_wtls1 735 #define OBJ_wap_wsg_idm_ecid_wtls1 OBJ_wap_wsg_idm_ecid,1L #define SN_wap_wsg_idm_ecid_wtls3 "wap-wsg-idm-ecid-wtls3" #define NID_wap_wsg_idm_ecid_wtls3 736 #define OBJ_wap_wsg_idm_ecid_wtls3 OBJ_wap_wsg_idm_ecid,3L #define SN_wap_wsg_idm_ecid_wtls4 "wap-wsg-idm-ecid-wtls4" #define NID_wap_wsg_idm_ecid_wtls4 737 #define OBJ_wap_wsg_idm_ecid_wtls4 OBJ_wap_wsg_idm_ecid,4L #define SN_wap_wsg_idm_ecid_wtls5 "wap-wsg-idm-ecid-wtls5" #define NID_wap_wsg_idm_ecid_wtls5 738 #define OBJ_wap_wsg_idm_ecid_wtls5 OBJ_wap_wsg_idm_ecid,5L #define SN_wap_wsg_idm_ecid_wtls6 "wap-wsg-idm-ecid-wtls6" #define NID_wap_wsg_idm_ecid_wtls6 739 #define OBJ_wap_wsg_idm_ecid_wtls6 OBJ_wap_wsg_idm_ecid,6L #define SN_wap_wsg_idm_ecid_wtls7 "wap-wsg-idm-ecid-wtls7" #define NID_wap_wsg_idm_ecid_wtls7 740 #define OBJ_wap_wsg_idm_ecid_wtls7 OBJ_wap_wsg_idm_ecid,7L #define SN_wap_wsg_idm_ecid_wtls8 "wap-wsg-idm-ecid-wtls8" #define NID_wap_wsg_idm_ecid_wtls8 741 #define OBJ_wap_wsg_idm_ecid_wtls8 OBJ_wap_wsg_idm_ecid,8L #define SN_wap_wsg_idm_ecid_wtls9 "wap-wsg-idm-ecid-wtls9" #define NID_wap_wsg_idm_ecid_wtls9 742 #define OBJ_wap_wsg_idm_ecid_wtls9 OBJ_wap_wsg_idm_ecid,9L #define SN_wap_wsg_idm_ecid_wtls10 "wap-wsg-idm-ecid-wtls10" #define NID_wap_wsg_idm_ecid_wtls10 743 #define OBJ_wap_wsg_idm_ecid_wtls10 OBJ_wap_wsg_idm_ecid,10L #define SN_wap_wsg_idm_ecid_wtls11 "wap-wsg-idm-ecid-wtls11" #define NID_wap_wsg_idm_ecid_wtls11 744 #define OBJ_wap_wsg_idm_ecid_wtls11 OBJ_wap_wsg_idm_ecid,11L #define SN_wap_wsg_idm_ecid_wtls12 "wap-wsg-idm-ecid-wtls12" #define NID_wap_wsg_idm_ecid_wtls12 745 #define OBJ_wap_wsg_idm_ecid_wtls12 OBJ_wap_wsg_idm_ecid,12L #define SN_cast5_cbc "CAST5-CBC" #define LN_cast5_cbc "cast5-cbc" #define NID_cast5_cbc 108 #define OBJ_cast5_cbc OBJ_ISO_US,113533L,7L,66L,10L #define SN_cast5_ecb "CAST5-ECB" #define LN_cast5_ecb "cast5-ecb" #define NID_cast5_ecb 109 #define SN_cast5_cfb64 "CAST5-CFB" #define LN_cast5_cfb64 "cast5-cfb" #define NID_cast5_cfb64 110 #define SN_cast5_ofb64 "CAST5-OFB" #define LN_cast5_ofb64 "cast5-ofb" #define NID_cast5_ofb64 111 #define LN_pbeWithMD5AndCast5_CBC "pbeWithMD5AndCast5CBC" #define NID_pbeWithMD5AndCast5_CBC 112 #define OBJ_pbeWithMD5AndCast5_CBC OBJ_ISO_US,113533L,7L,66L,12L #define SN_id_PasswordBasedMAC "id-PasswordBasedMAC" #define LN_id_PasswordBasedMAC "password based MAC" #define NID_id_PasswordBasedMAC 782 #define OBJ_id_PasswordBasedMAC OBJ_ISO_US,113533L,7L,66L,13L #define SN_id_DHBasedMac "id-DHBasedMac" #define LN_id_DHBasedMac "Diffie-Hellman based MAC" #define NID_id_DHBasedMac 783 #define OBJ_id_DHBasedMac OBJ_ISO_US,113533L,7L,66L,30L #define SN_rsadsi "rsadsi" #define LN_rsadsi "RSA Data Security, Inc." #define NID_rsadsi 1 #define OBJ_rsadsi OBJ_ISO_US,113549L #define SN_pkcs "pkcs" #define LN_pkcs "RSA Data Security, Inc. PKCS" #define NID_pkcs 2 #define OBJ_pkcs OBJ_rsadsi,1L #define SN_pkcs1 "pkcs1" #define NID_pkcs1 186 #define OBJ_pkcs1 OBJ_pkcs,1L #define LN_rsaEncryption "rsaEncryption" #define NID_rsaEncryption 6 #define OBJ_rsaEncryption OBJ_pkcs1,1L #define SN_md2WithRSAEncryption "RSA-MD2" #define LN_md2WithRSAEncryption "md2WithRSAEncryption" #define NID_md2WithRSAEncryption 7 #define OBJ_md2WithRSAEncryption OBJ_pkcs1,2L #define SN_md4WithRSAEncryption "RSA-MD4" #define LN_md4WithRSAEncryption "md4WithRSAEncryption" #define NID_md4WithRSAEncryption 396 #define OBJ_md4WithRSAEncryption OBJ_pkcs1,3L #define SN_md5WithRSAEncryption "RSA-MD5" #define LN_md5WithRSAEncryption "md5WithRSAEncryption" #define NID_md5WithRSAEncryption 8 #define OBJ_md5WithRSAEncryption OBJ_pkcs1,4L #define SN_sha1WithRSAEncryption "RSA-SHA1" #define LN_sha1WithRSAEncryption "sha1WithRSAEncryption" #define NID_sha1WithRSAEncryption 65 #define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L #define SN_rsaesOaep "RSAES-OAEP" #define LN_rsaesOaep "rsaesOaep" #define NID_rsaesOaep 919 #define OBJ_rsaesOaep OBJ_pkcs1,7L #define SN_mgf1 "MGF1" #define LN_mgf1 "mgf1" #define NID_mgf1 911 #define OBJ_mgf1 OBJ_pkcs1,8L #define SN_pSpecified "PSPECIFIED" #define LN_pSpecified "pSpecified" #define NID_pSpecified 935 #define OBJ_pSpecified OBJ_pkcs1,9L #define SN_rsassaPss "RSASSA-PSS" #define LN_rsassaPss "rsassaPss" #define NID_rsassaPss 912 #define OBJ_rsassaPss OBJ_pkcs1,10L #define SN_sha256WithRSAEncryption "RSA-SHA256" #define LN_sha256WithRSAEncryption "sha256WithRSAEncryption" #define NID_sha256WithRSAEncryption 668 #define OBJ_sha256WithRSAEncryption OBJ_pkcs1,11L #define SN_sha384WithRSAEncryption "RSA-SHA384" #define LN_sha384WithRSAEncryption "sha384WithRSAEncryption" #define NID_sha384WithRSAEncryption 669 #define OBJ_sha384WithRSAEncryption OBJ_pkcs1,12L #define SN_sha512WithRSAEncryption "RSA-SHA512" #define LN_sha512WithRSAEncryption "sha512WithRSAEncryption" #define NID_sha512WithRSAEncryption 670 #define OBJ_sha512WithRSAEncryption OBJ_pkcs1,13L #define SN_sha224WithRSAEncryption "RSA-SHA224" #define LN_sha224WithRSAEncryption "sha224WithRSAEncryption" #define NID_sha224WithRSAEncryption 671 #define OBJ_sha224WithRSAEncryption OBJ_pkcs1,14L #define SN_sha512_224WithRSAEncryption "RSA-SHA512/224" #define LN_sha512_224WithRSAEncryption "sha512-224WithRSAEncryption" #define NID_sha512_224WithRSAEncryption 1145 #define OBJ_sha512_224WithRSAEncryption OBJ_pkcs1,15L #define SN_sha512_256WithRSAEncryption "RSA-SHA512/256" #define LN_sha512_256WithRSAEncryption "sha512-256WithRSAEncryption" #define NID_sha512_256WithRSAEncryption 1146 #define OBJ_sha512_256WithRSAEncryption OBJ_pkcs1,16L #define SN_pkcs3 "pkcs3" #define NID_pkcs3 27 #define OBJ_pkcs3 OBJ_pkcs,3L #define LN_dhKeyAgreement "dhKeyAgreement" #define NID_dhKeyAgreement 28 #define OBJ_dhKeyAgreement OBJ_pkcs3,1L #define SN_pkcs5 "pkcs5" #define NID_pkcs5 187 #define OBJ_pkcs5 OBJ_pkcs,5L #define SN_pbeWithMD2AndDES_CBC "PBE-MD2-DES" #define LN_pbeWithMD2AndDES_CBC "pbeWithMD2AndDES-CBC" #define NID_pbeWithMD2AndDES_CBC 9 #define OBJ_pbeWithMD2AndDES_CBC OBJ_pkcs5,1L #define SN_pbeWithMD5AndDES_CBC "PBE-MD5-DES" #define LN_pbeWithMD5AndDES_CBC "pbeWithMD5AndDES-CBC" #define NID_pbeWithMD5AndDES_CBC 10 #define OBJ_pbeWithMD5AndDES_CBC OBJ_pkcs5,3L #define SN_pbeWithMD2AndRC2_CBC "PBE-MD2-RC2-64" #define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC" #define NID_pbeWithMD2AndRC2_CBC 168 #define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs5,4L #define SN_pbeWithMD5AndRC2_CBC "PBE-MD5-RC2-64" #define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC" #define NID_pbeWithMD5AndRC2_CBC 169 #define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs5,6L #define SN_pbeWithSHA1AndDES_CBC "PBE-SHA1-DES" #define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC" #define NID_pbeWithSHA1AndDES_CBC 170 #define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs5,10L #define SN_pbeWithSHA1AndRC2_CBC "PBE-SHA1-RC2-64" #define LN_pbeWithSHA1AndRC2_CBC "pbeWithSHA1AndRC2-CBC" #define NID_pbeWithSHA1AndRC2_CBC 68 #define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs5,11L #define LN_id_pbkdf2 "PBKDF2" #define NID_id_pbkdf2 69 #define OBJ_id_pbkdf2 OBJ_pkcs5,12L #define LN_pbes2 "PBES2" #define NID_pbes2 161 #define OBJ_pbes2 OBJ_pkcs5,13L #define LN_pbmac1 "PBMAC1" #define NID_pbmac1 162 #define OBJ_pbmac1 OBJ_pkcs5,14L #define SN_pkcs7 "pkcs7" #define NID_pkcs7 20 #define OBJ_pkcs7 OBJ_pkcs,7L #define LN_pkcs7_data "pkcs7-data" #define NID_pkcs7_data 21 #define OBJ_pkcs7_data OBJ_pkcs7,1L #define LN_pkcs7_signed "pkcs7-signedData" #define NID_pkcs7_signed 22 #define OBJ_pkcs7_signed OBJ_pkcs7,2L #define LN_pkcs7_enveloped "pkcs7-envelopedData" #define NID_pkcs7_enveloped 23 #define OBJ_pkcs7_enveloped OBJ_pkcs7,3L #define LN_pkcs7_signedAndEnveloped "pkcs7-signedAndEnvelopedData" #define NID_pkcs7_signedAndEnveloped 24 #define OBJ_pkcs7_signedAndEnveloped OBJ_pkcs7,4L #define LN_pkcs7_digest "pkcs7-digestData" #define NID_pkcs7_digest 25 #define OBJ_pkcs7_digest OBJ_pkcs7,5L #define LN_pkcs7_encrypted "pkcs7-encryptedData" #define NID_pkcs7_encrypted 26 #define OBJ_pkcs7_encrypted OBJ_pkcs7,6L #define SN_pkcs9 "pkcs9" #define NID_pkcs9 47 #define OBJ_pkcs9 OBJ_pkcs,9L #define LN_pkcs9_emailAddress "emailAddress" #define NID_pkcs9_emailAddress 48 #define OBJ_pkcs9_emailAddress OBJ_pkcs9,1L #define LN_pkcs9_unstructuredName "unstructuredName" #define NID_pkcs9_unstructuredName 49 #define OBJ_pkcs9_unstructuredName OBJ_pkcs9,2L #define LN_pkcs9_contentType "contentType" #define NID_pkcs9_contentType 50 #define OBJ_pkcs9_contentType OBJ_pkcs9,3L #define LN_pkcs9_messageDigest "messageDigest" #define NID_pkcs9_messageDigest 51 #define OBJ_pkcs9_messageDigest OBJ_pkcs9,4L #define LN_pkcs9_signingTime "signingTime" #define NID_pkcs9_signingTime 52 #define OBJ_pkcs9_signingTime OBJ_pkcs9,5L #define LN_pkcs9_countersignature "countersignature" #define NID_pkcs9_countersignature 53 #define OBJ_pkcs9_countersignature OBJ_pkcs9,6L #define LN_pkcs9_challengePassword "challengePassword" #define NID_pkcs9_challengePassword 54 #define OBJ_pkcs9_challengePassword OBJ_pkcs9,7L #define LN_pkcs9_unstructuredAddress "unstructuredAddress" #define NID_pkcs9_unstructuredAddress 55 #define OBJ_pkcs9_unstructuredAddress OBJ_pkcs9,8L #define LN_pkcs9_extCertAttributes "extendedCertificateAttributes" #define NID_pkcs9_extCertAttributes 56 #define OBJ_pkcs9_extCertAttributes OBJ_pkcs9,9L #define SN_ext_req "extReq" #define LN_ext_req "Extension Request" #define NID_ext_req 172 #define OBJ_ext_req OBJ_pkcs9,14L #define SN_SMIMECapabilities "SMIME-CAPS" #define LN_SMIMECapabilities "S/MIME Capabilities" #define NID_SMIMECapabilities 167 #define OBJ_SMIMECapabilities OBJ_pkcs9,15L #define SN_SMIME "SMIME" #define LN_SMIME "S/MIME" #define NID_SMIME 188 #define OBJ_SMIME OBJ_pkcs9,16L #define SN_id_smime_mod "id-smime-mod" #define NID_id_smime_mod 189 #define OBJ_id_smime_mod OBJ_SMIME,0L #define SN_id_smime_ct "id-smime-ct" #define NID_id_smime_ct 190 #define OBJ_id_smime_ct OBJ_SMIME,1L #define SN_id_smime_aa "id-smime-aa" #define NID_id_smime_aa 191 #define OBJ_id_smime_aa OBJ_SMIME,2L #define SN_id_smime_alg "id-smime-alg" #define NID_id_smime_alg 192 #define OBJ_id_smime_alg OBJ_SMIME,3L #define SN_id_smime_cd "id-smime-cd" #define NID_id_smime_cd 193 #define OBJ_id_smime_cd OBJ_SMIME,4L #define SN_id_smime_spq "id-smime-spq" #define NID_id_smime_spq 194 #define OBJ_id_smime_spq OBJ_SMIME,5L #define SN_id_smime_cti "id-smime-cti" #define NID_id_smime_cti 195 #define OBJ_id_smime_cti OBJ_SMIME,6L #define SN_id_smime_mod_cms "id-smime-mod-cms" #define NID_id_smime_mod_cms 196 #define OBJ_id_smime_mod_cms OBJ_id_smime_mod,1L #define SN_id_smime_mod_ess "id-smime-mod-ess" #define NID_id_smime_mod_ess 197 #define OBJ_id_smime_mod_ess OBJ_id_smime_mod,2L #define SN_id_smime_mod_oid "id-smime-mod-oid" #define NID_id_smime_mod_oid 198 #define OBJ_id_smime_mod_oid OBJ_id_smime_mod,3L #define SN_id_smime_mod_msg_v3 "id-smime-mod-msg-v3" #define NID_id_smime_mod_msg_v3 199 #define OBJ_id_smime_mod_msg_v3 OBJ_id_smime_mod,4L #define SN_id_smime_mod_ets_eSignature_88 "id-smime-mod-ets-eSignature-88" #define NID_id_smime_mod_ets_eSignature_88 200 #define OBJ_id_smime_mod_ets_eSignature_88 OBJ_id_smime_mod,5L #define SN_id_smime_mod_ets_eSignature_97 "id-smime-mod-ets-eSignature-97" #define NID_id_smime_mod_ets_eSignature_97 201 #define OBJ_id_smime_mod_ets_eSignature_97 OBJ_id_smime_mod,6L #define SN_id_smime_mod_ets_eSigPolicy_88 "id-smime-mod-ets-eSigPolicy-88" #define NID_id_smime_mod_ets_eSigPolicy_88 202 #define OBJ_id_smime_mod_ets_eSigPolicy_88 OBJ_id_smime_mod,7L #define SN_id_smime_mod_ets_eSigPolicy_97 "id-smime-mod-ets-eSigPolicy-97" #define NID_id_smime_mod_ets_eSigPolicy_97 203 #define OBJ_id_smime_mod_ets_eSigPolicy_97 OBJ_id_smime_mod,8L #define SN_id_smime_ct_receipt "id-smime-ct-receipt" #define NID_id_smime_ct_receipt 204 #define OBJ_id_smime_ct_receipt OBJ_id_smime_ct,1L #define SN_id_smime_ct_authData "id-smime-ct-authData" #define NID_id_smime_ct_authData 205 #define OBJ_id_smime_ct_authData OBJ_id_smime_ct,2L #define SN_id_smime_ct_publishCert "id-smime-ct-publishCert" #define NID_id_smime_ct_publishCert 206 #define OBJ_id_smime_ct_publishCert OBJ_id_smime_ct,3L #define SN_id_smime_ct_TSTInfo "id-smime-ct-TSTInfo" #define NID_id_smime_ct_TSTInfo 207 #define OBJ_id_smime_ct_TSTInfo OBJ_id_smime_ct,4L #define SN_id_smime_ct_TDTInfo "id-smime-ct-TDTInfo" #define NID_id_smime_ct_TDTInfo 208 #define OBJ_id_smime_ct_TDTInfo OBJ_id_smime_ct,5L #define SN_id_smime_ct_contentInfo "id-smime-ct-contentInfo" #define NID_id_smime_ct_contentInfo 209 #define OBJ_id_smime_ct_contentInfo OBJ_id_smime_ct,6L #define SN_id_smime_ct_DVCSRequestData "id-smime-ct-DVCSRequestData" #define NID_id_smime_ct_DVCSRequestData 210 #define OBJ_id_smime_ct_DVCSRequestData OBJ_id_smime_ct,7L #define SN_id_smime_ct_DVCSResponseData "id-smime-ct-DVCSResponseData" #define NID_id_smime_ct_DVCSResponseData 211 #define OBJ_id_smime_ct_DVCSResponseData OBJ_id_smime_ct,8L #define SN_id_smime_ct_compressedData "id-smime-ct-compressedData" #define NID_id_smime_ct_compressedData 786 #define OBJ_id_smime_ct_compressedData OBJ_id_smime_ct,9L #define SN_id_smime_ct_contentCollection "id-smime-ct-contentCollection" #define NID_id_smime_ct_contentCollection 1058 #define OBJ_id_smime_ct_contentCollection OBJ_id_smime_ct,19L #define SN_id_smime_ct_authEnvelopedData "id-smime-ct-authEnvelopedData" #define NID_id_smime_ct_authEnvelopedData 1059 #define OBJ_id_smime_ct_authEnvelopedData OBJ_id_smime_ct,23L #define SN_id_ct_asciiTextWithCRLF "id-ct-asciiTextWithCRLF" #define NID_id_ct_asciiTextWithCRLF 787 #define OBJ_id_ct_asciiTextWithCRLF OBJ_id_smime_ct,27L #define SN_id_ct_xml "id-ct-xml" #define NID_id_ct_xml 1060 #define OBJ_id_ct_xml OBJ_id_smime_ct,28L #define SN_id_smime_aa_receiptRequest "id-smime-aa-receiptRequest" #define NID_id_smime_aa_receiptRequest 212 #define OBJ_id_smime_aa_receiptRequest OBJ_id_smime_aa,1L #define SN_id_smime_aa_securityLabel "id-smime-aa-securityLabel" #define NID_id_smime_aa_securityLabel 213 #define OBJ_id_smime_aa_securityLabel OBJ_id_smime_aa,2L #define SN_id_smime_aa_mlExpandHistory "id-smime-aa-mlExpandHistory" #define NID_id_smime_aa_mlExpandHistory 214 #define OBJ_id_smime_aa_mlExpandHistory OBJ_id_smime_aa,3L #define SN_id_smime_aa_contentHint "id-smime-aa-contentHint" #define NID_id_smime_aa_contentHint 215 #define OBJ_id_smime_aa_contentHint OBJ_id_smime_aa,4L #define SN_id_smime_aa_msgSigDigest "id-smime-aa-msgSigDigest" #define NID_id_smime_aa_msgSigDigest 216 #define OBJ_id_smime_aa_msgSigDigest OBJ_id_smime_aa,5L #define SN_id_smime_aa_encapContentType "id-smime-aa-encapContentType" #define NID_id_smime_aa_encapContentType 217 #define OBJ_id_smime_aa_encapContentType OBJ_id_smime_aa,6L #define SN_id_smime_aa_contentIdentifier "id-smime-aa-contentIdentifier" #define NID_id_smime_aa_contentIdentifier 218 #define OBJ_id_smime_aa_contentIdentifier OBJ_id_smime_aa,7L #define SN_id_smime_aa_macValue "id-smime-aa-macValue" #define NID_id_smime_aa_macValue 219 #define OBJ_id_smime_aa_macValue OBJ_id_smime_aa,8L #define SN_id_smime_aa_equivalentLabels "id-smime-aa-equivalentLabels" #define NID_id_smime_aa_equivalentLabels 220 #define OBJ_id_smime_aa_equivalentLabels OBJ_id_smime_aa,9L #define SN_id_smime_aa_contentReference "id-smime-aa-contentReference" #define NID_id_smime_aa_contentReference 221 #define OBJ_id_smime_aa_contentReference OBJ_id_smime_aa,10L #define SN_id_smime_aa_encrypKeyPref "id-smime-aa-encrypKeyPref" #define NID_id_smime_aa_encrypKeyPref 222 #define OBJ_id_smime_aa_encrypKeyPref OBJ_id_smime_aa,11L #define SN_id_smime_aa_signingCertificate "id-smime-aa-signingCertificate" #define NID_id_smime_aa_signingCertificate 223 #define OBJ_id_smime_aa_signingCertificate OBJ_id_smime_aa,12L #define SN_id_smime_aa_smimeEncryptCerts "id-smime-aa-smimeEncryptCerts" #define NID_id_smime_aa_smimeEncryptCerts 224 #define OBJ_id_smime_aa_smimeEncryptCerts OBJ_id_smime_aa,13L #define SN_id_smime_aa_timeStampToken "id-smime-aa-timeStampToken" #define NID_id_smime_aa_timeStampToken 225 #define OBJ_id_smime_aa_timeStampToken OBJ_id_smime_aa,14L #define SN_id_smime_aa_ets_sigPolicyId "id-smime-aa-ets-sigPolicyId" #define NID_id_smime_aa_ets_sigPolicyId 226 #define OBJ_id_smime_aa_ets_sigPolicyId OBJ_id_smime_aa,15L #define SN_id_smime_aa_ets_commitmentType "id-smime-aa-ets-commitmentType" #define NID_id_smime_aa_ets_commitmentType 227 #define OBJ_id_smime_aa_ets_commitmentType OBJ_id_smime_aa,16L #define SN_id_smime_aa_ets_signerLocation "id-smime-aa-ets-signerLocation" #define NID_id_smime_aa_ets_signerLocation 228 #define OBJ_id_smime_aa_ets_signerLocation OBJ_id_smime_aa,17L #define SN_id_smime_aa_ets_signerAttr "id-smime-aa-ets-signerAttr" #define NID_id_smime_aa_ets_signerAttr 229 #define OBJ_id_smime_aa_ets_signerAttr OBJ_id_smime_aa,18L #define SN_id_smime_aa_ets_otherSigCert "id-smime-aa-ets-otherSigCert" #define NID_id_smime_aa_ets_otherSigCert 230 #define OBJ_id_smime_aa_ets_otherSigCert OBJ_id_smime_aa,19L #define SN_id_smime_aa_ets_contentTimestamp "id-smime-aa-ets-contentTimestamp" #define NID_id_smime_aa_ets_contentTimestamp 231 #define OBJ_id_smime_aa_ets_contentTimestamp OBJ_id_smime_aa,20L #define SN_id_smime_aa_ets_CertificateRefs "id-smime-aa-ets-CertificateRefs" #define NID_id_smime_aa_ets_CertificateRefs 232 #define OBJ_id_smime_aa_ets_CertificateRefs OBJ_id_smime_aa,21L #define SN_id_smime_aa_ets_RevocationRefs "id-smime-aa-ets-RevocationRefs" #define NID_id_smime_aa_ets_RevocationRefs 233 #define OBJ_id_smime_aa_ets_RevocationRefs OBJ_id_smime_aa,22L #define SN_id_smime_aa_ets_certValues "id-smime-aa-ets-certValues" #define NID_id_smime_aa_ets_certValues 234 #define OBJ_id_smime_aa_ets_certValues OBJ_id_smime_aa,23L #define SN_id_smime_aa_ets_revocationValues "id-smime-aa-ets-revocationValues" #define NID_id_smime_aa_ets_revocationValues 235 #define OBJ_id_smime_aa_ets_revocationValues OBJ_id_smime_aa,24L #define SN_id_smime_aa_ets_escTimeStamp "id-smime-aa-ets-escTimeStamp" #define NID_id_smime_aa_ets_escTimeStamp 236 #define OBJ_id_smime_aa_ets_escTimeStamp OBJ_id_smime_aa,25L #define SN_id_smime_aa_ets_certCRLTimestamp "id-smime-aa-ets-certCRLTimestamp" #define NID_id_smime_aa_ets_certCRLTimestamp 237 #define OBJ_id_smime_aa_ets_certCRLTimestamp OBJ_id_smime_aa,26L #define SN_id_smime_aa_ets_archiveTimeStamp "id-smime-aa-ets-archiveTimeStamp" #define NID_id_smime_aa_ets_archiveTimeStamp 238 #define OBJ_id_smime_aa_ets_archiveTimeStamp OBJ_id_smime_aa,27L #define SN_id_smime_aa_signatureType "id-smime-aa-signatureType" #define NID_id_smime_aa_signatureType 239 #define OBJ_id_smime_aa_signatureType OBJ_id_smime_aa,28L #define SN_id_smime_aa_dvcs_dvc "id-smime-aa-dvcs-dvc" #define NID_id_smime_aa_dvcs_dvc 240 #define OBJ_id_smime_aa_dvcs_dvc OBJ_id_smime_aa,29L #define SN_id_smime_aa_signingCertificateV2 "id-smime-aa-signingCertificateV2" #define NID_id_smime_aa_signingCertificateV2 1086 #define OBJ_id_smime_aa_signingCertificateV2 OBJ_id_smime_aa,47L #define SN_id_smime_alg_ESDHwith3DES "id-smime-alg-ESDHwith3DES" #define NID_id_smime_alg_ESDHwith3DES 241 #define OBJ_id_smime_alg_ESDHwith3DES OBJ_id_smime_alg,1L #define SN_id_smime_alg_ESDHwithRC2 "id-smime-alg-ESDHwithRC2" #define NID_id_smime_alg_ESDHwithRC2 242 #define OBJ_id_smime_alg_ESDHwithRC2 OBJ_id_smime_alg,2L #define SN_id_smime_alg_3DESwrap "id-smime-alg-3DESwrap" #define NID_id_smime_alg_3DESwrap 243 #define OBJ_id_smime_alg_3DESwrap OBJ_id_smime_alg,3L #define SN_id_smime_alg_RC2wrap "id-smime-alg-RC2wrap" #define NID_id_smime_alg_RC2wrap 244 #define OBJ_id_smime_alg_RC2wrap OBJ_id_smime_alg,4L #define SN_id_smime_alg_ESDH "id-smime-alg-ESDH" #define NID_id_smime_alg_ESDH 245 #define OBJ_id_smime_alg_ESDH OBJ_id_smime_alg,5L #define SN_id_smime_alg_CMS3DESwrap "id-smime-alg-CMS3DESwrap" #define NID_id_smime_alg_CMS3DESwrap 246 #define OBJ_id_smime_alg_CMS3DESwrap OBJ_id_smime_alg,6L #define SN_id_smime_alg_CMSRC2wrap "id-smime-alg-CMSRC2wrap" #define NID_id_smime_alg_CMSRC2wrap 247 #define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L #define SN_id_alg_PWRI_KEK "id-alg-PWRI-KEK" #define NID_id_alg_PWRI_KEK 893 #define OBJ_id_alg_PWRI_KEK OBJ_id_smime_alg,9L #define SN_id_smime_cd_ldap "id-smime-cd-ldap" #define NID_id_smime_cd_ldap 248 #define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L #define SN_id_smime_spq_ets_sqt_uri "id-smime-spq-ets-sqt-uri" #define NID_id_smime_spq_ets_sqt_uri 249 #define OBJ_id_smime_spq_ets_sqt_uri OBJ_id_smime_spq,1L #define SN_id_smime_spq_ets_sqt_unotice "id-smime-spq-ets-sqt-unotice" #define NID_id_smime_spq_ets_sqt_unotice 250 #define OBJ_id_smime_spq_ets_sqt_unotice OBJ_id_smime_spq,2L #define SN_id_smime_cti_ets_proofOfOrigin "id-smime-cti-ets-proofOfOrigin" #define NID_id_smime_cti_ets_proofOfOrigin 251 #define OBJ_id_smime_cti_ets_proofOfOrigin OBJ_id_smime_cti,1L #define SN_id_smime_cti_ets_proofOfReceipt "id-smime-cti-ets-proofOfReceipt" #define NID_id_smime_cti_ets_proofOfReceipt 252 #define OBJ_id_smime_cti_ets_proofOfReceipt OBJ_id_smime_cti,2L #define SN_id_smime_cti_ets_proofOfDelivery "id-smime-cti-ets-proofOfDelivery" #define NID_id_smime_cti_ets_proofOfDelivery 253 #define OBJ_id_smime_cti_ets_proofOfDelivery OBJ_id_smime_cti,3L #define SN_id_smime_cti_ets_proofOfSender "id-smime-cti-ets-proofOfSender" #define NID_id_smime_cti_ets_proofOfSender 254 #define OBJ_id_smime_cti_ets_proofOfSender OBJ_id_smime_cti,4L #define SN_id_smime_cti_ets_proofOfApproval "id-smime-cti-ets-proofOfApproval" #define NID_id_smime_cti_ets_proofOfApproval 255 #define OBJ_id_smime_cti_ets_proofOfApproval OBJ_id_smime_cti,5L #define SN_id_smime_cti_ets_proofOfCreation "id-smime-cti-ets-proofOfCreation" #define NID_id_smime_cti_ets_proofOfCreation 256 #define OBJ_id_smime_cti_ets_proofOfCreation OBJ_id_smime_cti,6L #define LN_friendlyName "friendlyName" #define NID_friendlyName 156 #define OBJ_friendlyName OBJ_pkcs9,20L #define LN_localKeyID "localKeyID" #define NID_localKeyID 157 #define OBJ_localKeyID OBJ_pkcs9,21L #define SN_ms_csp_name "CSPName" #define LN_ms_csp_name "Microsoft CSP Name" #define NID_ms_csp_name 417 #define OBJ_ms_csp_name 1L,3L,6L,1L,4L,1L,311L,17L,1L #define SN_LocalKeySet "LocalKeySet" #define LN_LocalKeySet "Microsoft Local Key set" #define NID_LocalKeySet 856 #define OBJ_LocalKeySet 1L,3L,6L,1L,4L,1L,311L,17L,2L #define OBJ_certTypes OBJ_pkcs9,22L #define LN_x509Certificate "x509Certificate" #define NID_x509Certificate 158 #define OBJ_x509Certificate OBJ_certTypes,1L #define LN_sdsiCertificate "sdsiCertificate" #define NID_sdsiCertificate 159 #define OBJ_sdsiCertificate OBJ_certTypes,2L #define OBJ_crlTypes OBJ_pkcs9,23L #define LN_x509Crl "x509Crl" #define NID_x509Crl 160 #define OBJ_x509Crl OBJ_crlTypes,1L #define OBJ_pkcs12 OBJ_pkcs,12L #define OBJ_pkcs12_pbeids OBJ_pkcs12,1L #define SN_pbe_WithSHA1And128BitRC4 "PBE-SHA1-RC4-128" #define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4" #define NID_pbe_WithSHA1And128BitRC4 144 #define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids,1L #define SN_pbe_WithSHA1And40BitRC4 "PBE-SHA1-RC4-40" #define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4" #define NID_pbe_WithSHA1And40BitRC4 145 #define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids,2L #define SN_pbe_WithSHA1And3_Key_TripleDES_CBC "PBE-SHA1-3DES" #define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC" #define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146 #define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids,3L #define SN_pbe_WithSHA1And2_Key_TripleDES_CBC "PBE-SHA1-2DES" #define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC" #define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147 #define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids,4L #define SN_pbe_WithSHA1And128BitRC2_CBC "PBE-SHA1-RC2-128" #define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC" #define NID_pbe_WithSHA1And128BitRC2_CBC 148 #define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids,5L #define SN_pbe_WithSHA1And40BitRC2_CBC "PBE-SHA1-RC2-40" #define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC" #define NID_pbe_WithSHA1And40BitRC2_CBC 149 #define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids,6L #define OBJ_pkcs12_Version1 OBJ_pkcs12,10L #define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1,1L #define LN_keyBag "keyBag" #define NID_keyBag 150 #define OBJ_keyBag OBJ_pkcs12_BagIds,1L #define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag" #define NID_pkcs8ShroudedKeyBag 151 #define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds,2L #define LN_certBag "certBag" #define NID_certBag 152 #define OBJ_certBag OBJ_pkcs12_BagIds,3L #define LN_crlBag "crlBag" #define NID_crlBag 153 #define OBJ_crlBag OBJ_pkcs12_BagIds,4L #define LN_secretBag "secretBag" #define NID_secretBag 154 #define OBJ_secretBag OBJ_pkcs12_BagIds,5L #define LN_safeContentsBag "safeContentsBag" #define NID_safeContentsBag 155 #define OBJ_safeContentsBag OBJ_pkcs12_BagIds,6L #define SN_md2 "MD2" #define LN_md2 "md2" #define NID_md2 3 #define OBJ_md2 OBJ_rsadsi,2L,2L #define SN_md4 "MD4" #define LN_md4 "md4" #define NID_md4 257 #define OBJ_md4 OBJ_rsadsi,2L,4L #define SN_md5 "MD5" #define LN_md5 "md5" #define NID_md5 4 #define OBJ_md5 OBJ_rsadsi,2L,5L #define SN_md5_sha1 "MD5-SHA1" #define LN_md5_sha1 "md5-sha1" #define NID_md5_sha1 114 #define LN_hmacWithMD5 "hmacWithMD5" #define NID_hmacWithMD5 797 #define OBJ_hmacWithMD5 OBJ_rsadsi,2L,6L #define LN_hmacWithSHA1 "hmacWithSHA1" #define NID_hmacWithSHA1 163 #define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L #define SN_sm2 "SM2" #define LN_sm2 "sm2" #define NID_sm2 1172 #define OBJ_sm2 OBJ_sm_scheme,301L #define SN_sm3 "SM3" #define LN_sm3 "sm3" #define NID_sm3 1143 #define OBJ_sm3 OBJ_sm_scheme,401L #define SN_sm3WithRSAEncryption "RSA-SM3" #define LN_sm3WithRSAEncryption "sm3WithRSAEncryption" #define NID_sm3WithRSAEncryption 1144 #define OBJ_sm3WithRSAEncryption OBJ_sm_scheme,504L #define LN_hmacWithSHA224 "hmacWithSHA224" #define NID_hmacWithSHA224 798 #define OBJ_hmacWithSHA224 OBJ_rsadsi,2L,8L #define LN_hmacWithSHA256 "hmacWithSHA256" #define NID_hmacWithSHA256 799 #define OBJ_hmacWithSHA256 OBJ_rsadsi,2L,9L #define LN_hmacWithSHA384 "hmacWithSHA384" #define NID_hmacWithSHA384 800 #define OBJ_hmacWithSHA384 OBJ_rsadsi,2L,10L #define LN_hmacWithSHA512 "hmacWithSHA512" #define NID_hmacWithSHA512 801 #define OBJ_hmacWithSHA512 OBJ_rsadsi,2L,11L #define LN_hmacWithSHA512_224 "hmacWithSHA512-224" #define NID_hmacWithSHA512_224 1193 #define OBJ_hmacWithSHA512_224 OBJ_rsadsi,2L,12L #define LN_hmacWithSHA512_256 "hmacWithSHA512-256" #define NID_hmacWithSHA512_256 1194 #define OBJ_hmacWithSHA512_256 OBJ_rsadsi,2L,13L #define SN_rc2_cbc "RC2-CBC" #define LN_rc2_cbc "rc2-cbc" #define NID_rc2_cbc 37 #define OBJ_rc2_cbc OBJ_rsadsi,3L,2L #define SN_rc2_ecb "RC2-ECB" #define LN_rc2_ecb "rc2-ecb" #define NID_rc2_ecb 38 #define SN_rc2_cfb64 "RC2-CFB" #define LN_rc2_cfb64 "rc2-cfb" #define NID_rc2_cfb64 39 #define SN_rc2_ofb64 "RC2-OFB" #define LN_rc2_ofb64 "rc2-ofb" #define NID_rc2_ofb64 40 #define SN_rc2_40_cbc "RC2-40-CBC" #define LN_rc2_40_cbc "rc2-40-cbc" #define NID_rc2_40_cbc 98 #define SN_rc2_64_cbc "RC2-64-CBC" #define LN_rc2_64_cbc "rc2-64-cbc" #define NID_rc2_64_cbc 166 #define SN_rc4 "RC4" #define LN_rc4 "rc4" #define NID_rc4 5 #define OBJ_rc4 OBJ_rsadsi,3L,4L #define SN_rc4_40 "RC4-40" #define LN_rc4_40 "rc4-40" #define NID_rc4_40 97 #define SN_des_ede3_cbc "DES-EDE3-CBC" #define LN_des_ede3_cbc "des-ede3-cbc" #define NID_des_ede3_cbc 44 #define OBJ_des_ede3_cbc OBJ_rsadsi,3L,7L #define SN_rc5_cbc "RC5-CBC" #define LN_rc5_cbc "rc5-cbc" #define NID_rc5_cbc 120 #define OBJ_rc5_cbc OBJ_rsadsi,3L,8L #define SN_rc5_ecb "RC5-ECB" #define LN_rc5_ecb "rc5-ecb" #define NID_rc5_ecb 121 #define SN_rc5_cfb64 "RC5-CFB" #define LN_rc5_cfb64 "rc5-cfb" #define NID_rc5_cfb64 122 #define SN_rc5_ofb64 "RC5-OFB" #define LN_rc5_ofb64 "rc5-ofb" #define NID_rc5_ofb64 123 #define SN_ms_ext_req "msExtReq" #define LN_ms_ext_req "Microsoft Extension Request" #define NID_ms_ext_req 171 #define OBJ_ms_ext_req 1L,3L,6L,1L,4L,1L,311L,2L,1L,14L #define SN_ms_code_ind "msCodeInd" #define LN_ms_code_ind "Microsoft Individual Code Signing" #define NID_ms_code_ind 134 #define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L #define SN_ms_code_com "msCodeCom" #define LN_ms_code_com "Microsoft Commercial Code Signing" #define NID_ms_code_com 135 #define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L #define SN_ms_ctl_sign "msCTLSign" #define LN_ms_ctl_sign "Microsoft Trust List Signing" #define NID_ms_ctl_sign 136 #define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L #define SN_ms_sgc "msSGC" #define LN_ms_sgc "Microsoft Server Gated Crypto" #define NID_ms_sgc 137 #define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L #define SN_ms_efs "msEFS" #define LN_ms_efs "Microsoft Encrypted File System" #define NID_ms_efs 138 #define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L #define SN_ms_smartcard_login "msSmartcardLogin" #define LN_ms_smartcard_login "Microsoft Smartcard Login" #define NID_ms_smartcard_login 648 #define OBJ_ms_smartcard_login 1L,3L,6L,1L,4L,1L,311L,20L,2L,2L #define SN_ms_upn "msUPN" #define LN_ms_upn "Microsoft User Principal Name" #define NID_ms_upn 649 #define OBJ_ms_upn 1L,3L,6L,1L,4L,1L,311L,20L,2L,3L #define SN_idea_cbc "IDEA-CBC" #define LN_idea_cbc "idea-cbc" #define NID_idea_cbc 34 #define OBJ_idea_cbc 1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L #define SN_idea_ecb "IDEA-ECB" #define LN_idea_ecb "idea-ecb" #define NID_idea_ecb 36 #define SN_idea_cfb64 "IDEA-CFB" #define LN_idea_cfb64 "idea-cfb" #define NID_idea_cfb64 35 #define SN_idea_ofb64 "IDEA-OFB" #define LN_idea_ofb64 "idea-ofb" #define NID_idea_ofb64 46 #define SN_bf_cbc "BF-CBC" #define LN_bf_cbc "bf-cbc" #define NID_bf_cbc 91 #define OBJ_bf_cbc 1L,3L,6L,1L,4L,1L,3029L,1L,2L #define SN_bf_ecb "BF-ECB" #define LN_bf_ecb "bf-ecb" #define NID_bf_ecb 92 #define SN_bf_cfb64 "BF-CFB" #define LN_bf_cfb64 "bf-cfb" #define NID_bf_cfb64 93 #define SN_bf_ofb64 "BF-OFB" #define LN_bf_ofb64 "bf-ofb" #define NID_bf_ofb64 94 #define SN_id_pkix "PKIX" #define NID_id_pkix 127 #define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L #define SN_id_pkix_mod "id-pkix-mod" #define NID_id_pkix_mod 258 #define OBJ_id_pkix_mod OBJ_id_pkix,0L #define SN_id_pe "id-pe" #define NID_id_pe 175 #define OBJ_id_pe OBJ_id_pkix,1L #define SN_id_qt "id-qt" #define NID_id_qt 259 #define OBJ_id_qt OBJ_id_pkix,2L #define SN_id_kp "id-kp" #define NID_id_kp 128 #define OBJ_id_kp OBJ_id_pkix,3L #define SN_id_it "id-it" #define NID_id_it 260 #define OBJ_id_it OBJ_id_pkix,4L #define SN_id_pkip "id-pkip" #define NID_id_pkip 261 #define OBJ_id_pkip OBJ_id_pkix,5L #define SN_id_alg "id-alg" #define NID_id_alg 262 #define OBJ_id_alg OBJ_id_pkix,6L #define SN_id_cmc "id-cmc" #define NID_id_cmc 263 #define OBJ_id_cmc OBJ_id_pkix,7L #define SN_id_on "id-on" #define NID_id_on 264 #define OBJ_id_on OBJ_id_pkix,8L #define SN_id_pda "id-pda" #define NID_id_pda 265 #define OBJ_id_pda OBJ_id_pkix,9L #define SN_id_aca "id-aca" #define NID_id_aca 266 #define OBJ_id_aca OBJ_id_pkix,10L #define SN_id_qcs "id-qcs" #define NID_id_qcs 267 #define OBJ_id_qcs OBJ_id_pkix,11L #define SN_id_cct "id-cct" #define NID_id_cct 268 #define OBJ_id_cct OBJ_id_pkix,12L #define SN_id_ppl "id-ppl" #define NID_id_ppl 662 #define OBJ_id_ppl OBJ_id_pkix,21L #define SN_id_ad "id-ad" #define NID_id_ad 176 #define OBJ_id_ad OBJ_id_pkix,48L #define SN_id_pkix1_explicit_88 "id-pkix1-explicit-88" #define NID_id_pkix1_explicit_88 269 #define OBJ_id_pkix1_explicit_88 OBJ_id_pkix_mod,1L #define SN_id_pkix1_implicit_88 "id-pkix1-implicit-88" #define NID_id_pkix1_implicit_88 270 #define OBJ_id_pkix1_implicit_88 OBJ_id_pkix_mod,2L #define SN_id_pkix1_explicit_93 "id-pkix1-explicit-93" #define NID_id_pkix1_explicit_93 271 #define OBJ_id_pkix1_explicit_93 OBJ_id_pkix_mod,3L #define SN_id_pkix1_implicit_93 "id-pkix1-implicit-93" #define NID_id_pkix1_implicit_93 272 #define OBJ_id_pkix1_implicit_93 OBJ_id_pkix_mod,4L #define SN_id_mod_crmf "id-mod-crmf" #define NID_id_mod_crmf 273 #define OBJ_id_mod_crmf OBJ_id_pkix_mod,5L #define SN_id_mod_cmc "id-mod-cmc" #define NID_id_mod_cmc 274 #define OBJ_id_mod_cmc OBJ_id_pkix_mod,6L #define SN_id_mod_kea_profile_88 "id-mod-kea-profile-88" #define NID_id_mod_kea_profile_88 275 #define OBJ_id_mod_kea_profile_88 OBJ_id_pkix_mod,7L #define SN_id_mod_kea_profile_93 "id-mod-kea-profile-93" #define NID_id_mod_kea_profile_93 276 #define OBJ_id_mod_kea_profile_93 OBJ_id_pkix_mod,8L #define SN_id_mod_cmp "id-mod-cmp" #define NID_id_mod_cmp 277 #define OBJ_id_mod_cmp OBJ_id_pkix_mod,9L #define SN_id_mod_qualified_cert_88 "id-mod-qualified-cert-88" #define NID_id_mod_qualified_cert_88 278 #define OBJ_id_mod_qualified_cert_88 OBJ_id_pkix_mod,10L #define SN_id_mod_qualified_cert_93 "id-mod-qualified-cert-93" #define NID_id_mod_qualified_cert_93 279 #define OBJ_id_mod_qualified_cert_93 OBJ_id_pkix_mod,11L #define SN_id_mod_attribute_cert "id-mod-attribute-cert" #define NID_id_mod_attribute_cert 280 #define OBJ_id_mod_attribute_cert OBJ_id_pkix_mod,12L #define SN_id_mod_timestamp_protocol "id-mod-timestamp-protocol" #define NID_id_mod_timestamp_protocol 281 #define OBJ_id_mod_timestamp_protocol OBJ_id_pkix_mod,13L #define SN_id_mod_ocsp "id-mod-ocsp" #define NID_id_mod_ocsp 282 #define OBJ_id_mod_ocsp OBJ_id_pkix_mod,14L #define SN_id_mod_dvcs "id-mod-dvcs" #define NID_id_mod_dvcs 283 #define OBJ_id_mod_dvcs OBJ_id_pkix_mod,15L #define SN_id_mod_cmp2000 "id-mod-cmp2000" #define NID_id_mod_cmp2000 284 #define OBJ_id_mod_cmp2000 OBJ_id_pkix_mod,16L #define SN_info_access "authorityInfoAccess" #define LN_info_access "Authority Information Access" #define NID_info_access 177 #define OBJ_info_access OBJ_id_pe,1L #define SN_biometricInfo "biometricInfo" #define LN_biometricInfo "Biometric Info" #define NID_biometricInfo 285 #define OBJ_biometricInfo OBJ_id_pe,2L #define SN_qcStatements "qcStatements" #define NID_qcStatements 286 #define OBJ_qcStatements OBJ_id_pe,3L #define SN_ac_auditEntity "ac-auditEntity" #define NID_ac_auditEntity 287 #define OBJ_ac_auditEntity OBJ_id_pe,4L #define SN_ac_targeting "ac-targeting" #define NID_ac_targeting 288 #define OBJ_ac_targeting OBJ_id_pe,5L #define SN_aaControls "aaControls" #define NID_aaControls 289 #define OBJ_aaControls OBJ_id_pe,6L #define SN_sbgp_ipAddrBlock "sbgp-ipAddrBlock" #define NID_sbgp_ipAddrBlock 290 #define OBJ_sbgp_ipAddrBlock OBJ_id_pe,7L #define SN_sbgp_autonomousSysNum "sbgp-autonomousSysNum" #define NID_sbgp_autonomousSysNum 291 #define OBJ_sbgp_autonomousSysNum OBJ_id_pe,8L #define SN_sbgp_routerIdentifier "sbgp-routerIdentifier" #define NID_sbgp_routerIdentifier 292 #define OBJ_sbgp_routerIdentifier OBJ_id_pe,9L #define SN_ac_proxying "ac-proxying" #define NID_ac_proxying 397 #define OBJ_ac_proxying OBJ_id_pe,10L #define SN_sinfo_access "subjectInfoAccess" #define LN_sinfo_access "Subject Information Access" #define NID_sinfo_access 398 #define OBJ_sinfo_access OBJ_id_pe,11L #define SN_proxyCertInfo "proxyCertInfo" #define LN_proxyCertInfo "Proxy Certificate Information" #define NID_proxyCertInfo 663 #define OBJ_proxyCertInfo OBJ_id_pe,14L #define SN_tlsfeature "tlsfeature" #define LN_tlsfeature "TLS Feature" #define NID_tlsfeature 1020 #define OBJ_tlsfeature OBJ_id_pe,24L #define SN_id_qt_cps "id-qt-cps" #define LN_id_qt_cps "Policy Qualifier CPS" #define NID_id_qt_cps 164 #define OBJ_id_qt_cps OBJ_id_qt,1L #define SN_id_qt_unotice "id-qt-unotice" #define LN_id_qt_unotice "Policy Qualifier User Notice" #define NID_id_qt_unotice 165 #define OBJ_id_qt_unotice OBJ_id_qt,2L #define SN_textNotice "textNotice" #define NID_textNotice 293 #define OBJ_textNotice OBJ_id_qt,3L #define SN_server_auth "serverAuth" #define LN_server_auth "TLS Web Server Authentication" #define NID_server_auth 129 #define OBJ_server_auth OBJ_id_kp,1L #define SN_client_auth "clientAuth" #define LN_client_auth "TLS Web Client Authentication" #define NID_client_auth 130 #define OBJ_client_auth OBJ_id_kp,2L #define SN_code_sign "codeSigning" #define LN_code_sign "Code Signing" #define NID_code_sign 131 #define OBJ_code_sign OBJ_id_kp,3L #define SN_email_protect "emailProtection" #define LN_email_protect "E-mail Protection" #define NID_email_protect 132 #define OBJ_email_protect OBJ_id_kp,4L #define SN_ipsecEndSystem "ipsecEndSystem" #define LN_ipsecEndSystem "IPSec End System" #define NID_ipsecEndSystem 294 #define OBJ_ipsecEndSystem OBJ_id_kp,5L #define SN_ipsecTunnel "ipsecTunnel" #define LN_ipsecTunnel "IPSec Tunnel" #define NID_ipsecTunnel 295 #define OBJ_ipsecTunnel OBJ_id_kp,6L #define SN_ipsecUser "ipsecUser" #define LN_ipsecUser "IPSec User" #define NID_ipsecUser 296 #define OBJ_ipsecUser OBJ_id_kp,7L #define SN_time_stamp "timeStamping" #define LN_time_stamp "Time Stamping" #define NID_time_stamp 133 #define OBJ_time_stamp OBJ_id_kp,8L #define SN_OCSP_sign "OCSPSigning" #define LN_OCSP_sign "OCSP Signing" #define NID_OCSP_sign 180 #define OBJ_OCSP_sign OBJ_id_kp,9L #define SN_dvcs "DVCS" #define LN_dvcs "dvcs" #define NID_dvcs 297 #define OBJ_dvcs OBJ_id_kp,10L #define SN_ipsec_IKE "ipsecIKE" #define LN_ipsec_IKE "ipsec Internet Key Exchange" #define NID_ipsec_IKE 1022 #define OBJ_ipsec_IKE OBJ_id_kp,17L #define SN_capwapAC "capwapAC" #define LN_capwapAC "Ctrl/provision WAP Access" #define NID_capwapAC 1023 #define OBJ_capwapAC OBJ_id_kp,18L #define SN_capwapWTP "capwapWTP" #define LN_capwapWTP "Ctrl/Provision WAP Termination" #define NID_capwapWTP 1024 #define OBJ_capwapWTP OBJ_id_kp,19L #define SN_sshClient "secureShellClient" #define LN_sshClient "SSH Client" #define NID_sshClient 1025 #define OBJ_sshClient OBJ_id_kp,21L #define SN_sshServer "secureShellServer" #define LN_sshServer "SSH Server" #define NID_sshServer 1026 #define OBJ_sshServer OBJ_id_kp,22L #define SN_sendRouter "sendRouter" #define LN_sendRouter "Send Router" #define NID_sendRouter 1027 #define OBJ_sendRouter OBJ_id_kp,23L #define SN_sendProxiedRouter "sendProxiedRouter" #define LN_sendProxiedRouter "Send Proxied Router" #define NID_sendProxiedRouter 1028 #define OBJ_sendProxiedRouter OBJ_id_kp,24L #define SN_sendOwner "sendOwner" #define LN_sendOwner "Send Owner" #define NID_sendOwner 1029 #define OBJ_sendOwner OBJ_id_kp,25L #define SN_sendProxiedOwner "sendProxiedOwner" #define LN_sendProxiedOwner "Send Proxied Owner" #define NID_sendProxiedOwner 1030 #define OBJ_sendProxiedOwner OBJ_id_kp,26L #define SN_cmcCA "cmcCA" #define LN_cmcCA "CMC Certificate Authority" #define NID_cmcCA 1131 #define OBJ_cmcCA OBJ_id_kp,27L #define SN_cmcRA "cmcRA" #define LN_cmcRA "CMC Registration Authority" #define NID_cmcRA 1132 #define OBJ_cmcRA OBJ_id_kp,28L #define SN_id_it_caProtEncCert "id-it-caProtEncCert" #define NID_id_it_caProtEncCert 298 #define OBJ_id_it_caProtEncCert OBJ_id_it,1L #define SN_id_it_signKeyPairTypes "id-it-signKeyPairTypes" #define NID_id_it_signKeyPairTypes 299 #define OBJ_id_it_signKeyPairTypes OBJ_id_it,2L #define SN_id_it_encKeyPairTypes "id-it-encKeyPairTypes" #define NID_id_it_encKeyPairTypes 300 #define OBJ_id_it_encKeyPairTypes OBJ_id_it,3L #define SN_id_it_preferredSymmAlg "id-it-preferredSymmAlg" #define NID_id_it_preferredSymmAlg 301 #define OBJ_id_it_preferredSymmAlg OBJ_id_it,4L #define SN_id_it_caKeyUpdateInfo "id-it-caKeyUpdateInfo" #define NID_id_it_caKeyUpdateInfo 302 #define OBJ_id_it_caKeyUpdateInfo OBJ_id_it,5L #define SN_id_it_currentCRL "id-it-currentCRL" #define NID_id_it_currentCRL 303 #define OBJ_id_it_currentCRL OBJ_id_it,6L #define SN_id_it_unsupportedOIDs "id-it-unsupportedOIDs" #define NID_id_it_unsupportedOIDs 304 #define OBJ_id_it_unsupportedOIDs OBJ_id_it,7L #define SN_id_it_subscriptionRequest "id-it-subscriptionRequest" #define NID_id_it_subscriptionRequest 305 #define OBJ_id_it_subscriptionRequest OBJ_id_it,8L #define SN_id_it_subscriptionResponse "id-it-subscriptionResponse" #define NID_id_it_subscriptionResponse 306 #define OBJ_id_it_subscriptionResponse OBJ_id_it,9L #define SN_id_it_keyPairParamReq "id-it-keyPairParamReq" #define NID_id_it_keyPairParamReq 307 #define OBJ_id_it_keyPairParamReq OBJ_id_it,10L #define SN_id_it_keyPairParamRep "id-it-keyPairParamRep" #define NID_id_it_keyPairParamRep 308 #define OBJ_id_it_keyPairParamRep OBJ_id_it,11L #define SN_id_it_revPassphrase "id-it-revPassphrase" #define NID_id_it_revPassphrase 309 #define OBJ_id_it_revPassphrase OBJ_id_it,12L #define SN_id_it_implicitConfirm "id-it-implicitConfirm" #define NID_id_it_implicitConfirm 310 #define OBJ_id_it_implicitConfirm OBJ_id_it,13L #define SN_id_it_confirmWaitTime "id-it-confirmWaitTime" #define NID_id_it_confirmWaitTime 311 #define OBJ_id_it_confirmWaitTime OBJ_id_it,14L #define SN_id_it_origPKIMessage "id-it-origPKIMessage" #define NID_id_it_origPKIMessage 312 #define OBJ_id_it_origPKIMessage OBJ_id_it,15L #define SN_id_it_suppLangTags "id-it-suppLangTags" #define NID_id_it_suppLangTags 784 #define OBJ_id_it_suppLangTags OBJ_id_it,16L #define SN_id_regCtrl "id-regCtrl" #define NID_id_regCtrl 313 #define OBJ_id_regCtrl OBJ_id_pkip,1L #define SN_id_regInfo "id-regInfo" #define NID_id_regInfo 314 #define OBJ_id_regInfo OBJ_id_pkip,2L #define SN_id_regCtrl_regToken "id-regCtrl-regToken" #define NID_id_regCtrl_regToken 315 #define OBJ_id_regCtrl_regToken OBJ_id_regCtrl,1L #define SN_id_regCtrl_authenticator "id-regCtrl-authenticator" #define NID_id_regCtrl_authenticator 316 #define OBJ_id_regCtrl_authenticator OBJ_id_regCtrl,2L #define SN_id_regCtrl_pkiPublicationInfo "id-regCtrl-pkiPublicationInfo" #define NID_id_regCtrl_pkiPublicationInfo 317 #define OBJ_id_regCtrl_pkiPublicationInfo OBJ_id_regCtrl,3L #define SN_id_regCtrl_pkiArchiveOptions "id-regCtrl-pkiArchiveOptions" #define NID_id_regCtrl_pkiArchiveOptions 318 #define OBJ_id_regCtrl_pkiArchiveOptions OBJ_id_regCtrl,4L #define SN_id_regCtrl_oldCertID "id-regCtrl-oldCertID" #define NID_id_regCtrl_oldCertID 319 #define OBJ_id_regCtrl_oldCertID OBJ_id_regCtrl,5L #define SN_id_regCtrl_protocolEncrKey "id-regCtrl-protocolEncrKey" #define NID_id_regCtrl_protocolEncrKey 320 #define OBJ_id_regCtrl_protocolEncrKey OBJ_id_regCtrl,6L #define SN_id_regInfo_utf8Pairs "id-regInfo-utf8Pairs" #define NID_id_regInfo_utf8Pairs 321 #define OBJ_id_regInfo_utf8Pairs OBJ_id_regInfo,1L #define SN_id_regInfo_certReq "id-regInfo-certReq" #define NID_id_regInfo_certReq 322 #define OBJ_id_regInfo_certReq OBJ_id_regInfo,2L #define SN_id_alg_des40 "id-alg-des40" #define NID_id_alg_des40 323 #define OBJ_id_alg_des40 OBJ_id_alg,1L #define SN_id_alg_noSignature "id-alg-noSignature" #define NID_id_alg_noSignature 324 #define OBJ_id_alg_noSignature OBJ_id_alg,2L #define SN_id_alg_dh_sig_hmac_sha1 "id-alg-dh-sig-hmac-sha1" #define NID_id_alg_dh_sig_hmac_sha1 325 #define OBJ_id_alg_dh_sig_hmac_sha1 OBJ_id_alg,3L #define SN_id_alg_dh_pop "id-alg-dh-pop" #define NID_id_alg_dh_pop 326 #define OBJ_id_alg_dh_pop OBJ_id_alg,4L #define SN_id_cmc_statusInfo "id-cmc-statusInfo" #define NID_id_cmc_statusInfo 327 #define OBJ_id_cmc_statusInfo OBJ_id_cmc,1L #define SN_id_cmc_identification "id-cmc-identification" #define NID_id_cmc_identification 328 #define OBJ_id_cmc_identification OBJ_id_cmc,2L #define SN_id_cmc_identityProof "id-cmc-identityProof" #define NID_id_cmc_identityProof 329 #define OBJ_id_cmc_identityProof OBJ_id_cmc,3L #define SN_id_cmc_dataReturn "id-cmc-dataReturn" #define NID_id_cmc_dataReturn 330 #define OBJ_id_cmc_dataReturn OBJ_id_cmc,4L #define SN_id_cmc_transactionId "id-cmc-transactionId" #define NID_id_cmc_transactionId 331 #define OBJ_id_cmc_transactionId OBJ_id_cmc,5L #define SN_id_cmc_senderNonce "id-cmc-senderNonce" #define NID_id_cmc_senderNonce 332 #define OBJ_id_cmc_senderNonce OBJ_id_cmc,6L #define SN_id_cmc_recipientNonce "id-cmc-recipientNonce" #define NID_id_cmc_recipientNonce 333 #define OBJ_id_cmc_recipientNonce OBJ_id_cmc,7L #define SN_id_cmc_addExtensions "id-cmc-addExtensions" #define NID_id_cmc_addExtensions 334 #define OBJ_id_cmc_addExtensions OBJ_id_cmc,8L #define SN_id_cmc_encryptedPOP "id-cmc-encryptedPOP" #define NID_id_cmc_encryptedPOP 335 #define OBJ_id_cmc_encryptedPOP OBJ_id_cmc,9L #define SN_id_cmc_decryptedPOP "id-cmc-decryptedPOP" #define NID_id_cmc_decryptedPOP 336 #define OBJ_id_cmc_decryptedPOP OBJ_id_cmc,10L #define SN_id_cmc_lraPOPWitness "id-cmc-lraPOPWitness" #define NID_id_cmc_lraPOPWitness 337 #define OBJ_id_cmc_lraPOPWitness OBJ_id_cmc,11L #define SN_id_cmc_getCert "id-cmc-getCert" #define NID_id_cmc_getCert 338 #define OBJ_id_cmc_getCert OBJ_id_cmc,15L #define SN_id_cmc_getCRL "id-cmc-getCRL" #define NID_id_cmc_getCRL 339 #define OBJ_id_cmc_getCRL OBJ_id_cmc,16L #define SN_id_cmc_revokeRequest "id-cmc-revokeRequest" #define NID_id_cmc_revokeRequest 340 #define OBJ_id_cmc_revokeRequest OBJ_id_cmc,17L #define SN_id_cmc_regInfo "id-cmc-regInfo" #define NID_id_cmc_regInfo 341 #define OBJ_id_cmc_regInfo OBJ_id_cmc,18L #define SN_id_cmc_responseInfo "id-cmc-responseInfo" #define NID_id_cmc_responseInfo 342 #define OBJ_id_cmc_responseInfo OBJ_id_cmc,19L #define SN_id_cmc_queryPending "id-cmc-queryPending" #define NID_id_cmc_queryPending 343 #define OBJ_id_cmc_queryPending OBJ_id_cmc,21L #define SN_id_cmc_popLinkRandom "id-cmc-popLinkRandom" #define NID_id_cmc_popLinkRandom 344 #define OBJ_id_cmc_popLinkRandom OBJ_id_cmc,22L #define SN_id_cmc_popLinkWitness "id-cmc-popLinkWitness" #define NID_id_cmc_popLinkWitness 345 #define OBJ_id_cmc_popLinkWitness OBJ_id_cmc,23L #define SN_id_cmc_confirmCertAcceptance "id-cmc-confirmCertAcceptance" #define NID_id_cmc_confirmCertAcceptance 346 #define OBJ_id_cmc_confirmCertAcceptance OBJ_id_cmc,24L #define SN_id_on_personalData "id-on-personalData" #define NID_id_on_personalData 347 #define OBJ_id_on_personalData OBJ_id_on,1L #define SN_id_on_permanentIdentifier "id-on-permanentIdentifier" #define LN_id_on_permanentIdentifier "Permanent Identifier" #define NID_id_on_permanentIdentifier 858 #define OBJ_id_on_permanentIdentifier OBJ_id_on,3L #define SN_id_pda_dateOfBirth "id-pda-dateOfBirth" #define NID_id_pda_dateOfBirth 348 #define OBJ_id_pda_dateOfBirth OBJ_id_pda,1L #define SN_id_pda_placeOfBirth "id-pda-placeOfBirth" #define NID_id_pda_placeOfBirth 349 #define OBJ_id_pda_placeOfBirth OBJ_id_pda,2L #define SN_id_pda_gender "id-pda-gender" #define NID_id_pda_gender 351 #define OBJ_id_pda_gender OBJ_id_pda,3L #define SN_id_pda_countryOfCitizenship "id-pda-countryOfCitizenship" #define NID_id_pda_countryOfCitizenship 352 #define OBJ_id_pda_countryOfCitizenship OBJ_id_pda,4L #define SN_id_pda_countryOfResidence "id-pda-countryOfResidence" #define NID_id_pda_countryOfResidence 353 #define OBJ_id_pda_countryOfResidence OBJ_id_pda,5L #define SN_id_aca_authenticationInfo "id-aca-authenticationInfo" #define NID_id_aca_authenticationInfo 354 #define OBJ_id_aca_authenticationInfo OBJ_id_aca,1L #define SN_id_aca_accessIdentity "id-aca-accessIdentity" #define NID_id_aca_accessIdentity 355 #define OBJ_id_aca_accessIdentity OBJ_id_aca,2L #define SN_id_aca_chargingIdentity "id-aca-chargingIdentity" #define NID_id_aca_chargingIdentity 356 #define OBJ_id_aca_chargingIdentity OBJ_id_aca,3L #define SN_id_aca_group "id-aca-group" #define NID_id_aca_group 357 #define OBJ_id_aca_group OBJ_id_aca,4L #define SN_id_aca_role "id-aca-role" #define NID_id_aca_role 358 #define OBJ_id_aca_role OBJ_id_aca,5L #define SN_id_aca_encAttrs "id-aca-encAttrs" #define NID_id_aca_encAttrs 399 #define OBJ_id_aca_encAttrs OBJ_id_aca,6L #define SN_id_qcs_pkixQCSyntax_v1 "id-qcs-pkixQCSyntax-v1" #define NID_id_qcs_pkixQCSyntax_v1 359 #define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L #define SN_id_cct_crs "id-cct-crs" #define NID_id_cct_crs 360 #define OBJ_id_cct_crs OBJ_id_cct,1L #define SN_id_cct_PKIData "id-cct-PKIData" #define NID_id_cct_PKIData 361 #define OBJ_id_cct_PKIData OBJ_id_cct,2L #define SN_id_cct_PKIResponse "id-cct-PKIResponse" #define NID_id_cct_PKIResponse 362 #define OBJ_id_cct_PKIResponse OBJ_id_cct,3L #define SN_id_ppl_anyLanguage "id-ppl-anyLanguage" #define LN_id_ppl_anyLanguage "Any language" #define NID_id_ppl_anyLanguage 664 #define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L #define SN_id_ppl_inheritAll "id-ppl-inheritAll" #define LN_id_ppl_inheritAll "Inherit all" #define NID_id_ppl_inheritAll 665 #define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L #define SN_Independent "id-ppl-independent" #define LN_Independent "Independent" #define NID_Independent 667 #define OBJ_Independent OBJ_id_ppl,2L #define SN_ad_OCSP "OCSP" #define LN_ad_OCSP "OCSP" #define NID_ad_OCSP 178 #define OBJ_ad_OCSP OBJ_id_ad,1L #define SN_ad_ca_issuers "caIssuers" #define LN_ad_ca_issuers "CA Issuers" #define NID_ad_ca_issuers 179 #define OBJ_ad_ca_issuers OBJ_id_ad,2L #define SN_ad_timeStamping "ad_timestamping" #define LN_ad_timeStamping "AD Time Stamping" #define NID_ad_timeStamping 363 #define OBJ_ad_timeStamping OBJ_id_ad,3L #define SN_ad_dvcs "AD_DVCS" #define LN_ad_dvcs "ad dvcs" #define NID_ad_dvcs 364 #define OBJ_ad_dvcs OBJ_id_ad,4L #define SN_caRepository "caRepository" #define LN_caRepository "CA Repository" #define NID_caRepository 785 #define OBJ_caRepository OBJ_id_ad,5L #define OBJ_id_pkix_OCSP OBJ_ad_OCSP #define SN_id_pkix_OCSP_basic "basicOCSPResponse" #define LN_id_pkix_OCSP_basic "Basic OCSP Response" #define NID_id_pkix_OCSP_basic 365 #define OBJ_id_pkix_OCSP_basic OBJ_id_pkix_OCSP,1L #define SN_id_pkix_OCSP_Nonce "Nonce" #define LN_id_pkix_OCSP_Nonce "OCSP Nonce" #define NID_id_pkix_OCSP_Nonce 366 #define OBJ_id_pkix_OCSP_Nonce OBJ_id_pkix_OCSP,2L #define SN_id_pkix_OCSP_CrlID "CrlID" #define LN_id_pkix_OCSP_CrlID "OCSP CRL ID" #define NID_id_pkix_OCSP_CrlID 367 #define OBJ_id_pkix_OCSP_CrlID OBJ_id_pkix_OCSP,3L #define SN_id_pkix_OCSP_acceptableResponses "acceptableResponses" #define LN_id_pkix_OCSP_acceptableResponses "Acceptable OCSP Responses" #define NID_id_pkix_OCSP_acceptableResponses 368 #define OBJ_id_pkix_OCSP_acceptableResponses OBJ_id_pkix_OCSP,4L #define SN_id_pkix_OCSP_noCheck "noCheck" #define LN_id_pkix_OCSP_noCheck "OCSP No Check" #define NID_id_pkix_OCSP_noCheck 369 #define OBJ_id_pkix_OCSP_noCheck OBJ_id_pkix_OCSP,5L #define SN_id_pkix_OCSP_archiveCutoff "archiveCutoff" #define LN_id_pkix_OCSP_archiveCutoff "OCSP Archive Cutoff" #define NID_id_pkix_OCSP_archiveCutoff 370 #define OBJ_id_pkix_OCSP_archiveCutoff OBJ_id_pkix_OCSP,6L #define SN_id_pkix_OCSP_serviceLocator "serviceLocator" #define LN_id_pkix_OCSP_serviceLocator "OCSP Service Locator" #define NID_id_pkix_OCSP_serviceLocator 371 #define OBJ_id_pkix_OCSP_serviceLocator OBJ_id_pkix_OCSP,7L #define SN_id_pkix_OCSP_extendedStatus "extendedStatus" #define LN_id_pkix_OCSP_extendedStatus "Extended OCSP Status" #define NID_id_pkix_OCSP_extendedStatus 372 #define OBJ_id_pkix_OCSP_extendedStatus OBJ_id_pkix_OCSP,8L #define SN_id_pkix_OCSP_valid "valid" #define NID_id_pkix_OCSP_valid 373 #define OBJ_id_pkix_OCSP_valid OBJ_id_pkix_OCSP,9L #define SN_id_pkix_OCSP_path "path" #define NID_id_pkix_OCSP_path 374 #define OBJ_id_pkix_OCSP_path OBJ_id_pkix_OCSP,10L #define SN_id_pkix_OCSP_trustRoot "trustRoot" #define LN_id_pkix_OCSP_trustRoot "Trust Root" #define NID_id_pkix_OCSP_trustRoot 375 #define OBJ_id_pkix_OCSP_trustRoot OBJ_id_pkix_OCSP,11L #define SN_algorithm "algorithm" #define LN_algorithm "algorithm" #define NID_algorithm 376 #define OBJ_algorithm 1L,3L,14L,3L,2L #define SN_md5WithRSA "RSA-NP-MD5" #define LN_md5WithRSA "md5WithRSA" #define NID_md5WithRSA 104 #define OBJ_md5WithRSA OBJ_algorithm,3L #define SN_des_ecb "DES-ECB" #define LN_des_ecb "des-ecb" #define NID_des_ecb 29 #define OBJ_des_ecb OBJ_algorithm,6L #define SN_des_cbc "DES-CBC" #define LN_des_cbc "des-cbc" #define NID_des_cbc 31 #define OBJ_des_cbc OBJ_algorithm,7L #define SN_des_ofb64 "DES-OFB" #define LN_des_ofb64 "des-ofb" #define NID_des_ofb64 45 #define OBJ_des_ofb64 OBJ_algorithm,8L #define SN_des_cfb64 "DES-CFB" #define LN_des_cfb64 "des-cfb" #define NID_des_cfb64 30 #define OBJ_des_cfb64 OBJ_algorithm,9L #define SN_rsaSignature "rsaSignature" #define NID_rsaSignature 377 #define OBJ_rsaSignature OBJ_algorithm,11L #define SN_dsa_2 "DSA-old" #define LN_dsa_2 "dsaEncryption-old" #define NID_dsa_2 67 #define OBJ_dsa_2 OBJ_algorithm,12L #define SN_dsaWithSHA "DSA-SHA" #define LN_dsaWithSHA "dsaWithSHA" #define NID_dsaWithSHA 66 #define OBJ_dsaWithSHA OBJ_algorithm,13L #define SN_shaWithRSAEncryption "RSA-SHA" #define LN_shaWithRSAEncryption "shaWithRSAEncryption" #define NID_shaWithRSAEncryption 42 #define OBJ_shaWithRSAEncryption OBJ_algorithm,15L #define SN_des_ede_ecb "DES-EDE" #define LN_des_ede_ecb "des-ede" #define NID_des_ede_ecb 32 #define OBJ_des_ede_ecb OBJ_algorithm,17L #define SN_des_ede3_ecb "DES-EDE3" #define LN_des_ede3_ecb "des-ede3" #define NID_des_ede3_ecb 33 #define SN_des_ede_cbc "DES-EDE-CBC" #define LN_des_ede_cbc "des-ede-cbc" #define NID_des_ede_cbc 43 #define SN_des_ede_cfb64 "DES-EDE-CFB" #define LN_des_ede_cfb64 "des-ede-cfb" #define NID_des_ede_cfb64 60 #define SN_des_ede3_cfb64 "DES-EDE3-CFB" #define LN_des_ede3_cfb64 "des-ede3-cfb" #define NID_des_ede3_cfb64 61 #define SN_des_ede_ofb64 "DES-EDE-OFB" #define LN_des_ede_ofb64 "des-ede-ofb" #define NID_des_ede_ofb64 62 #define SN_des_ede3_ofb64 "DES-EDE3-OFB" #define LN_des_ede3_ofb64 "des-ede3-ofb" #define NID_des_ede3_ofb64 63 #define SN_desx_cbc "DESX-CBC" #define LN_desx_cbc "desx-cbc" #define NID_desx_cbc 80 #define SN_sha "SHA" #define LN_sha "sha" #define NID_sha 41 #define OBJ_sha OBJ_algorithm,18L #define SN_sha1 "SHA1" #define LN_sha1 "sha1" #define NID_sha1 64 #define OBJ_sha1 OBJ_algorithm,26L #define SN_dsaWithSHA1_2 "DSA-SHA1-old" #define LN_dsaWithSHA1_2 "dsaWithSHA1-old" #define NID_dsaWithSHA1_2 70 #define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L #define SN_sha1WithRSA "RSA-SHA1-2" #define LN_sha1WithRSA "sha1WithRSA" #define NID_sha1WithRSA 115 #define OBJ_sha1WithRSA OBJ_algorithm,29L #define SN_ripemd160 "RIPEMD160" #define LN_ripemd160 "ripemd160" #define NID_ripemd160 117 #define OBJ_ripemd160 1L,3L,36L,3L,2L,1L #define SN_ripemd160WithRSA "RSA-RIPEMD160" #define LN_ripemd160WithRSA "ripemd160WithRSA" #define NID_ripemd160WithRSA 119 #define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L #define SN_blake2b512 "BLAKE2b512" #define LN_blake2b512 "blake2b512" #define NID_blake2b512 1056 #define OBJ_blake2b512 1L,3L,6L,1L,4L,1L,1722L,12L,2L,1L,16L #define SN_blake2s256 "BLAKE2s256" #define LN_blake2s256 "blake2s256" #define NID_blake2s256 1057 #define OBJ_blake2s256 1L,3L,6L,1L,4L,1L,1722L,12L,2L,2L,8L #define SN_sxnet "SXNetID" #define LN_sxnet "Strong Extranet ID" #define NID_sxnet 143 #define OBJ_sxnet 1L,3L,101L,1L,4L,1L #define SN_X500 "X500" #define LN_X500 "directory services (X.500)" #define NID_X500 11 #define OBJ_X500 2L,5L #define SN_X509 "X509" #define NID_X509 12 #define OBJ_X509 OBJ_X500,4L #define SN_commonName "CN" #define LN_commonName "commonName" #define NID_commonName 13 #define OBJ_commonName OBJ_X509,3L #define SN_surname "SN" #define LN_surname "surname" #define NID_surname 100 #define OBJ_surname OBJ_X509,4L #define LN_serialNumber "serialNumber" #define NID_serialNumber 105 #define OBJ_serialNumber OBJ_X509,5L #define SN_countryName "C" #define LN_countryName "countryName" #define NID_countryName 14 #define OBJ_countryName OBJ_X509,6L #define SN_localityName "L" #define LN_localityName "localityName" #define NID_localityName 15 #define OBJ_localityName OBJ_X509,7L #define SN_stateOrProvinceName "ST" #define LN_stateOrProvinceName "stateOrProvinceName" #define NID_stateOrProvinceName 16 #define OBJ_stateOrProvinceName OBJ_X509,8L #define SN_streetAddress "street" #define LN_streetAddress "streetAddress" #define NID_streetAddress 660 #define OBJ_streetAddress OBJ_X509,9L #define SN_organizationName "O" #define LN_organizationName "organizationName" #define NID_organizationName 17 #define OBJ_organizationName OBJ_X509,10L #define SN_organizationalUnitName "OU" #define LN_organizationalUnitName "organizationalUnitName" #define NID_organizationalUnitName 18 #define OBJ_organizationalUnitName OBJ_X509,11L #define SN_title "title" #define LN_title "title" #define NID_title 106 #define OBJ_title OBJ_X509,12L #define LN_description "description" #define NID_description 107 #define OBJ_description OBJ_X509,13L #define LN_searchGuide "searchGuide" #define NID_searchGuide 859 #define OBJ_searchGuide OBJ_X509,14L #define LN_businessCategory "businessCategory" #define NID_businessCategory 860 #define OBJ_businessCategory OBJ_X509,15L #define LN_postalAddress "postalAddress" #define NID_postalAddress 861 #define OBJ_postalAddress OBJ_X509,16L #define LN_postalCode "postalCode" #define NID_postalCode 661 #define OBJ_postalCode OBJ_X509,17L #define LN_postOfficeBox "postOfficeBox" #define NID_postOfficeBox 862 #define OBJ_postOfficeBox OBJ_X509,18L #define LN_physicalDeliveryOfficeName "physicalDeliveryOfficeName" #define NID_physicalDeliveryOfficeName 863 #define OBJ_physicalDeliveryOfficeName OBJ_X509,19L #define LN_telephoneNumber "telephoneNumber" #define NID_telephoneNumber 864 #define OBJ_telephoneNumber OBJ_X509,20L #define LN_telexNumber "telexNumber" #define NID_telexNumber 865 #define OBJ_telexNumber OBJ_X509,21L #define LN_teletexTerminalIdentifier "teletexTerminalIdentifier" #define NID_teletexTerminalIdentifier 866 #define OBJ_teletexTerminalIdentifier OBJ_X509,22L #define LN_facsimileTelephoneNumber "facsimileTelephoneNumber" #define NID_facsimileTelephoneNumber 867 #define OBJ_facsimileTelephoneNumber OBJ_X509,23L #define LN_x121Address "x121Address" #define NID_x121Address 868 #define OBJ_x121Address OBJ_X509,24L #define LN_internationaliSDNNumber "internationaliSDNNumber" #define NID_internationaliSDNNumber 869 #define OBJ_internationaliSDNNumber OBJ_X509,25L #define LN_registeredAddress "registeredAddress" #define NID_registeredAddress 870 #define OBJ_registeredAddress OBJ_X509,26L #define LN_destinationIndicator "destinationIndicator" #define NID_destinationIndicator 871 #define OBJ_destinationIndicator OBJ_X509,27L #define LN_preferredDeliveryMethod "preferredDeliveryMethod" #define NID_preferredDeliveryMethod 872 #define OBJ_preferredDeliveryMethod OBJ_X509,28L #define LN_presentationAddress "presentationAddress" #define NID_presentationAddress 873 #define OBJ_presentationAddress OBJ_X509,29L #define LN_supportedApplicationContext "supportedApplicationContext" #define NID_supportedApplicationContext 874 #define OBJ_supportedApplicationContext OBJ_X509,30L #define SN_member "member" #define NID_member 875 #define OBJ_member OBJ_X509,31L #define SN_owner "owner" #define NID_owner 876 #define OBJ_owner OBJ_X509,32L #define LN_roleOccupant "roleOccupant" #define NID_roleOccupant 877 #define OBJ_roleOccupant OBJ_X509,33L #define SN_seeAlso "seeAlso" #define NID_seeAlso 878 #define OBJ_seeAlso OBJ_X509,34L #define LN_userPassword "userPassword" #define NID_userPassword 879 #define OBJ_userPassword OBJ_X509,35L #define LN_userCertificate "userCertificate" #define NID_userCertificate 880 #define OBJ_userCertificate OBJ_X509,36L #define LN_cACertificate "cACertificate" #define NID_cACertificate 881 #define OBJ_cACertificate OBJ_X509,37L #define LN_authorityRevocationList "authorityRevocationList" #define NID_authorityRevocationList 882 #define OBJ_authorityRevocationList OBJ_X509,38L #define LN_certificateRevocationList "certificateRevocationList" #define NID_certificateRevocationList 883 #define OBJ_certificateRevocationList OBJ_X509,39L #define LN_crossCertificatePair "crossCertificatePair" #define NID_crossCertificatePair 884 #define OBJ_crossCertificatePair OBJ_X509,40L #define SN_name "name" #define LN_name "name" #define NID_name 173 #define OBJ_name OBJ_X509,41L #define SN_givenName "GN" #define LN_givenName "givenName" #define NID_givenName 99 #define OBJ_givenName OBJ_X509,42L #define SN_initials "initials" #define LN_initials "initials" #define NID_initials 101 #define OBJ_initials OBJ_X509,43L #define LN_generationQualifier "generationQualifier" #define NID_generationQualifier 509 #define OBJ_generationQualifier OBJ_X509,44L #define LN_x500UniqueIdentifier "x500UniqueIdentifier" #define NID_x500UniqueIdentifier 503 #define OBJ_x500UniqueIdentifier OBJ_X509,45L #define SN_dnQualifier "dnQualifier" #define LN_dnQualifier "dnQualifier" #define NID_dnQualifier 174 #define OBJ_dnQualifier OBJ_X509,46L #define LN_enhancedSearchGuide "enhancedSearchGuide" #define NID_enhancedSearchGuide 885 #define OBJ_enhancedSearchGuide OBJ_X509,47L #define LN_protocolInformation "protocolInformation" #define NID_protocolInformation 886 #define OBJ_protocolInformation OBJ_X509,48L #define LN_distinguishedName "distinguishedName" #define NID_distinguishedName 887 #define OBJ_distinguishedName OBJ_X509,49L #define LN_uniqueMember "uniqueMember" #define NID_uniqueMember 888 #define OBJ_uniqueMember OBJ_X509,50L #define LN_houseIdentifier "houseIdentifier" #define NID_houseIdentifier 889 #define OBJ_houseIdentifier OBJ_X509,51L #define LN_supportedAlgorithms "supportedAlgorithms" #define NID_supportedAlgorithms 890 #define OBJ_supportedAlgorithms OBJ_X509,52L #define LN_deltaRevocationList "deltaRevocationList" #define NID_deltaRevocationList 891 #define OBJ_deltaRevocationList OBJ_X509,53L #define SN_dmdName "dmdName" #define NID_dmdName 892 #define OBJ_dmdName OBJ_X509,54L #define LN_pseudonym "pseudonym" #define NID_pseudonym 510 #define OBJ_pseudonym OBJ_X509,65L #define SN_role "role" #define LN_role "role" #define NID_role 400 #define OBJ_role OBJ_X509,72L #define LN_organizationIdentifier "organizationIdentifier" #define NID_organizationIdentifier 1089 #define OBJ_organizationIdentifier OBJ_X509,97L #define SN_countryCode3c "c3" #define LN_countryCode3c "countryCode3c" #define NID_countryCode3c 1090 #define OBJ_countryCode3c OBJ_X509,98L #define SN_countryCode3n "n3" #define LN_countryCode3n "countryCode3n" #define NID_countryCode3n 1091 #define OBJ_countryCode3n OBJ_X509,99L #define LN_dnsName "dnsName" #define NID_dnsName 1092 #define OBJ_dnsName OBJ_X509,100L #define SN_X500algorithms "X500algorithms" #define LN_X500algorithms "directory services - algorithms" #define NID_X500algorithms 378 #define OBJ_X500algorithms OBJ_X500,8L #define SN_rsa "RSA" #define LN_rsa "rsa" #define NID_rsa 19 #define OBJ_rsa OBJ_X500algorithms,1L,1L #define SN_mdc2WithRSA "RSA-MDC2" #define LN_mdc2WithRSA "mdc2WithRSA" #define NID_mdc2WithRSA 96 #define OBJ_mdc2WithRSA OBJ_X500algorithms,3L,100L #define SN_mdc2 "MDC2" #define LN_mdc2 "mdc2" #define NID_mdc2 95 #define OBJ_mdc2 OBJ_X500algorithms,3L,101L #define SN_id_ce "id-ce" #define NID_id_ce 81 #define OBJ_id_ce OBJ_X500,29L #define SN_subject_directory_attributes "subjectDirectoryAttributes" #define LN_subject_directory_attributes "X509v3 Subject Directory Attributes" #define NID_subject_directory_attributes 769 #define OBJ_subject_directory_attributes OBJ_id_ce,9L #define SN_subject_key_identifier "subjectKeyIdentifier" #define LN_subject_key_identifier "X509v3 Subject Key Identifier" #define NID_subject_key_identifier 82 #define OBJ_subject_key_identifier OBJ_id_ce,14L #define SN_key_usage "keyUsage" #define LN_key_usage "X509v3 Key Usage" #define NID_key_usage 83 #define OBJ_key_usage OBJ_id_ce,15L #define SN_private_key_usage_period "privateKeyUsagePeriod" #define LN_private_key_usage_period "X509v3 Private Key Usage Period" #define NID_private_key_usage_period 84 #define OBJ_private_key_usage_period OBJ_id_ce,16L #define SN_subject_alt_name "subjectAltName" #define LN_subject_alt_name "X509v3 Subject Alternative Name" #define NID_subject_alt_name 85 #define OBJ_subject_alt_name OBJ_id_ce,17L #define SN_issuer_alt_name "issuerAltName" #define LN_issuer_alt_name "X509v3 Issuer Alternative Name" #define NID_issuer_alt_name 86 #define OBJ_issuer_alt_name OBJ_id_ce,18L #define SN_basic_constraints "basicConstraints" #define LN_basic_constraints "X509v3 Basic Constraints" #define NID_basic_constraints 87 #define OBJ_basic_constraints OBJ_id_ce,19L #define SN_crl_number "crlNumber" #define LN_crl_number "X509v3 CRL Number" #define NID_crl_number 88 #define OBJ_crl_number OBJ_id_ce,20L #define SN_crl_reason "CRLReason" #define LN_crl_reason "X509v3 CRL Reason Code" #define NID_crl_reason 141 #define OBJ_crl_reason OBJ_id_ce,21L #define SN_invalidity_date "invalidityDate" #define LN_invalidity_date "Invalidity Date" #define NID_invalidity_date 142 #define OBJ_invalidity_date OBJ_id_ce,24L #define SN_delta_crl "deltaCRL" #define LN_delta_crl "X509v3 Delta CRL Indicator" #define NID_delta_crl 140 #define OBJ_delta_crl OBJ_id_ce,27L #define SN_issuing_distribution_point "issuingDistributionPoint" #define LN_issuing_distribution_point "X509v3 Issuing Distribution Point" #define NID_issuing_distribution_point 770 #define OBJ_issuing_distribution_point OBJ_id_ce,28L #define SN_certificate_issuer "certificateIssuer" #define LN_certificate_issuer "X509v3 Certificate Issuer" #define NID_certificate_issuer 771 #define OBJ_certificate_issuer OBJ_id_ce,29L #define SN_name_constraints "nameConstraints" #define LN_name_constraints "X509v3 Name Constraints" #define NID_name_constraints 666 #define OBJ_name_constraints OBJ_id_ce,30L #define SN_crl_distribution_points "crlDistributionPoints" #define LN_crl_distribution_points "X509v3 CRL Distribution Points" #define NID_crl_distribution_points 103 #define OBJ_crl_distribution_points OBJ_id_ce,31L #define SN_certificate_policies "certificatePolicies" #define LN_certificate_policies "X509v3 Certificate Policies" #define NID_certificate_policies 89 #define OBJ_certificate_policies OBJ_id_ce,32L #define SN_any_policy "anyPolicy" #define LN_any_policy "X509v3 Any Policy" #define NID_any_policy 746 #define OBJ_any_policy OBJ_certificate_policies,0L #define SN_policy_mappings "policyMappings" #define LN_policy_mappings "X509v3 Policy Mappings" #define NID_policy_mappings 747 #define OBJ_policy_mappings OBJ_id_ce,33L #define SN_authority_key_identifier "authorityKeyIdentifier" #define LN_authority_key_identifier "X509v3 Authority Key Identifier" #define NID_authority_key_identifier 90 #define OBJ_authority_key_identifier OBJ_id_ce,35L #define SN_policy_constraints "policyConstraints" #define LN_policy_constraints "X509v3 Policy Constraints" #define NID_policy_constraints 401 #define OBJ_policy_constraints OBJ_id_ce,36L #define SN_ext_key_usage "extendedKeyUsage" #define LN_ext_key_usage "X509v3 Extended Key Usage" #define NID_ext_key_usage 126 #define OBJ_ext_key_usage OBJ_id_ce,37L #define SN_freshest_crl "freshestCRL" #define LN_freshest_crl "X509v3 Freshest CRL" #define NID_freshest_crl 857 #define OBJ_freshest_crl OBJ_id_ce,46L #define SN_inhibit_any_policy "inhibitAnyPolicy" #define LN_inhibit_any_policy "X509v3 Inhibit Any Policy" #define NID_inhibit_any_policy 748 #define OBJ_inhibit_any_policy OBJ_id_ce,54L #define SN_target_information "targetInformation" #define LN_target_information "X509v3 AC Targeting" #define NID_target_information 402 #define OBJ_target_information OBJ_id_ce,55L #define SN_no_rev_avail "noRevAvail" #define LN_no_rev_avail "X509v3 No Revocation Available" #define NID_no_rev_avail 403 #define OBJ_no_rev_avail OBJ_id_ce,56L #define SN_anyExtendedKeyUsage "anyExtendedKeyUsage" #define LN_anyExtendedKeyUsage "Any Extended Key Usage" #define NID_anyExtendedKeyUsage 910 #define OBJ_anyExtendedKeyUsage OBJ_ext_key_usage,0L #define SN_netscape "Netscape" #define LN_netscape "Netscape Communications Corp." #define NID_netscape 57 #define OBJ_netscape 2L,16L,840L,1L,113730L #define SN_netscape_cert_extension "nsCertExt" #define LN_netscape_cert_extension "Netscape Certificate Extension" #define NID_netscape_cert_extension 58 #define OBJ_netscape_cert_extension OBJ_netscape,1L #define SN_netscape_data_type "nsDataType" #define LN_netscape_data_type "Netscape Data Type" #define NID_netscape_data_type 59 #define OBJ_netscape_data_type OBJ_netscape,2L #define SN_netscape_cert_type "nsCertType" #define LN_netscape_cert_type "Netscape Cert Type" #define NID_netscape_cert_type 71 #define OBJ_netscape_cert_type OBJ_netscape_cert_extension,1L #define SN_netscape_base_url "nsBaseUrl" #define LN_netscape_base_url "Netscape Base Url" #define NID_netscape_base_url 72 #define OBJ_netscape_base_url OBJ_netscape_cert_extension,2L #define SN_netscape_revocation_url "nsRevocationUrl" #define LN_netscape_revocation_url "Netscape Revocation Url" #define NID_netscape_revocation_url 73 #define OBJ_netscape_revocation_url OBJ_netscape_cert_extension,3L #define SN_netscape_ca_revocation_url "nsCaRevocationUrl" #define LN_netscape_ca_revocation_url "Netscape CA Revocation Url" #define NID_netscape_ca_revocation_url 74 #define OBJ_netscape_ca_revocation_url OBJ_netscape_cert_extension,4L #define SN_netscape_renewal_url "nsRenewalUrl" #define LN_netscape_renewal_url "Netscape Renewal Url" #define NID_netscape_renewal_url 75 #define OBJ_netscape_renewal_url OBJ_netscape_cert_extension,7L #define SN_netscape_ca_policy_url "nsCaPolicyUrl" #define LN_netscape_ca_policy_url "Netscape CA Policy Url" #define NID_netscape_ca_policy_url 76 #define OBJ_netscape_ca_policy_url OBJ_netscape_cert_extension,8L #define SN_netscape_ssl_server_name "nsSslServerName" #define LN_netscape_ssl_server_name "Netscape SSL Server Name" #define NID_netscape_ssl_server_name 77 #define OBJ_netscape_ssl_server_name OBJ_netscape_cert_extension,12L #define SN_netscape_comment "nsComment" #define LN_netscape_comment "Netscape Comment" #define NID_netscape_comment 78 #define OBJ_netscape_comment OBJ_netscape_cert_extension,13L #define SN_netscape_cert_sequence "nsCertSequence" #define LN_netscape_cert_sequence "Netscape Certificate Sequence" #define NID_netscape_cert_sequence 79 #define OBJ_netscape_cert_sequence OBJ_netscape_data_type,5L #define SN_ns_sgc "nsSGC" #define LN_ns_sgc "Netscape Server Gated Crypto" #define NID_ns_sgc 139 #define OBJ_ns_sgc OBJ_netscape,4L,1L #define SN_org "ORG" #define LN_org "org" #define NID_org 379 #define OBJ_org OBJ_iso,3L #define SN_dod "DOD" #define LN_dod "dod" #define NID_dod 380 #define OBJ_dod OBJ_org,6L #define SN_iana "IANA" #define LN_iana "iana" #define NID_iana 381 #define OBJ_iana OBJ_dod,1L #define OBJ_internet OBJ_iana #define SN_Directory "directory" #define LN_Directory "Directory" #define NID_Directory 382 #define OBJ_Directory OBJ_internet,1L #define SN_Management "mgmt" #define LN_Management "Management" #define NID_Management 383 #define OBJ_Management OBJ_internet,2L #define SN_Experimental "experimental" #define LN_Experimental "Experimental" #define NID_Experimental 384 #define OBJ_Experimental OBJ_internet,3L #define SN_Private "private" #define LN_Private "Private" #define NID_Private 385 #define OBJ_Private OBJ_internet,4L #define SN_Security "security" #define LN_Security "Security" #define NID_Security 386 #define OBJ_Security OBJ_internet,5L #define SN_SNMPv2 "snmpv2" #define LN_SNMPv2 "SNMPv2" #define NID_SNMPv2 387 #define OBJ_SNMPv2 OBJ_internet,6L #define LN_Mail "Mail" #define NID_Mail 388 #define OBJ_Mail OBJ_internet,7L #define SN_Enterprises "enterprises" #define LN_Enterprises "Enterprises" #define NID_Enterprises 389 #define OBJ_Enterprises OBJ_Private,1L #define SN_dcObject "dcobject" #define LN_dcObject "dcObject" #define NID_dcObject 390 #define OBJ_dcObject OBJ_Enterprises,1466L,344L #define SN_mime_mhs "mime-mhs" #define LN_mime_mhs "MIME MHS" #define NID_mime_mhs 504 #define OBJ_mime_mhs OBJ_Mail,1L #define SN_mime_mhs_headings "mime-mhs-headings" #define LN_mime_mhs_headings "mime-mhs-headings" #define NID_mime_mhs_headings 505 #define OBJ_mime_mhs_headings OBJ_mime_mhs,1L #define SN_mime_mhs_bodies "mime-mhs-bodies" #define LN_mime_mhs_bodies "mime-mhs-bodies" #define NID_mime_mhs_bodies 506 #define OBJ_mime_mhs_bodies OBJ_mime_mhs,2L #define SN_id_hex_partial_message "id-hex-partial-message" #define LN_id_hex_partial_message "id-hex-partial-message" #define NID_id_hex_partial_message 507 #define OBJ_id_hex_partial_message OBJ_mime_mhs_headings,1L #define SN_id_hex_multipart_message "id-hex-multipart-message" #define LN_id_hex_multipart_message "id-hex-multipart-message" #define NID_id_hex_multipart_message 508 #define OBJ_id_hex_multipart_message OBJ_mime_mhs_headings,2L #define SN_zlib_compression "ZLIB" #define LN_zlib_compression "zlib compression" #define NID_zlib_compression 125 #define OBJ_zlib_compression OBJ_id_smime_alg,8L #define OBJ_csor 2L,16L,840L,1L,101L,3L #define OBJ_nistAlgorithms OBJ_csor,4L #define OBJ_aes OBJ_nistAlgorithms,1L #define SN_aes_128_ecb "AES-128-ECB" #define LN_aes_128_ecb "aes-128-ecb" #define NID_aes_128_ecb 418 #define OBJ_aes_128_ecb OBJ_aes,1L #define SN_aes_128_cbc "AES-128-CBC" #define LN_aes_128_cbc "aes-128-cbc" #define NID_aes_128_cbc 419 #define OBJ_aes_128_cbc OBJ_aes,2L #define SN_aes_128_ofb128 "AES-128-OFB" #define LN_aes_128_ofb128 "aes-128-ofb" #define NID_aes_128_ofb128 420 #define OBJ_aes_128_ofb128 OBJ_aes,3L #define SN_aes_128_cfb128 "AES-128-CFB" #define LN_aes_128_cfb128 "aes-128-cfb" #define NID_aes_128_cfb128 421 #define OBJ_aes_128_cfb128 OBJ_aes,4L #define SN_id_aes128_wrap "id-aes128-wrap" #define NID_id_aes128_wrap 788 #define OBJ_id_aes128_wrap OBJ_aes,5L #define SN_aes_128_gcm "id-aes128-GCM" #define LN_aes_128_gcm "aes-128-gcm" #define NID_aes_128_gcm 895 #define OBJ_aes_128_gcm OBJ_aes,6L #define SN_aes_128_ccm "id-aes128-CCM" #define LN_aes_128_ccm "aes-128-ccm" #define NID_aes_128_ccm 896 #define OBJ_aes_128_ccm OBJ_aes,7L #define SN_id_aes128_wrap_pad "id-aes128-wrap-pad" #define NID_id_aes128_wrap_pad 897 #define OBJ_id_aes128_wrap_pad OBJ_aes,8L #define SN_aes_192_ecb "AES-192-ECB" #define LN_aes_192_ecb "aes-192-ecb" #define NID_aes_192_ecb 422 #define OBJ_aes_192_ecb OBJ_aes,21L #define SN_aes_192_cbc "AES-192-CBC" #define LN_aes_192_cbc "aes-192-cbc" #define NID_aes_192_cbc 423 #define OBJ_aes_192_cbc OBJ_aes,22L #define SN_aes_192_ofb128 "AES-192-OFB" #define LN_aes_192_ofb128 "aes-192-ofb" #define NID_aes_192_ofb128 424 #define OBJ_aes_192_ofb128 OBJ_aes,23L #define SN_aes_192_cfb128 "AES-192-CFB" #define LN_aes_192_cfb128 "aes-192-cfb" #define NID_aes_192_cfb128 425 #define OBJ_aes_192_cfb128 OBJ_aes,24L #define SN_id_aes192_wrap "id-aes192-wrap" #define NID_id_aes192_wrap 789 #define OBJ_id_aes192_wrap OBJ_aes,25L #define SN_aes_192_gcm "id-aes192-GCM" #define LN_aes_192_gcm "aes-192-gcm" #define NID_aes_192_gcm 898 #define OBJ_aes_192_gcm OBJ_aes,26L #define SN_aes_192_ccm "id-aes192-CCM" #define LN_aes_192_ccm "aes-192-ccm" #define NID_aes_192_ccm 899 #define OBJ_aes_192_ccm OBJ_aes,27L #define SN_id_aes192_wrap_pad "id-aes192-wrap-pad" #define NID_id_aes192_wrap_pad 900 #define OBJ_id_aes192_wrap_pad OBJ_aes,28L #define SN_aes_256_ecb "AES-256-ECB" #define LN_aes_256_ecb "aes-256-ecb" #define NID_aes_256_ecb 426 #define OBJ_aes_256_ecb OBJ_aes,41L #define SN_aes_256_cbc "AES-256-CBC" #define LN_aes_256_cbc "aes-256-cbc" #define NID_aes_256_cbc 427 #define OBJ_aes_256_cbc OBJ_aes,42L #define SN_aes_256_ofb128 "AES-256-OFB" #define LN_aes_256_ofb128 "aes-256-ofb" #define NID_aes_256_ofb128 428 #define OBJ_aes_256_ofb128 OBJ_aes,43L #define SN_aes_256_cfb128 "AES-256-CFB" #define LN_aes_256_cfb128 "aes-256-cfb" #define NID_aes_256_cfb128 429 #define OBJ_aes_256_cfb128 OBJ_aes,44L #define SN_id_aes256_wrap "id-aes256-wrap" #define NID_id_aes256_wrap 790 #define OBJ_id_aes256_wrap OBJ_aes,45L #define SN_aes_256_gcm "id-aes256-GCM" #define LN_aes_256_gcm "aes-256-gcm" #define NID_aes_256_gcm 901 #define OBJ_aes_256_gcm OBJ_aes,46L #define SN_aes_256_ccm "id-aes256-CCM" #define LN_aes_256_ccm "aes-256-ccm" #define NID_aes_256_ccm 902 #define OBJ_aes_256_ccm OBJ_aes,47L #define SN_id_aes256_wrap_pad "id-aes256-wrap-pad" #define NID_id_aes256_wrap_pad 903 #define OBJ_id_aes256_wrap_pad OBJ_aes,48L #define SN_aes_128_xts "AES-128-XTS" #define LN_aes_128_xts "aes-128-xts" #define NID_aes_128_xts 913 #define OBJ_aes_128_xts OBJ_ieee_siswg,0L,1L,1L #define SN_aes_256_xts "AES-256-XTS" #define LN_aes_256_xts "aes-256-xts" #define NID_aes_256_xts 914 #define OBJ_aes_256_xts OBJ_ieee_siswg,0L,1L,2L #define SN_aes_128_cfb1 "AES-128-CFB1" #define LN_aes_128_cfb1 "aes-128-cfb1" #define NID_aes_128_cfb1 650 #define SN_aes_192_cfb1 "AES-192-CFB1" #define LN_aes_192_cfb1 "aes-192-cfb1" #define NID_aes_192_cfb1 651 #define SN_aes_256_cfb1 "AES-256-CFB1" #define LN_aes_256_cfb1 "aes-256-cfb1" #define NID_aes_256_cfb1 652 #define SN_aes_128_cfb8 "AES-128-CFB8" #define LN_aes_128_cfb8 "aes-128-cfb8" #define NID_aes_128_cfb8 653 #define SN_aes_192_cfb8 "AES-192-CFB8" #define LN_aes_192_cfb8 "aes-192-cfb8" #define NID_aes_192_cfb8 654 #define SN_aes_256_cfb8 "AES-256-CFB8" #define LN_aes_256_cfb8 "aes-256-cfb8" #define NID_aes_256_cfb8 655 #define SN_aes_128_ctr "AES-128-CTR" #define LN_aes_128_ctr "aes-128-ctr" #define NID_aes_128_ctr 904 #define SN_aes_192_ctr "AES-192-CTR" #define LN_aes_192_ctr "aes-192-ctr" #define NID_aes_192_ctr 905 #define SN_aes_256_ctr "AES-256-CTR" #define LN_aes_256_ctr "aes-256-ctr" #define NID_aes_256_ctr 906 #define SN_aes_128_ocb "AES-128-OCB" #define LN_aes_128_ocb "aes-128-ocb" #define NID_aes_128_ocb 958 #define SN_aes_192_ocb "AES-192-OCB" #define LN_aes_192_ocb "aes-192-ocb" #define NID_aes_192_ocb 959 #define SN_aes_256_ocb "AES-256-OCB" #define LN_aes_256_ocb "aes-256-ocb" #define NID_aes_256_ocb 960 #define SN_des_cfb1 "DES-CFB1" #define LN_des_cfb1 "des-cfb1" #define NID_des_cfb1 656 #define SN_des_cfb8 "DES-CFB8" #define LN_des_cfb8 "des-cfb8" #define NID_des_cfb8 657 #define SN_des_ede3_cfb1 "DES-EDE3-CFB1" #define LN_des_ede3_cfb1 "des-ede3-cfb1" #define NID_des_ede3_cfb1 658 #define SN_des_ede3_cfb8 "DES-EDE3-CFB8" #define LN_des_ede3_cfb8 "des-ede3-cfb8" #define NID_des_ede3_cfb8 659 #define OBJ_nist_hashalgs OBJ_nistAlgorithms,2L #define SN_sha256 "SHA256" #define LN_sha256 "sha256" #define NID_sha256 672 #define OBJ_sha256 OBJ_nist_hashalgs,1L #define SN_sha384 "SHA384" #define LN_sha384 "sha384" #define NID_sha384 673 #define OBJ_sha384 OBJ_nist_hashalgs,2L #define SN_sha512 "SHA512" #define LN_sha512 "sha512" #define NID_sha512 674 #define OBJ_sha512 OBJ_nist_hashalgs,3L #define SN_sha224 "SHA224" #define LN_sha224 "sha224" #define NID_sha224 675 #define OBJ_sha224 OBJ_nist_hashalgs,4L #define SN_sha512_224 "SHA512-224" #define LN_sha512_224 "sha512-224" #define NID_sha512_224 1094 #define OBJ_sha512_224 OBJ_nist_hashalgs,5L #define SN_sha512_256 "SHA512-256" #define LN_sha512_256 "sha512-256" #define NID_sha512_256 1095 #define OBJ_sha512_256 OBJ_nist_hashalgs,6L #define SN_sha3_224 "SHA3-224" #define LN_sha3_224 "sha3-224" #define NID_sha3_224 1096 #define OBJ_sha3_224 OBJ_nist_hashalgs,7L #define SN_sha3_256 "SHA3-256" #define LN_sha3_256 "sha3-256" #define NID_sha3_256 1097 #define OBJ_sha3_256 OBJ_nist_hashalgs,8L #define SN_sha3_384 "SHA3-384" #define LN_sha3_384 "sha3-384" #define NID_sha3_384 1098 #define OBJ_sha3_384 OBJ_nist_hashalgs,9L #define SN_sha3_512 "SHA3-512" #define LN_sha3_512 "sha3-512" #define NID_sha3_512 1099 #define OBJ_sha3_512 OBJ_nist_hashalgs,10L #define SN_shake128 "SHAKE128" #define LN_shake128 "shake128" #define NID_shake128 1100 #define OBJ_shake128 OBJ_nist_hashalgs,11L #define SN_shake256 "SHAKE256" #define LN_shake256 "shake256" #define NID_shake256 1101 #define OBJ_shake256 OBJ_nist_hashalgs,12L #define SN_hmac_sha3_224 "id-hmacWithSHA3-224" #define LN_hmac_sha3_224 "hmac-sha3-224" #define NID_hmac_sha3_224 1102 #define OBJ_hmac_sha3_224 OBJ_nist_hashalgs,13L #define SN_hmac_sha3_256 "id-hmacWithSHA3-256" #define LN_hmac_sha3_256 "hmac-sha3-256" #define NID_hmac_sha3_256 1103 #define OBJ_hmac_sha3_256 OBJ_nist_hashalgs,14L #define SN_hmac_sha3_384 "id-hmacWithSHA3-384" #define LN_hmac_sha3_384 "hmac-sha3-384" #define NID_hmac_sha3_384 1104 #define OBJ_hmac_sha3_384 OBJ_nist_hashalgs,15L #define SN_hmac_sha3_512 "id-hmacWithSHA3-512" #define LN_hmac_sha3_512 "hmac-sha3-512" #define NID_hmac_sha3_512 1105 #define OBJ_hmac_sha3_512 OBJ_nist_hashalgs,16L #define OBJ_dsa_with_sha2 OBJ_nistAlgorithms,3L #define SN_dsa_with_SHA224 "dsa_with_SHA224" #define NID_dsa_with_SHA224 802 #define OBJ_dsa_with_SHA224 OBJ_dsa_with_sha2,1L #define SN_dsa_with_SHA256 "dsa_with_SHA256" #define NID_dsa_with_SHA256 803 #define OBJ_dsa_with_SHA256 OBJ_dsa_with_sha2,2L #define OBJ_sigAlgs OBJ_nistAlgorithms,3L #define SN_dsa_with_SHA384 "id-dsa-with-sha384" #define LN_dsa_with_SHA384 "dsa_with_SHA384" #define NID_dsa_with_SHA384 1106 #define OBJ_dsa_with_SHA384 OBJ_sigAlgs,3L #define SN_dsa_with_SHA512 "id-dsa-with-sha512" #define LN_dsa_with_SHA512 "dsa_with_SHA512" #define NID_dsa_with_SHA512 1107 #define OBJ_dsa_with_SHA512 OBJ_sigAlgs,4L #define SN_dsa_with_SHA3_224 "id-dsa-with-sha3-224" #define LN_dsa_with_SHA3_224 "dsa_with_SHA3-224" #define NID_dsa_with_SHA3_224 1108 #define OBJ_dsa_with_SHA3_224 OBJ_sigAlgs,5L #define SN_dsa_with_SHA3_256 "id-dsa-with-sha3-256" #define LN_dsa_with_SHA3_256 "dsa_with_SHA3-256" #define NID_dsa_with_SHA3_256 1109 #define OBJ_dsa_with_SHA3_256 OBJ_sigAlgs,6L #define SN_dsa_with_SHA3_384 "id-dsa-with-sha3-384" #define LN_dsa_with_SHA3_384 "dsa_with_SHA3-384" #define NID_dsa_with_SHA3_384 1110 #define OBJ_dsa_with_SHA3_384 OBJ_sigAlgs,7L #define SN_dsa_with_SHA3_512 "id-dsa-with-sha3-512" #define LN_dsa_with_SHA3_512 "dsa_with_SHA3-512" #define NID_dsa_with_SHA3_512 1111 #define OBJ_dsa_with_SHA3_512 OBJ_sigAlgs,8L #define SN_ecdsa_with_SHA3_224 "id-ecdsa-with-sha3-224" #define LN_ecdsa_with_SHA3_224 "ecdsa_with_SHA3-224" #define NID_ecdsa_with_SHA3_224 1112 #define OBJ_ecdsa_with_SHA3_224 OBJ_sigAlgs,9L #define SN_ecdsa_with_SHA3_256 "id-ecdsa-with-sha3-256" #define LN_ecdsa_with_SHA3_256 "ecdsa_with_SHA3-256" #define NID_ecdsa_with_SHA3_256 1113 #define OBJ_ecdsa_with_SHA3_256 OBJ_sigAlgs,10L #define SN_ecdsa_with_SHA3_384 "id-ecdsa-with-sha3-384" #define LN_ecdsa_with_SHA3_384 "ecdsa_with_SHA3-384" #define NID_ecdsa_with_SHA3_384 1114 #define OBJ_ecdsa_with_SHA3_384 OBJ_sigAlgs,11L #define SN_ecdsa_with_SHA3_512 "id-ecdsa-with-sha3-512" #define LN_ecdsa_with_SHA3_512 "ecdsa_with_SHA3-512" #define NID_ecdsa_with_SHA3_512 1115 #define OBJ_ecdsa_with_SHA3_512 OBJ_sigAlgs,12L #define SN_RSA_SHA3_224 "id-rsassa-pkcs1-v1_5-with-sha3-224" #define LN_RSA_SHA3_224 "RSA-SHA3-224" #define NID_RSA_SHA3_224 1116 #define OBJ_RSA_SHA3_224 OBJ_sigAlgs,13L #define SN_RSA_SHA3_256 "id-rsassa-pkcs1-v1_5-with-sha3-256" #define LN_RSA_SHA3_256 "RSA-SHA3-256" #define NID_RSA_SHA3_256 1117 #define OBJ_RSA_SHA3_256 OBJ_sigAlgs,14L #define SN_RSA_SHA3_384 "id-rsassa-pkcs1-v1_5-with-sha3-384" #define LN_RSA_SHA3_384 "RSA-SHA3-384" #define NID_RSA_SHA3_384 1118 #define OBJ_RSA_SHA3_384 OBJ_sigAlgs,15L #define SN_RSA_SHA3_512 "id-rsassa-pkcs1-v1_5-with-sha3-512" #define LN_RSA_SHA3_512 "RSA-SHA3-512" #define NID_RSA_SHA3_512 1119 #define OBJ_RSA_SHA3_512 OBJ_sigAlgs,16L #define SN_hold_instruction_code "holdInstructionCode" #define LN_hold_instruction_code "Hold Instruction Code" #define NID_hold_instruction_code 430 #define OBJ_hold_instruction_code OBJ_id_ce,23L #define OBJ_holdInstruction OBJ_X9_57,2L #define SN_hold_instruction_none "holdInstructionNone" #define LN_hold_instruction_none "Hold Instruction None" #define NID_hold_instruction_none 431 #define OBJ_hold_instruction_none OBJ_holdInstruction,1L #define SN_hold_instruction_call_issuer "holdInstructionCallIssuer" #define LN_hold_instruction_call_issuer "Hold Instruction Call Issuer" #define NID_hold_instruction_call_issuer 432 #define OBJ_hold_instruction_call_issuer OBJ_holdInstruction,2L #define SN_hold_instruction_reject "holdInstructionReject" #define LN_hold_instruction_reject "Hold Instruction Reject" #define NID_hold_instruction_reject 433 #define OBJ_hold_instruction_reject OBJ_holdInstruction,3L #define SN_data "data" #define NID_data 434 #define OBJ_data OBJ_itu_t,9L #define SN_pss "pss" #define NID_pss 435 #define OBJ_pss OBJ_data,2342L #define SN_ucl "ucl" #define NID_ucl 436 #define OBJ_ucl OBJ_pss,19200300L #define SN_pilot "pilot" #define NID_pilot 437 #define OBJ_pilot OBJ_ucl,100L #define LN_pilotAttributeType "pilotAttributeType" #define NID_pilotAttributeType 438 #define OBJ_pilotAttributeType OBJ_pilot,1L #define LN_pilotAttributeSyntax "pilotAttributeSyntax" #define NID_pilotAttributeSyntax 439 #define OBJ_pilotAttributeSyntax OBJ_pilot,3L #define LN_pilotObjectClass "pilotObjectClass" #define NID_pilotObjectClass 440 #define OBJ_pilotObjectClass OBJ_pilot,4L #define LN_pilotGroups "pilotGroups" #define NID_pilotGroups 441 #define OBJ_pilotGroups OBJ_pilot,10L #define LN_iA5StringSyntax "iA5StringSyntax" #define NID_iA5StringSyntax 442 #define OBJ_iA5StringSyntax OBJ_pilotAttributeSyntax,4L #define LN_caseIgnoreIA5StringSyntax "caseIgnoreIA5StringSyntax" #define NID_caseIgnoreIA5StringSyntax 443 #define OBJ_caseIgnoreIA5StringSyntax OBJ_pilotAttributeSyntax,5L #define LN_pilotObject "pilotObject" #define NID_pilotObject 444 #define OBJ_pilotObject OBJ_pilotObjectClass,3L #define LN_pilotPerson "pilotPerson" #define NID_pilotPerson 445 #define OBJ_pilotPerson OBJ_pilotObjectClass,4L #define SN_account "account" #define NID_account 446 #define OBJ_account OBJ_pilotObjectClass,5L #define SN_document "document" #define NID_document 447 #define OBJ_document OBJ_pilotObjectClass,6L #define SN_room "room" #define NID_room 448 #define OBJ_room OBJ_pilotObjectClass,7L #define LN_documentSeries "documentSeries" #define NID_documentSeries 449 #define OBJ_documentSeries OBJ_pilotObjectClass,9L #define SN_Domain "domain" #define LN_Domain "Domain" #define NID_Domain 392 #define OBJ_Domain OBJ_pilotObjectClass,13L #define LN_rFC822localPart "rFC822localPart" #define NID_rFC822localPart 450 #define OBJ_rFC822localPart OBJ_pilotObjectClass,14L #define LN_dNSDomain "dNSDomain" #define NID_dNSDomain 451 #define OBJ_dNSDomain OBJ_pilotObjectClass,15L #define LN_domainRelatedObject "domainRelatedObject" #define NID_domainRelatedObject 452 #define OBJ_domainRelatedObject OBJ_pilotObjectClass,17L #define LN_friendlyCountry "friendlyCountry" #define NID_friendlyCountry 453 #define OBJ_friendlyCountry OBJ_pilotObjectClass,18L #define LN_simpleSecurityObject "simpleSecurityObject" #define NID_simpleSecurityObject 454 #define OBJ_simpleSecurityObject OBJ_pilotObjectClass,19L #define LN_pilotOrganization "pilotOrganization" #define NID_pilotOrganization 455 #define OBJ_pilotOrganization OBJ_pilotObjectClass,20L #define LN_pilotDSA "pilotDSA" #define NID_pilotDSA 456 #define OBJ_pilotDSA OBJ_pilotObjectClass,21L #define LN_qualityLabelledData "qualityLabelledData" #define NID_qualityLabelledData 457 #define OBJ_qualityLabelledData OBJ_pilotObjectClass,22L #define SN_userId "UID" #define LN_userId "userId" #define NID_userId 458 #define OBJ_userId OBJ_pilotAttributeType,1L #define LN_textEncodedORAddress "textEncodedORAddress" #define NID_textEncodedORAddress 459 #define OBJ_textEncodedORAddress OBJ_pilotAttributeType,2L #define SN_rfc822Mailbox "mail" #define LN_rfc822Mailbox "rfc822Mailbox" #define NID_rfc822Mailbox 460 #define OBJ_rfc822Mailbox OBJ_pilotAttributeType,3L #define SN_info "info" #define NID_info 461 #define OBJ_info OBJ_pilotAttributeType,4L #define LN_favouriteDrink "favouriteDrink" #define NID_favouriteDrink 462 #define OBJ_favouriteDrink OBJ_pilotAttributeType,5L #define LN_roomNumber "roomNumber" #define NID_roomNumber 463 #define OBJ_roomNumber OBJ_pilotAttributeType,6L #define SN_photo "photo" #define NID_photo 464 #define OBJ_photo OBJ_pilotAttributeType,7L #define LN_userClass "userClass" #define NID_userClass 465 #define OBJ_userClass OBJ_pilotAttributeType,8L #define SN_host "host" #define NID_host 466 #define OBJ_host OBJ_pilotAttributeType,9L #define SN_manager "manager" #define NID_manager 467 #define OBJ_manager OBJ_pilotAttributeType,10L #define LN_documentIdentifier "documentIdentifier" #define NID_documentIdentifier 468 #define OBJ_documentIdentifier OBJ_pilotAttributeType,11L #define LN_documentTitle "documentTitle" #define NID_documentTitle 469 #define OBJ_documentTitle OBJ_pilotAttributeType,12L #define LN_documentVersion "documentVersion" #define NID_documentVersion 470 #define OBJ_documentVersion OBJ_pilotAttributeType,13L #define LN_documentAuthor "documentAuthor" #define NID_documentAuthor 471 #define OBJ_documentAuthor OBJ_pilotAttributeType,14L #define LN_documentLocation "documentLocation" #define NID_documentLocation 472 #define OBJ_documentLocation OBJ_pilotAttributeType,15L #define LN_homeTelephoneNumber "homeTelephoneNumber" #define NID_homeTelephoneNumber 473 #define OBJ_homeTelephoneNumber OBJ_pilotAttributeType,20L #define SN_secretary "secretary" #define NID_secretary 474 #define OBJ_secretary OBJ_pilotAttributeType,21L #define LN_otherMailbox "otherMailbox" #define NID_otherMailbox 475 #define OBJ_otherMailbox OBJ_pilotAttributeType,22L #define LN_lastModifiedTime "lastModifiedTime" #define NID_lastModifiedTime 476 #define OBJ_lastModifiedTime OBJ_pilotAttributeType,23L #define LN_lastModifiedBy "lastModifiedBy" #define NID_lastModifiedBy 477 #define OBJ_lastModifiedBy OBJ_pilotAttributeType,24L #define SN_domainComponent "DC" #define LN_domainComponent "domainComponent" #define NID_domainComponent 391 #define OBJ_domainComponent OBJ_pilotAttributeType,25L #define LN_aRecord "aRecord" #define NID_aRecord 478 #define OBJ_aRecord OBJ_pilotAttributeType,26L #define LN_pilotAttributeType27 "pilotAttributeType27" #define NID_pilotAttributeType27 479 #define OBJ_pilotAttributeType27 OBJ_pilotAttributeType,27L #define LN_mXRecord "mXRecord" #define NID_mXRecord 480 #define OBJ_mXRecord OBJ_pilotAttributeType,28L #define LN_nSRecord "nSRecord" #define NID_nSRecord 481 #define OBJ_nSRecord OBJ_pilotAttributeType,29L #define LN_sOARecord "sOARecord" #define NID_sOARecord 482 #define OBJ_sOARecord OBJ_pilotAttributeType,30L #define LN_cNAMERecord "cNAMERecord" #define NID_cNAMERecord 483 #define OBJ_cNAMERecord OBJ_pilotAttributeType,31L #define LN_associatedDomain "associatedDomain" #define NID_associatedDomain 484 #define OBJ_associatedDomain OBJ_pilotAttributeType,37L #define LN_associatedName "associatedName" #define NID_associatedName 485 #define OBJ_associatedName OBJ_pilotAttributeType,38L #define LN_homePostalAddress "homePostalAddress" #define NID_homePostalAddress 486 #define OBJ_homePostalAddress OBJ_pilotAttributeType,39L #define LN_personalTitle "personalTitle" #define NID_personalTitle 487 #define OBJ_personalTitle OBJ_pilotAttributeType,40L #define LN_mobileTelephoneNumber "mobileTelephoneNumber" #define NID_mobileTelephoneNumber 488 #define OBJ_mobileTelephoneNumber OBJ_pilotAttributeType,41L #define LN_pagerTelephoneNumber "pagerTelephoneNumber" #define NID_pagerTelephoneNumber 489 #define OBJ_pagerTelephoneNumber OBJ_pilotAttributeType,42L #define LN_friendlyCountryName "friendlyCountryName" #define NID_friendlyCountryName 490 #define OBJ_friendlyCountryName OBJ_pilotAttributeType,43L #define SN_uniqueIdentifier "uid" #define LN_uniqueIdentifier "uniqueIdentifier" #define NID_uniqueIdentifier 102 #define OBJ_uniqueIdentifier OBJ_pilotAttributeType,44L #define LN_organizationalStatus "organizationalStatus" #define NID_organizationalStatus 491 #define OBJ_organizationalStatus OBJ_pilotAttributeType,45L #define LN_janetMailbox "janetMailbox" #define NID_janetMailbox 492 #define OBJ_janetMailbox OBJ_pilotAttributeType,46L #define LN_mailPreferenceOption "mailPreferenceOption" #define NID_mailPreferenceOption 493 #define OBJ_mailPreferenceOption OBJ_pilotAttributeType,47L #define LN_buildingName "buildingName" #define NID_buildingName 494 #define OBJ_buildingName OBJ_pilotAttributeType,48L #define LN_dSAQuality "dSAQuality" #define NID_dSAQuality 495 #define OBJ_dSAQuality OBJ_pilotAttributeType,49L #define LN_singleLevelQuality "singleLevelQuality" #define NID_singleLevelQuality 496 #define OBJ_singleLevelQuality OBJ_pilotAttributeType,50L #define LN_subtreeMinimumQuality "subtreeMinimumQuality" #define NID_subtreeMinimumQuality 497 #define OBJ_subtreeMinimumQuality OBJ_pilotAttributeType,51L #define LN_subtreeMaximumQuality "subtreeMaximumQuality" #define NID_subtreeMaximumQuality 498 #define OBJ_subtreeMaximumQuality OBJ_pilotAttributeType,52L #define LN_personalSignature "personalSignature" #define NID_personalSignature 499 #define OBJ_personalSignature OBJ_pilotAttributeType,53L #define LN_dITRedirect "dITRedirect" #define NID_dITRedirect 500 #define OBJ_dITRedirect OBJ_pilotAttributeType,54L #define SN_audio "audio" #define NID_audio 501 #define OBJ_audio OBJ_pilotAttributeType,55L #define LN_documentPublisher "documentPublisher" #define NID_documentPublisher 502 #define OBJ_documentPublisher OBJ_pilotAttributeType,56L #define SN_id_set "id-set" #define LN_id_set "Secure Electronic Transactions" #define NID_id_set 512 #define OBJ_id_set OBJ_international_organizations,42L #define SN_set_ctype "set-ctype" #define LN_set_ctype "content types" #define NID_set_ctype 513 #define OBJ_set_ctype OBJ_id_set,0L #define SN_set_msgExt "set-msgExt" #define LN_set_msgExt "message extensions" #define NID_set_msgExt 514 #define OBJ_set_msgExt OBJ_id_set,1L #define SN_set_attr "set-attr" #define NID_set_attr 515 #define OBJ_set_attr OBJ_id_set,3L #define SN_set_policy "set-policy" #define NID_set_policy 516 #define OBJ_set_policy OBJ_id_set,5L #define SN_set_certExt "set-certExt" #define LN_set_certExt "certificate extensions" #define NID_set_certExt 517 #define OBJ_set_certExt OBJ_id_set,7L #define SN_set_brand "set-brand" #define NID_set_brand 518 #define OBJ_set_brand OBJ_id_set,8L #define SN_setct_PANData "setct-PANData" #define NID_setct_PANData 519 #define OBJ_setct_PANData OBJ_set_ctype,0L #define SN_setct_PANToken "setct-PANToken" #define NID_setct_PANToken 520 #define OBJ_setct_PANToken OBJ_set_ctype,1L #define SN_setct_PANOnly "setct-PANOnly" #define NID_setct_PANOnly 521 #define OBJ_setct_PANOnly OBJ_set_ctype,2L #define SN_setct_OIData "setct-OIData" #define NID_setct_OIData 522 #define OBJ_setct_OIData OBJ_set_ctype,3L #define SN_setct_PI "setct-PI" #define NID_setct_PI 523 #define OBJ_setct_PI OBJ_set_ctype,4L #define SN_setct_PIData "setct-PIData" #define NID_setct_PIData 524 #define OBJ_setct_PIData OBJ_set_ctype,5L #define SN_setct_PIDataUnsigned "setct-PIDataUnsigned" #define NID_setct_PIDataUnsigned 525 #define OBJ_setct_PIDataUnsigned OBJ_set_ctype,6L #define SN_setct_HODInput "setct-HODInput" #define NID_setct_HODInput 526 #define OBJ_setct_HODInput OBJ_set_ctype,7L #define SN_setct_AuthResBaggage "setct-AuthResBaggage" #define NID_setct_AuthResBaggage 527 #define OBJ_setct_AuthResBaggage OBJ_set_ctype,8L #define SN_setct_AuthRevReqBaggage "setct-AuthRevReqBaggage" #define NID_setct_AuthRevReqBaggage 528 #define OBJ_setct_AuthRevReqBaggage OBJ_set_ctype,9L #define SN_setct_AuthRevResBaggage "setct-AuthRevResBaggage" #define NID_setct_AuthRevResBaggage 529 #define OBJ_setct_AuthRevResBaggage OBJ_set_ctype,10L #define SN_setct_CapTokenSeq "setct-CapTokenSeq" #define NID_setct_CapTokenSeq 530 #define OBJ_setct_CapTokenSeq OBJ_set_ctype,11L #define SN_setct_PInitResData "setct-PInitResData" #define NID_setct_PInitResData 531 #define OBJ_setct_PInitResData OBJ_set_ctype,12L #define SN_setct_PI_TBS "setct-PI-TBS" #define NID_setct_PI_TBS 532 #define OBJ_setct_PI_TBS OBJ_set_ctype,13L #define SN_setct_PResData "setct-PResData" #define NID_setct_PResData 533 #define OBJ_setct_PResData OBJ_set_ctype,14L #define SN_setct_AuthReqTBS "setct-AuthReqTBS" #define NID_setct_AuthReqTBS 534 #define OBJ_setct_AuthReqTBS OBJ_set_ctype,16L #define SN_setct_AuthResTBS "setct-AuthResTBS" #define NID_setct_AuthResTBS 535 #define OBJ_setct_AuthResTBS OBJ_set_ctype,17L #define SN_setct_AuthResTBSX "setct-AuthResTBSX" #define NID_setct_AuthResTBSX 536 #define OBJ_setct_AuthResTBSX OBJ_set_ctype,18L #define SN_setct_AuthTokenTBS "setct-AuthTokenTBS" #define NID_setct_AuthTokenTBS 537 #define OBJ_setct_AuthTokenTBS OBJ_set_ctype,19L #define SN_setct_CapTokenData "setct-CapTokenData" #define NID_setct_CapTokenData 538 #define OBJ_setct_CapTokenData OBJ_set_ctype,20L #define SN_setct_CapTokenTBS "setct-CapTokenTBS" #define NID_setct_CapTokenTBS 539 #define OBJ_setct_CapTokenTBS OBJ_set_ctype,21L #define SN_setct_AcqCardCodeMsg "setct-AcqCardCodeMsg" #define NID_setct_AcqCardCodeMsg 540 #define OBJ_setct_AcqCardCodeMsg OBJ_set_ctype,22L #define SN_setct_AuthRevReqTBS "setct-AuthRevReqTBS" #define NID_setct_AuthRevReqTBS 541 #define OBJ_setct_AuthRevReqTBS OBJ_set_ctype,23L #define SN_setct_AuthRevResData "setct-AuthRevResData" #define NID_setct_AuthRevResData 542 #define OBJ_setct_AuthRevResData OBJ_set_ctype,24L #define SN_setct_AuthRevResTBS "setct-AuthRevResTBS" #define NID_setct_AuthRevResTBS 543 #define OBJ_setct_AuthRevResTBS OBJ_set_ctype,25L #define SN_setct_CapReqTBS "setct-CapReqTBS" #define NID_setct_CapReqTBS 544 #define OBJ_setct_CapReqTBS OBJ_set_ctype,26L #define SN_setct_CapReqTBSX "setct-CapReqTBSX" #define NID_setct_CapReqTBSX 545 #define OBJ_setct_CapReqTBSX OBJ_set_ctype,27L #define SN_setct_CapResData "setct-CapResData" #define NID_setct_CapResData 546 #define OBJ_setct_CapResData OBJ_set_ctype,28L #define SN_setct_CapRevReqTBS "setct-CapRevReqTBS" #define NID_setct_CapRevReqTBS 547 #define OBJ_setct_CapRevReqTBS OBJ_set_ctype,29L #define SN_setct_CapRevReqTBSX "setct-CapRevReqTBSX" #define NID_setct_CapRevReqTBSX 548 #define OBJ_setct_CapRevReqTBSX OBJ_set_ctype,30L #define SN_setct_CapRevResData "setct-CapRevResData" #define NID_setct_CapRevResData 549 #define OBJ_setct_CapRevResData OBJ_set_ctype,31L #define SN_setct_CredReqTBS "setct-CredReqTBS" #define NID_setct_CredReqTBS 550 #define OBJ_setct_CredReqTBS OBJ_set_ctype,32L #define SN_setct_CredReqTBSX "setct-CredReqTBSX" #define NID_setct_CredReqTBSX 551 #define OBJ_setct_CredReqTBSX OBJ_set_ctype,33L #define SN_setct_CredResData "setct-CredResData" #define NID_setct_CredResData 552 #define OBJ_setct_CredResData OBJ_set_ctype,34L #define SN_setct_CredRevReqTBS "setct-CredRevReqTBS" #define NID_setct_CredRevReqTBS 553 #define OBJ_setct_CredRevReqTBS OBJ_set_ctype,35L #define SN_setct_CredRevReqTBSX "setct-CredRevReqTBSX" #define NID_setct_CredRevReqTBSX 554 #define OBJ_setct_CredRevReqTBSX OBJ_set_ctype,36L #define SN_setct_CredRevResData "setct-CredRevResData" #define NID_setct_CredRevResData 555 #define OBJ_setct_CredRevResData OBJ_set_ctype,37L #define SN_setct_PCertReqData "setct-PCertReqData" #define NID_setct_PCertReqData 556 #define OBJ_setct_PCertReqData OBJ_set_ctype,38L #define SN_setct_PCertResTBS "setct-PCertResTBS" #define NID_setct_PCertResTBS 557 #define OBJ_setct_PCertResTBS OBJ_set_ctype,39L #define SN_setct_BatchAdminReqData "setct-BatchAdminReqData" #define NID_setct_BatchAdminReqData 558 #define OBJ_setct_BatchAdminReqData OBJ_set_ctype,40L #define SN_setct_BatchAdminResData "setct-BatchAdminResData" #define NID_setct_BatchAdminResData 559 #define OBJ_setct_BatchAdminResData OBJ_set_ctype,41L #define SN_setct_CardCInitResTBS "setct-CardCInitResTBS" #define NID_setct_CardCInitResTBS 560 #define OBJ_setct_CardCInitResTBS OBJ_set_ctype,42L #define SN_setct_MeAqCInitResTBS "setct-MeAqCInitResTBS" #define NID_setct_MeAqCInitResTBS 561 #define OBJ_setct_MeAqCInitResTBS OBJ_set_ctype,43L #define SN_setct_RegFormResTBS "setct-RegFormResTBS" #define NID_setct_RegFormResTBS 562 #define OBJ_setct_RegFormResTBS OBJ_set_ctype,44L #define SN_setct_CertReqData "setct-CertReqData" #define NID_setct_CertReqData 563 #define OBJ_setct_CertReqData OBJ_set_ctype,45L #define SN_setct_CertReqTBS "setct-CertReqTBS" #define NID_setct_CertReqTBS 564 #define OBJ_setct_CertReqTBS OBJ_set_ctype,46L #define SN_setct_CertResData "setct-CertResData" #define NID_setct_CertResData 565 #define OBJ_setct_CertResData OBJ_set_ctype,47L #define SN_setct_CertInqReqTBS "setct-CertInqReqTBS" #define NID_setct_CertInqReqTBS 566 #define OBJ_setct_CertInqReqTBS OBJ_set_ctype,48L #define SN_setct_ErrorTBS "setct-ErrorTBS" #define NID_setct_ErrorTBS 567 #define OBJ_setct_ErrorTBS OBJ_set_ctype,49L #define SN_setct_PIDualSignedTBE "setct-PIDualSignedTBE" #define NID_setct_PIDualSignedTBE 568 #define OBJ_setct_PIDualSignedTBE OBJ_set_ctype,50L #define SN_setct_PIUnsignedTBE "setct-PIUnsignedTBE" #define NID_setct_PIUnsignedTBE 569 #define OBJ_setct_PIUnsignedTBE OBJ_set_ctype,51L #define SN_setct_AuthReqTBE "setct-AuthReqTBE" #define NID_setct_AuthReqTBE 570 #define OBJ_setct_AuthReqTBE OBJ_set_ctype,52L #define SN_setct_AuthResTBE "setct-AuthResTBE" #define NID_setct_AuthResTBE 571 #define OBJ_setct_AuthResTBE OBJ_set_ctype,53L #define SN_setct_AuthResTBEX "setct-AuthResTBEX" #define NID_setct_AuthResTBEX 572 #define OBJ_setct_AuthResTBEX OBJ_set_ctype,54L #define SN_setct_AuthTokenTBE "setct-AuthTokenTBE" #define NID_setct_AuthTokenTBE 573 #define OBJ_setct_AuthTokenTBE OBJ_set_ctype,55L #define SN_setct_CapTokenTBE "setct-CapTokenTBE" #define NID_setct_CapTokenTBE 574 #define OBJ_setct_CapTokenTBE OBJ_set_ctype,56L #define SN_setct_CapTokenTBEX "setct-CapTokenTBEX" #define NID_setct_CapTokenTBEX 575 #define OBJ_setct_CapTokenTBEX OBJ_set_ctype,57L #define SN_setct_AcqCardCodeMsgTBE "setct-AcqCardCodeMsgTBE" #define NID_setct_AcqCardCodeMsgTBE 576 #define OBJ_setct_AcqCardCodeMsgTBE OBJ_set_ctype,58L #define SN_setct_AuthRevReqTBE "setct-AuthRevReqTBE" #define NID_setct_AuthRevReqTBE 577 #define OBJ_setct_AuthRevReqTBE OBJ_set_ctype,59L #define SN_setct_AuthRevResTBE "setct-AuthRevResTBE" #define NID_setct_AuthRevResTBE 578 #define OBJ_setct_AuthRevResTBE OBJ_set_ctype,60L #define SN_setct_AuthRevResTBEB "setct-AuthRevResTBEB" #define NID_setct_AuthRevResTBEB 579 #define OBJ_setct_AuthRevResTBEB OBJ_set_ctype,61L #define SN_setct_CapReqTBE "setct-CapReqTBE" #define NID_setct_CapReqTBE 580 #define OBJ_setct_CapReqTBE OBJ_set_ctype,62L #define SN_setct_CapReqTBEX "setct-CapReqTBEX" #define NID_setct_CapReqTBEX 581 #define OBJ_setct_CapReqTBEX OBJ_set_ctype,63L #define SN_setct_CapResTBE "setct-CapResTBE" #define NID_setct_CapResTBE 582 #define OBJ_setct_CapResTBE OBJ_set_ctype,64L #define SN_setct_CapRevReqTBE "setct-CapRevReqTBE" #define NID_setct_CapRevReqTBE 583 #define OBJ_setct_CapRevReqTBE OBJ_set_ctype,65L #define SN_setct_CapRevReqTBEX "setct-CapRevReqTBEX" #define NID_setct_CapRevReqTBEX 584 #define OBJ_setct_CapRevReqTBEX OBJ_set_ctype,66L #define SN_setct_CapRevResTBE "setct-CapRevResTBE" #define NID_setct_CapRevResTBE 585 #define OBJ_setct_CapRevResTBE OBJ_set_ctype,67L #define SN_setct_CredReqTBE "setct-CredReqTBE" #define NID_setct_CredReqTBE 586 #define OBJ_setct_CredReqTBE OBJ_set_ctype,68L #define SN_setct_CredReqTBEX "setct-CredReqTBEX" #define NID_setct_CredReqTBEX 587 #define OBJ_setct_CredReqTBEX OBJ_set_ctype,69L #define SN_setct_CredResTBE "setct-CredResTBE" #define NID_setct_CredResTBE 588 #define OBJ_setct_CredResTBE OBJ_set_ctype,70L #define SN_setct_CredRevReqTBE "setct-CredRevReqTBE" #define NID_setct_CredRevReqTBE 589 #define OBJ_setct_CredRevReqTBE OBJ_set_ctype,71L #define SN_setct_CredRevReqTBEX "setct-CredRevReqTBEX" #define NID_setct_CredRevReqTBEX 590 #define OBJ_setct_CredRevReqTBEX OBJ_set_ctype,72L #define SN_setct_CredRevResTBE "setct-CredRevResTBE" #define NID_setct_CredRevResTBE 591 #define OBJ_setct_CredRevResTBE OBJ_set_ctype,73L #define SN_setct_BatchAdminReqTBE "setct-BatchAdminReqTBE" #define NID_setct_BatchAdminReqTBE 592 #define OBJ_setct_BatchAdminReqTBE OBJ_set_ctype,74L #define SN_setct_BatchAdminResTBE "setct-BatchAdminResTBE" #define NID_setct_BatchAdminResTBE 593 #define OBJ_setct_BatchAdminResTBE OBJ_set_ctype,75L #define SN_setct_RegFormReqTBE "setct-RegFormReqTBE" #define NID_setct_RegFormReqTBE 594 #define OBJ_setct_RegFormReqTBE OBJ_set_ctype,76L #define SN_setct_CertReqTBE "setct-CertReqTBE" #define NID_setct_CertReqTBE 595 #define OBJ_setct_CertReqTBE OBJ_set_ctype,77L #define SN_setct_CertReqTBEX "setct-CertReqTBEX" #define NID_setct_CertReqTBEX 596 #define OBJ_setct_CertReqTBEX OBJ_set_ctype,78L #define SN_setct_CertResTBE "setct-CertResTBE" #define NID_setct_CertResTBE 597 #define OBJ_setct_CertResTBE OBJ_set_ctype,79L #define SN_setct_CRLNotificationTBS "setct-CRLNotificationTBS" #define NID_setct_CRLNotificationTBS 598 #define OBJ_setct_CRLNotificationTBS OBJ_set_ctype,80L #define SN_setct_CRLNotificationResTBS "setct-CRLNotificationResTBS" #define NID_setct_CRLNotificationResTBS 599 #define OBJ_setct_CRLNotificationResTBS OBJ_set_ctype,81L #define SN_setct_BCIDistributionTBS "setct-BCIDistributionTBS" #define NID_setct_BCIDistributionTBS 600 #define OBJ_setct_BCIDistributionTBS OBJ_set_ctype,82L #define SN_setext_genCrypt "setext-genCrypt" #define LN_setext_genCrypt "generic cryptogram" #define NID_setext_genCrypt 601 #define OBJ_setext_genCrypt OBJ_set_msgExt,1L #define SN_setext_miAuth "setext-miAuth" #define LN_setext_miAuth "merchant initiated auth" #define NID_setext_miAuth 602 #define OBJ_setext_miAuth OBJ_set_msgExt,3L #define SN_setext_pinSecure "setext-pinSecure" #define NID_setext_pinSecure 603 #define OBJ_setext_pinSecure OBJ_set_msgExt,4L #define SN_setext_pinAny "setext-pinAny" #define NID_setext_pinAny 604 #define OBJ_setext_pinAny OBJ_set_msgExt,5L #define SN_setext_track2 "setext-track2" #define NID_setext_track2 605 #define OBJ_setext_track2 OBJ_set_msgExt,7L #define SN_setext_cv "setext-cv" #define LN_setext_cv "additional verification" #define NID_setext_cv 606 #define OBJ_setext_cv OBJ_set_msgExt,8L #define SN_set_policy_root "set-policy-root" #define NID_set_policy_root 607 #define OBJ_set_policy_root OBJ_set_policy,0L #define SN_setCext_hashedRoot "setCext-hashedRoot" #define NID_setCext_hashedRoot 608 #define OBJ_setCext_hashedRoot OBJ_set_certExt,0L #define SN_setCext_certType "setCext-certType" #define NID_setCext_certType 609 #define OBJ_setCext_certType OBJ_set_certExt,1L #define SN_setCext_merchData "setCext-merchData" #define NID_setCext_merchData 610 #define OBJ_setCext_merchData OBJ_set_certExt,2L #define SN_setCext_cCertRequired "setCext-cCertRequired" #define NID_setCext_cCertRequired 611 #define OBJ_setCext_cCertRequired OBJ_set_certExt,3L #define SN_setCext_tunneling "setCext-tunneling" #define NID_setCext_tunneling 612 #define OBJ_setCext_tunneling OBJ_set_certExt,4L #define SN_setCext_setExt "setCext-setExt" #define NID_setCext_setExt 613 #define OBJ_setCext_setExt OBJ_set_certExt,5L #define SN_setCext_setQualf "setCext-setQualf" #define NID_setCext_setQualf 614 #define OBJ_setCext_setQualf OBJ_set_certExt,6L #define SN_setCext_PGWYcapabilities "setCext-PGWYcapabilities" #define NID_setCext_PGWYcapabilities 615 #define OBJ_setCext_PGWYcapabilities OBJ_set_certExt,7L #define SN_setCext_TokenIdentifier "setCext-TokenIdentifier" #define NID_setCext_TokenIdentifier 616 #define OBJ_setCext_TokenIdentifier OBJ_set_certExt,8L #define SN_setCext_Track2Data "setCext-Track2Data" #define NID_setCext_Track2Data 617 #define OBJ_setCext_Track2Data OBJ_set_certExt,9L #define SN_setCext_TokenType "setCext-TokenType" #define NID_setCext_TokenType 618 #define OBJ_setCext_TokenType OBJ_set_certExt,10L #define SN_setCext_IssuerCapabilities "setCext-IssuerCapabilities" #define NID_setCext_IssuerCapabilities 619 #define OBJ_setCext_IssuerCapabilities OBJ_set_certExt,11L #define SN_setAttr_Cert "setAttr-Cert" #define NID_setAttr_Cert 620 #define OBJ_setAttr_Cert OBJ_set_attr,0L #define SN_setAttr_PGWYcap "setAttr-PGWYcap" #define LN_setAttr_PGWYcap "payment gateway capabilities" #define NID_setAttr_PGWYcap 621 #define OBJ_setAttr_PGWYcap OBJ_set_attr,1L #define SN_setAttr_TokenType "setAttr-TokenType" #define NID_setAttr_TokenType 622 #define OBJ_setAttr_TokenType OBJ_set_attr,2L #define SN_setAttr_IssCap "setAttr-IssCap" #define LN_setAttr_IssCap "issuer capabilities" #define NID_setAttr_IssCap 623 #define OBJ_setAttr_IssCap OBJ_set_attr,3L #define SN_set_rootKeyThumb "set-rootKeyThumb" #define NID_set_rootKeyThumb 624 #define OBJ_set_rootKeyThumb OBJ_setAttr_Cert,0L #define SN_set_addPolicy "set-addPolicy" #define NID_set_addPolicy 625 #define OBJ_set_addPolicy OBJ_setAttr_Cert,1L #define SN_setAttr_Token_EMV "setAttr-Token-EMV" #define NID_setAttr_Token_EMV 626 #define OBJ_setAttr_Token_EMV OBJ_setAttr_TokenType,1L #define SN_setAttr_Token_B0Prime "setAttr-Token-B0Prime" #define NID_setAttr_Token_B0Prime 627 #define OBJ_setAttr_Token_B0Prime OBJ_setAttr_TokenType,2L #define SN_setAttr_IssCap_CVM "setAttr-IssCap-CVM" #define NID_setAttr_IssCap_CVM 628 #define OBJ_setAttr_IssCap_CVM OBJ_setAttr_IssCap,3L #define SN_setAttr_IssCap_T2 "setAttr-IssCap-T2" #define NID_setAttr_IssCap_T2 629 #define OBJ_setAttr_IssCap_T2 OBJ_setAttr_IssCap,4L #define SN_setAttr_IssCap_Sig "setAttr-IssCap-Sig" #define NID_setAttr_IssCap_Sig 630 #define OBJ_setAttr_IssCap_Sig OBJ_setAttr_IssCap,5L #define SN_setAttr_GenCryptgrm "setAttr-GenCryptgrm" #define LN_setAttr_GenCryptgrm "generate cryptogram" #define NID_setAttr_GenCryptgrm 631 #define OBJ_setAttr_GenCryptgrm OBJ_setAttr_IssCap_CVM,1L #define SN_setAttr_T2Enc "setAttr-T2Enc" #define LN_setAttr_T2Enc "encrypted track 2" #define NID_setAttr_T2Enc 632 #define OBJ_setAttr_T2Enc OBJ_setAttr_IssCap_T2,1L #define SN_setAttr_T2cleartxt "setAttr-T2cleartxt" #define LN_setAttr_T2cleartxt "cleartext track 2" #define NID_setAttr_T2cleartxt 633 #define OBJ_setAttr_T2cleartxt OBJ_setAttr_IssCap_T2,2L #define SN_setAttr_TokICCsig "setAttr-TokICCsig" #define LN_setAttr_TokICCsig "ICC or token signature" #define NID_setAttr_TokICCsig 634 #define OBJ_setAttr_TokICCsig OBJ_setAttr_IssCap_Sig,1L #define SN_setAttr_SecDevSig "setAttr-SecDevSig" #define LN_setAttr_SecDevSig "secure device signature" #define NID_setAttr_SecDevSig 635 #define OBJ_setAttr_SecDevSig OBJ_setAttr_IssCap_Sig,2L #define SN_set_brand_IATA_ATA "set-brand-IATA-ATA" #define NID_set_brand_IATA_ATA 636 #define OBJ_set_brand_IATA_ATA OBJ_set_brand,1L #define SN_set_brand_Diners "set-brand-Diners" #define NID_set_brand_Diners 637 #define OBJ_set_brand_Diners OBJ_set_brand,30L #define SN_set_brand_AmericanExpress "set-brand-AmericanExpress" #define NID_set_brand_AmericanExpress 638 #define OBJ_set_brand_AmericanExpress OBJ_set_brand,34L #define SN_set_brand_JCB "set-brand-JCB" #define NID_set_brand_JCB 639 #define OBJ_set_brand_JCB OBJ_set_brand,35L #define SN_set_brand_Visa "set-brand-Visa" #define NID_set_brand_Visa 640 #define OBJ_set_brand_Visa OBJ_set_brand,4L #define SN_set_brand_MasterCard "set-brand-MasterCard" #define NID_set_brand_MasterCard 641 #define OBJ_set_brand_MasterCard OBJ_set_brand,5L #define SN_set_brand_Novus "set-brand-Novus" #define NID_set_brand_Novus 642 #define OBJ_set_brand_Novus OBJ_set_brand,6011L #define SN_des_cdmf "DES-CDMF" #define LN_des_cdmf "des-cdmf" #define NID_des_cdmf 643 #define OBJ_des_cdmf OBJ_rsadsi,3L,10L #define SN_rsaOAEPEncryptionSET "rsaOAEPEncryptionSET" #define NID_rsaOAEPEncryptionSET 644 #define OBJ_rsaOAEPEncryptionSET OBJ_rsadsi,1L,1L,6L #define SN_ipsec3 "Oakley-EC2N-3" #define LN_ipsec3 "ipsec3" #define NID_ipsec3 749 #define SN_ipsec4 "Oakley-EC2N-4" #define LN_ipsec4 "ipsec4" #define NID_ipsec4 750 #define SN_whirlpool "whirlpool" #define NID_whirlpool 804 #define OBJ_whirlpool OBJ_iso,0L,10118L,3L,0L,55L #define SN_cryptopro "cryptopro" #define NID_cryptopro 805 #define OBJ_cryptopro OBJ_member_body,643L,2L,2L #define SN_cryptocom "cryptocom" #define NID_cryptocom 806 #define OBJ_cryptocom OBJ_member_body,643L,2L,9L #define SN_id_tc26 "id-tc26" #define NID_id_tc26 974 #define OBJ_id_tc26 OBJ_member_body,643L,7L,1L #define SN_id_GostR3411_94_with_GostR3410_2001 "id-GostR3411-94-with-GostR3410-2001" #define LN_id_GostR3411_94_with_GostR3410_2001 "GOST R 34.11-94 with GOST R 34.10-2001" #define NID_id_GostR3411_94_with_GostR3410_2001 807 #define OBJ_id_GostR3411_94_with_GostR3410_2001 OBJ_cryptopro,3L #define SN_id_GostR3411_94_with_GostR3410_94 "id-GostR3411-94-with-GostR3410-94" #define LN_id_GostR3411_94_with_GostR3410_94 "GOST R 34.11-94 with GOST R 34.10-94" #define NID_id_GostR3411_94_with_GostR3410_94 808 #define OBJ_id_GostR3411_94_with_GostR3410_94 OBJ_cryptopro,4L #define SN_id_GostR3411_94 "md_gost94" #define LN_id_GostR3411_94 "GOST R 34.11-94" #define NID_id_GostR3411_94 809 #define OBJ_id_GostR3411_94 OBJ_cryptopro,9L #define SN_id_HMACGostR3411_94 "id-HMACGostR3411-94" #define LN_id_HMACGostR3411_94 "HMAC GOST 34.11-94" #define NID_id_HMACGostR3411_94 810 #define OBJ_id_HMACGostR3411_94 OBJ_cryptopro,10L #define SN_id_GostR3410_2001 "gost2001" #define LN_id_GostR3410_2001 "GOST R 34.10-2001" #define NID_id_GostR3410_2001 811 #define OBJ_id_GostR3410_2001 OBJ_cryptopro,19L #define SN_id_GostR3410_94 "gost94" #define LN_id_GostR3410_94 "GOST R 34.10-94" #define NID_id_GostR3410_94 812 #define OBJ_id_GostR3410_94 OBJ_cryptopro,20L #define SN_id_Gost28147_89 "gost89" #define LN_id_Gost28147_89 "GOST 28147-89" #define NID_id_Gost28147_89 813 #define OBJ_id_Gost28147_89 OBJ_cryptopro,21L #define SN_gost89_cnt "gost89-cnt" #define NID_gost89_cnt 814 #define SN_gost89_cnt_12 "gost89-cnt-12" #define NID_gost89_cnt_12 975 #define SN_gost89_cbc "gost89-cbc" #define NID_gost89_cbc 1009 #define SN_gost89_ecb "gost89-ecb" #define NID_gost89_ecb 1010 #define SN_gost89_ctr "gost89-ctr" #define NID_gost89_ctr 1011 #define SN_id_Gost28147_89_MAC "gost-mac" #define LN_id_Gost28147_89_MAC "GOST 28147-89 MAC" #define NID_id_Gost28147_89_MAC 815 #define OBJ_id_Gost28147_89_MAC OBJ_cryptopro,22L #define SN_gost_mac_12 "gost-mac-12" #define NID_gost_mac_12 976 #define SN_id_GostR3411_94_prf "prf-gostr3411-94" #define LN_id_GostR3411_94_prf "GOST R 34.11-94 PRF" #define NID_id_GostR3411_94_prf 816 #define OBJ_id_GostR3411_94_prf OBJ_cryptopro,23L #define SN_id_GostR3410_2001DH "id-GostR3410-2001DH" #define LN_id_GostR3410_2001DH "GOST R 34.10-2001 DH" #define NID_id_GostR3410_2001DH 817 #define OBJ_id_GostR3410_2001DH OBJ_cryptopro,98L #define SN_id_GostR3410_94DH "id-GostR3410-94DH" #define LN_id_GostR3410_94DH "GOST R 34.10-94 DH" #define NID_id_GostR3410_94DH 818 #define OBJ_id_GostR3410_94DH OBJ_cryptopro,99L #define SN_id_Gost28147_89_CryptoPro_KeyMeshing "id-Gost28147-89-CryptoPro-KeyMeshing" #define NID_id_Gost28147_89_CryptoPro_KeyMeshing 819 #define OBJ_id_Gost28147_89_CryptoPro_KeyMeshing OBJ_cryptopro,14L,1L #define SN_id_Gost28147_89_None_KeyMeshing "id-Gost28147-89-None-KeyMeshing" #define NID_id_Gost28147_89_None_KeyMeshing 820 #define OBJ_id_Gost28147_89_None_KeyMeshing OBJ_cryptopro,14L,0L #define SN_id_GostR3411_94_TestParamSet "id-GostR3411-94-TestParamSet" #define NID_id_GostR3411_94_TestParamSet 821 #define OBJ_id_GostR3411_94_TestParamSet OBJ_cryptopro,30L,0L #define SN_id_GostR3411_94_CryptoProParamSet "id-GostR3411-94-CryptoProParamSet" #define NID_id_GostR3411_94_CryptoProParamSet 822 #define OBJ_id_GostR3411_94_CryptoProParamSet OBJ_cryptopro,30L,1L #define SN_id_Gost28147_89_TestParamSet "id-Gost28147-89-TestParamSet" #define NID_id_Gost28147_89_TestParamSet 823 #define OBJ_id_Gost28147_89_TestParamSet OBJ_cryptopro,31L,0L #define SN_id_Gost28147_89_CryptoPro_A_ParamSet "id-Gost28147-89-CryptoPro-A-ParamSet" #define NID_id_Gost28147_89_CryptoPro_A_ParamSet 824 #define OBJ_id_Gost28147_89_CryptoPro_A_ParamSet OBJ_cryptopro,31L,1L #define SN_id_Gost28147_89_CryptoPro_B_ParamSet "id-Gost28147-89-CryptoPro-B-ParamSet" #define NID_id_Gost28147_89_CryptoPro_B_ParamSet 825 #define OBJ_id_Gost28147_89_CryptoPro_B_ParamSet OBJ_cryptopro,31L,2L #define SN_id_Gost28147_89_CryptoPro_C_ParamSet "id-Gost28147-89-CryptoPro-C-ParamSet" #define NID_id_Gost28147_89_CryptoPro_C_ParamSet 826 #define OBJ_id_Gost28147_89_CryptoPro_C_ParamSet OBJ_cryptopro,31L,3L #define SN_id_Gost28147_89_CryptoPro_D_ParamSet "id-Gost28147-89-CryptoPro-D-ParamSet" #define NID_id_Gost28147_89_CryptoPro_D_ParamSet 827 #define OBJ_id_Gost28147_89_CryptoPro_D_ParamSet OBJ_cryptopro,31L,4L #define SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet" #define NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet 828 #define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet OBJ_cryptopro,31L,5L #define SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet "id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet" #define NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet 829 #define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet OBJ_cryptopro,31L,6L #define SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet "id-Gost28147-89-CryptoPro-RIC-1-ParamSet" #define NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet 830 #define OBJ_id_Gost28147_89_CryptoPro_RIC_1_ParamSet OBJ_cryptopro,31L,7L #define SN_id_GostR3410_94_TestParamSet "id-GostR3410-94-TestParamSet" #define NID_id_GostR3410_94_TestParamSet 831 #define OBJ_id_GostR3410_94_TestParamSet OBJ_cryptopro,32L,0L #define SN_id_GostR3410_94_CryptoPro_A_ParamSet "id-GostR3410-94-CryptoPro-A-ParamSet" #define NID_id_GostR3410_94_CryptoPro_A_ParamSet 832 #define OBJ_id_GostR3410_94_CryptoPro_A_ParamSet OBJ_cryptopro,32L,2L #define SN_id_GostR3410_94_CryptoPro_B_ParamSet "id-GostR3410-94-CryptoPro-B-ParamSet" #define NID_id_GostR3410_94_CryptoPro_B_ParamSet 833 #define OBJ_id_GostR3410_94_CryptoPro_B_ParamSet OBJ_cryptopro,32L,3L #define SN_id_GostR3410_94_CryptoPro_C_ParamSet "id-GostR3410-94-CryptoPro-C-ParamSet" #define NID_id_GostR3410_94_CryptoPro_C_ParamSet 834 #define OBJ_id_GostR3410_94_CryptoPro_C_ParamSet OBJ_cryptopro,32L,4L #define SN_id_GostR3410_94_CryptoPro_D_ParamSet "id-GostR3410-94-CryptoPro-D-ParamSet" #define NID_id_GostR3410_94_CryptoPro_D_ParamSet 835 #define OBJ_id_GostR3410_94_CryptoPro_D_ParamSet OBJ_cryptopro,32L,5L #define SN_id_GostR3410_94_CryptoPro_XchA_ParamSet "id-GostR3410-94-CryptoPro-XchA-ParamSet" #define NID_id_GostR3410_94_CryptoPro_XchA_ParamSet 836 #define OBJ_id_GostR3410_94_CryptoPro_XchA_ParamSet OBJ_cryptopro,33L,1L #define SN_id_GostR3410_94_CryptoPro_XchB_ParamSet "id-GostR3410-94-CryptoPro-XchB-ParamSet" #define NID_id_GostR3410_94_CryptoPro_XchB_ParamSet 837 #define OBJ_id_GostR3410_94_CryptoPro_XchB_ParamSet OBJ_cryptopro,33L,2L #define SN_id_GostR3410_94_CryptoPro_XchC_ParamSet "id-GostR3410-94-CryptoPro-XchC-ParamSet" #define NID_id_GostR3410_94_CryptoPro_XchC_ParamSet 838 #define OBJ_id_GostR3410_94_CryptoPro_XchC_ParamSet OBJ_cryptopro,33L,3L #define SN_id_GostR3410_2001_TestParamSet "id-GostR3410-2001-TestParamSet" #define NID_id_GostR3410_2001_TestParamSet 839 #define OBJ_id_GostR3410_2001_TestParamSet OBJ_cryptopro,35L,0L #define SN_id_GostR3410_2001_CryptoPro_A_ParamSet "id-GostR3410-2001-CryptoPro-A-ParamSet" #define NID_id_GostR3410_2001_CryptoPro_A_ParamSet 840 #define OBJ_id_GostR3410_2001_CryptoPro_A_ParamSet OBJ_cryptopro,35L,1L #define SN_id_GostR3410_2001_CryptoPro_B_ParamSet "id-GostR3410-2001-CryptoPro-B-ParamSet" #define NID_id_GostR3410_2001_CryptoPro_B_ParamSet 841 #define OBJ_id_GostR3410_2001_CryptoPro_B_ParamSet OBJ_cryptopro,35L,2L #define SN_id_GostR3410_2001_CryptoPro_C_ParamSet "id-GostR3410-2001-CryptoPro-C-ParamSet" #define NID_id_GostR3410_2001_CryptoPro_C_ParamSet 842 #define OBJ_id_GostR3410_2001_CryptoPro_C_ParamSet OBJ_cryptopro,35L,3L #define SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet "id-GostR3410-2001-CryptoPro-XchA-ParamSet" #define NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet 843 #define OBJ_id_GostR3410_2001_CryptoPro_XchA_ParamSet OBJ_cryptopro,36L,0L #define SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet "id-GostR3410-2001-CryptoPro-XchB-ParamSet" #define NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet 844 #define OBJ_id_GostR3410_2001_CryptoPro_XchB_ParamSet OBJ_cryptopro,36L,1L #define SN_id_GostR3410_94_a "id-GostR3410-94-a" #define NID_id_GostR3410_94_a 845 #define OBJ_id_GostR3410_94_a OBJ_id_GostR3410_94,1L #define SN_id_GostR3410_94_aBis "id-GostR3410-94-aBis" #define NID_id_GostR3410_94_aBis 846 #define OBJ_id_GostR3410_94_aBis OBJ_id_GostR3410_94,2L #define SN_id_GostR3410_94_b "id-GostR3410-94-b" #define NID_id_GostR3410_94_b 847 #define OBJ_id_GostR3410_94_b OBJ_id_GostR3410_94,3L #define SN_id_GostR3410_94_bBis "id-GostR3410-94-bBis" #define NID_id_GostR3410_94_bBis 848 #define OBJ_id_GostR3410_94_bBis OBJ_id_GostR3410_94,4L #define SN_id_Gost28147_89_cc "id-Gost28147-89-cc" #define LN_id_Gost28147_89_cc "GOST 28147-89 Cryptocom ParamSet" #define NID_id_Gost28147_89_cc 849 #define OBJ_id_Gost28147_89_cc OBJ_cryptocom,1L,6L,1L #define SN_id_GostR3410_94_cc "gost94cc" #define LN_id_GostR3410_94_cc "GOST 34.10-94 Cryptocom" #define NID_id_GostR3410_94_cc 850 #define OBJ_id_GostR3410_94_cc OBJ_cryptocom,1L,5L,3L #define SN_id_GostR3410_2001_cc "gost2001cc" #define LN_id_GostR3410_2001_cc "GOST 34.10-2001 Cryptocom" #define NID_id_GostR3410_2001_cc 851 #define OBJ_id_GostR3410_2001_cc OBJ_cryptocom,1L,5L,4L #define SN_id_GostR3411_94_with_GostR3410_94_cc "id-GostR3411-94-with-GostR3410-94-cc" #define LN_id_GostR3411_94_with_GostR3410_94_cc "GOST R 34.11-94 with GOST R 34.10-94 Cryptocom" #define NID_id_GostR3411_94_with_GostR3410_94_cc 852 #define OBJ_id_GostR3411_94_with_GostR3410_94_cc OBJ_cryptocom,1L,3L,3L #define SN_id_GostR3411_94_with_GostR3410_2001_cc "id-GostR3411-94-with-GostR3410-2001-cc" #define LN_id_GostR3411_94_with_GostR3410_2001_cc "GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom" #define NID_id_GostR3411_94_with_GostR3410_2001_cc 853 #define OBJ_id_GostR3411_94_with_GostR3410_2001_cc OBJ_cryptocom,1L,3L,4L #define SN_id_GostR3410_2001_ParamSet_cc "id-GostR3410-2001-ParamSet-cc" #define LN_id_GostR3410_2001_ParamSet_cc "GOST R 3410-2001 Parameter Set Cryptocom" #define NID_id_GostR3410_2001_ParamSet_cc 854 #define OBJ_id_GostR3410_2001_ParamSet_cc OBJ_cryptocom,1L,8L,1L #define SN_id_tc26_algorithms "id-tc26-algorithms" #define NID_id_tc26_algorithms 977 #define OBJ_id_tc26_algorithms OBJ_id_tc26,1L #define SN_id_tc26_sign "id-tc26-sign" #define NID_id_tc26_sign 978 #define OBJ_id_tc26_sign OBJ_id_tc26_algorithms,1L #define SN_id_GostR3410_2012_256 "gost2012_256" #define LN_id_GostR3410_2012_256 "GOST R 34.10-2012 with 256 bit modulus" #define NID_id_GostR3410_2012_256 979 #define OBJ_id_GostR3410_2012_256 OBJ_id_tc26_sign,1L #define SN_id_GostR3410_2012_512 "gost2012_512" #define LN_id_GostR3410_2012_512 "GOST R 34.10-2012 with 512 bit modulus" #define NID_id_GostR3410_2012_512 980 #define OBJ_id_GostR3410_2012_512 OBJ_id_tc26_sign,2L #define SN_id_tc26_digest "id-tc26-digest" #define NID_id_tc26_digest 981 #define OBJ_id_tc26_digest OBJ_id_tc26_algorithms,2L #define SN_id_GostR3411_2012_256 "md_gost12_256" #define LN_id_GostR3411_2012_256 "GOST R 34.11-2012 with 256 bit hash" #define NID_id_GostR3411_2012_256 982 #define OBJ_id_GostR3411_2012_256 OBJ_id_tc26_digest,2L #define SN_id_GostR3411_2012_512 "md_gost12_512" #define LN_id_GostR3411_2012_512 "GOST R 34.11-2012 with 512 bit hash" #define NID_id_GostR3411_2012_512 983 #define OBJ_id_GostR3411_2012_512 OBJ_id_tc26_digest,3L #define SN_id_tc26_signwithdigest "id-tc26-signwithdigest" #define NID_id_tc26_signwithdigest 984 #define OBJ_id_tc26_signwithdigest OBJ_id_tc26_algorithms,3L #define SN_id_tc26_signwithdigest_gost3410_2012_256 "id-tc26-signwithdigest-gost3410-2012-256" #define LN_id_tc26_signwithdigest_gost3410_2012_256 "GOST R 34.10-2012 with GOST R 34.11-2012 (256 bit)" #define NID_id_tc26_signwithdigest_gost3410_2012_256 985 #define OBJ_id_tc26_signwithdigest_gost3410_2012_256 OBJ_id_tc26_signwithdigest,2L #define SN_id_tc26_signwithdigest_gost3410_2012_512 "id-tc26-signwithdigest-gost3410-2012-512" #define LN_id_tc26_signwithdigest_gost3410_2012_512 "GOST R 34.10-2012 with GOST R 34.11-2012 (512 bit)" #define NID_id_tc26_signwithdigest_gost3410_2012_512 986 #define OBJ_id_tc26_signwithdigest_gost3410_2012_512 OBJ_id_tc26_signwithdigest,3L #define SN_id_tc26_mac "id-tc26-mac" #define NID_id_tc26_mac 987 #define OBJ_id_tc26_mac OBJ_id_tc26_algorithms,4L #define SN_id_tc26_hmac_gost_3411_2012_256 "id-tc26-hmac-gost-3411-2012-256" #define LN_id_tc26_hmac_gost_3411_2012_256 "HMAC GOST 34.11-2012 256 bit" #define NID_id_tc26_hmac_gost_3411_2012_256 988 #define OBJ_id_tc26_hmac_gost_3411_2012_256 OBJ_id_tc26_mac,1L #define SN_id_tc26_hmac_gost_3411_2012_512 "id-tc26-hmac-gost-3411-2012-512" #define LN_id_tc26_hmac_gost_3411_2012_512 "HMAC GOST 34.11-2012 512 bit" #define NID_id_tc26_hmac_gost_3411_2012_512 989 #define OBJ_id_tc26_hmac_gost_3411_2012_512 OBJ_id_tc26_mac,2L #define SN_id_tc26_cipher "id-tc26-cipher" #define NID_id_tc26_cipher 990 #define OBJ_id_tc26_cipher OBJ_id_tc26_algorithms,5L #define SN_id_tc26_cipher_gostr3412_2015_magma "id-tc26-cipher-gostr3412-2015-magma" #define NID_id_tc26_cipher_gostr3412_2015_magma 1173 #define OBJ_id_tc26_cipher_gostr3412_2015_magma OBJ_id_tc26_cipher,1L #define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm "id-tc26-cipher-gostr3412-2015-magma-ctracpkm" #define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm 1174 #define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm OBJ_id_tc26_cipher_gostr3412_2015_magma,1L #define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac" #define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac 1175 #define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_magma,2L #define SN_id_tc26_cipher_gostr3412_2015_kuznyechik "id-tc26-cipher-gostr3412-2015-kuznyechik" #define NID_id_tc26_cipher_gostr3412_2015_kuznyechik 1176 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik OBJ_id_tc26_cipher,2L #define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm" #define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm 1177 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,1L #define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac" #define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac 1178 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,2L #define SN_id_tc26_agreement "id-tc26-agreement" #define NID_id_tc26_agreement 991 #define OBJ_id_tc26_agreement OBJ_id_tc26_algorithms,6L #define SN_id_tc26_agreement_gost_3410_2012_256 "id-tc26-agreement-gost-3410-2012-256" #define NID_id_tc26_agreement_gost_3410_2012_256 992 #define OBJ_id_tc26_agreement_gost_3410_2012_256 OBJ_id_tc26_agreement,1L #define SN_id_tc26_agreement_gost_3410_2012_512 "id-tc26-agreement-gost-3410-2012-512" #define NID_id_tc26_agreement_gost_3410_2012_512 993 #define OBJ_id_tc26_agreement_gost_3410_2012_512 OBJ_id_tc26_agreement,2L #define SN_id_tc26_wrap "id-tc26-wrap" #define NID_id_tc26_wrap 1179 #define OBJ_id_tc26_wrap OBJ_id_tc26_algorithms,7L #define SN_id_tc26_wrap_gostr3412_2015_magma "id-tc26-wrap-gostr3412-2015-magma" #define NID_id_tc26_wrap_gostr3412_2015_magma 1180 #define OBJ_id_tc26_wrap_gostr3412_2015_magma OBJ_id_tc26_wrap,1L #define SN_id_tc26_wrap_gostr3412_2015_magma_kexp15 "id-tc26-wrap-gostr3412-2015-magma-kexp15" #define NID_id_tc26_wrap_gostr3412_2015_magma_kexp15 1181 #define OBJ_id_tc26_wrap_gostr3412_2015_magma_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_magma,1L #define SN_id_tc26_wrap_gostr3412_2015_kuznyechik "id-tc26-wrap-gostr3412-2015-kuznyechik" #define NID_id_tc26_wrap_gostr3412_2015_kuznyechik 1182 #define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik OBJ_id_tc26_wrap,2L #define SN_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 "id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15" #define NID_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 1183 #define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik,1L #define SN_id_tc26_constants "id-tc26-constants" #define NID_id_tc26_constants 994 #define OBJ_id_tc26_constants OBJ_id_tc26,2L #define SN_id_tc26_sign_constants "id-tc26-sign-constants" #define NID_id_tc26_sign_constants 995 #define OBJ_id_tc26_sign_constants OBJ_id_tc26_constants,1L #define SN_id_tc26_gost_3410_2012_256_constants "id-tc26-gost-3410-2012-256-constants" #define NID_id_tc26_gost_3410_2012_256_constants 1147 #define OBJ_id_tc26_gost_3410_2012_256_constants OBJ_id_tc26_sign_constants,1L #define SN_id_tc26_gost_3410_2012_256_paramSetA "id-tc26-gost-3410-2012-256-paramSetA" #define LN_id_tc26_gost_3410_2012_256_paramSetA "GOST R 34.10-2012 (256 bit) ParamSet A" #define NID_id_tc26_gost_3410_2012_256_paramSetA 1148 #define OBJ_id_tc26_gost_3410_2012_256_paramSetA OBJ_id_tc26_gost_3410_2012_256_constants,1L #define SN_id_tc26_gost_3410_2012_256_paramSetB "id-tc26-gost-3410-2012-256-paramSetB" #define LN_id_tc26_gost_3410_2012_256_paramSetB "GOST R 34.10-2012 (256 bit) ParamSet B" #define NID_id_tc26_gost_3410_2012_256_paramSetB 1184 #define OBJ_id_tc26_gost_3410_2012_256_paramSetB OBJ_id_tc26_gost_3410_2012_256_constants,2L #define SN_id_tc26_gost_3410_2012_256_paramSetC "id-tc26-gost-3410-2012-256-paramSetC" #define LN_id_tc26_gost_3410_2012_256_paramSetC "GOST R 34.10-2012 (256 bit) ParamSet C" #define NID_id_tc26_gost_3410_2012_256_paramSetC 1185 #define OBJ_id_tc26_gost_3410_2012_256_paramSetC OBJ_id_tc26_gost_3410_2012_256_constants,3L #define SN_id_tc26_gost_3410_2012_256_paramSetD "id-tc26-gost-3410-2012-256-paramSetD" #define LN_id_tc26_gost_3410_2012_256_paramSetD "GOST R 34.10-2012 (256 bit) ParamSet D" #define NID_id_tc26_gost_3410_2012_256_paramSetD 1186 #define OBJ_id_tc26_gost_3410_2012_256_paramSetD OBJ_id_tc26_gost_3410_2012_256_constants,4L #define SN_id_tc26_gost_3410_2012_512_constants "id-tc26-gost-3410-2012-512-constants" #define NID_id_tc26_gost_3410_2012_512_constants 996 #define OBJ_id_tc26_gost_3410_2012_512_constants OBJ_id_tc26_sign_constants,2L #define SN_id_tc26_gost_3410_2012_512_paramSetTest "id-tc26-gost-3410-2012-512-paramSetTest" #define LN_id_tc26_gost_3410_2012_512_paramSetTest "GOST R 34.10-2012 (512 bit) testing parameter set" #define NID_id_tc26_gost_3410_2012_512_paramSetTest 997 #define OBJ_id_tc26_gost_3410_2012_512_paramSetTest OBJ_id_tc26_gost_3410_2012_512_constants,0L #define SN_id_tc26_gost_3410_2012_512_paramSetA "id-tc26-gost-3410-2012-512-paramSetA" #define LN_id_tc26_gost_3410_2012_512_paramSetA "GOST R 34.10-2012 (512 bit) ParamSet A" #define NID_id_tc26_gost_3410_2012_512_paramSetA 998 #define OBJ_id_tc26_gost_3410_2012_512_paramSetA OBJ_id_tc26_gost_3410_2012_512_constants,1L #define SN_id_tc26_gost_3410_2012_512_paramSetB "id-tc26-gost-3410-2012-512-paramSetB" #define LN_id_tc26_gost_3410_2012_512_paramSetB "GOST R 34.10-2012 (512 bit) ParamSet B" #define NID_id_tc26_gost_3410_2012_512_paramSetB 999 #define OBJ_id_tc26_gost_3410_2012_512_paramSetB OBJ_id_tc26_gost_3410_2012_512_constants,2L #define SN_id_tc26_gost_3410_2012_512_paramSetC "id-tc26-gost-3410-2012-512-paramSetC" #define LN_id_tc26_gost_3410_2012_512_paramSetC "GOST R 34.10-2012 (512 bit) ParamSet C" #define NID_id_tc26_gost_3410_2012_512_paramSetC 1149 #define OBJ_id_tc26_gost_3410_2012_512_paramSetC OBJ_id_tc26_gost_3410_2012_512_constants,3L #define SN_id_tc26_digest_constants "id-tc26-digest-constants" #define NID_id_tc26_digest_constants 1000 #define OBJ_id_tc26_digest_constants OBJ_id_tc26_constants,2L #define SN_id_tc26_cipher_constants "id-tc26-cipher-constants" #define NID_id_tc26_cipher_constants 1001 #define OBJ_id_tc26_cipher_constants OBJ_id_tc26_constants,5L #define SN_id_tc26_gost_28147_constants "id-tc26-gost-28147-constants" #define NID_id_tc26_gost_28147_constants 1002 #define OBJ_id_tc26_gost_28147_constants OBJ_id_tc26_cipher_constants,1L #define SN_id_tc26_gost_28147_param_Z "id-tc26-gost-28147-param-Z" #define LN_id_tc26_gost_28147_param_Z "GOST 28147-89 TC26 parameter set" #define NID_id_tc26_gost_28147_param_Z 1003 #define OBJ_id_tc26_gost_28147_param_Z OBJ_id_tc26_gost_28147_constants,1L #define SN_INN "INN" #define LN_INN "INN" #define NID_INN 1004 #define OBJ_INN OBJ_member_body,643L,3L,131L,1L,1L #define SN_OGRN "OGRN" #define LN_OGRN "OGRN" #define NID_OGRN 1005 #define OBJ_OGRN OBJ_member_body,643L,100L,1L #define SN_SNILS "SNILS" #define LN_SNILS "SNILS" #define NID_SNILS 1006 #define OBJ_SNILS OBJ_member_body,643L,100L,3L #define SN_subjectSignTool "subjectSignTool" #define LN_subjectSignTool "Signing Tool of Subject" #define NID_subjectSignTool 1007 #define OBJ_subjectSignTool OBJ_member_body,643L,100L,111L #define SN_issuerSignTool "issuerSignTool" #define LN_issuerSignTool "Signing Tool of Issuer" #define NID_issuerSignTool 1008 #define OBJ_issuerSignTool OBJ_member_body,643L,100L,112L #define SN_grasshopper_ecb "grasshopper-ecb" #define NID_grasshopper_ecb 1012 #define SN_grasshopper_ctr "grasshopper-ctr" #define NID_grasshopper_ctr 1013 #define SN_grasshopper_ofb "grasshopper-ofb" #define NID_grasshopper_ofb 1014 #define SN_grasshopper_cbc "grasshopper-cbc" #define NID_grasshopper_cbc 1015 #define SN_grasshopper_cfb "grasshopper-cfb" #define NID_grasshopper_cfb 1016 #define SN_grasshopper_mac "grasshopper-mac" #define NID_grasshopper_mac 1017 #define SN_magma_ecb "magma-ecb" #define NID_magma_ecb 1187 #define SN_magma_ctr "magma-ctr" #define NID_magma_ctr 1188 #define SN_magma_ofb "magma-ofb" #define NID_magma_ofb 1189 #define SN_magma_cbc "magma-cbc" #define NID_magma_cbc 1190 #define SN_magma_cfb "magma-cfb" #define NID_magma_cfb 1191 #define SN_magma_mac "magma-mac" #define NID_magma_mac 1192 #define SN_camellia_128_cbc "CAMELLIA-128-CBC" #define LN_camellia_128_cbc "camellia-128-cbc" #define NID_camellia_128_cbc 751 #define OBJ_camellia_128_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,2L #define SN_camellia_192_cbc "CAMELLIA-192-CBC" #define LN_camellia_192_cbc "camellia-192-cbc" #define NID_camellia_192_cbc 752 #define OBJ_camellia_192_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,3L #define SN_camellia_256_cbc "CAMELLIA-256-CBC" #define LN_camellia_256_cbc "camellia-256-cbc" #define NID_camellia_256_cbc 753 #define OBJ_camellia_256_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,4L #define SN_id_camellia128_wrap "id-camellia128-wrap" #define NID_id_camellia128_wrap 907 #define OBJ_id_camellia128_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,2L #define SN_id_camellia192_wrap "id-camellia192-wrap" #define NID_id_camellia192_wrap 908 #define OBJ_id_camellia192_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,3L #define SN_id_camellia256_wrap "id-camellia256-wrap" #define NID_id_camellia256_wrap 909 #define OBJ_id_camellia256_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,4L #define OBJ_ntt_ds 0L,3L,4401L,5L #define OBJ_camellia OBJ_ntt_ds,3L,1L,9L #define SN_camellia_128_ecb "CAMELLIA-128-ECB" #define LN_camellia_128_ecb "camellia-128-ecb" #define NID_camellia_128_ecb 754 #define OBJ_camellia_128_ecb OBJ_camellia,1L #define SN_camellia_128_ofb128 "CAMELLIA-128-OFB" #define LN_camellia_128_ofb128 "camellia-128-ofb" #define NID_camellia_128_ofb128 766 #define OBJ_camellia_128_ofb128 OBJ_camellia,3L #define SN_camellia_128_cfb128 "CAMELLIA-128-CFB" #define LN_camellia_128_cfb128 "camellia-128-cfb" #define NID_camellia_128_cfb128 757 #define OBJ_camellia_128_cfb128 OBJ_camellia,4L #define SN_camellia_128_gcm "CAMELLIA-128-GCM" #define LN_camellia_128_gcm "camellia-128-gcm" #define NID_camellia_128_gcm 961 #define OBJ_camellia_128_gcm OBJ_camellia,6L #define SN_camellia_128_ccm "CAMELLIA-128-CCM" #define LN_camellia_128_ccm "camellia-128-ccm" #define NID_camellia_128_ccm 962 #define OBJ_camellia_128_ccm OBJ_camellia,7L #define SN_camellia_128_ctr "CAMELLIA-128-CTR" #define LN_camellia_128_ctr "camellia-128-ctr" #define NID_camellia_128_ctr 963 #define OBJ_camellia_128_ctr OBJ_camellia,9L #define SN_camellia_128_cmac "CAMELLIA-128-CMAC" #define LN_camellia_128_cmac "camellia-128-cmac" #define NID_camellia_128_cmac 964 #define OBJ_camellia_128_cmac OBJ_camellia,10L #define SN_camellia_192_ecb "CAMELLIA-192-ECB" #define LN_camellia_192_ecb "camellia-192-ecb" #define NID_camellia_192_ecb 755 #define OBJ_camellia_192_ecb OBJ_camellia,21L #define SN_camellia_192_ofb128 "CAMELLIA-192-OFB" #define LN_camellia_192_ofb128 "camellia-192-ofb" #define NID_camellia_192_ofb128 767 #define OBJ_camellia_192_ofb128 OBJ_camellia,23L #define SN_camellia_192_cfb128 "CAMELLIA-192-CFB" #define LN_camellia_192_cfb128 "camellia-192-cfb" #define NID_camellia_192_cfb128 758 #define OBJ_camellia_192_cfb128 OBJ_camellia,24L #define SN_camellia_192_gcm "CAMELLIA-192-GCM" #define LN_camellia_192_gcm "camellia-192-gcm" #define NID_camellia_192_gcm 965 #define OBJ_camellia_192_gcm OBJ_camellia,26L #define SN_camellia_192_ccm "CAMELLIA-192-CCM" #define LN_camellia_192_ccm "camellia-192-ccm" #define NID_camellia_192_ccm 966 #define OBJ_camellia_192_ccm OBJ_camellia,27L #define SN_camellia_192_ctr "CAMELLIA-192-CTR" #define LN_camellia_192_ctr "camellia-192-ctr" #define NID_camellia_192_ctr 967 #define OBJ_camellia_192_ctr OBJ_camellia,29L #define SN_camellia_192_cmac "CAMELLIA-192-CMAC" #define LN_camellia_192_cmac "camellia-192-cmac" #define NID_camellia_192_cmac 968 #define OBJ_camellia_192_cmac OBJ_camellia,30L #define SN_camellia_256_ecb "CAMELLIA-256-ECB" #define LN_camellia_256_ecb "camellia-256-ecb" #define NID_camellia_256_ecb 756 #define OBJ_camellia_256_ecb OBJ_camellia,41L #define SN_camellia_256_ofb128 "CAMELLIA-256-OFB" #define LN_camellia_256_ofb128 "camellia-256-ofb" #define NID_camellia_256_ofb128 768 #define OBJ_camellia_256_ofb128 OBJ_camellia,43L #define SN_camellia_256_cfb128 "CAMELLIA-256-CFB" #define LN_camellia_256_cfb128 "camellia-256-cfb" #define NID_camellia_256_cfb128 759 #define OBJ_camellia_256_cfb128 OBJ_camellia,44L #define SN_camellia_256_gcm "CAMELLIA-256-GCM" #define LN_camellia_256_gcm "camellia-256-gcm" #define NID_camellia_256_gcm 969 #define OBJ_camellia_256_gcm OBJ_camellia,46L #define SN_camellia_256_ccm "CAMELLIA-256-CCM" #define LN_camellia_256_ccm "camellia-256-ccm" #define NID_camellia_256_ccm 970 #define OBJ_camellia_256_ccm OBJ_camellia,47L #define SN_camellia_256_ctr "CAMELLIA-256-CTR" #define LN_camellia_256_ctr "camellia-256-ctr" #define NID_camellia_256_ctr 971 #define OBJ_camellia_256_ctr OBJ_camellia,49L #define SN_camellia_256_cmac "CAMELLIA-256-CMAC" #define LN_camellia_256_cmac "camellia-256-cmac" #define NID_camellia_256_cmac 972 #define OBJ_camellia_256_cmac OBJ_camellia,50L #define SN_camellia_128_cfb1 "CAMELLIA-128-CFB1" #define LN_camellia_128_cfb1 "camellia-128-cfb1" #define NID_camellia_128_cfb1 760 #define SN_camellia_192_cfb1 "CAMELLIA-192-CFB1" #define LN_camellia_192_cfb1 "camellia-192-cfb1" #define NID_camellia_192_cfb1 761 #define SN_camellia_256_cfb1 "CAMELLIA-256-CFB1" #define LN_camellia_256_cfb1 "camellia-256-cfb1" #define NID_camellia_256_cfb1 762 #define SN_camellia_128_cfb8 "CAMELLIA-128-CFB8" #define LN_camellia_128_cfb8 "camellia-128-cfb8" #define NID_camellia_128_cfb8 763 #define SN_camellia_192_cfb8 "CAMELLIA-192-CFB8" #define LN_camellia_192_cfb8 "camellia-192-cfb8" #define NID_camellia_192_cfb8 764 #define SN_camellia_256_cfb8 "CAMELLIA-256-CFB8" #define LN_camellia_256_cfb8 "camellia-256-cfb8" #define NID_camellia_256_cfb8 765 #define OBJ_aria 1L,2L,410L,200046L,1L,1L #define SN_aria_128_ecb "ARIA-128-ECB" #define LN_aria_128_ecb "aria-128-ecb" #define NID_aria_128_ecb 1065 #define OBJ_aria_128_ecb OBJ_aria,1L #define SN_aria_128_cbc "ARIA-128-CBC" #define LN_aria_128_cbc "aria-128-cbc" #define NID_aria_128_cbc 1066 #define OBJ_aria_128_cbc OBJ_aria,2L #define SN_aria_128_cfb128 "ARIA-128-CFB" #define LN_aria_128_cfb128 "aria-128-cfb" #define NID_aria_128_cfb128 1067 #define OBJ_aria_128_cfb128 OBJ_aria,3L #define SN_aria_128_ofb128 "ARIA-128-OFB" #define LN_aria_128_ofb128 "aria-128-ofb" #define NID_aria_128_ofb128 1068 #define OBJ_aria_128_ofb128 OBJ_aria,4L #define SN_aria_128_ctr "ARIA-128-CTR" #define LN_aria_128_ctr "aria-128-ctr" #define NID_aria_128_ctr 1069 #define OBJ_aria_128_ctr OBJ_aria,5L #define SN_aria_192_ecb "ARIA-192-ECB" #define LN_aria_192_ecb "aria-192-ecb" #define NID_aria_192_ecb 1070 #define OBJ_aria_192_ecb OBJ_aria,6L #define SN_aria_192_cbc "ARIA-192-CBC" #define LN_aria_192_cbc "aria-192-cbc" #define NID_aria_192_cbc 1071 #define OBJ_aria_192_cbc OBJ_aria,7L #define SN_aria_192_cfb128 "ARIA-192-CFB" #define LN_aria_192_cfb128 "aria-192-cfb" #define NID_aria_192_cfb128 1072 #define OBJ_aria_192_cfb128 OBJ_aria,8L #define SN_aria_192_ofb128 "ARIA-192-OFB" #define LN_aria_192_ofb128 "aria-192-ofb" #define NID_aria_192_ofb128 1073 #define OBJ_aria_192_ofb128 OBJ_aria,9L #define SN_aria_192_ctr "ARIA-192-CTR" #define LN_aria_192_ctr "aria-192-ctr" #define NID_aria_192_ctr 1074 #define OBJ_aria_192_ctr OBJ_aria,10L #define SN_aria_256_ecb "ARIA-256-ECB" #define LN_aria_256_ecb "aria-256-ecb" #define NID_aria_256_ecb 1075 #define OBJ_aria_256_ecb OBJ_aria,11L #define SN_aria_256_cbc "ARIA-256-CBC" #define LN_aria_256_cbc "aria-256-cbc" #define NID_aria_256_cbc 1076 #define OBJ_aria_256_cbc OBJ_aria,12L #define SN_aria_256_cfb128 "ARIA-256-CFB" #define LN_aria_256_cfb128 "aria-256-cfb" #define NID_aria_256_cfb128 1077 #define OBJ_aria_256_cfb128 OBJ_aria,13L #define SN_aria_256_ofb128 "ARIA-256-OFB" #define LN_aria_256_ofb128 "aria-256-ofb" #define NID_aria_256_ofb128 1078 #define OBJ_aria_256_ofb128 OBJ_aria,14L #define SN_aria_256_ctr "ARIA-256-CTR" #define LN_aria_256_ctr "aria-256-ctr" #define NID_aria_256_ctr 1079 #define OBJ_aria_256_ctr OBJ_aria,15L #define SN_aria_128_cfb1 "ARIA-128-CFB1" #define LN_aria_128_cfb1 "aria-128-cfb1" #define NID_aria_128_cfb1 1080 #define SN_aria_192_cfb1 "ARIA-192-CFB1" #define LN_aria_192_cfb1 "aria-192-cfb1" #define NID_aria_192_cfb1 1081 #define SN_aria_256_cfb1 "ARIA-256-CFB1" #define LN_aria_256_cfb1 "aria-256-cfb1" #define NID_aria_256_cfb1 1082 #define SN_aria_128_cfb8 "ARIA-128-CFB8" #define LN_aria_128_cfb8 "aria-128-cfb8" #define NID_aria_128_cfb8 1083 #define SN_aria_192_cfb8 "ARIA-192-CFB8" #define LN_aria_192_cfb8 "aria-192-cfb8" #define NID_aria_192_cfb8 1084 #define SN_aria_256_cfb8 "ARIA-256-CFB8" #define LN_aria_256_cfb8 "aria-256-cfb8" #define NID_aria_256_cfb8 1085 #define SN_aria_128_ccm "ARIA-128-CCM" #define LN_aria_128_ccm "aria-128-ccm" #define NID_aria_128_ccm 1120 #define OBJ_aria_128_ccm OBJ_aria,37L #define SN_aria_192_ccm "ARIA-192-CCM" #define LN_aria_192_ccm "aria-192-ccm" #define NID_aria_192_ccm 1121 #define OBJ_aria_192_ccm OBJ_aria,38L #define SN_aria_256_ccm "ARIA-256-CCM" #define LN_aria_256_ccm "aria-256-ccm" #define NID_aria_256_ccm 1122 #define OBJ_aria_256_ccm OBJ_aria,39L #define SN_aria_128_gcm "ARIA-128-GCM" #define LN_aria_128_gcm "aria-128-gcm" #define NID_aria_128_gcm 1123 #define OBJ_aria_128_gcm OBJ_aria,34L #define SN_aria_192_gcm "ARIA-192-GCM" #define LN_aria_192_gcm "aria-192-gcm" #define NID_aria_192_gcm 1124 #define OBJ_aria_192_gcm OBJ_aria,35L #define SN_aria_256_gcm "ARIA-256-GCM" #define LN_aria_256_gcm "aria-256-gcm" #define NID_aria_256_gcm 1125 #define OBJ_aria_256_gcm OBJ_aria,36L #define SN_kisa "KISA" #define LN_kisa "kisa" #define NID_kisa 773 #define OBJ_kisa OBJ_member_body,410L,200004L #define SN_seed_ecb "SEED-ECB" #define LN_seed_ecb "seed-ecb" #define NID_seed_ecb 776 #define OBJ_seed_ecb OBJ_kisa,1L,3L #define SN_seed_cbc "SEED-CBC" #define LN_seed_cbc "seed-cbc" #define NID_seed_cbc 777 #define OBJ_seed_cbc OBJ_kisa,1L,4L #define SN_seed_cfb128 "SEED-CFB" #define LN_seed_cfb128 "seed-cfb" #define NID_seed_cfb128 779 #define OBJ_seed_cfb128 OBJ_kisa,1L,5L #define SN_seed_ofb128 "SEED-OFB" #define LN_seed_ofb128 "seed-ofb" #define NID_seed_ofb128 778 #define OBJ_seed_ofb128 OBJ_kisa,1L,6L #define SN_sm4_ecb "SM4-ECB" #define LN_sm4_ecb "sm4-ecb" #define NID_sm4_ecb 1133 #define OBJ_sm4_ecb OBJ_sm_scheme,104L,1L #define SN_sm4_cbc "SM4-CBC" #define LN_sm4_cbc "sm4-cbc" #define NID_sm4_cbc 1134 #define OBJ_sm4_cbc OBJ_sm_scheme,104L,2L #define SN_sm4_ofb128 "SM4-OFB" #define LN_sm4_ofb128 "sm4-ofb" #define NID_sm4_ofb128 1135 #define OBJ_sm4_ofb128 OBJ_sm_scheme,104L,3L #define SN_sm4_cfb128 "SM4-CFB" #define LN_sm4_cfb128 "sm4-cfb" #define NID_sm4_cfb128 1137 #define OBJ_sm4_cfb128 OBJ_sm_scheme,104L,4L #define SN_sm4_cfb1 "SM4-CFB1" #define LN_sm4_cfb1 "sm4-cfb1" #define NID_sm4_cfb1 1136 #define OBJ_sm4_cfb1 OBJ_sm_scheme,104L,5L #define SN_sm4_cfb8 "SM4-CFB8" #define LN_sm4_cfb8 "sm4-cfb8" #define NID_sm4_cfb8 1138 #define OBJ_sm4_cfb8 OBJ_sm_scheme,104L,6L #define SN_sm4_ctr "SM4-CTR" #define LN_sm4_ctr "sm4-ctr" #define NID_sm4_ctr 1139 #define OBJ_sm4_ctr OBJ_sm_scheme,104L,7L #define SN_hmac "HMAC" #define LN_hmac "hmac" #define NID_hmac 855 #define SN_cmac "CMAC" #define LN_cmac "cmac" #define NID_cmac 894 #define SN_rc4_hmac_md5 "RC4-HMAC-MD5" #define LN_rc4_hmac_md5 "rc4-hmac-md5" #define NID_rc4_hmac_md5 915 #define SN_aes_128_cbc_hmac_sha1 "AES-128-CBC-HMAC-SHA1" #define LN_aes_128_cbc_hmac_sha1 "aes-128-cbc-hmac-sha1" #define NID_aes_128_cbc_hmac_sha1 916 #define SN_aes_192_cbc_hmac_sha1 "AES-192-CBC-HMAC-SHA1" #define LN_aes_192_cbc_hmac_sha1 "aes-192-cbc-hmac-sha1" #define NID_aes_192_cbc_hmac_sha1 917 #define SN_aes_256_cbc_hmac_sha1 "AES-256-CBC-HMAC-SHA1" #define LN_aes_256_cbc_hmac_sha1 "aes-256-cbc-hmac-sha1" #define NID_aes_256_cbc_hmac_sha1 918 #define SN_aes_128_cbc_hmac_sha256 "AES-128-CBC-HMAC-SHA256" #define LN_aes_128_cbc_hmac_sha256 "aes-128-cbc-hmac-sha256" #define NID_aes_128_cbc_hmac_sha256 948 #define SN_aes_192_cbc_hmac_sha256 "AES-192-CBC-HMAC-SHA256" #define LN_aes_192_cbc_hmac_sha256 "aes-192-cbc-hmac-sha256" #define NID_aes_192_cbc_hmac_sha256 949 #define SN_aes_256_cbc_hmac_sha256 "AES-256-CBC-HMAC-SHA256" #define LN_aes_256_cbc_hmac_sha256 "aes-256-cbc-hmac-sha256" #define NID_aes_256_cbc_hmac_sha256 950 #define SN_chacha20_poly1305 "ChaCha20-Poly1305" #define LN_chacha20_poly1305 "chacha20-poly1305" #define NID_chacha20_poly1305 1018 #define SN_chacha20 "ChaCha20" #define LN_chacha20 "chacha20" #define NID_chacha20 1019 #define SN_dhpublicnumber "dhpublicnumber" #define LN_dhpublicnumber "X9.42 DH" #define NID_dhpublicnumber 920 #define OBJ_dhpublicnumber OBJ_ISO_US,10046L,2L,1L #define SN_brainpoolP160r1 "brainpoolP160r1" #define NID_brainpoolP160r1 921 #define OBJ_brainpoolP160r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,1L #define SN_brainpoolP160t1 "brainpoolP160t1" #define NID_brainpoolP160t1 922 #define OBJ_brainpoolP160t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,2L #define SN_brainpoolP192r1 "brainpoolP192r1" #define NID_brainpoolP192r1 923 #define OBJ_brainpoolP192r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,3L #define SN_brainpoolP192t1 "brainpoolP192t1" #define NID_brainpoolP192t1 924 #define OBJ_brainpoolP192t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,4L #define SN_brainpoolP224r1 "brainpoolP224r1" #define NID_brainpoolP224r1 925 #define OBJ_brainpoolP224r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,5L #define SN_brainpoolP224t1 "brainpoolP224t1" #define NID_brainpoolP224t1 926 #define OBJ_brainpoolP224t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,6L #define SN_brainpoolP256r1 "brainpoolP256r1" #define NID_brainpoolP256r1 927 #define OBJ_brainpoolP256r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,7L #define SN_brainpoolP256t1 "brainpoolP256t1" #define NID_brainpoolP256t1 928 #define OBJ_brainpoolP256t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,8L #define SN_brainpoolP320r1 "brainpoolP320r1" #define NID_brainpoolP320r1 929 #define OBJ_brainpoolP320r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,9L #define SN_brainpoolP320t1 "brainpoolP320t1" #define NID_brainpoolP320t1 930 #define OBJ_brainpoolP320t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,10L #define SN_brainpoolP384r1 "brainpoolP384r1" #define NID_brainpoolP384r1 931 #define OBJ_brainpoolP384r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,11L #define SN_brainpoolP384t1 "brainpoolP384t1" #define NID_brainpoolP384t1 932 #define OBJ_brainpoolP384t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,12L #define SN_brainpoolP512r1 "brainpoolP512r1" #define NID_brainpoolP512r1 933 #define OBJ_brainpoolP512r1 1L,3L,36L,3L,3L,2L,8L,1L,1L,13L #define SN_brainpoolP512t1 "brainpoolP512t1" #define NID_brainpoolP512t1 934 #define OBJ_brainpoolP512t1 1L,3L,36L,3L,3L,2L,8L,1L,1L,14L #define OBJ_x9_63_scheme 1L,3L,133L,16L,840L,63L,0L #define OBJ_secg_scheme OBJ_certicom_arc,1L #define SN_dhSinglePass_stdDH_sha1kdf_scheme "dhSinglePass-stdDH-sha1kdf-scheme" #define NID_dhSinglePass_stdDH_sha1kdf_scheme 936 #define OBJ_dhSinglePass_stdDH_sha1kdf_scheme OBJ_x9_63_scheme,2L #define SN_dhSinglePass_stdDH_sha224kdf_scheme "dhSinglePass-stdDH-sha224kdf-scheme" #define NID_dhSinglePass_stdDH_sha224kdf_scheme 937 #define OBJ_dhSinglePass_stdDH_sha224kdf_scheme OBJ_secg_scheme,11L,0L #define SN_dhSinglePass_stdDH_sha256kdf_scheme "dhSinglePass-stdDH-sha256kdf-scheme" #define NID_dhSinglePass_stdDH_sha256kdf_scheme 938 #define OBJ_dhSinglePass_stdDH_sha256kdf_scheme OBJ_secg_scheme,11L,1L #define SN_dhSinglePass_stdDH_sha384kdf_scheme "dhSinglePass-stdDH-sha384kdf-scheme" #define NID_dhSinglePass_stdDH_sha384kdf_scheme 939 #define OBJ_dhSinglePass_stdDH_sha384kdf_scheme OBJ_secg_scheme,11L,2L #define SN_dhSinglePass_stdDH_sha512kdf_scheme "dhSinglePass-stdDH-sha512kdf-scheme" #define NID_dhSinglePass_stdDH_sha512kdf_scheme 940 #define OBJ_dhSinglePass_stdDH_sha512kdf_scheme OBJ_secg_scheme,11L,3L #define SN_dhSinglePass_cofactorDH_sha1kdf_scheme "dhSinglePass-cofactorDH-sha1kdf-scheme" #define NID_dhSinglePass_cofactorDH_sha1kdf_scheme 941 #define OBJ_dhSinglePass_cofactorDH_sha1kdf_scheme OBJ_x9_63_scheme,3L #define SN_dhSinglePass_cofactorDH_sha224kdf_scheme "dhSinglePass-cofactorDH-sha224kdf-scheme" #define NID_dhSinglePass_cofactorDH_sha224kdf_scheme 942 #define OBJ_dhSinglePass_cofactorDH_sha224kdf_scheme OBJ_secg_scheme,14L,0L #define SN_dhSinglePass_cofactorDH_sha256kdf_scheme "dhSinglePass-cofactorDH-sha256kdf-scheme" #define NID_dhSinglePass_cofactorDH_sha256kdf_scheme 943 #define OBJ_dhSinglePass_cofactorDH_sha256kdf_scheme OBJ_secg_scheme,14L,1L #define SN_dhSinglePass_cofactorDH_sha384kdf_scheme "dhSinglePass-cofactorDH-sha384kdf-scheme" #define NID_dhSinglePass_cofactorDH_sha384kdf_scheme 944 #define OBJ_dhSinglePass_cofactorDH_sha384kdf_scheme OBJ_secg_scheme,14L,2L #define SN_dhSinglePass_cofactorDH_sha512kdf_scheme "dhSinglePass-cofactorDH-sha512kdf-scheme" #define NID_dhSinglePass_cofactorDH_sha512kdf_scheme 945 #define OBJ_dhSinglePass_cofactorDH_sha512kdf_scheme OBJ_secg_scheme,14L,3L #define SN_dh_std_kdf "dh-std-kdf" #define NID_dh_std_kdf 946 #define SN_dh_cofactor_kdf "dh-cofactor-kdf" #define NID_dh_cofactor_kdf 947 #define SN_ct_precert_scts "ct_precert_scts" #define LN_ct_precert_scts "CT Precertificate SCTs" #define NID_ct_precert_scts 951 #define OBJ_ct_precert_scts 1L,3L,6L,1L,4L,1L,11129L,2L,4L,2L #define SN_ct_precert_poison "ct_precert_poison" #define LN_ct_precert_poison "CT Precertificate Poison" #define NID_ct_precert_poison 952 #define OBJ_ct_precert_poison 1L,3L,6L,1L,4L,1L,11129L,2L,4L,3L #define SN_ct_precert_signer "ct_precert_signer" #define LN_ct_precert_signer "CT Precertificate Signer" #define NID_ct_precert_signer 953 #define OBJ_ct_precert_signer 1L,3L,6L,1L,4L,1L,11129L,2L,4L,4L #define SN_ct_cert_scts "ct_cert_scts" #define LN_ct_cert_scts "CT Certificate SCTs" #define NID_ct_cert_scts 954 #define OBJ_ct_cert_scts 1L,3L,6L,1L,4L,1L,11129L,2L,4L,5L #define SN_jurisdictionLocalityName "jurisdictionL" #define LN_jurisdictionLocalityName "jurisdictionLocalityName" #define NID_jurisdictionLocalityName 955 #define OBJ_jurisdictionLocalityName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,1L #define SN_jurisdictionStateOrProvinceName "jurisdictionST" #define LN_jurisdictionStateOrProvinceName "jurisdictionStateOrProvinceName" #define NID_jurisdictionStateOrProvinceName 956 #define OBJ_jurisdictionStateOrProvinceName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,2L #define SN_jurisdictionCountryName "jurisdictionC" #define LN_jurisdictionCountryName "jurisdictionCountryName" #define NID_jurisdictionCountryName 957 #define OBJ_jurisdictionCountryName 1L,3L,6L,1L,4L,1L,311L,60L,2L,1L,3L #define SN_id_scrypt "id-scrypt" #define LN_id_scrypt "scrypt" #define NID_id_scrypt 973 #define OBJ_id_scrypt 1L,3L,6L,1L,4L,1L,11591L,4L,11L #define SN_tls1_prf "TLS1-PRF" #define LN_tls1_prf "tls1-prf" #define NID_tls1_prf 1021 #define SN_hkdf "HKDF" #define LN_hkdf "hkdf" #define NID_hkdf 1036 #define SN_sshkdf "SSHKDF" #define LN_sshkdf "sshkdf" #define NID_sshkdf 1203 #define SN_kbkdf "KBKDF" #define LN_kbkdf "kbkdf" #define NID_kbkdf 1204 #define SN_krb5kdf "KRB5KDF" #define LN_krb5kdf "krb5kdf" #define NID_krb5kdf 1205 #define SN_sskdf "SSKDF" #define LN_sskdf "sskdf" #define NID_sskdf 1206 #define SN_id_pkinit "id-pkinit" #define NID_id_pkinit 1031 #define OBJ_id_pkinit 1L,3L,6L,1L,5L,2L,3L #define SN_pkInitClientAuth "pkInitClientAuth" #define LN_pkInitClientAuth "PKINIT Client Auth" #define NID_pkInitClientAuth 1032 #define OBJ_pkInitClientAuth OBJ_id_pkinit,4L #define SN_pkInitKDC "pkInitKDC" #define LN_pkInitKDC "Signing KDC Response" #define NID_pkInitKDC 1033 #define OBJ_pkInitKDC OBJ_id_pkinit,5L #define SN_X25519 "X25519" #define NID_X25519 1034 #define OBJ_X25519 1L,3L,101L,110L #define SN_X448 "X448" #define NID_X448 1035 #define OBJ_X448 1L,3L,101L,111L #define SN_ED25519 "ED25519" #define NID_ED25519 1087 #define OBJ_ED25519 1L,3L,101L,112L #define SN_ED448 "ED448" #define NID_ED448 1088 #define OBJ_ED448 1L,3L,101L,113L #define SN_kx_rsa "KxRSA" #define LN_kx_rsa "kx-rsa" #define NID_kx_rsa 1037 #define SN_kx_ecdhe "KxECDHE" #define LN_kx_ecdhe "kx-ecdhe" #define NID_kx_ecdhe 1038 #define SN_kx_dhe "KxDHE" #define LN_kx_dhe "kx-dhe" #define NID_kx_dhe 1039 #define SN_kx_ecdhe_psk "KxECDHE-PSK" #define LN_kx_ecdhe_psk "kx-ecdhe-psk" #define NID_kx_ecdhe_psk 1040 #define SN_kx_dhe_psk "KxDHE-PSK" #define LN_kx_dhe_psk "kx-dhe-psk" #define NID_kx_dhe_psk 1041 #define SN_kx_rsa_psk "KxRSA_PSK" #define LN_kx_rsa_psk "kx-rsa-psk" #define NID_kx_rsa_psk 1042 #define SN_kx_psk "KxPSK" #define LN_kx_psk "kx-psk" #define NID_kx_psk 1043 #define SN_kx_srp "KxSRP" #define LN_kx_srp "kx-srp" #define NID_kx_srp 1044 #define SN_kx_gost "KxGOST" #define LN_kx_gost "kx-gost" #define NID_kx_gost 1045 #define SN_kx_any "KxANY" #define LN_kx_any "kx-any" #define NID_kx_any 1063 #define SN_auth_rsa "AuthRSA" #define LN_auth_rsa "auth-rsa" #define NID_auth_rsa 1046 #define SN_auth_ecdsa "AuthECDSA" #define LN_auth_ecdsa "auth-ecdsa" #define NID_auth_ecdsa 1047 #define SN_auth_psk "AuthPSK" #define LN_auth_psk "auth-psk" #define NID_auth_psk 1048 #define SN_auth_dss "AuthDSS" #define LN_auth_dss "auth-dss" #define NID_auth_dss 1049 #define SN_auth_gost01 "AuthGOST01" #define LN_auth_gost01 "auth-gost01" #define NID_auth_gost01 1050 #define SN_auth_gost12 "AuthGOST12" #define LN_auth_gost12 "auth-gost12" #define NID_auth_gost12 1051 #define SN_auth_srp "AuthSRP" #define LN_auth_srp "auth-srp" #define NID_auth_srp 1052 #define SN_auth_null "AuthNULL" #define LN_auth_null "auth-null" #define NID_auth_null 1053 #define SN_auth_any "AuthANY" #define LN_auth_any "auth-any" #define NID_auth_any 1064 #define SN_poly1305 "Poly1305" #define LN_poly1305 "poly1305" #define NID_poly1305 1061 #define SN_siphash "SipHash" #define LN_siphash "siphash" #define NID_siphash 1062 #define SN_ffdhe2048 "ffdhe2048" #define NID_ffdhe2048 1126 #define SN_ffdhe3072 "ffdhe3072" #define NID_ffdhe3072 1127 #define SN_ffdhe4096 "ffdhe4096" #define NID_ffdhe4096 1128 #define SN_ffdhe6144 "ffdhe6144" #define NID_ffdhe6144 1129 #define SN_ffdhe8192 "ffdhe8192" #define NID_ffdhe8192 1130 #define SN_modp_1536 "modp_1536" #define NID_modp_1536 1199 #define SN_modp_2048 "modp_2048" #define NID_modp_2048 1200 #define SN_modp_3072 "modp_3072" #define NID_modp_3072 1201 #define SN_modp_4096 "modp_4096" #define NID_modp_4096 1202 #define SN_modp_6144 "modp_6144" #define NID_modp_6144 1203 #define SN_modp_8192 "modp_8192" #define NID_modp_8192 1204 #define SN_ISO_UA "ISO-UA" #define NID_ISO_UA 1150 #define OBJ_ISO_UA OBJ_member_body,804L #define SN_ua_pki "ua-pki" #define NID_ua_pki 1151 #define OBJ_ua_pki OBJ_ISO_UA,2L,1L,1L,1L #define SN_dstu28147 "dstu28147" #define LN_dstu28147 "DSTU Gost 28147-2009" #define NID_dstu28147 1152 #define OBJ_dstu28147 OBJ_ua_pki,1L,1L,1L #define SN_dstu28147_ofb "dstu28147-ofb" #define LN_dstu28147_ofb "DSTU Gost 28147-2009 OFB mode" #define NID_dstu28147_ofb 1153 #define OBJ_dstu28147_ofb OBJ_dstu28147,2L #define SN_dstu28147_cfb "dstu28147-cfb" #define LN_dstu28147_cfb "DSTU Gost 28147-2009 CFB mode" #define NID_dstu28147_cfb 1154 #define OBJ_dstu28147_cfb OBJ_dstu28147,3L #define SN_dstu28147_wrap "dstu28147-wrap" #define LN_dstu28147_wrap "DSTU Gost 28147-2009 key wrap" #define NID_dstu28147_wrap 1155 #define OBJ_dstu28147_wrap OBJ_dstu28147,5L #define SN_hmacWithDstu34311 "hmacWithDstu34311" #define LN_hmacWithDstu34311 "HMAC DSTU Gost 34311-95" #define NID_hmacWithDstu34311 1156 #define OBJ_hmacWithDstu34311 OBJ_ua_pki,1L,1L,2L #define SN_dstu34311 "dstu34311" #define LN_dstu34311 "DSTU Gost 34311-95" #define NID_dstu34311 1157 #define OBJ_dstu34311 OBJ_ua_pki,1L,2L,1L #define SN_dstu4145le "dstu4145le" #define LN_dstu4145le "DSTU 4145-2002 little endian" #define NID_dstu4145le 1158 #define OBJ_dstu4145le OBJ_ua_pki,1L,3L,1L,1L #define SN_dstu4145be "dstu4145be" #define LN_dstu4145be "DSTU 4145-2002 big endian" #define NID_dstu4145be 1159 #define OBJ_dstu4145be OBJ_dstu4145le,1L,1L #define SN_uacurve0 "uacurve0" #define LN_uacurve0 "DSTU curve 0" #define NID_uacurve0 1160 #define OBJ_uacurve0 OBJ_dstu4145le,2L,0L #define SN_uacurve1 "uacurve1" #define LN_uacurve1 "DSTU curve 1" #define NID_uacurve1 1161 #define OBJ_uacurve1 OBJ_dstu4145le,2L,1L #define SN_uacurve2 "uacurve2" #define LN_uacurve2 "DSTU curve 2" #define NID_uacurve2 1162 #define OBJ_uacurve2 OBJ_dstu4145le,2L,2L #define SN_uacurve3 "uacurve3" #define LN_uacurve3 "DSTU curve 3" #define NID_uacurve3 1163 #define OBJ_uacurve3 OBJ_dstu4145le,2L,3L #define SN_uacurve4 "uacurve4" #define LN_uacurve4 "DSTU curve 4" #define NID_uacurve4 1164 #define OBJ_uacurve4 OBJ_dstu4145le,2L,4L #define SN_uacurve5 "uacurve5" #define LN_uacurve5 "DSTU curve 5" #define NID_uacurve5 1165 #define OBJ_uacurve5 OBJ_dstu4145le,2L,5L #define SN_uacurve6 "uacurve6" #define LN_uacurve6 "DSTU curve 6" #define NID_uacurve6 1166 #define OBJ_uacurve6 OBJ_dstu4145le,2L,6L #define SN_uacurve7 "uacurve7" #define LN_uacurve7 "DSTU curve 7" #define NID_uacurve7 1167 #define OBJ_uacurve7 OBJ_dstu4145le,2L,7L #define SN_uacurve8 "uacurve8" #define LN_uacurve8 "DSTU curve 8" #define NID_uacurve8 1168 #define OBJ_uacurve8 OBJ_dstu4145le,2L,8L #define SN_uacurve9 "uacurve9" #define LN_uacurve9 "DSTU curve 9" #define NID_uacurve9 1169 #define OBJ_uacurve9 OBJ_dstu4145le,2L,9L PKZ>> openssl/ct.hnu[/* * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CT_H # define HEADER_CT_H # include # ifndef OPENSSL_NO_CT # include # include # include # include # ifdef __cplusplus extern "C" { # endif /* Minimum RSA key size, from RFC6962 */ # define SCT_MIN_RSA_BITS 2048 /* All hashes are SHA256 in v1 of Certificate Transparency */ # define CT_V1_HASHLEN SHA256_DIGEST_LENGTH typedef enum { CT_LOG_ENTRY_TYPE_NOT_SET = -1, CT_LOG_ENTRY_TYPE_X509 = 0, CT_LOG_ENTRY_TYPE_PRECERT = 1 } ct_log_entry_type_t; typedef enum { SCT_VERSION_NOT_SET = -1, SCT_VERSION_V1 = 0 } sct_version_t; typedef enum { SCT_SOURCE_UNKNOWN, SCT_SOURCE_TLS_EXTENSION, SCT_SOURCE_X509V3_EXTENSION, SCT_SOURCE_OCSP_STAPLED_RESPONSE } sct_source_t; typedef enum { SCT_VALIDATION_STATUS_NOT_SET, SCT_VALIDATION_STATUS_UNKNOWN_LOG, SCT_VALIDATION_STATUS_VALID, SCT_VALIDATION_STATUS_INVALID, SCT_VALIDATION_STATUS_UNVERIFIED, SCT_VALIDATION_STATUS_UNKNOWN_VERSION } sct_validation_status_t; DEFINE_STACK_OF(SCT) DEFINE_STACK_OF(CTLOG) /****************************************** * CT policy evaluation context functions * ******************************************/ /* * Creates a new, empty policy evaluation context. * The caller is responsible for calling CT_POLICY_EVAL_CTX_free when finished * with the CT_POLICY_EVAL_CTX. */ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void); /* Deletes a policy evaluation context and anything it owns. */ void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx); /* Gets the peer certificate that the SCTs are for */ X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx); /* * Sets the certificate associated with the received SCTs. * Increments the reference count of cert. * Returns 1 on success, 0 otherwise. */ int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert); /* Gets the issuer of the aforementioned certificate */ X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx); /* * Sets the issuer of the certificate associated with the received SCTs. * Increments the reference count of issuer. * Returns 1 on success, 0 otherwise. */ int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer); /* Gets the CT logs that are trusted sources of SCTs */ const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx); /* Sets the log store that is in use. It must outlive the CT_POLICY_EVAL_CTX. */ void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx, CTLOG_STORE *log_store); /* * Gets the time, in milliseconds since the Unix epoch, that will be used as the * current time when checking whether an SCT was issued in the future. * Such SCTs will fail validation, as required by RFC6962. */ uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx); /* * Sets the time to evaluate SCTs against, in milliseconds since the Unix epoch. * If an SCT's timestamp is after this time, it will be interpreted as having * been issued in the future. RFC6962 states that "TLS clients MUST reject SCTs * whose timestamp is in the future", so an SCT will not validate in this case. */ void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms); /***************** * SCT functions * *****************/ /* * Creates a new, blank SCT. * The caller is responsible for calling SCT_free when finished with the SCT. */ SCT *SCT_new(void); /* * Creates a new SCT from some base64-encoded strings. * The caller is responsible for calling SCT_free when finished with the SCT. */ SCT *SCT_new_from_base64(unsigned char version, const char *logid_base64, ct_log_entry_type_t entry_type, uint64_t timestamp, const char *extensions_base64, const char *signature_base64); /* * Frees the SCT and the underlying data structures. */ void SCT_free(SCT *sct); /* * Free a stack of SCTs, and the underlying SCTs themselves. * Intended to be compatible with X509V3_EXT_FREE. */ void SCT_LIST_free(STACK_OF(SCT) *a); /* * Returns the version of the SCT. */ sct_version_t SCT_get_version(const SCT *sct); /* * Set the version of an SCT. * Returns 1 on success, 0 if the version is unrecognized. */ __owur int SCT_set_version(SCT *sct, sct_version_t version); /* * Returns the log entry type of the SCT. */ ct_log_entry_type_t SCT_get_log_entry_type(const SCT *sct); /* * Set the log entry type of an SCT. * Returns 1 on success, 0 otherwise. */ __owur int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type); /* * Gets the ID of the log that an SCT came from. * Ownership of the log ID remains with the SCT. * Returns the length of the log ID. */ size_t SCT_get0_log_id(const SCT *sct, unsigned char **log_id); /* * Set the log ID of an SCT to point directly to the *log_id specified. * The SCT takes ownership of the specified pointer. * Returns 1 on success, 0 otherwise. */ __owur int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len); /* * Set the log ID of an SCT. * This makes a copy of the log_id. * Returns 1 on success, 0 otherwise. */ __owur int SCT_set1_log_id(SCT *sct, const unsigned char *log_id, size_t log_id_len); /* * Returns the timestamp for the SCT (epoch time in milliseconds). */ uint64_t SCT_get_timestamp(const SCT *sct); /* * Set the timestamp of an SCT (epoch time in milliseconds). */ void SCT_set_timestamp(SCT *sct, uint64_t timestamp); /* * Return the NID for the signature used by the SCT. * For CT v1, this will be either NID_sha256WithRSAEncryption or * NID_ecdsa_with_SHA256 (or NID_undef if incorrect/unset). */ int SCT_get_signature_nid(const SCT *sct); /* * Set the signature type of an SCT * For CT v1, this should be either NID_sha256WithRSAEncryption or * NID_ecdsa_with_SHA256. * Returns 1 on success, 0 otherwise. */ __owur int SCT_set_signature_nid(SCT *sct, int nid); /* * Set *ext to point to the extension data for the SCT. ext must not be NULL. * The SCT retains ownership of this pointer. * Returns length of the data pointed to. */ size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext); /* * Set the extensions of an SCT to point directly to the *ext specified. * The SCT takes ownership of the specified pointer. */ void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len); /* * Set the extensions of an SCT. * This takes a copy of the ext. * Returns 1 on success, 0 otherwise. */ __owur int SCT_set1_extensions(SCT *sct, const unsigned char *ext, size_t ext_len); /* * Set *sig to point to the signature for the SCT. sig must not be NULL. * The SCT retains ownership of this pointer. * Returns length of the data pointed to. */ size_t SCT_get0_signature(const SCT *sct, unsigned char **sig); /* * Set the signature of an SCT to point directly to the *sig specified. * The SCT takes ownership of the specified pointer. */ void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len); /* * Set the signature of an SCT to be a copy of the *sig specified. * Returns 1 on success, 0 otherwise. */ __owur int SCT_set1_signature(SCT *sct, const unsigned char *sig, size_t sig_len); /* * The origin of this SCT, e.g. TLS extension, OCSP response, etc. */ sct_source_t SCT_get_source(const SCT *sct); /* * Set the origin of this SCT, e.g. TLS extension, OCSP response, etc. * Returns 1 on success, 0 otherwise. */ __owur int SCT_set_source(SCT *sct, sct_source_t source); /* * Returns a text string describing the validation status of |sct|. */ const char *SCT_validation_status_string(const SCT *sct); /* * Pretty-prints an |sct| to |out|. * It will be indented by the number of spaces specified by |indent|. * If |logs| is not NULL, it will be used to lookup the CT log that the SCT came * from, so that the log name can be printed. */ void SCT_print(const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs); /* * Pretty-prints an |sct_list| to |out|. * It will be indented by the number of spaces specified by |indent|. * SCTs will be delimited by |separator|. * If |logs| is not NULL, it will be used to lookup the CT log that each SCT * came from, so that the log names can be printed. */ void SCT_LIST_print(const STACK_OF(SCT) *sct_list, BIO *out, int indent, const char *separator, const CTLOG_STORE *logs); /* * Gets the last result of validating this SCT. * If it has not been validated yet, returns SCT_VALIDATION_STATUS_NOT_SET. */ sct_validation_status_t SCT_get_validation_status(const SCT *sct); /* * Validates the given SCT with the provided context. * Sets the "validation_status" field of the SCT. * Returns 1 if the SCT is valid and the signature verifies. * Returns 0 if the SCT is invalid or could not be verified. * Returns -1 if an error occurs. */ __owur int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx); /* * Validates the given list of SCTs with the provided context. * Sets the "validation_status" field of each SCT. * Returns 1 if there are no invalid SCTs and all signatures verify. * Returns 0 if at least one SCT is invalid or could not be verified. * Returns a negative integer if an error occurs. */ __owur int SCT_LIST_validate(const STACK_OF(SCT) *scts, CT_POLICY_EVAL_CTX *ctx); /********************************* * SCT parsing and serialisation * *********************************/ /* * Serialize (to TLS format) a stack of SCTs and return the length. * "a" must not be NULL. * If "pp" is NULL, just return the length of what would have been serialized. * If "pp" is not NULL and "*pp" is null, function will allocate a new pointer * for data that caller is responsible for freeing (only if function returns * successfully). * If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring * that "*pp" is large enough to accept all of the serialized data. * Returns < 0 on error, >= 0 indicating bytes written (or would have been) * on success. */ __owur int i2o_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp); /* * Convert TLS format SCT list to a stack of SCTs. * If "a" or "*a" is NULL, a new stack will be created that the caller is * responsible for freeing (by calling SCT_LIST_free). * "**pp" and "*pp" must not be NULL. * Upon success, "*pp" will point to after the last bytes read, and a stack * will be returned. * Upon failure, a NULL pointer will be returned, and the position of "*pp" is * not defined. */ STACK_OF(SCT) *o2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp, size_t len); /* * Serialize (to DER format) a stack of SCTs and return the length. * "a" must not be NULL. * If "pp" is NULL, just returns the length of what would have been serialized. * If "pp" is not NULL and "*pp" is null, function will allocate a new pointer * for data that caller is responsible for freeing (only if function returns * successfully). * If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring * that "*pp" is large enough to accept all of the serialized data. * Returns < 0 on error, >= 0 indicating bytes written (or would have been) * on success. */ __owur int i2d_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp); /* * Parses an SCT list in DER format and returns it. * If "a" or "*a" is NULL, a new stack will be created that the caller is * responsible for freeing (by calling SCT_LIST_free). * "**pp" and "*pp" must not be NULL. * Upon success, "*pp" will point to after the last bytes read, and a stack * will be returned. * Upon failure, a NULL pointer will be returned, and the position of "*pp" is * not defined. */ STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp, long len); /* * Serialize (to TLS format) an |sct| and write it to |out|. * If |out| is null, no SCT will be output but the length will still be returned. * If |out| points to a null pointer, a string will be allocated to hold the * TLS-format SCT. It is the responsibility of the caller to free it. * If |out| points to an allocated string, the TLS-format SCT will be written * to it. * The length of the SCT in TLS format will be returned. */ __owur int i2o_SCT(const SCT *sct, unsigned char **out); /* * Parses an SCT in TLS format and returns it. * If |psct| is not null, it will end up pointing to the parsed SCT. If it * already points to a non-null pointer, the pointer will be free'd. * |in| should be a pointer to a string containing the TLS-format SCT. * |in| will be advanced to the end of the SCT if parsing succeeds. * |len| should be the length of the SCT in |in|. * Returns NULL if an error occurs. * If the SCT is an unsupported version, only the SCT's 'sct' and 'sct_len' * fields will be populated (with |in| and |len| respectively). */ SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len); /******************** * CT log functions * ********************/ /* * Creates a new CT log instance with the given |public_key| and |name|. * Takes ownership of |public_key| but copies |name|. * Returns NULL if malloc fails or if |public_key| cannot be converted to DER. * Should be deleted by the caller using CTLOG_free when no longer needed. */ CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name); /* * Creates a new CTLOG instance with the base64-encoded SubjectPublicKeyInfo DER * in |pkey_base64|. The |name| is a string to help users identify this log. * Returns 1 on success, 0 on failure. * Should be deleted by the caller using CTLOG_free when no longer needed. */ int CTLOG_new_from_base64(CTLOG ** ct_log, const char *pkey_base64, const char *name); /* * Deletes a CT log instance and its fields. */ void CTLOG_free(CTLOG *log); /* Gets the name of the CT log */ const char *CTLOG_get0_name(const CTLOG *log); /* Gets the ID of the CT log */ void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id, size_t *log_id_len); /* Gets the public key of the CT log */ EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log); /************************** * CT log store functions * **************************/ /* * Creates a new CT log store. * Should be deleted by the caller using CTLOG_STORE_free when no longer needed. */ CTLOG_STORE *CTLOG_STORE_new(void); /* * Deletes a CT log store and all of the CT log instances held within. */ void CTLOG_STORE_free(CTLOG_STORE *store); /* * Finds a CT log in the store based on its log ID. * Returns the CT log, or NULL if no match is found. */ const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store, const uint8_t *log_id, size_t log_id_len); /* * Loads a CT log list into a |store| from a |file|. * Returns 1 if loading is successful, or 0 otherwise. */ __owur int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file); /* * Loads the default CT log list into a |store|. * Returns 1 if loading is successful, or 0 otherwise. */ __owur int CTLOG_STORE_load_default_file(CTLOG_STORE *store); # ifdef __cplusplus } # endif # endif #endif PKZEZopenssl/cryptoerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CRYPTOERR_H # define HEADER_CRYPTOERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_CRYPTO_strings(void); /* * CRYPTO function codes. */ # define CRYPTO_F_CMAC_CTX_NEW 120 # define CRYPTO_F_CRYPTO_DUP_EX_DATA 110 # define CRYPTO_F_CRYPTO_FREE_EX_DATA 111 # define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 # define CRYPTO_F_CRYPTO_MEMDUP 115 # define CRYPTO_F_CRYPTO_NEW_EX_DATA 112 # define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 121 # define CRYPTO_F_CRYPTO_OCB128_INIT 122 # define CRYPTO_F_CRYPTO_SET_EX_DATA 102 # define CRYPTO_F_FIPS_MODE_SET 109 # define CRYPTO_F_GET_AND_LOCK 113 # define CRYPTO_F_OPENSSL_ATEXIT 114 # define CRYPTO_F_OPENSSL_BUF2HEXSTR 117 # define CRYPTO_F_OPENSSL_FOPEN 119 # define CRYPTO_F_OPENSSL_HEXSTR2BUF 118 # define CRYPTO_F_OPENSSL_INIT_CRYPTO 116 # define CRYPTO_F_OPENSSL_LH_NEW 126 # define CRYPTO_F_OPENSSL_SK_DEEP_COPY 127 # define CRYPTO_F_OPENSSL_SK_DUP 128 # define CRYPTO_F_PKEY_HMAC_INIT 123 # define CRYPTO_F_PKEY_POLY1305_INIT 124 # define CRYPTO_F_PKEY_SIPHASH_INIT 125 # define CRYPTO_F_SK_RESERVE 129 /* * CRYPTO reason codes. */ # define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 # define CRYPTO_R_ILLEGAL_HEX_DIGIT 102 # define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103 #endif PKZF2[[openssl/asn1.hnu[/* * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ASN1_H # define HEADER_ASN1_H # include # include # include # include # include # include # include # include # if OPENSSL_API_COMPAT < 0x10100000L # include # endif # ifdef OPENSSL_BUILD_SHLIBCRYPTO # undef OPENSSL_EXTERN # define OPENSSL_EXTERN OPENSSL_EXPORT # endif #ifdef __cplusplus extern "C" { #endif # define V_ASN1_UNIVERSAL 0x00 # define V_ASN1_APPLICATION 0x40 # define V_ASN1_CONTEXT_SPECIFIC 0x80 # define V_ASN1_PRIVATE 0xc0 # define V_ASN1_CONSTRUCTED 0x20 # define V_ASN1_PRIMITIVE_TAG 0x1f # define V_ASN1_PRIMATIVE_TAG /*compat*/ V_ASN1_PRIMITIVE_TAG # define V_ASN1_APP_CHOOSE -2/* let the recipient choose */ # define V_ASN1_OTHER -3/* used in ASN1_TYPE */ # define V_ASN1_ANY -4/* used in ASN1 template code */ # define V_ASN1_UNDEF -1 /* ASN.1 tag values */ # define V_ASN1_EOC 0 # define V_ASN1_BOOLEAN 1 /**/ # define V_ASN1_INTEGER 2 # define V_ASN1_BIT_STRING 3 # define V_ASN1_OCTET_STRING 4 # define V_ASN1_NULL 5 # define V_ASN1_OBJECT 6 # define V_ASN1_OBJECT_DESCRIPTOR 7 # define V_ASN1_EXTERNAL 8 # define V_ASN1_REAL 9 # define V_ASN1_ENUMERATED 10 # define V_ASN1_UTF8STRING 12 # define V_ASN1_SEQUENCE 16 # define V_ASN1_SET 17 # define V_ASN1_NUMERICSTRING 18 /**/ # define V_ASN1_PRINTABLESTRING 19 # define V_ASN1_T61STRING 20 # define V_ASN1_TELETEXSTRING 20/* alias */ # define V_ASN1_VIDEOTEXSTRING 21 /**/ # define V_ASN1_IA5STRING 22 # define V_ASN1_UTCTIME 23 # define V_ASN1_GENERALIZEDTIME 24 /**/ # define V_ASN1_GRAPHICSTRING 25 /**/ # define V_ASN1_ISO64STRING 26 /**/ # define V_ASN1_VISIBLESTRING 26/* alias */ # define V_ASN1_GENERALSTRING 27 /**/ # define V_ASN1_UNIVERSALSTRING 28 /**/ # define V_ASN1_BMPSTRING 30 /* * NB the constants below are used internally by ASN1_INTEGER * and ASN1_ENUMERATED to indicate the sign. They are *not* on * the wire tag values. */ # define V_ASN1_NEG 0x100 # define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG) # define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG) /* For use with d2i_ASN1_type_bytes() */ # define B_ASN1_NUMERICSTRING 0x0001 # define B_ASN1_PRINTABLESTRING 0x0002 # define B_ASN1_T61STRING 0x0004 # define B_ASN1_TELETEXSTRING 0x0004 # define B_ASN1_VIDEOTEXSTRING 0x0008 # define B_ASN1_IA5STRING 0x0010 # define B_ASN1_GRAPHICSTRING 0x0020 # define B_ASN1_ISO64STRING 0x0040 # define B_ASN1_VISIBLESTRING 0x0040 # define B_ASN1_GENERALSTRING 0x0080 # define B_ASN1_UNIVERSALSTRING 0x0100 # define B_ASN1_OCTET_STRING 0x0200 # define B_ASN1_BIT_STRING 0x0400 # define B_ASN1_BMPSTRING 0x0800 # define B_ASN1_UNKNOWN 0x1000 # define B_ASN1_UTF8STRING 0x2000 # define B_ASN1_UTCTIME 0x4000 # define B_ASN1_GENERALIZEDTIME 0x8000 # define B_ASN1_SEQUENCE 0x10000 /* For use with ASN1_mbstring_copy() */ # define MBSTRING_FLAG 0x1000 # define MBSTRING_UTF8 (MBSTRING_FLAG) # define MBSTRING_ASC (MBSTRING_FLAG|1) # define MBSTRING_BMP (MBSTRING_FLAG|2) # define MBSTRING_UNIV (MBSTRING_FLAG|4) # define SMIME_OLDMIME 0x400 # define SMIME_CRLFEOL 0x800 # define SMIME_STREAM 0x1000 struct X509_algor_st; DEFINE_STACK_OF(X509_ALGOR) # define ASN1_STRING_FLAG_BITS_LEFT 0x08/* Set if 0x07 has bits left value */ /* * This indicates that the ASN1_STRING is not a real value but just a place * holder for the location where indefinite length constructed data should be * inserted in the memory buffer */ # define ASN1_STRING_FLAG_NDEF 0x010 /* * This flag is used by the CMS code to indicate that a string is not * complete and is a place holder for content when it had all been accessed. * The flag will be reset when content has been written to it. */ # define ASN1_STRING_FLAG_CONT 0x020 /* * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING * type. */ # define ASN1_STRING_FLAG_MSTRING 0x040 /* String is embedded and only content should be freed */ # define ASN1_STRING_FLAG_EMBED 0x080 /* String should be parsed in RFC 5280's time format */ # define ASN1_STRING_FLAG_X509_TIME 0x100 /* This is the base type that holds just about everything :-) */ struct asn1_string_st { int length; int type; unsigned char *data; /* * The value of the following field depends on the type being held. It * is mostly being used for BIT_STRING so if the input data has a * non-zero 'unused bits' value, it will be handled correctly */ long flags; }; /* * ASN1_ENCODING structure: this is used to save the received encoding of an * ASN1 type. This is useful to get round problems with invalid encodings * which can break signatures. */ typedef struct ASN1_ENCODING_st { unsigned char *enc; /* DER encoding */ long len; /* Length of encoding */ int modified; /* set to 1 if 'enc' is invalid */ } ASN1_ENCODING; /* Used with ASN1 LONG type: if a long is set to this it is omitted */ # define ASN1_LONG_UNDEF 0x7fffffffL # define STABLE_FLAGS_MALLOC 0x01 /* * A zero passed to ASN1_STRING_TABLE_new_add for the flags is interpreted * as "don't change" and STABLE_FLAGS_MALLOC is always set. By setting * STABLE_FLAGS_MALLOC only we can clear the existing value. Use the alias * STABLE_FLAGS_CLEAR to reflect this. */ # define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC # define STABLE_NO_MASK 0x02 # define DIRSTRING_TYPE \ (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING) # define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING) typedef struct asn1_string_table_st { int nid; long minsize; long maxsize; unsigned long mask; unsigned long flags; } ASN1_STRING_TABLE; DEFINE_STACK_OF(ASN1_STRING_TABLE) /* size limits: this stuff is taken straight from RFC2459 */ # define ub_name 32768 # define ub_common_name 64 # define ub_locality_name 128 # define ub_state_name 128 # define ub_organization_name 64 # define ub_organization_unit_name 64 # define ub_title 64 # define ub_email_address 128 /* * Declarations for template structures: for full definitions see asn1t.h */ typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE; typedef struct ASN1_TLC_st ASN1_TLC; /* This is just an opaque pointer */ typedef struct ASN1_VALUE_st ASN1_VALUE; /* Declare ASN1 functions: the implement macro in in asn1t.h */ # define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type) # define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \ DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, type) # define DECLARE_ASN1_FUNCTIONS_name(type, name) \ DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) # define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \ DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) # define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \ type *d2i_##name(type **a, const unsigned char **in, long len); \ int i2d_##name(type *a, unsigned char **out); \ DECLARE_ASN1_ITEM(itname) # define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \ type *d2i_##name(type **a, const unsigned char **in, long len); \ int i2d_##name(const type *a, unsigned char **out); \ DECLARE_ASN1_ITEM(name) # define DECLARE_ASN1_NDEF_FUNCTION(name) \ int i2d_##name##_NDEF(name *a, unsigned char **out); # define DECLARE_ASN1_FUNCTIONS_const(name) \ DECLARE_ASN1_ALLOC_FUNCTIONS(name) \ DECLARE_ASN1_ENCODE_FUNCTIONS_const(name, name) # define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \ type *name##_new(void); \ void name##_free(type *a); # define DECLARE_ASN1_PRINT_FUNCTION(stname) \ DECLARE_ASN1_PRINT_FUNCTION_fname(stname, stname) # define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \ int fname##_print_ctx(BIO *out, stname *x, int indent, \ const ASN1_PCTX *pctx); # define D2I_OF(type) type *(*)(type **,const unsigned char **,long) # define I2D_OF(type) int (*)(type *,unsigned char **) # define I2D_OF_const(type) int (*)(const type *,unsigned char **) # define CHECKED_D2I_OF(type, d2i) \ ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0))) # define CHECKED_I2D_OF(type, i2d) \ ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0))) # define CHECKED_NEW_OF(type, xnew) \ ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0))) # define CHECKED_PTR_OF(type, p) \ ((void*) (1 ? p : (type*)0)) # define CHECKED_PPTR_OF(type, p) \ ((void**) (1 ? p : (type**)0)) # define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long) # define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **) # define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type) TYPEDEF_D2I2D_OF(void); /*- * The following macros and typedefs allow an ASN1_ITEM * to be embedded in a structure and referenced. Since * the ASN1_ITEM pointers need to be globally accessible * (possibly from shared libraries) they may exist in * different forms. On platforms that support it the * ASN1_ITEM structure itself will be globally exported. * Other platforms will export a function that returns * an ASN1_ITEM pointer. * * To handle both cases transparently the macros below * should be used instead of hard coding an ASN1_ITEM * pointer in a structure. * * The structure will look like this: * * typedef struct SOMETHING_st { * ... * ASN1_ITEM_EXP *iptr; * ... * } SOMETHING; * * It would be initialised as e.g.: * * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...}; * * and the actual pointer extracted with: * * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr); * * Finally an ASN1_ITEM pointer can be extracted from an * appropriate reference with: ASN1_ITEM_rptr(X509). This * would be used when a function takes an ASN1_ITEM * argument. * */ # ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION /* ASN1_ITEM pointer exported type */ typedef const ASN1_ITEM ASN1_ITEM_EXP; /* Macro to obtain ASN1_ITEM pointer from exported type */ # define ASN1_ITEM_ptr(iptr) (iptr) /* Macro to include ASN1_ITEM pointer from base type */ # define ASN1_ITEM_ref(iptr) (&(iptr##_it)) # define ASN1_ITEM_rptr(ref) (&(ref##_it)) # define DECLARE_ASN1_ITEM(name) \ OPENSSL_EXTERN const ASN1_ITEM name##_it; # else /* * Platforms that can't easily handle shared global variables are declared as * functions returning ASN1_ITEM pointers. */ /* ASN1_ITEM pointer exported type */ typedef const ASN1_ITEM *ASN1_ITEM_EXP (void); /* Macro to obtain ASN1_ITEM pointer from exported type */ # define ASN1_ITEM_ptr(iptr) (iptr()) /* Macro to include ASN1_ITEM pointer from base type */ # define ASN1_ITEM_ref(iptr) (iptr##_it) # define ASN1_ITEM_rptr(ref) (ref##_it()) # define DECLARE_ASN1_ITEM(name) \ const ASN1_ITEM * name##_it(void); # endif /* Parameters used by ASN1_STRING_print_ex() */ /* * These determine which characters to escape: RFC2253 special characters, * control characters and MSB set characters */ # define ASN1_STRFLGS_ESC_2253 1 # define ASN1_STRFLGS_ESC_CTRL 2 # define ASN1_STRFLGS_ESC_MSB 4 /* * This flag determines how we do escaping: normally RC2253 backslash only, * set this to use backslash and quote. */ # define ASN1_STRFLGS_ESC_QUOTE 8 /* These three flags are internal use only. */ /* Character is a valid PrintableString character */ # define CHARTYPE_PRINTABLESTRING 0x10 /* Character needs escaping if it is the first character */ # define CHARTYPE_FIRST_ESC_2253 0x20 /* Character needs escaping if it is the last character */ # define CHARTYPE_LAST_ESC_2253 0x40 /* * NB the internal flags are safely reused below by flags handled at the top * level. */ /* * If this is set we convert all character strings to UTF8 first */ # define ASN1_STRFLGS_UTF8_CONVERT 0x10 /* * If this is set we don't attempt to interpret content: just assume all * strings are 1 byte per character. This will produce some pretty odd * looking output! */ # define ASN1_STRFLGS_IGNORE_TYPE 0x20 /* If this is set we include the string type in the output */ # define ASN1_STRFLGS_SHOW_TYPE 0x40 /* * This determines which strings to display and which to 'dump' (hex dump of * content octets or DER encoding). We can only dump non character strings or * everything. If we don't dump 'unknown' they are interpreted as character * strings with 1 octet per character and are subject to the usual escaping * options. */ # define ASN1_STRFLGS_DUMP_ALL 0x80 # define ASN1_STRFLGS_DUMP_UNKNOWN 0x100 /* * These determine what 'dumping' does, we can dump the content octets or the * DER encoding: both use the RFC2253 #XXXXX notation. */ # define ASN1_STRFLGS_DUMP_DER 0x200 /* * This flag specifies that RC2254 escaping shall be performed. */ #define ASN1_STRFLGS_ESC_2254 0x400 /* * All the string flags consistent with RFC2253, escaping control characters * isn't essential in RFC2253 but it is advisable anyway. */ # define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \ ASN1_STRFLGS_ESC_CTRL | \ ASN1_STRFLGS_ESC_MSB | \ ASN1_STRFLGS_UTF8_CONVERT | \ ASN1_STRFLGS_DUMP_UNKNOWN | \ ASN1_STRFLGS_DUMP_DER) DEFINE_STACK_OF(ASN1_INTEGER) DEFINE_STACK_OF(ASN1_GENERALSTRING) DEFINE_STACK_OF(ASN1_UTF8STRING) typedef struct asn1_type_st { int type; union { char *ptr; ASN1_BOOLEAN boolean; ASN1_STRING *asn1_string; ASN1_OBJECT *object; ASN1_INTEGER *integer; ASN1_ENUMERATED *enumerated; ASN1_BIT_STRING *bit_string; ASN1_OCTET_STRING *octet_string; ASN1_PRINTABLESTRING *printablestring; ASN1_T61STRING *t61string; ASN1_IA5STRING *ia5string; ASN1_GENERALSTRING *generalstring; ASN1_BMPSTRING *bmpstring; ASN1_UNIVERSALSTRING *universalstring; ASN1_UTCTIME *utctime; ASN1_GENERALIZEDTIME *generalizedtime; ASN1_VISIBLESTRING *visiblestring; ASN1_UTF8STRING *utf8string; /* * set and sequence are left complete and still contain the set or * sequence bytes */ ASN1_STRING *set; ASN1_STRING *sequence; ASN1_VALUE *asn1_value; } value; } ASN1_TYPE; DEFINE_STACK_OF(ASN1_TYPE) typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY; DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY) DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SET_ANY) /* This is used to contain a list of bit names */ typedef struct BIT_STRING_BITNAME_st { int bitnum; const char *lname; const char *sname; } BIT_STRING_BITNAME; # define B_ASN1_TIME \ B_ASN1_UTCTIME | \ B_ASN1_GENERALIZEDTIME # define B_ASN1_PRINTABLE \ B_ASN1_NUMERICSTRING| \ B_ASN1_PRINTABLESTRING| \ B_ASN1_T61STRING| \ B_ASN1_IA5STRING| \ B_ASN1_BIT_STRING| \ B_ASN1_UNIVERSALSTRING|\ B_ASN1_BMPSTRING|\ B_ASN1_UTF8STRING|\ B_ASN1_SEQUENCE|\ B_ASN1_UNKNOWN # define B_ASN1_DIRECTORYSTRING \ B_ASN1_PRINTABLESTRING| \ B_ASN1_TELETEXSTRING|\ B_ASN1_BMPSTRING|\ B_ASN1_UNIVERSALSTRING|\ B_ASN1_UTF8STRING # define B_ASN1_DISPLAYTEXT \ B_ASN1_IA5STRING| \ B_ASN1_VISIBLESTRING| \ B_ASN1_BMPSTRING|\ B_ASN1_UTF8STRING DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) int ASN1_TYPE_get(const ASN1_TYPE *a); void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b); ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t); void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t); ASN1_OBJECT *ASN1_OBJECT_new(void); void ASN1_OBJECT_free(ASN1_OBJECT *a); int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp); ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long length); DECLARE_ASN1_ITEM(ASN1_OBJECT) DEFINE_STACK_OF(ASN1_OBJECT) ASN1_STRING *ASN1_STRING_new(void); void ASN1_STRING_free(ASN1_STRING *a); void ASN1_STRING_clear_free(ASN1_STRING *a); int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str); ASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a); ASN1_STRING *ASN1_STRING_type_new(int type); int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b); /* * Since this is used to store all sorts of things, via macros, for now, * make its data void * */ int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len); void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len); int ASN1_STRING_length(const ASN1_STRING *x); void ASN1_STRING_length_set(ASN1_STRING *x, int n); int ASN1_STRING_type(const ASN1_STRING *x); DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x)) const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x); DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING) int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length); int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n); int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a, const unsigned char *flags, int flags_len); int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, BIT_STRING_BITNAME *tbl, int indent); int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl); int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value, BIT_STRING_BITNAME *tbl); DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER) ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, long length); ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x); int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y); DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED) int ASN1_UTCTIME_check(const ASN1_UTCTIME *a); ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t); ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, int offset_day, long offset_sec); int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a); ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, time_t t); ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, time_t t, int offset_day, long offset_sec); int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to); DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING) ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a); int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a, const ASN1_OCTET_STRING *b); int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, int len); DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING) DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING) DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING) DECLARE_ASN1_FUNCTIONS(ASN1_NULL) DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING) int UTF8_getc(const unsigned char *str, int len, unsigned long *val); int UTF8_putc(unsigned char *str, int len, unsigned long value); DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE) DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING) DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT) DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING) DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING) DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING) DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING) DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME) DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME) DECLARE_ASN1_FUNCTIONS(ASN1_TIME) DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF) ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t); ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t, int offset_day, long offset_sec); int ASN1_TIME_check(const ASN1_TIME *t); ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t, ASN1_GENERALIZEDTIME **out); int ASN1_TIME_set_string(ASN1_TIME *s, const char *str); int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str); int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm); int ASN1_TIME_normalize(ASN1_TIME *s); int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t); int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b); int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a); int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size); int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a); int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size); int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a); int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size); int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type); int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a); int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num); ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len, const char *sn, const char *ln); int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a); int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r); int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a); int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r); int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); long ASN1_INTEGER_get(const ASN1_INTEGER *a); ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai); BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn); int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a); int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r); int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a); ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai); BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn); /* General */ /* given a string, return the correct type, max is the maximum length */ int ASN1_PRINTABLE_type(const unsigned char *s, int max); unsigned long ASN1_tag2bit(int tag); /* SPECIALS */ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag, int *pclass, long omax); int ASN1_check_infinite_end(unsigned char **p, long len); int ASN1_const_check_infinite_end(const unsigned char **p, long len); void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag, int xclass); int ASN1_put_eoc(unsigned char **pp); int ASN1_object_size(int constructed, int length, int tag); /* Used to implement other functions */ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x); # define ASN1_dup_of(type,i2d,d2i,x) \ ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \ CHECKED_D2I_OF(type, d2i), \ CHECKED_PTR_OF(type, x))) # define ASN1_dup_of_const(type,i2d,d2i,x) \ ((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \ CHECKED_D2I_OF(type, d2i), \ CHECKED_PTR_OF(const type, x))) void *ASN1_item_dup(const ASN1_ITEM *it, void *x); /* ASN1 alloc/free macros for when a type is only used internally */ # define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type)) # define M_ASN1_free_of(x, type) \ ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type)) # ifndef OPENSSL_NO_STDIO void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x); # define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \ CHECKED_D2I_OF(type, d2i), \ in, \ CHECKED_PPTR_OF(type, x))) void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x); int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x); # define ASN1_i2d_fp_of(type,i2d,out,x) \ (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \ out, \ CHECKED_PTR_OF(type, x))) # define ASN1_i2d_fp_of_const(type,i2d,out,x) \ (ASN1_i2d_fp(CHECKED_I2D_OF(const type, i2d), \ out, \ CHECKED_PTR_OF(const type, x))) int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x); int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags); # endif int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in); void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x); # define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \ ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \ CHECKED_D2I_OF(type, d2i), \ in, \ CHECKED_PPTR_OF(type, x))) void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x); int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x); # define ASN1_i2d_bio_of(type,i2d,out,x) \ (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \ out, \ CHECKED_PTR_OF(type, x))) # define ASN1_i2d_bio_of_const(type,i2d,out,x) \ (ASN1_i2d_bio(CHECKED_I2D_OF(const type, i2d), \ out, \ CHECKED_PTR_OF(const type, x))) int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a); int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a); int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a); int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v); int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags); int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off); int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, unsigned char *buf, int off); int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent); int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent, int dump); const char *ASN1_tag2str(int tag); /* Used to load and write Netscape format cert */ int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s); int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len); int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len); int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data, int len); int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num, unsigned char *data, int max_len); void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it); ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); void ASN1_STRING_set_default_mask(unsigned long mask); int ASN1_STRING_set_default_mask_asc(const char *p); unsigned long ASN1_STRING_get_default_mask(void); int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, int inform, unsigned long mask); int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, int inform, unsigned long mask, long minsize, long maxsize); ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in, int inlen, int inform, int nid); ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid); int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long); void ASN1_STRING_TABLE_cleanup(void); /* ASN1 template functions */ /* Old API compatible functions */ ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it); void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it); ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it); int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); void ASN1_add_oid_module(void); void ASN1_add_stable_module(void); ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf); ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf); int ASN1_str2mask(const char *str, unsigned long *pmask); /* ASN1 Print flags */ /* Indicate missing OPTIONAL fields */ # define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001 /* Mark start and end of SEQUENCE */ # define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002 /* Mark start and end of SEQUENCE/SET OF */ # define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004 /* Show the ASN1 type of primitives */ # define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008 /* Don't show ASN1 type of ANY */ # define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010 /* Don't show ASN1 type of MSTRINGs */ # define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020 /* Don't show field names in SEQUENCE */ # define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040 /* Show structure names of each SEQUENCE field */ # define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080 /* Don't show structure name even at top level */ # define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100 int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent, const ASN1_ITEM *it, const ASN1_PCTX *pctx); ASN1_PCTX *ASN1_PCTX_new(void); void ASN1_PCTX_free(ASN1_PCTX *p); unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p); void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags); unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p); void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags); unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p); void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags); unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p); void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags); unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p); void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx)); void ASN1_SCTX_free(ASN1_SCTX *p); const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p); const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p); unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p); void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data); void *ASN1_SCTX_get_app_data(ASN1_SCTX *p); const BIO_METHOD *BIO_f_asn1(void); BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, const ASN1_ITEM *it); int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, const char *hdr, const ASN1_ITEM *it); int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, int ctype_nid, int econt_nid, STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it); ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); int SMIME_crlf_copy(BIO *in, BIO *out, int flags); int SMIME_text(BIO *in, BIO *out); const ASN1_ITEM *ASN1_ITEM_lookup(const char *name); const ASN1_ITEM *ASN1_ITEM_get(size_t i); # ifdef __cplusplus } # endif #endif PKZX- openssl/kdf.hnu[/* * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_KDF_H # define HEADER_KDF_H # include # include # ifdef __cplusplus extern "C" { # endif # define EVP_KDF_PBKDF2 NID_id_pbkdf2 # define EVP_KDF_SCRYPT NID_id_scrypt # define EVP_KDF_TLS1_PRF NID_tls1_prf # define EVP_KDF_HKDF NID_hkdf # define EVP_KDF_SSHKDF NID_sshkdf # define EVP_KDF_KB NID_kbkdf # define EVP_KDF_KRB5KDF NID_krb5kdf # define EVP_KDF_SS NID_sskdf EVP_KDF_CTX *EVP_KDF_CTX_new_id(int id); void EVP_KDF_CTX_free(EVP_KDF_CTX *ctx); void EVP_KDF_reset(EVP_KDF_CTX *ctx); int EVP_KDF_ctrl(EVP_KDF_CTX *ctx, int cmd, ...); int EVP_KDF_vctrl(EVP_KDF_CTX *ctx, int cmd, va_list args); int EVP_KDF_ctrl_str(EVP_KDF_CTX *ctx, const char *type, const char *value); size_t EVP_KDF_size(EVP_KDF_CTX *ctx); int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen); # define EVP_KDF_CTRL_SET_PASS 0x01 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_SALT 0x02 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_ITER 0x03 /* int */ # define EVP_KDF_CTRL_SET_MD 0x04 /* EVP_MD * */ # define EVP_KDF_CTRL_SET_KEY 0x05 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_MAXMEM_BYTES 0x06 /* uint64_t */ # define EVP_KDF_CTRL_SET_TLS_SECRET 0x07 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_RESET_TLS_SEED 0x08 # define EVP_KDF_CTRL_ADD_TLS_SEED 0x09 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_RESET_HKDF_INFO 0x0a # define EVP_KDF_CTRL_ADD_HKDF_INFO 0x0b /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_HKDF_MODE 0x0c /* int */ # define EVP_KDF_CTRL_SET_SCRYPT_N 0x0d /* uint64_t */ # define EVP_KDF_CTRL_SET_SCRYPT_R 0x0e /* uint32_t */ # define EVP_KDF_CTRL_SET_SCRYPT_P 0x0f /* uint32_t */ # define EVP_KDF_CTRL_SET_SSHKDF_XCGHASH 0x10 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_SSHKDF_SESSION_ID 0x11 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_SSHKDF_TYPE 0x12 /* int */ # define EVP_KDF_CTRL_SET_KB_MODE 0x13 /* int */ # define EVP_KDF_CTRL_SET_KB_MAC_TYPE 0x14 /* int */ # define EVP_KDF_CTRL_SET_CIPHER 0x15 /* EVP_CIPHER * */ # define EVP_KDF_CTRL_SET_KB_INFO 0x16 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_KB_SEED 0x17 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_KRB5KDF_CONSTANT 0x18 /* unsigned char *, size_t */ # define EVP_KDF_CTRL_SET_SSKDF_INFO 0x19 /* unsigned char *, size_t */ # define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 0 # define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1 # define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2 #define EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV 65 #define EVP_KDF_SSHKDF_TYPE_INITIAL_IV_SRV_TO_CLI 66 #define EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_CLI_TO_SRV 67 #define EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_SRV_TO_CLI 68 #define EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_CLI_TO_SRV 69 #define EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_SRV_TO_CLI 70 #define EVP_KDF_KB_MODE_COUNTER 0 #define EVP_KDF_KB_MODE_FEEDBACK 1 #define EVP_KDF_KB_MAC_TYPE_HMAC 0 #define EVP_KDF_KB_MAC_TYPE_CMAC 1 /**** The legacy PKEY-based KDF API follows. ****/ # define EVP_PKEY_CTRL_TLS_MD (EVP_PKEY_ALG_CTRL) # define EVP_PKEY_CTRL_TLS_SECRET (EVP_PKEY_ALG_CTRL + 1) # define EVP_PKEY_CTRL_TLS_SEED (EVP_PKEY_ALG_CTRL + 2) # define EVP_PKEY_CTRL_HKDF_MD (EVP_PKEY_ALG_CTRL + 3) # define EVP_PKEY_CTRL_HKDF_SALT (EVP_PKEY_ALG_CTRL + 4) # define EVP_PKEY_CTRL_HKDF_KEY (EVP_PKEY_ALG_CTRL + 5) # define EVP_PKEY_CTRL_HKDF_INFO (EVP_PKEY_ALG_CTRL + 6) # define EVP_PKEY_CTRL_HKDF_MODE (EVP_PKEY_ALG_CTRL + 7) # define EVP_PKEY_CTRL_PASS (EVP_PKEY_ALG_CTRL + 8) # define EVP_PKEY_CTRL_SCRYPT_SALT (EVP_PKEY_ALG_CTRL + 9) # define EVP_PKEY_CTRL_SCRYPT_N (EVP_PKEY_ALG_CTRL + 10) # define EVP_PKEY_CTRL_SCRYPT_R (EVP_PKEY_ALG_CTRL + 11) # define EVP_PKEY_CTRL_SCRYPT_P (EVP_PKEY_ALG_CTRL + 12) # define EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES (EVP_PKEY_ALG_CTRL + 13) # define EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND \ EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND # define EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY \ EVP_KDF_HKDF_MODE_EXTRACT_ONLY # define EVP_PKEY_HKDEF_MODE_EXPAND_ONLY \ EVP_KDF_HKDF_MODE_EXPAND_ONLY # define EVP_PKEY_CTX_set_tls1_prf_md(pctx, md) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_TLS_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_set1_tls1_prf_secret(pctx, sec, seclen) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_TLS_SECRET, seclen, (void *)(sec)) # define EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, seed, seedlen) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_TLS_SEED, seedlen, (void *)(seed)) # define EVP_PKEY_CTX_set_hkdf_md(pctx, md) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_HKDF_MD, 0, (void *)(md)) # define EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt, saltlen) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_HKDF_SALT, saltlen, (void *)(salt)) # define EVP_PKEY_CTX_set1_hkdf_key(pctx, key, keylen) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_HKDF_KEY, keylen, (void *)(key)) # define EVP_PKEY_CTX_add1_hkdf_info(pctx, info, infolen) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_HKDF_INFO, infolen, (void *)(info)) # define EVP_PKEY_CTX_hkdf_mode(pctx, mode) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_HKDF_MODE, mode, NULL) # define EVP_PKEY_CTX_set1_pbe_pass(pctx, pass, passlen) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_PASS, passlen, (void *)(pass)) # define EVP_PKEY_CTX_set1_scrypt_salt(pctx, salt, saltlen) \ EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_SCRYPT_SALT, saltlen, (void *)(salt)) # define EVP_PKEY_CTX_set_scrypt_N(pctx, n) \ EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_SCRYPT_N, n) # define EVP_PKEY_CTX_set_scrypt_r(pctx, r) \ EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_SCRYPT_R, r) # define EVP_PKEY_CTX_set_scrypt_p(pctx, p) \ EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_SCRYPT_P, p) # define EVP_PKEY_CTX_set_scrypt_maxmem_bytes(pctx, maxmem_bytes) \ EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES, maxmem_bytes) # ifdef __cplusplus } # endif #endif PKZ#I"I"openssl/x509v3err.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_X509V3ERR_H # define HEADER_X509V3ERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_X509V3_strings(void); /* * X509V3 function codes. */ # define X509V3_F_A2I_GENERAL_NAME 164 # define X509V3_F_ADDR_VALIDATE_PATH_INTERNAL 166 # define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 161 # define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 162 # define X509V3_F_BIGNUM_TO_STRING 167 # define X509V3_F_COPY_EMAIL 122 # define X509V3_F_COPY_ISSUER 123 # define X509V3_F_DO_DIRNAME 144 # define X509V3_F_DO_EXT_I2D 135 # define X509V3_F_DO_EXT_NCONF 151 # define X509V3_F_GNAMES_FROM_SECTNAME 156 # define X509V3_F_I2S_ASN1_ENUMERATED 121 # define X509V3_F_I2S_ASN1_IA5STRING 149 # define X509V3_F_I2S_ASN1_INTEGER 120 # define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 138 # define X509V3_F_LEVEL_ADD_NODE 168 # define X509V3_F_NOTICE_SECTION 132 # define X509V3_F_NREF_NOS 133 # define X509V3_F_POLICY_CACHE_CREATE 169 # define X509V3_F_POLICY_CACHE_NEW 170 # define X509V3_F_POLICY_DATA_NEW 171 # define X509V3_F_POLICY_SECTION 131 # define X509V3_F_PROCESS_PCI_VALUE 150 # define X509V3_F_R2I_CERTPOL 130 # define X509V3_F_R2I_PCI 155 # define X509V3_F_S2I_ASN1_IA5STRING 100 # define X509V3_F_S2I_ASN1_INTEGER 108 # define X509V3_F_S2I_ASN1_OCTET_STRING 112 # define X509V3_F_S2I_SKEY_ID 115 # define X509V3_F_SET_DIST_POINT_NAME 158 # define X509V3_F_SXNET_ADD_ID_ASC 125 # define X509V3_F_SXNET_ADD_ID_INTEGER 126 # define X509V3_F_SXNET_ADD_ID_ULONG 127 # define X509V3_F_SXNET_GET_ID_ASC 128 # define X509V3_F_SXNET_GET_ID_ULONG 129 # define X509V3_F_TREE_INIT 172 # define X509V3_F_V2I_ASIDENTIFIERS 163 # define X509V3_F_V2I_ASN1_BIT_STRING 101 # define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 # define X509V3_F_V2I_AUTHORITY_KEYID 119 # define X509V3_F_V2I_BASIC_CONSTRAINTS 102 # define X509V3_F_V2I_CRLD 134 # define X509V3_F_V2I_EXTENDED_KEY_USAGE 103 # define X509V3_F_V2I_GENERAL_NAMES 118 # define X509V3_F_V2I_GENERAL_NAME_EX 117 # define X509V3_F_V2I_IDP 157 # define X509V3_F_V2I_IPADDRBLOCKS 159 # define X509V3_F_V2I_ISSUER_ALT 153 # define X509V3_F_V2I_NAME_CONSTRAINTS 147 # define X509V3_F_V2I_POLICY_CONSTRAINTS 146 # define X509V3_F_V2I_POLICY_MAPPINGS 145 # define X509V3_F_V2I_SUBJECT_ALT 154 # define X509V3_F_V2I_TLS_FEATURE 165 # define X509V3_F_V3_GENERIC_EXTENSION 116 # define X509V3_F_X509V3_ADD1_I2D 140 # define X509V3_F_X509V3_ADD_VALUE 105 # define X509V3_F_X509V3_EXT_ADD 104 # define X509V3_F_X509V3_EXT_ADD_ALIAS 106 # define X509V3_F_X509V3_EXT_I2D 136 # define X509V3_F_X509V3_EXT_NCONF 152 # define X509V3_F_X509V3_GET_SECTION 142 # define X509V3_F_X509V3_GET_STRING 143 # define X509V3_F_X509V3_GET_VALUE_BOOL 110 # define X509V3_F_X509V3_PARSE_LIST 109 # define X509V3_F_X509_PURPOSE_ADD 137 # define X509V3_F_X509_PURPOSE_SET 141 /* * X509V3 reason codes. */ # define X509V3_R_BAD_IP_ADDRESS 118 # define X509V3_R_BAD_OBJECT 119 # define X509V3_R_BN_DEC2BN_ERROR 100 # define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 # define X509V3_R_DIRNAME_ERROR 149 # define X509V3_R_DISTPOINT_ALREADY_SET 160 # define X509V3_R_DUPLICATE_ZONE_ID 133 # define X509V3_R_ERROR_CONVERTING_ZONE 131 # define X509V3_R_ERROR_CREATING_EXTENSION 144 # define X509V3_R_ERROR_IN_EXTENSION 128 # define X509V3_R_EXPECTED_A_SECTION_NAME 137 # define X509V3_R_EXTENSION_EXISTS 145 # define X509V3_R_EXTENSION_NAME_ERROR 115 # define X509V3_R_EXTENSION_NOT_FOUND 102 # define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 # define X509V3_R_EXTENSION_VALUE_ERROR 116 # define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 # define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 # define X509V3_R_INVALID_ASNUMBER 162 # define X509V3_R_INVALID_ASRANGE 163 # define X509V3_R_INVALID_BOOLEAN_STRING 104 # define X509V3_R_INVALID_EXTENSION_STRING 105 # define X509V3_R_INVALID_INHERITANCE 165 # define X509V3_R_INVALID_IPADDRESS 166 # define X509V3_R_INVALID_MULTIPLE_RDNS 161 # define X509V3_R_INVALID_NAME 106 # define X509V3_R_INVALID_NULL_ARGUMENT 107 # define X509V3_R_INVALID_NULL_NAME 108 # define X509V3_R_INVALID_NULL_VALUE 109 # define X509V3_R_INVALID_NUMBER 140 # define X509V3_R_INVALID_NUMBERS 141 # define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 # define X509V3_R_INVALID_OPTION 138 # define X509V3_R_INVALID_POLICY_IDENTIFIER 134 # define X509V3_R_INVALID_PROXY_POLICY_SETTING 153 # define X509V3_R_INVALID_PURPOSE 146 # define X509V3_R_INVALID_SAFI 164 # define X509V3_R_INVALID_SECTION 135 # define X509V3_R_INVALID_SYNTAX 143 # define X509V3_R_ISSUER_DECODE_ERROR 126 # define X509V3_R_MISSING_VALUE 124 # define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS 142 # define X509V3_R_NO_CONFIG_DATABASE 136 # define X509V3_R_NO_ISSUER_CERTIFICATE 121 # define X509V3_R_NO_ISSUER_DETAILS 127 # define X509V3_R_NO_POLICY_IDENTIFIER 139 # define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 154 # define X509V3_R_NO_PUBLIC_KEY 114 # define X509V3_R_NO_SUBJECT_DETAILS 125 # define X509V3_R_OPERATION_NOT_DEFINED 148 # define X509V3_R_OTHERNAME_ERROR 147 # define X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED 155 # define X509V3_R_POLICY_PATH_LENGTH 156 # define X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED 157 # define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 # define X509V3_R_SECTION_NOT_FOUND 150 # define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122 # define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123 # define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111 # define X509V3_R_UNKNOWN_EXTENSION 129 # define X509V3_R_UNKNOWN_EXTENSION_NAME 130 # define X509V3_R_UNKNOWN_OPTION 120 # define X509V3_R_UNSUPPORTED_OPTION 117 # define X509V3_R_UNSUPPORTED_TYPE 167 # define X509V3_R_USER_TOO_LONG 132 #endif PKZ openssl/md2.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_MD2_H # define HEADER_MD2_H # include # ifndef OPENSSL_NO_MD2 # include # ifdef __cplusplus extern "C" { # endif typedef unsigned char MD2_INT; # define MD2_DIGEST_LENGTH 16 # define MD2_BLOCK 16 typedef struct MD2state_st { unsigned int num; unsigned char data[MD2_BLOCK]; MD2_INT cksm[MD2_BLOCK]; MD2_INT state[MD2_BLOCK]; } MD2_CTX; const char *MD2_options(void); int MD2_Init(MD2_CTX *c); int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); int MD2_Final(unsigned char *md, MD2_CTX *c); unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md); # ifdef __cplusplus } # endif # endif #endif PKZ8?..openssl/asyncerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ASYNCERR_H # define HEADER_ASYNCERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_ASYNC_strings(void); /* * ASYNC function codes. */ # define ASYNC_F_ASYNC_CTX_NEW 100 # define ASYNC_F_ASYNC_INIT_THREAD 101 # define ASYNC_F_ASYNC_JOB_NEW 102 # define ASYNC_F_ASYNC_PAUSE_JOB 103 # define ASYNC_F_ASYNC_START_FUNC 104 # define ASYNC_F_ASYNC_START_JOB 105 # define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 106 /* * ASYNC reason codes. */ # define ASYNC_R_FAILED_TO_SET_POOL 101 # define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102 # define ASYNC_R_INIT_FAILED 105 # define ASYNC_R_INVALID_POOL_SIZE 103 #endif PKZC_9_9openssl/asn1err.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_ASN1ERR_H # define HEADER_ASN1ERR_H # include # ifdef __cplusplus extern "C" # endif int ERR_load_ASN1_strings(void); /* * ASN1 function codes. */ # define ASN1_F_A2D_ASN1_OBJECT 100 # define ASN1_F_A2I_ASN1_INTEGER 102 # define ASN1_F_A2I_ASN1_STRING 103 # define ASN1_F_APPEND_EXP 176 # define ASN1_F_ASN1_BIO_INIT 113 # define ASN1_F_ASN1_BIT_STRING_SET_BIT 183 # define ASN1_F_ASN1_CB 177 # define ASN1_F_ASN1_CHECK_TLEN 104 # define ASN1_F_ASN1_COLLECT 106 # define ASN1_F_ASN1_D2I_EX_PRIMITIVE 108 # define ASN1_F_ASN1_D2I_FP 109 # define ASN1_F_ASN1_D2I_READ_BIO 107 # define ASN1_F_ASN1_DIGEST 184 # define ASN1_F_ASN1_DO_ADB 110 # define ASN1_F_ASN1_DO_LOCK 233 # define ASN1_F_ASN1_DUP 111 # define ASN1_F_ASN1_ENC_SAVE 115 # define ASN1_F_ASN1_EX_C2I 204 # define ASN1_F_ASN1_FIND_END 190 # define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216 # define ASN1_F_ASN1_GENERATE_V3 178 # define ASN1_F_ASN1_GET_INT64 224 # define ASN1_F_ASN1_GET_OBJECT 114 # define ASN1_F_ASN1_GET_UINT64 225 # define ASN1_F_ASN1_I2D_BIO 116 # define ASN1_F_ASN1_I2D_FP 117 # define ASN1_F_ASN1_ITEM_D2I_FP 206 # define ASN1_F_ASN1_ITEM_DUP 191 # define ASN1_F_ASN1_ITEM_EMBED_D2I 120 # define ASN1_F_ASN1_ITEM_EMBED_NEW 121 # define ASN1_F_ASN1_ITEM_EX_I2D 144 # define ASN1_F_ASN1_ITEM_FLAGS_I2D 118 # define ASN1_F_ASN1_ITEM_I2D_BIO 192 # define ASN1_F_ASN1_ITEM_I2D_FP 193 # define ASN1_F_ASN1_ITEM_PACK 198 # define ASN1_F_ASN1_ITEM_SIGN 195 # define ASN1_F_ASN1_ITEM_SIGN_CTX 220 # define ASN1_F_ASN1_ITEM_UNPACK 199 # define ASN1_F_ASN1_ITEM_VERIFY 197 # define ASN1_F_ASN1_MBSTRING_NCOPY 122 # define ASN1_F_ASN1_OBJECT_NEW 123 # define ASN1_F_ASN1_OUTPUT_DATA 214 # define ASN1_F_ASN1_PCTX_NEW 205 # define ASN1_F_ASN1_PRIMITIVE_NEW 119 # define ASN1_F_ASN1_SCTX_NEW 221 # define ASN1_F_ASN1_SIGN 128 # define ASN1_F_ASN1_STR2TYPE 179 # define ASN1_F_ASN1_STRING_GET_INT64 227 # define ASN1_F_ASN1_STRING_GET_UINT64 230 # define ASN1_F_ASN1_STRING_SET 186 # define ASN1_F_ASN1_STRING_TABLE_ADD 129 # define ASN1_F_ASN1_STRING_TO_BN 228 # define ASN1_F_ASN1_STRING_TYPE_NEW 130 # define ASN1_F_ASN1_TEMPLATE_EX_D2I 132 # define ASN1_F_ASN1_TEMPLATE_NEW 133 # define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 131 # define ASN1_F_ASN1_TIME_ADJ 217 # define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134 # define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135 # define ASN1_F_ASN1_UTCTIME_ADJ 218 # define ASN1_F_ASN1_VERIFY 137 # define ASN1_F_B64_READ_ASN1 209 # define ASN1_F_B64_WRITE_ASN1 210 # define ASN1_F_BIO_NEW_NDEF 208 # define ASN1_F_BITSTR_CB 180 # define ASN1_F_BN_TO_ASN1_STRING 229 # define ASN1_F_C2I_ASN1_BIT_STRING 189 # define ASN1_F_C2I_ASN1_INTEGER 194 # define ASN1_F_C2I_ASN1_OBJECT 196 # define ASN1_F_C2I_IBUF 226 # define ASN1_F_C2I_UINT64_INT 101 # define ASN1_F_COLLECT_DATA 140 # define ASN1_F_D2I_ASN1_OBJECT 147 # define ASN1_F_D2I_ASN1_UINTEGER 150 # define ASN1_F_D2I_AUTOPRIVATEKEY 207 # define ASN1_F_D2I_PRIVATEKEY 154 # define ASN1_F_D2I_PUBLICKEY 155 # define ASN1_F_DO_BUF 142 # define ASN1_F_DO_CREATE 124 # define ASN1_F_DO_DUMP 125 # define ASN1_F_DO_TCREATE 222 # define ASN1_F_I2A_ASN1_OBJECT 126 # define ASN1_F_I2D_ASN1_BIO_STREAM 211 # define ASN1_F_I2D_ASN1_OBJECT 143 # define ASN1_F_I2D_DSA_PUBKEY 161 # define ASN1_F_I2D_EC_PUBKEY 181 # define ASN1_F_I2D_PRIVATEKEY 163 # define ASN1_F_I2D_PUBLICKEY 164 # define ASN1_F_I2D_RSA_PUBKEY 165 # define ASN1_F_LONG_C2I 166 # define ASN1_F_NDEF_PREFIX 127 # define ASN1_F_NDEF_SUFFIX 136 # define ASN1_F_OID_MODULE_INIT 174 # define ASN1_F_PARSE_TAGGING 182 # define ASN1_F_PKCS5_PBE2_SET_IV 167 # define ASN1_F_PKCS5_PBE2_SET_SCRYPT 231 # define ASN1_F_PKCS5_PBE_SET 202 # define ASN1_F_PKCS5_PBE_SET0_ALGOR 215 # define ASN1_F_PKCS5_PBKDF2_SET 219 # define ASN1_F_PKCS5_SCRYPT_SET 232 # define ASN1_F_SMIME_READ_ASN1 212 # define ASN1_F_SMIME_TEXT 213 # define ASN1_F_STABLE_GET 138 # define ASN1_F_STBL_MODULE_INIT 223 # define ASN1_F_UINT32_C2I 105 # define ASN1_F_UINT32_NEW 139 # define ASN1_F_UINT64_C2I 112 # define ASN1_F_UINT64_NEW 141 # define ASN1_F_X509_CRL_ADD0_REVOKED 169 # define ASN1_F_X509_INFO_NEW 170 # define ASN1_F_X509_NAME_ENCODE 203 # define ASN1_F_X509_NAME_EX_D2I 158 # define ASN1_F_X509_NAME_EX_NEW 171 # define ASN1_F_X509_PKEY_NEW 173 /* * ASN1 reason codes. */ # define ASN1_R_ADDING_OBJECT 171 # define ASN1_R_ASN1_PARSE_ERROR 203 # define ASN1_R_ASN1_SIG_PARSE_ERROR 204 # define ASN1_R_AUX_ERROR 100 # define ASN1_R_BAD_OBJECT_HEADER 102 # define ASN1_R_BAD_TEMPLATE 230 # define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214 # define ASN1_R_BN_LIB 105 # define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 # define ASN1_R_BUFFER_TOO_SMALL 107 # define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108 # define ASN1_R_CONTEXT_NOT_INITIALISED 217 # define ASN1_R_DATA_IS_WRONG 109 # define ASN1_R_DECODE_ERROR 110 # define ASN1_R_DEPTH_EXCEEDED 174 # define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198 # define ASN1_R_ENCODE_ERROR 112 # define ASN1_R_ERROR_GETTING_TIME 173 # define ASN1_R_ERROR_LOADING_SECTION 172 # define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114 # define ASN1_R_EXPECTING_AN_INTEGER 115 # define ASN1_R_EXPECTING_AN_OBJECT 116 # define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119 # define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120 # define ASN1_R_FIELD_MISSING 121 # define ASN1_R_FIRST_NUM_TOO_LARGE 122 # define ASN1_R_HEADER_TOO_LONG 123 # define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175 # define ASN1_R_ILLEGAL_BOOLEAN 176 # define ASN1_R_ILLEGAL_CHARACTERS 124 # define ASN1_R_ILLEGAL_FORMAT 177 # define ASN1_R_ILLEGAL_HEX 178 # define ASN1_R_ILLEGAL_IMPLICIT_TAG 179 # define ASN1_R_ILLEGAL_INTEGER 180 # define ASN1_R_ILLEGAL_NEGATIVE_VALUE 226 # define ASN1_R_ILLEGAL_NESTED_TAGGING 181 # define ASN1_R_ILLEGAL_NULL 125 # define ASN1_R_ILLEGAL_NULL_VALUE 182 # define ASN1_R_ILLEGAL_OBJECT 183 # define ASN1_R_ILLEGAL_OPTIONAL_ANY 126 # define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170 # define ASN1_R_ILLEGAL_PADDING 221 # define ASN1_R_ILLEGAL_TAGGED_ANY 127 # define ASN1_R_ILLEGAL_TIME_VALUE 184 # define ASN1_R_ILLEGAL_ZERO_CONTENT 222 # define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185 # define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 # define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220 # define ASN1_R_INVALID_BMPSTRING_LENGTH 129 # define ASN1_R_INVALID_DIGIT 130 # define ASN1_R_INVALID_MIME_TYPE 205 # define ASN1_R_INVALID_MODIFIER 186 # define ASN1_R_INVALID_NUMBER 187 # define ASN1_R_INVALID_OBJECT_ENCODING 216 # define ASN1_R_INVALID_SCRYPT_PARAMETERS 227 # define ASN1_R_INVALID_SEPARATOR 131 # define ASN1_R_INVALID_STRING_TABLE_VALUE 218 # define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133 # define ASN1_R_INVALID_UTF8STRING 134 # define ASN1_R_INVALID_VALUE 219 # define ASN1_R_LIST_ERROR 188 # define ASN1_R_MIME_NO_CONTENT_TYPE 206 # define ASN1_R_MIME_PARSE_ERROR 207 # define ASN1_R_MIME_SIG_PARSE_ERROR 208 # define ASN1_R_MISSING_EOC 137 # define ASN1_R_MISSING_SECOND_NUMBER 138 # define ASN1_R_MISSING_VALUE 189 # define ASN1_R_MSTRING_NOT_UNIVERSAL 139 # define ASN1_R_MSTRING_WRONG_TAG 140 # define ASN1_R_NESTED_ASN1_STRING 197 # define ASN1_R_NESTED_TOO_DEEP 201 # define ASN1_R_NON_HEX_CHARACTERS 141 # define ASN1_R_NOT_ASCII_FORMAT 190 # define ASN1_R_NOT_ENOUGH_DATA 142 # define ASN1_R_NO_CONTENT_TYPE 209 # define ASN1_R_NO_MATCHING_CHOICE_TYPE 143 # define ASN1_R_NO_MULTIPART_BODY_FAILURE 210 # define ASN1_R_NO_MULTIPART_BOUNDARY 211 # define ASN1_R_NO_SIG_CONTENT_TYPE 212 # define ASN1_R_NULL_IS_WRONG_LENGTH 144 # define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191 # define ASN1_R_ODD_NUMBER_OF_CHARS 145 # define ASN1_R_SECOND_NUMBER_TOO_LARGE 147 # define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148 # define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149 # define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192 # define ASN1_R_SHORT_LINE 150 # define ASN1_R_SIG_INVALID_MIME_TYPE 213 # define ASN1_R_STREAMING_NOT_SUPPORTED 202 # define ASN1_R_STRING_TOO_LONG 151 # define ASN1_R_STRING_TOO_SHORT 152 # define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154 # define ASN1_R_TIME_NOT_ASCII_FORMAT 193 # define ASN1_R_TOO_LARGE 223 # define ASN1_R_TOO_LONG 155 # define ASN1_R_TOO_SMALL 224 # define ASN1_R_TYPE_NOT_CONSTRUCTED 156 # define ASN1_R_TYPE_NOT_PRIMITIVE 195 # define ASN1_R_UNEXPECTED_EOC 159 # define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215 # define ASN1_R_UNKNOWN_FORMAT 160 # define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161 # define ASN1_R_UNKNOWN_OBJECT_TYPE 162 # define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163 # define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199 # define ASN1_R_UNKNOWN_TAG 194 # define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164 # define ASN1_R_UNSUPPORTED_CIPHER 228 # define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167 # define ASN1_R_UNSUPPORTED_TYPE 196 # define ASN1_R_WRONG_INTEGER_TYPE 225 # define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200 # define ASN1_R_WRONG_TAG 168 #endif PKZL?? openssl/cms.hnu[/* * Copyright 2008-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CMS_H # define HEADER_CMS_H # include # ifndef OPENSSL_NO_CMS # include # include # include # ifdef __cplusplus extern "C" { # endif typedef struct CMS_ContentInfo_st CMS_ContentInfo; typedef struct CMS_SignerInfo_st CMS_SignerInfo; typedef struct CMS_CertificateChoices CMS_CertificateChoices; typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice; typedef struct CMS_RecipientInfo_st CMS_RecipientInfo; typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest; typedef struct CMS_Receipt_st CMS_Receipt; typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey; typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute; DEFINE_STACK_OF(CMS_SignerInfo) DEFINE_STACK_OF(CMS_RecipientEncryptedKey) DEFINE_STACK_OF(CMS_RecipientInfo) DEFINE_STACK_OF(CMS_RevocationInfoChoice) DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo) DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest) DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo) # define CMS_SIGNERINFO_ISSUER_SERIAL 0 # define CMS_SIGNERINFO_KEYIDENTIFIER 1 # define CMS_RECIPINFO_NONE -1 # define CMS_RECIPINFO_TRANS 0 # define CMS_RECIPINFO_AGREE 1 # define CMS_RECIPINFO_KEK 2 # define CMS_RECIPINFO_PASS 3 # define CMS_RECIPINFO_OTHER 4 /* S/MIME related flags */ # define CMS_TEXT 0x1 # define CMS_NOCERTS 0x2 # define CMS_NO_CONTENT_VERIFY 0x4 # define CMS_NO_ATTR_VERIFY 0x8 # define CMS_NOSIGS \ (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY) # define CMS_NOINTERN 0x10 # define CMS_NO_SIGNER_CERT_VERIFY 0x20 # define CMS_NOVERIFY 0x20 # define CMS_DETACHED 0x40 # define CMS_BINARY 0x80 # define CMS_NOATTR 0x100 # define CMS_NOSMIMECAP 0x200 # define CMS_NOOLDMIMETYPE 0x400 # define CMS_CRLFEOL 0x800 # define CMS_STREAM 0x1000 # define CMS_NOCRL 0x2000 # define CMS_PARTIAL 0x4000 # define CMS_REUSE_DIGEST 0x8000 # define CMS_USE_KEYID 0x10000 # define CMS_DEBUG_DECRYPT 0x20000 # define CMS_KEY_PARAM 0x40000 # define CMS_ASCIICRLF 0x80000 const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms); BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont); int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio); ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms); int CMS_is_detached(CMS_ContentInfo *cms); int CMS_set_detached(CMS_ContentInfo *cms, int detached); # ifdef HEADER_PEM_H DECLARE_PEM_rw_const(CMS, CMS_ContentInfo) # endif int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms); CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms); int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms); BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms); int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags); int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags); CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont); int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags); int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont, unsigned int flags); CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, unsigned int flags); CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si, X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, unsigned int flags); int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags); CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags); int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags); CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md, unsigned int flags); int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms, const unsigned char *key, size_t keylen, BIO *dcont, BIO *out, unsigned int flags); CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, const unsigned char *key, size_t keylen, unsigned int flags); int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph, const unsigned char *key, size_t keylen); int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs, X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags); int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms, STACK_OF(X509) *certs, X509_STORE *store, unsigned int flags); STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms); CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, unsigned int flags); int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert, BIO *dcont, BIO *out, unsigned int flags); int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert); int CMS_decrypt_set1_key(CMS_ContentInfo *cms, unsigned char *key, size_t keylen, const unsigned char *id, size_t idlen); int CMS_decrypt_set1_password(CMS_ContentInfo *cms, unsigned char *pass, ossl_ssize_t passlen); STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms); int CMS_RecipientInfo_type(CMS_RecipientInfo *ri); EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri); CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher); CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms, X509 *recip, unsigned int flags); int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey); int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert); int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri, EVP_PKEY **pk, X509 **recip, X509_ALGOR **palg); int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno); CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid, unsigned char *key, size_t keylen, unsigned char *id, size_t idlen, ASN1_GENERALIZEDTIME *date, ASN1_OBJECT *otherTypeId, ASN1_TYPE *otherType); int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri, X509_ALGOR **palg, ASN1_OCTET_STRING **pid, ASN1_GENERALIZEDTIME **pdate, ASN1_OBJECT **potherid, ASN1_TYPE **pothertype); int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri, unsigned char *key, size_t keylen); int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri, const unsigned char *id, size_t idlen); int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri, unsigned char *pass, ossl_ssize_t passlen); CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, int pbe_nid, unsigned char *pass, ossl_ssize_t passlen, const EVP_CIPHER *kekciph); int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri); int CMS_RecipientInfo_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri); int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out, unsigned int flags); CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags); int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid); const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms); CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms); int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert); int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert); STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms); CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms); int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl); int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl); STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms); int CMS_SignedData_init(CMS_ContentInfo *cms); CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, X509 *signer, EVP_PKEY *pk, const EVP_MD *md, unsigned int flags); EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si); EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si); STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms); void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer); int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno); int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert); int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs, unsigned int flags); void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, X509 **signer, X509_ALGOR **pdig, X509_ALGOR **psig); ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si); int CMS_SignerInfo_sign(CMS_SignerInfo *si); int CMS_SignerInfo_verify(CMS_SignerInfo *si); int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain); int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs); int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs, int algnid, int keysize); int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap); int CMS_signed_get_attr_count(const CMS_SignerInfo *si); int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos); int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, int lastpos); X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc); X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc); int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, int type, const void *bytes, int len); int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, const void *bytes, int len); int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, int type, const void *bytes, int len); void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid, int lastpos, int type); int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si); int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos); int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj, int lastpos); X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc); X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc); int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *obj, int type, const void *bytes, int len); int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si, int nid, int type, const void *bytes, int len); int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si, const char *attrname, int type, const void *bytes, int len); void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, int lastpos, int type); int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr); CMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen, int allorfirst, STACK_OF(GENERAL_NAMES) *receiptList, STACK_OF(GENERAL_NAMES) *receiptsTo); int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr); void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid, int *pallorfirst, STACK_OF(GENERAL_NAMES) **plist, STACK_OF(GENERAL_NAMES) **prto); int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri, X509_ALGOR **palg, ASN1_OCTET_STRING **pukm); STACK_OF(CMS_RecipientEncryptedKey) *CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri); int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, X509_ALGOR **pubalg, ASN1_BIT_STRING **pubkey, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno); int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert); int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek, ASN1_OCTET_STRING **keyid, ASN1_GENERALIZEDTIME **tm, CMS_OtherKeyAttribute **other, X509_NAME **issuer, ASN1_INTEGER **sno); int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek, X509 *cert); int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk); EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri); int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, CMS_RecipientEncryptedKey *rek); int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg, ASN1_OCTET_STRING *ukm, int keylen); /* Backward compatibility for spelling errors. */ # define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM # define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \ CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE # ifdef __cplusplus } # endif # endif #endif PKZA6((openssl/modes.hnu[/* * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_MODES_H # define HEADER_MODES_H # include # ifdef __cplusplus extern "C" { # endif typedef void (*block128_f) (const unsigned char in[16], unsigned char out[16], const void *key); typedef void (*cbc128_f) (const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], int enc); typedef void (*ctr128_f) (const unsigned char *in, unsigned char *out, size_t blocks, const void *key, const unsigned char ivec[16]); typedef void (*ccm128_f) (const unsigned char *in, unsigned char *out, size_t blocks, const void *key, const unsigned char ivec[16], unsigned char cmac[16]); void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], block128_f block); void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], block128_f block); void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], unsigned char ecount_buf[16], unsigned int *num, block128_f block); void CRYPTO_ctr128_encrypt_ctr32(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], unsigned char ecount_buf[16], unsigned int *num, ctr128_f ctr); void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], int *num, block128_f block); void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], int *num, int enc, block128_f block); void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out, size_t length, const void *key, unsigned char ivec[16], int *num, int enc, block128_f block); void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out, size_t bits, const void *key, unsigned char ivec[16], int *num, int enc, block128_f block); size_t CRYPTO_cts128_encrypt_block(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], block128_f block); size_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], cbc128_f cbc); size_t CRYPTO_cts128_decrypt_block(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], block128_f block); size_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], cbc128_f cbc); size_t CRYPTO_nistcts128_encrypt_block(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], block128_f block); size_t CRYPTO_nistcts128_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], cbc128_f cbc); size_t CRYPTO_nistcts128_decrypt_block(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], block128_f block); size_t CRYPTO_nistcts128_decrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], cbc128_f cbc); typedef struct gcm128_context GCM128_CONTEXT; GCM128_CONTEXT *CRYPTO_gcm128_new(void *key, block128_f block); void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block); void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv, size_t len); int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad, size_t len); int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len); int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len); int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len, ctr128_f stream); int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len, ctr128_f stream); int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag, size_t len); void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len); void CRYPTO_gcm128_release(GCM128_CONTEXT *ctx); typedef struct ccm128_context CCM128_CONTEXT; void CRYPTO_ccm128_init(CCM128_CONTEXT *ctx, unsigned int M, unsigned int L, void *key, block128_f block); int CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx, const unsigned char *nonce, size_t nlen, size_t mlen); void CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx, const unsigned char *aad, size_t alen); int CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx, const unsigned char *inp, unsigned char *out, size_t len); int CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx, const unsigned char *inp, unsigned char *out, size_t len); int CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp, unsigned char *out, size_t len, ccm128_f stream); int CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp, unsigned char *out, size_t len, ccm128_f stream); size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len); typedef struct xts128_context XTS128_CONTEXT; int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16], const unsigned char *inp, unsigned char *out, size_t len, int enc); size_t CRYPTO_128_wrap(void *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, size_t inlen, block128_f block); size_t CRYPTO_128_unwrap(void *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, size_t inlen, block128_f block); size_t CRYPTO_128_wrap_pad(void *key, const unsigned char *icv, unsigned char *out, const unsigned char *in, size_t inlen, block128_f block); size_t CRYPTO_128_unwrap_pad(void *key, const unsigned char *icv, unsigned char *out, const unsigned char *in, size_t inlen, block128_f block); # ifndef OPENSSL_NO_OCB typedef struct ocb128_context OCB128_CONTEXT; typedef void (*ocb128_f) (const unsigned char *in, unsigned char *out, size_t blocks, const void *key, size_t start_block_num, unsigned char offset_i[16], const unsigned char L_[][16], unsigned char checksum[16]); OCB128_CONTEXT *CRYPTO_ocb128_new(void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt, ocb128_f stream); int CRYPTO_ocb128_init(OCB128_CONTEXT *ctx, void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt, ocb128_f stream); int CRYPTO_ocb128_copy_ctx(OCB128_CONTEXT *dest, OCB128_CONTEXT *src, void *keyenc, void *keydec); int CRYPTO_ocb128_setiv(OCB128_CONTEXT *ctx, const unsigned char *iv, size_t len, size_t taglen); int CRYPTO_ocb128_aad(OCB128_CONTEXT *ctx, const unsigned char *aad, size_t len); int CRYPTO_ocb128_encrypt(OCB128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len); int CRYPTO_ocb128_decrypt(OCB128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len); int CRYPTO_ocb128_finish(OCB128_CONTEXT *ctx, const unsigned char *tag, size_t len); int CRYPTO_ocb128_tag(OCB128_CONTEXT *ctx, unsigned char *tag, size_t len); void CRYPTO_ocb128_cleanup(OCB128_CONTEXT *ctx); # endif /* OPENSSL_NO_OCB */ # ifdef __cplusplus } # endif #endif PKZH100openssl/comp.hnu[/* * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_COMP_H # define HEADER_COMP_H # include # ifndef OPENSSL_NO_COMP # include # include # ifdef __cplusplus extern "C" { # endif COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx); int COMP_CTX_get_type(const COMP_CTX* comp); int COMP_get_type(const COMP_METHOD *meth); const char *COMP_get_name(const COMP_METHOD *meth); void COMP_CTX_free(COMP_CTX *ctx); int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, unsigned char *in, int ilen); int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, unsigned char *in, int ilen); COMP_METHOD *COMP_zlib(void); #if OPENSSL_API_COMPAT < 0x10100000L #define COMP_zlib_cleanup() while(0) continue #endif # ifdef HEADER_BIO_H # ifdef ZLIB const BIO_METHOD *BIO_f_zlib(void); # endif # endif # ifdef __cplusplus } # endif # endif #endif PKZC,ffopenssl/ecdh.hnu[/* * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #include PKZjWWopenssl/randerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_RANDERR_H # define HEADER_RANDERR_H # include # ifdef __cplusplus extern "C" # endif int ERR_load_RAND_strings(void); /* * RAND function codes. */ # define RAND_F_DATA_COLLECT_METHOD 127 # define RAND_F_DRBG_BYTES 101 # define RAND_F_DRBG_GET_ENTROPY 105 # define RAND_F_DRBG_SETUP 117 # define RAND_F_GET_ENTROPY 106 # define RAND_F_RAND_BYTES 100 # define RAND_F_RAND_DRBG_ENABLE_LOCKING 119 # define RAND_F_RAND_DRBG_GENERATE 107 # define RAND_F_RAND_DRBG_GET_ENTROPY 120 # define RAND_F_RAND_DRBG_GET_NONCE 123 # define RAND_F_RAND_DRBG_INSTANTIATE 108 # define RAND_F_RAND_DRBG_NEW 109 # define RAND_F_RAND_DRBG_RESEED 110 # define RAND_F_RAND_DRBG_RESTART 102 # define RAND_F_RAND_DRBG_SET 104 # define RAND_F_RAND_DRBG_SET_DEFAULTS 121 # define RAND_F_RAND_DRBG_UNINSTANTIATE 118 # define RAND_F_RAND_INIT_FIPS 200 # define RAND_F_RAND_LOAD_FILE 111 # define RAND_F_RAND_POOL_ACQUIRE_ENTROPY 122 # define RAND_F_RAND_POOL_ADD 103 # define RAND_F_RAND_POOL_ADD_BEGIN 113 # define RAND_F_RAND_POOL_ADD_END 114 # define RAND_F_RAND_POOL_ATTACH 124 # define RAND_F_RAND_POOL_BYTES_NEEDED 115 # define RAND_F_RAND_POOL_GROW 125 # define RAND_F_RAND_POOL_NEW 116 # define RAND_F_RAND_PSEUDO_BYTES 126 # define RAND_F_RAND_WRITE_FILE 112 /* * RAND reason codes. */ # define RAND_R_ADDITIONAL_INPUT_TOO_LONG 102 # define RAND_R_ALREADY_INSTANTIATED 103 # define RAND_R_ARGUMENT_OUT_OF_RANGE 105 # define RAND_R_CANNOT_OPEN_FILE 121 # define RAND_R_DRBG_ALREADY_INITIALIZED 129 # define RAND_R_DRBG_NOT_INITIALISED 104 # define RAND_R_ENTROPY_INPUT_TOO_LONG 106 # define RAND_R_ENTROPY_OUT_OF_RANGE 124 # define RAND_R_ERROR_ENTROPY_POOL_WAS_IGNORED 127 # define RAND_R_ERROR_INITIALISING_DRBG 107 # define RAND_R_ERROR_INSTANTIATING_DRBG 108 # define RAND_R_ERROR_RETRIEVING_ADDITIONAL_INPUT 109 # define RAND_R_ERROR_RETRIEVING_ENTROPY 110 # define RAND_R_ERROR_RETRIEVING_NONCE 111 # define RAND_R_FAILED_TO_CREATE_LOCK 126 # define RAND_R_FUNC_NOT_IMPLEMENTED 101 # define RAND_R_FWRITE_ERROR 123 # define RAND_R_GENERATE_ERROR 112 # define RAND_R_INTERNAL_ERROR 113 # define RAND_R_IN_ERROR_STATE 114 # define RAND_R_NOT_A_REGULAR_FILE 122 # define RAND_R_NOT_INSTANTIATED 115 # define RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED 128 # define RAND_R_PARENT_LOCKING_NOT_ENABLED 130 # define RAND_R_PARENT_STRENGTH_TOO_WEAK 131 # define RAND_R_PERSONALISATION_STRING_TOO_LONG 116 # define RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED 133 # define RAND_R_PRNG_NOT_SEEDED 100 # define RAND_R_RANDOM_POOL_OVERFLOW 125 # define RAND_R_RANDOM_POOL_UNDERFLOW 134 # define RAND_R_REQUEST_TOO_LARGE_FOR_DRBG 117 # define RAND_R_RESEED_ERROR 118 # define RAND_R_SELFTEST_FAILURE 119 # define RAND_R_TOO_LITTLE_NONCE_REQUESTED 135 # define RAND_R_TOO_MUCH_NONCE_REQUESTED 136 # define RAND_R_UNSUPPORTED_DRBG_FLAGS 132 # define RAND_R_UNSUPPORTED_DRBG_TYPE 120 #endif PKZ13533openssl/idea.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_IDEA_H # define HEADER_IDEA_H # include # ifndef OPENSSL_NO_IDEA # ifdef __cplusplus extern "C" { # endif typedef unsigned int IDEA_INT; # define IDEA_ENCRYPT 1 # define IDEA_DECRYPT 0 # define IDEA_BLOCK 8 # define IDEA_KEY_LENGTH 16 typedef struct idea_key_st { IDEA_INT data[9][6]; } IDEA_KEY_SCHEDULE; const char *IDEA_options(void); void IDEA_ecb_encrypt(const unsigned char *in, unsigned char *out, IDEA_KEY_SCHEDULE *ks); void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); void IDEA_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int enc); void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num, int enc); void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); # if OPENSSL_API_COMPAT < 0x10100000L # define idea_options IDEA_options # define idea_ecb_encrypt IDEA_ecb_encrypt # define idea_set_encrypt_key IDEA_set_encrypt_key # define idea_set_decrypt_key IDEA_set_decrypt_key # define idea_cbc_encrypt IDEA_cbc_encrypt # define idea_cfb64_encrypt IDEA_cfb64_encrypt # define idea_ofb64_encrypt IDEA_ofb64_encrypt # define idea_encrypt IDEA_encrypt # endif # ifdef __cplusplus } # endif # endif #endif PKZtCCopenssl/crypto.hnu[/* * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CRYPTO_H # define HEADER_CRYPTO_H # include # include # include # ifndef OPENSSL_NO_STDIO # include # endif # include # include # include # include # include # ifdef CHARSET_EBCDIC # include # endif /* * Resolve problems on some operating systems with symbol names that clash * one way or another */ # include # if OPENSSL_API_COMPAT < 0x10100000L # include # endif #ifdef __cplusplus extern "C" { #endif # if OPENSSL_API_COMPAT < 0x10100000L # define SSLeay OpenSSL_version_num # define SSLeay_version OpenSSL_version # define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER # define SSLEAY_VERSION OPENSSL_VERSION # define SSLEAY_CFLAGS OPENSSL_CFLAGS # define SSLEAY_BUILT_ON OPENSSL_BUILT_ON # define SSLEAY_PLATFORM OPENSSL_PLATFORM # define SSLEAY_DIR OPENSSL_DIR /* * Old type for allocating dynamic locks. No longer used. Use the new thread * API instead. */ typedef struct { int dummy; } CRYPTO_dynlock; # endif /* OPENSSL_API_COMPAT */ typedef void CRYPTO_RWLOCK; CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void); int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock); int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock); int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock); void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock); int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock); /* * The following can be used to detect memory leaks in the library. If * used, it turns on malloc checking */ # define CRYPTO_MEM_CHECK_OFF 0x0 /* Control only */ # define CRYPTO_MEM_CHECK_ON 0x1 /* Control and mode bit */ # define CRYPTO_MEM_CHECK_ENABLE 0x2 /* Control and mode bit */ # define CRYPTO_MEM_CHECK_DISABLE 0x3 /* Control only */ struct crypto_ex_data_st { STACK_OF(void) *sk; }; DEFINE_STACK_OF(void) /* * Per class, we have a STACK of function pointers. */ # define CRYPTO_EX_INDEX_SSL 0 # define CRYPTO_EX_INDEX_SSL_CTX 1 # define CRYPTO_EX_INDEX_SSL_SESSION 2 # define CRYPTO_EX_INDEX_X509 3 # define CRYPTO_EX_INDEX_X509_STORE 4 # define CRYPTO_EX_INDEX_X509_STORE_CTX 5 # define CRYPTO_EX_INDEX_DH 6 # define CRYPTO_EX_INDEX_DSA 7 # define CRYPTO_EX_INDEX_EC_KEY 8 # define CRYPTO_EX_INDEX_RSA 9 # define CRYPTO_EX_INDEX_ENGINE 10 # define CRYPTO_EX_INDEX_UI 11 # define CRYPTO_EX_INDEX_BIO 12 # define CRYPTO_EX_INDEX_APP 13 # define CRYPTO_EX_INDEX_UI_METHOD 14 # define CRYPTO_EX_INDEX_DRBG 15 # define CRYPTO_EX_INDEX__COUNT 16 /* No longer needed, so this is a no-op */ #define OPENSSL_malloc_init() while(0) continue int CRYPTO_mem_ctrl(int mode); # define OPENSSL_malloc(num) \ CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_zalloc(num) \ CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_realloc(addr, num) \ CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_clear_realloc(addr, old_num, num) \ CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_clear_free(addr, num) \ CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_free(addr) \ CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_memdup(str, s) \ CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_strdup(str) \ CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_strndup(str, n) \ CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_secure_malloc(num) \ CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_secure_zalloc(num) \ CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_secure_free(addr) \ CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_secure_clear_free(addr, num) \ CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_secure_actual_size(ptr) \ CRYPTO_secure_actual_size(ptr) size_t OPENSSL_strlcpy(char *dst, const char *src, size_t siz); size_t OPENSSL_strlcat(char *dst, const char *src, size_t siz); size_t OPENSSL_strnlen(const char *str, size_t maxlen); char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len); unsigned char *OPENSSL_hexstr2buf(const char *str, long *len); int OPENSSL_hexchar2int(unsigned char c); # define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type)) unsigned long OpenSSL_version_num(void); const char *OpenSSL_version(int type); # define OPENSSL_VERSION 0 # define OPENSSL_CFLAGS 1 # define OPENSSL_BUILT_ON 2 # define OPENSSL_PLATFORM 3 # define OPENSSL_DIR 4 # define OPENSSL_ENGINES_DIR 5 int OPENSSL_issetugid(void); typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp); typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp); typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, void *from_d, int idx, long argl, void *argp); __owur int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); /* No longer use an index. */ int CRYPTO_free_ex_index(int class_index, int idx); /* * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a * given class (invokes whatever per-class callbacks are applicable) */ int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from); void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad); /* * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular * index (relative to the class type involved) */ int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val); void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx); # if OPENSSL_API_COMPAT < 0x10100000L /* * This function cleans up all "ex_data" state. It mustn't be called under * potential race-conditions. */ # define CRYPTO_cleanup_all_ex_data() while(0) continue /* * The old locking functions have been removed completely without compatibility * macros. This is because the old functions either could not properly report * errors, or the returned error values were not clearly documented. * Replacing the locking functions with no-ops would cause race condition * issues in the affected applications. It is far better for them to fail at * compile time. * On the other hand, the locking callbacks are no longer used. Consequently, * the callback management functions can be safely replaced with no-op macros. */ # define CRYPTO_num_locks() (1) # define CRYPTO_set_locking_callback(func) # define CRYPTO_get_locking_callback() (NULL) # define CRYPTO_set_add_lock_callback(func) # define CRYPTO_get_add_lock_callback() (NULL) /* * These defines where used in combination with the old locking callbacks, * they are not called anymore, but old code that's not called might still * use them. */ # define CRYPTO_LOCK 1 # define CRYPTO_UNLOCK 2 # define CRYPTO_READ 4 # define CRYPTO_WRITE 8 /* This structure is no longer used */ typedef struct crypto_threadid_st { int dummy; } CRYPTO_THREADID; /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */ # define CRYPTO_THREADID_set_numeric(id, val) # define CRYPTO_THREADID_set_pointer(id, ptr) # define CRYPTO_THREADID_set_callback(threadid_func) (0) # define CRYPTO_THREADID_get_callback() (NULL) # define CRYPTO_THREADID_current(id) # define CRYPTO_THREADID_cmp(a, b) (-1) # define CRYPTO_THREADID_cpy(dest, src) # define CRYPTO_THREADID_hash(id) (0UL) # if OPENSSL_API_COMPAT < 0x10000000L # define CRYPTO_set_id_callback(func) # define CRYPTO_get_id_callback() (NULL) # define CRYPTO_thread_id() (0UL) # endif /* OPENSSL_API_COMPAT < 0x10000000L */ # define CRYPTO_set_dynlock_create_callback(dyn_create_function) # define CRYPTO_set_dynlock_lock_callback(dyn_lock_function) # define CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function) # define CRYPTO_get_dynlock_create_callback() (NULL) # define CRYPTO_get_dynlock_lock_callback() (NULL) # define CRYPTO_get_dynlock_destroy_callback() (NULL) # endif /* OPENSSL_API_COMPAT < 0x10100000L */ int CRYPTO_set_mem_functions( void *(*m) (size_t, const char *, int), void *(*r) (void *, size_t, const char *, int), void (*f) (void *, const char *, int)); int CRYPTO_set_mem_debug(int flag); void CRYPTO_get_mem_functions( void *(**m) (size_t, const char *, int), void *(**r) (void *, size_t, const char *, int), void (**f) (void *, const char *, int)); void *CRYPTO_malloc(size_t num, const char *file, int line); void *CRYPTO_zalloc(size_t num, const char *file, int line); void *CRYPTO_memdup(const void *str, size_t siz, const char *file, int line); char *CRYPTO_strdup(const char *str, const char *file, int line); char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line); void CRYPTO_free(void *ptr, const char *file, int line); void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line); void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line); void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num, const char *file, int line); int CRYPTO_secure_malloc_init(size_t sz, int minsize); int CRYPTO_secure_malloc_done(void); void *CRYPTO_secure_malloc(size_t num, const char *file, int line); void *CRYPTO_secure_zalloc(size_t num, const char *file, int line); void CRYPTO_secure_free(void *ptr, const char *file, int line); void CRYPTO_secure_clear_free(void *ptr, size_t num, const char *file, int line); int CRYPTO_secure_allocated(const void *ptr); int CRYPTO_secure_malloc_initialized(void); size_t CRYPTO_secure_actual_size(void *ptr); size_t CRYPTO_secure_used(void); void OPENSSL_cleanse(void *ptr, size_t len); # ifndef OPENSSL_NO_CRYPTO_MDEBUG # define OPENSSL_mem_debug_push(info) \ CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE) # define OPENSSL_mem_debug_pop() \ CRYPTO_mem_debug_pop() int CRYPTO_mem_debug_push(const char *info, const char *file, int line); int CRYPTO_mem_debug_pop(void); void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount); /*- * Debugging functions (enabled by CRYPTO_set_mem_debug(1)) * The flag argument has the following significance: * 0: called before the actual memory allocation has taken place * 1: called after the actual memory allocation has taken place */ void CRYPTO_mem_debug_malloc(void *addr, size_t num, int flag, const char *file, int line); void CRYPTO_mem_debug_realloc(void *addr1, void *addr2, size_t num, int flag, const char *file, int line); void CRYPTO_mem_debug_free(void *addr, int flag, const char *file, int line); int CRYPTO_mem_leaks_cb(int (*cb) (const char *str, size_t len, void *u), void *u); # ifndef OPENSSL_NO_STDIO int CRYPTO_mem_leaks_fp(FILE *); # endif int CRYPTO_mem_leaks(BIO *bio); # endif /* die if we have to */ ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line); # if OPENSSL_API_COMPAT < 0x10100000L # define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l)) # endif # define OPENSSL_assert(e) \ (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1)) int OPENSSL_isservice(void); int FIPS_mode(void); int FIPS_mode_set(int r); # ifdef OPENSSL_FIPS /* die if FIPS selftest failed */ void FIPS_selftest_check(void); # endif void OPENSSL_init(void); # ifdef OPENSSL_SYS_UNIX void OPENSSL_fork_prepare(void); void OPENSSL_fork_parent(void); void OPENSSL_fork_child(void); # endif struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result); int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec); int OPENSSL_gmtime_diff(int *pday, int *psec, const struct tm *from, const struct tm *to); /* * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal. * It takes an amount of time dependent on |len|, but independent of the * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements * into a defined order as the return value when a != b is undefined, other * than to be non-zero. */ int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len); /* Standard initialisation options */ # define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L # define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L # define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L # define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L # define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L # define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L # define OPENSSL_INIT_LOAD_CONFIG 0x00000040L # define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L # define OPENSSL_INIT_ASYNC 0x00000100L # define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L # define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L # define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L # define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L # define OPENSSL_INIT_ENGINE_CAPI 0x00002000L # define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L # define OPENSSL_INIT_ENGINE_AFALG 0x00008000L /* OPENSSL_INIT_ZLIB 0x00010000L */ # define OPENSSL_INIT_ATFORK 0x00020000L /* OPENSSL_INIT_BASE_ONLY 0x00040000L */ # define OPENSSL_INIT_NO_ATEXIT 0x00080000L /* OPENSSL_INIT flag range 0xfff00000 reserved for OPENSSL_init_ssl() */ /* Max OPENSSL_INIT flag value is 0x80000000 */ /* openssl and dasync not counted as builtin */ # define OPENSSL_INIT_ENGINE_ALL_BUILTIN \ (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \ | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \ OPENSSL_INIT_ENGINE_PADLOCK) /* Library initialisation functions */ void OPENSSL_cleanup(void); int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); int OPENSSL_atexit(void (*handler)(void)); void OPENSSL_thread_stop(void); /* Low-level control of initialization */ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void); # ifndef OPENSSL_NO_STDIO int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings, const char *config_filename); void OPENSSL_INIT_set_config_file_flags(OPENSSL_INIT_SETTINGS *settings, unsigned long flags); int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings, const char *config_appname); # endif void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings); # if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) # if defined(_WIN32) # if defined(BASETYPES) || defined(_WINDEF_H) /* application has to include in order to use this */ typedef DWORD CRYPTO_THREAD_LOCAL; typedef DWORD CRYPTO_THREAD_ID; typedef LONG CRYPTO_ONCE; # define CRYPTO_ONCE_STATIC_INIT 0 # endif # else # include typedef pthread_once_t CRYPTO_ONCE; typedef pthread_key_t CRYPTO_THREAD_LOCAL; typedef pthread_t CRYPTO_THREAD_ID; # define CRYPTO_ONCE_STATIC_INIT PTHREAD_ONCE_INIT # endif # endif # if !defined(CRYPTO_ONCE_STATIC_INIT) typedef unsigned int CRYPTO_ONCE; typedef unsigned int CRYPTO_THREAD_LOCAL; typedef unsigned int CRYPTO_THREAD_ID; # define CRYPTO_ONCE_STATIC_INIT 0 # endif int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void)); int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *)); void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key); int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val); int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key); CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void); int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b); # ifdef __cplusplus } # endif #endif PKZ~  openssl/opensslv.hnu[/* * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OPENSSLV_H # define HEADER_OPENSSLV_H #ifdef __cplusplus extern "C" { #endif /*- * Numeric release version identifier: * MNNFFPPS: major minor fix patch status * The status nibble has one of the values 0 for development, 1 to e for betas * 1 to 14, and f for release. The patch level is exactly that. * For example: * 0.9.3-dev 0x00903000 * 0.9.3-beta1 0x00903001 * 0.9.3-beta2-dev 0x00903002 * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) * 0.9.3 0x0090300f * 0.9.3a 0x0090301f * 0.9.4 0x0090400f * 1.2.3z 0x102031af * * For continuity reasons (because 0.9.5 is already out, and is coded * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level * part is slightly different, by setting the highest bit. This means * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start * with 0x0090600S... * * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ # define OPENSSL_VERSION_NUMBER 0x101010bfL # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1k FIPS 25 Mar 2021" /*- * The macros below are to be used for shared library (.so, .dll, ...) * versioning. That kind of versioning works a bit differently between * operating systems. The most usual scheme is to set a major and a minor * number, and have the runtime loader check that the major number is equal * to what it was at application link time, while the minor number has to * be greater or equal to what it was at application link time. With this * scheme, the version number is usually part of the file name, like this: * * libcrypto.so.0.9 * * Some unixen also make a softlink with the major version number only: * * libcrypto.so.0 * * On Tru64 and IRIX 6.x it works a little bit differently. There, the * shared library version is stored in the file, and is actually a series * of versions, separated by colons. The rightmost version present in the * library when linking an application is stored in the application to be * matched at run time. When the application is run, a check is done to * see if the library version stored in the application matches any of the * versions in the version string of the library itself. * This version string can be constructed in any way, depending on what * kind of matching is desired. However, to implement the same scheme as * the one used in the other unixen, all compatible versions, from lowest * to highest, should be part of the string. Consecutive builds would * give the following versions strings: * * 3.0 * 3.0:3.1 * 3.0:3.1:3.2 * 4.0 * 4.0:4.1 * * Notice how version 4 is completely incompatible with version, and * therefore give the breach you can see. * * There may be other schemes as well that I haven't yet discovered. * * So, here's the way it works here: first of all, the library version * number doesn't need at all to match the overall OpenSSL version. * However, it's nice and more understandable if it actually does. * The current library version is stored in the macro SHLIB_VERSION_NUMBER, * which is just a piece of text in the format "M.m.e" (Major, minor, edit). * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, * we need to keep a history of version numbers, which is done in the * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and * should only keep the versions that are binary compatible with the current. */ # define SHLIB_VERSION_HISTORY "" # define SHLIB_VERSION_NUMBER "1.1" #ifdef __cplusplus } #endif #endif /* HEADER_OPENSSLV_H */ PKZWߍffopenssl/pemerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_PEMERR_H # define HEADER_PEMERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_PEM_strings(void); /* * PEM function codes. */ # define PEM_F_B2I_DSS 127 # define PEM_F_B2I_PVK_BIO 128 # define PEM_F_B2I_RSA 129 # define PEM_F_CHECK_BITLEN_DSA 130 # define PEM_F_CHECK_BITLEN_RSA 131 # define PEM_F_D2I_PKCS8PRIVATEKEY_BIO 120 # define PEM_F_D2I_PKCS8PRIVATEKEY_FP 121 # define PEM_F_DO_B2I 132 # define PEM_F_DO_B2I_BIO 133 # define PEM_F_DO_BLOB_HEADER 134 # define PEM_F_DO_I2B 146 # define PEM_F_DO_PK8PKEY 126 # define PEM_F_DO_PK8PKEY_FP 125 # define PEM_F_DO_PVK_BODY 135 # define PEM_F_DO_PVK_HEADER 136 # define PEM_F_GET_HEADER_AND_DATA 143 # define PEM_F_GET_NAME 144 # define PEM_F_I2B_PVK 137 # define PEM_F_I2B_PVK_BIO 138 # define PEM_F_LOAD_IV 101 # define PEM_F_PEM_ASN1_READ 102 # define PEM_F_PEM_ASN1_READ_BIO 103 # define PEM_F_PEM_ASN1_WRITE 104 # define PEM_F_PEM_ASN1_WRITE_BIO 105 # define PEM_F_PEM_DEF_CALLBACK 100 # define PEM_F_PEM_DO_HEADER 106 # define PEM_F_PEM_GET_EVP_CIPHER_INFO 107 # define PEM_F_PEM_READ 108 # define PEM_F_PEM_READ_BIO 109 # define PEM_F_PEM_READ_BIO_DHPARAMS 141 # define PEM_F_PEM_READ_BIO_EX 145 # define PEM_F_PEM_READ_BIO_PARAMETERS 140 # define PEM_F_PEM_READ_BIO_PRIVATEKEY 123 # define PEM_F_PEM_READ_DHPARAMS 142 # define PEM_F_PEM_READ_PRIVATEKEY 124 # define PEM_F_PEM_SIGNFINAL 112 # define PEM_F_PEM_WRITE 113 # define PEM_F_PEM_WRITE_BIO 114 # define PEM_F_PEM_WRITE_BIO_PRIVATEKEY_TRADITIONAL 147 # define PEM_F_PEM_WRITE_PRIVATEKEY 139 # define PEM_F_PEM_X509_INFO_READ 115 # define PEM_F_PEM_X509_INFO_READ_BIO 116 # define PEM_F_PEM_X509_INFO_WRITE_BIO 117 /* * PEM reason codes. */ # define PEM_R_BAD_BASE64_DECODE 100 # define PEM_R_BAD_DECRYPT 101 # define PEM_R_BAD_END_LINE 102 # define PEM_R_BAD_IV_CHARS 103 # define PEM_R_BAD_MAGIC_NUMBER 116 # define PEM_R_BAD_PASSWORD_READ 104 # define PEM_R_BAD_VERSION_NUMBER 117 # define PEM_R_BIO_WRITE_FAILURE 118 # define PEM_R_CIPHER_IS_NULL 127 # define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115 # define PEM_R_EXPECTING_PRIVATE_KEY_BLOB 119 # define PEM_R_EXPECTING_PUBLIC_KEY_BLOB 120 # define PEM_R_HEADER_TOO_LONG 128 # define PEM_R_INCONSISTENT_HEADER 121 # define PEM_R_KEYBLOB_HEADER_PARSE_ERROR 122 # define PEM_R_KEYBLOB_TOO_SHORT 123 # define PEM_R_MISSING_DEK_IV 129 # define PEM_R_NOT_DEK_INFO 105 # define PEM_R_NOT_ENCRYPTED 106 # define PEM_R_NOT_PROC_TYPE 107 # define PEM_R_NO_START_LINE 108 # define PEM_R_PROBLEMS_GETTING_PASSWORD 109 # define PEM_R_PVK_DATA_TOO_SHORT 124 # define PEM_R_PVK_TOO_SHORT 125 # define PEM_R_READ_KEY 111 # define PEM_R_SHORT_HEADER 112 # define PEM_R_UNEXPECTED_DEK_IV 130 # define PEM_R_UNSUPPORTED_CIPHER 113 # define PEM_R_UNSUPPORTED_ENCRYPTION 114 # define PEM_R_UNSUPPORTED_KEY_COMPONENTS 126 # define PEM_R_UNSUPPORTED_PUBLIC_KEY_TYPE 110 #endif PKZB+1?++openssl/cmserr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CMSERR_H # define HEADER_CMSERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_CMS # ifdef __cplusplus extern "C" # endif int ERR_load_CMS_strings(void); /* * CMS function codes. */ # define CMS_F_CHECK_CONTENT 99 # define CMS_F_CMS_ADD0_CERT 164 # define CMS_F_CMS_ADD0_RECIPIENT_KEY 100 # define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 165 # define CMS_F_CMS_ADD1_RECEIPTREQUEST 158 # define CMS_F_CMS_ADD1_RECIPIENT_CERT 101 # define CMS_F_CMS_ADD1_SIGNER 102 # define CMS_F_CMS_ADD1_SIGNINGTIME 103 # define CMS_F_CMS_COMPRESS 104 # define CMS_F_CMS_COMPRESSEDDATA_CREATE 105 # define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 106 # define CMS_F_CMS_COPY_CONTENT 107 # define CMS_F_CMS_COPY_MESSAGEDIGEST 108 # define CMS_F_CMS_DATA 109 # define CMS_F_CMS_DATAFINAL 110 # define CMS_F_CMS_DATAINIT 111 # define CMS_F_CMS_DECRYPT 112 # define CMS_F_CMS_DECRYPT_SET1_KEY 113 # define CMS_F_CMS_DECRYPT_SET1_PASSWORD 166 # define CMS_F_CMS_DECRYPT_SET1_PKEY 114 # define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 115 # define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 116 # define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 117 # define CMS_F_CMS_DIGEST_VERIFY 118 # define CMS_F_CMS_ENCODE_RECEIPT 161 # define CMS_F_CMS_ENCRYPT 119 # define CMS_F_CMS_ENCRYPTEDCONTENT_INIT 179 # define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 120 # define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 121 # define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 122 # define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 123 # define CMS_F_CMS_ENVELOPEDDATA_CREATE 124 # define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 125 # define CMS_F_CMS_ENVELOPED_DATA_INIT 126 # define CMS_F_CMS_ENV_ASN1_CTRL 171 # define CMS_F_CMS_FINAL 127 # define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 128 # define CMS_F_CMS_GET0_CONTENT 129 # define CMS_F_CMS_GET0_ECONTENT_TYPE 130 # define CMS_F_CMS_GET0_ENVELOPED 131 # define CMS_F_CMS_GET0_REVOCATION_CHOICES 132 # define CMS_F_CMS_GET0_SIGNED 133 # define CMS_F_CMS_MSGSIGDIGEST_ADD1 162 # define CMS_F_CMS_RECEIPTREQUEST_CREATE0 159 # define CMS_F_CMS_RECEIPT_VERIFY 160 # define CMS_F_CMS_RECIPIENTINFO_DECRYPT 134 # define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 169 # define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 178 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 175 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 173 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 172 # define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 174 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 135 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 136 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 137 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 138 # define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 139 # define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 140 # define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 141 # define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 142 # define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 143 # define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 167 # define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 144 # define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 168 # define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 145 # define CMS_F_CMS_SD_ASN1_CTRL 170 # define CMS_F_CMS_SET1_IAS 176 # define CMS_F_CMS_SET1_KEYID 177 # define CMS_F_CMS_SET1_SIGNERIDENTIFIER 146 # define CMS_F_CMS_SET_DETACHED 147 # define CMS_F_CMS_SIGN 148 # define CMS_F_CMS_SIGNED_DATA_INIT 149 # define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150 # define CMS_F_CMS_SIGNERINFO_SIGN 151 # define CMS_F_CMS_SIGNERINFO_VERIFY 152 # define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153 # define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154 # define CMS_F_CMS_SIGN_RECEIPT 163 # define CMS_F_CMS_SI_CHECK_ATTRIBUTES 183 # define CMS_F_CMS_STREAM 155 # define CMS_F_CMS_UNCOMPRESS 156 # define CMS_F_CMS_VERIFY 157 # define CMS_F_KEK_UNWRAP_KEY 180 /* * CMS reason codes. */ # define CMS_R_ADD_SIGNER_ERROR 99 # define CMS_R_ATTRIBUTE_ERROR 161 # define CMS_R_CERTIFICATE_ALREADY_PRESENT 175 # define CMS_R_CERTIFICATE_HAS_NO_KEYID 160 # define CMS_R_CERTIFICATE_VERIFY_ERROR 100 # define CMS_R_CIPHER_INITIALISATION_ERROR 101 # define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102 # define CMS_R_CMS_DATAFINAL_ERROR 103 # define CMS_R_CMS_LIB 104 # define CMS_R_CONTENTIDENTIFIER_MISMATCH 170 # define CMS_R_CONTENT_NOT_FOUND 105 # define CMS_R_CONTENT_TYPE_MISMATCH 171 # define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106 # define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107 # define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108 # define CMS_R_CONTENT_VERIFY_ERROR 109 # define CMS_R_CTRL_ERROR 110 # define CMS_R_CTRL_FAILURE 111 # define CMS_R_DECRYPT_ERROR 112 # define CMS_R_ERROR_GETTING_PUBLIC_KEY 113 # define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114 # define CMS_R_ERROR_SETTING_KEY 115 # define CMS_R_ERROR_SETTING_RECIPIENTINFO 116 # define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117 # define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176 # define CMS_R_INVALID_KEY_LENGTH 118 # define CMS_R_MD_BIO_INIT_ERROR 119 # define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120 # define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121 # define CMS_R_MSGSIGDIGEST_ERROR 172 # define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162 # define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163 # define CMS_R_NEED_ONE_SIGNER 164 # define CMS_R_NOT_A_SIGNED_RECEIPT 165 # define CMS_R_NOT_ENCRYPTED_DATA 122 # define CMS_R_NOT_KEK 123 # define CMS_R_NOT_KEY_AGREEMENT 181 # define CMS_R_NOT_KEY_TRANSPORT 124 # define CMS_R_NOT_PWRI 177 # define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125 # define CMS_R_NO_CIPHER 126 # define CMS_R_NO_CONTENT 127 # define CMS_R_NO_CONTENT_TYPE 173 # define CMS_R_NO_DEFAULT_DIGEST 128 # define CMS_R_NO_DIGEST_SET 129 # define CMS_R_NO_KEY 130 # define CMS_R_NO_KEY_OR_CERT 174 # define CMS_R_NO_MATCHING_DIGEST 131 # define CMS_R_NO_MATCHING_RECIPIENT 132 # define CMS_R_NO_MATCHING_SIGNATURE 166 # define CMS_R_NO_MSGSIGDIGEST 167 # define CMS_R_NO_PASSWORD 178 # define CMS_R_NO_PRIVATE_KEY 133 # define CMS_R_NO_PUBLIC_KEY 134 # define CMS_R_NO_RECEIPT_REQUEST 168 # define CMS_R_NO_SIGNERS 135 # define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136 # define CMS_R_RECEIPT_DECODE_ERROR 169 # define CMS_R_RECIPIENT_ERROR 137 # define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138 # define CMS_R_SIGNFINAL_ERROR 139 # define CMS_R_SMIME_TEXT_ERROR 140 # define CMS_R_STORE_INIT_ERROR 141 # define CMS_R_TYPE_NOT_COMPRESSED_DATA 142 # define CMS_R_TYPE_NOT_DATA 143 # define CMS_R_TYPE_NOT_DIGESTED_DATA 144 # define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145 # define CMS_R_TYPE_NOT_ENVELOPED_DATA 146 # define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147 # define CMS_R_UNKNOWN_CIPHER 148 # define CMS_R_UNKNOWN_DIGEST_ALGORITHM 149 # define CMS_R_UNKNOWN_ID 150 # define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151 # define CMS_R_UNSUPPORTED_CONTENT_TYPE 152 # define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153 # define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179 # define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155 # define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154 # define CMS_R_UNSUPPORTED_TYPE 156 # define CMS_R_UNWRAP_ERROR 157 # define CMS_R_UNWRAP_FAILURE 180 # define CMS_R_VERIFICATION_FAILURE 158 # define CMS_R_WRAP_ERROR 159 # endif #endif PKZN%openssl/x509v3.hnu[/* * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_X509V3_H # define HEADER_X509V3_H # include # include # include # include #ifdef __cplusplus extern "C" { #endif /* Forward reference */ struct v3_ext_method; struct v3_ext_ctx; /* Useful typedefs */ typedef void *(*X509V3_EXT_NEW)(void); typedef void (*X509V3_EXT_FREE) (void *); typedef void *(*X509V3_EXT_D2I)(void *, const unsigned char **, long); typedef int (*X509V3_EXT_I2D) (void *, unsigned char **); typedef STACK_OF(CONF_VALUE) * (*X509V3_EXT_I2V) (const struct v3_ext_method *method, void *ext, STACK_OF(CONF_VALUE) *extlist); typedef void *(*X509V3_EXT_V2I)(const struct v3_ext_method *method, struct v3_ext_ctx *ctx, STACK_OF(CONF_VALUE) *values); typedef char *(*X509V3_EXT_I2S)(const struct v3_ext_method *method, void *ext); typedef void *(*X509V3_EXT_S2I)(const struct v3_ext_method *method, struct v3_ext_ctx *ctx, const char *str); typedef int (*X509V3_EXT_I2R) (const struct v3_ext_method *method, void *ext, BIO *out, int indent); typedef void *(*X509V3_EXT_R2I)(const struct v3_ext_method *method, struct v3_ext_ctx *ctx, const char *str); /* V3 extension structure */ struct v3_ext_method { int ext_nid; int ext_flags; /* If this is set the following four fields are ignored */ ASN1_ITEM_EXP *it; /* Old style ASN1 calls */ X509V3_EXT_NEW ext_new; X509V3_EXT_FREE ext_free; X509V3_EXT_D2I d2i; X509V3_EXT_I2D i2d; /* The following pair is used for string extensions */ X509V3_EXT_I2S i2s; X509V3_EXT_S2I s2i; /* The following pair is used for multi-valued extensions */ X509V3_EXT_I2V i2v; X509V3_EXT_V2I v2i; /* The following are used for raw extensions */ X509V3_EXT_I2R i2r; X509V3_EXT_R2I r2i; void *usr_data; /* Any extension specific data */ }; typedef struct X509V3_CONF_METHOD_st { char *(*get_string) (void *db, const char *section, const char *value); STACK_OF(CONF_VALUE) *(*get_section) (void *db, const char *section); void (*free_string) (void *db, char *string); void (*free_section) (void *db, STACK_OF(CONF_VALUE) *section); } X509V3_CONF_METHOD; /* Context specific info */ struct v3_ext_ctx { # define CTX_TEST 0x1 # define X509V3_CTX_REPLACE 0x2 int flags; X509 *issuer_cert; X509 *subject_cert; X509_REQ *subject_req; X509_CRL *crl; X509V3_CONF_METHOD *db_meth; void *db; /* Maybe more here */ }; typedef struct v3_ext_method X509V3_EXT_METHOD; DEFINE_STACK_OF(X509V3_EXT_METHOD) /* ext_flags values */ # define X509V3_EXT_DYNAMIC 0x1 # define X509V3_EXT_CTX_DEP 0x2 # define X509V3_EXT_MULTILINE 0x4 typedef BIT_STRING_BITNAME ENUMERATED_NAMES; typedef struct BASIC_CONSTRAINTS_st { int ca; ASN1_INTEGER *pathlen; } BASIC_CONSTRAINTS; typedef struct PKEY_USAGE_PERIOD_st { ASN1_GENERALIZEDTIME *notBefore; ASN1_GENERALIZEDTIME *notAfter; } PKEY_USAGE_PERIOD; typedef struct otherName_st { ASN1_OBJECT *type_id; ASN1_TYPE *value; } OTHERNAME; typedef struct EDIPartyName_st { ASN1_STRING *nameAssigner; ASN1_STRING *partyName; } EDIPARTYNAME; typedef struct GENERAL_NAME_st { # define GEN_OTHERNAME 0 # define GEN_EMAIL 1 # define GEN_DNS 2 # define GEN_X400 3 # define GEN_DIRNAME 4 # define GEN_EDIPARTY 5 # define GEN_URI 6 # define GEN_IPADD 7 # define GEN_RID 8 int type; union { char *ptr; OTHERNAME *otherName; /* otherName */ ASN1_IA5STRING *rfc822Name; ASN1_IA5STRING *dNSName; ASN1_STRING *x400Address; X509_NAME *directoryName; EDIPARTYNAME *ediPartyName; ASN1_IA5STRING *uniformResourceIdentifier; ASN1_OCTET_STRING *iPAddress; ASN1_OBJECT *registeredID; /* Old names */ ASN1_OCTET_STRING *ip; /* iPAddress */ X509_NAME *dirn; /* dirn */ ASN1_IA5STRING *ia5; /* rfc822Name, dNSName, * uniformResourceIdentifier */ ASN1_OBJECT *rid; /* registeredID */ ASN1_TYPE *other; /* x400Address */ } d; } GENERAL_NAME; typedef struct ACCESS_DESCRIPTION_st { ASN1_OBJECT *method; GENERAL_NAME *location; } ACCESS_DESCRIPTION; typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS; typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE; typedef STACK_OF(ASN1_INTEGER) TLS_FEATURE; DEFINE_STACK_OF(GENERAL_NAME) typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES; DEFINE_STACK_OF(GENERAL_NAMES) DEFINE_STACK_OF(ACCESS_DESCRIPTION) typedef struct DIST_POINT_NAME_st { int type; union { GENERAL_NAMES *fullname; STACK_OF(X509_NAME_ENTRY) *relativename; } name; /* If relativename then this contains the full distribution point name */ X509_NAME *dpname; } DIST_POINT_NAME; /* All existing reasons */ # define CRLDP_ALL_REASONS 0x807f # define CRL_REASON_NONE -1 # define CRL_REASON_UNSPECIFIED 0 # define CRL_REASON_KEY_COMPROMISE 1 # define CRL_REASON_CA_COMPROMISE 2 # define CRL_REASON_AFFILIATION_CHANGED 3 # define CRL_REASON_SUPERSEDED 4 # define CRL_REASON_CESSATION_OF_OPERATION 5 # define CRL_REASON_CERTIFICATE_HOLD 6 # define CRL_REASON_REMOVE_FROM_CRL 8 # define CRL_REASON_PRIVILEGE_WITHDRAWN 9 # define CRL_REASON_AA_COMPROMISE 10 struct DIST_POINT_st { DIST_POINT_NAME *distpoint; ASN1_BIT_STRING *reasons; GENERAL_NAMES *CRLissuer; int dp_reasons; }; typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; DEFINE_STACK_OF(DIST_POINT) struct AUTHORITY_KEYID_st { ASN1_OCTET_STRING *keyid; GENERAL_NAMES *issuer; ASN1_INTEGER *serial; }; /* Strong extranet structures */ typedef struct SXNET_ID_st { ASN1_INTEGER *zone; ASN1_OCTET_STRING *user; } SXNETID; DEFINE_STACK_OF(SXNETID) typedef struct SXNET_st { ASN1_INTEGER *version; STACK_OF(SXNETID) *ids; } SXNET; typedef struct NOTICEREF_st { ASN1_STRING *organization; STACK_OF(ASN1_INTEGER) *noticenos; } NOTICEREF; typedef struct USERNOTICE_st { NOTICEREF *noticeref; ASN1_STRING *exptext; } USERNOTICE; typedef struct POLICYQUALINFO_st { ASN1_OBJECT *pqualid; union { ASN1_IA5STRING *cpsuri; USERNOTICE *usernotice; ASN1_TYPE *other; } d; } POLICYQUALINFO; DEFINE_STACK_OF(POLICYQUALINFO) typedef struct POLICYINFO_st { ASN1_OBJECT *policyid; STACK_OF(POLICYQUALINFO) *qualifiers; } POLICYINFO; typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; DEFINE_STACK_OF(POLICYINFO) typedef struct POLICY_MAPPING_st { ASN1_OBJECT *issuerDomainPolicy; ASN1_OBJECT *subjectDomainPolicy; } POLICY_MAPPING; DEFINE_STACK_OF(POLICY_MAPPING) typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS; typedef struct GENERAL_SUBTREE_st { GENERAL_NAME *base; ASN1_INTEGER *minimum; ASN1_INTEGER *maximum; } GENERAL_SUBTREE; DEFINE_STACK_OF(GENERAL_SUBTREE) struct NAME_CONSTRAINTS_st { STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; STACK_OF(GENERAL_SUBTREE) *excludedSubtrees; }; typedef struct POLICY_CONSTRAINTS_st { ASN1_INTEGER *requireExplicitPolicy; ASN1_INTEGER *inhibitPolicyMapping; } POLICY_CONSTRAINTS; /* Proxy certificate structures, see RFC 3820 */ typedef struct PROXY_POLICY_st { ASN1_OBJECT *policyLanguage; ASN1_OCTET_STRING *policy; } PROXY_POLICY; typedef struct PROXY_CERT_INFO_EXTENSION_st { ASN1_INTEGER *pcPathLengthConstraint; PROXY_POLICY *proxyPolicy; } PROXY_CERT_INFO_EXTENSION; DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) struct ISSUING_DIST_POINT_st { DIST_POINT_NAME *distpoint; int onlyuser; int onlyCA; ASN1_BIT_STRING *onlysomereasons; int indirectCRL; int onlyattr; }; /* Values in idp_flags field */ /* IDP present */ # define IDP_PRESENT 0x1 /* IDP values inconsistent */ # define IDP_INVALID 0x2 /* onlyuser true */ # define IDP_ONLYUSER 0x4 /* onlyCA true */ # define IDP_ONLYCA 0x8 /* onlyattr true */ # define IDP_ONLYATTR 0x10 /* indirectCRL true */ # define IDP_INDIRECT 0x20 /* onlysomereasons present */ # define IDP_REASONS 0x40 # define X509V3_conf_err(val) ERR_add_error_data(6, \ "section:", (val)->section, \ ",name:", (val)->name, ",value:", (val)->value) # define X509V3_set_ctx_test(ctx) \ X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST) # define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL; # define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \ 0,0,0,0, \ 0,0, \ (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \ (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \ NULL, NULL, \ table} # define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \ 0,0,0,0, \ (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \ (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \ 0,0,0,0, \ NULL} # define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} /* X509_PURPOSE stuff */ # define EXFLAG_BCONS 0x1 # define EXFLAG_KUSAGE 0x2 # define EXFLAG_XKUSAGE 0x4 # define EXFLAG_NSCERT 0x8 # define EXFLAG_CA 0x10 /* Really self issued not necessarily self signed */ # define EXFLAG_SI 0x20 # define EXFLAG_V1 0x40 # define EXFLAG_INVALID 0x80 /* EXFLAG_SET is set to indicate that some values have been precomputed */ # define EXFLAG_SET 0x100 # define EXFLAG_CRITICAL 0x200 # define EXFLAG_PROXY 0x400 # define EXFLAG_INVALID_POLICY 0x800 # define EXFLAG_FRESHEST 0x1000 # define EXFLAG_SS 0x2000 /* cert is apparently self-signed */ # define EXFLAG_NO_FINGERPRINT 0x100000 # define KU_DIGITAL_SIGNATURE 0x0080 # define KU_NON_REPUDIATION 0x0040 # define KU_KEY_ENCIPHERMENT 0x0020 # define KU_DATA_ENCIPHERMENT 0x0010 # define KU_KEY_AGREEMENT 0x0008 # define KU_KEY_CERT_SIGN 0x0004 # define KU_CRL_SIGN 0x0002 # define KU_ENCIPHER_ONLY 0x0001 # define KU_DECIPHER_ONLY 0x8000 # define NS_SSL_CLIENT 0x80 # define NS_SSL_SERVER 0x40 # define NS_SMIME 0x20 # define NS_OBJSIGN 0x10 # define NS_SSL_CA 0x04 # define NS_SMIME_CA 0x02 # define NS_OBJSIGN_CA 0x01 # define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA) # define XKU_SSL_SERVER 0x1 # define XKU_SSL_CLIENT 0x2 # define XKU_SMIME 0x4 # define XKU_CODE_SIGN 0x8 # define XKU_SGC 0x10 # define XKU_OCSP_SIGN 0x20 # define XKU_TIMESTAMP 0x40 # define XKU_DVCS 0x80 # define XKU_ANYEKU 0x100 # define X509_PURPOSE_DYNAMIC 0x1 # define X509_PURPOSE_DYNAMIC_NAME 0x2 typedef struct x509_purpose_st { int purpose; int trust; /* Default trust ID */ int flags; int (*check_purpose) (const struct x509_purpose_st *, const X509 *, int); char *name; char *sname; void *usr_data; } X509_PURPOSE; # define X509_PURPOSE_SSL_CLIENT 1 # define X509_PURPOSE_SSL_SERVER 2 # define X509_PURPOSE_NS_SSL_SERVER 3 # define X509_PURPOSE_SMIME_SIGN 4 # define X509_PURPOSE_SMIME_ENCRYPT 5 # define X509_PURPOSE_CRL_SIGN 6 # define X509_PURPOSE_ANY 7 # define X509_PURPOSE_OCSP_HELPER 8 # define X509_PURPOSE_TIMESTAMP_SIGN 9 # define X509_PURPOSE_MIN 1 # define X509_PURPOSE_MAX 9 /* Flags for X509V3_EXT_print() */ # define X509V3_EXT_UNKNOWN_MASK (0xfL << 16) /* Return error for unknown extensions */ # define X509V3_EXT_DEFAULT 0 /* Print error for unknown extensions */ # define X509V3_EXT_ERROR_UNKNOWN (1L << 16) /* ASN1 parse unknown extensions */ # define X509V3_EXT_PARSE_UNKNOWN (2L << 16) /* BIO_dump unknown extensions */ # define X509V3_EXT_DUMP_UNKNOWN (3L << 16) /* Flags for X509V3_add1_i2d */ # define X509V3_ADD_OP_MASK 0xfL # define X509V3_ADD_DEFAULT 0L # define X509V3_ADD_APPEND 1L # define X509V3_ADD_REPLACE 2L # define X509V3_ADD_REPLACE_EXISTING 3L # define X509V3_ADD_KEEP_EXISTING 4L # define X509V3_ADD_DELETE 5L # define X509V3_ADD_SILENT 0x10 DEFINE_STACK_OF(X509_PURPOSE) DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS) DECLARE_ASN1_FUNCTIONS(SXNET) DECLARE_ASN1_FUNCTIONS(SXNETID) int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userlen); int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user, int userlen); int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, const char *user, int userlen); ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, const char *zone); ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone); ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone); DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID) DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) GENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a); int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b); ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, ASN1_BIT_STRING *bits, STACK_OF(CONF_VALUE) *extlist); char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5); ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, const char *str); STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret); int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen); DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES) STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, GENERAL_NAMES *gen, STACK_OF(CONF_VALUE) *extlist); GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); DECLARE_ASN1_FUNCTIONS(OTHERNAME) DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b); void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value); void *GENERAL_NAME_get0_value(const GENERAL_NAME *a, int *ptype); int GENERAL_NAME_set0_othername(GENERAL_NAME *gen, ASN1_OBJECT *oid, ASN1_TYPE *value); int GENERAL_NAME_get0_otherName(const GENERAL_NAME *gen, ASN1_OBJECT **poid, ASN1_TYPE **pvalue); char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, const ASN1_OCTET_STRING *ia5); ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, const char *str); DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE) int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a); DECLARE_ASN1_ALLOC_FUNCTIONS(TLS_FEATURE) DECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES) DECLARE_ASN1_FUNCTIONS(POLICYINFO) DECLARE_ASN1_FUNCTIONS(POLICYQUALINFO) DECLARE_ASN1_FUNCTIONS(USERNOTICE) DECLARE_ASN1_FUNCTIONS(NOTICEREF) DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) DECLARE_ASN1_FUNCTIONS(DIST_POINT) DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) DECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT) int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname); int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc); int NAME_CONSTRAINTS_check_CN(X509 *x, NAME_CONSTRAINTS *nc); DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) DECLARE_ASN1_ITEM(POLICY_MAPPING) DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) DECLARE_ASN1_ITEM(POLICY_MAPPINGS) DECLARE_ASN1_ITEM(GENERAL_SUBTREE) DECLARE_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE) DECLARE_ASN1_ITEM(NAME_CONSTRAINTS) DECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS) DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS) GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out, const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, int gen_type, const char *value, int is_nc); # ifdef HEADER_CONF_H GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, CONF_VALUE *cnf); GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, CONF_VALUE *cnf, int is_nc); void X509V3_conf_free(CONF_VALUE *val); X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, const char *value); X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name, const char *value); int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section, STACK_OF(X509_EXTENSION) **sk); int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, X509 *cert); int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, X509_REQ *req); int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section, X509_CRL *crl); X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, int ext_nid, const char *value); X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, const char *name, const char *value); int X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, const char *section, X509 *cert); int X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, const char *section, X509_REQ *req); int X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, const char *section, X509_CRL *crl); int X509V3_add_value_bool_nf(const char *name, int asn1_bool, STACK_OF(CONF_VALUE) **extlist); int X509V3_get_value_bool(const CONF_VALUE *value, int *asn1_bool); int X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint); void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash); # endif char *X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section); STACK_OF(CONF_VALUE) *X509V3_get_section(X509V3_CTX *ctx, const char *section); void X509V3_string_free(X509V3_CTX *ctx, char *str); void X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section); void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject, X509_REQ *req, X509_CRL *crl, int flags); int X509V3_add_value(const char *name, const char *value, STACK_OF(CONF_VALUE) **extlist); int X509V3_add_value_uchar(const char *name, const unsigned char *value, STACK_OF(CONF_VALUE) **extlist); int X509V3_add_value_bool(const char *name, int asn1_bool, STACK_OF(CONF_VALUE) **extlist); int X509V3_add_value_int(const char *name, const ASN1_INTEGER *aint, STACK_OF(CONF_VALUE) **extlist); char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const ASN1_INTEGER *aint); ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const char *value); char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, const ASN1_ENUMERATED *aint); char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth, const ASN1_ENUMERATED *aint); int X509V3_EXT_add(X509V3_EXT_METHOD *ext); int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist); int X509V3_EXT_add_alias(int nid_to, int nid_from); void X509V3_EXT_cleanup(void); const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); int X509V3_add_standard_extensions(void); STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); void *X509V3_EXT_d2i(X509_EXTENSION *ext); void *X509V3_get_d2i(const STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags); #if OPENSSL_API_COMPAT < 0x10100000L /* The new declarations are in crypto.h, but the old ones were here. */ # define hex_to_string OPENSSL_buf2hexstr # define string_to_hex OPENSSL_hexstr2buf #endif void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml); int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent); #ifndef OPENSSL_NO_STDIO int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); #endif int X509V3_extensions_print(BIO *out, const char *title, const STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent); int X509_check_ca(X509 *x); int X509_check_purpose(X509 *x, int id, int ca); int X509_supported_extension(X509_EXTENSION *ex); int X509_PURPOSE_set(int *p, int purpose); int X509_check_issued(X509 *issuer, X509 *subject); int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); void X509_set_proxy_flag(X509 *x); void X509_set_proxy_pathlen(X509 *x, long l); long X509_get_proxy_pathlen(X509 *x); uint32_t X509_get_extension_flags(X509 *x); uint32_t X509_get_key_usage(X509 *x); uint32_t X509_get_extended_key_usage(X509 *x); const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x); const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x); const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x); const ASN1_INTEGER *X509_get0_authority_serial(X509 *x); int X509_PURPOSE_get_count(void); X509_PURPOSE *X509_PURPOSE_get0(int idx); int X509_PURPOSE_get_by_sname(const char *sname); int X509_PURPOSE_get_by_id(int id); int X509_PURPOSE_add(int id, int trust, int flags, int (*ck) (const X509_PURPOSE *, const X509 *, int), const char *name, const char *sname, void *arg); char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp); char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp); int X509_PURPOSE_get_trust(const X509_PURPOSE *xp); void X509_PURPOSE_cleanup(void); int X509_PURPOSE_get_id(const X509_PURPOSE *); STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); void X509_email_free(STACK_OF(OPENSSL_STRING) *sk); STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x); /* Flags for X509_check_* functions */ /* * Always check subject name for host match even if subject alt names present */ # define X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT 0x1 /* Disable wildcard matching for dnsName fields and common name. */ # define X509_CHECK_FLAG_NO_WILDCARDS 0x2 /* Wildcards must not match a partial label. */ # define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS 0x4 /* Allow (non-partial) wildcards to match multiple labels. */ # define X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS 0x8 /* Constraint verifier subdomain patterns to match a single labels. */ # define X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10 /* Never check the subject CN */ # define X509_CHECK_FLAG_NEVER_CHECK_SUBJECT 0x20 /* * Match reference identifiers starting with "." to any sub-domain. * This is a non-public flag, turned on implicitly when the subject * reference identity is a DNS name. */ # define _X509_CHECK_FLAG_DOT_SUBDOMAINS 0x8000 int X509_check_host(X509 *x, const char *chk, size_t chklen, unsigned int flags, char **peername); int X509_check_email(X509 *x, const char *chk, size_t chklen, unsigned int flags); int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen, unsigned int flags); int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags); ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc); ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc); int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk, unsigned long chtype); void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); DEFINE_STACK_OF(X509_POLICY_NODE) #ifndef OPENSSL_NO_RFC3779 typedef struct ASRange_st { ASN1_INTEGER *min, *max; } ASRange; # define ASIdOrRange_id 0 # define ASIdOrRange_range 1 typedef struct ASIdOrRange_st { int type; union { ASN1_INTEGER *id; ASRange *range; } u; } ASIdOrRange; typedef STACK_OF(ASIdOrRange) ASIdOrRanges; DEFINE_STACK_OF(ASIdOrRange) # define ASIdentifierChoice_inherit 0 # define ASIdentifierChoice_asIdsOrRanges 1 typedef struct ASIdentifierChoice_st { int type; union { ASN1_NULL *inherit; ASIdOrRanges *asIdsOrRanges; } u; } ASIdentifierChoice; typedef struct ASIdentifiers_st { ASIdentifierChoice *asnum, *rdi; } ASIdentifiers; DECLARE_ASN1_FUNCTIONS(ASRange) DECLARE_ASN1_FUNCTIONS(ASIdOrRange) DECLARE_ASN1_FUNCTIONS(ASIdentifierChoice) DECLARE_ASN1_FUNCTIONS(ASIdentifiers) typedef struct IPAddressRange_st { ASN1_BIT_STRING *min, *max; } IPAddressRange; # define IPAddressOrRange_addressPrefix 0 # define IPAddressOrRange_addressRange 1 typedef struct IPAddressOrRange_st { int type; union { ASN1_BIT_STRING *addressPrefix; IPAddressRange *addressRange; } u; } IPAddressOrRange; typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges; DEFINE_STACK_OF(IPAddressOrRange) # define IPAddressChoice_inherit 0 # define IPAddressChoice_addressesOrRanges 1 typedef struct IPAddressChoice_st { int type; union { ASN1_NULL *inherit; IPAddressOrRanges *addressesOrRanges; } u; } IPAddressChoice; typedef struct IPAddressFamily_st { ASN1_OCTET_STRING *addressFamily; IPAddressChoice *ipAddressChoice; } IPAddressFamily; typedef STACK_OF(IPAddressFamily) IPAddrBlocks; DEFINE_STACK_OF(IPAddressFamily) DECLARE_ASN1_FUNCTIONS(IPAddressRange) DECLARE_ASN1_FUNCTIONS(IPAddressOrRange) DECLARE_ASN1_FUNCTIONS(IPAddressChoice) DECLARE_ASN1_FUNCTIONS(IPAddressFamily) /* * API tag for elements of the ASIdentifer SEQUENCE. */ # define V3_ASID_ASNUM 0 # define V3_ASID_RDI 1 /* * AFI values, assigned by IANA. It'd be nice to make the AFI * handling code totally generic, but there are too many little things * that would need to be defined for other address families for it to * be worth the trouble. */ # define IANA_AFI_IPV4 1 # define IANA_AFI_IPV6 2 /* * Utilities to construct and extract values from RFC3779 extensions, * since some of the encodings (particularly for IP address prefixes * and ranges) are a bit tedious to work with directly. */ int X509v3_asid_add_inherit(ASIdentifiers *asid, int which); int X509v3_asid_add_id_or_range(ASIdentifiers *asid, int which, ASN1_INTEGER *min, ASN1_INTEGER *max); int X509v3_addr_add_inherit(IPAddrBlocks *addr, const unsigned afi, const unsigned *safi); int X509v3_addr_add_prefix(IPAddrBlocks *addr, const unsigned afi, const unsigned *safi, unsigned char *a, const int prefixlen); int X509v3_addr_add_range(IPAddrBlocks *addr, const unsigned afi, const unsigned *safi, unsigned char *min, unsigned char *max); unsigned X509v3_addr_get_afi(const IPAddressFamily *f); int X509v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi, unsigned char *min, unsigned char *max, const int length); /* * Canonical forms. */ int X509v3_asid_is_canonical(ASIdentifiers *asid); int X509v3_addr_is_canonical(IPAddrBlocks *addr); int X509v3_asid_canonize(ASIdentifiers *asid); int X509v3_addr_canonize(IPAddrBlocks *addr); /* * Tests for inheritance and containment. */ int X509v3_asid_inherits(ASIdentifiers *asid); int X509v3_addr_inherits(IPAddrBlocks *addr); int X509v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b); int X509v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b); /* * Check whether RFC 3779 extensions nest properly in chains. */ int X509v3_asid_validate_path(X509_STORE_CTX *); int X509v3_addr_validate_path(X509_STORE_CTX *); int X509v3_asid_validate_resource_set(STACK_OF(X509) *chain, ASIdentifiers *ext, int allow_inheritance); int X509v3_addr_validate_resource_set(STACK_OF(X509) *chain, IPAddrBlocks *ext, int allow_inheritance); #endif /* OPENSSL_NO_RFC3779 */ DEFINE_STACK_OF(ASN1_STRING) /* * Admission Syntax */ typedef struct NamingAuthority_st NAMING_AUTHORITY; typedef struct ProfessionInfo_st PROFESSION_INFO; typedef struct Admissions_st ADMISSIONS; typedef struct AdmissionSyntax_st ADMISSION_SYNTAX; DECLARE_ASN1_FUNCTIONS(NAMING_AUTHORITY) DECLARE_ASN1_FUNCTIONS(PROFESSION_INFO) DECLARE_ASN1_FUNCTIONS(ADMISSIONS) DECLARE_ASN1_FUNCTIONS(ADMISSION_SYNTAX) DEFINE_STACK_OF(ADMISSIONS) DEFINE_STACK_OF(PROFESSION_INFO) typedef STACK_OF(PROFESSION_INFO) PROFESSION_INFOS; const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId( const NAMING_AUTHORITY *n); const ASN1_IA5STRING *NAMING_AUTHORITY_get0_authorityURL( const NAMING_AUTHORITY *n); const ASN1_STRING *NAMING_AUTHORITY_get0_authorityText( const NAMING_AUTHORITY *n); void NAMING_AUTHORITY_set0_authorityId(NAMING_AUTHORITY *n, ASN1_OBJECT* namingAuthorityId); void NAMING_AUTHORITY_set0_authorityURL(NAMING_AUTHORITY *n, ASN1_IA5STRING* namingAuthorityUrl); void NAMING_AUTHORITY_set0_authorityText(NAMING_AUTHORITY *n, ASN1_STRING* namingAuthorityText); const GENERAL_NAME *ADMISSION_SYNTAX_get0_admissionAuthority( const ADMISSION_SYNTAX *as); void ADMISSION_SYNTAX_set0_admissionAuthority( ADMISSION_SYNTAX *as, GENERAL_NAME *aa); const STACK_OF(ADMISSIONS) *ADMISSION_SYNTAX_get0_contentsOfAdmissions( const ADMISSION_SYNTAX *as); void ADMISSION_SYNTAX_set0_contentsOfAdmissions( ADMISSION_SYNTAX *as, STACK_OF(ADMISSIONS) *a); const GENERAL_NAME *ADMISSIONS_get0_admissionAuthority(const ADMISSIONS *a); void ADMISSIONS_set0_admissionAuthority(ADMISSIONS *a, GENERAL_NAME *aa); const NAMING_AUTHORITY *ADMISSIONS_get0_namingAuthority(const ADMISSIONS *a); void ADMISSIONS_set0_namingAuthority(ADMISSIONS *a, NAMING_AUTHORITY *na); const PROFESSION_INFOS *ADMISSIONS_get0_professionInfos(const ADMISSIONS *a); void ADMISSIONS_set0_professionInfos(ADMISSIONS *a, PROFESSION_INFOS *pi); const ASN1_OCTET_STRING *PROFESSION_INFO_get0_addProfessionInfo( const PROFESSION_INFO *pi); void PROFESSION_INFO_set0_addProfessionInfo( PROFESSION_INFO *pi, ASN1_OCTET_STRING *aos); const NAMING_AUTHORITY *PROFESSION_INFO_get0_namingAuthority( const PROFESSION_INFO *pi); void PROFESSION_INFO_set0_namingAuthority( PROFESSION_INFO *pi, NAMING_AUTHORITY *na); const STACK_OF(ASN1_STRING) *PROFESSION_INFO_get0_professionItems( const PROFESSION_INFO *pi); void PROFESSION_INFO_set0_professionItems( PROFESSION_INFO *pi, STACK_OF(ASN1_STRING) *as); const STACK_OF(ASN1_OBJECT) *PROFESSION_INFO_get0_professionOIDs( const PROFESSION_INFO *pi); void PROFESSION_INFO_set0_professionOIDs( PROFESSION_INFO *pi, STACK_OF(ASN1_OBJECT) *po); const ASN1_PRINTABLESTRING *PROFESSION_INFO_get0_registrationNumber( const PROFESSION_INFO *pi); void PROFESSION_INFO_set0_registrationNumber( PROFESSION_INFO *pi, ASN1_PRINTABLESTRING *rn); # ifdef __cplusplus } # endif #endif PKZ#openssl/rand_drbg.hnu[/* * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_DRBG_RAND_H # define HEADER_DRBG_RAND_H # include # include # include /* * RAND_DRBG flags * * Note: if new flags are added, the constant `rand_drbg_used_flags` * in drbg_lib.c needs to be updated accordingly. */ /* In CTR mode, disable derivation function ctr_df */ # define RAND_DRBG_FLAG_CTR_NO_DF 0x1 # if OPENSSL_API_COMPAT < 0x10200000L /* This #define was replaced by an internal constant and should not be used. */ # define RAND_DRBG_USED_FLAGS (RAND_DRBG_FLAG_CTR_NO_DF) # endif /* * Default security strength (in the sense of [NIST SP 800-90Ar1]) * * NIST SP 800-90Ar1 supports the strength of the DRBG being smaller than that * of the cipher by collecting less entropy. The current DRBG implementation * does not take RAND_DRBG_STRENGTH into account and sets the strength of the * DRBG to that of the cipher. * * RAND_DRBG_STRENGTH is currently only used for the legacy RAND * implementation. * * Currently supported ciphers are: NID_aes_128_ctr, NID_aes_192_ctr and * NID_aes_256_ctr */ # define RAND_DRBG_STRENGTH 256 /* Default drbg type */ # define RAND_DRBG_TYPE NID_aes_256_ctr /* Default drbg flags */ # define RAND_DRBG_FLAGS 0 # ifdef __cplusplus extern "C" { # endif /* * Object lifetime functions. */ RAND_DRBG *RAND_DRBG_new(int type, unsigned int flags, RAND_DRBG *parent); RAND_DRBG *RAND_DRBG_secure_new(int type, unsigned int flags, RAND_DRBG *parent); int RAND_DRBG_set(RAND_DRBG *drbg, int type, unsigned int flags); int RAND_DRBG_set_defaults(int type, unsigned int flags); int RAND_DRBG_instantiate(RAND_DRBG *drbg, const unsigned char *pers, size_t perslen); int RAND_DRBG_uninstantiate(RAND_DRBG *drbg); void RAND_DRBG_free(RAND_DRBG *drbg); /* * Object "use" functions. */ int RAND_DRBG_reseed(RAND_DRBG *drbg, const unsigned char *adin, size_t adinlen, int prediction_resistance); int RAND_DRBG_generate(RAND_DRBG *drbg, unsigned char *out, size_t outlen, int prediction_resistance, const unsigned char *adin, size_t adinlen); int RAND_DRBG_bytes(RAND_DRBG *drbg, unsigned char *out, size_t outlen); int RAND_DRBG_set_reseed_interval(RAND_DRBG *drbg, unsigned int interval); int RAND_DRBG_set_reseed_time_interval(RAND_DRBG *drbg, time_t interval); int RAND_DRBG_set_reseed_defaults( unsigned int master_reseed_interval, unsigned int slave_reseed_interval, time_t master_reseed_time_interval, time_t slave_reseed_time_interval ); RAND_DRBG *RAND_DRBG_get0_master(void); RAND_DRBG *RAND_DRBG_get0_public(void); RAND_DRBG *RAND_DRBG_get0_private(void); /* * EXDATA */ # define RAND_DRBG_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DRBG, l, p, newf, dupf, freef) int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *arg); void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx); /* * Callback function typedefs */ typedef size_t (*RAND_DRBG_get_entropy_fn)(RAND_DRBG *drbg, unsigned char **pout, int entropy, size_t min_len, size_t max_len, int prediction_resistance); typedef void (*RAND_DRBG_cleanup_entropy_fn)(RAND_DRBG *ctx, unsigned char *out, size_t outlen); typedef size_t (*RAND_DRBG_get_nonce_fn)(RAND_DRBG *drbg, unsigned char **pout, int entropy, size_t min_len, size_t max_len); typedef void (*RAND_DRBG_cleanup_nonce_fn)(RAND_DRBG *drbg, unsigned char *out, size_t outlen); int RAND_DRBG_set_callbacks(RAND_DRBG *drbg, RAND_DRBG_get_entropy_fn get_entropy, RAND_DRBG_cleanup_entropy_fn cleanup_entropy, RAND_DRBG_get_nonce_fn get_nonce, RAND_DRBG_cleanup_nonce_fn cleanup_nonce); # ifdef __cplusplus } # endif #endif PKZ`iiopenssl/bnerr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_BNERR_H # define HEADER_BNERR_H # ifndef HEADER_SYMHACKS_H # include # endif # ifdef __cplusplus extern "C" # endif int ERR_load_BN_strings(void); /* * BN function codes. */ # define BN_F_BNRAND 127 # define BN_F_BNRAND_RANGE 138 # define BN_F_BN_BLINDING_CONVERT_EX 100 # define BN_F_BN_BLINDING_CREATE_PARAM 128 # define BN_F_BN_BLINDING_INVERT_EX 101 # define BN_F_BN_BLINDING_NEW 102 # define BN_F_BN_BLINDING_UPDATE 103 # define BN_F_BN_BN2DEC 104 # define BN_F_BN_BN2HEX 105 # define BN_F_BN_COMPUTE_WNAF 142 # define BN_F_BN_CTX_GET 116 # define BN_F_BN_CTX_NEW 106 # define BN_F_BN_CTX_START 129 # define BN_F_BN_DIV 107 # define BN_F_BN_DIV_RECP 130 # define BN_F_BN_EXP 123 # define BN_F_BN_EXPAND_INTERNAL 120 # define BN_F_BN_GENCB_NEW 143 # define BN_F_BN_GENERATE_DSA_NONCE 140 # define BN_F_BN_GENERATE_PRIME_EX 141 # define BN_F_BN_GF2M_MOD 131 # define BN_F_BN_GF2M_MOD_EXP 132 # define BN_F_BN_GF2M_MOD_MUL 133 # define BN_F_BN_GF2M_MOD_SOLVE_QUAD 134 # define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 135 # define BN_F_BN_GF2M_MOD_SQR 136 # define BN_F_BN_GF2M_MOD_SQRT 137 # define BN_F_BN_LSHIFT 145 # define BN_F_BN_MOD_EXP2_MONT 118 # define BN_F_BN_MOD_EXP_MONT 109 # define BN_F_BN_MOD_EXP_MONT_CONSTTIME 124 # define BN_F_BN_MOD_EXP_MONT_WORD 117 # define BN_F_BN_MOD_EXP_RECP 125 # define BN_F_BN_MOD_EXP_SIMPLE 126 # define BN_F_BN_MOD_INVERSE 110 # define BN_F_BN_MOD_INVERSE_NO_BRANCH 139 # define BN_F_BN_MOD_LSHIFT_QUICK 119 # define BN_F_BN_MOD_SQRT 121 # define BN_F_BN_MONT_CTX_NEW 149 # define BN_F_BN_MPI2BN 112 # define BN_F_BN_NEW 113 # define BN_F_BN_POOL_GET 147 # define BN_F_BN_RAND 114 # define BN_F_BN_RAND_RANGE 122 # define BN_F_BN_RECP_CTX_NEW 150 # define BN_F_BN_RSHIFT 146 # define BN_F_BN_SET_WORDS 144 # define BN_F_BN_STACK_PUSH 148 # define BN_F_BN_USUB 115 # define BN_F_OSSL_BN_RSA_DO_UNBLIND 151 /* * BN reason codes. */ # define BN_R_ARG2_LT_ARG3 100 # define BN_R_BAD_RECIPROCAL 101 # define BN_R_BIGNUM_TOO_LONG 114 # define BN_R_BITS_TOO_SMALL 118 # define BN_R_CALLED_WITH_EVEN_MODULUS 102 # define BN_R_DIV_BY_ZERO 103 # define BN_R_ENCODING_ERROR 104 # define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105 # define BN_R_INPUT_NOT_REDUCED 110 # define BN_R_INVALID_LENGTH 106 # define BN_R_INVALID_RANGE 115 # define BN_R_INVALID_SHIFT 119 # define BN_R_NOT_A_SQUARE 111 # define BN_R_NOT_INITIALIZED 107 # define BN_R_NO_INVERSE 108 # define BN_R_NO_SOLUTION 116 # define BN_R_PRIVATE_KEY_TOO_LARGE 117 # define BN_R_P_IS_NOT_PRIME 112 # define BN_R_TOO_MANY_ITERATIONS 113 # define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109 #endif PKZ~~openssl/x509_vfy.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_X509_VFY_H # define HEADER_X509_VFY_H /* * Protect against recursion, x509.h and x509_vfy.h each include the other. */ # ifndef HEADER_X509_H # include # endif # include # include # include # include # include #ifdef __cplusplus extern "C" { #endif /*- SSL_CTX -> X509_STORE -> X509_LOOKUP ->X509_LOOKUP_METHOD -> X509_LOOKUP ->X509_LOOKUP_METHOD SSL -> X509_STORE_CTX ->X509_STORE The X509_STORE holds the tables etc for verification stuff. A X509_STORE_CTX is used while validating a single certificate. The X509_STORE has X509_LOOKUPs for looking up certs. The X509_STORE then calls a function to actually verify the certificate chain. */ typedef enum { X509_LU_NONE = 0, X509_LU_X509, X509_LU_CRL } X509_LOOKUP_TYPE; #if OPENSSL_API_COMPAT < 0x10100000L #define X509_LU_RETRY -1 #define X509_LU_FAIL 0 #endif DEFINE_STACK_OF(X509_LOOKUP) DEFINE_STACK_OF(X509_OBJECT) DEFINE_STACK_OF(X509_VERIFY_PARAM) int X509_STORE_set_depth(X509_STORE *store, int depth); typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *); typedef int (*X509_STORE_CTX_verify_fn)(X509_STORE_CTX *); typedef int (*X509_STORE_CTX_get_issuer_fn)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); typedef int (*X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); typedef int (*X509_STORE_CTX_check_revocation_fn)(X509_STORE_CTX *ctx); typedef int (*X509_STORE_CTX_get_crl_fn)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); typedef int (*X509_STORE_CTX_check_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl); typedef int (*X509_STORE_CTX_cert_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); typedef int (*X509_STORE_CTX_check_policy_fn)(X509_STORE_CTX *ctx); typedef STACK_OF(X509) *(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx, X509_NAME *nm); typedef STACK_OF(X509_CRL) *(*X509_STORE_CTX_lookup_crls_fn)(X509_STORE_CTX *ctx, X509_NAME *nm); typedef int (*X509_STORE_CTX_cleanup_fn)(X509_STORE_CTX *ctx); void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth); # define X509_STORE_CTX_set_app_data(ctx,data) \ X509_STORE_CTX_set_ex_data(ctx,0,data) # define X509_STORE_CTX_get_app_data(ctx) \ X509_STORE_CTX_get_ex_data(ctx,0) # define X509_L_FILE_LOAD 1 # define X509_L_ADD_DIR 2 # define X509_LOOKUP_load_file(x,name,type) \ X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL) # define X509_LOOKUP_add_dir(x,name,type) \ X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) # define X509_V_OK 0 # define X509_V_ERR_UNSPECIFIED 1 # define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 # define X509_V_ERR_UNABLE_TO_GET_CRL 3 # define X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 4 # define X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE 5 # define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6 # define X509_V_ERR_CERT_SIGNATURE_FAILURE 7 # define X509_V_ERR_CRL_SIGNATURE_FAILURE 8 # define X509_V_ERR_CERT_NOT_YET_VALID 9 # define X509_V_ERR_CERT_HAS_EXPIRED 10 # define X509_V_ERR_CRL_NOT_YET_VALID 11 # define X509_V_ERR_CRL_HAS_EXPIRED 12 # define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13 # define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14 # define X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD 15 # define X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD 16 # define X509_V_ERR_OUT_OF_MEM 17 # define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18 # define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19 # define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20 # define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 # define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 # define X509_V_ERR_CERT_REVOKED 23 # define X509_V_ERR_INVALID_CA 24 # define X509_V_ERR_PATH_LENGTH_EXCEEDED 25 # define X509_V_ERR_INVALID_PURPOSE 26 # define X509_V_ERR_CERT_UNTRUSTED 27 # define X509_V_ERR_CERT_REJECTED 28 /* These are 'informational' when looking for issuer cert */ # define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29 # define X509_V_ERR_AKID_SKID_MISMATCH 30 # define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 # define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 # define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33 # define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 # define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35 # define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36 # define X509_V_ERR_INVALID_NON_CA 37 # define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38 # define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39 # define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40 # define X509_V_ERR_INVALID_EXTENSION 41 # define X509_V_ERR_INVALID_POLICY_EXTENSION 42 # define X509_V_ERR_NO_EXPLICIT_POLICY 43 # define X509_V_ERR_DIFFERENT_CRL_SCOPE 44 # define X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE 45 # define X509_V_ERR_UNNESTED_RESOURCE 46 # define X509_V_ERR_PERMITTED_VIOLATION 47 # define X509_V_ERR_EXCLUDED_VIOLATION 48 # define X509_V_ERR_SUBTREE_MINMAX 49 /* The application is not happy */ # define X509_V_ERR_APPLICATION_VERIFICATION 50 # define X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE 51 # define X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX 52 # define X509_V_ERR_UNSUPPORTED_NAME_SYNTAX 53 # define X509_V_ERR_CRL_PATH_VALIDATION_ERROR 54 /* Another issuer check debug option */ # define X509_V_ERR_PATH_LOOP 55 /* Suite B mode algorithm violation */ # define X509_V_ERR_SUITE_B_INVALID_VERSION 56 # define X509_V_ERR_SUITE_B_INVALID_ALGORITHM 57 # define X509_V_ERR_SUITE_B_INVALID_CURVE 58 # define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM 59 # define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED 60 # define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61 /* Host, email and IP check errors */ # define X509_V_ERR_HOSTNAME_MISMATCH 62 # define X509_V_ERR_EMAIL_MISMATCH 63 # define X509_V_ERR_IP_ADDRESS_MISMATCH 64 /* DANE TLSA errors */ # define X509_V_ERR_DANE_NO_MATCH 65 /* security level errors */ # define X509_V_ERR_EE_KEY_TOO_SMALL 66 # define X509_V_ERR_CA_KEY_TOO_SMALL 67 # define X509_V_ERR_CA_MD_TOO_WEAK 68 /* Caller error */ # define X509_V_ERR_INVALID_CALL 69 /* Issuer lookup error */ # define X509_V_ERR_STORE_LOOKUP 70 /* Certificate transparency */ # define X509_V_ERR_NO_VALID_SCTS 71 # define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION 72 /* OCSP status errors */ # define X509_V_ERR_OCSP_VERIFY_NEEDED 73 /* Need OCSP verification */ # define X509_V_ERR_OCSP_VERIFY_FAILED 74 /* Couldn't verify cert through OCSP */ # define X509_V_ERR_OCSP_CERT_UNKNOWN 75 /* Certificate wasn't recognized by the OCSP responder */ # define X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH 76 # define X509_V_ERR_NO_ISSUER_PUBLIC_KEY 77 # define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM 78 # define X509_V_ERR_EC_KEY_EXPLICIT_PARAMS 79 /* Certificate verify flags */ # if OPENSSL_API_COMPAT < 0x10100000L # define X509_V_FLAG_CB_ISSUER_CHECK 0x0 /* Deprecated */ # endif /* Use check time instead of current time */ # define X509_V_FLAG_USE_CHECK_TIME 0x2 /* Lookup CRLs */ # define X509_V_FLAG_CRL_CHECK 0x4 /* Lookup CRLs for whole chain */ # define X509_V_FLAG_CRL_CHECK_ALL 0x8 /* Ignore unhandled critical extensions */ # define X509_V_FLAG_IGNORE_CRITICAL 0x10 /* Disable workarounds for broken certificates */ # define X509_V_FLAG_X509_STRICT 0x20 /* Enable proxy certificate validation */ # define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40 /* Enable policy checking */ # define X509_V_FLAG_POLICY_CHECK 0x80 /* Policy variable require-explicit-policy */ # define X509_V_FLAG_EXPLICIT_POLICY 0x100 /* Policy variable inhibit-any-policy */ # define X509_V_FLAG_INHIBIT_ANY 0x200 /* Policy variable inhibit-policy-mapping */ # define X509_V_FLAG_INHIBIT_MAP 0x400 /* Notify callback that policy is OK */ # define X509_V_FLAG_NOTIFY_POLICY 0x800 /* Extended CRL features such as indirect CRLs, alternate CRL signing keys */ # define X509_V_FLAG_EXTENDED_CRL_SUPPORT 0x1000 /* Delta CRL support */ # define X509_V_FLAG_USE_DELTAS 0x2000 /* Check self-signed CA signature */ # define X509_V_FLAG_CHECK_SS_SIGNATURE 0x4000 /* Use trusted store first */ # define X509_V_FLAG_TRUSTED_FIRST 0x8000 /* Suite B 128 bit only mode: not normally used */ # define X509_V_FLAG_SUITEB_128_LOS_ONLY 0x10000 /* Suite B 192 bit only mode */ # define X509_V_FLAG_SUITEB_192_LOS 0x20000 /* Suite B 128 bit mode allowing 192 bit algorithms */ # define X509_V_FLAG_SUITEB_128_LOS 0x30000 /* Allow partial chains if at least one certificate is in trusted store */ # define X509_V_FLAG_PARTIAL_CHAIN 0x80000 /* * If the initial chain is not trusted, do not attempt to build an alternative * chain. Alternate chain checking was introduced in 1.1.0. Setting this flag * will force the behaviour to match that of previous versions. */ # define X509_V_FLAG_NO_ALT_CHAINS 0x100000 /* Do not check certificate/CRL validity against current time */ # define X509_V_FLAG_NO_CHECK_TIME 0x200000 # define X509_VP_FLAG_DEFAULT 0x1 # define X509_VP_FLAG_OVERWRITE 0x2 # define X509_VP_FLAG_RESET_FLAGS 0x4 # define X509_VP_FLAG_LOCKED 0x8 # define X509_VP_FLAG_ONCE 0x10 /* Internal use: mask of policy related options */ # define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \ | X509_V_FLAG_EXPLICIT_POLICY \ | X509_V_FLAG_INHIBIT_ANY \ | X509_V_FLAG_INHIBIT_MAP) int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type, X509_NAME *name); X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type, X509_NAME *name); X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x); int X509_OBJECT_up_ref_count(X509_OBJECT *a); X509_OBJECT *X509_OBJECT_new(void); void X509_OBJECT_free(X509_OBJECT *a); X509_LOOKUP_TYPE X509_OBJECT_get_type(const X509_OBJECT *a); X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a); int X509_OBJECT_set1_X509(X509_OBJECT *a, X509 *obj); X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *a); int X509_OBJECT_set1_X509_CRL(X509_OBJECT *a, X509_CRL *obj); X509_STORE *X509_STORE_new(void); void X509_STORE_free(X509_STORE *v); int X509_STORE_lock(X509_STORE *ctx); int X509_STORE_unlock(X509_STORE *ctx); int X509_STORE_up_ref(X509_STORE *v); STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *v); STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *st, X509_NAME *nm); STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(X509_STORE_CTX *st, X509_NAME *nm); int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags); int X509_STORE_set_purpose(X509_STORE *ctx, int purpose); int X509_STORE_set_trust(X509_STORE *ctx, int trust); int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm); X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify); #define X509_STORE_set_verify_func(ctx, func) \ X509_STORE_set_verify((ctx),(func)) void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, X509_STORE_CTX_verify_fn verify); X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx); void X509_STORE_set_verify_cb(X509_STORE *ctx, X509_STORE_CTX_verify_cb verify_cb); # define X509_STORE_set_verify_cb_func(ctx,func) \ X509_STORE_set_verify_cb((ctx),(func)) X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE *ctx); void X509_STORE_set_get_issuer(X509_STORE *ctx, X509_STORE_CTX_get_issuer_fn get_issuer); X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(X509_STORE *ctx); void X509_STORE_set_check_issued(X509_STORE *ctx, X509_STORE_CTX_check_issued_fn check_issued); X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(X509_STORE *ctx); void X509_STORE_set_check_revocation(X509_STORE *ctx, X509_STORE_CTX_check_revocation_fn check_revocation); X509_STORE_CTX_check_revocation_fn X509_STORE_get_check_revocation(X509_STORE *ctx); void X509_STORE_set_get_crl(X509_STORE *ctx, X509_STORE_CTX_get_crl_fn get_crl); X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(X509_STORE *ctx); void X509_STORE_set_check_crl(X509_STORE *ctx, X509_STORE_CTX_check_crl_fn check_crl); X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(X509_STORE *ctx); void X509_STORE_set_cert_crl(X509_STORE *ctx, X509_STORE_CTX_cert_crl_fn cert_crl); X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(X509_STORE *ctx); void X509_STORE_set_check_policy(X509_STORE *ctx, X509_STORE_CTX_check_policy_fn check_policy); X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(X509_STORE *ctx); void X509_STORE_set_lookup_certs(X509_STORE *ctx, X509_STORE_CTX_lookup_certs_fn lookup_certs); X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(X509_STORE *ctx); void X509_STORE_set_lookup_crls(X509_STORE *ctx, X509_STORE_CTX_lookup_crls_fn lookup_crls); #define X509_STORE_set_lookup_crls_cb(ctx, func) \ X509_STORE_set_lookup_crls((ctx), (func)) X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(X509_STORE *ctx); void X509_STORE_set_cleanup(X509_STORE *ctx, X509_STORE_CTX_cleanup_fn cleanup); X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(X509_STORE *ctx); #define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, l, p, newf, dupf, freef) int X509_STORE_set_ex_data(X509_STORE *ctx, int idx, void *data); void *X509_STORE_get_ex_data(X509_STORE *ctx, int idx); X509_STORE_CTX *X509_STORE_CTX_new(void); int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); void X509_STORE_CTX_free(X509_STORE_CTX *ctx); int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, STACK_OF(X509) *chain); void X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx); X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx); STACK_OF(X509)* X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx); void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, X509_STORE_CTX_verify_cb verify); X509_STORE_CTX_verify_cb X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx); X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx); X509_STORE_CTX_get_issuer_fn X509_STORE_CTX_get_get_issuer(X509_STORE_CTX *ctx); X509_STORE_CTX_check_issued_fn X509_STORE_CTX_get_check_issued(X509_STORE_CTX *ctx); X509_STORE_CTX_check_revocation_fn X509_STORE_CTX_get_check_revocation(X509_STORE_CTX *ctx); X509_STORE_CTX_get_crl_fn X509_STORE_CTX_get_get_crl(X509_STORE_CTX *ctx); X509_STORE_CTX_check_crl_fn X509_STORE_CTX_get_check_crl(X509_STORE_CTX *ctx); X509_STORE_CTX_cert_crl_fn X509_STORE_CTX_get_cert_crl(X509_STORE_CTX *ctx); X509_STORE_CTX_check_policy_fn X509_STORE_CTX_get_check_policy(X509_STORE_CTX *ctx); X509_STORE_CTX_lookup_certs_fn X509_STORE_CTX_get_lookup_certs(X509_STORE_CTX *ctx); X509_STORE_CTX_lookup_crls_fn X509_STORE_CTX_get_lookup_crls(X509_STORE_CTX *ctx); X509_STORE_CTX_cleanup_fn X509_STORE_CTX_get_cleanup(X509_STORE_CTX *ctx); #if OPENSSL_API_COMPAT < 0x10100000L # define X509_STORE_CTX_get_chain X509_STORE_CTX_get0_chain # define X509_STORE_CTX_set_chain X509_STORE_CTX_set0_untrusted # define X509_STORE_CTX_trusted_stack X509_STORE_CTX_set0_trusted_stack # define X509_STORE_get_by_subject X509_STORE_CTX_get_by_subject # define X509_STORE_get1_certs X509_STORE_CTX_get1_certs # define X509_STORE_get1_crls X509_STORE_CTX_get1_crls /* the following macro is misspelled; use X509_STORE_get1_certs instead */ # define X509_STORE_get1_cert X509_STORE_CTX_get1_certs /* the following macro is misspelled; use X509_STORE_get1_crls instead */ # define X509_STORE_get1_crl X509_STORE_CTX_get1_crls #endif X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void); X509_LOOKUP_METHOD *X509_LOOKUP_file(void); typedef int (*X509_LOOKUP_ctrl_fn)(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret); typedef int (*X509_LOOKUP_get_by_subject_fn)(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name, X509_OBJECT *ret); typedef int (*X509_LOOKUP_get_by_issuer_serial_fn)(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name, ASN1_INTEGER *serial, X509_OBJECT *ret); typedef int (*X509_LOOKUP_get_by_fingerprint_fn)(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, const unsigned char* bytes, int len, X509_OBJECT *ret); typedef int (*X509_LOOKUP_get_by_alias_fn)(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, const char *str, int len, X509_OBJECT *ret); X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name); void X509_LOOKUP_meth_free(X509_LOOKUP_METHOD *method); int X509_LOOKUP_meth_set_new_item(X509_LOOKUP_METHOD *method, int (*new_item) (X509_LOOKUP *ctx)); int (*X509_LOOKUP_meth_get_new_item(const X509_LOOKUP_METHOD* method)) (X509_LOOKUP *ctx); int X509_LOOKUP_meth_set_free(X509_LOOKUP_METHOD *method, void (*free_fn) (X509_LOOKUP *ctx)); void (*X509_LOOKUP_meth_get_free(const X509_LOOKUP_METHOD* method)) (X509_LOOKUP *ctx); int X509_LOOKUP_meth_set_init(X509_LOOKUP_METHOD *method, int (*init) (X509_LOOKUP *ctx)); int (*X509_LOOKUP_meth_get_init(const X509_LOOKUP_METHOD* method)) (X509_LOOKUP *ctx); int X509_LOOKUP_meth_set_shutdown(X509_LOOKUP_METHOD *method, int (*shutdown) (X509_LOOKUP *ctx)); int (*X509_LOOKUP_meth_get_shutdown(const X509_LOOKUP_METHOD* method)) (X509_LOOKUP *ctx); int X509_LOOKUP_meth_set_ctrl(X509_LOOKUP_METHOD *method, X509_LOOKUP_ctrl_fn ctrl_fn); X509_LOOKUP_ctrl_fn X509_LOOKUP_meth_get_ctrl(const X509_LOOKUP_METHOD *method); int X509_LOOKUP_meth_set_get_by_subject(X509_LOOKUP_METHOD *method, X509_LOOKUP_get_by_subject_fn fn); X509_LOOKUP_get_by_subject_fn X509_LOOKUP_meth_get_get_by_subject( const X509_LOOKUP_METHOD *method); int X509_LOOKUP_meth_set_get_by_issuer_serial(X509_LOOKUP_METHOD *method, X509_LOOKUP_get_by_issuer_serial_fn fn); X509_LOOKUP_get_by_issuer_serial_fn X509_LOOKUP_meth_get_get_by_issuer_serial( const X509_LOOKUP_METHOD *method); int X509_LOOKUP_meth_set_get_by_fingerprint(X509_LOOKUP_METHOD *method, X509_LOOKUP_get_by_fingerprint_fn fn); X509_LOOKUP_get_by_fingerprint_fn X509_LOOKUP_meth_get_get_by_fingerprint( const X509_LOOKUP_METHOD *method); int X509_LOOKUP_meth_set_get_by_alias(X509_LOOKUP_METHOD *method, X509_LOOKUP_get_by_alias_fn fn); X509_LOOKUP_get_by_alias_fn X509_LOOKUP_meth_get_get_by_alias( const X509_LOOKUP_METHOD *method); int X509_STORE_add_cert(X509_STORE *ctx, X509 *x); int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x); int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, X509_NAME *name, X509_OBJECT *ret); X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, X509_NAME *name); int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret); int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method); void X509_LOOKUP_free(X509_LOOKUP *ctx); int X509_LOOKUP_init(X509_LOOKUP *ctx); int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name, X509_OBJECT *ret); int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name, ASN1_INTEGER *serial, X509_OBJECT *ret); int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, const unsigned char *bytes, int len, X509_OBJECT *ret); int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, const char *str, int len, X509_OBJECT *ret); int X509_LOOKUP_set_method_data(X509_LOOKUP *ctx, void *data); void *X509_LOOKUP_get_method_data(const X509_LOOKUP *ctx); X509_STORE *X509_LOOKUP_get_store(const X509_LOOKUP *ctx); int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); int X509_STORE_load_locations(X509_STORE *ctx, const char *file, const char *dir); int X509_STORE_set_default_paths(X509_STORE *ctx); #define X509_STORE_CTX_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, l, p, newf, dupf, freef) int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data); void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx); int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s); int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth); X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x); X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx); X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx); X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx); STACK_OF(X509) *X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx); STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx); void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x); void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *c, STACK_OF(X509) *sk); void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, STACK_OF(X509_CRL) *sk); int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust); int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, int purpose, int trust); void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags); void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags, time_t t); X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx); int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx); int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx); X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx); void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param); int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name); /* * Bridge opacity barrier between libcrypt and libssl, also needed to support * offline testing in test/danetest.c */ void X509_STORE_CTX_set0_dane(X509_STORE_CTX *ctx, SSL_DANE *dane); #define DANE_FLAG_NO_DANE_EE_NAMECHECKS (1L << 0) /* X509_VERIFY_PARAM functions */ X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void); void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to, const X509_VERIFY_PARAM *from); int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to, const X509_VERIFY_PARAM *from); int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name); int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags); int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param, unsigned long flags); unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose); int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust); void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth); void X509_VERIFY_PARAM_set_auth_level(X509_VERIFY_PARAM *param, int auth_level); time_t X509_VERIFY_PARAM_get_time(const X509_VERIFY_PARAM *param); void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t); int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param, ASN1_OBJECT *policy); int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, STACK_OF(ASN1_OBJECT) *policies); int X509_VERIFY_PARAM_set_inh_flags(X509_VERIFY_PARAM *param, uint32_t flags); uint32_t X509_VERIFY_PARAM_get_inh_flags(const X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, const char *name, size_t namelen); int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, const char *name, size_t namelen); void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, unsigned int flags); unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param); char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *); void X509_VERIFY_PARAM_move_peername(X509_VERIFY_PARAM *, X509_VERIFY_PARAM *); int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param, const char *email, size_t emaillen); int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param, const unsigned char *ip, size_t iplen); int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, const char *ipasc); int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_get_auth_level(const X509_VERIFY_PARAM *param); const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_get_count(void); const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id); const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name); void X509_VERIFY_PARAM_table_cleanup(void); /* Non positive return values are errors */ #define X509_PCY_TREE_FAILURE -2 /* Failure to satisfy explicit policy */ #define X509_PCY_TREE_INVALID -1 /* Inconsistent or invalid extensions */ #define X509_PCY_TREE_INTERNAL 0 /* Internal error, most likely malloc */ /* * Positive return values form a bit mask, all but the first are internal to * the library and don't appear in results from X509_policy_check(). */ #define X509_PCY_TREE_VALID 1 /* The policy tree is valid */ #define X509_PCY_TREE_EMPTY 2 /* The policy tree is empty */ #define X509_PCY_TREE_EXPLICIT 4 /* Explicit policy required */ int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy, STACK_OF(X509) *certs, STACK_OF(ASN1_OBJECT) *policy_oids, unsigned int flags); void X509_policy_tree_free(X509_POLICY_TREE *tree); int X509_policy_tree_level_count(const X509_POLICY_TREE *tree); X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree, int i); STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree); STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree); int X509_policy_level_node_count(X509_POLICY_LEVEL *level); X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level, int i); const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node); STACK_OF(POLICYQUALINFO) *X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node); const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE *node); #ifdef __cplusplus } #endif #endif PKZgc(( openssl/md5.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_MD5_H # define HEADER_MD5_H # include # ifndef OPENSSL_NO_MD5 # include # include # ifdef __cplusplus extern "C" { # endif /* * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * ! MD5_LONG has to be at least 32 bits wide. ! * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ # define MD5_LONG unsigned int # define MD5_CBLOCK 64 # define MD5_LBLOCK (MD5_CBLOCK/4) # define MD5_DIGEST_LENGTH 16 typedef struct MD5state_st { MD5_LONG A, B, C, D; MD5_LONG Nl, Nh; MD5_LONG data[MD5_LBLOCK]; unsigned int num; } MD5_CTX; int MD5_Init(MD5_CTX *c); int MD5_Update(MD5_CTX *c, const void *data, size_t len); int MD5_Final(unsigned char *md, MD5_CTX *c); unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); void MD5_Transform(MD5_CTX *c, const unsigned char *b); # ifdef __cplusplus } # endif # endif #endif PKZęa5>> openssl/ui.hnu[/* * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_UI_H # define HEADER_UI_H # include # if OPENSSL_API_COMPAT < 0x10100000L # include # endif # include # include # include # include /* For compatibility reasons, the macro OPENSSL_NO_UI is currently retained */ # if OPENSSL_API_COMPAT < 0x10200000L # ifdef OPENSSL_NO_UI_CONSOLE # define OPENSSL_NO_UI # endif # endif # ifdef __cplusplus extern "C" { # endif /* * All the following functions return -1 or NULL on error and in some cases * (UI_process()) -2 if interrupted or in some other way cancelled. When * everything is fine, they return 0, a positive value or a non-NULL pointer, * all depending on their purpose. */ /* Creators and destructor. */ UI *UI_new(void); UI *UI_new_method(const UI_METHOD *method); void UI_free(UI *ui); /*- The following functions are used to add strings to be printed and prompt strings to prompt for data. The names are UI_{add,dup}__string and UI_{add,dup}_input_boolean. UI_{add,dup}__string have the following meanings: add add a text or prompt string. The pointers given to these functions are used verbatim, no copying is done. dup make a copy of the text or prompt string, then add the copy to the collection of strings in the user interface. The function is a name for the functionality that the given string shall be used for. It can be one of: input use the string as data prompt. verify use the string as verification prompt. This is used to verify a previous input. info use the string for informational output. error use the string for error output. Honestly, there's currently no difference between info and error for the moment. UI_{add,dup}_input_boolean have the same semantics for "add" and "dup", and are typically used when one wants to prompt for a yes/no response. All of the functions in this group take a UI and a prompt string. The string input and verify addition functions also take a flag argument, a buffer for the result to end up with, a minimum input size and a maximum input size (the result buffer MUST be large enough to be able to contain the maximum number of characters). Additionally, the verify addition functions takes another buffer to compare the result against. The boolean input functions take an action description string (which should be safe to ignore if the expected user action is obvious, for example with a dialog box with an OK button and a Cancel button), a string of acceptable characters to mean OK and to mean Cancel. The two last strings are checked to make sure they don't have common characters. Additionally, the same flag argument as for the string input is taken, as well as a result buffer. The result buffer is required to be at least one byte long. Depending on the answer, the first character from the OK or the Cancel character strings will be stored in the first byte of the result buffer. No NUL will be added, so the result is *not* a string. On success, the all return an index of the added information. That index is useful when retrieving results with UI_get0_result(). */ int UI_add_input_string(UI *ui, const char *prompt, int flags, char *result_buf, int minsize, int maxsize); int UI_dup_input_string(UI *ui, const char *prompt, int flags, char *result_buf, int minsize, int maxsize); int UI_add_verify_string(UI *ui, const char *prompt, int flags, char *result_buf, int minsize, int maxsize, const char *test_buf); int UI_dup_verify_string(UI *ui, const char *prompt, int flags, char *result_buf, int minsize, int maxsize, const char *test_buf); int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc, const char *ok_chars, const char *cancel_chars, int flags, char *result_buf); int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc, const char *ok_chars, const char *cancel_chars, int flags, char *result_buf); int UI_add_info_string(UI *ui, const char *text); int UI_dup_info_string(UI *ui, const char *text); int UI_add_error_string(UI *ui, const char *text); int UI_dup_error_string(UI *ui, const char *text); /* These are the possible flags. They can be or'ed together. */ /* Use to have echoing of input */ # define UI_INPUT_FLAG_ECHO 0x01 /* * Use a default password. Where that password is found is completely up to * the application, it might for example be in the user data set with * UI_add_user_data(). It is not recommended to have more than one input in * each UI being marked with this flag, or the application might get * confused. */ # define UI_INPUT_FLAG_DEFAULT_PWD 0x02 /*- * The user of these routines may want to define flags of their own. The core * UI won't look at those, but will pass them on to the method routines. They * must use higher bits so they don't get confused with the UI bits above. * UI_INPUT_FLAG_USER_BASE tells which is the lowest bit to use. A good * example of use is this: * * #define MY_UI_FLAG1 (0x01 << UI_INPUT_FLAG_USER_BASE) * */ # define UI_INPUT_FLAG_USER_BASE 16 /*- * The following function helps construct a prompt. object_desc is a * textual short description of the object, for example "pass phrase", * and object_name is the name of the object (might be a card name or * a file name. * The returned string shall always be allocated on the heap with * OPENSSL_malloc(), and need to be free'd with OPENSSL_free(). * * If the ui_method doesn't contain a pointer to a user-defined prompt * constructor, a default string is built, looking like this: * * "Enter {object_desc} for {object_name}:" * * So, if object_desc has the value "pass phrase" and object_name has * the value "foo.key", the resulting string is: * * "Enter pass phrase for foo.key:" */ char *UI_construct_prompt(UI *ui_method, const char *object_desc, const char *object_name); /* * The following function is used to store a pointer to user-specific data. * Any previous such pointer will be returned and replaced. * * For callback purposes, this function makes a lot more sense than using * ex_data, since the latter requires that different parts of OpenSSL or * applications share the same ex_data index. * * Note that the UI_OpenSSL() method completely ignores the user data. Other * methods may not, however. */ void *UI_add_user_data(UI *ui, void *user_data); /* * Alternatively, this function is used to duplicate the user data. * This uses the duplicator method function. The destroy function will * be used to free the user data in this case. */ int UI_dup_user_data(UI *ui, void *user_data); /* We need a user data retrieving function as well. */ void *UI_get0_user_data(UI *ui); /* Return the result associated with a prompt given with the index i. */ const char *UI_get0_result(UI *ui, int i); int UI_get_result_length(UI *ui, int i); /* When all strings have been added, process the whole thing. */ int UI_process(UI *ui); /* * Give a user interface parameterised control commands. This can be used to * send down an integer, a data pointer or a function pointer, as well as be * used to get information from a UI. */ int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void)); /* The commands */ /* * Use UI_CONTROL_PRINT_ERRORS with the value 1 to have UI_process print the * OpenSSL error stack before printing any info or added error messages and * before any prompting. */ # define UI_CTRL_PRINT_ERRORS 1 /* * Check if a UI_process() is possible to do again with the same instance of * a user interface. This makes UI_ctrl() return 1 if it is redoable, and 0 * if not. */ # define UI_CTRL_IS_REDOABLE 2 /* Some methods may use extra data */ # define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg) # define UI_get_app_data(s) UI_get_ex_data(s,0) # define UI_get_ex_new_index(l, p, newf, dupf, freef) \ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, l, p, newf, dupf, freef) int UI_set_ex_data(UI *r, int idx, void *arg); void *UI_get_ex_data(UI *r, int idx); /* Use specific methods instead of the built-in one */ void UI_set_default_method(const UI_METHOD *meth); const UI_METHOD *UI_get_default_method(void); const UI_METHOD *UI_get_method(UI *ui); const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth); # ifndef OPENSSL_NO_UI_CONSOLE /* The method with all the built-in thingies */ UI_METHOD *UI_OpenSSL(void); # endif /* * NULL method. Literally does nothing, but may serve as a placeholder * to avoid internal default. */ const UI_METHOD *UI_null(void); /* ---------- For method writers ---------- */ /*- A method contains a number of functions that implement the low level of the User Interface. The functions are: an opener This function starts a session, maybe by opening a channel to a tty, or by opening a window. a writer This function is called to write a given string, maybe to the tty, maybe as a field label in a window. a flusher This function is called to flush everything that has been output so far. It can be used to actually display a dialog box after it has been built. a reader This function is called to read a given prompt, maybe from the tty, maybe from a field in a window. Note that it's called with all string structures, not only the prompt ones, so it must check such things itself. a closer This function closes the session, maybe by closing the channel to the tty, or closing the window. All these functions are expected to return: 0 on error. 1 on success. -1 on out-of-band events, for example if some prompting has been canceled (by pressing Ctrl-C, for example). This is only checked when returned by the flusher or the reader. The way this is used, the opener is first called, then the writer for all strings, then the flusher, then the reader for all strings and finally the closer. Note that if you want to prompt from a terminal or other command line interface, the best is to have the reader also write the prompts instead of having the writer do it. If you want to prompt from a dialog box, the writer can be used to build up the contents of the box, and the flusher to actually display the box and run the event loop until all data has been given, after which the reader only grabs the given data and puts them back into the UI strings. All method functions take a UI as argument. Additionally, the writer and the reader take a UI_STRING. */ /* * The UI_STRING type is the data structure that contains all the needed info * about a string or a prompt, including test data for a verification prompt. */ typedef struct ui_string_st UI_STRING; DEFINE_STACK_OF(UI_STRING) /* * The different types of strings that are currently supported. This is only * needed by method authors. */ enum UI_string_types { UIT_NONE = 0, UIT_PROMPT, /* Prompt for a string */ UIT_VERIFY, /* Prompt for a string and verify */ UIT_BOOLEAN, /* Prompt for a yes/no response */ UIT_INFO, /* Send info to the user */ UIT_ERROR /* Send an error message to the user */ }; /* Create and manipulate methods */ UI_METHOD *UI_create_method(const char *name); void UI_destroy_method(UI_METHOD *ui_method); int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui)); int UI_method_set_writer(UI_METHOD *method, int (*writer) (UI *ui, UI_STRING *uis)); int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui)); int UI_method_set_reader(UI_METHOD *method, int (*reader) (UI *ui, UI_STRING *uis)); int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui)); int UI_method_set_data_duplicator(UI_METHOD *method, void *(*duplicator) (UI *ui, void *ui_data), void (*destructor)(UI *ui, void *ui_data)); int UI_method_set_prompt_constructor(UI_METHOD *method, char *(*prompt_constructor) (UI *ui, const char *object_desc, const char *object_name)); int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data); int (*UI_method_get_opener(const UI_METHOD *method)) (UI *); int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *); int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *); int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *); int (*UI_method_get_closer(const UI_METHOD *method)) (UI *); char *(*UI_method_get_prompt_constructor(const UI_METHOD *method)) (UI *, const char *, const char *); void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *); void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *); const void *UI_method_get_ex_data(const UI_METHOD *method, int idx); /* * The following functions are helpers for method writers to access relevant * data from a UI_STRING. */ /* Return type of the UI_STRING */ enum UI_string_types UI_get_string_type(UI_STRING *uis); /* Return input flags of the UI_STRING */ int UI_get_input_flags(UI_STRING *uis); /* Return the actual string to output (the prompt, info or error) */ const char *UI_get0_output_string(UI_STRING *uis); /* * Return the optional action string to output (the boolean prompt * instruction) */ const char *UI_get0_action_string(UI_STRING *uis); /* Return the result of a prompt */ const char *UI_get0_result_string(UI_STRING *uis); int UI_get_result_string_length(UI_STRING *uis); /* * Return the string to test the result against. Only useful with verifies. */ const char *UI_get0_test_string(UI_STRING *uis); /* Return the required minimum size of the result */ int UI_get_result_minsize(UI_STRING *uis); /* Return the required maximum size of the result */ int UI_get_result_maxsize(UI_STRING *uis); /* Set the result of a UI_STRING. */ int UI_set_result(UI *ui, UI_STRING *uis, const char *result); int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len); /* A couple of popular utility functions */ int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt, int verify); int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt, int verify); UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag); # ifdef __cplusplus } # endif #endif PKZqOq9q9openssl/ssl3.hnu[/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_SSL3_H # define HEADER_SSL3_H # include # include # include # include #ifdef __cplusplus extern "C" { #endif /* * Signalling cipher suite value from RFC 5746 * (TLS_EMPTY_RENEGOTIATION_INFO_SCSV) */ # define SSL3_CK_SCSV 0x030000FF /* * Signalling cipher suite value from draft-ietf-tls-downgrade-scsv-00 * (TLS_FALLBACK_SCSV) */ # define SSL3_CK_FALLBACK_SCSV 0x03005600 # define SSL3_CK_RSA_NULL_MD5 0x03000001 # define SSL3_CK_RSA_NULL_SHA 0x03000002 # define SSL3_CK_RSA_RC4_40_MD5 0x03000003 # define SSL3_CK_RSA_RC4_128_MD5 0x03000004 # define SSL3_CK_RSA_RC4_128_SHA 0x03000005 # define SSL3_CK_RSA_RC2_40_MD5 0x03000006 # define SSL3_CK_RSA_IDEA_128_SHA 0x03000007 # define SSL3_CK_RSA_DES_40_CBC_SHA 0x03000008 # define SSL3_CK_RSA_DES_64_CBC_SHA 0x03000009 # define SSL3_CK_RSA_DES_192_CBC3_SHA 0x0300000A # define SSL3_CK_DH_DSS_DES_40_CBC_SHA 0x0300000B # define SSL3_CK_DH_DSS_DES_64_CBC_SHA 0x0300000C # define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 0x0300000D # define SSL3_CK_DH_RSA_DES_40_CBC_SHA 0x0300000E # define SSL3_CK_DH_RSA_DES_64_CBC_SHA 0x0300000F # define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 0x03000010 # define SSL3_CK_DHE_DSS_DES_40_CBC_SHA 0x03000011 # define SSL3_CK_EDH_DSS_DES_40_CBC_SHA SSL3_CK_DHE_DSS_DES_40_CBC_SHA # define SSL3_CK_DHE_DSS_DES_64_CBC_SHA 0x03000012 # define SSL3_CK_EDH_DSS_DES_64_CBC_SHA SSL3_CK_DHE_DSS_DES_64_CBC_SHA # define SSL3_CK_DHE_DSS_DES_192_CBC3_SHA 0x03000013 # define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA SSL3_CK_DHE_DSS_DES_192_CBC3_SHA # define SSL3_CK_DHE_RSA_DES_40_CBC_SHA 0x03000014 # define SSL3_CK_EDH_RSA_DES_40_CBC_SHA SSL3_CK_DHE_RSA_DES_40_CBC_SHA # define SSL3_CK_DHE_RSA_DES_64_CBC_SHA 0x03000015 # define SSL3_CK_EDH_RSA_DES_64_CBC_SHA SSL3_CK_DHE_RSA_DES_64_CBC_SHA # define SSL3_CK_DHE_RSA_DES_192_CBC3_SHA 0x03000016 # define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA SSL3_CK_DHE_RSA_DES_192_CBC3_SHA # define SSL3_CK_ADH_RC4_40_MD5 0x03000017 # define SSL3_CK_ADH_RC4_128_MD5 0x03000018 # define SSL3_CK_ADH_DES_40_CBC_SHA 0x03000019 # define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A # define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B /* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */ # define SSL3_RFC_RSA_NULL_MD5 "TLS_RSA_WITH_NULL_MD5" # define SSL3_RFC_RSA_NULL_SHA "TLS_RSA_WITH_NULL_SHA" # define SSL3_RFC_RSA_DES_192_CBC3_SHA "TLS_RSA_WITH_3DES_EDE_CBC_SHA" # define SSL3_RFC_DHE_DSS_DES_192_CBC3_SHA "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" # define SSL3_RFC_DHE_RSA_DES_192_CBC3_SHA "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA" # define SSL3_RFC_ADH_DES_192_CBC_SHA "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA" # define SSL3_RFC_RSA_IDEA_128_SHA "TLS_RSA_WITH_IDEA_CBC_SHA" # define SSL3_RFC_RSA_RC4_128_MD5 "TLS_RSA_WITH_RC4_128_MD5" # define SSL3_RFC_RSA_RC4_128_SHA "TLS_RSA_WITH_RC4_128_SHA" # define SSL3_RFC_ADH_RC4_128_MD5 "TLS_DH_anon_WITH_RC4_128_MD5" # define SSL3_TXT_RSA_NULL_MD5 "NULL-MD5" # define SSL3_TXT_RSA_NULL_SHA "NULL-SHA" # define SSL3_TXT_RSA_RC4_40_MD5 "EXP-RC4-MD5" # define SSL3_TXT_RSA_RC4_128_MD5 "RC4-MD5" # define SSL3_TXT_RSA_RC4_128_SHA "RC4-SHA" # define SSL3_TXT_RSA_RC2_40_MD5 "EXP-RC2-CBC-MD5" # define SSL3_TXT_RSA_IDEA_128_SHA "IDEA-CBC-SHA" # define SSL3_TXT_RSA_DES_40_CBC_SHA "EXP-DES-CBC-SHA" # define SSL3_TXT_RSA_DES_64_CBC_SHA "DES-CBC-SHA" # define SSL3_TXT_RSA_DES_192_CBC3_SHA "DES-CBC3-SHA" # define SSL3_TXT_DH_DSS_DES_40_CBC_SHA "EXP-DH-DSS-DES-CBC-SHA" # define SSL3_TXT_DH_DSS_DES_64_CBC_SHA "DH-DSS-DES-CBC-SHA" # define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA "DH-DSS-DES-CBC3-SHA" # define SSL3_TXT_DH_RSA_DES_40_CBC_SHA "EXP-DH-RSA-DES-CBC-SHA" # define SSL3_TXT_DH_RSA_DES_64_CBC_SHA "DH-RSA-DES-CBC-SHA" # define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA "DH-RSA-DES-CBC3-SHA" # define SSL3_TXT_DHE_DSS_DES_40_CBC_SHA "EXP-DHE-DSS-DES-CBC-SHA" # define SSL3_TXT_DHE_DSS_DES_64_CBC_SHA "DHE-DSS-DES-CBC-SHA" # define SSL3_TXT_DHE_DSS_DES_192_CBC3_SHA "DHE-DSS-DES-CBC3-SHA" # define SSL3_TXT_DHE_RSA_DES_40_CBC_SHA "EXP-DHE-RSA-DES-CBC-SHA" # define SSL3_TXT_DHE_RSA_DES_64_CBC_SHA "DHE-RSA-DES-CBC-SHA" # define SSL3_TXT_DHE_RSA_DES_192_CBC3_SHA "DHE-RSA-DES-CBC3-SHA" /* * This next block of six "EDH" labels is for backward compatibility with * older versions of OpenSSL. New code should use the six "DHE" labels above * instead: */ # define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA "EXP-EDH-DSS-DES-CBC-SHA" # define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA "EDH-DSS-DES-CBC-SHA" # define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA "EDH-DSS-DES-CBC3-SHA" # define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA "EXP-EDH-RSA-DES-CBC-SHA" # define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA "EDH-RSA-DES-CBC-SHA" # define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA "EDH-RSA-DES-CBC3-SHA" # define SSL3_TXT_ADH_RC4_40_MD5 "EXP-ADH-RC4-MD5" # define SSL3_TXT_ADH_RC4_128_MD5 "ADH-RC4-MD5" # define SSL3_TXT_ADH_DES_40_CBC_SHA "EXP-ADH-DES-CBC-SHA" # define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA" # define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA" # define SSL3_SSL_SESSION_ID_LENGTH 32 # define SSL3_MAX_SSL_SESSION_ID_LENGTH 32 # define SSL3_MASTER_SECRET_SIZE 48 # define SSL3_RANDOM_SIZE 32 # define SSL3_SESSION_ID_SIZE 32 # define SSL3_RT_HEADER_LENGTH 5 # define SSL3_HM_HEADER_LENGTH 4 # ifndef SSL3_ALIGN_PAYLOAD /* * Some will argue that this increases memory footprint, but it's not * actually true. Point is that malloc has to return at least 64-bit aligned * pointers, meaning that allocating 5 bytes wastes 3 bytes in either case. * Suggested pre-gaping simply moves these wasted bytes from the end of * allocated region to its front, but makes data payload aligned, which * improves performance:-) */ # define SSL3_ALIGN_PAYLOAD 8 # else # if (SSL3_ALIGN_PAYLOAD&(SSL3_ALIGN_PAYLOAD-1))!=0 # error "insane SSL3_ALIGN_PAYLOAD" # undef SSL3_ALIGN_PAYLOAD # endif # endif /* * This is the maximum MAC (digest) size used by the SSL library. Currently * maximum of 20 is used by SHA1, but we reserve for future extension for * 512-bit hashes. */ # define SSL3_RT_MAX_MD_SIZE 64 /* * Maximum block size used in all ciphersuites. Currently 16 for AES. */ # define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16 # define SSL3_RT_MAX_EXTRA (16384) /* Maximum plaintext length: defined by SSL/TLS standards */ # define SSL3_RT_MAX_PLAIN_LENGTH 16384 /* Maximum compression overhead: defined by SSL/TLS standards */ # define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024 /* * The standards give a maximum encryption overhead of 1024 bytes. In * practice the value is lower than this. The overhead is the maximum number * of padding bytes (256) plus the mac size. */ # define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE) # define SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD 256 /* * OpenSSL currently only uses a padding length of at most one block so the * send overhead is smaller. */ # define SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD \ (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE) /* If compression isn't used don't include the compression overhead */ # ifdef OPENSSL_NO_COMP # define SSL3_RT_MAX_COMPRESSED_LENGTH SSL3_RT_MAX_PLAIN_LENGTH # else # define SSL3_RT_MAX_COMPRESSED_LENGTH \ (SSL3_RT_MAX_PLAIN_LENGTH+SSL3_RT_MAX_COMPRESSED_OVERHEAD) # endif # define SSL3_RT_MAX_ENCRYPTED_LENGTH \ (SSL3_RT_MAX_ENCRYPTED_OVERHEAD+SSL3_RT_MAX_COMPRESSED_LENGTH) # define SSL3_RT_MAX_TLS13_ENCRYPTED_LENGTH \ (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD) # define SSL3_RT_MAX_PACKET_SIZE \ (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH) # define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54" # define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52" # define SSL3_VERSION 0x0300 # define SSL3_VERSION_MAJOR 0x03 # define SSL3_VERSION_MINOR 0x00 # define SSL3_RT_CHANGE_CIPHER_SPEC 20 # define SSL3_RT_ALERT 21 # define SSL3_RT_HANDSHAKE 22 # define SSL3_RT_APPLICATION_DATA 23 # define DTLS1_RT_HEARTBEAT 24 /* Pseudo content types to indicate additional parameters */ # define TLS1_RT_CRYPTO 0x1000 # define TLS1_RT_CRYPTO_PREMASTER (TLS1_RT_CRYPTO | 0x1) # define TLS1_RT_CRYPTO_CLIENT_RANDOM (TLS1_RT_CRYPTO | 0x2) # define TLS1_RT_CRYPTO_SERVER_RANDOM (TLS1_RT_CRYPTO | 0x3) # define TLS1_RT_CRYPTO_MASTER (TLS1_RT_CRYPTO | 0x4) # define TLS1_RT_CRYPTO_READ 0x0000 # define TLS1_RT_CRYPTO_WRITE 0x0100 # define TLS1_RT_CRYPTO_MAC (TLS1_RT_CRYPTO | 0x5) # define TLS1_RT_CRYPTO_KEY (TLS1_RT_CRYPTO | 0x6) # define TLS1_RT_CRYPTO_IV (TLS1_RT_CRYPTO | 0x7) # define TLS1_RT_CRYPTO_FIXED_IV (TLS1_RT_CRYPTO | 0x8) /* Pseudo content types for SSL/TLS header info */ # define SSL3_RT_HEADER 0x100 # define SSL3_RT_INNER_CONTENT_TYPE 0x101 # define SSL3_AL_WARNING 1 # define SSL3_AL_FATAL 2 # define SSL3_AD_CLOSE_NOTIFY 0 # define SSL3_AD_UNEXPECTED_MESSAGE 10/* fatal */ # define SSL3_AD_BAD_RECORD_MAC 20/* fatal */ # define SSL3_AD_DECOMPRESSION_FAILURE 30/* fatal */ # define SSL3_AD_HANDSHAKE_FAILURE 40/* fatal */ # define SSL3_AD_NO_CERTIFICATE 41 # define SSL3_AD_BAD_CERTIFICATE 42 # define SSL3_AD_UNSUPPORTED_CERTIFICATE 43 # define SSL3_AD_CERTIFICATE_REVOKED 44 # define SSL3_AD_CERTIFICATE_EXPIRED 45 # define SSL3_AD_CERTIFICATE_UNKNOWN 46 # define SSL3_AD_ILLEGAL_PARAMETER 47/* fatal */ # define TLS1_HB_REQUEST 1 # define TLS1_HB_RESPONSE 2 # define SSL3_CT_RSA_SIGN 1 # define SSL3_CT_DSS_SIGN 2 # define SSL3_CT_RSA_FIXED_DH 3 # define SSL3_CT_DSS_FIXED_DH 4 # define SSL3_CT_RSA_EPHEMERAL_DH 5 # define SSL3_CT_DSS_EPHEMERAL_DH 6 # define SSL3_CT_FORTEZZA_DMS 20 /* * SSL3_CT_NUMBER is used to size arrays and it must be large enough to * contain all of the cert types defined for *either* SSLv3 and TLSv1. */ # define SSL3_CT_NUMBER 10 # if defined(TLS_CT_NUMBER) # if TLS_CT_NUMBER != SSL3_CT_NUMBER # error "SSL/TLS CT_NUMBER values do not match" # endif # endif /* No longer used as of OpenSSL 1.1.1 */ # define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001 /* Removed from OpenSSL 1.1.0 */ # define TLS1_FLAGS_TLS_PADDING_BUG 0x0 # define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010 /* Set if we encrypt then mac instead of usual mac then encrypt */ # define TLS1_FLAGS_ENCRYPT_THEN_MAC_READ 0x0100 # define TLS1_FLAGS_ENCRYPT_THEN_MAC TLS1_FLAGS_ENCRYPT_THEN_MAC_READ /* Set if extended master secret extension received from peer */ # define TLS1_FLAGS_RECEIVED_EXTMS 0x0200 # define TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE 0x0400 # define TLS1_FLAGS_STATELESS 0x0800 /* Set if extended master secret extension required on renegotiation */ # define TLS1_FLAGS_REQUIRED_EXTMS 0x1000 # define SSL3_MT_HELLO_REQUEST 0 # define SSL3_MT_CLIENT_HELLO 1 # define SSL3_MT_SERVER_HELLO 2 # define SSL3_MT_NEWSESSION_TICKET 4 # define SSL3_MT_END_OF_EARLY_DATA 5 # define SSL3_MT_ENCRYPTED_EXTENSIONS 8 # define SSL3_MT_CERTIFICATE 11 # define SSL3_MT_SERVER_KEY_EXCHANGE 12 # define SSL3_MT_CERTIFICATE_REQUEST 13 # define SSL3_MT_SERVER_DONE 14 # define SSL3_MT_CERTIFICATE_VERIFY 15 # define SSL3_MT_CLIENT_KEY_EXCHANGE 16 # define SSL3_MT_FINISHED 20 # define SSL3_MT_CERTIFICATE_URL 21 # define SSL3_MT_CERTIFICATE_STATUS 22 # define SSL3_MT_SUPPLEMENTAL_DATA 23 # define SSL3_MT_KEY_UPDATE 24 # ifndef OPENSSL_NO_NEXTPROTONEG # define SSL3_MT_NEXT_PROTO 67 # endif # define SSL3_MT_MESSAGE_HASH 254 # define DTLS1_MT_HELLO_VERIFY_REQUEST 3 /* Dummy message type for handling CCS like a normal handshake message */ # define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101 # define SSL3_MT_CCS 1 /* These are used when changing over to a new cipher */ # define SSL3_CC_READ 0x001 # define SSL3_CC_WRITE 0x002 # define SSL3_CC_CLIENT 0x010 # define SSL3_CC_SERVER 0x020 # define SSL3_CC_EARLY 0x040 # define SSL3_CC_HANDSHAKE 0x080 # define SSL3_CC_APPLICATION 0x100 # define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE) # define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ) # define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ) # define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE) #ifdef __cplusplus } #endif #endif PKZ]| openssl/ossl_typ.hnu[/* * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OPENSSL_TYPES_H # define HEADER_OPENSSL_TYPES_H #include #ifdef __cplusplus extern "C" { #endif # include # ifdef NO_ASN1_TYPEDEFS # define ASN1_INTEGER ASN1_STRING # define ASN1_ENUMERATED ASN1_STRING # define ASN1_BIT_STRING ASN1_STRING # define ASN1_OCTET_STRING ASN1_STRING # define ASN1_PRINTABLESTRING ASN1_STRING # define ASN1_T61STRING ASN1_STRING # define ASN1_IA5STRING ASN1_STRING # define ASN1_UTCTIME ASN1_STRING # define ASN1_GENERALIZEDTIME ASN1_STRING # define ASN1_TIME ASN1_STRING # define ASN1_GENERALSTRING ASN1_STRING # define ASN1_UNIVERSALSTRING ASN1_STRING # define ASN1_BMPSTRING ASN1_STRING # define ASN1_VISIBLESTRING ASN1_STRING # define ASN1_UTF8STRING ASN1_STRING # define ASN1_BOOLEAN int # define ASN1_NULL int # else typedef struct asn1_string_st ASN1_INTEGER; typedef struct asn1_string_st ASN1_ENUMERATED; typedef struct asn1_string_st ASN1_BIT_STRING; typedef struct asn1_string_st ASN1_OCTET_STRING; typedef struct asn1_string_st ASN1_PRINTABLESTRING; typedef struct asn1_string_st ASN1_T61STRING; typedef struct asn1_string_st ASN1_IA5STRING; typedef struct asn1_string_st ASN1_GENERALSTRING; typedef struct asn1_string_st ASN1_UNIVERSALSTRING; typedef struct asn1_string_st ASN1_BMPSTRING; typedef struct asn1_string_st ASN1_UTCTIME; typedef struct asn1_string_st ASN1_TIME; typedef struct asn1_string_st ASN1_GENERALIZEDTIME; typedef struct asn1_string_st ASN1_VISIBLESTRING; typedef struct asn1_string_st ASN1_UTF8STRING; typedef struct asn1_string_st ASN1_STRING; typedef int ASN1_BOOLEAN; typedef int ASN1_NULL; # endif typedef struct asn1_object_st ASN1_OBJECT; typedef struct ASN1_ITEM_st ASN1_ITEM; typedef struct asn1_pctx_st ASN1_PCTX; typedef struct asn1_sctx_st ASN1_SCTX; # ifdef _WIN32 # undef X509_NAME # undef X509_EXTENSIONS # undef PKCS7_ISSUER_AND_SERIAL # undef PKCS7_SIGNER_INFO # undef OCSP_REQUEST # undef OCSP_RESPONSE # endif # ifdef BIGNUM # undef BIGNUM # endif struct dane_st; typedef struct bio_st BIO; typedef struct bignum_st BIGNUM; typedef struct bignum_ctx BN_CTX; typedef struct bn_blinding_st BN_BLINDING; typedef struct bn_mont_ctx_st BN_MONT_CTX; typedef struct bn_recp_ctx_st BN_RECP_CTX; typedef struct bn_gencb_st BN_GENCB; typedef struct buf_mem_st BUF_MEM; typedef struct evp_cipher_st EVP_CIPHER; typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; typedef struct evp_md_st EVP_MD; typedef struct evp_md_ctx_st EVP_MD_CTX; typedef struct evp_pkey_st EVP_PKEY; typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD; typedef struct evp_pkey_method_st EVP_PKEY_METHOD; typedef struct evp_pkey_ctx_st EVP_PKEY_CTX; typedef struct evp_kdf_ctx_st EVP_KDF_CTX; typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX; typedef struct hmac_ctx_st HMAC_CTX; typedef struct dh_st DH; typedef struct dh_method DH_METHOD; typedef struct dsa_st DSA; typedef struct dsa_method DSA_METHOD; typedef struct rsa_st RSA; typedef struct rsa_meth_st RSA_METHOD; typedef struct rsa_pss_params_st RSA_PSS_PARAMS; typedef struct ec_key_st EC_KEY; typedef struct ec_key_method_st EC_KEY_METHOD; typedef struct rand_meth_st RAND_METHOD; typedef struct rand_drbg_st RAND_DRBG; typedef struct ssl_dane_st SSL_DANE; typedef struct x509_st X509; typedef struct X509_algor_st X509_ALGOR; typedef struct X509_crl_st X509_CRL; typedef struct x509_crl_method_st X509_CRL_METHOD; typedef struct x509_revoked_st X509_REVOKED; typedef struct X509_name_st X509_NAME; typedef struct X509_pubkey_st X509_PUBKEY; typedef struct x509_store_st X509_STORE; typedef struct x509_store_ctx_st X509_STORE_CTX; typedef struct x509_object_st X509_OBJECT; typedef struct x509_lookup_st X509_LOOKUP; typedef struct x509_lookup_method_st X509_LOOKUP_METHOD; typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM; typedef struct x509_sig_info_st X509_SIG_INFO; typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO; typedef struct v3_ext_ctx X509V3_CTX; typedef struct conf_st CONF; typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS; typedef struct ui_st UI; typedef struct ui_method_st UI_METHOD; typedef struct engine_st ENGINE; typedef struct ssl_st SSL; typedef struct ssl_ctx_st SSL_CTX; typedef struct comp_ctx_st COMP_CTX; typedef struct comp_method_st COMP_METHOD; typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL; typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE; typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID; typedef struct DIST_POINT_st DIST_POINT; typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT; typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS; typedef struct crypto_ex_data_st CRYPTO_EX_DATA; typedef struct ocsp_req_ctx_st OCSP_REQ_CTX; typedef struct ocsp_response_st OCSP_RESPONSE; typedef struct ocsp_responder_id_st OCSP_RESPID; typedef struct sct_st SCT; typedef struct sct_ctx_st SCT_CTX; typedef struct ctlog_st CTLOG; typedef struct ctlog_store_st CTLOG_STORE; typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX; typedef struct ossl_store_info_st OSSL_STORE_INFO; typedef struct ossl_store_search_st OSSL_STORE_SEARCH; #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ defined(INTMAX_MAX) && defined(UINTMAX_MAX) typedef intmax_t ossl_intmax_t; typedef uintmax_t ossl_uintmax_t; #else /* * Not long long, because the C-library can only be expected to provide * strtoll(), strtoull() at the same time as intmax_t and strtoimax(), * strtoumax(). Since we use these for parsing arguments, we need the * conversion functions, not just the sizes. */ typedef long ossl_intmax_t; typedef unsigned long ossl_uintmax_t; #endif #ifdef __cplusplus } #endif #endif /* def HEADER_OPENSSL_TYPES_H */ PKZ0wl&&openssl/fips.hnu[/* ==================================================================== * Copyright (c) 2003 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.openssl.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include #include #include #include #ifndef OPENSSL_FIPS # error FIPS is disabled. #endif #ifdef OPENSSL_FIPS # ifdef __cplusplus extern "C" { # endif int FIPS_selftest(void); int FIPS_selftest_failed(void); /* * This function is deprecated as it performs selftest of the old FIPS drbg * implementation that is not validated. */ int FIPS_selftest_drbg_all(void); int FIPS_dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N, const EVP_MD *evpmd, const unsigned char *seed_in, size_t seed_len, int idx, unsigned char *seed_out, int *counter_ret, unsigned long *h_ret, BN_GENCB *cb); int FIPS_dsa_paramgen_check_g(DSA *dsa); /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. */ int ERR_load_FIPS_strings(void); /* Error codes for the FIPS functions. */ /* Function codes. */ # define FIPS_F_DH_BUILTIN_GENPARAMS 100 # define FIPS_F_DRBG_RESEED 121 # define FIPS_F_DSA_BUILTIN_PARAMGEN2 107 # define FIPS_F_DSA_DO_SIGN 102 # define FIPS_F_DSA_DO_VERIFY 103 # define FIPS_F_EVP_CIPHER_CTX_NEW 137 # define FIPS_F_EVP_CIPHER_CTX_RESET 122 # define FIPS_F_ECDH_COMPUTE_KEY 123 # define FIPS_F_EVP_CIPHERINIT_EX 124 # define FIPS_F_EVP_DIGESTINIT_EX 125 # define FIPS_F_FIPS_CHECK_DSA 104 # define FIPS_F_FIPS_CHECK_EC 142 # define FIPS_F_FIPS_CHECK_RSA 106 # define FIPS_F_FIPS_DRBG_BYTES 131 # define FIPS_F_FIPS_DRBG_CHECK 146 # define FIPS_F_FIPS_DRBG_CPRNG_TEST 132 # define FIPS_F_FIPS_DRBG_ERROR_CHECK 136 # define FIPS_F_FIPS_DRBG_GENERATE 134 # define FIPS_F_FIPS_DRBG_INIT 135 # define FIPS_F_FIPS_DRBG_INSTANTIATE 138 # define FIPS_F_FIPS_DRBG_NEW 139 # define FIPS_F_FIPS_DRBG_RESEED 140 # define FIPS_F_FIPS_DRBG_SINGLE_KAT 141 # define FIPS_F_FIPS_GET_ENTROPY 147 # define FIPS_F_FIPS_MODULE_MODE_SET 108 # define FIPS_F_FIPS_PKEY_SIGNATURE_TEST 109 # define FIPS_F_FIPS_RAND_BYTES 114 # define FIPS_F_FIPS_RAND_SEED 128 # define FIPS_F_FIPS_RAND_SET_METHOD 126 # define FIPS_F_FIPS_RAND_STATUS 127 # define FIPS_F_FIPS_RSA_BUILTIN_KEYGEN 101 # define FIPS_F_FIPS_SELFTEST 150 # define FIPS_F_FIPS_SELFTEST_AES 110 # define FIPS_F_FIPS_SELFTEST_AES_CCM 145 # define FIPS_F_FIPS_SELFTEST_AES_GCM 129 # define FIPS_F_FIPS_SELFTEST_AES_XTS 144 # define FIPS_F_FIPS_SELFTEST_CMAC 130 # define FIPS_F_FIPS_SELFTEST_DES 111 # define FIPS_F_FIPS_SELFTEST_DSA 112 # define FIPS_F_FIPS_SELFTEST_ECDSA 133 # define FIPS_F_FIPS_SELFTEST_HKDF 153 # define FIPS_F_FIPS_SELFTEST_HMAC 113 # define FIPS_F_FIPS_SELFTEST_KBKDF 151 # define FIPS_F_FIPS_SELFTEST_KRB5KDF 154 # define FIPS_F_FIPS_SELFTEST_PBKDF2 152 # define FIPS_F_FIPS_SELFTEST_SHA1 115 # define FIPS_F_FIPS_SELFTEST_SHA2 105 # define FIPS_F_FIPS_SELFTEST_SSHKDF 155 # define FIPS_F_FIPS_SELFTEST_SSKDF 156 # define FIPS_F_FIPS_SELFTEST_TLS1_PRF 157 # define FIPS_F_OSSL_ECDSA_SIGN_SIG 143 # define FIPS_F_OSSL_ECDSA_VERIFY_SIG 148 # define FIPS_F_RSA_BUILTIN_KEYGEN 116 # define FIPS_F_RSA_OSSL_INIT 149 # define FIPS_F_RSA_OSSL_PRIVATE_DECRYPT 117 # define FIPS_F_RSA_OSSL_PRIVATE_ENCRYPT 118 # define FIPS_F_RSA_OSSL_PUBLIC_DECRYPT 119 # define FIPS_F_RSA_OSSL_PUBLIC_ENCRYPT 120 /* Reason codes. */ # define FIPS_R_ADDITIONAL_INPUT_ERROR_UNDETECTED 150 # define FIPS_R_ADDITIONAL_INPUT_TOO_LONG 125 # define FIPS_R_ALREADY_INSTANTIATED 134 # define FIPS_R_DRBG_NOT_INITIALISED 152 # define FIPS_R_DRBG_STUCK 103 # define FIPS_R_ENTROPY_ERROR_UNDETECTED 104 # define FIPS_R_ENTROPY_NOT_REQUESTED_FOR_RESEED 105 # define FIPS_R_ENTROPY_SOURCE_STUCK 142 # define FIPS_R_ERROR_INITIALISING_DRBG 115 # define FIPS_R_ERROR_INSTANTIATING_DRBG 127 # define FIPS_R_ERROR_RETRIEVING_ADDITIONAL_INPUT 124 # define FIPS_R_ERROR_RETRIEVING_ENTROPY 122 # define FIPS_R_ERROR_RETRIEVING_NONCE 140 # define FIPS_R_FINGERPRINT_DOES_NOT_MATCH 110 # define FIPS_R_FIPS_MODE_ALREADY_SET 102 # define FIPS_R_FIPS_SELFTEST_FAILED 106 # define FIPS_R_FUNCTION_ERROR 116 # define FIPS_R_GENERATE_ERROR 137 # define FIPS_R_GENERATE_ERROR_UNDETECTED 118 # define FIPS_R_INSTANTIATE_ERROR 119 # define FIPS_R_INTERNAL_ERROR 121 # define FIPS_R_INVALID_KEY_LENGTH 109 # define FIPS_R_IN_ERROR_STATE 123 # define FIPS_R_KEY_TOO_SHORT 108 # define FIPS_R_NONCE_ERROR_UNDETECTED 149 # define FIPS_R_NON_FIPS_METHOD 100 # define FIPS_R_NOPR_TEST1_FAILURE 145 # define FIPS_R_NOPR_TEST2_FAILURE 146 # define FIPS_R_NOT_INSTANTIATED 126 # define FIPS_R_PAIRWISE_TEST_FAILED 107 # define FIPS_R_PERSONALISATION_ERROR_UNDETECTED 128 # define FIPS_R_PERSONALISATION_STRING_TOO_LONG 129 # define FIPS_R_PR_TEST1_FAILURE 147 # define FIPS_R_PR_TEST2_FAILURE 148 # define FIPS_R_REQUEST_LENGTH_ERROR_UNDETECTED 130 # define FIPS_R_REQUEST_TOO_LARGE_FOR_DRBG 131 # define FIPS_R_RESEED_COUNTER_ERROR 132 # define FIPS_R_RESEED_ERROR 133 # define FIPS_R_SELFTEST_FAILED 101 # define FIPS_R_SELFTEST_FAILURE 135 # define FIPS_R_TEST_FAILURE 117 # define FIPS_R_UNINSTANTIATE_ERROR 141 # define FIPS_R_UNINSTANTIATE_ZEROISE_ERROR 138 # define FIPS_R_UNSUPPORTED_DRBG_TYPE 139 # define FIPS_R_UNSUPPORTED_PLATFORM 113 # ifdef __cplusplus } # endif #endif PKZ.ZZopenssl/tserr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_TSERR_H # define HEADER_TSERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_TS # ifdef __cplusplus extern "C" # endif int ERR_load_TS_strings(void); /* * TS function codes. */ # define TS_F_DEF_SERIAL_CB 110 # define TS_F_DEF_TIME_CB 111 # define TS_F_ESS_ADD_SIGNING_CERT 112 # define TS_F_ESS_ADD_SIGNING_CERT_V2 147 # define TS_F_ESS_CERT_ID_NEW_INIT 113 # define TS_F_ESS_CERT_ID_V2_NEW_INIT 156 # define TS_F_ESS_SIGNING_CERT_NEW_INIT 114 # define TS_F_ESS_SIGNING_CERT_V2_NEW_INIT 157 # define TS_F_INT_TS_RESP_VERIFY_TOKEN 149 # define TS_F_PKCS7_TO_TS_TST_INFO 148 # define TS_F_TS_ACCURACY_SET_MICROS 115 # define TS_F_TS_ACCURACY_SET_MILLIS 116 # define TS_F_TS_ACCURACY_SET_SECONDS 117 # define TS_F_TS_CHECK_IMPRINTS 100 # define TS_F_TS_CHECK_NONCES 101 # define TS_F_TS_CHECK_POLICY 102 # define TS_F_TS_CHECK_SIGNING_CERTS 103 # define TS_F_TS_CHECK_STATUS_INFO 104 # define TS_F_TS_COMPUTE_IMPRINT 145 # define TS_F_TS_CONF_INVALID 151 # define TS_F_TS_CONF_LOAD_CERT 153 # define TS_F_TS_CONF_LOAD_CERTS 154 # define TS_F_TS_CONF_LOAD_KEY 155 # define TS_F_TS_CONF_LOOKUP_FAIL 152 # define TS_F_TS_CONF_SET_DEFAULT_ENGINE 146 # define TS_F_TS_GET_STATUS_TEXT 105 # define TS_F_TS_MSG_IMPRINT_SET_ALGO 118 # define TS_F_TS_REQ_SET_MSG_IMPRINT 119 # define TS_F_TS_REQ_SET_NONCE 120 # define TS_F_TS_REQ_SET_POLICY_ID 121 # define TS_F_TS_RESP_CREATE_RESPONSE 122 # define TS_F_TS_RESP_CREATE_TST_INFO 123 # define TS_F_TS_RESP_CTX_ADD_FAILURE_INFO 124 # define TS_F_TS_RESP_CTX_ADD_MD 125 # define TS_F_TS_RESP_CTX_ADD_POLICY 126 # define TS_F_TS_RESP_CTX_NEW 127 # define TS_F_TS_RESP_CTX_SET_ACCURACY 128 # define TS_F_TS_RESP_CTX_SET_CERTS 129 # define TS_F_TS_RESP_CTX_SET_DEF_POLICY 130 # define TS_F_TS_RESP_CTX_SET_SIGNER_CERT 131 # define TS_F_TS_RESP_CTX_SET_STATUS_INFO 132 # define TS_F_TS_RESP_GET_POLICY 133 # define TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION 134 # define TS_F_TS_RESP_SET_STATUS_INFO 135 # define TS_F_TS_RESP_SET_TST_INFO 150 # define TS_F_TS_RESP_SIGN 136 # define TS_F_TS_RESP_VERIFY_SIGNATURE 106 # define TS_F_TS_TST_INFO_SET_ACCURACY 137 # define TS_F_TS_TST_INFO_SET_MSG_IMPRINT 138 # define TS_F_TS_TST_INFO_SET_NONCE 139 # define TS_F_TS_TST_INFO_SET_POLICY_ID 140 # define TS_F_TS_TST_INFO_SET_SERIAL 141 # define TS_F_TS_TST_INFO_SET_TIME 142 # define TS_F_TS_TST_INFO_SET_TSA 143 # define TS_F_TS_VERIFY 108 # define TS_F_TS_VERIFY_CERT 109 # define TS_F_TS_VERIFY_CTX_NEW 144 /* * TS reason codes. */ # define TS_R_BAD_PKCS7_TYPE 132 # define TS_R_BAD_TYPE 133 # define TS_R_CANNOT_LOAD_CERT 137 # define TS_R_CANNOT_LOAD_KEY 138 # define TS_R_CERTIFICATE_VERIFY_ERROR 100 # define TS_R_COULD_NOT_SET_ENGINE 127 # define TS_R_COULD_NOT_SET_TIME 115 # define TS_R_DETACHED_CONTENT 134 # define TS_R_ESS_ADD_SIGNING_CERT_ERROR 116 # define TS_R_ESS_ADD_SIGNING_CERT_V2_ERROR 139 # define TS_R_ESS_SIGNING_CERTIFICATE_ERROR 101 # define TS_R_INVALID_NULL_POINTER 102 # define TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE 117 # define TS_R_MESSAGE_IMPRINT_MISMATCH 103 # define TS_R_NONCE_MISMATCH 104 # define TS_R_NONCE_NOT_RETURNED 105 # define TS_R_NO_CONTENT 106 # define TS_R_NO_TIME_STAMP_TOKEN 107 # define TS_R_PKCS7_ADD_SIGNATURE_ERROR 118 # define TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR 119 # define TS_R_PKCS7_TO_TS_TST_INFO_FAILED 129 # define TS_R_POLICY_MISMATCH 108 # define TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 120 # define TS_R_RESPONSE_SETUP_ERROR 121 # define TS_R_SIGNATURE_FAILURE 109 # define TS_R_THERE_MUST_BE_ONE_SIGNER 110 # define TS_R_TIME_SYSCALL_ERROR 122 # define TS_R_TOKEN_NOT_PRESENT 130 # define TS_R_TOKEN_PRESENT 131 # define TS_R_TSA_NAME_MISMATCH 111 # define TS_R_TSA_UNTRUSTED 112 # define TS_R_TST_INFO_SETUP_ERROR 123 # define TS_R_TS_DATASIGN 124 # define TS_R_UNACCEPTABLE_POLICY 125 # define TS_R_UNSUPPORTED_MD_ALGORITHM 126 # define TS_R_UNSUPPORTED_VERSION 113 # define TS_R_VAR_BAD_VALUE 135 # define TS_R_VAR_LOOKUP_FAILURE 136 # define TS_R_WRONG_CONTENT_TYPE 114 # endif #endif PKZ?O??openssl/dherr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_DHERR_H # define HEADER_DHERR_H # ifndef HEADER_SYMHACKS_H # include # endif # include # ifndef OPENSSL_NO_DH # ifdef __cplusplus extern "C" # endif int ERR_load_DH_strings(void); /* * DH function codes. */ # define DH_F_COMPUTE_KEY 102 # define DH_F_DHPARAMS_PRINT_FP 101 # define DH_F_DH_BUILTIN_GENPARAMS 106 # define DH_F_DH_CHECK 126 # define DH_F_DH_CHECK_EX 121 # define DH_F_DH_CHECK_PARAMS_EX 122 # define DH_F_DH_CHECK_PUB_KEY_EX 123 # define DH_F_DH_CMS_DECRYPT 114 # define DH_F_DH_CMS_SET_PEERKEY 115 # define DH_F_DH_CMS_SET_SHARED_INFO 116 # define DH_F_DH_COMPUTE_KEY 203 # define DH_F_DH_GENERATE_KEY 202 # define DH_F_DH_GENERATE_PARAMETERS_EX 201 # define DH_F_DH_METH_DUP 117 # define DH_F_DH_METH_NEW 118 # define DH_F_DH_METH_SET1_NAME 119 # define DH_F_DH_NEW_BY_NID 104 # define DH_F_DH_NEW_METHOD 105 # define DH_F_DH_PARAM_DECODE 107 # define DH_F_DH_PKEY_PUBLIC_CHECK 124 # define DH_F_DH_PRIV_DECODE 110 # define DH_F_DH_PRIV_ENCODE 111 # define DH_F_DH_PUB_DECODE 108 # define DH_F_DH_PUB_ENCODE 109 # define DH_F_DO_DH_PRINT 100 # define DH_F_GENERATE_KEY 103 # define DH_F_PKEY_DH_CTRL_STR 120 # define DH_F_PKEY_DH_DERIVE 112 # define DH_F_PKEY_DH_INIT 125 # define DH_F_PKEY_DH_KEYGEN 113 /* * DH reason codes. */ # define DH_R_BAD_GENERATOR 101 # define DH_R_BN_DECODE_ERROR 109 # define DH_R_BN_ERROR 106 # define DH_R_CHECK_INVALID_J_VALUE 115 # define DH_R_CHECK_INVALID_Q_VALUE 116 # define DH_R_CHECK_PUBKEY_INVALID 122 # define DH_R_CHECK_PUBKEY_TOO_LARGE 123 # define DH_R_CHECK_PUBKEY_TOO_SMALL 124 # define DH_R_CHECK_P_NOT_PRIME 117 # define DH_R_CHECK_P_NOT_SAFE_PRIME 118 # define DH_R_CHECK_Q_NOT_PRIME 119 # define DH_R_DECODE_ERROR 104 # define DH_R_INVALID_PARAMETER_NAME 110 # define DH_R_INVALID_PARAMETER_NID 114 # define DH_R_INVALID_PUBKEY 102 # define DH_R_KDF_PARAMETER_ERROR 112 # define DH_R_KEY_SIZE_TOO_SMALL 201 # define DH_R_KEYS_NOT_SET 108 # define DH_R_MISSING_PUBKEY 125 # define DH_R_MODULUS_TOO_LARGE 103 # define DH_R_NOT_SUITABLE_GENERATOR 120 # define DH_R_NO_PARAMETERS_SET 107 # define DH_R_NO_PRIVATE_VALUE 100 # define DH_R_NON_FIPS_METHOD 202 # define DH_R_PARAMETER_ENCODING_ERROR 105 # define DH_R_PEER_KEY_ERROR 111 # define DH_R_Q_TOO_LARGE 130 # define DH_R_SHARED_INFO_ERROR 113 # define DH_R_UNABLE_TO_CHECK_GENERATOR 121 # endif #endif PKZZpopenssl/safestack.hnu[/* * Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_SAFESTACK_H # define HEADER_SAFESTACK_H # include # include #ifdef __cplusplus extern "C" { #endif # define STACK_OF(type) struct stack_st_##type # define SKM_DEFINE_STACK_OF(t1, t2, t3) \ STACK_OF(t1); \ typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \ typedef void (*sk_##t1##_freefunc)(t3 *a); \ typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \ static ossl_unused ossl_inline int sk_##t1##_num(const STACK_OF(t1) *sk) \ { \ return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \ { \ return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \ } \ static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new(sk_##t1##_compfunc compare) \ { \ return (STACK_OF(t1) *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); \ } \ static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_null(void) \ { \ return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \ } \ static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \ { \ return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \ } \ static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \ { \ return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \ } \ static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \ { \ OPENSSL_sk_free((OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline void sk_##t1##_zero(STACK_OF(t1) *sk) \ { \ OPENSSL_sk_zero((OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \ { \ return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \ } \ static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \ { \ return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, \ (const void *)ptr); \ } \ static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \ { \ return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \ } \ static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \ { \ return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); \ } \ static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \ { \ return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \ { \ return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \ { \ OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \ } \ static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \ { \ return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); \ } \ static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \ { \ return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); \ } \ static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \ { \ return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \ } \ static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \ { \ return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); \ } \ static ossl_unused ossl_inline void sk_##t1##_sort(STACK_OF(t1) *sk) \ { \ OPENSSL_sk_sort((OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline int sk_##t1##_is_sorted(const STACK_OF(t1) *sk) \ { \ return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline STACK_OF(t1) * sk_##t1##_dup(const STACK_OF(t1) *sk) \ { \ return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); \ } \ static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_deep_copy(const STACK_OF(t1) *sk, \ sk_##t1##_copyfunc copyfunc, \ sk_##t1##_freefunc freefunc) \ { \ return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, \ (OPENSSL_sk_copyfunc)copyfunc, \ (OPENSSL_sk_freefunc)freefunc); \ } \ static ossl_unused ossl_inline sk_##t1##_compfunc sk_##t1##_set_cmp_func(STACK_OF(t1) *sk, sk_##t1##_compfunc compare) \ { \ return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); \ } # define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2) # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t) # define DEFINE_SPECIAL_STACK_OF_CONST(t1, t2) \ SKM_DEFINE_STACK_OF(t1, const t2, t2) # define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t) /*- * Strings are special: normally an lhash entry will point to a single * (somewhat) mutable object. In the case of strings: * * a) Instead of a single char, there is an array of chars, NUL-terminated. * b) The string may have be immutable. * * So, they need their own declarations. Especially important for * type-checking tools, such as Deputy. * * In practice, however, it appears to be hard to have a const * string. For now, I'm settling for dealing with the fact it is a * string at all. */ typedef char *OPENSSL_STRING; typedef const char *OPENSSL_CSTRING; /*- * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned * above, instead of a single char each entry is a NUL-terminated array of * chars. So, we have to implement STRING specially for STACK_OF. This is * dealt with in the autogenerated macros below. */ DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char) DEFINE_SPECIAL_STACK_OF_CONST(OPENSSL_CSTRING, char) /* * Similarly, we sometimes use a block of characters, NOT nul-terminated. * These should also be distinguished from "normal" stacks. */ typedef void *OPENSSL_BLOCK; DEFINE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) /* * If called without higher optimization (min. -xO3) the Oracle Developer * Studio compiler generates code for the defined (static inline) functions * above. * This would later lead to the linker complaining about missing symbols when * this header file is included but the resulting object is not linked against * the Crypto library (openssl#6912). */ # ifdef __SUNPRO_C # pragma weak OPENSSL_sk_num # pragma weak OPENSSL_sk_value # pragma weak OPENSSL_sk_new # pragma weak OPENSSL_sk_new_null # pragma weak OPENSSL_sk_new_reserve # pragma weak OPENSSL_sk_reserve # pragma weak OPENSSL_sk_free # pragma weak OPENSSL_sk_zero # pragma weak OPENSSL_sk_delete # pragma weak OPENSSL_sk_delete_ptr # pragma weak OPENSSL_sk_push # pragma weak OPENSSL_sk_unshift # pragma weak OPENSSL_sk_pop # pragma weak OPENSSL_sk_shift # pragma weak OPENSSL_sk_pop_free # pragma weak OPENSSL_sk_insert # pragma weak OPENSSL_sk_set # pragma weak OPENSSL_sk_find # pragma weak OPENSSL_sk_find_ex # pragma weak OPENSSL_sk_sort # pragma weak OPENSSL_sk_is_sorted # pragma weak OPENSSL_sk_dup # pragma weak OPENSSL_sk_deep_copy # pragma weak OPENSSL_sk_set_cmp_func # endif /* __SUNPRO_C */ # ifdef __cplusplus } # endif #endif PKZ k**openssl/dtls1.hnu[/* * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_DTLS1_H # define HEADER_DTLS1_H #ifdef __cplusplus extern "C" { #endif # define DTLS1_VERSION 0xFEFF # define DTLS1_2_VERSION 0xFEFD # define DTLS_MIN_VERSION DTLS1_VERSION # define DTLS_MAX_VERSION DTLS1_2_VERSION # define DTLS1_VERSION_MAJOR 0xFE # define DTLS1_BAD_VER 0x0100 /* Special value for method supporting multiple versions */ # define DTLS_ANY_VERSION 0x1FFFF /* lengths of messages */ /* * Actually the max cookie length in DTLS is 255. But we can't change this now * due to compatibility concerns. */ # define DTLS1_COOKIE_LENGTH 256 # define DTLS1_RT_HEADER_LENGTH 13 # define DTLS1_HM_HEADER_LENGTH 12 # define DTLS1_HM_BAD_FRAGMENT -2 # define DTLS1_HM_FRAGMENT_RETRY -3 # define DTLS1_CCS_HEADER_LENGTH 1 # define DTLS1_AL_HEADER_LENGTH 2 /* Timeout multipliers */ # define DTLS1_TMO_READ_COUNT 2 # define DTLS1_TMO_WRITE_COUNT 2 # define DTLS1_TMO_ALERT_COUNT 12 #ifdef __cplusplus } #endif #endif PKZ openssl/symhacks.hnu[/* * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_SYMHACKS_H # define HEADER_SYMHACKS_H # include /* Case insensitive linking causes problems.... */ # if defined(OPENSSL_SYS_VMS) # undef ERR_load_CRYPTO_strings # define ERR_load_CRYPTO_strings ERR_load_CRYPTOlib_strings # undef OCSP_crlID_new # define OCSP_crlID_new OCSP_crlID2_new # undef d2i_ECPARAMETERS # define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS # undef i2d_ECPARAMETERS # define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS # undef d2i_ECPKPARAMETERS # define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS # undef i2d_ECPKPARAMETERS # define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS /* This one clashes with CMS_data_create */ # undef cms_Data_create # define cms_Data_create priv_cms_Data_create # endif #endif /* ! defined HEADER_VMS_IDHACKS_H */ PKZ`.F-F-openssl/pkcs7.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_PKCS7_H # define HEADER_PKCS7_H # include # include # include # include # include # include #ifdef __cplusplus extern "C" { #endif /*- Encryption_ID DES-CBC Digest_ID MD5 Digest_Encryption_ID rsaEncryption Key_Encryption_ID rsaEncryption */ typedef struct pkcs7_issuer_and_serial_st { X509_NAME *issuer; ASN1_INTEGER *serial; } PKCS7_ISSUER_AND_SERIAL; typedef struct pkcs7_signer_info_st { ASN1_INTEGER *version; /* version 1 */ PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; X509_ALGOR *digest_alg; STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */ X509_ALGOR *digest_enc_alg; ASN1_OCTET_STRING *enc_digest; STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */ /* The private key to sign with */ EVP_PKEY *pkey; } PKCS7_SIGNER_INFO; DEFINE_STACK_OF(PKCS7_SIGNER_INFO) typedef struct pkcs7_recip_info_st { ASN1_INTEGER *version; /* version 0 */ PKCS7_ISSUER_AND_SERIAL *issuer_and_serial; X509_ALGOR *key_enc_algor; ASN1_OCTET_STRING *enc_key; X509 *cert; /* get the pub-key from this */ } PKCS7_RECIP_INFO; DEFINE_STACK_OF(PKCS7_RECIP_INFO) typedef struct pkcs7_signed_st { ASN1_INTEGER *version; /* version 1 */ STACK_OF(X509_ALGOR) *md_algs; /* md used */ STACK_OF(X509) *cert; /* [ 0 ] */ STACK_OF(X509_CRL) *crl; /* [ 1 ] */ STACK_OF(PKCS7_SIGNER_INFO) *signer_info; struct pkcs7_st *contents; } PKCS7_SIGNED; /* * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about * merging the two */ typedef struct pkcs7_enc_content_st { ASN1_OBJECT *content_type; X509_ALGOR *algorithm; ASN1_OCTET_STRING *enc_data; /* [ 0 ] */ const EVP_CIPHER *cipher; } PKCS7_ENC_CONTENT; typedef struct pkcs7_enveloped_st { ASN1_INTEGER *version; /* version 0 */ STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; PKCS7_ENC_CONTENT *enc_data; } PKCS7_ENVELOPE; typedef struct pkcs7_signedandenveloped_st { ASN1_INTEGER *version; /* version 1 */ STACK_OF(X509_ALGOR) *md_algs; /* md used */ STACK_OF(X509) *cert; /* [ 0 ] */ STACK_OF(X509_CRL) *crl; /* [ 1 ] */ STACK_OF(PKCS7_SIGNER_INFO) *signer_info; PKCS7_ENC_CONTENT *enc_data; STACK_OF(PKCS7_RECIP_INFO) *recipientinfo; } PKCS7_SIGN_ENVELOPE; typedef struct pkcs7_digest_st { ASN1_INTEGER *version; /* version 0 */ X509_ALGOR *md; /* md used */ struct pkcs7_st *contents; ASN1_OCTET_STRING *digest; } PKCS7_DIGEST; typedef struct pkcs7_encrypted_st { ASN1_INTEGER *version; /* version 0 */ PKCS7_ENC_CONTENT *enc_data; } PKCS7_ENCRYPT; typedef struct pkcs7_st { /* * The following is non NULL if it contains ASN1 encoding of this * structure */ unsigned char *asn1; long length; # define PKCS7_S_HEADER 0 # define PKCS7_S_BODY 1 # define PKCS7_S_TAIL 2 int state; /* used during processing */ int detached; ASN1_OBJECT *type; /* content as defined by the type */ /* * all encryption/message digests are applied to the 'contents', leaving * out the 'type' field. */ union { char *ptr; /* NID_pkcs7_data */ ASN1_OCTET_STRING *data; /* NID_pkcs7_signed */ PKCS7_SIGNED *sign; /* NID_pkcs7_enveloped */ PKCS7_ENVELOPE *enveloped; /* NID_pkcs7_signedAndEnveloped */ PKCS7_SIGN_ENVELOPE *signed_and_enveloped; /* NID_pkcs7_digest */ PKCS7_DIGEST *digest; /* NID_pkcs7_encrypted */ PKCS7_ENCRYPT *encrypted; /* Anything else */ ASN1_TYPE *other; } d; } PKCS7; DEFINE_STACK_OF(PKCS7) # define PKCS7_OP_SET_DETACHED_SIGNATURE 1 # define PKCS7_OP_GET_DETACHED_SIGNATURE 2 # define PKCS7_get_signed_attributes(si) ((si)->auth_attr) # define PKCS7_get_attributes(si) ((si)->unauth_attr) # define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed) # define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted) # define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped) # define PKCS7_type_is_signedAndEnveloped(a) \ (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped) # define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data) # define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest) # define PKCS7_set_detached(p,v) \ PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL) # define PKCS7_get_detached(p) \ PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL) # define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7)) /* S/MIME related flags */ # define PKCS7_TEXT 0x1 # define PKCS7_NOCERTS 0x2 # define PKCS7_NOSIGS 0x4 # define PKCS7_NOCHAIN 0x8 # define PKCS7_NOINTERN 0x10 # define PKCS7_NOVERIFY 0x20 # define PKCS7_DETACHED 0x40 # define PKCS7_BINARY 0x80 # define PKCS7_NOATTR 0x100 # define PKCS7_NOSMIMECAP 0x200 # define PKCS7_NOOLDMIMETYPE 0x400 # define PKCS7_CRLFEOL 0x800 # define PKCS7_STREAM 0x1000 # define PKCS7_NOCRL 0x2000 # define PKCS7_PARTIAL 0x4000 # define PKCS7_REUSE_DIGEST 0x8000 # define PKCS7_NO_DUAL_CONTENT 0x10000 /* Flags: for compatibility with older code */ # define SMIME_TEXT PKCS7_TEXT # define SMIME_NOCERTS PKCS7_NOCERTS # define SMIME_NOSIGS PKCS7_NOSIGS # define SMIME_NOCHAIN PKCS7_NOCHAIN # define SMIME_NOINTERN PKCS7_NOINTERN # define SMIME_NOVERIFY PKCS7_NOVERIFY # define SMIME_DETACHED PKCS7_DETACHED # define SMIME_BINARY PKCS7_BINARY # define SMIME_NOATTR PKCS7_NOATTR /* CRLF ASCII canonicalisation */ # define SMIME_ASCIICRLF 0x80000 DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL) int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data, const EVP_MD *type, unsigned char *md, unsigned int *len); # ifndef OPENSSL_NO_STDIO PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7); int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7); # endif PKCS7 *PKCS7_dup(PKCS7 *p7); PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7); int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7); int i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags); int PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags); DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO) DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO) DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED) DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT) DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE) DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE) DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST) DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT) DECLARE_ASN1_FUNCTIONS(PKCS7) DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN) DECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY) DECLARE_ASN1_NDEF_FUNCTION(PKCS7) DECLARE_ASN1_PRINT_FUNCTION(PKCS7) long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg); int PKCS7_set_type(PKCS7 *p7, int type); int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other); int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data); int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, const EVP_MD *dgst); int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si); int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i); int PKCS7_add_certificate(PKCS7 *p7, X509 *x509); int PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509); int PKCS7_content_new(PKCS7 *p7, int nid); int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si); int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, X509 *x509); BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio); int PKCS7_dataFinal(PKCS7 *p7, BIO *bio); BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert); PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509, EVP_PKEY *pkey, const EVP_MD *dgst); X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si); int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md); STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7); PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509); void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk, X509_ALGOR **pdig, X509_ALGOR **psig); void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc); int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri); int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509); int PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher); int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7); PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx); ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk); int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type, void *data); int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype, void *value); ASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid); ASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid); int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si, STACK_OF(X509_ATTRIBUTE) *sk); int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si, STACK_OF(X509_ATTRIBUTE) *sk); PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, BIO *data, int flags); PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7, X509 *signcert, EVP_PKEY *pkey, const EVP_MD *md, int flags); int PKCS7_final(PKCS7 *p7, BIO *data, int flags); int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, int flags); STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags); PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher, int flags); int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags); int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK_OF(X509_ALGOR) *cap); STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si); int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg); int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid); int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t); int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si, const unsigned char *md, int mdlen); int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags); PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont); BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7); # ifdef __cplusplus } # endif #endif PKZlopenssl/cast.hnu[/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_CAST_H # define HEADER_CAST_H # include # ifndef OPENSSL_NO_CAST # ifdef __cplusplus extern "C" { # endif # define CAST_ENCRYPT 1 # define CAST_DECRYPT 0 # define CAST_LONG unsigned int # define CAST_BLOCK 8 # define CAST_KEY_LENGTH 16 typedef struct cast_key_st { CAST_LONG data[32]; int short_key; /* Use reduced rounds for short key */ } CAST_KEY; void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key, int enc); void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, const CAST_KEY *ks, unsigned char *iv, int enc); void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, const CAST_KEY *schedule, unsigned char *ivec, int *num, int enc); void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, const CAST_KEY *schedule, unsigned char *ivec, int *num); # ifdef __cplusplus } # endif # endif #endif PKZ&)/)/openssl/evperr.hnu[/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_EVPERR_H # define HEADER_EVPERR_H # include # ifdef __cplusplus extern "C" # endif int ERR_load_EVP_strings(void); /* * EVP function codes. */ # define EVP_F_AESNI_INIT_KEY 165 # define EVP_F_AESNI_XTS_INIT_KEY 233 # define EVP_F_AES_GCM_CTRL 196 # define EVP_F_AES_INIT_KEY 133 # define EVP_F_AES_OCB_CIPHER 169 # define EVP_F_AES_T4_INIT_KEY 178 # define EVP_F_AES_T4_XTS_INIT_KEY 234 # define EVP_F_AES_WRAP_CIPHER 170 # define EVP_F_AES_XTS_CIPHER 229 # define EVP_F_AES_XTS_INIT_KEY 235 # define EVP_F_ALG_MODULE_INIT 177 # define EVP_F_ARIA_CCM_INIT_KEY 175 # define EVP_F_ARIA_GCM_CTRL 197 # define EVP_F_ARIA_GCM_INIT_KEY 176 # define EVP_F_ARIA_INIT_KEY 185 # define EVP_F_B64_NEW 198 # define EVP_F_CAMELLIA_INIT_KEY 159 # define EVP_F_CHACHA20_POLY1305_CTRL 182 # define EVP_F_CMLL_T4_INIT_KEY 179 # define EVP_F_DES_EDE3_WRAP_CIPHER 171 # define EVP_F_DO_SIGVER_INIT 161 # define EVP_F_ENC_NEW 199 # define EVP_F_EVP_CIPHERINIT_EX 123 # define EVP_F_EVP_CIPHER_ASN1_TO_PARAM 204 # define EVP_F_EVP_CIPHER_CTX_COPY 163 # define EVP_F_EVP_CIPHER_CTX_CTRL 124 # define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 # define EVP_F_EVP_CIPHER_PARAM_TO_ASN1 205 # define EVP_F_EVP_DECRYPTFINAL_EX 101 # define EVP_F_EVP_DECRYPTUPDATE 166 # define EVP_F_EVP_DIGESTFINALXOF 174 # define EVP_F_EVP_DIGESTINIT_EX 128 # define EVP_F_EVP_ENCRYPTDECRYPTUPDATE 219 # define EVP_F_EVP_ENCRYPTFINAL_EX 127 # define EVP_F_EVP_ENCRYPTUPDATE 167 # define EVP_F_EVP_KDF_CTRL 224 # define EVP_F_EVP_KDF_CTRL_STR 225 # define EVP_F_EVP_KDF_CTX_NEW_ID 226 # define EVP_F_EVP_MD_CTX_COPY_EX 110 # define EVP_F_EVP_MD_SIZE 162 # define EVP_F_EVP_OPENINIT 102 # define EVP_F_EVP_PBE_ALG_ADD 115 # define EVP_F_EVP_PBE_ALG_ADD_TYPE 160 # define EVP_F_EVP_PBE_CIPHERINIT 116 # define EVP_F_EVP_PBE_SCRYPT 181 # define EVP_F_EVP_PKCS82PKEY 111 # define EVP_F_EVP_PKEY2PKCS8 113 # define EVP_F_EVP_PKEY_ASN1_ADD0 188 # define EVP_F_EVP_PKEY_CHECK 186 # define EVP_F_EVP_PKEY_COPY_PARAMETERS 103 # define EVP_F_EVP_PKEY_CTX_CTRL 137 # define EVP_F_EVP_PKEY_CTX_CTRL_STR 150 # define EVP_F_EVP_PKEY_CTX_DUP 156 # define EVP_F_EVP_PKEY_CTX_MD 168 # define EVP_F_EVP_PKEY_DECRYPT 104 # define EVP_F_EVP_PKEY_DECRYPT_INIT 138 # define EVP_F_EVP_PKEY_DECRYPT_OLD 151 # define EVP_F_EVP_PKEY_DERIVE 153 # define EVP_F_EVP_PKEY_DERIVE_INIT 154 # define EVP_F_EVP_PKEY_DERIVE_SET_PEER 155 # define EVP_F_EVP_PKEY_ENCRYPT 105 # define EVP_F_EVP_PKEY_ENCRYPT_INIT 139 # define EVP_F_EVP_PKEY_ENCRYPT_OLD 152 # define EVP_F_EVP_PKEY_GET0_DH 119 # define EVP_F_EVP_PKEY_GET0_DSA 120 # define EVP_F_EVP_PKEY_GET0_EC_KEY 131 # define EVP_F_EVP_PKEY_GET0_HMAC 183 # define EVP_F_EVP_PKEY_GET0_POLY1305 184 # define EVP_F_EVP_PKEY_GET0_RSA 121 # define EVP_F_EVP_PKEY_GET0_SIPHASH 172 # define EVP_F_EVP_PKEY_GET_RAW_PRIVATE_KEY 202 # define EVP_F_EVP_PKEY_GET_RAW_PUBLIC_KEY 203 # define EVP_F_EVP_PKEY_KEYGEN 146 # define EVP_F_EVP_PKEY_KEYGEN_INIT 147 # define EVP_F_EVP_PKEY_METH_ADD0 194 # define EVP_F_EVP_PKEY_METH_NEW 195 # define EVP_F_EVP_PKEY_NEW 106 # define EVP_F_EVP_PKEY_NEW_CMAC_KEY 193 # define EVP_F_EVP_PKEY_NEW_RAW_PRIVATE_KEY 191 # define EVP_F_EVP_PKEY_NEW_RAW_PUBLIC_KEY 192 # define EVP_F_EVP_PKEY_PARAMGEN 148 # define EVP_F_EVP_PKEY_PARAMGEN_INIT 149 # define EVP_F_EVP_PKEY_PARAM_CHECK 189 # define EVP_F_EVP_PKEY_PUBLIC_CHECK 190 # define EVP_F_EVP_PKEY_SET1_ENGINE 187 # define EVP_F_EVP_PKEY_SET_ALIAS_TYPE 206 # define EVP_F_EVP_PKEY_SIGN 140 # define EVP_F_EVP_PKEY_SIGN_INIT 141 # define EVP_F_EVP_PKEY_VERIFY 142 # define EVP_F_EVP_PKEY_VERIFY_INIT 143 # define EVP_F_EVP_PKEY_VERIFY_RECOVER 144 # define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT 145 # define EVP_F_EVP_SIGNFINAL 107 # define EVP_F_EVP_VERIFYFINAL 108 # define EVP_F_INT_CTX_NEW 157 # define EVP_F_OK_NEW 200 # define EVP_F_PKCS5_PBE_KEYIVGEN 117 # define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 # define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 164 # define EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN 180 # define EVP_F_PKEY_KDF_CTRL 227 # define EVP_F_PKEY_SET_TYPE 158 # define EVP_F_RC2_MAGIC_TO_METH 109 # define EVP_F_RC5_CTRL 125 # define EVP_F_R_32_12_16_INIT_KEY 242 # define EVP_F_S390X_AES_GCM_CTRL 201 # define EVP_F_SCRYPT_ALG 228 # define EVP_F_UPDATE 173 /* * EVP reason codes. */ # define EVP_R_AES_KEY_SETUP_FAILED 143 # define EVP_R_ARIA_KEY_SETUP_FAILED 176 # define EVP_R_BAD_DECRYPT 100 # define EVP_R_BAD_KEY_LENGTH 195 # define EVP_R_BUFFER_TOO_SMALL 155 # define EVP_R_CAMELLIA_KEY_SETUP_FAILED 157 # define EVP_R_CIPHER_PARAMETER_ERROR 122 # define EVP_R_COMMAND_NOT_SUPPORTED 147 # define EVP_R_COPY_ERROR 173 # define EVP_R_CTRL_NOT_IMPLEMENTED 132 # define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 # define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 # define EVP_R_DECODE_ERROR 114 # define EVP_R_DISABLED_FOR_FIPS 200 # define EVP_R_DIFFERENT_KEY_TYPES 101 # define EVP_R_DIFFERENT_PARAMETERS 153 # define EVP_R_ERROR_LOADING_SECTION 165 # define EVP_R_ERROR_SETTING_FIPS_MODE 166 # define EVP_R_EXPECTING_AN_HMAC_KEY 174 # define EVP_R_EXPECTING_AN_RSA_KEY 127 # define EVP_R_EXPECTING_A_DH_KEY 128 # define EVP_R_EXPECTING_A_DSA_KEY 129 # define EVP_R_EXPECTING_A_EC_KEY 142 # define EVP_R_EXPECTING_A_POLY1305_KEY 164 # define EVP_R_EXPECTING_A_SIPHASH_KEY 175 # define EVP_R_FIPS_MODE_NOT_SUPPORTED 167 # define EVP_R_GET_RAW_KEY_FAILED 182 # define EVP_R_ILLEGAL_SCRYPT_PARAMETERS 171 # define EVP_R_INITIALIZATION_ERROR 134 # define EVP_R_INPUT_NOT_INITIALIZED 111 # define EVP_R_INVALID_DIGEST 152 # define EVP_R_INVALID_FIPS_MODE 168 # define EVP_R_INVALID_IV_LENGTH 194 # define EVP_R_INVALID_KEY 163 # define EVP_R_INVALID_KEY_LENGTH 130 # define EVP_R_INVALID_OPERATION 148 # define EVP_R_KEYGEN_FAILURE 120 # define EVP_R_KEY_SETUP_FAILED 180 # define EVP_R_MEMORY_LIMIT_EXCEEDED 172 # define EVP_R_MESSAGE_DIGEST_IS_NULL 159 # define EVP_R_METHOD_NOT_SUPPORTED 144 # define EVP_R_MISSING_PARAMETERS 103 # define EVP_R_NOT_XOF_OR_INVALID_LENGTH 178 # define EVP_R_NO_CIPHER_SET 131 # define EVP_R_NO_DEFAULT_DIGEST 158 # define EVP_R_NO_DIGEST_SET 139 # define EVP_R_NO_KEY_SET 154 # define EVP_R_NO_OPERATION_SET 149 # define EVP_R_ONLY_ONESHOT_SUPPORTED 177 # define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150 # define EVP_R_OPERATON_NOT_INITIALIZED 151 # define EVP_R_PARAMETER_TOO_LARGE 187 # define EVP_R_OUTPUT_WOULD_OVERFLOW 184 # define EVP_R_PARTIALLY_OVERLAPPING 162 # define EVP_R_PBKDF2_ERROR 181 # define EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED 179 # define EVP_R_PRIVATE_KEY_DECODE_ERROR 145 # define EVP_R_PRIVATE_KEY_ENCODE_ERROR 146 # define EVP_R_PUBLIC_KEY_NOT_RSA 106 # define EVP_R_TOO_LARGE 201 # define EVP_R_UNKNOWN_CIPHER 160 # define EVP_R_UNKNOWN_DIGEST 161 # define EVP_R_UNKNOWN_OPTION 169 # define EVP_R_UNKNOWN_PBE_ALGORITHM 121 # define EVP_R_UNSUPPORTED_ALGORITHM 156 # define EVP_R_UNSUPPORTED_CIPHER 107 # define EVP_R_UNSUPPORTED_KEYLENGTH 123 # define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 # define EVP_R_UNSUPPORTED_KEY_SIZE 108 # define EVP_R_UNSUPPORTED_NUMBER_OF_ROUNDS 135 # define EVP_R_UNSUPPORTED_PRF 125 # define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM 118 # define EVP_R_UNSUPPORTED_SALT_TYPE 126 # define EVP_R_WRAP_MODE_NOT_ALLOWED 170 # define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109 # define EVP_R_XTS_DATA_UNIT_IS_TOO_LARGE 191 # define EVP_R_XTS_DUPLICATED_KEYS 192 #endif PKZhl<l< openssl/pem.hnu[/* * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_PEM_H # define HEADER_PEM_H # include # include # include # include # include # include #ifdef __cplusplus extern "C" { #endif # define PEM_BUFSIZE 1024 # define PEM_STRING_X509_OLD "X509 CERTIFICATE" # define PEM_STRING_X509 "CERTIFICATE" # define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE" # define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST" # define PEM_STRING_X509_REQ "CERTIFICATE REQUEST" # define PEM_STRING_X509_CRL "X509 CRL" # define PEM_STRING_EVP_PKEY "ANY PRIVATE KEY" # define PEM_STRING_PUBLIC "PUBLIC KEY" # define PEM_STRING_RSA "RSA PRIVATE KEY" # define PEM_STRING_RSA_PUBLIC "RSA PUBLIC KEY" # define PEM_STRING_DSA "DSA PRIVATE KEY" # define PEM_STRING_DSA_PUBLIC "DSA PUBLIC KEY" # define PEM_STRING_PKCS7 "PKCS7" # define PEM_STRING_PKCS7_SIGNED "PKCS #7 SIGNED DATA" # define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY" # define PEM_STRING_PKCS8INF "PRIVATE KEY" # define PEM_STRING_DHPARAMS "DH PARAMETERS" # define PEM_STRING_DHXPARAMS "X9.42 DH PARAMETERS" # define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" # define PEM_STRING_DSAPARAMS "DSA PARAMETERS" # define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY" # define PEM_STRING_ECPARAMETERS "EC PARAMETERS" # define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY" # define PEM_STRING_PARAMETERS "PARAMETERS" # define PEM_STRING_CMS "CMS" # define PEM_TYPE_ENCRYPTED 10 # define PEM_TYPE_MIC_ONLY 20 # define PEM_TYPE_MIC_CLEAR 30 # define PEM_TYPE_CLEAR 40 /* * These macros make the PEM_read/PEM_write functions easier to maintain and * write. Now they are all implemented with either: IMPLEMENT_PEM_rw(...) or * IMPLEMENT_PEM_rw_cb(...) */ # ifdef OPENSSL_NO_STDIO # define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/ # define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/ # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/ # define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/ # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/ # else # define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ { \ return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \ } # define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, type *x) \ { \ return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \ } # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, const type *x) \ { \ return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \ } # define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, \ void *u) \ { \ return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ } # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, \ void *u) \ { \ return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ } # endif # define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ { \ return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \ } # define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x) \ { \ return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \ } # define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, const type *x) \ { \ return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \ } # define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ { \ return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \ } # define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ { \ return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \ } # define IMPLEMENT_PEM_write(name, type, str, asn1) \ IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ IMPLEMENT_PEM_write_fp(name, type, str, asn1) # define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) # define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \ IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) # define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) # define IMPLEMENT_PEM_read(name, type, str, asn1) \ IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ IMPLEMENT_PEM_read_fp(name, type, str, asn1) # define IMPLEMENT_PEM_rw(name, type, str, asn1) \ IMPLEMENT_PEM_read(name, type, str, asn1) \ IMPLEMENT_PEM_write(name, type, str, asn1) # define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \ IMPLEMENT_PEM_read(name, type, str, asn1) \ IMPLEMENT_PEM_write_const(name, type, str, asn1) # define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \ IMPLEMENT_PEM_read(name, type, str, asn1) \ IMPLEMENT_PEM_write_cb(name, type, str, asn1) /* These are the same except they are for the declarations */ # if defined(OPENSSL_NO_STDIO) # define DECLARE_PEM_read_fp(name, type) /**/ # define DECLARE_PEM_write_fp(name, type) /**/ # define DECLARE_PEM_write_fp_const(name, type) /**/ # define DECLARE_PEM_write_cb_fp(name, type) /**/ # else # define DECLARE_PEM_read_fp(name, type) \ type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u); # define DECLARE_PEM_write_fp(name, type) \ int PEM_write_##name(FILE *fp, type *x); # define DECLARE_PEM_write_fp_const(name, type) \ int PEM_write_##name(FILE *fp, const type *x); # define DECLARE_PEM_write_cb_fp(name, type) \ int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u); # endif # define DECLARE_PEM_read_bio(name, type) \ type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); # define DECLARE_PEM_write_bio(name, type) \ int PEM_write_bio_##name(BIO *bp, type *x); # define DECLARE_PEM_write_bio_const(name, type) \ int PEM_write_bio_##name(BIO *bp, const type *x); # define DECLARE_PEM_write_cb_bio(name, type) \ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ unsigned char *kstr, int klen, pem_password_cb *cb, void *u); # define DECLARE_PEM_write(name, type) \ DECLARE_PEM_write_bio(name, type) \ DECLARE_PEM_write_fp(name, type) # define DECLARE_PEM_write_const(name, type) \ DECLARE_PEM_write_bio_const(name, type) \ DECLARE_PEM_write_fp_const(name, type) # define DECLARE_PEM_write_cb(name, type) \ DECLARE_PEM_write_cb_bio(name, type) \ DECLARE_PEM_write_cb_fp(name, type) # define DECLARE_PEM_read(name, type) \ DECLARE_PEM_read_bio(name, type) \ DECLARE_PEM_read_fp(name, type) # define DECLARE_PEM_rw(name, type) \ DECLARE_PEM_read(name, type) \ DECLARE_PEM_write(name, type) # define DECLARE_PEM_rw_const(name, type) \ DECLARE_PEM_read(name, type) \ DECLARE_PEM_write_const(name, type) # define DECLARE_PEM_rw_cb(name, type) \ DECLARE_PEM_read(name, type) \ DECLARE_PEM_write_cb(name, type) typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata); int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len, pem_password_cb *callback, void *u); int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data, long *len); # define PEM_FLAG_SECURE 0x1 # define PEM_FLAG_EAY_COMPATIBLE 0x2 # define PEM_FLAG_ONLY_B64 0x4 int PEM_read_bio_ex(BIO *bp, char **name, char **header, unsigned char **data, long *len, unsigned int flags); int PEM_bytes_read_bio_secmem(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp, pem_password_cb *cb, void *u); int PEM_write_bio(BIO *bp, const char *name, const char *hdr, const unsigned char *data, long len); int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp, pem_password_cb *cb, void *u); void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, pem_password_cb *cb, void *u); int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cd, void *u); #ifndef OPENSSL_NO_STDIO int PEM_read(FILE *fp, char **name, char **header, unsigned char **data, long *len); int PEM_write(FILE *fp, const char *name, const char *hdr, const unsigned char *data, long len); void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, pem_password_cb *cb, void *u); int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, void *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *callback, void *u); STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); #endif int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey); /* The default pem_password_cb that's used internally */ int PEM_def_callback(char *buf, int num, int rwflag, void *userdata); void PEM_proc_type(char *buf, int type); void PEM_dek_info(char *buf, const char *type, int len, char *str); # include DECLARE_PEM_rw(X509, X509) DECLARE_PEM_rw(X509_AUX, X509) DECLARE_PEM_rw(X509_REQ, X509_REQ) DECLARE_PEM_write(X509_REQ_NEW, X509_REQ) DECLARE_PEM_rw(X509_CRL, X509_CRL) DECLARE_PEM_rw(PKCS7, PKCS7) DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE) DECLARE_PEM_rw(PKCS8, X509_SIG) DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO) # ifndef OPENSSL_NO_RSA DECLARE_PEM_rw_cb(RSAPrivateKey, RSA) DECLARE_PEM_rw_const(RSAPublicKey, RSA) DECLARE_PEM_rw(RSA_PUBKEY, RSA) # endif # ifndef OPENSSL_NO_DSA DECLARE_PEM_rw_cb(DSAPrivateKey, DSA) DECLARE_PEM_rw(DSA_PUBKEY, DSA) DECLARE_PEM_rw_const(DSAparams, DSA) # endif # ifndef OPENSSL_NO_EC DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP) DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) DECLARE_PEM_rw(EC_PUBKEY, EC_KEY) # endif # ifndef OPENSSL_NO_DH DECLARE_PEM_rw_const(DHparams, DH) DECLARE_PEM_write_const(DHxparams, DH) # endif DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) DECLARE_PEM_rw(PUBKEY, EVP_PKEY) int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, char *, int, pem_password_cb *, void *); int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cb, void *u); int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u); # ifndef OPENSSL_NO_STDIO int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cb, void *u); int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u); int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cd, void *u); # endif EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x); int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x); # ifndef OPENSSL_NO_DSA EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length); EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length); EVP_PKEY *b2i_PrivateKey_bio(BIO *in); EVP_PKEY *b2i_PublicKey_bio(BIO *in); int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk); int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk); # ifndef OPENSSL_NO_RC4 EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb, void *u); # endif # endif # ifdef __cplusplus } # endif #endif PKZ--openssl/opensslconf.hnu[/* This file is here to prevent a file conflict on multiarch systems. A * conflict will frequently occur because arch-specific build-time * configuration options are stored (and used, so they can't just be stripped * out) in opensslconf.h. The original opensslconf.h has been renamed. * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */ #ifdef openssl_opensslconf_multilib_redirection_h #error "Do not define openssl_opensslconf_multilib_redirection_h!" #endif #define openssl_opensslconf_multilib_redirection_h #if defined(__i386__) #include "opensslconf-i386.h" #elif defined(__ia64__) #include "opensslconf-ia64.h" #elif defined(__mips64) && defined(__MIPSEL__) #include "opensslconf-mips64el.h" #elif defined(__mips64) #include "opensslconf-mips64.h" #elif defined(__mips) && defined(__MIPSEL__) #include "opensslconf-mipsel.h" #elif defined(__mips) #include "opensslconf-mips.h" #elif defined(__powerpc64__) #include #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #include "opensslconf-ppc64.h" #else #include "opensslconf-ppc64le.h" #endif #elif defined(__powerpc__) #include "opensslconf-ppc.h" #elif defined(__s390x__) #include "opensslconf-s390x.h" #elif defined(__s390__) #include "opensslconf-s390.h" #elif defined(__sparc__) && defined(__arch64__) #include "opensslconf-sparc64.h" #elif defined(__sparc__) #include "opensslconf-sparc.h" #elif defined(__x86_64__) #include "opensslconf-x86_64.h" #else #error "This openssl-devel package does not work your architecture?" #endif #undef openssl_opensslconf_multilib_redirection_h PKZy7;;openssl/ocsp.hnu[/* * Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_OCSP_H # define HEADER_OCSP_H #include /* * These definitions are outside the OPENSSL_NO_OCSP guard because although for * historical reasons they have OCSP_* names, they can actually be used * independently of OCSP. E.g. see RFC5280 */ /*- * CRLReason ::= ENUMERATED { * unspecified (0), * keyCompromise (1), * cACompromise (2), * affiliationChanged (3), * superseded (4), * cessationOfOperation (5), * certificateHold (6), * removeFromCRL (8) } */ # define OCSP_REVOKED_STATUS_NOSTATUS -1 # define OCSP_REVOKED_STATUS_UNSPECIFIED 0 # define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1 # define OCSP_REVOKED_STATUS_CACOMPROMISE 2 # define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3 # define OCSP_REVOKED_STATUS_SUPERSEDED 4 # define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5 # define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6 # define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8 # ifndef OPENSSL_NO_OCSP # include # include # include # include # include #ifdef __cplusplus extern "C" { #endif /* Various flags and values */ # define OCSP_DEFAULT_NONCE_LENGTH 16 # define OCSP_NOCERTS 0x1 # define OCSP_NOINTERN 0x2 # define OCSP_NOSIGS 0x4 # define OCSP_NOCHAIN 0x8 # define OCSP_NOVERIFY 0x10 # define OCSP_NOEXPLICIT 0x20 # define OCSP_NOCASIGN 0x40 # define OCSP_NODELEGATED 0x80 # define OCSP_NOCHECKS 0x100 # define OCSP_TRUSTOTHER 0x200 # define OCSP_RESPID_KEY 0x400 # define OCSP_NOTIME 0x800 typedef struct ocsp_cert_id_st OCSP_CERTID; DEFINE_STACK_OF(OCSP_CERTID) typedef struct ocsp_one_request_st OCSP_ONEREQ; DEFINE_STACK_OF(OCSP_ONEREQ) typedef struct ocsp_req_info_st OCSP_REQINFO; typedef struct ocsp_signature_st OCSP_SIGNATURE; typedef struct ocsp_request_st OCSP_REQUEST; # define OCSP_RESPONSE_STATUS_SUCCESSFUL 0 # define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1 # define OCSP_RESPONSE_STATUS_INTERNALERROR 2 # define OCSP_RESPONSE_STATUS_TRYLATER 3 # define OCSP_RESPONSE_STATUS_SIGREQUIRED 5 # define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6 typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES; # define V_OCSP_RESPID_NAME 0 # define V_OCSP_RESPID_KEY 1 DEFINE_STACK_OF(OCSP_RESPID) typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO; # define V_OCSP_CERTSTATUS_GOOD 0 # define V_OCSP_CERTSTATUS_REVOKED 1 # define V_OCSP_CERTSTATUS_UNKNOWN 2 typedef struct ocsp_cert_status_st OCSP_CERTSTATUS; typedef struct ocsp_single_response_st OCSP_SINGLERESP; DEFINE_STACK_OF(OCSP_SINGLERESP) typedef struct ocsp_response_data_st OCSP_RESPDATA; typedef struct ocsp_basic_response_st OCSP_BASICRESP; typedef struct ocsp_crl_id_st OCSP_CRLID; typedef struct ocsp_service_locator_st OCSP_SERVICELOC; # define PEM_STRING_OCSP_REQUEST "OCSP REQUEST" # define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE" # define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p) # define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p) # define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \ (char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST, \ bp,(char **)(x),cb,NULL) # define PEM_read_bio_OCSP_RESPONSE(bp,x,cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio(\ (char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE, \ bp,(char **)(x),cb,NULL) # define PEM_write_bio_OCSP_REQUEST(bp,o) \ PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\ bp,(char *)(o), NULL,NULL,0,NULL,NULL) # define PEM_write_bio_OCSP_RESPONSE(bp,o) \ PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\ bp,(char *)(o), NULL,NULL,0,NULL,NULL) # define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o) # define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o) # define ASN1_BIT_STRING_digest(data,type,md,len) \ ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len) # define OCSP_CERTSTATUS_dup(cs)\ (OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\ (char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs)) OCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id); OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req); OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, int maxline); int OCSP_REQ_CTX_nbio(OCSP_REQ_CTX *rctx); int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); OCSP_REQ_CTX *OCSP_REQ_CTX_new(BIO *io, int maxline); void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); void OCSP_set_max_response_length(OCSP_REQ_CTX *rctx, unsigned long len); int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const ASN1_ITEM *it, ASN1_VALUE *val); int OCSP_REQ_CTX_nbio_d2i(OCSP_REQ_CTX *rctx, ASN1_VALUE **pval, const ASN1_ITEM *it); BIO *OCSP_REQ_CTX_get0_mem_bio(OCSP_REQ_CTX *rctx); int OCSP_REQ_CTX_http(OCSP_REQ_CTX *rctx, const char *op, const char *path); int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req); int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, const char *name, const char *value); OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject, const X509 *issuer); OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, const X509_NAME *issuerName, const ASN1_BIT_STRING *issuerKey, const ASN1_INTEGER *serialNumber); OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid); int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len); int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len); int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs); int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req); int OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm); int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert); int OCSP_request_sign(OCSP_REQUEST *req, X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, STACK_OF(X509) *certs, unsigned long flags); int OCSP_response_status(OCSP_RESPONSE *resp); OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp); const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs); const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs); const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs); int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer, STACK_OF(X509) *extra_certs); int OCSP_resp_count(OCSP_BASICRESP *bs); OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx); const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs); const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs); int OCSP_resp_get0_id(const OCSP_BASICRESP *bs, const ASN1_OCTET_STRING **pid, const X509_NAME **pname); int OCSP_resp_get1_id(const OCSP_BASICRESP *bs, ASN1_OCTET_STRING **pid, X509_NAME **pname); int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last); int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, ASN1_GENERALIZEDTIME **revtime, ASN1_GENERALIZEDTIME **thisupd, ASN1_GENERALIZEDTIME **nextupd); int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status, int *reason, ASN1_GENERALIZEDTIME **revtime, ASN1_GENERALIZEDTIME **thisupd, ASN1_GENERALIZEDTIME **nextupd); int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec); int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, X509_STORE *store, unsigned long flags); int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath, int *pssl); int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b); int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b); int OCSP_request_onereq_count(OCSP_REQUEST *req); OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i); OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one); int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash, ASN1_INTEGER **pserial, OCSP_CERTID *cid); int OCSP_request_is_signed(OCSP_REQUEST *req); OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs); OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp, OCSP_CERTID *cid, int status, int reason, ASN1_TIME *revtime, ASN1_TIME *thisupd, ASN1_TIME *nextupd); int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert); int OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, STACK_OF(X509) *certs, unsigned long flags); int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp, X509 *signer, EVP_MD_CTX *ctx, STACK_OF(X509) *certs, unsigned long flags); int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert); int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert); int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert); X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim); X509_EXTENSION *OCSP_accept_responses_new(char **oids); X509_EXTENSION *OCSP_archive_cutoff_new(char *tim); X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, const char **urls); int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj, int lastpos); int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos); X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc); X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc); void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit, int *idx); int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit, unsigned long flags); int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc); int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x); int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos); int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos); int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos); X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc); X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc); void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx); int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit, unsigned long flags); int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc); int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x); int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos); int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj, int lastpos); int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, int lastpos); X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc); X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc); void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, int *idx); int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, int crit, unsigned long flags); int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc); int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x); int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos); int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj, int lastpos); int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, int lastpos); X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc); X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc); void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit, int *idx); int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, int crit, unsigned long flags); int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc); const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x); DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP) DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS) DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO) DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP) DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA) DECLARE_ASN1_FUNCTIONS(OCSP_RESPID) DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE) DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES) DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ) DECLARE_ASN1_FUNCTIONS(OCSP_CERTID) DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST) DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE) DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO) DECLARE_ASN1_FUNCTIONS(OCSP_CRLID) DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC) const char *OCSP_response_status_str(long s); const char *OCSP_cert_status_str(long s); const char *OCSP_crl_reason_str(long s); int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags); int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags); int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags); # ifdef __cplusplus } # endif # endif #endif PKZĥaopenssl/txt_db.hnu[/* * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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 * https://www.openssl.org/source/license.html */ #ifndef HEADER_TXT_DB_H # define HEADER_TXT_DB_H # include # include # include # include # define DB_ERROR_OK 0 # define DB_ERROR_MALLOC 1 # define DB_ERROR_INDEX_CLASH 2 # define DB_ERROR_INDEX_OUT_OF_RANGE 3 # define DB_ERROR_NO_INDEX 4 # define DB_ERROR_INSERT_INDEX_CLASH 5 # define DB_ERROR_WRONG_NUM_FIELDS 6 #ifdef __cplusplus extern "C" { #endif typedef OPENSSL_STRING *OPENSSL_PSTRING; DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) typedef struct txt_db_st { int num_fields; STACK_OF(OPENSSL_PSTRING) *data; LHASH_OF(OPENSSL_STRING) **index; int (**qual) (OPENSSL_STRING *); long error; long arg1; long arg2; OPENSSL_STRING *arg_row; } TXT_DB; TXT_DB *TXT_DB_read(BIO *in, int num); long TXT_DB_write(BIO *out, TXT_DB *db); int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *), OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp); void TXT_DB_free(TXT_DB *db); OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value); int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); #ifdef __cplusplus } #endif #endif PKZ^= = lzma/stream_flags.hnu[/** * \file lzma/stream_flags.h * \brief .xz Stream Header and Stream Footer encoder and decoder */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Size of Stream Header and Stream Footer * * Stream Header and Stream Footer have the same size and they are not * going to change even if a newer version of the .xz file format is * developed in future. */ #define LZMA_STREAM_HEADER_SIZE 12 /** * \brief Options for encoding/decoding Stream Header and Stream Footer */ typedef struct { /** * \brief Stream Flags format version * * To prevent API and ABI breakages if new features are needed in * Stream Header or Stream Footer, a version number is used to * indicate which fields in this structure are in use. For now, * version must always be zero. With non-zero version, the * lzma_stream_header_encode() and lzma_stream_footer_encode() * will return LZMA_OPTIONS_ERROR. * * lzma_stream_header_decode() and lzma_stream_footer_decode() * will always set this to the lowest value that supports all the * features indicated by the Stream Flags field. The application * must check that the version number set by the decoding functions * is supported by the application. Otherwise it is possible that * the application will decode the Stream incorrectly. */ uint32_t version; /** * \brief Backward Size * * Backward Size must be a multiple of four bytes. In this Stream * format version, Backward Size is the size of the Index field. * * Backward Size isn't actually part of the Stream Flags field, but * it is convenient to include in this structure anyway. Backward * Size is present only in the Stream Footer. There is no need to * initialize backward_size when encoding Stream Header. * * lzma_stream_header_decode() always sets backward_size to * LZMA_VLI_UNKNOWN so that it is convenient to use * lzma_stream_flags_compare() when both Stream Header and Stream * Footer have been decoded. */ lzma_vli backward_size; # define LZMA_BACKWARD_SIZE_MIN 4 # define LZMA_BACKWARD_SIZE_MAX (LZMA_VLI_C(1) << 34) /** * \brief Check ID * * This indicates the type of the integrity check calculated from * uncompressed data. */ lzma_check check; /* * Reserved space to allow possible future extensions without * breaking the ABI. You should not touch these, because the * names of these variables may change. * * (We will never be able to use all of these since Stream Flags * is just two bytes plus Backward Size of four bytes. But it's * nice to have the proper types when they are needed.) */ lzma_reserved_enum reserved_enum1; lzma_reserved_enum reserved_enum2; lzma_reserved_enum reserved_enum3; lzma_reserved_enum reserved_enum4; lzma_bool reserved_bool1; lzma_bool reserved_bool2; lzma_bool reserved_bool3; lzma_bool reserved_bool4; lzma_bool reserved_bool5; lzma_bool reserved_bool6; lzma_bool reserved_bool7; lzma_bool reserved_bool8; uint32_t reserved_int1; uint32_t reserved_int2; } lzma_stream_flags; /** * \brief Encode Stream Header * * \param options Stream Header options to be encoded. * options->backward_size is ignored and doesn't * need to be initialized. * \param out Beginning of the output buffer of * LZMA_STREAM_HEADER_SIZE bytes. * * \return - LZMA_OK: Encoding was successful. * - LZMA_OPTIONS_ERROR: options->version is not supported by * this liblzma version. * - LZMA_PROG_ERROR: Invalid options. */ extern LZMA_API(lzma_ret) lzma_stream_header_encode( const lzma_stream_flags *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Encode Stream Footer * * \param options Stream Footer options to be encoded. * \param out Beginning of the output buffer of * LZMA_STREAM_HEADER_SIZE bytes. * * \return - LZMA_OK: Encoding was successful. * - LZMA_OPTIONS_ERROR: options->version is not supported by * this liblzma version. * - LZMA_PROG_ERROR: Invalid options. */ extern LZMA_API(lzma_ret) lzma_stream_footer_encode( const lzma_stream_flags *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Decode Stream Header * * \param options Target for the decoded Stream Header options. * \param in Beginning of the input buffer of * LZMA_STREAM_HEADER_SIZE bytes. * * options->backward_size is always set to LZMA_VLI_UNKNOWN. This is to * help comparing Stream Flags from Stream Header and Stream Footer with * lzma_stream_flags_compare(). * * \return - LZMA_OK: Decoding was successful. * - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given * buffer cannot be Stream Header. * - LZMA_DATA_ERROR: CRC32 doesn't match, thus the header * is corrupt. * - LZMA_OPTIONS_ERROR: Unsupported options are present * in the header. * * \note When decoding .xz files that contain multiple Streams, it may * make sense to print "file format not recognized" only if * decoding of the Stream Header of the _first_ Stream gives * LZMA_FORMAT_ERROR. If non-first Stream Header gives * LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is * probably more appropriate. * * For example, Stream decoder in liblzma uses LZMA_DATA_ERROR if * LZMA_FORMAT_ERROR is returned by lzma_stream_header_decode() * when decoding non-first Stream. */ extern LZMA_API(lzma_ret) lzma_stream_header_decode( lzma_stream_flags *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Decode Stream Footer * * \param options Target for the decoded Stream Header options. * \param in Beginning of the input buffer of * LZMA_STREAM_HEADER_SIZE bytes. * * \return - LZMA_OK: Decoding was successful. * - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given * buffer cannot be Stream Footer. * - LZMA_DATA_ERROR: CRC32 doesn't match, thus the Stream Footer * is corrupt. * - LZMA_OPTIONS_ERROR: Unsupported options are present * in Stream Footer. * * \note If Stream Header was already decoded successfully, but * decoding Stream Footer returns LZMA_FORMAT_ERROR, the * application should probably report some other error message * than "file format not recognized", since the file more likely * is corrupt (possibly truncated). Stream decoder in liblzma * uses LZMA_DATA_ERROR in this situation. */ extern LZMA_API(lzma_ret) lzma_stream_footer_decode( lzma_stream_flags *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Compare two lzma_stream_flags structures * * backward_size values are compared only if both are not * LZMA_VLI_UNKNOWN. * * \return - LZMA_OK: Both are equal. If either had backward_size set * to LZMA_VLI_UNKNOWN, backward_size values were not * compared or validated. * - LZMA_DATA_ERROR: The structures differ. * - LZMA_OPTIONS_ERROR: version in either structure is greater * than the maximum supported version (currently zero). * - LZMA_PROG_ERROR: Invalid value, e.g. invalid check or * backward_size. */ extern LZMA_API(lzma_ret) lzma_stream_flags_compare( const lzma_stream_flags *a, const lzma_stream_flags *b) lzma_nothrow lzma_attr_pure; PKZ Caa lzma/base.hnu[/** * \file lzma/base.h * \brief Data types and functions used in many places in liblzma API */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Boolean * * This is here because C89 doesn't have stdbool.h. To set a value for * variables having type lzma_bool, you can use * - C99's `true' and `false' from stdbool.h; * - C++'s internal `true' and `false'; or * - integers one (true) and zero (false). */ typedef unsigned char lzma_bool; /** * \brief Type of reserved enumeration variable in structures * * To avoid breaking library ABI when new features are added, several * structures contain extra variables that may be used in future. Since * sizeof(enum) can be different than sizeof(int), and sizeof(enum) may * even vary depending on the range of enumeration constants, we specify * a separate type to be used for reserved enumeration variables. All * enumeration constants in liblzma API will be non-negative and less * than 128, which should guarantee that the ABI won't break even when * new constants are added to existing enumerations. */ typedef enum { LZMA_RESERVED_ENUM = 0 } lzma_reserved_enum; /** * \brief Return values used by several functions in liblzma * * Check the descriptions of specific functions to find out which return * values they can return. With some functions the return values may have * more specific meanings than described here; those differences are * described per-function basis. */ typedef enum { LZMA_OK = 0, /**< * \brief Operation completed successfully */ LZMA_STREAM_END = 1, /**< * \brief End of stream was reached * * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or * LZMA_FINISH was finished. In decoder, this indicates * that all the data was successfully decoded. * * In all cases, when LZMA_STREAM_END is returned, the last * output bytes should be picked from strm->next_out. */ LZMA_NO_CHECK = 2, /**< * \brief Input stream has no integrity check * * This return value can be returned only if the * LZMA_TELL_NO_CHECK flag was used when initializing * the decoder. LZMA_NO_CHECK is just a warning, and * the decoding can be continued normally. * * It is possible to call lzma_get_check() immediately after * lzma_code has returned LZMA_NO_CHECK. The result will * naturally be LZMA_CHECK_NONE, but the possibility to call * lzma_get_check() may be convenient in some applications. */ LZMA_UNSUPPORTED_CHECK = 3, /**< * \brief Cannot calculate the integrity check * * The usage of this return value is different in encoders * and decoders. * * Encoders can return this value only from the initialization * function. If initialization fails with this value, the * encoding cannot be done, because there's no way to produce * output with the correct integrity check. * * Decoders can return this value only from lzma_code() and * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when * initializing the decoder. The decoding can still be * continued normally even if the check type is unsupported, * but naturally the check will not be validated, and possible * errors may go undetected. * * With decoder, it is possible to call lzma_get_check() * immediately after lzma_code() has returned * LZMA_UNSUPPORTED_CHECK. This way it is possible to find * out what the unsupported Check ID was. */ LZMA_GET_CHECK = 4, /**< * \brief Integrity check type is now available * * This value can be returned only by the lzma_code() function * and only if the decoder was initialized with the * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the * application that it may now call lzma_get_check() to find * out the Check ID. This can be used, for example, to * implement a decoder that accepts only files that have * strong enough integrity check. */ LZMA_MEM_ERROR = 5, /**< * \brief Cannot allocate memory * * Memory allocation failed, or the size of the allocation * would be greater than SIZE_MAX. * * Due to internal implementation reasons, the coding cannot * be continued even if more memory were made available after * LZMA_MEM_ERROR. */ LZMA_MEMLIMIT_ERROR = 6, /** * \brief Memory usage limit was reached * * Decoder would need more memory than allowed by the * specified memory usage limit. To continue decoding, * the memory usage limit has to be increased with * lzma_memlimit_set(). */ LZMA_FORMAT_ERROR = 7, /**< * \brief File format not recognized * * The decoder did not recognize the input as supported file * format. This error can occur, for example, when trying to * decode .lzma format file with lzma_stream_decoder, * because lzma_stream_decoder accepts only the .xz format. */ LZMA_OPTIONS_ERROR = 8, /**< * \brief Invalid or unsupported options * * Invalid or unsupported options, for example * - unsupported filter(s) or filter options; or * - reserved bits set in headers (decoder only). * * Rebuilding liblzma with more features enabled, or * upgrading to a newer version of liblzma may help. */ LZMA_DATA_ERROR = 9, /**< * \brief Data is corrupt * * The usage of this return value is different in encoders * and decoders. In both encoder and decoder, the coding * cannot continue after this error. * * Encoders return this if size limits of the target file * format would be exceeded. These limits are huge, thus * getting this error from an encoder is mostly theoretical. * For example, the maximum compressed and uncompressed * size of a .xz Stream is roughly 8 EiB (2^63 bytes). * * Decoders return this error if the input data is corrupt. * This can mean, for example, invalid CRC32 in headers * or invalid check of uncompressed data. */ LZMA_BUF_ERROR = 10, /**< * \brief No progress is possible * * This error code is returned when the coder cannot consume * any new input and produce any new output. The most common * reason for this error is that the input stream being * decoded is truncated or corrupt. * * This error is not fatal. Coding can be continued normally * by providing more input and/or more output space, if * possible. * * Typically the first call to lzma_code() that can do no * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only * the second consecutive call doing no progress will return * LZMA_BUF_ERROR. This is intentional. * * With zlib, Z_BUF_ERROR may be returned even if the * application is doing nothing wrong, so apps will need * to handle Z_BUF_ERROR specially. The above hack * guarantees that liblzma never returns LZMA_BUF_ERROR * to properly written applications unless the input file * is truncated or corrupt. This should simplify the * applications a little. */ LZMA_PROG_ERROR = 11, /**< * \brief Programming error * * This indicates that the arguments given to the function are * invalid or the internal state of the decoder is corrupt. * - Function arguments are invalid or the structures * pointed by the argument pointers are invalid * e.g. if strm->next_out has been set to NULL and * strm->avail_out > 0 when calling lzma_code(). * - lzma_* functions have been called in wrong order * e.g. lzma_code() was called right after lzma_end(). * - If errors occur randomly, the reason might be flaky * hardware. * * If you think that your code is correct, this error code * can be a sign of a bug in liblzma. See the documentation * how to report bugs. */ } lzma_ret; /** * \brief The `action' argument for lzma_code() * * After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER, * or LZMA_FINISH, the same `action' must is used until lzma_code() returns * LZMA_STREAM_END. Also, the amount of input (that is, strm->avail_in) must * not be modified by the application until lzma_code() returns * LZMA_STREAM_END. Changing the `action' or modifying the amount of input * will make lzma_code() return LZMA_PROG_ERROR. */ typedef enum { LZMA_RUN = 0, /**< * \brief Continue coding * * Encoder: Encode as much input as possible. Some internal * buffering will probably be done (depends on the filter * chain in use), which causes latency: the input used won't * usually be decodeable from the output of the same * lzma_code() call. * * Decoder: Decode as much input as possible and produce as * much output as possible. */ LZMA_SYNC_FLUSH = 1, /**< * \brief Make all the input available at output * * Normally the encoder introduces some latency. * LZMA_SYNC_FLUSH forces all the buffered data to be * available at output without resetting the internal * state of the encoder. This way it is possible to use * compressed stream for example for communication over * network. * * Only some filters support LZMA_SYNC_FLUSH. Trying to use * LZMA_SYNC_FLUSH with filters that don't support it will * make lzma_code() return LZMA_OPTIONS_ERROR. For example, * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does. * * Using LZMA_SYNC_FLUSH very often can dramatically reduce * the compression ratio. With some filters (for example, * LZMA2), fine-tuning the compression options may help * mitigate this problem significantly (for example, * match finder with LZMA2). * * Decoders don't support LZMA_SYNC_FLUSH. */ LZMA_FULL_FLUSH = 2, /**< * \brief Finish encoding of the current Block * * All the input data going to the current Block must have * been given to the encoder (the last bytes can still be * pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH * until it returns LZMA_STREAM_END. Then continue normally * with LZMA_RUN or finish the Stream with LZMA_FINISH. * * This action is currently supported only by Stream encoder * and easy encoder (which uses Stream encoder). If there is * no unfinished Block, no empty Block is created. */ LZMA_FULL_BARRIER = 4, /**< * \brief Finish encoding of the current Block * * This is like LZMA_FULL_FLUSH except that this doesn't * necessarily wait until all the input has been made * available via the output buffer. That is, lzma_code() * might return LZMA_STREAM_END as soon as all the input * has been consumed (avail_in == 0). * * LZMA_FULL_BARRIER is useful with a threaded encoder if * one wants to split the .xz Stream into Blocks at specific * offsets but doesn't care if the output isn't flushed * immediately. Using LZMA_FULL_BARRIER allows keeping * the threads busy while LZMA_FULL_FLUSH would make * lzma_code() wait until all the threads have finished * until more data could be passed to the encoder. * * With a lzma_stream initialized with the single-threaded * lzma_stream_encoder() or lzma_easy_encoder(), * LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH. */ LZMA_FINISH = 3 /**< * \brief Finish the coding operation * * All the input data must have been given to the encoder * (the last bytes can still be pending in next_in). * Call lzma_code() with LZMA_FINISH until it returns * LZMA_STREAM_END. Once LZMA_FINISH has been used, * the amount of input must no longer be changed by * the application. * * When decoding, using LZMA_FINISH is optional unless the * LZMA_CONCATENATED flag was used when the decoder was * initialized. When LZMA_CONCATENATED was not used, the only * effect of LZMA_FINISH is that the amount of input must not * be changed just like in the encoder. */ } lzma_action; /** * \brief Custom functions for memory handling * * A pointer to lzma_allocator may be passed via lzma_stream structure * to liblzma, and some advanced functions take a pointer to lzma_allocator * as a separate function argument. The library will use the functions * specified in lzma_allocator for memory handling instead of the default * malloc() and free(). C++ users should note that the custom memory * handling functions must not throw exceptions. * * Single-threaded mode only: liblzma doesn't make an internal copy of * lzma_allocator. Thus, it is OK to change these function pointers in * the middle of the coding process, but obviously it must be done * carefully to make sure that the replacement `free' can deallocate * memory allocated by the earlier `alloc' function(s). * * Multithreaded mode: liblzma might internally store pointers to the * lzma_allocator given via the lzma_stream structure. The application * must not change the allocator pointer in lzma_stream or the contents * of the pointed lzma_allocator structure until lzma_end() has been used * to free the memory associated with that lzma_stream. The allocation * functions might be called simultaneously from multiple threads, and * thus they must be thread safe. */ typedef struct { /** * \brief Pointer to a custom memory allocation function * * If you don't want a custom allocator, but still want * custom free(), set this to NULL and liblzma will use * the standard malloc(). * * \param opaque lzma_allocator.opaque (see below) * \param nmemb Number of elements like in calloc(). liblzma * will always set nmemb to 1, so it is safe to * ignore nmemb in a custom allocator if you like. * The nmemb argument exists only for * compatibility with zlib and libbzip2. * \param size Size of an element in bytes. * liblzma never sets this to zero. * * \return Pointer to the beginning of a memory block of * `size' bytes, or NULL if allocation fails * for some reason. When allocation fails, functions * of liblzma return LZMA_MEM_ERROR. * * The allocator should not waste time zeroing the allocated buffers. * This is not only about speed, but also memory usage, since the * operating system kernel doesn't necessarily allocate the requested * memory in physical memory until it is actually used. With small * input files, liblzma may actually need only a fraction of the * memory that it requested for allocation. * * \note LZMA_MEM_ERROR is also used when the size of the * allocation would be greater than SIZE_MAX. Thus, * don't assume that the custom allocator must have * returned NULL if some function from liblzma * returns LZMA_MEM_ERROR. */ void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size); /** * \brief Pointer to a custom memory freeing function * * If you don't want a custom freeing function, but still * want a custom allocator, set this to NULL and liblzma * will use the standard free(). * * \param opaque lzma_allocator.opaque (see below) * \param ptr Pointer returned by lzma_allocator.alloc(), * or when it is set to NULL, a pointer returned * by the standard malloc(). */ void (LZMA_API_CALL *free)(void *opaque, void *ptr); /** * \brief Pointer passed to .alloc() and .free() * * opaque is passed as the first argument to lzma_allocator.alloc() * and lzma_allocator.free(). This intended to ease implementing * custom memory allocation functions for use with liblzma. * * If you don't need this, you should set this to NULL. */ void *opaque; } lzma_allocator; /** * \brief Internal data structure * * The contents of this structure is not visible outside the library. */ typedef struct lzma_internal_s lzma_internal; /** * \brief Passing data to and from liblzma * * The lzma_stream structure is used for * - passing pointers to input and output buffers to liblzma; * - defining custom memory hander functions; and * - holding a pointer to coder-specific internal data structures. * * Typical usage: * * - After allocating lzma_stream (on stack or with malloc()), it must be * initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details). * * - Initialize a coder to the lzma_stream, for example by using * lzma_easy_encoder() or lzma_auto_decoder(). Some notes: * - In contrast to zlib, strm->next_in and strm->next_out are * ignored by all initialization functions, thus it is safe * to not initialize them yet. * - The initialization functions always set strm->total_in and * strm->total_out to zero. * - If the initialization function fails, no memory is left allocated * that would require freeing with lzma_end() even if some memory was * associated with the lzma_stream structure when the initialization * function was called. * * - Use lzma_code() to do the actual work. * * - Once the coding has been finished, the existing lzma_stream can be * reused. It is OK to reuse lzma_stream with different initialization * function without calling lzma_end() first. Old allocations are * automatically freed. * * - Finally, use lzma_end() to free the allocated memory. lzma_end() never * frees the lzma_stream structure itself. * * Application may modify the values of total_in and total_out as it wants. * They are updated by liblzma to match the amount of data read and * written but aren't used for anything else except as a possible return * values from lzma_get_progress(). */ typedef struct { const uint8_t *next_in; /**< Pointer to the next input byte. */ size_t avail_in; /**< Number of available input bytes in next_in. */ uint64_t total_in; /**< Total number of bytes read by liblzma. */ uint8_t *next_out; /**< Pointer to the next output position. */ size_t avail_out; /**< Amount of free space in next_out. */ uint64_t total_out; /**< Total number of bytes written by liblzma. */ /** * \brief Custom memory allocation functions * * In most cases this is NULL which makes liblzma use * the standard malloc() and free(). * * \note In 5.0.x this is not a const pointer. */ const lzma_allocator *allocator; /** Internal state is not visible to applications. */ lzma_internal *internal; /* * Reserved space to allow possible future extensions without * breaking the ABI. Excluding the initialization of this structure, * you should not touch these, because the names of these variables * may change. */ void *reserved_ptr1; void *reserved_ptr2; void *reserved_ptr3; void *reserved_ptr4; uint64_t reserved_int1; uint64_t reserved_int2; size_t reserved_int3; size_t reserved_int4; lzma_reserved_enum reserved_enum1; lzma_reserved_enum reserved_enum2; } lzma_stream; /** * \brief Initialization for lzma_stream * * When you declare an instance of lzma_stream, you can immediately * initialize it so that initialization functions know that no memory * has been allocated yet: * * lzma_stream strm = LZMA_STREAM_INIT; * * If you need to initialize a dynamically allocated lzma_stream, you can use * memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this * violates the C standard since NULL may have different internal * representation than zero, but it should be portable enough in practice. * Anyway, for maximum portability, you can use something like this: * * lzma_stream tmp = LZMA_STREAM_INIT; * *strm = tmp; */ #define LZMA_STREAM_INIT \ { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \ NULL, NULL, NULL, NULL, 0, 0, 0, 0, \ LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM } /** * \brief Encode or decode data * * Once the lzma_stream has been successfully initialized (e.g. with * lzma_stream_encoder()), the actual encoding or decoding is done * using this function. The application has to update strm->next_in, * strm->avail_in, strm->next_out, and strm->avail_out to pass input * to and get output from liblzma. * * See the description of the coder-specific initialization function to find * out what `action' values are supported by the coder. */ extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Free memory allocated for the coder data structures * * \param strm Pointer to lzma_stream that is at least initialized * with LZMA_STREAM_INIT. * * After lzma_end(strm), strm->internal is guaranteed to be NULL. No other * members of the lzma_stream structure are touched. * * \note zlib indicates an error if application end()s unfinished * stream structure. liblzma doesn't do this, and assumes that * application knows what it is doing. */ extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow; /** * \brief Get progress information * * In single-threaded mode, applications can get progress information from * strm->total_in and strm->total_out. In multi-threaded mode this is less * useful because a significant amount of both input and output data gets * buffered internally by liblzma. This makes total_in and total_out give * misleading information and also makes the progress indicator updates * non-smooth. * * This function gives realistic progress information also in multi-threaded * mode by taking into account the progress made by each thread. In * single-threaded mode *progress_in and *progress_out are set to * strm->total_in and strm->total_out, respectively. */ extern LZMA_API(void) lzma_get_progress(lzma_stream *strm, uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow; /** * \brief Get the memory usage of decoder filter chain * * This function is currently supported only when *strm has been initialized * with a function that takes a memlimit argument. With other functions, you * should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage() * to estimate the memory requirements. * * This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big * the memory usage limit should have been to decode the input. Note that * this may give misleading information if decoding .xz Streams that have * multiple Blocks, because each Block can have different memory requirements. * * \return How much memory is currently allocated for the filter * decoders. If no filter chain is currently allocated, * some non-zero value is still returned, which is less than * or equal to what any filter chain would indicate as its * memory requirement. * * If this function isn't supported by *strm or some other error * occurs, zero is returned. */ extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm) lzma_nothrow lzma_attr_pure; /** * \brief Get the current memory usage limit * * This function is supported only when *strm has been initialized with * a function that takes a memlimit argument. * * \return On success, the current memory usage limit is returned * (always non-zero). On error, zero is returned. */ extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm) lzma_nothrow lzma_attr_pure; /** * \brief Set the memory usage limit * * This function is supported only when *strm has been initialized with * a function that takes a memlimit argument. * * liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes * this function to do nothing (leaving the limit unchanged) and still * return LZMA_OK. Later versions treat 0 as if 1 had been specified (so * lzma_memlimit_get() will return 1 even if you specify 0 here). * * \return - LZMA_OK: New memory usage limit successfully set. * - LZMA_MEMLIMIT_ERROR: The new limit is too small. * The limit was not changed. * - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't * support memory usage limit. */ extern LZMA_API(lzma_ret) lzma_memlimit_set( lzma_stream *strm, uint64_t memlimit) lzma_nothrow; PKZ-?X lzma/vli.hnu[/** * \file lzma/vli.h * \brief Variable-length integer handling * * In the .xz format, most integers are encoded in a variable-length * representation, which is sometimes called little endian base-128 encoding. * This saves space when smaller values are more likely than bigger values. * * The encoding scheme encodes seven bits to every byte, using minimum * number of bytes required to represent the given value. Encodings that use * non-minimum number of bytes are invalid, thus every integer has exactly * one encoded representation. The maximum number of bits in a VLI is 63, * thus the vli argument must be less than or equal to UINT64_MAX / 2. You * should use LZMA_VLI_MAX for clarity. */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Maximum supported value of a variable-length integer */ #define LZMA_VLI_MAX (UINT64_MAX / 2) /** * \brief VLI value to denote that the value is unknown */ #define LZMA_VLI_UNKNOWN UINT64_MAX /** * \brief Maximum supported encoded length of variable length integers */ #define LZMA_VLI_BYTES_MAX 9 /** * \brief VLI constant suffix */ #define LZMA_VLI_C(n) UINT64_C(n) /** * \brief Variable-length integer type * * Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is * indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the * underlaying integer type. * * lzma_vli will be uint64_t for the foreseeable future. If a bigger size * is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will * not overflow lzma_vli. This simplifies integer overflow detection. */ typedef uint64_t lzma_vli; /** * \brief Validate a variable-length integer * * This is useful to test that application has given acceptable values * for example in the uncompressed_size and compressed_size variables. * * \return True if the integer is representable as VLI or if it * indicates unknown value. */ #define lzma_vli_is_valid(vli) \ ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN) /** * \brief Encode a variable-length integer * * This function has two modes: single-call and multi-call. Single-call mode * encodes the whole integer at once; it is an error if the output buffer is * too small. Multi-call mode saves the position in *vli_pos, and thus it is * possible to continue encoding if the buffer becomes full before the whole * integer has been encoded. * * \param vli Integer to be encoded * \param vli_pos How many VLI-encoded bytes have already been written * out. When starting to encode a new integer in * multi-call mode, *vli_pos must be set to zero. * To use single-call encoding, set vli_pos to NULL. * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return Slightly different return values are used in multi-call and * single-call modes. * * Single-call (vli_pos == NULL): * - LZMA_OK: Integer successfully encoded. * - LZMA_PROG_ERROR: Arguments are not sane. This can be due * to too little output space; single-call mode doesn't use * LZMA_BUF_ERROR, since the application should have checked * the encoded size with lzma_vli_size(). * * Multi-call (vli_pos != NULL): * - LZMA_OK: So far all OK, but the integer is not * completely written out yet. * - LZMA_STREAM_END: Integer successfully encoded. * - LZMA_BUF_ERROR: No output space was provided. * - LZMA_PROG_ERROR: Arguments are not sane. */ extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; /** * \brief Decode a variable-length integer * * Like lzma_vli_encode(), this function has single-call and multi-call modes. * * \param vli Pointer to decoded integer. The decoder will * initialize it to zero when *vli_pos == 0, so * application isn't required to initialize *vli. * \param vli_pos How many bytes have already been decoded. When * starting to decode a new integer in multi-call * mode, *vli_pos must be initialized to zero. To * use single-call decoding, set vli_pos to NULL. * \param in Beginning of the input buffer * \param in_pos The next byte will be read from in[*in_pos]. * \param in_size Size of the input buffer; the first byte that * won't be read is in[in_size]. * * \return Slightly different return values are used in multi-call and * single-call modes. * * Single-call (vli_pos == NULL): * - LZMA_OK: Integer successfully decoded. * - LZMA_DATA_ERROR: Integer is corrupt. This includes hitting * the end of the input buffer before the whole integer was * decoded; providing no input at all will use LZMA_DATA_ERROR. * - LZMA_PROG_ERROR: Arguments are not sane. * * Multi-call (vli_pos != NULL): * - LZMA_OK: So far all OK, but the integer is not * completely decoded yet. * - LZMA_STREAM_END: Integer successfully decoded. * - LZMA_DATA_ERROR: Integer is corrupt. * - LZMA_BUF_ERROR: No input was provided. * - LZMA_PROG_ERROR: Arguments are not sane. */ extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow; /** * \brief Get the number of bytes required to encode a VLI * * \return Number of bytes on success (1-9). If vli isn't valid, * zero is returned. */ extern LZMA_API(uint32_t) lzma_vli_size(lzma_vli vli) lzma_nothrow lzma_attr_pure; PKZpZVZV lzma/block.hnu[/** * \file lzma/block.h * \brief .xz Block handling */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Options for the Block and Block Header encoders and decoders * * Different Block handling functions use different parts of this structure. * Some read some members, other functions write, and some do both. Only the * members listed for reading need to be initialized when the specified * functions are called. The members marked for writing will be assigned * new values at some point either by calling the given function or by * later calls to lzma_code(). */ typedef struct { /** * \brief Block format version * * To prevent API and ABI breakages when new features are needed, * a version number is used to indicate which fields in this * structure are in use: * - liblzma >= 5.0.0: version = 0 is supported. * - liblzma >= 5.1.4beta: Support for version = 1 was added, * which adds the ignore_check field. * * If version is greater than one, most Block related functions * will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works * with any version value). * * Read by: * - All functions that take pointer to lzma_block as argument, * including lzma_block_header_decode(). * * Written by: * - lzma_block_header_decode() */ uint32_t version; /** * \brief Size of the Block Header field * * This is always a multiple of four. * * Read by: * - lzma_block_header_encode() * - lzma_block_header_decode() * - lzma_block_compressed_size() * - lzma_block_unpadded_size() * - lzma_block_total_size() * - lzma_block_decoder() * - lzma_block_buffer_decode() * * Written by: * - lzma_block_header_size() * - lzma_block_buffer_encode() */ uint32_t header_size; # define LZMA_BLOCK_HEADER_SIZE_MIN 8 # define LZMA_BLOCK_HEADER_SIZE_MAX 1024 /** * \brief Type of integrity Check * * The Check ID is not stored into the Block Header, thus its value * must be provided also when decoding. * * Read by: * - lzma_block_header_encode() * - lzma_block_header_decode() * - lzma_block_compressed_size() * - lzma_block_unpadded_size() * - lzma_block_total_size() * - lzma_block_encoder() * - lzma_block_decoder() * - lzma_block_buffer_encode() * - lzma_block_buffer_decode() */ lzma_check check; /** * \brief Size of the Compressed Data in bytes * * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder * will store this value to the Block Header. Block encoder doesn't * care about this value, but will set it once the encoding has been * finished. * * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will * verify that the size of the Compressed Data field matches * compressed_size. * * Usually you don't know this value when encoding in streamed mode, * and thus cannot write this field into the Block Header. * * In non-streamed mode you can reserve space for this field before * encoding the actual Block. After encoding the data, finish the * Block by encoding the Block Header. Steps in detail: * * - Set compressed_size to some big enough value. If you don't know * better, use LZMA_VLI_MAX, but remember that bigger values take * more space in Block Header. * * - Call lzma_block_header_size() to see how much space you need to * reserve for the Block Header. * * - Encode the Block using lzma_block_encoder() and lzma_code(). * It sets compressed_size to the correct value. * * - Use lzma_block_header_encode() to encode the Block Header. * Because space was reserved in the first step, you don't need * to call lzma_block_header_size() anymore, because due to * reserving, header_size has to be big enough. If it is "too big", * lzma_block_header_encode() will add enough Header Padding to * make Block Header to match the size specified by header_size. * * Read by: * - lzma_block_header_size() * - lzma_block_header_encode() * - lzma_block_compressed_size() * - lzma_block_unpadded_size() * - lzma_block_total_size() * - lzma_block_decoder() * - lzma_block_buffer_decode() * * Written by: * - lzma_block_header_decode() * - lzma_block_compressed_size() * - lzma_block_encoder() * - lzma_block_decoder() * - lzma_block_buffer_encode() * - lzma_block_buffer_decode() */ lzma_vli compressed_size; /** * \brief Uncompressed Size in bytes * * This is handled very similarly to compressed_size above. * * uncompressed_size is needed by fewer functions than * compressed_size. This is because uncompressed_size isn't * needed to validate that Block stays within proper limits. * * Read by: * - lzma_block_header_size() * - lzma_block_header_encode() * - lzma_block_decoder() * - lzma_block_buffer_decode() * * Written by: * - lzma_block_header_decode() * - lzma_block_encoder() * - lzma_block_decoder() * - lzma_block_buffer_encode() * - lzma_block_buffer_decode() */ lzma_vli uncompressed_size; /** * \brief Array of filters * * There can be 1-4 filters. The end of the array is marked with * .id = LZMA_VLI_UNKNOWN. * * Read by: * - lzma_block_header_size() * - lzma_block_header_encode() * - lzma_block_encoder() * - lzma_block_decoder() * - lzma_block_buffer_encode() * - lzma_block_buffer_decode() * * Written by: * - lzma_block_header_decode(): Note that this does NOT free() * the old filter options structures. All unused filters[] will * have .id == LZMA_VLI_UNKNOWN and .options == NULL. If * decoding fails, all filters[] are guaranteed to be * LZMA_VLI_UNKNOWN and NULL. * * \note Because of the array is terminated with * .id = LZMA_VLI_UNKNOWN, the actual array must * have LZMA_FILTERS_MAX + 1 members or the Block * Header decoder will overflow the buffer. */ lzma_filter *filters; /** * \brief Raw value stored in the Check field * * After successful coding, the first lzma_check_size(check) bytes * of this array contain the raw value stored in the Check field. * * Note that CRC32 and CRC64 are stored in little endian byte order. * Take it into account if you display the Check values to the user. * * Written by: * - lzma_block_encoder() * - lzma_block_decoder() * - lzma_block_buffer_encode() * - lzma_block_buffer_decode() */ uint8_t raw_check[LZMA_CHECK_SIZE_MAX]; /* * Reserved space to allow possible future extensions without * breaking the ABI. You should not touch these, because the names * of these variables may change. These are and will never be used * with the currently supported options, so it is safe to leave these * uninitialized. */ void *reserved_ptr1; void *reserved_ptr2; void *reserved_ptr3; uint32_t reserved_int1; uint32_t reserved_int2; lzma_vli reserved_int3; lzma_vli reserved_int4; lzma_vli reserved_int5; lzma_vli reserved_int6; lzma_vli reserved_int7; lzma_vli reserved_int8; lzma_reserved_enum reserved_enum1; lzma_reserved_enum reserved_enum2; lzma_reserved_enum reserved_enum3; lzma_reserved_enum reserved_enum4; /** * \brief A flag to Block decoder to not verify the Check field * * This field is supported by liblzma >= 5.1.4beta if .version >= 1. * * If this is set to true, the integrity check won't be calculated * and verified. Unless you know what you are doing, you should * leave this to false. (A reason to set this to true is when the * file integrity is verified externally anyway and you want to * speed up the decompression, which matters mostly when using * SHA-256 as the integrity check.) * * If .version >= 1, read by: * - lzma_block_decoder() * - lzma_block_buffer_decode() * * Written by (.version is ignored): * - lzma_block_header_decode() always sets this to false */ lzma_bool ignore_check; lzma_bool reserved_bool2; lzma_bool reserved_bool3; lzma_bool reserved_bool4; lzma_bool reserved_bool5; lzma_bool reserved_bool6; lzma_bool reserved_bool7; lzma_bool reserved_bool8; } lzma_block; /** * \brief Decode the Block Header Size field * * To decode Block Header using lzma_block_header_decode(), the size of the * Block Header has to be known and stored into lzma_block.header_size. * The size can be calculated from the first byte of a Block using this macro. * Note that if the first byte is 0x00, it indicates beginning of Index; use * this macro only when the byte is not 0x00. * * There is no encoding macro, because Block Header encoder is enough for that. */ #define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4) /** * \brief Calculate Block Header Size * * Calculate the minimum size needed for the Block Header field using the * settings specified in the lzma_block structure. Note that it is OK to * increase the calculated header_size value as long as it is a multiple of * four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size * just means that lzma_block_header_encode() will add Header Padding. * * \return - LZMA_OK: Size calculated successfully and stored to * block->header_size. * - LZMA_OPTIONS_ERROR: Unsupported version, filters or * filter options. * - LZMA_PROG_ERROR: Invalid values like compressed_size == 0. * * \note This doesn't check that all the options are valid i.e. this * may return LZMA_OK even if lzma_block_header_encode() or * lzma_block_encoder() would fail. If you want to validate the * filter chain, consider using lzma_memlimit_encoder() which as * a side-effect validates the filter chain. */ extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Encode Block Header * * The caller must have calculated the size of the Block Header already with * lzma_block_header_size(). If a value larger than the one calculated by * lzma_block_header_size() is used, the Block Header will be padded to the * specified size. * * \param out Beginning of the output buffer. This must be * at least block->header_size bytes. * \param block Block options to be encoded. * * \return - LZMA_OK: Encoding was successful. block->header_size * bytes were written to output buffer. * - LZMA_OPTIONS_ERROR: Invalid or unsupported options. * - LZMA_PROG_ERROR: Invalid arguments, for example * block->header_size is invalid or block->filters is NULL. */ extern LZMA_API(lzma_ret) lzma_block_header_encode( const lzma_block *block, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Decode Block Header * * block->version should (usually) be set to the highest value supported * by the application. If the application sets block->version to a value * higher than supported by the current liblzma version, this function will * downgrade block->version to the highest value supported by it. Thus one * should check the value of block->version after calling this function if * block->version was set to a non-zero value and the application doesn't * otherwise know that the liblzma version being used is new enough to * support the specified block->version. * * The size of the Block Header must have already been decoded with * lzma_block_header_size_decode() macro and stored to block->header_size. * * The integrity check type from Stream Header must have been stored * to block->check. * * block->filters must have been allocated, but they don't need to be * initialized (possible existing filter options are not freed). * * \param block Destination for Block options. * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() (and also free() * if an error occurs). * \param in Beginning of the input buffer. This must be * at least block->header_size bytes. * * \return - LZMA_OK: Decoding was successful. block->header_size * bytes were read from the input buffer. * - LZMA_OPTIONS_ERROR: The Block Header specifies some * unsupported options such as unsupported filters. This can * happen also if block->version was set to a too low value * compared to what would be required to properly represent * the information stored in the Block Header. * - LZMA_DATA_ERROR: Block Header is corrupt, for example, * the CRC32 doesn't match. * - LZMA_PROG_ERROR: Invalid arguments, for example * block->header_size is invalid or block->filters is NULL. */ extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block, const lzma_allocator *allocator, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Validate and set Compressed Size according to Unpadded Size * * Block Header stores Compressed Size, but Index has Unpadded Size. If the * application has already parsed the Index and is now decoding Blocks, * it can calculate Compressed Size from Unpadded Size. This function does * exactly that with error checking: * * - Compressed Size calculated from Unpadded Size must be positive integer, * that is, Unpadded Size must be big enough that after Block Header and * Check fields there's still at least one byte for Compressed Size. * * - If Compressed Size was present in Block Header, the new value * calculated from Unpadded Size is compared against the value * from Block Header. * * \note This function must be called _after_ decoding the Block Header * field so that it can properly validate Compressed Size if it * was present in Block Header. * * \return - LZMA_OK: block->compressed_size was set successfully. * - LZMA_DATA_ERROR: unpadded_size is too small compared to * block->header_size and lzma_check_size(block->check). * - LZMA_PROG_ERROR: Some values are invalid. For example, * block->header_size must be a multiple of four and * between 8 and 1024 inclusive. */ extern LZMA_API(lzma_ret) lzma_block_compressed_size( lzma_block *block, lzma_vli unpadded_size) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Calculate Unpadded Size * * The Index field stores Unpadded Size and Uncompressed Size. The latter * can be taken directly from the lzma_block structure after coding a Block, * but Unpadded Size needs to be calculated from Block Header Size, * Compressed Size, and size of the Check field. This is where this function * is needed. * * \return Unpadded Size on success, or zero on error. */ extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block) lzma_nothrow lzma_attr_pure; /** * \brief Calculate the total encoded size of a Block * * This is equivalent to lzma_block_unpadded_size() except that the returned * value includes the size of the Block Padding field. * * \return On success, total encoded size of the Block. On error, * zero is returned. */ extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block) lzma_nothrow lzma_attr_pure; /** * \brief Initialize .xz Block encoder * * Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the * filter chain supports it), and LZMA_FINISH. * * \return - LZMA_OK: All good, continue with lzma_code(). * - LZMA_MEM_ERROR * - LZMA_OPTIONS_ERROR * - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID * that is not supported by this buid of liblzma. Initializing * the encoder failed. * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_block_encoder( lzma_stream *strm, lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Initialize .xz Block decoder * * Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using * LZMA_FINISH is not required. It is supported only for convenience. * * \return - LZMA_OK: All good, continue with lzma_code(). * - LZMA_UNSUPPORTED_CHECK: Initialization was successful, but * the given Check ID is not supported, thus Check will be * ignored. * - LZMA_PROG_ERROR * - LZMA_MEM_ERROR */ extern LZMA_API(lzma_ret) lzma_block_decoder( lzma_stream *strm, lzma_block *block) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Calculate maximum output size for single-call Block encoding * * This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks. * See the documentation of lzma_stream_buffer_bound(). */ extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size) lzma_nothrow; /** * \brief Single-call .xz Block encoder * * In contrast to the multi-call encoder initialized with * lzma_block_encoder(), this function encodes also the Block Header. This * is required to make it possible to write appropriate Block Header also * in case the data isn't compressible, and different filter chain has to be * used to encode the data in uncompressed form using uncompressed chunks * of the LZMA2 filter. * * When the data isn't compressible, header_size, compressed_size, and * uncompressed_size are set just like when the data was compressible, but * it is possible that header_size is too small to hold the filter chain * specified in block->filters, because that isn't necessarily the filter * chain that was actually used to encode the data. lzma_block_unpadded_size() * still works normally, because it doesn't read the filters array. * * \param block Block options: block->version, block->check, * and block->filters must have been initialized. * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() and free(). * \param in Beginning of the input buffer * \param in_size Size of the input buffer * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if encoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return - LZMA_OK: Encoding was successful. * - LZMA_BUF_ERROR: Not enough output buffer space. * - LZMA_UNSUPPORTED_CHECK * - LZMA_OPTIONS_ERROR * - LZMA_MEM_ERROR * - LZMA_DATA_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_block_buffer_encode( lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Single-call uncompressed .xz Block encoder * * This is like lzma_block_buffer_encode() except this doesn't try to * compress the data and instead encodes the data using LZMA2 uncompressed * chunks. The required output buffer size can be determined with * lzma_block_buffer_bound(). * * Since the data won't be compressed, this function ignores block->filters. * This function doesn't take lzma_allocator because this function doesn't * allocate any memory from the heap. */ extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Single-call .xz Block decoder * * This is single-call equivalent of lzma_block_decoder(), and requires that * the caller has already decoded Block Header and checked its memory usage. * * \param block Block options just like with lzma_block_decoder(). * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() and free(). * \param in Beginning of the input buffer * \param in_pos The next byte will be read from in[*in_pos]. * *in_pos is updated only if decoding succeeds. * \param in_size Size of the input buffer; the first byte that * won't be read is in[in_size]. * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if encoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return - LZMA_OK: Decoding was successful. * - LZMA_OPTIONS_ERROR * - LZMA_DATA_ERROR * - LZMA_MEM_ERROR * - LZMA_BUF_ERROR: Output buffer was too small. * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_block_buffer_decode( lzma_block *block, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; PKZUr lzma/version.hnu[/** * \file lzma/version.h * \brief Version number */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /* * Version number split into components */ #define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MINOR 2 #define LZMA_VERSION_PATCH 4 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE #ifndef LZMA_VERSION_COMMIT # define LZMA_VERSION_COMMIT "" #endif /* * Map symbolic stability levels to integers. */ #define LZMA_VERSION_STABILITY_ALPHA 0 #define LZMA_VERSION_STABILITY_BETA 1 #define LZMA_VERSION_STABILITY_STABLE 2 /** * \brief Compile-time version number * * The version number is of format xyyyzzzs where * - x = major * - yyy = minor * - zzz = revision * - s indicates stability: 0 = alpha, 1 = beta, 2 = stable * * The same xyyyzzz triplet is never reused with different stability levels. * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta * or 5.1.0 stable. * * \note The version number of liblzma has nothing to with * the version number of Igor Pavlov's LZMA SDK. */ #define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \ + LZMA_VERSION_MINOR * UINT32_C(10000) \ + LZMA_VERSION_PATCH * UINT32_C(10) \ + LZMA_VERSION_STABILITY) /* * Macros to construct the compile-time version string */ #if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA # define LZMA_VERSION_STABILITY_STRING "alpha" #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA # define LZMA_VERSION_STABILITY_STRING "beta" #elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE # define LZMA_VERSION_STABILITY_STRING "" #else # error Incorrect LZMA_VERSION_STABILITY #endif #define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \ #major "." #minor "." #patch stability commit #define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \ LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) /** * \brief Compile-time version as a string * * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable * versions don't have any "stable" suffix). In future, a snapshot built * from source code repository may include an additional suffix, for example * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form * in LZMA_VERSION macro. */ #define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \ LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \ LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \ LZMA_VERSION_COMMIT) /* #ifndef is needed for use with windres (MinGW or Cygwin). */ #ifndef LZMA_H_INTERNAL_RC /** * \brief Run-time version number as an integer * * Return the value of LZMA_VERSION macro at the compile time of liblzma. * This allows the application to compare if it was built against the same, * older, or newer version of liblzma that is currently running. */ extern LZMA_API(uint32_t) lzma_version_number(void) lzma_nothrow lzma_attr_const; /** * \brief Run-time version as a string * * This function may be useful if you want to display which version of * liblzma your application is currently using. */ extern LZMA_API(const char *) lzma_version_string(void) lzma_nothrow lzma_attr_const; #endif PKZ7-@-@ lzma/filter.hnu[/** * \file lzma/filter.h * \brief Common filter related types and functions */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Maximum number of filters in a chain * * A filter chain can have 1-4 filters, of which three are allowed to change * the size of the data. Usually only one or two filters are needed. */ #define LZMA_FILTERS_MAX 4 /** * \brief Filter options * * This structure is used to pass Filter ID and a pointer filter's * options to liblzma. A few functions work with a single lzma_filter * structure, while most functions expect a filter chain. * * A filter chain is indicated with an array of lzma_filter structures. * The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter * array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to * be able to hold any arbitrary filter chain. This is important when * using lzma_block_header_decode() from block.h, because too small * array would make liblzma write past the end of the filters array. */ typedef struct { /** * \brief Filter ID * * Use constants whose name begin with `LZMA_FILTER_' to specify * different filters. In an array of lzma_filter structures, use * LZMA_VLI_UNKNOWN to indicate end of filters. * * \note This is not an enum, because on some systems enums * cannot be 64-bit. */ lzma_vli id; /** * \brief Pointer to filter-specific options structure * * If the filter doesn't need options, set this to NULL. If id is * set to LZMA_VLI_UNKNOWN, options is ignored, and thus * doesn't need be initialized. */ void *options; } lzma_filter; /** * \brief Test if the given Filter ID is supported for encoding * * Return true if the give Filter ID is supported for encoding by this * liblzma build. Otherwise false is returned. * * There is no way to list which filters are available in this particular * liblzma version and build. It would be useless, because the application * couldn't know what kind of options the filter would need. */ extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id) lzma_nothrow lzma_attr_const; /** * \brief Test if the given Filter ID is supported for decoding * * Return true if the give Filter ID is supported for decoding by this * liblzma build. Otherwise false is returned. */ extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id) lzma_nothrow lzma_attr_const; /** * \brief Copy the filters array * * Copy the Filter IDs and filter-specific options from src to dest. * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that * src is smaller than that. * * Unless the filter-specific options is NULL, the Filter ID has to be * supported by liblzma, because liblzma needs to know the size of every * filter-specific options structure. The filter-specific options are not * validated. If options is NULL, any unsupported Filter IDs are copied * without returning an error. * * Old filter-specific options in dest are not freed, so dest doesn't * need to be initialized by the caller in any way. * * If an error occurs, memory possibly already allocated by this function * is always freed. * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options * is not NULL. * - LZMA_PROG_ERROR: src or dest is NULL. */ extern LZMA_API(lzma_ret) lzma_filters_copy( const lzma_filter *src, lzma_filter *dest, const lzma_allocator *allocator) lzma_nothrow; /** * \brief Calculate approximate memory requirements for raw encoder * * This function can be used to calculate the memory requirements for * Block and Stream encoders too because Block and Stream encoders don't * need significantly more memory than raw encoder. * * \param filters Array of filters terminated with * .id == LZMA_VLI_UNKNOWN. * * \return Number of bytes of memory required for the given * filter chain when encoding. If an error occurs, * for example due to unsupported filter chain, * UINT64_MAX is returned. */ extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters) lzma_nothrow lzma_attr_pure; /** * \brief Calculate approximate memory requirements for raw decoder * * This function can be used to calculate the memory requirements for * Block and Stream decoders too because Block and Stream decoders don't * need significantly more memory than raw decoder. * * \param filters Array of filters terminated with * .id == LZMA_VLI_UNKNOWN. * * \return Number of bytes of memory required for the given * filter chain when decoding. If an error occurs, * for example due to unsupported filter chain, * UINT64_MAX is returned. */ extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters) lzma_nothrow lzma_attr_pure; /** * \brief Initialize raw encoder * * This function may be useful when implementing custom file formats. * * \param strm Pointer to properly prepared lzma_stream * \param filters Array of lzma_filter structures. The end of the * array must be marked with .id = LZMA_VLI_UNKNOWN. * * The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the * filter chain supports it), or LZMA_FINISH. * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_raw_encoder( lzma_stream *strm, const lzma_filter *filters) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Initialize raw decoder * * The initialization of raw decoder goes similarly to raw encoder. * * The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using * LZMA_FINISH is not required, it is supported just for convenience. * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_raw_decoder( lzma_stream *strm, const lzma_filter *filters) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Update the filter chain in the encoder * * This function is for advanced users only. This function has two slightly * different purposes: * * - After LZMA_FULL_FLUSH when using Stream encoder: Set a new filter * chain, which will be used starting from the next Block. * * - After LZMA_SYNC_FLUSH using Raw, Block, or Stream encoder: Change * the filter-specific options in the middle of encoding. The actual * filters in the chain (Filter IDs) cannot be changed. In the future, * it might become possible to change the filter options without * using LZMA_SYNC_FLUSH. * * While rarely useful, this function may be called also when no data has * been compressed yet. In that case, this function will behave as if * LZMA_FULL_FLUSH (Stream encoder) or LZMA_SYNC_FLUSH (Raw or Block * encoder) had been used right before calling this function. * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_MEMLIMIT_ERROR * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_filters_update( lzma_stream *strm, const lzma_filter *filters) lzma_nothrow; /** * \brief Single-call raw encoder * * \param filters Array of lzma_filter structures. The end of the * array must be marked with .id = LZMA_VLI_UNKNOWN. * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() and free(). * \param in Beginning of the input buffer * \param in_size Size of the input buffer * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if encoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return - LZMA_OK: Encoding was successful. * - LZMA_BUF_ERROR: Not enough output buffer space. * - LZMA_OPTIONS_ERROR * - LZMA_MEM_ERROR * - LZMA_DATA_ERROR * - LZMA_PROG_ERROR * * \note There is no function to calculate how big output buffer * would surely be big enough. (lzma_stream_buffer_bound() * works only for lzma_stream_buffer_encode(); raw encoder * won't necessarily meet that bound.) */ extern LZMA_API(lzma_ret) lzma_raw_buffer_encode( const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; /** * \brief Single-call raw decoder * * \param filters Array of lzma_filter structures. The end of the * array must be marked with .id = LZMA_VLI_UNKNOWN. * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() and free(). * \param in Beginning of the input buffer * \param in_pos The next byte will be read from in[*in_pos]. * *in_pos is updated only if decoding succeeds. * \param in_size Size of the input buffer; the first byte that * won't be read is in[in_size]. * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if encoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. */ extern LZMA_API(lzma_ret) lzma_raw_buffer_decode( const lzma_filter *filters, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; /** * \brief Get the size of the Filter Properties field * * This function may be useful when implementing custom file formats * using the raw encoder and decoder. * * \param size Pointer to uint32_t to hold the size of the properties * \param filter Filter ID and options (the size of the properties may * vary depending on the options) * * \return - LZMA_OK * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR * * \note This function validates the Filter ID, but does not * necessarily validate the options. Thus, it is possible * that this returns LZMA_OK while the following call to * lzma_properties_encode() returns LZMA_OPTIONS_ERROR. */ extern LZMA_API(lzma_ret) lzma_properties_size( uint32_t *size, const lzma_filter *filter) lzma_nothrow; /** * \brief Encode the Filter Properties field * * \param filter Filter ID and options * \param props Buffer to hold the encoded options. The size of * buffer must have been already determined with * lzma_properties_size(). * * \return - LZMA_OK * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR * * \note Even this function won't validate more options than actually * necessary. Thus, it is possible that encoding the properties * succeeds but using the same options to initialize the encoder * will fail. * * \note If lzma_properties_size() indicated that the size * of the Filter Properties field is zero, calling * lzma_properties_encode() is not required, but it * won't do any harm either. */ extern LZMA_API(lzma_ret) lzma_properties_encode( const lzma_filter *filter, uint8_t *props) lzma_nothrow; /** * \brief Decode the Filter Properties field * * \param filter filter->id must have been set to the correct * Filter ID. filter->options doesn't need to be * initialized (it's not freed by this function). The * decoded options will be stored to filter->options. * filter->options is set to NULL if there are no * properties or if an error occurs. * \param allocator Custom memory allocator used to allocate the * options. Set to NULL to use the default malloc(), * and in case of an error, also free(). * \param props Input buffer containing the properties. * \param props_size Size of the properties. This must be the exact * size; giving too much or too little input will * return LZMA_OPTIONS_ERROR. * * \return - LZMA_OK * - LZMA_OPTIONS_ERROR * - LZMA_MEM_ERROR */ extern LZMA_API(lzma_ret) lzma_properties_decode( lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *props, size_t props_size) lzma_nothrow; /** * \brief Calculate encoded size of a Filter Flags field * * Knowing the size of Filter Flags is useful to know when allocating * memory to hold the encoded Filter Flags. * * \param size Pointer to integer to hold the calculated size * \param filter Filter ID and associated options whose encoded * size is to be calculated * * \return - LZMA_OK: *size set successfully. Note that this doesn't * guarantee that filter->options is valid, thus * lzma_filter_flags_encode() may still fail. * - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options. * - LZMA_PROG_ERROR: Invalid options * * \note If you need to calculate size of List of Filter Flags, * you need to loop over every lzma_filter entry. */ extern LZMA_API(lzma_ret) lzma_filter_flags_size( uint32_t *size, const lzma_filter *filter) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Encode Filter Flags into given buffer * * In contrast to some functions, this doesn't allocate the needed buffer. * This is due to how this function is used internally by liblzma. * * \param filter Filter ID and options to be encoded * \param out Beginning of the output buffer * \param out_pos out[*out_pos] is the next write position. This * is updated by the encoder. * \param out_size out[out_size] is the first byte to not write. * * \return - LZMA_OK: Encoding was successful. * - LZMA_OPTIONS_ERROR: Invalid or unsupported options. * - LZMA_PROG_ERROR: Invalid options or not enough output * buffer space (you should have checked it with * lzma_filter_flags_size()). */ extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Decode Filter Flags from given buffer * * The decoded result is stored into *filter. The old value of * filter->options is not free()d. * * \return - LZMA_OK * - LZMA_OPTIONS_ERROR * - LZMA_MEM_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_filter_flags_decode( lzma_filter *filter, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result; PKZFxF F lzma/bcj.hnu[/** * \file lzma/bcj.h * \brief Branch/Call/Jump conversion filters */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /* Filter IDs for lzma_filter.id */ #define LZMA_FILTER_X86 LZMA_VLI_C(0x04) /**< * Filter for x86 binaries */ #define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05) /**< * Filter for Big endian PowerPC binaries */ #define LZMA_FILTER_IA64 LZMA_VLI_C(0x06) /**< * Filter for IA-64 (Itanium) binaries. */ #define LZMA_FILTER_ARM LZMA_VLI_C(0x07) /**< * Filter for ARM binaries. */ #define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08) /**< * Filter for ARM-Thumb binaries. */ #define LZMA_FILTER_SPARC LZMA_VLI_C(0x09) /**< * Filter for SPARC binaries. */ /** * \brief Options for BCJ filters * * The BCJ filters never change the size of the data. Specifying options * for them is optional: if pointer to options is NULL, default value is * used. You probably never need to specify options to BCJ filters, so just * set the options pointer to NULL and be happy. * * If options with non-default values have been specified when encoding, * the same options must also be specified when decoding. * * \note At the moment, none of the BCJ filters support * LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified, * LZMA_OPTIONS_ERROR will be returned. If there is need, * partial support for LZMA_SYNC_FLUSH can be added in future. * Partial means that flushing would be possible only at * offsets that are multiple of 2, 4, or 16 depending on * the filter, except x86 which cannot be made to support * LZMA_SYNC_FLUSH predictably. */ typedef struct { /** * \brief Start offset for conversions * * This setting is useful only when the same filter is used * _separately_ for multiple sections of the same executable file, * and the sections contain cross-section branch/call/jump * instructions. In that case it is beneficial to set the start * offset of the non-first sections so that the relative addresses * of the cross-section branch/call/jump instructions will use the * same absolute addresses as in the first section. * * When the pointer to options is NULL, the default value (zero) * is used. */ uint32_t start_offset; } lzma_options_bcj; PKZ߄[[ lzma/index.hnu[/** * \file lzma/index.h * \brief Handling of .xz Index and related information */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Opaque data type to hold the Index(es) and other information * * lzma_index often holds just one .xz Index and possibly the Stream Flags * of the same Stream and size of the Stream Padding field. However, * multiple lzma_indexes can be concatenated with lzma_index_cat() and then * there may be information about multiple Streams in the same lzma_index. * * Notes about thread safety: Only one thread may modify lzma_index at * a time. All functions that take non-const pointer to lzma_index * modify it. As long as no thread is modifying the lzma_index, getting * information from the same lzma_index can be done from multiple threads * at the same time with functions that take a const pointer to * lzma_index or use lzma_index_iter. The same iterator must be used * only by one thread at a time, of course, but there can be as many * iterators for the same lzma_index as needed. */ typedef struct lzma_index_s lzma_index; /** * \brief Iterator to get information about Blocks and Streams */ typedef struct { struct { /** * \brief Pointer to Stream Flags * * This is NULL if Stream Flags have not been set for * this Stream with lzma_index_stream_flags(). */ const lzma_stream_flags *flags; const void *reserved_ptr1; const void *reserved_ptr2; const void *reserved_ptr3; /** * \brief Stream number in the lzma_index * * The first Stream is 1. */ lzma_vli number; /** * \brief Number of Blocks in the Stream * * If this is zero, the block structure below has * undefined values. */ lzma_vli block_count; /** * \brief Compressed start offset of this Stream * * The offset is relative to the beginning of the lzma_index * (i.e. usually the beginning of the .xz file). */ lzma_vli compressed_offset; /** * \brief Uncompressed start offset of this Stream * * The offset is relative to the beginning of the lzma_index * (i.e. usually the beginning of the .xz file). */ lzma_vli uncompressed_offset; /** * \brief Compressed size of this Stream * * This includes all headers except the possible * Stream Padding after this Stream. */ lzma_vli compressed_size; /** * \brief Uncompressed size of this Stream */ lzma_vli uncompressed_size; /** * \brief Size of Stream Padding after this Stream * * If it hasn't been set with lzma_index_stream_padding(), * this defaults to zero. Stream Padding is always * a multiple of four bytes. */ lzma_vli padding; lzma_vli reserved_vli1; lzma_vli reserved_vli2; lzma_vli reserved_vli3; lzma_vli reserved_vli4; } stream; struct { /** * \brief Block number in the file * * The first Block is 1. */ lzma_vli number_in_file; /** * \brief Compressed start offset of this Block * * This offset is relative to the beginning of the * lzma_index (i.e. usually the beginning of the .xz file). * Normally this is where you should seek in the .xz file * to start decompressing this Block. */ lzma_vli compressed_file_offset; /** * \brief Uncompressed start offset of this Block * * This offset is relative to the beginning of the lzma_index * (i.e. usually the beginning of the .xz file). * * When doing random-access reading, it is possible that * the target offset is not exactly at Block boundary. One * will need to compare the target offset against * uncompressed_file_offset or uncompressed_stream_offset, * and possibly decode and throw away some amount of data * before reaching the target offset. */ lzma_vli uncompressed_file_offset; /** * \brief Block number in this Stream * * The first Block is 1. */ lzma_vli number_in_stream; /** * \brief Compressed start offset of this Block * * This offset is relative to the beginning of the Stream * containing this Block. */ lzma_vli compressed_stream_offset; /** * \brief Uncompressed start offset of this Block * * This offset is relative to the beginning of the Stream * containing this Block. */ lzma_vli uncompressed_stream_offset; /** * \brief Uncompressed size of this Block * * You should pass this to the Block decoder if you will * decode this Block. It will allow the Block decoder to * validate the uncompressed size. */ lzma_vli uncompressed_size; /** * \brief Unpadded size of this Block * * You should pass this to the Block decoder if you will * decode this Block. It will allow the Block decoder to * validate the unpadded size. */ lzma_vli unpadded_size; /** * \brief Total compressed size * * This includes all headers and padding in this Block. * This is useful if you need to know how many bytes * the Block decoder will actually read. */ lzma_vli total_size; lzma_vli reserved_vli1; lzma_vli reserved_vli2; lzma_vli reserved_vli3; lzma_vli reserved_vli4; const void *reserved_ptr1; const void *reserved_ptr2; const void *reserved_ptr3; const void *reserved_ptr4; } block; /* * Internal data which is used to store the state of the iterator. * The exact format may vary between liblzma versions, so don't * touch these in any way. */ union { const void *p; size_t s; lzma_vli v; } internal[6]; } lzma_index_iter; /** * \brief Operation mode for lzma_index_iter_next() */ typedef enum { LZMA_INDEX_ITER_ANY = 0, /**< * \brief Get the next Block or Stream * * Go to the next Block if the current Stream has at least * one Block left. Otherwise go to the next Stream even if * it has no Blocks. If the Stream has no Blocks * (lzma_index_iter.stream.block_count == 0), * lzma_index_iter.block will have undefined values. */ LZMA_INDEX_ITER_STREAM = 1, /**< * \brief Get the next Stream * * Go to the next Stream even if the current Stream has * unread Blocks left. If the next Stream has at least one * Block, the iterator will point to the first Block. * If there are no Blocks, lzma_index_iter.block will have * undefined values. */ LZMA_INDEX_ITER_BLOCK = 2, /**< * \brief Get the next Block * * Go to the next Block if the current Stream has at least * one Block left. If the current Stream has no Blocks left, * the next Stream with at least one Block is located and * the iterator will be made to point to the first Block of * that Stream. */ LZMA_INDEX_ITER_NONEMPTY_BLOCK = 3 /**< * \brief Get the next non-empty Block * * This is like LZMA_INDEX_ITER_BLOCK except that it will * skip Blocks whose Uncompressed Size is zero. */ } lzma_index_iter_mode; /** * \brief Calculate memory usage of lzma_index * * On disk, the size of the Index field depends on both the number of Records * stored and how big values the Records store (due to variable-length integer * encoding). When the Index is kept in lzma_index structure, the memory usage * depends only on the number of Records/Blocks stored in the Index(es), and * in case of concatenated lzma_indexes, the number of Streams. The size in * RAM is almost always significantly bigger than in the encoded form on disk. * * This function calculates an approximate amount of memory needed hold * the given number of Streams and Blocks in lzma_index structure. This * value may vary between CPU architectures and also between liblzma versions * if the internal implementation is modified. */ extern LZMA_API(uint64_t) lzma_index_memusage( lzma_vli streams, lzma_vli blocks) lzma_nothrow; /** * \brief Calculate the memory usage of an existing lzma_index * * This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i), * lzma_index_block_count(i)). */ extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i) lzma_nothrow; /** * \brief Allocate and initialize a new lzma_index structure * * \return On success, a pointer to an empty initialized lzma_index is * returned. If allocation fails, NULL is returned. */ extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator) lzma_nothrow; /** * \brief Deallocate lzma_index * * If i is NULL, this does nothing. */ extern LZMA_API(void) lzma_index_end( lzma_index *i, const lzma_allocator *allocator) lzma_nothrow; /** * \brief Add a new Block to lzma_index * * \param i Pointer to a lzma_index structure * \param allocator Pointer to lzma_allocator, or NULL to * use malloc() * \param unpadded_size Unpadded Size of a Block. This can be * calculated with lzma_block_unpadded_size() * after encoding or decoding the Block. * \param uncompressed_size Uncompressed Size of a Block. This can be * taken directly from lzma_block structure * after encoding or decoding the Block. * * Appending a new Block does not invalidate iterators. For example, * if an iterator was pointing to the end of the lzma_index, after * lzma_index_append() it is possible to read the next Block with * an existing iterator. * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_DATA_ERROR: Compressed or uncompressed size of the * Stream or size of the Index field would grow too big. * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_index_append( lzma_index *i, const lzma_allocator *allocator, lzma_vli unpadded_size, lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Set the Stream Flags * * Set the Stream Flags of the last (and typically the only) Stream * in lzma_index. This can be useful when reading information from the * lzma_index, because to decode Blocks, knowing the integrity check type * is needed. * * The given Stream Flags are copied into internal preallocated structure * in the lzma_index, thus the caller doesn't need to keep the *stream_flags * available after calling this function. * * \return - LZMA_OK * - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version. * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_index_stream_flags( lzma_index *i, const lzma_stream_flags *stream_flags) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Get the types of integrity Checks * * If lzma_index_stream_flags() is used to set the Stream Flags for * every Stream, lzma_index_checks() can be used to get a bitmask to * indicate which Check types have been used. It can be useful e.g. if * showing the Check types to the user. * * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10. */ extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Set the amount of Stream Padding * * Set the amount of Stream Padding of the last (and typically the only) * Stream in the lzma_index. This is needed when planning to do random-access * reading within multiple concatenated Streams. * * By default, the amount of Stream Padding is assumed to be zero bytes. * * \return - LZMA_OK * - LZMA_DATA_ERROR: The file size would grow too big. * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_index_stream_padding( lzma_index *i, lzma_vli stream_padding) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Get the number of Streams */ extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Get the number of Blocks * * This returns the total number of Blocks in lzma_index. To get number * of Blocks in individual Streams, use lzma_index_iter. */ extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Get the size of the Index field as bytes * * This is needed to verify the Backward Size field in the Stream Footer. */ extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Get the total size of the Stream * * If multiple lzma_indexes have been combined, this works as if the Blocks * were in a single Stream. This is useful if you are going to combine * Blocks from multiple Streams into a single new Stream. */ extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Get the total size of the Blocks * * This doesn't include the Stream Header, Stream Footer, Stream Padding, * or Index fields. */ extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Get the total size of the file * * When no lzma_indexes have been combined with lzma_index_cat() and there is * no Stream Padding, this function is identical to lzma_index_stream_size(). * If multiple lzma_indexes have been combined, this includes also the headers * of each separate Stream and the possible Stream Padding fields. */ extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Get the uncompressed size of the file */ extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i) lzma_nothrow lzma_attr_pure; /** * \brief Initialize an iterator * * \param iter Pointer to a lzma_index_iter structure * \param i lzma_index to which the iterator will be associated * * This function associates the iterator with the given lzma_index, and calls * lzma_index_iter_rewind() on the iterator. * * This function doesn't allocate any memory, thus there is no * lzma_index_iter_end(). The iterator is valid as long as the * associated lzma_index is valid, that is, until lzma_index_end() or * using it as source in lzma_index_cat(). Specifically, lzma_index doesn't * become invalid if new Blocks are added to it with lzma_index_append() or * if it is used as the destination in lzma_index_cat(). * * It is safe to make copies of an initialized lzma_index_iter, for example, * to easily restart reading at some particular position. */ extern LZMA_API(void) lzma_index_iter_init( lzma_index_iter *iter, const lzma_index *i) lzma_nothrow; /** * \brief Rewind the iterator * * Rewind the iterator so that next call to lzma_index_iter_next() will * return the first Block or Stream. */ extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter) lzma_nothrow; /** * \brief Get the next Block or Stream * * \param iter Iterator initialized with lzma_index_iter_init() * \param mode Specify what kind of information the caller wants * to get. See lzma_index_iter_mode for details. * * \return If next Block or Stream matching the mode was found, *iter * is updated and this function returns false. If no Block or * Stream matching the mode is found, *iter is not modified * and this function returns true. If mode is set to an unknown * value, *iter is not modified and this function returns true. */ extern LZMA_API(lzma_bool) lzma_index_iter_next( lzma_index_iter *iter, lzma_index_iter_mode mode) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Locate a Block * * If it is possible to seek in the .xz file, it is possible to parse * the Index field(s) and use lzma_index_iter_locate() to do random-access * reading with granularity of Block size. * * \param iter Iterator that was earlier initialized with * lzma_index_iter_init(). * \param target Uncompressed target offset which the caller would * like to locate from the Stream * * If the target is smaller than the uncompressed size of the Stream (can be * checked with lzma_index_uncompressed_size()): * - Information about the Stream and Block containing the requested * uncompressed offset is stored into *iter. * - Internal state of the iterator is adjusted so that * lzma_index_iter_next() can be used to read subsequent Blocks or Streams. * - This function returns false. * * If target is greater than the uncompressed size of the Stream, *iter * is not modified, and this function returns true. */ extern LZMA_API(lzma_bool) lzma_index_iter_locate( lzma_index_iter *iter, lzma_vli target) lzma_nothrow; /** * \brief Concatenate lzma_indexes * * Concatenating lzma_indexes is useful when doing random-access reading in * multi-Stream .xz file, or when combining multiple Streams into single * Stream. * * \param dest lzma_index after which src is appended * \param src lzma_index to be appended after dest. If this * function succeeds, the memory allocated for src * is freed or moved to be part of dest, and all * iterators pointing to src will become invalid. * \param allocator Custom memory allocator; can be NULL to use * malloc() and free(). * * \return - LZMA_OK: lzma_indexes were concatenated successfully. * src is now a dangling pointer. * - LZMA_DATA_ERROR: *dest would grow too big. * - LZMA_MEM_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Duplicate lzma_index * * \return A copy of the lzma_index, or NULL if memory allocation failed. */ extern LZMA_API(lzma_index *) lzma_index_dup( const lzma_index *i, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Initialize .xz Index encoder * * \param strm Pointer to properly prepared lzma_stream * \param i Pointer to lzma_index which should be encoded. * * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH. * It is enough to use only one of them (you can choose freely). * * \return - LZMA_OK: Initialization succeeded, continue with lzma_code(). * - LZMA_MEM_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_index_encoder( lzma_stream *strm, const lzma_index *i) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Initialize .xz Index decoder * * \param strm Pointer to properly prepared lzma_stream * \param i The decoded Index will be made available via * this pointer. Initially this function will * set *i to NULL (the old value is ignored). If * decoding succeeds (lzma_code() returns * LZMA_STREAM_END), *i will be set to point * to a new lzma_index, which the application * has to later free with lzma_index_end(). * \param memlimit How much memory the resulting lzma_index is * allowed to require. liblzma 5.2.3 and earlier * don't allow 0 here and return LZMA_PROG_ERROR; * later versions treat 0 as if 1 had been specified. * * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. * There is no need to use LZMA_FINISH, but it's allowed because it may * simplify certain types of applications. * * \return - LZMA_OK: Initialization succeeded, continue with lzma_code(). * - LZMA_MEM_ERROR * - LZMA_PROG_ERROR * * liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here * but that error code has never been possible from this * initialization function. */ extern LZMA_API(lzma_ret) lzma_index_decoder( lzma_stream *strm, lzma_index **i, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Single-call .xz Index encoder * * \param i lzma_index to be encoded * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if encoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return - LZMA_OK: Encoding was successful. * - LZMA_BUF_ERROR: Output buffer is too small. Use * lzma_index_size() to find out how much output * space is needed. * - LZMA_PROG_ERROR * * \note This function doesn't take allocator argument since all * the internal data is allocated on stack. */ extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; /** * \brief Single-call .xz Index decoder * * \param i If decoding succeeds, *i will point to a new * lzma_index, which the application has to * later free with lzma_index_end(). If an error * occurs, *i will be NULL. The old value of *i * is always ignored and thus doesn't need to be * initialized by the caller. * \param memlimit Pointer to how much memory the resulting * lzma_index is allowed to require. The value * pointed by this pointer is modified if and only * if LZMA_MEMLIMIT_ERROR is returned. * \param allocator Pointer to lzma_allocator, or NULL to use malloc() * \param in Beginning of the input buffer * \param in_pos The next byte will be read from in[*in_pos]. * *in_pos is updated only if decoding succeeds. * \param in_size Size of the input buffer; the first byte that * won't be read is in[in_size]. * * \return - LZMA_OK: Decoding was successful. * - LZMA_MEM_ERROR * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. * The minimum required memlimit value was stored to *memlimit. * - LZMA_DATA_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow; PKZd㴟 lzma/check.hnu[/** * \file lzma/check.h * \brief Integrity checks */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Type of the integrity check (Check ID) * * The .xz format supports multiple types of checks that are calculated * from the uncompressed data. They vary in both speed and ability to * detect errors. */ typedef enum { LZMA_CHECK_NONE = 0, /**< * No Check is calculated. * * Size of the Check field: 0 bytes */ LZMA_CHECK_CRC32 = 1, /**< * CRC32 using the polynomial from the IEEE 802.3 standard * * Size of the Check field: 4 bytes */ LZMA_CHECK_CRC64 = 4, /**< * CRC64 using the polynomial from the ECMA-182 standard * * Size of the Check field: 8 bytes */ LZMA_CHECK_SHA256 = 10 /**< * SHA-256 * * Size of the Check field: 32 bytes */ } lzma_check; /** * \brief Maximum valid Check ID * * The .xz file format specification specifies 16 Check IDs (0-15). Some * of them are only reserved, that is, no actual Check algorithm has been * assigned. When decoding, liblzma still accepts unknown Check IDs for * future compatibility. If a valid but unsupported Check ID is detected, * liblzma can indicate a warning; see the flags LZMA_TELL_NO_CHECK, * LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_TELL_ANY_CHECK in container.h. */ #define LZMA_CHECK_ID_MAX 15 /** * \brief Test if the given Check ID is supported * * Return true if the given Check ID is supported by this liblzma build. * Otherwise false is returned. It is safe to call this with a value that * is not in the range [0, 15]; in that case the return value is always false. * * You can assume that LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always * supported (even if liblzma is built with limited features). */ extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check) lzma_nothrow lzma_attr_const; /** * \brief Get the size of the Check field with the given Check ID * * Although not all Check IDs have a check algorithm associated, the size of * every Check is already frozen. This function returns the size (in bytes) of * the Check field with the specified Check ID. The values are: * { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 } * * If the argument is not in the range [0, 15], UINT32_MAX is returned. */ extern LZMA_API(uint32_t) lzma_check_size(lzma_check check) lzma_nothrow lzma_attr_const; /** * \brief Maximum size of a Check field */ #define LZMA_CHECK_SIZE_MAX 64 /** * \brief Calculate CRC32 * * Calculate CRC32 using the polynomial from the IEEE 802.3 standard. * * \param buf Pointer to the input buffer * \param size Size of the input buffer * \param crc Previously returned CRC value. This is used to * calculate the CRC of a big buffer in smaller chunks. * Set to zero when starting a new calculation. * * \return Updated CRC value, which can be passed to this function * again to continue CRC calculation. */ extern LZMA_API(uint32_t) lzma_crc32( const uint8_t *buf, size_t size, uint32_t crc) lzma_nothrow lzma_attr_pure; /** * \brief Calculate CRC64 * * Calculate CRC64 using the polynomial from the ECMA-182 standard. * * This function is used similarly to lzma_crc32(). See its documentation. */ extern LZMA_API(uint64_t) lzma_crc64( const uint8_t *buf, size_t size, uint64_t crc) lzma_nothrow lzma_attr_pure; /* * SHA-256 functions are currently not exported to public API. * Contact Lasse Collin if you think it should be. */ /** * \brief Get the type of the integrity check * * This function can be called only immediately after lzma_code() has * returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK. * Calling this function in any other situation has undefined behavior. */ extern LZMA_API(lzma_check) lzma_get_check(const lzma_stream *strm) lzma_nothrow; PKZ&JJlzma/index_hash.hnu[/** * \file lzma/index_hash.h * \brief Validate Index by using a hash function * * Hashing makes it possible to use constant amount of memory to validate * Index of arbitrary size. */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Opaque data type to hold the Index hash */ typedef struct lzma_index_hash_s lzma_index_hash; /** * \brief Allocate and initialize a new lzma_index_hash structure * * If index_hash is NULL, a new lzma_index_hash structure is allocated, * initialized, and a pointer to it returned. If allocation fails, NULL * is returned. * * If index_hash is non-NULL, it is reinitialized and the same pointer * returned. In this case, return value cannot be NULL or a different * pointer than the index_hash that was given as an argument. */ extern LZMA_API(lzma_index_hash *) lzma_index_hash_init( lzma_index_hash *index_hash, const lzma_allocator *allocator) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Deallocate lzma_index_hash structure */ extern LZMA_API(void) lzma_index_hash_end( lzma_index_hash *index_hash, const lzma_allocator *allocator) lzma_nothrow; /** * \brief Add a new Record to an Index hash * * \param index Pointer to a lzma_index_hash structure * \param unpadded_size Unpadded Size of a Block * \param uncompressed_size Uncompressed Size of a Block * * \return - LZMA_OK * - LZMA_DATA_ERROR: Compressed or uncompressed size of the * Stream or size of the Index field would grow too big. * - LZMA_PROG_ERROR: Invalid arguments or this function is being * used when lzma_index_hash_decode() has already been used. */ extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size, lzma_vli uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Decode and validate the Index field * * After telling the sizes of all Blocks with lzma_index_hash_append(), * the actual Index field is decoded with this function. Specifically, * once decoding of the Index field has been started, no more Records * can be added using lzma_index_hash_append(). * * This function doesn't use lzma_stream structure to pass the input data. * Instead, the input buffer is specified using three arguments. This is * because it matches better the internal APIs of liblzma. * * \param index_hash Pointer to a lzma_index_hash structure * \param in Pointer to the beginning of the input buffer * \param in_pos in[*in_pos] is the next byte to process * \param in_size in[in_size] is the first byte not to process * * \return - LZMA_OK: So far good, but more input is needed. * - LZMA_STREAM_END: Index decoded successfully and it matches * the Records given with lzma_index_hash_append(). * - LZMA_DATA_ERROR: Index is corrupt or doesn't match the * information given with lzma_index_hash_append(). * - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size. * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Get the size of the Index field as bytes * * This is needed to verify the Backward Size field in the Stream Footer. */ extern LZMA_API(lzma_vli) lzma_index_hash_size( const lzma_index_hash *index_hash) lzma_nothrow lzma_attr_pure; PKZnѸ a alzma/container.hnu[/** * \file lzma/container.h * \brief File formats */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /************ * Encoding * ************/ /** * \brief Default compression preset * * It's not straightforward to recommend a default preset, because in some * cases keeping the resource usage relatively low is more important that * getting the maximum compression ratio. */ #define LZMA_PRESET_DEFAULT UINT32_C(6) /** * \brief Mask for preset level * * This is useful only if you need to extract the level from the preset * variable. That should be rare. */ #define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F) /* * Preset flags * * Currently only one flag is defined. */ /** * \brief Extreme compression preset * * This flag modifies the preset to make the encoding significantly slower * while improving the compression ratio only marginally. This is useful * when you don't mind wasting time to get as small result as possible. * * This flag doesn't affect the memory usage requirements of the decoder (at * least not significantly). The memory usage of the encoder may be increased * a little but only at the lowest preset levels (0-3). */ #define LZMA_PRESET_EXTREME (UINT32_C(1) << 31) /** * \brief Multithreading options */ typedef struct { /** * \brief Flags * * Set this to zero if no flags are wanted. * * No flags are currently supported. */ uint32_t flags; /** * \brief Number of worker threads to use */ uint32_t threads; /** * \brief Maximum uncompressed size of a Block * * The encoder will start a new .xz Block every block_size bytes. * Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code() * the caller may tell liblzma to start a new Block earlier. * * With LZMA2, a recommended block size is 2-4 times the LZMA2 * dictionary size. With very small dictionaries, it is recommended * to use at least 1 MiB block size for good compression ratio, even * if this is more than four times the dictionary size. Note that * these are only recommendations for typical use cases; feel free * to use other values. Just keep in mind that using a block size * less than the LZMA2 dictionary size is waste of RAM. * * Set this to 0 to let liblzma choose the block size depending * on the compression options. For LZMA2 it will be 3*dict_size * or 1 MiB, whichever is more. * * For each thread, about 3 * block_size bytes of memory will be * allocated. This may change in later liblzma versions. If so, * the memory usage will probably be reduced, not increased. */ uint64_t block_size; /** * \brief Timeout to allow lzma_code() to return early * * Multithreading can make liblzma to consume input and produce * output in a very bursty way: it may first read a lot of input * to fill internal buffers, then no input or output occurs for * a while. * * In single-threaded mode, lzma_code() won't return until it has * either consumed all the input or filled the output buffer. If * this is done in multithreaded mode, it may cause a call * lzma_code() to take even tens of seconds, which isn't acceptable * in all applications. * * To avoid very long blocking times in lzma_code(), a timeout * (in milliseconds) may be set here. If lzma_code() would block * longer than this number of milliseconds, it will return with * LZMA_OK. Reasonable values are 100 ms or more. The xz command * line tool uses 300 ms. * * If long blocking times are fine for you, set timeout to a special * value of 0, which will disable the timeout mechanism and will make * lzma_code() block until all the input is consumed or the output * buffer has been filled. * * \note Even with a timeout, lzma_code() might sometimes take * somewhat long time to return. No timing guarantees * are made. */ uint32_t timeout; /** * \brief Compression preset (level and possible flags) * * The preset is set just like with lzma_easy_encoder(). * The preset is ignored if filters below is non-NULL. */ uint32_t preset; /** * \brief Filter chain (alternative to a preset) * * If this is NULL, the preset above is used. Otherwise the preset * is ignored and the filter chain specified here is used. */ const lzma_filter *filters; /** * \brief Integrity check type * * See check.h for available checks. The xz command line tool * defaults to LZMA_CHECK_CRC64, which is a good choice if you * are unsure. */ lzma_check check; /* * Reserved space to allow possible future extensions without * breaking the ABI. You should not touch these, because the names * of these variables may change. These are and will never be used * with the currently supported options, so it is safe to leave these * uninitialized. */ lzma_reserved_enum reserved_enum1; lzma_reserved_enum reserved_enum2; lzma_reserved_enum reserved_enum3; uint32_t reserved_int1; uint32_t reserved_int2; uint32_t reserved_int3; uint32_t reserved_int4; uint64_t reserved_int5; uint64_t reserved_int6; uint64_t reserved_int7; uint64_t reserved_int8; void *reserved_ptr1; void *reserved_ptr2; void *reserved_ptr3; void *reserved_ptr4; } lzma_mt; /** * \brief Calculate approximate memory usage of easy encoder * * This function is a wrapper for lzma_raw_encoder_memusage(). * * \param preset Compression preset (level and possible flags) * * \return Number of bytes of memory required for the given * preset when encoding. If an error occurs, for example * due to unsupported preset, UINT64_MAX is returned. */ extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset) lzma_nothrow lzma_attr_pure; /** * \brief Calculate approximate decoder memory usage of a preset * * This function is a wrapper for lzma_raw_decoder_memusage(). * * \param preset Compression preset (level and possible flags) * * \return Number of bytes of memory required to decompress a file * that was compressed using the given preset. If an error * occurs, for example due to unsupported preset, UINT64_MAX * is returned. */ extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset) lzma_nothrow lzma_attr_pure; /** * \brief Initialize .xz Stream encoder using a preset number * * This function is intended for those who just want to use the basic features * if liblzma (that is, most developers out there). * * \param strm Pointer to lzma_stream that is at least initialized * with LZMA_STREAM_INIT. * \param preset Compression preset to use. A preset consist of level * number and zero or more flags. Usually flags aren't * used, so preset is simply a number [0, 9] which match * the options -0 ... -9 of the xz command line tool. * Additional flags can be be set using bitwise-or with * the preset level number, e.g. 6 | LZMA_PRESET_EXTREME. * \param check Integrity check type to use. See check.h for available * checks. The xz command line tool defaults to * LZMA_CHECK_CRC64, which is a good choice if you are * unsure. LZMA_CHECK_CRC32 is good too as long as the * uncompressed file is not many gigabytes. * * \return - LZMA_OK: Initialization succeeded. Use lzma_code() to * encode your data. * - LZMA_MEM_ERROR: Memory allocation failed. * - LZMA_OPTIONS_ERROR: The given compression preset is not * supported by this build of liblzma. * - LZMA_UNSUPPORTED_CHECK: The given check type is not * supported by this liblzma build. * - LZMA_PROG_ERROR: One or more of the parameters have values * that will never be valid. For example, strm == NULL. * * If initialization fails (return value is not LZMA_OK), all the memory * allocated for *strm by liblzma is always freed. Thus, there is no need * to call lzma_end() after failed initialization. * * If initialization succeeds, use lzma_code() to do the actual encoding. * Valid values for `action' (the second argument of lzma_code()) are * LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future, * there may be compression levels or flags that don't support LZMA_SYNC_FLUSH. */ extern LZMA_API(lzma_ret) lzma_easy_encoder( lzma_stream *strm, uint32_t preset, lzma_check check) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Single-call .xz Stream encoding using a preset number * * The maximum required output buffer size can be calculated with * lzma_stream_buffer_bound(). * * \param preset Compression preset to use. See the description * in lzma_easy_encoder(). * \param check Type of the integrity check to calculate from * uncompressed data. * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() and free(). * \param in Beginning of the input buffer * \param in_size Size of the input buffer * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if encoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return - LZMA_OK: Encoding was successful. * - LZMA_BUF_ERROR: Not enough output buffer space. * - LZMA_UNSUPPORTED_CHECK * - LZMA_OPTIONS_ERROR * - LZMA_MEM_ERROR * - LZMA_DATA_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_easy_buffer_encode( uint32_t preset, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow; /** * \brief Initialize .xz Stream encoder using a custom filter chain * * \param strm Pointer to properly prepared lzma_stream * \param filters Array of filters. This must be terminated with * filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for * more information. * \param check Type of the integrity check to calculate from * uncompressed data. * * \return - LZMA_OK: Initialization was successful. * - LZMA_MEM_ERROR * - LZMA_UNSUPPORTED_CHECK * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm, const lzma_filter *filters, lzma_check check) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Calculate approximate memory usage of multithreaded .xz encoder * * Since doing the encoding in threaded mode doesn't affect the memory * requirements of single-threaded decompressor, you can use * lzma_easy_decoder_memusage(options->preset) or * lzma_raw_decoder_memusage(options->filters) to calculate * the decompressor memory requirements. * * \param options Compression options * * \return Number of bytes of memory required for encoding with the * given options. If an error occurs, for example due to * unsupported preset or filter chain, UINT64_MAX is returned. */ extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage( const lzma_mt *options) lzma_nothrow lzma_attr_pure; /** * \brief Initialize multithreaded .xz Stream encoder * * This provides the functionality of lzma_easy_encoder() and * lzma_stream_encoder() as a single function for multithreaded use. * * The supported actions for lzma_code() are LZMA_RUN, LZMA_FULL_FLUSH, * LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be * added in the future. * * \param strm Pointer to properly prepared lzma_stream * \param options Pointer to multithreaded compression options * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_UNSUPPORTED_CHECK * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_stream_encoder_mt( lzma_stream *strm, const lzma_mt *options) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Initialize .lzma encoder (legacy file format) * * The .lzma format is sometimes called the LZMA_Alone format, which is the * reason for the name of this function. The .lzma format supports only the * LZMA1 filter. There is no support for integrity checks like CRC32. * * Use this function if and only if you need to create files readable by * legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format * is strongly recommended. * * The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH. * No kind of flushing is supported, because the file format doesn't make * it possible. * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_OPTIONS_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_alone_encoder( lzma_stream *strm, const lzma_options_lzma *options) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Calculate output buffer size for single-call Stream encoder * * When trying to compress uncompressible data, the encoded size will be * slightly bigger than the input data. This function calculates how much * output buffer space is required to be sure that lzma_stream_buffer_encode() * doesn't return LZMA_BUF_ERROR. * * The calculated value is not exact, but it is guaranteed to be big enough. * The actual maximum output space required may be slightly smaller (up to * about 100 bytes). This should not be a problem in practice. * * If the calculated maximum size doesn't fit into size_t or would make the * Stream grow past LZMA_VLI_MAX (which should never happen in practice), * zero is returned to indicate the error. * * \note The limit calculated by this function applies only to * single-call encoding. Multi-call encoding may (and probably * will) have larger maximum expansion when encoding * uncompressible data. Currently there is no function to * calculate the maximum expansion of multi-call encoding. */ extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size) lzma_nothrow; /** * \brief Single-call .xz Stream encoder * * \param filters Array of filters. This must be terminated with * filters[n].id = LZMA_VLI_UNKNOWN. See filter.h * for more information. * \param check Type of the integrity check to calculate from * uncompressed data. * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() and free(). * \param in Beginning of the input buffer * \param in_size Size of the input buffer * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if encoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return - LZMA_OK: Encoding was successful. * - LZMA_BUF_ERROR: Not enough output buffer space. * - LZMA_UNSUPPORTED_CHECK * - LZMA_OPTIONS_ERROR * - LZMA_MEM_ERROR * - LZMA_DATA_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode( lzma_filter *filters, lzma_check check, const lzma_allocator *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result; /************ * Decoding * ************/ /** * This flag makes lzma_code() return LZMA_NO_CHECK if the input stream * being decoded has no integrity check. Note that when used with * lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK * if LZMA_TELL_NO_CHECK is used. */ #define LZMA_TELL_NO_CHECK UINT32_C(0x01) /** * This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input * stream has an integrity check, but the type of the integrity check is not * supported by this liblzma version or build. Such files can still be * decoded, but the integrity check cannot be verified. */ #define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02) /** * This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type * of the integrity check is known. The type can then be got with * lzma_get_check(). */ #define LZMA_TELL_ANY_CHECK UINT32_C(0x04) /** * This flag makes lzma_code() not calculate and verify the integrity check * of the compressed data in .xz files. This means that invalid integrity * check values won't be detected and LZMA_DATA_ERROR won't be returned in * such cases. * * This flag only affects the checks of the compressed data itself; the CRC32 * values in the .xz headers will still be verified normally. * * Don't use this flag unless you know what you are doing. Possible reasons * to use this flag: * * - Trying to recover data from a corrupt .xz file. * * - Speeding up decompression, which matters mostly with SHA-256 * or with files that have compressed extremely well. It's recommended * to not use this flag for this purpose unless the file integrity is * verified externally in some other way. * * Support for this flag was added in liblzma 5.1.4beta. */ #define LZMA_IGNORE_CHECK UINT32_C(0x10) /** * This flag enables decoding of concatenated files with file formats that * allow concatenating compressed files as is. From the formats currently * supported by liblzma, only the .xz format allows concatenated files. * Concatenated files are not allowed with the legacy .lzma format. * * This flag also affects the usage of the `action' argument for lzma_code(). * When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END * unless LZMA_FINISH is used as `action'. Thus, the application has to set * LZMA_FINISH in the same way as it does when encoding. * * If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH * as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required. */ #define LZMA_CONCATENATED UINT32_C(0x08) /** * \brief Initialize .xz Stream decoder * * \param strm Pointer to properly prepared lzma_stream * \param memlimit Memory usage limit as bytes. Use UINT64_MAX * to effectively disable the limiter. liblzma * 5.2.3 and earlier don't allow 0 here and return * LZMA_PROG_ERROR; later versions treat 0 as if 1 * had been specified. * \param flags Bitwise-or of zero or more of the decoder flags: * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, * LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED * * \return - LZMA_OK: Initialization was successful. * - LZMA_MEM_ERROR: Cannot allocate memory. * - LZMA_OPTIONS_ERROR: Unsupported flags * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_stream_decoder( lzma_stream *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Decode .xz Streams and .lzma files with autodetection * * This decoder autodetects between the .xz and .lzma file formats, and * calls lzma_stream_decoder() or lzma_alone_decoder() once the type * of the input file has been detected. * * \param strm Pointer to properly prepared lzma_stream * \param memlimit Memory usage limit as bytes. Use UINT64_MAX * to effectively disable the limiter. liblzma * 5.2.3 and earlier don't allow 0 here and return * LZMA_PROG_ERROR; later versions treat 0 as if 1 * had been specified. * \param flags Bitwise-or of flags, or zero for no flags. * * \return - LZMA_OK: Initialization was successful. * - LZMA_MEM_ERROR: Cannot allocate memory. * - LZMA_OPTIONS_ERROR: Unsupported flags * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_auto_decoder( lzma_stream *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Initialize .lzma decoder (legacy file format) * * \param strm Pointer to properly prepared lzma_stream * \param memlimit Memory usage limit as bytes. Use UINT64_MAX * to effectively disable the limiter. liblzma * 5.2.3 and earlier don't allow 0 here and return * LZMA_PROG_ERROR; later versions treat 0 as if 1 * had been specified. * * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. * There is no need to use LZMA_FINISH, but it's allowed because it may * simplify certain types of applications. * * \return - LZMA_OK * - LZMA_MEM_ERROR * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_alone_decoder( lzma_stream *strm, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result; /** * \brief Single-call .xz Stream decoder * * \param memlimit Pointer to how much memory the decoder is allowed * to allocate. The value pointed by this pointer is * modified if and only if LZMA_MEMLIMIT_ERROR is * returned. * \param flags Bitwise-or of zero or more of the decoder flags: * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, * LZMA_CONCATENATED. Note that LZMA_TELL_ANY_CHECK * is not allowed and will return LZMA_PROG_ERROR. * \param allocator lzma_allocator for custom allocator functions. * Set to NULL to use malloc() and free(). * \param in Beginning of the input buffer * \param in_pos The next byte will be read from in[*in_pos]. * *in_pos is updated only if decoding succeeds. * \param in_size Size of the input buffer; the first byte that * won't be read is in[in_size]. * \param out Beginning of the output buffer * \param out_pos The next byte will be written to out[*out_pos]. * *out_pos is updated only if decoding succeeds. * \param out_size Size of the out buffer; the first byte into * which no data is written to is out[out_size]. * * \return - LZMA_OK: Decoding was successful. * - LZMA_FORMAT_ERROR * - LZMA_OPTIONS_ERROR * - LZMA_DATA_ERROR * - LZMA_NO_CHECK: This can be returned only if using * the LZMA_TELL_NO_CHECK flag. * - LZMA_UNSUPPORTED_CHECK: This can be returned only if using * the LZMA_TELL_UNSUPPORTED_CHECK flag. * - LZMA_MEM_ERROR * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. * The minimum required memlimit value was stored to *memlimit. * - LZMA_BUF_ERROR: Output buffer was too small. * - LZMA_PROG_ERROR */ extern LZMA_API(lzma_ret) lzma_stream_buffer_decode( uint64_t *memlimit, uint32_t flags, const lzma_allocator *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result; PKZT#- - lzma/hardware.hnu[/** * \file lzma/hardware.h * \brief Hardware information * * Since liblzma can consume a lot of system resources, it also provides * ways to limit the resource usage. Applications linking against liblzma * need to do the actual decisions how much resources to let liblzma to use. * To ease making these decisions, liblzma provides functions to find out * the relevant capabilities of the underlaying hardware. Currently there * is only a function to find out the amount of RAM, but in the future there * will be also a function to detect how many concurrent threads the system * can run. * * \note On some operating systems, these function may temporarily * load a shared library or open file descriptor(s) to find out * the requested hardware information. Unless the application * assumes that specific file descriptors are not touched by * other threads, this should have no effect on thread safety. * Possible operations involving file descriptors will restart * the syscalls if they return EINTR. */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Get the total amount of physical memory (RAM) in bytes * * This function may be useful when determining a reasonable memory * usage limit for decompressing or how much memory it is OK to use * for compressing. * * \return On success, the total amount of physical memory in bytes * is returned. If the amount of RAM cannot be determined, * zero is returned. This can happen if an error occurs * or if there is no code in liblzma to detect the amount * of RAM on the specific operating system. */ extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow; /** * \brief Get the number of processor cores or threads * * This function may be useful when determining how many threads to use. * If the hardware supports more than one thread per CPU core, the number * of hardware threads is returned if that information is available. * * \brief On success, the number of available CPU threads or cores is * returned. If this information isn't available or an error * occurs, zero is returned. */ extern LZMA_API(uint32_t) lzma_cputhreads(void) lzma_nothrow; PKZΗ99 lzma/lzma12.hnu[/** * \file lzma/lzma12.h * \brief LZMA1 and LZMA2 filters */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief LZMA1 Filter ID * * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils, * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from * accidentally using LZMA when they actually want LZMA2. * * LZMA1 shouldn't be used for new applications unless you _really_ know * what you are doing. LZMA2 is almost always a better choice. */ #define LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001) /** * \brief LZMA2 Filter ID * * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion * when trying to compress uncompressible data), possibility to change * lc/lp/pb in the middle of encoding, and some other internal improvements. */ #define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21) /** * \brief Match finders * * Match finder has major effect on both speed and compression ratio. * Usually hash chains are faster than binary trees. * * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better * choice, because binary trees get much higher compression ratio penalty * with LZMA_SYNC_FLUSH. * * The memory usage formulas are only rough estimates, which are closest to * reality when dict_size is a power of two. The formulas are more complex * in reality, and can also change a little between liblzma versions. Use * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage. */ typedef enum { LZMA_MF_HC3 = 0x03, /**< * \brief Hash Chain with 2- and 3-byte hashing * * Minimum nice_len: 3 * * Memory usage: * - dict_size <= 16 MiB: dict_size * 7.5 * - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB */ LZMA_MF_HC4 = 0x04, /**< * \brief Hash Chain with 2-, 3-, and 4-byte hashing * * Minimum nice_len: 4 * * Memory usage: * - dict_size <= 32 MiB: dict_size * 7.5 * - dict_size > 32 MiB: dict_size * 6.5 */ LZMA_MF_BT2 = 0x12, /**< * \brief Binary Tree with 2-byte hashing * * Minimum nice_len: 2 * * Memory usage: dict_size * 9.5 */ LZMA_MF_BT3 = 0x13, /**< * \brief Binary Tree with 2- and 3-byte hashing * * Minimum nice_len: 3 * * Memory usage: * - dict_size <= 16 MiB: dict_size * 11.5 * - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB */ LZMA_MF_BT4 = 0x14 /**< * \brief Binary Tree with 2-, 3-, and 4-byte hashing * * Minimum nice_len: 4 * * Memory usage: * - dict_size <= 32 MiB: dict_size * 11.5 * - dict_size > 32 MiB: dict_size * 10.5 */ } lzma_match_finder; /** * \brief Test if given match finder is supported * * Return true if the given match finder is supported by this liblzma build. * Otherwise false is returned. It is safe to call this with a value that * isn't listed in lzma_match_finder enumeration; the return value will be * false. * * There is no way to list which match finders are available in this * particular liblzma version and build. It would be useless, because * a new match finder, which the application developer wasn't aware, * could require giving additional options to the encoder that the older * match finders don't need. */ extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder) lzma_nothrow lzma_attr_const; /** * \brief Compression modes * * This selects the function used to analyze the data produced by the match * finder. */ typedef enum { LZMA_MODE_FAST = 1, /**< * \brief Fast compression * * Fast mode is usually at its best when combined with * a hash chain match finder. */ LZMA_MODE_NORMAL = 2 /**< * \brief Normal compression * * This is usually notably slower than fast mode. Use this * together with binary tree match finders to expose the * full potential of the LZMA1 or LZMA2 encoder. */ } lzma_mode; /** * \brief Test if given compression mode is supported * * Return true if the given compression mode is supported by this liblzma * build. Otherwise false is returned. It is safe to call this with a value * that isn't listed in lzma_mode enumeration; the return value will be false. * * There is no way to list which modes are available in this particular * liblzma version and build. It would be useless, because a new compression * mode, which the application developer wasn't aware, could require giving * additional options to the encoder that the older modes don't need. */ extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode) lzma_nothrow lzma_attr_const; /** * \brief Options specific to the LZMA1 and LZMA2 filters * * Since LZMA1 and LZMA2 share most of the code, it's simplest to share * the options structure too. For encoding, all but the reserved variables * need to be initialized unless specifically mentioned otherwise. * lzma_lzma_preset() can be used to get a good starting point. * * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb. */ typedef struct { /** * \brief Dictionary size in bytes * * Dictionary size indicates how many bytes of the recently processed * uncompressed data is kept in memory. One method to reduce size of * the uncompressed data is to store distance-length pairs, which * indicate what data to repeat from the dictionary buffer. Thus, * the bigger the dictionary, the better the compression ratio * usually is. * * Maximum size of the dictionary depends on multiple things: * - Memory usage limit * - Available address space (not a problem on 64-bit systems) * - Selected match finder (encoder only) * * Currently the maximum dictionary size for encoding is 1.5 GiB * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit * systems for certain match finder implementation reasons. In the * future, there may be match finders that support bigger * dictionaries. * * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e. * UINT32_MAX), so increasing the maximum dictionary size of the * encoder won't cause problems for old decoders. * * Because extremely small dictionaries sizes would have unneeded * overhead in the decoder, the minimum dictionary size is 4096 bytes. * * \note When decoding, too big dictionary does no other harm * than wasting memory. */ uint32_t dict_size; # define LZMA_DICT_SIZE_MIN UINT32_C(4096) # define LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23) /** * \brief Pointer to an initial dictionary * * It is possible to initialize the LZ77 history window using * a preset dictionary. It is useful when compressing many * similar, relatively small chunks of data independently from * each other. The preset dictionary should contain typical * strings that occur in the files being compressed. The most * probable strings should be near the end of the preset dictionary. * * This feature should be used only in special situations. For * now, it works correctly only with raw encoding and decoding. * Currently none of the container formats supported by * liblzma allow preset dictionary when decoding, thus if * you create a .xz or .lzma file with preset dictionary, it * cannot be decoded with the regular decoder functions. In the * future, the .xz format will likely get support for preset * dictionary though. */ const uint8_t *preset_dict; /** * \brief Size of the preset dictionary * * Specifies the size of the preset dictionary. If the size is * bigger than dict_size, only the last dict_size bytes are * processed. * * This variable is read only when preset_dict is not NULL. * If preset_dict is not NULL but preset_dict_size is zero, * no preset dictionary is used (identical to only setting * preset_dict to NULL). */ uint32_t preset_dict_size; /** * \brief Number of literal context bits * * How many of the highest bits of the previous uncompressed * eight-bit byte (also known as `literal') are taken into * account when predicting the bits of the next literal. * * E.g. in typical English text, an upper-case letter is * often followed by a lower-case letter, and a lower-case * letter is usually followed by another lower-case letter. * In the US-ASCII character set, the highest three bits are 010 * for upper-case letters and 011 for lower-case letters. * When lc is at least 3, the literal coding can take advantage of * this property in the uncompressed data. * * There is a limit that applies to literal context bits and literal * position bits together: lc + lp <= 4. Without this limit the * decoding could become very slow, which could have security related * results in some cases like email servers doing virus scanning. * This limit also simplifies the internal implementation in liblzma. * * There may be LZMA1 streams that have lc + lp > 4 (maximum possible * lc would be 8). It is not possible to decode such streams with * liblzma. */ uint32_t lc; # define LZMA_LCLP_MIN 0 # define LZMA_LCLP_MAX 4 # define LZMA_LC_DEFAULT 3 /** * \brief Number of literal position bits * * lp affects what kind of alignment in the uncompressed data is * assumed when encoding literals. A literal is a single 8-bit byte. * See pb below for more information about alignment. */ uint32_t lp; # define LZMA_LP_DEFAULT 0 /** * \brief Number of position bits * * pb affects what kind of alignment in the uncompressed data is * assumed in general. The default means four-byte alignment * (2^ pb =2^2=4), which is often a good choice when there's * no better guess. * * When the aligment is known, setting pb accordingly may reduce * the file size a little. E.g. with text files having one-byte * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can * improve compression slightly. For UTF-16 text, pb=1 is a good * choice. If the alignment is an odd number like 3 bytes, pb=0 * might be the best choice. * * Even though the assumed alignment can be adjusted with pb and * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment. * It might be worth taking into account when designing file formats * that are likely to be often compressed with LZMA1 or LZMA2. */ uint32_t pb; # define LZMA_PB_MIN 0 # define LZMA_PB_MAX 4 # define LZMA_PB_DEFAULT 2 /** Compression mode */ lzma_mode mode; /** * \brief Nice length of a match * * This determines how many bytes the encoder compares from the match * candidates when looking for the best match. Once a match of at * least nice_len bytes long is found, the encoder stops looking for * better candidates and encodes the match. (Naturally, if the found * match is actually longer than nice_len, the actual length is * encoded; it's not truncated to nice_len.) * * Bigger values usually increase the compression ratio and * compression time. For most files, 32 to 128 is a good value, * which gives very good compression ratio at good speed. * * The exact minimum value depends on the match finder. The maximum * is 273, which is the maximum length of a match that LZMA1 and * LZMA2 can encode. */ uint32_t nice_len; /** Match finder ID */ lzma_match_finder mf; /** * \brief Maximum search depth in the match finder * * For every input byte, match finder searches through the hash chain * or binary tree in a loop, each iteration going one step deeper in * the chain or tree. The searching stops if * - a match of at least nice_len bytes long is found; * - all match candidates from the hash chain or binary tree have * been checked; or * - maximum search depth is reached. * * Maximum search depth is needed to prevent the match finder from * wasting too much time in case there are lots of short match * candidates. On the other hand, stopping the search before all * candidates have been checked can reduce compression ratio. * * Setting depth to zero tells liblzma to use an automatic default * value, that depends on the selected match finder and nice_len. * The default is in the range [4, 200] or so (it may vary between * liblzma versions). * * Using a bigger depth value than the default can increase * compression ratio in some cases. There is no strict maximum value, * but high values (thousands or millions) should be used with care: * the encoder could remain fast enough with typical input, but * malicious input could cause the match finder to slow down * dramatically, possibly creating a denial of service attack. */ uint32_t depth; /* * Reserved space to allow possible future extensions without * breaking the ABI. You should not touch these, because the names * of these variables may change. These are and will never be used * with the currently supported options, so it is safe to leave these * uninitialized. */ uint32_t reserved_int1; uint32_t reserved_int2; uint32_t reserved_int3; uint32_t reserved_int4; uint32_t reserved_int5; uint32_t reserved_int6; uint32_t reserved_int7; uint32_t reserved_int8; lzma_reserved_enum reserved_enum1; lzma_reserved_enum reserved_enum2; lzma_reserved_enum reserved_enum3; lzma_reserved_enum reserved_enum4; void *reserved_ptr1; void *reserved_ptr2; } lzma_options_lzma; /** * \brief Set a compression preset to lzma_options_lzma structure * * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9 * of the xz command line tool. In addition, it is possible to bitwise-or * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported. * The flags are defined in container.h, because the flags are used also * with lzma_easy_encoder(). * * The preset values are subject to changes between liblzma versions. * * This function is available only if LZMA1 or LZMA2 encoder has been enabled * when building liblzma. * * \return On success, false is returned. If the preset is not * supported, true is returned. */ extern LZMA_API(lzma_bool) lzma_lzma_preset( lzma_options_lzma *options, uint32_t preset) lzma_nothrow; PKZgi^II lzma/delta.hnu[/** * \file lzma/delta.h * \brief Delta filter */ /* * Author: Lasse Collin * * This file has been put into the public domain. * You can do whatever you want with this file. * * See ../lzma.h for information about liblzma as a whole. */ #ifndef LZMA_H_INTERNAL # error Never include this file directly. Use instead. #endif /** * \brief Filter ID * * Filter ID of the Delta filter. This is used as lzma_filter.id. */ #define LZMA_FILTER_DELTA LZMA_VLI_C(0x03) /** * \brief Type of the delta calculation * * Currently only byte-wise delta is supported. Other possible types could * be, for example, delta of 16/32/64-bit little/big endian integers, but * these are not currently planned since byte-wise delta is almost as good. */ typedef enum { LZMA_DELTA_TYPE_BYTE } lzma_delta_type; /** * \brief Options for the Delta filter * * These options are needed by both encoder and decoder. */ typedef struct { /** For now, this must always be LZMA_DELTA_TYPE_BYTE. */ lzma_delta_type type; /** * \brief Delta distance * * With the only currently supported type, LZMA_DELTA_TYPE_BYTE, * the distance is as bytes. * * Examples: * - 16-bit stereo audio: distance = 4 bytes * - 24-bit RGB image data: distance = 3 bytes */ uint32_t dist; # define LZMA_DELTA_DIST_MIN 1 # define LZMA_DELTA_DIST_MAX 256 /* * Reserved space to allow possible future extensions without * breaking the ABI. You should not touch these, because the names * of these variables may change. These are and will never be used * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these * uninitialized. */ uint32_t reserved_int1; uint32_t reserved_int2; uint32_t reserved_int3; uint32_t reserved_int4; void *reserved_ptr1; void *reserved_ptr2; } lzma_options_delta; PKZJծa.out.hnu[#ifndef __A_OUT_GNU_H__ #define __A_OUT_GNU_H__ #include #define __GNU_EXEC_MACROS__ struct exec { unsigned long a_info; /* Use macros N_MAGIC, etc for access. */ unsigned int a_text; /* Length of text, in bytes. */ unsigned int a_data; /* Length of data, in bytes. */ unsigned int a_bss; /* Length of uninitialized data area for file, in bytes. */ unsigned int a_syms; /* Length of symbol table data in file, in bytes. */ unsigned int a_entry; /* Start address. */ unsigned int a_trsize;/* Length of relocation info for text, in bytes. */ unsigned int a_drsize;/* Length of relocation info for data, in bytes. */ }; enum machine_type { M_OLDSUN2 = 0, M_68010 = 1, M_68020 = 2, M_SPARC = 3, M_386 = 100, M_MIPS1 = 151, M_MIPS2 = 152 }; #define N_MAGIC(exec) ((exec).a_info & 0xffff) #define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) #define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) #define N_SET_INFO(exec, magic, type, flags) \ ((exec).a_info = ((magic) & 0xffff) \ | (((int)(type) & 0xff) << 16) \ | (((flags) & 0xff) << 24)) #define N_SET_MAGIC(exec, magic) \ ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff)) #define N_SET_MACHTYPE(exec, machtype) \ ((exec).a_info = \ ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) #define N_SET_FLAGS(exec, flags) \ ((exec).a_info = \ ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) /* Code indicating object file or impure executable. */ #define OMAGIC 0407 /* Code indicating pure executable. */ #define NMAGIC 0410 /* Code indicating demand-paged executable. */ #define ZMAGIC 0413 /* This indicates a demand-paged executable with the header in the text. The first page is unmapped to help trap NULL pointer references. */ #define QMAGIC 0314 /* Code indicating core file. */ #define CMAGIC 0421 #define N_TRSIZE(a) ((a).a_trsize) #define N_DRSIZE(a) ((a).a_drsize) #define N_SYMSIZE(a) ((a).a_syms) #define N_BADMAG(x) \ (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) #define _N_HDROFF(x) (1024 - sizeof (struct exec)) #define N_TXTOFF(x) \ (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \ (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec))) #define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) #define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) #define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) #define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x)) #define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x)) /* Address of text segment in memory after it is loaded. */ #define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? 4096 : 0) /* Address of data segment in memory after it is loaded. */ #define SEGMENT_SIZE 1024 #define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) #define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) #define N_DATADDR(x) \ (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \ : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) #define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data) #if !defined (N_NLIST_DECLARED) struct nlist { union { char *n_name; struct nlist *n_next; long n_strx; } n_un; unsigned char n_type; char n_other; short n_desc; unsigned long n_value; }; #endif /* no N_NLIST_DECLARED. */ #define N_UNDF 0 #define N_ABS 2 #define N_TEXT 4 #define N_DATA 6 #define N_BSS 8 #define N_FN 15 #define N_EXT 1 #define N_TYPE 036 #define N_STAB 0340 #define N_INDR 0xa #define N_SETA 0x14 /* Absolute set element symbol. */ #define N_SETT 0x16 /* Text set element symbol. */ #define N_SETD 0x18 /* Data set element symbol. */ #define N_SETB 0x1A /* Bss set element symbol. */ #define N_SETV 0x1C /* Pointer to set vector in data area. */ #if !defined (N_RELOCATION_INFO_DECLARED) /* This structure describes a single relocation to be performed. The text-relocation section of the file is a vector of these structures, all of which apply to the text section. Likewise, the data-relocation section applies to the data section. */ struct relocation_info { int r_address; unsigned int r_symbolnum:24; unsigned int r_pcrel:1; unsigned int r_length:2; unsigned int r_extern:1; unsigned int r_pad:4; }; #endif /* no N_RELOCATION_INFO_DECLARED. */ #endif /* __A_OUT_GNU_H__ */ PKZ ;p fmtmsg.hnu[/* Message display handling. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __FMTMSG_H #define __FMTMSG_H 1 #include __BEGIN_DECLS /* Values to control `fmtmsg' function. */ enum { MM_HARD = 0x001, /* Source of the condition is hardware. */ #define MM_HARD MM_HARD MM_SOFT = 0x002, /* Source of the condition is software. */ #define MM_SOFT MM_SOFT MM_FIRM = 0x004, /* Source of the condition is firmware. */ #define MM_FIRM MM_FIRM MM_APPL = 0x008, /* Condition detected by application. */ #define MM_APPL MM_APPL MM_UTIL = 0x010, /* Condition detected by utility. */ #define MM_UTIL MM_UTIL MM_OPSYS = 0x020, /* Condition detected by operating system. */ #define MM_OPSYS MM_OPSYS MM_RECOVER = 0x040, /* Recoverable error. */ #define MM_RECOVER MM_RECOVER MM_NRECOV = 0x080, /* Non-recoverable error. */ #define MM_NRECOV MM_NRECOV MM_PRINT = 0x100, /* Display message in standard error. */ #define MM_PRINT MM_PRINT MM_CONSOLE = 0x200 /* Display message on system console. */ #define MM_CONSOLE MM_CONSOLE }; /* Values to be for SEVERITY parameter of `fmtmsg'. */ enum { MM_NOSEV = 0, /* No severity level provided for the message. */ #define MM_NOSEV MM_NOSEV MM_HALT, /* Error causing application to halt. */ #define MM_HALT MM_HALT MM_ERROR, /* Application has encountered a non-fatal fault. */ #define MM_ERROR MM_ERROR MM_WARNING, /* Application has detected unusual non-error condition. */ #define MM_WARNING MM_WARNING MM_INFO /* Informative message. */ #define MM_INFO MM_INFO }; /* Macros which can be used as null values for the arguments of `fmtmsg'. */ #define MM_NULLLBL ((char *) 0) #define MM_NULLSEV 0 #define MM_NULLMC ((long int) 0) #define MM_NULLTXT ((char *) 0) #define MM_NULLACT ((char *) 0) #define MM_NULLTAG ((char *) 0) /* Possible return values of `fmtmsg'. */ enum { MM_NOTOK = -1, #define MM_NOTOK MM_NOTOK MM_OK = 0, #define MM_OK MM_OK MM_NOMSG = 1, #define MM_NOMSG MM_NOMSG MM_NOCON = 4 #define MM_NOCON MM_NOCON }; /* Print message with given CLASSIFICATION, LABEL, SEVERITY, TEXT, ACTION and TAG to console or standard error. */ extern int fmtmsg (long int __classification, const char *__label, int __severity, const char *__text, const char *__action, const char *__tag); #ifdef __USE_MISC /* Add or remove severity level. */ extern int addseverity (int __severity, const char *__string) __THROW; #endif __END_DECLS #endif /* fmtmsg.h */ PKZԄ2 fpu_control.hnu[/* FPU control word bits. x86 version. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Olaf Flebbe. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FPU_CONTROL_H #define _FPU_CONTROL_H 1 /* Note that this file sets on x86-64 only the x87 FPU, it does not touch the SSE unit. */ /* Here is the dirty part. Set up your 387 through the control word * (cw) register. * * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM * * IM: Invalid operation mask * DM: Denormalized operand mask * ZM: Zero-divide mask * OM: Overflow mask * UM: Underflow mask * PM: Precision (inexact result) mask * * Mask bit is 1 means no interrupt. * * PC: Precision control * 11 - round to extended precision * 10 - round to double precision * 00 - round to single precision * * RC: Rounding control * 00 - rounding to nearest * 01 - rounding down (toward - infinity) * 10 - rounding up (toward + infinity) * 11 - rounding toward zero * * IC: Infinity control * That is for 8087 and 80287 only. * * The hardware default is 0x037f which we use. */ #include /* masking of interrupts */ #define _FPU_MASK_IM 0x01 #define _FPU_MASK_DM 0x02 #define _FPU_MASK_ZM 0x04 #define _FPU_MASK_OM 0x08 #define _FPU_MASK_UM 0x10 #define _FPU_MASK_PM 0x20 /* precision control */ #define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */ #define _FPU_DOUBLE 0x200 #define _FPU_SINGLE 0x0 /* rounding control */ #define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ #define _FPU_RC_DOWN 0x400 #define _FPU_RC_UP 0x800 #define _FPU_RC_ZERO 0xC00 #define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */ /* The fdlibm code requires strict IEEE double precision arithmetic, and no interrupts for exceptions, rounding to nearest. */ #define _FPU_DEFAULT 0x037f /* IEEE: same as above. */ #define _FPU_IEEE 0x037f /* Type of the control word. */ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); /* Macros for accessing the hardware control word. "*&" is used to work around a bug in older versions of GCC. __volatile__ is used to support combination of writing the control register and reading it back. Without __volatile__, the old value may be used for reading back under compiler optimization. Note that the use of these macros is not sufficient anymore with recent hardware nor on x86-64. Some floating point operations are executed in the SSE/SSE2 engines which have their own control and status register. */ #define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw)) #define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw)) /* Default control word set at startup. */ extern fpu_control_t __fpu_control; #endif /* fpu_control.h */ PKZKgNȀ gnu/stubs.hnu[/* This file is automatically generated. This file selects the right generated file of `__stub_FUNCTION' macros based on the architecture being compiled for. */ #if !defined __x86_64__ # include #endif #if defined __x86_64__ && defined __LP64__ # include #endif #if defined __x86_64__ && defined __ILP32__ # include #endif PKZcqseegnu/stubs-64.hnu[/* This file is automatically generated. It defines a symbol `__stub_FUNCTION' for each function in the C library which is a stub, meaning it will fail every time called, usually setting errno to ENOSYS. */ #ifdef _LIBC #error Applications may not define the macro _LIBC #endif #define __stub___compat_bdflush #define __stub_chflags #define __stub_fattach #define __stub_fchflags #define __stub_fdetach #define __stub_getmsg #define __stub_gtty #define __stub_lchmod #define __stub_putmsg #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn #define __stub_sstk #define __stub_stty PKZ^|hgnu/libc-version.hnu[/* Interface to GNU libc specific functions for version information. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GNU_LIBC_VERSION_H #define _GNU_LIBC_VERSION_H 1 #include __BEGIN_DECLS /* Return string describing release status of currently running GNU libc. */ extern const char *gnu_get_libc_release (void) __THROW; /* Return string describing version of currently running GNU libc. */ extern const char *gnu_get_libc_version (void) __THROW; __END_DECLS #endif /* gnu/libc-version.h */ PKZgnu/lib-names.hnu[/* This file is automatically generated. It defines macros to allow user program to find the shared library files which come as part of GNU libc. */ #ifndef __GNU_LIB_NAMES_H #define __GNU_LIB_NAMES_H 1 #if !defined __x86_64__ # include #endif #if defined __x86_64__ && defined __LP64__ # include #endif #if defined __x86_64__ && defined __ILP32__ # include #endif #endif /* gnu/lib-names.h */ PKZTrgnu/lib-names-64.hnu[/* This file is automatically generated. */ #ifndef __GNU_LIB_NAMES_H # error "Never use directly; include instead." #endif #define LD_LINUX_X86_64_SO "ld-linux-x86-64.so.2" #define LD_SO "ld-linux-x86-64.so.2" #define LIBANL_SO "libanl.so.1" #define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" #define LIBCRYPT_SO "libcrypt.so.1" #define LIBC_SO "libc.so.6" #define LIBDL_SO "libdl.so.2" #define LIBGCC_S_SO "libgcc_s.so.1" #define LIBMVEC_SO "libmvec.so.1" #define LIBM_SO "libm.so.6" #define LIBNSL_SO "libnsl.so.1" #define LIBNSS_COMPAT_SO "libnss_compat.so.2" #define LIBNSS_DB_SO "libnss_db.so.2" #define LIBNSS_DNS_SO "libnss_dns.so.2" #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" #define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" #define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" #define LIBRESOLV_SO "libresolv.so.2" #define LIBRT_SO "librt.so.1" #define LIBTHREAD_DB_SO "libthread_db.so.1" #define LIBUTIL_SO "libutil.so.1" PKZBz tiffvers.hnu[#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.9\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." /* * This define can be used in code that requires * compilation-related definitions specific to a * version or versions of the library. Runtime * version checking should be done based on the * string returned by TIFFGetVersion. */ #define TIFFLIB_VERSION 20171118 PKZBB entities.hnu[/* * Generated file - do not edit directly. * * This file was generated from: * http://www.w3.org/TR/REC-html40/sgml/entities.html * by means of the script: * entities.tcl */ #ifdef __cplusplus extern "C" { #endif static struct entities_s { char *name; int value; } entities[] = { {"AElig", 198}, {"Aacute", 193}, {"Acirc", 194}, {"Agrave", 192}, {"Alpha", 913}, {"Aring", 197}, {"Atilde", 195}, {"Auml", 196}, {"Beta", 914}, {"Ccedil", 199}, {"Chi", 935}, {"Dagger", 8225}, {"Delta", 916}, {"ETH", 208}, {"Eacute", 201}, {"Ecirc", 202}, {"Egrave", 200}, {"Epsilon", 917}, {"Eta", 919}, {"Euml", 203}, {"Gamma", 915}, {"Iacute", 205}, {"Icirc", 206}, {"Igrave", 204}, {"Iota", 921}, {"Iuml", 207}, {"Kappa", 922}, {"Lambda", 923}, {"Mu", 924}, {"Ntilde", 209}, {"Nu", 925}, {"OElig", 338}, {"Oacute", 211}, {"Ocirc", 212}, {"Ograve", 210}, {"Omega", 937}, {"Omicron", 927}, {"Oslash", 216}, {"Otilde", 213}, {"Ouml", 214}, {"Phi", 934}, {"Pi", 928}, {"Prime", 8243}, {"Psi", 936}, {"Rho", 929}, {"Scaron", 352}, {"Sigma", 931}, {"THORN", 222}, {"Tau", 932}, {"Theta", 920}, {"Uacute", 218}, {"Ucirc", 219}, {"Ugrave", 217}, {"Upsilon", 933}, {"Uuml", 220}, {"Xi", 926}, {"Yacute", 221}, {"Yuml", 376}, {"Zeta", 918}, {"aacute", 225}, {"acirc", 226}, {"acute", 180}, {"aelig", 230}, {"agrave", 224}, {"alefsym", 8501}, {"alpha", 945}, {"amp", 38}, {"and", 8743}, {"ang", 8736}, {"aring", 229}, {"asymp", 8776}, {"atilde", 227}, {"auml", 228}, {"bdquo", 8222}, {"beta", 946}, {"brvbar", 166}, {"bull", 8226}, {"cap", 8745}, {"ccedil", 231}, {"cedil", 184}, {"cent", 162}, {"chi", 967}, {"circ", 710}, {"clubs", 9827}, {"cong", 8773}, {"copy", 169}, {"crarr", 8629}, {"cup", 8746}, {"curren", 164}, {"dArr", 8659}, {"dagger", 8224}, {"darr", 8595}, {"deg", 176}, {"delta", 948}, {"diams", 9830}, {"divide", 247}, {"eacute", 233}, {"ecirc", 234}, {"egrave", 232}, {"empty", 8709}, {"emsp", 8195}, {"ensp", 8194}, {"epsilon", 949}, {"equiv", 8801}, {"eta", 951}, {"eth", 240}, {"euml", 235}, {"euro", 8364}, {"exist", 8707}, {"fnof", 402}, {"forall", 8704}, {"frac12", 189}, {"frac14", 188}, {"frac34", 190}, {"frasl", 8260}, {"gamma", 947}, {"ge", 8805}, {"gt", 62}, {"hArr", 8660}, {"harr", 8596}, {"hearts", 9829}, {"hellip", 8230}, {"iacute", 237}, {"icirc", 238}, {"iexcl", 161}, {"igrave", 236}, {"image", 8465}, {"infin", 8734}, {"int", 8747}, {"iota", 953}, {"iquest", 191}, {"isin", 8712}, {"iuml", 239}, {"kappa", 954}, {"lArr", 8656}, {"lambda", 955}, {"lang", 9001}, {"laquo", 171}, {"larr", 8592}, {"lceil", 8968}, {"ldquo", 8220}, {"le", 8804}, {"lfloor", 8970}, {"lowast", 8727}, {"loz", 9674}, {"lrm", 8206}, {"lsaquo", 8249}, {"lsquo", 8216}, {"lt", 60}, {"macr", 175}, {"mdash", 8212}, {"micro", 181}, {"middot", 183}, {"minus", 8722}, {"mu", 956}, {"nabla", 8711}, {"nbsp", 160}, {"ndash", 8211}, {"ne", 8800}, {"ni", 8715}, {"not", 172}, {"notin", 8713}, {"nsub", 8836}, {"ntilde", 241}, {"nu", 957}, {"oacute", 243}, {"ocirc", 244}, {"oelig", 339}, {"ograve", 242}, {"oline", 8254}, {"omega", 969}, {"omicron", 959}, {"oplus", 8853}, {"or", 8744}, {"ordf", 170}, {"ordm", 186}, {"oslash", 248}, {"otilde", 245}, {"otimes", 8855}, {"ouml", 246}, {"para", 182}, {"part", 8706}, {"permil", 8240}, {"perp", 8869}, {"phi", 966}, {"pi", 960}, {"piv", 982}, {"plusmn", 177}, {"pound", 163}, {"prime", 8242}, {"prod", 8719}, {"prop", 8733}, {"psi", 968}, {"quot", 34}, {"rArr", 8658}, {"radic", 8730}, {"rang", 9002}, {"raquo", 187}, {"rarr", 8594}, {"rceil", 8969}, {"rdquo", 8221}, {"real", 8476}, {"reg", 174}, {"rfloor", 8971}, {"rho", 961}, {"rlm", 8207}, {"rsaquo", 8250}, {"rsquo", 8217}, {"sbquo", 8218}, {"scaron", 353}, {"sdot", 8901}, {"sect", 167}, {"shy", 173}, {"sigma", 963}, {"sigmaf", 962}, {"sim", 8764}, {"spades", 9824}, {"sub", 8834}, {"sube", 8838}, {"sum", 8721}, {"sup", 8835}, {"sup1", 185}, {"sup2", 178}, {"sup3", 179}, {"supe", 8839}, {"szlig", 223}, {"tau", 964}, {"there4", 8756}, {"theta", 952}, {"thetasym", 977}, {"thinsp", 8201}, {"thorn", 254}, {"tilde", 732}, {"times", 215}, {"trade", 8482}, {"uArr", 8657}, {"uacute", 250}, {"uarr", 8593}, {"ucirc", 251}, {"ugrave", 249}, {"uml", 168}, {"upsih", 978}, {"upsilon", 965}, {"uuml", 252}, {"weierp", 8472}, {"xi", 958}, {"yacute", 253}, {"yen", 165}, {"yuml", 255}, {"zeta", 950}, {"zwj", 8205}, {"zwnj", 8204}, }; #define ENTITY_NAME_LENGTH_MAX 8 #define NR_OF_ENTITIES 252 #ifdef __cplusplus } #endif PKZ bp#KKverto.hnu[/* * Copyright 2011 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation files * (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef VERTO_H_ #define VERTO_H_ #include /* For time_t */ #include /* For pid_t */ #ifdef WIN32 #include typedef HANDLE verto_proc; typedef DWORD verto_proc_status; #else #include typedef pid_t verto_proc; typedef int verto_proc_status; #endif #define VERTO_SIG_IGN ((verto_callback *) 1) #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct verto_ctx verto_ctx; typedef struct verto_ev verto_ev; typedef enum { VERTO_EV_TYPE_NONE = 0, VERTO_EV_TYPE_IO = 1, VERTO_EV_TYPE_TIMEOUT = 1 << 1, VERTO_EV_TYPE_IDLE = 1 << 2, VERTO_EV_TYPE_SIGNAL = 1 << 3, VERTO_EV_TYPE_CHILD = 1 << 4 } verto_ev_type; typedef enum { VERTO_EV_FLAG_NONE = 0, VERTO_EV_FLAG_PERSIST = 1, VERTO_EV_FLAG_PRIORITY_LOW = 1 << 1, VERTO_EV_FLAG_PRIORITY_MEDIUM = 1 << 2, VERTO_EV_FLAG_PRIORITY_HIGH = 1 << 3, VERTO_EV_FLAG_IO_READ = 1 << 4, VERTO_EV_FLAG_IO_WRITE = 1 << 5, VERTO_EV_FLAG_IO_ERROR = 1 << 7, VERTO_EV_FLAG_IO_CLOSE_FD = 1 << 8, VERTO_EV_FLAG_REINITIABLE = 1 << 6, _VERTO_EV_FLAG_MUTABLE_MASK = VERTO_EV_FLAG_PRIORITY_LOW | VERTO_EV_FLAG_PRIORITY_MEDIUM | VERTO_EV_FLAG_PRIORITY_HIGH | VERTO_EV_FLAG_IO_READ | VERTO_EV_FLAG_IO_WRITE, _VERTO_EV_FLAG_MAX = VERTO_EV_FLAG_IO_CLOSE_FD } verto_ev_flag; typedef void (verto_callback)(verto_ctx *ctx, verto_ev *ev); /** * Creates a new event context using an optionally specified implementation * and/or optionally specified required features. * * If you are an application that has already decided on using a particular * event loop implementation, you should not call this function, but instead * import the verto-NAME.h header and link against the verto-NAME.so, where * NAME is the implementation you wish to use. * * If you are a library, you should generally avoid creating event contexts * on your own but allow applications to pass in a verto_ctx you can use. * * There are two cases where you should use this function. The first is * where you have a need to choose an implementation at run time, usually * for testing purposes. The second and more common is when you simply * wish to remain implementation agnostic. In this later case, you should * always call like this: verto_new(NULL, ...). This lets verto choose the best * implementation to use. * * If impl is not NULL, a new context is returned which is backed by the * implementation specified. If the implementation specified is not * available or if the required types (reqtypes) are not provided by the * named implementation, NULL is returned. The parameter 'impl' can specify: * * The full path to an implementation library * * The name of the implementation library (i.e. - "glib" or "libev") * * If impl is NULL, verto will attempt to automatically determine the * best implementation to use. * * First, verto will attempt to use an existing, previously loaded * implementation. This is handled automatically by internal caching of either * the first implementation loaded or the one specified by verto_set_default(). * * Second, verto will attempt to discern if you are already linked to any * of the supported implementations (to avoid wasting memory by loading * extra unnecessary libraries). If you are linked to one supported * implementation, that implementation will be chosen. If you are linked * to more than one supported implementation one of the ones linked to * will be chosen, but the order of the particular choice is undefined. * * Third, verto will attempt to load the compile-time default, if defined at * build time and available at runtime. * * Last, verto will attempt to load any implementation installed. The specific * order of this step is undefined. * * In all cases above, if the implementation does not support all the specified * features (reqtypes), it will be skipped and processing will continue from * where it left off. This means that if verto_new() returns non-NULL it is * guaranteed to support the features you specified. * * @see verto_set_default() * @param impl The implementation to use, or NULL. * @param reqtypes A bitwise or'd list of required event type features. * @return A new verto_ctx, or NULL on error. Call verto_free() when done. */ verto_ctx * verto_new(const char *impl, verto_ev_type reqtypes); /** * Gets the default event context using an optionally specified implementation. * * This function is essentially a singleton version of verto_new(). However, * since this function must return the same loop as the *_default() call of * the underlying implementation (if such a function exists), it is NOT a * global singleton, but a per-implementation singleton. For this reason, you * must call verto_free() when you are done with this loop. Even after calling * verto_free() on the default verto_ctx, you can safely call verto_default() * again and receive a new reference to the same (internally default) loop. * * In all other respects, verto_default() acts exactly like verto_new(). * * @see verto_new() * @see verto_free() * @param impl The implementation to use, or NULL. * @param reqtypes A bitwise or'd list of required event type features. * @return The default verto_ctx, or NULL on error. Call verto_free() when done. */ verto_ctx * verto_default(const char *impl, verto_ev_type reqtypes); /** * Sets the default implementation to use by its name. * * This function returns 1 on success and 0 on failure. It can fail for the * following reasons: * 1. The default implementation was already set via verto_set_default(). * 2. The implementation specified could not be found. * 3. The implementation specified didn't support the features specified. * 4. The impl argument was NULL. * 5. verto_new() was already called. * 6. verto_default() was already called. * 7. verto_new_NAME() was already called. * 8. verto_default_NAME() was already called. * 9. verto_convert_NAME() was already called. * * @see verto_new() * @see verto_default() * @param impl The implementation to use. * @param reqtypes A bitwise or'd list of required event type features. * @return The default verto_ctx, or NULL on error. Call verto_free() when done. */ int verto_set_default(const char *impl, verto_ev_type reqtypes); /** * Sets the allocator to use for verto_ctx and verto_ev objects. * * If you plan to set the allocator, you MUST call this function before any * other verto_*() calls. * * @see verto_new() * @see verto_default() * @see verto_add_io() * @see verto_add_timeout() * @see verto_add_idle() * @see verto_add_signal() * @see verto_add_child() * @param resize The allocator to use (behaves like realloc(); * resize(ptr, 0) must free memory at ptr.) * @param hierarchical Zero if the allocator is not hierarchical */ int verto_set_allocator(void *(*resize)(void *mem, size_t size), int hierarchical); /** * Frees a verto_ctx. * * When called on a default verto_ctx, the reference will be freed but the * internal default loop will still be available via another call to * verto_default(). * * @see verto_new() * @see verto_default() * @param ctx The verto_ctx to free. */ void verto_free(verto_ctx *ctx); /** * Frees global state. * * Remove and free all allocated global state. Call only when no further * contexts exist and all threads have exited. * * @see verto_new() * @see verto_free() * @see verto_default() */ void verto_cleanup(void); /** * Run the verto_ctx forever, or at least until verto_break() is called. * * @see verto_break() * @param ctx The verto_ctx to run. */ void verto_run(verto_ctx *ctx); /** * Run the verto_ctx once. May block. * * @param ctx The verto_ctx to run once. */ void verto_run_once(verto_ctx *ctx); /** * Exits the currently running verto_ctx. * * @see verto_run() * @param ctx The verto_ctx to exit. */ void verto_break(verto_ctx *ctx); /** * Re-initializes the verto_ctx. * * This function deletes all events, except those which have set the * VERTO_EV_FLAG_REINITIABLE flag. If you fork(), you MUST call this in the * child process after the fork! * * If this function fails it indicates that at least one * VERTO_EV_FLAG_REINITIABLE event was not rearmed or that ctx was NULL. * * @see verto_new() * @see verto_default() * @param ctx The verto_ctx to re-initialize. * @return Non-zero on success, 0 on error. */ int verto_reinitialize(verto_ctx *ctx); /** * Adds a callback executed when a file descriptor is ready to be read/written. * * All verto_ev events are automatically freed when their parent verto_ctx is * freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is * provided, the event will repeat until verto_del() is called. If * VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically * after its execution. In either case, you may call verto_del() at any time * to prevent the event from executing. * If VERTO_EV_FLAG_IO_CLOSE_FD is provided the passed in fd is automatically * closed when the event is freed with verto_del() * * NOTE: On Windows, the underlying select() only works with sockets. As such, * any attempt to add a non-socket io event on Windows will produce undefined * results and may even crash. * * @see verto_del() * @param ctx The verto_ctx which will fire the callback. * @param flags The flags to set (at least one VERTO_EV_FLAG_IO* required). * @param callback The callback to fire. * @param fd The file descriptor to watch for reads. * @return The verto_ev registered with the event context or NULL on error. */ verto_ev * verto_add_io(verto_ctx *ctx, verto_ev_flag flags, verto_callback *callback, int fd); /** * Adds a callback executed after a period of time. * * All verto_ev events are automatically freed when their parent verto_ctx is * freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is * provided, the event will repeat until verto_del() is called. If * VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically * after its execution. In either case, you may call verto_del() at any time * to prevent the event from executing. * * @see verto_del() * @param ctx The verto_ctx which will fire the callback. * @param flags The flags to set. * @param callback The callback to fire. * @param interval Time period to wait before firing (in milliseconds). * @return The verto_ev registered with the event context. */ verto_ev * verto_add_timeout(verto_ctx *ctx, verto_ev_flag flags, verto_callback *callback, time_t interval); /** * Adds a callback executed when there is nothing else to do. * * All verto_ev events are automatically freed when their parent verto_ctx is * freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is * provided, the event will repeat until verto_del() is called. If * VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically * after its execution. In either case, you may call verto_del() at any time * to prevent the event from executing. * * @see verto_del() * @param ctx The verto_ctx which will fire the callback. * @param flags The flags to set. * @param callback The callback to fire. * @return The verto_ev registered with the event context. */ verto_ev * verto_add_idle(verto_ctx *ctx, verto_ev_flag flags, verto_callback *callback); /** * Adds a callback executed when a signal is received. * * All verto_ev events are automatically freed when their parent verto_ctx is * freed. You do not need to free them manually. If VERTO_EV_FLAG_PERSIST is * provided, the event will repeat until verto_del() is called. If * VERTO_EV_FLAG_PERSIST is not provided, the event will be freed automatically * after its execution. In either case, you may call verto_del() at any time * to prevent the event from executing. * * NOTE: If you attempt to ignore a signal without the VERTO_EV_FLAG_PERSIST * flag, this function fails. * * NOTE: SIGCHLD is expressly not supported. If you want this notification, * please use verto_add_child(). * * WARNNIG: Signal events can only be reliably received in the default verto_ctx * in some implementations. Attempting to receive signal events in non-default * loops may result in assert() failures. * * WARNING: While verto does its best to protect you from crashes, there is * essentially no way to do signal events if you mix multiple implementations in * a single process. Attempting to do so will result in undefined behavior, * and potentially even a crash. You have been warned. * * @see verto_add_child() * @see verto_repeat() * @see verto_del() * @param ctx The verto_ctx which will fire the callback. * @param flags The flags to set. * @param callback The callback to fire. * @param signal The signal to watch for. * @return The verto_ev registered with the event context. */ verto_ev * verto_add_signal(verto_ctx *ctx, verto_ev_flag flags, verto_callback *callback, int signal); /** * Adds a callback executed when a child process exits. * * This event will be freed automatically after its execution. Due to the * nature of a process' life-cycle, child events cannot persist (processes only * exit once). This function returns NULL if you attempt to use * VERTO_EV_FLAG_PERSIST. You may, of course, call verto_del() at any time to * prevent the callback from firing. * * @see verto_del() * @param ctx The verto_ctx which will fire the callback. * @param flags The flags to set. * @param callback The callback to fire. * @param child The pid (POSIX) or handle (Win32) of the child to watch for. * @return The verto_ev registered with the event context. */ verto_ev * verto_add_child(verto_ctx *ctx, verto_ev_flag flags, verto_callback *callback, verto_proc proc); /** * Sets the private pointer of the verto_ev. * * The free callback will be called in two cases: * 1. When the event is deleted (manually or automatically) * 2. When verto_set_private() is called again, unless * free is NULL. * * @see verto_get_private() * @param ev The verto_ev * @param priv The private value to store * @param free The callback used to free the data or NULL */ void verto_set_private(verto_ev *ev, void *priv, verto_callback *free); /** * Gets the private pointer of the verto_ev. * * @see verto_set_private() * @param ev The verto_ev * @return The verto_ev private pointer */ void * verto_get_private(const verto_ev *ev); /** * Gets the type of the verto_ev. * * @see verto_add_io() * @see verto_add_timeout() * @see verto_add_idle() * @see verto_add_signal() * @see verto_add_child() * @param ev The verto_ev * @return The verto_ev type */ verto_ev_type verto_get_type(const verto_ev *ev); /** * Gets the flags associated with the given verto_ev. * * @see verto_add_io() * @see verto_add_timeout() * @see verto_add_idle() * @see verto_add_signal() * @see verto_add_child() * @see verto_set_flags() * @param ev The verto_ev * @return The verto_ev type */ verto_ev_flag verto_get_flags(const verto_ev *ev); /** * Sets the flags associated with the given verto_ev. * * See _VERTO_EV_FLAG_MUTABLE_MASK for the flags that can be changed * with this function. All others will be ignored. If the flags specified * are the same as the flags the event already has, this function is a no-op. * * @see verto_add_io() * @see verto_add_timeout() * @see verto_add_idle() * @see verto_add_signal() * @see verto_add_child() * @see verto_get_flags() * @param ev The verto_ev * @param flags The flags for the event */ void verto_set_flags(verto_ev *ev, verto_ev_flag flags); /** * Gets the file descriptor associated with a read/write verto_ev. * * @see verto_add_io() * @param ev The verto_ev to retrieve the file descriptor from. * @return The file descriptor, or -1 if not a read/write event. */ int verto_get_fd(const verto_ev *ev); /** * Gets the file descriptor state from when the event fires. * * @see verto_add_io() * @param ev The verto_ev to retrieve the fd state from. * @return The fd state. */ verto_ev_flag verto_get_fd_state(const verto_ev *ev); /** * Gets the interval associated with a timeout verto_ev. * * @see verto_add_timeout() * @param ev The verto_ev to retrieve the interval from. * @return The interval, or 0 if not a timeout event. */ time_t verto_get_interval(const verto_ev *ev); /** * Gets the signal associated with a signal verto_ev. * * @see verto_add_signal() * @param ev The verto_ev to retrieve the signal from. * @return The signal, or -1 if not a signal event. */ int verto_get_signal(const verto_ev *ev); /** * Gets the process associated with a child verto_ev. * * @see verto_add_child() * @param ev The verto_ev to retrieve the process from. * @return The pid/handle, or 0/NULL if not a child event (POSIX/Win32). */ verto_proc verto_get_proc(const verto_ev *ev); /** * Gets the status of the process which caused this event to fire. * * @see verto_add_child() * @param ev The verto_ev to retrieve the status from. * @return The pid/handle status. */ verto_proc_status verto_get_proc_status(const verto_ev *ev); /** * Gets the verto_ctx associated with a verto_ev. * * This is a borrowed reference, don't attempt to free it! * * @param ev The verto_ev to retrieve the verto_ctx from. * @return The verto_ctx. */ verto_ctx * verto_get_ctx(const verto_ev *ev); /** * Removes an event from from the event context and frees it. * * The event and its contents cannot be used after this call. * * @see verto_add_io() * @see verto_add_timeout() * @see verto_add_idle() * @see verto_add_signal() * @see verto_add_child() * @param ev The event to delete. */ void verto_del(verto_ev *ev); /** * Returns the event types supported by this implementation. * * @param ctx The verto_ctx to query. * @return The event types supported. */ verto_ev_type verto_get_supported_types(verto_ctx *ctx); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* VERTO_H_ */ PKZ)#"" gdfontt.hnu[#ifndef _GDFONTT_H_ #define _GDFONTT_H_ 1 #ifdef __cplusplus extern "C" { #endif /* This is a header file for gd font, generated using bdftogd version 0.5 by Jan Pazdziora, adelton@fi.muni.cz from bdf font -Misc-Fixed-Medium-R-Normal--8-80-75-75-C-50-ISO8859-2 at Thu Jan 8 13:49:54 1998. The original bdf was holding following copyright: "Libor Skarvada, libor@informatics.muni.cz" */ #include "gd.h" extern BGD_EXPORT_DATA_PROT gdFontPtr gdFontTiny; BGD_DECLARE(gdFontPtr) gdFontGetTiny(void); #ifdef __cplusplus } #endif #endif PKZKR$R$rdma/hfi/hfi1_user.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ /* * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * * Copyright(c) 2015 - 2020 Intel Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * BSD LICENSE * * Copyright(c) 2015 Intel Corporation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * - Neither the name of Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* * This file contains defines, structures, etc. that are used * to communicate between kernel and user code. */ #ifndef _LINUX__HFI1_USER_H #define _LINUX__HFI1_USER_H #include #include /* * This version number is given to the driver by the user code during * initialization in the spu_userversion field of hfi1_user_info, so * the driver can check for compatibility with user code. * * The major version changes when data structures change in an incompatible * way. The driver must be the same for initialization to succeed. */ #define HFI1_USER_SWMAJOR 6 /* * Minor version differences are always compatible * a within a major version, however if user software is larger * than driver software, some new features and/or structure fields * may not be implemented; the user code must deal with this if it * cares, or it must abort after initialization reports the difference. */ #define HFI1_USER_SWMINOR 3 /* * We will encode the major/minor inside a single 32bit version number. */ #define HFI1_SWMAJOR_SHIFT 16 /* * Set of HW and driver capability/feature bits. * These bit values are used to configure enabled/disabled HW and * driver features. The same set of bits are communicated to user * space. */ #define HFI1_CAP_DMA_RTAIL (1UL << 0) /* Use DMA'ed RTail value */ #define HFI1_CAP_SDMA (1UL << 1) /* Enable SDMA support */ #define HFI1_CAP_SDMA_AHG (1UL << 2) /* Enable SDMA AHG support */ #define HFI1_CAP_EXTENDED_PSN (1UL << 3) /* Enable Extended PSN support */ #define HFI1_CAP_HDRSUPP (1UL << 4) /* Enable Header Suppression */ #define HFI1_CAP_TID_RDMA (1UL << 5) /* Enable TID RDMA operations */ #define HFI1_CAP_USE_SDMA_HEAD (1UL << 6) /* DMA Hdr Q tail vs. use CSR */ #define HFI1_CAP_MULTI_PKT_EGR (1UL << 7) /* Enable multi-packet Egr buffs*/ #define HFI1_CAP_NODROP_RHQ_FULL (1UL << 8) /* Don't drop on Hdr Q full */ #define HFI1_CAP_NODROP_EGR_FULL (1UL << 9) /* Don't drop on EGR buffs full */ #define HFI1_CAP_TID_UNMAP (1UL << 10) /* Disable Expected TID caching */ #define HFI1_CAP_PRINT_UNIMPL (1UL << 11) /* Show for unimplemented feats */ #define HFI1_CAP_ALLOW_PERM_JKEY (1UL << 12) /* Allow use of permissive JKEY */ #define HFI1_CAP_NO_INTEGRITY (1UL << 13) /* Enable ctxt integrity checks */ #define HFI1_CAP_PKEY_CHECK (1UL << 14) /* Enable ctxt PKey checking */ #define HFI1_CAP_STATIC_RATE_CTRL (1UL << 15) /* Allow PBC.StaticRateControl */ #define HFI1_CAP_OPFN (1UL << 16) /* Enable the OPFN protocol */ #define HFI1_CAP_SDMA_HEAD_CHECK (1UL << 17) /* SDMA head checking */ #define HFI1_CAP_EARLY_CREDIT_RETURN (1UL << 18) /* early credit return */ #define HFI1_CAP_AIP (1UL << 19) /* Enable accelerated IP */ #define HFI1_RCVHDR_ENTSIZE_2 (1UL << 0) #define HFI1_RCVHDR_ENTSIZE_16 (1UL << 1) #define HFI1_RCVDHR_ENTSIZE_32 (1UL << 2) #define _HFI1_EVENT_FROZEN_BIT 0 #define _HFI1_EVENT_LINKDOWN_BIT 1 #define _HFI1_EVENT_LID_CHANGE_BIT 2 #define _HFI1_EVENT_LMC_CHANGE_BIT 3 #define _HFI1_EVENT_SL2VL_CHANGE_BIT 4 #define _HFI1_EVENT_TID_MMU_NOTIFY_BIT 5 #define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_TID_MMU_NOTIFY_BIT #define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT) #define HFI1_EVENT_LINKDOWN (1UL << _HFI1_EVENT_LINKDOWN_BIT) #define HFI1_EVENT_LID_CHANGE (1UL << _HFI1_EVENT_LID_CHANGE_BIT) #define HFI1_EVENT_LMC_CHANGE (1UL << _HFI1_EVENT_LMC_CHANGE_BIT) #define HFI1_EVENT_SL2VL_CHANGE (1UL << _HFI1_EVENT_SL2VL_CHANGE_BIT) #define HFI1_EVENT_TID_MMU_NOTIFY (1UL << _HFI1_EVENT_TID_MMU_NOTIFY_BIT) /* * These are the status bits readable (in ASCII form, 64bit value) * from the "status" sysfs file. For binary compatibility, values * must remain as is; removed states can be reused for different * purposes. */ #define HFI1_STATUS_INITTED 0x1 /* basic initialization done */ /* Chip has been found and initialized */ #define HFI1_STATUS_CHIP_PRESENT 0x20 /* IB link is at ACTIVE, usable for data traffic */ #define HFI1_STATUS_IB_READY 0x40 /* link is configured, LID, MTU, etc. have been set */ #define HFI1_STATUS_IB_CONF 0x80 /* A Fatal hardware error has occurred. */ #define HFI1_STATUS_HWERROR 0x200 /* * Number of supported shared contexts. * This is the maximum number of software contexts that can share * a hardware send/receive context. */ #define HFI1_MAX_SHARED_CTXTS 8 /* * Poll types */ #define HFI1_POLL_TYPE_ANYRCV 0x0 #define HFI1_POLL_TYPE_URGENT 0x1 enum hfi1_sdma_comp_state { FREE = 0, QUEUED, COMPLETE, ERROR }; /* * SDMA completion ring entry */ struct hfi1_sdma_comp_entry { __u32 status; __u32 errcode; }; /* * Device status and notifications from driver to user-space. */ struct hfi1_status { __aligned_u64 dev; /* device/hw status bits */ __aligned_u64 port; /* port state and status bits */ char freezemsg[]; }; enum sdma_req_opcode { EXPECTED = 0, EAGER }; #define HFI1_SDMA_REQ_VERSION_MASK 0xF #define HFI1_SDMA_REQ_VERSION_SHIFT 0x0 #define HFI1_SDMA_REQ_OPCODE_MASK 0xF #define HFI1_SDMA_REQ_OPCODE_SHIFT 0x4 #define HFI1_SDMA_REQ_IOVCNT_MASK 0xFF #define HFI1_SDMA_REQ_IOVCNT_SHIFT 0x8 struct sdma_req_info { /* * bits 0-3 - version (currently unused) * bits 4-7 - opcode (enum sdma_req_opcode) * bits 8-15 - io vector count */ __u16 ctrl; /* * Number of fragments contained in this request. * User-space has already computed how many * fragment-sized packet the user buffer will be * split into. */ __u16 npkts; /* * Size of each fragment the user buffer will be * split into. */ __u16 fragsize; /* * Index of the slot in the SDMA completion ring * this request should be using. User-space is * in charge of managing its own ring. */ __u16 comp_idx; } __attribute__((__packed__)); /* * SW KDETH header. * swdata is SW defined portion. */ struct hfi1_kdeth_header { __le32 ver_tid_offset; __le16 jkey; __le16 hcrc; __le32 swdata[7]; } __attribute__((__packed__)); /* * Structure describing the headers that User space uses. The * structure above is a subset of this one. */ struct hfi1_pkt_header { __le16 pbc[4]; __be16 lrh[4]; __be32 bth[3]; struct hfi1_kdeth_header kdeth; } __attribute__((__packed__)); /* * The list of usermode accessible registers. */ enum hfi1_ureg { /* (RO) DMA RcvHdr to be used next. */ ur_rcvhdrtail = 0, /* (RW) RcvHdr entry to be processed next by host. */ ur_rcvhdrhead = 1, /* (RO) Index of next Eager index to use. */ ur_rcvegrindextail = 2, /* (RW) Eager TID to be processed next */ ur_rcvegrindexhead = 3, /* (RO) Receive Eager Offset Tail */ ur_rcvegroffsettail = 4, /* For internal use only; max register number. */ ur_maxreg, /* (RW) Receive TID flow table */ ur_rcvtidflowtable = 256 }; #endif /* _LINIUX__HFI1_USER_H */ PKZrdma/hfi/hfi1_ioctl.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ /* * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * GPL LICENSE SUMMARY * * Copyright(c) 2015 Intel Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * BSD LICENSE * * Copyright(c) 2015 Intel Corporation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * - Neither the name of Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef _LINUX__HFI1_IOCTL_H #define _LINUX__HFI1_IOCTL_H #include /* * This structure is passed to the driver to tell it where * user code buffers are, sizes, etc. The offsets and sizes of the * fields must remain unchanged, for binary compatibility. It can * be extended, if userversion is changed so user code can tell, if needed */ struct hfi1_user_info { /* * version of user software, to detect compatibility issues. * Should be set to HFI1_USER_SWVERSION. */ __u32 userversion; __u32 pad; /* * If two or more processes wish to share a context, each process * must set the subcontext_cnt and subcontext_id to the same * values. The only restriction on the subcontext_id is that * it be unique for a given node. */ __u16 subctxt_cnt; __u16 subctxt_id; /* 128bit UUID passed in by PSM. */ __u8 uuid[16]; }; struct hfi1_ctxt_info { __aligned_u64 runtime_flags; /* chip/drv runtime flags (HFI1_CAP_*) */ __u32 rcvegr_size; /* size of each eager buffer */ __u16 num_active; /* number of active units */ __u16 unit; /* unit (chip) assigned to caller */ __u16 ctxt; /* ctxt on unit assigned to caller */ __u16 subctxt; /* subctxt on unit assigned to caller */ __u16 rcvtids; /* number of Rcv TIDs for this context */ __u16 credits; /* number of PIO credits for this context */ __u16 numa_node; /* NUMA node of the assigned device */ __u16 rec_cpu; /* cpu # for affinity (0xffff if none) */ __u16 send_ctxt; /* send context in use by this user context */ __u16 egrtids; /* number of RcvArray entries for Eager Rcvs */ __u16 rcvhdrq_cnt; /* number of RcvHdrQ entries */ __u16 rcvhdrq_entsize; /* size (in bytes) for each RcvHdrQ entry */ __u16 sdma_ring_size; /* number of entries in SDMA request ring */ }; struct hfi1_tid_info { /* virtual address of first page in transfer */ __aligned_u64 vaddr; /* pointer to tid array. this array is big enough */ __aligned_u64 tidlist; /* number of tids programmed by this request */ __u32 tidcnt; /* length of transfer buffer programmed by this request */ __u32 length; }; /* * This structure is returned by the driver immediately after * open to get implementation-specific info, and info specific to this * instance. * * This struct must have explicit pad fields where type sizes * may result in different alignments between 32 and 64 bit * programs, since the 64 bit * bit kernel requires the user code * to have matching offsets */ struct hfi1_base_info { /* version of hardware, for feature checking. */ __u32 hw_version; /* version of software, for feature checking. */ __u32 sw_version; /* Job key */ __u16 jkey; __u16 padding1; /* * The special QP (queue pair) value that identifies PSM * protocol packet from standard IB packets. */ __u32 bthqp; /* PIO credit return address, */ __aligned_u64 sc_credits_addr; /* * Base address of write-only pio buffers for this process. * Each buffer has sendpio_credits*64 bytes. */ __aligned_u64 pio_bufbase_sop; /* * Base address of write-only pio buffers for this process. * Each buffer has sendpio_credits*64 bytes. */ __aligned_u64 pio_bufbase; /* address where receive buffer queue is mapped into */ __aligned_u64 rcvhdr_bufbase; /* base address of Eager receive buffers. */ __aligned_u64 rcvegr_bufbase; /* base address of SDMA completion ring */ __aligned_u64 sdma_comp_bufbase; /* * User register base for init code, not to be used directly by * protocol or applications. Always maps real chip register space. * the register addresses are: * ur_rcvhdrhead, ur_rcvhdrtail, ur_rcvegrhead, ur_rcvegrtail, * ur_rcvtidflow */ __aligned_u64 user_regbase; /* notification events */ __aligned_u64 events_bufbase; /* status page */ __aligned_u64 status_bufbase; /* rcvhdrtail update */ __aligned_u64 rcvhdrtail_base; /* * shared memory pages for subctxts if ctxt is shared; these cover * all the processes in the group sharing a single context. * all have enough space for the num_subcontexts value on this job. */ __aligned_u64 subctxt_uregbase; __aligned_u64 subctxt_rcvegrbuf; __aligned_u64 subctxt_rcvhdrbuf; }; #endif /* _LINIUX__HFI1_IOCTL_H */ PKZ+@#))rdma/mlx5_user_ioctl_cmds.hnu[/* * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef MLX5_USER_IOCTL_CMDS_H #define MLX5_USER_IOCTL_CMDS_H #include #include enum mlx5_ib_create_flow_action_attrs { /* This attribute belong to the driver namespace */ MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_dm_methods { MLX5_IB_METHOD_DM_MAP_OP_ADDR = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_DM_QUERY, }; enum mlx5_ib_dm_map_op_addr_attrs { MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DM_MAP_OP_ADDR_REQ_OP, MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_START_OFFSET, MLX5_IB_ATTR_DM_MAP_OP_ADDR_RESP_PAGE_INDEX, }; enum mlx5_ib_query_dm_attrs { MLX5_IB_ATTR_QUERY_DM_REQ_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_QUERY_DM_RESP_START_OFFSET, MLX5_IB_ATTR_QUERY_DM_RESP_PAGE_INDEX, MLX5_IB_ATTR_QUERY_DM_RESP_LENGTH, }; enum mlx5_ib_alloc_dm_attrs { MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, MLX5_IB_ATTR_ALLOC_DM_REQ_TYPE, }; enum mlx5_ib_devx_methods { MLX5_IB_METHOD_DEVX_OTHER = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_DEVX_QUERY_UAR, MLX5_IB_METHOD_DEVX_QUERY_EQN, MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT, }; enum mlx5_ib_devx_other_attrs { MLX5_IB_ATTR_DEVX_OTHER_CMD_IN = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_OTHER_CMD_OUT, }; enum mlx5_ib_devx_obj_create_attrs { MLX5_IB_ATTR_DEVX_OBJ_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_IN, MLX5_IB_ATTR_DEVX_OBJ_CREATE_CMD_OUT, }; enum mlx5_ib_devx_query_uar_attrs { MLX5_IB_ATTR_DEVX_QUERY_UAR_USER_IDX = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_QUERY_UAR_DEV_IDX, }; enum mlx5_ib_devx_obj_destroy_attrs { MLX5_IB_ATTR_DEVX_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_devx_obj_modify_attrs { MLX5_IB_ATTR_DEVX_OBJ_MODIFY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_IN, MLX5_IB_ATTR_DEVX_OBJ_MODIFY_CMD_OUT, }; enum mlx5_ib_devx_obj_query_attrs { MLX5_IB_ATTR_DEVX_OBJ_QUERY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_IN, MLX5_IB_ATTR_DEVX_OBJ_QUERY_CMD_OUT, }; enum mlx5_ib_devx_obj_query_async_attrs { MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_CMD_IN, MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_FD, MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_WR_ID, MLX5_IB_ATTR_DEVX_OBJ_QUERY_ASYNC_OUT_LEN, }; enum mlx5_ib_devx_subscribe_event_attrs { MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_OBJ_HANDLE, MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_TYPE_NUM_LIST, MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_FD_NUM, MLX5_IB_ATTR_DEVX_SUBSCRIBE_EVENT_COOKIE, }; enum mlx5_ib_devx_query_eqn_attrs { MLX5_IB_ATTR_DEVX_QUERY_EQN_USER_VEC = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_QUERY_EQN_DEV_EQN, }; enum mlx5_ib_devx_obj_methods { MLX5_IB_METHOD_DEVX_OBJ_CREATE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_DEVX_OBJ_DESTROY, MLX5_IB_METHOD_DEVX_OBJ_MODIFY, MLX5_IB_METHOD_DEVX_OBJ_QUERY, MLX5_IB_METHOD_DEVX_OBJ_ASYNC_QUERY, }; enum mlx5_ib_var_alloc_attrs { MLX5_IB_ATTR_VAR_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_OFFSET, MLX5_IB_ATTR_VAR_OBJ_ALLOC_MMAP_LENGTH, MLX5_IB_ATTR_VAR_OBJ_ALLOC_PAGE_ID, }; enum mlx5_ib_var_obj_destroy_attrs { MLX5_IB_ATTR_VAR_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_var_obj_methods { MLX5_IB_METHOD_VAR_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_VAR_OBJ_DESTROY, }; enum mlx5_ib_uar_alloc_attrs { MLX5_IB_ATTR_UAR_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_UAR_OBJ_ALLOC_TYPE, MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_OFFSET, MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_LENGTH, MLX5_IB_ATTR_UAR_OBJ_ALLOC_PAGE_ID, }; enum mlx5_ib_uar_obj_destroy_attrs { MLX5_IB_ATTR_UAR_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_uar_obj_methods { MLX5_IB_METHOD_UAR_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_UAR_OBJ_DESTROY, }; enum mlx5_ib_devx_umem_reg_attrs { MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, MLX5_IB_ATTR_DEVX_UMEM_REG_LEN, MLX5_IB_ATTR_DEVX_UMEM_REG_ACCESS, MLX5_IB_ATTR_DEVX_UMEM_REG_OUT_ID, MLX5_IB_ATTR_DEVX_UMEM_REG_PGSZ_BITMAP, }; enum mlx5_ib_devx_umem_dereg_attrs { MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_pp_obj_methods { MLX5_IB_METHOD_PP_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_PP_OBJ_DESTROY, }; enum mlx5_ib_pp_alloc_attrs { MLX5_IB_ATTR_PP_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_PP_OBJ_ALLOC_CTX, MLX5_IB_ATTR_PP_OBJ_ALLOC_FLAGS, MLX5_IB_ATTR_PP_OBJ_ALLOC_INDEX, }; enum mlx5_ib_pp_obj_destroy_attrs { MLX5_IB_ATTR_PP_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_devx_umem_methods { MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_DEVX_UMEM_DEREG, }; enum mlx5_ib_devx_async_cmd_fd_alloc_attrs { MLX5_IB_ATTR_DEVX_ASYNC_CMD_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_devx_async_event_fd_alloc_attrs { MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_DEVX_ASYNC_EVENT_FD_ALLOC_FLAGS, }; enum mlx5_ib_devx_async_cmd_fd_methods { MLX5_IB_METHOD_DEVX_ASYNC_CMD_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_devx_async_event_fd_methods { MLX5_IB_METHOD_DEVX_ASYNC_EVENT_FD_ALLOC = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_objects { MLX5_IB_OBJECT_DEVX = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_OBJECT_DEVX_OBJ, MLX5_IB_OBJECT_DEVX_UMEM, MLX5_IB_OBJECT_FLOW_MATCHER, MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD, MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD, MLX5_IB_OBJECT_VAR, MLX5_IB_OBJECT_PP, MLX5_IB_OBJECT_UAR, MLX5_IB_OBJECT_STEERING_ANCHOR, }; enum mlx5_ib_flow_matcher_create_attrs { MLX5_IB_ATTR_FLOW_MATCHER_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_FLOW_MATCHER_MATCH_MASK, MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, MLX5_IB_ATTR_FLOW_MATCHER_MATCH_CRITERIA, MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, MLX5_IB_ATTR_FLOW_MATCHER_FT_TYPE, }; enum mlx5_ib_flow_matcher_destroy_attrs { MLX5_IB_ATTR_FLOW_MATCHER_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_flow_matcher_methods { MLX5_IB_METHOD_FLOW_MATCHER_CREATE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_FLOW_MATCHER_DESTROY, }; enum mlx5_ib_flow_steering_anchor_create_attrs { MLX5_IB_ATTR_STEERING_ANCHOR_CREATE_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_STEERING_ANCHOR_FT_TYPE, MLX5_IB_ATTR_STEERING_ANCHOR_PRIORITY, MLX5_IB_ATTR_STEERING_ANCHOR_FT_ID, }; enum mlx5_ib_flow_steering_anchor_destroy_attrs { MLX5_IB_ATTR_STEERING_ANCHOR_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_steering_anchor_methods { MLX5_IB_METHOD_STEERING_ANCHOR_CREATE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_STEERING_ANCHOR_DESTROY, }; enum mlx5_ib_device_query_context_attrs { MLX5_IB_ATTR_QUERY_CONTEXT_RESP_UCTX = (1U << UVERBS_ID_NS_SHIFT), }; #define MLX5_IB_DW_MATCH_PARAM 0xA0 struct mlx5_ib_match_params { __u32 match_params[MLX5_IB_DW_MATCH_PARAM]; }; enum mlx5_ib_flow_type { MLX5_IB_FLOW_TYPE_NORMAL, MLX5_IB_FLOW_TYPE_SNIFFER, MLX5_IB_FLOW_TYPE_ALL_DEFAULT, MLX5_IB_FLOW_TYPE_MC_DEFAULT, }; enum mlx5_ib_create_flow_flags { MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DEFAULT_MISS = 1 << 0, MLX5_IB_ATTR_CREATE_FLOW_FLAGS_DROP = 1 << 1, }; enum mlx5_ib_create_flow_attrs { MLX5_IB_ATTR_CREATE_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_CREATE_FLOW_MATCH_VALUE, MLX5_IB_ATTR_CREATE_FLOW_DEST_QP, MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX, MLX5_IB_ATTR_CREATE_FLOW_MATCHER, MLX5_IB_ATTR_CREATE_FLOW_ARR_FLOW_ACTIONS, MLX5_IB_ATTR_CREATE_FLOW_TAG, MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX, MLX5_IB_ATTR_CREATE_FLOW_ARR_COUNTERS_DEVX_OFFSET, MLX5_IB_ATTR_CREATE_FLOW_FLAGS, }; enum mlx5_ib_destoy_flow_attrs { MLX5_IB_ATTR_DESTROY_FLOW_HANDLE = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_flow_methods { MLX5_IB_METHOD_CREATE_FLOW = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_DESTROY_FLOW, }; enum mlx5_ib_flow_action_methods { MLX5_IB_METHOD_FLOW_ACTION_CREATE_MODIFY_HEADER = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_METHOD_FLOW_ACTION_CREATE_PACKET_REFORMAT, }; enum mlx5_ib_create_flow_action_create_modify_header_attrs { MLX5_IB_ATTR_CREATE_MODIFY_HEADER_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_CREATE_MODIFY_HEADER_ACTIONS_PRM, MLX5_IB_ATTR_CREATE_MODIFY_HEADER_FT_TYPE, }; enum mlx5_ib_create_flow_action_create_packet_reformat_attrs { MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_TYPE, MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_FT_TYPE, MLX5_IB_ATTR_CREATE_PACKET_REFORMAT_DATA_BUF, }; enum mlx5_ib_query_pd_attrs { MLX5_IB_ATTR_QUERY_PD_HANDLE = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_QUERY_PD_RESP_PDN, }; enum mlx5_ib_pd_methods { MLX5_IB_METHOD_PD_QUERY = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_device_methods { MLX5_IB_METHOD_QUERY_PORT = (1U << UVERBS_ID_NS_SHIFT), }; enum mlx5_ib_query_port_attrs { MLX5_IB_ATTR_QUERY_PORT_PORT_NUM = (1U << UVERBS_ID_NS_SHIFT), MLX5_IB_ATTR_QUERY_PORT, }; #endif PKZR>!rdma/mlx4-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef MLX4_ABI_USER_H #define MLX4_ABI_USER_H #include /* * Increment this value if any changes that break userspace ABI * compatibility are made. */ #define MLX4_IB_UVERBS_NO_DEV_CAPS_ABI_VERSION 3 #define MLX4_IB_UVERBS_ABI_VERSION 4 /* * Make sure that all structs defined in this file remain laid out so * that they pack the same way on 32-bit and 64-bit architectures (to * avoid incompatibility between 32-bit userspace and 64-bit kernels). * In particular do not use pointer types -- pass pointers in __u64 * instead. */ struct mlx4_ib_alloc_ucontext_resp_v3 { __u32 qp_tab_size; __u16 bf_reg_size; __u16 bf_regs_per_page; }; enum { MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0, }; struct mlx4_ib_alloc_ucontext_resp { __u32 dev_caps; __u32 qp_tab_size; __u16 bf_reg_size; __u16 bf_regs_per_page; __u32 cqe_size; }; struct mlx4_ib_alloc_pd_resp { __u32 pdn; __u32 reserved; }; struct mlx4_ib_create_cq { __aligned_u64 buf_addr; __aligned_u64 db_addr; }; struct mlx4_ib_create_cq_resp { __u32 cqn; __u32 reserved; }; struct mlx4_ib_resize_cq { __aligned_u64 buf_addr; }; struct mlx4_ib_create_srq { __aligned_u64 buf_addr; __aligned_u64 db_addr; }; struct mlx4_ib_create_srq_resp { __u32 srqn; __u32 reserved; }; struct mlx4_ib_create_qp_rss { __aligned_u64 rx_hash_fields_mask; /* Use enum mlx4_ib_rx_hash_fields */ __u8 rx_hash_function; /* Use enum mlx4_ib_rx_hash_function_flags */ __u8 reserved[7]; __u8 rx_hash_key[40]; __u32 comp_mask; __u32 reserved1; }; struct mlx4_ib_create_qp { __aligned_u64 buf_addr; __aligned_u64 db_addr; __u8 log_sq_bb_count; __u8 log_sq_stride; __u8 sq_no_prefetch; __u8 reserved; __u32 inl_recv_sz; }; struct mlx4_ib_create_wq { __aligned_u64 buf_addr; __aligned_u64 db_addr; __u8 log_range_size; __u8 reserved[3]; __u32 comp_mask; }; struct mlx4_ib_modify_wq { __u32 comp_mask; __u32 reserved; }; struct mlx4_ib_create_rwq_ind_tbl_resp { __u32 response_length; __u32 reserved; }; /* RX Hash function flags */ enum mlx4_ib_rx_hash_function_flags { MLX4_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0, }; /* * RX Hash flags, these flags allows to set which incoming packet's field should * participates in RX Hash. Each flag represent certain packet's field, * when the flag is set the field that is represented by the flag will * participate in RX Hash calculation. */ enum mlx4_ib_rx_hash_fields { MLX4_IB_RX_HASH_SRC_IPV4 = 1 << 0, MLX4_IB_RX_HASH_DST_IPV4 = 1 << 1, MLX4_IB_RX_HASH_SRC_IPV6 = 1 << 2, MLX4_IB_RX_HASH_DST_IPV6 = 1 << 3, MLX4_IB_RX_HASH_SRC_PORT_TCP = 1 << 4, MLX4_IB_RX_HASH_DST_PORT_TCP = 1 << 5, MLX4_IB_RX_HASH_SRC_PORT_UDP = 1 << 6, MLX4_IB_RX_HASH_DST_PORT_UDP = 1 << 7, MLX4_IB_RX_HASH_INNER = 1ULL << 31, }; struct mlx4_ib_rss_caps { __aligned_u64 rx_hash_fields_mask; /* enum mlx4_ib_rx_hash_fields */ __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */ __u8 reserved[7]; }; enum query_device_resp_mask { MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, }; struct mlx4_ib_tso_caps { __u32 max_tso; /* Maximum tso payload size in bytes */ /* Corresponding bit will be set if qp type from * 'enum ib_qp_type' is supported. */ __u32 supported_qpts; }; struct mlx4_uverbs_ex_query_device_resp { __u32 comp_mask; __u32 response_length; __aligned_u64 hca_core_clock_offset; __u32 max_inl_recv_sz; __u32 reserved; struct mlx4_ib_rss_caps rss_caps; struct mlx4_ib_tso_caps tso_caps; }; #endif /* MLX4_ABI_USER_H */ PKZQn_rdma/qedr-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* QLogic qedr NIC Driver * Copyright (c) 2015-2016 QLogic Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and /or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef __QEDR_USER_H__ #define __QEDR_USER_H__ #include #define QEDR_ABI_VERSION (8) /* user kernel communication data structures. */ enum qedr_alloc_ucontext_flags { QEDR_ALLOC_UCTX_EDPM_MODE = 1 << 0, QEDR_ALLOC_UCTX_DB_REC = 1 << 1, QEDR_SUPPORT_DPM_SIZES = 1 << 2, }; struct qedr_alloc_ucontext_req { __u32 context_flags; __u32 reserved; }; #define QEDR_LDPM_MAX_SIZE (8192) #define QEDR_EDPM_TRANS_SIZE (64) #define QEDR_EDPM_MAX_SIZE (ROCE_REQ_MAX_INLINE_DATA_SIZE) enum qedr_rdma_dpm_type { QEDR_DPM_TYPE_NONE = 0, QEDR_DPM_TYPE_ROCE_ENHANCED = 1 << 0, QEDR_DPM_TYPE_ROCE_LEGACY = 1 << 1, QEDR_DPM_TYPE_IWARP_LEGACY = 1 << 2, QEDR_DPM_TYPE_ROCE_EDPM_MODE = 1 << 3, QEDR_DPM_SIZES_SET = 1 << 4, }; struct qedr_alloc_ucontext_resp { __aligned_u64 db_pa; __u32 db_size; __u32 max_send_wr; __u32 max_recv_wr; __u32 max_srq_wr; __u32 sges_per_send_wr; __u32 sges_per_recv_wr; __u32 sges_per_srq_wr; __u32 max_cqes; __u8 dpm_flags; __u8 wids_enabled; __u16 wid_count; __u16 ldpm_limit_size; __u8 edpm_trans_size; __u8 reserved; __u16 edpm_limit_size; __u8 padding[6]; }; struct qedr_alloc_pd_ureq { __aligned_u64 rsvd1; }; struct qedr_alloc_pd_uresp { __u32 pd_id; __u32 reserved; }; struct qedr_create_cq_ureq { __aligned_u64 addr; __aligned_u64 len; }; struct qedr_create_cq_uresp { __u32 db_offset; __u16 icid; __u16 reserved; __aligned_u64 db_rec_addr; }; struct qedr_create_qp_ureq { __u32 qp_handle_hi; __u32 qp_handle_lo; /* SQ */ /* user space virtual address of SQ buffer */ __aligned_u64 sq_addr; /* length of SQ buffer */ __aligned_u64 sq_len; /* RQ */ /* user space virtual address of RQ buffer */ __aligned_u64 rq_addr; /* length of RQ buffer */ __aligned_u64 rq_len; }; struct qedr_create_qp_uresp { __u32 qp_id; __u32 atomic_supported; /* SQ */ __u32 sq_db_offset; __u16 sq_icid; /* RQ */ __u32 rq_db_offset; __u16 rq_icid; __u32 rq_db2_offset; __u32 reserved; /* address of SQ doorbell recovery user entry */ __aligned_u64 sq_db_rec_addr; /* address of RQ doorbell recovery user entry */ __aligned_u64 rq_db_rec_addr; }; struct qedr_create_srq_ureq { /* user space virtual address of producer pair */ __aligned_u64 prod_pair_addr; /* user space virtual address of SRQ buffer */ __aligned_u64 srq_addr; /* length of SRQ buffer */ __aligned_u64 srq_len; }; struct qedr_create_srq_uresp { __u16 srq_id; __u16 reserved0; __u32 reserved1; }; /* doorbell recovery entry allocated and populated by userspace doorbelling * entities and mapped to kernel. Kernel uses this to register doorbell * information with doorbell drop recovery mechanism. */ struct qedr_user_db_rec { __aligned_u64 db_data; /* doorbell data */ }; #endif /* __QEDR_USER_H__ */ PKZR!R!rdma/ib_user_mad.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2005 Voltaire, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef IB_USER_MAD_H #define IB_USER_MAD_H #include #include /* * Increment this value if any changes that break userspace ABI * compatibility are made. */ #define IB_USER_MAD_ABI_VERSION 5 /* * Make sure that all structs defined in this file remain laid out so * that they pack the same way on 32-bit and 64-bit architectures (to * avoid incompatibility between 32-bit userspace and 64-bit kernels). */ /** * ib_user_mad_hdr_old - Old version of MAD packet header without pkey_index * @id - ID of agent MAD received with/to be sent with * @status - 0 on successful receive, ETIMEDOUT if no response * received (transaction ID in data[] will be set to TID of original * request) (ignored on send) * @timeout_ms - Milliseconds to wait for response (unset on receive) * @retries - Number of automatic retries to attempt * @qpn - Remote QP number received from/to be sent to * @qkey - Remote Q_Key to be sent with (unset on receive) * @lid - Remote lid received from/to be sent to * @sl - Service level received with/to be sent with * @path_bits - Local path bits received with/to be sent with * @grh_present - If set, GRH was received/should be sent * @gid_index - Local GID index to send with (unset on receive) * @hop_limit - Hop limit in GRH * @traffic_class - Traffic class in GRH * @gid - Remote GID in GRH * @flow_label - Flow label in GRH */ struct ib_user_mad_hdr_old { __u32 id; __u32 status; __u32 timeout_ms; __u32 retries; __u32 length; __be32 qpn; __be32 qkey; __be16 lid; __u8 sl; __u8 path_bits; __u8 grh_present; __u8 gid_index; __u8 hop_limit; __u8 traffic_class; __u8 gid[16]; __be32 flow_label; }; /** * ib_user_mad_hdr - MAD packet header * This layout allows specifying/receiving the P_Key index. To use * this capability, an application must call the * IB_USER_MAD_ENABLE_PKEY ioctl on the user MAD file handle before * any other actions with the file handle. * @id - ID of agent MAD received with/to be sent with * @status - 0 on successful receive, ETIMEDOUT if no response * received (transaction ID in data[] will be set to TID of original * request) (ignored on send) * @timeout_ms - Milliseconds to wait for response (unset on receive) * @retries - Number of automatic retries to attempt * @qpn - Remote QP number received from/to be sent to * @qkey - Remote Q_Key to be sent with (unset on receive) * @lid - Remote lid received from/to be sent to * @sl - Service level received with/to be sent with * @path_bits - Local path bits received with/to be sent with * @grh_present - If set, GRH was received/should be sent * @gid_index - Local GID index to send with (unset on receive) * @hop_limit - Hop limit in GRH * @traffic_class - Traffic class in GRH * @gid - Remote GID in GRH * @flow_label - Flow label in GRH * @pkey_index - P_Key index */ struct ib_user_mad_hdr { __u32 id; __u32 status; __u32 timeout_ms; __u32 retries; __u32 length; __be32 qpn; __be32 qkey; __be16 lid; __u8 sl; __u8 path_bits; __u8 grh_present; __u8 gid_index; __u8 hop_limit; __u8 traffic_class; __u8 gid[16]; __be32 flow_label; __u16 pkey_index; __u8 reserved[6]; }; /** * ib_user_mad - MAD packet * @hdr - MAD packet header * @data - Contents of MAD * */ struct ib_user_mad { struct ib_user_mad_hdr hdr; __aligned_u64 data[]; }; /* * Earlier versions of this interface definition declared the * method_mask[] member as an array of __u32 but treated it as a * bitmap made up of longs in the kernel. This ambiguity meant that * 32-bit big-endian applications that can run on both 32-bit and * 64-bit kernels had no consistent ABI to rely on, and 64-bit * big-endian applications that treated method_mask as being made up * of 32-bit words would have their bitmap misinterpreted. * * To clear up this confusion, we change the declaration of * method_mask[] to use unsigned long and handle the conversion from * 32-bit userspace to 64-bit kernel for big-endian systems in the * compat_ioctl method. Unfortunately, to keep the structure layout * the same, we need the method_mask[] array to be aligned only to 4 * bytes even when long is 64 bits, which forces us into this ugly * typedef. */ typedef unsigned long __attribute__((aligned(4))) packed_ulong; #define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long))) /** * ib_user_mad_reg_req - MAD registration request * @id - Set by the kernel; used to identify agent in future requests. * @qpn - Queue pair number; must be 0 or 1. * @method_mask - The caller will receive unsolicited MADs for any method * where @method_mask = 1. * @mgmt_class - Indicates which management class of MADs should be receive * by the caller. This field is only required if the user wishes to * receive unsolicited MADs, otherwise it should be 0. * @mgmt_class_version - Indicates which version of MADs for the given * management class to receive. * @oui: Indicates IEEE OUI when mgmt_class is a vendor class * in the range from 0x30 to 0x4f. Otherwise not used. * @rmpp_version: If set, indicates the RMPP version used. * */ struct ib_user_mad_reg_req { __u32 id; packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK]; __u8 qpn; __u8 mgmt_class; __u8 mgmt_class_version; __u8 oui[3]; __u8 rmpp_version; }; /** * ib_user_mad_reg_req2 - MAD registration request * * @id - Set by the _kernel_; used by userspace to identify the * registered agent in future requests. * @qpn - Queue pair number; must be 0 or 1. * @mgmt_class - Indicates which management class of MADs should be * receive by the caller. This field is only required if * the user wishes to receive unsolicited MADs, otherwise * it should be 0. * @mgmt_class_version - Indicates which version of MADs for the given * management class to receive. * @res - Ignored. * @flags - additional registration flags; Must be in the set of * flags defined in IB_USER_MAD_REG_FLAGS_CAP * @method_mask - The caller wishes to receive unsolicited MADs for the * methods whose bit(s) is(are) set. * @oui - Indicates IEEE OUI to use when mgmt_class is a vendor * class in the range from 0x30 to 0x4f. Otherwise not * used. * @rmpp_version - If set, indicates the RMPP version to use. */ enum { IB_USER_MAD_USER_RMPP = (1 << 0), }; #define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP) struct ib_user_mad_reg_req2 { __u32 id; __u32 qpn; __u8 mgmt_class; __u8 mgmt_class_version; __u16 res; __u32 flags; __aligned_u64 method_mask[2]; __u32 oui; __u8 rmpp_version; __u8 reserved[3]; }; #endif /* IB_USER_MAD_H */ PKZu::rdma/rdma_netlink.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _RDMA_NETLINK_H #define _RDMA_NETLINK_H #include enum { RDMA_NL_IWCM = 2, RDMA_NL_RSVD, RDMA_NL_LS, /* RDMA Local Services */ RDMA_NL_NLDEV, /* RDMA device interface */ RDMA_NL_NUM_CLIENTS }; enum { RDMA_NL_GROUP_IWPM = 2, RDMA_NL_GROUP_LS, RDMA_NL_NUM_GROUPS }; #define RDMA_NL_GET_CLIENT(type) ((type & (((1 << 6) - 1) << 10)) >> 10) #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1)) #define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op) /* The minimum version that the iwpm kernel supports */ #define IWPM_UABI_VERSION_MIN 3 /* The latest version that the iwpm kernel supports */ #define IWPM_UABI_VERSION 4 /* iwarp port mapper message flags */ enum { /* Do not map the port for this IWPM request */ IWPM_FLAGS_NO_PORT_MAP = (1 << 0), }; /* iwarp port mapper op-codes */ enum { RDMA_NL_IWPM_REG_PID = 0, RDMA_NL_IWPM_ADD_MAPPING, RDMA_NL_IWPM_QUERY_MAPPING, RDMA_NL_IWPM_REMOVE_MAPPING, RDMA_NL_IWPM_REMOTE_INFO, RDMA_NL_IWPM_HANDLE_ERR, RDMA_NL_IWPM_MAPINFO, RDMA_NL_IWPM_MAPINFO_NUM, RDMA_NL_IWPM_HELLO, RDMA_NL_IWPM_NUM_OPS }; enum { IWPM_NLA_REG_PID_UNSPEC = 0, IWPM_NLA_REG_PID_SEQ, IWPM_NLA_REG_IF_NAME, IWPM_NLA_REG_IBDEV_NAME, IWPM_NLA_REG_ULIB_NAME, IWPM_NLA_REG_PID_MAX }; enum { IWPM_NLA_RREG_PID_UNSPEC = 0, IWPM_NLA_RREG_PID_SEQ, IWPM_NLA_RREG_IBDEV_NAME, IWPM_NLA_RREG_ULIB_NAME, IWPM_NLA_RREG_ULIB_VER, IWPM_NLA_RREG_PID_ERR, IWPM_NLA_RREG_PID_MAX }; enum { IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0, IWPM_NLA_MANAGE_MAPPING_SEQ, IWPM_NLA_MANAGE_ADDR, IWPM_NLA_MANAGE_FLAGS, IWPM_NLA_MANAGE_MAPPING_MAX }; enum { IWPM_NLA_RMANAGE_MAPPING_UNSPEC = 0, IWPM_NLA_RMANAGE_MAPPING_SEQ, IWPM_NLA_RMANAGE_ADDR, IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR, /* The following maintains bisectability of rdma-core */ IWPM_NLA_MANAGE_MAPPED_LOC_ADDR = IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR, IWPM_NLA_RMANAGE_MAPPING_ERR, IWPM_NLA_RMANAGE_MAPPING_MAX }; #define IWPM_NLA_MAPINFO_SEND_MAX 3 #define IWPM_NLA_REMOVE_MAPPING_MAX 3 enum { IWPM_NLA_QUERY_MAPPING_UNSPEC = 0, IWPM_NLA_QUERY_MAPPING_SEQ, IWPM_NLA_QUERY_LOCAL_ADDR, IWPM_NLA_QUERY_REMOTE_ADDR, IWPM_NLA_QUERY_FLAGS, IWPM_NLA_QUERY_MAPPING_MAX, }; enum { IWPM_NLA_RQUERY_MAPPING_UNSPEC = 0, IWPM_NLA_RQUERY_MAPPING_SEQ, IWPM_NLA_RQUERY_LOCAL_ADDR, IWPM_NLA_RQUERY_REMOTE_ADDR, IWPM_NLA_RQUERY_MAPPED_LOC_ADDR, IWPM_NLA_RQUERY_MAPPED_REM_ADDR, IWPM_NLA_RQUERY_MAPPING_ERR, IWPM_NLA_RQUERY_MAPPING_MAX }; enum { IWPM_NLA_MAPINFO_REQ_UNSPEC = 0, IWPM_NLA_MAPINFO_ULIB_NAME, IWPM_NLA_MAPINFO_ULIB_VER, IWPM_NLA_MAPINFO_REQ_MAX }; enum { IWPM_NLA_MAPINFO_UNSPEC = 0, IWPM_NLA_MAPINFO_LOCAL_ADDR, IWPM_NLA_MAPINFO_MAPPED_ADDR, IWPM_NLA_MAPINFO_FLAGS, IWPM_NLA_MAPINFO_MAX }; enum { IWPM_NLA_MAPINFO_NUM_UNSPEC = 0, IWPM_NLA_MAPINFO_SEQ, IWPM_NLA_MAPINFO_SEND_NUM, IWPM_NLA_MAPINFO_ACK_NUM, IWPM_NLA_MAPINFO_NUM_MAX }; enum { IWPM_NLA_ERR_UNSPEC = 0, IWPM_NLA_ERR_SEQ, IWPM_NLA_ERR_CODE, IWPM_NLA_ERR_MAX }; enum { IWPM_NLA_HELLO_UNSPEC = 0, IWPM_NLA_HELLO_ABI_VERSION, IWPM_NLA_HELLO_MAX }; /* For RDMA_NLDEV_ATTR_DEV_NODE_TYPE */ enum { /* IB values map to NodeInfo:NodeType. */ RDMA_NODE_IB_CA = 1, RDMA_NODE_IB_SWITCH, RDMA_NODE_IB_ROUTER, RDMA_NODE_RNIC, RDMA_NODE_USNIC, RDMA_NODE_USNIC_UDP, RDMA_NODE_UNSPECIFIED, }; /* * Local service operations: * RESOLVE - The client requests the local service to resolve a path. * SET_TIMEOUT - The local service requests the client to set the timeout. * IP_RESOLVE - The client requests the local service to resolve an IP to GID. */ enum { RDMA_NL_LS_OP_RESOLVE = 0, RDMA_NL_LS_OP_SET_TIMEOUT, RDMA_NL_LS_OP_IP_RESOLVE, RDMA_NL_LS_NUM_OPS }; /* Local service netlink message flags */ #define RDMA_NL_LS_F_ERR 0x0100 /* Failed response */ /* * Local service resolve operation family header. * The layout for the resolve operation: * nlmsg header * family header * attributes */ /* * Local service path use: * Specify how the path(s) will be used. * ALL - For connected CM operation (6 pathrecords) * UNIDIRECTIONAL - For unidirectional UD (1 pathrecord) * GMP - For miscellaneous GMP like operation (at least 1 reversible * pathrecord) */ enum { LS_RESOLVE_PATH_USE_ALL = 0, LS_RESOLVE_PATH_USE_UNIDIRECTIONAL, LS_RESOLVE_PATH_USE_GMP, LS_RESOLVE_PATH_USE_MAX }; #define LS_DEVICE_NAME_MAX 64 struct rdma_ls_resolve_header { __u8 device_name[LS_DEVICE_NAME_MAX]; __u8 port_num; __u8 path_use; }; struct rdma_ls_ip_resolve_header { __u32 ifindex; }; /* Local service attribute type */ #define RDMA_NLA_F_MANDATORY (1 << 13) #define RDMA_NLA_TYPE_MASK (~(NLA_F_NESTED | NLA_F_NET_BYTEORDER | \ RDMA_NLA_F_MANDATORY)) /* * Local service attributes: * Attr Name Size Byte order * ----------------------------------------------------- * PATH_RECORD struct ib_path_rec_data * TIMEOUT u32 cpu * SERVICE_ID u64 cpu * DGID u8[16] BE * SGID u8[16] BE * TCLASS u8 * PKEY u16 cpu * QOS_CLASS u16 cpu * IPV4 u32 BE * IPV6 u8[16] BE */ enum { LS_NLA_TYPE_UNSPEC = 0, LS_NLA_TYPE_PATH_RECORD, LS_NLA_TYPE_TIMEOUT, LS_NLA_TYPE_SERVICE_ID, LS_NLA_TYPE_DGID, LS_NLA_TYPE_SGID, LS_NLA_TYPE_TCLASS, LS_NLA_TYPE_PKEY, LS_NLA_TYPE_QOS_CLASS, LS_NLA_TYPE_IPV4, LS_NLA_TYPE_IPV6, LS_NLA_TYPE_MAX }; /* Local service DGID/SGID attribute: big endian */ struct rdma_nla_ls_gid { __u8 gid[16]; }; enum rdma_nldev_command { RDMA_NLDEV_CMD_UNSPEC, RDMA_NLDEV_CMD_GET, /* can dump */ RDMA_NLDEV_CMD_SET, RDMA_NLDEV_CMD_NEWLINK, RDMA_NLDEV_CMD_DELLINK, RDMA_NLDEV_CMD_PORT_GET, /* can dump */ RDMA_NLDEV_CMD_SYS_GET, RDMA_NLDEV_CMD_SYS_SET, /* 8 is free to use */ RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */ RDMA_NLDEV_CMD_RES_QP_GET, /* can dump */ RDMA_NLDEV_CMD_RES_CM_ID_GET, /* can dump */ RDMA_NLDEV_CMD_RES_CQ_GET, /* can dump */ RDMA_NLDEV_CMD_RES_MR_GET, /* can dump */ RDMA_NLDEV_CMD_RES_PD_GET, /* can dump */ RDMA_NLDEV_CMD_GET_CHARDEV, RDMA_NLDEV_CMD_STAT_SET, RDMA_NLDEV_CMD_STAT_GET, /* can dump */ RDMA_NLDEV_CMD_STAT_DEL, RDMA_NLDEV_CMD_RES_QP_GET_RAW, RDMA_NLDEV_CMD_RES_CQ_GET_RAW, RDMA_NLDEV_CMD_RES_MR_GET_RAW, RDMA_NLDEV_CMD_RES_CTX_GET, /* can dump */ RDMA_NLDEV_CMD_RES_SRQ_GET, /* can dump */ RDMA_NLDEV_CMD_STAT_GET_STATUS, RDMA_NLDEV_NUM_OPS }; enum rdma_nldev_print_type { RDMA_NLDEV_PRINT_TYPE_UNSPEC, RDMA_NLDEV_PRINT_TYPE_HEX, }; enum rdma_nldev_attr { /* don't change the order or add anything between, this is ABI! */ RDMA_NLDEV_ATTR_UNSPEC, /* Pad attribute for 64b alignment */ RDMA_NLDEV_ATTR_PAD = RDMA_NLDEV_ATTR_UNSPEC, /* Identifier for ib_device */ RDMA_NLDEV_ATTR_DEV_INDEX, /* u32 */ RDMA_NLDEV_ATTR_DEV_NAME, /* string */ /* * Device index together with port index are identifiers * for port/link properties. * * For RDMA_NLDEV_CMD_GET commamnd, port index will return number * of available ports in ib_device, while for port specific operations, * it will be real port index as it appears in sysfs. Port index follows * sysfs notation and starts from 1 for the first port. */ RDMA_NLDEV_ATTR_PORT_INDEX, /* u32 */ /* * Device and port capabilities * * When used for port info, first 32-bits are CapabilityMask followed by * 16-bit CapabilityMask2. */ RDMA_NLDEV_ATTR_CAP_FLAGS, /* u64 */ /* * FW version */ RDMA_NLDEV_ATTR_FW_VERSION, /* string */ /* * Node GUID (in host byte order) associated with the RDMA device. */ RDMA_NLDEV_ATTR_NODE_GUID, /* u64 */ /* * System image GUID (in host byte order) associated with * this RDMA device and other devices which are part of a * single system. */ RDMA_NLDEV_ATTR_SYS_IMAGE_GUID, /* u64 */ /* * Subnet prefix (in host byte order) */ RDMA_NLDEV_ATTR_SUBNET_PREFIX, /* u64 */ /* * Local Identifier (LID), * According to IB specification, It is 16-bit address assigned * by the Subnet Manager. Extended to be 32-bit for OmniPath users. */ RDMA_NLDEV_ATTR_LID, /* u32 */ RDMA_NLDEV_ATTR_SM_LID, /* u32 */ /* * LID mask control (LMC) */ RDMA_NLDEV_ATTR_LMC, /* u8 */ RDMA_NLDEV_ATTR_PORT_STATE, /* u8 */ RDMA_NLDEV_ATTR_PORT_PHYS_STATE, /* u8 */ RDMA_NLDEV_ATTR_DEV_NODE_TYPE, /* u8 */ RDMA_NLDEV_ATTR_RES_SUMMARY, /* nested table */ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_NAME, /* string */ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR, /* u64 */ RDMA_NLDEV_ATTR_RES_QP, /* nested table */ RDMA_NLDEV_ATTR_RES_QP_ENTRY, /* nested table */ /* * Local QPN */ RDMA_NLDEV_ATTR_RES_LQPN, /* u32 */ /* * Remote QPN, * Applicable for RC and UC only IBTA 11.2.5.3 QUERY QUEUE PAIR */ RDMA_NLDEV_ATTR_RES_RQPN, /* u32 */ /* * Receive Queue PSN, * Applicable for RC and UC only 11.2.5.3 QUERY QUEUE PAIR */ RDMA_NLDEV_ATTR_RES_RQ_PSN, /* u32 */ /* * Send Queue PSN */ RDMA_NLDEV_ATTR_RES_SQ_PSN, /* u32 */ RDMA_NLDEV_ATTR_RES_PATH_MIG_STATE, /* u8 */ /* * QP types as visible to RDMA/core, the reserved QPT * are not exported through this interface. */ RDMA_NLDEV_ATTR_RES_TYPE, /* u8 */ RDMA_NLDEV_ATTR_RES_STATE, /* u8 */ /* * Process ID which created object, * in case of kernel origin, PID won't exist. */ RDMA_NLDEV_ATTR_RES_PID, /* u32 */ /* * The name of process created following resource. * It will exist only for kernel objects. * For user created objects, the user is supposed * to read /proc/PID/comm file. */ RDMA_NLDEV_ATTR_RES_KERN_NAME, /* string */ RDMA_NLDEV_ATTR_RES_CM_ID, /* nested table */ RDMA_NLDEV_ATTR_RES_CM_ID_ENTRY, /* nested table */ /* * rdma_cm_id port space. */ RDMA_NLDEV_ATTR_RES_PS, /* u32 */ /* * Source and destination socket addresses */ RDMA_NLDEV_ATTR_RES_SRC_ADDR, /* __kernel_sockaddr_storage */ RDMA_NLDEV_ATTR_RES_DST_ADDR, /* __kernel_sockaddr_storage */ RDMA_NLDEV_ATTR_RES_CQ, /* nested table */ RDMA_NLDEV_ATTR_RES_CQ_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_RES_CQE, /* u32 */ RDMA_NLDEV_ATTR_RES_USECNT, /* u64 */ RDMA_NLDEV_ATTR_RES_POLL_CTX, /* u8 */ RDMA_NLDEV_ATTR_RES_MR, /* nested table */ RDMA_NLDEV_ATTR_RES_MR_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_RES_RKEY, /* u32 */ RDMA_NLDEV_ATTR_RES_LKEY, /* u32 */ RDMA_NLDEV_ATTR_RES_IOVA, /* u64 */ RDMA_NLDEV_ATTR_RES_MRLEN, /* u64 */ RDMA_NLDEV_ATTR_RES_PD, /* nested table */ RDMA_NLDEV_ATTR_RES_PD_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY, /* u32 */ RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY, /* u32 */ /* * Provides logical name and index of netdevice which is * connected to physical port. This information is relevant * for RoCE and iWARP. * * The netdevices which are associated with containers are * supposed to be exported together with GID table once it * will be exposed through the netlink. Because the * associated netdevices are properties of GIDs. */ RDMA_NLDEV_ATTR_NDEV_INDEX, /* u32 */ RDMA_NLDEV_ATTR_NDEV_NAME, /* string */ /* * driver-specific attributes. */ RDMA_NLDEV_ATTR_DRIVER, /* nested table */ RDMA_NLDEV_ATTR_DRIVER_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_DRIVER_STRING, /* string */ /* * u8 values from enum rdma_nldev_print_type */ RDMA_NLDEV_ATTR_DRIVER_PRINT_TYPE, /* u8 */ RDMA_NLDEV_ATTR_DRIVER_S32, /* s32 */ RDMA_NLDEV_ATTR_DRIVER_U32, /* u32 */ RDMA_NLDEV_ATTR_DRIVER_S64, /* s64 */ RDMA_NLDEV_ATTR_DRIVER_U64, /* u64 */ /* * Indexes to get/set secific entry, * for QP use RDMA_NLDEV_ATTR_RES_LQPN */ RDMA_NLDEV_ATTR_RES_PDN, /* u32 */ RDMA_NLDEV_ATTR_RES_CQN, /* u32 */ RDMA_NLDEV_ATTR_RES_MRN, /* u32 */ RDMA_NLDEV_ATTR_RES_CM_IDN, /* u32 */ RDMA_NLDEV_ATTR_RES_CTXN, /* u32 */ /* * Identifies the rdma driver. eg: "rxe" or "siw" */ RDMA_NLDEV_ATTR_LINK_TYPE, /* string */ /* * net namespace mode for rdma subsystem: * either shared or exclusive among multiple net namespaces. */ RDMA_NLDEV_SYS_ATTR_NETNS_MODE, /* u8 */ /* * Device protocol, e.g. ib, iw, usnic, roce and opa */ RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */ /* * File descriptor handle of the net namespace object */ RDMA_NLDEV_NET_NS_FD, /* u32 */ /* * Information about a chardev. * CHARDEV_TYPE is the name of the chardev ABI (ie uverbs, umad, etc) * CHARDEV_ABI signals the ABI revision (historical) * CHARDEV_NAME is the kernel name for the /dev/ file (no directory) * CHARDEV is the 64 bit dev_t for the inode */ RDMA_NLDEV_ATTR_CHARDEV_TYPE, /* string */ RDMA_NLDEV_ATTR_CHARDEV_NAME, /* string */ RDMA_NLDEV_ATTR_CHARDEV_ABI, /* u64 */ RDMA_NLDEV_ATTR_CHARDEV, /* u64 */ RDMA_NLDEV_ATTR_UVERBS_DRIVER_ID, /* u64 */ /* * Counter-specific attributes. */ RDMA_NLDEV_ATTR_STAT_MODE, /* u32 */ RDMA_NLDEV_ATTR_STAT_RES, /* u32 */ RDMA_NLDEV_ATTR_STAT_AUTO_MODE_MASK, /* u32 */ RDMA_NLDEV_ATTR_STAT_COUNTER, /* nested table */ RDMA_NLDEV_ATTR_STAT_COUNTER_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_STAT_COUNTER_ID, /* u32 */ RDMA_NLDEV_ATTR_STAT_HWCOUNTERS, /* nested table */ RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_NAME, /* string */ RDMA_NLDEV_ATTR_STAT_HWCOUNTER_ENTRY_VALUE, /* u64 */ /* * CQ adaptive moderatio (DIM) */ RDMA_NLDEV_ATTR_DEV_DIM, /* u8 */ RDMA_NLDEV_ATTR_RES_RAW, /* binary */ RDMA_NLDEV_ATTR_RES_CTX, /* nested table */ RDMA_NLDEV_ATTR_RES_CTX_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_RES_SRQ, /* nested table */ RDMA_NLDEV_ATTR_RES_SRQ_ENTRY, /* nested table */ RDMA_NLDEV_ATTR_RES_SRQN, /* u32 */ RDMA_NLDEV_ATTR_MIN_RANGE, /* u32 */ RDMA_NLDEV_ATTR_MAX_RANGE, /* u32 */ RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK, /* u8 */ RDMA_NLDEV_ATTR_STAT_HWCOUNTER_INDEX, /* u32 */ RDMA_NLDEV_ATTR_STAT_HWCOUNTER_DYNAMIC, /* u8 */ /* * Always the end */ RDMA_NLDEV_ATTR_MAX }; /* * Supported counter bind modes. All modes are mutual-exclusive. */ enum rdma_nl_counter_mode { RDMA_COUNTER_MODE_NONE, /* * A qp is bound with a counter automatically during initialization * based on the auto mode (e.g., qp type, ...) */ RDMA_COUNTER_MODE_AUTO, /* * Which qp are bound with which counter is explicitly specified * by the user */ RDMA_COUNTER_MODE_MANUAL, /* * Always the end */ RDMA_COUNTER_MODE_MAX, }; /* * Supported criteria in counter auto mode. * Currently only "qp type" is supported */ enum rdma_nl_counter_mask { RDMA_COUNTER_MASK_QP_TYPE = 1, RDMA_COUNTER_MASK_PID = 1 << 1, }; #endif /* _RDMA_NETLINK_H */ PKZ(Tr rdma/mthca-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef MTHCA_ABI_USER_H #define MTHCA_ABI_USER_H #include /* * Increment this value if any changes that break userspace ABI * compatibility are made. */ #define MTHCA_UVERBS_ABI_VERSION 1 /* * Make sure that all structs defined in this file remain laid out so * that they pack the same way on 32-bit and 64-bit architectures (to * avoid incompatibility between 32-bit userspace and 64-bit kernels). * In particular do not use pointer types -- pass pointers in __u64 * instead. */ struct mthca_alloc_ucontext_resp { __u32 qp_tab_size; __u32 uarc_size; }; struct mthca_alloc_pd_resp { __u32 pdn; __u32 reserved; }; /* * Mark the memory region with a DMA attribute that causes * in-flight DMA to be flushed when the region is written to: */ #define MTHCA_MR_DMASYNC 0x1 struct mthca_reg_mr { __u32 mr_attrs; __u32 reserved; }; struct mthca_create_cq { __u32 lkey; __u32 pdn; __aligned_u64 arm_db_page; __aligned_u64 set_db_page; __u32 arm_db_index; __u32 set_db_index; }; struct mthca_create_cq_resp { __u32 cqn; __u32 reserved; }; struct mthca_resize_cq { __u32 lkey; __u32 reserved; }; struct mthca_create_srq { __u32 lkey; __u32 db_index; __aligned_u64 db_page; }; struct mthca_create_srq_resp { __u32 srqn; __u32 reserved; }; struct mthca_create_qp { __u32 lkey; __u32 reserved; __aligned_u64 sq_db_page; __aligned_u64 rq_db_page; __u32 sq_db_index; __u32 rq_db_index; }; #endif /* MTHCA_ABI_USER_H */ PKZ4$rdma/hns-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2016 Hisilicon Limited. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef HNS_ABI_USER_H #define HNS_ABI_USER_H #include struct hns_roce_ib_create_cq { __aligned_u64 buf_addr; __aligned_u64 db_addr; }; struct hns_roce_ib_create_cq_resp { __aligned_u64 cqn; /* Only 32 bits used, 64 for compat */ __aligned_u64 cap_flags; }; struct hns_roce_ib_create_qp { __aligned_u64 buf_addr; __aligned_u64 db_addr; __u8 log_sq_bb_count; __u8 log_sq_stride; __u8 sq_no_prefetch; __u8 reserved[5]; __aligned_u64 sdb_addr; }; struct hns_roce_ib_create_qp_resp { __aligned_u64 cap_flags; }; struct hns_roce_ib_alloc_ucontext_resp { __u32 qp_tab_size; __u32 reserved; }; struct hns_roce_ib_alloc_pd_resp { __u32 pdn; }; #endif /* HNS_ABI_USER_H */ PKZ#drdma/ocrdma-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ /* This file is part of the Emulex RoCE Device Driver for * RoCE (RDMA over Converged Ethernet) adapters. * Copyright (C) 2012-2015 Emulex. All rights reserved. * EMULEX and SLI are trademarks of Emulex. * www.emulex.com * * This software is available to you under a choice of one of two licenses. * You may choose to be licensed under the terms of the GNU General Public * License (GPL) Version 2, available from the file COPYING in the main * directory of this source tree, or the BSD license below: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Contact Information: * linux-drivers@emulex.com * * Emulex * 3333 Susan Street * Costa Mesa, CA 92626 */ #ifndef OCRDMA_ABI_USER_H #define OCRDMA_ABI_USER_H #include #define OCRDMA_ABI_VERSION 2 #define OCRDMA_BE_ROCE_ABI_VERSION 1 /* user kernel communication data structures. */ struct ocrdma_alloc_ucontext_resp { __u32 dev_id; __u32 wqe_size; __u32 max_inline_data; __u32 dpp_wqe_size; __aligned_u64 ah_tbl_page; __u32 ah_tbl_len; __u32 rqe_size; __u8 fw_ver[32]; /* for future use/new features in progress */ __aligned_u64 rsvd1; __aligned_u64 rsvd2; }; struct ocrdma_alloc_pd_ureq { __u32 rsvd[2]; }; struct ocrdma_alloc_pd_uresp { __u32 id; __u32 dpp_enabled; __u32 dpp_page_addr_hi; __u32 dpp_page_addr_lo; __u32 rsvd[2]; }; struct ocrdma_create_cq_ureq { __u32 dpp_cq; __u32 rsvd; /* pad */ }; #define MAX_CQ_PAGES 8 struct ocrdma_create_cq_uresp { __u32 cq_id; __u32 page_size; __u32 num_pages; __u32 max_hw_cqe; __aligned_u64 page_addr[MAX_CQ_PAGES]; __aligned_u64 db_page_addr; __u32 db_page_size; __u32 phase_change; /* for future use/new features in progress */ __aligned_u64 rsvd1; __aligned_u64 rsvd2; }; #define MAX_QP_PAGES 8 #define MAX_UD_AV_PAGES 8 struct ocrdma_create_qp_ureq { __u8 enable_dpp_cq; __u8 rsvd; __u16 dpp_cq_id; __u32 rsvd1; /* pad */ }; struct ocrdma_create_qp_uresp { __u16 qp_id; __u16 sq_dbid; __u16 rq_dbid; __u16 resv0; /* pad */ __u32 sq_page_size; __u32 rq_page_size; __u32 num_sq_pages; __u32 num_rq_pages; __aligned_u64 sq_page_addr[MAX_QP_PAGES]; __aligned_u64 rq_page_addr[MAX_QP_PAGES]; __aligned_u64 db_page_addr; __u32 db_page_size; __u32 dpp_credit; __u32 dpp_offset; __u32 num_wqe_allocated; __u32 num_rqe_allocated; __u32 db_sq_offset; __u32 db_rq_offset; __u32 db_shift; __aligned_u64 rsvd[11]; }; struct ocrdma_create_srq_uresp { __u16 rq_dbid; __u16 resv0; /* pad */ __u32 resv1; __u32 rq_page_size; __u32 num_rq_pages; __aligned_u64 rq_page_addr[MAX_QP_PAGES]; __aligned_u64 db_page_addr; __u32 db_page_size; __u32 num_rqe_allocated; __u32 db_rq_offset; __u32 db_shift; __aligned_u64 rsvd2; __aligned_u64 rsvd3; }; #endif /* OCRDMA_ABI_USER_H */ PKZۺ rdma/bnxt_re-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ /* * Broadcom NetXtreme-E RoCE driver. * * Copyright (c) 2016 - 2017, Broadcom. All rights reserved. The term * Broadcom refers to Broadcom Limited and/or its subsidiaries. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * BSD license below: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Description: Uverbs ABI header file */ #ifndef __BNXT_RE_UVERBS_ABI_H__ #define __BNXT_RE_UVERBS_ABI_H__ #include #define BNXT_RE_ABI_VERSION 1 #define BNXT_RE_CHIP_ID0_CHIP_NUM_SFT 0x00 #define BNXT_RE_CHIP_ID0_CHIP_REV_SFT 0x10 #define BNXT_RE_CHIP_ID0_CHIP_MET_SFT 0x18 enum { BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL, BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, }; enum bnxt_re_wqe_mode { BNXT_QPLIB_WQE_MODE_STATIC = 0x00, BNXT_QPLIB_WQE_MODE_VARIABLE = 0x01, BNXT_QPLIB_WQE_MODE_INVALID = 0x02, }; struct bnxt_re_uctx_resp { __u32 dev_id; __u32 max_qp; __u32 pg_size; __u32 cqe_sz; __u32 max_cqd; __u32 rsvd; __aligned_u64 comp_mask; __u32 chip_id0; __u32 chip_id1; __u32 mode; __u32 rsvd1; /* padding */ }; /* * This struct is placed after the ib_uverbs_alloc_pd_resp struct, which is * not 8 byted aligned. To avoid undesired padding in various cases we have to * set this struct to packed. */ struct bnxt_re_pd_resp { __u32 pdid; __u32 dpi; __u64 dbr; } __attribute__((packed, aligned(4))); struct bnxt_re_cq_req { __aligned_u64 cq_va; __aligned_u64 cq_handle; }; struct bnxt_re_cq_resp { __u32 cqid; __u32 tail; __u32 phase; __u32 rsvd; }; struct bnxt_re_qp_req { __aligned_u64 qpsva; __aligned_u64 qprva; __aligned_u64 qp_handle; }; struct bnxt_re_qp_resp { __u32 qpid; __u32 rsvd; }; struct bnxt_re_srq_req { __aligned_u64 srqva; __aligned_u64 srq_handle; }; struct bnxt_re_srq_resp { __u32 srqid; }; enum bnxt_re_shpg_offt { BNXT_RE_BEG_RESV_OFFT = 0x00, BNXT_RE_AVID_OFFT = 0x10, BNXT_RE_AVID_SIZE = 0x04, BNXT_RE_END_RESV_OFFT = 0xFF0 }; #endif /* __BNXT_RE_UVERBS_ABI_H__*/ PKZ7Zrdma/rdma_user_cm.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef RDMA_USER_CM_H #define RDMA_USER_CM_H #include #include #include #include #include #define RDMA_USER_CM_ABI_VERSION 4 #define RDMA_MAX_PRIVATE_DATA 256 enum { RDMA_USER_CM_CMD_CREATE_ID, RDMA_USER_CM_CMD_DESTROY_ID, RDMA_USER_CM_CMD_BIND_IP, RDMA_USER_CM_CMD_RESOLVE_IP, RDMA_USER_CM_CMD_RESOLVE_ROUTE, RDMA_USER_CM_CMD_QUERY_ROUTE, RDMA_USER_CM_CMD_CONNECT, RDMA_USER_CM_CMD_LISTEN, RDMA_USER_CM_CMD_ACCEPT, RDMA_USER_CM_CMD_REJECT, RDMA_USER_CM_CMD_DISCONNECT, RDMA_USER_CM_CMD_INIT_QP_ATTR, RDMA_USER_CM_CMD_GET_EVENT, RDMA_USER_CM_CMD_GET_OPTION, RDMA_USER_CM_CMD_SET_OPTION, RDMA_USER_CM_CMD_NOTIFY, RDMA_USER_CM_CMD_JOIN_IP_MCAST, RDMA_USER_CM_CMD_LEAVE_MCAST, RDMA_USER_CM_CMD_MIGRATE_ID, RDMA_USER_CM_CMD_QUERY, RDMA_USER_CM_CMD_BIND, RDMA_USER_CM_CMD_RESOLVE_ADDR, RDMA_USER_CM_CMD_JOIN_MCAST }; /* See IBTA Annex A11, servies ID bytes 4 & 5 */ enum rdma_ucm_port_space { RDMA_PS_IPOIB = 0x0002, RDMA_PS_IB = 0x013F, RDMA_PS_TCP = 0x0106, RDMA_PS_UDP = 0x0111, }; /* * command ABI structures. */ struct rdma_ucm_cmd_hdr { __u32 cmd; __u16 in; __u16 out; }; struct rdma_ucm_create_id { __aligned_u64 uid; __aligned_u64 response; __u16 ps; /* use enum rdma_ucm_port_space */ __u8 qp_type; __u8 reserved[5]; }; struct rdma_ucm_create_id_resp { __u32 id; }; struct rdma_ucm_destroy_id { __aligned_u64 response; __u32 id; __u32 reserved; }; struct rdma_ucm_destroy_id_resp { __u32 events_reported; }; struct rdma_ucm_bind_ip { __aligned_u64 response; struct sockaddr_in6 addr; __u32 id; }; struct rdma_ucm_bind { __u32 id; __u16 addr_size; __u16 reserved; struct __kernel_sockaddr_storage addr; }; struct rdma_ucm_resolve_ip { struct sockaddr_in6 src_addr; struct sockaddr_in6 dst_addr; __u32 id; __u32 timeout_ms; }; struct rdma_ucm_resolve_addr { __u32 id; __u32 timeout_ms; __u16 src_size; __u16 dst_size; __u32 reserved; struct __kernel_sockaddr_storage src_addr; struct __kernel_sockaddr_storage dst_addr; }; struct rdma_ucm_resolve_route { __u32 id; __u32 timeout_ms; }; enum { RDMA_USER_CM_QUERY_ADDR, RDMA_USER_CM_QUERY_PATH, RDMA_USER_CM_QUERY_GID }; struct rdma_ucm_query { __aligned_u64 response; __u32 id; __u32 option; }; struct rdma_ucm_query_route_resp { __aligned_u64 node_guid; struct ib_user_path_rec ib_route[2]; struct sockaddr_in6 src_addr; struct sockaddr_in6 dst_addr; __u32 num_paths; __u8 port_num; __u8 reserved[3]; __u32 ibdev_index; __u32 reserved1; }; struct rdma_ucm_query_addr_resp { __aligned_u64 node_guid; __u8 port_num; __u8 reserved; __u16 pkey; __u16 src_size; __u16 dst_size; struct __kernel_sockaddr_storage src_addr; struct __kernel_sockaddr_storage dst_addr; __u32 ibdev_index; __u32 reserved1; }; struct rdma_ucm_query_path_resp { __u32 num_paths; __u32 reserved; struct ib_path_rec_data path_data[]; }; struct rdma_ucm_conn_param { __u32 qp_num; __u32 qkey; __u8 private_data[RDMA_MAX_PRIVATE_DATA]; __u8 private_data_len; __u8 srq; __u8 responder_resources; __u8 initiator_depth; __u8 flow_control; __u8 retry_count; __u8 rnr_retry_count; __u8 valid; }; struct rdma_ucm_ud_param { __u32 qp_num; __u32 qkey; struct ib_uverbs_ah_attr ah_attr; __u8 private_data[RDMA_MAX_PRIVATE_DATA]; __u8 private_data_len; __u8 reserved[7]; }; struct rdma_ucm_ece { __u32 vendor_id; __u32 attr_mod; }; struct rdma_ucm_connect { struct rdma_ucm_conn_param conn_param; __u32 id; __u32 reserved; struct rdma_ucm_ece ece; }; struct rdma_ucm_listen { __u32 id; __u32 backlog; }; struct rdma_ucm_accept { __aligned_u64 uid; struct rdma_ucm_conn_param conn_param; __u32 id; __u32 reserved; struct rdma_ucm_ece ece; }; struct rdma_ucm_reject { __u32 id; __u8 private_data_len; __u8 reason; __u8 reserved[2]; __u8 private_data[RDMA_MAX_PRIVATE_DATA]; }; struct rdma_ucm_disconnect { __u32 id; }; struct rdma_ucm_init_qp_attr { __aligned_u64 response; __u32 id; __u32 qp_state; }; struct rdma_ucm_notify { __u32 id; __u32 event; }; struct rdma_ucm_join_ip_mcast { __aligned_u64 response; /* rdma_ucm_create_id_resp */ __aligned_u64 uid; struct sockaddr_in6 addr; __u32 id; }; /* Multicast join flags */ enum { RDMA_MC_JOIN_FLAG_FULLMEMBER, RDMA_MC_JOIN_FLAG_SENDONLY_FULLMEMBER, RDMA_MC_JOIN_FLAG_RESERVED, }; struct rdma_ucm_join_mcast { __aligned_u64 response; /* rdma_ucma_create_id_resp */ __aligned_u64 uid; __u32 id; __u16 addr_size; __u16 join_flags; struct __kernel_sockaddr_storage addr; }; struct rdma_ucm_get_event { __aligned_u64 response; }; struct rdma_ucm_event_resp { __aligned_u64 uid; __u32 id; __u32 event; __u32 status; /* * NOTE: This union is not aligned to 8 bytes so none of the union * members may contain a u64 or anything with higher alignment than 4. */ union { struct rdma_ucm_conn_param conn; struct rdma_ucm_ud_param ud; } param; __u32 reserved; struct rdma_ucm_ece ece; }; /* Option levels */ enum { RDMA_OPTION_ID = 0, RDMA_OPTION_IB = 1 }; /* Option details */ enum { RDMA_OPTION_ID_TOS = 0, RDMA_OPTION_ID_REUSEADDR = 1, RDMA_OPTION_ID_AFONLY = 2, RDMA_OPTION_ID_ACK_TIMEOUT = 3 }; enum { RDMA_OPTION_IB_PATH = 1 }; struct rdma_ucm_set_option { __aligned_u64 optval; __u32 id; __u32 level; __u32 optname; __u32 optlen; }; struct rdma_ucm_migrate_id { __aligned_u64 response; __u32 id; __u32 fd; }; struct rdma_ucm_migrate_resp { __u32 events_reported; }; #endif /* RDMA_USER_CM_H */ PKZ{L L rdma/siw-abi.hnu[/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ /* Authors: Bernard Metzler */ /* Copyright (c) 2008-2019, IBM Corporation */ #ifndef _SIW_USER_H #define _SIW_USER_H #include #define SIW_NODE_DESC_COMMON "Software iWARP stack" #define SIW_ABI_VERSION 1 #define SIW_MAX_SGE 6 #define SIW_UOBJ_MAX_KEY 0x08FFFF #define SIW_INVAL_UOBJ_KEY (SIW_UOBJ_MAX_KEY + 1) struct siw_uresp_create_cq { __u32 cq_id; __u32 num_cqe; __aligned_u64 cq_key; }; struct siw_uresp_create_qp { __u32 qp_id; __u32 num_sqe; __u32 num_rqe; __u32 pad; __aligned_u64 sq_key; __aligned_u64 rq_key; }; struct siw_ureq_reg_mr { __u8 stag_key; __u8 reserved[3]; __u32 pad; }; struct siw_uresp_reg_mr { __u32 stag; __u32 pad; }; struct siw_uresp_create_srq { __u32 num_rqe; __u32 pad; __aligned_u64 srq_key; }; struct siw_uresp_alloc_ctx { __u32 dev_id; __u32 pad; }; enum siw_opcode { SIW_OP_WRITE, SIW_OP_READ, SIW_OP_READ_LOCAL_INV, SIW_OP_SEND, SIW_OP_SEND_WITH_IMM, SIW_OP_SEND_REMOTE_INV, /* Unsupported */ SIW_OP_FETCH_AND_ADD, SIW_OP_COMP_AND_SWAP, SIW_OP_RECEIVE, /* provider internal SQE */ SIW_OP_READ_RESPONSE, /* * below opcodes valid for * in-kernel clients only */ SIW_OP_INVAL_STAG, SIW_OP_REG_MR, SIW_NUM_OPCODES }; /* Keep it same as ibv_sge to allow for memcpy */ struct siw_sge { __aligned_u64 laddr; __u32 length; __u32 lkey; }; /* * Inline data are kept within the work request itself occupying * the space of sge[1] .. sge[n]. Therefore, __inline__ data cannot be * supported if SIW_MAX_SGE is below 2 elements. */ #define SIW_MAX_INLINE (sizeof(struct siw_sge) * (SIW_MAX_SGE - 1)) #if SIW_MAX_SGE < 2 #error "SIW_MAX_SGE must be at least 2" #endif enum siw_wqe_flags { SIW_WQE_VALID = 1, SIW_WQE_INLINE = (1 << 1), SIW_WQE_SIGNALLED = (1 << 2), SIW_WQE_SOLICITED = (1 << 3), SIW_WQE_READ_FENCE = (1 << 4), SIW_WQE_REM_INVAL = (1 << 5), SIW_WQE_COMPLETED = (1 << 6) }; /* Send Queue Element */ struct siw_sqe { __aligned_u64 id; __u16 flags; __u8 num_sge; /* Contains enum siw_opcode values */ __u8 opcode; __u32 rkey; union { __aligned_u64 raddr; __aligned_u64 base_mr; }; union { struct siw_sge sge[SIW_MAX_SGE]; __aligned_u64 access; }; }; /* Receive Queue Element */ struct siw_rqe { __aligned_u64 id; __u16 flags; __u8 num_sge; /* * only used by kernel driver, * ignored if set by user */ __u8 opcode; __u32 unused; struct siw_sge sge[SIW_MAX_SGE]; }; enum siw_notify_flags { SIW_NOTIFY_NOT = (0), SIW_NOTIFY_SOLICITED = (1 << 0), SIW_NOTIFY_NEXT_COMPLETION = (1 << 1), SIW_NOTIFY_MISSED_EVENTS = (1 << 2), SIW_NOTIFY_ALL = SIW_NOTIFY_SOLICITED | SIW_NOTIFY_NEXT_COMPLETION | SIW_NOTIFY_MISSED_EVENTS }; enum siw_wc_status { SIW_WC_SUCCESS, SIW_WC_LOC_LEN_ERR, SIW_WC_LOC_PROT_ERR, SIW_WC_LOC_QP_OP_ERR, SIW_WC_WR_FLUSH_ERR, SIW_WC_BAD_RESP_ERR, SIW_WC_LOC_ACCESS_ERR, SIW_WC_REM_ACCESS_ERR, SIW_WC_REM_INV_REQ_ERR, SIW_WC_GENERAL_ERR, SIW_NUM_WC_STATUS }; struct siw_cqe { __aligned_u64 id; __u8 flags; __u8 opcode; __u16 status; __u32 bytes; union { __aligned_u64 imm_data; __u32 inval_stag; }; /* QP number or QP pointer */ union { struct ib_qp *base_qp; __aligned_u64 qp_id; }; }; /* * Shared structure between user and kernel * to control CQ arming. */ struct siw_cq_ctrl { __u32 flags; __u32 pad; }; #endif PKZ+$$rdma/ib_user_ioctl_cmds.hnu[/* * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef IB_USER_IOCTL_CMDS_H #define IB_USER_IOCTL_CMDS_H #define UVERBS_ID_NS_MASK 0xF000 #define UVERBS_ID_NS_SHIFT 12 #define UVERBS_UDATA_DRIVER_DATA_NS 1 #define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT) enum uverbs_default_objects { UVERBS_OBJECT_DEVICE, /* No instances of DEVICE are allowed */ UVERBS_OBJECT_PD, UVERBS_OBJECT_COMP_CHANNEL, UVERBS_OBJECT_CQ, UVERBS_OBJECT_QP, UVERBS_OBJECT_SRQ, UVERBS_OBJECT_AH, UVERBS_OBJECT_MR, UVERBS_OBJECT_MW, UVERBS_OBJECT_FLOW, UVERBS_OBJECT_XRCD, UVERBS_OBJECT_RWQ_IND_TBL, UVERBS_OBJECT_WQ, UVERBS_OBJECT_FLOW_ACTION, UVERBS_OBJECT_DM, UVERBS_OBJECT_COUNTERS, UVERBS_OBJECT_ASYNC_EVENT, }; enum { UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, UVERBS_ATTR_UHW_OUT, }; enum uverbs_methods_device { UVERBS_METHOD_INVOKE_WRITE, UVERBS_METHOD_INFO_HANDLES, UVERBS_METHOD_QUERY_PORT, UVERBS_METHOD_GET_CONTEXT, UVERBS_METHOD_QUERY_CONTEXT, UVERBS_METHOD_QUERY_GID_TABLE, UVERBS_METHOD_QUERY_GID_ENTRY, }; enum uverbs_attrs_invoke_write_cmd_attr_ids { UVERBS_ATTR_CORE_IN, UVERBS_ATTR_CORE_OUT, UVERBS_ATTR_WRITE_CMD, }; enum uverbs_attrs_query_port_cmd_attr_ids { UVERBS_ATTR_QUERY_PORT_PORT_NUM, UVERBS_ATTR_QUERY_PORT_RESP, }; enum uverbs_attrs_get_context_attr_ids { UVERBS_ATTR_GET_CONTEXT_NUM_COMP_VECTORS, UVERBS_ATTR_GET_CONTEXT_CORE_SUPPORT, }; enum uverbs_attrs_query_context_attr_ids { UVERBS_ATTR_QUERY_CONTEXT_NUM_COMP_VECTORS, UVERBS_ATTR_QUERY_CONTEXT_CORE_SUPPORT, }; enum uverbs_attrs_create_cq_cmd_attr_ids { UVERBS_ATTR_CREATE_CQ_HANDLE, UVERBS_ATTR_CREATE_CQ_CQE, UVERBS_ATTR_CREATE_CQ_USER_HANDLE, UVERBS_ATTR_CREATE_CQ_COMP_CHANNEL, UVERBS_ATTR_CREATE_CQ_COMP_VECTOR, UVERBS_ATTR_CREATE_CQ_FLAGS, UVERBS_ATTR_CREATE_CQ_RESP_CQE, UVERBS_ATTR_CREATE_CQ_EVENT_FD, }; enum uverbs_attrs_destroy_cq_cmd_attr_ids { UVERBS_ATTR_DESTROY_CQ_HANDLE, UVERBS_ATTR_DESTROY_CQ_RESP, }; enum uverbs_attrs_create_flow_action_esp { UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE, UVERBS_ATTR_FLOW_ACTION_ESP_ATTRS, UVERBS_ATTR_FLOW_ACTION_ESP_ESN, UVERBS_ATTR_FLOW_ACTION_ESP_KEYMAT, UVERBS_ATTR_FLOW_ACTION_ESP_REPLAY, UVERBS_ATTR_FLOW_ACTION_ESP_ENCAP, }; enum uverbs_attrs_modify_flow_action_esp { UVERBS_ATTR_MODIFY_FLOW_ACTION_ESP_HANDLE = UVERBS_ATTR_CREATE_FLOW_ACTION_ESP_HANDLE, }; enum uverbs_attrs_destroy_flow_action_esp { UVERBS_ATTR_DESTROY_FLOW_ACTION_HANDLE, }; enum uverbs_attrs_create_qp_cmd_attr_ids { UVERBS_ATTR_CREATE_QP_HANDLE, UVERBS_ATTR_CREATE_QP_XRCD_HANDLE, UVERBS_ATTR_CREATE_QP_PD_HANDLE, UVERBS_ATTR_CREATE_QP_SRQ_HANDLE, UVERBS_ATTR_CREATE_QP_SEND_CQ_HANDLE, UVERBS_ATTR_CREATE_QP_RECV_CQ_HANDLE, UVERBS_ATTR_CREATE_QP_IND_TABLE_HANDLE, UVERBS_ATTR_CREATE_QP_USER_HANDLE, UVERBS_ATTR_CREATE_QP_CAP, UVERBS_ATTR_CREATE_QP_TYPE, UVERBS_ATTR_CREATE_QP_FLAGS, UVERBS_ATTR_CREATE_QP_SOURCE_QPN, UVERBS_ATTR_CREATE_QP_EVENT_FD, UVERBS_ATTR_CREATE_QP_RESP_CAP, UVERBS_ATTR_CREATE_QP_RESP_QP_NUM, }; enum uverbs_attrs_destroy_qp_cmd_attr_ids { UVERBS_ATTR_DESTROY_QP_HANDLE, UVERBS_ATTR_DESTROY_QP_RESP, }; enum uverbs_methods_qp { UVERBS_METHOD_QP_CREATE, UVERBS_METHOD_QP_DESTROY, }; enum uverbs_attrs_create_srq_cmd_attr_ids { UVERBS_ATTR_CREATE_SRQ_HANDLE, UVERBS_ATTR_CREATE_SRQ_PD_HANDLE, UVERBS_ATTR_CREATE_SRQ_XRCD_HANDLE, UVERBS_ATTR_CREATE_SRQ_CQ_HANDLE, UVERBS_ATTR_CREATE_SRQ_USER_HANDLE, UVERBS_ATTR_CREATE_SRQ_MAX_WR, UVERBS_ATTR_CREATE_SRQ_MAX_SGE, UVERBS_ATTR_CREATE_SRQ_LIMIT, UVERBS_ATTR_CREATE_SRQ_MAX_NUM_TAGS, UVERBS_ATTR_CREATE_SRQ_TYPE, UVERBS_ATTR_CREATE_SRQ_EVENT_FD, UVERBS_ATTR_CREATE_SRQ_RESP_MAX_WR, UVERBS_ATTR_CREATE_SRQ_RESP_MAX_SGE, UVERBS_ATTR_CREATE_SRQ_RESP_SRQ_NUM, }; enum uverbs_attrs_destroy_srq_cmd_attr_ids { UVERBS_ATTR_DESTROY_SRQ_HANDLE, UVERBS_ATTR_DESTROY_SRQ_RESP, }; enum uverbs_methods_srq { UVERBS_METHOD_SRQ_CREATE, UVERBS_METHOD_SRQ_DESTROY, }; enum uverbs_methods_cq { UVERBS_METHOD_CQ_CREATE, UVERBS_METHOD_CQ_DESTROY, }; enum uverbs_attrs_create_wq_cmd_attr_ids { UVERBS_ATTR_CREATE_WQ_HANDLE, UVERBS_ATTR_CREATE_WQ_PD_HANDLE, UVERBS_ATTR_CREATE_WQ_CQ_HANDLE, UVERBS_ATTR_CREATE_WQ_USER_HANDLE, UVERBS_ATTR_CREATE_WQ_TYPE, UVERBS_ATTR_CREATE_WQ_EVENT_FD, UVERBS_ATTR_CREATE_WQ_MAX_WR, UVERBS_ATTR_CREATE_WQ_MAX_SGE, UVERBS_ATTR_CREATE_WQ_FLAGS, UVERBS_ATTR_CREATE_WQ_RESP_MAX_WR, UVERBS_ATTR_CREATE_WQ_RESP_MAX_SGE, UVERBS_ATTR_CREATE_WQ_RESP_WQ_NUM, }; enum uverbs_attrs_destroy_wq_cmd_attr_ids { UVERBS_ATTR_DESTROY_WQ_HANDLE, UVERBS_ATTR_DESTROY_WQ_RESP, }; enum uverbs_methods_wq { UVERBS_METHOD_WQ_CREATE, UVERBS_METHOD_WQ_DESTROY, }; enum uverbs_methods_actions_flow_action_ops { UVERBS_METHOD_FLOW_ACTION_ESP_CREATE, UVERBS_METHOD_FLOW_ACTION_DESTROY, UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY, }; enum uverbs_attrs_alloc_dm_cmd_attr_ids { UVERBS_ATTR_ALLOC_DM_HANDLE, UVERBS_ATTR_ALLOC_DM_LENGTH, UVERBS_ATTR_ALLOC_DM_ALIGNMENT, }; enum uverbs_attrs_free_dm_cmd_attr_ids { UVERBS_ATTR_FREE_DM_HANDLE, }; enum uverbs_methods_dm { UVERBS_METHOD_DM_ALLOC, UVERBS_METHOD_DM_FREE, }; enum uverbs_attrs_reg_dm_mr_cmd_attr_ids { UVERBS_ATTR_REG_DM_MR_HANDLE, UVERBS_ATTR_REG_DM_MR_OFFSET, UVERBS_ATTR_REG_DM_MR_LENGTH, UVERBS_ATTR_REG_DM_MR_PD_HANDLE, UVERBS_ATTR_REG_DM_MR_ACCESS_FLAGS, UVERBS_ATTR_REG_DM_MR_DM_HANDLE, UVERBS_ATTR_REG_DM_MR_RESP_LKEY, UVERBS_ATTR_REG_DM_MR_RESP_RKEY, }; enum uverbs_methods_mr { UVERBS_METHOD_DM_MR_REG, UVERBS_METHOD_MR_DESTROY, UVERBS_METHOD_ADVISE_MR, UVERBS_METHOD_QUERY_MR, }; enum uverbs_attrs_mr_destroy_ids { UVERBS_ATTR_DESTROY_MR_HANDLE, }; enum uverbs_attrs_advise_mr_cmd_attr_ids { UVERBS_ATTR_ADVISE_MR_PD_HANDLE, UVERBS_ATTR_ADVISE_MR_ADVICE, UVERBS_ATTR_ADVISE_MR_FLAGS, UVERBS_ATTR_ADVISE_MR_SGE_LIST, }; enum uverbs_attrs_query_mr_cmd_attr_ids { UVERBS_ATTR_QUERY_MR_HANDLE, UVERBS_ATTR_QUERY_MR_RESP_LKEY, UVERBS_ATTR_QUERY_MR_RESP_RKEY, UVERBS_ATTR_QUERY_MR_RESP_LENGTH, UVERBS_ATTR_QUERY_MR_RESP_IOVA, }; enum uverbs_attrs_create_counters_cmd_attr_ids { UVERBS_ATTR_CREATE_COUNTERS_HANDLE, }; enum uverbs_attrs_destroy_counters_cmd_attr_ids { UVERBS_ATTR_DESTROY_COUNTERS_HANDLE, }; enum uverbs_attrs_read_counters_cmd_attr_ids { UVERBS_ATTR_READ_COUNTERS_HANDLE, UVERBS_ATTR_READ_COUNTERS_BUFF, UVERBS_ATTR_READ_COUNTERS_FLAGS, }; enum uverbs_methods_actions_counters_ops { UVERBS_METHOD_COUNTERS_CREATE, UVERBS_METHOD_COUNTERS_DESTROY, UVERBS_METHOD_COUNTERS_READ, }; enum uverbs_attrs_info_handles_id { UVERBS_ATTR_INFO_OBJECT_ID, UVERBS_ATTR_INFO_TOTAL_HANDLES, UVERBS_ATTR_INFO_HANDLES_LIST, }; enum uverbs_methods_pd { UVERBS_METHOD_PD_DESTROY, }; enum uverbs_attrs_pd_destroy_ids { UVERBS_ATTR_DESTROY_PD_HANDLE, }; enum uverbs_methods_mw { UVERBS_METHOD_MW_DESTROY, }; enum uverbs_attrs_mw_destroy_ids { UVERBS_ATTR_DESTROY_MW_HANDLE, }; enum uverbs_methods_xrcd { UVERBS_METHOD_XRCD_DESTROY, }; enum uverbs_attrs_xrcd_destroy_ids { UVERBS_ATTR_DESTROY_XRCD_HANDLE, }; enum uverbs_methods_ah { UVERBS_METHOD_AH_DESTROY, }; enum uverbs_attrs_ah_destroy_ids { UVERBS_ATTR_DESTROY_AH_HANDLE, }; enum uverbs_methods_rwq_ind_tbl { UVERBS_METHOD_RWQ_IND_TBL_DESTROY, }; enum uverbs_attrs_rwq_ind_tbl_destroy_ids { UVERBS_ATTR_DESTROY_RWQ_IND_TBL_HANDLE, }; enum uverbs_methods_flow { UVERBS_METHOD_FLOW_DESTROY, }; enum uverbs_attrs_flow_destroy_ids { UVERBS_ATTR_DESTROY_FLOW_HANDLE, }; enum uverbs_method_async_event { UVERBS_METHOD_ASYNC_EVENT_ALLOC, }; enum uverbs_attrs_async_event_create { UVERBS_ATTR_ASYNC_EVENT_ALLOC_FD_HANDLE, }; enum uverbs_attrs_query_gid_table_cmd_attr_ids { UVERBS_ATTR_QUERY_GID_TABLE_ENTRY_SIZE, UVERBS_ATTR_QUERY_GID_TABLE_FLAGS, UVERBS_ATTR_QUERY_GID_TABLE_RESP_ENTRIES, UVERBS_ATTR_QUERY_GID_TABLE_RESP_NUM_ENTRIES, }; enum uverbs_attrs_query_gid_entry_cmd_attr_ids { UVERBS_ATTR_QUERY_GID_ENTRY_PORT, UVERBS_ATTR_QUERY_GID_ENTRY_GID_INDEX, UVERBS_ATTR_QUERY_GID_ENTRY_FLAGS, UVERBS_ATTR_QUERY_GID_ENTRY_RESP_ENTRY, }; #endif PKZ 6  rdma/ib_user_sa.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2005 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef IB_USER_SA_H #define IB_USER_SA_H #include enum { IB_PATH_GMP = 1, IB_PATH_PRIMARY = (1<<1), IB_PATH_ALTERNATE = (1<<2), IB_PATH_OUTBOUND = (1<<3), IB_PATH_INBOUND = (1<<4), IB_PATH_INBOUND_REVERSE = (1<<5), IB_PATH_BIDIRECTIONAL = IB_PATH_OUTBOUND | IB_PATH_INBOUND_REVERSE }; struct ib_path_rec_data { __u32 flags; __u32 reserved; __u32 path_rec[16]; }; struct ib_user_path_rec { __u8 dgid[16]; __u8 sgid[16]; __be16 dlid; __be16 slid; __u32 raw_traffic; __be32 flow_label; __u32 reversible; __u32 mtu; __be16 pkey; __u8 hop_limit; __u8 traffic_class; __u8 numb_path; __u8 sl; __u8 mtu_selector; __u8 rate_selector; __u8 rate; __u8 packet_life_time_selector; __u8 packet_life_time; __u8 preference; }; #endif /* IB_USER_SA_H */ PKZAMrdma/rdma_user_ioctl.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2016 Mellanox Technologies, LTD. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef RDMA_USER_IOCTL_H #define RDMA_USER_IOCTL_H #include #include #include /* Legacy name, for user space application which already use it */ #define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC /* * General blocks assignments * It is closed on purpose - do not expose it to user space * #define MAD_CMD_BASE 0x00 * #define HFI1_CMD_BAS 0xE0 */ /* MAD specific section */ #define IB_USER_MAD_REGISTER_AGENT _IOWR(RDMA_IOCTL_MAGIC, 0x01, struct ib_user_mad_reg_req) #define IB_USER_MAD_UNREGISTER_AGENT _IOW(RDMA_IOCTL_MAGIC, 0x02, __u32) #define IB_USER_MAD_ENABLE_PKEY _IO(RDMA_IOCTL_MAGIC, 0x03) #define IB_USER_MAD_REGISTER_AGENT2 _IOWR(RDMA_IOCTL_MAGIC, 0x04, struct ib_user_mad_reg_req2) /* HFI specific section */ /* allocate HFI and context */ #define HFI1_IOCTL_ASSIGN_CTXT _IOWR(RDMA_IOCTL_MAGIC, 0xE1, struct hfi1_user_info) /* find out what resources we got */ #define HFI1_IOCTL_CTXT_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE2, struct hfi1_ctxt_info) /* set up userspace */ #define HFI1_IOCTL_USER_INFO _IOW(RDMA_IOCTL_MAGIC, 0xE3, struct hfi1_base_info) /* update expected TID entries */ #define HFI1_IOCTL_TID_UPDATE _IOWR(RDMA_IOCTL_MAGIC, 0xE4, struct hfi1_tid_info) /* free expected TID entries */ #define HFI1_IOCTL_TID_FREE _IOWR(RDMA_IOCTL_MAGIC, 0xE5, struct hfi1_tid_info) /* force an update of PIO credit */ #define HFI1_IOCTL_CREDIT_UPD _IO(RDMA_IOCTL_MAGIC, 0xE6) /* control receipt of packets */ #define HFI1_IOCTL_RECV_CTRL _IOW(RDMA_IOCTL_MAGIC, 0xE8, int) /* set the kind of polling we want */ #define HFI1_IOCTL_POLL_TYPE _IOW(RDMA_IOCTL_MAGIC, 0xE9, int) /* ack & clear user status bits */ #define HFI1_IOCTL_ACK_EVENT _IOW(RDMA_IOCTL_MAGIC, 0xEA, unsigned long) /* set context's pkey */ #define HFI1_IOCTL_SET_PKEY _IOW(RDMA_IOCTL_MAGIC, 0xEB, __u16) /* reset context's HW send context */ #define HFI1_IOCTL_CTXT_RESET _IO(RDMA_IOCTL_MAGIC, 0xEC) /* read TID cache invalidations */ #define HFI1_IOCTL_TID_INVAL_READ _IOWR(RDMA_IOCTL_MAGIC, 0xED, struct hfi1_tid_info) /* get the version of the user cdev */ #define HFI1_IOCTL_GET_VERS _IOR(RDMA_IOCTL_MAGIC, 0xEE, int) #endif /* RDMA_USER_IOCTL_H */ PKZf2 2 rdma/cxgb4-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef CXGB4_ABI_USER_H #define CXGB4_ABI_USER_H #include #define C4IW_UVERBS_ABI_VERSION 3 /* * Make sure that all structs defined in this file remain laid out so * that they pack the same way on 32-bit and 64-bit architectures (to * avoid incompatibility between 32-bit userspace and 64-bit kernels). * In particular do not use pointer types -- pass pointers in __aligned_u64 * instead. */ enum { C4IW_64B_CQE = (1 << 0) }; struct c4iw_create_cq { __u32 flags; __u32 reserved; }; struct c4iw_create_cq_resp { __aligned_u64 key; __aligned_u64 gts_key; __aligned_u64 memsize; __u32 cqid; __u32 size; __u32 qid_mask; __u32 flags; }; enum { C4IW_QPF_ONCHIP = (1 << 0), C4IW_QPF_WRITE_W_IMM = (1 << 1) }; struct c4iw_create_qp_resp { __aligned_u64 ma_sync_key; __aligned_u64 sq_key; __aligned_u64 rq_key; __aligned_u64 sq_db_gts_key; __aligned_u64 rq_db_gts_key; __aligned_u64 sq_memsize; __aligned_u64 rq_memsize; __u32 sqid; __u32 rqid; __u32 sq_size; __u32 rq_size; __u32 qid_mask; __u32 flags; }; struct c4iw_create_srq_resp { __aligned_u64 srq_key; __aligned_u64 srq_db_gts_key; __aligned_u64 srq_memsize; __u32 srqid; __u32 srq_size; __u32 rqt_abs_idx; __u32 qid_mask; __u32 flags; __u32 reserved; /* explicit padding */ }; enum { /* HW supports SRQ_LIMIT_REACHED event */ T4_SRQ_LIMIT_SUPPORT = 1 << 0, }; struct c4iw_alloc_ucontext_resp { __aligned_u64 status_page_key; __u32 status_page_size; __u32 reserved; /* explicit padding (optional for i386) */ }; struct c4iw_alloc_pd_resp { __u32 pdid; }; #endif /* CXGB4_ABI_USER_H */ PKZrdma/rdma_user_rxe.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef RDMA_USER_RXE_H #define RDMA_USER_RXE_H #include #include #include #include enum { RXE_NETWORK_TYPE_IPV4 = 1, RXE_NETWORK_TYPE_IPV6 = 2, }; union rxe_gid { __u8 raw[16]; struct { __be64 subnet_prefix; __be64 interface_id; } global; }; struct rxe_global_route { union rxe_gid dgid; __u32 flow_label; __u8 sgid_index; __u8 hop_limit; __u8 traffic_class; }; struct rxe_av { __u8 port_num; /* From RXE_NETWORK_TYPE_* */ __u8 network_type; __u8 dmac[6]; struct rxe_global_route grh; union { struct sockaddr_in _sockaddr_in; struct sockaddr_in6 _sockaddr_in6; } sgid_addr, dgid_addr; }; struct rxe_send_wr { __aligned_u64 wr_id; __u32 num_sge; __u32 opcode; __u32 send_flags; union { __be32 imm_data; __u32 invalidate_rkey; } ex; union { struct { __aligned_u64 remote_addr; __u32 rkey; __u32 reserved; } rdma; struct { __aligned_u64 remote_addr; __aligned_u64 compare_add; __aligned_u64 swap; __u32 rkey; __u32 reserved; } atomic; struct { __u32 remote_qpn; __u32 remote_qkey; __u16 pkey_index; __u16 reserved; __u32 ah_num; __u32 pad[4]; struct rxe_av av; } ud; struct { __aligned_u64 addr; __aligned_u64 length; __u32 mr_lkey; __u32 mw_rkey; __u32 rkey; __u32 access; } mw; /* reg is only used by the kernel and is not part of the uapi */ } wr; }; struct rxe_sge { __aligned_u64 addr; __u32 length; __u32 lkey; }; struct mminfo { __aligned_u64 offset; __u32 size; __u32 pad; }; struct rxe_dma_info { __u32 length; __u32 resid; __u32 cur_sge; __u32 num_sge; __u32 sge_offset; __u32 reserved; union { __u8 inline_data[0]; struct rxe_sge sge[0]; }; }; struct rxe_send_wqe { struct rxe_send_wr wr; __u32 status; __u32 state; __aligned_u64 iova; __u32 mask; __u32 first_psn; __u32 last_psn; __u32 ack_length; __u32 ssn; __u32 has_rd_atomic; struct rxe_dma_info dma; }; struct rxe_recv_wqe { __aligned_u64 wr_id; __u32 num_sge; __u32 padding; struct rxe_dma_info dma; }; struct rxe_create_ah_resp { __u32 ah_num; __u32 reserved; }; struct rxe_create_cq_resp { struct mminfo mi; }; struct rxe_resize_cq_resp { struct mminfo mi; }; struct rxe_create_qp_resp { struct mminfo rq_mi; struct mminfo sq_mi; }; struct rxe_create_srq_resp { struct mminfo mi; __u32 srq_num; __u32 reserved; }; struct rxe_modify_srq_cmd { __aligned_u64 mmap_info_addr; }; /* This data structure is stored at the base of work and * completion queues shared between user space and kernel space. * It contains the producer and consumer indices. Is also * contains a copy of the queue size parameters for user space * to use but the kernel must use the parameters in the * rxe_queue struct. For performance reasons arrange to have * producer and consumer indices in separate cache lines * the kernel should always mask the indices to avoid accessing * memory outside of the data area */ struct rxe_queue_buf { __u32 log2_elem_size; __u32 index_mask; __u32 pad_1[30]; __u32 producer_index; __u32 pad_2[31]; __u32 consumer_index; __u32 pad_3[31]; __u8 data[]; }; #endif /* RDMA_USER_RXE_H */ PKZP%q%qrdma/ib_user_verbs.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. * Copyright (c) 2005 PathScale, Inc. All rights reserved. * Copyright (c) 2006 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef IB_USER_VERBS_H #define IB_USER_VERBS_H #include /* * Increment this value if any changes that break userspace ABI * compatibility are made. */ #define IB_USER_VERBS_ABI_VERSION 6 #define IB_USER_VERBS_CMD_THRESHOLD 50 enum ib_uverbs_write_cmds { IB_USER_VERBS_CMD_GET_CONTEXT, IB_USER_VERBS_CMD_QUERY_DEVICE, IB_USER_VERBS_CMD_QUERY_PORT, IB_USER_VERBS_CMD_ALLOC_PD, IB_USER_VERBS_CMD_DEALLOC_PD, IB_USER_VERBS_CMD_CREATE_AH, IB_USER_VERBS_CMD_MODIFY_AH, IB_USER_VERBS_CMD_QUERY_AH, IB_USER_VERBS_CMD_DESTROY_AH, IB_USER_VERBS_CMD_REG_MR, IB_USER_VERBS_CMD_REG_SMR, IB_USER_VERBS_CMD_REREG_MR, IB_USER_VERBS_CMD_QUERY_MR, IB_USER_VERBS_CMD_DEREG_MR, IB_USER_VERBS_CMD_ALLOC_MW, IB_USER_VERBS_CMD_BIND_MW, IB_USER_VERBS_CMD_DEALLOC_MW, IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL, IB_USER_VERBS_CMD_CREATE_CQ, IB_USER_VERBS_CMD_RESIZE_CQ, IB_USER_VERBS_CMD_DESTROY_CQ, IB_USER_VERBS_CMD_POLL_CQ, IB_USER_VERBS_CMD_PEEK_CQ, IB_USER_VERBS_CMD_REQ_NOTIFY_CQ, IB_USER_VERBS_CMD_CREATE_QP, IB_USER_VERBS_CMD_QUERY_QP, IB_USER_VERBS_CMD_MODIFY_QP, IB_USER_VERBS_CMD_DESTROY_QP, IB_USER_VERBS_CMD_POST_SEND, IB_USER_VERBS_CMD_POST_RECV, IB_USER_VERBS_CMD_ATTACH_MCAST, IB_USER_VERBS_CMD_DETACH_MCAST, IB_USER_VERBS_CMD_CREATE_SRQ, IB_USER_VERBS_CMD_MODIFY_SRQ, IB_USER_VERBS_CMD_QUERY_SRQ, IB_USER_VERBS_CMD_DESTROY_SRQ, IB_USER_VERBS_CMD_POST_SRQ_RECV, IB_USER_VERBS_CMD_OPEN_XRCD, IB_USER_VERBS_CMD_CLOSE_XRCD, IB_USER_VERBS_CMD_CREATE_XSRQ, IB_USER_VERBS_CMD_OPEN_QP, }; enum { IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE, IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ, IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP, IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP, IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, IB_USER_VERBS_EX_CMD_DESTROY_FLOW, IB_USER_VERBS_EX_CMD_CREATE_WQ, IB_USER_VERBS_EX_CMD_MODIFY_WQ, IB_USER_VERBS_EX_CMD_DESTROY_WQ, IB_USER_VERBS_EX_CMD_CREATE_RWQ_IND_TBL, IB_USER_VERBS_EX_CMD_DESTROY_RWQ_IND_TBL, IB_USER_VERBS_EX_CMD_MODIFY_CQ }; /* see IBA A19.4.1.1 Placement Types */ enum ib_placement_type { IB_FLUSH_GLOBAL = 1U << 0, IB_FLUSH_PERSISTENT = 1U << 1, }; /* see IBA A19.4.1.2 Selectivity Level */ enum ib_selectivity_level { IB_FLUSH_RANGE = 0, IB_FLUSH_MR, }; /* * Make sure that all structs defined in this file remain laid out so * that they pack the same way on 32-bit and 64-bit architectures (to * avoid incompatibility between 32-bit userspace and 64-bit kernels). * Specifically: * - Do not use pointer types -- pass pointers in __u64 instead. * - Make sure that any structure larger than 4 bytes is padded to a * multiple of 8 bytes. Otherwise the structure size will be * different between 32-bit and 64-bit architectures. */ struct ib_uverbs_async_event_desc { __aligned_u64 element; __u32 event_type; /* enum ib_event_type */ __u32 reserved; }; struct ib_uverbs_comp_event_desc { __aligned_u64 cq_handle; }; struct ib_uverbs_cq_moderation_caps { __u16 max_cq_moderation_count; __u16 max_cq_moderation_period; __u32 reserved; }; /* * All commands from userspace should start with a __u32 command field * followed by __u16 in_words and out_words fields (which give the * length of the command block and response buffer if any in 32-bit * words). The kernel driver will read these fields first and read * the rest of the command struct based on these value. */ #define IB_USER_VERBS_CMD_COMMAND_MASK 0xff #define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u struct ib_uverbs_cmd_hdr { __u32 command; __u16 in_words; __u16 out_words; }; struct ib_uverbs_ex_cmd_hdr { __aligned_u64 response; __u16 provider_in_words; __u16 provider_out_words; __u32 cmd_hdr_reserved; }; struct ib_uverbs_get_context { __aligned_u64 response; __aligned_u64 driver_data[]; }; struct ib_uverbs_get_context_resp { __u32 async_fd; __u32 num_comp_vectors; __aligned_u64 driver_data[]; }; struct ib_uverbs_query_device { __aligned_u64 response; __aligned_u64 driver_data[]; }; struct ib_uverbs_query_device_resp { __aligned_u64 fw_ver; __be64 node_guid; __be64 sys_image_guid; __aligned_u64 max_mr_size; __aligned_u64 page_size_cap; __u32 vendor_id; __u32 vendor_part_id; __u32 hw_ver; __u32 max_qp; __u32 max_qp_wr; __u32 device_cap_flags; __u32 max_sge; __u32 max_sge_rd; __u32 max_cq; __u32 max_cqe; __u32 max_mr; __u32 max_pd; __u32 max_qp_rd_atom; __u32 max_ee_rd_atom; __u32 max_res_rd_atom; __u32 max_qp_init_rd_atom; __u32 max_ee_init_rd_atom; __u32 atomic_cap; __u32 max_ee; __u32 max_rdd; __u32 max_mw; __u32 max_raw_ipv6_qp; __u32 max_raw_ethy_qp; __u32 max_mcast_grp; __u32 max_mcast_qp_attach; __u32 max_total_mcast_qp_attach; __u32 max_ah; __u32 max_fmr; __u32 max_map_per_fmr; __u32 max_srq; __u32 max_srq_wr; __u32 max_srq_sge; __u16 max_pkeys; __u8 local_ca_ack_delay; __u8 phys_port_cnt; __u8 reserved[4]; }; struct ib_uverbs_ex_query_device { __u32 comp_mask; __u32 reserved; }; struct ib_uverbs_odp_caps { __aligned_u64 general_caps; struct { __u32 rc_odp_caps; __u32 uc_odp_caps; __u32 ud_odp_caps; } per_transport_caps; __u32 reserved; }; struct ib_uverbs_rss_caps { /* Corresponding bit will be set if qp type from * 'enum ib_qp_type' is supported, e.g. * supported_qpts |= 1 << IB_QPT_UD */ __u32 supported_qpts; __u32 max_rwq_indirection_tables; __u32 max_rwq_indirection_table_size; __u32 reserved; }; struct ib_uverbs_tm_caps { /* Max size of rendezvous request message */ __u32 max_rndv_hdr_size; /* Max number of entries in tag matching list */ __u32 max_num_tags; /* TM flags */ __u32 flags; /* Max number of outstanding list operations */ __u32 max_ops; /* Max number of SGE in tag matching entry */ __u32 max_sge; __u32 reserved; }; struct ib_uverbs_ex_query_device_resp { struct ib_uverbs_query_device_resp base; __u32 comp_mask; __u32 response_length; struct ib_uverbs_odp_caps odp_caps; __aligned_u64 timestamp_mask; __aligned_u64 hca_core_clock; /* in KHZ */ __aligned_u64 device_cap_flags_ex; struct ib_uverbs_rss_caps rss_caps; __u32 max_wq_type_rq; __u32 raw_packet_caps; struct ib_uverbs_tm_caps tm_caps; struct ib_uverbs_cq_moderation_caps cq_moderation_caps; __aligned_u64 max_dm_size; __u32 xrc_odp_caps; __u32 reserved; }; struct ib_uverbs_query_port { __aligned_u64 response; __u8 port_num; __u8 reserved[7]; __aligned_u64 driver_data[]; }; struct ib_uverbs_query_port_resp { __u32 port_cap_flags; /* see ib_uverbs_query_port_cap_flags */ __u32 max_msg_sz; __u32 bad_pkey_cntr; __u32 qkey_viol_cntr; __u32 gid_tbl_len; __u16 pkey_tbl_len; __u16 lid; __u16 sm_lid; __u8 state; __u8 max_mtu; __u8 active_mtu; __u8 lmc; __u8 max_vl_num; __u8 sm_sl; __u8 subnet_timeout; __u8 init_type_reply; __u8 active_width; __u8 active_speed; __u8 phys_state; __u8 link_layer; __u8 flags; /* see ib_uverbs_query_port_flags */ __u8 reserved; }; struct ib_uverbs_alloc_pd { __aligned_u64 response; __aligned_u64 driver_data[]; }; struct ib_uverbs_alloc_pd_resp { __u32 pd_handle; __u32 driver_data[]; }; struct ib_uverbs_dealloc_pd { __u32 pd_handle; }; struct ib_uverbs_open_xrcd { __aligned_u64 response; __u32 fd; __u32 oflags; __aligned_u64 driver_data[]; }; struct ib_uverbs_open_xrcd_resp { __u32 xrcd_handle; __u32 driver_data[]; }; struct ib_uverbs_close_xrcd { __u32 xrcd_handle; }; struct ib_uverbs_reg_mr { __aligned_u64 response; __aligned_u64 start; __aligned_u64 length; __aligned_u64 hca_va; __u32 pd_handle; __u32 access_flags; __aligned_u64 driver_data[]; }; struct ib_uverbs_reg_mr_resp { __u32 mr_handle; __u32 lkey; __u32 rkey; __u32 driver_data[]; }; struct ib_uverbs_rereg_mr { __aligned_u64 response; __u32 mr_handle; __u32 flags; __aligned_u64 start; __aligned_u64 length; __aligned_u64 hca_va; __u32 pd_handle; __u32 access_flags; __aligned_u64 driver_data[]; }; struct ib_uverbs_rereg_mr_resp { __u32 lkey; __u32 rkey; __aligned_u64 driver_data[]; }; struct ib_uverbs_dereg_mr { __u32 mr_handle; }; struct ib_uverbs_alloc_mw { __aligned_u64 response; __u32 pd_handle; __u8 mw_type; __u8 reserved[3]; __aligned_u64 driver_data[]; }; struct ib_uverbs_alloc_mw_resp { __u32 mw_handle; __u32 rkey; __aligned_u64 driver_data[]; }; struct ib_uverbs_dealloc_mw { __u32 mw_handle; }; struct ib_uverbs_create_comp_channel { __aligned_u64 response; }; struct ib_uverbs_create_comp_channel_resp { __u32 fd; }; struct ib_uverbs_create_cq { __aligned_u64 response; __aligned_u64 user_handle; __u32 cqe; __u32 comp_vector; __s32 comp_channel; __u32 reserved; __aligned_u64 driver_data[]; }; enum ib_uverbs_ex_create_cq_flags { IB_UVERBS_CQ_FLAGS_TIMESTAMP_COMPLETION = 1 << 0, IB_UVERBS_CQ_FLAGS_IGNORE_OVERRUN = 1 << 1, }; struct ib_uverbs_ex_create_cq { __aligned_u64 user_handle; __u32 cqe; __u32 comp_vector; __s32 comp_channel; __u32 comp_mask; __u32 flags; /* bitmask of ib_uverbs_ex_create_cq_flags */ __u32 reserved; }; struct ib_uverbs_create_cq_resp { __u32 cq_handle; __u32 cqe; __aligned_u64 driver_data[0]; }; struct ib_uverbs_ex_create_cq_resp { struct ib_uverbs_create_cq_resp base; __u32 comp_mask; __u32 response_length; }; struct ib_uverbs_resize_cq { __aligned_u64 response; __u32 cq_handle; __u32 cqe; __aligned_u64 driver_data[]; }; struct ib_uverbs_resize_cq_resp { __u32 cqe; __u32 reserved; __aligned_u64 driver_data[]; }; struct ib_uverbs_poll_cq { __aligned_u64 response; __u32 cq_handle; __u32 ne; }; enum ib_uverbs_wc_opcode { IB_UVERBS_WC_SEND = 0, IB_UVERBS_WC_RDMA_WRITE = 1, IB_UVERBS_WC_RDMA_READ = 2, IB_UVERBS_WC_COMP_SWAP = 3, IB_UVERBS_WC_FETCH_ADD = 4, IB_UVERBS_WC_BIND_MW = 5, IB_UVERBS_WC_LOCAL_INV = 6, IB_UVERBS_WC_TSO = 7, IB_UVERBS_WC_FLUSH = 8, IB_UVERBS_WC_ATOMIC_WRITE = 9, }; struct ib_uverbs_wc { __aligned_u64 wr_id; __u32 status; __u32 opcode; __u32 vendor_err; __u32 byte_len; union { __be32 imm_data; __u32 invalidate_rkey; } ex; __u32 qp_num; __u32 src_qp; __u32 wc_flags; __u16 pkey_index; __u16 slid; __u8 sl; __u8 dlid_path_bits; __u8 port_num; __u8 reserved; }; struct ib_uverbs_poll_cq_resp { __u32 count; __u32 reserved; struct ib_uverbs_wc wc[]; }; struct ib_uverbs_req_notify_cq { __u32 cq_handle; __u32 solicited_only; }; struct ib_uverbs_destroy_cq { __aligned_u64 response; __u32 cq_handle; __u32 reserved; }; struct ib_uverbs_destroy_cq_resp { __u32 comp_events_reported; __u32 async_events_reported; }; struct ib_uverbs_global_route { __u8 dgid[16]; __u32 flow_label; __u8 sgid_index; __u8 hop_limit; __u8 traffic_class; __u8 reserved; }; struct ib_uverbs_ah_attr { struct ib_uverbs_global_route grh; __u16 dlid; __u8 sl; __u8 src_path_bits; __u8 static_rate; __u8 is_global; __u8 port_num; __u8 reserved; }; struct ib_uverbs_qp_attr { __u32 qp_attr_mask; __u32 qp_state; __u32 cur_qp_state; __u32 path_mtu; __u32 path_mig_state; __u32 qkey; __u32 rq_psn; __u32 sq_psn; __u32 dest_qp_num; __u32 qp_access_flags; struct ib_uverbs_ah_attr ah_attr; struct ib_uverbs_ah_attr alt_ah_attr; /* ib_qp_cap */ __u32 max_send_wr; __u32 max_recv_wr; __u32 max_send_sge; __u32 max_recv_sge; __u32 max_inline_data; __u16 pkey_index; __u16 alt_pkey_index; __u8 en_sqd_async_notify; __u8 sq_draining; __u8 max_rd_atomic; __u8 max_dest_rd_atomic; __u8 min_rnr_timer; __u8 port_num; __u8 timeout; __u8 retry_cnt; __u8 rnr_retry; __u8 alt_port_num; __u8 alt_timeout; __u8 reserved[5]; }; struct ib_uverbs_create_qp { __aligned_u64 response; __aligned_u64 user_handle; __u32 pd_handle; __u32 send_cq_handle; __u32 recv_cq_handle; __u32 srq_handle; __u32 max_send_wr; __u32 max_recv_wr; __u32 max_send_sge; __u32 max_recv_sge; __u32 max_inline_data; __u8 sq_sig_all; __u8 qp_type; __u8 is_srq; __u8 reserved; __aligned_u64 driver_data[]; }; enum ib_uverbs_create_qp_mask { IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1UL << 0, }; enum { IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE, }; struct ib_uverbs_ex_create_qp { __aligned_u64 user_handle; __u32 pd_handle; __u32 send_cq_handle; __u32 recv_cq_handle; __u32 srq_handle; __u32 max_send_wr; __u32 max_recv_wr; __u32 max_send_sge; __u32 max_recv_sge; __u32 max_inline_data; __u8 sq_sig_all; __u8 qp_type; __u8 is_srq; __u8 reserved; __u32 comp_mask; __u32 create_flags; __u32 rwq_ind_tbl_handle; __u32 source_qpn; }; struct ib_uverbs_open_qp { __aligned_u64 response; __aligned_u64 user_handle; __u32 pd_handle; __u32 qpn; __u8 qp_type; __u8 reserved[7]; __aligned_u64 driver_data[]; }; /* also used for open response */ struct ib_uverbs_create_qp_resp { __u32 qp_handle; __u32 qpn; __u32 max_send_wr; __u32 max_recv_wr; __u32 max_send_sge; __u32 max_recv_sge; __u32 max_inline_data; __u32 reserved; __u32 driver_data[0]; }; struct ib_uverbs_ex_create_qp_resp { struct ib_uverbs_create_qp_resp base; __u32 comp_mask; __u32 response_length; }; /* * This struct needs to remain a multiple of 8 bytes to keep the * alignment of the modify QP parameters. */ struct ib_uverbs_qp_dest { __u8 dgid[16]; __u32 flow_label; __u16 dlid; __u16 reserved; __u8 sgid_index; __u8 hop_limit; __u8 traffic_class; __u8 sl; __u8 src_path_bits; __u8 static_rate; __u8 is_global; __u8 port_num; }; struct ib_uverbs_query_qp { __aligned_u64 response; __u32 qp_handle; __u32 attr_mask; __aligned_u64 driver_data[]; }; struct ib_uverbs_query_qp_resp { struct ib_uverbs_qp_dest dest; struct ib_uverbs_qp_dest alt_dest; __u32 max_send_wr; __u32 max_recv_wr; __u32 max_send_sge; __u32 max_recv_sge; __u32 max_inline_data; __u32 qkey; __u32 rq_psn; __u32 sq_psn; __u32 dest_qp_num; __u32 qp_access_flags; __u16 pkey_index; __u16 alt_pkey_index; __u8 qp_state; __u8 cur_qp_state; __u8 path_mtu; __u8 path_mig_state; __u8 sq_draining; __u8 max_rd_atomic; __u8 max_dest_rd_atomic; __u8 min_rnr_timer; __u8 port_num; __u8 timeout; __u8 retry_cnt; __u8 rnr_retry; __u8 alt_port_num; __u8 alt_timeout; __u8 sq_sig_all; __u8 reserved[5]; __aligned_u64 driver_data[]; }; struct ib_uverbs_modify_qp { struct ib_uverbs_qp_dest dest; struct ib_uverbs_qp_dest alt_dest; __u32 qp_handle; __u32 attr_mask; __u32 qkey; __u32 rq_psn; __u32 sq_psn; __u32 dest_qp_num; __u32 qp_access_flags; __u16 pkey_index; __u16 alt_pkey_index; __u8 qp_state; __u8 cur_qp_state; __u8 path_mtu; __u8 path_mig_state; __u8 en_sqd_async_notify; __u8 max_rd_atomic; __u8 max_dest_rd_atomic; __u8 min_rnr_timer; __u8 port_num; __u8 timeout; __u8 retry_cnt; __u8 rnr_retry; __u8 alt_port_num; __u8 alt_timeout; __u8 reserved[2]; __aligned_u64 driver_data[0]; }; struct ib_uverbs_ex_modify_qp { struct ib_uverbs_modify_qp base; __u32 rate_limit; __u32 reserved; }; struct ib_uverbs_ex_modify_qp_resp { __u32 comp_mask; __u32 response_length; }; struct ib_uverbs_destroy_qp { __aligned_u64 response; __u32 qp_handle; __u32 reserved; }; struct ib_uverbs_destroy_qp_resp { __u32 events_reported; }; /* * The ib_uverbs_sge structure isn't used anywhere, since we assume * the ib_sge structure is packed the same way on 32-bit and 64-bit * architectures in both kernel and user space. It's just here to * document the ABI. */ struct ib_uverbs_sge { __aligned_u64 addr; __u32 length; __u32 lkey; }; enum ib_uverbs_wr_opcode { IB_UVERBS_WR_RDMA_WRITE = 0, IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1, IB_UVERBS_WR_SEND = 2, IB_UVERBS_WR_SEND_WITH_IMM = 3, IB_UVERBS_WR_RDMA_READ = 4, IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5, IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6, IB_UVERBS_WR_LOCAL_INV = 7, IB_UVERBS_WR_BIND_MW = 8, IB_UVERBS_WR_SEND_WITH_INV = 9, IB_UVERBS_WR_TSO = 10, IB_UVERBS_WR_RDMA_READ_WITH_INV = 11, IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12, IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13, IB_UVERBS_WR_FLUSH = 14, IB_UVERBS_WR_ATOMIC_WRITE = 15, /* Review enum ib_wr_opcode before modifying this */ }; struct ib_uverbs_send_wr { __aligned_u64 wr_id; __u32 num_sge; __u32 opcode; /* see enum ib_uverbs_wr_opcode */ __u32 send_flags; union { __be32 imm_data; __u32 invalidate_rkey; } ex; union { struct { __aligned_u64 remote_addr; __u32 rkey; __u32 reserved; } rdma; struct { __aligned_u64 remote_addr; __aligned_u64 compare_add; __aligned_u64 swap; __u32 rkey; __u32 reserved; } atomic; struct { __u32 ah; __u32 remote_qpn; __u32 remote_qkey; __u32 reserved; } ud; } wr; }; struct ib_uverbs_post_send { __aligned_u64 response; __u32 qp_handle; __u32 wr_count; __u32 sge_count; __u32 wqe_size; struct ib_uverbs_send_wr send_wr[]; }; struct ib_uverbs_post_send_resp { __u32 bad_wr; }; struct ib_uverbs_recv_wr { __aligned_u64 wr_id; __u32 num_sge; __u32 reserved; }; struct ib_uverbs_post_recv { __aligned_u64 response; __u32 qp_handle; __u32 wr_count; __u32 sge_count; __u32 wqe_size; struct ib_uverbs_recv_wr recv_wr[]; }; struct ib_uverbs_post_recv_resp { __u32 bad_wr; }; struct ib_uverbs_post_srq_recv { __aligned_u64 response; __u32 srq_handle; __u32 wr_count; __u32 sge_count; __u32 wqe_size; struct ib_uverbs_recv_wr recv[]; }; struct ib_uverbs_post_srq_recv_resp { __u32 bad_wr; }; struct ib_uverbs_create_ah { __aligned_u64 response; __aligned_u64 user_handle; __u32 pd_handle; __u32 reserved; struct ib_uverbs_ah_attr attr; __aligned_u64 driver_data[]; }; struct ib_uverbs_create_ah_resp { __u32 ah_handle; __u32 driver_data[]; }; struct ib_uverbs_destroy_ah { __u32 ah_handle; }; struct ib_uverbs_attach_mcast { __u8 gid[16]; __u32 qp_handle; __u16 mlid; __u16 reserved; __aligned_u64 driver_data[]; }; struct ib_uverbs_detach_mcast { __u8 gid[16]; __u32 qp_handle; __u16 mlid; __u16 reserved; __aligned_u64 driver_data[]; }; struct ib_uverbs_flow_spec_hdr { __u32 type; __u16 size; __u16 reserved; /* followed by flow_spec */ __aligned_u64 flow_spec_data[0]; }; struct ib_uverbs_flow_eth_filter { __u8 dst_mac[6]; __u8 src_mac[6]; __be16 ether_type; __be16 vlan_tag; }; struct ib_uverbs_flow_spec_eth { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_eth_filter val; struct ib_uverbs_flow_eth_filter mask; }; struct ib_uverbs_flow_ipv4_filter { __be32 src_ip; __be32 dst_ip; __u8 proto; __u8 tos; __u8 ttl; __u8 flags; }; struct ib_uverbs_flow_spec_ipv4 { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_ipv4_filter val; struct ib_uverbs_flow_ipv4_filter mask; }; struct ib_uverbs_flow_tcp_udp_filter { __be16 dst_port; __be16 src_port; }; struct ib_uverbs_flow_spec_tcp_udp { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_tcp_udp_filter val; struct ib_uverbs_flow_tcp_udp_filter mask; }; struct ib_uverbs_flow_ipv6_filter { __u8 src_ip[16]; __u8 dst_ip[16]; __be32 flow_label; __u8 next_hdr; __u8 traffic_class; __u8 hop_limit; __u8 reserved; }; struct ib_uverbs_flow_spec_ipv6 { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_ipv6_filter val; struct ib_uverbs_flow_ipv6_filter mask; }; struct ib_uverbs_flow_spec_action_tag { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; __u32 tag_id; __u32 reserved1; }; struct ib_uverbs_flow_spec_action_drop { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; }; struct ib_uverbs_flow_spec_action_handle { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; __u32 handle; __u32 reserved1; }; struct ib_uverbs_flow_spec_action_count { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; __u32 handle; __u32 reserved1; }; struct ib_uverbs_flow_tunnel_filter { __be32 tunnel_id; }; struct ib_uverbs_flow_spec_tunnel { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_tunnel_filter val; struct ib_uverbs_flow_tunnel_filter mask; }; struct ib_uverbs_flow_spec_esp_filter { __u32 spi; __u32 seq; }; struct ib_uverbs_flow_spec_esp { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_spec_esp_filter val; struct ib_uverbs_flow_spec_esp_filter mask; }; struct ib_uverbs_flow_gre_filter { /* c_ks_res0_ver field is bits 0-15 in offset 0 of a standard GRE header: * bit 0 - C - checksum bit. * bit 1 - reserved. set to 0. * bit 2 - key bit. * bit 3 - sequence number bit. * bits 4:12 - reserved. set to 0. * bits 13:15 - GRE version. */ __be16 c_ks_res0_ver; __be16 protocol; __be32 key; }; struct ib_uverbs_flow_spec_gre { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_gre_filter val; struct ib_uverbs_flow_gre_filter mask; }; struct ib_uverbs_flow_mpls_filter { /* The field includes the entire MPLS label: * bits 0:19 - label field. * bits 20:22 - traffic class field. * bits 23 - bottom of stack bit. * bits 24:31 - ttl field. */ __be32 label; }; struct ib_uverbs_flow_spec_mpls { union { struct ib_uverbs_flow_spec_hdr hdr; struct { __u32 type; __u16 size; __u16 reserved; }; }; struct ib_uverbs_flow_mpls_filter val; struct ib_uverbs_flow_mpls_filter mask; }; struct ib_uverbs_flow_attr { __u32 type; __u16 size; __u16 priority; __u8 num_of_specs; __u8 reserved[2]; __u8 port; __u32 flags; /* Following are the optional layers according to user request * struct ib_flow_spec_xxx * struct ib_flow_spec_yyy */ struct ib_uverbs_flow_spec_hdr flow_specs[]; }; struct ib_uverbs_create_flow { __u32 comp_mask; __u32 qp_handle; struct ib_uverbs_flow_attr flow_attr; }; struct ib_uverbs_create_flow_resp { __u32 comp_mask; __u32 flow_handle; }; struct ib_uverbs_destroy_flow { __u32 comp_mask; __u32 flow_handle; }; struct ib_uverbs_create_srq { __aligned_u64 response; __aligned_u64 user_handle; __u32 pd_handle; __u32 max_wr; __u32 max_sge; __u32 srq_limit; __aligned_u64 driver_data[]; }; struct ib_uverbs_create_xsrq { __aligned_u64 response; __aligned_u64 user_handle; __u32 srq_type; __u32 pd_handle; __u32 max_wr; __u32 max_sge; __u32 srq_limit; __u32 max_num_tags; __u32 xrcd_handle; __u32 cq_handle; __aligned_u64 driver_data[]; }; struct ib_uverbs_create_srq_resp { __u32 srq_handle; __u32 max_wr; __u32 max_sge; __u32 srqn; __u32 driver_data[]; }; struct ib_uverbs_modify_srq { __u32 srq_handle; __u32 attr_mask; __u32 max_wr; __u32 srq_limit; __aligned_u64 driver_data[]; }; struct ib_uverbs_query_srq { __aligned_u64 response; __u32 srq_handle; __u32 reserved; __aligned_u64 driver_data[]; }; struct ib_uverbs_query_srq_resp { __u32 max_wr; __u32 max_sge; __u32 srq_limit; __u32 reserved; }; struct ib_uverbs_destroy_srq { __aligned_u64 response; __u32 srq_handle; __u32 reserved; }; struct ib_uverbs_destroy_srq_resp { __u32 events_reported; }; struct ib_uverbs_ex_create_wq { __u32 comp_mask; __u32 wq_type; __aligned_u64 user_handle; __u32 pd_handle; __u32 cq_handle; __u32 max_wr; __u32 max_sge; __u32 create_flags; /* Use enum ib_wq_flags */ __u32 reserved; }; struct ib_uverbs_ex_create_wq_resp { __u32 comp_mask; __u32 response_length; __u32 wq_handle; __u32 max_wr; __u32 max_sge; __u32 wqn; }; struct ib_uverbs_ex_destroy_wq { __u32 comp_mask; __u32 wq_handle; }; struct ib_uverbs_ex_destroy_wq_resp { __u32 comp_mask; __u32 response_length; __u32 events_reported; __u32 reserved; }; struct ib_uverbs_ex_modify_wq { __u32 attr_mask; __u32 wq_handle; __u32 wq_state; __u32 curr_wq_state; __u32 flags; /* Use enum ib_wq_flags */ __u32 flags_mask; /* Use enum ib_wq_flags */ }; /* Prevent memory allocation rather than max expected size */ #define IB_USER_VERBS_MAX_LOG_IND_TBL_SIZE 0x0d struct ib_uverbs_ex_create_rwq_ind_table { __u32 comp_mask; __u32 log_ind_tbl_size; /* Following are the wq handles according to log_ind_tbl_size * wq_handle1 * wq_handle2 */ __u32 wq_handles[]; }; struct ib_uverbs_ex_create_rwq_ind_table_resp { __u32 comp_mask; __u32 response_length; __u32 ind_tbl_handle; __u32 ind_tbl_num; }; struct ib_uverbs_ex_destroy_rwq_ind_table { __u32 comp_mask; __u32 ind_tbl_handle; }; struct ib_uverbs_cq_moderation { __u16 cq_count; __u16 cq_period; }; struct ib_uverbs_ex_modify_cq { __u32 cq_handle; __u32 attr_mask; struct ib_uverbs_cq_moderation attr; __u32 reserved; }; #define IB_DEVICE_NAME_MAX 64 /* * bits 9, 15, 16, 19, 22, 27, 30, 31, 32, 33, 35 and 37 may be set by old * kernels and should not be used. */ enum ib_uverbs_device_cap_flags { IB_UVERBS_DEVICE_RESIZE_MAX_WR = 1 << 0, IB_UVERBS_DEVICE_BAD_PKEY_CNTR = 1 << 1, IB_UVERBS_DEVICE_BAD_QKEY_CNTR = 1 << 2, IB_UVERBS_DEVICE_RAW_MULTI = 1 << 3, IB_UVERBS_DEVICE_AUTO_PATH_MIG = 1 << 4, IB_UVERBS_DEVICE_CHANGE_PHY_PORT = 1 << 5, IB_UVERBS_DEVICE_UD_AV_PORT_ENFORCE = 1 << 6, IB_UVERBS_DEVICE_CURR_QP_STATE_MOD = 1 << 7, IB_UVERBS_DEVICE_SHUTDOWN_PORT = 1 << 8, /* IB_UVERBS_DEVICE_INIT_TYPE = 1 << 9, (not in use) */ IB_UVERBS_DEVICE_PORT_ACTIVE_EVENT = 1 << 10, IB_UVERBS_DEVICE_SYS_IMAGE_GUID = 1 << 11, IB_UVERBS_DEVICE_RC_RNR_NAK_GEN = 1 << 12, IB_UVERBS_DEVICE_SRQ_RESIZE = 1 << 13, IB_UVERBS_DEVICE_N_NOTIFY_CQ = 1 << 14, IB_UVERBS_DEVICE_MEM_WINDOW = 1 << 17, IB_UVERBS_DEVICE_UD_IP_CSUM = 1 << 18, IB_UVERBS_DEVICE_XRC = 1 << 20, IB_UVERBS_DEVICE_MEM_MGT_EXTENSIONS = 1 << 21, IB_UVERBS_DEVICE_MEM_WINDOW_TYPE_2A = 1 << 23, IB_UVERBS_DEVICE_MEM_WINDOW_TYPE_2B = 1 << 24, IB_UVERBS_DEVICE_RC_IP_CSUM = 1 << 25, /* Deprecated. Please use IB_UVERBS_RAW_PACKET_CAP_IP_CSUM. */ IB_UVERBS_DEVICE_RAW_IP_CSUM = 1 << 26, IB_UVERBS_DEVICE_MANAGED_FLOW_STEERING = 1 << 29, /* Deprecated. Please use IB_UVERBS_RAW_PACKET_CAP_SCATTER_FCS. */ IB_UVERBS_DEVICE_RAW_SCATTER_FCS = 1ULL << 34, IB_UVERBS_DEVICE_PCI_WRITE_END_PADDING = 1ULL << 36, /* Flush placement types */ IB_UVERBS_DEVICE_FLUSH_GLOBAL = 1ULL << 38, IB_UVERBS_DEVICE_FLUSH_PERSISTENT = 1ULL << 39, /* Atomic write attributes */ IB_UVERBS_DEVICE_ATOMIC_WRITE = 1ULL << 40, }; enum ib_uverbs_raw_packet_caps { IB_UVERBS_RAW_PACKET_CAP_CVLAN_STRIPPING = 1 << 0, IB_UVERBS_RAW_PACKET_CAP_SCATTER_FCS = 1 << 1, IB_UVERBS_RAW_PACKET_CAP_IP_CSUM = 1 << 2, IB_UVERBS_RAW_PACKET_CAP_DELAY_DROP = 1 << 3, }; #endif /* IB_USER_VERBS_H */ PKZ! k-KKrdma/vmw_pvrdma-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ /* * Copyright (c) 2012-2016 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of EITHER the GNU General Public License * version 2 as published by the Free Software Foundation or the BSD * 2-Clause License. This program is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License version 2 for more details at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html. * * You should have received a copy of the GNU General Public License * along with this program available in the file COPYING in the main * directory of this source tree. * * The BSD 2-Clause License * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef __VMW_PVRDMA_ABI_H__ #define __VMW_PVRDMA_ABI_H__ #include #define PVRDMA_UVERBS_ABI_VERSION 3 /* ABI Version. */ #define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF /* Bottom 24 bits. */ #define PVRDMA_UAR_QP_OFFSET 0 /* QP doorbell. */ #define PVRDMA_UAR_QP_SEND (1 << 30) /* Send bit. */ #define PVRDMA_UAR_QP_RECV (1 << 31) /* Recv bit. */ #define PVRDMA_UAR_CQ_OFFSET 4 /* CQ doorbell. */ #define PVRDMA_UAR_CQ_ARM_SOL (1 << 29) /* Arm solicited bit. */ #define PVRDMA_UAR_CQ_ARM (1 << 30) /* Arm bit. */ #define PVRDMA_UAR_CQ_POLL (1 << 31) /* Poll bit. */ #define PVRDMA_UAR_SRQ_OFFSET 8 /* SRQ doorbell. */ #define PVRDMA_UAR_SRQ_RECV (1 << 30) /* Recv bit. */ enum pvrdma_wr_opcode { PVRDMA_WR_RDMA_WRITE, PVRDMA_WR_RDMA_WRITE_WITH_IMM, PVRDMA_WR_SEND, PVRDMA_WR_SEND_WITH_IMM, PVRDMA_WR_RDMA_READ, PVRDMA_WR_ATOMIC_CMP_AND_SWP, PVRDMA_WR_ATOMIC_FETCH_AND_ADD, PVRDMA_WR_LSO, PVRDMA_WR_SEND_WITH_INV, PVRDMA_WR_RDMA_READ_WITH_INV, PVRDMA_WR_LOCAL_INV, PVRDMA_WR_FAST_REG_MR, PVRDMA_WR_MASKED_ATOMIC_CMP_AND_SWP, PVRDMA_WR_MASKED_ATOMIC_FETCH_AND_ADD, PVRDMA_WR_BIND_MW, PVRDMA_WR_REG_SIG_MR, PVRDMA_WR_ERROR, }; enum pvrdma_wc_status { PVRDMA_WC_SUCCESS, PVRDMA_WC_LOC_LEN_ERR, PVRDMA_WC_LOC_QP_OP_ERR, PVRDMA_WC_LOC_EEC_OP_ERR, PVRDMA_WC_LOC_PROT_ERR, PVRDMA_WC_WR_FLUSH_ERR, PVRDMA_WC_MW_BIND_ERR, PVRDMA_WC_BAD_RESP_ERR, PVRDMA_WC_LOC_ACCESS_ERR, PVRDMA_WC_REM_INV_REQ_ERR, PVRDMA_WC_REM_ACCESS_ERR, PVRDMA_WC_REM_OP_ERR, PVRDMA_WC_RETRY_EXC_ERR, PVRDMA_WC_RNR_RETRY_EXC_ERR, PVRDMA_WC_LOC_RDD_VIOL_ERR, PVRDMA_WC_REM_INV_RD_REQ_ERR, PVRDMA_WC_REM_ABORT_ERR, PVRDMA_WC_INV_EECN_ERR, PVRDMA_WC_INV_EEC_STATE_ERR, PVRDMA_WC_FATAL_ERR, PVRDMA_WC_RESP_TIMEOUT_ERR, PVRDMA_WC_GENERAL_ERR, }; enum pvrdma_wc_opcode { PVRDMA_WC_SEND, PVRDMA_WC_RDMA_WRITE, PVRDMA_WC_RDMA_READ, PVRDMA_WC_COMP_SWAP, PVRDMA_WC_FETCH_ADD, PVRDMA_WC_BIND_MW, PVRDMA_WC_LSO, PVRDMA_WC_LOCAL_INV, PVRDMA_WC_FAST_REG_MR, PVRDMA_WC_MASKED_COMP_SWAP, PVRDMA_WC_MASKED_FETCH_ADD, PVRDMA_WC_RECV = 1 << 7, PVRDMA_WC_RECV_RDMA_WITH_IMM, }; enum pvrdma_wc_flags { PVRDMA_WC_GRH = 1 << 0, PVRDMA_WC_WITH_IMM = 1 << 1, PVRDMA_WC_WITH_INVALIDATE = 1 << 2, PVRDMA_WC_IP_CSUM_OK = 1 << 3, PVRDMA_WC_WITH_SMAC = 1 << 4, PVRDMA_WC_WITH_VLAN = 1 << 5, PVRDMA_WC_WITH_NETWORK_HDR_TYPE = 1 << 6, PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_NETWORK_HDR_TYPE, }; enum pvrdma_network_type { PVRDMA_NETWORK_IB, PVRDMA_NETWORK_ROCE_V1 = PVRDMA_NETWORK_IB, PVRDMA_NETWORK_IPV4, PVRDMA_NETWORK_IPV6 }; struct pvrdma_alloc_ucontext_resp { __u32 qp_tab_size; __u32 reserved; }; struct pvrdma_alloc_pd_resp { __u32 pdn; __u32 reserved; }; struct pvrdma_create_cq { __aligned_u64 buf_addr; __u32 buf_size; __u32 reserved; }; struct pvrdma_create_cq_resp { __u32 cqn; __u32 reserved; }; struct pvrdma_resize_cq { __aligned_u64 buf_addr; __u32 buf_size; __u32 reserved; }; struct pvrdma_create_srq { __aligned_u64 buf_addr; __u32 buf_size; __u32 reserved; }; struct pvrdma_create_srq_resp { __u32 srqn; __u32 reserved; }; struct pvrdma_create_qp { __aligned_u64 rbuf_addr; __aligned_u64 sbuf_addr; __u32 rbuf_size; __u32 sbuf_size; __aligned_u64 qp_addr; }; struct pvrdma_create_qp_resp { __u32 qpn; __u32 qp_handle; }; /* PVRDMA masked atomic compare and swap */ struct pvrdma_ex_cmp_swap { __aligned_u64 swap_val; __aligned_u64 compare_val; __aligned_u64 swap_mask; __aligned_u64 compare_mask; }; /* PVRDMA masked atomic fetch and add */ struct pvrdma_ex_fetch_add { __aligned_u64 add_val; __aligned_u64 field_boundary; }; /* PVRDMA address vector. */ struct pvrdma_av { __u32 port_pd; __u32 sl_tclass_flowlabel; __u8 dgid[16]; __u8 src_path_bits; __u8 gid_index; __u8 stat_rate; __u8 hop_limit; __u8 dmac[6]; __u8 reserved[6]; }; /* PVRDMA scatter/gather entry */ struct pvrdma_sge { __aligned_u64 addr; __u32 length; __u32 lkey; }; /* PVRDMA receive queue work request */ struct pvrdma_rq_wqe_hdr { __aligned_u64 wr_id; /* wr id */ __u32 num_sge; /* size of s/g array */ __u32 total_len; /* reserved */ }; /* Use pvrdma_sge (ib_sge) for receive queue s/g array elements. */ /* PVRDMA send queue work request */ struct pvrdma_sq_wqe_hdr { __aligned_u64 wr_id; /* wr id */ __u32 num_sge; /* size of s/g array */ __u32 total_len; /* reserved */ __u32 opcode; /* operation type */ __u32 send_flags; /* wr flags */ union { __be32 imm_data; __u32 invalidate_rkey; } ex; __u32 reserved; union { struct { __aligned_u64 remote_addr; __u32 rkey; __u8 reserved[4]; } rdma; struct { __aligned_u64 remote_addr; __aligned_u64 compare_add; __aligned_u64 swap; __u32 rkey; __u32 reserved; } atomic; struct { __aligned_u64 remote_addr; __u32 log_arg_sz; __u32 rkey; union { struct pvrdma_ex_cmp_swap cmp_swap; struct pvrdma_ex_fetch_add fetch_add; } wr_data; } masked_atomics; struct { __aligned_u64 iova_start; __aligned_u64 pl_pdir_dma; __u32 page_shift; __u32 page_list_len; __u32 length; __u32 access_flags; __u32 rkey; __u32 reserved; } fast_reg; struct { __u32 remote_qpn; __u32 remote_qkey; struct pvrdma_av av; } ud; } wr; }; /* Use pvrdma_sge (ib_sge) for send queue s/g array elements. */ /* Completion queue element. */ struct pvrdma_cqe { __aligned_u64 wr_id; __aligned_u64 qp; __u32 opcode; __u32 status; __u32 byte_len; __be32 imm_data; __u32 src_qp; __u32 wc_flags; __u32 vendor_err; __u16 pkey_index; __u16 slid; __u8 sl; __u8 dlid_path_bits; __u8 port_num; __u8 smac[6]; __u8 network_hdr_type; __u8 reserved2[6]; /* Pad to next power of 2 (64). */ }; #endif /* __VMW_PVRDMA_ABI_H__ */ PKZk◾ rdma/efa-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ /* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All rights reserved. */ #ifndef EFA_ABI_USER_H #define EFA_ABI_USER_H #include /* * Increment this value if any changes that break userspace ABI * compatibility are made. */ #define EFA_UVERBS_ABI_VERSION 1 /* * Keep structs aligned to 8 bytes. * Keep reserved fields as arrays of __u8 named reserved_XXX where XXX is the * hex bit offset of the field. */ enum { EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0, EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1, }; struct efa_ibv_alloc_ucontext_cmd { __u32 comp_mask; __u8 reserved_20[4]; }; enum efa_ibv_user_cmds_supp_udata { EFA_USER_CMDS_SUPP_UDATA_QUERY_DEVICE = 1 << 0, EFA_USER_CMDS_SUPP_UDATA_CREATE_AH = 1 << 1, }; struct efa_ibv_alloc_ucontext_resp { __u32 comp_mask; __u32 cmds_supp_udata_mask; __u16 sub_cqs_per_cq; __u16 inline_buf_size; __u32 max_llq_size; /* bytes */ __u16 max_tx_batch; /* units of 64 bytes */ __u16 min_sq_wr; __u8 reserved_a0[4]; }; struct efa_ibv_alloc_pd_resp { __u32 comp_mask; __u16 pdn; __u8 reserved_30[2]; }; enum { EFA_CREATE_CQ_WITH_COMPLETION_CHANNEL = 1 << 0, EFA_CREATE_CQ_WITH_SGID = 1 << 1, }; struct efa_ibv_create_cq { __u32 comp_mask; __u32 cq_entry_size; __u16 num_sub_cqs; __u8 flags; __u8 reserved_58[5]; }; enum { EFA_CREATE_CQ_RESP_DB_OFF = 1 << 0, }; struct efa_ibv_create_cq_resp { __u32 comp_mask; __u8 reserved_20[4]; __aligned_u64 q_mmap_key; __aligned_u64 q_mmap_size; __u16 cq_idx; __u8 reserved_d0[2]; __u32 db_off; __aligned_u64 db_mmap_key; }; enum { EFA_QP_DRIVER_TYPE_SRD = 0, }; struct efa_ibv_create_qp { __u32 comp_mask; __u32 rq_ring_size; /* bytes */ __u32 sq_ring_size; /* bytes */ __u32 driver_qp_type; }; struct efa_ibv_create_qp_resp { __u32 comp_mask; /* the offset inside the page of the rq db */ __u32 rq_db_offset; /* the offset inside the page of the sq db */ __u32 sq_db_offset; /* the offset inside the page of descriptors buffer */ __u32 llq_desc_offset; __aligned_u64 rq_mmap_key; __aligned_u64 rq_mmap_size; __aligned_u64 rq_db_mmap_key; __aligned_u64 sq_db_mmap_key; __aligned_u64 llq_desc_mmap_key; __u16 send_sub_cq_idx; __u16 recv_sub_cq_idx; __u8 reserved_1e0[4]; }; struct efa_ibv_create_ah_resp { __u32 comp_mask; __u16 efa_address_handle; __u8 reserved_30[2]; }; enum { EFA_QUERY_DEVICE_CAPS_RDMA_READ = 1 << 0, EFA_QUERY_DEVICE_CAPS_RNR_RETRY = 1 << 1, EFA_QUERY_DEVICE_CAPS_CQ_NOTIFICATIONS = 1 << 2, EFA_QUERY_DEVICE_CAPS_CQ_WITH_SGID = 1 << 3, EFA_QUERY_DEVICE_CAPS_DATA_POLLING_128 = 1 << 4, EFA_QUERY_DEVICE_CAPS_RDMA_WRITE = 1 << 5, }; struct efa_ibv_ex_query_device_resp { __u32 comp_mask; __u32 max_sq_wr; __u32 max_rq_wr; __u16 max_sq_sge; __u16 max_rq_sge; __u32 max_rdma_size; __u32 device_caps; }; #endif /* EFA_ABI_USER_H */ PKZ:/ / rdma/rdma_user_ioctl_cmds.hnu[/* * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef RDMA_USER_IOCTL_CMDS_H #define RDMA_USER_IOCTL_CMDS_H #include #include /* Documentation/ioctl/ioctl-number.txt */ #define RDMA_IOCTL_MAGIC 0x1b #define RDMA_VERBS_IOCTL \ _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr) enum { /* User input */ UVERBS_ATTR_F_MANDATORY = 1U << 0, /* * Valid output bit should be ignored and considered set in * mandatory fields. This bit is kernel output. */ UVERBS_ATTR_F_VALID_OUTPUT = 1U << 1, }; struct ib_uverbs_attr { __u16 attr_id; /* command specific type attribute */ __u16 len; /* only for pointers and IDRs array */ __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */ union { struct { __u8 elem_id; __u8 reserved; } enum_data; __u16 reserved; } attr_data; union { /* * ptr to command, __inline__ data, idr/fd or * ptr to __u32 array of IDRs */ __aligned_u64 data; /* Used by FD_IN and FD_OUT */ __s64 data_s64; }; }; struct ib_uverbs_ioctl_hdr { __u16 length; __u16 object_id; __u16 method_id; __u16 num_attrs; __aligned_u64 reserved1; __u32 driver_id; __u32 reserved2; struct ib_uverbs_attr attrs[]; }; #endif PKZơ rdma/mlx5_user_ioctl_verbs.hnu[/* * Copyright (c) 2018, Mellanox Technologies inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef MLX5_USER_IOCTL_VERBS_H #define MLX5_USER_IOCTL_VERBS_H #include enum mlx5_ib_uapi_flow_action_flags { MLX5_IB_UAPI_FLOW_ACTION_FLAGS_REQUIRE_METADATA = 1 << 0, }; enum mlx5_ib_uapi_flow_table_type { MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_RX = 0x0, MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB = 0x2, MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX = 0x3, MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_TX = 0x4, }; enum mlx5_ib_uapi_flow_action_packet_reformat_type { MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TUNNEL_TO_L2 = 0x0, MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L2_TUNNEL = 0x1, MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L3_TUNNEL_TO_L2 = 0x2, MLX5_IB_UAPI_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L3_TUNNEL = 0x3, }; struct mlx5_ib_uapi_devx_async_cmd_hdr { __aligned_u64 wr_id; __u8 out_data[]; }; enum mlx5_ib_uapi_dm_type { MLX5_IB_UAPI_DM_TYPE_MEMIC, MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM, MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM, MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_PATTERN_SW_ICM, }; enum mlx5_ib_uapi_devx_create_event_channel_flags { MLX5_IB_UAPI_DEVX_CR_EV_CH_FLAGS_OMIT_DATA = 1 << 0, }; struct mlx5_ib_uapi_devx_async_event_hdr { __aligned_u64 cookie; __u8 out_data[]; }; enum mlx5_ib_uapi_pp_alloc_flags { MLX5_IB_UAPI_PP_ALLOC_FLAGS_DEDICATED_INDEX = 1 << 0, }; enum mlx5_ib_uapi_uar_alloc_type { MLX5_IB_UAPI_UAR_ALLOC_TYPE_BF = 0x0, MLX5_IB_UAPI_UAR_ALLOC_TYPE_NC = 0x1, }; enum mlx5_ib_uapi_query_port_flags { MLX5_IB_UAPI_QUERY_PORT_VPORT = 1 << 0, MLX5_IB_UAPI_QUERY_PORT_VPORT_VHCA_ID = 1 << 1, MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_RX = 1 << 2, MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_TX = 1 << 3, MLX5_IB_UAPI_QUERY_PORT_VPORT_REG_C0 = 1 << 4, MLX5_IB_UAPI_QUERY_PORT_ESW_OWNER_VHCA_ID = 1 << 5, }; struct mlx5_ib_uapi_reg { __u32 value; __u32 mask; }; struct mlx5_ib_uapi_query_port { __aligned_u64 flags; __u16 vport; __u16 vport_vhca_id; __u16 esw_owner_vhca_id; __u16 rsvd0; __aligned_u64 vport_steering_icm_rx; __aligned_u64 vport_steering_icm_tx; struct mlx5_ib_uapi_reg reg_c0; }; #endif PKZordma/mana-abi.hnu[/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */ /* * Copyright (c) 2022, Microsoft Corporation. All rights reserved. */ #ifndef MANA_ABI_USER_H #define MANA_ABI_USER_H #include #include /* * Increment this value if any changes that break userspace ABI * compatibility are made. */ #define MANA_IB_UVERBS_ABI_VERSION 1 struct mana_ib_create_cq { __aligned_u64 buf_addr; }; struct mana_ib_create_qp { __aligned_u64 sq_buf_addr; __u32 sq_buf_size; __u32 port; }; struct mana_ib_create_qp_resp { __u32 sqid; __u32 cqid; __u32 tx_vp_offset; __u32 reserved; }; struct mana_ib_create_wq { __aligned_u64 wq_buf_addr; __u32 wq_buf_size; __u32 reserved; }; /* RX Hash function flags */ enum mana_ib_rx_hash_function_flags { MANA_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0, }; struct mana_ib_create_qp_rss { __aligned_u64 rx_hash_fields_mask; __u8 rx_hash_function; __u8 reserved[7]; __u32 rx_hash_key_len; __u8 rx_hash_key[40]; __u32 port; }; struct rss_resp_entry { __u32 cqid; __u32 wqid; }; struct mana_ib_create_qp_rss_resp { __aligned_u64 num_entries; struct rss_resp_entry entries[64]; }; #endif PKZE蝐rdma/irdma-abi.hnu[/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB */ /* * Copyright (c) 2006 - 2021 Intel Corporation. All rights reserved. * Copyright (c) 2005 Topspin Communications. All rights reserved. * Copyright (c) 2005 Cisco Systems. All rights reserved. * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. */ #ifndef IRDMA_ABI_H #define IRDMA_ABI_H #include /* irdma must support legacy GEN_1 i40iw kernel * and user-space whose last ABI ver is 5 */ #define IRDMA_ABI_VER 5 enum irdma_memreg_type { IRDMA_MEMREG_TYPE_MEM = 0, IRDMA_MEMREG_TYPE_QP = 1, IRDMA_MEMREG_TYPE_CQ = 2, }; struct irdma_alloc_ucontext_req { __u32 rsvd32; __u8 userspace_ver; __u8 rsvd8[3]; }; struct irdma_alloc_ucontext_resp { __u32 max_pds; __u32 max_qps; __u32 wq_size; /* size of the WQs (SQ+RQ) in the mmaped area */ __u8 kernel_ver; __u8 rsvd[3]; __aligned_u64 feature_flags; __aligned_u64 db_mmap_key; __u32 max_hw_wq_frags; __u32 max_hw_read_sges; __u32 max_hw_inline; __u32 max_hw_rq_quanta; __u32 max_hw_wq_quanta; __u32 min_hw_cq_size; __u32 max_hw_cq_size; __u16 max_hw_sq_chunk; __u8 hw_rev; __u8 rsvd2; }; struct irdma_alloc_pd_resp { __u32 pd_id; __u8 rsvd[4]; }; struct irdma_resize_cq_req { __aligned_u64 user_cq_buffer; }; struct irdma_create_cq_req { __aligned_u64 user_cq_buf; __aligned_u64 user_shadow_area; }; struct irdma_create_qp_req { __aligned_u64 user_wqe_bufs; __aligned_u64 user_compl_ctx; }; struct irdma_mem_reg_req { __u16 reg_type; /* enum irdma_memreg_type */ __u16 cq_pages; __u16 rq_pages; __u16 sq_pages; }; struct irdma_modify_qp_req { __u8 sq_flush; __u8 rq_flush; __u8 rsvd[6]; }; struct irdma_create_cq_resp { __u32 cq_id; __u32 cq_size; }; struct irdma_create_qp_resp { __u32 qp_id; __u32 actual_sq_size; __u32 actual_rq_size; __u32 irdma_drv_opt; __u16 push_idx; __u8 lsmm; __u8 rsvd; __u32 qp_caps; }; struct irdma_modify_qp_resp { __aligned_u64 push_wqe_mmap_key; __aligned_u64 push_db_mmap_key; __u16 push_offset; __u8 push_valid; __u8 rsvd[5]; }; struct irdma_create_ah_resp { __u32 ah_id; __u8 rsvd[4]; }; #endif /* IRDMA_ABI_H */ PKZmӆ-6-6rdma/mlx5-abi.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef MLX5_ABI_USER_H #define MLX5_ABI_USER_H #include #include /* For ETH_ALEN. */ #include enum { MLX5_QP_FLAG_SIGNATURE = 1 << 0, MLX5_QP_FLAG_SCATTER_CQE = 1 << 1, MLX5_QP_FLAG_TUNNEL_OFFLOADS = 1 << 2, MLX5_QP_FLAG_BFREG_INDEX = 1 << 3, MLX5_QP_FLAG_TYPE_DCT = 1 << 4, MLX5_QP_FLAG_TYPE_DCI = 1 << 5, MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_UC = 1 << 6, MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC = 1 << 7, MLX5_QP_FLAG_ALLOW_SCATTER_CQE = 1 << 8, MLX5_QP_FLAG_PACKET_BASED_CREDIT_MODE = 1 << 9, MLX5_QP_FLAG_UAR_PAGE_INDEX = 1 << 10, MLX5_QP_FLAG_DCI_STREAM = 1 << 11, }; enum { MLX5_SRQ_FLAG_SIGNATURE = 1 << 0, }; enum { MLX5_WQ_FLAG_SIGNATURE = 1 << 0, }; /* Increment this value if any changes that break userspace ABI * compatibility are made. */ #define MLX5_IB_UVERBS_ABI_VERSION 1 /* Make sure that all structs defined in this file remain laid out so * that they pack the same way on 32-bit and 64-bit architectures (to * avoid incompatibility between 32-bit userspace and 64-bit kernels). * In particular do not use pointer types -- pass pointers in __u64 * instead. */ struct mlx5_ib_alloc_ucontext_req { __u32 total_num_bfregs; __u32 num_low_latency_bfregs; }; enum mlx5_lib_caps { MLX5_LIB_CAP_4K_UAR = (__u64)1 << 0, MLX5_LIB_CAP_DYN_UAR = (__u64)1 << 1, }; enum mlx5_ib_alloc_uctx_v2_flags { MLX5_IB_ALLOC_UCTX_DEVX = 1 << 0, }; struct mlx5_ib_alloc_ucontext_req_v2 { __u32 total_num_bfregs; __u32 num_low_latency_bfregs; __u32 flags; __u32 comp_mask; __u8 max_cqe_version; __u8 reserved0; __u16 reserved1; __u32 reserved2; __aligned_u64 lib_caps; }; enum mlx5_ib_alloc_ucontext_resp_mask { MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_DUMP_FILL_MKEY = 1UL << 1, MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_ECE = 1UL << 2, MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_SQD2RTS = 1UL << 3, MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_REAL_TIME_TS = 1UL << 4, MLX5_IB_ALLOC_UCONTEXT_RESP_MASK_MKEY_UPDATE_TAG = 1UL << 5, }; enum mlx5_user_cmds_supp_uhw { MLX5_USER_CMDS_SUPP_UHW_QUERY_DEVICE = 1 << 0, MLX5_USER_CMDS_SUPP_UHW_CREATE_AH = 1 << 1, }; /* The eth_min_inline response value is set to off-by-one vs the FW * returned value to allow user-space to deal with older kernels. */ enum mlx5_user_inline_mode { MLX5_USER_INLINE_MODE_NA, MLX5_USER_INLINE_MODE_NONE, MLX5_USER_INLINE_MODE_L2, MLX5_USER_INLINE_MODE_IP, MLX5_USER_INLINE_MODE_TCP_UDP, }; enum { MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM = 1 << 0, MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA = 1 << 1, MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_STEERING = 1 << 2, MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_FULL_OFFLOAD = 1 << 3, MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX_IV_IS_ESN = 1 << 4, }; struct mlx5_ib_alloc_ucontext_resp { __u32 qp_tab_size; __u32 bf_reg_size; __u32 tot_bfregs; __u32 cache_line_size; __u16 max_sq_desc_sz; __u16 max_rq_desc_sz; __u32 max_send_wqebb; __u32 max_recv_wr; __u32 max_srq_recv_wr; __u16 num_ports; __u16 flow_action_flags; __u32 comp_mask; __u32 response_length; __u8 cqe_version; __u8 cmds_supp_uhw; __u8 eth_min_inline; __u8 clock_info_versions; __aligned_u64 hca_core_clock_offset; __u32 log_uar_size; __u32 num_uars_per_page; __u32 num_dyn_bfregs; __u32 dump_fill_mkey; }; struct mlx5_ib_alloc_pd_resp { __u32 pdn; }; struct mlx5_ib_tso_caps { __u32 max_tso; /* Maximum tso payload size in bytes */ /* Corresponding bit will be set if qp type from * 'enum ib_qp_type' is supported, e.g. * supported_qpts |= 1 << IB_QPT_UD */ __u32 supported_qpts; }; struct mlx5_ib_rss_caps { __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ __u8 reserved[7]; }; enum mlx5_ib_cqe_comp_res_format { MLX5_IB_CQE_RES_FORMAT_HASH = 1 << 0, MLX5_IB_CQE_RES_FORMAT_CSUM = 1 << 1, MLX5_IB_CQE_RES_FORMAT_CSUM_STRIDX = 1 << 2, }; struct mlx5_ib_cqe_comp_caps { __u32 max_num; __u32 supported_format; /* enum mlx5_ib_cqe_comp_res_format */ }; enum mlx5_ib_packet_pacing_cap_flags { MLX5_IB_PP_SUPPORT_BURST = 1 << 0, }; struct mlx5_packet_pacing_caps { __u32 qp_rate_limit_min; __u32 qp_rate_limit_max; /* In kpbs */ /* Corresponding bit will be set if qp type from * 'enum ib_qp_type' is supported, e.g. * supported_qpts |= 1 << IB_QPT_RAW_PACKET */ __u32 supported_qpts; __u8 cap_flags; /* enum mlx5_ib_packet_pacing_cap_flags */ __u8 reserved[3]; }; enum mlx5_ib_mpw_caps { MPW_RESERVED = 1 << 0, MLX5_IB_ALLOW_MPW = 1 << 1, MLX5_IB_SUPPORT_EMPW = 1 << 2, }; enum mlx5_ib_sw_parsing_offloads { MLX5_IB_SW_PARSING = 1 << 0, MLX5_IB_SW_PARSING_CSUM = 1 << 1, MLX5_IB_SW_PARSING_LSO = 1 << 2, }; struct mlx5_ib_sw_parsing_caps { __u32 sw_parsing_offloads; /* enum mlx5_ib_sw_parsing_offloads */ /* Corresponding bit will be set if qp type from * 'enum ib_qp_type' is supported, e.g. * supported_qpts |= 1 << IB_QPT_RAW_PACKET */ __u32 supported_qpts; }; struct mlx5_ib_striding_rq_caps { __u32 min_single_stride_log_num_of_bytes; __u32 max_single_stride_log_num_of_bytes; __u32 min_single_wqe_log_num_of_strides; __u32 max_single_wqe_log_num_of_strides; /* Corresponding bit will be set if qp type from * 'enum ib_qp_type' is supported, e.g. * supported_qpts |= 1 << IB_QPT_RAW_PACKET */ __u32 supported_qpts; __u32 reserved; }; struct mlx5_ib_dci_streams_caps { __u8 max_log_num_concurent; __u8 max_log_num_errored; }; enum mlx5_ib_query_dev_resp_flags { /* Support 128B CQE compression */ MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0, MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD = 1 << 1, MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE = 1 << 2, MLX5_IB_QUERY_DEV_RESP_FLAGS_SCAT2CQE_DCT = 1 << 3, }; enum mlx5_ib_tunnel_offloads { MLX5_IB_TUNNELED_OFFLOADS_VXLAN = 1 << 0, MLX5_IB_TUNNELED_OFFLOADS_GRE = 1 << 1, MLX5_IB_TUNNELED_OFFLOADS_GENEVE = 1 << 2, MLX5_IB_TUNNELED_OFFLOADS_MPLS_GRE = 1 << 3, MLX5_IB_TUNNELED_OFFLOADS_MPLS_UDP = 1 << 4, }; struct mlx5_ib_query_device_resp { __u32 comp_mask; __u32 response_length; struct mlx5_ib_tso_caps tso_caps; struct mlx5_ib_rss_caps rss_caps; struct mlx5_ib_cqe_comp_caps cqe_comp_caps; struct mlx5_packet_pacing_caps packet_pacing_caps; __u32 mlx5_ib_support_multi_pkt_send_wqes; __u32 flags; /* Use enum mlx5_ib_query_dev_resp_flags */ struct mlx5_ib_sw_parsing_caps sw_parsing_caps; struct mlx5_ib_striding_rq_caps striding_rq_caps; __u32 tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */ struct mlx5_ib_dci_streams_caps dci_streams_caps; __u16 reserved; }; enum mlx5_ib_create_cq_flags { MLX5_IB_CREATE_CQ_FLAGS_CQE_128B_PAD = 1 << 0, MLX5_IB_CREATE_CQ_FLAGS_UAR_PAGE_INDEX = 1 << 1, MLX5_IB_CREATE_CQ_FLAGS_REAL_TIME_TS = 1 << 2, }; struct mlx5_ib_create_cq { __aligned_u64 buf_addr; __aligned_u64 db_addr; __u32 cqe_size; __u8 cqe_comp_en; __u8 cqe_comp_res_format; __u16 flags; __u16 uar_page_index; __u16 reserved0; __u32 reserved1; }; struct mlx5_ib_create_cq_resp { __u32 cqn; __u32 reserved; }; struct mlx5_ib_resize_cq { __aligned_u64 buf_addr; __u16 cqe_size; __u16 reserved0; __u32 reserved1; }; struct mlx5_ib_create_srq { __aligned_u64 buf_addr; __aligned_u64 db_addr; __u32 flags; __u32 reserved0; /* explicit padding (optional on i386) */ __u32 uidx; __u32 reserved1; }; struct mlx5_ib_create_srq_resp { __u32 srqn; __u32 reserved; }; struct mlx5_ib_create_qp_dci_streams { __u8 log_num_concurent; __u8 log_num_errored; }; struct mlx5_ib_create_qp { __aligned_u64 buf_addr; __aligned_u64 db_addr; __u32 sq_wqe_count; __u32 rq_wqe_count; __u32 rq_wqe_shift; __u32 flags; __u32 uidx; __u32 bfreg_index; union { __aligned_u64 sq_buf_addr; __aligned_u64 access_key; }; __u32 ece_options; struct mlx5_ib_create_qp_dci_streams dci_streams; __u16 reserved; }; /* RX Hash function flags */ enum mlx5_rx_hash_function_flags { MLX5_RX_HASH_FUNC_TOEPLITZ = 1 << 0, }; /* * RX Hash flags, these flags allows to set which incoming packet's field should * participates in RX Hash. Each flag represent certain packet's field, * when the flag is set the field that is represented by the flag will * participate in RX Hash calculation. * Note: *IPV4 and *IPV6 flags can't be enabled together on the same QP * and *TCP and *UDP flags can't be enabled together on the same QP. */ enum mlx5_rx_hash_fields { MLX5_RX_HASH_SRC_IPV4 = 1 << 0, MLX5_RX_HASH_DST_IPV4 = 1 << 1, MLX5_RX_HASH_SRC_IPV6 = 1 << 2, MLX5_RX_HASH_DST_IPV6 = 1 << 3, MLX5_RX_HASH_SRC_PORT_TCP = 1 << 4, MLX5_RX_HASH_DST_PORT_TCP = 1 << 5, MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6, MLX5_RX_HASH_DST_PORT_UDP = 1 << 7, MLX5_RX_HASH_IPSEC_SPI = 1 << 8, /* Save bits for future fields */ MLX5_RX_HASH_INNER = (1UL << 31), }; struct mlx5_ib_create_qp_rss { __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ __u8 rx_key_len; /* valid only for Toeplitz */ __u8 reserved[6]; __u8 rx_hash_key[128]; /* valid only for Toeplitz */ __u32 comp_mask; __u32 flags; }; enum mlx5_ib_create_qp_resp_mask { MLX5_IB_CREATE_QP_RESP_MASK_TIRN = 1UL << 0, MLX5_IB_CREATE_QP_RESP_MASK_TISN = 1UL << 1, MLX5_IB_CREATE_QP_RESP_MASK_RQN = 1UL << 2, MLX5_IB_CREATE_QP_RESP_MASK_SQN = 1UL << 3, MLX5_IB_CREATE_QP_RESP_MASK_TIR_ICM_ADDR = 1UL << 4, }; struct mlx5_ib_create_qp_resp { __u32 bfreg_index; __u32 ece_options; __u32 comp_mask; __u32 tirn; __u32 tisn; __u32 rqn; __u32 sqn; __u32 reserved1; __u64 tir_icm_addr; }; struct mlx5_ib_alloc_mw { __u32 comp_mask; __u8 num_klms; __u8 reserved1; __u16 reserved2; }; enum mlx5_ib_create_wq_mask { MLX5_IB_CREATE_WQ_STRIDING_RQ = (1 << 0), }; struct mlx5_ib_create_wq { __aligned_u64 buf_addr; __aligned_u64 db_addr; __u32 rq_wqe_count; __u32 rq_wqe_shift; __u32 user_index; __u32 flags; __u32 comp_mask; __u32 single_stride_log_num_of_bytes; __u32 single_wqe_log_num_of_strides; __u32 two_byte_shift_en; }; struct mlx5_ib_create_ah_resp { __u32 response_length; __u8 dmac[ETH_ALEN]; __u8 reserved[6]; }; struct mlx5_ib_burst_info { __u32 max_burst_sz; __u16 typical_pkt_sz; __u16 reserved; }; struct mlx5_ib_modify_qp { __u32 comp_mask; struct mlx5_ib_burst_info burst_info; __u32 ece_options; }; struct mlx5_ib_modify_qp_resp { __u32 response_length; __u32 dctn; __u32 ece_options; __u32 reserved; }; struct mlx5_ib_create_wq_resp { __u32 response_length; __u32 reserved; }; struct mlx5_ib_create_rwq_ind_tbl_resp { __u32 response_length; __u32 reserved; }; struct mlx5_ib_modify_wq { __u32 comp_mask; __u32 reserved; }; struct mlx5_ib_clock_info { __u32 sign; __u32 resv; __aligned_u64 nsec; __aligned_u64 cycles; __aligned_u64 frac; __u32 mult; __u32 shift; __aligned_u64 mask; __aligned_u64 overflow_period; }; enum mlx5_ib_mmap_cmd { MLX5_IB_MMAP_REGULAR_PAGE = 0, MLX5_IB_MMAP_GET_CONTIGUOUS_PAGES = 1, MLX5_IB_MMAP_WC_PAGE = 2, MLX5_IB_MMAP_NC_PAGE = 3, /* 5 is chosen in order to be compatible with old versions of libmlx5 */ MLX5_IB_MMAP_CORE_CLOCK = 5, MLX5_IB_MMAP_ALLOC_WC = 6, MLX5_IB_MMAP_CLOCK_INFO = 7, MLX5_IB_MMAP_DEVICE_MEM = 8, }; enum { MLX5_IB_CLOCK_INFO_KERNEL_UPDATING = 1, }; /* Bit indexes for the mlx5_alloc_ucontext_resp.clock_info_versions bitmap */ enum { MLX5_IB_CLOCK_INFO_V1 = 0, }; struct mlx5_ib_flow_counters_desc { __u32 description; __u32 index; }; struct mlx5_ib_flow_counters_data { RDMA_UAPI_PTR(struct mlx5_ib_flow_counters_desc *, counters_data); __u32 ncounters; __u32 reserved; }; struct mlx5_ib_create_flow { __u32 ncounters_data; __u32 reserved; /* * Following are counters data based on ncounters_data, each * entry in the data[] should match a corresponding counter object * that was pointed by a counters spec upon the flow creation */ struct mlx5_ib_flow_counters_data data[]; }; #endif /* MLX5_ABI_USER_H */ PKZϤrdma/rvt-abi.hnu[/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ /* * This file contains defines, structures, etc. that are used * to communicate between kernel and user code. */ #ifndef RVT_ABI_USER_H #define RVT_ABI_USER_H #include #include #ifndef RDMA_ATOMIC_UAPI #define RDMA_ATOMIC_UAPI(_type, _name) struct{ _type val; } _name #endif struct rvt_wqe_sge { __aligned_u64 addr; __u32 length; __u32 lkey; }; /* * This structure is used to contain the head pointer, tail pointer, * and completion queue entries as a single memory allocation so * it can be mmap'ed into user space. */ struct rvt_cq_wc { /* index of next entry to fill */ RDMA_ATOMIC_UAPI(__u32, head); /* index of next ib_poll_cq() entry */ RDMA_ATOMIC_UAPI(__u32, tail); /* these are actually size ibcq.cqe + 1 */ struct ib_uverbs_wc uqueue[]; }; /* * Receive work request queue entry. * The size of the sg_list is determined when the QP (or SRQ) is created * and stored in qp->r_rq.max_sge (or srq->rq.max_sge). */ struct rvt_rwqe { __u64 wr_id; __u8 num_sge; __u8 padding[7]; struct rvt_wqe_sge sg_list[]; }; /* * This structure is used to contain the head pointer, tail pointer, * and receive work queue entries as a single memory allocation so * it can be mmap'ed into user space. * Note that the wq array elements are variable size so you can't * just index into the array to get the N'th element; * use get_rwqe_ptr() for user space and rvt_get_rwqe_ptr() * for kernel space. */ struct rvt_rwq { /* new work requests posted to the head */ RDMA_ATOMIC_UAPI(__u32, head); /* receives pull requests from here. */ RDMA_ATOMIC_UAPI(__u32, tail); struct rvt_rwqe wq[]; }; #endif /* RVT_ABI_USER_H */ PKZDrrdma/ib_user_ioctl_verbs.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */ /* * Copyright (c) 2017-2018, Mellanox Technologies inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef IB_USER_IOCTL_VERBS_H #define IB_USER_IOCTL_VERBS_H #include #include #ifndef RDMA_UAPI_PTR #define RDMA_UAPI_PTR(_type, _name) __aligned_u64 _name #endif #define IB_UVERBS_ACCESS_OPTIONAL_FIRST (1 << 20) #define IB_UVERBS_ACCESS_OPTIONAL_LAST (1 << 29) enum ib_uverbs_core_support { IB_UVERBS_CORE_SUPPORT_OPTIONAL_MR_ACCESS = 1 << 0, }; enum ib_uverbs_access_flags { IB_UVERBS_ACCESS_LOCAL_WRITE = 1 << 0, IB_UVERBS_ACCESS_REMOTE_WRITE = 1 << 1, IB_UVERBS_ACCESS_REMOTE_READ = 1 << 2, IB_UVERBS_ACCESS_REMOTE_ATOMIC = 1 << 3, IB_UVERBS_ACCESS_MW_BIND = 1 << 4, IB_UVERBS_ACCESS_ZERO_BASED = 1 << 5, IB_UVERBS_ACCESS_ON_DEMAND = 1 << 6, IB_UVERBS_ACCESS_HUGETLB = 1 << 7, IB_UVERBS_ACCESS_FLUSH_GLOBAL = 1 << 8, IB_UVERBS_ACCESS_FLUSH_PERSISTENT = 1 << 9, IB_UVERBS_ACCESS_RELAXED_ORDERING = IB_UVERBS_ACCESS_OPTIONAL_FIRST, IB_UVERBS_ACCESS_OPTIONAL_RANGE = ((IB_UVERBS_ACCESS_OPTIONAL_LAST << 1) - 1) & ~(IB_UVERBS_ACCESS_OPTIONAL_FIRST - 1) }; enum ib_uverbs_srq_type { IB_UVERBS_SRQT_BASIC, IB_UVERBS_SRQT_XRC, IB_UVERBS_SRQT_TM, }; enum ib_uverbs_wq_type { IB_UVERBS_WQT_RQ, }; enum ib_uverbs_wq_flags { IB_UVERBS_WQ_FLAGS_CVLAN_STRIPPING = 1 << 0, IB_UVERBS_WQ_FLAGS_SCATTER_FCS = 1 << 1, IB_UVERBS_WQ_FLAGS_DELAY_DROP = 1 << 2, IB_UVERBS_WQ_FLAGS_PCI_WRITE_END_PADDING = 1 << 3, }; enum ib_uverbs_qp_type { IB_UVERBS_QPT_RC = 2, IB_UVERBS_QPT_UC, IB_UVERBS_QPT_UD, IB_UVERBS_QPT_RAW_PACKET = 8, IB_UVERBS_QPT_XRC_INI, IB_UVERBS_QPT_XRC_TGT, IB_UVERBS_QPT_DRIVER = 0xFF, }; enum ib_uverbs_qp_create_flags { IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 1 << 1, IB_UVERBS_QP_CREATE_SCATTER_FCS = 1 << 8, IB_UVERBS_QP_CREATE_CVLAN_STRIPPING = 1 << 9, IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING = 1 << 11, IB_UVERBS_QP_CREATE_SQ_SIG_ALL = 1 << 12, }; enum ib_uverbs_query_port_cap_flags { IB_UVERBS_PCF_SM = 1 << 1, IB_UVERBS_PCF_NOTICE_SUP = 1 << 2, IB_UVERBS_PCF_TRAP_SUP = 1 << 3, IB_UVERBS_PCF_OPT_IPD_SUP = 1 << 4, IB_UVERBS_PCF_AUTO_MIGR_SUP = 1 << 5, IB_UVERBS_PCF_SL_MAP_SUP = 1 << 6, IB_UVERBS_PCF_MKEY_NVRAM = 1 << 7, IB_UVERBS_PCF_PKEY_NVRAM = 1 << 8, IB_UVERBS_PCF_LED_INFO_SUP = 1 << 9, IB_UVERBS_PCF_SM_DISABLED = 1 << 10, IB_UVERBS_PCF_SYS_IMAGE_GUID_SUP = 1 << 11, IB_UVERBS_PCF_PKEY_SW_EXT_PORT_TRAP_SUP = 1 << 12, IB_UVERBS_PCF_EXTENDED_SPEEDS_SUP = 1 << 14, IB_UVERBS_PCF_CM_SUP = 1 << 16, IB_UVERBS_PCF_SNMP_TUNNEL_SUP = 1 << 17, IB_UVERBS_PCF_REINIT_SUP = 1 << 18, IB_UVERBS_PCF_DEVICE_MGMT_SUP = 1 << 19, IB_UVERBS_PCF_VENDOR_CLASS_SUP = 1 << 20, IB_UVERBS_PCF_DR_NOTICE_SUP = 1 << 21, IB_UVERBS_PCF_CAP_MASK_NOTICE_SUP = 1 << 22, IB_UVERBS_PCF_BOOT_MGMT_SUP = 1 << 23, IB_UVERBS_PCF_LINK_LATENCY_SUP = 1 << 24, IB_UVERBS_PCF_CLIENT_REG_SUP = 1 << 25, /* * IsOtherLocalChangesNoticeSupported is aliased by IP_BASED_GIDS and * is inaccessible */ IB_UVERBS_PCF_LINK_SPEED_WIDTH_TABLE_SUP = 1 << 27, IB_UVERBS_PCF_VENDOR_SPECIFIC_MADS_TABLE_SUP = 1 << 28, IB_UVERBS_PCF_MCAST_PKEY_TRAP_SUPPRESSION_SUP = 1 << 29, IB_UVERBS_PCF_MCAST_FDB_TOP_SUP = 1 << 30, IB_UVERBS_PCF_HIERARCHY_INFO_SUP = 1ULL << 31, /* NOTE this is an internal flag, not an IBA flag */ IB_UVERBS_PCF_IP_BASED_GIDS = 1 << 26, }; enum ib_uverbs_query_port_flags { IB_UVERBS_QPF_GRH_REQUIRED = 1 << 0, }; enum ib_uverbs_flow_action_esp_keymat { IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM, }; enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo { IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ, }; struct ib_uverbs_flow_action_esp_keymat_aes_gcm { __aligned_u64 iv; __u32 iv_algo; /* Use enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo */ __u32 salt; __u32 icv_len; __u32 key_len; __u32 aes_key[256 / 32]; }; enum ib_uverbs_flow_action_esp_replay { IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE, IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP, }; struct ib_uverbs_flow_action_esp_replay_bmp { __u32 size; }; enum ib_uverbs_flow_action_esp_flags { IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO = 0UL << 0, /* Default */ IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD = 1UL << 0, IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL = 0UL << 1, /* Default */ IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT = 1UL << 1, IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT = 0UL << 2, /* Default */ IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT = 1UL << 2, IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW = 1UL << 3, }; struct ib_uverbs_flow_action_esp_encap { /* This struct represents a list of pointers to flow_xxxx_filter that * encapsulates the payload in ESP tunnel mode. */ RDMA_UAPI_PTR(void *, val_ptr); /* pointer to a flow_xxxx_filter */ RDMA_UAPI_PTR(struct ib_uverbs_flow_action_esp_encap *, next_ptr); __u16 len; /* Len of the filter struct val_ptr points to */ __u16 type; /* Use flow_spec_type enum */ }; struct ib_uverbs_flow_action_esp { __u32 spi; __u32 seq; __u32 tfc_pad; __u32 flags; __aligned_u64 hard_limit_pkts; }; enum ib_uverbs_read_counters_flags { /* prefer read values from driver cache */ IB_UVERBS_READ_COUNTERS_PREFER_CACHED = 1 << 0, }; enum ib_uverbs_advise_mr_advice { IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH, IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE, }; enum ib_uverbs_advise_mr_flag { IB_UVERBS_ADVISE_MR_FLAG_FLUSH = 1 << 0, }; struct ib_uverbs_query_port_resp_ex { struct ib_uverbs_query_port_resp legacy_resp; __u16 port_cap_flags2; __u8 reserved[6]; }; struct ib_uverbs_qp_cap { __u32 max_send_wr; __u32 max_recv_wr; __u32 max_send_sge; __u32 max_recv_sge; __u32 max_inline_data; }; enum rdma_driver_id { RDMA_DRIVER_UNKNOWN, RDMA_DRIVER_MLX5, RDMA_DRIVER_MLX4, RDMA_DRIVER_CXGB3, RDMA_DRIVER_CXGB4, RDMA_DRIVER_MTHCA, RDMA_DRIVER_BNXT_RE, RDMA_DRIVER_OCRDMA, RDMA_DRIVER_NES, RDMA_DRIVER_I40IW, RDMA_DRIVER_IRDMA = RDMA_DRIVER_I40IW, RDMA_DRIVER_VMW_PVRDMA, RDMA_DRIVER_QEDR, RDMA_DRIVER_HNS, RDMA_DRIVER_USNIC, RDMA_DRIVER_RXE, RDMA_DRIVER_HFI1, RDMA_DRIVER_QIB, RDMA_DRIVER_EFA, RDMA_DRIVER_SIW, __RH_RESERVED_RDMA_DRIVER_ERDMA, RDMA_DRIVER_MANA, }; enum ib_uverbs_gid_type { IB_UVERBS_GID_TYPE_IB, IB_UVERBS_GID_TYPE_ROCE_V1, IB_UVERBS_GID_TYPE_ROCE_V2, }; struct ib_uverbs_gid_entry { __aligned_u64 gid[2]; __u32 gid_index; __u32 port_num; __u32 gid_type; __u32 netdev_ifindex; /* It is 0 if there is no netdev associated with it */ }; #endif PKZEo??sgtty.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SGTTY_H #define _SGTTY_H 1 #include #include /* On some systems this type is not defined by ; in that case, the functions are just stubs that return ENOSYS. */ struct sgttyb; __BEGIN_DECLS /* Fill in *PARAMS with terminal parameters associated with FD. */ extern int gtty (int __fd, struct sgttyb *__params) __THROW; /* Set the terminal parameters associated with FD to *PARAMS. */ extern int stty (int __fd, const struct sgttyb *__params) __THROW; __END_DECLS #endif /* sgtty.h */ PKZ:~fVVnss.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Define interface to NSS. This is meant for the interface functions and for implementors of new services. */ #ifndef _NSS_H #define _NSS_H 1 #include #include __BEGIN_DECLS /* Possible results of lookup using a nss_* function. */ enum nss_status { NSS_STATUS_TRYAGAIN = -2, NSS_STATUS_UNAVAIL, NSS_STATUS_NOTFOUND, NSS_STATUS_SUCCESS, NSS_STATUS_RETURN }; /* Data structure used for the 'gethostbyname4_r' function. */ struct gaih_addrtuple { struct gaih_addrtuple *next; char *name; int family; uint32_t addr[4]; uint32_t scopeid; }; /* Overwrite service selection for database DBNAME using specification in STRING. This function should only be used by system programs which have to work around non-existing services (e.e., while booting). Attention: Using this function repeatedly will slowly eat up the whole memory since previous selection data cannot be freed. */ extern int __nss_configure_lookup (const char *__dbname, const char *__string) __THROW; __END_DECLS #endif /* nss.h */ PKZ9؈##crypt.hnu[/* High-level libcrypt interfaces. Copyright (C) 1991-2017 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ #ifndef _CRYPT_H #define _CRYPT_H 1 #include __BEGIN_DECLS /* The strings returned by crypt, crypt_r, crypt_rn, and crypt_ra will be no longer than this, counting the terminating NUL. (Existing algorithms all produce much shorter strings, but we have reserved generous space for future expansion.) This is NOT the appropriate size to use in allocating the buffer supplied to crypt_rn; use sizeof (struct crypt_data) instead. */ #define CRYPT_OUTPUT_SIZE 384 /* Passphrases longer than this (counting the terminating NUL) are not supported. Note that some hash algorithms have lower limits. */ #define CRYPT_MAX_PASSPHRASE_SIZE 512 /* The strings returned by crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra will be no longer than this. This IS the appropriate size to use when allocating the buffer supplied to crypt_gensalt_rn. (Again, existing algorithms all produce much shorter strings, but we have reserved generous space for future expansion.) */ #define CRYPT_GENSALT_OUTPUT_SIZE 192 /* One-way hash the passphrase PHRASE as specified by SETTING, and return a string suitable for storage in a Unix-style "passwd" file. If SETTING is a previously hashed passphrase, the string returned will be equal to SETTING if and only if PHRASE is the same as the passphrase that was previously hashed. See the documentation for other ways to use this function. The string returned by this function is stored in a statically- allocated buffer, and will be overwritten if the function is called again. It is not safe to call this function from multiple threads concurrently. If an error occurs (such as SETTING being nonsense or unsupported) the string returned will begin with '*', and will not be equal to SETTING nor to any valid hashed passphrase. Otherwise, the string will not begin with '*'. */ extern char *crypt (const char *__phrase, const char *__setting) __THROW __nonnull ((1, 2)); /* These sizes are chosen to make sizeof (struct crypt_data) add up to exactly 32768 bytes. */ #define CRYPT_DATA_RESERVED_SIZE 767 #define CRYPT_DATA_INTERNAL_SIZE 30720 /* Memory area used by crypt_r. */ struct crypt_data { /* crypt_r writes the hashed password to this field of its 'data' argument. crypt_rn and crypt_ra do the same, treating the untyped data area they are supplied with as this struct. */ char output[CRYPT_OUTPUT_SIZE]; /* Applications are encouraged, but not required, to use this field to store the "setting" string that must be passed to crypt_*. Future extensions to the API may make this more ergonomic. A valid "setting" is either previously hashed password or the string produced by one of the crypt_gensalt functions; see the crypt_gensalt documentation for further details. */ char setting[CRYPT_OUTPUT_SIZE]; /* Applications are encouraged, but not required, to use this field to store the unhashed passphrase they will pass to crypt_*. Future extensions to the API may make this more ergonomic. */ char input[CRYPT_MAX_PASSPHRASE_SIZE]; /* Reserved for future application-visible fields. For maximum forward compatibility, applications should set this field to all bytes zero before calling crypt_r, crypt_rn, or crypt_ra for the first time with a just-allocated 'struct crypt_data'. Future extensions to the API may make this more ergonomic. */ char reserved[CRYPT_DATA_RESERVED_SIZE]; /* This field should be set to 0 before calling crypt_r, crypt_rn, or crypt_ra for the first time with a just-allocated 'struct crypt_data'. This is not required if crypt_ra is allowed to do the allocation itself (i.e. if the *DATA argument is a null pointer). Future extensions to the API may make this more ergonomic. */ char initialized; /* Scratch space used internally. Applications should not read or write this field. All data written to this area is erased before returning from the library. */ char internal[CRYPT_DATA_INTERNAL_SIZE]; }; /* Thread-safe version of crypt. Instead of writing to a static storage area, the string returned by this function will be within DATA->output. Otherwise, behaves exactly the same as crypt. */ extern char *crypt_r (const char *__phrase, const char *__setting, struct crypt_data *__restrict __data) __THROW __nonnull ((1, 2, 3)); /* Another thread-safe version of crypt. Instead of writing to a static storage area, the string returned by this function will be somewhere within the space provided at DATA, which is of length SIZE bytes. SIZE must be at least sizeof (struct crypt_data). Also, if an error occurs, this function returns a null pointer, not a special string. (However, the string returned on success still will never begin with '*'.) */ extern char *crypt_rn (const char *__phrase, const char *__setting, void *__data, int __size) __THROW __nonnull ((1, 2, 3)); /* Yet a third thread-safe version of crypt; this one works like getline(3). *DATA must be either 0 or a pointer to memory allocated by malloc, and *SIZE must be the size of the allocation. This space will be allocated or reallocated as necessary and the values updated. The string returned by this function will be somewhere within the space at *DATA. It is safe to deallocate this space with free when it is no longer needed. Like crypt_rn, this function returns a null pointer on failure, not a special string. */ extern char *crypt_ra (const char *__phrase, const char *__setting, void **__data, int *__size) __THROW __nonnull ((1, 2, 3, 4)); /* Generate a string suitable for use as the setting when hashing a new passphrase. PREFIX controls which hash function will be used, COUNT controls the computational cost of the hash (for functions where this is tunable), and RBYTES should point to NRBYTES bytes of random data. If PREFIX is a null pointer, the current best default is used; if RBYTES is a null pointer, random data will be retrieved from the operating system if possible. (Caution: setting PREFIX to an *empty string* selects the use of the oldest and least secure hash in the library. Don't do that.) The string returned is stored in a statically-allocated buffer, and will be overwritten if the function is called again. It is not safe to call this function from multiple threads concurrently. However, within a single thread, it is safe to pass the string as the SETTING argument to crypt without copying it first; the two functions use separate buffers. If an error occurs (e.g. a prefix that does not correspond to a supported hash function, or an inadequate amount of random data), this function returns a null pointer. */ extern char *crypt_gensalt (const char *__prefix, unsigned long __count, const char *__rbytes, int __nrbytes) __THROW; /* Thread-safe version of crypt_gensalt; instead of a statically-allocated buffer, the generated setting string is written to OUTPUT, which is OUTPUT_SIZE bytes long. OUTPUT_SIZE must be at least CRYPT_GENSALT_OUTPUT_SIZE (see above). If an error occurs, this function returns a null pointer and writes a string that does not correspond to any valid setting into OUTPUT. */ extern char *crypt_gensalt_rn (const char *__prefix, unsigned long __count, const char *__rbytes, int __nrbytes, char *__output, int __output_size) __THROW __nonnull ((5)); /* Another thread-safe version of crypt_gensalt; the generated setting string is in storage allocated by malloc, and should be deallocated with free when it is no longer needed. */ extern char *crypt_gensalt_ra (const char *__prefix, unsigned long __count, const char *__rbytes, int __nrbytes) __THROW; /* These macros could be checked by portable users of crypt_gensalt* functions to find out whether null pointers could be specified as PREFIX and RBYTES arguments. */ #define CRYPT_GENSALT_IMPLEMENTS_DEFAULT_PREFIX 1 #define CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY 1 __END_DECLS #endif /* crypt.h */ PKZ>gcrypt.hnu[/* gcrypt.h - GNU Cryptographic Library Interface -*- c -*- * Copyright (C) 1998-2017 Free Software Foundation, Inc. * Copyright (C) 2012-2017 g10 Code GmbH * * This file is part of Libgcrypt. * * Libgcrypt is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * Libgcrypt is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see . * * File: src/gcrypt.h. Generated from gcrypt.h.in by configure. */ #ifndef _GCRYPT_H #define _GCRYPT_H #include #include #include #include #include #if defined _WIN32 || defined __WIN32__ # include # include # include # ifndef __GNUC__ typedef long ssize_t; typedef int pid_t; # endif /*!__GNUC__*/ #else # include # include # include #endif /*!_WIN32*/ typedef socklen_t gcry_socklen_t; /* This is required for error code compatibility. */ #define _GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GCRYPT #ifdef __cplusplus extern "C" { #if 0 /* (Keep Emacsens' auto-indent happy.) */ } #endif #endif /* The version of this header should match the one of the library. It should not be used by a program because gcry_check_version() should return the same version. The purpose of this macro is to let autoconf (using the AM_PATH_GCRYPT macro) check that this header matches the installed library. */ #define GCRYPT_VERSION "1.8.5" /* The version number of this header. It may be used to handle minor API incompatibilities. */ #define GCRYPT_VERSION_NUMBER 0x010805 /* Internal: We can't use the convenience macros for the multi precision integer functions when building this library. */ #ifdef _GCRYPT_IN_LIBGCRYPT #ifndef GCRYPT_NO_MPI_MACROS #define GCRYPT_NO_MPI_MACROS 1 #endif #endif /* We want to use gcc attributes when possible. Warning: Don't use these macros in your programs: As indicated by the leading underscore they are subject to change without notice. */ #ifdef __GNUC__ #define _GCRY_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #if _GCRY_GCC_VERSION >= 30100 #define _GCRY_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) #endif #if _GCRY_GCC_VERSION >= 29600 #define _GCRY_GCC_ATTR_PURE __attribute__ ((__pure__)) #endif #if _GCRY_GCC_VERSION >= 30200 #define _GCRY_GCC_ATTR_MALLOC __attribute__ ((__malloc__)) #endif #define _GCRY_GCC_ATTR_PRINTF(f,a) __attribute__ ((format (printf,f,a))) #if _GCRY_GCC_VERSION >= 40000 #define _GCRY_GCC_ATTR_SENTINEL(a) __attribute__ ((sentinel(a))) #endif #endif /*__GNUC__*/ #ifndef _GCRY_GCC_ATTR_DEPRECATED #define _GCRY_GCC_ATTR_DEPRECATED #endif #ifndef _GCRY_GCC_ATTR_PURE #define _GCRY_GCC_ATTR_PURE #endif #ifndef _GCRY_GCC_ATTR_MALLOC #define _GCRY_GCC_ATTR_MALLOC #endif #ifndef _GCRY_GCC_ATTR_PRINTF #define _GCRY_GCC_ATTR_PRINTF(f,a) #endif #ifndef _GCRY_GCC_ATTR_SENTINEL #define _GCRY_GCC_ATTR_SENTINEL(a) #endif /* Make up an attribute to mark functions and types as deprecated but allow internal use by Libgcrypt. */ #ifdef _GCRYPT_IN_LIBGCRYPT #define _GCRY_ATTR_INTERNAL #else #define _GCRY_ATTR_INTERNAL _GCRY_GCC_ATTR_DEPRECATED #endif /* Wrappers for the libgpg-error library. */ typedef gpg_error_t gcry_error_t; typedef gpg_err_code_t gcry_err_code_t; typedef gpg_err_source_t gcry_err_source_t; static GPG_ERR_INLINE gcry_error_t gcry_err_make (gcry_err_source_t source, gcry_err_code_t code) { return gpg_err_make (source, code); } /* The user can define GPG_ERR_SOURCE_DEFAULT before including this file to specify a default source for gpg_error. */ #ifndef GCRY_ERR_SOURCE_DEFAULT #define GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_USER_1 #endif static GPG_ERR_INLINE gcry_error_t gcry_error (gcry_err_code_t code) { return gcry_err_make (GCRY_ERR_SOURCE_DEFAULT, code); } static GPG_ERR_INLINE gcry_err_code_t gcry_err_code (gcry_error_t err) { return gpg_err_code (err); } static GPG_ERR_INLINE gcry_err_source_t gcry_err_source (gcry_error_t err) { return gpg_err_source (err); } /* Return a pointer to a string containing a description of the error code in the error value ERR. */ const char *gcry_strerror (gcry_error_t err); /* Return a pointer to a string containing a description of the error source in the error value ERR. */ const char *gcry_strsource (gcry_error_t err); /* Retrieve the error code for the system error ERR. This returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report this). */ gcry_err_code_t gcry_err_code_from_errno (int err); /* Retrieve the system error for the error code CODE. This returns 0 if CODE is not a system error code. */ int gcry_err_code_to_errno (gcry_err_code_t code); /* Return an error value with the error source SOURCE and the system error ERR. */ gcry_error_t gcry_err_make_from_errno (gcry_err_source_t source, int err); /* Return an error value with the system error ERR. */ gcry_error_t gcry_error_from_errno (int err); /* NOTE: Since Libgcrypt 1.6 the thread callbacks are not anymore used. However we keep it to allow for some source code compatibility if used in the standard way. */ /* Constants defining the thread model to use. Used with the OPTION field of the struct gcry_thread_cbs. */ #define GCRY_THREAD_OPTION_DEFAULT 0 #define GCRY_THREAD_OPTION_USER 1 #define GCRY_THREAD_OPTION_PTH 2 #define GCRY_THREAD_OPTION_PTHREAD 3 /* The version number encoded in the OPTION field of the struct gcry_thread_cbs. */ #define GCRY_THREAD_OPTION_VERSION 1 /* Wrapper for struct ath_ops. */ struct gcry_thread_cbs { /* The OPTION field encodes the thread model and the version number of this structure. Bits 7 - 0 are used for the thread model Bits 15 - 8 are used for the version number. */ unsigned int option; } _GCRY_ATTR_INTERNAL; #define GCRY_THREAD_OPTION_PTH_IMPL \ static struct gcry_thread_cbs gcry_threads_pth = { \ (GCRY_THREAD_OPTION_PTH | (GCRY_THREAD_OPTION_VERSION << 8))} #define GCRY_THREAD_OPTION_PTHREAD_IMPL \ static struct gcry_thread_cbs gcry_threads_pthread = { \ (GCRY_THREAD_OPTION_PTHREAD | (GCRY_THREAD_OPTION_VERSION << 8))} /* A generic context object as used by some functions. */ struct gcry_context; typedef struct gcry_context *gcry_ctx_t; /* The data objects used to hold multi precision integers. */ struct gcry_mpi; typedef struct gcry_mpi *gcry_mpi_t; struct gcry_mpi_point; typedef struct gcry_mpi_point *gcry_mpi_point_t; #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_mpi *GCRY_MPI _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_mpi *GcryMPI _GCRY_GCC_ATTR_DEPRECATED; #endif /* A structure used for scatter gather hashing. */ typedef struct { size_t size; /* The allocated size of the buffer or 0. */ size_t off; /* Offset into the buffer. */ size_t len; /* The used length of the buffer. */ void *data; /* The buffer. */ } gcry_buffer_t; /* Check that the library fulfills the version requirement. */ const char *gcry_check_version (const char *req_version); /* Codes for function dispatchers. */ /* Codes used with the gcry_control function. */ enum gcry_ctl_cmds { /* Note: 1 .. 2 are not anymore used. */ GCRYCTL_CFB_SYNC = 3, GCRYCTL_RESET = 4, /* e.g. for MDs */ GCRYCTL_FINALIZE = 5, GCRYCTL_GET_KEYLEN = 6, GCRYCTL_GET_BLKLEN = 7, GCRYCTL_TEST_ALGO = 8, GCRYCTL_IS_SECURE = 9, GCRYCTL_GET_ASNOID = 10, GCRYCTL_ENABLE_ALGO = 11, GCRYCTL_DISABLE_ALGO = 12, GCRYCTL_DUMP_RANDOM_STATS = 13, GCRYCTL_DUMP_SECMEM_STATS = 14, GCRYCTL_GET_ALGO_NPKEY = 15, GCRYCTL_GET_ALGO_NSKEY = 16, GCRYCTL_GET_ALGO_NSIGN = 17, GCRYCTL_GET_ALGO_NENCR = 18, GCRYCTL_SET_VERBOSITY = 19, GCRYCTL_SET_DEBUG_FLAGS = 20, GCRYCTL_CLEAR_DEBUG_FLAGS = 21, GCRYCTL_USE_SECURE_RNDPOOL= 22, GCRYCTL_DUMP_MEMORY_STATS = 23, GCRYCTL_INIT_SECMEM = 24, GCRYCTL_TERM_SECMEM = 25, GCRYCTL_DISABLE_SECMEM_WARN = 27, GCRYCTL_SUSPEND_SECMEM_WARN = 28, GCRYCTL_RESUME_SECMEM_WARN = 29, GCRYCTL_DROP_PRIVS = 30, GCRYCTL_ENABLE_M_GUARD = 31, GCRYCTL_START_DUMP = 32, GCRYCTL_STOP_DUMP = 33, GCRYCTL_GET_ALGO_USAGE = 34, GCRYCTL_IS_ALGO_ENABLED = 35, GCRYCTL_DISABLE_INTERNAL_LOCKING = 36, GCRYCTL_DISABLE_SECMEM = 37, GCRYCTL_INITIALIZATION_FINISHED = 38, GCRYCTL_INITIALIZATION_FINISHED_P = 39, GCRYCTL_ANY_INITIALIZATION_P = 40, GCRYCTL_SET_CBC_CTS = 41, GCRYCTL_SET_CBC_MAC = 42, /* Note: 43 is not anymore used. */ GCRYCTL_ENABLE_QUICK_RANDOM = 44, GCRYCTL_SET_RANDOM_SEED_FILE = 45, GCRYCTL_UPDATE_RANDOM_SEED_FILE = 46, GCRYCTL_SET_THREAD_CBS = 47, GCRYCTL_FAST_POLL = 48, GCRYCTL_SET_RANDOM_DAEMON_SOCKET = 49, GCRYCTL_USE_RANDOM_DAEMON = 50, GCRYCTL_FAKED_RANDOM_P = 51, GCRYCTL_SET_RNDEGD_SOCKET = 52, GCRYCTL_PRINT_CONFIG = 53, GCRYCTL_OPERATIONAL_P = 54, GCRYCTL_FIPS_MODE_P = 55, GCRYCTL_FORCE_FIPS_MODE = 56, GCRYCTL_SELFTEST = 57, /* Note: 58 .. 62 are used internally. */ GCRYCTL_DISABLE_HWF = 63, GCRYCTL_SET_ENFORCED_FIPS_FLAG = 64, GCRYCTL_SET_PREFERRED_RNG_TYPE = 65, GCRYCTL_GET_CURRENT_RNG_TYPE = 66, GCRYCTL_DISABLE_LOCKED_SECMEM = 67, GCRYCTL_DISABLE_PRIV_DROP = 68, GCRYCTL_SET_CCM_LENGTHS = 69, GCRYCTL_CLOSE_RANDOM_DEVICE = 70, GCRYCTL_INACTIVATE_FIPS_FLAG = 71, GCRYCTL_REACTIVATE_FIPS_FLAG = 72, GCRYCTL_SET_SBOX = 73, GCRYCTL_DRBG_REINIT = 74, GCRYCTL_SET_TAGLEN = 75, GCRYCTL_GET_TAGLEN = 76, GCRYCTL_REINIT_SYSCALL_CLAMP = 77 }; /* Perform various operations defined by CMD. */ gcry_error_t gcry_control (enum gcry_ctl_cmds CMD, ...); /* S-expression management. */ /* The object to represent an S-expression as used with the public key functions. */ struct gcry_sexp; typedef struct gcry_sexp *gcry_sexp_t; #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_sexp *GCRY_SEXP _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_sexp *GcrySexp _GCRY_GCC_ATTR_DEPRECATED; #endif /* The possible values for the S-expression format. */ enum gcry_sexp_format { GCRYSEXP_FMT_DEFAULT = 0, GCRYSEXP_FMT_CANON = 1, GCRYSEXP_FMT_BASE64 = 2, GCRYSEXP_FMT_ADVANCED = 3 }; /* Create an new S-expression object from BUFFER of size LENGTH and return it in RETSEXP. With AUTODETECT set to 0 the data in BUFFER is expected to be in canonized format. */ gcry_error_t gcry_sexp_new (gcry_sexp_t *retsexp, const void *buffer, size_t length, int autodetect); /* Same as gcry_sexp_new but allows to pass a FREEFNC which has the effect to transfer ownership of BUFFER to the created object. */ gcry_error_t gcry_sexp_create (gcry_sexp_t *retsexp, void *buffer, size_t length, int autodetect, void (*freefnc) (void *)); /* Scan BUFFER and return a new S-expression object in RETSEXP. This function expects a printf like string in BUFFER. */ gcry_error_t gcry_sexp_sscan (gcry_sexp_t *retsexp, size_t *erroff, const char *buffer, size_t length); /* Same as gcry_sexp_sscan but expects a string in FORMAT and can thus only be used for certain encodings. */ gcry_error_t gcry_sexp_build (gcry_sexp_t *retsexp, size_t *erroff, const char *format, ...); /* Like gcry_sexp_build, but uses an array instead of variable function arguments. */ gcry_error_t gcry_sexp_build_array (gcry_sexp_t *retsexp, size_t *erroff, const char *format, void **arg_list); /* Release the S-expression object SEXP */ void gcry_sexp_release (gcry_sexp_t sexp); /* Calculate the length of an canonized S-expression in BUFFER and check for a valid encoding. */ size_t gcry_sexp_canon_len (const unsigned char *buffer, size_t length, size_t *erroff, gcry_error_t *errcode); /* Copies the S-expression object SEXP into BUFFER using the format specified in MODE. */ size_t gcry_sexp_sprint (gcry_sexp_t sexp, int mode, void *buffer, size_t maxlength); /* Dumps the S-expression object A in a format suitable for debugging to Libgcrypt's logging stream. */ void gcry_sexp_dump (const gcry_sexp_t a); gcry_sexp_t gcry_sexp_cons (const gcry_sexp_t a, const gcry_sexp_t b); gcry_sexp_t gcry_sexp_alist (const gcry_sexp_t *array); gcry_sexp_t gcry_sexp_vlist (const gcry_sexp_t a, ...); gcry_sexp_t gcry_sexp_append (const gcry_sexp_t a, const gcry_sexp_t n); gcry_sexp_t gcry_sexp_prepend (const gcry_sexp_t a, const gcry_sexp_t n); /* Scan the S-expression for a sublist with a type (the car of the list) matching the string TOKEN. If TOKLEN is not 0, the token is assumed to be raw memory of this length. The function returns a newly allocated S-expression consisting of the found sublist or `NULL' when not found. */ gcry_sexp_t gcry_sexp_find_token (gcry_sexp_t list, const char *tok, size_t toklen); /* Return the length of the LIST. For a valid S-expression this should be at least 1. */ int gcry_sexp_length (const gcry_sexp_t list); /* Create and return a new S-expression from the element with index NUMBER in LIST. Note that the first element has the index 0. If there is no such element, `NULL' is returned. */ gcry_sexp_t gcry_sexp_nth (const gcry_sexp_t list, int number); /* Create and return a new S-expression from the first element in LIST; this called the "type" and should always exist and be a string. `NULL' is returned in case of a problem. */ gcry_sexp_t gcry_sexp_car (const gcry_sexp_t list); /* Create and return a new list form all elements except for the first one. Note, that this function may return an invalid S-expression because it is not guaranteed, that the type exists and is a string. However, for parsing a complex S-expression it might be useful for intermediate lists. Returns `NULL' on error. */ gcry_sexp_t gcry_sexp_cdr (const gcry_sexp_t list); gcry_sexp_t gcry_sexp_cadr (const gcry_sexp_t list); /* This function is used to get data from a LIST. A pointer to the actual data with index NUMBER is returned and the length of this data will be stored to DATALEN. If there is no data at the given index or the index represents another list, `NULL' is returned. *Note:* The returned pointer is valid as long as LIST is not modified or released. */ const char *gcry_sexp_nth_data (const gcry_sexp_t list, int number, size_t *datalen); /* This function is used to get data from a LIST. A malloced buffer to the data with index NUMBER is returned and the length of this data will be stored to RLENGTH. If there is no data at the given index or the index represents another list, `NULL' is returned. */ void *gcry_sexp_nth_buffer (const gcry_sexp_t list, int number, size_t *rlength); /* This function is used to get and convert data from a LIST. The data is assumed to be a Nul terminated string. The caller must release the returned value using `gcry_free'. If there is no data at the given index, the index represents a list or the value can't be converted to a string, `NULL' is returned. */ char *gcry_sexp_nth_string (gcry_sexp_t list, int number); /* This function is used to get and convert data from a LIST. This data is assumed to be an MPI stored in the format described by MPIFMT and returned as a standard Libgcrypt MPI. The caller must release this returned value using `gcry_mpi_release'. If there is no data at the given index, the index represents a list or the value can't be converted to an MPI, `NULL' is returned. */ gcry_mpi_t gcry_sexp_nth_mpi (gcry_sexp_t list, int number, int mpifmt); /* Extract MPIs from an s-expression using a list of parameters. The * names of these parameters are given by the string LIST. Some * special characters may be given to control the conversion: * * + :: Switch to unsigned integer format (default). * - :: Switch to standard signed format. * / :: Switch to opaque format. * & :: Switch to buffer descriptor mode - see below. * ? :: The previous parameter is optional. * * In general parameter names are single letters. To use a string for * a parameter name, enclose the name in single quotes. * * Unless in gcry_buffer_t mode for each parameter name a pointer to * an MPI variable is expected that must be set to NULL prior to * invoking this function, and finally a NULL is expected. Example: * * _gcry_sexp_extract_param (key, NULL, "n/x+ed", * &mpi_n, &mpi_x, &mpi_e, NULL) * * This stores the parameter "N" from KEY as an unsigned MPI into * MPI_N, the parameter "X" as an opaque MPI into MPI_X, and the * parameter "E" again as an unsigned MPI into MPI_E. * * If in buffer descriptor mode a pointer to gcry_buffer_t descriptor * is expected instead of a pointer to an MPI. The caller may use two * different operation modes: If the DATA field of the provided buffer * descriptor is NULL, the function allocates a new buffer and stores * it at DATA; the other fields are set accordingly with OFF being 0. * If DATA is not NULL, the function assumes that DATA, SIZE, and OFF * describe a buffer where to but the data; on return the LEN field * receives the number of bytes copied to that buffer; if the buffer * is too small, the function immediately returns with an error code * (and LEN set to 0). * * PATH is an optional string used to locate a token. The exclamation * mark separated tokens are used to via gcry_sexp_find_token to find * a start point inside SEXP. * * The function returns 0 on success. On error an error code is * returned, all passed MPIs that might have been allocated up to this * point are deallocated and set to NULL, and all passed buffers are * either truncated if the caller supplied the buffer, or deallocated * if the function allocated the buffer. */ gpg_error_t gcry_sexp_extract_param (gcry_sexp_t sexp, const char *path, const char *list, ...) _GCRY_GCC_ATTR_SENTINEL(0); /******************************************* * * * Multi Precision Integer Functions * * * *******************************************/ /* Different formats of external big integer representation. */ enum gcry_mpi_format { GCRYMPI_FMT_NONE= 0, GCRYMPI_FMT_STD = 1, /* Twos complement stored without length. */ GCRYMPI_FMT_PGP = 2, /* As used by OpenPGP (unsigned only). */ GCRYMPI_FMT_SSH = 3, /* As used by SSH (like STD but with length). */ GCRYMPI_FMT_HEX = 4, /* Hex format. */ GCRYMPI_FMT_USG = 5, /* Like STD but unsigned. */ GCRYMPI_FMT_OPAQUE = 8 /* Opaque format (some functions only). */ }; /* Flags used for creating big integers. */ enum gcry_mpi_flag { GCRYMPI_FLAG_SECURE = 1, /* Allocate the number in "secure" memory. */ GCRYMPI_FLAG_OPAQUE = 2, /* The number is not a real one but just a way to store some bytes. This is useful for encrypted big integers. */ GCRYMPI_FLAG_IMMUTABLE = 4, /* Mark the MPI as immutable. */ GCRYMPI_FLAG_CONST = 8, /* Mark the MPI as a constant. */ GCRYMPI_FLAG_USER1 = 0x0100,/* User flag 1. */ GCRYMPI_FLAG_USER2 = 0x0200,/* User flag 2. */ GCRYMPI_FLAG_USER3 = 0x0400,/* User flag 3. */ GCRYMPI_FLAG_USER4 = 0x0800 /* User flag 4. */ }; /* Macros to return pre-defined MPI constants. */ #define GCRYMPI_CONST_ONE (_gcry_mpi_get_const (1)) #define GCRYMPI_CONST_TWO (_gcry_mpi_get_const (2)) #define GCRYMPI_CONST_THREE (_gcry_mpi_get_const (3)) #define GCRYMPI_CONST_FOUR (_gcry_mpi_get_const (4)) #define GCRYMPI_CONST_EIGHT (_gcry_mpi_get_const (8)) /* Allocate a new big integer object, initialize it with 0 and initially allocate memory for a number of at least NBITS. */ gcry_mpi_t gcry_mpi_new (unsigned int nbits); /* Same as gcry_mpi_new() but allocate in "secure" memory. */ gcry_mpi_t gcry_mpi_snew (unsigned int nbits); /* Release the number A and free all associated resources. */ void gcry_mpi_release (gcry_mpi_t a); /* Create a new number with the same value as A. */ gcry_mpi_t gcry_mpi_copy (const gcry_mpi_t a); /* Store the big integer value U in W and release U. */ void gcry_mpi_snatch (gcry_mpi_t w, gcry_mpi_t u); /* Store the big integer value U in W. */ gcry_mpi_t gcry_mpi_set (gcry_mpi_t w, const gcry_mpi_t u); /* Store the unsigned integer value U in W. */ gcry_mpi_t gcry_mpi_set_ui (gcry_mpi_t w, unsigned long u); /* Swap the values of A and B. */ void gcry_mpi_swap (gcry_mpi_t a, gcry_mpi_t b); /* Return 1 if A is negative; 0 if zero or positive. */ int gcry_mpi_is_neg (gcry_mpi_t a); /* W = - U */ void gcry_mpi_neg (gcry_mpi_t w, gcry_mpi_t u); /* W = [W] */ void gcry_mpi_abs (gcry_mpi_t w); /* Compare the big integer number U and V returning 0 for equality, a positive value for U > V and a negative for U < V. */ int gcry_mpi_cmp (const gcry_mpi_t u, const gcry_mpi_t v); /* Compare the big integer number U with the unsigned integer V returning 0 for equality, a positive value for U > V and a negative for U < V. */ int gcry_mpi_cmp_ui (const gcry_mpi_t u, unsigned long v); /* Convert the external representation of an integer stored in BUFFER with a length of BUFLEN into a newly create MPI returned in RET_MPI. If NSCANNED is not NULL, it will receive the number of bytes actually scanned after a successful operation. */ gcry_error_t gcry_mpi_scan (gcry_mpi_t *ret_mpi, enum gcry_mpi_format format, const void *buffer, size_t buflen, size_t *nscanned); /* Convert the big integer A into the external representation described by FORMAT and store it in the provided BUFFER which has been allocated by the user with a size of BUFLEN bytes. NWRITTEN receives the actual length of the external representation unless it has been passed as NULL. */ gcry_error_t gcry_mpi_print (enum gcry_mpi_format format, unsigned char *buffer, size_t buflen, size_t *nwritten, const gcry_mpi_t a); /* Convert the big integer A into the external representation described by FORMAT and store it in a newly allocated buffer which address will be put into BUFFER. NWRITTEN receives the actual lengths of the external representation. */ gcry_error_t gcry_mpi_aprint (enum gcry_mpi_format format, unsigned char **buffer, size_t *nwritten, const gcry_mpi_t a); /* Dump the value of A in a format suitable for debugging to Libgcrypt's logging stream. Note that one leading space but no trailing space or linefeed will be printed. It is okay to pass NULL for A. */ void gcry_mpi_dump (const gcry_mpi_t a); /* W = U + V. */ void gcry_mpi_add (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U + V. V is an unsigned integer. */ void gcry_mpi_add_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v); /* W = U + V mod M. */ void gcry_mpi_addm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U - V. */ void gcry_mpi_sub (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U - V. V is an unsigned integer. */ void gcry_mpi_sub_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v ); /* W = U - V mod M */ void gcry_mpi_subm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U * V. */ void gcry_mpi_mul (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v); /* W = U * V. V is an unsigned integer. */ void gcry_mpi_mul_ui (gcry_mpi_t w, gcry_mpi_t u, unsigned long v ); /* W = U * V mod M. */ void gcry_mpi_mulm (gcry_mpi_t w, gcry_mpi_t u, gcry_mpi_t v, gcry_mpi_t m); /* W = U * (2 ^ CNT). */ void gcry_mpi_mul_2exp (gcry_mpi_t w, gcry_mpi_t u, unsigned long cnt); /* Q = DIVIDEND / DIVISOR, R = DIVIDEND % DIVISOR, Q or R may be passed as NULL. ROUND should be negative or 0. */ void gcry_mpi_div (gcry_mpi_t q, gcry_mpi_t r, gcry_mpi_t dividend, gcry_mpi_t divisor, int round); /* R = DIVIDEND % DIVISOR */ void gcry_mpi_mod (gcry_mpi_t r, gcry_mpi_t dividend, gcry_mpi_t divisor); /* W = B ^ E mod M. */ void gcry_mpi_powm (gcry_mpi_t w, const gcry_mpi_t b, const gcry_mpi_t e, const gcry_mpi_t m); /* Set G to the greatest common divisor of A and B. Return true if the G is 1. */ int gcry_mpi_gcd (gcry_mpi_t g, gcry_mpi_t a, gcry_mpi_t b); /* Set X to the multiplicative inverse of A mod M. Return true if the value exists. */ int gcry_mpi_invm (gcry_mpi_t x, gcry_mpi_t a, gcry_mpi_t m); /* Create a new point object. NBITS is usually 0. */ gcry_mpi_point_t gcry_mpi_point_new (unsigned int nbits); /* Release the object POINT. POINT may be NULL. */ void gcry_mpi_point_release (gcry_mpi_point_t point); /* Return a copy of POINT. */ gcry_mpi_point_t gcry_mpi_point_copy (gcry_mpi_point_t point); /* Store the projective coordinates from POINT into X, Y, and Z. */ void gcry_mpi_point_get (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z, gcry_mpi_point_t point); /* Store the projective coordinates from POINT into X, Y, and Z and release POINT. */ void gcry_mpi_point_snatch_get (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z, gcry_mpi_point_t point); /* Store the projective coordinates X, Y, and Z into POINT. */ gcry_mpi_point_t gcry_mpi_point_set (gcry_mpi_point_t point, gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z); /* Store the projective coordinates X, Y, and Z into POINT and release X, Y, and Z. */ gcry_mpi_point_t gcry_mpi_point_snatch_set (gcry_mpi_point_t point, gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z); /* Allocate a new context for elliptic curve operations based on the parameters given by KEYPARAM or using CURVENAME. */ gpg_error_t gcry_mpi_ec_new (gcry_ctx_t *r_ctx, gcry_sexp_t keyparam, const char *curvename); /* Get a named MPI from an elliptic curve context. */ gcry_mpi_t gcry_mpi_ec_get_mpi (const char *name, gcry_ctx_t ctx, int copy); /* Get a named point from an elliptic curve context. */ gcry_mpi_point_t gcry_mpi_ec_get_point (const char *name, gcry_ctx_t ctx, int copy); /* Store a named MPI into an elliptic curve context. */ gpg_error_t gcry_mpi_ec_set_mpi (const char *name, gcry_mpi_t newvalue, gcry_ctx_t ctx); /* Store a named point into an elliptic curve context. */ gpg_error_t gcry_mpi_ec_set_point (const char *name, gcry_mpi_point_t newvalue, gcry_ctx_t ctx); /* Decode and store VALUE into RESULT. */ gpg_error_t gcry_mpi_ec_decode_point (gcry_mpi_point_t result, gcry_mpi_t value, gcry_ctx_t ctx); /* Store the affine coordinates of POINT into X and Y. */ int gcry_mpi_ec_get_affine (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_point_t point, gcry_ctx_t ctx); /* W = 2 * U. */ void gcry_mpi_ec_dup (gcry_mpi_point_t w, gcry_mpi_point_t u, gcry_ctx_t ctx); /* W = U + V. */ void gcry_mpi_ec_add (gcry_mpi_point_t w, gcry_mpi_point_t u, gcry_mpi_point_t v, gcry_ctx_t ctx); /* W = U - V. */ void gcry_mpi_ec_sub (gcry_mpi_point_t w, gcry_mpi_point_t u, gcry_mpi_point_t v, gcry_ctx_t ctx); /* W = N * U. */ void gcry_mpi_ec_mul (gcry_mpi_point_t w, gcry_mpi_t n, gcry_mpi_point_t u, gcry_ctx_t ctx); /* Return true if POINT is on the curve described by CTX. */ int gcry_mpi_ec_curve_point (gcry_mpi_point_t w, gcry_ctx_t ctx); /* Return the number of bits required to represent A. */ unsigned int gcry_mpi_get_nbits (gcry_mpi_t a); /* Return true when bit number N (counting from 0) is set in A. */ int gcry_mpi_test_bit (gcry_mpi_t a, unsigned int n); /* Set bit number N in A. */ void gcry_mpi_set_bit (gcry_mpi_t a, unsigned int n); /* Clear bit number N in A. */ void gcry_mpi_clear_bit (gcry_mpi_t a, unsigned int n); /* Set bit number N in A and clear all bits greater than N. */ void gcry_mpi_set_highbit (gcry_mpi_t a, unsigned int n); /* Clear bit number N in A and all bits greater than N. */ void gcry_mpi_clear_highbit (gcry_mpi_t a, unsigned int n); /* Shift the value of A by N bits to the right and store the result in X. */ void gcry_mpi_rshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n); /* Shift the value of A by N bits to the left and store the result in X. */ void gcry_mpi_lshift (gcry_mpi_t x, gcry_mpi_t a, unsigned int n); /* Store NBITS of the value P points to in A and mark A as an opaque value. On success A received the the ownership of the value P. WARNING: Never use an opaque MPI for anything thing else than gcry_mpi_release, gcry_mpi_get_opaque. */ gcry_mpi_t gcry_mpi_set_opaque (gcry_mpi_t a, void *p, unsigned int nbits); /* Store NBITS of the value P points to in A and mark A as an opaque value. The function takes a copy of the provided value P. WARNING: Never use an opaque MPI for anything thing else than gcry_mpi_release, gcry_mpi_get_opaque. */ gcry_mpi_t gcry_mpi_set_opaque_copy (gcry_mpi_t a, const void *p, unsigned int nbits); /* Return a pointer to an opaque value stored in A and return its size in NBITS. Note that the returned pointer is still owned by A and that the function should never be used for an non-opaque MPI. */ void *gcry_mpi_get_opaque (gcry_mpi_t a, unsigned int *nbits); /* Set the FLAG for the big integer A. Currently only the flag GCRYMPI_FLAG_SECURE is allowed to convert A into an big intger stored in "secure" memory. */ void gcry_mpi_set_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Clear FLAG for the big integer A. Note that this function is currently useless as no flags are allowed. */ void gcry_mpi_clear_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Return true if the FLAG is set for A. */ int gcry_mpi_get_flag (gcry_mpi_t a, enum gcry_mpi_flag flag); /* Private function - do not use. */ gcry_mpi_t _gcry_mpi_get_const (int no); /* Unless the GCRYPT_NO_MPI_MACROS is used, provide a couple of convenience macros for the big integer functions. */ #ifndef GCRYPT_NO_MPI_MACROS #define mpi_new(n) gcry_mpi_new( (n) ) #define mpi_secure_new( n ) gcry_mpi_snew( (n) ) #define mpi_release(a) \ do \ { \ gcry_mpi_release ((a)); \ (a) = NULL; \ } \ while (0) #define mpi_copy( a ) gcry_mpi_copy( (a) ) #define mpi_snatch( w, u) gcry_mpi_snatch( (w), (u) ) #define mpi_set( w, u) gcry_mpi_set( (w), (u) ) #define mpi_set_ui( w, u) gcry_mpi_set_ui( (w), (u) ) #define mpi_abs( w ) gcry_mpi_abs( (w) ) #define mpi_neg( w, u) gcry_mpi_neg( (w), (u) ) #define mpi_cmp( u, v ) gcry_mpi_cmp( (u), (v) ) #define mpi_cmp_ui( u, v ) gcry_mpi_cmp_ui( (u), (v) ) #define mpi_is_neg( a ) gcry_mpi_is_neg ((a)) #define mpi_add_ui(w,u,v) gcry_mpi_add_ui((w),(u),(v)) #define mpi_add(w,u,v) gcry_mpi_add ((w),(u),(v)) #define mpi_addm(w,u,v,m) gcry_mpi_addm ((w),(u),(v),(m)) #define mpi_sub_ui(w,u,v) gcry_mpi_sub_ui ((w),(u),(v)) #define mpi_sub(w,u,v) gcry_mpi_sub ((w),(u),(v)) #define mpi_subm(w,u,v,m) gcry_mpi_subm ((w),(u),(v),(m)) #define mpi_mul_ui(w,u,v) gcry_mpi_mul_ui ((w),(u),(v)) #define mpi_mul_2exp(w,u,v) gcry_mpi_mul_2exp ((w),(u),(v)) #define mpi_mul(w,u,v) gcry_mpi_mul ((w),(u),(v)) #define mpi_mulm(w,u,v,m) gcry_mpi_mulm ((w),(u),(v),(m)) #define mpi_powm(w,b,e,m) gcry_mpi_powm ( (w), (b), (e), (m) ) #define mpi_tdiv(q,r,a,m) gcry_mpi_div ( (q), (r), (a), (m), 0) #define mpi_fdiv(q,r,a,m) gcry_mpi_div ( (q), (r), (a), (m), -1) #define mpi_mod(r,a,m) gcry_mpi_mod ((r), (a), (m)) #define mpi_gcd(g,a,b) gcry_mpi_gcd ( (g), (a), (b) ) #define mpi_invm(g,a,b) gcry_mpi_invm ( (g), (a), (b) ) #define mpi_point_new(n) gcry_mpi_point_new((n)) #define mpi_point_release(p) \ do \ { \ gcry_mpi_point_release ((p)); \ (p) = NULL; \ } \ while (0) #define mpi_point_copy(p) gcry_mpi_point_copy((p)) #define mpi_point_get(x,y,z,p) gcry_mpi_point_get((x),(y),(z),(p)) #define mpi_point_snatch_get(x,y,z,p) gcry_mpi_point_snatch_get((x),(y),(z),(p)) #define mpi_point_set(p,x,y,z) gcry_mpi_point_set((p),(x),(y),(z)) #define mpi_point_snatch_set(p,x,y,z) gcry_mpi_point_snatch_set((p),(x),(y),(z)) #define mpi_get_nbits(a) gcry_mpi_get_nbits ((a)) #define mpi_test_bit(a,b) gcry_mpi_test_bit ((a),(b)) #define mpi_set_bit(a,b) gcry_mpi_set_bit ((a),(b)) #define mpi_set_highbit(a,b) gcry_mpi_set_highbit ((a),(b)) #define mpi_clear_bit(a,b) gcry_mpi_clear_bit ((a),(b)) #define mpi_clear_highbit(a,b) gcry_mpi_clear_highbit ((a),(b)) #define mpi_rshift(a,b,c) gcry_mpi_rshift ((a),(b),(c)) #define mpi_lshift(a,b,c) gcry_mpi_lshift ((a),(b),(c)) #define mpi_set_opaque(a,b,c) gcry_mpi_set_opaque( (a), (b), (c) ) #define mpi_get_opaque(a,b) gcry_mpi_get_opaque( (a), (b) ) #endif /* GCRYPT_NO_MPI_MACROS */ /************************************ * * * Symmetric Cipher Functions * * * ************************************/ /* The data object used to hold a handle to an encryption object. */ struct gcry_cipher_handle; typedef struct gcry_cipher_handle *gcry_cipher_hd_t; #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_cipher_handle *GCRY_CIPHER_HD _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_cipher_handle *GcryCipherHd _GCRY_GCC_ATTR_DEPRECATED; #endif /* All symmetric encryption algorithms are identified by their IDs. More IDs may be registered at runtime. */ enum gcry_cipher_algos { GCRY_CIPHER_NONE = 0, GCRY_CIPHER_IDEA = 1, GCRY_CIPHER_3DES = 2, GCRY_CIPHER_CAST5 = 3, GCRY_CIPHER_BLOWFISH = 4, GCRY_CIPHER_SAFER_SK128 = 5, GCRY_CIPHER_DES_SK = 6, GCRY_CIPHER_AES = 7, GCRY_CIPHER_AES192 = 8, GCRY_CIPHER_AES256 = 9, GCRY_CIPHER_TWOFISH = 10, /* Other cipher numbers are above 300 for OpenPGP reasons. */ GCRY_CIPHER_ARCFOUR = 301, /* Fully compatible with RSA's RC4 (tm). */ GCRY_CIPHER_DES = 302, /* Yes, this is single key 56 bit DES. */ GCRY_CIPHER_TWOFISH128 = 303, GCRY_CIPHER_SERPENT128 = 304, GCRY_CIPHER_SERPENT192 = 305, GCRY_CIPHER_SERPENT256 = 306, GCRY_CIPHER_RFC2268_40 = 307, /* Ron's Cipher 2 (40 bit). */ GCRY_CIPHER_RFC2268_128 = 308, /* Ron's Cipher 2 (128 bit). */ GCRY_CIPHER_SEED = 309, /* 128 bit cipher described in RFC4269. */ GCRY_CIPHER_CAMELLIA128 = 310, GCRY_CIPHER_CAMELLIA192 = 311, GCRY_CIPHER_CAMELLIA256 = 312, GCRY_CIPHER_SALSA20 = 313, GCRY_CIPHER_SALSA20R12 = 314, GCRY_CIPHER_GOST28147 = 315, GCRY_CIPHER_CHACHA20 = 316 }; /* The Rijndael algorithm is basically AES, so provide some macros. */ #define GCRY_CIPHER_AES128 GCRY_CIPHER_AES #define GCRY_CIPHER_RIJNDAEL GCRY_CIPHER_AES #define GCRY_CIPHER_RIJNDAEL128 GCRY_CIPHER_AES128 #define GCRY_CIPHER_RIJNDAEL192 GCRY_CIPHER_AES192 #define GCRY_CIPHER_RIJNDAEL256 GCRY_CIPHER_AES256 /* The supported encryption modes. Note that not all of them are supported for each algorithm. */ enum gcry_cipher_modes { GCRY_CIPHER_MODE_NONE = 0, /* Not yet specified. */ GCRY_CIPHER_MODE_ECB = 1, /* Electronic codebook. */ GCRY_CIPHER_MODE_CFB = 2, /* Cipher feedback. */ GCRY_CIPHER_MODE_CBC = 3, /* Cipher block chaining. */ GCRY_CIPHER_MODE_STREAM = 4, /* Used with stream ciphers. */ GCRY_CIPHER_MODE_OFB = 5, /* Outer feedback. */ GCRY_CIPHER_MODE_CTR = 6, /* Counter. */ GCRY_CIPHER_MODE_AESWRAP = 7, /* AES-WRAP algorithm. */ GCRY_CIPHER_MODE_CCM = 8, /* Counter with CBC-MAC. */ GCRY_CIPHER_MODE_GCM = 9, /* Galois Counter Mode. */ GCRY_CIPHER_MODE_POLY1305 = 10, /* Poly1305 based AEAD mode. */ GCRY_CIPHER_MODE_OCB = 11, /* OCB3 mode. */ GCRY_CIPHER_MODE_CFB8 = 12, /* Cipher feedback (8 bit mode). */ GCRY_CIPHER_MODE_XTS = 13 /* XTS mode. */ }; /* Flags used with the open function. */ enum gcry_cipher_flags { GCRY_CIPHER_SECURE = 1, /* Allocate in secure memory. */ GCRY_CIPHER_ENABLE_SYNC = 2, /* Enable CFB sync mode. */ GCRY_CIPHER_CBC_CTS = 4, /* Enable CBC cipher text stealing (CTS). */ GCRY_CIPHER_CBC_MAC = 8 /* Enable CBC message auth. code (MAC). */ }; /* GCM works only with blocks of 128 bits */ #define GCRY_GCM_BLOCK_LEN (128 / 8) /* CCM works only with blocks of 128 bits. */ #define GCRY_CCM_BLOCK_LEN (128 / 8) /* OCB works only with blocks of 128 bits. */ #define GCRY_OCB_BLOCK_LEN (128 / 8) /* XTS works only with blocks of 128 bits. */ #define GCRY_XTS_BLOCK_LEN (128 / 8) /* Create a handle for algorithm ALGO to be used in MODE. FLAGS may be given as an bitwise OR of the gcry_cipher_flags values. */ gcry_error_t gcry_cipher_open (gcry_cipher_hd_t *handle, int algo, int mode, unsigned int flags); /* Close the cipher handle H and release all resource. */ void gcry_cipher_close (gcry_cipher_hd_t h); /* Perform various operations on the cipher object H. */ gcry_error_t gcry_cipher_ctl (gcry_cipher_hd_t h, int cmd, void *buffer, size_t buflen); /* Retrieve various information about the cipher object H. */ gcry_error_t gcry_cipher_info (gcry_cipher_hd_t h, int what, void *buffer, size_t *nbytes); /* Retrieve various information about the cipher algorithm ALGO. */ gcry_error_t gcry_cipher_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the cipher algorithm whose ID is contained in ALGORITHM to a string representation of the algorithm name. For unknown algorithm IDs this function returns "?". */ const char *gcry_cipher_algo_name (int algorithm) _GCRY_GCC_ATTR_PURE; /* Map the algorithm name NAME to an cipher algorithm ID. Return 0 if the algorithm name is not known. */ int gcry_cipher_map_name (const char *name) _GCRY_GCC_ATTR_PURE; /* Given an ASN.1 object identifier in standard IETF dotted decimal format in STRING, return the encryption mode associated with that OID or 0 if not known or applicable. */ int gcry_cipher_mode_from_oid (const char *string) _GCRY_GCC_ATTR_PURE; /* Encrypt the plaintext of size INLEN in IN using the cipher handle H into the buffer OUT which has an allocated length of OUTSIZE. For most algorithms it is possible to pass NULL for in and 0 for INLEN and do a in-place decryption of the data provided in OUT. */ gcry_error_t gcry_cipher_encrypt (gcry_cipher_hd_t h, void *out, size_t outsize, const void *in, size_t inlen); /* The counterpart to gcry_cipher_encrypt. */ gcry_error_t gcry_cipher_decrypt (gcry_cipher_hd_t h, void *out, size_t outsize, const void *in, size_t inlen); /* Set KEY of length KEYLEN bytes for the cipher handle HD. */ gcry_error_t gcry_cipher_setkey (gcry_cipher_hd_t hd, const void *key, size_t keylen); /* Set initialization vector IV of length IVLEN for the cipher handle HD. */ gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t hd, const void *iv, size_t ivlen); /* Provide additional authentication data for AEAD modes/ciphers. */ gcry_error_t gcry_cipher_authenticate (gcry_cipher_hd_t hd, const void *abuf, size_t abuflen); /* Get authentication tag for AEAD modes/ciphers. */ gcry_error_t gcry_cipher_gettag (gcry_cipher_hd_t hd, void *outtag, size_t taglen); /* Check authentication tag for AEAD modes/ciphers. */ gcry_error_t gcry_cipher_checktag (gcry_cipher_hd_t hd, const void *intag, size_t taglen); /* Reset the handle to the state after open. */ #define gcry_cipher_reset(h) gcry_cipher_ctl ((h), GCRYCTL_RESET, NULL, 0) /* Perform the OpenPGP sync operation if this is enabled for the cipher handle H. */ #define gcry_cipher_sync(h) gcry_cipher_ctl( (h), GCRYCTL_CFB_SYNC, NULL, 0) /* Enable or disable CTS in future calls to gcry_encrypt(). CBC mode only. */ #define gcry_cipher_cts(h,on) gcry_cipher_ctl( (h), GCRYCTL_SET_CBC_CTS, \ NULL, on ) #define gcry_cipher_set_sbox(h,oid) gcry_cipher_ctl( (h), GCRYCTL_SET_SBOX, \ (void *) oid, 0); /* Indicate to the encrypt and decrypt functions that the next call provides the final data. Only used with some modes. */ #define gcry_cipher_final(a) \ gcry_cipher_ctl ((a), GCRYCTL_FINALIZE, NULL, 0) /* Set counter for CTR mode. (CTR,CTRLEN) must denote a buffer of block size length, or (NULL,0) to set the CTR to the all-zero block. */ gpg_error_t gcry_cipher_setctr (gcry_cipher_hd_t hd, const void *ctr, size_t ctrlen); /* Retrieve the key length in bytes used with algorithm A. */ size_t gcry_cipher_get_algo_keylen (int algo); /* Retrieve the block length in bytes used with algorithm A. */ size_t gcry_cipher_get_algo_blklen (int algo); /* Return 0 if the algorithm A is available for use. */ #define gcry_cipher_test_algo(a) \ gcry_cipher_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /************************************ * * * Asymmetric Cipher Functions * * * ************************************/ /* The algorithms and their IDs we support. */ enum gcry_pk_algos { GCRY_PK_RSA = 1, /* RSA */ GCRY_PK_RSA_E = 2, /* (deprecated: use 1). */ GCRY_PK_RSA_S = 3, /* (deprecated: use 1). */ GCRY_PK_ELG_E = 16, /* (deprecated: use 20). */ GCRY_PK_DSA = 17, /* Digital Signature Algorithm. */ GCRY_PK_ECC = 18, /* Generic ECC. */ GCRY_PK_ELG = 20, /* Elgamal */ GCRY_PK_ECDSA = 301, /* (only for external use). */ GCRY_PK_ECDH = 302, /* (only for external use). */ GCRY_PK_EDDSA = 303 /* (only for external use). */ }; /* Flags describing usage capabilities of a PK algorithm. */ #define GCRY_PK_USAGE_SIGN 1 /* Good for signatures. */ #define GCRY_PK_USAGE_ENCR 2 /* Good for encryption. */ #define GCRY_PK_USAGE_CERT 4 /* Good to certify other keys. */ #define GCRY_PK_USAGE_AUTH 8 /* Good for authentication. */ #define GCRY_PK_USAGE_UNKN 128 /* Unknown usage flag. */ /* Modes used with gcry_pubkey_get_sexp. */ #define GCRY_PK_GET_PUBKEY 1 #define GCRY_PK_GET_SECKEY 2 /* Encrypt the DATA using the public key PKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_encrypt (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t pkey); /* Decrypt the DATA using the private key SKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_decrypt (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t skey); /* Sign the DATA using the private key SKEY and store the result as a newly created S-expression at RESULT. */ gcry_error_t gcry_pk_sign (gcry_sexp_t *result, gcry_sexp_t data, gcry_sexp_t skey); /* Check the signature SIGVAL on DATA using the public key PKEY. */ gcry_error_t gcry_pk_verify (gcry_sexp_t sigval, gcry_sexp_t data, gcry_sexp_t pkey); /* Check that private KEY is sane. */ gcry_error_t gcry_pk_testkey (gcry_sexp_t key); /* Generate a new key pair according to the parameters given in S_PARMS. The new key pair is returned in as an S-expression in R_KEY. */ gcry_error_t gcry_pk_genkey (gcry_sexp_t *r_key, gcry_sexp_t s_parms); /* Catch all function for miscellaneous operations. */ gcry_error_t gcry_pk_ctl (int cmd, void *buffer, size_t buflen); /* Retrieve information about the public key algorithm ALGO. */ gcry_error_t gcry_pk_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the public key algorithm whose ID is contained in ALGORITHM to a string representation of the algorithm name. For unknown algorithm IDs this functions returns "?". */ const char *gcry_pk_algo_name (int algorithm) _GCRY_GCC_ATTR_PURE; /* Map the algorithm NAME to a public key algorithm Id. Return 0 if the algorithm name is not known. */ int gcry_pk_map_name (const char* name) _GCRY_GCC_ATTR_PURE; /* Return what is commonly referred as the key length for the given public or private KEY. */ unsigned int gcry_pk_get_nbits (gcry_sexp_t key) _GCRY_GCC_ATTR_PURE; /* Return the so called KEYGRIP which is the SHA-1 hash of the public key parameters expressed in a way depending on the algorithm. */ unsigned char *gcry_pk_get_keygrip (gcry_sexp_t key, unsigned char *array); /* Return the name of the curve matching KEY. */ const char *gcry_pk_get_curve (gcry_sexp_t key, int iterator, unsigned int *r_nbits); /* Return an S-expression with the parameters of the named ECC curve NAME. ALGO must be set to an ECC algorithm. */ gcry_sexp_t gcry_pk_get_param (int algo, const char *name); /* Return 0 if the public key algorithm A is available for use. */ #define gcry_pk_test_algo(a) \ gcry_pk_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /* Return an S-expression representing the context CTX. */ gcry_error_t gcry_pubkey_get_sexp (gcry_sexp_t *r_sexp, int mode, gcry_ctx_t ctx); /************************************ * * * Cryptograhic Hash Functions * * * ************************************/ /* Algorithm IDs for the hash functions we know about. Not all of them are implemented. */ enum gcry_md_algos { GCRY_MD_NONE = 0, GCRY_MD_MD5 = 1, GCRY_MD_SHA1 = 2, GCRY_MD_RMD160 = 3, GCRY_MD_MD2 = 5, GCRY_MD_TIGER = 6, /* TIGER/192 as used by gpg <= 1.3.2. */ GCRY_MD_HAVAL = 7, /* HAVAL, 5 pass, 160 bit. */ GCRY_MD_SHA256 = 8, GCRY_MD_SHA384 = 9, GCRY_MD_SHA512 = 10, GCRY_MD_SHA224 = 11, GCRY_MD_MD4 = 301, GCRY_MD_CRC32 = 302, GCRY_MD_CRC32_RFC1510 = 303, GCRY_MD_CRC24_RFC2440 = 304, GCRY_MD_WHIRLPOOL = 305, GCRY_MD_TIGER1 = 306, /* TIGER fixed. */ GCRY_MD_TIGER2 = 307, /* TIGER2 variant. */ GCRY_MD_GOSTR3411_94 = 308, /* GOST R 34.11-94. */ GCRY_MD_STRIBOG256 = 309, /* GOST R 34.11-2012, 256 bit. */ GCRY_MD_STRIBOG512 = 310, /* GOST R 34.11-2012, 512 bit. */ GCRY_MD_GOSTR3411_CP = 311, /* GOST R 34.11-94 with CryptoPro-A S-Box. */ GCRY_MD_SHA3_224 = 312, GCRY_MD_SHA3_256 = 313, GCRY_MD_SHA3_384 = 314, GCRY_MD_SHA3_512 = 315, GCRY_MD_SHAKE128 = 316, GCRY_MD_SHAKE256 = 317, GCRY_MD_BLAKE2B_512 = 318, GCRY_MD_BLAKE2B_384 = 319, GCRY_MD_BLAKE2B_256 = 320, GCRY_MD_BLAKE2B_160 = 321, GCRY_MD_BLAKE2S_256 = 322, GCRY_MD_BLAKE2S_224 = 323, GCRY_MD_BLAKE2S_160 = 324, GCRY_MD_BLAKE2S_128 = 325 }; /* Flags used with the open function. */ enum gcry_md_flags { GCRY_MD_FLAG_SECURE = 1, /* Allocate all buffers in "secure" memory. */ GCRY_MD_FLAG_HMAC = 2, /* Make an HMAC out of this algorithm. */ GCRY_MD_FLAG_BUGEMU1 = 0x0100 }; /* (Forward declaration.) */ struct gcry_md_context; /* This object is used to hold a handle to a message digest object. This structure is private - only to be used by the public gcry_md_* macros. */ typedef struct gcry_md_handle { /* Actual context. */ struct gcry_md_context *ctx; /* Buffer management. */ int bufpos; int bufsize; unsigned char buf[1]; } *gcry_md_hd_t; /* Compatibility types, do not use them. */ #ifndef GCRYPT_NO_DEPRECATED typedef struct gcry_md_handle *GCRY_MD_HD _GCRY_GCC_ATTR_DEPRECATED; typedef struct gcry_md_handle *GcryMDHd _GCRY_GCC_ATTR_DEPRECATED; #endif /* Create a message digest object for algorithm ALGO. FLAGS may be given as an bitwise OR of the gcry_md_flags values. ALGO may be given as 0 if the algorithms to be used are later set using gcry_md_enable. */ gcry_error_t gcry_md_open (gcry_md_hd_t *h, int algo, unsigned int flags); /* Release the message digest object HD. */ void gcry_md_close (gcry_md_hd_t hd); /* Add the message digest algorithm ALGO to the digest object HD. */ gcry_error_t gcry_md_enable (gcry_md_hd_t hd, int algo); /* Create a new digest object as an exact copy of the object HD. */ gcry_error_t gcry_md_copy (gcry_md_hd_t *bhd, gcry_md_hd_t ahd); /* Reset the digest object HD to its initial state. */ void gcry_md_reset (gcry_md_hd_t hd); /* Perform various operations on the digest object HD. */ gcry_error_t gcry_md_ctl (gcry_md_hd_t hd, int cmd, void *buffer, size_t buflen); /* Pass LENGTH bytes of data in BUFFER to the digest object HD so that it can update the digest values. This is the actual hash function. */ void gcry_md_write (gcry_md_hd_t hd, const void *buffer, size_t length); /* Read out the final digest from HD return the digest value for algorithm ALGO. */ unsigned char *gcry_md_read (gcry_md_hd_t hd, int algo); /* Read more output from algorithm ALGO to BUFFER of size LENGTH from * digest object HD. Algorithm needs to be 'expendable-output function'. */ gpg_error_t gcry_md_extract (gcry_md_hd_t hd, int algo, void *buffer, size_t length); /* Convenience function to calculate the hash from the data in BUFFER of size LENGTH using the algorithm ALGO avoiding the creation of a hash object. The hash is returned in the caller provided buffer DIGEST which must be large enough to hold the digest of the given algorithm. */ void gcry_md_hash_buffer (int algo, void *digest, const void *buffer, size_t length); /* Convenience function to hash multiple buffers. */ gpg_error_t gcry_md_hash_buffers (int algo, unsigned int flags, void *digest, const gcry_buffer_t *iov, int iovcnt); /* Retrieve the algorithm used with HD. This does not work reliable if more than one algorithm is enabled in HD. */ int gcry_md_get_algo (gcry_md_hd_t hd); /* Retrieve the length in bytes of the digest yielded by algorithm ALGO. */ unsigned int gcry_md_get_algo_dlen (int algo); /* Return true if the the algorithm ALGO is enabled in the digest object A. */ int gcry_md_is_enabled (gcry_md_hd_t a, int algo); /* Return true if the digest object A is allocated in "secure" memory. */ int gcry_md_is_secure (gcry_md_hd_t a); /* Deprecated: Use gcry_md_is_enabled or gcry_md_is_secure. */ gcry_error_t gcry_md_info (gcry_md_hd_t h, int what, void *buffer, size_t *nbytes) _GCRY_ATTR_INTERNAL; /* Retrieve various information about the algorithm ALGO. */ gcry_error_t gcry_md_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Map the digest algorithm id ALGO to a string representation of the algorithm name. For unknown algorithms this function returns "?". */ const char *gcry_md_algo_name (int algo) _GCRY_GCC_ATTR_PURE; /* Map the algorithm NAME to a digest algorithm Id. Return 0 if the algorithm name is not known. */ int gcry_md_map_name (const char* name) _GCRY_GCC_ATTR_PURE; /* For use with the HMAC feature, the set MAC key to the KEY of KEYLEN bytes. */ gcry_error_t gcry_md_setkey (gcry_md_hd_t hd, const void *key, size_t keylen); /* Start or stop debugging for digest handle HD; i.e. create a file named dbgmd-. while hashing. If SUFFIX is NULL, debugging stops and the file will be closed. */ void gcry_md_debug (gcry_md_hd_t hd, const char *suffix); /* Update the hash(s) of H with the character C. This is a buffered version of the gcry_md_write function. */ #define gcry_md_putc(h,c) \ do { \ gcry_md_hd_t h__ = (h); \ if( (h__)->bufpos == (h__)->bufsize ) \ gcry_md_write( (h__), NULL, 0 ); \ (h__)->buf[(h__)->bufpos++] = (c) & 0xff; \ } while(0) /* Finalize the digest calculation. This is not really needed because gcry_md_read() does this implicitly. */ #define gcry_md_final(a) \ gcry_md_ctl ((a), GCRYCTL_FINALIZE, NULL, 0) /* Return 0 if the algorithm A is available for use. */ #define gcry_md_test_algo(a) \ gcry_md_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /* Return an DER encoded ASN.1 OID for the algorithm A in buffer B. N must point to size_t variable with the available size of buffer B. After return it will receive the actual size of the returned OID. */ #define gcry_md_get_asnoid(a,b,n) \ gcry_md_algo_info((a), GCRYCTL_GET_ASNOID, (b), (n)) /********************************************** * * * Message Authentication Code Functions * * * **********************************************/ /* The data object used to hold a handle to an encryption object. */ struct gcry_mac_handle; typedef struct gcry_mac_handle *gcry_mac_hd_t; /* Algorithm IDs for the hash functions we know about. Not all of them are implemented. */ enum gcry_mac_algos { GCRY_MAC_NONE = 0, GCRY_MAC_HMAC_SHA256 = 101, GCRY_MAC_HMAC_SHA224 = 102, GCRY_MAC_HMAC_SHA512 = 103, GCRY_MAC_HMAC_SHA384 = 104, GCRY_MAC_HMAC_SHA1 = 105, GCRY_MAC_HMAC_MD5 = 106, GCRY_MAC_HMAC_MD4 = 107, GCRY_MAC_HMAC_RMD160 = 108, GCRY_MAC_HMAC_TIGER1 = 109, /* The fixed TIGER variant */ GCRY_MAC_HMAC_WHIRLPOOL = 110, GCRY_MAC_HMAC_GOSTR3411_94 = 111, GCRY_MAC_HMAC_STRIBOG256 = 112, GCRY_MAC_HMAC_STRIBOG512 = 113, GCRY_MAC_HMAC_MD2 = 114, GCRY_MAC_HMAC_SHA3_224 = 115, GCRY_MAC_HMAC_SHA3_256 = 116, GCRY_MAC_HMAC_SHA3_384 = 117, GCRY_MAC_HMAC_SHA3_512 = 118, GCRY_MAC_CMAC_AES = 201, GCRY_MAC_CMAC_3DES = 202, GCRY_MAC_CMAC_CAMELLIA = 203, GCRY_MAC_CMAC_CAST5 = 204, GCRY_MAC_CMAC_BLOWFISH = 205, GCRY_MAC_CMAC_TWOFISH = 206, GCRY_MAC_CMAC_SERPENT = 207, GCRY_MAC_CMAC_SEED = 208, GCRY_MAC_CMAC_RFC2268 = 209, GCRY_MAC_CMAC_IDEA = 210, GCRY_MAC_CMAC_GOST28147 = 211, GCRY_MAC_GMAC_AES = 401, GCRY_MAC_GMAC_CAMELLIA = 402, GCRY_MAC_GMAC_TWOFISH = 403, GCRY_MAC_GMAC_SERPENT = 404, GCRY_MAC_GMAC_SEED = 405, GCRY_MAC_POLY1305 = 501, GCRY_MAC_POLY1305_AES = 502, GCRY_MAC_POLY1305_CAMELLIA = 503, GCRY_MAC_POLY1305_TWOFISH = 504, GCRY_MAC_POLY1305_SERPENT = 505, GCRY_MAC_POLY1305_SEED = 506 }; /* Flags used with the open function. */ enum gcry_mac_flags { GCRY_MAC_FLAG_SECURE = 1 /* Allocate all buffers in "secure" memory. */ }; /* Create a MAC handle for algorithm ALGO. FLAGS may be given as an bitwise OR of the gcry_mac_flags values. CTX maybe NULL or gcry_ctx_t object to be associated with HANDLE. */ gcry_error_t gcry_mac_open (gcry_mac_hd_t *handle, int algo, unsigned int flags, gcry_ctx_t ctx); /* Close the MAC handle H and release all resource. */ void gcry_mac_close (gcry_mac_hd_t h); /* Perform various operations on the MAC object H. */ gcry_error_t gcry_mac_ctl (gcry_mac_hd_t h, int cmd, void *buffer, size_t buflen); /* Retrieve various information about the MAC algorithm ALGO. */ gcry_error_t gcry_mac_algo_info (int algo, int what, void *buffer, size_t *nbytes); /* Set KEY of length KEYLEN bytes for the MAC handle HD. */ gcry_error_t gcry_mac_setkey (gcry_mac_hd_t hd, const void *key, size_t keylen); /* Set initialization vector IV of length IVLEN for the MAC handle HD. */ gcry_error_t gcry_mac_setiv (gcry_mac_hd_t hd, const void *iv, size_t ivlen); /* Pass LENGTH bytes of data in BUFFER to the MAC object HD so that it can update the MAC values. */ gcry_error_t gcry_mac_write (gcry_mac_hd_t hd, const void *buffer, size_t length); /* Read out the final authentication code from the MAC object HD to BUFFER. */ gcry_error_t gcry_mac_read (gcry_mac_hd_t hd, void *buffer, size_t *buflen); /* Verify the final authentication code from the MAC object HD with BUFFER. */ gcry_error_t gcry_mac_verify (gcry_mac_hd_t hd, const void *buffer, size_t buflen); /* Retrieve the algorithm used with MAC. */ int gcry_mac_get_algo (gcry_mac_hd_t hd); /* Retrieve the length in bytes of the MAC yielded by algorithm ALGO. */ unsigned int gcry_mac_get_algo_maclen (int algo); /* Retrieve the default key length in bytes used with algorithm A. */ unsigned int gcry_mac_get_algo_keylen (int algo); /* Map the MAC algorithm whose ID is contained in ALGORITHM to a string representation of the algorithm name. For unknown algorithm IDs this function returns "?". */ const char *gcry_mac_algo_name (int algorithm) _GCRY_GCC_ATTR_PURE; /* Map the algorithm name NAME to an MAC algorithm ID. Return 0 if the algorithm name is not known. */ int gcry_mac_map_name (const char *name) _GCRY_GCC_ATTR_PURE; /* Reset the handle to the state after open/setkey. */ #define gcry_mac_reset(h) gcry_mac_ctl ((h), GCRYCTL_RESET, NULL, 0) /* Return 0 if the algorithm A is available for use. */ #define gcry_mac_test_algo(a) \ gcry_mac_algo_info( (a), GCRYCTL_TEST_ALGO, NULL, NULL ) /****************************** * * * Key Derivation Functions * * * ******************************/ /* Algorithm IDs for the KDFs. */ enum gcry_kdf_algos { GCRY_KDF_NONE = 0, GCRY_KDF_SIMPLE_S2K = 16, GCRY_KDF_SALTED_S2K = 17, GCRY_KDF_ITERSALTED_S2K = 19, GCRY_KDF_PBKDF1 = 33, GCRY_KDF_PBKDF2 = 34, GCRY_KDF_SCRYPT = 48 }; /* Derive a key from a passphrase. */ gpg_error_t gcry_kdf_derive (const void *passphrase, size_t passphraselen, int algo, int subalgo, const void *salt, size_t saltlen, unsigned long iterations, size_t keysize, void *keybuffer); /************************************ * * * Random Generating Functions * * * ************************************/ /* The type of the random number generator. */ enum gcry_rng_types { GCRY_RNG_TYPE_STANDARD = 1, /* The default CSPRNG generator. */ GCRY_RNG_TYPE_FIPS = 2, /* The FIPS X9.31 AES generator. */ GCRY_RNG_TYPE_SYSTEM = 3 /* The system's native generator. */ }; /* The possible values for the random quality. The rule of thumb is to use STRONG for session keys and VERY_STRONG for key material. WEAK is usually an alias for STRONG and should not be used anymore (except with gcry_mpi_randomize); use gcry_create_nonce instead. */ typedef enum gcry_random_level { GCRY_WEAK_RANDOM = 0, GCRY_STRONG_RANDOM = 1, GCRY_VERY_STRONG_RANDOM = 2 } gcry_random_level_t; /* Fill BUFFER with LENGTH bytes of random, using random numbers of quality LEVEL. */ void gcry_randomize (void *buffer, size_t length, enum gcry_random_level level); /* Add the external random from BUFFER with LENGTH bytes into the pool. QUALITY should either be -1 for unknown or in the range of 0 to 100 */ gcry_error_t gcry_random_add_bytes (const void *buffer, size_t length, int quality); /* If random numbers are used in an application, this macro should be called from time to time so that new stuff gets added to the internal pool of the RNG. */ #define gcry_fast_random_poll() gcry_control (GCRYCTL_FAST_POLL, NULL) /* Return NBYTES of allocated random using a random numbers of quality LEVEL. */ void *gcry_random_bytes (size_t nbytes, enum gcry_random_level level) _GCRY_GCC_ATTR_MALLOC; /* Return NBYTES of allocated random using a random numbers of quality LEVEL. The random numbers are created returned in "secure" memory. */ void *gcry_random_bytes_secure (size_t nbytes, enum gcry_random_level level) _GCRY_GCC_ATTR_MALLOC; /* Set the big integer W to a random value of NBITS using a random generator with quality LEVEL. Note that by using a level of GCRY_WEAK_RANDOM gcry_create_nonce is used internally. */ void gcry_mpi_randomize (gcry_mpi_t w, unsigned int nbits, enum gcry_random_level level); /* Create an unpredicable nonce of LENGTH bytes in BUFFER. */ void gcry_create_nonce (void *buffer, size_t length); /*******************************/ /* */ /* Prime Number Functions */ /* */ /*******************************/ /* Mode values passed to a gcry_prime_check_func_t. */ #define GCRY_PRIME_CHECK_AT_FINISH 0 #define GCRY_PRIME_CHECK_AT_GOT_PRIME 1 #define GCRY_PRIME_CHECK_AT_MAYBE_PRIME 2 /* The function should return 1 if the operation shall continue, 0 to reject the prime candidate. */ typedef int (*gcry_prime_check_func_t) (void *arg, int mode, gcry_mpi_t candidate); /* Flags for gcry_prime_generate(): */ /* Allocate prime numbers and factors in secure memory. */ #define GCRY_PRIME_FLAG_SECRET (1 << 0) /* Make sure that at least one prime factor is of size `FACTOR_BITS'. */ #define GCRY_PRIME_FLAG_SPECIAL_FACTOR (1 << 1) /* Generate a new prime number of PRIME_BITS bits and store it in PRIME. If FACTOR_BITS is non-zero, one of the prime factors of (prime - 1) / 2 must be FACTOR_BITS bits long. If FACTORS is non-zero, allocate a new, NULL-terminated array holding the prime factors and store it in FACTORS. FLAGS might be used to influence the prime number generation process. */ gcry_error_t gcry_prime_generate (gcry_mpi_t *prime, unsigned int prime_bits, unsigned int factor_bits, gcry_mpi_t **factors, gcry_prime_check_func_t cb_func, void *cb_arg, gcry_random_level_t random_level, unsigned int flags); /* Find a generator for PRIME where the factorization of (prime-1) is in the NULL terminated array FACTORS. Return the generator as a newly allocated MPI in R_G. If START_G is not NULL, use this as the start for the search. */ gcry_error_t gcry_prime_group_generator (gcry_mpi_t *r_g, gcry_mpi_t prime, gcry_mpi_t *factors, gcry_mpi_t start_g); /* Convenience function to release the FACTORS array. */ void gcry_prime_release_factors (gcry_mpi_t *factors); /* Check whether the number X is prime. */ gcry_error_t gcry_prime_check (gcry_mpi_t x, unsigned int flags); /************************************ * * * Miscellaneous Stuff * * * ************************************/ /* Release the context object CTX. */ void gcry_ctx_release (gcry_ctx_t ctx); /* Log data using Libgcrypt's own log interface. */ void gcry_log_debug (const char *fmt, ...) _GCRY_GCC_ATTR_PRINTF(1,2); void gcry_log_debughex (const char *text, const void *buffer, size_t length); void gcry_log_debugmpi (const char *text, gcry_mpi_t mpi); void gcry_log_debugpnt (const char *text, gcry_mpi_point_t point, gcry_ctx_t ctx); void gcry_log_debugsxp (const char *text, gcry_sexp_t sexp); char *gcry_get_config (int mode, const char *what); /* Log levels used by the internal logging facility. */ enum gcry_log_levels { GCRY_LOG_CONT = 0, /* (Continue the last log line.) */ GCRY_LOG_INFO = 10, GCRY_LOG_WARN = 20, GCRY_LOG_ERROR = 30, GCRY_LOG_FATAL = 40, GCRY_LOG_BUG = 50, GCRY_LOG_DEBUG = 100 }; /* Type for progress handlers. */ typedef void (*gcry_handler_progress_t) (void *, const char *, int, int, int); /* Type for memory allocation handlers. */ typedef void *(*gcry_handler_alloc_t) (size_t n); /* Type for secure memory check handlers. */ typedef int (*gcry_handler_secure_check_t) (const void *); /* Type for memory reallocation handlers. */ typedef void *(*gcry_handler_realloc_t) (void *p, size_t n); /* Type for memory free handlers. */ typedef void (*gcry_handler_free_t) (void *); /* Type for out-of-memory handlers. */ typedef int (*gcry_handler_no_mem_t) (void *, size_t, unsigned int); /* Type for fatal error handlers. */ typedef void (*gcry_handler_error_t) (void *, int, const char *); /* Type for logging handlers. */ typedef void (*gcry_handler_log_t) (void *, int, const char *, va_list); /* Certain operations can provide progress information. This function is used to register a handler for retrieving these information. */ void gcry_set_progress_handler (gcry_handler_progress_t cb, void *cb_data); /* Register a custom memory allocation functions. */ void gcry_set_allocation_handler ( gcry_handler_alloc_t func_alloc, gcry_handler_alloc_t func_alloc_secure, gcry_handler_secure_check_t func_secure_check, gcry_handler_realloc_t func_realloc, gcry_handler_free_t func_free); /* Register a function used instead of the internal out of memory handler. */ void gcry_set_outofcore_handler (gcry_handler_no_mem_t h, void *opaque); /* Register a function used instead of the internal fatal error handler. */ void gcry_set_fatalerror_handler (gcry_handler_error_t fnc, void *opaque); /* Register a function used instead of the internal logging facility. */ void gcry_set_log_handler (gcry_handler_log_t f, void *opaque); /* Reserved for future use. */ void gcry_set_gettext_handler (const char *(*f)(const char*)); /* Libgcrypt uses its own memory allocation. It is important to use gcry_free () to release memory allocated by libgcrypt. */ void *gcry_malloc (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_calloc (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_malloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_calloc_secure (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_realloc (void *a, size_t n); char *gcry_strdup (const char *string) _GCRY_GCC_ATTR_MALLOC; void *gcry_xmalloc (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_xcalloc (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_xmalloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC; void *gcry_xcalloc_secure (size_t n, size_t m) _GCRY_GCC_ATTR_MALLOC; void *gcry_xrealloc (void *a, size_t n); char *gcry_xstrdup (const char * a) _GCRY_GCC_ATTR_MALLOC; void gcry_free (void *a); /* Return true if A is allocated in "secure" memory. */ int gcry_is_secure (const void *a) _GCRY_GCC_ATTR_PURE; /* Return true if Libgcrypt is in FIPS mode. */ #define gcry_fips_mode_active() !!gcry_control (GCRYCTL_FIPS_MODE_P, 0) #if 0 /* (Keep Emacsens' auto-indent happy.) */ { #endif #ifdef __cplusplus } #endif #endif /* _GCRYPT_H */ /* Local Variables: buffer-read-only: t End: */ PKZ&0 ttyent.hnu[/* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ttyent.h 8.1 (Berkeley) 6/2/93 */ #ifndef _TTYENT_H #define _TTYENT_H 1 #include #define _PATH_TTYS "/etc/ttys" #define _TTYS_OFF "off" #define _TTYS_ON "on" #define _TTYS_SECURE "secure" #define _TTYS_WINDOW "window" struct ttyent { char *ty_name; /* terminal device name */ char *ty_getty; /* command to execute, usually getty */ char *ty_type; /* terminal type for termcap */ #define TTY_ON 0x01 /* enable logins (start ty_getty program) */ #define TTY_SECURE 0x02 /* allow uid of 0 to login */ int ty_status; /* status flags */ char *ty_window; /* command to start up window manager */ char *ty_comment; /* comment field */ }; __BEGIN_DECLS extern struct ttyent *getttyent (void) __THROW; extern struct ttyent *getttynam (const char *__tty) __THROW; extern int setttyent (void) __THROW; extern int endttyent (void) __THROW; __END_DECLS #endif /* ttyent.h */ PKZ ''netinet/ip_icmp.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __NETINET_IP_ICMP_H #define __NETINET_IP_ICMP_H 1 #include #include __BEGIN_DECLS struct icmphdr { uint8_t type; /* message type */ uint8_t code; /* type sub-code */ uint16_t checksum; union { struct { uint16_t id; uint16_t sequence; } echo; /* echo datagram */ uint32_t gateway; /* gateway address */ struct { uint16_t __glibc_reserved; uint16_t mtu; } frag; /* path mtu discovery */ } un; }; #define ICMP_ECHOREPLY 0 /* Echo Reply */ #define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ #define ICMP_SOURCE_QUENCH 4 /* Source Quench */ #define ICMP_REDIRECT 5 /* Redirect (change route) */ #define ICMP_ECHO 8 /* Echo Request */ #define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */ #define ICMP_PARAMETERPROB 12 /* Parameter Problem */ #define ICMP_TIMESTAMP 13 /* Timestamp Request */ #define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */ #define ICMP_INFO_REQUEST 15 /* Information Request */ #define ICMP_INFO_REPLY 16 /* Information Reply */ #define ICMP_ADDRESS 17 /* Address Mask Request */ #define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ #define NR_ICMP_TYPES 18 /* Codes for UNREACH. */ #define ICMP_NET_UNREACH 0 /* Network Unreachable */ #define ICMP_HOST_UNREACH 1 /* Host Unreachable */ #define ICMP_PROT_UNREACH 2 /* Protocol Unreachable */ #define ICMP_PORT_UNREACH 3 /* Port Unreachable */ #define ICMP_FRAG_NEEDED 4 /* Fragmentation Needed/DF set */ #define ICMP_SR_FAILED 5 /* Source Route failed */ #define ICMP_NET_UNKNOWN 6 #define ICMP_HOST_UNKNOWN 7 #define ICMP_HOST_ISOLATED 8 #define ICMP_NET_ANO 9 #define ICMP_HOST_ANO 10 #define ICMP_NET_UNR_TOS 11 #define ICMP_HOST_UNR_TOS 12 #define ICMP_PKT_FILTERED 13 /* Packet filtered */ #define ICMP_PREC_VIOLATION 14 /* Precedence violation */ #define ICMP_PREC_CUTOFF 15 /* Precedence cut off */ #define NR_ICMP_UNREACH 15 /* instead of hardcoding immediate value */ /* Codes for REDIRECT. */ #define ICMP_REDIR_NET 0 /* Redirect Net */ #define ICMP_REDIR_HOST 1 /* Redirect Host */ #define ICMP_REDIR_NETTOS 2 /* Redirect Net for TOS */ #define ICMP_REDIR_HOSTTOS 3 /* Redirect Host for TOS */ /* Codes for TIME_EXCEEDED. */ #define ICMP_EXC_TTL 0 /* TTL count exceeded */ #define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ #ifdef __USE_MISC /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93 */ #include #include /* * Internal of an ICMP Router Advertisement */ struct icmp_ra_addr { uint32_t ira_addr; uint32_t ira_preference; }; struct icmp { uint8_t icmp_type; /* type of message, see below */ uint8_t icmp_code; /* type sub code */ uint16_t icmp_cksum; /* ones complement checksum of struct */ union { unsigned char ih_pptr; /* ICMP_PARAMPROB */ struct in_addr ih_gwaddr; /* gateway address */ struct ih_idseq /* echo datagram */ { uint16_t icd_id; uint16_t icd_seq; } ih_idseq; uint32_t ih_void; /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ struct ih_pmtu { uint16_t ipm_void; uint16_t ipm_nextmtu; } ih_pmtu; struct ih_rtradv { uint8_t irt_num_addrs; uint8_t irt_wpa; uint16_t irt_lifetime; } ih_rtradv; } icmp_hun; #define icmp_pptr icmp_hun.ih_pptr #define icmp_gwaddr icmp_hun.ih_gwaddr #define icmp_id icmp_hun.ih_idseq.icd_id #define icmp_seq icmp_hun.ih_idseq.icd_seq #define icmp_void icmp_hun.ih_void #define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void #define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu #define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs #define icmp_wpa icmp_hun.ih_rtradv.irt_wpa #define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime union { struct { uint32_t its_otime; uint32_t its_rtime; uint32_t its_ttime; } id_ts; struct { struct ip idi_ip; /* options and then 64 bits of data */ } id_ip; struct icmp_ra_addr id_radv; uint32_t id_mask; uint8_t id_data[1]; } icmp_dun; #define icmp_otime icmp_dun.id_ts.its_otime #define icmp_rtime icmp_dun.id_ts.its_rtime #define icmp_ttime icmp_dun.id_ts.its_ttime #define icmp_ip icmp_dun.id_ip.idi_ip #define icmp_radv icmp_dun.id_radv #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data }; /* * Lower bounds on packet lengths for various types. * For the error advice packets must first insure that the * packet is large enough to contain the returned ip header. * Only then can we do the check to see if 64 bits of packet * data have been returned, since we need to check the returned * ip header length. */ #define ICMP_MINLEN 8 /* abs minimum */ #define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */ #define ICMP_MASKLEN 12 /* address mask */ #define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */ #ifndef _IP_VHL #define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8) /* N.B.: must separately check that ip_hl >= 5 */ #else #define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8) /* N.B.: must separately check that header length >= 5 */ #endif /* Definition of type and code fields. */ /* defined above: ICMP_ECHOREPLY, ICMP_REDIRECT, ICMP_ECHO */ #define ICMP_UNREACH 3 /* dest unreachable, codes: */ #define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */ #define ICMP_ROUTERADVERT 9 /* router advertisement */ #define ICMP_ROUTERSOLICIT 10 /* router solicitation */ #define ICMP_TIMXCEED 11 /* time exceeded, code: */ #define ICMP_PARAMPROB 12 /* ip header bad */ #define ICMP_TSTAMP 13 /* timestamp request */ #define ICMP_TSTAMPREPLY 14 /* timestamp reply */ #define ICMP_IREQ 15 /* information request */ #define ICMP_IREQREPLY 16 /* information reply */ #define ICMP_MASKREQ 17 /* address mask request */ #define ICMP_MASKREPLY 18 /* address mask reply */ #define ICMP_MAXTYPE 18 /* UNREACH codes */ #define ICMP_UNREACH_NET 0 /* bad net */ #define ICMP_UNREACH_HOST 1 /* bad host */ #define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */ #define ICMP_UNREACH_PORT 3 /* bad port */ #define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */ #define ICMP_UNREACH_SRCFAIL 5 /* src route failed */ #define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */ #define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */ #define ICMP_UNREACH_ISOLATED 8 /* src host isolated */ #define ICMP_UNREACH_NET_PROHIB 9 /* net denied */ #define ICMP_UNREACH_HOST_PROHIB 10 /* host denied */ #define ICMP_UNREACH_TOSNET 11 /* bad tos for net */ #define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */ #define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */ #define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */ #define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */ /* REDIRECT codes */ #define ICMP_REDIRECT_NET 0 /* for network */ #define ICMP_REDIRECT_HOST 1 /* for host */ #define ICMP_REDIRECT_TOSNET 2 /* for tos and net */ #define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */ /* TIMEXCEED codes */ #define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */ #define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */ /* PARAMPROB code */ #define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ #define ICMP_INFOTYPE(type) \ ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \ (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) #endif /* __USE_MISC */ __END_DECLS #endif /* netinet/ip_icmp.h */ PKZnetinet/if_ether.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __NETINET_IF_ETHER_H #define __NETINET_IF_ETHER_H 1 #include #include /* Get definitions from kernel header file. */ #include #ifdef __USE_MISC /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 * $FreeBSD$ */ #include #include __BEGIN_DECLS /* * Ethernet Address Resolution Protocol. * * See RFC 826 for protocol description. Structure below is adapted * to resolving internet addresses. Field names used correspond to * RFC 826. */ struct ether_arp { struct arphdr ea_hdr; /* fixed-size header */ uint8_t arp_sha[ETH_ALEN]; /* sender hardware address */ uint8_t arp_spa[4]; /* sender protocol address */ uint8_t arp_tha[ETH_ALEN]; /* target hardware address */ uint8_t arp_tpa[4]; /* target protocol address */ }; #define arp_hrd ea_hdr.ar_hrd #define arp_pro ea_hdr.ar_pro #define arp_hln ea_hdr.ar_hln #define arp_pln ea_hdr.ar_pln #define arp_op ea_hdr.ar_op /* * Macro to map an IP multicast address to an Ethernet multicast address. * The high-order 25 bits of the Ethernet address are statically assigned, * and the low-order 23 bits are taken from the low end of the IP address. */ #define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \ /* struct in_addr *ipaddr; */ \ /* uint8_t enaddr[ETH_ALEN]; */ \ { \ (enaddr)[0] = 0x01; \ (enaddr)[1] = 0x00; \ (enaddr)[2] = 0x5e; \ (enaddr)[3] = ((uint8_t *)ipaddr)[1] & 0x7f; \ (enaddr)[4] = ((uint8_t *)ipaddr)[2]; \ (enaddr)[5] = ((uint8_t *)ipaddr)[3]; \ } __END_DECLS #endif /* __USE_MISC */ #endif /* netinet/if_ether.h */ PKZ vIUU netinet/in.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_IN_H #define _NETINET_IN_H 1 #include #include #include #include __BEGIN_DECLS /* Internet address. */ typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; /* Get system-specific definitions. */ #include /* Standard well-defined IP protocols. */ enum { IPPROTO_IP = 0, /* Dummy protocol for TCP. */ #define IPPROTO_IP IPPROTO_IP IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */ #define IPPROTO_ICMP IPPROTO_ICMP IPPROTO_IGMP = 2, /* Internet Group Management Protocol. */ #define IPPROTO_IGMP IPPROTO_IGMP IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94). */ #define IPPROTO_IPIP IPPROTO_IPIP IPPROTO_TCP = 6, /* Transmission Control Protocol. */ #define IPPROTO_TCP IPPROTO_TCP IPPROTO_EGP = 8, /* Exterior Gateway Protocol. */ #define IPPROTO_EGP IPPROTO_EGP IPPROTO_PUP = 12, /* PUP protocol. */ #define IPPROTO_PUP IPPROTO_PUP IPPROTO_UDP = 17, /* User Datagram Protocol. */ #define IPPROTO_UDP IPPROTO_UDP IPPROTO_IDP = 22, /* XNS IDP protocol. */ #define IPPROTO_IDP IPPROTO_IDP IPPROTO_TP = 29, /* SO Transport Protocol Class 4. */ #define IPPROTO_TP IPPROTO_TP IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */ #define IPPROTO_DCCP IPPROTO_DCCP IPPROTO_IPV6 = 41, /* IPv6 header. */ #define IPPROTO_IPV6 IPPROTO_IPV6 IPPROTO_RSVP = 46, /* Reservation Protocol. */ #define IPPROTO_RSVP IPPROTO_RSVP IPPROTO_GRE = 47, /* General Routing Encapsulation. */ #define IPPROTO_GRE IPPROTO_GRE IPPROTO_ESP = 50, /* encapsulating security payload. */ #define IPPROTO_ESP IPPROTO_ESP IPPROTO_AH = 51, /* authentication header. */ #define IPPROTO_AH IPPROTO_AH IPPROTO_MTP = 92, /* Multicast Transport Protocol. */ #define IPPROTO_MTP IPPROTO_MTP IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET. */ #define IPPROTO_BEETPH IPPROTO_BEETPH IPPROTO_ENCAP = 98, /* Encapsulation Header. */ #define IPPROTO_ENCAP IPPROTO_ENCAP IPPROTO_PIM = 103, /* Protocol Independent Multicast. */ #define IPPROTO_PIM IPPROTO_PIM IPPROTO_COMP = 108, /* Compression Header Protocol. */ #define IPPROTO_COMP IPPROTO_COMP IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */ #define IPPROTO_SCTP IPPROTO_SCTP IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */ #define IPPROTO_UDPLITE IPPROTO_UDPLITE IPPROTO_MPLS = 137, /* MPLS in IP. */ #define IPPROTO_MPLS IPPROTO_MPLS IPPROTO_ETHERNET = 143, /* Ethernet-within-IPv6 Encapsulation. */ #define IPPROTO_ETHERNET IPPROTO_ETHERNET IPPROTO_RAW = 255, /* Raw IP packets. */ #define IPPROTO_RAW IPPROTO_RAW IPPROTO_MPTCP = 262, /* Multipath TCP connection. */ #define IPPROTO_MPTCP IPPROTO_MPTCP IPPROTO_MAX }; /* If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel network headers first and we should use those ABI-identical definitions instead of our own, otherwise 0. */ #if !__USE_KERNEL_IPV6_DEFS enum { IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */ #define IPPROTO_HOPOPTS IPPROTO_HOPOPTS IPPROTO_ROUTING = 43, /* IPv6 routing header. */ #define IPPROTO_ROUTING IPPROTO_ROUTING IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header. */ #define IPPROTO_FRAGMENT IPPROTO_FRAGMENT IPPROTO_ICMPV6 = 58, /* ICMPv6. */ #define IPPROTO_ICMPV6 IPPROTO_ICMPV6 IPPROTO_NONE = 59, /* IPv6 no next header. */ #define IPPROTO_NONE IPPROTO_NONE IPPROTO_DSTOPTS = 60, /* IPv6 destination options. */ #define IPPROTO_DSTOPTS IPPROTO_DSTOPTS IPPROTO_MH = 135 /* IPv6 mobility header. */ #define IPPROTO_MH IPPROTO_MH }; #endif /* !__USE_KERNEL_IPV6_DEFS */ /* Type to represent a port. */ typedef uint16_t in_port_t; /* Standard well-known ports. */ enum { IPPORT_ECHO = 7, /* Echo service. */ IPPORT_DISCARD = 9, /* Discard transmissions service. */ IPPORT_SYSTAT = 11, /* System status service. */ IPPORT_DAYTIME = 13, /* Time of day service. */ IPPORT_NETSTAT = 15, /* Network status service. */ IPPORT_FTP = 21, /* File Transfer Protocol. */ IPPORT_TELNET = 23, /* Telnet protocol. */ IPPORT_SMTP = 25, /* Simple Mail Transfer Protocol. */ IPPORT_TIMESERVER = 37, /* Timeserver service. */ IPPORT_NAMESERVER = 42, /* Domain Name Service. */ IPPORT_WHOIS = 43, /* Internet Whois service. */ IPPORT_MTP = 57, IPPORT_TFTP = 69, /* Trivial File Transfer Protocol. */ IPPORT_RJE = 77, IPPORT_FINGER = 79, /* Finger service. */ IPPORT_TTYLINK = 87, IPPORT_SUPDUP = 95, /* SUPDUP protocol. */ IPPORT_EXECSERVER = 512, /* execd service. */ IPPORT_LOGINSERVER = 513, /* rlogind service. */ IPPORT_CMDSERVER = 514, IPPORT_EFSSERVER = 520, /* UDP ports. */ IPPORT_BIFFUDP = 512, IPPORT_WHOSERVER = 513, IPPORT_ROUTESERVER = 520, /* Ports less than this value are reserved for privileged processes. */ IPPORT_RESERVED = 1024, /* Ports greater this value are reserved for (non-privileged) servers. */ IPPORT_USERRESERVED = 5000 }; /* Definitions of the bits in an Internet address integer. On subnets, host and network parts are found according to the subnet mask, not these masks. */ #define IN_CLASSA(a) ((((in_addr_t)(a)) & 0x80000000) == 0) #define IN_CLASSA_NET 0xff000000 #define IN_CLASSA_NSHIFT 24 #define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) #define IN_CLASSA_MAX 128 #define IN_CLASSB(a) ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000) #define IN_CLASSB_NET 0xffff0000 #define IN_CLASSB_NSHIFT 16 #define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) #define IN_CLASSB_MAX 65536 #define IN_CLASSC(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000) #define IN_CLASSC_NET 0xffffff00 #define IN_CLASSC_NSHIFT 8 #define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) #define IN_CLASSD(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000) #define IN_MULTICAST(a) IN_CLASSD(a) #define IN_EXPERIMENTAL(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000) #define IN_BADCLASS(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000) /* Address to accept any incoming messages. */ #define INADDR_ANY ((in_addr_t) 0x00000000) /* Address to send to all hosts. */ #define INADDR_BROADCAST ((in_addr_t) 0xffffffff) /* Address indicating an error return. */ #define INADDR_NONE ((in_addr_t) 0xffffffff) /* Network number for local host loopback. */ #define IN_LOOPBACKNET 127 /* Address to loopback in software to local host. */ #ifndef INADDR_LOOPBACK # define INADDR_LOOPBACK ((in_addr_t) 0x7f000001) /* Inet 127.0.0.1. */ #endif /* Defines for Multicast INADDR. */ #define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) /* 224.0.0.0 */ #define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) /* 224.0.0.1 */ #define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) /* 224.0.0.2 */ #define INADDR_ALLSNOOPERS_GROUP ((in_addr_t) 0xe000006a) /* 224.0.0.106 */ #define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */ #if !__USE_KERNEL_IPV6_DEFS /* IPv6 address */ struct in6_addr { union { uint8_t __u6_addr8[16]; uint16_t __u6_addr16[8]; uint32_t __u6_addr32[4]; } __in6_u; #define s6_addr __in6_u.__u6_addr8 #ifdef __USE_MISC # define s6_addr16 __in6_u.__u6_addr16 # define s6_addr32 __in6_u.__u6_addr32 #endif }; #endif /* !__USE_KERNEL_IPV6_DEFS */ extern const struct in6_addr in6addr_any; /* :: */ extern const struct in6_addr in6addr_loopback; /* ::1 */ #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } #define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 /* Structure describing an Internet socket address. */ struct sockaddr_in { __SOCKADDR_COMMON (sin_); in_port_t sin_port; /* Port number. */ struct in_addr sin_addr; /* Internet address. */ /* Pad to size of `struct sockaddr'. */ unsigned char sin_zero[sizeof (struct sockaddr) - __SOCKADDR_COMMON_SIZE - sizeof (in_port_t) - sizeof (struct in_addr)]; }; #if !__USE_KERNEL_IPV6_DEFS /* Ditto, for IPv6. */ struct sockaddr_in6 { __SOCKADDR_COMMON (sin6_); in_port_t sin6_port; /* Transport layer port # */ uint32_t sin6_flowinfo; /* IPv6 flow information */ struct in6_addr sin6_addr; /* IPv6 address */ uint32_t sin6_scope_id; /* IPv6 scope-id */ }; #endif /* !__USE_KERNEL_IPV6_DEFS */ #ifdef __USE_MISC /* IPv4 multicast request. */ struct ip_mreq { /* IP multicast address of group. */ struct in_addr imr_multiaddr; /* Local IP address of interface. */ struct in_addr imr_interface; }; struct ip_mreq_source { /* IP multicast address of group. */ struct in_addr imr_multiaddr; /* IP address of interface. */ struct in_addr imr_interface; /* IP address of source. */ struct in_addr imr_sourceaddr; }; #endif #if !__USE_KERNEL_IPV6_DEFS /* Likewise, for IPv6. */ struct ipv6_mreq { /* IPv6 multicast address of group */ struct in6_addr ipv6mr_multiaddr; /* local interface */ unsigned int ipv6mr_interface; }; #endif /* !__USE_KERNEL_IPV6_DEFS */ #ifdef __USE_MISC /* Multicast group request. */ struct group_req { /* Interface index. */ uint32_t gr_interface; /* Group address. */ struct sockaddr_storage gr_group; }; struct group_source_req { /* Interface index. */ uint32_t gsr_interface; /* Group address. */ struct sockaddr_storage gsr_group; /* Source address. */ struct sockaddr_storage gsr_source; }; /* Full-state filter operations. */ struct ip_msfilter { /* IP multicast address of group. */ struct in_addr imsf_multiaddr; /* Local IP address of interface. */ struct in_addr imsf_interface; /* Filter mode. */ uint32_t imsf_fmode; /* Number of source addresses. */ uint32_t imsf_numsrc; /* Source addresses. */ struct in_addr imsf_slist[1]; }; #define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \ - sizeof (struct in_addr) \ + (numsrc) * sizeof (struct in_addr)) struct group_filter { /* Interface index. */ uint32_t gf_interface; /* Group address. */ struct sockaddr_storage gf_group; /* Filter mode. */ uint32_t gf_fmode; /* Number of source addresses. */ uint32_t gf_numsrc; /* Source addresses. */ struct sockaddr_storage gf_slist[1]; }; #define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \ - sizeof (struct sockaddr_storage) \ + ((numsrc) \ * sizeof (struct sockaddr_storage))) #endif /* Functions to convert between host and network byte order. Please note that these functions normally take `unsigned long int' or `unsigned short int' values as arguments and also return them. But this was a short-sighted decision since on different systems the types may have different representations but the values are always the same. */ extern uint32_t ntohl (uint32_t __netlong) __THROW __attribute__ ((__const__)); extern uint16_t ntohs (uint16_t __netshort) __THROW __attribute__ ((__const__)); extern uint32_t htonl (uint32_t __hostlong) __THROW __attribute__ ((__const__)); extern uint16_t htons (uint16_t __hostshort) __THROW __attribute__ ((__const__)); #include /* Get machine dependent optimized versions of byte swapping functions. */ #include #include #ifdef __OPTIMIZE__ /* We can optimize calls to the conversion functions. Either nothing has to be done or we are using directly the byte-swapping functions which often can be inlined. */ # if __BYTE_ORDER == __BIG_ENDIAN /* The host byte order is the same as network byte order, so these functions are all just identity. */ # define ntohl(x) __uint32_identity (x) # define ntohs(x) __uint16_identity (x) # define htonl(x) __uint32_identity (x) # define htons(x) __uint16_identity (x) # else # if __BYTE_ORDER == __LITTLE_ENDIAN # define ntohl(x) __bswap_32 (x) # define ntohs(x) __bswap_16 (x) # define htonl(x) __bswap_32 (x) # define htons(x) __bswap_16 (x) # endif # endif #endif #ifdef __GNUC__ # define IN6_IS_ADDR_UNSPECIFIED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ && __a->__in6_u.__u6_addr32[1] == 0 \ && __a->__in6_u.__u6_addr32[2] == 0 \ && __a->__in6_u.__u6_addr32[3] == 0; })) # define IN6_IS_ADDR_LOOPBACK(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ && __a->__in6_u.__u6_addr32[1] == 0 \ && __a->__in6_u.__u6_addr32[2] == 0 \ && __a->__in6_u.__u6_addr32[3] == htonl (1); })) # define IN6_IS_ADDR_LINKLOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->__in6_u.__u6_addr32[0] & htonl (0xffc00000)) == htonl (0xfe800000); })) # define IN6_IS_ADDR_SITELOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->__in6_u.__u6_addr32[0] & htonl (0xffc00000)) == htonl (0xfec00000); })) # define IN6_IS_ADDR_V4MAPPED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ && __a->__in6_u.__u6_addr32[1] == 0 \ && __a->__in6_u.__u6_addr32[2] == htonl (0xffff); })) # define IN6_IS_ADDR_V4COMPAT(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ && __a->__in6_u.__u6_addr32[1] == 0 \ && __a->__in6_u.__u6_addr32[2] == 0 \ && ntohl (__a->__in6_u.__u6_addr32[3]) > 1; })) # define IN6_ARE_ADDR_EQUAL(a,b) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ const struct in6_addr *__b = (const struct in6_addr *) (b); \ __a->__in6_u.__u6_addr32[0] == __b->__in6_u.__u6_addr32[0] \ && __a->__in6_u.__u6_addr32[1] == __b->__in6_u.__u6_addr32[1] \ && __a->__in6_u.__u6_addr32[2] == __b->__in6_u.__u6_addr32[2] \ && __a->__in6_u.__u6_addr32[3] == __b->__in6_u.__u6_addr32[3]; })) #else # define IN6_IS_ADDR_UNSPECIFIED(a) \ (((const uint32_t *) (a))[0] == 0 \ && ((const uint32_t *) (a))[1] == 0 \ && ((const uint32_t *) (a))[2] == 0 \ && ((const uint32_t *) (a))[3] == 0) # define IN6_IS_ADDR_LOOPBACK(a) \ (((const uint32_t *) (a))[0] == 0 \ && ((const uint32_t *) (a))[1] == 0 \ && ((const uint32_t *) (a))[2] == 0 \ && ((const uint32_t *) (a))[3] == htonl (1)) # define IN6_IS_ADDR_LINKLOCAL(a) \ ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfe800000)) # define IN6_IS_ADDR_SITELOCAL(a) \ ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfec00000)) # define IN6_IS_ADDR_V4MAPPED(a) \ ((((const uint32_t *) (a))[0] == 0) \ && (((const uint32_t *) (a))[1] == 0) \ && (((const uint32_t *) (a))[2] == htonl (0xffff))) # define IN6_IS_ADDR_V4COMPAT(a) \ ((((const uint32_t *) (a))[0] == 0) \ && (((const uint32_t *) (a))[1] == 0) \ && (((const uint32_t *) (a))[2] == 0) \ && (ntohl (((const uint32_t *) (a))[3]) > 1)) # define IN6_ARE_ADDR_EQUAL(a,b) \ ((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \ && (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \ && (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \ && (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3])) #endif #define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff) #ifdef __USE_MISC /* Bind socket to a privileged IP port. */ extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW; /* The IPv6 version of this function. */ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) __THROW; #endif #define IN6_IS_ADDR_MC_NODELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x1)) #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x2)) #define IN6_IS_ADDR_MC_SITELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x5)) #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x8)) #define IN6_IS_ADDR_MC_GLOBAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0xe)) #ifdef __USE_GNU struct cmsghdr; /* Forward declaration. */ #if !__USE_KERNEL_IPV6_DEFS /* IPv6 packet information. */ struct in6_pktinfo { struct in6_addr ipi6_addr; /* src/dst IPv6 address */ unsigned int ipi6_ifindex; /* send/recv interface index */ }; /* IPv6 MTU information. */ struct ip6_mtuinfo { struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */ uint32_t ip6m_mtu; /* path MTU in host byte order */ }; #endif /* !__USE_KERNEL_IPV6_DEFS */ /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ extern int inet6_option_space (int __nbytes) __THROW __attribute_deprecated__; extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, int __type) __THROW __attribute_deprecated__; extern int inet6_option_append (struct cmsghdr *__cmsg, const uint8_t *__typep, int __multx, int __plusy) __THROW __attribute_deprecated__; extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, int __multx, int __plusy) __THROW __attribute_deprecated__; extern int inet6_option_next (const struct cmsghdr *__cmsg, uint8_t **__tptrp) __THROW __attribute_deprecated__; extern int inet6_option_find (const struct cmsghdr *__cmsg, uint8_t **__tptrp, int __type) __THROW __attribute_deprecated__; /* Hop-by-Hop and Destination Options Processing (RFC 3542). */ extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __THROW; extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t __len, uint8_t __align, void **__databufp) __THROW; extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) __THROW; extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __THROW; extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, uint8_t *__typep, socklen_t *__lenp, void **__databufp) __THROW; extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t *__lenp, void **__databufp) __THROW; extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __THROW; /* Routing Header Option (RFC 3542). */ extern socklen_t inet6_rth_space (int __type, int __segments) __THROW; extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, int __segments) __THROW; extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __THROW; extern int inet6_rth_reverse (const void *__in, void *__out) __THROW; extern int inet6_rth_segments (const void *__bp) __THROW; extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index) __THROW; /* Multicast source filter support. */ /* Get IPv4 source filter. */ extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t *__fmode, uint32_t *__numsrc, struct in_addr *__slist) __THROW; /* Set IPv4 source filter. */ extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t __fmode, uint32_t __numsrc, const struct in_addr *__slist) __THROW; /* Get source filter. */ extern int getsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t *__fmode, uint32_t *__numsrc, struct sockaddr_storage *__slist) __THROW; /* Set source filter. */ extern int setsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t __fmode, uint32_t __numsrc, const struct sockaddr_storage *__slist) __THROW; #endif /* use GNU */ __END_DECLS #endif /* netinet/in.h */ PKZ(&& netinet/tcp.hnu[/* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)tcp.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NETINET_TCP_H #define _NETINET_TCP_H 1 #include /* * User-settable options (used with setsockopt). */ #define TCP_NODELAY 1 /* Don't delay send to coalesce packets */ #define TCP_MAXSEG 2 /* Set maximum segment size */ #define TCP_CORK 3 /* Control sending of partial frames */ #define TCP_KEEPIDLE 4 /* Start keeplives after this period */ #define TCP_KEEPINTVL 5 /* Interval between keepalives */ #define TCP_KEEPCNT 6 /* Number of keepalives before death */ #define TCP_SYNCNT 7 /* Number of SYN retransmits */ #define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */ #define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ #define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ #define TCP_INFO 11 /* Information about this connection. */ #define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */ #define TCP_CONGESTION 13 /* Congestion control algorithm. */ #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ #define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */ #define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/ #define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */ #define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */ #define TCP_REPAIR 19 /* TCP sock is under repair right now */ #define TCP_REPAIR_QUEUE 20 /* Set TCP queue to repair */ #define TCP_QUEUE_SEQ 21 /* Set sequence number of repaired queue. */ #define TCP_REPAIR_OPTIONS 22 /* Repair TCP connection options */ #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ #define TCP_TIMESTAMP 24 /* TCP time stamp */ #define TCP_NOTSENT_LOWAT 25 /* Limit number of unsent bytes in write queue. */ #define TCP_CC_INFO 26 /* Get Congestion Control (optional) info. */ #define TCP_SAVE_SYN 27 /* Record SYN headers for new connections. */ #define TCP_SAVED_SYN 28 /* Get SYN headers recorded for connection. */ #define TCP_REPAIR_WINDOW 29 /* Get/set window parameters. */ #define TCP_FASTOPEN_CONNECT 30 /* Attempt FastOpen with connect. */ #define TCP_ULP 31 /* Attach a ULP to a TCP connection. */ #define TCP_MD5SIG_EXT 32 /* TCP MD5 Signature with extensions. */ #define TCP_FASTOPEN_KEY 33 /* Set the key for Fast Open (cookie). */ #define TCP_FASTOPEN_NO_COOKIE 34 /* Enable TFO without a TFO cookie. */ #ifdef __USE_MISC # include # include # include typedef uint32_t tcp_seq; /* * TCP header. * Per RFC 793, September, 1981. */ struct tcphdr { __extension__ union { struct { uint16_t th_sport; /* source port */ uint16_t th_dport; /* destination port */ tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ # if __BYTE_ORDER == __LITTLE_ENDIAN uint8_t th_x2:4; /* (unused) */ uint8_t th_off:4; /* data offset */ # endif # if __BYTE_ORDER == __BIG_ENDIAN uint8_t th_off:4; /* data offset */ uint8_t th_x2:4; /* (unused) */ # endif uint8_t th_flags; # define TH_FIN 0x01 # define TH_SYN 0x02 # define TH_RST 0x04 # define TH_PUSH 0x08 # define TH_ACK 0x10 # define TH_URG 0x20 uint16_t th_win; /* window */ uint16_t th_sum; /* checksum */ uint16_t th_urp; /* urgent pointer */ }; struct { uint16_t source; uint16_t dest; uint32_t seq; uint32_t ack_seq; # if __BYTE_ORDER == __LITTLE_ENDIAN uint16_t res1:4; uint16_t doff:4; uint16_t fin:1; uint16_t syn:1; uint16_t rst:1; uint16_t psh:1; uint16_t ack:1; uint16_t urg:1; uint16_t res2:2; # elif __BYTE_ORDER == __BIG_ENDIAN uint16_t doff:4; uint16_t res1:4; uint16_t res2:2; uint16_t urg:1; uint16_t ack:1; uint16_t psh:1; uint16_t rst:1; uint16_t syn:1; uint16_t fin:1; # else # error "Adjust your defines" # endif uint16_t window; uint16_t check; uint16_t urg_ptr; }; }; }; enum { TCP_ESTABLISHED = 1, TCP_SYN_SENT, TCP_SYN_RECV, TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_TIME_WAIT, TCP_CLOSE, TCP_CLOSE_WAIT, TCP_LAST_ACK, TCP_LISTEN, TCP_CLOSING /* now a valid state */ }; # define TCPOPT_EOL 0 # define TCPOPT_NOP 1 # define TCPOPT_MAXSEG 2 # define TCPOLEN_MAXSEG 4 # define TCPOPT_WINDOW 3 # define TCPOLEN_WINDOW 3 # define TCPOPT_SACK_PERMITTED 4 /* Experimental */ # define TCPOLEN_SACK_PERMITTED 2 # define TCPOPT_SACK 5 /* Experimental */ # define TCPOPT_TIMESTAMP 8 # define TCPOLEN_TIMESTAMP 10 # define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ # define TCPOPT_TSTAMP_HDR \ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) /* * Default maximum segment size for TCP. * With an IP MSS of 576, this is 536, * but 512 is probably more convenient. * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). */ # define TCP_MSS 512 # define TCP_MAXWIN 65535 /* largest value for (unscaled) window */ # define TCP_MAX_WINSHIFT 14 /* maximum window shift */ # define SOL_TCP 6 /* TCP level */ # define TCPI_OPT_TIMESTAMPS 1 # define TCPI_OPT_SACK 2 # define TCPI_OPT_WSCALE 4 # define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */ # define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ # define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ /* Values for tcpi_state. */ enum tcp_ca_state { TCP_CA_Open = 0, TCP_CA_Disorder = 1, TCP_CA_CWR = 2, TCP_CA_Recovery = 3, TCP_CA_Loss = 4 }; struct tcp_info { uint8_t tcpi_state; uint8_t tcpi_ca_state; uint8_t tcpi_retransmits; uint8_t tcpi_probes; uint8_t tcpi_backoff; uint8_t tcpi_options; uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; uint32_t tcpi_rto; uint32_t tcpi_ato; uint32_t tcpi_snd_mss; uint32_t tcpi_rcv_mss; uint32_t tcpi_unacked; uint32_t tcpi_sacked; uint32_t tcpi_lost; uint32_t tcpi_retrans; uint32_t tcpi_fackets; /* Times. */ uint32_t tcpi_last_data_sent; uint32_t tcpi_last_ack_sent; /* Not remembered, sorry. */ uint32_t tcpi_last_data_recv; uint32_t tcpi_last_ack_recv; /* Metrics. */ uint32_t tcpi_pmtu; uint32_t tcpi_rcv_ssthresh; uint32_t tcpi_rtt; uint32_t tcpi_rttvar; uint32_t tcpi_snd_ssthresh; uint32_t tcpi_snd_cwnd; uint32_t tcpi_advmss; uint32_t tcpi_reordering; uint32_t tcpi_rcv_rtt; uint32_t tcpi_rcv_space; uint32_t tcpi_total_retrans; }; /* For TCP_MD5SIG socket option. */ #define TCP_MD5SIG_MAXKEYLEN 80 /* tcp_md5sig extension flags for TCP_MD5SIG_EXT. */ #define TCP_MD5SIG_FLAG_PREFIX 1 /* Address prefix length. */ struct tcp_md5sig { struct sockaddr_storage tcpm_addr; /* Address associated. */ uint8_t tcpm_flags; /* Extension flags. */ uint8_t tcpm_prefixlen; /* Address prefix. */ uint16_t tcpm_keylen; /* Key length. */ uint32_t __tcpm_pad; /* Zero. */ uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ }; /* For socket repair options. */ struct tcp_repair_opt { uint32_t opt_code; uint32_t opt_val; }; /* Queue to repair, for TCP_REPAIR_QUEUE. */ enum { TCP_NO_QUEUE, TCP_RECV_QUEUE, TCP_SEND_QUEUE, TCP_QUEUES_NR, }; /* For cookie transactions socket options. */ #define TCP_COOKIE_MIN 8 /* 64-bits */ #define TCP_COOKIE_MAX 16 /* 128-bits */ #define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX) /* Flags for both getsockopt and setsockopt */ #define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */ #define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies, * supercedes everything. */ /* Flags for getsockopt */ #define TCP_S_DATA_IN (1 << 2) /* Was data received? */ #define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */ #define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */ #define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */ struct tcp_cookie_transactions { uint16_t tcpct_flags; uint8_t __tcpct_pad1; uint8_t tcpct_cookie_desired; uint16_t tcpct_s_data_desired; uint16_t tcpct_used; uint8_t tcpct_value[TCP_MSS_DEFAULT]; }; /* For use with TCP_REPAIR_WINDOW. */ struct tcp_repair_window { uint32_t snd_wl1; uint32_t snd_wnd; uint32_t max_window; uint32_t rcv_wnd; uint32_t rcv_wup; }; #endif /* Misc. */ #endif /* netinet/tcp.h */ PKZl  netinet/ip6.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_IP6_H #define _NETINET_IP6_H 1 #include #include struct ip6_hdr { union { struct ip6_hdrctl { uint32_t ip6_un1_flow; /* 4 bits version, 8 bits TC, 20 bits flow-ID */ uint16_t ip6_un1_plen; /* payload length */ uint8_t ip6_un1_nxt; /* next header */ uint8_t ip6_un1_hlim; /* hop limit */ } ip6_un1; uint8_t ip6_un2_vfc; /* 4 bits version, top 4 bits tclass */ } ip6_ctlun; struct in6_addr ip6_src; /* source address */ struct in6_addr ip6_dst; /* destination address */ }; #define ip6_vfc ip6_ctlun.ip6_un2_vfc #define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow #define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen #define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt #define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim #define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim /* Generic extension header. */ struct ip6_ext { uint8_t ip6e_nxt; /* next header. */ uint8_t ip6e_len; /* length in units of 8 octets. */ }; /* Hop-by-Hop options header. */ struct ip6_hbh { uint8_t ip6h_nxt; /* next header. */ uint8_t ip6h_len; /* length in units of 8 octets. */ /* followed by options */ }; /* Destination options header */ struct ip6_dest { uint8_t ip6d_nxt; /* next header */ uint8_t ip6d_len; /* length in units of 8 octets */ /* followed by options */ }; /* Routing header */ struct ip6_rthdr { uint8_t ip6r_nxt; /* next header */ uint8_t ip6r_len; /* length in units of 8 octets */ uint8_t ip6r_type; /* routing type */ uint8_t ip6r_segleft; /* segments left */ /* followed by routing type specific data */ }; /* Type 0 Routing header */ struct ip6_rthdr0 { uint8_t ip6r0_nxt; /* next header */ uint8_t ip6r0_len; /* length in units of 8 octets */ uint8_t ip6r0_type; /* always zero */ uint8_t ip6r0_segleft; /* segments left */ uint8_t ip6r0_reserved; /* reserved field */ uint8_t ip6r0_slmap[3]; /* strict/loose bit map */ /* followed by up to 127 struct in6_addr */ struct in6_addr ip6r0_addr[0]; }; /* Fragment header */ struct ip6_frag { uint8_t ip6f_nxt; /* next header */ uint8_t ip6f_reserved; /* reserved field */ uint16_t ip6f_offlg; /* offset, reserved, and flag */ uint32_t ip6f_ident; /* identification */ }; #if __BYTE_ORDER == __BIG_ENDIAN # define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ # define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */ # define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ #else /* __BYTE_ORDER == __LITTLE_ENDIAN */ # define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */ # define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */ # define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */ #endif /* IPv6 options */ struct ip6_opt { uint8_t ip6o_type; uint8_t ip6o_len; }; /* The high-order 3 bits of the option type define the behavior * when processing an unknown option and whether or not the option * content changes in flight. */ #define IP6OPT_TYPE(o) ((o) & 0xc0) #define IP6OPT_TYPE_SKIP 0x00 #define IP6OPT_TYPE_DISCARD 0x40 #define IP6OPT_TYPE_FORCEICMP 0x80 #define IP6OPT_TYPE_ICMP 0xc0 #define IP6OPT_TYPE_MUTABLE 0x20 /* Special option types for padding. */ #define IP6OPT_PAD1 0 #define IP6OPT_PADN 1 #define IP6OPT_JUMBO 0xc2 #define IP6OPT_NSAP_ADDR 0xc3 #define IP6OPT_TUNNEL_LIMIT 0x04 #define IP6OPT_ROUTER_ALERT 0x05 /* Jumbo Payload Option */ struct ip6_opt_jumbo { uint8_t ip6oj_type; uint8_t ip6oj_len; uint8_t ip6oj_jumbo_len[4]; }; #define IP6OPT_JUMBO_LEN 6 /* NSAP Address Option */ struct ip6_opt_nsap { uint8_t ip6on_type; uint8_t ip6on_len; uint8_t ip6on_src_nsap_len; uint8_t ip6on_dst_nsap_len; /* followed by source NSAP */ /* followed by destination NSAP */ }; /* Tunnel Limit Option */ struct ip6_opt_tunnel { uint8_t ip6ot_type; uint8_t ip6ot_len; uint8_t ip6ot_encap_limit; }; /* Router Alert Option */ struct ip6_opt_router { uint8_t ip6or_type; uint8_t ip6or_len; uint8_t ip6or_value[2]; }; /* Router alert values (in network byte order) */ #if __BYTE_ORDER == __BIG_ENDIAN # define IP6_ALERT_MLD 0x0000 # define IP6_ALERT_RSVP 0x0001 # define IP6_ALERT_AN 0x0002 #else /* __BYTE_ORDER == __LITTLE_ENDIAN */ # define IP6_ALERT_MLD 0x0000 # define IP6_ALERT_RSVP 0x0100 # define IP6_ALERT_AN 0x0200 #endif #endif /* netinet/ip6.h */ PKZr+>> netinet/udp.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Copyright (C) 1982, 1986 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef __NETINET_UDP_H #define __NETINET_UDP_H 1 #include #include /* UDP header as specified by RFC 768, August 1980. */ struct udphdr { __extension__ union { struct { uint16_t uh_sport; /* source port */ uint16_t uh_dport; /* destination port */ uint16_t uh_ulen; /* udp length */ uint16_t uh_sum; /* udp checksum */ }; struct { uint16_t source; uint16_t dest; uint16_t len; uint16_t check; }; }; }; /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments. */ #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets. */ #define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP over IPv6. */ #define UDP_NO_CHECK6_RX 102 /* Disable accepting checksum for UDP over IPv6. */ /* UDP encapsulation types */ #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ #define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ #define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ #define SOL_UDP 17 /* sockopt level for UDP */ #endif /* netinet/udp.h */ PKZi/netinet/in_systm.hnu[/* System specific type definitions for networking code. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_IN_SYSTM_H #define _NETINET_IN_SYSTM_H 1 #include #include __BEGIN_DECLS /* * Network order versions of various data types. Unfortunately, BSD * assumes specific sizes for shorts (16 bit) and longs (32 bit) which * don't hold in general. As a consequence, the network order versions * may not reflect the actual size of the native data types. */ typedef uint16_t n_short; /* short as received from the net */ typedef uint32_t n_long; /* long as received from the net */ typedef uint32_t n_time; /* ms since 00:00 GMT, byte rev */ __END_DECLS #endif /* netinet/in_systm.h */ PKZm6,,netinet/icmp6.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_ICMP6_H #define _NETINET_ICMP6_H 1 #include #include #include #include #define ICMP6_FILTER 1 #define ICMP6_FILTER_BLOCK 1 #define ICMP6_FILTER_PASS 2 #define ICMP6_FILTER_BLOCKOTHERS 3 #define ICMP6_FILTER_PASSONLY 4 struct icmp6_filter { uint32_t icmp6_filt[8]; }; struct icmp6_hdr { uint8_t icmp6_type; /* type field */ uint8_t icmp6_code; /* code field */ uint16_t icmp6_cksum; /* checksum field */ union { uint32_t icmp6_un_data32[1]; /* type-specific field */ uint16_t icmp6_un_data16[2]; /* type-specific field */ uint8_t icmp6_un_data8[4]; /* type-specific field */ } icmp6_dataun; }; #define icmp6_data32 icmp6_dataun.icmp6_un_data32 #define icmp6_data16 icmp6_dataun.icmp6_un_data16 #define icmp6_data8 icmp6_dataun.icmp6_un_data8 #define icmp6_pptr icmp6_data32[0] /* parameter prob */ #define icmp6_mtu icmp6_data32[0] /* packet too big */ #define icmp6_id icmp6_data16[0] /* echo request/reply */ #define icmp6_seq icmp6_data16[1] /* echo request/reply */ #define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */ #define ICMP6_DST_UNREACH 1 #define ICMP6_PACKET_TOO_BIG 2 #define ICMP6_TIME_EXCEEDED 3 #define ICMP6_PARAM_PROB 4 #define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */ #define ICMP6_ECHO_REQUEST 128 #define ICMP6_ECHO_REPLY 129 #define MLD_LISTENER_QUERY 130 #define MLD_LISTENER_REPORT 131 #define MLD_LISTENER_REDUCTION 132 #define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ #define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */ /* administratively prohibited */ #define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */ #define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */ #define ICMP6_DST_UNREACH_NOPORT 4 /* bad port */ #define ICMP6_TIME_EXCEED_TRANSIT 0 /* Hop Limit == 0 in transit */ #define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* Reassembly time out */ #define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */ #define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized Next Header */ #define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */ #define ICMP6_FILTER_WILLPASS(type, filterp) \ ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) #define ICMP6_FILTER_WILLBLOCK(type, filterp) \ ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) #define ICMP6_FILTER_SETPASS(type, filterp) \ ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31)))) #define ICMP6_FILTER_SETBLOCK(type, filterp) \ ((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31)))) #define ICMP6_FILTER_SETPASSALL(filterp) \ memset (filterp, 0, sizeof (struct icmp6_filter)); #define ICMP6_FILTER_SETBLOCKALL(filterp) \ memset (filterp, 0xFF, sizeof (struct icmp6_filter)); #define ND_ROUTER_SOLICIT 133 #define ND_ROUTER_ADVERT 134 #define ND_NEIGHBOR_SOLICIT 135 #define ND_NEIGHBOR_ADVERT 136 #define ND_REDIRECT 137 struct nd_router_solicit /* router solicitation */ { struct icmp6_hdr nd_rs_hdr; /* could be followed by options */ }; #define nd_rs_type nd_rs_hdr.icmp6_type #define nd_rs_code nd_rs_hdr.icmp6_code #define nd_rs_cksum nd_rs_hdr.icmp6_cksum #define nd_rs_reserved nd_rs_hdr.icmp6_data32[0] struct nd_router_advert /* router advertisement */ { struct icmp6_hdr nd_ra_hdr; uint32_t nd_ra_reachable; /* reachable time */ uint32_t nd_ra_retransmit; /* retransmit timer */ /* could be followed by options */ }; #define nd_ra_type nd_ra_hdr.icmp6_type #define nd_ra_code nd_ra_hdr.icmp6_code #define nd_ra_cksum nd_ra_hdr.icmp6_cksum #define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0] #define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1] #define ND_RA_FLAG_MANAGED 0x80 #define ND_RA_FLAG_OTHER 0x40 #define ND_RA_FLAG_HOME_AGENT 0x20 #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] struct nd_neighbor_solicit /* neighbor solicitation */ { struct icmp6_hdr nd_ns_hdr; struct in6_addr nd_ns_target; /* target address */ /* could be followed by options */ }; #define nd_ns_type nd_ns_hdr.icmp6_type #define nd_ns_code nd_ns_hdr.icmp6_code #define nd_ns_cksum nd_ns_hdr.icmp6_cksum #define nd_ns_reserved nd_ns_hdr.icmp6_data32[0] struct nd_neighbor_advert /* neighbor advertisement */ { struct icmp6_hdr nd_na_hdr; struct in6_addr nd_na_target; /* target address */ /* could be followed by options */ }; #define nd_na_type nd_na_hdr.icmp6_type #define nd_na_code nd_na_hdr.icmp6_code #define nd_na_cksum nd_na_hdr.icmp6_cksum #define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0] #if __BYTE_ORDER == __BIG_ENDIAN #define ND_NA_FLAG_ROUTER 0x80000000 #define ND_NA_FLAG_SOLICITED 0x40000000 #define ND_NA_FLAG_OVERRIDE 0x20000000 #else /* __BYTE_ORDER == __LITTLE_ENDIAN */ #define ND_NA_FLAG_ROUTER 0x00000080 #define ND_NA_FLAG_SOLICITED 0x00000040 #define ND_NA_FLAG_OVERRIDE 0x00000020 #endif struct nd_redirect /* redirect */ { struct icmp6_hdr nd_rd_hdr; struct in6_addr nd_rd_target; /* target address */ struct in6_addr nd_rd_dst; /* destination address */ /* could be followed by options */ }; #define nd_rd_type nd_rd_hdr.icmp6_type #define nd_rd_code nd_rd_hdr.icmp6_code #define nd_rd_cksum nd_rd_hdr.icmp6_cksum #define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] struct nd_opt_hdr /* Neighbor discovery option header */ { uint8_t nd_opt_type; uint8_t nd_opt_len; /* in units of 8 octets */ /* followed by option specific data */ }; #define ND_OPT_SOURCE_LINKADDR 1 #define ND_OPT_TARGET_LINKADDR 2 #define ND_OPT_PREFIX_INFORMATION 3 #define ND_OPT_REDIRECTED_HEADER 4 #define ND_OPT_MTU 5 #define ND_OPT_RTR_ADV_INTERVAL 7 #define ND_OPT_HOME_AGENT_INFO 8 struct nd_opt_prefix_info /* prefix information */ { uint8_t nd_opt_pi_type; uint8_t nd_opt_pi_len; uint8_t nd_opt_pi_prefix_len; uint8_t nd_opt_pi_flags_reserved; uint32_t nd_opt_pi_valid_time; uint32_t nd_opt_pi_preferred_time; uint32_t nd_opt_pi_reserved2; struct in6_addr nd_opt_pi_prefix; }; #define ND_OPT_PI_FLAG_ONLINK 0x80 #define ND_OPT_PI_FLAG_AUTO 0x40 #define ND_OPT_PI_FLAG_RADDR 0x20 struct nd_opt_rd_hdr /* redirected header */ { uint8_t nd_opt_rh_type; uint8_t nd_opt_rh_len; uint16_t nd_opt_rh_reserved1; uint32_t nd_opt_rh_reserved2; /* followed by IP header and data */ }; struct nd_opt_mtu /* MTU option */ { uint8_t nd_opt_mtu_type; uint8_t nd_opt_mtu_len; uint16_t nd_opt_mtu_reserved; uint32_t nd_opt_mtu_mtu; }; struct mld_hdr { struct icmp6_hdr mld_icmp6_hdr; struct in6_addr mld_addr; /* multicast address */ }; #define mld_type mld_icmp6_hdr.icmp6_type #define mld_code mld_icmp6_hdr.icmp6_code #define mld_cksum mld_icmp6_hdr.icmp6_cksum #define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0] #define mld_reserved mld_icmp6_hdr.icmp6_data16[1] #define ICMP6_ROUTER_RENUMBERING 138 struct icmp6_router_renum /* router renumbering header */ { struct icmp6_hdr rr_hdr; uint8_t rr_segnum; uint8_t rr_flags; uint16_t rr_maxdelay; uint32_t rr_reserved; }; #define rr_type rr_hdr.icmp6_type #define rr_code rr_hdr.icmp6_code #define rr_cksum rr_hdr.icmp6_cksum #define rr_seqnum rr_hdr.icmp6_data32[0] /* Router renumbering flags */ #define ICMP6_RR_FLAGS_TEST 0x80 #define ICMP6_RR_FLAGS_REQRESULT 0x40 #define ICMP6_RR_FLAGS_FORCEAPPLY 0x20 #define ICMP6_RR_FLAGS_SPECSITE 0x10 #define ICMP6_RR_FLAGS_PREVDONE 0x08 struct rr_pco_match /* match prefix part */ { uint8_t rpm_code; uint8_t rpm_len; uint8_t rpm_ordinal; uint8_t rpm_matchlen; uint8_t rpm_minlen; uint8_t rpm_maxlen; uint16_t rpm_reserved; struct in6_addr rpm_prefix; }; /* PCO code values */ #define RPM_PCO_ADD 1 #define RPM_PCO_CHANGE 2 #define RPM_PCO_SETGLOBAL 3 struct rr_pco_use /* use prefix part */ { uint8_t rpu_uselen; uint8_t rpu_keeplen; uint8_t rpu_ramask; uint8_t rpu_raflags; uint32_t rpu_vltime; uint32_t rpu_pltime; uint32_t rpu_flags; struct in6_addr rpu_prefix; }; #define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x20 #define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10 #if __BYTE_ORDER == __BIG_ENDIAN # define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000 # define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000 #elif __BYTE_ORDER == __LITTLE_ENDIAN # define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80 # define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40 #endif struct rr_result /* router renumbering result message */ { uint16_t rrr_flags; uint8_t rrr_ordinal; uint8_t rrr_matchedlen; uint32_t rrr_ifid; struct in6_addr rrr_prefix; }; #if __BYTE_ORDER == __BIG_ENDIAN # define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 # define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 #elif __BYTE_ORDER == __LITTLE_ENDIAN # define ICMP6_RR_RESULT_FLAGS_OOB 0x0200 # define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100 #endif /* Mobile IPv6 extension: Advertisement Interval. */ struct nd_opt_adv_interval { uint8_t nd_opt_adv_interval_type; uint8_t nd_opt_adv_interval_len; uint16_t nd_opt_adv_interval_reserved; uint32_t nd_opt_adv_interval_ival; }; /* Mobile IPv6 extension: Home Agent Info. */ struct nd_opt_home_agent_info { uint8_t nd_opt_home_agent_info_type; uint8_t nd_opt_home_agent_info_len; uint16_t nd_opt_home_agent_info_reserved; uint16_t nd_opt_home_agent_info_preference; uint16_t nd_opt_home_agent_info_lifetime; }; #endif /* netinet/icmpv6.h */ PKZV%8netinet/ether.hnu[/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_ETHER_H #define _NETINET_ETHER_H 1 #include /* Get definition of `struct ether_addr'. */ #include #ifdef __USE_MISC __BEGIN_DECLS /* Convert 48 bit Ethernet ADDRess to ASCII. */ extern char *ether_ntoa (const struct ether_addr *__addr) __THROW; extern char *ether_ntoa_r (const struct ether_addr *__addr, char *__buf) __THROW; /* Convert ASCII string S to 48 bit Ethernet address. */ extern struct ether_addr *ether_aton (const char *__asc) __THROW; extern struct ether_addr *ether_aton_r (const char *__asc, struct ether_addr *__addr) __THROW; /* Map 48 bit Ethernet number ADDR to HOSTNAME. */ extern int ether_ntohost (char *__hostname, const struct ether_addr *__addr) __THROW; /* Map HOSTNAME to 48 bit Ethernet address. */ extern int ether_hostton (const char *__hostname, struct ether_addr *__addr) __THROW; /* Scan LINE and set ADDR and HOSTNAME. */ extern int ether_line (const char *__line, struct ether_addr *__addr, char *__hostname) __THROW; __END_DECLS #endif /* Use misc. */ #endif /* netinet/ether.h */ PKZ6$$ netinet/ip.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __NETINET_IP_H #define __NETINET_IP_H 1 #include #include #include __BEGIN_DECLS struct timestamp { uint8_t len; uint8_t ptr; #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int flags:4; unsigned int overflow:4; #elif __BYTE_ORDER == __BIG_ENDIAN unsigned int overflow:4; unsigned int flags:4; #else # error "Please fix " #endif uint32_t data[9]; }; struct iphdr { #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int ihl:4; unsigned int version:4; #elif __BYTE_ORDER == __BIG_ENDIAN unsigned int version:4; unsigned int ihl:4; #else # error "Please fix " #endif uint8_t tos; uint16_t tot_len; uint16_t id; uint16_t frag_off; uint8_t ttl; uint8_t protocol; uint16_t check; uint32_t saddr; uint32_t daddr; /*The options start here. */ }; #ifdef __USE_MISC /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ip.h 8.1 (Berkeley) 6/10/93 */ /* * Definitions for internet protocol version 4. * Per RFC 791, September 1981. */ /* * Structure of an internet header, naked of options. */ struct ip { #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int ip_hl:4; /* header length */ unsigned int ip_v:4; /* version */ #endif #if __BYTE_ORDER == __BIG_ENDIAN unsigned int ip_v:4; /* version */ unsigned int ip_hl:4; /* header length */ #endif uint8_t ip_tos; /* type of service */ unsigned short ip_len; /* total length */ unsigned short ip_id; /* identification */ unsigned short ip_off; /* fragment offset field */ #define IP_RF 0x8000 /* reserved fragment flag */ #define IP_DF 0x4000 /* dont fragment flag */ #define IP_MF 0x2000 /* more fragments flag */ #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ uint8_t ip_ttl; /* time to live */ uint8_t ip_p; /* protocol */ unsigned short ip_sum; /* checksum */ struct in_addr ip_src, ip_dst; /* source and dest address */ }; /* * Time stamp option structure. */ struct ip_timestamp { uint8_t ipt_code; /* IPOPT_TS */ uint8_t ipt_len; /* size of structure (variable) */ uint8_t ipt_ptr; /* index of current entry */ #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int ipt_flg:4; /* flags, see below */ unsigned int ipt_oflw:4; /* overflow counter */ #endif #if __BYTE_ORDER == __BIG_ENDIAN unsigned int ipt_oflw:4; /* overflow counter */ unsigned int ipt_flg:4; /* flags, see below */ #endif uint32_t data[9]; }; #endif /* __USE_MISC */ #define IPVERSION 4 /* IP version number */ #define IP_MAXPACKET 65535 /* maximum packet size */ /* * Definitions for Explicit Congestion Notification (ECN) * * Taken from RFC-3168, Section 5. */ #define IPTOS_ECN_MASK 0x03 #define IPTOS_ECN(x) ((x) & IPTOS_ECN_MASK) #define IPTOS_ECN_NOT_ECT 0x00 #define IPTOS_ECN_ECT1 0x01 #define IPTOS_ECN_ECT0 0x02 #define IPTOS_ECN_CE 0x03 /* * Definitions for IP differentiated services code points (DSCP) * * Taken from RFC-2597, Section 6 and RFC-2598, Section 2.3. */ #define IPTOS_DSCP_MASK 0xfc #define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK) #define IPTOS_DSCP_AF11 0x28 #define IPTOS_DSCP_AF12 0x30 #define IPTOS_DSCP_AF13 0x38 #define IPTOS_DSCP_AF21 0x48 #define IPTOS_DSCP_AF22 0x50 #define IPTOS_DSCP_AF23 0x58 #define IPTOS_DSCP_AF31 0x68 #define IPTOS_DSCP_AF32 0x70 #define IPTOS_DSCP_AF33 0x78 #define IPTOS_DSCP_AF41 0x88 #define IPTOS_DSCP_AF42 0x90 #define IPTOS_DSCP_AF43 0x98 #define IPTOS_DSCP_EF 0xb8 /* * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume * the old ToS Precedence values. */ #define IPTOS_CLASS_MASK 0xe0 #define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK) #define IPTOS_CLASS_CS0 0x00 #define IPTOS_CLASS_CS1 0x20 #define IPTOS_CLASS_CS2 0x40 #define IPTOS_CLASS_CS3 0x60 #define IPTOS_CLASS_CS4 0x80 #define IPTOS_CLASS_CS5 0xa0 #define IPTOS_CLASS_CS6 0xc0 #define IPTOS_CLASS_CS7 0xe0 #define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0 /* * Definitions for IP type of service (ip_tos) [deprecated; use DSCP * and CS definitions above instead.] */ #define IPTOS_TOS_MASK 0x1E #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) #define IPTOS_LOWDELAY 0x10 #define IPTOS_THROUGHPUT 0x08 #define IPTOS_RELIABILITY 0x04 #define IPTOS_LOWCOST 0x02 #define IPTOS_MINCOST IPTOS_LOWCOST /* * Definitions for IP precedence (also in ip_tos) [also deprecated.] */ #define IPTOS_PREC_MASK IPTOS_CLASS_MASK #define IPTOS_PREC(tos) IPTOS_CLASS(tos) #define IPTOS_PREC_NETCONTROL IPTOS_CLASS_CS7 #define IPTOS_PREC_INTERNETCONTROL IPTOS_CLASS_CS6 #define IPTOS_PREC_CRITIC_ECP IPTOS_CLASS_CS5 #define IPTOS_PREC_FLASHOVERRIDE IPTOS_CLASS_CS4 #define IPTOS_PREC_FLASH IPTOS_CLASS_CS3 #define IPTOS_PREC_IMMEDIATE IPTOS_CLASS_CS2 #define IPTOS_PREC_PRIORITY IPTOS_CLASS_CS1 #define IPTOS_PREC_ROUTINE IPTOS_CLASS_CS0 /* * Definitions for options. */ #define IPOPT_COPY 0x80 #define IPOPT_CLASS_MASK 0x60 #define IPOPT_NUMBER_MASK 0x1f #define IPOPT_COPIED(o) ((o) & IPOPT_COPY) #define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK) #define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK) #define IPOPT_CONTROL 0x00 #define IPOPT_RESERVED1 0x20 #define IPOPT_DEBMEAS 0x40 #define IPOPT_MEASUREMENT IPOPT_DEBMEAS #define IPOPT_RESERVED2 0x60 #define IPOPT_EOL 0 /* end of option list */ #define IPOPT_END IPOPT_EOL #define IPOPT_NOP 1 /* no operation */ #define IPOPT_NOOP IPOPT_NOP #define IPOPT_RR 7 /* record packet route */ #define IPOPT_TS 68 /* timestamp */ #define IPOPT_TIMESTAMP IPOPT_TS #define IPOPT_SECURITY 130 /* provide s,c,h,tcc */ #define IPOPT_SEC IPOPT_SECURITY #define IPOPT_LSRR 131 /* loose source route */ #define IPOPT_SATID 136 /* satnet id */ #define IPOPT_SID IPOPT_SATID #define IPOPT_SSRR 137 /* strict source route */ #define IPOPT_RA 148 /* router alert */ /* * Offsets to fields in options other than EOL and NOP. */ #define IPOPT_OPTVAL 0 /* option ID */ #define IPOPT_OLEN 1 /* option length */ #define IPOPT_OFFSET 2 /* offset within option */ #define IPOPT_MINOFF 4 /* min value of above */ #define MAX_IPOPTLEN 40 /* flag bits for ipt_flg */ #define IPOPT_TS_TSONLY 0 /* timestamps only */ #define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ #define IPOPT_TS_PRESPEC 3 /* specified modules only */ /* bits for security (not byte swapped) */ #define IPOPT_SECUR_UNCLASS 0x0000 #define IPOPT_SECUR_CONFID 0xf135 #define IPOPT_SECUR_EFTO 0x789a #define IPOPT_SECUR_MMMM 0xbc4d #define IPOPT_SECUR_RESTR 0xaf13 #define IPOPT_SECUR_SECRET 0xd788 #define IPOPT_SECUR_TOPSECRET 0x6bc5 /* * Internet implementation parameters. */ #define MAXTTL 255 /* maximum time to live (seconds) */ #define IPDEFTTL 64 /* default ttl, from RFC 1340 */ #define IPFRAGTTL 60 /* time to live for frags, slowhz */ #define IPTTLDEC 1 /* subtracted when forwarding */ #define IP_MSS 576 /* default maximum segment size */ __END_DECLS #endif /* netinet/ip.h */ PKZ&ěnetinet/if_fddi.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_IF_FDDI_H #define _NETINET_IF_FDDI_H 1 #include #include #include #ifdef __USE_MISC struct fddi_header { uint8_t fddi_fc; /* Frame Control (FC) value */ uint8_t fddi_dhost[FDDI_K_ALEN]; /* Destination host */ uint8_t fddi_shost[FDDI_K_ALEN]; /* Source host */ }; #endif #endif /* netinet/if_fddi.h */ PKZhߊkknetinet/if_tr.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_IF_TR_H #define _NETINET_IF_TR_H 1 #include #include /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble and FCS/CRC (frame check sequence). */ #define TR_ALEN 6 /* Octets in one token-ring addr */ #define TR_HLEN (sizeof (struct trh_hdr) + sizeof (struct trllc)) #define AC 0x10 #define LLC_FRAME 0x40 /* LLC and SNAP constants */ #define EXTENDED_SAP 0xAA #define UI_CMD 0x03 /* This is an Token-Ring frame header. */ struct trh_hdr { uint8_t ac; /* access control field */ uint8_t fc; /* frame control field */ uint8_t daddr[TR_ALEN]; /* destination address */ uint8_t saddr[TR_ALEN]; /* source address */ uint16_t rcf; /* route control field */ uint16_t rseg[8]; /* routing registers */ }; /* This is an Token-Ring LLC structure */ struct trllc { uint8_t dsap; /* destination SAP */ uint8_t ssap; /* source SAP */ uint8_t llc; /* LLC control field */ uint8_t protid[3]; /* protocol id */ uint16_t ethertype; /* ether type field */ }; /* Token-Ring statistics collection data. */ struct tr_statistics { unsigned long rx_packets; /* total packets received */ unsigned long tx_packets; /* total packets transmitted */ unsigned long rx_bytes; /* total bytes received */ unsigned long tx_bytes; /* total bytes transmitted */ unsigned long rx_errors; /* bad packets received */ unsigned long tx_errors; /* packet transmit problems */ unsigned long rx_dropped; /* no space in linux buffers */ unsigned long tx_dropped; /* no space available in linux */ unsigned long multicast; /* multicast packets received */ unsigned long transmit_collision; /* detailed Token-Ring errors. See IBM Token-Ring Network Architecture for more info */ unsigned long line_errors; unsigned long internal_errors; unsigned long burst_errors; unsigned long A_C_errors; unsigned long abort_delimiters; unsigned long lost_frames; unsigned long recv_congest_count; unsigned long frame_copied_errors; unsigned long frequency_errors; unsigned long token_errors; unsigned long dummy1; }; /* source routing stuff */ #define TR_RII 0x80 #define TR_RCF_DIR_BIT 0x80 #define TR_RCF_LEN_MASK 0x1f00 #define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */ #define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */ #define TR_RCF_FRAME2K 0x20 #define TR_RCF_BROADCAST_MASK 0xC000 #define TR_MAXRIFLEN 18 #ifdef __USE_MISC struct trn_hdr { uint8_t trn_ac; /* access control field */ uint8_t trn_fc; /* field control field */ uint8_t trn_dhost[TR_ALEN]; /* destination host */ uint8_t trn_shost[TR_ALEN]; /* source host */ uint16_t trn_rcf; /* route control field */ uint16_t trn_rseg[8]; /* routing registers */ }; #endif #endif /* netinet/if_tr.h */ PKZj(netinet/igmp.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_IGMP_H #define _NETINET_IGMP_H 1 #include #include #ifdef __USE_MISC #include __BEGIN_DECLS /* * Copyright (c) 1988 Stephen Deering. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Stephen Deering of Stanford University. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)igmp.h 8.1 (Berkeley) 6/10/93 * $FreeBSD$ */ struct igmp { uint8_t igmp_type; /* IGMP type */ uint8_t igmp_code; /* routing code */ uint16_t igmp_cksum; /* checksum */ struct in_addr igmp_group; /* group address */ }; #define IGMP_MINLEN 8 /* * Message types, including version number. */ #define IGMP_MEMBERSHIP_QUERY 0x11 /* membership query */ #define IGMP_V1_MEMBERSHIP_REPORT 0x12 /* Ver. 1 membership report */ #define IGMP_V2_MEMBERSHIP_REPORT 0x16 /* Ver. 2 membership report */ #define IGMP_V2_LEAVE_GROUP 0x17 /* Leave-group message */ #define IGMP_DVMRP 0x13 /* DVMRP routing message */ #define IGMP_PIM 0x14 /* PIM routing message */ #define IGMP_TRACE 0x15 #define IGMP_MTRACE_RESP 0x1e /* traceroute resp.(to sender)*/ #define IGMP_MTRACE 0x1f /* mcast traceroute messages */ #define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */ /* query (in seconds) according */ /* to RFC1112 */ #define IGMP_TIMER_SCALE 10 /* denotes that the igmp code field */ /* specifies time in 10th of seconds*/ /* * States for the IGMP v2 state table. */ #define IGMP_DELAYING_MEMBER 1 #define IGMP_IDLE_MEMBER 2 #define IGMP_LAZY_MEMBER 3 #define IGMP_SLEEPING_MEMBER 4 #define IGMP_AWAKENING_MEMBER 5 /* * States for IGMP router version cache. */ #define IGMP_v1_ROUTER 1 #define IGMP_v2_ROUTER 2 /* * The following four defininitions are for backwards compatibility. * They should be removed as soon as all applications are updated to * use the new constant names. */ #define IGMP_HOST_MEMBERSHIP_QUERY IGMP_MEMBERSHIP_QUERY #define IGMP_HOST_MEMBERSHIP_REPORT IGMP_V1_MEMBERSHIP_REPORT #define IGMP_HOST_NEW_MEMBERSHIP_REPORT IGMP_V2_MEMBERSHIP_REPORT #define IGMP_HOST_LEAVE_MESSAGE IGMP_V2_LEAVE_GROUP __END_DECLS #endif #endif /* netinet/igmp.h */ PKZ%922link.hnu[/* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _LINK_H #define _LINK_H 1 #include #include #include #include /* We use this macro to refer to ELF types independent of the native wordsize. `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */ #define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type) #define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) #define _ElfW_1(e,w,t) e##w##t #include /* Defines __ELF_NATIVE_CLASS. */ #include /* Rendezvous structure used by the run-time dynamic linker to communicate details of shared object loading to the debugger. If the executable's dynamic section has a DT_DEBUG element, the run-time linker sets that element's value to the address where this structure can be found. */ struct r_debug { int r_version; /* Version number for this protocol. */ struct link_map *r_map; /* Head of the chain of loaded objects. */ /* This is the address of a function internal to the run-time linker, that will always be called when the linker begins to map in a library or unmap it, and again when the mapping change is complete. The debugger can set a breakpoint at this address if it wants to notice shared object mapping changes. */ ElfW(Addr) r_brk; enum { /* This state value describes the mapping change taking place when the `r_brk' address is called. */ RT_CONSISTENT, /* Mapping change is complete. */ RT_ADD, /* Beginning to add a new object. */ RT_DELETE /* Beginning to remove an object mapping. */ } r_state; ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */ }; /* This is the instance of that structure used by the dynamic linker. */ extern struct r_debug _r_debug; /* This symbol refers to the "dynamic structure" in the `.dynamic' section of whatever module refers to `_DYNAMIC'. So, to find its own `struct r_debug', a program could do: for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) if (dyn->d_tag == DT_DEBUG) r_debug = (struct r_debug *) dyn->d_un.d_ptr; */ extern ElfW(Dyn) _DYNAMIC[]; /* Structure describing a loaded shared object. The `l_next' and `l_prev' members form a chain of all the shared objects loaded at startup. These data structures exist in space used by the run-time dynamic linker; modifying them may have disastrous results. */ struct link_map { /* These first few members are part of the protocol with the debugger. This is the same format used in SVR4. */ ElfW(Addr) l_addr; /* Difference between the address in the ELF file and the addresses in memory. */ char *l_name; /* Absolute file name object was found in. */ ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */ struct link_map *l_next, *l_prev; /* Chain of loaded objects. */ }; #ifdef __USE_GNU /* Version numbers for la_version handshake interface. */ #include /* Activity types signaled through la_activity. */ enum { LA_ACT_CONSISTENT, /* Link map consistent again. */ LA_ACT_ADD, /* New object will be added. */ LA_ACT_DELETE /* Objects will be removed. */ }; /* Values representing origin of name for dynamic loading. */ enum { LA_SER_ORIG = 0x01, /* Original name. */ LA_SER_LIBPATH = 0x02, /* Directory from LD_LIBRARY_PATH. */ LA_SER_RUNPATH = 0x04, /* Directory from RPATH/RUNPATH. */ LA_SER_CONFIG = 0x08, /* Found through ldconfig. */ LA_SER_DEFAULT = 0x40, /* Default directory. */ LA_SER_SECURE = 0x80 /* Unused. */ }; /* Values for la_objopen return value. */ enum { LA_FLG_BINDTO = 0x01, /* Audit symbols bound to this object. */ LA_FLG_BINDFROM = 0x02 /* Audit symbols bound from this object. */ }; /* Values for la_symbind flags parameter. */ enum { LA_SYMB_NOPLTENTER = 0x01, /* la_pltenter will not be called. */ LA_SYMB_NOPLTEXIT = 0x02, /* la_pltexit will not be called. */ LA_SYMB_STRUCTCALL = 0x04, /* Return value is a structure. */ LA_SYMB_DLSYM = 0x08, /* Binding due to dlsym call. */ LA_SYMB_ALTVALUE = 0x10 /* Value has been changed by a previous la_symbind call. */ }; struct dl_phdr_info { ElfW(Addr) dlpi_addr; const char *dlpi_name; const ElfW(Phdr) *dlpi_phdr; ElfW(Half) dlpi_phnum; /* Note: Following members were introduced after the first version of this structure was available. Check the SIZE argument passed to the dl_iterate_phdr callback to determine whether or not each later member is available. */ /* Incremented when a new object may have been added. */ __extension__ unsigned long long int dlpi_adds; /* Incremented when an object may have been removed. */ __extension__ unsigned long long int dlpi_subs; /* If there is a PT_TLS segment, its module ID as used in TLS relocations, else zero. */ size_t dlpi_tls_modid; /* The address of the calling thread's instance of this module's PT_TLS segment, if it has one and it has been allocated in the calling thread, otherwise a null pointer. */ void *dlpi_tls_data; }; __BEGIN_DECLS extern int dl_iterate_phdr (int (*__callback) (struct dl_phdr_info *, size_t, void *), void *__data); /* Prototypes for the ld.so auditing interfaces. These are not defined anywhere in ld.so but instead have to be provided by the auditing DSO. */ extern unsigned int la_version (unsigned int __version); extern void la_activity (uintptr_t *__cookie, unsigned int __flag); extern char *la_objsearch (const char *__name, uintptr_t *__cookie, unsigned int __flag); extern unsigned int la_objopen (struct link_map *__map, Lmid_t __lmid, uintptr_t *__cookie); extern void la_preinit (uintptr_t *__cookie); extern uintptr_t la_symbind32 (Elf32_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, unsigned int *__flags, const char *__symname); extern uintptr_t la_symbind64 (Elf64_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, unsigned int *__flags, const char *__symname); extern unsigned int la_objclose (uintptr_t *__cookie); __END_DECLS #endif #endif /* link.h */ PKZ)ґeebzlib.hnu[ /*-------------------------------------------------------------*/ /*--- Public header file for the library. ---*/ /*--- bzlib.h ---*/ /*-------------------------------------------------------------*/ /* ------------------------------------------------------------------ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. bzip2/libbzip2 version 1.0.6 of 6 September 2010 Copyright (C) 1996-2010 Julian Seward Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. This program is released under the terms of the license contained in the file LICENSE. ------------------------------------------------------------------ */ #ifndef _BZLIB_H #define _BZLIB_H #ifdef __cplusplus extern "C" { #endif #define BZ_RUN 0 #define BZ_FLUSH 1 #define BZ_FINISH 2 #define BZ_OK 0 #define BZ_RUN_OK 1 #define BZ_FLUSH_OK 2 #define BZ_FINISH_OK 3 #define BZ_STREAM_END 4 #define BZ_SEQUENCE_ERROR (-1) #define BZ_PARAM_ERROR (-2) #define BZ_MEM_ERROR (-3) #define BZ_DATA_ERROR (-4) #define BZ_DATA_ERROR_MAGIC (-5) #define BZ_IO_ERROR (-6) #define BZ_UNEXPECTED_EOF (-7) #define BZ_OUTBUFF_FULL (-8) #define BZ_CONFIG_ERROR (-9) typedef struct { char *next_in; unsigned int avail_in; unsigned int total_in_lo32; unsigned int total_in_hi32; char *next_out; unsigned int avail_out; unsigned int total_out_lo32; unsigned int total_out_hi32; void *state; void *(*bzalloc)(void *,int,int); void (*bzfree)(void *,void *); void *opaque; } bz_stream; #ifndef BZ_IMPORT #define BZ_EXPORT #endif #ifndef BZ_NO_STDIO /* Need a definitition for FILE */ #include #endif #ifdef _WIN32 # include # ifdef small /* windows.h define small to char */ # undef small # endif # ifdef BZ_EXPORT # define BZ_API(func) WINAPI func # define BZ_EXTERN extern # else /* import windows dll dynamically */ # define BZ_API(func) (WINAPI * func) # define BZ_EXTERN # endif #else # define BZ_API(func) func # define BZ_EXTERN extern #endif /*-- Core (low-level) library functions --*/ BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( bz_stream* strm, int blockSize100k, int verbosity, int workFactor ); BZ_EXTERN int BZ_API(BZ2_bzCompress) ( bz_stream* strm, int action ); BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( bz_stream* strm ); BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( bz_stream *strm, int verbosity, int small ); BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( bz_stream* strm ); BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( bz_stream *strm ); /*-- High(er) level library functions --*/ #ifndef BZ_NO_STDIO #define BZ_MAX_UNUSED 5000 typedef void BZFILE; BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( int* bzerror, FILE* f, int verbosity, int small, void* unused, int nUnused ); BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( int* bzerror, BZFILE* b ); BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( int* bzerror, BZFILE* b, void** unused, int* nUnused ); BZ_EXTERN int BZ_API(BZ2_bzRead) ( int* bzerror, BZFILE* b, void* buf, int len ); BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( int* bzerror, FILE* f, int blockSize100k, int verbosity, int workFactor ); BZ_EXTERN void BZ_API(BZ2_bzWrite) ( int* bzerror, BZFILE* b, void* buf, int len ); BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( int* bzerror, BZFILE* b, int abandon, unsigned int* nbytes_in, unsigned int* nbytes_out ); BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( int* bzerror, BZFILE* b, int abandon, unsigned int* nbytes_in_lo32, unsigned int* nbytes_in_hi32, unsigned int* nbytes_out_lo32, unsigned int* nbytes_out_hi32 ); #endif /*-- Utility functions --*/ BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( char* dest, unsigned int* destLen, char* source, unsigned int sourceLen, int blockSize100k, int verbosity, int workFactor ); BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( char* dest, unsigned int* destLen, char* source, unsigned int sourceLen, int small, int verbosity ); /*-- Code contributed by Yoshioka Tsuneo (tsuneo@rr.iij4u.or.jp) to support better zlib compatibility. This code is not _officially_ part of libbzip2 (yet); I haven't tested it, documented it, or considered the threading-safeness of it. If this code breaks, please contact both Yoshioka and me. --*/ BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) ( void ); #ifndef BZ_NO_STDIO BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) ( const char *path, const char *mode ); BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) ( int fd, const char *mode ); BZ_EXTERN int BZ_API(BZ2_bzread) ( BZFILE* b, void* buf, int len ); BZ_EXTERN int BZ_API(BZ2_bzwrite) ( BZFILE* b, void* buf, int len ); BZ_EXTERN int BZ_API(BZ2_bzflush) ( BZFILE* b ); BZ_EXTERN void BZ_API(BZ2_bzclose) ( BZFILE* b ); BZ_EXTERN const char * BZ_API(BZ2_bzerror) ( BZFILE *b, int *errnum ); #endif #ifdef __cplusplus } #endif #endif /*-------------------------------------------------------------*/ /*--- end bzlib.h ---*/ /*-------------------------------------------------------------*/ PKZh2 2 envz.hnu[/* Routines for dealing with '\0' separated environment vectors Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ENVZ_H #define _ENVZ_H 1 #include #include /* Envz's are argz's too, and should be created etc., using the same routines. */ #include __BEGIN_DECLS /* Returns a pointer to the entry in ENVZ for NAME, or 0 if there is none. */ extern char *envz_entry (const char *__restrict __envz, size_t __envz_len, const char *__restrict __name) __THROW __attribute_pure__; /* Returns a pointer to the value portion of the entry in ENVZ for NAME, or 0 if there is none. */ extern char *envz_get (const char *__restrict __envz, size_t __envz_len, const char *__restrict __name) __THROW __attribute_pure__; /* Adds an entry for NAME with value VALUE to ENVZ & ENVZ_LEN. If an entry with the same name already exists in ENVZ, it is removed. If VALUE is NULL, then the new entry will a special null one, for which envz_get will return NULL, although envz_entry will still return an entry; this is handy because when merging with another envz, the null entry can override an entry in the other one. Null entries can be removed with envz_strip (). */ extern error_t envz_add (char **__restrict __envz, size_t *__restrict __envz_len, const char *__restrict __name, const char *__restrict __value) __THROW; /* Adds each entry in ENVZ2 to ENVZ & ENVZ_LEN, as if with envz_add(). If OVERRIDE is true, then values in ENVZ2 will supersede those with the same name in ENV, otherwise not. */ extern error_t envz_merge (char **__restrict __envz, size_t *__restrict __envz_len, const char *__restrict __envz2, size_t __envz2_len, int __override) __THROW; /* Remove the entry for NAME from ENVZ & ENVZ_LEN, if any. */ extern void envz_remove (char **__restrict __envz, size_t *__restrict __envz_len, const char *__restrict __name) __THROW; /* Remove null entries. */ extern void envz_strip (char **__restrict __envz, size_t *__restrict __envz_len) __THROW; __END_DECLS #endif /* envz.h */ PKZ-  criu/criu-log.hnu[/* This file defines types and macros for CRIU plugins. Copyright (C) 2013 Parallels, Inc This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __CRIU_LOG_H__ #define __CRIU_LOG_H__ #include "log.h" extern int log_init(const char *output); extern void log_fini(void); extern int log_init_by_pid(pid_t pid); extern void log_closedir(void); extern int log_keep_err(void); extern char *log_first_err(void); extern void log_set_fd(int fd); extern int log_get_fd(void); extern void log_set_loglevel(unsigned int loglevel); extern unsigned int log_get_loglevel(void); struct timeval; extern void log_get_logstart(struct timeval *); extern int write_pidfile(int pid); #define DEFAULT_LOG_FILENAME "criu.log" static inline int pr_quelled(unsigned int loglevel) { return log_get_loglevel() < loglevel && loglevel != LOG_MSG; } #endif /* __CR_LOG_LEVELS_H__ */ PKZ~h$$ criu/criu.hnu[/* * (C) Copyright 2013 Parallels, Inc. (www.parallels.com). * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 2.1 which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl-2.1.html * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, you can find it here: * www.gnu.org/licenses/lgpl.html */ #ifndef __CRIU_LIB_H__ #define __CRIU_LIB_H__ #include #include "version.h" #ifdef __GNUG__ extern "C" { #endif enum criu_service_comm { CRIU_COMM_SK, CRIU_COMM_FD, CRIU_COMM_BIN }; enum criu_cg_mode { CRIU_CG_MODE_IGNORE, CRIU_CG_MODE_NONE, CRIU_CG_MODE_PROPS, CRIU_CG_MODE_SOFT, CRIU_CG_MODE_FULL, CRIU_CG_MODE_STRICT, CRIU_CG_MODE_DEFAULT, }; int criu_set_service_address(const char *path); void criu_set_service_fd(int fd); int criu_set_service_binary(const char *path); /* * Set opts to defaults. _Must_ be called first before using any functions from * the list down below. 0 on success, -1 on fail. */ int criu_init_opts(void); void criu_free_opts(void); /* * For backward compatibility with the mod_lsapi */ void criu_set_service_comm(enum criu_service_comm); void criu_set_pid(int pid); void criu_set_images_dir_fd(int fd); /* must be set for dump/restore */ int criu_set_parent_images(const char *path); void criu_set_work_dir_fd(int fd); void criu_set_leave_running(bool leave_running); void criu_set_ext_unix_sk(bool ext_unix_sk); int criu_add_unix_sk(unsigned int inode); void criu_set_tcp_established(bool tcp_established); void criu_set_tcp_skip_in_flight(bool tcp_skip_in_flight); void criu_set_tcp_close(bool tcp_close); void criu_set_weak_sysctls(bool val); void criu_set_evasive_devices(bool evasive_devices); void criu_set_shell_job(bool shell_job); void criu_set_file_locks(bool file_locks); void criu_set_track_mem(bool track_mem); void criu_set_auto_dedup(bool auto_dedup); void criu_set_force_irmap(bool force_irmap); void criu_set_link_remap(bool link_remap); void criu_set_log_level(int log_level); void criu_set_root_only(bool root_only); int criu_set_log_file(const char *log_file); void criu_set_cpu_cap(unsigned int cap); int criu_set_root(const char *root); void criu_set_manage_cgroups(bool manage); void criu_set_manage_cgroups_mode(enum criu_cg_mode mode); int criu_set_freeze_cgroup(const char *name); int criu_set_lsm_profile(const char *name); void criu_set_timeout(unsigned int timeout); void criu_set_auto_ext_mnt(bool val); void criu_set_ext_sharing(bool val); void criu_set_ext_masters(bool val); int criu_set_exec_cmd(int argc, char *argv[]); int criu_add_ext_mount(const char *key, const char *val); int criu_add_veth_pair(const char *in, const char *out); int criu_add_cg_root(const char *ctrl, const char *path); int criu_add_enable_fs(const char *fs); int criu_add_skip_mnt(const char *mnt); void criu_set_ghost_limit(unsigned int limit); int criu_add_irmap_path(const char *path); int criu_add_inherit_fd(int fd, const char *key); int criu_add_external(const char *key); int criu_set_page_server_address_port(const char *address, int port); /* * The criu_notify_arg_t na argument is an opaque * value that callbacks (cb-s) should pass into * criu_notify_xxx() calls to fetch arbitrary values * from notification. If the value is not available * some non-existing one is reported. */ typedef struct _CriuNotify *criu_notify_arg_t; void criu_set_notify_cb(int (*cb)(char *action, criu_notify_arg_t na)); /* Get pid of root task. 0 if not available */ int criu_notify_pid(criu_notify_arg_t na); /* Here is a table of return values and errno's of functions * from the list down below. * * Return value errno Description * ---------------------------------------------------------------------------- * 0 undefined Success. * * >0 undefined Success(criu_restore() only). * * -BADE rpc err (0 for now) RPC has returned fail. * * -ECONNREFUSED errno Unable to connect to CRIU. * * -ECOMM errno Unable to send/recv msg to/from CRIU. * * -EINVAL undefined CRIU doesn't support this type of request. * You should probably update CRIU. * * -EBADMSG undefined Unexpected response from CRIU. * You should probably update CRIU. */ int criu_check(void); int criu_dump(void); int criu_restore(void); int criu_restore_child(void); /* * Perform dumping but with preliminary iterations. Each * time an iteration ends the ->more callback is called. * The callback's return value is * - positive -- one more iteration starts * - zero -- final dump is performed and call exits * - negative -- dump is aborted, the value is returned * back from criu_dump_iters * * The @pi argument is an opaque value that caller may * use to request pre-dump statistics (not yet implemented). */ typedef void *criu_predump_info; int criu_dump_iters(int (*more)(criu_predump_info pi)); /* * Same as the list above, but lets you have your very own options * structure and lets you set individual options in it. */ typedef struct criu_opts criu_opts; int criu_local_init_opts(criu_opts **opts); void criu_local_free_opts(criu_opts *opts); int criu_local_set_service_address(criu_opts *opts, const char *path); void criu_local_set_service_fd(criu_opts *opts, int fd); void criu_local_set_service_fd(criu_opts *opts, int fd); void criu_local_set_pid(criu_opts *opts, int pid); void criu_local_set_images_dir_fd(criu_opts *opts, int fd); /* must be set for dump/restore */ int criu_local_set_parent_images(criu_opts *opts, const char *path); int criu_local_set_service_binary(criu_opts *opts, const char *path); void criu_local_set_work_dir_fd(criu_opts *opts, int fd); void criu_local_set_leave_running(criu_opts *opts, bool leave_running); void criu_local_set_ext_unix_sk(criu_opts *opts, bool ext_unix_sk); int criu_local_add_unix_sk(criu_opts *opts, unsigned int inode); void criu_local_set_tcp_established(criu_opts *opts, bool tcp_established); void criu_local_set_tcp_skip_in_flight(criu_opts *opts, bool tcp_skip_in_flight); void criu_local_set_tcp_close(criu_opts *opts, bool tcp_close); void criu_local_set_weak_sysctls(criu_opts *opts, bool val); void criu_local_set_evasive_devices(criu_opts *opts, bool evasive_devices); void criu_local_set_shell_job(criu_opts *opts, bool shell_job); void criu_local_set_file_locks(criu_opts *opts, bool file_locks); void criu_local_set_track_mem(criu_opts *opts, bool track_mem); void criu_local_set_auto_dedup(criu_opts *opts, bool auto_dedup); void criu_local_set_force_irmap(criu_opts *opts, bool force_irmap); void criu_local_set_link_remap(criu_opts *opts, bool link_remap); void criu_local_set_log_level(criu_opts *opts, int log_level); void criu_local_set_root_only(criu_opts *opts, bool root_only); int criu_local_set_log_file(criu_opts *opts, const char *log_file); void criu_local_set_cpu_cap(criu_opts *opts, unsigned int cap); int criu_local_set_root(criu_opts *opts, const char *root); void criu_local_set_manage_cgroups(criu_opts *opts, bool manage); void criu_local_set_manage_cgroups_mode(criu_opts *opts, enum criu_cg_mode mode); int criu_local_set_freeze_cgroup(criu_opts *opts, const char *name); int criu_local_set_lsm_profile(criu_opts *opts, const char *name); void criu_local_set_timeout(criu_opts *opts, unsigned int timeout); void criu_local_set_auto_ext_mnt(criu_opts *opts, bool val); void criu_local_set_ext_sharing(criu_opts *opts, bool val); void criu_local_set_ext_masters(criu_opts *opts, bool val); int criu_local_set_exec_cmd(criu_opts *opts, int argc, char *argv[]); int criu_local_add_ext_mount(criu_opts *opts, const char *key, const char *val); int criu_local_add_veth_pair(criu_opts *opts, const char *in, const char *out); int criu_local_add_cg_root(criu_opts *opts, const char *ctrl, const char *path); int criu_local_add_enable_fs(criu_opts *opts, const char *fs); int criu_local_add_skip_mnt(criu_opts *opts, const char *mnt); void criu_local_set_ghost_limit(criu_opts *opts, unsigned int limit); int criu_local_add_irmap_path(criu_opts *opts, const char *path); int criu_local_add_cg_props(criu_opts *opts, const char *stream); int criu_local_add_cg_props_file(criu_opts *opts, const char *path); int criu_local_add_cg_dump_controller(criu_opts *opts, const char *name); int criu_local_add_inherit_fd(criu_opts *opts, int fd, const char *key); int criu_local_add_external(criu_opts *opts, const char *key); int criu_local_set_page_server_address_port(criu_opts *opts, const char *address, int port); void criu_local_set_notify_cb(criu_opts *opts, int (*cb)(char *action, criu_notify_arg_t na)); int criu_local_check(criu_opts *opts); int criu_local_dump(criu_opts *opts); int criu_local_restore(criu_opts *opts); int criu_local_restore_child(criu_opts *opts); int criu_local_dump_iters(criu_opts *opts, int (*more)(criu_predump_info pi)); #ifdef __GNUG__ } #endif #endif /* __CRIU_LIB_H__ */ PKZ˗VJJcriu/rpc.protonu[syntax = "proto2"; message criu_page_server_info { optional string address = 1; optional int32 port = 2; optional int32 pid = 3; optional int32 fd = 4; } message criu_veth_pair { required string if_in = 1; required string if_out = 2; }; message ext_mount_map { required string key = 1; required string val = 2; }; message join_namespace { required string ns = 1; required string ns_file = 2; optional string extra_opt = 3; } message inherit_fd { required string key = 1; required int32 fd = 2; }; message cgroup_root { optional string ctrl = 1; required string path = 2; }; message unix_sk { required uint32 inode = 1; }; enum criu_cg_mode { IGNORE = 0; CG_NONE = 1; PROPS = 2; SOFT = 3; FULL = 4; STRICT = 5; DEFAULT = 6; }; message criu_opts { required int32 images_dir_fd = 1; optional int32 pid = 2; /* if not set on dump, will dump requesting process */ optional bool leave_running = 3; optional bool ext_unix_sk = 4; optional bool tcp_established = 5; optional bool evasive_devices = 6; optional bool shell_job = 7; optional bool file_locks = 8; optional int32 log_level = 9 [default = 2]; optional string log_file = 10; /* No subdirs are allowed. Consider using work-dir */ optional criu_page_server_info ps = 11; optional bool notify_scripts = 12; optional string root = 13; optional string parent_img = 14; optional bool track_mem = 15; optional bool auto_dedup = 16; optional int32 work_dir_fd = 17; optional bool link_remap = 18; repeated criu_veth_pair veths = 19; /* DEPRECATED, use external instead */ optional uint32 cpu_cap = 20 [default = 0xffffffff]; optional bool force_irmap = 21; repeated string exec_cmd = 22; repeated ext_mount_map ext_mnt = 23; /* DEPRECATED, use external instead */ optional bool manage_cgroups = 24; /* backward compatibility */ repeated cgroup_root cg_root = 25; optional bool rst_sibling = 26; /* swrk only */ repeated inherit_fd inherit_fd = 27; /* swrk only */ optional bool auto_ext_mnt = 28; optional bool ext_sharing = 29; optional bool ext_masters = 30; repeated string skip_mnt = 31; repeated string enable_fs = 32; repeated unix_sk unix_sk_ino = 33; /* DEPRECATED, use external instead */ optional criu_cg_mode manage_cgroups_mode = 34; optional uint32 ghost_limit = 35 [default = 0x100000]; repeated string irmap_scan_paths = 36; repeated string external = 37; optional uint32 empty_ns = 38; repeated join_namespace join_ns = 39; optional string cgroup_props = 41; optional string cgroup_props_file = 42; repeated string cgroup_dump_controller = 43; optional string freeze_cgroup = 44; optional uint32 timeout = 45; optional bool tcp_skip_in_flight = 46; optional bool weak_sysctls = 47; optional bool lazy_pages = 48; optional int32 status_fd = 49; optional bool orphan_pts_master = 50; optional string config_file = 51; optional bool tcp_close = 52; optional string lsm_profile = 53; optional string tls_cacert = 54; optional string tls_cacrl = 55; optional string tls_cert = 56; optional string tls_key = 57; optional bool tls = 58; optional bool tls_no_cn_verify = 59; optional bool root_only = 60; /* optional bool check_mounts = 128; */ } message criu_dump_resp { optional bool restored = 1; } message criu_restore_resp { required int32 pid = 1; } message criu_notify { optional string script = 1; optional int32 pid = 2; } enum criu_req_type { EMPTY = 0; DUMP = 1; RESTORE = 2; CHECK = 3; PRE_DUMP = 4; PAGE_SERVER = 5; NOTIFY = 6; CPUINFO_DUMP = 7; CPUINFO_CHECK = 8; FEATURE_CHECK = 9; VERSION = 10; WAIT_PID = 11; PAGE_SERVER_CHLD = 12; } /* * List of features which can queried via * CRIU_REQ_TYPE__FEATURE_CHECK */ message criu_features { optional bool mem_track = 1; optional bool lazy_pages = 2; } /* * Request -- each type corresponds to must-be-there * request arguments of respective type */ message criu_req { required criu_req_type type = 1; optional criu_opts opts = 2; optional bool notify_success = 3; /* * When set service won't close the connection but * will wait for more req-s to appear. Works not * for all request types. */ optional bool keep_open = 4; /* * 'features' can be used to query which features * are supported by the installed criu/kernel * via RPC. */ optional criu_features features = 5; /* 'pid' is used for WAIT_PID */ optional uint32 pid = 6; } /* * Response -- it states whether the request was served * and additional request-specific information */ message criu_resp { required criu_req_type type = 1; required bool success = 2; optional criu_dump_resp dump = 3; optional criu_restore_resp restore = 4; optional criu_notify notify = 5; optional criu_page_server_info ps = 6; optional int32 cr_errno = 7; optional criu_features features = 8; optional string cr_errmsg = 9; optional criu_version version = 10; optional int32 status = 11; } /* Answer for criu_req_type.VERSION requests */ message criu_version { required int32 major_number = 1; required int32 minor_number = 2; optional string gitid = 3; optional int32 sublevel = 4; optional int32 extra = 5; optional string name = 6; } PKZ\criu/version.hnu[/* Autogenerated, do not edit */ #ifndef __CR_VERSION_H__ #define __CR_VERSION_H__ #define CRIU_VERSION "3.13" #define CRIU_VERSION_MAJOR 3 #define CRIU_VERSION_MINOR 13 #define CRIU_GITID "0" #endif /* __CR_VERSION_H__ */ PKZXcriu/criu-plugin.hnu[/* * This file defines types and macros for CRIU plugins. * Copyright (C) 2013-2014 Parallels, Inc * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __CRIU_PLUGIN_H__ #define __CRIU_PLUGIN_H__ #include #include #define CRIU_PLUGIN_GEN_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define CRIU_PLUGIN_VERSION_MAJOR 0 #define CRIU_PLUGIN_VERSION_MINOR 2 #define CRIU_PLUGIN_VERSION_SUBLEVEL 0 #define CRIU_PLUGIN_VERSION_OLD CRIU_PLUGIN_GEN_VERSION(0,1,0) #define CRIU_PLUGIN_VERSION \ CRIU_PLUGIN_GEN_VERSION(CRIU_PLUGIN_VERSION_MAJOR, \ CRIU_PLUGIN_VERSION_MINOR, \ CRIU_PLUGIN_VERSION_SUBLEVEL) /* * Plugin hook points and their arguments in hooks. */ enum { CR_PLUGIN_HOOK__DUMP_UNIX_SK = 0, CR_PLUGIN_HOOK__RESTORE_UNIX_SK = 1, CR_PLUGIN_HOOK__DUMP_EXT_FILE = 2, CR_PLUGIN_HOOK__RESTORE_EXT_FILE = 3, CR_PLUGIN_HOOK__DUMP_EXT_MOUNT = 4, CR_PLUGIN_HOOK__RESTORE_EXT_MOUNT = 5, CR_PLUGIN_HOOK__DUMP_EXT_LINK = 6, CR_PLUGIN_HOOK__MAX }; #define DECLARE_PLUGIN_HOOK_ARGS(__hook, ...) \ typedef int (__hook ##_t)(__VA_ARGS__) DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__DUMP_UNIX_SK, int fd, int id); DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__RESTORE_UNIX_SK, int id); DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__DUMP_EXT_FILE, int fd, int id); DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__RESTORE_EXT_FILE, int id); DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__DUMP_EXT_MOUNT, char *mountpoint, int id); DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__RESTORE_EXT_MOUNT, int id, char *mountpoint, char *old_root, int *is_file); DECLARE_PLUGIN_HOOK_ARGS(CR_PLUGIN_HOOK__DUMP_EXT_LINK, int index, int type, char *kind); enum { CR_PLUGIN_STAGE__DUMP, CR_PLUGIN_STAGE__PRE_DUMP, CR_PLUGIN_STAGE__RESTORE, CR_PLUGIN_STAGE_MAX }; /* * Plugin descriptor. */ typedef struct { const char *name; int (*init)(int stage); void (*exit)(int stage, int ret); unsigned int version; unsigned int max_hooks; void *hooks[CR_PLUGIN_HOOK__MAX]; } cr_plugin_desc_t; extern cr_plugin_desc_t CR_PLUGIN_DESC; #define CR_PLUGIN_REGISTER(___name, ___init, ___exit) \ cr_plugin_desc_t CR_PLUGIN_DESC = { \ .name = ___name, \ .init = ___init, \ .exit = ___exit, \ .version = CRIU_PLUGIN_VERSION, \ .max_hooks = CR_PLUGIN_HOOK__MAX, \ }; static inline int cr_plugin_dummy_init(int stage) { return 0; } static inline void cr_plugin_dummy_exit(int stage, int ret) { } #define CR_PLUGIN_REGISTER_DUMMY(___name) \ cr_plugin_desc_t CR_PLUGIN_DESC = { \ .name = ___name, \ .init = cr_plugin_dummy_init, \ .exit = cr_plugin_dummy_exit, \ .version = CRIU_PLUGIN_VERSION, \ .max_hooks = CR_PLUGIN_HOOK__MAX, \ }; #define CR_PLUGIN_REGISTER_HOOK(__hook, __func) \ static void __attribute__((constructor)) cr_plugin_register_hook_##__func (void) \ { \ CR_PLUGIN_DESC.hooks[__hook] = (void *)__func; \ } /* Public API */ extern int criu_get_image_dir(void); /* * Deprecated, will be removed in next version. */ typedef int (cr_plugin_init_t)(void); typedef void (cr_plugin_fini_t)(void); typedef int (cr_plugin_dump_unix_sk_t)(int fd, int id); typedef int (cr_plugin_restore_unix_sk_t)(int id); typedef int (cr_plugin_dump_file_t)(int fd, int id); typedef int (cr_plugin_restore_file_t)(int id); typedef int (cr_plugin_dump_ext_mount_t)(char *mountpoint, int id); typedef int (cr_plugin_restore_ext_mount_t)(int id, char *mountpoint, char *old_root, int *is_file); typedef int (cr_plugin_dump_ext_link_t)(int index, int type, char *kind); #endif /* __CRIU_PLUGIN_H__ */ PKZF5F5tic.hnu[/**************************************************************************** * Copyright (c) 1998-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * * and: Thomas E. Dickey 1996 on * ****************************************************************************/ /* * $Id: tic.h,v 1.75 2017/07/29 23:21:06 tom Exp $ * tic.h - Global variables and structures for the terminfo compiler. */ #ifndef __TIC_H #define __TIC_H /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" { #endif #include #include /* for the _tracef() prototype, ERR/OK, bool defs */ /* ** The format of SVr2 compiled terminfo files is as follows: ** ** Header (12 bytes), containing information given below ** Names Section, containing the names of the terminal ** Boolean Section, containing the values of all of the ** boolean capabilities ** A null byte may be inserted here to make ** sure that the Number Section begins on an ** even word boundary. ** Number Section, containing the values of all of the numeric ** capabilities, each as a short integer ** String Section, containing short integer offsets into the ** String Table, one per string capability ** String Table, containing the actual characters of the string ** capabilities. ** ** In the SVr2 format, "short" means signed 16-bit numbers, which is sometimes ** inconvenient. The numbers are signed, to provide for absent and canceled ** values. ncurses6.1 introduced an extension to this compiled format, by ** making the Number Section a list of signed 32-bit integers. ** ** NOTE that all short integers in the file are stored using VAX/PDP-style ** byte-order, i.e., least-significant byte first. ** ** There is no structure definition here because it would only confuse ** matters. Terminfo format is a raw byte layout, not a structure ** dump. If you happen to be on a little-endian machine with 16-bit ** shorts that requires no padding between short members in a struct, ** then there is a natural C structure that captures the header, but ** not very helpfully. */ #define MAGIC 0432 /* first two bytes of a compiled entry */ #define MAGIC2 01036 /* first two bytes of a compiled 32-bit entry */ #undef BYTE #define BYTE(p,n) (unsigned char)((p)[n]) #define IS_NEG1(p) ((BYTE(p,0) == 0377) && (BYTE(p,1) == 0377)) #define IS_NEG2(p) ((BYTE(p,0) == 0376) && (BYTE(p,1) == 0377)) #define LOW_MSB(p) (BYTE(p,0) + 256*BYTE(p,1)) #define IS_TIC_MAGIC(p) (LOW_MSB(p) == MAGIC || LOW_MSB(p) == MAGIC2) #define quick_prefix(s) (!strncmp((s), "b64:", 4) || !strncmp((s), "hex:", 4)) /* * The "maximum" here is misleading; XSI guarantees minimum values, which a * given implementation may exceed. */ #define MAX_NAME_SIZE 512 /* maximum legal name field size (XSI:127) */ #define MAX_ENTRY_SIZE1 4096 /* maximum legal entry size (SVr2) */ #define MAX_ENTRY_SIZE2 32768 /* maximum legal entry size (ncurses6.1) */ #if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR #define MAX_ENTRY_SIZE MAX_ENTRY_SIZE2 #else #define MAX_ENTRY_SIZE MAX_ENTRY_SIZE1 #endif /* * The maximum size of individual name or alias is guaranteed in XSI to be at * least 14, since that corresponds to the older filename lengths. Newer * systems allow longer aliases, though not many terminal descriptions are * written to use them. The MAX_ALIAS symbol is used for warnings. */ #if HAVE_LONG_FILE_NAMES #define MAX_ALIAS 32 /* smaller than POSIX minimum for PATH_MAX */ #else #define MAX_ALIAS 14 /* SVr3 filename length */ #endif /* location of user's personal info directory */ #define PRIVATE_INFO "%s/.terminfo" /* plug getenv("HOME") into %s */ /* * Some traces are designed to be used via tic's verbose option (and similar in * infocmp and toe) rather than the 'trace()' function. So we use the bits * above the normal trace() parameter as a debug-level. */ #define MAX_DEBUG_LEVEL 15 #define DEBUG_LEVEL(n) ((n) << TRACE_SHIFT) #define set_trace_level(n) \ _nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL) \ + DEBUG_LEVEL(MAX_DEBUG_LEVEL) - 1, \ _nc_tracing |= DEBUG_LEVEL(n) #ifdef TRACE #define DEBUG(n, a) if (_nc_tracing >= DEBUG_LEVEL(n)) _tracef a #else #define DEBUG(n, a) /*nothing*/ #endif /* * These are the types of tokens returned by the scanner. The first * three are also used in the hash table of capability names. The scanner * returns one of these values after loading the specifics into the global * structure curr_token. */ #define BOOLEAN 0 /* Boolean capability */ #define NUMBER 1 /* Numeric capability */ #define STRING 2 /* String-valued capability */ #define CANCEL 3 /* Capability to be cancelled in following tc's */ #define NAMES 4 /* The names for a terminal type */ #define UNDEF 5 /* Undefined */ #define NO_PUSHBACK -1 /* used in pushtype to indicate no pushback */ /* * The global structure in which the specific parts of a * scanned token are returned. */ struct token { char *tk_name; /* name of capability */ int tk_valnumber; /* value of capability (if a number) */ char *tk_valstring; /* value of capability (if a string) */ }; /* * Offsets to string capabilities, with the corresponding functionkey codes. */ struct tinfo_fkeys { unsigned offset; chtype code; }; typedef short HashValue; /* * The file comp_captab.c contains an array of these structures, one per * possible capability. These are indexed by a hash table array of pointers to * the same structures for use by the parser. */ struct name_table_entry { const char *nte_name; /* name to hash on */ int nte_type; /* BOOLEAN, NUMBER or STRING */ HashValue nte_index; /* index of associated variable in its array */ HashValue nte_link; /* index in table of next hash, or -1 */ }; /* * Use this structure to hide differences between terminfo and termcap tables. */ typedef struct { unsigned table_size; const HashValue *table_data; HashValue (*hash_of)(const char *); int (*compare_names)(const char *, const char *); } HashData; struct alias { const char *from; const char *to; const char *source; }; #define NOTFOUND ((struct name_table_entry *) 0) /* * The casts are required for correct sign-propagation with systems such as * AIX, IRIX64, Solaris which default to unsigned characters. The C standard * leaves this detail unspecified. */ /* out-of-band values for representing absent capabilities */ #define ABSENT_BOOLEAN ((signed char)-1) /* 255 */ #define ABSENT_NUMERIC (-1) #define ABSENT_STRING (char *)0 /* out-of-band values for representing cancels */ #define CANCELLED_BOOLEAN ((signed char)-2) /* 254 */ #define CANCELLED_NUMERIC (-2) #define CANCELLED_STRING (char *)(-1) #define VALID_BOOLEAN(s) ((unsigned char)(s) <= 1) /* reject "-1" */ #define VALID_NUMERIC(s) ((s) >= 0) #define VALID_STRING(s) ((s) != CANCELLED_STRING && (s) != ABSENT_STRING) /* termcap entries longer than this may break old binaries */ #define MAX_TERMCAP_LENGTH 1023 /* this is a documented limitation of terminfo */ #define MAX_TERMINFO_LENGTH 4096 #ifndef TERMINFO #define TERMINFO "/usr/share/terminfo" #endif #ifdef NCURSES_TERM_ENTRY_H_incl /* * These entrypoints are used only by the ncurses utilities such as tic. */ #ifdef NCURSES_INTERNALS /* access.c */ extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *); extern NCURSES_EXPORT(bool) _nc_is_abs_path (const char *); extern NCURSES_EXPORT(bool) _nc_is_dir_path (const char *); extern NCURSES_EXPORT(bool) _nc_is_file_path (const char *); extern NCURSES_EXPORT(char *) _nc_basename (char *); extern NCURSES_EXPORT(char *) _nc_rootname (char *); /* comp_captab.c */ extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool); extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool); extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool); /* comp_hash.c: name lookup */ extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry (const char *, int, bool); /* comp_scan.c: lexical analysis */ extern NCURSES_EXPORT(int) _nc_get_token (bool); extern NCURSES_EXPORT(void) _nc_panic_mode (char); extern NCURSES_EXPORT(void) _nc_push_token (int); extern NCURSES_EXPORT_VAR(int) _nc_curr_col; extern NCURSES_EXPORT_VAR(int) _nc_curr_line; extern NCURSES_EXPORT_VAR(int) _nc_syntax; extern NCURSES_EXPORT_VAR(int) _nc_strict_bsd; extern NCURSES_EXPORT_VAR(long) _nc_comment_end; extern NCURSES_EXPORT_VAR(long) _nc_comment_start; extern NCURSES_EXPORT_VAR(long) _nc_curr_file_pos; extern NCURSES_EXPORT_VAR(long) _nc_start_line; #define SYN_TERMINFO 0 #define SYN_TERMCAP 1 /* comp_error.c: warning & abort messages */ extern NCURSES_EXPORT(const char *) _nc_get_source (void); extern NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; extern NCURSES_EXPORT(void) _nc_get_type (char *name); extern NCURSES_EXPORT(void) _nc_set_source (const char *const); extern NCURSES_EXPORT(void) _nc_set_type (const char *const); extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2); extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings; /* comp_scan.c */ extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token; /* captoinfo.c: capability conversion */ extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const); extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int const); /* home_terminfo.c */ extern NCURSES_EXPORT(char *) _nc_home_terminfo (void); /* init_keytry.c */ #if BROKEN_LINKER #define _nc_tinfo_fkeys _nc_tinfo_fkeysf() extern NCURSES_EXPORT(const struct tinfo_fkeys *) _nc_tinfo_fkeysf (void); #else extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[]; #endif /* lib_tparm.c */ #define NUM_PARM 9 extern NCURSES_EXPORT_VAR(int) _nc_tparm_err; extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *); /* lib_trace.c */ extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing; extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *); /* lib_tputs.c */ extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */ /* comp_main.c: compiler main */ extern const char * _nc_progname; /* db_iterator.c */ extern NCURSES_EXPORT(const char *) _nc_next_db(DBDIRS *, int *); extern NCURSES_EXPORT(const char *) _nc_tic_dir (const char *); extern NCURSES_EXPORT(void) _nc_first_db(DBDIRS *, int *); extern NCURSES_EXPORT(void) _nc_last_db(void); /* write_entry.c */ extern NCURSES_EXPORT(int) _nc_tic_written (void); #endif /* NCURSES_INTERNALS */ /* * These entrypoints are used by tack. */ /* comp_hash.c: name lookup */ extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry (const char *, const HashValue *); extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool); /* comp_scan.c: lexical analysis */ extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *); /* comp_expand.c: expand string into readable form */ extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int); /* comp_scan.c: decode string from readable form */ extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *); #endif /* NCURSES_TERM_ENTRY_H_incl */ #ifdef __cplusplus } #endif /* *INDENT-ON* */ #endif /* __TIC_H */ PKZmalloc.hnu[/* Prototypes and definition for malloc implementation. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MALLOC_H #define _MALLOC_H 1 #include #include #include #ifdef _LIBC # define __MALLOC_HOOK_VOLATILE # define __MALLOC_DEPRECATED #else # define __MALLOC_HOOK_VOLATILE volatile # define __MALLOC_DEPRECATED __attribute_deprecated__ #endif __BEGIN_DECLS /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) __THROW __attribute_malloc__ __wur; /* Re-allocate the previously allocated block in __ptr, making the new block SIZE bytes long. */ /* __attribute_malloc__ is not used, because if realloc returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) __THROW __attribute_warn_unused_result__; /* Re-allocate the previously allocated block in PTR, making the new block large enough for NMEMB elements of SIZE bytes each. */ /* __attribute_malloc__ is not used, because if reallocarray returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __THROW __attribute_warn_unused_result__; /* Free a block allocated by `malloc', `realloc' or `calloc'. */ extern void free (void *__ptr) __THROW; /* Allocate SIZE bytes allocated to ALIGNMENT bytes. */ extern void *memalign (size_t __alignment, size_t __size) __THROW __attribute_malloc__ __wur; /* Allocate SIZE bytes on a page boundary. */ extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur; /* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up __size to nearest pagesize. */ extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur; /* Underlying allocation function; successive calls should return contiguous pieces of memory. */ extern void *(*__morecore) (ptrdiff_t __size); /* Default value of `__morecore'. */ extern void *__default_morecore (ptrdiff_t __size) __THROW __attribute_malloc__; /* SVID2/XPG mallinfo structure */ struct mallinfo { int arena; /* non-mmapped space allocated from system */ int ordblks; /* number of free chunks */ int smblks; /* number of fastbin blocks */ int hblks; /* number of mmapped regions */ int hblkhd; /* space in mmapped regions */ int usmblks; /* always 0, preserved for backwards compatibility */ int fsmblks; /* space available in freed fastbin blocks */ int uordblks; /* total allocated space */ int fordblks; /* total free space */ int keepcost; /* top-most, releasable (via malloc_trim) space */ }; /* Returns a copy of the updated current mallinfo. */ extern struct mallinfo mallinfo (void) __THROW; /* SVID2/XPG mallopt options */ #ifndef M_MXFAST # define M_MXFAST 1 /* maximum request size for "fastbins" */ #endif #ifndef M_NLBLKS # define M_NLBLKS 2 /* UNUSED in this malloc */ #endif #ifndef M_GRAIN # define M_GRAIN 3 /* UNUSED in this malloc */ #endif #ifndef M_KEEP # define M_KEEP 4 /* UNUSED in this malloc */ #endif /* mallopt options that actually do something */ #define M_TRIM_THRESHOLD -1 #define M_TOP_PAD -2 #define M_MMAP_THRESHOLD -3 #define M_MMAP_MAX -4 #define M_CHECK_ACTION -5 #define M_PERTURB -6 #define M_ARENA_TEST -7 #define M_ARENA_MAX -8 /* General SVID/XPG interface to tunable parameters. */ extern int mallopt (int __param, int __val) __THROW; /* Release all but __pad bytes of freed top-most memory back to the system. Return 1 if successful, else 0. */ extern int malloc_trim (size_t __pad) __THROW; /* Report the number of usable allocated bytes associated with allocated chunk __ptr. */ extern size_t malloc_usable_size (void *__ptr) __THROW; /* Prints brief summary statistics on stderr. */ extern void malloc_stats (void) __THROW; /* Output information about state of allocator to stream FP. */ extern int malloc_info (int __options, FILE *__fp) __THROW; /* Hooks for debugging and user-defined versions. */ extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr, const void *) __MALLOC_DEPRECATED; extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook)(size_t __size, const void *) __MALLOC_DEPRECATED; extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook)(void *__ptr, size_t __size, const void *) __MALLOC_DEPRECATED; extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment, size_t __size, const void *) __MALLOC_DEPRECATED; extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); /* Activate a standard set of debugging hooks. */ extern void __malloc_check_init (void) __THROW __MALLOC_DEPRECATED; __END_DECLS #endif /* malloc.h */ PKZ_ffenv.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 7.6: Floating-point environment */ #ifndef _FENV_H #define _FENV_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include /* Get the architecture dependend definitions. The following definitions are expected to be done: fenv_t type for object representing an entire floating-point environment FE_DFL_ENV macro of type pointer to fenv_t to be used as the argument to functions taking an argument of type fenv_t; in this case the default environment will be used fexcept_t type for object representing the floating-point exception flags including status associated with the flags femode_t type for object representing floating-point control modes FE_DFL_MODE macro of type pointer to const femode_t to be used as the argument to fesetmode; in this case the default control modes will be used The following macros are defined iff the implementation supports this kind of exception. FE_INEXACT inexact result FE_DIVBYZERO division by zero FE_UNDERFLOW result not representable due to underflow FE_OVERFLOW result not representable due to overflow FE_INVALID invalid operation FE_ALL_EXCEPT bitwise OR of all supported exceptions The next macros are defined iff the appropriate rounding mode is supported by the implementation. FE_TONEAREST round to nearest FE_UPWARD round toward +Inf FE_DOWNWARD round toward -Inf FE_TOWARDZERO round toward 0 */ #include __BEGIN_DECLS /* Floating-point exception handling. */ /* Clear the supported exceptions represented by EXCEPTS. */ extern int feclearexcept (int __excepts) __THROW; /* Store implementation-defined representation of the exception flags indicated by EXCEPTS in the object pointed to by FLAGP. */ extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW; /* Raise the supported exceptions represented by EXCEPTS. */ extern int feraiseexcept (int __excepts) __THROW; #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Set the supported exception flags represented by EXCEPTS, without causing enabled traps to be taken. */ extern int fesetexcept (int __excepts) __THROW; #endif /* Set complete status for exceptions indicated by EXCEPTS according to the representation in the object pointed to by FLAGP. */ extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW; /* Determine which of subset of the exceptions specified by EXCEPTS are currently set. */ extern int fetestexcept (int __excepts) __THROW; #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Determine which of subset of the exceptions specified by EXCEPTS are set in *FLAGP. */ extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) __THROW; #endif /* Rounding control. */ /* Get current rounding direction. */ extern int fegetround (void) __THROW __attribute_pure__; /* Establish the rounding direction represented by ROUND. */ extern int fesetround (int __rounding_direction) __THROW; /* Floating-point environment. */ /* Store the current floating-point environment in the object pointed to by ENVP. */ extern int fegetenv (fenv_t *__envp) __THROW; /* Save the current environment in the object pointed to by ENVP, clear exception flags and install a non-stop mode (if available) for all exceptions. */ extern int feholdexcept (fenv_t *__envp) __THROW; /* Establish the floating-point environment represented by the object pointed to by ENVP. */ extern int fesetenv (const fenv_t *__envp) __THROW; /* Save current exceptions in temporary storage, install environment represented by object pointed to by ENVP and raise exceptions according to saved exceptions. */ extern int feupdateenv (const fenv_t *__envp) __THROW; /* Control modes. */ #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Store the current floating-point control modes in the object pointed to by MODEP. */ extern int fegetmode (femode_t *__modep) __THROW; /* Establish the floating-point control modes represented by the object pointed to by MODEP. */ extern int fesetmode (const femode_t *__modep) __THROW; #endif /* Include optimization. */ #ifdef __OPTIMIZE__ # include #endif /* NaN support. */ #if (__GLIBC_USE (IEC_60559_BFP_EXT) \ && defined FE_INVALID \ && defined __SUPPORT_SNAN__) # define FE_SNANS_ALWAYS_SIGNAL 1 #endif #ifdef __USE_GNU /* Enable individual exceptions. Will not enable more exceptions than EXCEPTS specifies. Returns the previous enabled exceptions if all exceptions are successfully set, otherwise returns -1. */ extern int feenableexcept (int __excepts) __THROW; /* Disable individual exceptions. Will not disable more exceptions than EXCEPTS specifies. Returns the previous enabled exceptions if all exceptions are successfully disabled, otherwise returns -1. */ extern int fedisableexcept (int __excepts) __THROW; /* Return enabled exceptions. */ extern int fegetexcept (void) __THROW; #endif __END_DECLS #endif /* fenv.h */ PKZ"Lyywchar.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.24 * Extended multibyte and wide character utilities */ #ifndef _WCHAR_H #define _WCHAR_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include /* Gather machine dependent type support. */ #include #define __need_size_t #define __need_wchar_t #define __need_NULL #include #define __need___va_list #include #include #include #include #include #if defined __USE_UNIX98 || defined __USE_XOPEN2K # include #endif #ifdef __USE_XOPEN2K8 # include #endif /* Tell the caller that we provide correct C++ prototypes. */ #if defined __cplusplus && __GNUC_PREREQ (4, 4) # define __CORRECT_ISO_CPP_WCHAR_H_PROTO #endif #ifndef WCHAR_MIN /* These constants might also be defined in . */ # define WCHAR_MIN __WCHAR_MIN # define WCHAR_MAX __WCHAR_MAX #endif #ifndef WEOF # define WEOF (0xffffffffu) #endif /* All versions of XPG prior to the publication of ISO C99 required the bulk of 's declarations to appear in this header (because did not exist prior to C99). In POSIX.1-2001 those declarations were marked as XSI extensions; in -2008 they were additionally marked as obsolescent. _GNU_SOURCE mode anticipates the removal of these declarations in the next revision of POSIX. */ #if (defined __USE_XOPEN && !defined __USE_GNU \ && !(defined __USE_XOPEN2K && !defined __USE_XOPEN2KXSI)) # include #endif __BEGIN_DECLS /* This incomplete type is defined in but needed here because of `wcsftime'. */ struct tm; /* Copy SRC to DEST. */ extern wchar_t *wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N wide-characters of SRC to DEST. */ extern wchar_t *wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Append SRC onto DEST. */ extern wchar_t *wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW __nonnull ((1, 2)); /* Append no more than N wide-characters of SRC onto DEST. */ extern wchar_t *wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Compare S1 and S2. */ extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare N wide-characters of S1 and S2. */ extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); #ifdef __USE_XOPEN2K8 /* Compare S1 and S2, ignoring case. */ extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW; /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, locale_t __loc) __THROW; extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, size_t __n, locale_t __loc) __THROW; #endif /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; #ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the given locale. */ extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, locale_t __loc) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, size_t __n, locale_t __loc) __THROW; /* Duplicate S, returning an identical malloc'd string. */ extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__; #endif /* Find the first occurrence of WC in WCS. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcschr") __attribute_pure__; extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcschr") __attribute_pure__; #else extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; #endif /* Find the last occurrence of WC in WCS. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcsrchr") __attribute_pure__; extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcsrchr") __attribute_pure__; #else extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; #endif #ifdef __USE_GNU /* This function is similar to `wcschr'. But it returns a pointer to the closing NUL wide character in case C is not found in S. */ extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) __THROW __attribute_pure__; #endif /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) __THROW __attribute_pure__; /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; /* Find the first occurrence in WCS of any character in ACCEPT. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) __THROW __asm ("wcspbrk") __attribute_pure__; extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) __THROW __asm ("wcspbrk") __attribute_pure__; #else extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; #endif /* Find the first occurrence of NEEDLE in HAYSTACK. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcsstr") __attribute_pure__; extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcsstr") __attribute_pure__; #else extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) __THROW __attribute_pure__; #endif /* Divide WCS into tokens separated by characters in DELIM. */ extern wchar_t *wcstok (wchar_t *__restrict __s, const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) __THROW; /* Return the number of wide characters in S. */ extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__; #ifdef __USE_XOPEN /* Another name for `wcsstr' from XPG4. */ # ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcswcs") __attribute_pure__; extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcswcs") __attribute_pure__; # else extern wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) __THROW __attribute_pure__; # endif #endif #ifdef __USE_XOPEN2K8 /* Return the number of wide characters in S, but at most MAXLEN. */ extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) __THROW __attribute_pure__; #endif /* Search N wide characters of S for C. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) __THROW __asm ("wmemchr") __attribute_pure__; extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) __THROW __asm ("wmemchr") __attribute_pure__; #else extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) __THROW __attribute_pure__; #endif /* Compare N wide characters of S1 and S2. */ extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW __attribute_pure__; /* Copy N wide characters of SRC to DEST. */ extern wchar_t *wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; /* Set N wide characters of S to C. */ extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; #ifdef __USE_GNU /* Copy N wide characters of SRC to DEST and return pointer to following wide character. */ extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; #endif /* Determine whether C constitutes a valid (one-byte) multibyte character. */ extern wint_t btowc (int __c) __THROW; /* Determine whether C corresponds to a member of the extended character set whose multibyte representation is a single byte. */ extern int wctob (wint_t __c) __THROW; /* Determine whether PS points to an object representing the initial state. */ extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__; /* Write wide character representation of multibyte character pointed to by S to PWC. */ extern size_t mbrtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) __THROW; /* Write multibyte representation of wide character WC to S. */ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) __THROW; /* Return number of bytes in multibyte character pointed to by S. */ extern size_t __mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; extern size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; #ifdef __USE_EXTERN_INLINES /* Define inline function as optimization. */ /* We can use the BTOWC and WCTOB optimizations since we know that all locales must use ASCII encoding for the values in the ASCII range and because the wchar_t encoding is always ISO 10646. */ extern wint_t __btowc_alias (int __c) __asm ("btowc"); __extern_inline wint_t __NTH (btowc (int __c)) { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' ? (wint_t) __c : __btowc_alias (__c)); } extern int __wctob_alias (wint_t __c) __asm ("wctob"); __extern_inline int __NTH (wctob (wint_t __wc)) { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' ? (int) __wc : __wctob_alias (__wc)); } __extern_inline size_t __NTH (mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps)) { return (__ps != NULL ? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); } #endif /* Write wide character representation of multibyte character string SRC to DST. */ extern size_t mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of wide character string SRC to DST. */ extern size_t wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; #ifdef __USE_XOPEN2K8 /* Write wide character representation of at most NMC bytes of the multibyte character string SRC to DST. */ extern size_t mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of at most NWC characters from the wide character string SRC to DST. */ extern size_t wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) __THROW; #endif /* use POSIX 2008 */ /* The following functions are extensions found in X/Open CAE. */ #ifdef __USE_XOPEN /* Determine number of column positions required for C. */ extern int wcwidth (wchar_t __c) __THROW; /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ extern int wcswidth (const wchar_t *__s, size_t __n) __THROW; #endif /* Use X/Open. */ /* Convert initial portion of the wide string NPTR to `double' representation. */ extern double wcstod (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #ifdef __USE_ISOC99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float wcstof (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* C99 */ /* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */ #if __HAVE_FLOAT16 && defined __USE_GNU extern _Float16 wcstof16 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif #if __HAVE_FLOAT32 && defined __USE_GNU extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif #if __HAVE_FLOAT64 && defined __USE_GNU extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif #if __HAVE_FLOAT128 && defined __USE_GNU extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif #if __HAVE_FLOAT32X && defined __USE_GNU extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif #if __HAVE_FLOAT64X && defined __USE_GNU extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif #if __HAVE_FLOAT128X && defined __USE_GNU extern _Float128x wcstof128x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* Convert initial portion of wide string NPTR to `long int' representation. */ extern long int wcstol (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long int' representation. */ extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #ifdef __USE_ISOC99 /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoll (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #endif /* ISO C99. */ #ifdef __USE_GNU /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #endif /* Use GNU. */ #ifdef __USE_GNU /* Parallel versions of the functions above which take the locale to use as an additional parameter. These are GNU extensions inspired by the POSIX.1-2008 extended locale API. */ extern long int wcstol_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; __extension__ extern long long int wcstoll_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; __extension__ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; extern double wcstod_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; extern float wcstof_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; extern long double wcstold_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # if __HAVE_FLOAT16 extern _Float16 wcstof16_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # if __HAVE_FLOAT32 extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # if __HAVE_FLOAT64 extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # if __HAVE_FLOAT128 extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # if __HAVE_FLOAT32X extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # if __HAVE_FLOAT64X extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # if __HAVE_FLOAT128X extern _Float128x wcstof128x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif #endif /* use GNU */ #ifdef __USE_XOPEN2K8 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ extern wchar_t *wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW; /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern wchar_t *wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW; #endif /* Wide character I/O functions. */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) /* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces a wide character string. */ extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW; #endif #if defined __USE_ISOC95 || defined __USE_UNIX98 /* Select orientation for stream. */ extern int fwide (__FILE *__fp, int __mode) __THROW; /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wprintf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; /* Write formatted output of at most N characters to S. */ extern int swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwprintf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwprintf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; /* Write formatted output of at most N character to S from argument list ARG. */ extern int vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; /* Read formatted input from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wscanf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; /* Read formatted input from S. */ extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; # if defined __USE_ISOC99 && !defined __USE_GNU \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT /* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[ GNU extension which conflicts with valid %a followed by letter s, S or [. */ extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...), __isoc99_fwscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; extern int __REDIRECT (wscanf, (const wchar_t *__restrict __format, ...), __isoc99_wscanf) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...), __isoc99_swscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; # else extern int __isoc99_fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...); extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...); extern int __isoc99_swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW; # define fwscanf __isoc99_fwscanf # define wscanf __isoc99_wscanf # define swscanf __isoc99_swscanf # endif # endif #endif /* Use ISO C95, C99 and Unix98. */ #ifdef __USE_ISOC99 /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; /* Read formatted input from S into argument list ARG. */ extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; # if !defined __USE_GNU \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vfwscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vwscanf) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vswscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; # else extern int __isoc99_vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg); extern int __isoc99_vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg); extern int __isoc99_vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW; # define vfwscanf __isoc99_vfwscanf # define vwscanf __isoc99_vwscanf # define vswscanf __isoc99_vswscanf # endif # endif #endif /* Use ISO C99. */ /* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); /* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t getwchar (void); /* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); /* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t putwchar (wchar_t __wc); /* Get a newline-terminated wide character string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); /* Write a string to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputws (const wchar_t *__restrict __ws, __FILE *__restrict __stream); /* Push a character back onto the input buffer of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t ungetwc (wint_t __wc, __FILE *__stream); #ifdef __USE_GNU /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); /* This is the wide character version of a GNU extension. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fgetwc_unlocked (__FILE *__stream); /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); /* This function does the same as `fgetws' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); /* This function does the same as `fputws' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputws_unlocked (const wchar_t *__restrict __ws, __FILE *__restrict __stream); #endif /* Format TP into S according to FORMAT. Write no more than MAXSIZE wide characters and return the number of wide characters written, or 0 if it would exceed MAXSIZE. */ extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp) __THROW; # ifdef __USE_GNU /* Similar to `wcsftime' but takes the information from the provided locale and not the global locale. */ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) __THROW; # endif /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include #endif #ifdef __LDBL_COMPAT # include #endif __END_DECLS #endif /* wchar.h */ PKZDh0^ FlexLexer.hnu[// -*-C++-*- // FlexLexer.h -- define interfaces for lexical analyzer classes generated // by flex // Copyright (c) 1993 The Regents of the University of California. // All rights reserved. // // This code is derived from software contributed to Berkeley by // Kent Williams and Tom Epperly. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // Neither the name of the University nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE. // This file defines FlexLexer, an abstract class which specifies the // external interface provided to flex C++ lexer objects, and yyFlexLexer, // which defines a particular lexer class. // // If you want to create multiple lexer classes, you use the -P flag // to rename each yyFlexLexer to some other xxFlexLexer. You then // include in your other sources once per lexer class: // // #undef yyFlexLexer // #define yyFlexLexer xxFlexLexer // #include // // #undef yyFlexLexer // #define yyFlexLexer zzFlexLexer // #include // ... #ifndef __FLEX_LEXER_H // Never included before - need to define base class. #define __FLEX_LEXER_H #include extern "C++" { struct yy_buffer_state; typedef int yy_state_type; class FlexLexer { public: virtual ~FlexLexer() { } const char* YYText() const { return yytext; } int YYLeng() const { return yyleng; } virtual void yy_switch_to_buffer( yy_buffer_state* new_buffer ) = 0; virtual yy_buffer_state* yy_create_buffer( std::istream* s, int size ) = 0; virtual yy_buffer_state* yy_create_buffer( std::istream& s, int size ) = 0; virtual void yy_delete_buffer( yy_buffer_state* b ) = 0; virtual void yyrestart( std::istream* s ) = 0; virtual void yyrestart( std::istream& s ) = 0; virtual int yylex() = 0; // Call yylex with new input/output sources. int yylex( std::istream& new_in, std::ostream& new_out ) { switch_streams( new_in, new_out ); return yylex(); } int yylex( std::istream* new_in, std::ostream* new_out = 0) { switch_streams( new_in, new_out ); return yylex(); } // Switch to new input/output streams. A nil stream pointer // indicates "keep the current one". virtual void switch_streams( std::istream* new_in, std::ostream* new_out ) = 0; virtual void switch_streams( std::istream& new_in, std::ostream& new_out ) = 0; int lineno() const { return yylineno; } int debug() const { return yy_flex_debug; } void set_debug( int flag ) { yy_flex_debug = flag; } protected: char* yytext; int yyleng; int yylineno; // only maintained if you use %option yylineno int yy_flex_debug; // only has effect with -d or "%option debug" }; } #endif // FLEXLEXER_H #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce) // Either this is the first time through (yyFlexLexerOnce not defined), // or this is a repeated include to define a different flavor of // yyFlexLexer, as discussed in the flex manual. # define yyFlexLexerOnce extern "C++" { class yyFlexLexer : public FlexLexer { public: // arg_yyin and arg_yyout default to the cin and cout, but we // only make that assignment when initializing in yylex(). yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ); yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 ); private: void ctor_common(); public: virtual ~yyFlexLexer(); void yy_switch_to_buffer( yy_buffer_state* new_buffer ); yy_buffer_state* yy_create_buffer( std::istream* s, int size ); yy_buffer_state* yy_create_buffer( std::istream& s, int size ); void yy_delete_buffer( yy_buffer_state* b ); void yyrestart( std::istream* s ); void yyrestart( std::istream& s ); void yypush_buffer_state( yy_buffer_state* new_buffer ); void yypop_buffer_state(); virtual int yylex(); virtual void switch_streams( std::istream& new_in, std::ostream& new_out ); virtual void switch_streams( std::istream* new_in = 0, std::ostream* new_out = 0 ); virtual int yywrap(); protected: virtual int LexerInput( char* buf, int max_size ); virtual void LexerOutput( const char* buf, int size ); virtual void LexerError( const char* msg ); void yyunput( int c, char* buf_ptr ); int yyinput(); void yy_load_buffer_state(); void yy_init_buffer( yy_buffer_state* b, std::istream& s ); void yy_flush_buffer( yy_buffer_state* b ); int yy_start_stack_ptr; int yy_start_stack_depth; int* yy_start_stack; void yy_push_state( int new_state ); void yy_pop_state(); int yy_top_state(); yy_state_type yy_get_previous_state(); yy_state_type yy_try_NUL_trans( yy_state_type current_state ); int yy_get_next_buffer(); std::istream yyin; // input source for default LexerInput std::ostream yyout; // output sink for default LexerOutput // yy_hold_char holds the character lost when yytext is formed. char yy_hold_char; // Number of characters read into yy_ch_buf. int yy_n_chars; // Points to current character in buffer. char* yy_c_buf_p; int yy_init; // whether we need to initialize int yy_start; // start state number // Flag which is used to allow yywrap()'s to do buffer switches // instead of setting up a fresh yyin. A bit of a hack ... int yy_did_buffer_switch_on_eof; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */ void yyensure_buffer_stack(void); // The following are not always needed, but may be depending // on use of certain flex features (like REJECT or yymore()). yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; yy_state_type* yy_state_buf; yy_state_type* yy_state_ptr; char* yy_full_match; int* yy_full_state; int yy_full_lp; int yy_lp; int yy_looking_for_trail_begin; int yy_more_flag; int yy_more_len; int yy_more_offset; int yy_prev_more_offset; }; } #endif // yyFlexLexer || ! yyFlexLexerOnce PKZ/-AAiconv.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ICONV_H #define _ICONV_H 1 #include #define __need_size_t #include __BEGIN_DECLS /* Identifier for conversion method from one codeset to another. */ typedef void *iconv_t; /* Allocate descriptor for code conversion from codeset FROMCODE to codeset TOCODE. This function is a possible cancellation point and therefore not marked with __THROW. */ extern iconv_t iconv_open (const char *__tocode, const char *__fromcode); /* Convert at most *INBYTESLEFT bytes from *INBUF according to the code conversion algorithm specified by CD and place up to *OUTBYTESLEFT bytes in buffer at *OUTBUF. */ extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, size_t *__restrict __inbytesleft, char **__restrict __outbuf, size_t *__restrict __outbytesleft); /* Free resources allocated for descriptor CD for code conversion. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int iconv_close (iconv_t __cd); __END_DECLS #endif /* iconv.h */ PKZkV"z/z/ profile.hnu[/* * profile.h */ #ifndef _KRB5_PROFILE_H #define _KRB5_PROFILE_H #if defined(_WIN32) #include #endif #if defined(__MACH__) && defined(__APPLE__) # include # if TARGET_RT_MAC_CFM # error "Use KfM 4.0 SDK headers for CFM compilation." # endif #endif #ifndef KRB5_CALLCONV #define KRB5_CALLCONV #define KRB5_CALLCONV_C #endif typedef struct _profile_t *profile_t; /* Used by profile_init_flags(). */ #define PROFILE_INIT_ALLOW_MODULE 0x0001 /* Allow module declaration */ /* * Used by the profile iterator in prof_get.c */ #define PROFILE_ITER_LIST_SECTION 0x0001 #define PROFILE_ITER_SECTIONS_ONLY 0x0002 #define PROFILE_ITER_RELATIONS_ONLY 0x0004 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef char* profile_filespec_t; /* path as C string */ typedef char* profile_filespec_list_t; /* list of : separated paths, C string */ typedef const char * const_profile_filespec_t; /* path as C string */ typedef const char * const_profile_filespec_list_t; /* list of : separated paths, C string */ long KRB5_CALLCONV profile_init (const_profile_filespec_t *files, profile_t *ret_profile); long KRB5_CALLCONV profile_init_flags (const_profile_filespec_t *files, int flags, profile_t *ret_profile); long KRB5_CALLCONV profile_init_path (const_profile_filespec_list_t filelist, profile_t *ret_profile); long KRB5_CALLCONV profile_flush (profile_t profile); long KRB5_CALLCONV profile_flush_to_file (profile_t profile, const_profile_filespec_t outfile); long KRB5_CALLCONV profile_flush_to_buffer (profile_t profile, char **bufp); void KRB5_CALLCONV profile_free_buffer (profile_t profile, char *buf); long KRB5_CALLCONV profile_is_writable (profile_t profile, int *writable); long KRB5_CALLCONV profile_is_modified (profile_t profile, int *modified); void KRB5_CALLCONV profile_abandon (profile_t profile); void KRB5_CALLCONV profile_release (profile_t profile); long KRB5_CALLCONV profile_get_values (profile_t profile, const char *const *names, char ***ret_values); void KRB5_CALLCONV profile_free_list (char **list); long KRB5_CALLCONV profile_get_string (profile_t profile, const char *name, const char *subname, const char *subsubname, const char *def_val, char **ret_string); long KRB5_CALLCONV profile_get_integer (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default); long KRB5_CALLCONV profile_get_boolean (profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default); long KRB5_CALLCONV profile_get_relation_names (profile_t profile, const char **names, char ***ret_names); long KRB5_CALLCONV profile_get_subsection_names (profile_t profile, const char **names, char ***ret_names); long KRB5_CALLCONV profile_iterator_create (profile_t profile, const char *const *names, int flags, void **ret_iter); void KRB5_CALLCONV profile_iterator_free (void **iter_p); long KRB5_CALLCONV profile_iterator (void **iter_p, char **ret_name, char **ret_value); void KRB5_CALLCONV profile_release_string (char *str); long KRB5_CALLCONV profile_update_relation (profile_t profile, const char **names, const char *old_value, const char *new_value); long KRB5_CALLCONV profile_clear_relation (profile_t profile, const char **names); long KRB5_CALLCONV profile_rename_section (profile_t profile, const char **names, const char *new_name); long KRB5_CALLCONV profile_add_relation (profile_t profile, const char **names, const char *new_value); /* * profile_init_vtable allows a caller to create a profile-compatible object * with a different back end. */ /* * Mandatory: Look up all of the relations for names, placing the resulting * values in *ret_values. If no relations exist, return PROF_NO_RELATION, or * PROF_NO_SECTION to indicate that one of the intermediate names does not * exist as a section. The list will be freed with free_values. */ typedef long (*profile_get_values_fn)(void *cbdata, const char *const *names, char ***ret_values); /* Mandatory: Free a list of strings returned by get_values. */ typedef void (*profile_free_values_fn)(void *cbdata, char **values); /* Optional: Release any data associated with the profile. */ typedef void (*profile_cleanup_fn)(void *cbdata); /* * Optional (mandatory if cleanup is defined): Generate a new cbdata pointer * for a copy of the profile. If not implemented, the new profile will receive * the same cbdata pointer as the old one. */ typedef long (*profile_copy_fn)(void *cbdata, void **ret_cbdata); /* * Optional: Create an iterator handle. * * If flags contains PROFILE_ITER_LIST_SECTION, iterate over all of the * relations and sections within names. Otherwise, iterate over the relation * values for names, or produce a single section result if names is a section. * * If flags contains PROFILE_ITER_SECTIONS_ONLY, produce only sections. * * If flags contains PROFILE_ITER_RELATIONS_ONLY, produce only relations. */ typedef long (*profile_iterator_create_fn)(void *cbdata, const char *const *names, int flags, void **ret_iter); /* * Optional (mandatory if iterator_create is defined): Produce the next * relation or section in an iteration. If producing a section result, set * *ret_value to NULL. The returned strings will be freed with free_string. */ typedef long (*profile_iterator_fn)(void *cbdata, void *iter, char **ret_name, char **ret_value); /* * Optional (mandatory if iterator_create is defined): Free the memory for an * iterator. */ typedef void (*profile_iterator_free_fn)(void *cbdata, void *iter); /* Optional (mandatory if iterator is defined): Free a string value. */ typedef void (*profile_free_string_fn)(void *cbdata, char *string); /* * Optional: Determine if a profile is writable. If not implemented, the * profile is never writable. */ typedef long (*profile_writable_fn)(void *cbdata, int *writable); /* * Optional: Determine if a profile is modified in memory relative to the * persistent store. If not implemented, the profile is assumed to never be * modified. */ typedef long (*profile_modified_fn)(void *cbdata, int *modified); /* * Optional: Change the value of a relation, or remove it if new_value is NULL. * If old_value is set and the relation does not have that value, return * PROF_NO_RELATION. */ typedef long (*profile_update_relation_fn)(void *cbdata, const char **names, const char *old_value, const char *new_value); /* * Optional: Rename a section to new_name, or remove the section if new_name is * NULL. */ typedef long (*profile_rename_section_fn)(void *cbdata, const char **names, const char *new_name); /* * Optional: Add a new relation, or a new section if new_value is NULL. Add * any intermediate sections as necessary. */ typedef long (*profile_add_relation_fn)(void *cbdata, const char **names, const char *new_value); /* * Optional: Flush any pending memory updates to the persistent store. If * implemented, this function will be called by profile_release as well as * profile_flush, so make sure it's not inefficient to flush an unmodified * profile. */ typedef long (*profile_flush_fn)(void *cbdata); struct profile_vtable { int minor_ver; /* Set to structure minor version (currently 1) * if calling profile_init_vtable. */ /* Methods needed for a basic read-only non-iterable profile (cleanup is * optional). */ profile_get_values_fn get_values; profile_free_values_fn free_values; profile_cleanup_fn cleanup; profile_copy_fn copy; /* Methods for iterable profiles. */ profile_iterator_create_fn iterator_create; profile_iterator_fn iterator; profile_iterator_free_fn iterator_free; profile_free_string_fn free_string; /* Methods for writable profiles. */ profile_writable_fn writable; profile_modified_fn modified; profile_update_relation_fn update_relation; profile_rename_section_fn rename_section; profile_add_relation_fn add_relation; profile_flush_fn flush; /* End of minor version 1. */ }; /* * Create a profile object whose operations will be performed using the * function pointers in vtable. cbdata will be supplied to each vtable * function as the first argument. */ long KRB5_CALLCONV profile_init_vtable (struct profile_vtable *vtable, void *cbdata, profile_t *ret_profile); /* * Dynamically loadable profile modules should define a function named * "profile_module_init" matching the following signature. The function should * initialize the methods of the provided vtable structure, stopping at the * field corresponding to vtable->minor_ver. Do not change the value of * vtable->minor_ver. Unimplemented methods can be left uninitialized. The * function should supply a callback data pointer in *cb_ret; this pointer can * be cleaned up via the vtable cleanup method. */ typedef long (*profile_module_init_fn)(const char *residual, struct profile_vtable *vtable, void **cb_ret); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _KRB5_PROFILE_H */ /* * et-h-prof_err.h: * This file is automatically generated; please do not edit it. */ #include #define PROF_VERSION (-1429577728L) #define PROF_MAGIC_NODE (-1429577727L) #define PROF_NO_SECTION (-1429577726L) #define PROF_NO_RELATION (-1429577725L) #define PROF_ADD_NOT_SECTION (-1429577724L) #define PROF_SECTION_WITH_VALUE (-1429577723L) #define PROF_BAD_LINK_LIST (-1429577722L) #define PROF_BAD_GROUP_LVL (-1429577721L) #define PROF_BAD_PARENT_PTR (-1429577720L) #define PROF_MAGIC_ITERATOR (-1429577719L) #define PROF_SET_SECTION_VALUE (-1429577718L) #define PROF_EINVAL (-1429577717L) #define PROF_READ_ONLY (-1429577716L) #define PROF_SECTION_NOTOP (-1429577715L) #define PROF_SECTION_SYNTAX (-1429577714L) #define PROF_RELATION_SYNTAX (-1429577713L) #define PROF_EXTRA_CBRACE (-1429577712L) #define PROF_MISSING_OBRACE (-1429577711L) #define PROF_MAGIC_PROFILE (-1429577710L) #define PROF_MAGIC_SECTION (-1429577709L) #define PROF_TOPSECTION_ITER_NOSUPP (-1429577708L) #define PROF_INVALID_SECTION (-1429577707L) #define PROF_END_OF_SECTIONS (-1429577706L) #define PROF_BAD_NAMESET (-1429577705L) #define PROF_NO_PROFILE (-1429577704L) #define PROF_MAGIC_FILE (-1429577703L) #define PROF_FAIL_OPEN (-1429577702L) #define PROF_EXISTS (-1429577701L) #define PROF_BAD_BOOLEAN (-1429577700L) #define PROF_BAD_INTEGER (-1429577699L) #define PROF_MAGIC_FILE_DATA (-1429577698L) #define PROF_FAIL_INCLUDE_FILE (-1429577697L) #define PROF_FAIL_INCLUDE_DIR (-1429577696L) #define PROF_UNSUPPORTED (-1429577695L) #define PROF_MAGIC_NODE_ITERATOR (-1429577694L) #define PROF_MODULE (-1429577693L) #define PROF_MODULE_SYNTAX (-1429577692L) #define PROF_MODULE_INVALID (-1429577691L) extern const struct error_table et_prof_error_table; extern void initialize_prof_error_table(void); /* For compatibility with Heimdal */ extern void initialize_prof_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_prof (-1429577728L) /* for compatibility with older versions... */ #define init_prof_err_tbl initialize_prof_error_table #define prof_err_base ERROR_TABLE_BASE_prof PKZu u endian.hnu[/* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #include /* Definitions for byte order, according to significance of bytes, from low addresses to high addresses. The value is what you get by putting '4' in the most significant byte, '3' in the second most significant byte, '2' in the second least significant byte, and '1' in the least significant byte, and then writing down one digit for each byte, starting with the byte at the lowest address at the left, and proceeding to the byte with the highest address at the right. */ #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 /* This file defines `__BYTE_ORDER' for the particular machine. */ #include /* Some machines may need to use a different endianness for floating point values. */ #ifndef __FLOAT_WORD_ORDER # define __FLOAT_WORD_ORDER __BYTE_ORDER #endif #ifdef __USE_MISC # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN # define PDP_ENDIAN __PDP_ENDIAN # define BYTE_ORDER __BYTE_ORDER #endif #if __BYTE_ORDER == __LITTLE_ENDIAN # define __LONG_LONG_PAIR(HI, LO) LO, HI #elif __BYTE_ORDER == __BIG_ENDIAN # define __LONG_LONG_PAIR(HI, LO) HI, LO #endif #if defined __USE_MISC && !defined __ASSEMBLER__ /* Conversion interfaces. */ # include # include # if __BYTE_ORDER == __LITTLE_ENDIAN # define htobe16(x) __bswap_16 (x) # define htole16(x) __uint16_identity (x) # define be16toh(x) __bswap_16 (x) # define le16toh(x) __uint16_identity (x) # define htobe32(x) __bswap_32 (x) # define htole32(x) __uint32_identity (x) # define be32toh(x) __bswap_32 (x) # define le32toh(x) __uint32_identity (x) # define htobe64(x) __bswap_64 (x) # define htole64(x) __uint64_identity (x) # define be64toh(x) __bswap_64 (x) # define le64toh(x) __uint64_identity (x) # else # define htobe16(x) __uint16_identity (x) # define htole16(x) __bswap_16 (x) # define be16toh(x) __uint16_identity (x) # define le16toh(x) __bswap_16 (x) # define htobe32(x) __uint32_identity (x) # define htole32(x) __bswap_32 (x) # define be32toh(x) __uint32_identity (x) # define le32toh(x) __bswap_32 (x) # define htobe64(x) __uint64_identity (x) # define htole64(x) __bswap_64 (x) # define be64toh(x) __uint64_identity (x) # define le64toh(x) __bswap_64 (x) # endif #endif #endif /* endian.h */ PKZTApcap.hnu[/* * Copyright (c) 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * For backwards compatibility. * * Note to OS vendors: do NOT get rid of this file! Many applications * expect to be able to include , and at least some of them * go through contortions in their configure scripts to try to detect * OSes that have "helpfully" moved pcap.h to without * leaving behind a file. */ #include PKZab b netpacket/packet.hnu[/* Definitions for use with Linux AF_PACKET sockets. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __NETPACKET_PACKET_H #define __NETPACKET_PACKET_H 1 struct sockaddr_ll { unsigned short int sll_family; unsigned short int sll_protocol; int sll_ifindex; unsigned short int sll_hatype; unsigned char sll_pkttype; unsigned char sll_halen; unsigned char sll_addr[8]; }; /* Packet types. */ #define PACKET_HOST 0 /* To us. */ #define PACKET_BROADCAST 1 /* To all. */ #define PACKET_MULTICAST 2 /* To group. */ #define PACKET_OTHERHOST 3 /* To someone else. */ #define PACKET_OUTGOING 4 /* Originated by us . */ #define PACKET_LOOPBACK 5 #define PACKET_FASTROUTE 6 /* Packet socket options. */ #define PACKET_ADD_MEMBERSHIP 1 #define PACKET_DROP_MEMBERSHIP 2 #define PACKET_RECV_OUTPUT 3 #define PACKET_RX_RING 5 #define PACKET_STATISTICS 6 #define PACKET_COPY_THRESH 7 #define PACKET_AUXDATA 8 #define PACKET_ORIGDEV 9 #define PACKET_VERSION 10 #define PACKET_HDRLEN 11 #define PACKET_RESERVE 12 #define PACKET_TX_RING 13 #define PACKET_LOSS 14 #define PACKET_VNET_HDR 15 #define PACKET_TX_TIMESTAMP 16 #define PACKET_TIMESTAMP 17 #define PACKET_FANOUT 18 #define PACKET_TX_HAS_OFF 19 #define PACKET_QDISC_BYPASS 20 #define PACKET_ROLLOVER_STATS 21 #define PACKET_FANOUT_DATA 22 struct packet_mreq { int mr_ifindex; unsigned short int mr_type; unsigned short int mr_alen; unsigned char mr_address[8]; }; #define PACKET_MR_MULTICAST 0 #define PACKET_MR_PROMISC 1 #define PACKET_MR_ALLMULTI 2 #define PACKET_MR_UNICAST 3 #endif /* netpacket/packet.h */ PKZ3uchar.hnu[/* Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C11 Standard: 7.28 * Unicode utilities */ #ifndef _UCHAR_H #define _UCHAR_H 1 #include #define __need_size_t #include #include #include #ifndef __USE_ISOCXX11 /* Define the 16-bit and 32-bit character types. */ typedef __uint_least16_t char16_t; typedef __uint_least32_t char32_t; #endif __BEGIN_DECLS /* Write char16_t representation of multibyte character pointed to by S to PC16. */ extern size_t mbrtoc16 (char16_t *__restrict __pc16, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) __THROW; /* Write multibyte representation of char16_t C16 to S. */ extern size_t c16rtomb (char *__restrict __s, char16_t __c16, mbstate_t *__restrict __ps) __THROW; /* Write char32_t representation of multibyte character pointed to by S to PC32. */ extern size_t mbrtoc32 (char32_t *__restrict __pc32, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) __THROW; /* Write multibyte representation of char32_t C32 to S. */ extern size_t c32rtomb (char *__restrict __s, char32_t __c32, mbstate_t *__restrict __ps) __THROW; __END_DECLS #endif /* uchar.h */ PKZې' '  gpg-error.hnu[/* gpg-error.h or gpgrt.h - Common code for GnuPG and others. -*- c -*- * Copyright (C) 2001-2018 g10 Code GmbH * * This file is part of libgpg-error (aka libgpgrt). * * libgpg-error is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * libgpg-error is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see . * SPDX-License-Identifier: LGPL-2.1+ * * Do not edit. Generated from gpg-error.h.in. */ /* The GnuPG project consists of many components. Error codes are * exchanged between all components. The common error codes and their * user-presentable descriptions are kept into a shared library to * allow adding new error codes and components without recompiling any * of the other components. In addition to error codes this library * also features several other groups of functions which are common to * all GnuPG components. They may be used by independet project as * well. The interfaces will not change in a backward incompatible way. * * An error code together with an error source build up an error * value. As the error value is been passed from one component to * another, it preserves the information about the source and nature * of the error. * * A component of the GnuPG project can define the following macros to * tune the behaviour of the library: * * GPG_ERR_SOURCE_DEFAULT: Define to an error source of type * gpg_err_source_t to make that source the default for gpg_error(). * Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default. * * GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the * internal gettext API to standard names. This has only an effect on * Windows platforms. * * GPGRT_ENABLE_ES_MACROS: Define to provide "es_" macros for the * estream functions. * * GPGRT_ENABLE_LOG_MACROS: Define to provide short versions of the * log functions. * * GPGRT_ENABLE_ARGPARSE_MACROS: Needs to be defined to provide the * mandatory macros of the argparse interface. */ #ifndef GPG_ERROR_H #define GPG_ERROR_H 1 #ifndef GPGRT_H #define GPGRT_H 1 #include #include #include /* The version string of this header. */ #define GPG_ERROR_VERSION "1.31" #define GPGRT_VERSION "1.31" /* The version number of this header. */ #define GPG_ERROR_VERSION_NUMBER 0x011f00 #define GPGRT_VERSION_NUMBER 0x011f00 #ifdef __GNUC__ # define GPG_ERR_INLINE __inline__ #elif defined(_MSC_VER) && _MSC_VER >= 1300 # define GPG_ERR_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L # define GPG_ERR_INLINE inline #else # ifndef GPG_ERR_INLINE # define GPG_ERR_INLINE # endif #endif #ifdef __cplusplus extern "C" { #if 0 /* just to make Emacs auto-indent happy */ } #endif #endif /* __cplusplus */ /* The error source type gpg_err_source_t. * * Where as the Poo out of a welle small * Taketh his firste springing and his sours. * --Chaucer. */ /* Only use free slots, never change or reorder the existing * entries. */ typedef enum { GPG_ERR_SOURCE_UNKNOWN = 0, GPG_ERR_SOURCE_GCRYPT = 1, GPG_ERR_SOURCE_GPG = 2, GPG_ERR_SOURCE_GPGSM = 3, GPG_ERR_SOURCE_GPGAGENT = 4, GPG_ERR_SOURCE_PINENTRY = 5, GPG_ERR_SOURCE_SCD = 6, GPG_ERR_SOURCE_GPGME = 7, GPG_ERR_SOURCE_KEYBOX = 8, GPG_ERR_SOURCE_KSBA = 9, GPG_ERR_SOURCE_DIRMNGR = 10, GPG_ERR_SOURCE_GSTI = 11, GPG_ERR_SOURCE_GPA = 12, GPG_ERR_SOURCE_KLEO = 13, GPG_ERR_SOURCE_G13 = 14, GPG_ERR_SOURCE_ASSUAN = 15, GPG_ERR_SOURCE_TLS = 17, GPG_ERR_SOURCE_ANY = 31, GPG_ERR_SOURCE_USER_1 = 32, GPG_ERR_SOURCE_USER_2 = 33, GPG_ERR_SOURCE_USER_3 = 34, GPG_ERR_SOURCE_USER_4 = 35, /* This is one more than the largest allowed entry. */ GPG_ERR_SOURCE_DIM = 128 } gpg_err_source_t; /* The error code type gpg_err_code_t. */ /* Only use free slots, never change or reorder the existing * entries. */ typedef enum { GPG_ERR_NO_ERROR = 0, GPG_ERR_GENERAL = 1, GPG_ERR_UNKNOWN_PACKET = 2, GPG_ERR_UNKNOWN_VERSION = 3, GPG_ERR_PUBKEY_ALGO = 4, GPG_ERR_DIGEST_ALGO = 5, GPG_ERR_BAD_PUBKEY = 6, GPG_ERR_BAD_SECKEY = 7, GPG_ERR_BAD_SIGNATURE = 8, GPG_ERR_NO_PUBKEY = 9, GPG_ERR_CHECKSUM = 10, GPG_ERR_BAD_PASSPHRASE = 11, GPG_ERR_CIPHER_ALGO = 12, GPG_ERR_KEYRING_OPEN = 13, GPG_ERR_INV_PACKET = 14, GPG_ERR_INV_ARMOR = 15, GPG_ERR_NO_USER_ID = 16, GPG_ERR_NO_SECKEY = 17, GPG_ERR_WRONG_SECKEY = 18, GPG_ERR_BAD_KEY = 19, GPG_ERR_COMPR_ALGO = 20, GPG_ERR_NO_PRIME = 21, GPG_ERR_NO_ENCODING_METHOD = 22, GPG_ERR_NO_ENCRYPTION_SCHEME = 23, GPG_ERR_NO_SIGNATURE_SCHEME = 24, GPG_ERR_INV_ATTR = 25, GPG_ERR_NO_VALUE = 26, GPG_ERR_NOT_FOUND = 27, GPG_ERR_VALUE_NOT_FOUND = 28, GPG_ERR_SYNTAX = 29, GPG_ERR_BAD_MPI = 30, GPG_ERR_INV_PASSPHRASE = 31, GPG_ERR_SIG_CLASS = 32, GPG_ERR_RESOURCE_LIMIT = 33, GPG_ERR_INV_KEYRING = 34, GPG_ERR_TRUSTDB = 35, GPG_ERR_BAD_CERT = 36, GPG_ERR_INV_USER_ID = 37, GPG_ERR_UNEXPECTED = 38, GPG_ERR_TIME_CONFLICT = 39, GPG_ERR_KEYSERVER = 40, GPG_ERR_WRONG_PUBKEY_ALGO = 41, GPG_ERR_TRIBUTE_TO_D_A = 42, GPG_ERR_WEAK_KEY = 43, GPG_ERR_INV_KEYLEN = 44, GPG_ERR_INV_ARG = 45, GPG_ERR_BAD_URI = 46, GPG_ERR_INV_URI = 47, GPG_ERR_NETWORK = 48, GPG_ERR_UNKNOWN_HOST = 49, GPG_ERR_SELFTEST_FAILED = 50, GPG_ERR_NOT_ENCRYPTED = 51, GPG_ERR_NOT_PROCESSED = 52, GPG_ERR_UNUSABLE_PUBKEY = 53, GPG_ERR_UNUSABLE_SECKEY = 54, GPG_ERR_INV_VALUE = 55, GPG_ERR_BAD_CERT_CHAIN = 56, GPG_ERR_MISSING_CERT = 57, GPG_ERR_NO_DATA = 58, GPG_ERR_BUG = 59, GPG_ERR_NOT_SUPPORTED = 60, GPG_ERR_INV_OP = 61, GPG_ERR_TIMEOUT = 62, GPG_ERR_INTERNAL = 63, GPG_ERR_EOF_GCRYPT = 64, GPG_ERR_INV_OBJ = 65, GPG_ERR_TOO_SHORT = 66, GPG_ERR_TOO_LARGE = 67, GPG_ERR_NO_OBJ = 68, GPG_ERR_NOT_IMPLEMENTED = 69, GPG_ERR_CONFLICT = 70, GPG_ERR_INV_CIPHER_MODE = 71, GPG_ERR_INV_FLAG = 72, GPG_ERR_INV_HANDLE = 73, GPG_ERR_TRUNCATED = 74, GPG_ERR_INCOMPLETE_LINE = 75, GPG_ERR_INV_RESPONSE = 76, GPG_ERR_NO_AGENT = 77, GPG_ERR_AGENT = 78, GPG_ERR_INV_DATA = 79, GPG_ERR_ASSUAN_SERVER_FAULT = 80, GPG_ERR_ASSUAN = 81, GPG_ERR_INV_SESSION_KEY = 82, GPG_ERR_INV_SEXP = 83, GPG_ERR_UNSUPPORTED_ALGORITHM = 84, GPG_ERR_NO_PIN_ENTRY = 85, GPG_ERR_PIN_ENTRY = 86, GPG_ERR_BAD_PIN = 87, GPG_ERR_INV_NAME = 88, GPG_ERR_BAD_DATA = 89, GPG_ERR_INV_PARAMETER = 90, GPG_ERR_WRONG_CARD = 91, GPG_ERR_NO_DIRMNGR = 92, GPG_ERR_DIRMNGR = 93, GPG_ERR_CERT_REVOKED = 94, GPG_ERR_NO_CRL_KNOWN = 95, GPG_ERR_CRL_TOO_OLD = 96, GPG_ERR_LINE_TOO_LONG = 97, GPG_ERR_NOT_TRUSTED = 98, GPG_ERR_CANCELED = 99, GPG_ERR_BAD_CA_CERT = 100, GPG_ERR_CERT_EXPIRED = 101, GPG_ERR_CERT_TOO_YOUNG = 102, GPG_ERR_UNSUPPORTED_CERT = 103, GPG_ERR_UNKNOWN_SEXP = 104, GPG_ERR_UNSUPPORTED_PROTECTION = 105, GPG_ERR_CORRUPTED_PROTECTION = 106, GPG_ERR_AMBIGUOUS_NAME = 107, GPG_ERR_CARD = 108, GPG_ERR_CARD_RESET = 109, GPG_ERR_CARD_REMOVED = 110, GPG_ERR_INV_CARD = 111, GPG_ERR_CARD_NOT_PRESENT = 112, GPG_ERR_NO_PKCS15_APP = 113, GPG_ERR_NOT_CONFIRMED = 114, GPG_ERR_CONFIGURATION = 115, GPG_ERR_NO_POLICY_MATCH = 116, GPG_ERR_INV_INDEX = 117, GPG_ERR_INV_ID = 118, GPG_ERR_NO_SCDAEMON = 119, GPG_ERR_SCDAEMON = 120, GPG_ERR_UNSUPPORTED_PROTOCOL = 121, GPG_ERR_BAD_PIN_METHOD = 122, GPG_ERR_CARD_NOT_INITIALIZED = 123, GPG_ERR_UNSUPPORTED_OPERATION = 124, GPG_ERR_WRONG_KEY_USAGE = 125, GPG_ERR_NOTHING_FOUND = 126, GPG_ERR_WRONG_BLOB_TYPE = 127, GPG_ERR_MISSING_VALUE = 128, GPG_ERR_HARDWARE = 129, GPG_ERR_PIN_BLOCKED = 130, GPG_ERR_USE_CONDITIONS = 131, GPG_ERR_PIN_NOT_SYNCED = 132, GPG_ERR_INV_CRL = 133, GPG_ERR_BAD_BER = 134, GPG_ERR_INV_BER = 135, GPG_ERR_ELEMENT_NOT_FOUND = 136, GPG_ERR_IDENTIFIER_NOT_FOUND = 137, GPG_ERR_INV_TAG = 138, GPG_ERR_INV_LENGTH = 139, GPG_ERR_INV_KEYINFO = 140, GPG_ERR_UNEXPECTED_TAG = 141, GPG_ERR_NOT_DER_ENCODED = 142, GPG_ERR_NO_CMS_OBJ = 143, GPG_ERR_INV_CMS_OBJ = 144, GPG_ERR_UNKNOWN_CMS_OBJ = 145, GPG_ERR_UNSUPPORTED_CMS_OBJ = 146, GPG_ERR_UNSUPPORTED_ENCODING = 147, GPG_ERR_UNSUPPORTED_CMS_VERSION = 148, GPG_ERR_UNKNOWN_ALGORITHM = 149, GPG_ERR_INV_ENGINE = 150, GPG_ERR_PUBKEY_NOT_TRUSTED = 151, GPG_ERR_DECRYPT_FAILED = 152, GPG_ERR_KEY_EXPIRED = 153, GPG_ERR_SIG_EXPIRED = 154, GPG_ERR_ENCODING_PROBLEM = 155, GPG_ERR_INV_STATE = 156, GPG_ERR_DUP_VALUE = 157, GPG_ERR_MISSING_ACTION = 158, GPG_ERR_MODULE_NOT_FOUND = 159, GPG_ERR_INV_OID_STRING = 160, GPG_ERR_INV_TIME = 161, GPG_ERR_INV_CRL_OBJ = 162, GPG_ERR_UNSUPPORTED_CRL_VERSION = 163, GPG_ERR_INV_CERT_OBJ = 164, GPG_ERR_UNKNOWN_NAME = 165, GPG_ERR_LOCALE_PROBLEM = 166, GPG_ERR_NOT_LOCKED = 167, GPG_ERR_PROTOCOL_VIOLATION = 168, GPG_ERR_INV_MAC = 169, GPG_ERR_INV_REQUEST = 170, GPG_ERR_UNKNOWN_EXTN = 171, GPG_ERR_UNKNOWN_CRIT_EXTN = 172, GPG_ERR_LOCKED = 173, GPG_ERR_UNKNOWN_OPTION = 174, GPG_ERR_UNKNOWN_COMMAND = 175, GPG_ERR_NOT_OPERATIONAL = 176, GPG_ERR_NO_PASSPHRASE = 177, GPG_ERR_NO_PIN = 178, GPG_ERR_NOT_ENABLED = 179, GPG_ERR_NO_ENGINE = 180, GPG_ERR_MISSING_KEY = 181, GPG_ERR_TOO_MANY = 182, GPG_ERR_LIMIT_REACHED = 183, GPG_ERR_NOT_INITIALIZED = 184, GPG_ERR_MISSING_ISSUER_CERT = 185, GPG_ERR_NO_KEYSERVER = 186, GPG_ERR_INV_CURVE = 187, GPG_ERR_UNKNOWN_CURVE = 188, GPG_ERR_DUP_KEY = 189, GPG_ERR_AMBIGUOUS = 190, GPG_ERR_NO_CRYPT_CTX = 191, GPG_ERR_WRONG_CRYPT_CTX = 192, GPG_ERR_BAD_CRYPT_CTX = 193, GPG_ERR_CRYPT_CTX_CONFLICT = 194, GPG_ERR_BROKEN_PUBKEY = 195, GPG_ERR_BROKEN_SECKEY = 196, GPG_ERR_MAC_ALGO = 197, GPG_ERR_FULLY_CANCELED = 198, GPG_ERR_UNFINISHED = 199, GPG_ERR_BUFFER_TOO_SHORT = 200, GPG_ERR_SEXP_INV_LEN_SPEC = 201, GPG_ERR_SEXP_STRING_TOO_LONG = 202, GPG_ERR_SEXP_UNMATCHED_PAREN = 203, GPG_ERR_SEXP_NOT_CANONICAL = 204, GPG_ERR_SEXP_BAD_CHARACTER = 205, GPG_ERR_SEXP_BAD_QUOTATION = 206, GPG_ERR_SEXP_ZERO_PREFIX = 207, GPG_ERR_SEXP_NESTED_DH = 208, GPG_ERR_SEXP_UNMATCHED_DH = 209, GPG_ERR_SEXP_UNEXPECTED_PUNC = 210, GPG_ERR_SEXP_BAD_HEX_CHAR = 211, GPG_ERR_SEXP_ODD_HEX_NUMBERS = 212, GPG_ERR_SEXP_BAD_OCT_CHAR = 213, GPG_ERR_SUBKEYS_EXP_OR_REV = 217, GPG_ERR_DB_CORRUPTED = 218, GPG_ERR_SERVER_FAILED = 219, GPG_ERR_NO_NAME = 220, GPG_ERR_NO_KEY = 221, GPG_ERR_LEGACY_KEY = 222, GPG_ERR_REQUEST_TOO_SHORT = 223, GPG_ERR_REQUEST_TOO_LONG = 224, GPG_ERR_OBJ_TERM_STATE = 225, GPG_ERR_NO_CERT_CHAIN = 226, GPG_ERR_CERT_TOO_LARGE = 227, GPG_ERR_INV_RECORD = 228, GPG_ERR_BAD_MAC = 229, GPG_ERR_UNEXPECTED_MSG = 230, GPG_ERR_COMPR_FAILED = 231, GPG_ERR_WOULD_WRAP = 232, GPG_ERR_FATAL_ALERT = 233, GPG_ERR_NO_CIPHER = 234, GPG_ERR_MISSING_CLIENT_CERT = 235, GPG_ERR_CLOSE_NOTIFY = 236, GPG_ERR_TICKET_EXPIRED = 237, GPG_ERR_BAD_TICKET = 238, GPG_ERR_UNKNOWN_IDENTITY = 239, GPG_ERR_BAD_HS_CERT = 240, GPG_ERR_BAD_HS_CERT_REQ = 241, GPG_ERR_BAD_HS_CERT_VER = 242, GPG_ERR_BAD_HS_CHANGE_CIPHER = 243, GPG_ERR_BAD_HS_CLIENT_HELLO = 244, GPG_ERR_BAD_HS_SERVER_HELLO = 245, GPG_ERR_BAD_HS_SERVER_HELLO_DONE = 246, GPG_ERR_BAD_HS_FINISHED = 247, GPG_ERR_BAD_HS_SERVER_KEX = 248, GPG_ERR_BAD_HS_CLIENT_KEX = 249, GPG_ERR_BOGUS_STRING = 250, GPG_ERR_FORBIDDEN = 251, GPG_ERR_KEY_DISABLED = 252, GPG_ERR_KEY_ON_CARD = 253, GPG_ERR_INV_LOCK_OBJ = 254, GPG_ERR_TRUE = 255, GPG_ERR_FALSE = 256, GPG_ERR_ASS_GENERAL = 257, GPG_ERR_ASS_ACCEPT_FAILED = 258, GPG_ERR_ASS_CONNECT_FAILED = 259, GPG_ERR_ASS_INV_RESPONSE = 260, GPG_ERR_ASS_INV_VALUE = 261, GPG_ERR_ASS_INCOMPLETE_LINE = 262, GPG_ERR_ASS_LINE_TOO_LONG = 263, GPG_ERR_ASS_NESTED_COMMANDS = 264, GPG_ERR_ASS_NO_DATA_CB = 265, GPG_ERR_ASS_NO_INQUIRE_CB = 266, GPG_ERR_ASS_NOT_A_SERVER = 267, GPG_ERR_ASS_NOT_A_CLIENT = 268, GPG_ERR_ASS_SERVER_START = 269, GPG_ERR_ASS_READ_ERROR = 270, GPG_ERR_ASS_WRITE_ERROR = 271, GPG_ERR_ASS_TOO_MUCH_DATA = 273, GPG_ERR_ASS_UNEXPECTED_CMD = 274, GPG_ERR_ASS_UNKNOWN_CMD = 275, GPG_ERR_ASS_SYNTAX = 276, GPG_ERR_ASS_CANCELED = 277, GPG_ERR_ASS_NO_INPUT = 278, GPG_ERR_ASS_NO_OUTPUT = 279, GPG_ERR_ASS_PARAMETER = 280, GPG_ERR_ASS_UNKNOWN_INQUIRE = 281, GPG_ERR_ENGINE_TOO_OLD = 300, GPG_ERR_WINDOW_TOO_SMALL = 301, GPG_ERR_WINDOW_TOO_LARGE = 302, GPG_ERR_MISSING_ENVVAR = 303, GPG_ERR_USER_ID_EXISTS = 304, GPG_ERR_NAME_EXISTS = 305, GPG_ERR_DUP_NAME = 306, GPG_ERR_TOO_YOUNG = 307, GPG_ERR_TOO_OLD = 308, GPG_ERR_UNKNOWN_FLAG = 309, GPG_ERR_INV_ORDER = 310, GPG_ERR_ALREADY_FETCHED = 311, GPG_ERR_TRY_LATER = 312, GPG_ERR_WRONG_NAME = 313, GPG_ERR_SYSTEM_BUG = 666, GPG_ERR_DNS_UNKNOWN = 711, GPG_ERR_DNS_SECTION = 712, GPG_ERR_DNS_ADDRESS = 713, GPG_ERR_DNS_NO_QUERY = 714, GPG_ERR_DNS_NO_ANSWER = 715, GPG_ERR_DNS_CLOSED = 716, GPG_ERR_DNS_VERIFY = 717, GPG_ERR_DNS_TIMEOUT = 718, GPG_ERR_LDAP_GENERAL = 721, GPG_ERR_LDAP_ATTR_GENERAL = 722, GPG_ERR_LDAP_NAME_GENERAL = 723, GPG_ERR_LDAP_SECURITY_GENERAL = 724, GPG_ERR_LDAP_SERVICE_GENERAL = 725, GPG_ERR_LDAP_UPDATE_GENERAL = 726, GPG_ERR_LDAP_E_GENERAL = 727, GPG_ERR_LDAP_X_GENERAL = 728, GPG_ERR_LDAP_OTHER_GENERAL = 729, GPG_ERR_LDAP_X_CONNECTING = 750, GPG_ERR_LDAP_REFERRAL_LIMIT = 751, GPG_ERR_LDAP_CLIENT_LOOP = 752, GPG_ERR_LDAP_NO_RESULTS = 754, GPG_ERR_LDAP_CONTROL_NOT_FOUND = 755, GPG_ERR_LDAP_NOT_SUPPORTED = 756, GPG_ERR_LDAP_CONNECT = 757, GPG_ERR_LDAP_NO_MEMORY = 758, GPG_ERR_LDAP_PARAM = 759, GPG_ERR_LDAP_USER_CANCELLED = 760, GPG_ERR_LDAP_FILTER = 761, GPG_ERR_LDAP_AUTH_UNKNOWN = 762, GPG_ERR_LDAP_TIMEOUT = 763, GPG_ERR_LDAP_DECODING = 764, GPG_ERR_LDAP_ENCODING = 765, GPG_ERR_LDAP_LOCAL = 766, GPG_ERR_LDAP_SERVER_DOWN = 767, GPG_ERR_LDAP_SUCCESS = 768, GPG_ERR_LDAP_OPERATIONS = 769, GPG_ERR_LDAP_PROTOCOL = 770, GPG_ERR_LDAP_TIMELIMIT = 771, GPG_ERR_LDAP_SIZELIMIT = 772, GPG_ERR_LDAP_COMPARE_FALSE = 773, GPG_ERR_LDAP_COMPARE_TRUE = 774, GPG_ERR_LDAP_UNSUPPORTED_AUTH = 775, GPG_ERR_LDAP_STRONG_AUTH_RQRD = 776, GPG_ERR_LDAP_PARTIAL_RESULTS = 777, GPG_ERR_LDAP_REFERRAL = 778, GPG_ERR_LDAP_ADMINLIMIT = 779, GPG_ERR_LDAP_UNAVAIL_CRIT_EXTN = 780, GPG_ERR_LDAP_CONFIDENT_RQRD = 781, GPG_ERR_LDAP_SASL_BIND_INPROG = 782, GPG_ERR_LDAP_NO_SUCH_ATTRIBUTE = 784, GPG_ERR_LDAP_UNDEFINED_TYPE = 785, GPG_ERR_LDAP_BAD_MATCHING = 786, GPG_ERR_LDAP_CONST_VIOLATION = 787, GPG_ERR_LDAP_TYPE_VALUE_EXISTS = 788, GPG_ERR_LDAP_INV_SYNTAX = 789, GPG_ERR_LDAP_NO_SUCH_OBJ = 800, GPG_ERR_LDAP_ALIAS_PROBLEM = 801, GPG_ERR_LDAP_INV_DN_SYNTAX = 802, GPG_ERR_LDAP_IS_LEAF = 803, GPG_ERR_LDAP_ALIAS_DEREF = 804, GPG_ERR_LDAP_X_PROXY_AUTH_FAIL = 815, GPG_ERR_LDAP_BAD_AUTH = 816, GPG_ERR_LDAP_INV_CREDENTIALS = 817, GPG_ERR_LDAP_INSUFFICIENT_ACC = 818, GPG_ERR_LDAP_BUSY = 819, GPG_ERR_LDAP_UNAVAILABLE = 820, GPG_ERR_LDAP_UNWILL_TO_PERFORM = 821, GPG_ERR_LDAP_LOOP_DETECT = 822, GPG_ERR_LDAP_NAMING_VIOLATION = 832, GPG_ERR_LDAP_OBJ_CLS_VIOLATION = 833, GPG_ERR_LDAP_NOT_ALLOW_NONLEAF = 834, GPG_ERR_LDAP_NOT_ALLOW_ON_RDN = 835, GPG_ERR_LDAP_ALREADY_EXISTS = 836, GPG_ERR_LDAP_NO_OBJ_CLASS_MODS = 837, GPG_ERR_LDAP_RESULTS_TOO_LARGE = 838, GPG_ERR_LDAP_AFFECTS_MULT_DSAS = 839, GPG_ERR_LDAP_VLV = 844, GPG_ERR_LDAP_OTHER = 848, GPG_ERR_LDAP_CUP_RESOURCE_LIMIT = 881, GPG_ERR_LDAP_CUP_SEC_VIOLATION = 882, GPG_ERR_LDAP_CUP_INV_DATA = 883, GPG_ERR_LDAP_CUP_UNSUP_SCHEME = 884, GPG_ERR_LDAP_CUP_RELOAD = 885, GPG_ERR_LDAP_CANCELLED = 886, GPG_ERR_LDAP_NO_SUCH_OPERATION = 887, GPG_ERR_LDAP_TOO_LATE = 888, GPG_ERR_LDAP_CANNOT_CANCEL = 889, GPG_ERR_LDAP_ASSERTION_FAILED = 890, GPG_ERR_LDAP_PROX_AUTH_DENIED = 891, GPG_ERR_USER_1 = 1024, GPG_ERR_USER_2 = 1025, GPG_ERR_USER_3 = 1026, GPG_ERR_USER_4 = 1027, GPG_ERR_USER_5 = 1028, GPG_ERR_USER_6 = 1029, GPG_ERR_USER_7 = 1030, GPG_ERR_USER_8 = 1031, GPG_ERR_USER_9 = 1032, GPG_ERR_USER_10 = 1033, GPG_ERR_USER_11 = 1034, GPG_ERR_USER_12 = 1035, GPG_ERR_USER_13 = 1036, GPG_ERR_USER_14 = 1037, GPG_ERR_USER_15 = 1038, GPG_ERR_USER_16 = 1039, GPG_ERR_MISSING_ERRNO = 16381, GPG_ERR_UNKNOWN_ERRNO = 16382, GPG_ERR_EOF = 16383, /* The following error codes are used to map system errors. */ #define GPG_ERR_SYSTEM_ERROR (1 << 15) GPG_ERR_E2BIG = GPG_ERR_SYSTEM_ERROR | 0, GPG_ERR_EACCES = GPG_ERR_SYSTEM_ERROR | 1, GPG_ERR_EADDRINUSE = GPG_ERR_SYSTEM_ERROR | 2, GPG_ERR_EADDRNOTAVAIL = GPG_ERR_SYSTEM_ERROR | 3, GPG_ERR_EADV = GPG_ERR_SYSTEM_ERROR | 4, GPG_ERR_EAFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 5, GPG_ERR_EAGAIN = GPG_ERR_SYSTEM_ERROR | 6, GPG_ERR_EALREADY = GPG_ERR_SYSTEM_ERROR | 7, GPG_ERR_EAUTH = GPG_ERR_SYSTEM_ERROR | 8, GPG_ERR_EBACKGROUND = GPG_ERR_SYSTEM_ERROR | 9, GPG_ERR_EBADE = GPG_ERR_SYSTEM_ERROR | 10, GPG_ERR_EBADF = GPG_ERR_SYSTEM_ERROR | 11, GPG_ERR_EBADFD = GPG_ERR_SYSTEM_ERROR | 12, GPG_ERR_EBADMSG = GPG_ERR_SYSTEM_ERROR | 13, GPG_ERR_EBADR = GPG_ERR_SYSTEM_ERROR | 14, GPG_ERR_EBADRPC = GPG_ERR_SYSTEM_ERROR | 15, GPG_ERR_EBADRQC = GPG_ERR_SYSTEM_ERROR | 16, GPG_ERR_EBADSLT = GPG_ERR_SYSTEM_ERROR | 17, GPG_ERR_EBFONT = GPG_ERR_SYSTEM_ERROR | 18, GPG_ERR_EBUSY = GPG_ERR_SYSTEM_ERROR | 19, GPG_ERR_ECANCELED = GPG_ERR_SYSTEM_ERROR | 20, GPG_ERR_ECHILD = GPG_ERR_SYSTEM_ERROR | 21, GPG_ERR_ECHRNG = GPG_ERR_SYSTEM_ERROR | 22, GPG_ERR_ECOMM = GPG_ERR_SYSTEM_ERROR | 23, GPG_ERR_ECONNABORTED = GPG_ERR_SYSTEM_ERROR | 24, GPG_ERR_ECONNREFUSED = GPG_ERR_SYSTEM_ERROR | 25, GPG_ERR_ECONNRESET = GPG_ERR_SYSTEM_ERROR | 26, GPG_ERR_ED = GPG_ERR_SYSTEM_ERROR | 27, GPG_ERR_EDEADLK = GPG_ERR_SYSTEM_ERROR | 28, GPG_ERR_EDEADLOCK = GPG_ERR_SYSTEM_ERROR | 29, GPG_ERR_EDESTADDRREQ = GPG_ERR_SYSTEM_ERROR | 30, GPG_ERR_EDIED = GPG_ERR_SYSTEM_ERROR | 31, GPG_ERR_EDOM = GPG_ERR_SYSTEM_ERROR | 32, GPG_ERR_EDOTDOT = GPG_ERR_SYSTEM_ERROR | 33, GPG_ERR_EDQUOT = GPG_ERR_SYSTEM_ERROR | 34, GPG_ERR_EEXIST = GPG_ERR_SYSTEM_ERROR | 35, GPG_ERR_EFAULT = GPG_ERR_SYSTEM_ERROR | 36, GPG_ERR_EFBIG = GPG_ERR_SYSTEM_ERROR | 37, GPG_ERR_EFTYPE = GPG_ERR_SYSTEM_ERROR | 38, GPG_ERR_EGRATUITOUS = GPG_ERR_SYSTEM_ERROR | 39, GPG_ERR_EGREGIOUS = GPG_ERR_SYSTEM_ERROR | 40, GPG_ERR_EHOSTDOWN = GPG_ERR_SYSTEM_ERROR | 41, GPG_ERR_EHOSTUNREACH = GPG_ERR_SYSTEM_ERROR | 42, GPG_ERR_EIDRM = GPG_ERR_SYSTEM_ERROR | 43, GPG_ERR_EIEIO = GPG_ERR_SYSTEM_ERROR | 44, GPG_ERR_EILSEQ = GPG_ERR_SYSTEM_ERROR | 45, GPG_ERR_EINPROGRESS = GPG_ERR_SYSTEM_ERROR | 46, GPG_ERR_EINTR = GPG_ERR_SYSTEM_ERROR | 47, GPG_ERR_EINVAL = GPG_ERR_SYSTEM_ERROR | 48, GPG_ERR_EIO = GPG_ERR_SYSTEM_ERROR | 49, GPG_ERR_EISCONN = GPG_ERR_SYSTEM_ERROR | 50, GPG_ERR_EISDIR = GPG_ERR_SYSTEM_ERROR | 51, GPG_ERR_EISNAM = GPG_ERR_SYSTEM_ERROR | 52, GPG_ERR_EL2HLT = GPG_ERR_SYSTEM_ERROR | 53, GPG_ERR_EL2NSYNC = GPG_ERR_SYSTEM_ERROR | 54, GPG_ERR_EL3HLT = GPG_ERR_SYSTEM_ERROR | 55, GPG_ERR_EL3RST = GPG_ERR_SYSTEM_ERROR | 56, GPG_ERR_ELIBACC = GPG_ERR_SYSTEM_ERROR | 57, GPG_ERR_ELIBBAD = GPG_ERR_SYSTEM_ERROR | 58, GPG_ERR_ELIBEXEC = GPG_ERR_SYSTEM_ERROR | 59, GPG_ERR_ELIBMAX = GPG_ERR_SYSTEM_ERROR | 60, GPG_ERR_ELIBSCN = GPG_ERR_SYSTEM_ERROR | 61, GPG_ERR_ELNRNG = GPG_ERR_SYSTEM_ERROR | 62, GPG_ERR_ELOOP = GPG_ERR_SYSTEM_ERROR | 63, GPG_ERR_EMEDIUMTYPE = GPG_ERR_SYSTEM_ERROR | 64, GPG_ERR_EMFILE = GPG_ERR_SYSTEM_ERROR | 65, GPG_ERR_EMLINK = GPG_ERR_SYSTEM_ERROR | 66, GPG_ERR_EMSGSIZE = GPG_ERR_SYSTEM_ERROR | 67, GPG_ERR_EMULTIHOP = GPG_ERR_SYSTEM_ERROR | 68, GPG_ERR_ENAMETOOLONG = GPG_ERR_SYSTEM_ERROR | 69, GPG_ERR_ENAVAIL = GPG_ERR_SYSTEM_ERROR | 70, GPG_ERR_ENEEDAUTH = GPG_ERR_SYSTEM_ERROR | 71, GPG_ERR_ENETDOWN = GPG_ERR_SYSTEM_ERROR | 72, GPG_ERR_ENETRESET = GPG_ERR_SYSTEM_ERROR | 73, GPG_ERR_ENETUNREACH = GPG_ERR_SYSTEM_ERROR | 74, GPG_ERR_ENFILE = GPG_ERR_SYSTEM_ERROR | 75, GPG_ERR_ENOANO = GPG_ERR_SYSTEM_ERROR | 76, GPG_ERR_ENOBUFS = GPG_ERR_SYSTEM_ERROR | 77, GPG_ERR_ENOCSI = GPG_ERR_SYSTEM_ERROR | 78, GPG_ERR_ENODATA = GPG_ERR_SYSTEM_ERROR | 79, GPG_ERR_ENODEV = GPG_ERR_SYSTEM_ERROR | 80, GPG_ERR_ENOENT = GPG_ERR_SYSTEM_ERROR | 81, GPG_ERR_ENOEXEC = GPG_ERR_SYSTEM_ERROR | 82, GPG_ERR_ENOLCK = GPG_ERR_SYSTEM_ERROR | 83, GPG_ERR_ENOLINK = GPG_ERR_SYSTEM_ERROR | 84, GPG_ERR_ENOMEDIUM = GPG_ERR_SYSTEM_ERROR | 85, GPG_ERR_ENOMEM = GPG_ERR_SYSTEM_ERROR | 86, GPG_ERR_ENOMSG = GPG_ERR_SYSTEM_ERROR | 87, GPG_ERR_ENONET = GPG_ERR_SYSTEM_ERROR | 88, GPG_ERR_ENOPKG = GPG_ERR_SYSTEM_ERROR | 89, GPG_ERR_ENOPROTOOPT = GPG_ERR_SYSTEM_ERROR | 90, GPG_ERR_ENOSPC = GPG_ERR_SYSTEM_ERROR | 91, GPG_ERR_ENOSR = GPG_ERR_SYSTEM_ERROR | 92, GPG_ERR_ENOSTR = GPG_ERR_SYSTEM_ERROR | 93, GPG_ERR_ENOSYS = GPG_ERR_SYSTEM_ERROR | 94, GPG_ERR_ENOTBLK = GPG_ERR_SYSTEM_ERROR | 95, GPG_ERR_ENOTCONN = GPG_ERR_SYSTEM_ERROR | 96, GPG_ERR_ENOTDIR = GPG_ERR_SYSTEM_ERROR | 97, GPG_ERR_ENOTEMPTY = GPG_ERR_SYSTEM_ERROR | 98, GPG_ERR_ENOTNAM = GPG_ERR_SYSTEM_ERROR | 99, GPG_ERR_ENOTSOCK = GPG_ERR_SYSTEM_ERROR | 100, GPG_ERR_ENOTSUP = GPG_ERR_SYSTEM_ERROR | 101, GPG_ERR_ENOTTY = GPG_ERR_SYSTEM_ERROR | 102, GPG_ERR_ENOTUNIQ = GPG_ERR_SYSTEM_ERROR | 103, GPG_ERR_ENXIO = GPG_ERR_SYSTEM_ERROR | 104, GPG_ERR_EOPNOTSUPP = GPG_ERR_SYSTEM_ERROR | 105, GPG_ERR_EOVERFLOW = GPG_ERR_SYSTEM_ERROR | 106, GPG_ERR_EPERM = GPG_ERR_SYSTEM_ERROR | 107, GPG_ERR_EPFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 108, GPG_ERR_EPIPE = GPG_ERR_SYSTEM_ERROR | 109, GPG_ERR_EPROCLIM = GPG_ERR_SYSTEM_ERROR | 110, GPG_ERR_EPROCUNAVAIL = GPG_ERR_SYSTEM_ERROR | 111, GPG_ERR_EPROGMISMATCH = GPG_ERR_SYSTEM_ERROR | 112, GPG_ERR_EPROGUNAVAIL = GPG_ERR_SYSTEM_ERROR | 113, GPG_ERR_EPROTO = GPG_ERR_SYSTEM_ERROR | 114, GPG_ERR_EPROTONOSUPPORT = GPG_ERR_SYSTEM_ERROR | 115, GPG_ERR_EPROTOTYPE = GPG_ERR_SYSTEM_ERROR | 116, GPG_ERR_ERANGE = GPG_ERR_SYSTEM_ERROR | 117, GPG_ERR_EREMCHG = GPG_ERR_SYSTEM_ERROR | 118, GPG_ERR_EREMOTE = GPG_ERR_SYSTEM_ERROR | 119, GPG_ERR_EREMOTEIO = GPG_ERR_SYSTEM_ERROR | 120, GPG_ERR_ERESTART = GPG_ERR_SYSTEM_ERROR | 121, GPG_ERR_EROFS = GPG_ERR_SYSTEM_ERROR | 122, GPG_ERR_ERPCMISMATCH = GPG_ERR_SYSTEM_ERROR | 123, GPG_ERR_ESHUTDOWN = GPG_ERR_SYSTEM_ERROR | 124, GPG_ERR_ESOCKTNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 125, GPG_ERR_ESPIPE = GPG_ERR_SYSTEM_ERROR | 126, GPG_ERR_ESRCH = GPG_ERR_SYSTEM_ERROR | 127, GPG_ERR_ESRMNT = GPG_ERR_SYSTEM_ERROR | 128, GPG_ERR_ESTALE = GPG_ERR_SYSTEM_ERROR | 129, GPG_ERR_ESTRPIPE = GPG_ERR_SYSTEM_ERROR | 130, GPG_ERR_ETIME = GPG_ERR_SYSTEM_ERROR | 131, GPG_ERR_ETIMEDOUT = GPG_ERR_SYSTEM_ERROR | 132, GPG_ERR_ETOOMANYREFS = GPG_ERR_SYSTEM_ERROR | 133, GPG_ERR_ETXTBSY = GPG_ERR_SYSTEM_ERROR | 134, GPG_ERR_EUCLEAN = GPG_ERR_SYSTEM_ERROR | 135, GPG_ERR_EUNATCH = GPG_ERR_SYSTEM_ERROR | 136, GPG_ERR_EUSERS = GPG_ERR_SYSTEM_ERROR | 137, GPG_ERR_EWOULDBLOCK = GPG_ERR_SYSTEM_ERROR | 138, GPG_ERR_EXDEV = GPG_ERR_SYSTEM_ERROR | 139, GPG_ERR_EXFULL = GPG_ERR_SYSTEM_ERROR | 140, /* This is one more than the largest allowed entry. */ GPG_ERR_CODE_DIM = 65536 } gpg_err_code_t; /* The error value type gpg_error_t. */ /* We would really like to use bit-fields in a struct, but using * structs as return values can cause binary compatibility issues, in * particular if you want to do it efficiently (also see * -freg-struct-return option to GCC). */ typedef unsigned int gpg_error_t; /* We use the lowest 16 bits of gpg_error_t for error codes. The 16th * bit indicates system errors. */ #define GPG_ERR_CODE_MASK (GPG_ERR_CODE_DIM - 1) /* Bits 17 to 24 are reserved. */ /* We use the upper 7 bits of gpg_error_t for error sources. */ #define GPG_ERR_SOURCE_MASK (GPG_ERR_SOURCE_DIM - 1) #define GPG_ERR_SOURCE_SHIFT 24 /* The highest bit is reserved. It shouldn't be used to prevent * potential negative numbers when transmitting error values as * text. */ /* * GCC feature test. */ #if __GNUC__ # define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #else # define _GPG_ERR_GCC_VERSION 0 #endif #undef _GPG_ERR_HAVE_CONSTRUCTOR #if _GPG_ERR_GCC_VERSION > 30100 # define _GPG_ERR_CONSTRUCTOR __attribute__ ((__constructor__)) # define _GPG_ERR_HAVE_CONSTRUCTOR #else # define _GPG_ERR_CONSTRUCTOR #endif #define GPGRT_GCC_VERSION _GPG_ERR_GCC_VERSION #if _GPG_ERR_GCC_VERSION >= 29200 # define _GPGRT__RESTRICT __restrict__ #else # define _GPGRT__RESTRICT #endif /* The noreturn attribute. */ #if _GPG_ERR_GCC_VERSION >= 20500 # define GPGRT_ATTR_NORETURN __attribute__ ((noreturn)) #else # define GPGRT_ATTR_NORETURN #endif /* The printf attributes. */ #if _GPG_ERR_GCC_VERSION >= 40400 # define GPGRT_ATTR_PRINTF(f, a) \ __attribute__ ((format(__gnu_printf__,f,a))) # define GPGRT_ATTR_NR_PRINTF(f, a) \ __attribute__ ((noreturn, format(__gnu_printf__,f,a))) #elif _GPG_ERR_GCC_VERSION >= 20500 # define GPGRT_ATTR_PRINTF(f, a) \ __attribute__ ((format(printf,f,a))) # define GPGRT_ATTR_NR_PRINTF(f, a) \ __attribute__ ((noreturn, format(printf,f,a))) #else # define GPGRT_ATTR_PRINTF(f, a) # define GPGRT_ATTR_NR_PRINTF(f, a) #endif #if _GPG_ERR_GCC_VERSION >= 20800 # define GPGRT_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a))) #else # define GPGRT_ATTR_FORMAT_ARG(a) #endif /* The sentinel attribute. */ #if _GPG_ERR_GCC_VERSION >= 40000 # define GPGRT_ATTR_SENTINEL(a) __attribute__ ((sentinel(a))) #else # define GPGRT_ATTR_SENTINEL(a) #endif /* The used and unused attributes. * I am not sure since when the unused attribute is really supported. * In any case it it only needed for gcc versions which print a * warning. Thus let us require gcc >= 3.5. */ #if _GPG_ERR_GCC_VERSION >= 40000 # define GPGRT_ATTR_USED __attribute__ ((used)) #else # define GPGRT_ATTR_USED #endif #if _GPG_ERR_GCC_VERSION >= 30500 # define GPGRT_ATTR_UNUSED __attribute__ ((unused)) #else # define GPGRT_ATTR_UNUSED #endif /* The deprecated attribute. */ #if _GPG_ERR_GCC_VERSION >= 30100 # define GPGRT_ATTR_DEPRECATED __attribute__ ((__deprecated__)) #else # define GPGRT_ATTR_DEPRECATED #endif /* The pure attribute. */ #if _GPG_ERR_GCC_VERSION >= 29600 # define GPGRT_ATTR_PURE __attribute__ ((__pure__)) #else # define GPGRT_ATTR_PURE #endif /* The malloc attribute. */ #if _GPG_ERR_GCC_VERSION >= 30200 # define GPGRT_ATTR_MALLOC __attribute__ ((__malloc__)) #else # define GPGRT_ATTR_MALLOC #endif /* A macro defined if a GCC style __FUNCTION__ macro is available. */ #undef GPGRT_HAVE_MACRO_FUNCTION #if _GPG_ERR_GCC_VERSION >= 20500 # define GPGRT_HAVE_MACRO_FUNCTION 1 #endif /* A macro defined if the pragma GCC push_options is available. */ #undef GPGRT_HAVE_PRAGMA_GCC_PUSH #if _GPG_ERR_GCC_VERSION >= 40400 # define GPGRT_HAVE_PRAGMA_GCC_PUSH 1 #endif /* Detect LeakSanitizer (LSan) support for GCC and Clang based on * whether AddressSanitizer (ASAN) is enabled via -fsanitize=address). * Note that -fsanitize=leak just affect the linker options which * cannot be detected here. In that case you have to define the * GPGRT_HAVE_LEAK_SANITIZER macro manually. */ #ifdef __GNUC__ # ifdef __SANITIZE_ADDRESS__ # define GPGRT_HAVE_LEAK_SANITIZER # elif defined(__has_feature) # if __has_feature(address_sanitizer) # define GPGRT_HAVE_LEAK_SANITIZER # endif # endif #endif /* The new name for the inline macro. */ #define GPGRT_INLINE GPG_ERR_INLINE #ifdef GPGRT_HAVE_LEAK_SANITIZER # include #endif /* Mark heap objects as non-leaked memory. */ static GPGRT_INLINE void gpgrt_annotate_leaked_object (const void *p) { #ifdef GPGRT_HAVE_LEAK_SANITIZER __lsan_ignore_object(p); #else (void)p; #endif } /* * Initialization function. */ /* Initialize the library. This function should be run early. */ gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR; /* If this is defined, the library is already initialized by the constructor and does not need to be initialized explicitely. */ #undef GPG_ERR_INITIALIZED #ifdef _GPG_ERR_HAVE_CONSTRUCTOR # define GPG_ERR_INITIALIZED 1 # define gpgrt_init() do { gpg_err_init (); } while (0) #else # define gpgrt_init() do { ; } while (0) #endif /* See the source on how to use the deinit function; it is usually not required. */ void gpg_err_deinit (int mode); /* Register blocking system I/O clamping functions. */ void gpgrt_set_syscall_clamp (void (*pre)(void), void (*post)(void)); /* Get current I/O clamping functions. */ void gpgrt_get_syscall_clamp (void (**r_pre)(void), void (**r_post)(void)); /* Register a custom malloc/realloc/free function. */ void gpgrt_set_alloc_func (void *(*f)(void *a, size_t n)); /* * Constructor and accessor functions. */ /* Construct an error value from an error code and source. Within a * subsystem, use gpg_error. */ static GPG_ERR_INLINE gpg_error_t gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) { return code == GPG_ERR_NO_ERROR ? GPG_ERR_NO_ERROR : (((source & GPG_ERR_SOURCE_MASK) << GPG_ERR_SOURCE_SHIFT) | (code & GPG_ERR_CODE_MASK)); } /* The user should define GPG_ERR_SOURCE_DEFAULT before including this * file to specify a default source for gpg_error. */ #ifndef GPG_ERR_SOURCE_DEFAULT #define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_UNKNOWN #endif static GPG_ERR_INLINE gpg_error_t gpg_error (gpg_err_code_t code) { return gpg_err_make (GPG_ERR_SOURCE_DEFAULT, code); } /* Retrieve the error code from an error value. */ static GPG_ERR_INLINE gpg_err_code_t gpg_err_code (gpg_error_t err) { return (gpg_err_code_t) (err & GPG_ERR_CODE_MASK); } /* Retrieve the error source from an error value. */ static GPG_ERR_INLINE gpg_err_source_t gpg_err_source (gpg_error_t err) { return (gpg_err_source_t) ((err >> GPG_ERR_SOURCE_SHIFT) & GPG_ERR_SOURCE_MASK); } /* String functions. */ /* Return a pointer to a string containing a description of the error * code in the error value ERR. This function is not thread-safe. */ const char *gpg_strerror (gpg_error_t err); /* Return the error string for ERR in the user-supplied buffer BUF of * size BUFLEN. This function is, in contrast to gpg_strerror, * thread-safe if a thread-safe strerror_r() function is provided by * the system. If the function succeeds, 0 is returned and BUF * contains the string describing the error. If the buffer was not * large enough, ERANGE is returned and BUF contains as much of the * beginning of the error string as fits into the buffer. */ int gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen); /* Return a pointer to a string containing a description of the error * source in the error value ERR. */ const char *gpg_strsource (gpg_error_t err); /* * Mapping of system errors (errno). */ /* Retrieve the error code for the system error ERR. This returns * GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report * this). */ gpg_err_code_t gpg_err_code_from_errno (int err); /* Retrieve the system error for the error code CODE. This returns 0 * if CODE is not a system error code. */ int gpg_err_code_to_errno (gpg_err_code_t code); /* Retrieve the error code directly from the ERRNO variable. This * returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped * (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ gpg_err_code_t gpg_err_code_from_syserror (void); /* Set the ERRNO variable. This function is the preferred way to set * ERRNO due to peculiarities on WindowsCE. */ void gpg_err_set_errno (int err); /* Return or check the version. Both functions are identical. */ const char *gpgrt_check_version (const char *req_version); const char *gpg_error_check_version (const char *req_version); /* System specific type definitions. */ #include typedef ssize_t gpgrt_ssize_t; #include typedef int64_t gpgrt_off_t; /* Self-documenting convenience functions. */ static GPG_ERR_INLINE gpg_error_t gpg_err_make_from_errno (gpg_err_source_t source, int err) { return gpg_err_make (source, gpg_err_code_from_errno (err)); } static GPG_ERR_INLINE gpg_error_t gpg_error_from_errno (int err) { return gpg_error (gpg_err_code_from_errno (err)); } static GPG_ERR_INLINE gpg_error_t gpg_error_from_syserror (void) { return gpg_error (gpg_err_code_from_syserror ()); } /* * Malloc and friends */ void *gpgrt_realloc (void *a, size_t n); void *gpgrt_malloc (size_t n); void *gpgrt_calloc (size_t n, size_t m); char *gpgrt_strdup (const char *string); char *gpgrt_strconcat (const char *s1, ...) GPGRT_ATTR_SENTINEL(0); void gpgrt_free (void *a); /* * System specific function wrappers. */ /* A getenv replacement which mallocs the returned string. */ char *gpgrt_getenv (const char *name); /* A setenv and a unsetenv replacement.*/ gpg_err_code_t gpgrt_setenv (const char *name, const char *value, int overwrite); #define gpgrt_unsetenv(n) gpgrt_setenv ((n), NULL, 1) /* A wrapper around mkdir using a string for the mode. */ gpg_err_code_t gpgrt_mkdir (const char *name, const char *modestr); /* A simple wrapper around chdir. */ gpg_err_code_t gpgrt_chdir (const char *name); /* Return the current WD as a malloced string. */ char *gpgrt_getcwd (void); /* * Lock functions. */ #include typedef struct { long _vers; union { volatile char _priv[sizeof(pthread_mutex_t)]; long _x_align; long *_xp_align; } u; } gpgrt_lock_t; #define GPGRT_LOCK_INITIALIZER {1,{{0}}} #define GPGRT_LOCK_DEFINE(name) \ static gpgrt_lock_t name = GPGRT_LOCK_INITIALIZER /* NB: If GPGRT_LOCK_DEFINE is not used, zero out the lock variable before passing it to gpgrt_lock_init. */ gpg_err_code_t gpgrt_lock_init (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_lock (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_trylock (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_unlock (gpgrt_lock_t *lockhd); gpg_err_code_t gpgrt_lock_destroy (gpgrt_lock_t *lockhd); /* * Thread functions. */ gpg_err_code_t gpgrt_yield (void); /* * Estream */ /* The definition of this struct is entirely private. You must not use it for anything. It is only here so some functions can be implemented as macros. */ struct _gpgrt_stream_internal; struct _gpgrt__stream { /* The layout of this struct must never change. It may be grown, but only if all functions which access the new members are versioned. */ /* Various flags. */ struct { unsigned int magic: 16; unsigned int writing: 1; unsigned int reserved: 15; } flags; /* A pointer to the stream buffer. */ unsigned char *buffer; /* The size of the buffer in bytes. */ size_t buffer_size; /* The length of the usable data in the buffer, only valid when in read mode (see flags). */ size_t data_len; /* The current position of the offset pointer, valid in read and write mode. */ size_t data_offset; size_t data_flushed; unsigned char *unread_buffer; size_t unread_buffer_size; /* The number of unread bytes. */ size_t unread_data_len; /* A pointer to our internal data for this stream. */ struct _gpgrt_stream_internal *intern; }; /* The opaque type for an estream. */ typedef struct _gpgrt__stream *gpgrt_stream_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt__stream *estream_t; #endif typedef ssize_t (*gpgrt_cookie_read_function_t) (void *cookie, void *buffer, size_t size); typedef ssize_t (*gpgrt_cookie_write_function_t) (void *cookie, const void *buffer, size_t size); typedef int (*gpgrt_cookie_seek_function_t) (void *cookie, gpgrt_off_t *pos, int whence); typedef int (*gpgrt_cookie_close_function_t) (void *cookie); struct _gpgrt_cookie_io_functions { gpgrt_cookie_read_function_t func_read; gpgrt_cookie_write_function_t func_write; gpgrt_cookie_seek_function_t func_seek; gpgrt_cookie_close_function_t func_close; }; typedef struct _gpgrt_cookie_io_functions gpgrt_cookie_io_functions_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt_cookie_io_functions es_cookie_io_functions_t; #define es_cookie_read_function_t gpgrt_cookie_read_function_t #define es_cookie_write_function_t gpgrt_cookie_read_function_t #define es_cookie_seek_function_t gpgrt_cookie_read_function_t #define es_cookie_close_function_t gpgrt_cookie_read_function_t #endif enum gpgrt_syshd_types { GPGRT_SYSHD_NONE = 0, /* No system handle available. */ GPGRT_SYSHD_FD = 1, /* A file descriptor as returned by open(). */ GPGRT_SYSHD_SOCK = 2, /* A socket as returned by socket(). */ GPGRT_SYSHD_RVID = 3, /* A rendezvous id (see libassuan's gpgcedev.c). */ GPGRT_SYSHD_HANDLE = 4 /* A HANDLE object (Windows). */ }; struct _gpgrt_syshd { enum gpgrt_syshd_types type; union { int fd; int sock; int rvid; void *handle; } u; }; typedef struct _gpgrt_syshd gpgrt_syshd_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt_syshd es_syshd_t; #define ES_SYSHD_NONE GPGRT_SYSHD_NONE #define ES_SYSHD_FD GPGRT_SYSHD_FD #define ES_SYSHD_SOCK GPGRT_SYSHD_SOCK #define ES_SYSHD_RVID GPGRT_SYSHD_RVID #define ES_SYSHD_HANDLE GPGRT_SYSHD_HANDLE #endif /* The object used with gpgrt_poll. */ struct _gpgrt_poll_s { gpgrt_stream_t stream; unsigned int want_read:1; unsigned int want_write:1; unsigned int want_oob:1; unsigned int want_rdhup:1; unsigned int _reserv1:4; unsigned int got_read:1; unsigned int got_write:1; unsigned int got_oob:1; unsigned int got_rdhup:1; unsigned int _reserv2:4; unsigned int got_err:1; unsigned int got_hup:1; unsigned int got_nval:1; unsigned int _reserv3:4; unsigned int ignore:1; unsigned int user:8; /* For application use. */ }; typedef struct _gpgrt_poll_s gpgrt_poll_t; #ifdef GPGRT_ENABLE_ES_MACROS typedef struct _gpgrt_poll_s es_poll_t; #endif gpgrt_stream_t gpgrt_fopen (const char *_GPGRT__RESTRICT path, const char *_GPGRT__RESTRICT mode); gpgrt_stream_t gpgrt_mopen (void *_GPGRT__RESTRICT data, size_t data_n, size_t data_len, unsigned int grow, void *(*func_realloc) (void *mem, size_t size), void (*func_free) (void *mem), const char *_GPGRT__RESTRICT mode); gpgrt_stream_t gpgrt_fopenmem (size_t memlimit, const char *_GPGRT__RESTRICT mode); gpgrt_stream_t gpgrt_fopenmem_init (size_t memlimit, const char *_GPGRT__RESTRICT mode, const void *data, size_t datalen); gpgrt_stream_t gpgrt_fdopen (int filedes, const char *mode); gpgrt_stream_t gpgrt_fdopen_nc (int filedes, const char *mode); gpgrt_stream_t gpgrt_sysopen (gpgrt_syshd_t *syshd, const char *mode); gpgrt_stream_t gpgrt_sysopen_nc (gpgrt_syshd_t *syshd, const char *mode); gpgrt_stream_t gpgrt_fpopen (FILE *fp, const char *mode); gpgrt_stream_t gpgrt_fpopen_nc (FILE *fp, const char *mode); gpgrt_stream_t gpgrt_freopen (const char *_GPGRT__RESTRICT path, const char *_GPGRT__RESTRICT mode, gpgrt_stream_t _GPGRT__RESTRICT stream); gpgrt_stream_t gpgrt_fopencookie (void *_GPGRT__RESTRICT cookie, const char *_GPGRT__RESTRICT mode, gpgrt_cookie_io_functions_t functions); int gpgrt_fclose (gpgrt_stream_t stream); int gpgrt_fclose_snatch (gpgrt_stream_t stream, void **r_buffer, size_t *r_buflen); int gpgrt_onclose (gpgrt_stream_t stream, int mode, void (*fnc) (gpgrt_stream_t, void*), void *fnc_value); int gpgrt_fileno (gpgrt_stream_t stream); int gpgrt_fileno_unlocked (gpgrt_stream_t stream); int gpgrt_syshd (gpgrt_stream_t stream, gpgrt_syshd_t *syshd); int gpgrt_syshd_unlocked (gpgrt_stream_t stream, gpgrt_syshd_t *syshd); void _gpgrt_set_std_fd (int no, int fd); gpgrt_stream_t _gpgrt_get_std_stream (int fd); #define gpgrt_stdin _gpgrt_get_std_stream (0) #define gpgrt_stdout _gpgrt_get_std_stream (1) #define gpgrt_stderr _gpgrt_get_std_stream (2) void gpgrt_flockfile (gpgrt_stream_t stream); int gpgrt_ftrylockfile (gpgrt_stream_t stream); void gpgrt_funlockfile (gpgrt_stream_t stream); int gpgrt_feof (gpgrt_stream_t stream); int gpgrt_feof_unlocked (gpgrt_stream_t stream); int gpgrt_ferror (gpgrt_stream_t stream); int gpgrt_ferror_unlocked (gpgrt_stream_t stream); void gpgrt_clearerr (gpgrt_stream_t stream); void gpgrt_clearerr_unlocked (gpgrt_stream_t stream); int _gpgrt_pending (gpgrt_stream_t stream); /* (private) */ int _gpgrt_pending_unlocked (gpgrt_stream_t stream); /* (private) */ #define gpgrt_pending(stream) _gpgrt_pending (stream) #define gpgrt_pending_unlocked(stream) \ (((!(stream)->flags.writing) \ && (((stream)->data_offset < (stream)->data_len) \ || ((stream)->unread_data_len))) \ ? 1 : _gpgrt_pending_unlocked ((stream))) int gpgrt_fflush (gpgrt_stream_t stream); int gpgrt_fseek (gpgrt_stream_t stream, long int offset, int whence); int gpgrt_fseeko (gpgrt_stream_t stream, gpgrt_off_t offset, int whence); long int gpgrt_ftell (gpgrt_stream_t stream); gpgrt_off_t gpgrt_ftello (gpgrt_stream_t stream); void gpgrt_rewind (gpgrt_stream_t stream); int gpgrt_fgetc (gpgrt_stream_t stream); int gpgrt_fputc (int c, gpgrt_stream_t stream); int _gpgrt_getc_underflow (gpgrt_stream_t stream); /* (private) */ int _gpgrt_putc_overflow (int c, gpgrt_stream_t stream); /* (private) */ #define gpgrt_getc_unlocked(stream) \ (((!(stream)->flags.writing) \ && ((stream)->data_offset < (stream)->data_len) \ && (! (stream)->unread_data_len)) \ ? ((int) (stream)->buffer[((stream)->data_offset)++]) \ : _gpgrt_getc_underflow ((stream))) #define gpgrt_putc_unlocked(c, stream) \ (((stream)->flags.writing \ && ((stream)->data_offset < (stream)->buffer_size) \ && (c != '\n')) \ ? ((int) ((stream)->buffer[((stream)->data_offset)++] = (c))) \ : _gpgrt_putc_overflow ((c), (stream))) #define gpgrt_getc(stream) gpgrt_fgetc (stream) #define gpgrt_putc(c, stream) gpgrt_fputc (c, stream) int gpgrt_ungetc (int c, gpgrt_stream_t stream); int gpgrt_read (gpgrt_stream_t _GPGRT__RESTRICT stream, void *_GPGRT__RESTRICT buffer, size_t bytes_to_read, size_t *_GPGRT__RESTRICT bytes_read); int gpgrt_write (gpgrt_stream_t _GPGRT__RESTRICT stream, const void *_GPGRT__RESTRICT buffer, size_t bytes_to_write, size_t *_GPGRT__RESTRICT bytes_written); int gpgrt_write_sanitized (gpgrt_stream_t _GPGRT__RESTRICT stream, const void *_GPGRT__RESTRICT buffer, size_t length, const char *delimiters, size_t *_GPGRT__RESTRICT bytes_written); int gpgrt_write_hexstring (gpgrt_stream_t _GPGRT__RESTRICT stream, const void *_GPGRT__RESTRICT buffer, size_t length, int reserved, size_t *_GPGRT__RESTRICT bytes_written); size_t gpgrt_fread (void *_GPGRT__RESTRICT ptr, size_t size, size_t nitems, gpgrt_stream_t _GPGRT__RESTRICT stream); size_t gpgrt_fwrite (const void *_GPGRT__RESTRICT ptr, size_t size, size_t memb, gpgrt_stream_t _GPGRT__RESTRICT stream); char *gpgrt_fgets (char *_GPGRT__RESTRICT s, int n, gpgrt_stream_t _GPGRT__RESTRICT stream); int gpgrt_fputs (const char *_GPGRT__RESTRICT s, gpgrt_stream_t _GPGRT__RESTRICT stream); int gpgrt_fputs_unlocked (const char *_GPGRT__RESTRICT s, gpgrt_stream_t _GPGRT__RESTRICT stream); ssize_t gpgrt_getline (char *_GPGRT__RESTRICT *_GPGRT__RESTRICT lineptr, size_t *_GPGRT__RESTRICT n, gpgrt_stream_t stream); ssize_t gpgrt_read_line (gpgrt_stream_t stream, char **addr_of_buffer, size_t *length_of_buffer, size_t *max_length); int gpgrt_fprintf (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(2,3); int gpgrt_fprintf_unlocked (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(2,3); int gpgrt_printf (const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(1,2); int gpgrt_printf_unlocked (const char *_GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(1,2); int gpgrt_vfprintf (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(2,0); int gpgrt_vfprintf_unlocked (gpgrt_stream_t _GPGRT__RESTRICT stream, const char *_GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(2,0); int gpgrt_setvbuf (gpgrt_stream_t _GPGRT__RESTRICT stream, char *_GPGRT__RESTRICT buf, int mode, size_t size); void gpgrt_setbuf (gpgrt_stream_t _GPGRT__RESTRICT stream, char *_GPGRT__RESTRICT buf); void gpgrt_set_binary (gpgrt_stream_t stream); int gpgrt_set_nonblock (gpgrt_stream_t stream, int onoff); int gpgrt_get_nonblock (gpgrt_stream_t stream); int gpgrt_poll (gpgrt_poll_t *fdlist, unsigned int nfds, int timeout); gpgrt_stream_t gpgrt_tmpfile (void); void gpgrt_opaque_set (gpgrt_stream_t _GPGRT__RESTRICT stream, void *_GPGRT__RESTRICT opaque); void *gpgrt_opaque_get (gpgrt_stream_t stream); void gpgrt_fname_set (gpgrt_stream_t stream, const char *fname); const char *gpgrt_fname_get (gpgrt_stream_t stream); int gpgrt_asprintf (char **r_buf, const char * _GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(2,3); int gpgrt_vasprintf (char **r_buf, const char * _GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(2,0); char *gpgrt_bsprintf (const char * _GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(1,2); char *gpgrt_vbsprintf (const char * _GPGRT__RESTRICT format, va_list ap) GPGRT_ATTR_PRINTF(1,0); int gpgrt_snprintf (char *buf, size_t bufsize, const char * _GPGRT__RESTRICT format, ...) GPGRT_ATTR_PRINTF(3,4); int gpgrt_vsnprintf (char *buf,size_t bufsize, const char * _GPGRT__RESTRICT format, va_list arg_ptr) GPGRT_ATTR_PRINTF(3,0); #ifdef GPGRT_ENABLE_ES_MACROS # define es_fopen gpgrt_fopen # define es_mopen gpgrt_mopen # define es_fopenmem gpgrt_fopenmem # define es_fopenmem_init gpgrt_fopenmem_init # define es_fdopen gpgrt_fdopen # define es_fdopen_nc gpgrt_fdopen_nc # define es_sysopen gpgrt_sysopen # define es_sysopen_nc gpgrt_sysopen_nc # define es_fpopen gpgrt_fpopen # define es_fpopen_nc gpgrt_fpopen_nc # define es_freopen gpgrt_freopen # define es_fopencookie gpgrt_fopencookie # define es_fclose gpgrt_fclose # define es_fclose_snatch gpgrt_fclose_snatch # define es_onclose gpgrt_onclose # define es_fileno gpgrt_fileno # define es_fileno_unlocked gpgrt_fileno_unlocked # define es_syshd gpgrt_syshd # define es_syshd_unlocked gpgrt_syshd_unlocked # define es_stdin _gpgrt_get_std_stream (0) # define es_stdout _gpgrt_get_std_stream (1) # define es_stderr _gpgrt_get_std_stream (2) # define es_flockfile gpgrt_flockfile # define es_ftrylockfile gpgrt_ftrylockfile # define es_funlockfile gpgrt_funlockfile # define es_feof gpgrt_feof # define es_feof_unlocked gpgrt_feof_unlocked # define es_ferror gpgrt_ferror # define es_ferror_unlocked gpgrt_ferror_unlocked # define es_clearerr gpgrt_clearerr # define es_clearerr_unlocked gpgrt_clearerr_unlocked # define es_pending gpgrt_pending # define es_pending_unlocked gpgrt_pending_unlocked # define es_fflush gpgrt_fflush # define es_fseek gpgrt_fseek # define es_fseeko gpgrt_fseeko # define es_ftell gpgrt_ftell # define es_ftello gpgrt_ftello # define es_rewind gpgrt_rewind # define es_fgetc gpgrt_fgetc # define es_fputc gpgrt_fputc # define es_getc_unlocked gpgrt_getc_unlocked # define es_putc_unlocked gpgrt_putc_unlocked # define es_getc gpgrt_getc # define es_putc gpgrt_putc # define es_ungetc gpgrt_ungetc # define es_read gpgrt_read # define es_write gpgrt_write # define es_write_sanitized gpgrt_write_sanitized # define es_write_hexstring gpgrt_write_hexstring # define es_fread gpgrt_fread # define es_fwrite gpgrt_fwrite # define es_fgets gpgrt_fgets # define es_fputs gpgrt_fputs # define es_fputs_unlocked gpgrt_fputs_unlocked # define es_getline gpgrt_getline # define es_read_line gpgrt_read_line # define es_free gpgrt_free # define es_fprintf gpgrt_fprintf # define es_fprintf_unlocked gpgrt_fprintf_unlocked # define es_printf gpgrt_printf # define es_printf_unlocked gpgrt_printf_unlocked # define es_vfprintf gpgrt_vfprintf # define es_vfprintf_unlocked gpgrt_vfprintf_unlocked # define es_setvbuf gpgrt_setvbuf # define es_setbuf gpgrt_setbuf # define es_set_binary gpgrt_set_binary # define es_set_nonblock gpgrt_set_nonblock # define es_get_nonblock gpgrt_get_nonblock # define es_poll gpgrt_poll # define es_tmpfile gpgrt_tmpfile # define es_opaque_set gpgrt_opaque_set # define es_opaque_get gpgrt_opaque_get # define es_fname_set gpgrt_fname_set # define es_fname_get gpgrt_fname_get # define es_asprintf gpgrt_asprintf # define es_vasprintf gpgrt_vasprintf # define es_bsprintf gpgrt_bsprintf # define es_vbsprintf gpgrt_vbsprintf #endif /*GPGRT_ENABLE_ES_MACROS*/ /* * Base64 encode and decode functions. */ struct _gpgrt_b64state; typedef struct _gpgrt_b64state *gpgrt_b64state_t; gpgrt_b64state_t gpgrt_b64enc_start (gpgrt_stream_t stream, const char *title); gpg_err_code_t gpgrt_b64enc_write (gpgrt_b64state_t state, const void *buffer, size_t nbytes); gpg_err_code_t gpgrt_b64enc_finish (gpgrt_b64state_t state); gpgrt_b64state_t gpgrt_b64dec_start (const char *title); gpg_error_t gpgrt_b64dec_proc (gpgrt_b64state_t state, void *buffer, size_t length, size_t *r_nbytes); gpg_error_t gpgrt_b64dec_finish (gpgrt_b64state_t state); /* * Logging functions */ /* Flag values for gpgrt_log_set_prefix. */ #define GPGRT_LOG_WITH_PREFIX 1 #define GPGRT_LOG_WITH_TIME 2 #define GPGRT_LOG_WITH_PID 4 #define GPGRT_LOG_RUN_DETACHED 256 #define GPGRT_LOG_NO_REGISTRY 512 /* Log levels as used by gpgrt_log. */ enum gpgrt_log_levels { GPGRT_LOGLVL_BEGIN, GPGRT_LOGLVL_CONT, GPGRT_LOGLVL_INFO, GPGRT_LOGLVL_WARN, GPGRT_LOGLVL_ERROR, GPGRT_LOGLVL_FATAL, GPGRT_LOGLVL_BUG, GPGRT_LOGLVL_DEBUG }; /* The next 4 functions are not thread-safe - call them early. */ void gpgrt_log_set_sink (const char *name, gpgrt_stream_t stream, int fd); void gpgrt_log_set_socket_dir_cb (const char *(*fnc)(void)); void gpgrt_log_set_pid_suffix_cb (int (*cb)(unsigned long *r_value)); void gpgrt_log_set_prefix (const char *text, unsigned int flags); int gpgrt_get_errorcount (int clear); void gpgrt_inc_errorcount (void); const char *gpgrt_log_get_prefix (unsigned int *flags); int gpgrt_log_test_fd (int fd); int gpgrt_log_get_fd (void); gpgrt_stream_t gpgrt_log_get_stream (void); void gpgrt_log (int level, const char *fmt, ...) GPGRT_ATTR_PRINTF(2,3); void gpgrt_logv (int level, const char *fmt, va_list arg_ptr); void gpgrt_logv_prefix (int level, const char *prefix, const char *fmt, va_list arg_ptr); void gpgrt_log_string (int level, const char *string); void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2); void gpgrt_log_fatal (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2); void gpgrt_log_error (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_info (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_debug (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_debug_string (const char *string, const char *fmt, ...) GPGRT_ATTR_PRINTF(2,3); void gpgrt_log_printf (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_printhex (const void *buffer, size_t length, const char *fmt, ...) GPGRT_ATTR_PRINTF(3,4); void gpgrt_log_clock (const char *fmt, ...) GPGRT_ATTR_PRINTF(1,2); void gpgrt_log_flush (void); void _gpgrt_log_assert (const char *expr, const char *file, int line, const char *func) GPGRT_ATTR_NORETURN; #ifdef GPGRT_HAVE_MACRO_FUNCTION # define gpgrt_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, __FUNCTION__)) #else /*!GPGRT_HAVE_MACRO_FUNCTION*/ # define gpgrt_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, NULL)) #endif /*!GPGRT_HAVE_MACRO_FUNCTION*/ #ifdef GPGRT_ENABLE_LOG_MACROS # define log_get_errorcount gpgrt_get_errorcount # define log_inc_errorcount gpgrt_inc_errorcount # define log_set_file(a) gpgrt_log_set_sink ((a), NULL, -1) # define log_set_fd(a) gpgrt_log_set_sink (NULL, NULL, (a)) # define log_set_stream(a) gpgrt_log_set_sink (NULL, (a), -1) # define log_set_socket_dir_cb gpgrt_log_set_socket_dir_cb # define log_set_pid_suffix_cb gpgrt_log_set_pid_suffix_cb # define log_set_prefix gpgrt_log_set_prefix # define log_get_prefix gpgrt_log_get_prefix # define log_test_fd gpgrt_log_test_fd # define log_get_fd gpgrt_log_get_fd # define log_get_stream gpgrt_log_get_stream # define log_log gpgrt_log # define log_logv gpgrt_logv # define log_logv_prefix gpgrt_logv_prefix # define log_string gpgrt_log_string # define log_bug gpgrt_log_bug # define log_fatal gpgrt_log_fatal # define log_error gpgrt_log_error # define log_info gpgrt_log_info # define log_debug gpgrt_log_debug # define log_debug_string gpgrt_log_debug_string # define log_printf gpgrt_log_printf # define log_printhex gpgrt_log_printhex # define log_clock gpgrt_log_clock # define log_flush gpgrt_log_flush # ifdef GPGRT_HAVE_MACRO_FUNCTION # define log_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, __FUNCTION__)) # else /*!GPGRT_HAVE_MACRO_FUNCTION*/ # define log_assert(expr) \ ((expr) \ ? (void) 0 \ : _gpgrt_log_assert (#expr, __FILE__, __LINE__, NULL)) # endif /*!GPGRT_HAVE_MACRO_FUNCTION*/ #endif /*GPGRT_ENABLE_LOG_MACROS*/ /* * Spawn functions (Not yet available) */ #define GPGRT_SPAWN_NONBLOCK 16 /* Set the streams to non-blocking. */ #define GPGRT_SPAWN_RUN_ASFW 64 /* Use AllowSetForegroundWindow on W32. */ #define GPGRT_SPAWN_DETACHED 128 /* Start the process in the background. */ #if 0 /* Function and convenience macros to create pipes. */ gpg_err_code_t gpgrt_make_pipe (int filedes[2], gpgrt_stream_t *r_fp, int direction, int nonblock); #define gpgrt_create_pipe(a) gpgrt_make_pipe ((a),NULL, 0, 0); #define gpgrt_create_inbound_pipe(a,b,c) gpgrt_make_pipe ((a), (b), -1,(c)); #define gpgrt_create_outbound_pipe(a,b,c) gpgrt_make_pipe ((a), (b), 1,(c)); /* Fork and exec PGMNAME. */ gpg_err_code_t gpgrt_spawn_process (const char *pgmname, const char *argv[], int *execpt, void (*preexec)(void), unsigned int flags, gpgrt_stream_t *r_infp, gpgrt_stream_t *r_outfp, gpgrt_stream_t *r_errfp, pid_t *pid); /* Fork and exec PGNNAME and connect the process to the given FDs. */ gpg_err_code_t gpgrt_spawn_process_fd (const char *pgmname, const char *argv[], int infd, int outfd, int errfd, pid_t *pid); /* Fork and exec PGMNAME as a detached process. */ gpg_err_code_t gpgrt_spawn_process_detached (const char *pgmname, const char *argv[], const char *envp[] ); /* Wait for a single process. */ gpg_err_code_t gpgrt_wait_process (const char *pgmname, pid_t pid, int hang, int *r_exitcode); /* Wait for a multiple processes. */ gpg_err_code_t gpgrt_wait_processes (const char **pgmnames, pid_t *pids, size_t count, int hang, int *r_exitcodes); /* Kill the process identified by PID. */ void gpgrt_kill_process (pid_t pid); /* Release process resources identified by PID. */ void gpgrt_release_process (pid_t pid); #endif /*0*/ /* * Option parsing. */ struct _gpgrt_argparse_internal_s; typedef struct { int *argc; /* Pointer to ARGC (value subject to change). */ char ***argv; /* Pointer to ARGV (value subject to change). */ unsigned int flags; /* Global flags. May be set prior to calling the parser. The parser may change the value. */ int err; /* Print error description for last option. Either 0, ARGPARSE_PRINT_WARNING or ARGPARSE_PRINT_ERROR. */ unsigned int lineno;/* The current line number. */ int r_opt; /* Returns option code. */ int r_type; /* Returns type of option value. */ union { int ret_int; long ret_long; unsigned long ret_ulong; char *ret_str; } r; /* Return values */ struct _gpgrt_argparse_internal_s *internal; } gpgrt_argparse_t; typedef struct { int short_opt; const char *long_opt; unsigned int flags; const char *description; /* Optional description. */ } gpgrt_opt_t; #ifdef GPGRT_ENABLE_ARGPARSE_MACROS /* Global flags for (gpgrt_argparse_t).flags. */ #define ARGPARSE_FLAG_KEEP 1 /* Do not remove options form argv. */ #define ARGPARSE_FLAG_ALL 2 /* Do not stop at last option but return remaining args with R_OPT set to -1. */ #define ARGPARSE_FLAG_MIXED 4 /* Assume options and args are mixed. */ #define ARGPARSE_FLAG_NOSTOP 8 /* Do not stop processing at "--". */ #define ARGPARSE_FLAG_ARG0 16 /* Do not skip the first arg. */ #define ARGPARSE_FLAG_ONEDASH 32 /* Allow long options with one dash. */ #define ARGPARSE_FLAG_NOVERSION 64 /* No output for "--version". */ #define ARGPARSE_FLAG_RESET 128 /* Request to reset the internal state. */ #define ARGPARSE_FLAG_STOP_SEEN 256 /* Set to true if a "--" has been seen. */ #define ARGPARSE_FLAG_NOLINENO 512 /* Do not zero the lineno field. */ /* Constants for (gpgrt_argparse_t).err. */ #define ARGPARSE_PRINT_WARNING 1 /* Print a diagnostic. */ #define ARGPARSE_PRINT_ERROR 2 /* Print a diagnostic and call exit. */ /* Special return values of gpgrt_argparse. */ #define ARGPARSE_IS_ARG (-1) #define ARGPARSE_INVALID_OPTION (-2) #define ARGPARSE_MISSING_ARG (-3) #define ARGPARSE_KEYWORD_TOO_LONG (-4) #define ARGPARSE_READ_ERROR (-5) #define ARGPARSE_UNEXPECTED_ARG (-6) #define ARGPARSE_INVALID_COMMAND (-7) #define ARGPARSE_AMBIGUOUS_OPTION (-8) #define ARGPARSE_AMBIGUOUS_COMMAND (-9) #define ARGPARSE_INVALID_ALIAS (-10) #define ARGPARSE_OUT_OF_CORE (-11) #define ARGPARSE_INVALID_ARG (-12) /* Flags for the option descriptor (gpgrt_opt_t)->flags. Note that * a TYPE constant may be or-ed with the OPT constants. */ #define ARGPARSE_TYPE_NONE 0 /* Does not take an argument. */ #define ARGPARSE_TYPE_INT 1 /* Takes an int argument. */ #define ARGPARSE_TYPE_STRING 2 /* Takes a string argument. */ #define ARGPARSE_TYPE_LONG 3 /* Takes a long argument. */ #define ARGPARSE_TYPE_ULONG 4 /* Takes an unsigned long argument. */ #define ARGPARSE_OPT_OPTIONAL (1<<3) /* Argument is optional. */ #define ARGPARSE_OPT_PREFIX (1<<4) /* Allow 0x etc. prefixed values. */ #define ARGPARSE_OPT_IGNORE (1<<6) /* Ignore command or option. */ #define ARGPARSE_OPT_COMMAND (1<<7) /* The argument is a command. */ /* A set of macros to make option definitions easier to read. */ #define ARGPARSE_x(s,l,t,f,d) \ { (s), (l), ARGPARSE_TYPE_ ## t | (f), (d) } #define ARGPARSE_s(s,l,t,d) \ { (s), (l), ARGPARSE_TYPE_ ## t, (d) } #define ARGPARSE_s_n(s,l,d) \ { (s), (l), ARGPARSE_TYPE_NONE, (d) } #define ARGPARSE_s_i(s,l,d) \ { (s), (l), ARGPARSE_TYPE_INT, (d) } #define ARGPARSE_s_s(s,l,d) \ { (s), (l), ARGPARSE_TYPE_STRING, (d) } #define ARGPARSE_s_l(s,l,d) \ { (s), (l), ARGPARSE_TYPE_LONG, (d) } #define ARGPARSE_s_u(s,l,d) \ { (s), (l), ARGPARSE_TYPE_ULONG, (d) } #define ARGPARSE_o(s,l,t,d) \ { (s), (l), (ARGPARSE_TYPE_ ## t | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_n(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_i(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_INT | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_s(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_STRING | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_l(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_LONG | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_o_u(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_ULONG | ARGPARSE_OPT_OPTIONAL), (d) } #define ARGPARSE_p(s,l,t,d) \ { (s), (l), (ARGPARSE_TYPE_ ## t | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_n(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_i(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_INT | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_s(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_STRING | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_l(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_LONG | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_p_u(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_ULONG | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op(s,l,t,d) \ { (s), (l), (ARGPARSE_TYPE_ ## t \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_n(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_i(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_INT \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_s(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_STRING \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_l(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_LONG \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_op_u(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_ULONG \ | ARGPARSE_OPT_OPTIONAL | ARGPARSE_OPT_PREFIX), (d) } #define ARGPARSE_c(s,l,d) \ { (s), (l), (ARGPARSE_TYPE_NONE | ARGPARSE_OPT_COMMAND), (d) } #define ARGPARSE_ignore(s,l) \ { (s), (l), (ARGPARSE_OPT_IGNORE), "@" } #define ARGPARSE_group(s,d) \ { (s), NULL, 0, (d) } /* Mark the end of the list (mandatory). */ #define ARGPARSE_end() \ { 0, NULL, 0, NULL } #endif /* GPGRT_ENABLE_ARGPARSE_MACROS */ /* Take care: gpgrt_argparse keeps state in ARG and requires that * either ARGPARSE_FLAG_RESET is used after OPTS has been changed or * gpgrt_argparse (NULL, ARG, NULL) is called first. */ int gpgrt_argparse (gpgrt_stream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts); void gpgrt_usage (int level); const char *gpgrt_strusage (int level); void gpgrt_set_strusage (const char *(*f)(int)); void gpgrt_set_usage_outfnc (int (*f)(int, const char *)); void gpgrt_set_fixed_string_mapper (const char *(*f)(const char*)); #ifdef __cplusplus } #endif #endif /* GPGRT_H */ #endif /* GPG_ERROR_H */ /* Local Variables: buffer-read-only: t End: */ PKZ` ` gnumake.hnu[/* External interfaces usable by dynamic objects loaded into GNU Make. --THIS API IS A "TECHNOLOGY PREVIEW" ONLY. IT IS NOT A STABLE INTERFACE-- Copyright (C) 2013-2016 Free Software Foundation, Inc. This file is part of GNU Make. GNU Make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _GNUMAKE_H_ #define _GNUMAKE_H_ /* Specify the location of elements read from makefiles. */ typedef struct { const char *filenm; unsigned long lineno; } gmk_floc; typedef char *(*gmk_func_ptr)(const char *nm, unsigned int argc, char **argv); #ifdef _WIN32 # ifdef GMK_BUILDING_MAKE # define GMK_EXPORT __declspec(dllexport) # else # define GMK_EXPORT __declspec(dllimport) # endif #else # define GMK_EXPORT #endif /* Free memory returned by the gmk_expand() function. */ GMK_EXPORT void gmk_free (char *str); /* Allocate memory in GNU make's context. */ GMK_EXPORT char *gmk_alloc (unsigned int len); /* Run $(eval ...) on the provided string BUFFER. */ GMK_EXPORT void gmk_eval (const char *buffer, const gmk_floc *floc); /* Run GNU make expansion on the provided string STR. Returns an allocated buffer that the caller must free with gmk_free(). */ GMK_EXPORT char *gmk_expand (const char *str); /* Register a new GNU make function NAME (maximum of 255 chars long). When the function is expanded in the makefile, FUNC will be invoked with the appropriate arguments. The return value of FUNC must be either NULL, in which case it expands to the empty string, or a pointer to the result of the expansion in a string created by gmk_alloc(). GNU make will free the memory when it's done. MIN_ARGS is the minimum number of arguments the function requires. MAX_ARGS is the maximum number of arguments (or 0 if there's no maximum). MIN_ARGS and MAX_ARGS may not exceed 255. The FLAGS value may be GMK_FUNC_DEFAULT, or one or more of the following flags OR'd together: GMK_FUNC_NOEXPAND: the arguments to the function will be not be expanded before FUNC is called. */ GMK_EXPORT void gmk_add_function (const char *name, gmk_func_ptr func, unsigned int min_args, unsigned int max_args, unsigned int flags); #define GMK_FUNC_DEFAULT 0x00 #define GMK_FUNC_NOEXPAND 0x01 #endif /* _GNUMAKE_H_ */ PKZ%LL pcreposix.hnu[/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ #ifndef _PCREPOSIX_H #define _PCREPOSIX_H /* This is the header for the POSIX wrapper interface to the PCRE Perl- Compatible Regular Expression library. It defines the things POSIX says should be there. I hope. Copyright (c) 1997-2012 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ /* Have to include stdlib.h in order to ensure that size_t is defined. */ #include /* Allow for C++ users */ #ifdef __cplusplus extern "C" { #endif /* Options, mostly defined by POSIX, but with some extras. */ #define REG_ICASE 0x0001 /* Maps to PCRE_CASELESS */ #define REG_NEWLINE 0x0002 /* Maps to PCRE_MULTILINE */ #define REG_NOTBOL 0x0004 /* Maps to PCRE_NOTBOL */ #define REG_NOTEOL 0x0008 /* Maps to PCRE_NOTEOL */ #define REG_DOTALL 0x0010 /* NOT defined by POSIX; maps to PCRE_DOTALL */ #define REG_NOSUB 0x0020 /* Maps to PCRE_NO_AUTO_CAPTURE */ #define REG_UTF8 0x0040 /* NOT defined by POSIX; maps to PCRE_UTF8 */ #define REG_STARTEND 0x0080 /* BSD feature: pass subject string by so,eo */ #define REG_NOTEMPTY 0x0100 /* NOT defined by POSIX; maps to PCRE_NOTEMPTY */ #define REG_UNGREEDY 0x0200 /* NOT defined by POSIX; maps to PCRE_UNGREEDY */ #define REG_UCP 0x0400 /* NOT defined by POSIX; maps to PCRE_UCP */ /* This is not used by PCRE, but by defining it we make it easier to slot PCRE into existing programs that make POSIX calls. */ #define REG_EXTENDED 0 /* Error values. Not all these are relevant or used by the wrapper. */ enum { REG_ASSERT = 1, /* internal error ? */ REG_BADBR, /* invalid repeat counts in {} */ REG_BADPAT, /* pattern error */ REG_BADRPT, /* ? * + invalid */ REG_EBRACE, /* unbalanced {} */ REG_EBRACK, /* unbalanced [] */ REG_ECOLLATE, /* collation error - not relevant */ REG_ECTYPE, /* bad class */ REG_EESCAPE, /* bad escape sequence */ REG_EMPTY, /* empty expression */ REG_EPAREN, /* unbalanced () */ REG_ERANGE, /* bad range inside [] */ REG_ESIZE, /* expression too big */ REG_ESPACE, /* failed to get memory */ REG_ESUBREG, /* bad back reference */ REG_INVARG, /* bad argument */ REG_NOMATCH /* match failed */ }; /* The structure representing a compiled regular expression. */ typedef struct { void *re_pcre; size_t re_nsub; size_t re_erroffset; } regex_t; /* The structure in which a captured offset is returned. */ typedef int regoff_t; typedef struct { regoff_t rm_so; regoff_t rm_eo; } regmatch_t; /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE, the appropriate export settings are needed, and are set in pcreposix.c before including this file. */ #if defined(_WIN32) && !defined(PCRE_STATIC) && !defined(PCREPOSIX_EXP_DECL) # define PCREPOSIX_EXP_DECL extern __declspec(dllimport) # define PCREPOSIX_EXP_DEFN __declspec(dllimport) #endif /* By default, we use the standard "extern" declarations. */ #ifndef PCREPOSIX_EXP_DECL # ifdef __cplusplus # define PCREPOSIX_EXP_DECL extern "C" # define PCREPOSIX_EXP_DEFN extern "C" # else # define PCREPOSIX_EXP_DECL extern # define PCREPOSIX_EXP_DEFN extern # endif #endif /* The functions */ PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int); PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t, regmatch_t *, int); PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t); PCREPOSIX_EXP_DECL void regfree(regex_t *); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* End of pcreposix.h */ PKZ f,cpio.hnu[/* Extended cpio format from POSIX.1. This file is part of the GNU C Library. Copyright (C) 1992-2018 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU cpio. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _CPIO_H #define _CPIO_H 1 /* A cpio archive consists of a sequence of files. Each file has a 76 byte header, a variable length, NUL terminated filename, and variable length file data. A header for a filename "TRAILER!!!" indicates the end of the archive. */ /* All the fields in the header are ISO 646 (approximately ASCII) strings of octal numbers, left padded, not NUL terminated. Field Name Length in Bytes Notes c_magic 6 must be "070707" c_dev 6 c_ino 6 c_mode 6 see below for value c_uid 6 c_gid 6 c_nlink 6 c_rdev 6 only valid for chr and blk special files c_mtime 11 c_namesize 6 count includes terminating NUL in pathname c_filesize 11 must be 0 for FIFOs and directories */ /* Value for the field `c_magic'. */ #define MAGIC "070707" /* Values for c_mode, OR'd together: */ #define C_IRUSR 000400 #define C_IWUSR 000200 #define C_IXUSR 000100 #define C_IRGRP 000040 #define C_IWGRP 000020 #define C_IXGRP 000010 #define C_IROTH 000004 #define C_IWOTH 000002 #define C_IXOTH 000001 #define C_ISUID 004000 #define C_ISGID 002000 #define C_ISVTX 001000 #define C_ISBLK 060000 #define C_ISCHR 020000 #define C_ISDIR 040000 #define C_ISFIFO 010000 #define C_ISSOCK 0140000 #define C_ISLNK 0120000 #define C_ISCTG 0110000 #define C_ISREG 0100000 #endif /* cpio.h */ PKZr`pwd.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 9.2.2 User Database Access */ #ifndef _PWD_H #define _PWD_H 1 #include __BEGIN_DECLS #include #define __need_size_t #include #if defined __USE_XOPEN || defined __USE_XOPEN2K /* The Single Unix specification says that some more types are available here. */ # ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined # endif # ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined # endif #endif /* A record in the user database. */ struct passwd { char *pw_name; /* Username. */ char *pw_passwd; /* Hashed passphrase, if shadow database not in use (see shadow.h). */ __uid_t pw_uid; /* User ID. */ __gid_t pw_gid; /* Group ID. */ char *pw_gecos; /* Real name. */ char *pw_dir; /* Home directory. */ char *pw_shell; /* Shell program. */ }; #ifdef __USE_MISC # include #endif #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED /* Rewind the user database stream. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setpwent (void); /* Close the user database stream. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endpwent (void); /* Read an entry from the user database stream, opening it if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct passwd *getpwent (void); #endif #ifdef __USE_MISC /* Read a user database entry from STREAM. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern struct passwd *fgetpwent (FILE *__stream) __nonnull ((1)); /* Write a given user database entry onto the given stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int putpwent (const struct passwd *__restrict __p, FILE *__restrict __f); #endif /* Retrieve the user database entry for the given user ID. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct passwd *getpwuid (__uid_t __uid); /* Retrieve the user database entry for the given username. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct passwd *getpwnam (const char *__name) __nonnull ((1)); #ifdef __USE_POSIX # ifdef __USE_MISC /* Reasonable value for the buffer sized used in the reentrant functions below. But better use `sysconf'. */ # define NSS_BUFLEN_PASSWD 1024 # endif /* Reentrant versions of some of the functions above. PLEASE NOTE: the `getpwent_r' function is not (yet) standardized. The interface may change in later versions of this library. But the interface is designed following the principals used for the other reentrant functions so the chances are good this is what the POSIX people would choose. */ # ifdef __USE_MISC /* This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getpwent_r (struct passwd *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct passwd **__restrict __result) __nonnull ((1, 2, 4)); # endif extern int getpwuid_r (__uid_t __uid, struct passwd *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct passwd **__restrict __result) __nonnull ((2, 3, 5)); extern int getpwnam_r (const char *__restrict __name, struct passwd *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct passwd **__restrict __result) __nonnull ((1, 2, 3, 5)); # ifdef __USE_MISC /* Read a user database entry from STREAM. This function is not standardized and probably never will. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fgetpwent_r (FILE *__restrict __stream, struct passwd *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct passwd **__restrict __result) __nonnull ((1, 2, 3, 5)); # endif #endif /* POSIX or reentrant */ #ifdef __USE_GNU /* Write a traditional /etc/passwd line, based on the user database entry for the given UID, to BUFFER; space for BUFFER must be allocated by the caller. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getpw (__uid_t __uid, char *__buffer); #endif __END_DECLS #endif /* pwd.h */ PKZ<pcre_scanner.hnu[// Copyright (c) 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Author: Sanjay Ghemawat // // Regular-expression based scanner for parsing an input stream. // // Example 1: parse a sequence of "var = number" entries from input: // // Scanner scanner(input); // string var; // int number; // scanner.SetSkipExpression("\\s+"); // Skip any white space we encounter // while (scanner.Consume("(\\w+) = (\\d+)", &var, &number)) { // ...; // } #ifndef _PCRE_SCANNER_H #define _PCRE_SCANNER_H #include #include #include #include #include namespace pcrecpp { class PCRECPP_EXP_DEFN Scanner { public: Scanner(); explicit Scanner(const std::string& input); ~Scanner(); // Return current line number. The returned line-number is // one-based. I.e. it returns 1 + the number of consumed newlines. // // Note: this method may be slow. It may take time proportional to // the size of the input. int LineNumber() const; // Return the byte-offset that the scanner is looking in the // input data; int Offset() const; // Return true iff the start of the remaining input matches "re" bool LookingAt(const RE& re) const; // Return true iff all of the following are true // a. the start of the remaining input matches "re", // b. if any arguments are supplied, matched sub-patterns can be // parsed and stored into the arguments. // If it returns true, it skips over the matched input and any // following input that matches the "skip" regular expression. bool Consume(const RE& re, const Arg& arg0 = RE::no_arg, const Arg& arg1 = RE::no_arg, const Arg& arg2 = RE::no_arg // TODO: Allow more arguments? ); // Set the "skip" regular expression. If after consuming some data, // a prefix of the input matches this RE, it is automatically // skipped. For example, a programming language scanner would use // a skip RE that matches white space and comments. // // scanner.SetSkipExpression("\\s+|//.*|/[*](.|\n)*?[*]/"); // // Skipping repeats as long as it succeeds. We used to let people do // this by writing "(...)*" in the regular expression, but that added // up to lots of recursive calls within the pcre library, so now we // control repetition explicitly via the function call API. // // You can pass NULL for "re" if you do not want any data to be skipped. void Skip(const char* re); // DEPRECATED; does *not* repeat void SetSkipExpression(const char* re); // Temporarily pause "skip"ing. This // Skip("Foo"); code ; DisableSkip(); code; EnableSkip() // is similar to // Skip("Foo"); code ; Skip(NULL); code ; Skip("Foo"); // but avoids creating/deleting new RE objects. void DisableSkip(); // Reenable previously paused skipping. Any prefix of the input // that matches the skip pattern is immediately dropped. void EnableSkip(); /***** Special wrappers around SetSkip() for some common idioms *****/ // Arranges to skip whitespace, C comments, C++ comments. // The overall RE is a disjunction of the following REs: // \\s whitespace // //.*\n C++ comment // /[*](.|\n)*?[*]/ C comment (x*? means minimal repetitions of x) // We get repetition via the semantics of SetSkipExpression, not by using * void SkipCXXComments() { SetSkipExpression("\\s|//.*\n|/[*](?:\n|.)*?[*]/"); } void set_save_comments(bool comments) { save_comments_ = comments; } bool save_comments() { return save_comments_; } // Append to vector ranges the comments found in the // byte range [start,end] (inclusive) of the input data. // Only comments that were extracted entirely within that // range are returned: no range splitting of atomically-extracted // comments is performed. void GetComments(int start, int end, std::vector *ranges); // Append to vector ranges the comments added // since the last time this was called. This // functionality is provided for efficiency when // interleaving scanning with parsing. void GetNextComments(std::vector *ranges); private: std::string data_; // All the input data StringPiece input_; // Unprocessed input RE* skip_; // If non-NULL, RE for skipping input bool should_skip_; // If true, use skip_ bool skip_repeat_; // If true, repeat skip_ as long as it works bool save_comments_; // If true, aggregate the skip expression // the skipped comments // TODO: later consider requiring that the StringPieces be added // in order by their start position std::vector *comments_; // the offset into comments_ that has been returned by GetNextComments int comments_offset_; // helper function to consume *skip_ and honour // save_comments_ void ConsumeSkip(); }; } // namespace pcrecpp #endif /* _PCRE_SCANNER_H */ PKZ`A+]] krb5/krb5.hnu[/* This file is generated, please don't edit it directly. */ #ifndef KRB5_KRB5_H_INCLUDED #define KRB5_KRB5_H_INCLUDED /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* General definitions for Kerberos version 5. */ /* * Copyright 1989, 1990, 1995, 2001, 2003, 2007, 2011 by the Massachusetts * Institute of Technology. All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ /* * Copyright (C) 1998 by the FundsXpress, INC. * * All rights reserved. * * Export of this software from the United States of America may require * a specific license from the United States Government. It is the * responsibility of any person or organization contemplating export to * obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of FundsXpress. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. FundsXpress makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef KRB5_GENERAL__ #define KRB5_GENERAL__ /** @defgroup KRB5_H krb5 library API * @{ */ /* By default, do not expose deprecated interfaces. */ #ifndef KRB5_DEPRECATED #define KRB5_DEPRECATED 0 #endif #if defined(__MACH__) && defined(__APPLE__) # include # if TARGET_RT_MAC_CFM # error "Use KfM 4.0 SDK headers for CFM compilation." # endif #endif #if defined(_MSDOS) || defined(_WIN32) #include #endif #ifndef KRB5_CONFIG__ #ifndef KRB5_CALLCONV #define KRB5_CALLCONV #define KRB5_CALLCONV_C #endif /* !KRB5_CALLCONV */ #endif /* !KRB5_CONFIG__ */ #ifndef KRB5_CALLCONV_WRONG #define KRB5_CALLCONV_WRONG #endif #ifndef THREEPARAMOPEN #define THREEPARAMOPEN(x,y,z) open(x,y,z) #endif #if KRB5_PRIVATE #ifndef WRITABLEFOPEN #define WRITABLEFOPEN(x,y) fopen(x,y) #endif #endif #define KRB5_OLD_CRYPTO #include #include /* for *_MAX */ #include #include #ifndef KRB5INT_BEGIN_DECLS #if defined(__cplusplus) #define KRB5INT_BEGIN_DECLS extern "C" { #define KRB5INT_END_DECLS } #else #define KRB5INT_BEGIN_DECLS #define KRB5INT_END_DECLS #endif #endif KRB5INT_BEGIN_DECLS #if defined(TARGET_OS_MAC) && TARGET_OS_MAC # pragma pack(push,2) #endif #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 30203 # define KRB5_ATTR_DEPRECATED __attribute__((deprecated)) #elif defined _WIN32 # define KRB5_ATTR_DEPRECATED __declspec(deprecated) #else # define KRB5_ATTR_DEPRECATED #endif /* from profile.h */ struct _profile_t; /* typedef struct _profile_t *profile_t; */ /* * begin wordsize.h */ /* * Word-size related definition. */ typedef uint8_t krb5_octet; typedef int16_t krb5_int16; typedef uint16_t krb5_ui_2; typedef int32_t krb5_int32; typedef uint32_t krb5_ui_4; #define VALID_INT_BITS INT_MAX #define VALID_UINT_BITS UINT_MAX #define KRB5_INT32_MAX 2147483647 /* this strange form is necessary since - is a unary operator, not a sign indicator */ #define KRB5_INT32_MIN (-KRB5_INT32_MAX-1) #define KRB5_INT16_MAX 65535 /* this strange form is necessary since - is a unary operator, not a sign indicator */ #define KRB5_INT16_MIN (-KRB5_INT16_MAX-1) /* * end wordsize.h */ /* * begin "base-defs.h" */ /* * Basic definitions for Kerberos V5 library */ #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif typedef unsigned int krb5_boolean; typedef unsigned int krb5_msgtype; typedef unsigned int krb5_kvno; typedef krb5_int32 krb5_addrtype; typedef krb5_int32 krb5_enctype; typedef krb5_int32 krb5_cksumtype; typedef krb5_int32 krb5_authdatatype; typedef krb5_int32 krb5_keyusage; typedef krb5_int32 krb5_cryptotype; typedef krb5_int32 krb5_preauthtype; /* This may change, later on */ typedef krb5_int32 krb5_flags; /** * Represents a timestamp in seconds since the POSIX epoch. This legacy type * is used frequently in the ABI, but cannot represent timestamps after 2038 as * a positive number. Code which uses this type should cast values of it to * uint32_t so that negative values are treated as timestamps between 2038 and * 2106 on platforms with 64-bit time_t. */ typedef krb5_int32 krb5_timestamp; typedef krb5_int32 krb5_deltat; /** * Used to convey an operation status. The value 0 indicates success; any * other values are com_err codes. Use krb5_get_error_message() to obtain a * string describing the error. */ typedef krb5_int32 krb5_error_code; typedef krb5_error_code krb5_magic; typedef struct _krb5_data { krb5_magic magic; unsigned int length; char *data; } krb5_data; /* Originally introduced for PKINIT; now unused. Do not use this. */ typedef struct _krb5_octet_data { krb5_magic magic; unsigned int length; krb5_octet *data; } krb5_octet_data; /* Originally used to recognize AFS and default salts. No longer used. */ #define SALT_TYPE_AFS_LENGTH UINT_MAX #define SALT_TYPE_NO_LENGTH UINT_MAX typedef void * krb5_pointer; typedef void const * krb5_const_pointer; typedef struct krb5_principal_data { krb5_magic magic; krb5_data realm; krb5_data *data; /**< An array of strings */ krb5_int32 length; krb5_int32 type; } krb5_principal_data; typedef krb5_principal_data * krb5_principal; /* * Per V5 spec on definition of principal types */ #define KRB5_NT_UNKNOWN 0 /**< Name type not known */ #define KRB5_NT_PRINCIPAL 1 /**< Just the name of the principal as in DCE, or for users */ #define KRB5_NT_SRV_INST 2 /**< Service and other unique instance (krbtgt) */ #define KRB5_NT_SRV_HST 3 /**< Service with host name as instance (telnet, rcommands) */ #define KRB5_NT_SRV_XHST 4 /**< Service with host as remaining components */ #define KRB5_NT_UID 5 /**< Unique ID */ #define KRB5_NT_X500_PRINCIPAL 6 /**< PKINIT */ #define KRB5_NT_SMTP_NAME 7 /**< Name in form of SMTP email name */ #define KRB5_NT_ENTERPRISE_PRINCIPAL 10 /**< Windows 2000 UPN */ #define KRB5_NT_WELLKNOWN 11 /**< Well-known (special) principal */ #define KRB5_WELLKNOWN_NAMESTR "WELLKNOWN" /**< First component of NT_WELLKNOWN principals */ #define KRB5_NT_MS_PRINCIPAL -128 /**< Windows 2000 UPN and SID */ #define KRB5_NT_MS_PRINCIPAL_AND_ID -129 /**< NT 4 style name */ #define KRB5_NT_ENT_PRINCIPAL_AND_ID -130 /**< NT 4 style name and SID */ /** Constant version of krb5_principal_data */ typedef const krb5_principal_data *krb5_const_principal; #define krb5_princ_realm(context, princ) (&(princ)->realm) #define krb5_princ_set_realm(context, princ,value) ((princ)->realm = *(value)) #define krb5_princ_set_realm_length(context, princ,value) (princ)->realm.length = (value) #define krb5_princ_set_realm_data(context, princ,value) (princ)->realm.data = (value) #define krb5_princ_size(context, princ) (princ)->length #define krb5_princ_type(context, princ) (princ)->type #define krb5_princ_name(context, princ) (princ)->data #define krb5_princ_component(context, princ,i) \ (((i) < krb5_princ_size(context, princ)) \ ? (princ)->data + (i) \ : NULL) /** Constant for realm referrals. */ #define KRB5_REFERRAL_REALM "" /* * Referral-specific functions. */ /** * Check for a match with KRB5_REFERRAL_REALM. * * @param [in] r Realm to check * * @return @c TRUE if @a r is zero-length, @c FALSE otherwise */ krb5_boolean KRB5_CALLCONV krb5_is_referral_realm(const krb5_data *r); /** * Return an anonymous realm data. * * This function returns constant storage that must not be freed. * * @sa #KRB5_ANONYMOUS_REALMSTR */ const krb5_data *KRB5_CALLCONV krb5_anonymous_realm(void); /** * Build an anonymous principal. * * This function returns constant storage that must not be freed. * * @sa #KRB5_ANONYMOUS_PRINCSTR */ krb5_const_principal KRB5_CALLCONV krb5_anonymous_principal(void); #define KRB5_ANONYMOUS_REALMSTR "WELLKNOWN:ANONYMOUS" /**< Anonymous realm */ #define KRB5_ANONYMOUS_PRINCSTR "ANONYMOUS" /**< Anonymous principal name */ /* * end "base-defs.h" */ /* * begin "hostaddr.h" */ /** Structure for address */ typedef struct _krb5_address { krb5_magic magic; krb5_addrtype addrtype; unsigned int length; krb5_octet *contents; } krb5_address; /* per Kerberos v5 protocol spec */ #define ADDRTYPE_INET 0x0002 #define ADDRTYPE_CHAOS 0x0005 #define ADDRTYPE_XNS 0x0006 #define ADDRTYPE_ISO 0x0007 #define ADDRTYPE_DDP 0x0010 #define ADDRTYPE_NETBIOS 0x0014 #define ADDRTYPE_INET6 0x0018 /* not yet in the spec... */ #define ADDRTYPE_ADDRPORT 0x0100 #define ADDRTYPE_IPPORT 0x0101 /* macros to determine if a type is a local type */ #define ADDRTYPE_IS_LOCAL(addrtype) (addrtype & 0x8000) /* * end "hostaddr.h" */ struct _krb5_context; typedef struct _krb5_context * krb5_context; struct _krb5_auth_context; typedef struct _krb5_auth_context * krb5_auth_context; struct _krb5_cryptosystem_entry; /* * begin "encryption.h" */ /** Exposed contents of a key. */ typedef struct _krb5_keyblock { krb5_magic magic; krb5_enctype enctype; unsigned int length; krb5_octet *contents; } krb5_keyblock; struct krb5_key_st; /** * Opaque identifier for a key. * * Use with the krb5_k APIs for better performance for repeated operations with * the same key and usage. Key identifiers must not be used simultaneously * within multiple threads, as they may contain mutable internal state and are * not mutex-protected. */ typedef struct krb5_key_st *krb5_key; #ifdef KRB5_OLD_CRYPTO typedef struct _krb5_encrypt_block { krb5_magic magic; krb5_enctype crypto_entry; /* to call krb5_encrypt_size, you need this. it was a pointer, but it doesn't have to be. gross. */ krb5_keyblock *key; } krb5_encrypt_block; #endif typedef struct _krb5_checksum { krb5_magic magic; krb5_cksumtype checksum_type; /* checksum type */ unsigned int length; krb5_octet *contents; } krb5_checksum; typedef struct _krb5_enc_data { krb5_magic magic; krb5_enctype enctype; krb5_kvno kvno; krb5_data ciphertext; } krb5_enc_data; /** * Structure to describe a region of text to be encrypted or decrypted. * * The @a flags member describes the type of the iov. * The @a data member points to the memory that will be manipulated. * All iov APIs take a pointer to the first element of an array of krb5_crypto_iov's * along with the size of that array. Buffer contents are manipulated in-place; * data is overwritten. Callers must allocate the right number of krb5_crypto_iov * structures before calling into an iov API. */ typedef struct _krb5_crypto_iov { krb5_cryptotype flags; /**< @ref KRB5_CRYPTO_TYPE type of the iov */ krb5_data data; } krb5_crypto_iov; /* per Kerberos v5 protocol spec */ #define ENCTYPE_NULL 0x0000 #define ENCTYPE_DES_CBC_CRC 0x0001 /**< @deprecated no longer supported */ #define ENCTYPE_DES_CBC_MD4 0x0002 /**< @deprecated no longer supported */ #define ENCTYPE_DES_CBC_MD5 0x0003 /**< @deprecated no longer supported */ #define ENCTYPE_DES_CBC_RAW 0x0004 /**< @deprecated no longer supported */ #define ENCTYPE_DES3_CBC_SHA 0x0005 /**< @deprecated no longer supported */ #define ENCTYPE_DES3_CBC_RAW 0x0006 /**< @deprecated no longer supported */ #define ENCTYPE_DES_HMAC_SHA1 0x0008 /**< @deprecated no longer supported */ /* PKINIT */ #define ENCTYPE_DSA_SHA1_CMS 0x0009 /**< DSA with SHA1, CMS signature */ #define ENCTYPE_MD5_RSA_CMS 0x000a /**< MD5 with RSA, CMS signature */ #define ENCTYPE_SHA1_RSA_CMS 0x000b /**< SHA1 with RSA, CMS signature */ #define ENCTYPE_RC2_CBC_ENV 0x000c /**< RC2 cbc mode, CMS enveloped data */ #define ENCTYPE_RSA_ENV 0x000d /**< RSA encryption, CMS enveloped data */ #define ENCTYPE_RSA_ES_OAEP_ENV 0x000e /**< RSA w/OEAP encryption, CMS enveloped data */ #define ENCTYPE_DES3_CBC_ENV 0x000f /**< @deprecated no longer supported */ #define ENCTYPE_DES3_CBC_SHA1 0x0010 /**< @deprecated removed */ #define ENCTYPE_AES128_CTS_HMAC_SHA1_96 0x0011 /**< RFC 3962 */ #define ENCTYPE_AES256_CTS_HMAC_SHA1_96 0x0012 /**< RFC 3962 */ #define ENCTYPE_AES128_CTS_HMAC_SHA256_128 0x0013 /**< RFC 8009 */ #define ENCTYPE_AES256_CTS_HMAC_SHA384_192 0x0014 /**< RFC 8009 */ #define ENCTYPE_ARCFOUR_HMAC 0x0017 /**< RFC 4757 */ #define ENCTYPE_ARCFOUR_HMAC_EXP 0x0018 /**< RFC 4757 */ #define ENCTYPE_CAMELLIA128_CTS_CMAC 0x0019 /**< RFC 6803 */ #define ENCTYPE_CAMELLIA256_CTS_CMAC 0x001a /**< RFC 6803 */ #define ENCTYPE_UNKNOWN 0x01ff /* * Historically we used the value 9 for unkeyed SHA-1. RFC 3961 assigns this * value to rsa-md5-des3, which fortunately is unused. For ABI compatibility * we allow either 9 or 14 for SHA-1. */ #define CKSUMTYPE_CRC32 0x0001 #define CKSUMTYPE_RSA_MD4 0x0002 #define CKSUMTYPE_RSA_MD4_DES 0x0003 #define CKSUMTYPE_DESCBC 0x0004 /* des-mac-k */ /* rsa-md4-des-k */ #define CKSUMTYPE_RSA_MD5 0x0007 #define CKSUMTYPE_RSA_MD5_DES 0x0008 #define CKSUMTYPE_NIST_SHA 0x0009 #define CKSUMTYPE_HMAC_SHA1_DES3 0x000c /* @deprecated removed */ #define CKSUMTYPE_SHA1 0x000d /**< RFC 3962 */ #define CKSUMTYPE_HMAC_SHA1_96_AES128 0x000f /**< RFC 3962. Used with ENCTYPE_AES128_CTS_HMAC_SHA1_96 */ #define CKSUMTYPE_HMAC_SHA1_96_AES256 0x0010 /**< RFC 3962. Used with ENCTYPE_AES256_CTS_HMAC_SHA1_96 */ #define CKSUMTYPE_HMAC_SHA256_128_AES128 0x0013 /**< RFC 8009 */ #define CKSUMTYPE_HMAC_SHA384_192_AES256 0x0014 /**< RFC 8009 */ #define CKSUMTYPE_CMAC_CAMELLIA128 0x0011 /**< RFC 6803 */ #define CKSUMTYPE_CMAC_CAMELLIA256 0x0012 /**< RFC 6803 */ #define CKSUMTYPE_MD5_HMAC_ARCFOUR -137 /* Microsoft netlogon */ #define CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /**< RFC 4757 */ /* * The following are entropy source designations. Whenever * krb5_C_random_add_entropy is called, one of these source ids is passed in. * This allows the library to better estimate bits of entropy in the sample and * to keep track of what sources of entropy have contributed enough entropy. * Sources marked internal MUST NOT be used by applications outside the * Kerberos library */ enum { KRB5_C_RANDSOURCE_OLDAPI = 0, /*calls to krb5_C_RANDOM_SEED (INTERNAL)*/ KRB5_C_RANDSOURCE_OSRAND = 1, /* /dev/random or equivalent (internal)*/ KRB5_C_RANDSOURCE_TRUSTEDPARTY = 2, /* From KDC or other trusted party*/ /* * This source should be used carefully; data in this category * should be from a third party trusted to give random bits * For example keys issued by the KDC in the application server. */ KRB5_C_RANDSOURCE_TIMING = 3, /* Timing of operations*/ KRB5_C_RANDSOURCE_EXTERNAL_PROTOCOL = 4, /*Protocol data possibly from attacker*/ KRB5_C_RANDSOURCE_MAX = 5 /*Do not use; maximum source ID*/ }; #ifndef krb5_roundup /* round x up to nearest multiple of y */ #define krb5_roundup(x, y) ((((x) + (y) - 1)/(y))*(y)) #endif /* roundup */ /* macro function definitions to help clean up code */ #if 1 #define krb5_x(ptr,args) ((ptr)?((*(ptr)) args):(abort(),1)) #define krb5_xc(ptr,args) ((ptr)?((*(ptr)) args):(abort(),(char*)0)) #else #define krb5_x(ptr,args) ((*(ptr)) args) #define krb5_xc(ptr,args) ((*(ptr)) args) #endif /** * Encrypt data using a key (operates on keyblock). * * @param [in] context Library context * @param [in] key Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in,out] cipher_state Cipher state; specify NULL if not needed * @param [in] input Data to be encrypted * @param [out] output Encrypted data * * This function encrypts the data block @a input and stores the output into @a * output. The actual encryption key will be derived from @a key and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the encryption operation, and * is updated with the state to be passed as input to the next operation. * * @note The caller must initialize @a output and allocate at least enough * space for the result (using krb5_c_encrypt_length() to determine the amount * of space needed). @a output->length will be set to the actual length of the * ciphertext. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_encrypt(krb5_context context, const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *cipher_state, const krb5_data *input, krb5_enc_data *output); /** * Decrypt data using a key (operates on keyblock). * * @param [in] context Library context * @param [in] key Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in,out] cipher_state Cipher state; specify NULL if not needed * @param [in] input Encrypted data * @param [out] output Decrypted data * * This function decrypts the data block @a input and stores the output into @a * output. The actual decryption key will be derived from @a key and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the decryption operation, and * is updated with the state to be passed as input to the next operation. * * @note The caller must initialize @a output and allocate at least enough * space for the result. The usual practice is to allocate an output buffer as * long as the ciphertext, and let krb5_c_decrypt() trim @a output->length. * For some enctypes, the resulting @a output->length may include padding * bytes. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_decrypt(krb5_context context, const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *cipher_state, const krb5_enc_data *input, krb5_data *output); /** * Compute encrypted data length. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in] inputlen Length of the data to be encrypted * @param [out] length Length of the encrypted data * * This function computes the length of the ciphertext produced by encrypting * @a inputlen bytes including padding, confounder, and checksum. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_encrypt_length(krb5_context context, krb5_enctype enctype, size_t inputlen, size_t *length); /** * Return cipher block size. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [out] blocksize Block size for @a enctype * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_block_size(krb5_context context, krb5_enctype enctype, size_t *blocksize); /** * Return length of the specified key in bytes. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [out] keybytes Number of bytes required to make a key * @param [out] keylength Length of final key * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_keylengths(krb5_context context, krb5_enctype enctype, size_t *keybytes, size_t *keylength); /** * Initialize a new cipher state. * * @param [in] context Library context * @param [in] key Key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [out] new_state New cipher state * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_init_state(krb5_context context, const krb5_keyblock *key, krb5_keyusage usage, krb5_data *new_state); /** * Free a cipher state previously allocated by krb5_c_init_state(). * * @param [in] context Library context * @param [in] key Key * @param [in] state Cipher state to be freed * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_free_state(krb5_context context, const krb5_keyblock *key, krb5_data *state); /** * Generate enctype-specific pseudo-random bytes. * * @param [in] context Library context * @param [in] keyblock Key * @param [in] input Input data * @param [out] output Output data * * This function selects a pseudo-random function based on @a keyblock and * computes its value over @a input, placing the result into @a output. * The caller must preinitialize @a output and allocate space for the * result, using krb5_c_prf_length() to determine the required length. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_prf(krb5_context context, const krb5_keyblock *keyblock, krb5_data *input, krb5_data *output); /** * Get the output length of pseudo-random functions for an encryption type. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [out] len Length of PRF output * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_prf_length(krb5_context context, krb5_enctype enctype, size_t *len); /** * Generate pseudo-random bytes using RFC 6113 PRF+. * * @param [in] context Library context * @param [in] k KDC contribution key * @param [in] input Input data * @param [out] output Pseudo-random output buffer * * This function fills @a output with PRF+(k, input) as defined in RFC 6113 * section 5.1. The caller must preinitialize @a output and allocate the * desired amount of space. The length of the pseudo-random output will match * the length of @a output. * * @note RFC 4402 defines a different PRF+ operation. This function does not * implement that operation. * * @return 0 on success, @c E2BIG if output->length is too large for PRF+ to * generate, @c ENOMEM on allocation failure, or an error code from * krb5_c_prf() */ krb5_error_code KRB5_CALLCONV krb5_c_prfplus(krb5_context context, const krb5_keyblock *k, const krb5_data *input, krb5_data *output); /** * Derive a key using some input data (via RFC 6113 PRF+). * * @param [in] context Library context * @param [in] k KDC contribution key * @param [in] input Input string * @param [in] enctype Output key enctype (or @c ENCTYPE_NULL) * @param [out] out Derived keyblock * * This function uses PRF+ as defined in RFC 6113 to derive a key from another * key and an input string. If @a enctype is @c ENCTYPE_NULL, the output key * will have the same enctype as the input key. */ krb5_error_code KRB5_CALLCONV krb5_c_derive_prfplus(krb5_context context, const krb5_keyblock *k, const krb5_data *input, krb5_enctype enctype, krb5_keyblock **out); /** * Compute the KRB-FX-CF2 combination of two keys and pepper strings. * * @param [in] context Library context * @param [in] k1 KDC contribution key * @param [in] pepper1 String "PKINIT" * @param [in] k2 Reply key * @param [in] pepper2 String "KeyExchange" * @param [out] out Output key * * This function computes the KRB-FX-CF2 function over its inputs and places * the results in a newly allocated keyblock. This function is simple in that * it assumes that @a pepper1 and @a pepper2 are C strings with no internal * nulls and that the enctype of the result will be the same as that of @a k1. * @a k1 and @a k2 may be of different enctypes. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_fx_cf2_simple(krb5_context context, const krb5_keyblock *k1, const char *pepper1, const krb5_keyblock *k2, const char *pepper2, krb5_keyblock **out); /** * Generate an enctype-specific random encryption key. * * @param [in] context Library context * @param [in] enctype Encryption type of the generated key * @param [out] k5_random_key An allocated and initialized keyblock * * Use krb5_free_keyblock_contents() to free @a k5_random_key when * no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_make_random_key(krb5_context context, krb5_enctype enctype, krb5_keyblock *k5_random_key); /** * Generate an enctype-specific key from random data. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in] random_data Random input data * @param [out] k5_random_key Resulting key * * This function takes random input data @a random_data and produces a valid * key @a k5_random_key for a given @a enctype. * * @note It is assumed that @a k5_random_key has already been initialized and * @a k5_random_key->contents has been allocated with the correct length. * * @sa krb5_c_keylengths() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_random_to_key(krb5_context context, krb5_enctype enctype, krb5_data *random_data, krb5_keyblock *k5_random_key); /** * Add entropy to the pseudo-random number generator. * * @param [in] context Library context * @param [in] randsource Entropy source (see KRB5_RANDSOURCE types) * @param [in] data Data * * Contribute entropy to the PRNG used by krb5 crypto operations. This may or * may not affect the output of the next crypto operation requiring random * data. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_random_add_entropy(krb5_context context, unsigned int randsource, const krb5_data *data); /** * Generate pseudo-random bytes. * * @param [in] context Library context * @param [out] data Random data * * Fills in @a data with bytes from the PRNG used by krb5 crypto operations. * The caller must preinitialize @a data and allocate the desired amount of * space. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_random_make_octets(krb5_context context, krb5_data *data); /** * Collect entropy from the OS if possible. * * @param [in] context Library context * @param [in] strong Strongest available source of entropy * @param [out] success 1 if OS provides entropy, 0 otherwise * * If @a strong is non-zero, this function attempts to use the strongest * available source of entropy. Setting this flag may cause the function to * block on some operating systems. Good uses include seeding the PRNG for * kadmind and realm setup. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_random_os_entropy(krb5_context context, int strong, int *success); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_c_random_seed(krb5_context context, krb5_data *data); /** * Convert a string (such a password) to a key. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in] string String to be converted * @param [in] salt Salt value * @param [out] key Generated key * * This function converts @a string to a @a key of encryption type @a enctype, * using the specified @a salt. The newly created @a key must be released by * calling krb5_free_keyblock_contents() when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_string_to_key(krb5_context context, krb5_enctype enctype, const krb5_data *string, const krb5_data *salt, krb5_keyblock *key); /** * Convert a string (such as a password) to a key with additional parameters. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in] string String to be converted * @param [in] salt Salt value * @param [in] params Parameters * @param [out] key Generated key * * This function is similar to krb5_c_string_to_key(), but also takes * parameters which may affect the algorithm in an enctype-dependent way. The * newly created @a key must be released by calling * krb5_free_keyblock_contents() when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_string_to_key_with_params(krb5_context context, krb5_enctype enctype, const krb5_data *string, const krb5_data *salt, const krb5_data *params, krb5_keyblock *key); /** * Compare two encryption types. * * @param [in] context Library context * @param [in] e1 First encryption type * @param [in] e2 Second encryption type * @param [out] similar @c TRUE if types are similar, @c FALSE if not * * This function determines whether two encryption types use the same kind of * keys. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_enctype_compare(krb5_context context, krb5_enctype e1, krb5_enctype e2, krb5_boolean *similar); /** * Compute a checksum (operates on keyblock). * * @param [in] context Library context * @param [in] cksumtype Checksum type (0 for mandatory type) * @param [in] key Encryption key for a keyed checksum * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] input Input data * @param [out] cksum Generated checksum * * This function computes a checksum of type @a cksumtype over @a input, using * @a key if the checksum type is a keyed checksum. If @a cksumtype is 0 and * @a key is non-null, the checksum type will be the mandatory-to-implement * checksum type for the key's encryption type. The actual checksum key will * be derived from @a key and @a usage if key derivation is specified for the * checksum type. The newly created @a cksum must be released by calling * krb5_free_checksum_contents() when it is no longer needed. * * @note This function is similar to krb5_k_make_checksum(), but operates * on keyblock @a key. * * @sa krb5_c_verify_checksum() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_make_checksum(krb5_context context, krb5_cksumtype cksumtype, const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *input, krb5_checksum *cksum); /** * Verify a checksum (operates on keyblock). * * @param [in] context Library context * @param [in] key Encryption key for a keyed checksum * @param [in] usage @a key usage * @param [in] data Data to be used to compute a new checksum * using @a key to compare @a cksum against * @param [in] cksum Checksum to be verified * @param [out] valid Non-zero for success, zero for failure * * This function verifies that @a cksum is a valid checksum for @a data. If * the checksum type of @a cksum is a keyed checksum, @a key is used to verify * the checksum. If the checksum type in @a cksum is 0 and @a key is not NULL, * the mandatory checksum type for @a key will be used. The actual checksum * key will be derived from @a key and @a usage if key derivation is specified * for the checksum type. * * @note This function is similar to krb5_k_verify_checksum(), but operates * on keyblock @a key. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_verify_checksum(krb5_context context, const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *data, const krb5_checksum *cksum, krb5_boolean *valid); /** * Return the length of checksums for a checksum type. * * @param [in] context Library context * @param [in] cksumtype Checksum type * @param [out] length Checksum length * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_checksum_length(krb5_context context, krb5_cksumtype cksumtype, size_t *length); /** * Return a list of keyed checksum types usable with an encryption type. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [out] count Count of allowable checksum types * @param [out] cksumtypes Array of allowable checksum types * * Use krb5_free_cksumtypes() to free @a cksumtypes when it is no longer * needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_keyed_checksum_types(krb5_context context, krb5_enctype enctype, unsigned int *count, krb5_cksumtype **cksumtypes); /** @defgroup KRB5_KEYUSAGE KRB5_KEYUSAGE * @{ */ #define KRB5_KEYUSAGE_AS_REQ_PA_ENC_TS 1 #define KRB5_KEYUSAGE_KDC_REP_TICKET 2 #define KRB5_KEYUSAGE_AS_REP_ENCPART 3 #define KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY 4 #define KRB5_KEYUSAGE_TGS_REQ_AD_SUBKEY 5 #define KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM 6 #define KRB5_KEYUSAGE_TGS_REQ_AUTH 7 #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SESSKEY 8 #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SUBKEY 9 #define KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM 10 #define KRB5_KEYUSAGE_AP_REQ_AUTH 11 #define KRB5_KEYUSAGE_AP_REP_ENCPART 12 #define KRB5_KEYUSAGE_KRB_PRIV_ENCPART 13 #define KRB5_KEYUSAGE_KRB_CRED_ENCPART 14 #define KRB5_KEYUSAGE_KRB_SAFE_CKSUM 15 #define KRB5_KEYUSAGE_APP_DATA_ENCRYPT 16 #define KRB5_KEYUSAGE_APP_DATA_CKSUM 17 #define KRB5_KEYUSAGE_KRB_ERROR_CKSUM 18 #define KRB5_KEYUSAGE_AD_KDCISSUED_CKSUM 19 #define KRB5_KEYUSAGE_AD_MTE 20 #define KRB5_KEYUSAGE_AD_ITE 21 /* XXX need to register these */ #define KRB5_KEYUSAGE_GSS_TOK_MIC 22 #define KRB5_KEYUSAGE_GSS_TOK_WRAP_INTEG 23 #define KRB5_KEYUSAGE_GSS_TOK_WRAP_PRIV 24 /* Defined in Integrating SAM Mechanisms with Kerberos draft */ #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_CKSUM 25 /** Note conflict with @ref KRB5_KEYUSAGE_PA_S4U_X509_USER_REQUEST */ #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID 26 /** Note conflict with @ref KRB5_KEYUSAGE_PA_S4U_X509_USER_REPLY */ #define KRB5_KEYUSAGE_PA_SAM_RESPONSE 27 /* Defined in [MS-SFU] */ /** Note conflict with @ref KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID */ #define KRB5_KEYUSAGE_PA_S4U_X509_USER_REQUEST 26 /** Note conflict with @ref KRB5_KEYUSAGE_PA_SAM_RESPONSE */ #define KRB5_KEYUSAGE_PA_S4U_X509_USER_REPLY 27 /* unused */ #define KRB5_KEYUSAGE_PA_REFERRAL 26 #define KRB5_KEYUSAGE_AD_SIGNEDPATH -21 #define KRB5_KEYUSAGE_IAKERB_FINISHED 42 #define KRB5_KEYUSAGE_PA_PKINIT_KX 44 #define KRB5_KEYUSAGE_PA_OTP_REQUEST 45 /**< See RFC 6560 section 4.2 */ /* define in draft-ietf-krb-wg-preauth-framework*/ #define KRB5_KEYUSAGE_FAST_REQ_CHKSUM 50 #define KRB5_KEYUSAGE_FAST_ENC 51 #define KRB5_KEYUSAGE_FAST_REP 52 #define KRB5_KEYUSAGE_FAST_FINISHED 53 #define KRB5_KEYUSAGE_ENC_CHALLENGE_CLIENT 54 #define KRB5_KEYUSAGE_ENC_CHALLENGE_KDC 55 #define KRB5_KEYUSAGE_AS_REQ 56 #define KRB5_KEYUSAGE_CAMMAC 64 #define KRB5_KEYUSAGE_SPAKE 65 /* Key usage values 512-1023 are reserved for uses internal to a Kerberos * implementation. */ #define KRB5_KEYUSAGE_PA_FX_COOKIE 513 /**< Used for encrypted FAST cookies */ #define KRB5_KEYUSAGE_PA_AS_FRESHNESS 514 /**< Used for freshness tokens */ /** @} */ /* end of KRB5_KEYUSAGE group */ /** * Verify that a specified encryption type is a valid Kerberos encryption type. * * @param [in] ktype Encryption type * * @return @c TRUE if @a ktype is valid, @c FALSE if not */ krb5_boolean KRB5_CALLCONV krb5_c_valid_enctype(krb5_enctype ktype); /** * Verify that specified checksum type is a valid Kerberos checksum type. * * @param [in] ctype Checksum type * * @return @c TRUE if @a ctype is valid, @c FALSE if not */ krb5_boolean KRB5_CALLCONV krb5_c_valid_cksumtype(krb5_cksumtype ctype); /** * Test whether a checksum type is collision-proof. * * @param [in] ctype Checksum type * * @return @c TRUE if @a ctype is collision-proof, @c FALSE if it is not * collision-proof or not a valid checksum type. */ krb5_boolean KRB5_CALLCONV krb5_c_is_coll_proof_cksum(krb5_cksumtype ctype); /** * Test whether a checksum type is keyed. * * @param [in] ctype Checksum type * * @return @c TRUE if @a ctype is a keyed checksum type, @c FALSE otherwise. */ krb5_boolean KRB5_CALLCONV krb5_c_is_keyed_cksum(krb5_cksumtype ctype); /* AEAD APIs */ /** @defgroup KRB5_CRYPTO_TYPE KRB5_CRYPTO_TYPE * @{ */ #define KRB5_CRYPTO_TYPE_EMPTY 0 /**< [in] ignored */ #define KRB5_CRYPTO_TYPE_HEADER 1 /**< [out] header */ #define KRB5_CRYPTO_TYPE_DATA 2 /**< [in, out] plaintext */ #define KRB5_CRYPTO_TYPE_SIGN_ONLY 3 /**< [in] associated data */ #define KRB5_CRYPTO_TYPE_PADDING 4 /**< [out] padding */ #define KRB5_CRYPTO_TYPE_TRAILER 5 /**< [out] checksum for encrypt */ #define KRB5_CRYPTO_TYPE_CHECKSUM 6 /**< [out] checksum for MIC */ #define KRB5_CRYPTO_TYPE_STREAM 7 /**< [in] entire message without decomposing the structure into header, data and trailer buffers */ /** @} */ /* end of KRB5_CRYPTO_TYPE group */ /** * Fill in a checksum element in IOV array (operates on keyblock) * * @param [in] context Library context * @param [in] cksumtype Checksum type (0 for mandatory type) * @param [in] key Encryption key for a keyed checksum * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in,out] data IOV array * @param [in] num_data Size of @a data * * Create a checksum in the #KRB5_CRYPTO_TYPE_CHECKSUM element over * #KRB5_CRYPTO_TYPE_DATA and #KRB5_CRYPTO_TYPE_SIGN_ONLY chunks in @a data. * Only the #KRB5_CRYPTO_TYPE_CHECKSUM region is modified. * * @note This function is similar to krb5_k_make_checksum_iov(), but operates * on keyblock @a key. * * @sa krb5_c_verify_checksum_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_make_checksum_iov(krb5_context context, krb5_cksumtype cksumtype, const krb5_keyblock *key, krb5_keyusage usage, krb5_crypto_iov *data, size_t num_data); /** * Validate a checksum element in IOV array (operates on keyblock). * * @param [in] context Library context * @param [in] cksumtype Checksum type (0 for mandatory type) * @param [in] key Encryption key for a keyed checksum * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] data IOV array * @param [in] num_data Size of @a data * @param [out] valid Non-zero for success, zero for failure * * Confirm that the checksum in the #KRB5_CRYPTO_TYPE_CHECKSUM element is a * valid checksum of the #KRB5_CRYPTO_TYPE_DATA and #KRB5_CRYPTO_TYPE_SIGN_ONLY * regions in the iov. * * @note This function is similar to krb5_k_verify_checksum_iov(), but operates * on keyblock @a key. * * @sa krb5_c_make_checksum_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_verify_checksum_iov(krb5_context context, krb5_cksumtype cksumtype, const krb5_keyblock *key, krb5_keyusage usage, const krb5_crypto_iov *data, size_t num_data, krb5_boolean *valid); /** * Encrypt data in place supporting AEAD (operates on keyblock). * * @param [in] context Library context * @param [in] keyblock Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] cipher_state Cipher state; specify NULL if not needed * @param [in,out] data IOV array. Modified in-place. * @param [in] num_data Size of @a data * * This function encrypts the data block @a data and stores the output in-place. * The actual encryption key will be derived from @a keyblock and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the encryption operation, and * is updated with the state to be passed as input to the next operation. * The caller must allocate the right number of krb5_crypto_iov * structures before calling into this API. * * @note On return from a krb5_c_encrypt_iov() call, the @a data->length in the * iov structure are adjusted to reflect actual lengths of the ciphertext used. * For example, if the padding length is too large, the length will be reduced. * Lengths are never increased. * * @note This function is similar to krb5_k_encrypt_iov(), but operates * on keyblock @a keyblock. * * @sa krb5_c_decrypt_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_encrypt_iov(krb5_context context, const krb5_keyblock *keyblock, krb5_keyusage usage, const krb5_data *cipher_state, krb5_crypto_iov *data, size_t num_data); /** * Decrypt data in place supporting AEAD (operates on keyblock). * * @param [in] context Library context * @param [in] keyblock Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] cipher_state Cipher state; specify NULL if not needed * @param [in,out] data IOV array. Modified in-place. * @param [in] num_data Size of @a data * * This function decrypts the data block @a data and stores the output in-place. * The actual decryption key will be derived from @a keyblock and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the decryption operation, and * is updated with the state to be passed as input to the next operation. * The caller must allocate the right number of krb5_crypto_iov * structures before calling into this API. * * @note On return from a krb5_c_decrypt_iov() call, the @a data->length in the * iov structure are adjusted to reflect actual lengths of the ciphertext used. * For example, if the padding length is too large, the length will be reduced. * Lengths are never increased. * * @note This function is similar to krb5_k_decrypt_iov(), but operates * on keyblock @a keyblock. * * @sa krb5_c_decrypt_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_decrypt_iov(krb5_context context, const krb5_keyblock *keyblock, krb5_keyusage usage, const krb5_data *cipher_state, krb5_crypto_iov *data, size_t num_data); /** * Return a length of a message field specific to the encryption type. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in] type Type field (See @ref KRB5_CRYPTO_TYPE types) * @param [out] size Length of the @a type specific to @a enctype * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_crypto_length(krb5_context context, krb5_enctype enctype, krb5_cryptotype type, unsigned int *size); /** * Fill in lengths for header, trailer and padding in a IOV array. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in,out] data IOV array * @param [in] num_data Size of @a data * * Padding is set to the actual padding required based on the provided * @a data buffers. Typically this API is used after setting up the data * buffers and #KRB5_CRYPTO_TYPE_SIGN_ONLY buffers, but before actually * allocating header, trailer and padding. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_c_crypto_length_iov(krb5_context context, krb5_enctype enctype, krb5_crypto_iov *data, size_t num_data); /** * Return a number of padding octets. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in] data_length Length of the plaintext to pad * @param [out] size Number of padding octets * * This function returns the number of the padding octets required to pad * @a data_length octets of plaintext. * * @retval 0 Success; otherwise - KRB5_BAD_ENCTYPE */ krb5_error_code KRB5_CALLCONV krb5_c_padding_length(krb5_context context, krb5_enctype enctype, size_t data_length, unsigned int *size); /** * Create a krb5_key from the enctype and key data in a keyblock. * * @param [in] context Library context * @param [in] key_data Keyblock * @param [out] out Opaque key * * The reference count on a key @a out is set to 1. * Use krb5_k_free_key() to free @a out when it is no longer needed. * * @retval 0 Success; otherwise - KRB5_BAD_ENCTYPE */ krb5_error_code KRB5_CALLCONV krb5_k_create_key(krb5_context context, const krb5_keyblock *key_data, krb5_key *out); /** Increment the reference count on a key. */ void KRB5_CALLCONV krb5_k_reference_key(krb5_context context, krb5_key key); /** Decrement the reference count on a key and free it if it hits zero. */ void KRB5_CALLCONV krb5_k_free_key(krb5_context context, krb5_key key); /** Retrieve a copy of the keyblock from a krb5_key structure. */ krb5_error_code KRB5_CALLCONV krb5_k_key_keyblock(krb5_context context, krb5_key key, krb5_keyblock **key_data); /** Retrieve the enctype of a krb5_key structure. */ krb5_enctype KRB5_CALLCONV krb5_k_key_enctype(krb5_context context, krb5_key key); /** * Encrypt data using a key (operates on opaque key). * * @param [in] context Library context * @param [in] key Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in,out] cipher_state Cipher state; specify NULL if not needed * @param [in] input Data to be encrypted * @param [out] output Encrypted data * * This function encrypts the data block @a input and stores the output into @a * output. The actual encryption key will be derived from @a key and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the encryption operation, and * is updated with the state to be passed as input to the next operation. * * @note The caller must initialize @a output and allocate at least enough * space for the result (using krb5_c_encrypt_length() to determine the amount * of space needed). @a output->length will be set to the actual length of the * ciphertext. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_encrypt(krb5_context context, krb5_key key, krb5_keyusage usage, const krb5_data *cipher_state, const krb5_data *input, krb5_enc_data *output); /** * Encrypt data in place supporting AEAD (operates on opaque key). * * @param [in] context Library context * @param [in] key Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] cipher_state Cipher state; specify NULL if not needed * @param [in,out] data IOV array. Modified in-place. * @param [in] num_data Size of @a data * * This function encrypts the data block @a data and stores the output in-place. * The actual encryption key will be derived from @a key and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the encryption operation, and * is updated with the state to be passed as input to the next operation. * The caller must allocate the right number of krb5_crypto_iov * structures before calling into this API. * * @note On return from a krb5_c_encrypt_iov() call, the @a data->length in the * iov structure are adjusted to reflect actual lengths of the ciphertext used. * For example, if the padding length is too large, the length will be reduced. * Lengths are never increased. * * @note This function is similar to krb5_c_encrypt_iov(), but operates * on opaque key @a key. * * @sa krb5_k_decrypt_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_encrypt_iov(krb5_context context, krb5_key key, krb5_keyusage usage, const krb5_data *cipher_state, krb5_crypto_iov *data, size_t num_data); /** * Decrypt data using a key (operates on opaque key). * * @param [in] context Library context * @param [in] key Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in,out] cipher_state Cipher state; specify NULL if not needed * @param [in] input Encrypted data * @param [out] output Decrypted data * * This function decrypts the data block @a input and stores the output into @a * output. The actual decryption key will be derived from @a key and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the decryption operation, and * is updated with the state to be passed as input to the next operation. * * @note The caller must initialize @a output and allocate at least enough * space for the result. The usual practice is to allocate an output buffer as * long as the ciphertext, and let krb5_c_decrypt() trim @a output->length. * For some enctypes, the resulting @a output->length may include padding * bytes. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_decrypt(krb5_context context, krb5_key key, krb5_keyusage usage, const krb5_data *cipher_state, const krb5_enc_data *input, krb5_data *output); /** * Decrypt data in place supporting AEAD (operates on opaque key). * * @param [in] context Library context * @param [in] key Encryption key * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] cipher_state Cipher state; specify NULL if not needed * @param [in,out] data IOV array. Modified in-place. * @param [in] num_data Size of @a data * * This function decrypts the data block @a data and stores the output in-place. * The actual decryption key will be derived from @a key and @a usage * if key derivation is specified for the encryption type. If non-null, @a * cipher_state specifies the beginning state for the decryption operation, and * is updated with the state to be passed as input to the next operation. * The caller must allocate the right number of krb5_crypto_iov * structures before calling into this API. * * @note On return from a krb5_c_decrypt_iov() call, the @a data->length in the * iov structure are adjusted to reflect actual lengths of the ciphertext used. * For example, if the padding length is too large, the length will be reduced. * Lengths are never increased. * * @note This function is similar to krb5_c_decrypt_iov(), but operates * on opaque key @a key. * * @sa krb5_k_encrypt_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_decrypt_iov(krb5_context context, krb5_key key, krb5_keyusage usage, const krb5_data *cipher_state, krb5_crypto_iov *data, size_t num_data); /** * Compute a checksum (operates on opaque key). * * @param [in] context Library context * @param [in] cksumtype Checksum type (0 for mandatory type) * @param [in] key Encryption key for a keyed checksum * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] input Input data * @param [out] cksum Generated checksum * * This function computes a checksum of type @a cksumtype over @a input, using * @a key if the checksum type is a keyed checksum. If @a cksumtype is 0 and * @a key is non-null, the checksum type will be the mandatory-to-implement * checksum type for the key's encryption type. The actual checksum key will * be derived from @a key and @a usage if key derivation is specified for the * checksum type. The newly created @a cksum must be released by calling * krb5_free_checksum_contents() when it is no longer needed. * * @note This function is similar to krb5_c_make_checksum(), but operates * on opaque @a key. * * @sa krb5_c_verify_checksum() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_make_checksum(krb5_context context, krb5_cksumtype cksumtype, krb5_key key, krb5_keyusage usage, const krb5_data *input, krb5_checksum *cksum); /** * Fill in a checksum element in IOV array (operates on opaque key) * * @param [in] context Library context * @param [in] cksumtype Checksum type (0 for mandatory type) * @param [in] key Encryption key for a keyed checksum * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in,out] data IOV array * @param [in] num_data Size of @a data * * Create a checksum in the #KRB5_CRYPTO_TYPE_CHECKSUM element over * #KRB5_CRYPTO_TYPE_DATA and #KRB5_CRYPTO_TYPE_SIGN_ONLY chunks in @a data. * Only the #KRB5_CRYPTO_TYPE_CHECKSUM region is modified. * * @note This function is similar to krb5_c_make_checksum_iov(), but operates * on opaque @a key. * * @sa krb5_k_verify_checksum_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_make_checksum_iov(krb5_context context, krb5_cksumtype cksumtype, krb5_key key, krb5_keyusage usage, krb5_crypto_iov *data, size_t num_data); /** * Verify a checksum (operates on opaque key). * * @param [in] context Library context * @param [in] key Encryption key for a keyed checksum * @param [in] usage @a key usage * @param [in] data Data to be used to compute a new checksum * using @a key to compare @a cksum against * @param [in] cksum Checksum to be verified * @param [out] valid Non-zero for success, zero for failure * * This function verifies that @a cksum is a valid checksum for @a data. If * the checksum type of @a cksum is a keyed checksum, @a key is used to verify * the checksum. If the checksum type in @a cksum is 0 and @a key is not NULL, * the mandatory checksum type for @a key will be used. The actual checksum * key will be derived from @a key and @a usage if key derivation is specified * for the checksum type. * * @note This function is similar to krb5_c_verify_checksum(), but operates * on opaque @a key. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_verify_checksum(krb5_context context, krb5_key key, krb5_keyusage usage, const krb5_data *data, const krb5_checksum *cksum, krb5_boolean *valid); /** * Validate a checksum element in IOV array (operates on opaque key). * * @param [in] context Library context * @param [in] cksumtype Checksum type (0 for mandatory type) * @param [in] key Encryption key for a keyed checksum * @param [in] usage Key usage (see @ref KRB5_KEYUSAGE types) * @param [in] data IOV array * @param [in] num_data Size of @a data * @param [out] valid Non-zero for success, zero for failure * * Confirm that the checksum in the #KRB5_CRYPTO_TYPE_CHECKSUM element is a * valid checksum of the #KRB5_CRYPTO_TYPE_DATA and #KRB5_CRYPTO_TYPE_SIGN_ONLY * regions in the iov. * * @note This function is similar to krb5_c_verify_checksum_iov(), but operates * on opaque @a key. * * @sa krb5_k_make_checksum_iov() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_verify_checksum_iov(krb5_context context, krb5_cksumtype cksumtype, krb5_key key, krb5_keyusage usage, const krb5_crypto_iov *data, size_t num_data, krb5_boolean *valid); /** * Generate enctype-specific pseudo-random bytes (operates on opaque key). * * @param [in] context Library context * @param [in] key Key * @param [in] input Input data * @param [out] output Output data * * This function selects a pseudo-random function based on @a key and * computes its value over @a input, placing the result into @a output. * The caller must preinitialize @a output and allocate space for the * result. * * @note This function is similar to krb5_c_prf(), but operates * on opaque @a key. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_k_prf(krb5_context context, krb5_key key, krb5_data *input, krb5_data *output); #ifdef KRB5_OLD_CRYPTO /* * old cryptosystem routine prototypes. These are now layered * on top of the functions above. */ /** @deprecated Replaced by krb5_c_* API family.*/ krb5_error_code KRB5_CALLCONV krb5_encrypt(krb5_context context, krb5_const_pointer inptr, krb5_pointer outptr, size_t size, krb5_encrypt_block *eblock, krb5_pointer ivec); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_decrypt(krb5_context context, krb5_const_pointer inptr, krb5_pointer outptr, size_t size, krb5_encrypt_block *eblock, krb5_pointer ivec); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_process_key(krb5_context context, krb5_encrypt_block *eblock, const krb5_keyblock * key); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_finish_key(krb5_context context, krb5_encrypt_block * eblock); /** @deprecated See krb5_c_string_to_key() */ krb5_error_code KRB5_CALLCONV krb5_string_to_key(krb5_context context, const krb5_encrypt_block *eblock, krb5_keyblock * keyblock, const krb5_data *data, const krb5_data *salt); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_init_random_key(krb5_context context, const krb5_encrypt_block *eblock, const krb5_keyblock *keyblock, krb5_pointer *ptr); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_finish_random_key(krb5_context context, const krb5_encrypt_block *eblock, krb5_pointer *ptr); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_random_key(krb5_context context, const krb5_encrypt_block *eblock, krb5_pointer ptr, krb5_keyblock **keyblock); /** @deprecated Replaced by krb5_c_* API family. */ krb5_enctype KRB5_CALLCONV krb5_eblock_enctype(krb5_context context, const krb5_encrypt_block *eblock); /** @deprecated Replaced by krb5_c_* API family. */ krb5_error_code KRB5_CALLCONV krb5_use_enctype(krb5_context context, krb5_encrypt_block *eblock, krb5_enctype enctype); /** @deprecated Replaced by krb5_c_* API family. */ size_t KRB5_CALLCONV krb5_encrypt_size(size_t length, krb5_enctype crypto); /** @deprecated See krb5_c_checksum_length() */ size_t KRB5_CALLCONV krb5_checksum_size(krb5_context context, krb5_cksumtype ctype); /** @deprecated See krb5_c_make_checksum() */ krb5_error_code KRB5_CALLCONV krb5_calculate_checksum(krb5_context context, krb5_cksumtype ctype, krb5_const_pointer in, size_t in_length, krb5_const_pointer seed, size_t seed_length, krb5_checksum * outcksum); /** @deprecated See krb5_c_verify_checksum() */ krb5_error_code KRB5_CALLCONV krb5_verify_checksum(krb5_context context, krb5_cksumtype ctype, const krb5_checksum * cksum, krb5_const_pointer in, size_t in_length, krb5_const_pointer seed, size_t seed_length); #endif /* KRB5_OLD_CRYPTO */ /* * end "encryption.h" */ /* * begin "fieldbits.h" */ /* kdc_options for kdc_request */ /* options is 32 bits; each host is responsible to put the 4 bytes representing these bits into net order before transmission */ /* #define KDC_OPT_RESERVED 0x80000000 */ #define KDC_OPT_FORWARDABLE 0x40000000 #define KDC_OPT_FORWARDED 0x20000000 #define KDC_OPT_PROXIABLE 0x10000000 #define KDC_OPT_PROXY 0x08000000 #define KDC_OPT_ALLOW_POSTDATE 0x04000000 #define KDC_OPT_POSTDATED 0x02000000 /* #define KDC_OPT_UNUSED 0x01000000 */ #define KDC_OPT_RENEWABLE 0x00800000 /* #define KDC_OPT_UNUSED 0x00400000 */ /* #define KDC_OPT_RESERVED 0x00200000 */ /* #define KDC_OPT_RESERVED 0x00100000 */ /* #define KDC_OPT_RESERVED 0x00080000 */ /* #define KDC_OPT_RESERVED 0x00040000 */ #define KDC_OPT_CNAME_IN_ADDL_TKT 0x00020000 #define KDC_OPT_CANONICALIZE 0x00010000 #define KDC_OPT_REQUEST_ANONYMOUS 0x00008000 /* #define KDC_OPT_RESERVED 0x00004000 */ /* #define KDC_OPT_RESERVED 0x00002000 */ /* #define KDC_OPT_RESERVED 0x00001000 */ /* #define KDC_OPT_RESERVED 0x00000800 */ /* #define KDC_OPT_RESERVED 0x00000400 */ /* #define KDC_OPT_RESERVED 0x00000200 */ /* #define KDC_OPT_RESERVED 0x00000100 */ /* #define KDC_OPT_RESERVED 0x00000080 */ /* #define KDC_OPT_RESERVED 0x00000040 */ #define KDC_OPT_DISABLE_TRANSITED_CHECK 0x00000020 #define KDC_OPT_RENEWABLE_OK 0x00000010 #define KDC_OPT_ENC_TKT_IN_SKEY 0x00000008 /* #define KDC_OPT_UNUSED 0x00000004 */ #define KDC_OPT_RENEW 0x00000002 #define KDC_OPT_VALIDATE 0x00000001 /* * Mask of ticket flags in the TGT which should be converted into KDC * options when using the TGT to get derivative tickets. * * New mask = KDC_OPT_FORWARDABLE | KDC_OPT_PROXIABLE | * KDC_OPT_ALLOW_POSTDATE | KDC_OPT_RENEWABLE */ #define KDC_TKT_COMMON_MASK 0x54800000 /* definitions for ap_options fields */ /** @defgroup AP_OPTS AP_OPTS * * ap_options are 32 bits; each host is responsible to put the 4 bytes * representing these bits into net order before transmission * @{ */ #define AP_OPTS_RESERVED 0x80000000 #define AP_OPTS_USE_SESSION_KEY 0x40000000 /**< Use session key */ #define AP_OPTS_MUTUAL_REQUIRED 0x20000000 /**< Perform a mutual authentication exchange */ #define AP_OPTS_ETYPE_NEGOTIATION 0x00000002 #define AP_OPTS_USE_SUBKEY 0x00000001 /**< Generate a subsession key from the current session key obtained from the credentials */ /* #define AP_OPTS_RESERVED 0x10000000 */ /* #define AP_OPTS_RESERVED 0x08000000 */ /* #define AP_OPTS_RESERVED 0x04000000 */ /* #define AP_OPTS_RESERVED 0x02000000 */ /* #define AP_OPTS_RESERVED 0x01000000 */ /* #define AP_OPTS_RESERVED 0x00800000 */ /* #define AP_OPTS_RESERVED 0x00400000 */ /* #define AP_OPTS_RESERVED 0x00200000 */ /* #define AP_OPTS_RESERVED 0x00100000 */ /* #define AP_OPTS_RESERVED 0x00080000 */ /* #define AP_OPTS_RESERVED 0x00040000 */ /* #define AP_OPTS_RESERVED 0x00020000 */ /* #define AP_OPTS_RESERVED 0x00010000 */ /* #define AP_OPTS_RESERVED 0x00008000 */ /* #define AP_OPTS_RESERVED 0x00004000 */ /* #define AP_OPTS_RESERVED 0x00002000 */ /* #define AP_OPTS_RESERVED 0x00001000 */ /* #define AP_OPTS_RESERVED 0x00000800 */ /* #define AP_OPTS_RESERVED 0x00000400 */ /* #define AP_OPTS_RESERVED 0x00000200 */ /* #define AP_OPTS_RESERVED 0x00000100 */ /* #define AP_OPTS_RESERVED 0x00000080 */ /* #define AP_OPTS_RESERVED 0x00000040 */ /* #define AP_OPTS_RESERVED 0x00000020 */ /* #define AP_OPTS_RESERVED 0x00000010 */ /* #define AP_OPTS_RESERVED 0x00000008 */ /* #define AP_OPTS_RESERVED 0x00000004 */ #define AP_OPTS_WIRE_MASK 0xfffffff0 /** @} */ /* end of AP_OPTS group */ /* definitions for ad_type fields. */ #define AD_TYPE_RESERVED 0x8000 #define AD_TYPE_EXTERNAL 0x4000 #define AD_TYPE_REGISTERED 0x2000 #define AD_TYPE_FIELD_TYPE_MASK 0x1fff /* Ticket flags */ /* flags are 32 bits; each host is responsible to put the 4 bytes representing these bits into net order before transmission */ /* #define TKT_FLG_RESERVED 0x80000000 */ #define TKT_FLG_FORWARDABLE 0x40000000 #define TKT_FLG_FORWARDED 0x20000000 #define TKT_FLG_PROXIABLE 0x10000000 #define TKT_FLG_PROXY 0x08000000 #define TKT_FLG_MAY_POSTDATE 0x04000000 #define TKT_FLG_POSTDATED 0x02000000 #define TKT_FLG_INVALID 0x01000000 #define TKT_FLG_RENEWABLE 0x00800000 #define TKT_FLG_INITIAL 0x00400000 #define TKT_FLG_PRE_AUTH 0x00200000 #define TKT_FLG_HW_AUTH 0x00100000 #define TKT_FLG_TRANSIT_POLICY_CHECKED 0x00080000 #define TKT_FLG_OK_AS_DELEGATE 0x00040000 #define TKT_FLG_ENC_PA_REP 0x00010000 #define TKT_FLG_ANONYMOUS 0x00008000 /* #define TKT_FLG_RESERVED 0x00004000 */ /* #define TKT_FLG_RESERVED 0x00002000 */ /* #define TKT_FLG_RESERVED 0x00001000 */ /* #define TKT_FLG_RESERVED 0x00000800 */ /* #define TKT_FLG_RESERVED 0x00000400 */ /* #define TKT_FLG_RESERVED 0x00000200 */ /* #define TKT_FLG_RESERVED 0x00000100 */ /* #define TKT_FLG_RESERVED 0x00000080 */ /* #define TKT_FLG_RESERVED 0x00000040 */ /* #define TKT_FLG_RESERVED 0x00000020 */ /* #define TKT_FLG_RESERVED 0x00000010 */ /* #define TKT_FLG_RESERVED 0x00000008 */ /* #define TKT_FLG_RESERVED 0x00000004 */ /* #define TKT_FLG_RESERVED 0x00000002 */ /* #define TKT_FLG_RESERVED 0x00000001 */ /* definitions for lr_type fields. */ #define LR_TYPE_THIS_SERVER_ONLY 0x8000 #define LR_TYPE_INTERPRETATION_MASK 0x7fff /* definitions for msec direction bit for KRB_SAFE, KRB_PRIV */ #define MSEC_DIRBIT 0x8000 #define MSEC_VAL_MASK 0x7fff /* * end "fieldbits.h" */ /* * begin "proto.h" */ /** Protocol version number */ #define KRB5_PVNO 5 /* Message types */ #define KRB5_AS_REQ ((krb5_msgtype)10) /**< Initial authentication request */ #define KRB5_AS_REP ((krb5_msgtype)11) /**< Response to AS request */ #define KRB5_TGS_REQ ((krb5_msgtype)12) /**< Ticket granting server request */ #define KRB5_TGS_REP ((krb5_msgtype)13) /**< Response to TGS request */ #define KRB5_AP_REQ ((krb5_msgtype)14) /**< Auth req to application server */ #define KRB5_AP_REP ((krb5_msgtype)15) /**< Response to mutual AP request */ #define KRB5_SAFE ((krb5_msgtype)20) /**< Safe application message */ #define KRB5_PRIV ((krb5_msgtype)21) /**< Private application message */ #define KRB5_CRED ((krb5_msgtype)22) /**< Cred forwarding message */ #define KRB5_ERROR ((krb5_msgtype)30) /**< Error response */ /* LastReq types */ #define KRB5_LRQ_NONE 0 #define KRB5_LRQ_ALL_LAST_TGT 1 #define KRB5_LRQ_ONE_LAST_TGT (-1) #define KRB5_LRQ_ALL_LAST_INITIAL 2 #define KRB5_LRQ_ONE_LAST_INITIAL (-2) #define KRB5_LRQ_ALL_LAST_TGT_ISSUED 3 #define KRB5_LRQ_ONE_LAST_TGT_ISSUED (-3) #define KRB5_LRQ_ALL_LAST_RENEWAL 4 #define KRB5_LRQ_ONE_LAST_RENEWAL (-4) #define KRB5_LRQ_ALL_LAST_REQ 5 #define KRB5_LRQ_ONE_LAST_REQ (-5) #define KRB5_LRQ_ALL_PW_EXPTIME 6 #define KRB5_LRQ_ONE_PW_EXPTIME (-6) #define KRB5_LRQ_ALL_ACCT_EXPTIME 7 #define KRB5_LRQ_ONE_ACCT_EXPTIME (-7) /* PADATA types */ #define KRB5_PADATA_NONE 0 #define KRB5_PADATA_AP_REQ 1 #define KRB5_PADATA_TGS_REQ KRB5_PADATA_AP_REQ #define KRB5_PADATA_ENC_TIMESTAMP 2 /**< RFC 4120 */ #define KRB5_PADATA_PW_SALT 3 /**< RFC 4120 */ #if 0 /* Not used */ #define KRB5_PADATA_ENC_ENCKEY 4 /* Key encrypted within itself */ #endif #define KRB5_PADATA_ENC_UNIX_TIME 5 /**< timestamp encrypted in key. RFC 4120 */ #define KRB5_PADATA_ENC_SANDIA_SECURID 6 /**< SecurId passcode. RFC 4120 */ #define KRB5_PADATA_SESAME 7 /**< Sesame project. RFC 4120 */ #define KRB5_PADATA_OSF_DCE 8 /**< OSF DCE. RFC 4120 */ #define KRB5_CYBERSAFE_SECUREID 9 /**< Cybersafe. RFC 4120 */ #define KRB5_PADATA_AFS3_SALT 10 /**< Cygnus. RFC 4120, 3961 */ #define KRB5_PADATA_ETYPE_INFO 11 /**< Etype info for preauth. RFC 4120 */ #define KRB5_PADATA_SAM_CHALLENGE 12 /**< SAM/OTP */ #define KRB5_PADATA_SAM_RESPONSE 13 /**< SAM/OTP */ #define KRB5_PADATA_PK_AS_REQ_OLD 14 /**< PKINIT */ #define KRB5_PADATA_PK_AS_REP_OLD 15 /**< PKINIT */ #define KRB5_PADATA_PK_AS_REQ 16 /**< PKINIT. RFC 4556 */ #define KRB5_PADATA_PK_AS_REP 17 /**< PKINIT. RFC 4556 */ #define KRB5_PADATA_ETYPE_INFO2 19 /**< RFC 4120 */ #define KRB5_PADATA_USE_SPECIFIED_KVNO 20 /**< RFC 4120 */ #define KRB5_PADATA_SVR_REFERRAL_INFO 20 /**< Windows 2000 referrals. RFC 6820 */ #define KRB5_PADATA_SAM_REDIRECT 21 /**< SAM/OTP. RFC 4120 */ #define KRB5_PADATA_GET_FROM_TYPED_DATA 22 /**< Embedded in typed data. RFC 4120 */ #define KRB5_PADATA_REFERRAL 25 /**< draft referral system */ #define KRB5_PADATA_SAM_CHALLENGE_2 30 /**< draft challenge system, updated */ #define KRB5_PADATA_SAM_RESPONSE_2 31 /**< draft challenge system, updated */ /* MS-KILE */ #define KRB5_PADATA_PAC_REQUEST 128 /**< include Windows PAC */ #define KRB5_PADATA_FOR_USER 129 /**< username protocol transition request */ #define KRB5_PADATA_S4U_X509_USER 130 /**< certificate protocol transition request */ #define KRB5_PADATA_AS_CHECKSUM 132 /**< AS checksum */ #define KRB5_PADATA_FX_COOKIE 133 /**< RFC 6113 */ #define KRB5_PADATA_FX_FAST 136 /**< RFC 6113 */ #define KRB5_PADATA_FX_ERROR 137 /**< RFC 6113 */ #define KRB5_PADATA_ENCRYPTED_CHALLENGE 138 /**< RFC 6113 */ #define KRB5_PADATA_OTP_CHALLENGE 141 /**< RFC 6560 section 4.1 */ #define KRB5_PADATA_OTP_REQUEST 142 /**< RFC 6560 section 4.2 */ #define KRB5_PADATA_OTP_PIN_CHANGE 144 /**< RFC 6560 section 4.3 */ #define KRB5_PADATA_PKINIT_KX 147 /**< RFC 6112 */ #define KRB5_ENCPADATA_REQ_ENC_PA_REP 149 /**< RFC 6806 */ #define KRB5_PADATA_AS_FRESHNESS 150 /**< RFC 8070 */ #define KRB5_PADATA_SPAKE 151 #define KRB5_PADATA_PAC_OPTIONS 167 /**< MS-KILE and MS-SFU */ #define KRB5_SAM_USE_SAD_AS_KEY 0x80000000 #define KRB5_SAM_SEND_ENCRYPTED_SAD 0x40000000 #define KRB5_SAM_MUST_PK_ENCRYPT_SAD 0x20000000 /**< currently must be zero */ /** Transited encoding types */ #define KRB5_DOMAIN_X500_COMPRESS 1 /** alternate authentication types */ #define KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE 64 /* authorization data types. See RFC 4120 section 5.2.6 */ /** @defgroup KRB5_AUTHDATA KRB5_AUTHDATA * @{ */ #define KRB5_AUTHDATA_IF_RELEVANT 1 #define KRB5_AUTHDATA_KDC_ISSUED 4 #define KRB5_AUTHDATA_AND_OR 5 #define KRB5_AUTHDATA_MANDATORY_FOR_KDC 8 #define KRB5_AUTHDATA_INITIAL_VERIFIED_CAS 9 #define KRB5_AUTHDATA_OSF_DCE 64 #define KRB5_AUTHDATA_SESAME 65 #define KRB5_AUTHDATA_CAMMAC 96 #define KRB5_AUTHDATA_WIN2K_PAC 128 #define KRB5_AUTHDATA_ETYPE_NEGOTIATION 129 /**< RFC 4537 */ #define KRB5_AUTHDATA_SIGNTICKET 512 /**< @deprecated use PAC */ #define KRB5_AUTHDATA_FX_ARMOR 71 #define KRB5_AUTHDATA_AUTH_INDICATOR 97 #define KRB5_AUTHDATA_AP_OPTIONS 143 /** @} */ /* end of KRB5_AUTHDATA group */ /* password change constants */ #define KRB5_KPASSWD_SUCCESS 0 /**< Success */ #define KRB5_KPASSWD_MALFORMED 1 /**< Malformed request */ #define KRB5_KPASSWD_HARDERROR 2 /**< Server error */ #define KRB5_KPASSWD_AUTHERROR 3 /**< Authentication error */ #define KRB5_KPASSWD_SOFTERROR 4 /**< Password change rejected */ /* These are Microsoft's extensions in RFC 3244, and it looks like they'll become standardized, possibly with other additions. */ #define KRB5_KPASSWD_ACCESSDENIED 5 /**< Not authorized */ #define KRB5_KPASSWD_BAD_VERSION 6 /**< Unknown RPC version */ /** The presented credentials were not obtained using a password directly */ #define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7 /* * end "proto.h" */ /* Time set */ /** Ticket start time, end time, and renewal duration. */ typedef struct _krb5_ticket_times { krb5_timestamp authtime; /**< Time at which KDC issued the initial ticket that corresponds to this ticket */ /* XXX ? should ktime in KDC_REP == authtime in ticket? otherwise client can't get this */ krb5_timestamp starttime; /**< optional in ticket, if not present, use @a authtime */ krb5_timestamp endtime; /**< Ticket expiration time */ krb5_timestamp renew_till; /**< Latest time at which renewal of ticket can be valid */ } krb5_ticket_times; /** Structure for auth data */ typedef struct _krb5_authdata { krb5_magic magic; krb5_authdatatype ad_type; /**< ADTYPE */ unsigned int length; /**< Length of data */ krb5_octet *contents; /**< Data */ } krb5_authdata; /** Structure for transited encoding */ typedef struct _krb5_transited { krb5_magic magic; krb5_octet tr_type; /**< Transited encoding type */ krb5_data tr_contents; /**< Contents */ } krb5_transited; /** Encrypted part of ticket. */ typedef struct _krb5_enc_tkt_part { krb5_magic magic; /* to-be-encrypted portion */ krb5_flags flags; /**< flags */ krb5_keyblock *session; /**< session key: includes enctype */ krb5_principal client; /**< client name/realm */ krb5_transited transited; /**< list of transited realms */ krb5_ticket_times times; /**< auth, start, end, renew_till */ krb5_address **caddrs; /**< array of ptrs to addresses */ krb5_authdata **authorization_data; /**< auth data */ } krb5_enc_tkt_part; /** * Ticket structure. * * The C representation of the ticket message, with a pointer to the * C representation of the encrypted part. */ typedef struct _krb5_ticket { krb5_magic magic; /* cleartext portion */ krb5_principal server; /**< server name/realm */ krb5_enc_data enc_part; /**< encryption type, kvno, encrypted encoding */ krb5_enc_tkt_part *enc_part2; /**< ptr to decrypted version, if available */ } krb5_ticket; /* the unencrypted version */ /** * Ticket authenticator. * * The C representation of an unencrypted authenticator. */ typedef struct _krb5_authenticator { krb5_magic magic; krb5_principal client; /**< client name/realm */ krb5_checksum *checksum; /**< checksum, includes type, optional */ krb5_int32 cusec; /**< client usec portion */ krb5_timestamp ctime; /**< client sec portion */ krb5_keyblock *subkey; /**< true session key, optional */ krb5_ui_4 seq_number; /**< sequence #, optional */ krb5_authdata **authorization_data; /**< authoriazation data */ } krb5_authenticator; /** Ticket authentication data. */ typedef struct _krb5_tkt_authent { krb5_magic magic; krb5_ticket *ticket; krb5_authenticator *authenticator; krb5_flags ap_options; } krb5_tkt_authent; /** Credentials structure including ticket, session key, and lifetime info. */ typedef struct _krb5_creds { krb5_magic magic; krb5_principal client; /**< client's principal identifier */ krb5_principal server; /**< server's principal identifier */ krb5_keyblock keyblock; /**< session encryption key info */ krb5_ticket_times times; /**< lifetime info */ krb5_boolean is_skey; /**< true if ticket is encrypted in another ticket's skey */ krb5_flags ticket_flags; /**< flags in ticket */ krb5_address **addresses; /**< addrs in ticket */ krb5_data ticket; /**< ticket string itself */ krb5_data second_ticket; /**< second ticket, if related to ticket (via DUPLICATE-SKEY or ENC-TKT-IN-SKEY) */ krb5_authdata **authdata; /**< authorization data */ } krb5_creds; /** Last request entry */ typedef struct _krb5_last_req_entry { krb5_magic magic; krb5_int32 lr_type; /**< LR type */ krb5_timestamp value; /**< Timestamp */ } krb5_last_req_entry; /** Pre-authentication data */ typedef struct _krb5_pa_data { krb5_magic magic; krb5_preauthtype pa_type; /**< Preauthentication data type */ unsigned int length; /**< Length of data */ krb5_octet *contents; /**< Data */ } krb5_pa_data; /* Don't use this; use krb5_pa_data instead. */ typedef struct _krb5_typed_data { krb5_magic magic; krb5_int32 type; unsigned int length; krb5_octet *data; } krb5_typed_data; /** C representation of KDC-REQ protocol message, including KDC-REQ-BODY */ typedef struct _krb5_kdc_req { krb5_magic magic; krb5_msgtype msg_type; /**< KRB5_AS_REQ or KRB5_TGS_REQ */ krb5_pa_data **padata; /**< Preauthentication data */ /* real body */ krb5_flags kdc_options; /**< Requested options */ krb5_principal client; /**< Client principal and realm */ krb5_principal server; /**< Server principal and realm */ krb5_timestamp from; /**< Requested start time */ krb5_timestamp till; /**< Requested end time */ krb5_timestamp rtime; /**< Requested renewable end time */ krb5_int32 nonce; /**< Nonce to match request and response */ int nktypes; /**< Number of enctypes */ krb5_enctype *ktype; /**< Requested enctypes */ krb5_address **addresses; /**< Requested addresses (optional) */ krb5_enc_data authorization_data; /**< Encrypted authz data (optional) */ krb5_authdata **unenc_authdata; /**< Unencrypted authz data */ krb5_ticket **second_ticket; /**< Second ticket array (optional) */ } krb5_kdc_req; /** * C representation of @c EncKDCRepPart protocol message. * * This is the cleartext message that is encrypted and inserted in @c KDC-REP. */ typedef struct _krb5_enc_kdc_rep_part { krb5_magic magic; /* encrypted part: */ krb5_msgtype msg_type; /**< krb5 message type */ krb5_keyblock *session; /**< Session key */ krb5_last_req_entry **last_req; /**< Array of pointers to entries */ krb5_int32 nonce; /**< Nonce from request */ krb5_timestamp key_exp; /**< Expiration date */ krb5_flags flags; /**< Ticket flags */ krb5_ticket_times times; /**< Lifetime info */ krb5_principal server; /**< Server's principal identifier */ krb5_address **caddrs; /**< Array of ptrs to addrs, optional */ krb5_pa_data **enc_padata; /**< Encrypted preauthentication data */ } krb5_enc_kdc_rep_part; /** Representation of the @c KDC-REP protocol message. */ typedef struct _krb5_kdc_rep { krb5_magic magic; /* cleartext part: */ krb5_msgtype msg_type; /**< KRB5_AS_REP or KRB5_KDC_REP */ krb5_pa_data **padata; /**< Preauthentication data from KDC */ krb5_principal client; /**< Client principal and realm */ krb5_ticket *ticket; /**< Ticket */ krb5_enc_data enc_part; /**< Encrypted part of reply */ krb5_enc_kdc_rep_part *enc_part2; /**< Unencrypted version, if available */ } krb5_kdc_rep; /** Error message structure */ typedef struct _krb5_error { krb5_magic magic; /* some of these may be meaningless in certain contexts */ krb5_timestamp ctime; /**< Client sec portion; optional */ krb5_int32 cusec; /**< Client usec portion; optional */ krb5_int32 susec; /**< Server usec portion */ krb5_timestamp stime; /**< Server sec portion */ krb5_ui_4 error; /**< Error code (protocol error #'s) */ krb5_principal client; /**< Client principal and realm */ krb5_principal server; /**< Server principal and realm */ krb5_data text; /**< Descriptive text */ krb5_data e_data; /**< Additional error-describing data */ } krb5_error; /** Authentication header. */ typedef struct _krb5_ap_req { krb5_magic magic; krb5_flags ap_options; /**< Requested options */ krb5_ticket *ticket; /**< Ticket */ krb5_enc_data authenticator; /**< Encrypted authenticator */ } krb5_ap_req; /** * C representaton of AP-REP message. * * The server's response to a client's request for mutual authentication. */ typedef struct _krb5_ap_rep { krb5_magic magic; krb5_enc_data enc_part; /**< Ciphertext of ApRepEncPart */ } krb5_ap_rep; /** Cleartext that is encrypted and put into @c _krb5_ap_rep. */ typedef struct _krb5_ap_rep_enc_part { krb5_magic magic; krb5_timestamp ctime; /**< Client time, seconds portion */ krb5_int32 cusec; /**< Client time, microseconds portion */ krb5_keyblock *subkey; /**< Subkey (optional) */ krb5_ui_4 seq_number; /**< Sequence number */ } krb5_ap_rep_enc_part; /* Unused */ typedef struct _krb5_response { krb5_magic magic; krb5_octet message_type; krb5_data response; krb5_int32 expected_nonce; krb5_timestamp request_time; } krb5_response; /** Credentials information inserted into @c EncKrbCredPart. */ typedef struct _krb5_cred_info { krb5_magic magic; krb5_keyblock *session; /**< Session key used to encrypt ticket */ krb5_principal client; /**< Client principal and realm */ krb5_principal server; /**< Server principal and realm */ krb5_flags flags; /**< Ticket flags */ krb5_ticket_times times; /**< Auth, start, end, renew_till */ krb5_address **caddrs; /**< Array of pointers to addrs (optional) */ } krb5_cred_info; /** Cleartext credentials information. */ typedef struct _krb5_cred_enc_part { krb5_magic magic; krb5_int32 nonce; /**< Nonce (optional) */ krb5_timestamp timestamp; /**< Generation time, seconds portion */ krb5_int32 usec; /**< Generation time, microseconds portion */ krb5_address *s_address; /**< Sender address (optional) */ krb5_address *r_address; /**< Recipient address (optional) */ krb5_cred_info **ticket_info; } krb5_cred_enc_part; /** Credentials data structure.*/ typedef struct _krb5_cred { krb5_magic magic; krb5_ticket **tickets; /**< Tickets */ krb5_enc_data enc_part; /**< Encrypted part */ krb5_cred_enc_part *enc_part2; /**< Unencrypted version, if available */ } krb5_cred; /* Unused, but here for API compatibility. */ typedef struct _passwd_phrase_element { krb5_magic magic; krb5_data *passwd; krb5_data *phrase; } passwd_phrase_element; /* Unused, but here for API compatibility. */ typedef struct _krb5_pwd_data { krb5_magic magic; int sequence_count; passwd_phrase_element **element; } krb5_pwd_data; /* Unused, but here for API compatibility. */ typedef struct _krb5_pa_svr_referral_data { /** Referred name, only realm is required */ krb5_principal principal; } krb5_pa_svr_referral_data; /* Unused, but here for API compatibility. */ typedef struct _krb5_pa_server_referral_data { krb5_data *referred_realm; krb5_principal true_principal_name; krb5_principal requested_principal_name; krb5_timestamp referral_valid_until; krb5_checksum rep_cksum; } krb5_pa_server_referral_data; typedef struct _krb5_pa_pac_req { /** TRUE if a PAC should be included in TGS-REP */ krb5_boolean include_pac; } krb5_pa_pac_req; /* * begin "safepriv.h" */ /** @defgroup KRB5_AUTH_CONTEXT KRB5_AUTH_CONTEXT * @{ */ /** Prevent replays with timestamps and replay cache. */ #define KRB5_AUTH_CONTEXT_DO_TIME 0x00000001 /** Save timestamps for application. */ #define KRB5_AUTH_CONTEXT_RET_TIME 0x00000002 /** Prevent replays with sequence numbers. */ #define KRB5_AUTH_CONTEXT_DO_SEQUENCE 0x00000004 /** Save sequence numbers for application. */ #define KRB5_AUTH_CONTEXT_RET_SEQUENCE 0x00000008 #define KRB5_AUTH_CONTEXT_PERMIT_ALL 0x00000010 #define KRB5_AUTH_CONTEXT_USE_SUBKEY 0x00000020 /** @} */ /* end of KRB5_AUTH_CONTEXT group */ /** * Replay data. * * Sequence number and timestamp information output by krb5_rd_priv() and * krb5_rd_safe(). */ typedef struct krb5_replay_data { krb5_timestamp timestamp; /**< Timestamp, seconds portion */ krb5_int32 usec; /**< Timestamp, microseconds portion */ krb5_ui_4 seq; /**< Sequence number */ } krb5_replay_data; /* Flags for krb5_auth_con_genaddrs(). */ /** Generate the local network address. */ #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR 0x00000001 /** Generate the remote network address. */ #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR 0x00000002 /** Generate the local network address and the local port. */ #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR 0x00000004 /** Generate the remote network address and the remote port. */ #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR 0x00000008 /** Type of function used as a callback to generate checksum data for mk_req */ typedef krb5_error_code (KRB5_CALLCONV * krb5_mk_req_checksum_func)(krb5_context, krb5_auth_context, void *, krb5_data **); /* * end "safepriv.h" */ /* * begin "ccache.h" */ /** Cursor for sequential lookup */ typedef krb5_pointer krb5_cc_cursor; struct _krb5_ccache; typedef struct _krb5_ccache *krb5_ccache; struct _krb5_cc_ops; typedef struct _krb5_cc_ops krb5_cc_ops; struct _krb5_cccol_cursor; /** Cursor for iterating over all ccaches */ typedef struct _krb5_cccol_cursor *krb5_cccol_cursor; /* Flags for krb5_cc_retrieve_cred. */ /** The requested lifetime must be at least as great as the time specified. */ #define KRB5_TC_MATCH_TIMES 0x00000001 /** The is_skey field must match exactly. */ #define KRB5_TC_MATCH_IS_SKEY 0x00000002 /** All the flags set in the match credentials must be set. */ #define KRB5_TC_MATCH_FLAGS 0x00000004 /** All the time fields must match exactly. */ #define KRB5_TC_MATCH_TIMES_EXACT 0x00000008 /** All the flags must match exactly. */ #define KRB5_TC_MATCH_FLAGS_EXACT 0x00000010 /** The authorization data must match. */ #define KRB5_TC_MATCH_AUTHDATA 0x00000020 /** Only the name portion of the principal name must match. */ #define KRB5_TC_MATCH_SRV_NAMEONLY 0x00000040 /** The second ticket must match. */ #define KRB5_TC_MATCH_2ND_TKT 0x00000080 /** The encryption key type must match. */ #define KRB5_TC_MATCH_KTYPE 0x00000100 /** The supported key types must match. */ #define KRB5_TC_SUPPORTED_KTYPES 0x00000200 /* Flags for krb5_cc_set_flags and similar. */ /** Open and close the file for each cache operation. */ #define KRB5_TC_OPENCLOSE 0x00000001 /**< @deprecated has no effect */ #define KRB5_TC_NOTICKET 0x00000002 /** * Retrieve the name, but not type of a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * * @warning Returns the name of the credential cache. The result is an alias * into @a cache and should not be freed or modified by the caller. This name * does not include the cache type, so should not be used as input to * krb5_cc_resolve(). * * @return * On success - the name of the credential cache. */ const char * KRB5_CALLCONV krb5_cc_get_name(krb5_context context, krb5_ccache cache); /** * Retrieve the full name of a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [out] fullname_out Full name of cache * * Use krb5_free_string() to free @a fullname_out when it is no longer needed. * * @version New in 1.10 */ krb5_error_code KRB5_CALLCONV krb5_cc_get_full_name(krb5_context context, krb5_ccache cache, char **fullname_out); #if KRB5_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_cc_gen_new(krb5_context context, krb5_ccache *cache); #endif /* KRB5_DEPRECATED */ /** * Initialize a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [in] principal Default principal name * * Destroy any existing contents of @a cache and initialize it for the default * principal @a principal. * * @retval * 0 Success * @return * System errors; Permission errors; Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_initialize(krb5_context context, krb5_ccache cache, krb5_principal principal); /** * Destroy a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * * This function destroys any existing contents of @a cache and closes the * handle to it. * * @retval * 0 Success * @return * Permission errors */ krb5_error_code KRB5_CALLCONV krb5_cc_destroy(krb5_context context, krb5_ccache cache); /** * Close a credential cache handle. * * @param [in] context Library context * @param [in] cache Credential cache handle * * This function closes a credential cache handle @a cache without affecting * the contents of the cache. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_close(krb5_context context, krb5_ccache cache); /** * Store credentials in a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [in] creds Credentials to be stored in cache * * This function stores @a creds into @a cache. If @a creds->server and the * server in the decoded ticket @a creds->ticket differ, the credentials will * be stored under both server principal names. * * @retval * 0 Success * @return Permission errors; storage failure errors; Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_store_cred(krb5_context context, krb5_ccache cache, krb5_creds *creds); /** * Retrieve a specified credentials from a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [in] flags Flags bit mask * @param [in] mcreds Credentials to match * @param [out] creds Credentials matching the requested value * * This function searches a credential cache for credentials matching @a mcreds * and returns it if found. * * Valid values for @a flags are: * * @li #KRB5_TC_MATCH_TIMES The requested lifetime must be at least as * great as in @a mcreds . * @li #KRB5_TC_MATCH_IS_SKEY The @a is_skey field much match exactly. * @li #KRB5_TC_MATCH_FLAGS Flags set in @a mcreds must be set. * @li #KRB5_TC_MATCH_TIMES_EXACT The requested lifetime must match exactly. * @li #KRB5_TC_MATCH_FLAGS_EXACT Flags must match exactly. * @li #KRB5_TC_MATCH_AUTHDATA The authorization data must match. * @li #KRB5_TC_MATCH_SRV_NAMEONLY Only the name portion of the principal * name must match, not the realm. * @li #KRB5_TC_MATCH_2ND_TKT The second tickets must match. * @li #KRB5_TC_MATCH_KTYPE The encryption key types must match. * @li #KRB5_TC_SUPPORTED_KTYPES Check all matching entries that have any * supported encryption type and return the * one with the encryption type listed earliest. * * Use krb5_free_cred_contents() to free @a creds when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_retrieve_cred(krb5_context context, krb5_ccache cache, krb5_flags flags, krb5_creds *mcreds, krb5_creds *creds); /** * Get the default principal of a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [out] principal Primary principal * * Returns the default client principal of a credential cache as set by * krb5_cc_initialize(). * * Use krb5_free_principal() to free @a principal when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_get_principal(krb5_context context, krb5_ccache cache, krb5_principal *principal); /** * Prepare to sequentially read every credential in a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [out] cursor Cursor * * krb5_cc_end_seq_get() must be called to complete the retrieve operation. * * @note If the cache represented by @a cache is modified between the time of * the call to this function and the time of the final krb5_cc_end_seq_get(), * these changes may not be reflected in the results of krb5_cc_next_cred() * calls. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_start_seq_get(krb5_context context, krb5_ccache cache, krb5_cc_cursor *cursor); /** * Retrieve the next entry from the credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [in] cursor Cursor * @param [out] creds Next credential cache entry * * This function fills in @a creds with the next entry in @a cache and advances * @a cursor. * * Use krb5_free_cred_contents() to free @a creds when it is no longer needed. * * @sa krb5_cc_start_seq_get(), krb5_end_seq_get() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_next_cred(krb5_context context, krb5_ccache cache, krb5_cc_cursor *cursor, krb5_creds *creds); /** * Finish a series of sequential processing credential cache entries. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [in] cursor Cursor * * This function finishes processing credential cache entries and invalidates * @a cursor. * * @sa krb5_cc_start_seq_get(), krb5_cc_next_cred() * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_cc_end_seq_get(krb5_context context, krb5_ccache cache, krb5_cc_cursor *cursor); /** * Remove credentials from a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [in] flags Bitwise-ORed search flags * @param [in] creds Credentials to be matched * * @warning This function is not implemented for some cache types. * * This function accepts the same flag values as krb5_cc_retrieve_cred(). * * @retval KRB5_CC_NOSUPP Not implemented for this cache type * @return No matches found; Data cannot be deleted; Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_remove_cred(krb5_context context, krb5_ccache cache, krb5_flags flags, krb5_creds *creds); /** * Set options flags on a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [in] flags Flag bit mask * * This function resets @a cache flags to @a flags. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_set_flags(krb5_context context, krb5_ccache cache, krb5_flags flags); /** * Retrieve flags from a credential cache structure. * * @param [in] context Library context * @param [in] cache Credential cache handle * @param [out] flags Flag bit mask * * @warning For memory credential cache always returns a flag mask of 0. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_get_flags(krb5_context context, krb5_ccache cache, krb5_flags *flags); /** * Retrieve the type of a credential cache. * * @param [in] context Library context * @param [in] cache Credential cache handle * * @return The type of a credential cache as an alias that must not be modified * or freed by the caller. */ const char * KRB5_CALLCONV krb5_cc_get_type(krb5_context context, krb5_ccache cache); /** * Move a credential cache. * * @param [in] context Library context * @param [in] src The credential cache to move the content from * @param [in] dst The credential cache to move the content to * * This function reinitializes @a dst and populates it with the credentials and * default principal of @a src; then, if successful, destroys @a src. * * @retval * 0 Success; @a src is closed. * @return * Kerberos error codes; @a src is still allocated. */ krb5_error_code KRB5_CALLCONV krb5_cc_move(krb5_context context, krb5_ccache src, krb5_ccache dst); /** * Prepare to iterate over the collection of known credential caches. * * @param [in] context Library context * @param [out] cursor Cursor * * Get a new cache iteration @a cursor that will iterate over all known * credential caches independent of type. * * Use krb5_cccol_cursor_free() to release @a cursor when it is no longer * needed. * * @sa krb5_cccol_cursor_next() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cccol_cursor_new(krb5_context context, krb5_cccol_cursor *cursor); /** * Get the next credential cache in the collection. * * @param [in] context Library context * @param [in] cursor Cursor * @param [out] ccache Credential cache handle * * @note When all caches are iterated over and the end of the list is reached, * @a ccache is set to NULL. * * Use krb5_cc_close() to close @a ccache when it is no longer needed. * * @sa krb5_cccol_cursor_new(), krb5_cccol_cursor_free() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cccol_cursor_next(krb5_context context, krb5_cccol_cursor cursor, krb5_ccache *ccache); /** * Free a credential cache collection cursor. * * @param [in] context Library context * @param [in] cursor Cursor * * @sa krb5_cccol_cursor_new(), krb5_cccol_cursor_next() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cccol_cursor_free(krb5_context context, krb5_cccol_cursor *cursor); /** * Check if the credential cache collection contains any credentials. * * @param [in] context Library context * * @version New in 1.11 * * @retval 0 Credentials are available in the collection * @retval KRB5_CC_NOTFOUND The collection contains no credentials */ krb5_error_code KRB5_CALLCONV krb5_cccol_have_content(krb5_context context); /** * Create a new credential cache of the specified type with a unique name. * * @param [in] context Library context * @param [in] type Credential cache type name * @param [in] hint Unused * @param [out] id Credential cache handle * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_new_unique(krb5_context context, const char *type, const char *hint, krb5_ccache *id); /* * end "ccache.h" */ /* * begin "rcache.h" */ struct krb5_rc_st; typedef struct krb5_rc_st *krb5_rcache; /* * end "rcache.h" */ /* * begin "keytab.h" */ /* XXX */ #define MAX_KEYTAB_NAME_LEN 1100 /**< Long enough for MAXPATHLEN + some extra */ typedef krb5_pointer krb5_kt_cursor; /** A key table entry. */ typedef struct krb5_keytab_entry_st { krb5_magic magic; krb5_principal principal; /**< Principal of this key */ krb5_timestamp timestamp; /**< Time entry written to keytable */ krb5_kvno vno; /**< Key version number */ krb5_keyblock key; /**< The secret key */ } krb5_keytab_entry; struct _krb5_kt; typedef struct _krb5_kt *krb5_keytab; /** * Return the type of a key table. * * @param [in] context Library context * @param [in] keytab Key table handle * * @return The type of a key table as an alias that must not be modified or * freed by the caller. */ const char * KRB5_CALLCONV krb5_kt_get_type(krb5_context context, krb5_keytab keytab); /** * Get a key table name. * * @param [in] context Library context * @param [in] keytab Key table handle * @param [out] name Key table name * @param [in] namelen Maximum length to fill in name * * Fill @a name with the name of @a keytab including the type and delimiter. * * @sa MAX_KEYTAB_NAME_LEN * * @retval * 0 Success * @retval * KRB5_KT_NAME_TOOLONG Key table name does not fit in @a namelen bytes * * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name, unsigned int namelen); /** * Close a key table handle. * * @param [in] context Library context * @param [in] keytab Key table handle * * @retval 0 */ krb5_error_code KRB5_CALLCONV krb5_kt_close(krb5_context context, krb5_keytab keytab); /** * Get an entry from a key table. * * @param [in] context Library context * @param [in] keytab Key table handle * @param [in] principal Principal name * @param [in] vno Key version number (0 for highest available) * @param [in] enctype Encryption type (0 zero for any enctype) * @param [out] entry Returned entry from key table * * Retrieve an entry from a key table which matches the @a keytab, @a * principal, @a vno, and @a enctype. If @a vno is zero, retrieve the * highest-numbered kvno matching the other fields. If @a enctype is 0, match * any enctype. * * Use krb5_free_keytab_entry_contents() to free @a entry when it is no longer * needed. * * @note If @a vno is zero, the function retrieves the highest-numbered-kvno * entry that matches the specified principal. * * @retval * 0 Success * @retval * Kerberos error codes on failure */ krb5_error_code KRB5_CALLCONV krb5_kt_get_entry(krb5_context context, krb5_keytab keytab, krb5_const_principal principal, krb5_kvno vno, krb5_enctype enctype, krb5_keytab_entry *entry); /** * Start a sequential retrieval of key table entries. * * @param [in] context Library context * @param [in] keytab Key table handle * @param [out] cursor Cursor * * Prepare to read sequentially every key in the specified key table. Use * krb5_kt_end_seq_get() to release the cursor when it is no longer needed. * * @sa krb5_kt_next_entry(), krb5_kt_end_seq_get() * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab, krb5_kt_cursor *cursor); /** * Retrieve the next entry from the key table. * * @param [in] context Library context * @param [in] keytab Key table handle * @param [out] entry Returned key table entry * @param [in] cursor Key table cursor * * Return the next sequential entry in @a keytab and advance @a cursor. * Callers must release the returned entry with krb5_kt_free_entry(). * * @sa krb5_kt_start_seq_get(), krb5_kt_end_seq_get() * * @retval * 0 Success * @retval * KRB5_KT_END - if the last entry was reached * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_next_entry(krb5_context context, krb5_keytab keytab, krb5_keytab_entry *entry, krb5_kt_cursor *cursor); /** * Release a keytab cursor. * * @param [in] context Library context * @param [in] keytab Key table handle * @param [out] cursor Cursor * * This function should be called to release the cursor created by * krb5_kt_start_seq_get(). * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab, krb5_kt_cursor *cursor); /** * Check if a keytab exists and contains entries. * * @param [in] context Library context * @param [in] keytab Key table handle * * @version New in 1.11 * * @retval 0 Keytab exists and contains entries * @retval KRB5_KT_NOTFOUND Keytab does not contain entries */ krb5_error_code KRB5_CALLCONV krb5_kt_have_content(krb5_context context, krb5_keytab keytab); /* * end "keytab.h" */ /* * begin "func-proto.h" */ #define KRB5_INIT_CONTEXT_SECURE 0x1 /**< Use secure context configuration */ #define KRB5_INIT_CONTEXT_KDC 0x2 /**< Use KDC configuration if available */ /** * Create a krb5 library context. * * @param [out] context Library context * * The @a context must be released by calling krb5_free_context() when * it is no longer needed. * * @warning Any program or module that needs the Kerberos code to not trust the * environment must use krb5_init_secure_context(), or clean out the * environment. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_context(krb5_context *context); /** * Create a krb5 library context using only configuration files. * * @param [out] context Library context * * Create a context structure, using only system configuration files. All * information passed through the environment variables is ignored. * * The @a context must be released by calling krb5_free_context() when * it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_secure_context(krb5_context *context); /** * Create a krb5 library context using a specified profile. * * @param [in] profile Profile object (NULL to create default profile) * @param [in] flags Context initialization flags * @param [out] context Library context * * Create a context structure, optionally using a specified profile and * initialization flags. If @a profile is NULL, the default profile will be * created from config files. If @a profile is non-null, a copy of it will be * made for the new context; the caller should still clean up its copy. Valid * flag values are: * * @li #KRB5_INIT_CONTEXT_SECURE Ignore environment variables * @li #KRB5_INIT_CONTEXT_KDC Use KDC configuration if creating profile */ krb5_error_code KRB5_CALLCONV krb5_init_context_profile(struct _profile_t *profile, krb5_flags flags, krb5_context *context); /** * Free a krb5 library context. * * @param [in] context Library context * * This function frees a @a context that was created by krb5_init_context() * or krb5_init_secure_context(). */ void KRB5_CALLCONV krb5_free_context(krb5_context context); /** * Copy a krb5_context structure. * * @param [in] ctx Library context * @param [out] nctx_out New context structure * * The newly created context must be released by calling krb5_free_context() * when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_context(krb5_context ctx, krb5_context *nctx_out); /** * Set default TGS encryption types in a krb5_context structure. * * @param [in] context Library context * @param [in] etypes Encryption type(s) to set * * This function sets the default enctype list for TGS requests * made using @a context to @a etypes. * * @note This overrides the default list (from config file or built-in). * * @retval * 0 Success * @retval * KRB5_PROG_ETYPE_NOSUPP Program lacks support for encryption type * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_set_default_tgs_enctypes(krb5_context context, const krb5_enctype *etypes); /** * Return a list of encryption types permitted for session keys. * * @param [in] context Library context * @param [out] ktypes Zero-terminated list of encryption types * * This function returns the list of encryption types permitted for session * keys within @a context, as determined by configuration or by a previous call * to krb5_set_default_tgs_enctypes(). * * Use krb5_free_enctypes() to free @a ktypes when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_permitted_enctypes(krb5_context context, krb5_enctype **ktypes); /** * Test whether the Kerberos library was built with multithread support. * * @retval * TRUE if the library is threadsafe; FALSE otherwise */ krb5_boolean KRB5_CALLCONV krb5_is_thread_safe(void); /* libkrb.spec */ /** * Decrypt a ticket using the specified key table. * * @param [in] context Library context * @param [in] kt Key table * @param [in] ticket Ticket to be decrypted * * This function takes a @a ticket as input and decrypts it using * key data from @a kt. The result is placed into @a ticket->enc_part2. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_server_decrypt_ticket_keytab(krb5_context context, const krb5_keytab kt, krb5_ticket *ticket); /** * Free an array of credential structures. * * @param [in] context Library context * @param [in] tgts Null-terminated array of credentials to free * * @note The last entry in the array @a tgts must be a NULL pointer. */ void KRB5_CALLCONV krb5_free_tgt_creds(krb5_context context, krb5_creds **tgts); /** @defgroup KRB5_GC KRB5_GC * @{ */ #define KRB5_GC_USER_USER 1 /**< Want user-user ticket */ #define KRB5_GC_CACHED 2 /**< Want cached ticket only */ #define KRB5_GC_CANONICALIZE 4 /**< Set canonicalize KDC option */ #define KRB5_GC_NO_STORE 8 /**< Do not store in credential cache */ #define KRB5_GC_FORWARDABLE 16 /**< Acquire forwardable tickets */ #define KRB5_GC_NO_TRANSIT_CHECK 32 /**< Disable transited check */ #define KRB5_GC_CONSTRAINED_DELEGATION 64 /**< Constrained delegation */ /** @} */ /* end of KRB5_GC group */ /** * Get an additional ticket. * * @param [in] context Library context * @param [in] options Options * @param [in] ccache Credential cache handle * @param [in] in_creds Input credentials * @param [out] out_creds Output updated credentials * * Use @a ccache or a TGS exchange to get a service ticket matching @a * in_creds. * * Valid values for @a options are: * @li #KRB5_GC_CACHED Search only credential cache for the ticket * @li #KRB5_GC_USER_USER Return a user to user authentication ticket * * @a in_creds must be non-null. @a in_creds->client and @a in_creds->server * must be filled in to specify the client and the server respectively. If any * authorization data needs to be requested for the service ticket (such as * restrictions on how the ticket can be used), specify it in @a * in_creds->authdata; otherwise set @a in_creds->authdata to NULL. The * session key type is specified in @a in_creds->keyblock.enctype, if it is * nonzero. * * The expiration date is specified in @a in_creds->times.endtime. * The KDC may return tickets with an earlier expiration date. * If @a in_creds->times.endtime is set to 0, the latest possible * expiration date will be requested. * * Any returned ticket and intermediate ticket-granting tickets are stored * in @a ccache. * * Use krb5_free_creds() to free @a out_creds when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_credentials(krb5_context context, krb5_flags options, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds); /** * Serialize a @c krb5_creds object. * * @param [in] context Library context * @param [in] creds The credentials object to serialize * @param [out] data_out The serialized credentials * * Serialize @a creds in the format used by the FILE ccache format (vesion 4) * and KCM ccache protocol. * * Use krb5_free_data() to free @a data_out when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_marshal_credentials(krb5_context context, krb5_creds *in_creds, krb5_data **data_out); /** * Deserialize a @c krb5_creds object. * * @param [in] context Library context * @param [in] data The serialized credentials * @param [out] creds_out The resulting creds object * * Deserialize @a data to credentials in the format used by the FILE ccache * format (vesion 4) and KCM ccache protocol. * * Use krb5_free_creds() to free @a creds_out when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_unmarshal_credentials(krb5_context context, const krb5_data *data, krb5_creds **creds_out); /** @deprecated Replaced by krb5_get_validated_creds. */ krb5_error_code KRB5_CALLCONV krb5_get_credentials_validate(krb5_context context, krb5_flags options, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds); /** @deprecated Replaced by krb5_get_renewed_creds. */ krb5_error_code KRB5_CALLCONV krb5_get_credentials_renew(krb5_context context, krb5_flags options, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds); /** * Create a @c KRB_AP_REQ message. * * @param [in] context Library context * @param [in,out] auth_context Pre-existing or newly created auth context * @param [in] ap_req_options @ref AP_OPTS options * @param [in] service Service name, or NULL to use @c "host" * @param [in] hostname Host name, or NULL to use local hostname * @param [in] in_data Application data to be checksummed in the * authenticator, or NULL * @param [in] ccache Credential cache used to obtain credentials * for the desired service. * @param [out] outbuf @c AP-REQ message * * This function is similar to krb5_mk_req_extended() except that it uses a * given @a hostname, @a service, and @a ccache to construct a service * principal name and obtain credentials. * * Use krb5_free_data_contents() to free @a outbuf when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_req(krb5_context context, krb5_auth_context *auth_context, krb5_flags ap_req_options, const char *service, const char *hostname, krb5_data *in_data, krb5_ccache ccache, krb5_data *outbuf); /** * Create a @c KRB_AP_REQ message using supplied credentials. * * @param [in] context Library context * @param [in,out] auth_context Pre-existing or newly created auth context * @param [in] ap_req_options @ref AP_OPTS options * @param [in] in_data Application data to be checksummed in the * authenticator, or NULL * @param [in] in_creds Credentials for the service with valid ticket * and key * @param [out] outbuf @c AP-REQ message * * Valid @a ap_req_options are: * @li #AP_OPTS_USE_SESSION_KEY - Use the session key when creating the * request used for user to user * authentication. * @li #AP_OPTS_MUTUAL_REQUIRED - Request a mutual authentication packet from * the receiver. * @li #AP_OPTS_USE_SUBKEY - Generate a subsession key from the current * session key obtained from the credentials. * * This function creates a KRB_AP_REQ message using supplied credentials @a * in_creds. @a auth_context may point to an existing auth context or to NULL, * in which case a new one will be created. If @a in_data is non-null, a * checksum of it will be included in the authenticator contained in the * KRB_AP_REQ message. Use krb5_free_data_contents() to free @a outbuf when it * is no longer needed. * * On successful return, the authenticator is stored in @a auth_context with * the @a client and @a checksum fields nulled out. (This is to prevent * pointer-sharing problems; the caller should not need these fields anyway, * since the caller supplied them.) * * @sa krb5_mk_req() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_req_extended(krb5_context context, krb5_auth_context *auth_context, krb5_flags ap_req_options, krb5_data *in_data, krb5_creds *in_creds, krb5_data *outbuf); /** * Format and encrypt a @c KRB_AP_REP message. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] outbuf @c AP-REP message * * This function fills in @a outbuf with an AP-REP message using information * from @a auth_context. * * If the flags in @a auth_context indicate that a sequence number should be * used (either #KRB5_AUTH_CONTEXT_DO_SEQUENCE or * #KRB5_AUTH_CONTEXT_RET_SEQUENCE) and the local sequence number in @a * auth_context is 0, a new number will be generated with * krb5_generate_seq_number(). * * Use krb5_free_data_contents() to free @a outbuf when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_rep(krb5_context context, krb5_auth_context auth_context, krb5_data *outbuf); /** * Format and encrypt a @c KRB_AP_REP message for DCE RPC. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] outbuf @c AP-REP message * * Use krb5_free_data_contents() to free @a outbuf when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_rep_dce(krb5_context context, krb5_auth_context auth_context, krb5_data *outbuf); /** * Parse and decrypt a @c KRB_AP_REP message. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] inbuf AP-REP message * @param [out] repl Decrypted reply message * * This function parses, decrypts and verifies a message from @a inbuf and * fills in @a repl with a pointer to allocated memory containing the fields * from the encrypted response. * * Use krb5_free_ap_rep_enc_part() to free @a repl when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_rd_rep(krb5_context context, krb5_auth_context auth_context, const krb5_data *inbuf, krb5_ap_rep_enc_part **repl); /** * Parse and decrypt a @c KRB_AP_REP message for DCE RPC. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] inbuf AP-REP message * @param [out] nonce Sequence number from the decrypted reply * * This function parses, decrypts and verifies a message from @a inbuf and * fills in @a nonce with a decrypted reply sequence number. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_rd_rep_dce(krb5_context context, krb5_auth_context auth_context, const krb5_data *inbuf, krb5_ui_4 *nonce); /** * Format and encode a @c KRB_ERROR message. * * @param [in] context Library context * @param [in] dec_err Error structure to be encoded * @param [out] enc_err Encoded error structure * * This function creates a @c KRB_ERROR message in @a enc_err. Use * krb5_free_data_contents() to free @a enc_err when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_error(krb5_context context, const krb5_error *dec_err, krb5_data *enc_err); /** * Decode a @c KRB-ERROR message. * * @param [in] context Library context * @param [in] enc_errbuf Encoded error message * @param [out] dec_error Decoded error message * * This function processes @c KRB-ERROR message @a enc_errbuf and returns * an allocated structure @a dec_error containing the error message. * Use krb5_free_error() to free @a dec_error when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_rd_error(krb5_context context, const krb5_data *enc_errbuf, krb5_error **dec_error); /** * Process @c KRB-SAFE message. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] inbuf @c KRB-SAFE message to be parsed * @param [out] userdata_out Data parsed from @c KRB-SAFE message * @param [out] rdata_out Replay data. Specify NULL if not needed * * This function parses a @c KRB-SAFE message, verifies its integrity, and * stores its data into @a userdata_out. * * @note The @a rdata_out argument is required if the * #KRB5_AUTH_CONTEXT_RET_TIME or #KRB5_AUTH_CONTEXT_RET_SEQUENCE flag is set * in @a auth_context. * * If @a auth_context has a remote address set, the address will be used to * verify the sender address in the KRB-SAFE message. If @a auth_context has a * local address set, it will be used to verify the receiver address in the * KRB-SAFE message if the message contains one. * * If the #KRB5_AUTH_CONTEXT_DO_SEQUENCE flag is set in @a auth_context, the * sequence number of the KRB-SAFE message is checked against the remote * sequence number field of @a auth_context. Otherwise, the sequence number is * not used. * * If the #KRB5_AUTH_CONTEXT_DO_TIME flag is set in @a auth_context, then the * timestamp in the message is verified to be within the permitted clock skew * of the current time, and the message is checked against an in-memory replay * cache to detect reflections or replays. * * Use krb5_free_data_contents() to free @a userdata_out when it is no longer * needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_rd_safe(krb5_context context, krb5_auth_context auth_context, const krb5_data *inbuf, krb5_data *userdata_out, krb5_replay_data *rdata_out); /** * Process a @c KRB-PRIV message. * * @param [in] context Library context * @param [in] auth_context Authentication structure * @param [in] inbuf @c KRB-PRIV message to be parsed * @param [out] userdata_out Data parsed from @c KRB-PRIV message * @param [out] rdata_out Replay data. Specify NULL if not needed * * This function parses a @c KRB-PRIV message, verifies its integrity, and * stores its unencrypted data into @a userdata_out. * * @note The @a rdata_out argument is required if the * #KRB5_AUTH_CONTEXT_RET_TIME or #KRB5_AUTH_CONTEXT_RET_SEQUENCE flag is set * in @a auth_context. * * If @a auth_context has a remote address set, the address will be used to * verify the sender address in the KRB-PRIV message. If @a auth_context has a * local address set, it will be used to verify the receiver address in the * KRB-PRIV message if the message contains one. * * If the #KRB5_AUTH_CONTEXT_DO_SEQUENCE flag is set in @a auth_context, the * sequence number of the KRB-PRIV message is checked against the remote * sequence number field of @a auth_context. Otherwise, the sequence number is * not used. * * If the #KRB5_AUTH_CONTEXT_DO_TIME flag is set in @a auth_context, then the * timestamp in the message is verified to be within the permitted clock skew * of the current time, and the message is checked against an in-memory replay * cache to detect reflections or replays. * * Use krb5_free_data_contents() to free @a userdata_out when it is no longer * needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_rd_priv(krb5_context context, krb5_auth_context auth_context, const krb5_data *inbuf, krb5_data *userdata_out, krb5_replay_data *rdata_out); /** * Convert a string principal name to a krb5_principal structure. * * @param [in] context Library context * @param [in] name String representation of a principal name * @param [out] principal_out New principal * * Convert a string representation of a principal name to a krb5_principal * structure. * * A string representation of a Kerberos name consists of one or more principal * name components, separated by slashes, optionally followed by the \@ * character and a realm name. If the realm name is not specified, the local * realm is used. * * To use the slash and \@ symbols as part of a component (quoted) instead of * using them as a component separator or as a realm prefix), put a backslash * (\) character in front of the symbol. Similarly, newline, tab, backspace, * and NULL characters can be included in a component by using @c n, @c t, @c b * or @c 0, respectively. * * @note The realm in a Kerberos @a name cannot contain slash, colon, * or NULL characters. * * Use krb5_free_principal() to free @a principal_out when it is no longer * needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_parse_name(krb5_context context, const char *name, krb5_principal *principal_out); #define KRB5_PRINCIPAL_PARSE_NO_REALM 0x1 /**< Error if realm is present */ #define KRB5_PRINCIPAL_PARSE_REQUIRE_REALM 0x2 /**< Error if realm is not present */ #define KRB5_PRINCIPAL_PARSE_ENTERPRISE 0x4 /**< Create single-component enterprise principle */ #define KRB5_PRINCIPAL_PARSE_IGNORE_REALM 0x8 /**< Ignore realm if present */ /** * Convert a string principal name to a krb5_principal with flags. * * @param [in] context Library context * @param [in] name String representation of a principal name * @param [in] flags Flag * @param [out] principal_out New principal * * Similar to krb5_parse_name(), this function converts a single-string * representation of a principal name to a krb5_principal structure. * * The following flags are valid: * @li #KRB5_PRINCIPAL_PARSE_NO_REALM - no realm must be present in @a name * @li #KRB5_PRINCIPAL_PARSE_REQUIRE_REALM - realm must be present in @a name * @li #KRB5_PRINCIPAL_PARSE_ENTERPRISE - create single-component enterprise * principal * @li #KRB5_PRINCIPAL_PARSE_IGNORE_REALM - ignore realm if present in @a name * * If @c KRB5_PRINCIPAL_PARSE_NO_REALM or @c KRB5_PRINCIPAL_PARSE_IGNORE_REALM * is specified in @a flags, the realm of the new principal will be empty. * Otherwise, the default realm for @a context will be used if @a name does not * specify a realm. * * Use krb5_free_principal() to free @a principal_out when it is no longer * needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_parse_name_flags(krb5_context context, const char *name, int flags, krb5_principal *principal_out); /** * Convert a krb5_principal structure to a string representation. * * @param [in] context Library context * @param [in] principal Principal * @param [out] name String representation of principal name * * The resulting string representation uses the format and quoting conventions * described for krb5_parse_name(). * * Use krb5_free_unparsed_name() to free @a name when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_unparse_name(krb5_context context, krb5_const_principal principal, char **name); /** * Convert krb5_principal structure to string and length. * * @param [in] context Library context * @param [in] principal Principal * @param [in,out] name String representation of principal name * @param [in,out] size Size of unparsed name * * This function is similar to krb5_unparse_name(), but allows the use of an * existing buffer for the result. If size is not NULL, then @a name must * point to either NULL or an existing buffer of at least the size pointed to * by @a size. The buffer will be allocated or resized if necessary, with the * new pointer stored into @a name. Whether or not the buffer is resized, the * necessary space for the result, including null terminator, will be stored * into @a size. * * If size is NULL, this function behaves exactly as krb5_unparse_name(). * * @retval * 0 Success * @return * Kerberos error codes. On failure @a name is set to NULL */ krb5_error_code KRB5_CALLCONV krb5_unparse_name_ext(krb5_context context, krb5_const_principal principal, char **name, unsigned int *size); #define KRB5_PRINCIPAL_UNPARSE_SHORT 0x1 /**< Omit realm if it is the local realm */ #define KRB5_PRINCIPAL_UNPARSE_NO_REALM 0x2 /**< Omit realm always */ #define KRB5_PRINCIPAL_UNPARSE_DISPLAY 0x4 /**< Don't escape special characters */ /** * Convert krb5_principal structure to a string with flags. * * @param [in] context Library context * @param [in] principal Principal * @param [in] flags Flags * @param [out] name String representation of principal name * * Similar to krb5_unparse_name(), this function converts a krb5_principal * structure to a string representation. * * The following flags are valid: * @li #KRB5_PRINCIPAL_UNPARSE_SHORT - omit realm if it is the local realm * @li #KRB5_PRINCIPAL_UNPARSE_NO_REALM - omit realm * @li #KRB5_PRINCIPAL_UNPARSE_DISPLAY - do not quote special characters * * Use krb5_free_unparsed_name() to free @a name when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes. On failure @a name is set to NULL */ krb5_error_code KRB5_CALLCONV krb5_unparse_name_flags(krb5_context context, krb5_const_principal principal, int flags, char **name); /** * Convert krb5_principal structure to string format with flags. * * @param [in] context Library context * @param [in] principal Principal * @param [in] flags Flags * @param [out] name Single string format of principal name * @param [out] size Size of unparsed name buffer * * @sa krb5_unparse_name() krb5_unparse_name_flags() krb5_unparse_name_ext() * * @retval * 0 Success * @return * Kerberos error codes. On failure @a name is set to NULL */ krb5_error_code KRB5_CALLCONV krb5_unparse_name_flags_ext(krb5_context context, krb5_const_principal principal, int flags, char **name, unsigned int *size); /** * Set the realm field of a principal * * @param [in] context Library context * @param [in] principal Principal name * @param [in] realm Realm name * * Set the realm name part of @a principal to @a realm, overwriting the * previous realm. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_set_principal_realm(krb5_context context, krb5_principal principal, const char *realm); /** * Search a list of addresses for a specified address. * * @param [in] context Library context * @param [in] addr Address to search for * @param [in] addrlist Address list to be searched (or NULL) * * @note If @a addrlist contains only a NetBIOS addresses, it will be treated * as a null list. * * @return * TRUE if @a addr is listed in @a addrlist, or @c addrlist is NULL; FALSE * otherwise */ krb5_boolean KRB5_CALLCONV_WRONG krb5_address_search(krb5_context context, const krb5_address *addr, krb5_address *const *addrlist); /** * Compare two Kerberos addresses. * * @param [in] context Library context * @param [in] addr1 First address to be compared * @param [in] addr2 Second address to be compared * * @return * TRUE if the addresses are the same, FALSE otherwise */ krb5_boolean KRB5_CALLCONV krb5_address_compare(krb5_context context, const krb5_address *addr1, const krb5_address *addr2); /** * Return an ordering of the specified addresses. * * @param [in] context Library context * @param [in] addr1 First address * @param [in] addr2 Second address * * @retval * 0 The two addresses are the same * @retval * \< 0 First address is less than second * @retval * \> 0 First address is greater than second */ int KRB5_CALLCONV krb5_address_order(krb5_context context, const krb5_address *addr1, const krb5_address *addr2); /** * Compare the realms of two principals. * * @param [in] context Library context * @param [in] princ1 First principal * @param [in] princ2 Second principal * * @retval * TRUE if the realm names are the same; FALSE otherwise */ krb5_boolean KRB5_CALLCONV krb5_realm_compare(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2); /** * Compare two principals. * * @param [in] context Library context * @param [in] princ1 First principal * @param [in] princ2 Second principal * * @retval * TRUE if the principals are the same; FALSE otherwise */ krb5_boolean KRB5_CALLCONV krb5_principal_compare(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2); /** * Compare two principals ignoring realm components. * * @param [in] context Library context * @param [in] princ1 First principal * @param [in] princ2 Second principal * * Similar to krb5_principal_compare(), but do not compare the realm * components of the principals. * * @retval * TRUE if the principals are the same; FALSE otherwise */ krb5_boolean KRB5_CALLCONV krb5_principal_compare_any_realm(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2); #define KRB5_PRINCIPAL_COMPARE_IGNORE_REALM 1 /**< ignore realm component */ #define KRB5_PRINCIPAL_COMPARE_ENTERPRISE 2 /**< UPNs as real principals */ #define KRB5_PRINCIPAL_COMPARE_CASEFOLD 4 /**< case-insensitive */ #define KRB5_PRINCIPAL_COMPARE_UTF8 8 /**< treat principals as UTF-8 */ /** * Compare two principals with additional flags. * * @param [in] context Library context * @param [in] princ1 First principal * @param [in] princ2 Second principal * @param [in] flags Flags * * Valid flags are: * @li #KRB5_PRINCIPAL_COMPARE_IGNORE_REALM - ignore realm component * @li #KRB5_PRINCIPAL_COMPARE_ENTERPRISE - UPNs as real principals * @li #KRB5_PRINCIPAL_COMPARE_CASEFOLD case-insensitive * @li #KRB5_PRINCIPAL_COMPARE_UTF8 - treat principals as UTF-8 * * @sa krb5_principal_compare() * * @retval * TRUE if the principal names are the same; FALSE otherwise */ krb5_boolean KRB5_CALLCONV krb5_principal_compare_flags(krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2, int flags); /** * Initialize an empty @c krb5_keyblock. * * @param [in] context Library context * @param [in] enctype Encryption type * @param [in] length Length of keyblock (or 0) * @param [out] out New keyblock structure * * Initialize a new keyblock and allocate storage for the contents of the key. * It is legal to pass in a length of 0, in which case contents are left * unallocated. Use krb5_free_keyblock() to free @a out when it is no longer * needed. * * @note If @a length is set to 0, contents are left unallocated. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_keyblock(krb5_context context, krb5_enctype enctype, size_t length, krb5_keyblock **out); /** * Copy a keyblock. * * @param [in] context Library context * @param [in] from Keyblock to be copied * @param [out] to Copy of keyblock @a from * * This function creates a new keyblock with the same contents as @a from. Use * krb5_free_keyblock() to free @a to when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_keyblock(krb5_context context, const krb5_keyblock *from, krb5_keyblock **to); /** * Copy the contents of a keyblock. * * @param [in] context Library context * @param [in] from Key to be copied * @param [out] to Output key * * This function copies the contents of @a from to @a to. Use * krb5_free_keyblock_contents() to free @a to when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_contents(krb5_context context, const krb5_keyblock *from, krb5_keyblock *to); /** * Copy a krb5_creds structure. * * @param [in] context Library context * @param [in] incred Credentials structure to be copied * @param [out] outcred Copy of @a incred * * This function creates a new credential with the contents of @a incred. Use * krb5_free_creds() to free @a outcred when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_creds(krb5_context context, const krb5_creds *incred, krb5_creds **outcred); /** * Copy a krb5_data object. * * @param [in] context Library context * @param [in] indata Data object to be copied * @param [out] outdata Copy of @a indata * * This function creates a new krb5_data object with the contents of @a indata. * Use krb5_free_data() to free @a outdata when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_data(krb5_context context, const krb5_data *indata, krb5_data **outdata); /** * Copy a principal. * * @param [in] context Library context * @param [in] inprinc Principal to be copied * @param [out] outprinc Copy of @a inprinc * * This function creates a new principal structure with the contents of @a * inprinc. Use krb5_free_principal() to free @a outprinc when it is no longer * needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_principal(krb5_context context, krb5_const_principal inprinc, krb5_principal *outprinc); /** * Copy an array of addresses. * * @param [in] context Library context * @param [in] inaddr Array of addresses to be copied * @param [out] outaddr Copy of array of addresses * * This function creates a new address array containing a copy of @a inaddr. * Use krb5_free_addresses() to free @a outaddr when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_addresses(krb5_context context, krb5_address *const *inaddr, krb5_address ***outaddr); /** * Copy a krb5_ticket structure. * * @param [in] context Library context * @param [in] from Ticket to be copied * @param [out] pto Copy of ticket * * This function creates a new krb5_ticket structure containing the contents of * @a from. Use krb5_free_ticket() to free @a pto when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_ticket(krb5_context context, const krb5_ticket *from, krb5_ticket **pto); /** * Copy an authorization data list. * * @param [in] context Library context * @param [in] in_authdat List of @a krb5_authdata structures * @param [out] out New array of @a krb5_authdata structures * * This function creates a new authorization data list containing a copy of @a * in_authdat, which must be null-terminated. Use krb5_free_authdata() to free * @a out when it is no longer needed. * * @note The last array entry in @a in_authdat must be a NULL pointer. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_authdata(krb5_context context, krb5_authdata *const *in_authdat, krb5_authdata ***out); /** * Find authorization data elements. * * @param [in] context Library context * @param [in] ticket_authdata Authorization data list from ticket * @param [in] ap_req_authdata Authorization data list from AP request * @param [in] ad_type Authorization data type to find * @param [out] results List of matching entries * * This function searches @a ticket_authdata and @a ap_req_authdata for * elements of type @a ad_type. Either input list may be NULL, in which case * it will not be searched; otherwise, the input lists must be terminated by * NULL entries. This function will search inside AD-IF-RELEVANT containers if * found in either list. Use krb5_free_authdata() to free @a results when it * is no longer needed. * * @version New in 1.10 */ krb5_error_code KRB5_CALLCONV krb5_find_authdata(krb5_context context, krb5_authdata *const *ticket_authdata, krb5_authdata *const *ap_req_authdata, krb5_authdatatype ad_type, krb5_authdata ***results); /** * Merge two authorization data lists into a new list. * * @param [in] context Library context * @param [in] inauthdat1 First list of @a krb5_authdata structures * @param [in] inauthdat2 Second list of @a krb5_authdata structures * @param [out] outauthdat Merged list of @a krb5_authdata structures * * Merge two authdata arrays, such as the array from a ticket * and authenticator. * Use krb5_free_authdata() to free @a outauthdat when it is no longer needed. * * @note The last array entry in @a inauthdat1 and @a inauthdat2 * must be a NULL pointer. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_merge_authdata(krb5_context context, krb5_authdata *const *inauthdat1, krb5_authdata * const *inauthdat2, krb5_authdata ***outauthdat); /** * Copy a krb5_authenticator structure. * * @param [in] context Library context * @param [in] authfrom krb5_authenticator structure to be copied * @param [out] authto Copy of krb5_authenticator structure * * This function creates a new krb5_authenticator structure with the content of * @a authfrom. Use krb5_free_authenticator() to free @a authto when it is no * longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_authenticator(krb5_context context, const krb5_authenticator *authfrom, krb5_authenticator **authto); /** * Copy a krb5_checksum structure. * * @param [in] context Library context * @param [in] ckfrom Checksum to be copied * @param [out] ckto Copy of krb5_checksum structure * * This function creates a new krb5_checksum structure with the contents of @a * ckfrom. Use krb5_free_checksum() to free @a ckto when it is no longer * needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_copy_checksum(krb5_context context, const krb5_checksum *ckfrom, krb5_checksum **ckto); /** * Generate a replay cache object for server use and open it. * * @param [in] context Library context * @param [in] piece Unused (replay cache identifier) * @param [out] rcptr Handle to an open rcache * * This function creates a handle to the default replay cache. Use * krb5_rc_close() to close @a rcptr when it is no longer needed. * * @version Prior to release 1.18, this function creates a handle to a * different replay cache for each unique value of @a piece. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_server_rcache(krb5_context context, const krb5_data *piece, krb5_rcache *rcptr); /** * Build a principal name using length-counted strings. * * @param [in] context Library context * @param [out] princ Principal name * @param [in] rlen Realm name length * @param [in] realm Realm name * @param [in] ... List of unsigned int/char * components, followed by 0 * * This function creates a principal from a length-counted string and a * variable-length list of length-counted components. The list of components * ends with the first 0 length argument (so it is not possible to specify an * empty component with this function). Call krb5_free_principal() to free * allocated memory for principal when it is no longer needed. * * @code * Example of how to build principal WELLKNOWN/ANONYMOUS@R * krb5_build_principal_ext(context, &principal, strlen("R"), "R", * (unsigned int)strlen(KRB5_WELLKNOWN_NAMESTR), * KRB5_WELLKNOWN_NAMESTR, * (unsigned int)strlen(KRB5_ANONYMOUS_PRINCSTR), * KRB5_ANONYMOUS_PRINCSTR, 0); * @endcode * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV_C krb5_build_principal_ext(krb5_context context, krb5_principal * princ, unsigned int rlen, const char * realm, ...); /** * Build a principal name using null-terminated strings. * * @param [in] context Library context * @param [out] princ Principal name * @param [in] rlen Realm name length * @param [in] realm Realm name * @param [in] ... List of char * components, ending with NULL * * Call krb5_free_principal() to free @a princ when it is no longer needed. * * @note krb5_build_principal() and krb5_build_principal_alloc_va() perform the * same task. krb5_build_principal() takes variadic arguments. * krb5_build_principal_alloc_va() takes a pre-computed @a varargs pointer. * * @code * Example of how to build principal H/S@R * krb5_build_principal(context, &principal, * strlen("R"), "R", "H", "S", (char*)NULL); * @endcode * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV_C krb5_build_principal(krb5_context context, krb5_principal * princ, unsigned int rlen, const char * realm, ...) #if __GNUC__ >= 4 __attribute__ ((sentinel)) #endif ; #if KRB5_DEPRECATED /** @deprecated Replaced by krb5_build_principal_alloc_va(). */ KRB5_ATTR_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_build_principal_va(krb5_context context, krb5_principal princ, unsigned int rlen, const char *realm, va_list ap); #endif /** * Build a principal name, using a precomputed variable argument list * * @param [in] context Library context * @param [out] princ Principal structure * @param [in] rlen Realm name length * @param [in] realm Realm name * @param [in] ap List of char * components, ending with NULL * * Similar to krb5_build_principal(), this function builds a principal name, * but its name components are specified as a va_list. * * Use krb5_free_principal() to deallocate @a princ when it is no longer * needed. * * @code * Function usage example: * va_list ap; * va_start(ap, realm); * krb5_build_principal_alloc_va(context, princ, rlen, realm, ap); * va_end(ap); * @endcode * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_build_principal_alloc_va(krb5_context context, krb5_principal *princ, unsigned int rlen, const char *realm, va_list ap); /** * Convert a Kerberos V4 principal to a Kerberos V5 principal. * * @param [in] context Library context * @param [in] name V4 name * @param [in] instance V4 instance * @param [in] realm Realm * @param [out] princ V5 principal * * This function builds a @a princ from V4 specification based on given input * @a name.instance\@realm. * * Use krb5_free_principal() to free @a princ when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_425_conv_principal(krb5_context context, const char *name, const char *instance, const char *realm, krb5_principal *princ); /** * Convert a Kerberos V5 principal to a Kerberos V4 principal. * * @param [in] context Library context * @param [in] princ V5 Principal * @param [out] name V4 principal's name to be filled in * @param [out] inst V4 principal's instance name to be filled in * @param [out] realm Principal's realm name to be filled in * * This function separates a V5 principal @a princ into @a name, @a instance, * and @a realm. * * @retval * 0 Success * @retval * KRB5_INVALID_PRINCIPAL Invalid principal name * @retval * KRB5_CONFIG_CANTOPEN Can't open or find Kerberos configuration file * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_524_conv_principal(krb5_context context, krb5_const_principal princ, char *name, char *inst, char *realm); /** *@deprecated */ struct credentials; /** * Convert a Kerberos V5 credentials to a Kerberos V4 credentials * * @note Not implemented * * @retval KRB524_KRB4_DISABLED (always) */ int KRB5_CALLCONV krb5_524_convert_creds(krb5_context context, krb5_creds *v5creds, struct credentials *v4creds); #if KRB5_DEPRECATED #define krb524_convert_creds_kdc krb5_524_convert_creds #define krb524_init_ets(x) (0) #endif /* libkt.spec */ /** * Get a handle for a key table. * * @param [in] context Library context * @param [in] name Name of the key table * @param [out] ktid Key table handle * * Resolve the key table name @a name and set @a ktid to a handle identifying * the key table. Use krb5_kt_close() to free @a ktid when it is no longer * needed. * * @a name must be of the form @c type:residual, where @a type must be a type * known to the library and @a residual portion should be specific to the * particular keytab type. If no @a type is given, the default is @c FILE. * * If @a name is of type @c FILE, the keytab file is not opened by this call. * * @code * Example: krb5_kt_resolve(context, "FILE:/tmp/filename", &ktid); * @endcode * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_resolve(krb5_context context, const char *name, krb5_keytab *ktid); /** * Duplicate keytab handle. * * @param [in] context Library context * @param [in] in Key table handle to be duplicated * @param [out] out Key table handle * * Create a new handle referring to the same key table as @a in. The new * handle and @a in can be closed independently. * * @version New in 1.12 */ krb5_error_code KRB5_CALLCONV krb5_kt_dup(krb5_context context, krb5_keytab in, krb5_keytab *out); /** * Get the default key table name. * * @param [in] context Library context * @param [out] name Default key table name * @param [in] name_size Space available in @a name * * Fill @a name with the name of the default key table for @a context. * * @sa MAX_KEYTAB_NAME_LEN * * @retval * 0 Success * @retval * KRB5_CONFIG_NOTENUFSPACE Buffer is too short * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_default_name(krb5_context context, char *name, int name_size); /** * Resolve the default key table. * * @param [in] context Library context * @param [out] id Key table handle * * Set @a id to a handle to the default key table. The key table is not * opened. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_default(krb5_context context, krb5_keytab *id); /** * Resolve the default client key table. * * @param [in] context Library context * @param [out] keytab_out Key table handle * * Fill @a keytab_out with a handle to the default client key table. * * @version New in 1.11 * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_client_default(krb5_context context, krb5_keytab *keytab_out); /** * Free the contents of a key table entry. * * @param [in] context Library context * @param [in] entry Key table entry whose contents are to be freed * * @note The pointer is not freed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_free_keytab_entry_contents(krb5_context context, krb5_keytab_entry *entry); /** @deprecated Use krb5_free_keytab_entry_contents instead. */ krb5_error_code KRB5_CALLCONV krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *entry); /* remove and add are functions, so that they can return NOWRITE if not a writable keytab */ /** * Remove an entry from a key table. * * @param [in] context Library context * @param [in] id Key table handle * @param [in] entry Entry to remove from key table * * @retval * 0 Success * @retval * KRB5_KT_NOWRITE Key table is not writable * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_remove_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry); /** * Add a new entry to a key table. * * @param [in] context Library context * @param [in] id Key table handle * @param [in] entry Entry to be added * * @retval * 0 Success * @retval * ENOMEM Insufficient memory * @retval * KRB5_KT_NOWRITE Key table is not writeable * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_kt_add_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry); /** * Convert a principal name into the default salt for that principal. * * @param [in] context Library context * @param [in] pr Principal name * @param [out] ret Default salt for @a pr to be filled in * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV_WRONG krb5_principal2salt(krb5_context context, krb5_const_principal pr, krb5_data *ret); /* librc.spec--see rcache.h */ /* libcc.spec */ /** * Resolve a credential cache name. * * @param [in] context Library context * @param [in] name Credential cache name to be resolved * @param [out] cache Credential cache handle * * Fills in @a cache with a @a cache handle that corresponds to the name in @a * name. @a name should be of the form @c type:residual, and @a type must be a * type known to the library. If the @a name does not contain a colon, * interpret it as a file name. * * @code * Example: krb5_cc_resolve(context, "MEMORY:C_", &cache); * @endcode * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_resolve(krb5_context context, const char *name, krb5_ccache *cache); /** * Duplicate ccache handle. * * @param [in] context Library context * @param [in] in Credential cache handle to be duplicated * @param [out] out Credential cache handle * * Create a new handle referring to the same cache as @a in. * The new handle and @a in can be closed independently. */ krb5_error_code KRB5_CALLCONV krb5_cc_dup(krb5_context context, krb5_ccache in, krb5_ccache *out); /** * Return the name of the default credential cache. * * @param [in] context Library context * * Return a pointer to the default credential cache name for @a context, as * determined by a prior call to krb5_cc_set_default_name(), by the KRB5CCNAME * environment variable, by the default_ccache_name profile variable, or by the * operating system or build-time default value. The returned value must not * be modified or freed by the caller. The returned value becomes invalid when * @a context is destroyed krb5_free_context() or if a subsequent call to * krb5_cc_set_default_name() is made on @a context. * * The default credential cache name is cached in @a context between calls to * this function, so if the value of KRB5CCNAME changes in the process * environment after the first call to this function on, that change will not * be reflected in later calls with the same context. The caller can invoke * krb5_cc_set_default_name() with a NULL value of @a name to clear the cached * value and force the default name to be recomputed. * * @return * Name of default credential cache for the current user. */ const char *KRB5_CALLCONV krb5_cc_default_name(krb5_context context); /** * Set the default credential cache name. * * @param [in] context Library context * @param [in] name Default credential cache name or NULL * * Set the default credential cache name to @a name for future operations using * @a context. If @a name is NULL, clear any previous application-set default * name and forget any cached value of the default name for @a context. * * Calls to this function invalidate the result of any previous calls to * krb5_cc_default_name() using @a context. * * @retval * 0 Success * @retval * KV5M_CONTEXT Bad magic number for @c _krb5_context structure * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_set_default_name(krb5_context context, const char *name); /** * Resolve the default credential cache name. * * @param [in] context Library context * @param [out] ccache Pointer to credential cache name * * Create a handle to the default credential cache as given by * krb5_cc_default_name(). * * @retval * 0 Success * @retval * KV5M_CONTEXT Bad magic number for @c _krb5_context structure * @retval * KRB5_FCC_INTERNAL The name of the default credential cache cannot be * obtained * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_default(krb5_context context, krb5_ccache *ccache); /** * Copy a credential cache. * * @param [in] context Library context * @param [in] incc Credential cache to be copied * @param [out] outcc Copy of credential cache to be filled in * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_copy_creds(krb5_context context, krb5_ccache incc, krb5_ccache outcc); /** * Get a configuration value from a credential cache. * * @param [in] context Library context * @param [in] id Credential cache handle * @param [in] principal Configuration for this principal; * if NULL, global for the whole cache * @param [in] key Name of config variable * @param [out] data Data to be fetched * * Use krb5_free_data_contents() to free @a data when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_get_config(krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *key, krb5_data *data); /** * Store a configuration value in a credential cache. * * @param [in] context Library context * @param [in] id Credential cache handle * @param [in] principal Configuration for a specific principal; * if NULL, global for the whole cache * @param [in] key Name of config variable * @param [in] data Data to store, or NULL to remove * * @note Existing configuration under the same key is over-written. * * @warning Before version 1.10 @a data was assumed to be always non-null. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_set_config(krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *key, krb5_data *data); /** * Test whether a principal is a configuration principal. * * @param [in] context Library context * @param [in] principal Principal to check * * @return * @c TRUE if the principal is a configuration principal (generated part of * krb5_cc_set_config()); @c FALSE otherwise. */ krb5_boolean KRB5_CALLCONV krb5_is_config_principal(krb5_context context, krb5_const_principal principal); /** * Make a credential cache the primary cache for its collection. * * @param [in] context Library context * @param [in] cache Credential cache handle * * If the type of @a cache supports it, set @a cache to be the primary * credential cache for the collection it belongs to. * * @retval * 0 Success, or the type of @a cache doesn't support switching * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cc_switch(krb5_context context, krb5_ccache cache); /** * Determine whether a credential cache type supports switching. * * @param [in] context Library context * @param [in] type Credential cache type * * @version New in 1.10 * * @retval TRUE if @a type supports switching * @retval FALSE if it does not or is not a valid credential cache type. */ krb5_boolean KRB5_CALLCONV krb5_cc_support_switch(krb5_context context, const char *type); /** * Find a credential cache with a specified client principal. * * @param [in] context Library context * @param [in] client Client principal * @param [out] cache_out Credential cache handle * * Find a cache within the collection whose default principal is @a client. * Use @a krb5_cc_close to close @a ccache when it is no longer needed. * * @retval 0 Success * @retval KRB5_CC_NOTFOUND * * @sa krb5_cccol_cursor_new * * @version New in 1.10 */ krb5_error_code KRB5_CALLCONV krb5_cc_cache_match(krb5_context context, krb5_principal client, krb5_ccache *cache_out); /** * Select a credential cache to use with a server principal. * * @param [in] context Library context * @param [in] server Server principal * @param [out] cache_out Credential cache handle * @param [out] princ_out Client principal * * Select a cache within the collection containing credentials most appropriate * for use with @a server, according to configured rules and heuristics. * * Use krb5_cc_close() to release @a cache_out when it is no longer needed. * Use krb5_free_principal() to release @a princ_out when it is no longer * needed. Note that @a princ_out is set in some error conditions. * * @return * If an appropriate cache is found, 0 is returned, @a cache_out is set to the * selected cache, and @a princ_out is set to the default principal of that * cache. * * If the appropriate client principal can be authoritatively determined but * the cache collection contains no credentials for that principal, then * KRB5_CC_NOTFOUND is returned, @a cache_out is set to NULL, and @a princ_out * is set to the appropriate client principal. * * If no configured mechanism can determine the appropriate cache or principal, * KRB5_CC_NOTFOUND is returned and @a cache_out and @a princ_out are set to * NULL. * * Any other error code indicates a fatal error in the processing of a cache * selection mechanism. * * @version New in 1.10 */ krb5_error_code KRB5_CALLCONV krb5_cc_select(krb5_context context, krb5_principal server, krb5_ccache *cache_out, krb5_principal *princ_out); /* krb5_free.c */ /** * Free the storage assigned to a principal. * * @param [in] context Library context * @param [in] val Principal to be freed */ void KRB5_CALLCONV krb5_free_principal(krb5_context context, krb5_principal val); /** * Free a krb5_authenticator structure. * * @param [in] context Library context * @param [in] val Authenticator structure to be freed * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_authenticator(krb5_context context, krb5_authenticator *val); /** * Free the data stored in array of addresses. * * @param [in] context Library context * @param [in] val Array of addresses to be freed * * This function frees the contents of @a val and the array itself. * * @note The last entry in the array must be a NULL pointer. */ void KRB5_CALLCONV krb5_free_addresses(krb5_context context, krb5_address **val); /** * Free the storage assigned to array of authentication data. * * @param [in] context Library context * @param [in] val Array of authentication data to be freed * * This function frees the contents of @a val and the array itself. * * @note The last entry in the array must be a NULL pointer. */ void KRB5_CALLCONV krb5_free_authdata(krb5_context context, krb5_authdata **val); /** * Free a ticket. * * @param [in] context Library context * @param [in] val Ticket to be freed * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_ticket(krb5_context context, krb5_ticket *val); /** * Free an error allocated by krb5_read_error() or krb5_sendauth(). * * @param [in] context Library context * @param [in] val Error data structure to be freed * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_error(krb5_context context, krb5_error *val); /** * Free a krb5_creds structure. * * @param [in] context Library context * @param [in] val Credential structure to be freed. * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_creds(krb5_context context, krb5_creds *val); /** * Free the contents of a krb5_creds structure. * * @param [in] context Library context * @param [in] val Credential structure to free contents of * * This function frees the contents of @a val, but not the structure itself. */ void KRB5_CALLCONV krb5_free_cred_contents(krb5_context context, krb5_creds *val); /** * Free a krb5_checksum structure. * * @param [in] context Library context * @param [in] val Checksum structure to be freed * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_checksum(krb5_context context, krb5_checksum *val); /** * Free the contents of a krb5_checksum structure. * * @param [in] context Library context * @param [in] val Checksum structure to free contents of * * This function frees the contents of @a val, but not the structure itself. */ void KRB5_CALLCONV krb5_free_checksum_contents(krb5_context context, krb5_checksum *val); /** * Free a krb5_keyblock structure. * * @param [in] context Library context * @param [in] val Keyblock to be freed * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_keyblock(krb5_context context, krb5_keyblock *val); /** * Free the contents of a krb5_keyblock structure. * * @param [in] context Library context * @param [in] key Keyblock to be freed * * This function frees the contents of @a key, but not the structure itself. */ void KRB5_CALLCONV krb5_free_keyblock_contents(krb5_context context, krb5_keyblock *key); /** * Free a krb5_ap_rep_enc_part structure. * * @param [in] context Library context * @param [in] val AP-REP enc part to be freed * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_ap_rep_enc_part(krb5_context context, krb5_ap_rep_enc_part *val); /** * Free a krb5_data structure. * * @param [in] context Library context * @param [in] val Data structure to be freed * * This function frees the contents of @a val and the structure itself. */ void KRB5_CALLCONV krb5_free_data(krb5_context context, krb5_data *val); /* Free a krb5_octet_data structure (should be unused). */ void KRB5_CALLCONV krb5_free_octet_data(krb5_context context, krb5_octet_data *val); /** * Free the contents of a krb5_data structure and zero the data field. * * @param [in] context Library context * @param [in] val Data structure to free contents of * * This function frees the contents of @a val, but not the structure itself. */ void KRB5_CALLCONV krb5_free_data_contents(krb5_context context, krb5_data *val); /** * Free a string representation of a principal. * * @param [in] context Library context * @param [in] val Name string to be freed */ void KRB5_CALLCONV krb5_free_unparsed_name(krb5_context context, char *val); /** * Free a string allocated by a krb5 function. * * @param [in] context Library context * @param [in] val String to be freed * * @version New in 1.10 */ void KRB5_CALLCONV krb5_free_string(krb5_context context, char *val); /** * Free an array of encryption types. * * @param [in] context Library context * @param [in] val Array of enctypes to be freed * * @version New in 1.12 */ void KRB5_CALLCONV krb5_free_enctypes(krb5_context context, krb5_enctype *val); /** * Free an array of checksum types. * * @param [in] context Library context * @param [in] val Array of checksum types to be freed */ void KRB5_CALLCONV krb5_free_cksumtypes(krb5_context context, krb5_cksumtype *val); /* From krb5/os, but needed by the outside world */ /** * Retrieve the system time of day, in sec and ms, since the epoch. * * @param [in] context Library context * @param [out] seconds System timeofday, seconds portion * @param [out] microseconds System timeofday, microseconds portion * * This function retrieves the system time of day with the context * specific time offset adjustment. * * @sa krb5_crypto_us_timeofday() * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_us_timeofday(krb5_context context, krb5_timestamp *seconds, krb5_int32 *microseconds); /** * Retrieve the current time with context specific time offset adjustment. * * @param [in] context Library context * @param [out] timeret Timestamp to fill in * * This function retrieves the system time of day with the context specific * time offset adjustment. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_timeofday(krb5_context context, krb5_timestamp *timeret); /** * Check if a timestamp is within the allowed clock skew of the current time. * * @param [in] context Library context * @param [in] date Timestamp to check * * This function checks if @a date is close enough to the current time * according to the configured allowable clock skew. * * @version New in 1.10 * * @retval 0 Success * @retval KRB5KRB_AP_ERR_SKEW @a date is not within allowable clock skew */ krb5_error_code KRB5_CALLCONV krb5_check_clockskew(krb5_context context, krb5_timestamp date); /** * Return all interface addresses for this host. * * @param [in] context Library context * @param [out] addr Array of krb5_address pointers, ending with * NULL * * Use krb5_free_addresses() to free @a addr when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_os_localaddr(krb5_context context, krb5_address ***addr); /** * Retrieve the default realm. * * @param [in] context Library context * @param [out] lrealm Default realm name * * Retrieves the default realm to be used if no user-specified realm is * available. * * Use krb5_free_default_realm() to free @a lrealm when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_default_realm(krb5_context context, char **lrealm); /** * Override the default realm for the specified context. * * @param [in] context Library context * @param [in] lrealm Realm name for the default realm * * If @a lrealm is NULL, clear the default realm setting. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_set_default_realm(krb5_context context, const char *lrealm); /** * Free a default realm string returned by krb5_get_default_realm(). * * @param [in] context Library context * @param [in] lrealm Realm to be freed */ void KRB5_CALLCONV krb5_free_default_realm(krb5_context context, char *lrealm); /** * Canonicalize a hostname, possibly using name service. * * @param [in] context Library context * @param [in] host Input hostname * @param [out] canonhost_out Canonicalized hostname * * This function canonicalizes orig_hostname, possibly using name service * lookups if configuration permits. Use krb5_free_string() to free @a * canonhost_out when it is no longer needed. * * @version New in 1.15 */ krb5_error_code KRB5_CALLCONV krb5_expand_hostname(krb5_context context, const char *host, char **canonhost_out); /** * Generate a full principal name from a service name. * * @param [in] context Library context * @param [in] hostname Host name, or NULL to use local host * @param [in] sname Service name, or NULL to use @c "host" * @param [in] type Principal type * @param [out] ret_princ Generated principal * * This function converts a @a hostname and @a sname into @a krb5_principal * structure @a ret_princ. The returned principal will be of the form @a * sname\/hostname\@REALM where REALM is determined by krb5_get_host_realm(). * In some cases this may be the referral (empty) realm. * * The @a type can be one of the following: * * @li #KRB5_NT_SRV_HST canonicalizes the host name before looking up the * realm and generating the principal. * * @li #KRB5_NT_UNKNOWN accepts the hostname as given, and does not * canonicalize it. * * Use krb5_free_principal to free @a ret_princ when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_sname_to_principal(krb5_context context, const char *hostname, const char *sname, krb5_int32 type, krb5_principal *ret_princ); /** * Test whether a principal matches a matching principal. * * @param [in] context Library context * @param [in] matching Matching principal * @param [in] princ Principal to test * * @note A matching principal is a host-based principal with an empty realm * and/or second data component (hostname). Profile configuration may cause * the hostname to be ignored even if it is present. A principal matches a * matching principal if the former has the same non-empty (and non-ignored) * components of the latter. * * If @a matching is NULL, return TRUE. If @a matching is not a matching * principal, return the value of krb5_principal_compare(context, matching, * princ). * * @return * TRUE if @a princ matches @a matching, FALSE otherwise. */ krb5_boolean KRB5_CALLCONV krb5_sname_match(krb5_context context, krb5_const_principal matching, krb5_const_principal princ); /** * Change a password for an existing Kerberos account. * * @param [in] context Library context * @param [in] creds Credentials for kadmin/changepw service * @param [in] newpw New password * @param [out] result_code Numeric error code from server * @param [out] result_code_string String equivalent to @a result_code * @param [out] result_string Change password response from the KDC * * Change the password for the existing principal identified by @a creds. * * The possible values of the output @a result_code are: * * @li #KRB5_KPASSWD_SUCCESS (0) - success * @li #KRB5_KPASSWD_MALFORMED (1) - Malformed request error * @li #KRB5_KPASSWD_HARDERROR (2) - Server error * @li #KRB5_KPASSWD_AUTHERROR (3) - Authentication error * @li #KRB5_KPASSWD_SOFTERROR (4) - Password change rejected * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_change_password(krb5_context context, krb5_creds *creds, const char *newpw, int *result_code, krb5_data *result_code_string, krb5_data *result_string); /** * Set a password for a principal using specified credentials. * * @param [in] context Library context * @param [in] creds Credentials for kadmin/changepw service * @param [in] newpw New password * @param [in] change_password_for Change the password for this principal * @param [out] result_code Numeric error code from server * @param [out] result_code_string String equivalent to @a result_code * @param [out] result_string Data returned from the remote system * * This function uses the credentials @a creds to set the password @a newpw for * the principal @a change_password_for. It implements the set password * operation of RFC 3244, for interoperability with Microsoft Windows * implementations. * * @note If @a change_password_for is NULL, the change is performed on the * current principal. If @a change_password_for is non-null, the change is * performed on the principal name passed in @a change_password_for. * * The error code and strings are returned in @a result_code, * @a result_code_string and @a result_string. * * @sa krb5_set_password_using_ccache() * * @retval * 0 Success and result_code is set to #KRB5_KPASSWD_SUCCESS. * @return * Kerberos error codes. */ krb5_error_code KRB5_CALLCONV krb5_set_password(krb5_context context, krb5_creds *creds, const char *newpw, krb5_principal change_password_for, int *result_code, krb5_data *result_code_string, krb5_data *result_string); /** * Set a password for a principal using cached credentials. * * @param [in] context Library context * @param [in] ccache Credential cache * @param [in] newpw New password * @param [in] change_password_for Change the password for this principal * @param [out] result_code Numeric error code from server * @param [out] result_code_string String equivalent to @a result_code * @param [out] result_string Data returned from the remote system * * This function uses the cached credentials from @a ccache to set the password * @a newpw for the principal @a change_password_for. It implements RFC 3244 * set password operation (interoperable with MS Windows implementations) using * the credential cache. * * The error code and strings are returned in @a result_code, * @a result_code_string and @a result_string. * * @note If @a change_password_for is set to NULL, the change is performed on * the default principal in @a ccache. If @a change_password_for is non null, * the change is performed on the specified principal. * * @sa krb5_set_password() * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_set_password_using_ccache(krb5_context context, krb5_ccache ccache, const char *newpw, krb5_principal change_password_for, int *result_code, krb5_data *result_code_string, krb5_data *result_string); /** * Get a result message for changing or setting a password. * * @param [in] context Library context * @param [in] server_string Data returned from the remote system * @param [out] message_out A message displayable to the user * * This function processes the @a server_string returned in the @a * result_string parameter of krb5_change_password(), krb5_set_password(), and * related functions, and returns a displayable string. If @a server_string * contains Active Directory structured policy information, it will be * converted into human-readable text. * * Use krb5_free_string() to free @a message_out when it is no longer needed. * * @retval * 0 Success * @return * Kerberos error codes * * @version New in 1.11 */ krb5_error_code KRB5_CALLCONV krb5_chpw_message(krb5_context context, const krb5_data *server_string, char **message_out); /** * Retrieve configuration profile from the context. * * @param [in] context Library context * @param [out] profile Pointer to data read from a configuration file * * This function creates a new @a profile object that reflects profile * in the supplied @a context. * * The @a profile object may be freed with profile_release() function. * See profile.h and profile API for more details. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_profile(krb5_context context, struct _profile_t ** profile); #if KRB5_DEPRECATED /** @deprecated Replaced by krb5_get_init_creds_password().*/ KRB5_ATTR_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password(krb5_context context, krb5_flags options, krb5_address *const *addrs, krb5_enctype *ktypes, krb5_preauthtype *pre_auth_types, const char *password, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep **ret_as_reply); /** @deprecated Replaced by krb5_get_init_creds(). */ KRB5_ATTR_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey(krb5_context context, krb5_flags options, krb5_address *const *addrs, krb5_enctype *ktypes, krb5_preauthtype *pre_auth_types, const krb5_keyblock *key, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep **ret_as_reply); /** @deprecated Replaced by krb5_get_init_creds_keytab(). */ KRB5_ATTR_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_keytab(krb5_context context, krb5_flags options, krb5_address *const *addrs, krb5_enctype *ktypes, krb5_preauthtype *pre_auth_types, krb5_keytab arg_keytab, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep **ret_as_reply); #endif /* KRB5_DEPRECATED */ /** * Parse and decrypt a @c KRB_AP_REQ message. * * @param [in] context Library context * @param [in,out] auth_context Pre-existing or newly created auth context * @param [in] inbuf AP-REQ message to be parsed * @param [in] server Matching principal for server, or NULL to * allow any principal in keytab * @param [in] keytab Key table, or NULL to use the default * @param [out] ap_req_options If non-null, the AP-REQ flags on output * @param [out] ticket If non-null, ticket from the AP-REQ message * * This function parses, decrypts and verifies a AP-REQ message from @a inbuf * and stores the authenticator in @a auth_context. * * If a keyblock was specified in @a auth_context using * krb5_auth_con_setuseruserkey(), that key is used to decrypt the ticket in * AP-REQ message and @a keytab is ignored. In this case, @a server should be * specified as a complete principal name to allow for proper transited-path * checking and replay cache selection. * * Otherwise, the decryption key is obtained from @a keytab, or from the * default keytab if it is NULL. In this case, @a server may be a complete * principal name, a matching principal (see krb5_sname_match()), or NULL to * match any principal name. The keys tried against the encrypted part of the * ticket are determined as follows: * * - If @a server is a complete principal name, then its entry in @a keytab is * tried. * - Otherwise, if @a keytab is iterable, then all entries in @a keytab which * match @a server are tried. * - Otherwise, the server principal in the ticket must match @a server, and * its entry in @a keytab is tried. * * The client specified in the decrypted authenticator must match the client * specified in the decrypted ticket. * * If the @a remote_addr field of @a auth_context is set, the request must come * from that address. * * If a replay cache handle is provided in the @a auth_context, the * authenticator and ticket are verified against it. If no conflict is found, * the new authenticator is then stored in the replay cache of @a auth_context. * * Various other checks are performed on the decoded data, including * cross-realm policy, clockskew, and ticket validation times. * * On success the authenticator, subkey, and remote sequence number of the * request are stored in @a auth_context. If the #AP_OPTS_MUTUAL_REQUIRED * bit is set, the local sequence number is XORed with the remote sequence * number in the request. * * Use krb5_free_ticket() to free @a ticket when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_rd_req(krb5_context context, krb5_auth_context *auth_context, const krb5_data *inbuf, krb5_const_principal server, krb5_keytab keytab, krb5_flags *ap_req_options, krb5_ticket **ticket); /** * Retrieve a service key from a key table. * * @param [in] context Library context * @param [in] keyprocarg Name of a key table (NULL to use default name) * @param [in] principal Service principal * @param [in] vno Key version number (0 for highest available) * @param [in] enctype Encryption type (0 for any type) * @param [out] key Service key from key table * * Open and search the specified key table for the entry identified by @a * principal, @a enctype, and @a vno. If no key is found, return an error code. * * The default key table is used, unless @a keyprocarg is non-null. * @a keyprocarg designates a specific key table. * * Use krb5_free_keyblock() to free @a key when it is no longer needed. * * @retval * 0 Success * @return Kerberos error code if not found or @a keyprocarg is invalid. */ krb5_error_code KRB5_CALLCONV krb5_kt_read_service_key(krb5_context context, krb5_pointer keyprocarg, krb5_principal principal, krb5_kvno vno, krb5_enctype enctype, krb5_keyblock **key); /** * Format a @c KRB-SAFE message. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] userdata User data in the message * @param [out] der_out Formatted @c KRB-SAFE buffer * @param [out] rdata_out Replay data. Specify NULL if not needed * * This function creates an integrity protected @c KRB-SAFE message * using data supplied by the application. * * Fields in @a auth_context specify the checksum type, the keyblock that * can be used to seed the checksum, full addresses (host and port) for * the sender and receiver, and @ref KRB5_AUTH_CONTEXT flags. * * The local address in @a auth_context must be set, and is used to form the * sender address used in the KRB-SAFE message. The remote address is * optional; if specified, it will be used to form the receiver address used in * the message. * * @note The @a rdata_out argument is required if the * #KRB5_AUTH_CONTEXT_RET_TIME or #KRB5_AUTH_CONTEXT_RET_SEQUENCE flag is set * in @a auth_context. * * If the #KRB5_AUTH_CONTEXT_DO_TIME flag is set in @a auth_context, a * timestamp is included in the KRB-SAFE message, and an entry for the message * is entered in an in-memory replay cache to detect if the message is * reflected by an attacker. If #KRB5_AUTH_CONTEXT_DO_TIME is not set, no * replay cache is used. If #KRB5_AUTH_CONTEXT_RET_TIME is set in @a * auth_context, a timestamp is included in the KRB-SAFE message and is stored * in @a rdata_out. * * If either #KRB5_AUTH_CONTEXT_DO_SEQUENCE or #KRB5_AUTH_CONTEXT_RET_SEQUENCE * is set, the @a auth_context local sequence number is included in the * KRB-SAFE message and then incremented. If #KRB5_AUTH_CONTEXT_RET_SEQUENCE * is set, the sequence number used is stored in @a rdata_out. * * Use krb5_free_data_contents() to free @a der_out when it is no longer * needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_safe(krb5_context context, krb5_auth_context auth_context, const krb5_data *userdata, krb5_data *der_out, krb5_replay_data *rdata_out); /** * Format a @c KRB-PRIV message. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] userdata User data for @c KRB-PRIV message * @param [out] der_out Formatted @c KRB-PRIV message * @param [out] rdata_out Replay data (NULL if not needed) * * This function is similar to krb5_mk_safe(), but the message is encrypted and * integrity-protected, not just integrity-protected. * * The local address in @a auth_context must be set, and is used to form the * sender address used in the KRB-PRIV message. The remote address is * optional; if specified, it will be used to form the receiver address used in * the message. * * @note The @a rdata_out argument is required if the * #KRB5_AUTH_CONTEXT_RET_TIME or #KRB5_AUTH_CONTEXT_RET_SEQUENCE flag is set * in @a auth_context. * * If the #KRB5_AUTH_CONTEXT_DO_TIME flag is set in @a auth_context, a * timestamp is included in the KRB-PRIV message, and an entry for the message * is entered in an in-memory replay cache to detect if the message is * reflected by an attacker. If #KRB5_AUTH_CONTEXT_DO_TIME is not set, no * replay cache is used. If #KRB5_AUTH_CONTEXT_RET_TIME is set in @a * auth_context, a timestamp is included in the KRB-PRIV message and is stored * in @a rdata_out. * * If either #KRB5_AUTH_CONTEXT_DO_SEQUENCE or #KRB5_AUTH_CONTEXT_RET_SEQUENCE * is set, the @a auth_context local sequence number is included in the * KRB-PRIV message and then incremented. If #KRB5_AUTH_CONTEXT_RET_SEQUENCE * is set, the sequence number used is stored in @a rdata_out. * * Use krb5_free_data_contents() to free @a der_out when it is no longer * needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_priv(krb5_context context, krb5_auth_context auth_context, const krb5_data *userdata, krb5_data *der_out, krb5_replay_data *rdata_out); /** * Client function for @c sendauth protocol. * * @param [in] context Library context * @param [in,out] auth_context Pre-existing or newly created auth context * @param [in] fd File descriptor that describes network socket * @param [in] appl_version Application protocol version to be matched * with the receiver's application version * @param [in] client Client principal * @param [in] server Server principal * @param [in] ap_req_options @ref AP_OPTS options * @param [in] in_data Data to be sent to the server * @param [in] in_creds Input credentials, or NULL to use @a ccache * @param [in] ccache Credential cache * @param [out] error If non-null, contains KRB_ERROR message * returned from server * @param [out] rep_result If non-null and @a ap_req_options is * #AP_OPTS_MUTUAL_REQUIRED, contains the result * of mutual authentication exchange * @param [out] out_creds If non-null, the retrieved credentials * * This function performs the client side of a sendauth/recvauth exchange by * sending and receiving messages over @a fd. * * Credentials may be specified in three ways: * * @li If @a in_creds is NULL, credentials are obtained with * krb5_get_credentials() using the principals @a client and @a server. @a * server must be non-null; @a client may NULL to use the default principal of * @a ccache. * * @li If @a in_creds is non-null, but does not contain a ticket, credentials * for the exchange are obtained with krb5_get_credentials() using @a in_creds. * In this case, the values of @a client and @a server are unused. * * @li If @a in_creds is a complete credentials structure, it used directly. * In this case, the values of @a client, @a server, and @a ccache are unused. * * If the server is using a different application protocol than that specified * in @a appl_version, an error will be returned. * * Use krb5_free_creds() to free @a out_creds, krb5_free_ap_rep_enc_part() to * free @a rep_result, and krb5_free_error() to free @a error when they are no * longer needed. * * @sa krb5_recvauth() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_sendauth(krb5_context context, krb5_auth_context *auth_context, krb5_pointer fd, char *appl_version, krb5_principal client, krb5_principal server, krb5_flags ap_req_options, krb5_data *in_data, krb5_creds *in_creds, krb5_ccache ccache, krb5_error **error, krb5_ap_rep_enc_part **rep_result, krb5_creds **out_creds); /** * Server function for @a sendauth protocol. * * @param [in] context Library context * @param [in,out] auth_context Pre-existing or newly created auth context * @param [in] fd File descriptor * @param [in] appl_version Application protocol version to be matched * against the client's application version * @param [in] server Server principal (NULL for any in @a keytab) * @param [in] flags Additional specifications * @param [in] keytab Key table containing service keys * @param [out] ticket Ticket (NULL if not needed) * * This function performs the server side of a sendauth/recvauth exchange by * sending and receiving messages over @a fd. * * Use krb5_free_ticket() to free @a ticket when it is no longer needed. * * @sa krb5_sendauth() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_recvauth(krb5_context context, krb5_auth_context *auth_context, krb5_pointer fd, char *appl_version, krb5_principal server, krb5_int32 flags, krb5_keytab keytab, krb5_ticket **ticket); /** * Server function for @a sendauth protocol with version parameter. * * @param [in] context Library context * @param [in,out] auth_context Pre-existing or newly created auth context * @param [in] fd File descriptor * @param [in] server Server principal (NULL for any in @a keytab) * @param [in] flags Additional specifications * @param [in] keytab Decryption key * @param [out] ticket Ticket (NULL if not needed) * @param [out] version sendauth protocol version (NULL if not needed) * * This function is similar to krb5_recvauth() with the additional output * information place into @a version. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_recvauth_version(krb5_context context, krb5_auth_context *auth_context, krb5_pointer fd, krb5_principal server, krb5_int32 flags, krb5_keytab keytab, krb5_ticket **ticket, krb5_data *version); /** * Format a @c KRB-CRED message for an array of credentials. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] creds Null-terminated array of credentials * @param [out] der_out Encoded credentials * @param [out] rdata_out Replay cache information (NULL if not needed) * * This function takes an array of credentials @a creds and formats * a @c KRB-CRED message @a der_out to pass to krb5_rd_cred(). * * The local and remote addresses in @a auth_context are optional; if either is * specified, they are used to form the sender and receiver addresses in the * KRB-CRED message. * * @note The @a rdata_out argument is required if the * #KRB5_AUTH_CONTEXT_RET_TIME or #KRB5_AUTH_CONTEXT_RET_SEQUENCE flag is set * in @a auth_context. * * If the #KRB5_AUTH_CONTEXT_DO_TIME flag is set in @a auth_context, an entry * for the message is entered in an in-memory replay cache to detect if the * message is reflected by an attacker. If #KRB5_AUTH_CONTEXT_DO_TIME is not * set, no replay cache is used. If #KRB5_AUTH_CONTEXT_RET_TIME is set in @a * auth_context, the timestamp used for the KRB-CRED message is stored in @a * rdata_out. * * If either #KRB5_AUTH_CONTEXT_DO_SEQUENCE or #KRB5_AUTH_CONTEXT_RET_SEQUENCE * is set, the @a auth_context local sequence number is included in the * KRB-CRED message and then incremented. If #KRB5_AUTH_CONTEXT_RET_SEQUENCE * is set, the sequence number used is stored in @a rdata_out. * * Use krb5_free_data_contents() to free @a der_out when it is no longer * needed. * * The message will be encrypted using the send subkey of @a auth_context if it * is present, or the session key otherwise. If neither key is present, the * credentials will not be encrypted, and the message should only be sent over * a secure channel. No replay cache entry is used in this case. * * @retval * 0 Success * @retval * ENOMEM Insufficient memory * @retval * KRB5_RC_REQUIRED Message replay detection requires @a rcache parameter * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_ncred(krb5_context context, krb5_auth_context auth_context, krb5_creds **creds, krb5_data **der_out, krb5_replay_data *rdata_out); /** * Format a @c KRB-CRED message for a single set of credentials. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] creds Pointer to credentials * @param [out] der_out Encoded credentials * @param [out] rdata_out Replay cache data (NULL if not needed) * * This is a convenience function that calls krb5_mk_ncred() with a single set * of credentials. * * @retval * 0 Success * @retval * ENOMEM Insufficient memory * @retval * KRB5_RC_REQUIRED Message replay detection requires @a rcache parameter * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_mk_1cred(krb5_context context, krb5_auth_context auth_context, krb5_creds *creds, krb5_data **der_out, krb5_replay_data *rdata_out); /** * Read and validate a @c KRB-CRED message. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] creddata @c KRB-CRED message * @param [out] creds_out Null-terminated array of forwarded credentials * @param [out] rdata_out Replay data (NULL if not needed) * * @note The @a rdata_out argument is required if the * #KRB5_AUTH_CONTEXT_RET_TIME or #KRB5_AUTH_CONTEXT_RET_SEQUENCE flag is set * in @a auth_context.` * * @a creddata will be decrypted using the receiving subkey if it is present in * @a auth_context, or the session key if the receiving subkey is not present * or fails to decrypt the message. * * Use krb5_free_tgt_creds() to free @a creds_out when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_rd_cred(krb5_context context, krb5_auth_context auth_context, krb5_data *creddata, krb5_creds ***creds_out, krb5_replay_data *rdata_out); /** * Get a forwarded TGT and format a @c KRB-CRED message. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] rhost Remote host * @param [in] client Client principal of TGT * @param [in] server Principal of server to receive TGT * @param [in] cc Credential cache handle (NULL to use default) * @param [in] forwardable Whether TGT should be forwardable * @param [out] outbuf KRB-CRED message * * Get a TGT for use at the remote host @a rhost and format it into a KRB-CRED * message. If @a rhost is NULL and @a server is of type #KRB5_NT_SRV_HST, * the second component of @a server will be used. * * @retval * 0 Success * @retval * ENOMEM Insufficient memory * @retval * KRB5_PRINC_NOMATCH Requested principal and ticket do not match * @retval * KRB5_NO_TKT_SUPPLIED Request did not supply a ticket * @retval * KRB5_CC_BADNAME Credential cache name or principal name malformed * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_fwd_tgt_creds(krb5_context context, krb5_auth_context auth_context, const char *rhost, krb5_principal client, krb5_principal server, krb5_ccache cc, int forwardable, krb5_data *outbuf); /** * Create and initialize an authentication context. * * @param [in] context Library context * @param [out] auth_context Authentication context * * This function creates an authentication context to hold configuration and * state relevant to krb5 functions for authenticating principals and * protecting messages once authentication has occurred. * * By default, flags for the context are set to enable the use of the replay * cache (#KRB5_AUTH_CONTEXT_DO_TIME), but not sequence numbers. Use * krb5_auth_con_setflags() to change the flags. * * The allocated @a auth_context must be freed with krb5_auth_con_free() when * it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_init(krb5_context context, krb5_auth_context *auth_context); /** * Free a krb5_auth_context structure. * * @param [in] context Library context * @param [in] auth_context Authentication context to be freed * * This function frees an auth context allocated by krb5_auth_con_init(). * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_auth_con_free(krb5_context context, krb5_auth_context auth_context); /** * Set a flags field in a krb5_auth_context structure. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] flags Flags bit mask * * Valid values for @a flags are: * @li #KRB5_AUTH_CONTEXT_DO_TIME Use timestamps * @li #KRB5_AUTH_CONTEXT_RET_TIME Save timestamps * @li #KRB5_AUTH_CONTEXT_DO_SEQUENCE Use sequence numbers * @li #KRB5_AUTH_CONTEXT_RET_SEQUENCE Save sequence numbers * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setflags(krb5_context context, krb5_auth_context auth_context, krb5_int32 flags); /** * Retrieve flags from a krb5_auth_context structure. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] flags Flags bit mask * * Valid values for @a flags are: * @li #KRB5_AUTH_CONTEXT_DO_TIME Use timestamps * @li #KRB5_AUTH_CONTEXT_RET_TIME Save timestamps * @li #KRB5_AUTH_CONTEXT_DO_SEQUENCE Use sequence numbers * @li #KRB5_AUTH_CONTEXT_RET_SEQUENCE Save sequence numbers * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getflags(krb5_context context, krb5_auth_context auth_context, krb5_int32 *flags); /** * Set a checksum callback in an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] func Checksum callback * @param [in] data Callback argument * * Set a callback to obtain checksum data in krb5_mk_req(). The callback will * be invoked after the subkey and local sequence number are stored in @a * auth_context. * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_auth_con_set_checksum_func( krb5_context context, krb5_auth_context auth_context, krb5_mk_req_checksum_func func, void *data); /** * Get the checksum callback from an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] func Checksum callback * @param [out] data Callback argument * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_auth_con_get_checksum_func( krb5_context context, krb5_auth_context auth_context, krb5_mk_req_checksum_func *func, void **data); /** * Set the local and remote addresses in an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] local_addr Local address * @param [in] remote_addr Remote address * * This function releases the storage assigned to the contents of the local and * remote addresses of @a auth_context and then sets them to @a local_addr and * @a remote_addr respectively. * * @sa krb5_auth_con_genaddrs() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_setaddrs(krb5_context context, krb5_auth_context auth_context, krb5_address *local_addr, krb5_address *remote_addr); /** * Retrieve address fields from an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] local_addr Local address (NULL if not needed) * @param [out] remote_addr Remote address (NULL if not needed) * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getaddrs(krb5_context context, krb5_auth_context auth_context, krb5_address **local_addr, krb5_address **remote_addr); /** * Set local and remote port fields in an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] local_port Local port * @param [in] remote_port Remote port * * This function releases the storage assigned to the contents of the local and * remote ports of @a auth_context and then sets them to @a local_port and @a * remote_port respectively. * * @sa krb5_auth_con_genaddrs() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setports(krb5_context context, krb5_auth_context auth_context, krb5_address *local_port, krb5_address *remote_port); /** * Set the session key in an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] keyblock User key * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setuseruserkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock *keyblock); /** * Retrieve the session key from an auth context as a keyblock. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] keyblock Session key * * This function creates a keyblock containing the session key from @a * auth_context. Use krb5_free_keyblock() to free @a keyblock when it is no * longer needed * * @retval 0 Success. Otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock **keyblock); /** * Retrieve the session key from an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] key Session key * * This function sets @a key to the session key from @a auth_context. Use * krb5_k_free_key() to release @a key when it is no longer needed. * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getkey_k(krb5_context context, krb5_auth_context auth_context, krb5_key *key); /** * Retrieve the send subkey from an auth context as a keyblock. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [out] keyblock Send subkey * * This function creates a keyblock containing the send subkey from @a * auth_context. Use krb5_free_keyblock() to free @a keyblock when it is no * longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getsendsubkey(krb5_context ctx, krb5_auth_context ac, krb5_keyblock **keyblock); /** * Retrieve the send subkey from an auth context. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [out] key Send subkey * * This function sets @a key to the send subkey from @a auth_context. Use * krb5_k_free_key() to release @a key when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getsendsubkey_k(krb5_context ctx, krb5_auth_context ac, krb5_key *key); /** * Retrieve the receiving subkey from an auth context as a keyblock. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [out] keyblock Receiving subkey * * This function creates a keyblock containing the receiving subkey from @a * auth_context. Use krb5_free_keyblock() to free @a keyblock when it is no * longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getrecvsubkey(krb5_context ctx, krb5_auth_context ac, krb5_keyblock **keyblock); /** * Retrieve the receiving subkey from an auth context as a keyblock. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [out] key Receiving subkey * * This function sets @a key to the receiving subkey from @a auth_context. Use * krb5_k_free_key() to release @a key when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getrecvsubkey_k(krb5_context ctx, krb5_auth_context ac, krb5_key *key); /** * Set the send subkey in an auth context with a keyblock. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [in] keyblock Send subkey * * This function sets the send subkey in @a ac to a copy of @a keyblock. * * @retval 0 Success. Otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setsendsubkey(krb5_context ctx, krb5_auth_context ac, krb5_keyblock *keyblock); /** * Set the send subkey in an auth context. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [out] key Send subkey * * This function sets the send subkey in @a ac to @a key, incrementing its * reference count. * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setsendsubkey_k(krb5_context ctx, krb5_auth_context ac, krb5_key key); /** * Set the receiving subkey in an auth context with a keyblock. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [in] keyblock Receiving subkey * * This function sets the receiving subkey in @a ac to a copy of @a keyblock. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setrecvsubkey(krb5_context ctx, krb5_auth_context ac, krb5_keyblock *keyblock); /** * Set the receiving subkey in an auth context. * * @param [in] ctx Library context * @param [in] ac Authentication context * @param [in] key Receiving subkey * * This function sets the receiving subkey in @a ac to @a key, incrementing its * reference count. * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setrecvsubkey_k(krb5_context ctx, krb5_auth_context ac, krb5_key key); #if KRB5_DEPRECATED /** @deprecated Replaced by krb5_auth_con_getsendsubkey(). */ KRB5_ATTR_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalsubkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock **keyblock); /** @deprecated Replaced by krb5_auth_con_getrecvsubkey(). */ KRB5_ATTR_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_auth_con_getremotesubkey(krb5_context context, krb5_auth_context auth_context, krb5_keyblock **keyblock); #endif /** * Retrieve the local sequence number from an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] seqnumber Local sequence number * * Retrieve the local sequence number from @a auth_context and return it in @a * seqnumber. The #KRB5_AUTH_CONTEXT_DO_SEQUENCE flag must be set in @a * auth_context for this function to be useful. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalseqnumber(krb5_context context, krb5_auth_context auth_context, krb5_int32 *seqnumber); /** * Retrieve the remote sequence number from an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] seqnumber Remote sequence number * * Retrieve the remote sequence number from @a auth_context and return it in @a * seqnumber. The #KRB5_AUTH_CONTEXT_DO_SEQUENCE flag must be set in @a * auth_context for this function to be useful. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getremoteseqnumber(krb5_context context, krb5_auth_context auth_context, krb5_int32 *seqnumber); /** * Cause an auth context to use cipher state. * * @param [in] context Library context * @param [in] auth_context Authentication context * * Prepare @a auth_context to use cipher state when krb5_mk_priv() or * krb5_rd_priv() encrypt or decrypt data. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_initivector(krb5_context context, krb5_auth_context auth_context); /** * Set the replay cache in an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] rcache Replay cache haddle * * This function sets the replay cache in @a auth_context to @a rcache. @a * rcache will be closed when @a auth_context is freed, so the caller should * relinquish that responsibility. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_setrcache(krb5_context context, krb5_auth_context auth_context, krb5_rcache rcache); /** * Retrieve the replay cache from an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] rcache Replay cache handle * * This function fetches the replay cache from @a auth_context. The caller * should not close @a rcache. * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_getrcache(krb5_context context, krb5_auth_context auth_context, krb5_rcache *rcache); /** * Retrieve the authenticator from an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [out] authenticator Authenticator * * Use krb5_free_authenticator() to free @a authenticator when it is no longer * needed. * * @retval 0 Success. Otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_getauthenticator(krb5_context context, krb5_auth_context auth_context, krb5_authenticator **authenticator); /** * Set checksum type in an an auth context. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] cksumtype Checksum type * * This function sets the checksum type in @a auth_context to be used by * krb5_mk_req() for the authenticator checksum. * * @retval 0 Success. Otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_set_req_cksumtype(krb5_context context, krb5_auth_context auth_context, krb5_cksumtype cksumtype); #define KRB5_REALM_BRANCH_CHAR '.' /* * end "func-proto.h" */ /* * begin stuff from libos.h */ /** * @brief Read a password from keyboard input. * * @param [in] context Library context * @param [in] prompt First user prompt when reading password * @param [in] prompt2 Second user prompt (NULL to prompt only once) * @param [out] return_pwd Returned password * @param [in,out] size_return On input, maximum size of password; on output, * size of password read * * This function reads a password from keyboard input and stores it in @a * return_pwd. @a size_return should be set by the caller to the amount of * storage space available in @a return_pwd; on successful return, it will be * set to the length of the password read. * * @a prompt is printed to the terminal, followed by ": ", and then a password * is read from the keyboard. * * If @a prompt2 is NULL, the password is read only once. Otherwise, @a * prompt2 is printed to the terminal and a second password is read. If the * two passwords entered are not identical, KRB5_LIBOS_BADPWDMATCH is returned. * * Echoing is turned off when the password is read. * * @retval * 0 Success * @return * Error in reading or verifying the password * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_read_password(krb5_context context, const char *prompt, const char *prompt2, char *return_pwd, unsigned int *size_return); /** * Convert a principal name to a local name. * * @param [in] context Library context * @param [in] aname Principal name * @param [in] lnsize_in Space available in @a lname * @param [out] lname Local name buffer to be filled in * * If @a aname does not correspond to any local account, KRB5_LNAME_NOTRANS is * returned. If @a lnsize_in is too small for the local name, * KRB5_CONFIG_NOTENUFSPACE is returned. * * Local names, rather than principal names, can be used by programs that * translate to an environment-specific name (for example, a user account * name). * * @retval * 0 Success * @retval * System errors * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_aname_to_localname(krb5_context context, krb5_const_principal aname, int lnsize_in, char *lname); /** * Get the Kerberos realm names for a host. * * @param [in] context Library context * @param [in] host Host name (or NULL) * @param [out] realmsp Null-terminated list of realm names * * Fill in @a realmsp with a pointer to a null-terminated list of realm names. * If there are no known realms for the host, a list containing the referral * (empty) realm is returned. * * If @a host is NULL, the local host's realms are determined. * * Use krb5_free_host_realm() to release @a realmsp when it is no longer * needed. * * @retval * 0 Success * @retval * ENOMEM Insufficient memory * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_host_realm(krb5_context context, const char *host, char ***realmsp); /** * * @param [in] context Library context * @param [in] hdata Host name (or NULL) * @param [out] realmsp Null-terminated list of realm names * * Fill in @a realmsp with a pointer to a null-terminated list of realm names * obtained through heuristics or insecure resolution methods which have lower * priority than KDC referrals. * * If @a host is NULL, the local host's realms are determined. * * Use krb5_free_host_realm() to release @a realmsp when it is no longer * needed. */ krb5_error_code KRB5_CALLCONV krb5_get_fallback_host_realm(krb5_context context, krb5_data *hdata, char ***realmsp); /** * Free the memory allocated by krb5_get_host_realm(). * * @param [in] context Library context * @param [in] realmlist List of realm names to be released * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_free_host_realm(krb5_context context, char *const *realmlist); /** * Determine if a principal is authorized to log in as a local user. * * @param [in] context Library context * @param [in] principal Principal name * @param [in] luser Local username * * Determine whether @a principal is authorized to log in as a local user @a * luser. * * @retval * TRUE Principal is authorized to log in as user; FALSE otherwise. */ krb5_boolean KRB5_CALLCONV krb5_kuserok(krb5_context context, krb5_principal principal, const char *luser); /** * Generate auth context addresses from a connected socket. * * @param [in] context Library context * @param [in] auth_context Authentication context * @param [in] infd Connected socket descriptor * @param [in] flags Flags * * This function sets the local and/or remote addresses in @a auth_context * based on the local and remote endpoints of the socket @a infd. The * following flags determine the operations performed: * * @li #KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR Generate local address. * @li #KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR Generate remote address. * @li #KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR Generate local address and port. * @li #KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR Generate remote address and port. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_auth_con_genaddrs(krb5_context context, krb5_auth_context auth_context, int infd, int flags); /** * Set time offset field in a krb5_context structure. * * @param [in] context Library context * @param [in] seconds Real time, seconds portion * @param [in] microseconds Real time, microseconds portion * * This function sets the time offset in @a context to the difference between * the system time and the real time as determined by @a seconds and @a * microseconds. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_set_real_time(krb5_context context, krb5_timestamp seconds, krb5_int32 microseconds); /** * Return the time offsets from the os context. * * @param [in] context Library context * @param [out] seconds Time offset, seconds portion * @param [out] microseconds Time offset, microseconds portion * * This function returns the time offsets in @a context. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_time_offsets(krb5_context context, krb5_timestamp *seconds, krb5_int32 *microseconds); /* str_conv.c */ /** * Convert a string to an encryption type. * * @param [in] string String to convert to an encryption type * @param [out] enctypep Encryption type * * @retval 0 Success; otherwise - EINVAL */ krb5_error_code KRB5_CALLCONV krb5_string_to_enctype(char *string, krb5_enctype *enctypep); /** * Convert a string to a salt type. * * @param [in] string String to convert to an encryption type * @param [out] salttypep Salt type to be filled in * * @retval 0 Success; otherwise - EINVAL */ krb5_error_code KRB5_CALLCONV krb5_string_to_salttype(char *string, krb5_int32 *salttypep); /** * Convert a string to a checksum type. * * @param [in] string String to be converted * @param [out] cksumtypep Checksum type to be filled in * * @retval 0 Success; otherwise - EINVAL */ krb5_error_code KRB5_CALLCONV krb5_string_to_cksumtype(char *string, krb5_cksumtype *cksumtypep); /** * Convert a string to a timestamp. * * @param [in] string String to be converted * @param [out] timestampp Pointer to timestamp * * @retval 0 Success; otherwise - EINVAL */ krb5_error_code KRB5_CALLCONV krb5_string_to_timestamp(char *string, krb5_timestamp *timestampp); /** * Convert a string to a delta time value. * * @param [in] string String to be converted * @param [out] deltatp Delta time to be filled in * * @retval 0 Success; otherwise - KRB5_DELTAT_BADFORMAT */ krb5_error_code KRB5_CALLCONV krb5_string_to_deltat(char *string, krb5_deltat *deltatp); /** * Convert an encryption type to a string. * * @param [in] enctype Encryption type * @param [out] buffer Buffer to hold encryption type string * @param [in] buflen Storage available in @a buffer * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_enctype_to_string(krb5_enctype enctype, char *buffer, size_t buflen); /** * Convert an encryption type to a name or alias. * * @param [in] enctype Encryption type * @param [in] shortest Flag * @param [out] buffer Buffer to hold encryption type string * @param [in] buflen Storage available in @a buffer * * If @a shortest is FALSE, this function returns the enctype's canonical name * (like "aes128-cts-hmac-sha1-96"). If @a shortest is TRUE, it return the * enctype's shortest alias (like "aes128-cts"). * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_enctype_to_name(krb5_enctype enctype, krb5_boolean shortest, char *buffer, size_t buflen); /** * Convert a salt type to a string. * * @param [in] salttype Salttype to convert * @param [out] buffer Buffer to receive the converted string * @param [in] buflen Storage available in @a buffer * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_salttype_to_string(krb5_int32 salttype, char *buffer, size_t buflen); /** * Convert a checksum type to a string. * * @param [in] cksumtype Checksum type * @param [out] buffer Buffer to hold converted checksum type * @param [in] buflen Storage available in @a buffer * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_cksumtype_to_string(krb5_cksumtype cksumtype, char *buffer, size_t buflen); /** * Convert a timestamp to a string. * * @param [in] timestamp Timestamp to convert * @param [out] buffer Buffer to hold converted timestamp * @param [in] buflen Storage available in @a buffer * * The string is returned in the locale's appropriate date and time * representation. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_timestamp_to_string(krb5_timestamp timestamp, char *buffer, size_t buflen); /** * Convert a timestamp to a string, with optional output padding * * @param [in] timestamp Timestamp to convert * @param [out] buffer Buffer to hold the converted timestamp * @param [in] buflen Length of buffer * @param [in] pad Optional value to pad @a buffer if converted * timestamp does not fill it * * If @a pad is not NULL, @a buffer is padded out to @a buflen - 1 characters * with the value of *@a pad. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_timestamp_to_sfstring(krb5_timestamp timestamp, char *buffer, size_t buflen, char *pad); /** * Convert a relative time value to a string. * * @param [in] deltat Relative time value to convert * @param [out] buffer Buffer to hold time string * @param [in] buflen Storage available in @a buffer * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_deltat_to_string(krb5_deltat deltat, char *buffer, size_t buflen); /* The name of the Kerberos ticket granting service... and its size */ #define KRB5_TGS_NAME "krbtgt" #define KRB5_TGS_NAME_SIZE 6 /* flags for recvauth */ #define KRB5_RECVAUTH_SKIP_VERSION 0x0001 #define KRB5_RECVAUTH_BADAUTHVERS 0x0002 /* initial ticket api functions */ /** Text for prompt used in prompter callback function. */ typedef struct _krb5_prompt { char *prompt; /**< The prompt to show to the user */ int hidden; /**< Boolean; informative prompt or hidden (e.g. PIN) */ krb5_data *reply; /**< Must be allocated before call to prompt routine */ } krb5_prompt; /** Pointer to a prompter callback function. */ typedef krb5_error_code (KRB5_CALLCONV *krb5_prompter_fct)(krb5_context context, void *data, const char *name, const char *banner, int num_prompts, krb5_prompt prompts[]); /** * Prompt user for password. * * @param [in] context Library context * @param data Unused (callback argument) * @param [in] name Name to output during prompt * @param [in] banner Banner to output during prompt * @param [in] num_prompts Number of prompts in @a prompts * @param [in] prompts Array of prompts and replies * * This function is intended to be used as a prompter callback for * krb5_get_init_creds_password() or krb5_init_creds_init(). * * Writes @a name and @a banner to stdout, each followed by a newline, then * writes each prompt field in the @a prompts array, followed by ": ", and sets * the reply field of the entry to a line of input read from stdin. If the * hidden flag is set for a prompt, then terminal echoing is turned off when * input is read. * * @retval * 0 Success * @return * Kerberos error codes * */ krb5_error_code KRB5_CALLCONV krb5_prompter_posix(krb5_context context, void *data, const char *name, const char *banner, int num_prompts, krb5_prompt prompts[]); /** * Long-term password responder question * * This question is asked when the long-term password is needed. It has no * challenge and the response is simply the password string. * * @version New in 1.11 */ #define KRB5_RESPONDER_QUESTION_PASSWORD "password" /** * OTP responder question * * The OTP responder question is asked when the KDC indicates that an OTP * value is required in order to complete the authentication. The JSON format * of the challenge is: * * @n { * @n "service": , * @n "tokenInfo": [ * @n { * @n "flags": , * @n "vendor": , * @n "challenge": , * @n "length": , * @n "format": , * @n "tokenID": , * @n "algID": , * @n }, * @n ... * @n ] * @n } * * The answer to the question MUST be JSON formatted: * * @n { * @n "tokeninfo": , * @n "value": , * @n "pin": , * @n } * * For more detail, please see RFC 6560. * * @version New in 1.11 */ #define KRB5_RESPONDER_QUESTION_OTP "otp" /** * These format constants identify the format of the token value. */ #define KRB5_RESPONDER_OTP_FORMAT_DECIMAL 0 #define KRB5_RESPONDER_OTP_FORMAT_HEXADECIMAL 1 #define KRB5_RESPONDER_OTP_FORMAT_ALPHANUMERIC 2 /** * This flag indicates that the token value MUST be collected. */ #define KRB5_RESPONDER_OTP_FLAGS_COLLECT_TOKEN 0x0001 /** * This flag indicates that the PIN value MUST be collected. */ #define KRB5_RESPONDER_OTP_FLAGS_COLLECT_PIN 0x0002 /** * This flag indicates that the token is now in re-synchronization mode with * the server. The user is expected to reply with the next code displayed on * the token. */ #define KRB5_RESPONDER_OTP_FLAGS_NEXTOTP 0x0004 /** * This flag indicates that the PIN MUST be returned as a separate item. This * flag only takes effect if KRB5_RESPONDER_OTP_FLAGS_COLLECT_PIN is set. If * this flag is not set, the responder may either concatenate PIN + token value * and store it as "value" in the answer or it may return them separately. If * they are returned separately, they will be concatenated internally. */ #define KRB5_RESPONDER_OTP_FLAGS_SEPARATE_PIN 0x0008 /** * PKINIT responder question * * The PKINIT responder question is asked when the client needs a password * that's being used to protect key information, and is formatted as a JSON * object. A specific identity's flags value, if not zero, is the bitwise-OR * of one or more of the KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_* flags defined * below, and possibly other flags to be added later. Any resemblance to * similarly-named CKF_* values in the PKCS#11 API should not be depended on. * * @n { * @n identity : flags , * @n ... * @n } * * The answer to the question MUST be JSON formatted: * * @n { * @n identity : password , * @n ... * @n } * * @version New in 1.12 */ #define KRB5_RESPONDER_QUESTION_PKINIT "pkinit" /** * This flag indicates that an incorrect PIN was supplied at least once since * the last time the correct PIN was supplied. */ #define KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_COUNT_LOW (1 << 0) /** * This flag indicates that supplying an incorrect PIN will cause the token to * lock itself. */ #define KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_FINAL_TRY (1 << 1) /** * This flag indicates that the user PIN is locked, and you can't log in to the * token with it. */ #define KRB5_RESPONDER_PKINIT_FLAGS_TOKEN_USER_PIN_LOCKED (1 << 2) /** * A container for a set of preauthentication questions and answers * * A responder context is supplied by the krb5 authentication system to a @ref * krb5_responder_fn callback. It contains a list of questions and can receive * answers. Questions contained in a responder context can be listed using * krb5_responder_list_questions(), retrieved using * krb5_responder_get_challenge(), or answered using * krb5_responder_set_answer(). The form of a question's challenge and * answer depend on the question name. * * @version New in 1.11 */ typedef struct krb5_responder_context_st *krb5_responder_context; /** * List the question names contained in the responder context. * * @param [in] ctx Library context * @param [in] rctx Responder context * * Return a pointer to a null-terminated list of question names which are * present in @a rctx. The pointer is an alias, valid only as long as the * lifetime of @a rctx, and should not be modified or freed by the caller. A * question's challenge can be retrieved using krb5_responder_get_challenge() * and answered using krb5_responder_set_answer(). * * @version New in 1.11 */ const char * const * KRB5_CALLCONV krb5_responder_list_questions(krb5_context ctx, krb5_responder_context rctx); /** * Retrieve the challenge data for a given question in the responder context. * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [in] question Question name * * Return a pointer to a C string containing the challenge for @a question * within @a rctx, or NULL if the question is not present in @a rctx. The * structure of the question depends on the question name, but will always be * printable UTF-8 text. The returned pointer is an alias, valid only as long * as the lifetime of @a rctx, and should not be modified or freed by the * caller. * * @version New in 1.11 */ const char * KRB5_CALLCONV krb5_responder_get_challenge(krb5_context ctx, krb5_responder_context rctx, const char *question); /** * Answer a named question in the responder context. * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [in] question Question name * @param [in] answer The string to set (MUST be printable UTF-8) * * This function supplies an answer to @a question within @a rctx. The * appropriate form of the answer depends on the question name. * * @retval EINVAL @a question is not present within @a rctx * * @version New in 1.11 */ krb5_error_code KRB5_CALLCONV krb5_responder_set_answer(krb5_context ctx, krb5_responder_context rctx, const char *question, const char *answer); /** * Responder function for an initial credential exchange. * * @param [in] ctx Library context * @param [in] data Callback data * @param [in] rctx Responder context * * A responder function is like a prompter function, but is used for handling * questions and answers as potentially complex data types. Client * preauthentication modules will insert a set of named "questions" into * the responder context. Each question may optionally contain a challenge. * This challenge is printable UTF-8, but may be an encoded value. The * precise encoding and contents of the challenge are specific to the question * asked. When the responder is called, it should answer all the questions it * understands. Like the challenge, the answer MUST be printable UTF-8, but * may contain structured/encoded data formatted to the expected answer format * of the question. * * If a required question is unanswered, the prompter may be called. */ typedef krb5_error_code (KRB5_CALLCONV *krb5_responder_fn)(krb5_context ctx, void *data, krb5_responder_context rctx); typedef struct _krb5_responder_otp_tokeninfo { krb5_flags flags; krb5_int32 format; /* -1 when not specified. */ krb5_int32 length; /* -1 when not specified. */ char *vendor; char *challenge; char *token_id; char *alg_id; } krb5_responder_otp_tokeninfo; typedef struct _krb5_responder_otp_challenge { char *service; krb5_responder_otp_tokeninfo **tokeninfo; } krb5_responder_otp_challenge; /** * Decode the KRB5_RESPONDER_QUESTION_OTP to a C struct. * * A convenience function which parses the KRB5_RESPONDER_QUESTION_OTP * question challenge data, making it available in native C. The main feature * of this function is the ability to interact with OTP tokens without parsing * the JSON. * * The returned value must be passed to krb5_responder_otp_challenge_free() to * be freed. * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [out] chl Challenge structure * * @version New in 1.11 */ krb5_error_code KRB5_CALLCONV krb5_responder_otp_get_challenge(krb5_context ctx, krb5_responder_context rctx, krb5_responder_otp_challenge **chl); /** * Answer the KRB5_RESPONDER_QUESTION_OTP question. * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [in] ti The index of the tokeninfo selected * @param [in] value The value to set, or NULL for none * @param [in] pin The pin to set, or NULL for none * * @version New in 1.11 */ krb5_error_code KRB5_CALLCONV krb5_responder_otp_set_answer(krb5_context ctx, krb5_responder_context rctx, size_t ti, const char *value, const char *pin); /** * Free the value returned by krb5_responder_otp_get_challenge(). * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [in] chl The challenge to free * * @version New in 1.11 */ void KRB5_CALLCONV krb5_responder_otp_challenge_free(krb5_context ctx, krb5_responder_context rctx, krb5_responder_otp_challenge *chl); typedef struct _krb5_responder_pkinit_identity { char *identity; krb5_int32 token_flags; /* 0 when not specified or not applicable. */ } krb5_responder_pkinit_identity; typedef struct _krb5_responder_pkinit_challenge { krb5_responder_pkinit_identity **identities; } krb5_responder_pkinit_challenge; /** * Decode the KRB5_RESPONDER_QUESTION_PKINIT to a C struct. * * A convenience function which parses the KRB5_RESPONDER_QUESTION_PKINIT * question challenge data, making it available in native C. The main feature * of this function is the ability to read the challenge without parsing * the JSON. * * The returned value must be passed to krb5_responder_pkinit_challenge_free() * to be freed. * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [out] chl_out Challenge structure * * @version New in 1.12 */ krb5_error_code KRB5_CALLCONV krb5_responder_pkinit_get_challenge(krb5_context ctx, krb5_responder_context rctx, krb5_responder_pkinit_challenge **chl_out); /** * Answer the KRB5_RESPONDER_QUESTION_PKINIT question for one identity. * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [in] identity The identity for which a PIN is being supplied * @param [in] pin The provided PIN, or NULL for none * * @version New in 1.12 */ krb5_error_code KRB5_CALLCONV krb5_responder_pkinit_set_answer(krb5_context ctx, krb5_responder_context rctx, const char *identity, const char *pin); /** * Free the value returned by krb5_responder_pkinit_get_challenge(). * * @param [in] ctx Library context * @param [in] rctx Responder context * @param [in] chl The challenge to free * * @version New in 1.12 */ void KRB5_CALLCONV krb5_responder_pkinit_challenge_free(krb5_context ctx, krb5_responder_context rctx, krb5_responder_pkinit_challenge *chl); /** Store options for @c _krb5_get_init_creds */ typedef struct _krb5_get_init_creds_opt { krb5_flags flags; krb5_deltat tkt_life; krb5_deltat renew_life; int forwardable; int proxiable; krb5_enctype *etype_list; int etype_list_length; krb5_address **address_list; krb5_preauthtype *preauth_list; int preauth_list_length; krb5_data *salt; } krb5_get_init_creds_opt; #define KRB5_GET_INIT_CREDS_OPT_TKT_LIFE 0x0001 #define KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE 0x0002 #define KRB5_GET_INIT_CREDS_OPT_FORWARDABLE 0x0004 #define KRB5_GET_INIT_CREDS_OPT_PROXIABLE 0x0008 #define KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST 0x0010 #define KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST 0x0020 #define KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST 0x0040 #define KRB5_GET_INIT_CREDS_OPT_SALT 0x0080 #define KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT 0x0100 #define KRB5_GET_INIT_CREDS_OPT_CANONICALIZE 0x0200 #define KRB5_GET_INIT_CREDS_OPT_ANONYMOUS 0x0400 /** * Allocate a new initial credential options structure. * * @param [in] context Library context * @param [out] opt New options structure * * This function is the preferred way to create an options structure for * getting initial credentials, and is required to make use of certain options. * Use krb5_get_init_creds_opt_free() to free @a opt when it is no longer * needed. * * @retval 0 - Success; Kerberos errors otherwise. */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_alloc(krb5_context context, krb5_get_init_creds_opt **opt); /** * Free initial credential options. * * @param [in] context Library context * @param [in] opt Options structure to free * * @sa krb5_get_init_creds_opt_alloc() */ void KRB5_CALLCONV krb5_get_init_creds_opt_free(krb5_context context, krb5_get_init_creds_opt *opt); /** @deprecated Use krb5_get_init_creds_opt_alloc() instead. */ void KRB5_CALLCONV krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt); /** * Set the ticket lifetime in initial credential options. * * @param [in] opt Options structure * @param [in] tkt_life Ticket lifetime */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_tkt_life(krb5_get_init_creds_opt *opt, krb5_deltat tkt_life); /** * Set the ticket renewal lifetime in initial credential options. * * @param [in] opt Pointer to @a options field * @param [in] renew_life Ticket renewal lifetime */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_renew_life(krb5_get_init_creds_opt *opt, krb5_deltat renew_life); /** * Set or unset the forwardable flag in initial credential options. * * @param [in] opt Options structure * @param [in] forwardable Whether credentials should be forwardable */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_forwardable(krb5_get_init_creds_opt *opt, int forwardable); /** * Set or unset the proxiable flag in initial credential options. * * @param [in] opt Options structure * @param [in] proxiable Whether credentials should be proxiable */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_proxiable(krb5_get_init_creds_opt *opt, int proxiable); /** * Set or unset the canonicalize flag in initial credential options. * * @param [in] opt Options structure * @param [in] canonicalize Whether to canonicalize client principal */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_canonicalize(krb5_get_init_creds_opt *opt, int canonicalize); /** * Set or unset the anonymous flag in initial credential options. * * @param [in] opt Options structure * @param [in] anonymous Whether to make an anonymous request * * This function may be used to request anonymous credentials from the KDC by * setting @a anonymous to non-zero. Note that anonymous credentials are only * a request; clients must verify that credentials are anonymous if that is a * requirement. */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_anonymous(krb5_get_init_creds_opt *opt, int anonymous); /** * Set allowable encryption types in initial credential options. * * @param [in] opt Options structure * @param [in] etype_list Array of encryption types * @param [in] etype_list_length Length of @a etype_list */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_etype_list(krb5_get_init_creds_opt *opt, krb5_enctype *etype_list, int etype_list_length); /** * Set address restrictions in initial credential options. * * @param [in] opt Options structure * @param [in] addresses Null-terminated array of addresses */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_address_list(krb5_get_init_creds_opt *opt, krb5_address **addresses); /** * Set preauthentication types in initial credential options. * * @param [in] opt Options structure * @param [in] preauth_list Array of preauthentication types * @param [in] preauth_list_length Length of @a preauth_list * * This function can be used to perform optimistic preauthentication when * getting initial credentials, in combination with * krb5_get_init_creds_opt_set_salt() and krb5_get_init_creds_opt_set_pa(). */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_preauth_list(krb5_get_init_creds_opt *opt, krb5_preauthtype *preauth_list, int preauth_list_length); /** * Set salt for optimistic preauthentication in initial credential options. * * @param [in] opt Options structure * @param [in] salt Salt data * * When getting initial credentials with a password, a salt string it used to * convert the password to a key. Normally this salt is obtained from the * first KDC reply, but when performing optimistic preauthentication, the * client may need to supply the salt string with this function. */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_salt(krb5_get_init_creds_opt *opt, krb5_data *salt); /** * Set or unset change-password-prompt flag in initial credential options. * * @param [in] opt Options structure * @param [in] prompt Whether to prompt to change password * * This flag is on by default. It controls whether * krb5_get_init_creds_password() will react to an expired-password error by * prompting for a new password and attempting to change the old one. */ void KRB5_CALLCONV krb5_get_init_creds_opt_set_change_password_prompt(krb5_get_init_creds_opt *opt, int prompt); /** Generic preauth option attribute/value pairs */ typedef struct _krb5_gic_opt_pa_data { char *attr; char *value; } krb5_gic_opt_pa_data; /** * Supply options for preauthentication in initial credential options. * * @param [in] context Library context * @param [in] opt Options structure * @param [in] attr Preauthentication option name * @param [in] value Preauthentication option value * * This function allows the caller to supply options for preauthentication. * The values of @a attr and @a value are supplied to each preauthentication * module available within @a context. */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_pa(krb5_context context, krb5_get_init_creds_opt *opt, const char *attr, const char *value); /** * Set location of FAST armor ccache in initial credential options. * * @param [in] context Library context * @param [in] opt Options * @param [in] fast_ccache_name Credential cache name * * Sets the location of a credential cache containing an armor ticket to * protect an initial credential exchange using the FAST protocol extension. * * In version 1.7, setting an armor ccache requires that FAST be used for the * exchange. In version 1.8 or later, setting the armor ccache causes FAST to * be used if the KDC supports it; krb5_get_init_creds_opt_set_fast_flags() * must be used to require that FAST be used. */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_fast_ccache_name(krb5_context context, krb5_get_init_creds_opt *opt, const char *fast_ccache_name); /** * Set FAST armor cache in initial credential options. * * @param [in] context Library context * @param [in] opt Options * @param [in] ccache Credential cache handle * * This function is similar to krb5_get_init_creds_opt_set_fast_ccache_name(), * but uses a credential cache handle instead of a name. * * @version New in 1.9 */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_fast_ccache(krb5_context context, krb5_get_init_creds_opt *opt, krb5_ccache ccache); /** * Set an input credential cache in initial credential options. * * @param [in] context Library context * @param [in] opt Options * @param [in] ccache Credential cache handle * * If an input credential cache is set, then the krb5_get_init_creds family of * APIs will read settings from it. Setting an input ccache is desirable when * the application wishes to perform authentication in the same way (using the * same preauthentication mechanisms, and making the same non-security- * sensitive choices) as the previous authentication attempt, which stored * information in the passed-in ccache. * * @version New in 1.11 */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_in_ccache(krb5_context context, krb5_get_init_creds_opt *opt, krb5_ccache ccache); /** * Set an output credential cache in initial credential options. * * @param [in] context Library context * @param [in] opt Options * @param [in] ccache Credential cache handle * * If an output credential cache is set, then the krb5_get_init_creds family of * APIs will write credentials to it. Setting an output ccache is desirable * both because it simplifies calling code and because it permits the * krb5_get_init_creds APIs to write out configuration information about the * realm to the ccache. */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_out_ccache(krb5_context context, krb5_get_init_creds_opt *opt, krb5_ccache ccache); /** * @brief Ask the KDC to include or not include a PAC in the ticket * * @param [in] context Library context * @param [in] opt Options structure * @param [in] req_pac Whether to request a PAC or not * * If this option is set, the AS request will include a PAC-REQUEST pa-data * item explicitly asking the KDC to either include or not include a privilege * attribute certificate in the ticket authorization data. By default, no * request is made; typically the KDC will default to including a PAC if it * supports them. * * @version New in 1.15 */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_pac_request(krb5_context context, krb5_get_init_creds_opt *opt, krb5_boolean req_pac); /** * Set FAST flags in initial credential options. * * @param [in] context Library context * @param [in] opt Options * @param [in] flags FAST flags * * The following flag values are valid: * @li #KRB5_FAST_REQUIRED - Require FAST to be used * * @retval * 0 - Success; Kerberos errors otherwise. */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_fast_flags(krb5_context context, krb5_get_init_creds_opt *opt, krb5_flags flags); /** * Retrieve FAST flags from initial credential options. * * @param [in] context Library context * @param [in] opt Options * @param [out] out_flags FAST flags * * @retval * 0 - Success; Kerberos errors otherwise. */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_get_fast_flags(krb5_context context, krb5_get_init_creds_opt *opt, krb5_flags *out_flags); /* Fast flags*/ #define KRB5_FAST_REQUIRED 0x0001 /**< Require KDC to support FAST*/ typedef void (KRB5_CALLCONV *krb5_expire_callback_func)(krb5_context context, void *data, krb5_timestamp password_expiration, krb5_timestamp account_expiration, krb5_boolean is_last_req); /** * Set an expiration callback in initial credential options. * * @param [in] context Library context * @param [in] opt Options structure * @param [in] cb Callback function * @param [in] data Callback argument * * Set a callback to receive password and account expiration times. * * @a cb will be invoked if and only if credentials are successfully acquired. * The callback will receive the @a context from the calling function and the * @a data argument supplied with this API. The remaining arguments should be * interpreted as follows: * * If @a is_last_req is true, then the KDC reply contained last-req entries * which unambiguously indicated the password expiration, account expiration, * or both. (If either value was not present, the corresponding argument will * be 0.) Furthermore, a non-zero @a password_expiration should be taken as a * suggestion from the KDC that a warning be displayed. * * If @a is_last_req is false, then @a account_expiration will be 0 and @a * password_expiration will contain the expiration time of either the password * or account, or 0 if no expiration time was indicated in the KDC reply. The * callback should independently decide whether to display a password * expiration warning. * * Note that @a cb may be invoked even if credentials are being acquired for * the kadmin/changepw service in order to change the password. It is the * caller's responsibility to avoid displaying a password expiry warning in * this case. * * @warning Setting an expire callback with this API will cause * krb5_get_init_creds_password() not to send password expiry warnings to the * prompter, as it ordinarily may. * * @version New in 1.9 */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_expire_callback(krb5_context context, krb5_get_init_creds_opt *opt, krb5_expire_callback_func cb, void *data); /** * Set the responder function in initial credential options. * * @param [in] context Library context * @param [in] opt Options structure * @param [in] responder Responder function * @param [in] data Responder data argument * * @version New in 1.11 */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_set_responder(krb5_context context, krb5_get_init_creds_opt *opt, krb5_responder_fn responder, void *data); /** * Get initial credentials using a password. * * @param [in] context Library context * @param [out] creds New credentials * @param [in] client Client principal * @param [in] password Password (or NULL) * @param [in] prompter Prompter function * @param [in] data Prompter callback data * @param [in] start_time Time when ticket becomes valid (0 for now) * @param [in] in_tkt_service Service name of initial credentials (or NULL) * @param [in] k5_gic_options Initial credential options * * This function requests KDC for an initial credentials for @a client using @a * password. If @a password is NULL, a password will be prompted for using @a * prompter if necessary. If @a in_tkt_service is specified, it is parsed as a * principal name (with the realm ignored) and used as the service principal * for the request; otherwise the ticket-granting service is used. * * @sa krb5_verify_init_creds() * * @retval * 0 Success * @retval * EINVAL Invalid argument * @retval * KRB5_KDC_UNREACH Cannot contact any KDC for requested realm * @retval * KRB5_PREAUTH_FAILED Generic Pre-athentication failure * @retval * KRB5_LIBOS_PWDINTR Password read interrupted * @retval * KRB5_REALM_CANT_RESOLVE Cannot resolve network address for KDC in requested realm * @retval * KRB5KDC_ERR_KEY_EXP Password has expired * @retval * KRB5_LIBOS_BADPWDMATCH Password mismatch * @retval * KRB5_CHPW_PWDNULL New password cannot be zero length * @retval * KRB5_CHPW_FAIL Password change failed * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_password(krb5_context context, krb5_creds *creds, krb5_principal client, const char *password, krb5_prompter_fct prompter, void *data, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *k5_gic_options); /** * Retrieve enctype, salt and s2kparams from KDC * * @param [in] context Library context * @param [in] principal Principal whose information is requested * @param [in] opt Initial credential options * @param [out] enctype_out The enctype chosen by KDC * @param [out] salt_out Salt returned from KDC * @param [out] s2kparams_out String-to-key parameters returned from KDC * * Send an initial ticket request for @a principal and extract the encryption * type, salt type, and string-to-key parameters from the KDC response. If the * KDC provides no etype-info, set @a enctype_out to @c ENCTYPE_NULL and set @a * salt_out and @a s2kparams_out to empty. If the KDC etype-info provides no * salt, compute the default salt and place it in @a salt_out. If the KDC * etype-info provides no string-to-key parameters, set @a s2kparams_out to * empty. * * @a opt may be used to specify options which affect the initial request, such * as request encryption types or a FAST armor cache (see * krb5_get_init_creds_opt_set_etype_list() and * krb5_get_init_creds_opt_set_fast_ccache_name()). * * Use krb5_free_data_contents() to free @a salt_out and @a s2kparams_out when * they are no longer needed. * * @version New in 1.17 * * @retval 0 Success * @return A Kerberos error code */ krb5_error_code KRB5_CALLCONV krb5_get_etype_info(krb5_context context, krb5_principal principal, krb5_get_init_creds_opt *opt, krb5_enctype *enctype_out, krb5_data *salt_out, krb5_data *s2kparams_out); struct _krb5_init_creds_context; typedef struct _krb5_init_creds_context *krb5_init_creds_context; #define KRB5_INIT_CREDS_STEP_FLAG_CONTINUE 0x1 /**< More responses needed */ /** * Free an initial credentials context. * * @param [in] context Library context * @param [in] ctx Initial credentials context * * @a context must be the same as the one passed to krb5_init_creds_init() for * this initial credentials context. */ void KRB5_CALLCONV krb5_init_creds_free(krb5_context context, krb5_init_creds_context ctx); /** * Acquire credentials using an initial credentials context. * * @param [in] context Library context * @param [in] ctx Initial credentials context * * This function synchronously obtains credentials using a context created by * krb5_init_creds_init(). On successful return, the credentials can be * retrieved with krb5_init_creds_get_creds(). * * @a context must be the same as the one passed to krb5_init_creds_init() for * this initial credentials context. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_get(krb5_context context, krb5_init_creds_context ctx); /** * Retrieve acquired credentials from an initial credentials context. * * @param [in] context Library context * @param [in] ctx Initial credentials context * @param [out] creds Acquired credentials * * This function copies the acquired initial credentials from @a ctx into @a * creds, after the successful completion of krb5_init_creds_get() or * krb5_init_creds_step(). Use krb5_free_cred_contents() to free @a creds when * it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_get_creds(krb5_context context, krb5_init_creds_context ctx, krb5_creds *creds); /** * Get the last error from KDC from an initial credentials context. * * @param [in] context Library context * @param [in] ctx Initial credentials context * @param [out] error Error from KDC, or NULL if none was received * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_get_error(krb5_context context, krb5_init_creds_context ctx, krb5_error **error); /** * Create a context for acquiring initial credentials. * * @param [in] context Library context * @param [in] client Client principal to get initial creds for * @param [in] prompter Prompter callback * @param [in] data Prompter callback argument * @param [in] start_time Time when credentials become valid (0 for now) * @param [in] options Options structure (NULL for default) * @param [out] ctx New initial credentials context * * This function creates a new context for acquiring initial credentials. Use * krb5_init_creds_free() to free @a ctx when it is no longer needed. * * Any subsequent calls to krb5_init_creds_step(), krb5_init_creds_get(), or * krb5_init_creds_free() for this initial credentials context must use the * same @a context argument as the one passed to this function. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_init(krb5_context context, krb5_principal client, krb5_prompter_fct prompter, void *data, krb5_deltat start_time, krb5_get_init_creds_opt *options, krb5_init_creds_context *ctx); /** * Specify a keytab to use for acquiring initial credentials. * * @param [in] context Library context * @param [in] ctx Initial credentials context * @param [in] keytab Key table handle * * This function supplies a keytab containing the client key for an initial * credentials request. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_set_keytab(krb5_context context, krb5_init_creds_context ctx, krb5_keytab keytab); /** * Get the next KDC request for acquiring initial credentials. * * @param [in] context Library context * @param [in] ctx Initial credentials context * @param [in] in KDC response (empty on the first call) * @param [out] out Next KDC request * @param [out] realm Realm for next KDC request * @param [out] flags Output flags * * This function constructs the next KDC request in an initial credential * exchange, allowing the caller to control the transport of KDC requests and * replies. On the first call, @a in should be set to an empty buffer; on * subsequent calls, it should be set to the KDC's reply to the previous * request. * * If more requests are needed, @a flags will be set to * #KRB5_INIT_CREDS_STEP_FLAG_CONTINUE and the next request will be placed in * @a out. If no more requests are needed, @a flags will not contain * #KRB5_INIT_CREDS_STEP_FLAG_CONTINUE and @a out will be empty. * * If this function returns @c KRB5KRB_ERR_RESPONSE_TOO_BIG, the caller should * transmit the next request using TCP rather than UDP. If this function * returns any other error, the initial credential exchange has failed. * * @a context must be the same as the one passed to krb5_init_creds_init() for * this initial credentials context. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_step(krb5_context context, krb5_init_creds_context ctx, krb5_data *in, krb5_data *out, krb5_data *realm, unsigned int *flags); /** * Set a password for acquiring initial credentials. * * @param [in] context Library context * @param [in] ctx Initial credentials context * @param [in] password Password * * This function supplies a password to be used to construct the client key for * an initial credentials request. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_set_password(krb5_context context, krb5_init_creds_context ctx, const char *password); /** * Specify a service principal for acquiring initial credentials. * * @param [in] context Library context * @param [in] ctx Initial credentials context * @param [in] service Service principal string * * This function supplies a service principal string to acquire initial * credentials for instead of the default krbtgt service. @a service is parsed * as a principal name; any realm part is ignored. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_set_service(krb5_context context, krb5_init_creds_context ctx, const char *service); /** * Retrieve ticket times from an initial credentials context. * * @param [in] context Library context * @param [in] ctx Initial credentials context * @param [out] times Ticket times for acquired credentials * * The initial credentials context must have completed obtaining credentials * via either krb5_init_creds_get() or krb5_init_creds_step(). * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_init_creds_get_times(krb5_context context, krb5_init_creds_context ctx, krb5_ticket_times *times); struct _krb5_tkt_creds_context; typedef struct _krb5_tkt_creds_context *krb5_tkt_creds_context; /** * Create a context to get credentials from a KDC's Ticket Granting Service. * * @param[in] context Library context * @param[in] ccache Credential cache handle * @param[in] creds Input credentials * @param[in] options @ref KRB5_GC options for this request. * @param[out] ctx New TGS request context * * This function prepares to obtain credentials matching @a creds, either by * retrieving them from @a ccache or by making requests to ticket-granting * services beginning with a ticket-granting ticket for the client principal's * realm. * * The resulting TGS acquisition context can be used asynchronously with * krb5_tkt_creds_step() or synchronously with krb5_tkt_creds_get(). See also * krb5_get_credentials() for synchronous use. * * Use krb5_tkt_creds_free() to free @a ctx when it is no longer needed. * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_tkt_creds_init(krb5_context context, krb5_ccache ccache, krb5_creds *creds, krb5_flags options, krb5_tkt_creds_context *ctx); /** * Synchronously obtain credentials using a TGS request context. * * @param[in] context Library context * @param[in] ctx TGS request context * * This function synchronously obtains credentials using a context created by * krb5_tkt_creds_init(). On successful return, the credentials can be * retrieved with krb5_tkt_creds_get_creds(). * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_tkt_creds_get(krb5_context context, krb5_tkt_creds_context ctx); /** * Retrieve acquired credentials from a TGS request context. * * @param[in] context Library context * @param[in] ctx TGS request context * @param[out] creds Acquired credentials * * This function copies the acquired initial credentials from @a ctx into @a * creds, after the successful completion of krb5_tkt_creds_get() or * krb5_tkt_creds_step(). Use krb5_free_cred_contents() to free @a creds when * it is no longer needed. * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_tkt_creds_get_creds(krb5_context context, krb5_tkt_creds_context ctx, krb5_creds *creds); /** * Free a TGS request context. * * @param[in] context Library context * @param[in] ctx TGS request context * * @version New in 1.9 */ void KRB5_CALLCONV krb5_tkt_creds_free(krb5_context context, krb5_tkt_creds_context ctx); #define KRB5_TKT_CREDS_STEP_FLAG_CONTINUE 0x1 /**< More responses needed */ /** * Get the next KDC request in a TGS exchange. * * @param[in] context Library context * @param[in] ctx TGS request context * @param[in] in KDC response (empty on the first call) * @param[out] out Next KDC request * @param[out] realm Realm for next KDC request * @param[out] flags Output flags * * This function constructs the next KDC request for a TGS exchange, allowing * the caller to control the transport of KDC requests and replies. On the * first call, @a in should be set to an empty buffer; on subsequent calls, it * should be set to the KDC's reply to the previous request. * * If more requests are needed, @a flags will be set to * #KRB5_TKT_CREDS_STEP_FLAG_CONTINUE and the next request will be placed in @a * out. If no more requests are needed, @a flags will not contain * #KRB5_TKT_CREDS_STEP_FLAG_CONTINUE and @a out will be empty. * * If this function returns @c KRB5KRB_ERR_RESPONSE_TOO_BIG, the caller should * transmit the next request using TCP rather than UDP. If this function * returns any other error, the TGS exchange has failed. * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_tkt_creds_step(krb5_context context, krb5_tkt_creds_context ctx, krb5_data *in, krb5_data *out, krb5_data *realm, unsigned int *flags); /** * Retrieve ticket times from a TGS request context. * * @param[in] context Library context * @param[in] ctx TGS request context * @param[out] times Ticket times for acquired credentials * * The TGS request context must have completed obtaining credentials via either * krb5_tkt_creds_get() or krb5_tkt_creds_step(). * * @version New in 1.9 * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_tkt_creds_get_times(krb5_context context, krb5_tkt_creds_context ctx, krb5_ticket_times *times); /** * Get initial credentials using a key table. * * @param [in] context Library context * @param [out] creds New credentials * @param [in] client Client principal * @param [in] arg_keytab Key table handle * @param [in] start_time Time when ticket becomes valid (0 for now) * @param [in] in_tkt_service Service name of initial credentials (or NULL) * @param [in] k5_gic_options Initial credential options * * This function requests KDC for an initial credentials for @a client using a * client key stored in @a arg_keytab. If @a in_tkt_service is specified, it * is parsed as a principal name (with the realm ignored) and used as the * service principal for the request; otherwise the ticket-granting service is * used. * * @sa krb5_verify_init_creds() * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_keytab(krb5_context context, krb5_creds *creds, krb5_principal client, krb5_keytab arg_keytab, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *k5_gic_options); typedef struct _krb5_verify_init_creds_opt { krb5_flags flags; int ap_req_nofail; /**< boolean */ } krb5_verify_init_creds_opt; #define KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL 0x0001 /** * Initialize a credential verification options structure. * * @param [in] k5_vic_options Verification options structure */ void KRB5_CALLCONV krb5_verify_init_creds_opt_init(krb5_verify_init_creds_opt *k5_vic_options); /** * Set whether credential verification is required. * * @param [in] k5_vic_options Verification options structure * @param [in] ap_req_nofail Whether to require successful verification * * This function determines how krb5_verify_init_creds() behaves if no keytab * information is available. If @a ap_req_nofail is @c FALSE, verification * will be skipped in this case and krb5_verify_init_creds() will return * successfully. If @a ap_req_nofail is @c TRUE, krb5_verify_init_creds() will * not return successfully unless verification can be performed. * * If this function is not used, the behavior of krb5_verify_init_creds() is * determined through configuration. */ void KRB5_CALLCONV krb5_verify_init_creds_opt_set_ap_req_nofail(krb5_verify_init_creds_opt * k5_vic_options, int ap_req_nofail); /** * Verify initial credentials against a keytab. * * @param [in] context Library context * @param [in] creds Initial credentials to be verified * @param [in] server Server principal (or NULL) * @param [in] keytab Key table (NULL to use default keytab) * @param [in] ccache Credential cache for fetched creds (or NULL) * @param [in] options Verification options (NULL for default options) * * This function attempts to verify that @a creds were obtained from a KDC with * knowledge of a key in @a keytab, or the default keytab if @a keytab is NULL. * If @a server is provided, the highest-kvno key entry for that principal name * is used to verify the credentials; otherwise, all unique "host" service * principals in the keytab are tried. * * If the specified keytab does not exist, or is empty, or cannot be read, or * does not contain an entry for @a server, then credential verification may be * skipped unless configuration demands that it succeed. The caller can * control this behavior by providing a verification options structure; see * krb5_verify_init_creds_opt_init() and * krb5_verify_init_creds_opt_set_ap_req_nofail(). * * If @a ccache is NULL, any additional credentials fetched during the * verification process will be destroyed. If @a ccache points to NULL, a * memory ccache will be created for the additional credentials and returned in * @a ccache. If @a ccache points to a valid credential cache handle, the * additional credentials will be stored in that cache. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_verify_init_creds(krb5_context context, krb5_creds *creds, krb5_principal server, krb5_keytab keytab, krb5_ccache *ccache, krb5_verify_init_creds_opt *options); /** * Get validated credentials from the KDC. * * @param [in] context Library context * @param [out] creds Validated credentials * @param [in] client Client principal name * @param [in] ccache Credential cache * @param [in] in_tkt_service Server principal string (or NULL) * * This function gets a validated credential using a postdated credential from * @a ccache. If @a in_tkt_service is specified, it is parsed (with the realm * part ignored) and used as the server principal of the credential; * otherwise, the ticket-granting service is used. * * If successful, the validated credential is placed in @a creds. * * @sa krb5_get_renewed_creds() * * @retval * 0 Success * @retval * KRB5_NO_2ND_TKT Request missing second ticket * @retval * KRB5_NO_TKT_SUPPLIED Request did not supply a ticket * @retval * KRB5_PRINC_NOMATCH Requested principal and ticket do not match * @retval * KRB5_KDCREP_MODIFIED KDC reply did not match expectations * @retval * KRB5_KDCREP_SKEW Clock skew too great in KDC reply * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_validated_creds(krb5_context context, krb5_creds *creds, krb5_principal client, krb5_ccache ccache, const char *in_tkt_service); /** * Get renewed credential from KDC using an existing credential. * * @param [in] context Library context * @param [out] creds Renewed credentials * @param [in] client Client principal name * @param [in] ccache Credential cache * @param [in] in_tkt_service Server principal string (or NULL) * * This function gets a renewed credential using an existing one from @a * ccache. If @a in_tkt_service is specified, it is parsed (with the realm * part ignored) and used as the server principal of the credential; otherwise, * the ticket-granting service is used. * * If successful, the renewed credential is placed in @a creds. * * @retval * 0 Success * @return * Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_get_renewed_creds(krb5_context context, krb5_creds *creds, krb5_principal client, krb5_ccache ccache, const char *in_tkt_service); /** * Decode an ASN.1-formatted ticket. * * @param [in] code ASN.1-formatted ticket * @param [out] rep Decoded ticket information * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_decode_ticket(const krb5_data *code, krb5_ticket **rep); /** * Retrieve a string value from the appdefaults section of krb5.conf. * * @param [in] context Library context * @param [in] appname Application name * @param [in] realm Realm name * @param [in] option Option to be checked * @param [in] default_value Default value to return if no match is found * @param [out] ret_value String value of @a option * * This function gets the application defaults for @a option based on the given * @a appname and/or @a realm. * * @sa krb5_appdefault_boolean() */ void KRB5_CALLCONV krb5_appdefault_string(krb5_context context, const char *appname, const krb5_data *realm, const char *option, const char *default_value, char ** ret_value); /** * Retrieve a boolean value from the appdefaults section of krb5.conf. * * @param [in] context Library context * @param [in] appname Application name * @param [in] realm Realm name * @param [in] option Option to be checked * @param [in] default_value Default value to return if no match is found * @param [out] ret_value Boolean value of @a option * * This function gets the application defaults for @a option based on the given * @a appname and/or @a realm. * * @sa krb5_appdefault_string() */ void KRB5_CALLCONV krb5_appdefault_boolean(krb5_context context, const char *appname, const krb5_data *realm, const char *option, int default_value, int *ret_value); /* * Prompter enhancements */ /** Prompt for password */ #define KRB5_PROMPT_TYPE_PASSWORD 0x1 /** Prompt for new password (during password change) */ #define KRB5_PROMPT_TYPE_NEW_PASSWORD 0x2 /** Prompt for new password again */ #define KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN 0x3 /** Prompt for preauthentication data (such as an OTP value) */ #define KRB5_PROMPT_TYPE_PREAUTH 0x4 typedef krb5_int32 krb5_prompt_type; /** * Get prompt types array from a context. * * @param [in] context Library context * * @return * Pointer to an array of prompt types corresponding to the prompter's @a * prompts arguments. Each type has one of the following values: * @li #KRB5_PROMPT_TYPE_PASSWORD * @li #KRB5_PROMPT_TYPE_NEW_PASSWORD * @li #KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN * @li #KRB5_PROMPT_TYPE_PREAUTH */ krb5_prompt_type* KRB5_CALLCONV krb5_get_prompt_types(krb5_context context); /* Error reporting */ /** * Set an extended error message for an error code. * * @param [in] ctx Library context * @param [in] code Error code * @param [in] fmt Error string for the error code * @param [in] ... printf(3) style parameters */ void KRB5_CALLCONV_C krb5_set_error_message(krb5_context ctx, krb5_error_code code, const char *fmt, ...) #if !defined(__cplusplus) && (__GNUC__ > 2) __attribute__((__format__(__printf__, 3, 4))) #endif ; /** * Set an extended error message for an error code using a va_list. * * @param [in] ctx Library context * @param [in] code Error code * @param [in] fmt Error string for the error code * @param [in] args List of vprintf(3) style arguments */ void KRB5_CALLCONV krb5_vset_error_message(krb5_context ctx, krb5_error_code code, const char *fmt, va_list args) #if !defined(__cplusplus) && (__GNUC__ > 2) __attribute__((__format__(__printf__, 3, 0))) #endif ; /** * Add a prefix to the message for an error code. * * @param [in] ctx Library context * @param [in] code Error code * @param [in] fmt Format string for error message prefix * @param [in] ... printf(3) style parameters * * Format a message and prepend it to the current message for @a code. The * prefix will be separated from the old message with a colon and space. */ void KRB5_CALLCONV_C krb5_prepend_error_message(krb5_context ctx, krb5_error_code code, const char *fmt, ...) #if !defined(__cplusplus) && (__GNUC__ > 2) __attribute__((__format__(__printf__, 3, 4))) #endif ; /** * Add a prefix to the message for an error code using a va_list. * * @param [in] ctx Library context * @param [in] code Error code * @param [in] fmt Format string for error message prefix * @param [in] args List of vprintf(3) style arguments * * This function is similar to krb5_prepend_error_message(), but uses a * va_list instead of variadic arguments. */ void KRB5_CALLCONV krb5_vprepend_error_message(krb5_context ctx, krb5_error_code code, const char *fmt, va_list args) #if !defined(__cplusplus) && (__GNUC__ > 2) __attribute__((__format__(__printf__, 3, 0))) #endif ; /** * Add a prefix to a different error code's message. * * @param [in] ctx Library context * @param [in] old_code Previous error code * @param [in] code Error code * @param [in] fmt Format string for error message prefix * @param [in] ... printf(3) style parameters * * Format a message and prepend it to the message for @a old_code. The prefix * will be separated from the old message with a colon and space. Set the * resulting message as the extended error message for @a code. */ void KRB5_CALLCONV_C krb5_wrap_error_message(krb5_context ctx, krb5_error_code old_code, krb5_error_code code, const char *fmt, ...) #if !defined(__cplusplus) && (__GNUC__ > 2) __attribute__((__format__(__printf__, 4, 5))) #endif ; /** * Add a prefix to a different error code's message using a va_list. * * @param [in] ctx Library context * @param [in] old_code Previous error code * @param [in] code Error code * @param [in] fmt Format string for error message prefix * @param [in] args List of vprintf(3) style arguments * * This function is similar to krb5_wrap_error_message(), but uses a * va_list instead of variadic arguments. */ void KRB5_CALLCONV krb5_vwrap_error_message(krb5_context ctx, krb5_error_code old_code, krb5_error_code code, const char *fmt, va_list args) #if !defined(__cplusplus) && (__GNUC__ > 2) __attribute__((__format__(__printf__, 4, 0))) #endif ; /** * Copy the most recent extended error message from one context to another. * * @param [in] dest_ctx Library context to copy message to * @param [in] src_ctx Library context with current message */ void KRB5_CALLCONV krb5_copy_error_message(krb5_context dest_ctx, krb5_context src_ctx); /** * Get the (possibly extended) error message for a code. * * @param [in] ctx Library context * @param [in] code Error code * * The behavior of krb5_get_error_message() is only defined the first time it * is called after a failed call to a krb5 function using the same context, and * only when the error code passed in is the same as that returned by the krb5 * function. * * This function never returns NULL, so its result may be used unconditionally * as a C string. * * The string returned by this function must be freed using * krb5_free_error_message() * * @note Future versions may return the same string for the second * and following calls. */ const char * KRB5_CALLCONV krb5_get_error_message(krb5_context ctx, krb5_error_code code); /** * Free an error message generated by krb5_get_error_message(). * * @param [in] ctx Library context * @param [in] msg Pointer to error message */ void KRB5_CALLCONV krb5_free_error_message(krb5_context ctx, const char *msg); /** * Clear the extended error message in a context. * * @param [in] ctx Library context * * This function unsets the extended error message in a context, to ensure that * it is not mistakenly applied to another occurrence of the same error code. */ void KRB5_CALLCONV krb5_clear_error_message(krb5_context ctx); /** * Unwrap authorization data. * * @param [in] context Library context * @param [in] type @ref KRB5_AUTHDATA type of @a container * @param [in] container Authorization data to be decoded * @param [out] authdata List of decoded authorization data * * @sa krb5_encode_authdata_container() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_decode_authdata_container(krb5_context context, krb5_authdatatype type, const krb5_authdata *container, krb5_authdata ***authdata); /** * Wrap authorization data in a container. * * @param [in] context Library context * @param [in] type @ref KRB5_AUTHDATA type of @a container * @param [in] authdata List of authorization data to be encoded * @param [out] container List of encoded authorization data * * The result is returned in @a container as a single-element list. * * @sa krb5_decode_authdata_container() * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_encode_authdata_container(krb5_context context, krb5_authdatatype type, krb5_authdata * const*authdata, krb5_authdata ***container); /* * AD-KDCIssued */ /** * Encode and sign AD-KDCIssued authorization data. * * @param [in] context Library context * @param [in] key Session key * @param [in] issuer The name of the issuing principal * @param [in] authdata List of authorization data to be signed * @param [out] ad_kdcissued List containing AD-KDCIssued authdata * * This function wraps a list of authorization data entries @a authdata in an * AD-KDCIssued container (see RFC 4120 section 5.2.6.2) signed with @a key. * The result is returned in @a ad_kdcissued as a single-element list. */ krb5_error_code KRB5_CALLCONV krb5_make_authdata_kdc_issued(krb5_context context, const krb5_keyblock *key, krb5_const_principal issuer, krb5_authdata *const *authdata, krb5_authdata ***ad_kdcissued); /** * Unwrap and verify AD-KDCIssued authorization data. * * @param [in] context Library context * @param [in] key Session key * @param [in] ad_kdcissued AD-KDCIssued authorization data to be unwrapped * @param [out] issuer Name of issuing principal (or NULL) * @param [out] authdata Unwrapped list of authorization data * * This function unwraps an AD-KDCIssued authdatum (see RFC 4120 section * 5.2.6.2) and verifies its signature against @a key. The issuer field of the * authdatum element is returned in @a issuer, and the unwrapped list of * authdata is returned in @a authdata. */ krb5_error_code KRB5_CALLCONV krb5_verify_authdata_kdc_issued(krb5_context context, const krb5_keyblock *key, const krb5_authdata *ad_kdcissued, krb5_principal *issuer, krb5_authdata ***authdata); /* * Windows PAC */ /* Microsoft defined types of data */ #define KRB5_PAC_LOGON_INFO 1 /**< Logon information */ #define KRB5_PAC_CREDENTIALS_INFO 2 /**< Credentials information */ #define KRB5_PAC_SERVER_CHECKSUM 6 /**< Server checksum */ #define KRB5_PAC_PRIVSVR_CHECKSUM 7 /**< KDC checksum */ #define KRB5_PAC_CLIENT_INFO 10 /**< Client name and ticket info */ #define KRB5_PAC_DELEGATION_INFO 11 /**< Constrained delegation info */ #define KRB5_PAC_UPN_DNS_INFO 12 /**< User principal name and DNS info */ #define KRB5_PAC_CLIENT_CLAIMS 13 /**< Client claims information */ #define KRB5_PAC_DEVICE_INFO 14 /**< Device information */ #define KRB5_PAC_DEVICE_CLAIMS 15 /**< Device claims information */ #define KRB5_PAC_TICKET_CHECKSUM 16 /**< Ticket checksum */ #define KRB5_PAC_ATTRIBUTES_INFO 17 /**< PAC attributes */ #define KRB5_PAC_REQUESTOR 18 /**< PAC requestor SID */ #define KRB5_PAC_FULL_CHECKSUM 19 /**< KDC full checksum */ struct krb5_pac_data; /** PAC data structure to convey authorization information */ typedef struct krb5_pac_data *krb5_pac; /** * Add a buffer to a PAC handle. * * @param [in] context Library context * @param [in] pac PAC handle * @param [in] type Buffer type * @param [in] data contents * * This function adds a buffer of type @a type and contents @a data to @a pac * if there isn't already a buffer of this type present. * * The valid values of @a type is one of the following: * @li #KRB5_PAC_LOGON_INFO - Logon information * @li #KRB5_PAC_CREDENTIALS_INFO - Credentials information * @li #KRB5_PAC_SERVER_CHECKSUM - Server checksum * @li #KRB5_PAC_PRIVSVR_CHECKSUM - KDC checksum * @li #KRB5_PAC_CLIENT_INFO - Client name and ticket information * @li #KRB5_PAC_DELEGATION_INFO - Constrained delegation information * @li #KRB5_PAC_UPN_DNS_INFO - User principal name and DNS information * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_pac_add_buffer(krb5_context context, krb5_pac pac, krb5_ui_4 type, const krb5_data *data); /** * Free a PAC handle. * * @param [in] context Library context * @param [in] pac PAC to be freed * * This function frees the contents of @a pac and the structure itself. */ void KRB5_CALLCONV krb5_pac_free(krb5_context context, krb5_pac pac); /** * Retrieve a buffer value from a PAC. * * @param [in] context Library context * @param [in] pac PAC handle * @param [in] type Type of buffer to retrieve * @param [out] data Buffer value * * Use krb5_free_data_contents() to free @a data when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_pac_get_buffer(krb5_context context, krb5_pac pac, krb5_ui_4 type, krb5_data *data); /** * Return an array of buffer types in a PAC handle. * * @param [in] context Library context * @param [in] pac PAC handle * @param [out] len Number of entries in @a types * @param [out] types Array of buffer types * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_pac_get_types(krb5_context context, krb5_pac pac, size_t *len, krb5_ui_4 **types); /** * Create an empty Privilege Attribute Certificate (PAC) handle. * * @param [in] context Library context * @param [out] pac New PAC handle * * Use krb5_pac_free() to free @a pac when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_pac_init(krb5_context context, krb5_pac *pac); /** * Unparse an encoded PAC into a new handle. * * @param [in] context Library context * @param [in] ptr PAC buffer * @param [in] len Length of @a ptr * @param [out] pac PAC handle * * Use krb5_pac_free() to free @a pac when it is no longer needed. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_pac_parse(krb5_context context, const void *ptr, size_t len, krb5_pac *pac); /** * Verify a PAC. * * @param [in] context Library context * @param [in] pac PAC handle * @param [in] authtime Expected timestamp * @param [in] principal Expected principal name (or NULL) * @param [in] server Key to validate server checksum (or NULL) * @param [in] privsvr Key to validate KDC checksum (or NULL) * * This function validates @a pac against the supplied @a server, @a privsvr, * @a principal and @a authtime. If @a principal is NULL, the principal and * authtime are not verified. If @a server or @a privsvr is NULL, the * corresponding checksum is not verified. * * If successful, @a pac is marked as verified. * * @note A checksum mismatch can occur if the PAC was copied from a cross-realm * TGT by an ignorant KDC; also macOS Server Open Directory (as of 10.6) * generates PACs with no server checksum at all. One should consider not * failing the whole authentication because of this reason, but, instead, * treating the ticket as if it did not contain a PAC or marking the PAC * information as non-verified. * * @retval 0 Success; otherwise - Kerberos error codes */ krb5_error_code KRB5_CALLCONV krb5_pac_verify(krb5_context context, const krb5_pac pac, krb5_timestamp authtime, krb5_const_principal principal, const krb5_keyblock *server, const krb5_keyblock *privsvr); /** * Verify a PAC, possibly from a specified realm. * * @param [in] context Library context * @param [in] pac PAC handle * @param [in] authtime Expected timestamp * @param [in] principal Expected principal name (or NULL) * @param [in] server Key to validate server checksum (or NULL) * @param [in] privsvr Key to validate KDC checksum (or NULL) * @param [in] with_realm If true, expect the realm of @a principal * * This function is similar to krb5_pac_verify(), but adds a parameter * @a with_realm. If @a with_realm is true, the PAC_CLIENT_INFO field is * expected to include the realm of @a principal as well as the name. This * flag is necessary to verify PACs in cross-realm S4U2Self referral TGTs. * * @version New in 1.17 */ krb5_error_code KRB5_CALLCONV krb5_pac_verify_ext(krb5_context context, const krb5_pac pac, krb5_timestamp authtime, krb5_const_principal principal, const krb5_keyblock *server, const krb5_keyblock *privsvr, krb5_boolean with_realm); /** * Verify a PAC, possibly including ticket signature * * @param [in] context Library context * @param [in] enc_tkt Ticket enc-part, possibly containing a PAC * @param [in] server_princ Canonicalized name of ticket server * @param [in] server Key to validate server checksum (or NULL) * @param [in] privsvr Key to validate KDC checksum (or NULL) * @param [out] pac_out Verified PAC (NULL if no PAC included) * * If a PAC is present in @a enc_tkt, verify its signatures. If @a privsvr is * not NULL and @a server_princ is not a krbtgt or kadmin/changepw service, * require a ticket signature over @a enc_tkt in addition to the KDC signature. * Place the verified PAC in @a pac_out. If an invalid PAC signature is found, * return an error matching the Windows KDC protocol code for that condition as * closely as possible. * * If no PAC is present in @a enc_tkt, set @a pac_out to NULL and return * successfully. * * @note This function does not validate the PAC_CLIENT_INFO buffer. If a * specific value is expected, the caller can make a separate call to * krb5_pac_verify_ext() with a principal but no keys. * * @retval 0 Success; otherwise - Kerberos error codes * * @version New in 1.20 */ krb5_error_code KRB5_CALLCONV krb5_kdc_verify_ticket(krb5_context context, const krb5_enc_tkt_part *enc_tkt, krb5_const_principal server_princ, const krb5_keyblock *server, const krb5_keyblock *privsvr, krb5_pac *pac_out); /** @deprecated Use krb5_kdc_sign_ticket() instead. */ krb5_error_code KRB5_CALLCONV krb5_pac_sign(krb5_context context, krb5_pac pac, krb5_timestamp authtime, krb5_const_principal principal, const krb5_keyblock *server_key, const krb5_keyblock *privsvr_key, krb5_data *data); /** @deprecated Use krb5_kdc_sign_ticket() instead. */ krb5_error_code KRB5_CALLCONV krb5_pac_sign_ext(krb5_context context, krb5_pac pac, krb5_timestamp authtime, krb5_const_principal principal, const krb5_keyblock *server_key, const krb5_keyblock *privsvr_key, krb5_boolean with_realm, krb5_data *data); /** * Compatibility function used by IPA if the 1.20 KDB diver API is not * available. It generates PAC signatures, including the extended KDC one when * relevant. * * It is similar to krb5_kdc_sign_ticket(), except it will not generate the * PAC ticket signature, and therefore does not expect encrypted ticket part as * parameter. * * @param [in] context Library context * @param [in] pac PAC handle * @param [in] authtime Expected timestamp * @param [in] client_princ Client principal name (or NULL) * @param [in] server_princ Server principal name * @param [in] server_key Key for server checksum * @param [in] privsvr_key Key for KDC checksum * @param [in] with_realm If true, include the realm of @a client_princ * @param [out] data Signed PAC encoding * * This function signs @a pac using the keys @a server_key and @a privsvr_key * and returns the signed encoding in @a data. @a pac is modified to include * the server and KDC checksum buffers. Use krb5_free_data_contents() to free * @a data when it is no longer needed. * * If @a with_realm is true, the PAC_CLIENT_INFO field of the signed PAC will * include the realm of @a client_princ as well as the name. This flag is * necessary to generate PACs for cross-realm S4U2Self referrals. */ krb5_error_code KRB5_CALLCONV krb5_pac_full_sign_compat(krb5_context context, krb5_pac pac, krb5_timestamp authtime, krb5_const_principal client_princ, krb5_const_principal server_princ, const krb5_keyblock *server_key, const krb5_keyblock *privsvr_key, krb5_boolean with_realm, krb5_data *data); /** * Sign a PAC, possibly including a ticket signature * * @param [in] context Library context * @param [in] enc_tkt The ticket for the signature * @param [in] pac PAC handle * @param [in] server_princ Canonical ticket server name * @param [in] client_princ PAC_CLIENT_INFO principal (or NULL) * @param [in] server Key for server checksum * @param [in] privsvr Key for KDC and ticket checksum * @param [in] with_realm If true, include the realm of @a principal * * Sign @a pac using the keys @a server and @a privsvr. Include a ticket * signature over @a enc_tkt if @a server_princ is not a TGS or kadmin/changepw * principal name. Add the signed PAC's encoding to the authorization data of * @a enc_tkt in the first slot, wrapped in an AD-IF-RELEVANT container. If @a * client_princ is non-null, add a PAC_CLIENT_INFO buffer, including the realm * if @a with_realm is true. * * @retval 0 on success, otherwise - Kerberos error codes * * @version New in 1.20 */ krb5_error_code KRB5_CALLCONV krb5_kdc_sign_ticket(krb5_context context, krb5_enc_tkt_part *enc_tkt, const krb5_pac pac, krb5_const_principal server_princ, krb5_const_principal client_princ, const krb5_keyblock *server, const krb5_keyblock *privsvr, krb5_boolean with_realm); /** * Read client information from a PAC. * * @param [in] context Library context * @param [in] pac PAC handle * @param [out] authtime_out Authentication timestamp (NULL if not needed) * @param [out] princname_out Client account name * * Read the PAC_CLIENT_INFO buffer in @a pac. Place the client account name as * a string in @a princname_out. If @a authtime_out is not NULL, place the * initial authentication timestamp in @a authtime_out. * * @retval 0 on success, ENOENT if no PAC_CLIENT_INFO buffer is present in @a * pac, ERANGE if the buffer contains invalid lengths. * * @version New in 1.18 */ krb5_error_code KRB5_CALLCONV krb5_pac_get_client_info(krb5_context context, const krb5_pac pac, krb5_timestamp *authtime_out, char **princname_out); /** * Allow the application to override the profile's allow_weak_crypto setting. * * @param [in] context Library context * @param [in] enable Boolean flag * * This function allows an application to override the allow_weak_crypto * setting. It is primarily for use by aklog. * * @retval 0 (always) */ krb5_error_code KRB5_CALLCONV krb5_allow_weak_crypto(krb5_context context, krb5_boolean enable); /** * A wrapper for passing information to a @c krb5_trace_callback. * * Currently, it only contains the formatted message as determined * the the format string and arguments of the tracing macro, but it * may be extended to contain more fields in the future. */ typedef struct _krb5_trace_info { const char *message; } krb5_trace_info; typedef void (KRB5_CALLCONV *krb5_trace_callback)(krb5_context context, const krb5_trace_info *info, void *cb_data); /** * Specify a callback function for trace events. * * @param [in] context Library context * @param [in] fn Callback function * @param [in] cb_data Callback data * * Specify a callback for trace events occurring in krb5 operations performed * within @a context. @a fn will be invoked with @a context as the first * argument, @a cb_data as the last argument, and a pointer to a * krb5_trace_info as the second argument. If the trace callback is reset via * this function or @a context is destroyed, @a fn will be invoked with a NULL * second argument so it can clean up @a cb_data. Supply a NULL value for @a * fn to disable trace callbacks within @a context. * * @note This function overrides the information passed through the * @a KRB5_TRACE environment variable. * * @version New in 1.9 * * @return Returns KRB5_TRACE_NOSUPP if tracing is not supported in the library * (unless @a fn is NULL). */ krb5_error_code KRB5_CALLCONV krb5_set_trace_callback(krb5_context context, krb5_trace_callback fn, void *cb_data); /** * Specify a file name for directing trace events. * * @param [in] context Library context * @param [in] filename File name * * Open @a filename for appending (creating it, if necessary) and set up a * callback to write trace events to it. * * @note This function overrides the information passed through the * @a KRB5_TRACE environment variable. * * @version New in 1.9 * * @retval KRB5_TRACE_NOSUPP Tracing is not supported in the library. */ krb5_error_code KRB5_CALLCONV krb5_set_trace_filename(krb5_context context, const char *filename); /** * Hook function for inspecting or modifying messages sent to KDCs. * * @param [in] context Library context * @param [in] data Callback data * @param [in] realm The realm the message will be sent to * @param [in] message The original message to be sent to the KDC * @param [out] new_message_out Optional replacement message to be sent * @param [out] reply_out Optional synthetic reply * * If the hook function returns an error code, the KDC communication will be * aborted and the error code will be returned to the library operation which * initiated the communication. * * If the hook function sets @a reply_out, @a message will not be sent to the * KDC, and the given reply will used instead. * * If the hook function sets @a new_message_out, the given message will be sent * to the KDC in place of @a message. * * If the hook function returns successfully without setting either output, * @a message will be sent to the KDC normally. * * The hook function should use krb5_copy_data() to construct the value for * @a new_message_out or @a reply_out, to ensure that it can be freed correctly * by the library. * * @version New in 1.15 * * @retval 0 Success * @return A Kerberos error code */ typedef krb5_error_code (KRB5_CALLCONV *krb5_pre_send_fn)(krb5_context context, void *data, const krb5_data *realm, const krb5_data *message, krb5_data **new_message_out, krb5_data **new_reply_out); /** * Hook function for inspecting or overriding KDC replies. * * @param [in] context Library context * @param [in] data Callback data * @param [in] code Status of KDC communication * @param [in] realm The realm the reply was received from * @param [in] message The message sent to the realm's KDC * @param [in] reply The reply received from the KDC * @param [out] new_reply_out Optional replacement reply * * If @a code is zero, @a reply contains the reply received from the KDC. The * hook function may return an error code to simulate an error, may synthesize * a different reply by setting @a new_reply_out, or may simply return * successfully to do nothing. * * If @a code is non-zero, KDC communication failed and @a reply should be * ignored. The hook function may return @a code or a different error code, or * may synthesize a reply by setting @a new_reply_out and return successfully. * * The hook function should use krb5_copy_data() to construct the value for * @a new_reply_out, to ensure that it can be freed correctly by the library. * * @version New in 1.15 * * @retval 0 Success * @return A Kerberos error code */ typedef krb5_error_code (KRB5_CALLCONV *krb5_post_recv_fn)(krb5_context context, void *data, krb5_error_code code, const krb5_data *realm, const krb5_data *message, const krb5_data *reply, krb5_data **new_reply_out); /** * Set a KDC pre-send hook function. * * @param [in] context Library context * @param [in] send_hook Hook function (or NULL to disable the hook) * @param [in] data Callback data to be passed to @a send_hook * * @a send_hook will be called before messages are sent to KDCs by library * functions such as krb5_get_credentials(). The hook function may inspect, * override, or synthesize its own reply to the message. * * @version New in 1.15 */ void KRB5_CALLCONV krb5_set_kdc_send_hook(krb5_context context, krb5_pre_send_fn send_hook, void *data); /** * Set a KDC post-receive hook function. * * @param [in] context The library context. * @param [in] recv_hook Hook function (or NULL to disable the hook) * @param [in] data Callback data to be passed to @a recv_hook * * @a recv_hook will be called after a reply is received from a KDC during a * call to a library function such as krb5_get_credentials(). The hook * function may inspect or override the reply. This hook will not be executed * if the pre-send hook returns a synthetic reply. * * @version New in 1.15 */ void KRB5_CALLCONV krb5_set_kdc_recv_hook(krb5_context context, krb5_post_recv_fn recv_hook, void *data); #if defined(TARGET_OS_MAC) && TARGET_OS_MAC # pragma pack(pop) #endif KRB5INT_END_DECLS /* Don't use this! We're going to phase it out. It's just here to keep applications from breaking right away. */ #define krb5_const const #undef KRB5_ATTR_DEPRECATED /** @} */ /* end of KRB5_H group */ #endif /* KRB5_GENERAL__ */ /* * et-h-krb5_err.h: * This file is automatically generated; please do not edit it. */ #include #define KRB5KDC_ERR_NONE (-1765328384L) #define KRB5KDC_ERR_NAME_EXP (-1765328383L) #define KRB5KDC_ERR_SERVICE_EXP (-1765328382L) #define KRB5KDC_ERR_BAD_PVNO (-1765328381L) #define KRB5KDC_ERR_C_OLD_MAST_KVNO (-1765328380L) #define KRB5KDC_ERR_S_OLD_MAST_KVNO (-1765328379L) #define KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN (-1765328378L) #define KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN (-1765328377L) #define KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE (-1765328376L) #define KRB5KDC_ERR_NULL_KEY (-1765328375L) #define KRB5KDC_ERR_CANNOT_POSTDATE (-1765328374L) #define KRB5KDC_ERR_NEVER_VALID (-1765328373L) #define KRB5KDC_ERR_POLICY (-1765328372L) #define KRB5KDC_ERR_BADOPTION (-1765328371L) #define KRB5KDC_ERR_ETYPE_NOSUPP (-1765328370L) #define KRB5KDC_ERR_SUMTYPE_NOSUPP (-1765328369L) #define KRB5KDC_ERR_PADATA_TYPE_NOSUPP (-1765328368L) #define KRB5KDC_ERR_TRTYPE_NOSUPP (-1765328367L) #define KRB5KDC_ERR_CLIENT_REVOKED (-1765328366L) #define KRB5KDC_ERR_SERVICE_REVOKED (-1765328365L) #define KRB5KDC_ERR_TGT_REVOKED (-1765328364L) #define KRB5KDC_ERR_CLIENT_NOTYET (-1765328363L) #define KRB5KDC_ERR_SERVICE_NOTYET (-1765328362L) #define KRB5KDC_ERR_KEY_EXP (-1765328361L) #define KRB5KDC_ERR_PREAUTH_FAILED (-1765328360L) #define KRB5KDC_ERR_PREAUTH_REQUIRED (-1765328359L) #define KRB5KDC_ERR_SERVER_NOMATCH (-1765328358L) #define KRB5KDC_ERR_MUST_USE_USER2USER (-1765328357L) #define KRB5KDC_ERR_PATH_NOT_ACCEPTED (-1765328356L) #define KRB5KDC_ERR_SVC_UNAVAILABLE (-1765328355L) #define KRB5PLACEHOLD_30 (-1765328354L) #define KRB5KRB_AP_ERR_BAD_INTEGRITY (-1765328353L) #define KRB5KRB_AP_ERR_TKT_EXPIRED (-1765328352L) #define KRB5KRB_AP_ERR_TKT_NYV (-1765328351L) #define KRB5KRB_AP_ERR_REPEAT (-1765328350L) #define KRB5KRB_AP_ERR_NOT_US (-1765328349L) #define KRB5KRB_AP_ERR_BADMATCH (-1765328348L) #define KRB5KRB_AP_ERR_SKEW (-1765328347L) #define KRB5KRB_AP_ERR_BADADDR (-1765328346L) #define KRB5KRB_AP_ERR_BADVERSION (-1765328345L) #define KRB5KRB_AP_ERR_MSG_TYPE (-1765328344L) #define KRB5KRB_AP_ERR_MODIFIED (-1765328343L) #define KRB5KRB_AP_ERR_BADORDER (-1765328342L) #define KRB5KRB_AP_ERR_ILL_CR_TKT (-1765328341L) #define KRB5KRB_AP_ERR_BADKEYVER (-1765328340L) #define KRB5KRB_AP_ERR_NOKEY (-1765328339L) #define KRB5KRB_AP_ERR_MUT_FAIL (-1765328338L) #define KRB5KRB_AP_ERR_BADDIRECTION (-1765328337L) #define KRB5KRB_AP_ERR_METHOD (-1765328336L) #define KRB5KRB_AP_ERR_BADSEQ (-1765328335L) #define KRB5KRB_AP_ERR_INAPP_CKSUM (-1765328334L) #define KRB5KRB_AP_PATH_NOT_ACCEPTED (-1765328333L) #define KRB5KRB_ERR_RESPONSE_TOO_BIG (-1765328332L) #define KRB5PLACEHOLD_53 (-1765328331L) #define KRB5PLACEHOLD_54 (-1765328330L) #define KRB5PLACEHOLD_55 (-1765328329L) #define KRB5PLACEHOLD_56 (-1765328328L) #define KRB5PLACEHOLD_57 (-1765328327L) #define KRB5PLACEHOLD_58 (-1765328326L) #define KRB5PLACEHOLD_59 (-1765328325L) #define KRB5KRB_ERR_GENERIC (-1765328324L) #define KRB5KRB_ERR_FIELD_TOOLONG (-1765328323L) #define KRB5KDC_ERR_CLIENT_NOT_TRUSTED (-1765328322L) #define KRB5KDC_ERR_KDC_NOT_TRUSTED (-1765328321L) #define KRB5KDC_ERR_INVALID_SIG (-1765328320L) #define KRB5KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED (-1765328319L) #define KRB5KDC_ERR_CERTIFICATE_MISMATCH (-1765328318L) #define KRB5KRB_AP_ERR_NO_TGT (-1765328317L) #define KRB5KDC_ERR_WRONG_REALM (-1765328316L) #define KRB5KRB_AP_ERR_USER_TO_USER_REQUIRED (-1765328315L) #define KRB5KDC_ERR_CANT_VERIFY_CERTIFICATE (-1765328314L) #define KRB5KDC_ERR_INVALID_CERTIFICATE (-1765328313L) #define KRB5KDC_ERR_REVOKED_CERTIFICATE (-1765328312L) #define KRB5KDC_ERR_REVOCATION_STATUS_UNKNOWN (-1765328311L) #define KRB5KDC_ERR_REVOCATION_STATUS_UNAVAILABLE (-1765328310L) #define KRB5KDC_ERR_CLIENT_NAME_MISMATCH (-1765328309L) #define KRB5KDC_ERR_KDC_NAME_MISMATCH (-1765328308L) #define KRB5KDC_ERR_INCONSISTENT_KEY_PURPOSE (-1765328307L) #define KRB5KDC_ERR_DIGEST_IN_CERT_NOT_ACCEPTED (-1765328306L) #define KRB5KDC_ERR_PA_CHECKSUM_MUST_BE_INCLUDED (-1765328305L) #define KRB5KDC_ERR_DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED (-1765328304L) #define KRB5KDC_ERR_PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED (-1765328303L) #define KRB5PLACEHOLD_82 (-1765328302L) #define KRB5PLACEHOLD_83 (-1765328301L) #define KRB5PLACEHOLD_84 (-1765328300L) #define KRB5KRB_AP_ERR_IAKERB_KDC_NOT_FOUND (-1765328299L) #define KRB5KRB_AP_ERR_IAKERB_KDC_NO_RESPONSE (-1765328298L) #define KRB5PLACEHOLD_87 (-1765328297L) #define KRB5PLACEHOLD_88 (-1765328296L) #define KRB5PLACEHOLD_89 (-1765328295L) #define KRB5KDC_ERR_PREAUTH_EXPIRED (-1765328294L) #define KRB5KDC_ERR_MORE_PREAUTH_DATA_REQUIRED (-1765328293L) #define KRB5PLACEHOLD_92 (-1765328292L) #define KRB5KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTION (-1765328291L) #define KRB5PLACEHOLD_94 (-1765328290L) #define KRB5PLACEHOLD_95 (-1765328289L) #define KRB5PLACEHOLD_96 (-1765328288L) #define KRB5PLACEHOLD_97 (-1765328287L) #define KRB5PLACEHOLD_98 (-1765328286L) #define KRB5PLACEHOLD_99 (-1765328285L) #define KRB5KDC_ERR_NO_ACCEPTABLE_KDF (-1765328284L) #define KRB5PLACEHOLD_101 (-1765328283L) #define KRB5PLACEHOLD_102 (-1765328282L) #define KRB5PLACEHOLD_103 (-1765328281L) #define KRB5PLACEHOLD_104 (-1765328280L) #define KRB5PLACEHOLD_105 (-1765328279L) #define KRB5PLACEHOLD_106 (-1765328278L) #define KRB5PLACEHOLD_107 (-1765328277L) #define KRB5PLACEHOLD_108 (-1765328276L) #define KRB5PLACEHOLD_109 (-1765328275L) #define KRB5PLACEHOLD_110 (-1765328274L) #define KRB5PLACEHOLD_111 (-1765328273L) #define KRB5PLACEHOLD_112 (-1765328272L) #define KRB5PLACEHOLD_113 (-1765328271L) #define KRB5PLACEHOLD_114 (-1765328270L) #define KRB5PLACEHOLD_115 (-1765328269L) #define KRB5PLACEHOLD_116 (-1765328268L) #define KRB5PLACEHOLD_117 (-1765328267L) #define KRB5PLACEHOLD_118 (-1765328266L) #define KRB5PLACEHOLD_119 (-1765328265L) #define KRB5PLACEHOLD_120 (-1765328264L) #define KRB5PLACEHOLD_121 (-1765328263L) #define KRB5PLACEHOLD_122 (-1765328262L) #define KRB5PLACEHOLD_123 (-1765328261L) #define KRB5PLACEHOLD_124 (-1765328260L) #define KRB5PLACEHOLD_125 (-1765328259L) #define KRB5PLACEHOLD_126 (-1765328258L) #define KRB5PLACEHOLD_127 (-1765328257L) #define KRB5_ERR_RCSID (-1765328256L) #define KRB5_LIBOS_BADLOCKFLAG (-1765328255L) #define KRB5_LIBOS_CANTREADPWD (-1765328254L) #define KRB5_LIBOS_BADPWDMATCH (-1765328253L) #define KRB5_LIBOS_PWDINTR (-1765328252L) #define KRB5_PARSE_ILLCHAR (-1765328251L) #define KRB5_PARSE_MALFORMED (-1765328250L) #define KRB5_CONFIG_CANTOPEN (-1765328249L) #define KRB5_CONFIG_BADFORMAT (-1765328248L) #define KRB5_CONFIG_NOTENUFSPACE (-1765328247L) #define KRB5_BADMSGTYPE (-1765328246L) #define KRB5_CC_BADNAME (-1765328245L) #define KRB5_CC_UNKNOWN_TYPE (-1765328244L) #define KRB5_CC_NOTFOUND (-1765328243L) #define KRB5_CC_END (-1765328242L) #define KRB5_NO_TKT_SUPPLIED (-1765328241L) #define KRB5KRB_AP_WRONG_PRINC (-1765328240L) #define KRB5KRB_AP_ERR_TKT_INVALID (-1765328239L) #define KRB5_PRINC_NOMATCH (-1765328238L) #define KRB5_KDCREP_MODIFIED (-1765328237L) #define KRB5_KDCREP_SKEW (-1765328236L) #define KRB5_IN_TKT_REALM_MISMATCH (-1765328235L) #define KRB5_PROG_ETYPE_NOSUPP (-1765328234L) #define KRB5_PROG_KEYTYPE_NOSUPP (-1765328233L) #define KRB5_WRONG_ETYPE (-1765328232L) #define KRB5_PROG_SUMTYPE_NOSUPP (-1765328231L) #define KRB5_REALM_UNKNOWN (-1765328230L) #define KRB5_SERVICE_UNKNOWN (-1765328229L) #define KRB5_KDC_UNREACH (-1765328228L) #define KRB5_NO_LOCALNAME (-1765328227L) #define KRB5_MUTUAL_FAILED (-1765328226L) #define KRB5_RC_TYPE_EXISTS (-1765328225L) #define KRB5_RC_MALLOC (-1765328224L) #define KRB5_RC_TYPE_NOTFOUND (-1765328223L) #define KRB5_RC_UNKNOWN (-1765328222L) #define KRB5_RC_REPLAY (-1765328221L) #define KRB5_RC_IO (-1765328220L) #define KRB5_RC_NOIO (-1765328219L) #define KRB5_RC_PARSE (-1765328218L) #define KRB5_RC_IO_EOF (-1765328217L) #define KRB5_RC_IO_MALLOC (-1765328216L) #define KRB5_RC_IO_PERM (-1765328215L) #define KRB5_RC_IO_IO (-1765328214L) #define KRB5_RC_IO_UNKNOWN (-1765328213L) #define KRB5_RC_IO_SPACE (-1765328212L) #define KRB5_TRANS_CANTOPEN (-1765328211L) #define KRB5_TRANS_BADFORMAT (-1765328210L) #define KRB5_LNAME_CANTOPEN (-1765328209L) #define KRB5_LNAME_NOTRANS (-1765328208L) #define KRB5_LNAME_BADFORMAT (-1765328207L) #define KRB5_CRYPTO_INTERNAL (-1765328206L) #define KRB5_KT_BADNAME (-1765328205L) #define KRB5_KT_UNKNOWN_TYPE (-1765328204L) #define KRB5_KT_NOTFOUND (-1765328203L) #define KRB5_KT_END (-1765328202L) #define KRB5_KT_NOWRITE (-1765328201L) #define KRB5_KT_IOERR (-1765328200L) #define KRB5_NO_TKT_IN_RLM (-1765328199L) #define KRB5DES_BAD_KEYPAR (-1765328198L) #define KRB5DES_WEAK_KEY (-1765328197L) #define KRB5_BAD_ENCTYPE (-1765328196L) #define KRB5_BAD_KEYSIZE (-1765328195L) #define KRB5_BAD_MSIZE (-1765328194L) #define KRB5_CC_TYPE_EXISTS (-1765328193L) #define KRB5_KT_TYPE_EXISTS (-1765328192L) #define KRB5_CC_IO (-1765328191L) #define KRB5_FCC_PERM (-1765328190L) #define KRB5_FCC_NOFILE (-1765328189L) #define KRB5_FCC_INTERNAL (-1765328188L) #define KRB5_CC_WRITE (-1765328187L) #define KRB5_CC_NOMEM (-1765328186L) #define KRB5_CC_FORMAT (-1765328185L) #define KRB5_CC_NOT_KTYPE (-1765328184L) #define KRB5_INVALID_FLAGS (-1765328183L) #define KRB5_NO_2ND_TKT (-1765328182L) #define KRB5_NOCREDS_SUPPLIED (-1765328181L) #define KRB5_SENDAUTH_BADAUTHVERS (-1765328180L) #define KRB5_SENDAUTH_BADAPPLVERS (-1765328179L) #define KRB5_SENDAUTH_BADRESPONSE (-1765328178L) #define KRB5_SENDAUTH_REJECTED (-1765328177L) #define KRB5_PREAUTH_BAD_TYPE (-1765328176L) #define KRB5_PREAUTH_NO_KEY (-1765328175L) #define KRB5_PREAUTH_FAILED (-1765328174L) #define KRB5_RCACHE_BADVNO (-1765328173L) #define KRB5_CCACHE_BADVNO (-1765328172L) #define KRB5_KEYTAB_BADVNO (-1765328171L) #define KRB5_PROG_ATYPE_NOSUPP (-1765328170L) #define KRB5_RC_REQUIRED (-1765328169L) #define KRB5_ERR_BAD_HOSTNAME (-1765328168L) #define KRB5_ERR_HOST_REALM_UNKNOWN (-1765328167L) #define KRB5_SNAME_UNSUPP_NAMETYPE (-1765328166L) #define KRB5KRB_AP_ERR_V4_REPLY (-1765328165L) #define KRB5_REALM_CANT_RESOLVE (-1765328164L) #define KRB5_TKT_NOT_FORWARDABLE (-1765328163L) #define KRB5_FWD_BAD_PRINCIPAL (-1765328162L) #define KRB5_GET_IN_TKT_LOOP (-1765328161L) #define KRB5_CONFIG_NODEFREALM (-1765328160L) #define KRB5_SAM_UNSUPPORTED (-1765328159L) #define KRB5_SAM_INVALID_ETYPE (-1765328158L) #define KRB5_SAM_NO_CHECKSUM (-1765328157L) #define KRB5_SAM_BAD_CHECKSUM (-1765328156L) #define KRB5_KT_NAME_TOOLONG (-1765328155L) #define KRB5_KT_KVNONOTFOUND (-1765328154L) #define KRB5_APPL_EXPIRED (-1765328153L) #define KRB5_LIB_EXPIRED (-1765328152L) #define KRB5_CHPW_PWDNULL (-1765328151L) #define KRB5_CHPW_FAIL (-1765328150L) #define KRB5_KT_FORMAT (-1765328149L) #define KRB5_NOPERM_ETYPE (-1765328148L) #define KRB5_CONFIG_ETYPE_NOSUPP (-1765328147L) #define KRB5_OBSOLETE_FN (-1765328146L) #define KRB5_EAI_FAIL (-1765328145L) #define KRB5_EAI_NODATA (-1765328144L) #define KRB5_EAI_NONAME (-1765328143L) #define KRB5_EAI_SERVICE (-1765328142L) #define KRB5_ERR_NUMERIC_REALM (-1765328141L) #define KRB5_ERR_BAD_S2K_PARAMS (-1765328140L) #define KRB5_ERR_NO_SERVICE (-1765328139L) #define KRB5_CC_READONLY (-1765328138L) #define KRB5_CC_NOSUPP (-1765328137L) #define KRB5_DELTAT_BADFORMAT (-1765328136L) #define KRB5_PLUGIN_NO_HANDLE (-1765328135L) #define KRB5_PLUGIN_OP_NOTSUPP (-1765328134L) #define KRB5_ERR_INVALID_UTF8 (-1765328133L) #define KRB5_ERR_FAST_REQUIRED (-1765328132L) #define KRB5_LOCAL_ADDR_REQUIRED (-1765328131L) #define KRB5_REMOTE_ADDR_REQUIRED (-1765328130L) #define KRB5_TRACE_NOSUPP (-1765328129L) extern const struct error_table et_krb5_error_table; extern void initialize_krb5_error_table(void); /* For compatibility with Heimdal */ extern void initialize_krb5_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_krb5 (-1765328384L) /* for compatibility with older versions... */ #define init_krb5_err_tbl initialize_krb5_error_table #define krb5_err_base ERROR_TABLE_BASE_krb5 /* * et-h-k5e1_err.h: * This file is automatically generated; please do not edit it. */ #include #define KRB5_PLUGIN_VER_NOTSUPP (-1750600192L) #define KRB5_PLUGIN_BAD_MODULE_SPEC (-1750600191L) #define KRB5_PLUGIN_NAME_NOTFOUND (-1750600190L) #define KRB5KDC_ERR_DISCARD (-1750600189L) #define KRB5_DCC_CANNOT_CREATE (-1750600188L) #define KRB5_KCC_INVALID_ANCHOR (-1750600187L) #define KRB5_KCC_UNKNOWN_VERSION (-1750600186L) #define KRB5_KCC_INVALID_UID (-1750600185L) #define KRB5_KCM_MALFORMED_REPLY (-1750600184L) #define KRB5_KCM_RPC_ERROR (-1750600183L) #define KRB5_KCM_REPLY_TOO_BIG (-1750600182L) #define KRB5_KCM_NO_SERVER (-1750600181L) #define KRB5_CERTAUTH_HWAUTH (-1750600180L) extern const struct error_table et_k5e1_error_table; extern void initialize_k5e1_error_table(void); /* For compatibility with Heimdal */ extern void initialize_k5e1_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_k5e1 (-1750600192L) /* for compatibility with older versions... */ #define init_k5e1_err_tbl initialize_k5e1_error_table #define k5e1_err_base ERROR_TABLE_BASE_k5e1 /* * et-h-kdb5_err.h: * This file is automatically generated; please do not edit it. */ #include #define KRB5_KDB_RCSID (-1780008448L) #define KRB5_KDB_INUSE (-1780008447L) #define KRB5_KDB_UK_SERROR (-1780008446L) #define KRB5_KDB_UK_RERROR (-1780008445L) #define KRB5_KDB_UNAUTH (-1780008444L) #define KRB5_KDB_NOENTRY (-1780008443L) #define KRB5_KDB_ILL_WILDCARD (-1780008442L) #define KRB5_KDB_DB_INUSE (-1780008441L) #define KRB5_KDB_DB_CHANGED (-1780008440L) #define KRB5_KDB_TRUNCATED_RECORD (-1780008439L) #define KRB5_KDB_RECURSIVELOCK (-1780008438L) #define KRB5_KDB_NOTLOCKED (-1780008437L) #define KRB5_KDB_BADLOCKMODE (-1780008436L) #define KRB5_KDB_DBNOTINITED (-1780008435L) #define KRB5_KDB_DBINITED (-1780008434L) #define KRB5_KDB_ILLDIRECTION (-1780008433L) #define KRB5_KDB_NOMASTERKEY (-1780008432L) #define KRB5_KDB_BADMASTERKEY (-1780008431L) #define KRB5_KDB_INVALIDKEYSIZE (-1780008430L) #define KRB5_KDB_CANTREAD_STORED (-1780008429L) #define KRB5_KDB_BADSTORED_MKEY (-1780008428L) #define KRB5_KDB_NOACTMASTERKEY (-1780008427L) #define KRB5_KDB_KVNONOMATCH (-1780008426L) #define KRB5_KDB_STORED_MKEY_NOTCURRENT (-1780008425L) #define KRB5_KDB_CANTLOCK_DB (-1780008424L) #define KRB5_KDB_DB_CORRUPT (-1780008423L) #define KRB5_KDB_BAD_VERSION (-1780008422L) #define KRB5_KDB_BAD_SALTTYPE (-1780008421L) #define KRB5_KDB_BAD_ENCTYPE (-1780008420L) #define KRB5_KDB_BAD_CREATEFLAGS (-1780008419L) #define KRB5_KDB_NO_PERMITTED_KEY (-1780008418L) #define KRB5_KDB_NO_MATCHING_KEY (-1780008417L) #define KRB5_KDB_DBTYPE_NOTFOUND (-1780008416L) #define KRB5_KDB_DBTYPE_NOSUP (-1780008415L) #define KRB5_KDB_DBTYPE_INIT (-1780008414L) #define KRB5_KDB_SERVER_INTERNAL_ERR (-1780008413L) #define KRB5_KDB_ACCESS_ERROR (-1780008412L) #define KRB5_KDB_INTERNAL_ERROR (-1780008411L) #define KRB5_KDB_CONSTRAINT_VIOLATION (-1780008410L) #define KRB5_LOG_CONV (-1780008409L) #define KRB5_LOG_UNSTABLE (-1780008408L) #define KRB5_LOG_CORRUPT (-1780008407L) #define KRB5_LOG_ERROR (-1780008406L) #define KRB5_KDB_DBTYPE_MISMATCH (-1780008405L) #define KRB5_KDB_POLICY_REF (-1780008404L) #define KRB5_KDB_STRINGS_TOOLONG (-1780008403L) extern const struct error_table et_kdb5_error_table; extern void initialize_kdb5_error_table(void); /* For compatibility with Heimdal */ extern void initialize_kdb5_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_kdb5 (-1780008448L) /* for compatibility with older versions... */ #define init_kdb5_err_tbl initialize_kdb5_error_table #define kdb5_err_base ERROR_TABLE_BASE_kdb5 /* * et-h-kv5m_err.h: * This file is automatically generated; please do not edit it. */ #include #define KV5M_NONE (-1760647424L) #define KV5M_PRINCIPAL (-1760647423L) #define KV5M_DATA (-1760647422L) #define KV5M_KEYBLOCK (-1760647421L) #define KV5M_CHECKSUM (-1760647420L) #define KV5M_ENCRYPT_BLOCK (-1760647419L) #define KV5M_ENC_DATA (-1760647418L) #define KV5M_CRYPTOSYSTEM_ENTRY (-1760647417L) #define KV5M_CS_TABLE_ENTRY (-1760647416L) #define KV5M_CHECKSUM_ENTRY (-1760647415L) #define KV5M_AUTHDATA (-1760647414L) #define KV5M_TRANSITED (-1760647413L) #define KV5M_ENC_TKT_PART (-1760647412L) #define KV5M_TICKET (-1760647411L) #define KV5M_AUTHENTICATOR (-1760647410L) #define KV5M_TKT_AUTHENT (-1760647409L) #define KV5M_CREDS (-1760647408L) #define KV5M_LAST_REQ_ENTRY (-1760647407L) #define KV5M_PA_DATA (-1760647406L) #define KV5M_KDC_REQ (-1760647405L) #define KV5M_ENC_KDC_REP_PART (-1760647404L) #define KV5M_KDC_REP (-1760647403L) #define KV5M_ERROR (-1760647402L) #define KV5M_AP_REQ (-1760647401L) #define KV5M_AP_REP (-1760647400L) #define KV5M_AP_REP_ENC_PART (-1760647399L) #define KV5M_RESPONSE (-1760647398L) #define KV5M_SAFE (-1760647397L) #define KV5M_PRIV (-1760647396L) #define KV5M_PRIV_ENC_PART (-1760647395L) #define KV5M_CRED (-1760647394L) #define KV5M_CRED_INFO (-1760647393L) #define KV5M_CRED_ENC_PART (-1760647392L) #define KV5M_PWD_DATA (-1760647391L) #define KV5M_ADDRESS (-1760647390L) #define KV5M_KEYTAB_ENTRY (-1760647389L) #define KV5M_CONTEXT (-1760647388L) #define KV5M_OS_CONTEXT (-1760647387L) #define KV5M_ALT_METHOD (-1760647386L) #define KV5M_ETYPE_INFO_ENTRY (-1760647385L) #define KV5M_DB_CONTEXT (-1760647384L) #define KV5M_AUTH_CONTEXT (-1760647383L) #define KV5M_KEYTAB (-1760647382L) #define KV5M_RCACHE (-1760647381L) #define KV5M_CCACHE (-1760647380L) #define KV5M_PREAUTH_OPS (-1760647379L) #define KV5M_SAM_CHALLENGE (-1760647378L) #define KV5M_SAM_CHALLENGE_2 (-1760647377L) #define KV5M_SAM_KEY (-1760647376L) #define KV5M_ENC_SAM_RESPONSE_ENC (-1760647375L) #define KV5M_ENC_SAM_RESPONSE_ENC_2 (-1760647374L) #define KV5M_SAM_RESPONSE (-1760647373L) #define KV5M_SAM_RESPONSE_2 (-1760647372L) #define KV5M_PREDICTED_SAM_RESPONSE (-1760647371L) #define KV5M_PASSWD_PHRASE_ELEMENT (-1760647370L) #define KV5M_GSS_OID (-1760647369L) #define KV5M_GSS_QUEUE (-1760647368L) #define KV5M_FAST_ARMORED_REQ (-1760647367L) #define KV5M_FAST_REQ (-1760647366L) #define KV5M_FAST_RESPONSE (-1760647365L) #define KV5M_AUTHDATA_CONTEXT (-1760647364L) extern const struct error_table et_kv5m_error_table; extern void initialize_kv5m_error_table(void); /* For compatibility with Heimdal */ extern void initialize_kv5m_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_kv5m (-1760647424L) /* for compatibility with older versions... */ #define init_kv5m_err_tbl initialize_kv5m_error_table #define kv5m_err_base ERROR_TABLE_BASE_kv5m /* * et-h-krb524_err.h: * This file is automatically generated; please do not edit it. */ #include #define KRB524_BADKEY (-1750206208L) #define KRB524_BADADDR (-1750206207L) #define KRB524_BADPRINC (-1750206206L) #define KRB524_BADREALM (-1750206205L) #define KRB524_V4ERR (-1750206204L) #define KRB524_ENCFULL (-1750206203L) #define KRB524_DECEMPTY (-1750206202L) #define KRB524_NOTRESP (-1750206201L) #define KRB524_KRB4_DISABLED (-1750206200L) extern const struct error_table et_k524_error_table; extern void initialize_k524_error_table(void); /* For compatibility with Heimdal */ extern void initialize_k524_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_k524 (-1750206208L) /* for compatibility with older versions... */ #define init_k524_err_tbl initialize_k524_error_table #define k524_err_base ERROR_TABLE_BASE_k524 /* * et-h-asn1_err.h: * This file is automatically generated; please do not edit it. */ #include #define ASN1_BAD_TIMEFORMAT (1859794432L) #define ASN1_MISSING_FIELD (1859794433L) #define ASN1_MISPLACED_FIELD (1859794434L) #define ASN1_TYPE_MISMATCH (1859794435L) #define ASN1_OVERFLOW (1859794436L) #define ASN1_OVERRUN (1859794437L) #define ASN1_BAD_ID (1859794438L) #define ASN1_BAD_LENGTH (1859794439L) #define ASN1_BAD_FORMAT (1859794440L) #define ASN1_PARSE_ERROR (1859794441L) #define ASN1_BAD_GMTIME (1859794442L) #define ASN1_MISMATCH_INDEF (1859794443L) #define ASN1_MISSING_EOC (1859794444L) #define ASN1_OMITTED (1859794445L) extern const struct error_table et_asn1_error_table; extern void initialize_asn1_error_table(void); /* For compatibility with Heimdal */ extern void initialize_asn1_error_table_r(struct et_list **list); #define ERROR_TABLE_BASE_asn1 (1859794432L) /* for compatibility with older versions... */ #define init_asn1_err_tbl initialize_asn1_error_table #define asn1_err_base ERROR_TABLE_BASE_asn1 #endif /* KRB5_KRB5_H_INCLUDED */ PKZELkrb5/localauth_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2013 by the Massachusetts Institute of Technology. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Declarations for localauth plugin module implementors. * * The localauth pluggable interface currently has only one supported major * version, which is 1. Major version 1 has a current minor version number of * 1. * * Localauth plugin modules should define a function named * localauth__initvt, matching the signature: * * krb5_error_code * localauth_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to krb5_localauth_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_LOCALAUTH_PLUGIN_H #define KRB5_LOCALAUTH_PLUGIN_H #include #include /* An abstract type for localauth module data. */ typedef struct krb5_localauth_moddata_st *krb5_localauth_moddata; /*** Method type declarations ***/ /* Optional: Initialize module data. */ typedef krb5_error_code (*krb5_localauth_init_fn)(krb5_context context, krb5_localauth_moddata *data); /* Optional: Release resources used by module data. */ typedef void (*krb5_localauth_fini_fn)(krb5_context context, krb5_localauth_moddata data); /* * Optional: Determine whether aname is authorized to log in as the local * account lname. Return 0 if aname is authorized, EPERM if aname is * authoritatively not authorized, KRB5_PLUGIN_NO_HANDLE if the module cannot * determine whether aname is authorized, and any other error code for a * serious failure to process the request. aname will be considered authorized * if at least one module returns 0 and all other modules return * KRB5_PLUGIN_NO_HANDLE. */ typedef krb5_error_code (*krb5_localauth_userok_fn)(krb5_context context, krb5_localauth_moddata data, krb5_const_principal aname, const char *lname); /* * Optional (mandatory if an2ln_types is set): Determine the local account name * corresponding to aname. Return 0 and set *lname_out if a mapping can be * determined; the contents of *lname_out will later be released with a call to * the module's free_string method. Return KRB5_LNAME_NOTRANS if no mapping * can be determined. Return any other error code for a serious failure to * process the request; this will halt the krb5_aname_to_localname operation. * * If the module's an2ln_types field is set, this method will only be invoked * when a profile "auth_to_local" value references one of the module's types. * type and residual will be set to the type and residual of the auth_to_local * value. * * If the module's an2ln_types field is not set but the an2ln method is * implemented, this method will be invoked independently of the profile's * auth_to_local settings, with type and residual set to NULL. If multiple * modules are registered with an2ln methods but no an2ln_types field, the * order of invocation is not defined, but all such modules will be consulted * before the built-in mechanisms are tried. */ typedef krb5_error_code (*krb5_localauth_an2ln_fn)(krb5_context context, krb5_localauth_moddata data, const char *type, const char *residual, krb5_const_principal aname, char **lname_out); /* * Optional (mandatory if an2ln is implemented): Release the memory returned by * an invocation of an2ln. */ typedef void (*krb5_localauth_free_string_fn)(krb5_context context, krb5_localauth_moddata data, char *str); /* localauth vtable for major version 1. */ typedef struct krb5_localauth_vtable_st { const char *name; /* Mandatory: name of module. */ const char **an2ln_types; /* Optional: uppercase auth_to_local types */ krb5_localauth_init_fn init; krb5_localauth_fini_fn fini; krb5_localauth_userok_fn userok; krb5_localauth_an2ln_fn an2ln; krb5_localauth_free_string_fn free_string; /* Minor version 1 ends here. */ } *krb5_localauth_vtable; #endif /* KRB5_LOCALAUTH_PLUGIN_H */ PKZ?krb5/kdcpolicy_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* include/krb5/kdcpolicy_plugin.h - KDC policy plugin interface */ /* * Copyright (C) 2017 by Red Hat, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Declarations for kdcpolicy plugin module implementors. * * The kdcpolicy pluggable interface currently has only one supported major * version, which is 1. Major version 1 has a current minor version number of * 1. * * kdcpolicy plugin modules should define a function named * kdcpolicy__initvt, matching the signature: * * krb5_error_code * kdcpolicy_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to krb5_kdcpolicy_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_POLICY_PLUGIN_H #define KRB5_POLICY_PLUGIN_H #include /* Abstract module datatype. */ typedef struct krb5_kdcpolicy_moddata_st *krb5_kdcpolicy_moddata; /* A module can optionally include kdb.h to inspect principal entries when * authorizing requests. */ struct _krb5_db_entry_new; /* * Optional: Initialize module data. Return 0 on success, * KRB5_PLUGIN_NO_HANDLE if the module is inoperable (due to configuration, for * example), and any other error code to abort KDC startup. Optionally set * *data_out to a module data object to be passed to future calls. */ typedef krb5_error_code (*krb5_kdcpolicy_init_fn)(krb5_context context, krb5_kdcpolicy_moddata *data_out); /* Optional: Clean up module data. */ typedef krb5_error_code (*krb5_kdcpolicy_fini_fn)(krb5_context context, krb5_kdcpolicy_moddata moddata); /* * Optional: return an error code and set status to an appropriate string * literal to deny an AS request; otherwise return 0. lifetime_out, if set, * restricts the ticket lifetime. renew_lifetime_out, if set, restricts the * ticket renewable lifetime. */ typedef krb5_error_code (*krb5_kdcpolicy_check_as_fn)(krb5_context context, krb5_kdcpolicy_moddata moddata, const krb5_kdc_req *request, const struct _krb5_db_entry_new *client, const struct _krb5_db_entry_new *server, const char *const *auth_indicators, const char **status, krb5_deltat *lifetime_out, krb5_deltat *renew_lifetime_out); /* * Optional: return an error code and set status to an appropriate string * literal to deny a TGS request; otherwise return 0. lifetime_out, if set, * restricts the ticket lifetime. renew_lifetime_out, if set, restricts the * ticket renewable lifetime. */ typedef krb5_error_code (*krb5_kdcpolicy_check_tgs_fn)(krb5_context context, krb5_kdcpolicy_moddata moddata, const krb5_kdc_req *request, const struct _krb5_db_entry_new *server, const krb5_ticket *ticket, const char *const *auth_indicators, const char **status, krb5_deltat *lifetime_out, krb5_deltat *renew_lifetime_out); typedef struct krb5_kdcpolicy_vtable_st { const char *name; krb5_kdcpolicy_init_fn init; krb5_kdcpolicy_fini_fn fini; krb5_kdcpolicy_check_as_fn check_as; krb5_kdcpolicy_check_tgs_fn check_tgs; } *krb5_kdcpolicy_vtable; #endif /* KRB5_POLICY_PLUGIN_H */ PKZpF0"uukrb5/ccselect_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2011 by the Massachusetts Institute of Technology. * All rights reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ /* * Declarations for credential cache selection module implementors. * * The ccselect pluggable interface currently has only one supported major * version, which is 1. Major version 1 has a current minor version number of * 1. * * Credential cache selection modules should define a function named * ccselect__initvt, matching the signature: * * krb5_error_code * ccselect_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to krb5_ccselect_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_CCSELECT_PLUGIN_H #define KRB5_CCSELECT_PLUGIN_H #include #include /* An abstract type for credential cache selection module data. */ typedef struct krb5_ccselect_moddata_st *krb5_ccselect_moddata; #define KRB5_CCSELECT_PRIORITY_AUTHORITATIVE 2 #define KRB5_CCSELECT_PRIORITY_HEURISTIC 1 /*** Method type declarations ***/ /* * Mandatory: Initialize module data and set *priority_out to one of the * KRB5_CCSELECT_PRIORITY constants above. Authoritative modules will be * consulted before heuristic ones. */ typedef krb5_error_code (*krb5_ccselect_init_fn)(krb5_context context, krb5_ccselect_moddata *data_out, int *priority_out); /* * Mandatory: Select a cache based on a server principal. Return 0 on success, * with *cache_out set to the selected cache and *princ_out set to its default * principal. Return KRB5_PLUGIN_NO_HANDLE to defer to other modules. Return * KRB5_CC_NOTFOUND with *princ_out set if the client principal can be * authoritatively determined but no cache exists for it. Return other errors * as appropriate. */ typedef krb5_error_code (*krb5_ccselect_choose_fn)(krb5_context context, krb5_ccselect_moddata data, krb5_principal server, krb5_ccache *cache_out, krb5_principal *princ_out); /* Optional: Release resources used by module data. */ typedef void (*krb5_ccselect_fini_fn)(krb5_context context, krb5_ccselect_moddata data); /*** vtable declarations **/ /* Credential cache selection plugin vtable for major version 1. */ typedef struct krb5_ccselect_vtable_st { const char *name; /* Mandatory: name of module. */ krb5_ccselect_init_fn init; krb5_ccselect_choose_fn choose; krb5_ccselect_fini_fn fini; /* Minor version 1 ends here. */ } *krb5_ccselect_vtable; #endif /* KRB5_CCSELECT_PLUGIN_H */ PKZq*-4TTkrb5/hostrealm_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2013 by the Massachusetts Institute of Technology. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Declarations for hostrealm plugin module implementors. * * The hostrealm pluggable interface currently has only one supported major * version, which is 1. Major version 1 has a current minor version number of * 1. * * Hostrealm plugin modules should define a function named * hostrealm__initvt, matching the signature: * * krb5_error_code * hostrealm_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to krb5_hostrealm_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_HOSTREALM_PLUGIN_H #define KRB5_HOSTREALM_PLUGIN_H #include #include /* An abstract type for hostrealm module data. */ typedef struct krb5_hostrealm_moddata_st *krb5_hostrealm_moddata; /*** Method type declarations ***/ /* Optional: Initialize module data. */ typedef krb5_error_code (*krb5_hostrealm_init_fn)(krb5_context context, krb5_hostrealm_moddata *data); /* * Optional: Determine the possible realms of a hostname, using only secure, * authoritative mechanisms (ones which should be used prior to trying * referrals when getting a service ticket). Return success with a * null-terminated list of realms in *realms_out, KRB5_PLUGIN_NO_HANDLE to * defer to later modules, or another error to terminate processing. */ typedef krb5_error_code (*krb5_hostrealm_host_realm_fn)(krb5_context context, krb5_hostrealm_moddata data, const char *host, char ***realms_out); /* * Optional: Determine the possible realms of a hostname, using heuristic or * less secure mechanisms (ones which should be used after trying referrals * when getting a service ticket). Return success with a null-terminated list * of realms in *realms_out, KRB5_PLUGIN_NO_HANDLE to defer to later modules, * or another error to terminate processing. */ typedef krb5_error_code (*krb5_hostrealm_fallback_realm_fn)(krb5_context context, krb5_hostrealm_moddata data, const char *host, char ***realms_out); /* * Optional: Determine the possible default realms of the local host. Return * success with a null-terminated list of realms in *realms_out, * KRB5_PLUGIN_NO_HANDLE to defer to later modules, or another error to * terminate processing. */ typedef krb5_error_code (*krb5_hostrealm_default_realm_fn)(krb5_context context, krb5_hostrealm_moddata data, char ***realms_out); /* * Mandatory (if any of the query methods are implemented): Release the memory * returned by one of the interface methods. */ typedef void (*krb5_hostrealm_free_list_fn)(krb5_context context, krb5_hostrealm_moddata data, char **list); /* Optional: Release resources used by module data. */ typedef void (*krb5_hostrealm_fini_fn)(krb5_context context, krb5_hostrealm_moddata data); /* hostrealm vtable for major version 1. */ typedef struct krb5_hostrealm_vtable_st { const char *name; /* Mandatory: name of module. */ krb5_hostrealm_init_fn init; krb5_hostrealm_fini_fn fini; krb5_hostrealm_host_realm_fn host_realm; krb5_hostrealm_fallback_realm_fn fallback_realm; krb5_hostrealm_default_realm_fn default_realm; krb5_hostrealm_free_list_fn free_list; /* Minor version 1 ends here. */ } *krb5_hostrealm_vtable; #endif /* KRB5_HOSTREALM_PLUGIN_H */ PKZ]_a** krb5/plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2010 by the Massachusetts Institute of Technology. * All rights reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ /* Generic declarations for dynamic modules implementing krb5 plugin * modules. */ #ifndef KRB5_PLUGIN_H #define KRB5_PLUGIN_H /* krb5_plugin_vtable is an abstract type. Module initvt functions will cast * it to the appropriate interface-specific vtable type. */ typedef struct krb5_plugin_vtable_st *krb5_plugin_vtable; /* * krb5_plugin_initvt_fn is the type of all module initvt functions. Based on * the maj_ver argument, the initvt function should cast vtable to the * appropriate type and then fill it in. If a vtable has been expanded, * min_ver indicates which version of the vtable is being filled in. */ typedef krb5_error_code (*krb5_plugin_initvt_fn)(krb5_context context, int maj_ver, int min_ver, krb5_plugin_vtable vtable); #endif /* KRB5_PLUGIN_H */ PKZEx<<krb5/clpreauth_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (c) 2006 Red Hat, Inc. * Portions copyright (c) 2006, 2011 Massachusetts Institute of Technology * All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Red Hat, Inc., nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Declarations for clpreauth plugin module implementors. * * The clpreauth interface has a single supported major version, which is * 1. Major version 1 has a current minor version of 2. clpreauth modules * should define a function named clpreauth__initvt, matching * the signature: * * krb5_error_code * clpreauth_modname_initvt(krb5_context context, int maj_ver, * int min_ver, krb5_plugin_vtable vtable); * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for the interface and maj_ver: * maj_ver == 1: Cast to krb5_clpreauth_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_CLPREAUTH_PLUGIN_H #define KRB5_CLPREAUTH_PLUGIN_H #include #include /* clpreauth mechanism property flags */ /* Provides a real answer which we can send back to the KDC. The client * assumes that one real answer will be enough. */ #define PA_REAL 0x00000001 /* Doesn't provide a real answer, but must be given a chance to run before any * REAL mechanism callbacks. */ #define PA_INFO 0x00000002 /* Abstract type for a client request information handle. */ typedef struct krb5_clpreauth_rock_st *krb5_clpreauth_rock; /* Abstract types for module data and per-request module data. */ typedef struct krb5_clpreauth_moddata_st *krb5_clpreauth_moddata; typedef struct krb5_clpreauth_modreq_st *krb5_clpreauth_modreq; /* Before using a callback after version 1, modules must check the vers * field of the callback structure. */ typedef struct krb5_clpreauth_callbacks_st { int vers; /* * If an AS-REP has been received, return the enctype of the AS-REP * encrypted part. Otherwise return the enctype chosen from etype-info, or * the first requested enctype if no etype-info was received. */ krb5_enctype (*get_etype)(krb5_context context, krb5_clpreauth_rock rock); /* Get a pointer to the FAST armor key, or NULL if the client is not using * FAST. The returned pointer is an alias and should not be freed. */ krb5_keyblock *(*fast_armor)(krb5_context context, krb5_clpreauth_rock rock); /* * Get a pointer to the client-supplied reply key, possibly invoking the * prompter to ask for a password if this has not already been done. The * returned pointer is an alias and should not be freed. */ krb5_error_code (*get_as_key)(krb5_context context, krb5_clpreauth_rock rock, krb5_keyblock **keyblock); /* Replace the reply key to be used to decrypt the AS response. */ krb5_error_code (*set_as_key)(krb5_context context, krb5_clpreauth_rock rock, const krb5_keyblock *keyblock); /* End of version 1 clpreauth callbacks. */ /* * Get the current time for use in a preauth response. If * allow_unauth_time is true and the library has been configured to allow * it, the current time will be offset using unauthenticated timestamp * information received from the KDC in the preauth-required error, if one * has been received. Otherwise, the timestamp in a preauth-required error * will only be used if it is protected by a FAST channel. Only set * allow_unauth_time if using an unauthenticated time offset would not * create a security issue. */ krb5_error_code (*get_preauth_time)(krb5_context context, krb5_clpreauth_rock rock, krb5_boolean allow_unauth_time, krb5_timestamp *time_out, krb5_int32 *usec_out); /* Set a question to be answered by the responder and optionally provide * a challenge. */ krb5_error_code (*ask_responder_question)(krb5_context context, krb5_clpreauth_rock rock, const char *question, const char *challenge); /* Get an answer from the responder, or NULL if the question was * unanswered. */ const char *(*get_responder_answer)(krb5_context context, krb5_clpreauth_rock rock, const char *question); /* Indicate interest in the AS key through the responder interface. */ void (*need_as_key)(krb5_context context, krb5_clpreauth_rock rock); /* * Get a configuration/state item from an input ccache, which may allow it * to retrace the steps it took last time. The returned data string is an * alias and should not be freed. */ const char *(*get_cc_config)(krb5_context context, krb5_clpreauth_rock rock, const char *key); /* * Set a configuration/state item which will be recorded to an output * ccache, if the calling application supplied one. Both key and data * should be valid UTF-8 text. */ krb5_error_code (*set_cc_config)(krb5_context context, krb5_clpreauth_rock rock, const char *key, const char *data); /* End of version 2 clpreauth callbacks (added in 1.11). */ /* * Prevent further fallbacks to other preauth mechanisms if the KDC replies * with an error. (The module itself can still respond to errors with its * tryagain method, or continue after KDC_ERR_MORE_PREAUTH_DATA_REQUIRED * errors with its process method.) A module should invoke this callback * from the process method when it generates an authenticated request using * credentials; often this will be the first or only client message * generated by the mechanism. */ void (*disable_fallback)(krb5_context context, krb5_clpreauth_rock rock); /* End of version 3 clpreauth callbacks (added in 1.17). */ } *krb5_clpreauth_callbacks; /* * Optional: per-plugin initialization/cleanup. The init function is called by * libkrb5 when the plugin is loaded, and the fini function is called before * the plugin is unloaded. These may be called multiple times in case the * plugin is used in multiple contexts. The returned context lives the * lifetime of the krb5_context. */ typedef krb5_error_code (*krb5_clpreauth_init_fn)(krb5_context context, krb5_clpreauth_moddata *moddata_out); typedef void (*krb5_clpreauth_fini_fn)(krb5_context context, krb5_clpreauth_moddata moddata); /* * Optional (mandatory before MIT krb5 1.12): pa_type will be a member of the * vtable's pa_type_list. Return PA_REAL if pa_type is a real * preauthentication type or PA_INFO if it is an informational type. If this * function is not defined in 1.12 or later, all pa_type values advertised by * the module will be assumed to be real. */ typedef int (*krb5_clpreauth_get_flags_fn)(krb5_context context, krb5_preauthtype pa_type); /* * Optional: per-request initialization/cleanup. The request_init function is * called when beginning to process a get_init_creds request and the * request_fini function is called when processing of the request is complete. * This is optional. It may be called multiple times in the lifetime of a * krb5_context. */ typedef void (*krb5_clpreauth_request_init_fn)(krb5_context context, krb5_clpreauth_moddata moddata, krb5_clpreauth_modreq *modreq_out); typedef void (*krb5_clpreauth_request_fini_fn)(krb5_context context, krb5_clpreauth_moddata moddata, krb5_clpreauth_modreq modreq); /* * Optional: process server-supplied data in pa_data and set responder * questions. * * encoded_previous_request may be NULL if there has been no previous request * in the AS exchange. */ typedef krb5_error_code (*krb5_clpreauth_prep_questions_fn)(krb5_context context, krb5_clpreauth_moddata moddata, krb5_clpreauth_modreq modreq, krb5_get_init_creds_opt *opt, krb5_clpreauth_callbacks cb, krb5_clpreauth_rock rock, krb5_kdc_req *request, krb5_data *encoded_request_body, krb5_data *encoded_previous_request, krb5_pa_data *pa_data); /* * Mandatory: process server-supplied data in pa_data and return created data * in pa_data_out. Also called after the AS-REP is received if the AS-REP * includes preauthentication data of the associated type. * * as_key contains the client-supplied key if known, or an empty keyblock if * not. If it is empty, the module may use gak_fct to fill it in. * * encoded_previous_request may be NULL if there has been no previous request * in the AS exchange. */ typedef krb5_error_code (*krb5_clpreauth_process_fn)(krb5_context context, krb5_clpreauth_moddata moddata, krb5_clpreauth_modreq modreq, krb5_get_init_creds_opt *opt, krb5_clpreauth_callbacks cb, krb5_clpreauth_rock rock, krb5_kdc_req *request, krb5_data *encoded_request_body, krb5_data *encoded_previous_request, krb5_pa_data *pa_data, krb5_prompter_fct prompter, void *prompter_data, krb5_pa_data ***pa_data_out); /* * Optional: Attempt to use error and error_padata to try to recover from the * given error. To work with both FAST and non-FAST errors, an implementation * should generally consult error_padata rather than decoding error->e_data. * For non-FAST errors, it contains the e_data decoded as either pa-data or * typed-data. * * If this function is provided, and it returns 0 and stores data in * pa_data_out, then the client library will retransmit the request. */ typedef krb5_error_code (*krb5_clpreauth_tryagain_fn)(krb5_context context, krb5_clpreauth_moddata moddata, krb5_clpreauth_modreq modreq, krb5_get_init_creds_opt *opt, krb5_clpreauth_callbacks cb, krb5_clpreauth_rock rock, krb5_kdc_req *request, krb5_data *encoded_request_body, krb5_data *encoded_previous_request, krb5_preauthtype pa_type, krb5_error *error, krb5_pa_data **error_padata, krb5_prompter_fct prompter, void *prompter_data, krb5_pa_data ***pa_data_out); /* * Optional: receive krb5_get_init_creds_opt information. The attr and value * information supplied should be copied into moddata by the module if it * wishes to reference it after returning from this call. */ typedef krb5_error_code (*krb5_clpreauth_supply_gic_opts_fn)(krb5_context context, krb5_clpreauth_moddata moddata, krb5_get_init_creds_opt *opt, const char *attr, const char *value); typedef struct krb5_clpreauth_vtable_st { /* Mandatory: name of module. */ char *name; /* Mandatory: pointer to zero-terminated list of pa_types which this module * can provide services for. */ krb5_preauthtype *pa_type_list; /* Optional: pointer to zero-terminated list of enc_types which this module * claims to add support for. */ krb5_enctype *enctype_list; krb5_clpreauth_init_fn init; krb5_clpreauth_fini_fn fini; krb5_clpreauth_get_flags_fn flags; krb5_clpreauth_request_init_fn request_init; krb5_clpreauth_request_fini_fn request_fini; krb5_clpreauth_process_fn process; krb5_clpreauth_tryagain_fn tryagain; krb5_clpreauth_supply_gic_opts_fn gic_opts; /* Minor version 1 ends here. */ krb5_clpreauth_prep_questions_fn prep_questions; /* Minor version 2 ends here. */ } *krb5_clpreauth_vtable; /* * This function allows a clpreauth plugin to obtain preauth options. The * preauth_data returned from this function should be freed by calling * krb5_get_init_creds_opt_free_pa(). */ krb5_error_code KRB5_CALLCONV krb5_get_init_creds_opt_get_pa(krb5_context context, krb5_get_init_creds_opt *opt, int *num_preauth_data, krb5_gic_opt_pa_data **preauth_data); /* * This function frees the preauth_data that was returned by * krb5_get_init_creds_opt_get_pa(). */ void KRB5_CALLCONV krb5_get_init_creds_opt_free_pa(krb5_context context, int num_preauth_data, krb5_gic_opt_pa_data *preauth_data); #endif /* KRB5_CLPREAUTH_PLUGIN_H */ PKZZ00krb5/kadm5_auth_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2017 by the Massachusetts Institute of Technology. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Declarations for kadm5_auth plugin module implementors. * * The kadm5_auth pluggable interface currently has only one supported major * version, which is 1. Major version 1 has a current minor version number of * 1. * * kadm5_auth plugin modules should define a function named * kadm5_auth__initvt, matching the signature: * * krb5_error_code * kadm5_auth_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to krb5_kadm5_auth_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_KADM5_AUTH_PLUGIN_H #define KRB5_KADM5_AUTH_PLUGIN_H #include #include /* An abstract type for kadm5_auth module data. */ typedef struct kadm5_auth_moddata_st *kadm5_auth_moddata; /* * A module can optionally include to inspect principal or * policy records from requests that add or modify principals or policies. * Note that fields of principal and policy structures are only valid if the * corresponding bit is set in the accompanying mask parameter. */ struct _kadm5_principal_ent_t; struct _kadm5_policy_ent_t; /* * A module can optionally generate restrictions when checking permissions for * adding or modifying a principal entry. Restriction fields will only be * honored if the corresponding mask bit is set. The operable mask bits are * defined in and are: * * - KADM5_ATTRIBUTES for require_attrs, forbid_attrs * - KADM5_POLICY for policy * - KADM5_POLICY_CLR to require that policy be unset * - KADM5_PRINC_EXPIRE_TIME for princ_lifetime * - KADM5_PW_EXPIRATION for pw_lifetime * - KADM5_MAX_LIFE for max_life * - KADM5_MAX_RLIFE for max_renewable_life */ struct kadm5_auth_restrictions { long mask; krb5_flags require_attrs; krb5_flags forbid_attrs; krb5_deltat princ_lifetime; krb5_deltat pw_lifetime; krb5_deltat max_life; krb5_deltat max_renewable_life; char *policy; }; /*** Method type declarations ***/ /* * Optional: Initialize module data. acl_file is the realm's configured ACL * file, or NULL if none was configured. Return 0 on success, * KRB5_PLUGIN_NO_HANDLE if the module is inoperable (due to configuration, for * example), and any other error code to abort kadmind startup. Optionally set * *data_out to a module data object to be passed to future calls. */ typedef krb5_error_code (*kadm5_auth_init_fn)(krb5_context context, const char *acl_file, kadm5_auth_moddata *data_out); /* Optional: Release resources used by module data. */ typedef void (*kadm5_auth_fini_fn)(krb5_context context, kadm5_auth_moddata data); /* * Each check method below should return 0 to explicitly authorize the request, * KRB5_PLUGIN_NO_HANDLE to neither authorize nor deny the request, and any * other error code (such as EPERM) to explicitly deny the request. If a check * method is not defined, the module will neither authorize nor deny the * request. A request succeeds if at least one kadm5_auth module explicitly * authorizes the request and none of the modules explicitly deny it. */ /* Optional: authorize an add-principal operation, and optionally generate * restrictions. */ typedef krb5_error_code (*kadm5_auth_addprinc_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target, const struct _kadm5_principal_ent_t *ent, long mask, struct kadm5_auth_restrictions **rs_out); /* Optional: authorize a modify-principal operation, and optionally generate * restrictions. */ typedef krb5_error_code (*kadm5_auth_modprinc_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target, const struct _kadm5_principal_ent_t *ent, long mask, struct kadm5_auth_restrictions **rs_out); /* Optional: authorize a set-string operation. */ typedef krb5_error_code (*kadm5_auth_setstr_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target, const char *key, const char *value); /* Optional: authorize a change-password operation. */ typedef krb5_error_code (*kadm5_auth_cpw_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize a randomize-keys operation. */ typedef krb5_error_code (*kadm5_auth_chrand_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize a set-key operation. */ typedef krb5_error_code (*kadm5_auth_setkey_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize a purgekeys operation. */ typedef krb5_error_code (*kadm5_auth_purgekeys_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize a delete-principal operation. */ typedef krb5_error_code (*kadm5_auth_delprinc_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize a rename-principal operation. */ typedef krb5_error_code (*kadm5_auth_renprinc_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal src, krb5_const_principal dest); /* Optional: authorize a get-principal operation. */ typedef krb5_error_code (*kadm5_auth_getprinc_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize a get-strings operation. */ typedef krb5_error_code (*kadm5_auth_getstrs_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize an extract-keys operation. */ typedef krb5_error_code (*kadm5_auth_extract_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, krb5_const_principal target); /* Optional: authorize a list-principals operation. */ typedef krb5_error_code (*kadm5_auth_listprincs_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client); /* Optional: authorize an add-policy operation. */ typedef krb5_error_code (*kadm5_auth_addpol_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, const char *policy, const struct _kadm5_policy_ent_t *ent, long mask); /* Optional: authorize a modify-policy operation. */ typedef krb5_error_code (*kadm5_auth_modpol_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, const char *policy, const struct _kadm5_policy_ent_t *ent, long mask); /* Optional: authorize a delete-policy operation. */ typedef krb5_error_code (*kadm5_auth_delpol_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, const char *policy); /* Optional: authorize a get-policy operation. client_policy is the client * principal's policy name, or NULL if it does not have one. */ typedef krb5_error_code (*kadm5_auth_getpol_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client, const char *policy, const char *client_policy); /* Optional: authorize a list-policies operation. */ typedef krb5_error_code (*kadm5_auth_listpols_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client); /* Optional: authorize an iprop operation. */ typedef krb5_error_code (*kadm5_auth_iprop_fn)(krb5_context context, kadm5_auth_moddata data, krb5_const_principal client); /* * Optional: receive a notification that the most recent authorized operation * has ended. If a kadm5_auth module is also a KDB module, it can assume that * all KDB methods invoked between a kadm5_auth authorization method invocation * and a kadm5_auth end invocation are performed as part of the authorized * operation. * * The end method may be invoked without a preceding authorization method in * some cases; the module must be prepared to ignore such calls. */ typedef void (*kadm5_auth_end_fn)(krb5_context context, kadm5_auth_moddata data); /* * Optional: free a restrictions object. This method does not need to be * defined if the module does not generate restrictions objects, or if it * returns aliases to restrictions objects contained from within the module * data. */ typedef void (*kadm5_auth_free_restrictions_fn)(krb5_context context, kadm5_auth_moddata data, struct kadm5_auth_restrictions *rs); /* kadm5_auth vtable for major version 1. */ typedef struct kadm5_auth_vtable_st { const char *name; /* Mandatory: name of module. */ kadm5_auth_init_fn init; kadm5_auth_fini_fn fini; kadm5_auth_addprinc_fn addprinc; kadm5_auth_modprinc_fn modprinc; kadm5_auth_setstr_fn setstr; kadm5_auth_cpw_fn cpw; kadm5_auth_chrand_fn chrand; kadm5_auth_setkey_fn setkey; kadm5_auth_purgekeys_fn purgekeys; kadm5_auth_delprinc_fn delprinc; kadm5_auth_renprinc_fn renprinc; kadm5_auth_getprinc_fn getprinc; kadm5_auth_getstrs_fn getstrs; kadm5_auth_extract_fn extract; kadm5_auth_listprincs_fn listprincs; kadm5_auth_addpol_fn addpol; kadm5_auth_modpol_fn modpol; kadm5_auth_delpol_fn delpol; kadm5_auth_getpol_fn getpol; kadm5_auth_listpols_fn listpols; kadm5_auth_iprop_fn iprop; kadm5_auth_end_fn end; kadm5_auth_free_restrictions_fn free_restrictions; /* Minor version 1 ends here. */ } *kadm5_auth_vtable; #endif /* KRB5_KADM5_AUTH_PLUGIN_H */ PKZ2,@ @ krb5/locate_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2006 Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ /* * * Service location plugin definitions for Kerberos 5. */ #ifndef KRB5_LOCATE_PLUGIN_H_INCLUDED #define KRB5_LOCATE_PLUGIN_H_INCLUDED #include enum locate_service_type { locate_service_kdc = 1, locate_service_master_kdc, locate_service_kadmin, locate_service_krb524, locate_service_kpasswd }; typedef struct krb5plugin_service_locate_ftable { int minor_version; /* currently 0 */ /* Per-context setup and teardown. Returned void* blob is private to the plugin. */ krb5_error_code (*init)(krb5_context, void **); void (*fini)(void *); /* Callback function returns non-zero if the plugin function should quit and return; this may be because of an error, or may indicate we've already contacted the service, whatever. The lookup function should only return an error if it detects a problem, not if the callback function tells it to quit. */ krb5_error_code (*lookup)(void *, enum locate_service_type svc, const char *realm, int socktype, int family, int (*cbfunc)(void *,int,struct sockaddr *), void *cbdata); } krb5plugin_service_locate_ftable; /* extern krb5plugin_service_locate_ftable service_locator; */ #endif PKZ~krb5/certauth_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* include/krb5/certauth_plugin.h - certauth plugin header. */ /* * Copyright (C) 2017 by Red Hat, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Declarations for certauth plugin module implementors. * * The certauth pluggable interface currently has only one supported major * version, which is 1. Major version 1 has a current minor version number of * 1. * * certauth plugin modules should define a function named * certauth__initvt, matching the signature: * * krb5_error_code * certauth_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to krb5_certauth_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_CERTAUTH_PLUGIN_H #define KRB5_CERTAUTH_PLUGIN_H #include #include /* Abstract module data type. */ typedef struct krb5_certauth_moddata_st *krb5_certauth_moddata; /* A module can optionally include to inspect the client principal * entry when authorizing a request. */ struct _krb5_db_entry_new; /* * Optional: Initialize module data. */ typedef krb5_error_code (*krb5_certauth_init_fn)(krb5_context context, krb5_certauth_moddata *moddata_out); /* * Optional: Clean up the module data. */ typedef void (*krb5_certauth_fini_fn)(krb5_context context, krb5_certauth_moddata moddata); /* * Mandatory: return 0 or KRB5_CERTAUTH_HWAUTH if the DER-encoded cert is * authorized for PKINIT authentication by princ; otherwise return one of the * following error codes: * - KRB5KDC_ERR_CLIENT_NAME_MISMATCH - incorrect SAN value * - KRB5KDC_ERR_INCONSISTENT_KEY_PURPOSE - incorrect EKU * - KRB5KDC_ERR_CERTIFICATE_MISMATCH - other extension error * - KRB5_PLUGIN_NO_HANDLE - the module has no opinion about cert * * Returning KRB5_CERTAUTH_HWAUTH will cause the hw-authent flag to be set in * the issued ticket (new in release 1.19). * * - opts is used by built-in modules to receive internal data, and must be * ignored by other modules. * - db_entry receives the client principal database entry, and can be ignored * by modules that do not link with libkdb5. * - *authinds_out optionally returns a null-terminated list of authentication * indicator strings upon KRB5_PLUGIN_NO_HANDLE or accepted authorization. */ typedef krb5_error_code (*krb5_certauth_authorize_fn)(krb5_context context, krb5_certauth_moddata moddata, const uint8_t *cert, size_t cert_len, krb5_const_principal princ, const void *opts, const struct _krb5_db_entry_new *db_entry, char ***authinds_out); /* * Free indicators allocated by a module. Mandatory if authorize returns * authentication indicators. */ typedef void (*krb5_certauth_free_indicator_fn)(krb5_context context, krb5_certauth_moddata moddata, char **authinds); typedef struct krb5_certauth_vtable_st { const char *name; krb5_certauth_init_fn init; krb5_certauth_fini_fn fini; krb5_certauth_authorize_fn authorize; krb5_certauth_free_indicator_fn free_ind; } *krb5_certauth_vtable; #endif /* KRB5_CERTAUTH_PLUGIN_H */ PKZJkrb5/preauth_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2012 by the Massachusetts Institute of Technology. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* This header includes the clpreauth and kdcpreauth interface declarations, * for backward compatibility and convenience. */ #ifndef KRB5_PREAUTH_PLUGIN_H #define KRB5_PREAUTH_PLUGIN_H #include #include #endif /* KRB5_PREAUTH_PLUGIN_H */ PKZ0krb5/kadm5_hook_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2010 by the Massachusetts Institute of Technology. * All rights reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ #ifndef H_KRB5_KADM5_HOOK_PLUGIN #define H_KRB5_KADM5_HOOK_PLUGIN /** * @file krb5/krb5_kadm5_hook_plugin.h * Provide a plugin interface for kadm5 operations. This interface * permits a plugin to intercept principal modification, creation and * change password operations. Operations run at two stages: a * precommit stage that runs before the operation is committed to the * database and a postcommit operation that runs after the database * is updated; see #kadm5_hook_stage for details on semantics. * * This interface is based on a proposed extension to Heimdal by Russ * Allbery; it is likely that Heimdal will adopt an approach based on * stacked kdb modules rather than this interface. For MIT, writing a * plugin to this interface is significantly easier than stacking kdb * modules. Also, the kadm5 interface is significantly more stable * than the kdb interface, so this approach is more desirable than * stacked kdb modules. * * This interface depends on kadm5/admin.h. As such, the interface * does not provide strong guarantees of ABI stability. * * The kadm5_hook interface currently has only one supported major version, * which is 1. Major version 1 has a current minor version number of 2. * * kadm5_hook plugins should: * kadm5_hook__initvt, matching the signature: * * krb5_error_code * kadm5_hook_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to kadm5_hook_vftable_1 * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #include #include #include /** * Whether the operation is being run before or after the database * update. */ enum kadm5_hook_stage { /** In this stage, any plugin failure prevents following plugins from * running and aborts the operation.*/ KADM5_HOOK_STAGE_PRECOMMIT, /** In this stage, plugin failures are logged but otherwise ignored.*/ KADM5_HOOK_STAGE_POSTCOMMIT }; /** Opaque module data pointer. */ typedef struct kadm5_hook_modinfo_st kadm5_hook_modinfo; /** * Interface for the v1 virtual table for the kadm5_hook plugin. * All entry points are optional. The name field must be provided. */ typedef struct kadm5_hook_vtable_1_st { /** A text string identifying the plugin for logging messages. */ const char *name; /** Initialize a plugin module. * @param modinfo returns newly allocated module info for future * calls. Cleaned up by the fini() function. */ kadm5_ret_t (*init)(krb5_context, kadm5_hook_modinfo **modinfo); /** Clean up a module and free @a modinfo. */ void (*fini)(krb5_context, kadm5_hook_modinfo *modinfo); /** Indicates that the password is being changed. * @param stage is an integer from #kadm5_hook_stage enumeration * @param keepold is true if existing keys are being kept. * @param newpass is NULL if the key sare being randomized. */ kadm5_ret_t (*chpass)(krb5_context, kadm5_hook_modinfo *modinfo, int stage, krb5_principal, krb5_boolean keepold, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, const char *newpass); /** Indicate a principal is created. */ kadm5_ret_t (*create)(krb5_context, kadm5_hook_modinfo *, int stage, kadm5_principal_ent_t, long mask, int n_ks_tuple, krb5_key_salt_tuple *ks_tuple, const char *password); /** Modify a principal. */ kadm5_ret_t (*modify)(krb5_context, kadm5_hook_modinfo *, int stage, kadm5_principal_ent_t, long mask); /** Indicate a principal is deleted. */ kadm5_ret_t (*remove)(krb5_context, kadm5_hook_modinfo *modinfo, int stage, krb5_principal); /* End of minor version 1. */ /** Indicate a principal is renamed. */ kadm5_ret_t (*rename)(krb5_context, kadm5_hook_modinfo *modinfo, int stage, krb5_principal, krb5_principal); /* End of minor version 2. */ } kadm5_hook_vftable_1; #endif /*H_KRB5_KADM5_HOOK_PLUGIN*/ PKZ}zDzDkrb5/kdcpreauth_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (c) 2006 Red Hat, Inc. * Portions copyright (c) 2006, 2011 Massachusetts Institute of Technology * All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Red Hat, Inc., nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Declarations for kdcpreauth plugin module implementors. * * The kdcpreauth interface has a single supported major version, which is 1. * Major version 1 has a current minor version of 2. kdcpreauth modules should * define a function named kdcpreauth__initvt, matching the * signature: * * krb5_error_code * kdcpreauth_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for the interface and maj_ver: * kdcpreauth, maj_ver == 1: Cast to krb5_kdcpreauth_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_KDCPREAUTH_PLUGIN_H #define KRB5_KDCPREAUTH_PLUGIN_H #include #include /* kdcpreauth mechanism property flags */ /* * Causes the KDC to include this mechanism in a list of supported preauth * types if the user's DB entry flags the user as requiring hardware-based * preauthentication. */ #define PA_HARDWARE 0x00000004 /* * Causes the KDC to include this mechanism in a list of supported preauth * types if the user's DB entry flags the user as requiring preauthentication, * and to fail preauthentication if we can't verify the client data. The * flipside of PA_SUFFICIENT. */ #define PA_REQUIRED 0x00000008 /* * Causes the KDC to include this mechanism in a list of supported preauth * types if the user's DB entry flags the user as requiring preauthentication, * and to mark preauthentication as successful if we can verify the client * data. The flipside of PA_REQUIRED. */ #define PA_SUFFICIENT 0x00000010 /* * Marks this preauthentication mechanism as one which changes the key which is * used for encrypting the response to the client. Modules which have this * flag have their server_return_fn called before modules which do not, and are * passed over if a previously-called module has modified the encrypting key. */ #define PA_REPLACES_KEY 0x00000020 /* * Not really a padata type, so don't include it in any list of preauth types * which gets sent over the wire. */ #define PA_PSEUDO 0x00000080 /* * Indicates that e_data in non-FAST errors should be encoded as typed data * instead of padata. */ #define PA_TYPED_E_DATA 0x00000100 /* Abstract type for a KDC callback data handle. */ typedef struct krb5_kdcpreauth_rock_st *krb5_kdcpreauth_rock; /* Abstract type for module data and per-request module data. */ typedef struct krb5_kdcpreauth_moddata_st *krb5_kdcpreauth_moddata; typedef struct krb5_kdcpreauth_modreq_st *krb5_kdcpreauth_modreq; /* The verto context structure type (typedef is in verto.h; we want to avoid a * header dependency for the moment). */ struct verto_ctx; /* Before using a callback after version 1, modules must check the vers * field of the callback structure. */ typedef struct krb5_kdcpreauth_callbacks_st { int vers; krb5_deltat (*max_time_skew)(krb5_context context, krb5_kdcpreauth_rock rock); /* * Get an array of krb5_keyblock structures containing the client keys * matching the request enctypes, terminated by an entry with key type = 0. * Returns ENOENT if no keys are available for the request enctypes. Free * the resulting object with the free_keys callback. */ krb5_error_code (*client_keys)(krb5_context context, krb5_kdcpreauth_rock rock, krb5_keyblock **keys_out); /* Free the result of client_keys. */ void (*free_keys)(krb5_context context, krb5_kdcpreauth_rock rock, krb5_keyblock *keys); /* * Get the encoded request body, which is sometimes needed for checksums. * For a FAST request this is the encoded inner request body. The returned * pointer is an alias and should not be freed. */ krb5_data *(*request_body)(krb5_context context, krb5_kdcpreauth_rock rock); /* Get a pointer to the FAST armor key, or NULL if the request did not use * FAST. The returned pointer is an alias and should not be freed. */ krb5_keyblock *(*fast_armor)(krb5_context context, krb5_kdcpreauth_rock rock); /* Retrieve a string attribute from the client DB entry, or NULL if no such * attribute is set. Free the result with the free_string callback. */ krb5_error_code (*get_string)(krb5_context context, krb5_kdcpreauth_rock rock, const char *key, char **value_out); /* Free the result of get_string. */ void (*free_string)(krb5_context context, krb5_kdcpreauth_rock rock, char *string); /* Get a pointer to the client DB entry (returned as a void pointer to * avoid a dependency on a libkdb5 type). */ void *(*client_entry)(krb5_context context, krb5_kdcpreauth_rock rock); /* Get a pointer to the verto context which should be used by an * asynchronous edata or verify method. */ struct verto_ctx *(*event_context)(krb5_context context, krb5_kdcpreauth_rock rock); /* End of version 1 kdcpreauth callbacks. */ /* Return true if the client DB entry contains any keys matching the * request enctypes. */ krb5_boolean (*have_client_keys)(krb5_context context, krb5_kdcpreauth_rock rock); /* End of version 2 kdcpreauth callbacks. */ /* * Get the decrypted client long-term key chosen according to the request * enctype list, or NULL if no matching key was found. The returned * pointer is an alias and should not be freed. If invoked from * return_padata, the result will be the same as the encrypting_key * parameter if it is not NULL, and will therefore reflect the modified * reply key if a return_padata handler has replaced the reply key. */ const krb5_keyblock *(*client_keyblock)(krb5_context context, krb5_kdcpreauth_rock rock); /* Assert an authentication indicator in the AS-REP authdata. Duplicate * indicators will be ignored. */ krb5_error_code (*add_auth_indicator)(krb5_context context, krb5_kdcpreauth_rock rock, const char *indicator); /* * Read a data value for pa_type from the request cookie, placing it in * *out. The value placed there is an alias and must not be freed. * Returns true if a value for pa_type was retrieved, false if not. */ krb5_boolean (*get_cookie)(krb5_context context, krb5_kdcpreauth_rock rock, krb5_preauthtype pa_type, krb5_data *out); /* * Set a data value for pa_type to be sent in a secure cookie in the next * error response. If pa_type is already present, the value is ignored. * If the preauth mechanism has different preauth types for requests and * responses, use the request type. Secure cookies are encrypted in a key * known only to the KDCs, but can be replayed within a short time window * for requests using the same client principal. */ krb5_error_code (*set_cookie)(krb5_context context, krb5_kdcpreauth_rock rock, krb5_preauthtype pa_type, const krb5_data *data); /* End of version 3 kdcpreauth callbacks. */ /* * Return true if princ matches the principal named in the request or the * client principal (possibly canonicalized). If princ does not match, * attempt a database lookup of princ with aliases allowed and compare the * result to the client principal, returning true if it matches. * Otherwise, return false. */ krb5_boolean (*match_client)(krb5_context context, krb5_kdcpreauth_rock rock, krb5_principal princ); /* * Get an alias to the client DB entry principal (possibly canonicalized). */ krb5_principal (*client_name)(krb5_context context, krb5_kdcpreauth_rock rock); /* End of version 4 kdcpreauth callbacks. */ /* * Instruct the KDC to send a freshness token in the method data * accompanying a PREAUTH_REQUIRED or PREAUTH_FAILED error, if the client * indicated support for freshness tokens. This callback should only be * invoked from the edata method. */ void (*send_freshness_token)(krb5_context context, krb5_kdcpreauth_rock rock); /* Validate a freshness token sent by the client. Return 0 on success, * KRB5KDC_ERR_PREAUTH_EXPIRED on error. */ krb5_error_code (*check_freshness_token)(krb5_context context, krb5_kdcpreauth_rock rock, const krb5_data *token); /* End of version 5 kdcpreauth callbacks. */ } *krb5_kdcpreauth_callbacks; /* Optional: preauth plugin initialization function. */ typedef krb5_error_code (*krb5_kdcpreauth_init_fn)(krb5_context context, krb5_kdcpreauth_moddata *moddata_out, const char **realmnames); /* Optional: preauth plugin cleanup function. */ typedef void (*krb5_kdcpreauth_fini_fn)(krb5_context context, krb5_kdcpreauth_moddata moddata); /* * Optional: return the flags which the KDC should use for this module. This * is a callback instead of a static value because the module may or may not * wish to count itself as a hardware preauthentication module (in other words, * the flags may be affected by the configuration, for example if a site * administrator can force a particular preauthentication type to be supported * using only hardware). This function is called for each entry entry in the * server_pa_type_list. */ typedef int (*krb5_kdcpreauth_flags_fn)(krb5_context context, krb5_preauthtype pa_type); /* * Responder for krb5_kdcpreauth_edata_fn. If invoked with a non-zero code, pa * will be ignored and the padata type will not be included in the hint list. * If invoked with a zero code and a null pa value, the padata type will be * included in the list with an empty value. If invoked with a zero code and a * non-null pa value, pa will be included in the hint list and will later be * freed by the KDC. */ typedef void (*krb5_kdcpreauth_edata_respond_fn)(void *arg, krb5_error_code code, krb5_pa_data *pa); /* * Optional: provide pa_data to send to the client as part of the "you need to * use preauthentication" error. The implementation must invoke the respond * when complete, whether successful or not, either before returning or * asynchronously using the verto context returned by cb->event_context(). * * This function is not allowed to create a modreq object because we have no * guarantee that the client will ever make a follow-up request, or that it * will hit this KDC if it does. */ typedef void (*krb5_kdcpreauth_edata_fn)(krb5_context context, krb5_kdc_req *request, krb5_kdcpreauth_callbacks cb, krb5_kdcpreauth_rock rock, krb5_kdcpreauth_moddata moddata, krb5_preauthtype pa_type, krb5_kdcpreauth_edata_respond_fn respond, void *arg); /* * Responder for krb5_kdcpreauth_verify_fn. Invoke with the arg parameter * supplied to verify, the error code (0 for success), an optional module * request state object to be consumed by return_fn or free_modreq_fn, optional * e_data to be passed to the caller if code is nonzero, and optional * authorization data to be included in the ticket. In non-FAST replies, * e_data will be encoded as typed-data if the module sets the PA_TYPED_E_DATA * flag, and as pa-data otherwise. e_data and authz_data will be freed by the * KDC. */ typedef void (*krb5_kdcpreauth_verify_respond_fn)(void *arg, krb5_error_code code, krb5_kdcpreauth_modreq modreq, krb5_pa_data **e_data, krb5_authdata **authz_data); /* * Optional: verify preauthentication data sent by the client, setting the * TKT_FLG_PRE_AUTH or TKT_FLG_HW_AUTH flag in the enc_tkt_reply's "flags" * field as appropriate. The implementation must invoke the respond function * when complete, whether successful or not, either before returning or * asynchronously using the verto context returned by cb->event_context(). */ typedef void (*krb5_kdcpreauth_verify_fn)(krb5_context context, krb5_data *req_pkt, krb5_kdc_req *request, krb5_enc_tkt_part *enc_tkt_reply, krb5_pa_data *data, krb5_kdcpreauth_callbacks cb, krb5_kdcpreauth_rock rock, krb5_kdcpreauth_moddata moddata, krb5_kdcpreauth_verify_respond_fn respond, void *arg); /* * Optional: generate preauthentication response data to send to the client as * part of the AS-REP. If it needs to override the key which is used to * encrypt the response, it can do so. */ typedef krb5_error_code (*krb5_kdcpreauth_return_fn)(krb5_context context, krb5_pa_data *padata, krb5_data *req_pkt, krb5_kdc_req *request, krb5_kdc_rep *reply, krb5_keyblock *encrypting_key, krb5_pa_data **send_pa_out, krb5_kdcpreauth_callbacks cb, krb5_kdcpreauth_rock rock, krb5_kdcpreauth_moddata moddata, krb5_kdcpreauth_modreq modreq); /* Optional: free a per-request context. */ typedef void (*krb5_kdcpreauth_free_modreq_fn)(krb5_context, krb5_kdcpreauth_moddata moddata, krb5_kdcpreauth_modreq modreq); /* Optional: invoked after init_fn to provide the module with a pointer to the * verto main loop. */ typedef krb5_error_code (*krb5_kdcpreauth_loop_fn)(krb5_context context, krb5_kdcpreauth_moddata moddata, struct verto_ctx *ctx); typedef struct krb5_kdcpreauth_vtable_st { /* Mandatory: name of module. */ char *name; /* Mandatory: pointer to zero-terminated list of pa_types which this module * can provide services for. */ krb5_preauthtype *pa_type_list; krb5_kdcpreauth_init_fn init; krb5_kdcpreauth_fini_fn fini; krb5_kdcpreauth_flags_fn flags; krb5_kdcpreauth_edata_fn edata; krb5_kdcpreauth_verify_fn verify; krb5_kdcpreauth_return_fn return_padata; krb5_kdcpreauth_free_modreq_fn free_modreq; /* Minor 1 ends here. */ krb5_kdcpreauth_loop_fn loop; /* Minor 2 ends here. */ } *krb5_kdcpreauth_vtable; #endif /* KRB5_KDCPREAUTH_PLUGIN_H */ PKZJJkrb5/pwqual_plugin.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (C) 2010 by the Massachusetts Institute of Technology. * All rights reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ /* * Declarations for password quality plugin module implementors. * * The password quality pluggable interface currently has only one supported * major version, which is 1. Major version 1 has a current minor version * number of 1. * * Password quality plugin modules should define a function named * pwqual__initvt, matching the signature: * * krb5_error_code * pwqual_modname_initvt(krb5_context context, int maj_ver, int min_ver, * krb5_plugin_vtable vtable); * * The initvt function should: * * - Check that the supplied maj_ver number is supported by the module, or * return KRB5_PLUGIN_VER_NOTSUPP if it is not. * * - Cast the vtable pointer as appropriate for maj_ver: * maj_ver == 1: Cast to krb5_pwqual_vtable * * - Initialize the methods of the vtable, stopping as appropriate for the * supplied min_ver. Optional methods may be left uninitialized. * * Memory for the vtable is allocated by the caller, not by the module. */ #ifndef KRB5_PWQUAL_PLUGIN_H #define KRB5_PWQUAL_PLUGIN_H #include #include #include /* An abstract type for password quality module data. */ typedef struct krb5_pwqual_moddata_st *krb5_pwqual_moddata; /*** Method type declarations ***/ /* Optional: Initialize module data. dictfile is the realm's configured * dictionary filename. */ typedef krb5_error_code (*krb5_pwqual_open_fn)(krb5_context context, const char *dict_file, krb5_pwqual_moddata *data); /* * Mandatory: Check a password for the principal princ, which has an associated * password policy named policy_name (or no associated policy if policy_name is * NULL). The parameter languages, if not NULL, contains a null-terminated * list of client-specified language tags as defined in RFC 5646. The method * should return one of the following errors if the password fails quality * standards: * * - KADM5_PASS_Q_TOOSHORT: password should be longer * - KADM5_PASS_Q_CLASS: password must have more character classes * - KADM5_PASS_Q_DICT: password contains dictionary words * - KADM5_PASS_Q_GENERIC: unspecified quality failure * * The module should also set an extended error message with * krb5_set_error_message(). The message may be localized according to one of * the language tags in languages. */ typedef krb5_error_code (*krb5_pwqual_check_fn)(krb5_context context, krb5_pwqual_moddata data, const char *password, const char *policy_name, krb5_principal princ, const char **languages); /* Optional: Release resources used by module data. */ typedef void (*krb5_pwqual_close_fn)(krb5_context context, krb5_pwqual_moddata data); /*** vtable declarations **/ /* Password quality plugin vtable for major version 1. */ typedef struct krb5_pwqual_vtable_st { const char *name; /* Mandatory: name of module. */ krb5_pwqual_open_fn open; krb5_pwqual_check_fn check; krb5_pwqual_close_fn close; /* Minor version 1 ends here. */ } *krb5_pwqual_vtable; #endif /* KRB5_PWQUAL_PLUGIN_H */ PKZGږ ndbm.hnu[/* ndbm.h - The include file for ndbm users. */ /* This file is part of GDBM, the GNU data base manager, by Philip A. Nelson. Copyright (C) 1990-2011, 2017-2018 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GDBM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GDBM. If not, see . You may contact the author by: e-mail: phil@cs.wwu.edu us-mail: Philip A. Nelson Computer Science Department Western Washington University Bellingham, WA 98226 *************************************************************************/ #include /* Parameters to dbm_store for simple insertion or replacement. */ #define DBM_INSERT GDBM_INSERT #define DBM_REPLACE GDBM_REPLACE /* The file information header. */ typedef struct { GDBM_FILE file; /* Actual gdbm file (held in the .pag file */ int dirfd; /* Descriptor of the .dir file */ datum _dbm_memory; /* Keeps the last returned key */ char *_dbm_fetch_val; /* Keeps the dptr of the last fetched datum */ gdbm_error _dbm_errno; /* Error code from the last failed call */ } DBM; /* Used internally by the library */ #define __gdbm_error_to_ndbm(dbm) \ do \ { \ if (gdbm_errno && gdbm_errno != GDBM_ITEM_NOT_FOUND) \ (dbm)->_dbm_errno = gdbm_errno; \ } \ while (0) /* These are the routines */ extern DBM *dbm_open (char *file, int flags, int mode); extern void dbm_close (DBM *dbf); extern datum dbm_fetch (DBM *dbf, datum key); extern int dbm_store (DBM *dbf, datum key, datum content, int flags); extern int dbm_delete (DBM *dbf, datum key); extern datum dbm_firstkey (DBM *dbf); extern datum dbm_nextkey (DBM *dbf); extern int dbm_error (DBM *dbf); extern void dbm_clearerr (DBM *dbf); extern int dbm_dirfno (DBM *dbf); extern int dbm_pagfno (DBM *dbf); extern int dbm_rdonly (DBM *dbf); PKZdcprotocols/talkd.hnu[/* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)talkd.h 8.1 (Berkeley) 6/2/93 */ #ifndef _PROTOCOLS_TALKD_H #define _PROTOCOLS_TALKD_H 1 /* * This describes the protocol used by the talk server and clients. * * The talk server acts a repository of invitations, responding to * requests by clients wishing to rendezvous for the purpose of * holding a conversation. In normal operation, a client, the caller, * initiates a rendezvous by sending a CTL_MSG to the server of * type LOOK_UP. This causes the server to search its invitation * tables to check if an invitation currently exists for the caller * (to speak to the callee specified in the message). If the lookup * fails, the caller then sends an ANNOUNCE message causing the server * to broadcast an announcement on the callee's login ports requesting * contact. When the callee responds, the local server uses the * recorded invitation to respond with the appropriate rendezvous * address and the caller and callee client programs establish a * stream connection through which the conversation takes place. */ #include #include #include #include /* * Client->server request message format. */ typedef struct { unsigned char vers; /* protocol version */ unsigned char type; /* request type, see below */ unsigned char answer; /* not used */ unsigned char pad; uint32_t id_num; /* message id */ struct osockaddr addr; /* old (4.3) style */ struct osockaddr ctl_addr; /* old (4.3) style */ int32_t pid; /* caller's process id */ #define NAME_SIZE 12 char l_name[NAME_SIZE];/* caller's name */ char r_name[NAME_SIZE];/* callee's name */ #define TTY_SIZE 16 char r_tty[TTY_SIZE];/* callee's tty name */ } CTL_MSG; /* * Server->client response message format. */ typedef struct { unsigned char vers; /* protocol version */ unsigned char type; /* type of request message, see below */ unsigned char answer; /* response to request message, see below */ unsigned char pad; uint32_t id_num; /* message id */ struct osockaddr addr; /* address for establishing conversation */ } CTL_RESPONSE; #define TALK_VERSION 1 /* protocol version */ /* message type values */ #define LEAVE_INVITE 0 /* leave invitation with server */ #define LOOK_UP 1 /* check for invitation by callee */ #define DELETE 2 /* delete invitation by caller */ #define ANNOUNCE 3 /* announce invitation by caller */ /* answer values */ #define SUCCESS 0 /* operation completed properly */ #define NOT_HERE 1 /* callee not logged in */ #define FAILED 2 /* operation failed for unexplained reason */ #define MACHINE_UNKNOWN 3 /* caller's machine name unknown */ #define PERMISSION_DENIED 4 /* callee's tty doesn't permit announce */ #define UNKNOWN_REQUEST 5 /* request has invalid type value */ #define BADVERSION 6 /* request has invalid protocol version */ #define BADADDR 7 /* request has invalid addr value */ #define BADCTLADDR 8 /* request has invalid ctl_addr value */ /* * Operational parameters. */ #define MAX_LIFE 60 /* max time daemon saves invitations */ /* RING_WAIT should be 10's of seconds less than MAX_LIFE */ #define RING_WAIT 30 /* time to wait before resending invitation */ #endif /* protocols/talkd.h */ PKZK]protocols/routed.hnu[/*- * Copyright (c) 1983, 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)routed.h 8.1 (Berkeley) 6/2/93 */ #ifndef _PROTOCOLS_ROUTED_H #define _PROTOCOLS_ROUTED_H 1 #include /* * Routing Information Protocol * * Derived from Xerox NS Routing Information Protocol * by changing 32-bit net numbers to sockaddr's and * padding stuff to 32-bit boundaries. */ #define RIPVERSION 1 struct netinfo { struct sockaddr rip_dst; /* destination net/host */ int rip_metric; /* cost of route */ }; struct rip { unsigned char rip_cmd; /* request/response */ unsigned char rip_vers; /* protocol version # */ unsigned char rip_res1[2]; /* pad to 32-bit boundary */ union { struct netinfo ru_nets[1]; /* variable length... */ char ru_tracefile[1]; /* ditto ... */ } ripun; #define rip_nets ripun.ru_nets #define rip_tracefile ripun.ru_tracefile }; /* * Packet types. */ #define RIPCMD_REQUEST 1 /* want info */ #define RIPCMD_RESPONSE 2 /* responding to request */ #define RIPCMD_TRACEON 3 /* turn tracing on */ #define RIPCMD_TRACEOFF 4 /* turn it off */ #define RIPCMD_MAX 5 #ifdef RIPCMDS char *ripcmds[RIPCMD_MAX] = { "#0", "REQUEST", "RESPONSE", "TRACEON", "TRACEOFF" }; #endif #define HOPCNT_INFINITY 16 /* per Xerox NS */ #define MAXPACKETSIZE 512 /* max broadcast size */ /* * Timer values used in managing the routing table. * Complete tables are broadcast every SUPPLY_INTERVAL seconds. * If changes occur between updates, dynamic updates containing only changes * may be sent. When these are sent, a timer is set for a random value * between MIN_WAITTIME and MAX_WAITTIME, and no additional dynamic updates * are sent until the timer expires. * * Every update of a routing entry forces an entry's timer to be reset. * After EXPIRE_TIME without updates, the entry is marked invalid, * but held onto until GARBAGE_TIME so that others may * see it "be deleted". */ #define TIMER_RATE 30 /* alarm clocks every 30 seconds */ #define SUPPLY_INTERVAL 30 /* time to supply tables */ #define MIN_WAITTIME 2 /* min. interval to broadcast changes */ #define MAX_WAITTIME 5 /* max. time to delay changes */ #define EXPIRE_TIME 180 /* time to mark entry invalid */ #define GARBAGE_TIME 240 /* time to garbage collect */ #endif /* protocols/routed.h */ PKZL'  protocols/rwhod.hnu[/* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)rwhod.h 8.1 (Berkeley) 6/2/93 */ #ifndef _PROTOCOLS_RWHOD_H #define _PROTOCOLS_RWHOD_H 1 #include /* * rwho protocol packet format. */ struct outmp { char out_line[8]; /* tty name */ char out_name[8]; /* user id */ int32_t out_time; /* time on */ }; struct whod { char wd_vers; /* protocol version # */ char wd_type; /* packet type, see below */ char wd_pad[2]; int wd_sendtime; /* time stamp by sender */ int wd_recvtime; /* time stamp applied by receiver */ char wd_hostname[32]; /* hosts's name */ int wd_loadav[3]; /* load average as in uptime */ int wd_boottime; /* time system booted */ struct whoent { struct outmp we_utmp; /* active tty info */ int we_idle; /* tty idle time */ } wd_we[1024 / sizeof (struct whoent)]; }; #define WHODVERSION 1 #define WHODTYPE_STATUS 1 /* host status */ /* We used to define _PATH_RWHODIR here but it's now in . */ #include #endif /* protocols/rwhod.h */ PKZ#*))protocols/timed.hnu[/* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)timed.h 8.1 (Berkeley) 6/2/93 */ #ifndef _PROTOCOLS_TIMED_H #define _PROTOCOLS_TIMED_H 1 #include #include /* * Time Synchronization Protocol */ #define TSPVERSION 1 #define ANYADDR NULL #define MAXHOSTNAMELEN 64 struct tsp { unsigned char tsp_type; unsigned char tsp_vers; unsigned short tsp_seq; union { struct timeval tspu_time; char tspu_hopcnt; } tsp_u; char tsp_name[MAXHOSTNAMELEN]; }; #define tsp_time tsp_u.tspu_time #define tsp_hopcnt tsp_u.tspu_hopcnt /* * Command types. */ #define TSP_ANY 0 /* match any types */ #define TSP_ADJTIME 1 /* send adjtime */ #define TSP_ACK 2 /* generic acknowledgement */ #define TSP_MASTERREQ 3 /* ask for master's name */ #define TSP_MASTERACK 4 /* acknowledge master request */ #define TSP_SETTIME 5 /* send network time */ #define TSP_MASTERUP 6 /* inform slaves that master is up */ #define TSP_SLAVEUP 7 /* slave is up but not polled */ #define TSP_ELECTION 8 /* advance candidature for master */ #define TSP_ACCEPT 9 /* support candidature of master */ #define TSP_REFUSE 10 /* reject candidature of master */ #define TSP_CONFLICT 11 /* two or more masters present */ #define TSP_RESOLVE 12 /* masters' conflict resolution */ #define TSP_QUIT 13 /* reject candidature if master is up */ #define TSP_DATE 14 /* reset the time (date command) */ #define TSP_DATEREQ 15 /* remote request to reset the time */ #define TSP_DATEACK 16 /* acknowledge time setting */ #define TSP_TRACEON 17 /* turn tracing on */ #define TSP_TRACEOFF 18 /* turn tracing off */ #define TSP_MSITE 19 /* find out master's site */ #define TSP_MSITEREQ 20 /* remote master's site request */ #define TSP_TEST 21 /* for testing election algo */ #define TSP_SETDATE 22 /* New from date command */ #define TSP_SETDATEREQ 23 /* New remote for above */ #define TSP_LOOP 24 /* loop detection packet */ #define TSPTYPENUMBER 25 #ifdef TSPTYPES char *tsptype[TSPTYPENUMBER] = { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP", "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT", "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ", "TEST", "SETDATE", "SETDATEREQ", "LOOP" }; #endif #endif /* protocols/timed.h */ PKZTPO O autosprintf.hnu[/* Class autosprintf - formatted output to an ostream. Copyright (C) 2002, 2012-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _AUTOSPRINTF_H #define _AUTOSPRINTF_H /* This feature is available in gcc versions 2.5 and later. */ #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define _AUTOSPRINTF_ATTRIBUTE_FORMAT() /* empty */ #else /* The __-protected variants of 'format' and 'printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define _AUTOSPRINTF_ATTRIBUTE_FORMAT() \ __attribute__ ((__format__ (__printf__, 2, 3))) # else # define _AUTOSPRINTF_ATTRIBUTE_FORMAT() \ __attribute__ ((format (printf, 2, 3))) # endif #endif #include #include namespace gnu { /* A temporary object, usually allocated on the stack, representing the result of an asprintf() call. */ class autosprintf { public: /* Constructor: takes a format string and the printf arguments. */ autosprintf (const char *format, ...) _AUTOSPRINTF_ATTRIBUTE_FORMAT(); /* Copy constructor. */ autosprintf (const autosprintf& src); autosprintf& operator = (autosprintf copy); /* Destructor: frees the temporarily allocated string. */ ~autosprintf (); /* Conversion to string. */ operator char * () const; operator std::string () const; /* Output to an ostream. */ friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp) { stream << (tmp.str ? tmp.str : "(error in autosprintf)"); return stream; } private: char *str; }; } #endif /* _AUTOSPRINTF_H */ PKZ+ADDstring.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.21 String handling */ #ifndef _STRING_H #define _STRING_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include __BEGIN_DECLS /* Get size_t and NULL from . */ #define __need_size_t #define __need_NULL #include /* Tell the caller that we provide correct C++ prototypes. */ #if defined __cplusplus && (__GNUC_PREREQ (4, 4) \ || __glibc_clang_prereq (3, 5)) # define __CORRECT_ISO_CPP_STRING_H_PROTO #endif /* Copy N bytes of SRC to DEST. */ extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern void *memmove (void *__dest, const void *__src, size_t __n) __THROW __nonnull ((1, 2)); /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ #if defined __USE_MISC || defined __USE_XOPEN extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __THROW __nonnull ((1, 2)); #endif /* Misc || X/Open. */ /* Set N bytes of S to C. */ extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); /* Compare N bytes of S1 and S2. */ extern int memcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Search N bytes of S for C. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern void *memchr (void *__s, int __c, size_t __n) __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1)); extern const void *memchr (const void *__s, int __c, size_t __n) __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline void * memchr (void *__s, int __c, size_t __n) __THROW { return __builtin_memchr (__s, __c, __n); } __extern_always_inline const void * memchr (const void *__s, int __c, size_t __n) __THROW { return __builtin_memchr (__s, __c, __n); } # endif } #else extern void *memchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)); #endif #ifdef __USE_GNU /* Search in S for C. This is similar to `memchr' but there is no length limit. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *rawmemchr (void *__s, int __c) __THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1)); extern "C++" const void *rawmemchr (const void *__s, int __c) __THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1)); # else extern void *rawmemchr (const void *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif /* Search N bytes of S for the final occurrence of C. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *memrchr (void *__s, int __c, size_t __n) __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); # else extern void *memrchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)); # endif #endif /* Copy SRC to DEST. */ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N characters of SRC to DEST. */ extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Append SRC onto DEST. */ extern char *strcat (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Append no more than N characters from SRC onto DEST. */ extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Compare S1 and S2. */ extern int strcmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare N characters of S1 and S2. */ extern int strncmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare the collated forms of S1 and S2. */ extern int strcoll (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((2)); #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ # include /* Compare the collated forms of S1 and S2, using sorting rules from L. */ extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); /* Put a transformation of SRC into no more than N bytes of DEST, using sorting rules from L. */ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, locale_t __l) __THROW __nonnull ((2, 4)); #endif #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \ || __GLIBC_USE (LIB_EXT2)) /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *__s) __THROW __attribute_malloc__ __nonnull ((1)); #endif /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) extern char *strndup (const char *__string, size_t __n) __THROW __attribute_malloc__ __nonnull ((1)); #endif #if defined __USE_GNU && defined __GNUC__ /* Duplicate S, returning an identical alloca'd string. */ # define strdupa(s) \ (__extension__ \ ({ \ const char *__old = (s); \ size_t __len = strlen (__old) + 1; \ char *__new = (char *) __builtin_alloca (__len); \ (char *) memcpy (__new, __old, __len); \ })) /* Return an alloca'd copy of at most N bytes of string. */ # define strndupa(s, n) \ (__extension__ \ ({ \ const char *__old = (s); \ size_t __len = strnlen (__old, (n)); \ char *__new = (char *) __builtin_alloca (__len + 1); \ __new[__len] = '\0'; \ (char *) memcpy (__new, __old, __len); \ })) #endif /* Find the first occurrence of C in S. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strchr (char *__s, int __c) __THROW __asm ("strchr") __attribute_pure__ __nonnull ((1)); extern const char *strchr (const char *__s, int __c) __THROW __asm ("strchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline char * strchr (char *__s, int __c) __THROW { return __builtin_strchr (__s, __c); } __extern_always_inline const char * strchr (const char *__s, int __c) __THROW { return __builtin_strchr (__s, __c); } # endif } #else extern char *strchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif /* Find the last occurrence of C in S. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strrchr (char *__s, int __c) __THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1)); extern const char *strrchr (const char *__s, int __c) __THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline char * strrchr (char *__s, int __c) __THROW { return __builtin_strrchr (__s, __c); } __extern_always_inline const char * strrchr (const char *__s, int __c) __THROW { return __builtin_strrchr (__s, __c); } # endif } #else extern char *strrchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif #ifdef __USE_GNU /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strchrnul (char *__s, int __c) __THROW __asm ("strchrnul") __attribute_pure__ __nonnull ((1)); extern "C++" const char *strchrnul (const char *__s, int __c) __THROW __asm ("strchrnul") __attribute_pure__ __nonnull ((1)); # else extern char *strchrnul (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif #endif /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ extern size_t strcspn (const char *__s, const char *__reject) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ extern size_t strspn (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Find the first occurrence in S of any character in ACCEPT. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strpbrk (char *__s, const char *__accept) __THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2)); extern const char *strpbrk (const char *__s, const char *__accept) __THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2)); # ifdef __OPTIMIZE__ __extern_always_inline char * strpbrk (char *__s, const char *__accept) __THROW { return __builtin_strpbrk (__s, __accept); } __extern_always_inline const char * strpbrk (const char *__s, const char *__accept) __THROW { return __builtin_strpbrk (__s, __accept); } # endif } #else extern char *strpbrk (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); #endif /* Find the first occurrence of NEEDLE in HAYSTACK. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strstr (char *__haystack, const char *__needle) __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2)); extern const char *strstr (const char *__haystack, const char *__needle) __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2)); # ifdef __OPTIMIZE__ __extern_always_inline char * strstr (char *__haystack, const char *__needle) __THROW { return __builtin_strstr (__haystack, __needle); } __extern_always_inline const char * strstr (const char *__haystack, const char *__needle) __THROW { return __builtin_strstr (__haystack, __needle); } # endif } #else extern char *strstr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); #endif /* Divide S into tokens separated by characters in DELIM. */ extern char *strtok (char *__restrict __s, const char *__restrict __delim) __THROW __nonnull ((2)); /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); #ifdef __USE_POSIX extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); #endif #ifdef __USE_GNU /* Similar to `strstr' but this function ignores the case of both strings. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strcasestr (char *__haystack, const char *__needle) __THROW __asm ("strcasestr") __attribute_pure__ __nonnull ((1, 2)); extern "C++" const char *strcasestr (const char *__haystack, const char *__needle) __THROW __asm ("strcasestr") __attribute_pure__ __nonnull ((1, 2)); # else extern char *strcasestr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); # endif #endif #ifdef __USE_GNU /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) __THROW __attribute_pure__ __nonnull ((1, 3)); /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif /* Return the length of S. */ extern size_t strlen (const char *__s) __THROW __attribute_pure__ __nonnull ((1)); #ifdef __USE_XOPEN2K8 /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ extern size_t strnlen (const char *__string, size_t __maxlen) __THROW __attribute_pure__ __nonnull ((1)); #endif /* Return a string describing the meaning of the `errno' code in ERRNUM. */ extern char *strerror (int __errnum) __THROW; #ifdef __USE_XOPEN2K /* Reentrant version of `strerror'. There are 2 flavors of `strerror_r', GNU which returns the string and may or may not use the supplied temporary buffer and POSIX one which fills the string into the buffer. To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L without -D_GNU_SOURCE is needed, otherwise the GNU version is preferred. */ # if defined __USE_XOPEN2K && !defined __USE_GNU /* Fill BUF with a string describing the meaning of the `errno' code in ERRNUM. */ # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (strerror_r, (int __errnum, char *__buf, size_t __buflen), __xpg_strerror_r) __nonnull ((2)); # else extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW __nonnull ((2)); # define strerror_r __xpg_strerror_r # endif # else /* If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW __nonnull ((2)) __wur; # endif #endif #ifdef __USE_XOPEN2K8 /* Translate error number to string according to the locale L. */ extern char *strerror_l (int __errnum, locale_t __l) __THROW; #endif #ifdef __USE_MISC # include /* Set N bytes of S to 0. The compiler will not delete a call to this function, even if S is dead after the call. */ extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1)); /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __THROW __nonnull ((1, 2)); #endif #ifdef __USE_XOPEN2K8 /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal (int __sig) __THROW; /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif #ifdef __USE_GNU /* Compare S1 and S2 as strings holding name & indices/version numbers. */ extern int strverscmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Sautee STRING briskly. */ extern char *strfry (char *__string) __THROW __nonnull ((1)); /* Frobnicate N bytes of S. */ extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)); # ifndef basename /* Return the file name within directory of FILENAME. We don't declare the function if the `basename' macro is available (defined in ) which makes the XPG version of this function available. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *basename (char *__filename) __THROW __asm ("basename") __nonnull ((1)); extern "C++" const char *basename (const char *__filename) __THROW __asm ("basename") __nonnull ((1)); # else extern char *basename (const char *__filename) __THROW __nonnull ((1)); # endif # endif #endif #if __GNUC_PREREQ (3,4) # if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function /* Functions with security checks. */ # include # endif #endif __END_DECLS #endif /* string.h */ PKZ. bits/socket2.hnu[/* Checking macros for socket functions. Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SOCKET_H # error "Never include directly; use instead." #endif extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags); extern ssize_t __REDIRECT (__recv_alias, (int __fd, void *__buf, size_t __n, int __flags), recv); extern ssize_t __REDIRECT (__recv_chk_warn, (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags), __recv_chk) __warnattr ("recv called with bigger length than size of destination " "buffer"); __fortify_function ssize_t recv (int __fd, void *__buf, size_t __n, int __flags) { size_t sz = __glibc_objsize0 (__buf); if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz)) return __recv_alias (__fd, __buf, __n, __flags); if (__glibc_unsafe_len (__n, sizeof (char), sz)) return __recv_chk_warn (__fd, __buf, __n, sz, __flags); return __recv_chk (__fd, __buf, __n, sz, __flags); } extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); extern ssize_t __REDIRECT (__recvfrom_alias, (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len), recvfrom); extern ssize_t __REDIRECT (__recvfrom_chk_warn, (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len), __recvfrom_chk) __warnattr ("recvfrom called with bigger length than size of " "destination buffer"); __fortify_function ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) { size_t sz = __glibc_objsize0 (__buf); if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz)) return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); if (__glibc_unsafe_len (__n, sizeof (char), sz)) return __recvfrom_chk_warn (__fd, __buf, __n, sz, __flags, __addr, __addr_len); return __recvfrom_chk (__fd, __buf, __n, sz, __flags, __addr, __addr_len); } PKZvRbits/stdint-uintn.hnu[/* Define uintN_t types. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDINT_UINTN_H #define _BITS_STDINT_UINTN_H 1 #include typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; #endif /* bits/stdint-uintn.h */ PKZ bits/waitstatus.hnu[/* Definitions of status bits for `wait' et al. Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." #endif /* Everything extant so far uses these same bits. */ /* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) /* If WIFSIGNALED(STATUS), the terminating signal. */ #define __WTERMSIG(status) ((status) & 0x7f) /* If WIFSTOPPED(STATUS), the signal that stopped the child. */ #define __WSTOPSIG(status) __WEXITSTATUS(status) /* Nonzero if STATUS indicates normal termination. */ #define __WIFEXITED(status) (__WTERMSIG(status) == 0) /* Nonzero if STATUS indicates termination by a signal. */ #define __WIFSIGNALED(status) \ (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) /* Nonzero if STATUS indicates the child is stopped. */ #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) /* Nonzero if STATUS indicates the child continued after a stop. We only define this if provides the WCONTINUED flag bit. */ #ifdef WCONTINUED # define __WIFCONTINUED(status) ((status) == __W_CONTINUED) #endif /* Nonzero if STATUS indicates the child dumped core. */ #define __WCOREDUMP(status) ((status) & __WCOREFLAG) /* Macros for constructing status values. */ #define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 PKZIӬ__bits/syscall.hnu[/* Generated at libc build time from syscall list. */ /* The system call list corresponds to kernel 5.18. */ #ifndef _SYSCALL_H # error "Never use directly; include instead." #endif #define __GLIBC_LINUX_VERSION_CODE 332288 #ifdef __NR_FAST_atomic_update # define SYS_FAST_atomic_update __NR_FAST_atomic_update #endif #ifdef __NR_FAST_cmpxchg # define SYS_FAST_cmpxchg __NR_FAST_cmpxchg #endif #ifdef __NR_FAST_cmpxchg64 # define SYS_FAST_cmpxchg64 __NR_FAST_cmpxchg64 #endif #ifdef __NR__llseek # define SYS__llseek __NR__llseek #endif #ifdef __NR__newselect # define SYS__newselect __NR__newselect #endif #ifdef __NR__sysctl # define SYS__sysctl __NR__sysctl #endif #ifdef __NR_accept # define SYS_accept __NR_accept #endif #ifdef __NR_accept4 # define SYS_accept4 __NR_accept4 #endif #ifdef __NR_access # define SYS_access __NR_access #endif #ifdef __NR_acct # define SYS_acct __NR_acct #endif #ifdef __NR_acl_get # define SYS_acl_get __NR_acl_get #endif #ifdef __NR_acl_set # define SYS_acl_set __NR_acl_set #endif #ifdef __NR_add_key # define SYS_add_key __NR_add_key #endif #ifdef __NR_adjtimex # define SYS_adjtimex __NR_adjtimex #endif #ifdef __NR_afs_syscall # define SYS_afs_syscall __NR_afs_syscall #endif #ifdef __NR_alarm # define SYS_alarm __NR_alarm #endif #ifdef __NR_alloc_hugepages # define SYS_alloc_hugepages __NR_alloc_hugepages #endif #ifdef __NR_arc_gettls # define SYS_arc_gettls __NR_arc_gettls #endif #ifdef __NR_arc_settls # define SYS_arc_settls __NR_arc_settls #endif #ifdef __NR_arc_usr_cmpxchg # define SYS_arc_usr_cmpxchg __NR_arc_usr_cmpxchg #endif #ifdef __NR_arch_prctl # define SYS_arch_prctl __NR_arch_prctl #endif #ifdef __NR_arm_fadvise64_64 # define SYS_arm_fadvise64_64 __NR_arm_fadvise64_64 #endif #ifdef __NR_arm_sync_file_range # define SYS_arm_sync_file_range __NR_arm_sync_file_range #endif #ifdef __NR_atomic_barrier # define SYS_atomic_barrier __NR_atomic_barrier #endif #ifdef __NR_atomic_cmpxchg_32 # define SYS_atomic_cmpxchg_32 __NR_atomic_cmpxchg_32 #endif #ifdef __NR_attrctl # define SYS_attrctl __NR_attrctl #endif #ifdef __NR_bdflush # define SYS_bdflush __NR_bdflush #endif #ifdef __NR_bind # define SYS_bind __NR_bind #endif #ifdef __NR_bpf # define SYS_bpf __NR_bpf #endif #ifdef __NR_break # define SYS_break __NR_break #endif #ifdef __NR_breakpoint # define SYS_breakpoint __NR_breakpoint #endif #ifdef __NR_brk # define SYS_brk __NR_brk #endif #ifdef __NR_cachectl # define SYS_cachectl __NR_cachectl #endif #ifdef __NR_cacheflush # define SYS_cacheflush __NR_cacheflush #endif #ifdef __NR_capget # define SYS_capget __NR_capget #endif #ifdef __NR_capset # define SYS_capset __NR_capset #endif #ifdef __NR_chdir # define SYS_chdir __NR_chdir #endif #ifdef __NR_chmod # define SYS_chmod __NR_chmod #endif #ifdef __NR_chown # define SYS_chown __NR_chown #endif #ifdef __NR_chown32 # define SYS_chown32 __NR_chown32 #endif #ifdef __NR_chroot # define SYS_chroot __NR_chroot #endif #ifdef __NR_clock_adjtime # define SYS_clock_adjtime __NR_clock_adjtime #endif #ifdef __NR_clock_adjtime64 # define SYS_clock_adjtime64 __NR_clock_adjtime64 #endif #ifdef __NR_clock_getres # define SYS_clock_getres __NR_clock_getres #endif #ifdef __NR_clock_getres_time64 # define SYS_clock_getres_time64 __NR_clock_getres_time64 #endif #ifdef __NR_clock_gettime # define SYS_clock_gettime __NR_clock_gettime #endif #ifdef __NR_clock_gettime64 # define SYS_clock_gettime64 __NR_clock_gettime64 #endif #ifdef __NR_clock_nanosleep # define SYS_clock_nanosleep __NR_clock_nanosleep #endif #ifdef __NR_clock_nanosleep_time64 # define SYS_clock_nanosleep_time64 __NR_clock_nanosleep_time64 #endif #ifdef __NR_clock_settime # define SYS_clock_settime __NR_clock_settime #endif #ifdef __NR_clock_settime64 # define SYS_clock_settime64 __NR_clock_settime64 #endif #ifdef __NR_clone # define SYS_clone __NR_clone #endif #ifdef __NR_clone2 # define SYS_clone2 __NR_clone2 #endif #ifdef __NR_clone3 # define SYS_clone3 __NR_clone3 #endif #ifdef __NR_close # define SYS_close __NR_close #endif #ifdef __NR_close_range # define SYS_close_range __NR_close_range #endif #ifdef __NR_cmpxchg_badaddr # define SYS_cmpxchg_badaddr __NR_cmpxchg_badaddr #endif #ifdef __NR_connect # define SYS_connect __NR_connect #endif #ifdef __NR_copy_file_range # define SYS_copy_file_range __NR_copy_file_range #endif #ifdef __NR_creat # define SYS_creat __NR_creat #endif #ifdef __NR_create_module # define SYS_create_module __NR_create_module #endif #ifdef __NR_delete_module # define SYS_delete_module __NR_delete_module #endif #ifdef __NR_dipc # define SYS_dipc __NR_dipc #endif #ifdef __NR_dup # define SYS_dup __NR_dup #endif #ifdef __NR_dup2 # define SYS_dup2 __NR_dup2 #endif #ifdef __NR_dup3 # define SYS_dup3 __NR_dup3 #endif #ifdef __NR_epoll_create # define SYS_epoll_create __NR_epoll_create #endif #ifdef __NR_epoll_create1 # define SYS_epoll_create1 __NR_epoll_create1 #endif #ifdef __NR_epoll_ctl # define SYS_epoll_ctl __NR_epoll_ctl #endif #ifdef __NR_epoll_ctl_old # define SYS_epoll_ctl_old __NR_epoll_ctl_old #endif #ifdef __NR_epoll_pwait # define SYS_epoll_pwait __NR_epoll_pwait #endif #ifdef __NR_epoll_pwait2 # define SYS_epoll_pwait2 __NR_epoll_pwait2 #endif #ifdef __NR_epoll_wait # define SYS_epoll_wait __NR_epoll_wait #endif #ifdef __NR_epoll_wait_old # define SYS_epoll_wait_old __NR_epoll_wait_old #endif #ifdef __NR_eventfd # define SYS_eventfd __NR_eventfd #endif #ifdef __NR_eventfd2 # define SYS_eventfd2 __NR_eventfd2 #endif #ifdef __NR_exec_with_loader # define SYS_exec_with_loader __NR_exec_with_loader #endif #ifdef __NR_execv # define SYS_execv __NR_execv #endif #ifdef __NR_execve # define SYS_execve __NR_execve #endif #ifdef __NR_execveat # define SYS_execveat __NR_execveat #endif #ifdef __NR_exit # define SYS_exit __NR_exit #endif #ifdef __NR_exit_group # define SYS_exit_group __NR_exit_group #endif #ifdef __NR_faccessat # define SYS_faccessat __NR_faccessat #endif #ifdef __NR_faccessat2 # define SYS_faccessat2 __NR_faccessat2 #endif #ifdef __NR_fadvise64 # define SYS_fadvise64 __NR_fadvise64 #endif #ifdef __NR_fadvise64_64 # define SYS_fadvise64_64 __NR_fadvise64_64 #endif #ifdef __NR_fallocate # define SYS_fallocate __NR_fallocate #endif #ifdef __NR_fanotify_init # define SYS_fanotify_init __NR_fanotify_init #endif #ifdef __NR_fanotify_mark # define SYS_fanotify_mark __NR_fanotify_mark #endif #ifdef __NR_fchdir # define SYS_fchdir __NR_fchdir #endif #ifdef __NR_fchmod # define SYS_fchmod __NR_fchmod #endif #ifdef __NR_fchmodat # define SYS_fchmodat __NR_fchmodat #endif #ifdef __NR_fchown # define SYS_fchown __NR_fchown #endif #ifdef __NR_fchown32 # define SYS_fchown32 __NR_fchown32 #endif #ifdef __NR_fchownat # define SYS_fchownat __NR_fchownat #endif #ifdef __NR_fcntl # define SYS_fcntl __NR_fcntl #endif #ifdef __NR_fcntl64 # define SYS_fcntl64 __NR_fcntl64 #endif #ifdef __NR_fdatasync # define SYS_fdatasync __NR_fdatasync #endif #ifdef __NR_fgetxattr # define SYS_fgetxattr __NR_fgetxattr #endif #ifdef __NR_finit_module # define SYS_finit_module __NR_finit_module #endif #ifdef __NR_flistxattr # define SYS_flistxattr __NR_flistxattr #endif #ifdef __NR_flock # define SYS_flock __NR_flock #endif #ifdef __NR_fork # define SYS_fork __NR_fork #endif #ifdef __NR_fp_udfiex_crtl # define SYS_fp_udfiex_crtl __NR_fp_udfiex_crtl #endif #ifdef __NR_free_hugepages # define SYS_free_hugepages __NR_free_hugepages #endif #ifdef __NR_fremovexattr # define SYS_fremovexattr __NR_fremovexattr #endif #ifdef __NR_fsconfig # define SYS_fsconfig __NR_fsconfig #endif #ifdef __NR_fsetxattr # define SYS_fsetxattr __NR_fsetxattr #endif #ifdef __NR_fsmount # define SYS_fsmount __NR_fsmount #endif #ifdef __NR_fsopen # define SYS_fsopen __NR_fsopen #endif #ifdef __NR_fspick # define SYS_fspick __NR_fspick #endif #ifdef __NR_fstat # define SYS_fstat __NR_fstat #endif #ifdef __NR_fstat64 # define SYS_fstat64 __NR_fstat64 #endif #ifdef __NR_fstatat64 # define SYS_fstatat64 __NR_fstatat64 #endif #ifdef __NR_fstatfs # define SYS_fstatfs __NR_fstatfs #endif #ifdef __NR_fstatfs64 # define SYS_fstatfs64 __NR_fstatfs64 #endif #ifdef __NR_fsync # define SYS_fsync __NR_fsync #endif #ifdef __NR_ftime # define SYS_ftime __NR_ftime #endif #ifdef __NR_ftruncate # define SYS_ftruncate __NR_ftruncate #endif #ifdef __NR_ftruncate64 # define SYS_ftruncate64 __NR_ftruncate64 #endif #ifdef __NR_futex # define SYS_futex __NR_futex #endif #ifdef __NR_futex_time64 # define SYS_futex_time64 __NR_futex_time64 #endif #ifdef __NR_futex_waitv # define SYS_futex_waitv __NR_futex_waitv #endif #ifdef __NR_futimesat # define SYS_futimesat __NR_futimesat #endif #ifdef __NR_get_kernel_syms # define SYS_get_kernel_syms __NR_get_kernel_syms #endif #ifdef __NR_get_mempolicy # define SYS_get_mempolicy __NR_get_mempolicy #endif #ifdef __NR_get_robust_list # define SYS_get_robust_list __NR_get_robust_list #endif #ifdef __NR_get_thread_area # define SYS_get_thread_area __NR_get_thread_area #endif #ifdef __NR_get_tls # define SYS_get_tls __NR_get_tls #endif #ifdef __NR_getcpu # define SYS_getcpu __NR_getcpu #endif #ifdef __NR_getcwd # define SYS_getcwd __NR_getcwd #endif #ifdef __NR_getdents # define SYS_getdents __NR_getdents #endif #ifdef __NR_getdents64 # define SYS_getdents64 __NR_getdents64 #endif #ifdef __NR_getdomainname # define SYS_getdomainname __NR_getdomainname #endif #ifdef __NR_getdtablesize # define SYS_getdtablesize __NR_getdtablesize #endif #ifdef __NR_getegid # define SYS_getegid __NR_getegid #endif #ifdef __NR_getegid32 # define SYS_getegid32 __NR_getegid32 #endif #ifdef __NR_geteuid # define SYS_geteuid __NR_geteuid #endif #ifdef __NR_geteuid32 # define SYS_geteuid32 __NR_geteuid32 #endif #ifdef __NR_getgid # define SYS_getgid __NR_getgid #endif #ifdef __NR_getgid32 # define SYS_getgid32 __NR_getgid32 #endif #ifdef __NR_getgroups # define SYS_getgroups __NR_getgroups #endif #ifdef __NR_getgroups32 # define SYS_getgroups32 __NR_getgroups32 #endif #ifdef __NR_gethostname # define SYS_gethostname __NR_gethostname #endif #ifdef __NR_getitimer # define SYS_getitimer __NR_getitimer #endif #ifdef __NR_getpagesize # define SYS_getpagesize __NR_getpagesize #endif #ifdef __NR_getpeername # define SYS_getpeername __NR_getpeername #endif #ifdef __NR_getpgid # define SYS_getpgid __NR_getpgid #endif #ifdef __NR_getpgrp # define SYS_getpgrp __NR_getpgrp #endif #ifdef __NR_getpid # define SYS_getpid __NR_getpid #endif #ifdef __NR_getpmsg # define SYS_getpmsg __NR_getpmsg #endif #ifdef __NR_getppid # define SYS_getppid __NR_getppid #endif #ifdef __NR_getpriority # define SYS_getpriority __NR_getpriority #endif #ifdef __NR_getrandom # define SYS_getrandom __NR_getrandom #endif #ifdef __NR_getresgid # define SYS_getresgid __NR_getresgid #endif #ifdef __NR_getresgid32 # define SYS_getresgid32 __NR_getresgid32 #endif #ifdef __NR_getresuid # define SYS_getresuid __NR_getresuid #endif #ifdef __NR_getresuid32 # define SYS_getresuid32 __NR_getresuid32 #endif #ifdef __NR_getrlimit # define SYS_getrlimit __NR_getrlimit #endif #ifdef __NR_getrusage # define SYS_getrusage __NR_getrusage #endif #ifdef __NR_getsid # define SYS_getsid __NR_getsid #endif #ifdef __NR_getsockname # define SYS_getsockname __NR_getsockname #endif #ifdef __NR_getsockopt # define SYS_getsockopt __NR_getsockopt #endif #ifdef __NR_gettid # define SYS_gettid __NR_gettid #endif #ifdef __NR_gettimeofday # define SYS_gettimeofday __NR_gettimeofday #endif #ifdef __NR_getuid # define SYS_getuid __NR_getuid #endif #ifdef __NR_getuid32 # define SYS_getuid32 __NR_getuid32 #endif #ifdef __NR_getunwind # define SYS_getunwind __NR_getunwind #endif #ifdef __NR_getxattr # define SYS_getxattr __NR_getxattr #endif #ifdef __NR_getxgid # define SYS_getxgid __NR_getxgid #endif #ifdef __NR_getxpid # define SYS_getxpid __NR_getxpid #endif #ifdef __NR_getxuid # define SYS_getxuid __NR_getxuid #endif #ifdef __NR_gtty # define SYS_gtty __NR_gtty #endif #ifdef __NR_idle # define SYS_idle __NR_idle #endif #ifdef __NR_init_module # define SYS_init_module __NR_init_module #endif #ifdef __NR_inotify_add_watch # define SYS_inotify_add_watch __NR_inotify_add_watch #endif #ifdef __NR_inotify_init # define SYS_inotify_init __NR_inotify_init #endif #ifdef __NR_inotify_init1 # define SYS_inotify_init1 __NR_inotify_init1 #endif #ifdef __NR_inotify_rm_watch # define SYS_inotify_rm_watch __NR_inotify_rm_watch #endif #ifdef __NR_io_cancel # define SYS_io_cancel __NR_io_cancel #endif #ifdef __NR_io_destroy # define SYS_io_destroy __NR_io_destroy #endif #ifdef __NR_io_getevents # define SYS_io_getevents __NR_io_getevents #endif #ifdef __NR_io_pgetevents # define SYS_io_pgetevents __NR_io_pgetevents #endif #ifdef __NR_io_pgetevents_time64 # define SYS_io_pgetevents_time64 __NR_io_pgetevents_time64 #endif #ifdef __NR_io_setup # define SYS_io_setup __NR_io_setup #endif #ifdef __NR_io_submit # define SYS_io_submit __NR_io_submit #endif #ifdef __NR_io_uring_enter # define SYS_io_uring_enter __NR_io_uring_enter #endif #ifdef __NR_io_uring_register # define SYS_io_uring_register __NR_io_uring_register #endif #ifdef __NR_io_uring_setup # define SYS_io_uring_setup __NR_io_uring_setup #endif #ifdef __NR_ioctl # define SYS_ioctl __NR_ioctl #endif #ifdef __NR_ioperm # define SYS_ioperm __NR_ioperm #endif #ifdef __NR_iopl # define SYS_iopl __NR_iopl #endif #ifdef __NR_ioprio_get # define SYS_ioprio_get __NR_ioprio_get #endif #ifdef __NR_ioprio_set # define SYS_ioprio_set __NR_ioprio_set #endif #ifdef __NR_ipc # define SYS_ipc __NR_ipc #endif #ifdef __NR_kcmp # define SYS_kcmp __NR_kcmp #endif #ifdef __NR_kern_features # define SYS_kern_features __NR_kern_features #endif #ifdef __NR_kexec_file_load # define SYS_kexec_file_load __NR_kexec_file_load #endif #ifdef __NR_kexec_load # define SYS_kexec_load __NR_kexec_load #endif #ifdef __NR_keyctl # define SYS_keyctl __NR_keyctl #endif #ifdef __NR_kill # define SYS_kill __NR_kill #endif #ifdef __NR_landlock_add_rule # define SYS_landlock_add_rule __NR_landlock_add_rule #endif #ifdef __NR_landlock_create_ruleset # define SYS_landlock_create_ruleset __NR_landlock_create_ruleset #endif #ifdef __NR_landlock_restrict_self # define SYS_landlock_restrict_self __NR_landlock_restrict_self #endif #ifdef __NR_lchown # define SYS_lchown __NR_lchown #endif #ifdef __NR_lchown32 # define SYS_lchown32 __NR_lchown32 #endif #ifdef __NR_lgetxattr # define SYS_lgetxattr __NR_lgetxattr #endif #ifdef __NR_link # define SYS_link __NR_link #endif #ifdef __NR_linkat # define SYS_linkat __NR_linkat #endif #ifdef __NR_listen # define SYS_listen __NR_listen #endif #ifdef __NR_listxattr # define SYS_listxattr __NR_listxattr #endif #ifdef __NR_llistxattr # define SYS_llistxattr __NR_llistxattr #endif #ifdef __NR_llseek # define SYS_llseek __NR_llseek #endif #ifdef __NR_lock # define SYS_lock __NR_lock #endif #ifdef __NR_lookup_dcookie # define SYS_lookup_dcookie __NR_lookup_dcookie #endif #ifdef __NR_lremovexattr # define SYS_lremovexattr __NR_lremovexattr #endif #ifdef __NR_lseek # define SYS_lseek __NR_lseek #endif #ifdef __NR_lsetxattr # define SYS_lsetxattr __NR_lsetxattr #endif #ifdef __NR_lstat # define SYS_lstat __NR_lstat #endif #ifdef __NR_lstat64 # define SYS_lstat64 __NR_lstat64 #endif #ifdef __NR_madvise # define SYS_madvise __NR_madvise #endif #ifdef __NR_mbind # define SYS_mbind __NR_mbind #endif #ifdef __NR_membarrier # define SYS_membarrier __NR_membarrier #endif #ifdef __NR_memfd_create # define SYS_memfd_create __NR_memfd_create #endif #ifdef __NR_memfd_secret # define SYS_memfd_secret __NR_memfd_secret #endif #ifdef __NR_memory_ordering # define SYS_memory_ordering __NR_memory_ordering #endif #ifdef __NR_migrate_pages # define SYS_migrate_pages __NR_migrate_pages #endif #ifdef __NR_mincore # define SYS_mincore __NR_mincore #endif #ifdef __NR_mkdir # define SYS_mkdir __NR_mkdir #endif #ifdef __NR_mkdirat # define SYS_mkdirat __NR_mkdirat #endif #ifdef __NR_mknod # define SYS_mknod __NR_mknod #endif #ifdef __NR_mknodat # define SYS_mknodat __NR_mknodat #endif #ifdef __NR_mlock # define SYS_mlock __NR_mlock #endif #ifdef __NR_mlock2 # define SYS_mlock2 __NR_mlock2 #endif #ifdef __NR_mlockall # define SYS_mlockall __NR_mlockall #endif #ifdef __NR_mmap # define SYS_mmap __NR_mmap #endif #ifdef __NR_mmap2 # define SYS_mmap2 __NR_mmap2 #endif #ifdef __NR_modify_ldt # define SYS_modify_ldt __NR_modify_ldt #endif #ifdef __NR_mount # define SYS_mount __NR_mount #endif #ifdef __NR_mount_setattr # define SYS_mount_setattr __NR_mount_setattr #endif #ifdef __NR_move_mount # define SYS_move_mount __NR_move_mount #endif #ifdef __NR_move_pages # define SYS_move_pages __NR_move_pages #endif #ifdef __NR_mprotect # define SYS_mprotect __NR_mprotect #endif #ifdef __NR_mpx # define SYS_mpx __NR_mpx #endif #ifdef __NR_mq_getsetattr # define SYS_mq_getsetattr __NR_mq_getsetattr #endif #ifdef __NR_mq_notify # define SYS_mq_notify __NR_mq_notify #endif #ifdef __NR_mq_open # define SYS_mq_open __NR_mq_open #endif #ifdef __NR_mq_timedreceive # define SYS_mq_timedreceive __NR_mq_timedreceive #endif #ifdef __NR_mq_timedreceive_time64 # define SYS_mq_timedreceive_time64 __NR_mq_timedreceive_time64 #endif #ifdef __NR_mq_timedsend # define SYS_mq_timedsend __NR_mq_timedsend #endif #ifdef __NR_mq_timedsend_time64 # define SYS_mq_timedsend_time64 __NR_mq_timedsend_time64 #endif #ifdef __NR_mq_unlink # define SYS_mq_unlink __NR_mq_unlink #endif #ifdef __NR_mremap # define SYS_mremap __NR_mremap #endif #ifdef __NR_msgctl # define SYS_msgctl __NR_msgctl #endif #ifdef __NR_msgget # define SYS_msgget __NR_msgget #endif #ifdef __NR_msgrcv # define SYS_msgrcv __NR_msgrcv #endif #ifdef __NR_msgsnd # define SYS_msgsnd __NR_msgsnd #endif #ifdef __NR_msync # define SYS_msync __NR_msync #endif #ifdef __NR_multiplexer # define SYS_multiplexer __NR_multiplexer #endif #ifdef __NR_munlock # define SYS_munlock __NR_munlock #endif #ifdef __NR_munlockall # define SYS_munlockall __NR_munlockall #endif #ifdef __NR_munmap # define SYS_munmap __NR_munmap #endif #ifdef __NR_name_to_handle_at # define SYS_name_to_handle_at __NR_name_to_handle_at #endif #ifdef __NR_nanosleep # define SYS_nanosleep __NR_nanosleep #endif #ifdef __NR_newfstatat # define SYS_newfstatat __NR_newfstatat #endif #ifdef __NR_nfsservctl # define SYS_nfsservctl __NR_nfsservctl #endif #ifdef __NR_ni_syscall # define SYS_ni_syscall __NR_ni_syscall #endif #ifdef __NR_nice # define SYS_nice __NR_nice #endif #ifdef __NR_old_adjtimex # define SYS_old_adjtimex __NR_old_adjtimex #endif #ifdef __NR_old_getpagesize # define SYS_old_getpagesize __NR_old_getpagesize #endif #ifdef __NR_oldfstat # define SYS_oldfstat __NR_oldfstat #endif #ifdef __NR_oldlstat # define SYS_oldlstat __NR_oldlstat #endif #ifdef __NR_oldolduname # define SYS_oldolduname __NR_oldolduname #endif #ifdef __NR_oldstat # define SYS_oldstat __NR_oldstat #endif #ifdef __NR_oldumount # define SYS_oldumount __NR_oldumount #endif #ifdef __NR_olduname # define SYS_olduname __NR_olduname #endif #ifdef __NR_open # define SYS_open __NR_open #endif #ifdef __NR_open_by_handle_at # define SYS_open_by_handle_at __NR_open_by_handle_at #endif #ifdef __NR_open_tree # define SYS_open_tree __NR_open_tree #endif #ifdef __NR_openat # define SYS_openat __NR_openat #endif #ifdef __NR_openat2 # define SYS_openat2 __NR_openat2 #endif #ifdef __NR_or1k_atomic # define SYS_or1k_atomic __NR_or1k_atomic #endif #ifdef __NR_osf_adjtime # define SYS_osf_adjtime __NR_osf_adjtime #endif #ifdef __NR_osf_afs_syscall # define SYS_osf_afs_syscall __NR_osf_afs_syscall #endif #ifdef __NR_osf_alt_plock # define SYS_osf_alt_plock __NR_osf_alt_plock #endif #ifdef __NR_osf_alt_setsid # define SYS_osf_alt_setsid __NR_osf_alt_setsid #endif #ifdef __NR_osf_alt_sigpending # define SYS_osf_alt_sigpending __NR_osf_alt_sigpending #endif #ifdef __NR_osf_asynch_daemon # define SYS_osf_asynch_daemon __NR_osf_asynch_daemon #endif #ifdef __NR_osf_audcntl # define SYS_osf_audcntl __NR_osf_audcntl #endif #ifdef __NR_osf_audgen # define SYS_osf_audgen __NR_osf_audgen #endif #ifdef __NR_osf_chflags # define SYS_osf_chflags __NR_osf_chflags #endif #ifdef __NR_osf_execve # define SYS_osf_execve __NR_osf_execve #endif #ifdef __NR_osf_exportfs # define SYS_osf_exportfs __NR_osf_exportfs #endif #ifdef __NR_osf_fchflags # define SYS_osf_fchflags __NR_osf_fchflags #endif #ifdef __NR_osf_fdatasync # define SYS_osf_fdatasync __NR_osf_fdatasync #endif #ifdef __NR_osf_fpathconf # define SYS_osf_fpathconf __NR_osf_fpathconf #endif #ifdef __NR_osf_fstat # define SYS_osf_fstat __NR_osf_fstat #endif #ifdef __NR_osf_fstatfs # define SYS_osf_fstatfs __NR_osf_fstatfs #endif #ifdef __NR_osf_fstatfs64 # define SYS_osf_fstatfs64 __NR_osf_fstatfs64 #endif #ifdef __NR_osf_fuser # define SYS_osf_fuser __NR_osf_fuser #endif #ifdef __NR_osf_getaddressconf # define SYS_osf_getaddressconf __NR_osf_getaddressconf #endif #ifdef __NR_osf_getdirentries # define SYS_osf_getdirentries __NR_osf_getdirentries #endif #ifdef __NR_osf_getdomainname # define SYS_osf_getdomainname __NR_osf_getdomainname #endif #ifdef __NR_osf_getfh # define SYS_osf_getfh __NR_osf_getfh #endif #ifdef __NR_osf_getfsstat # define SYS_osf_getfsstat __NR_osf_getfsstat #endif #ifdef __NR_osf_gethostid # define SYS_osf_gethostid __NR_osf_gethostid #endif #ifdef __NR_osf_getitimer # define SYS_osf_getitimer __NR_osf_getitimer #endif #ifdef __NR_osf_getlogin # define SYS_osf_getlogin __NR_osf_getlogin #endif #ifdef __NR_osf_getmnt # define SYS_osf_getmnt __NR_osf_getmnt #endif #ifdef __NR_osf_getrusage # define SYS_osf_getrusage __NR_osf_getrusage #endif #ifdef __NR_osf_getsysinfo # define SYS_osf_getsysinfo __NR_osf_getsysinfo #endif #ifdef __NR_osf_gettimeofday # define SYS_osf_gettimeofday __NR_osf_gettimeofday #endif #ifdef __NR_osf_kloadcall # define SYS_osf_kloadcall __NR_osf_kloadcall #endif #ifdef __NR_osf_kmodcall # define SYS_osf_kmodcall __NR_osf_kmodcall #endif #ifdef __NR_osf_lstat # define SYS_osf_lstat __NR_osf_lstat #endif #ifdef __NR_osf_memcntl # define SYS_osf_memcntl __NR_osf_memcntl #endif #ifdef __NR_osf_mincore # define SYS_osf_mincore __NR_osf_mincore #endif #ifdef __NR_osf_mount # define SYS_osf_mount __NR_osf_mount #endif #ifdef __NR_osf_mremap # define SYS_osf_mremap __NR_osf_mremap #endif #ifdef __NR_osf_msfs_syscall # define SYS_osf_msfs_syscall __NR_osf_msfs_syscall #endif #ifdef __NR_osf_msleep # define SYS_osf_msleep __NR_osf_msleep #endif #ifdef __NR_osf_mvalid # define SYS_osf_mvalid __NR_osf_mvalid #endif #ifdef __NR_osf_mwakeup # define SYS_osf_mwakeup __NR_osf_mwakeup #endif #ifdef __NR_osf_naccept # define SYS_osf_naccept __NR_osf_naccept #endif #ifdef __NR_osf_nfssvc # define SYS_osf_nfssvc __NR_osf_nfssvc #endif #ifdef __NR_osf_ngetpeername # define SYS_osf_ngetpeername __NR_osf_ngetpeername #endif #ifdef __NR_osf_ngetsockname # define SYS_osf_ngetsockname __NR_osf_ngetsockname #endif #ifdef __NR_osf_nrecvfrom # define SYS_osf_nrecvfrom __NR_osf_nrecvfrom #endif #ifdef __NR_osf_nrecvmsg # define SYS_osf_nrecvmsg __NR_osf_nrecvmsg #endif #ifdef __NR_osf_nsendmsg # define SYS_osf_nsendmsg __NR_osf_nsendmsg #endif #ifdef __NR_osf_ntp_adjtime # define SYS_osf_ntp_adjtime __NR_osf_ntp_adjtime #endif #ifdef __NR_osf_ntp_gettime # define SYS_osf_ntp_gettime __NR_osf_ntp_gettime #endif #ifdef __NR_osf_old_creat # define SYS_osf_old_creat __NR_osf_old_creat #endif #ifdef __NR_osf_old_fstat # define SYS_osf_old_fstat __NR_osf_old_fstat #endif #ifdef __NR_osf_old_getpgrp # define SYS_osf_old_getpgrp __NR_osf_old_getpgrp #endif #ifdef __NR_osf_old_killpg # define SYS_osf_old_killpg __NR_osf_old_killpg #endif #ifdef __NR_osf_old_lstat # define SYS_osf_old_lstat __NR_osf_old_lstat #endif #ifdef __NR_osf_old_open # define SYS_osf_old_open __NR_osf_old_open #endif #ifdef __NR_osf_old_sigaction # define SYS_osf_old_sigaction __NR_osf_old_sigaction #endif #ifdef __NR_osf_old_sigblock # define SYS_osf_old_sigblock __NR_osf_old_sigblock #endif #ifdef __NR_osf_old_sigreturn # define SYS_osf_old_sigreturn __NR_osf_old_sigreturn #endif #ifdef __NR_osf_old_sigsetmask # define SYS_osf_old_sigsetmask __NR_osf_old_sigsetmask #endif #ifdef __NR_osf_old_sigvec # define SYS_osf_old_sigvec __NR_osf_old_sigvec #endif #ifdef __NR_osf_old_stat # define SYS_osf_old_stat __NR_osf_old_stat #endif #ifdef __NR_osf_old_vadvise # define SYS_osf_old_vadvise __NR_osf_old_vadvise #endif #ifdef __NR_osf_old_vtrace # define SYS_osf_old_vtrace __NR_osf_old_vtrace #endif #ifdef __NR_osf_old_wait # define SYS_osf_old_wait __NR_osf_old_wait #endif #ifdef __NR_osf_oldquota # define SYS_osf_oldquota __NR_osf_oldquota #endif #ifdef __NR_osf_pathconf # define SYS_osf_pathconf __NR_osf_pathconf #endif #ifdef __NR_osf_pid_block # define SYS_osf_pid_block __NR_osf_pid_block #endif #ifdef __NR_osf_pid_unblock # define SYS_osf_pid_unblock __NR_osf_pid_unblock #endif #ifdef __NR_osf_plock # define SYS_osf_plock __NR_osf_plock #endif #ifdef __NR_osf_priocntlset # define SYS_osf_priocntlset __NR_osf_priocntlset #endif #ifdef __NR_osf_profil # define SYS_osf_profil __NR_osf_profil #endif #ifdef __NR_osf_proplist_syscall # define SYS_osf_proplist_syscall __NR_osf_proplist_syscall #endif #ifdef __NR_osf_reboot # define SYS_osf_reboot __NR_osf_reboot #endif #ifdef __NR_osf_revoke # define SYS_osf_revoke __NR_osf_revoke #endif #ifdef __NR_osf_sbrk # define SYS_osf_sbrk __NR_osf_sbrk #endif #ifdef __NR_osf_security # define SYS_osf_security __NR_osf_security #endif #ifdef __NR_osf_select # define SYS_osf_select __NR_osf_select #endif #ifdef __NR_osf_set_program_attributes # define SYS_osf_set_program_attributes __NR_osf_set_program_attributes #endif #ifdef __NR_osf_set_speculative # define SYS_osf_set_speculative __NR_osf_set_speculative #endif #ifdef __NR_osf_sethostid # define SYS_osf_sethostid __NR_osf_sethostid #endif #ifdef __NR_osf_setitimer # define SYS_osf_setitimer __NR_osf_setitimer #endif #ifdef __NR_osf_setlogin # define SYS_osf_setlogin __NR_osf_setlogin #endif #ifdef __NR_osf_setsysinfo # define SYS_osf_setsysinfo __NR_osf_setsysinfo #endif #ifdef __NR_osf_settimeofday # define SYS_osf_settimeofday __NR_osf_settimeofday #endif #ifdef __NR_osf_shmat # define SYS_osf_shmat __NR_osf_shmat #endif #ifdef __NR_osf_signal # define SYS_osf_signal __NR_osf_signal #endif #ifdef __NR_osf_sigprocmask # define SYS_osf_sigprocmask __NR_osf_sigprocmask #endif #ifdef __NR_osf_sigsendset # define SYS_osf_sigsendset __NR_osf_sigsendset #endif #ifdef __NR_osf_sigstack # define SYS_osf_sigstack __NR_osf_sigstack #endif #ifdef __NR_osf_sigwaitprim # define SYS_osf_sigwaitprim __NR_osf_sigwaitprim #endif #ifdef __NR_osf_sstk # define SYS_osf_sstk __NR_osf_sstk #endif #ifdef __NR_osf_stat # define SYS_osf_stat __NR_osf_stat #endif #ifdef __NR_osf_statfs # define SYS_osf_statfs __NR_osf_statfs #endif #ifdef __NR_osf_statfs64 # define SYS_osf_statfs64 __NR_osf_statfs64 #endif #ifdef __NR_osf_subsys_info # define SYS_osf_subsys_info __NR_osf_subsys_info #endif #ifdef __NR_osf_swapctl # define SYS_osf_swapctl __NR_osf_swapctl #endif #ifdef __NR_osf_swapon # define SYS_osf_swapon __NR_osf_swapon #endif #ifdef __NR_osf_syscall # define SYS_osf_syscall __NR_osf_syscall #endif #ifdef __NR_osf_sysinfo # define SYS_osf_sysinfo __NR_osf_sysinfo #endif #ifdef __NR_osf_table # define SYS_osf_table __NR_osf_table #endif #ifdef __NR_osf_uadmin # define SYS_osf_uadmin __NR_osf_uadmin #endif #ifdef __NR_osf_usleep_thread # define SYS_osf_usleep_thread __NR_osf_usleep_thread #endif #ifdef __NR_osf_uswitch # define SYS_osf_uswitch __NR_osf_uswitch #endif #ifdef __NR_osf_utc_adjtime # define SYS_osf_utc_adjtime __NR_osf_utc_adjtime #endif #ifdef __NR_osf_utc_gettime # define SYS_osf_utc_gettime __NR_osf_utc_gettime #endif #ifdef __NR_osf_utimes # define SYS_osf_utimes __NR_osf_utimes #endif #ifdef __NR_osf_utsname # define SYS_osf_utsname __NR_osf_utsname #endif #ifdef __NR_osf_wait4 # define SYS_osf_wait4 __NR_osf_wait4 #endif #ifdef __NR_osf_waitid # define SYS_osf_waitid __NR_osf_waitid #endif #ifdef __NR_pause # define SYS_pause __NR_pause #endif #ifdef __NR_pciconfig_iobase # define SYS_pciconfig_iobase __NR_pciconfig_iobase #endif #ifdef __NR_pciconfig_read # define SYS_pciconfig_read __NR_pciconfig_read #endif #ifdef __NR_pciconfig_write # define SYS_pciconfig_write __NR_pciconfig_write #endif #ifdef __NR_perf_event_open # define SYS_perf_event_open __NR_perf_event_open #endif #ifdef __NR_perfctr # define SYS_perfctr __NR_perfctr #endif #ifdef __NR_perfmonctl # define SYS_perfmonctl __NR_perfmonctl #endif #ifdef __NR_personality # define SYS_personality __NR_personality #endif #ifdef __NR_pidfd_getfd # define SYS_pidfd_getfd __NR_pidfd_getfd #endif #ifdef __NR_pidfd_open # define SYS_pidfd_open __NR_pidfd_open #endif #ifdef __NR_pidfd_send_signal # define SYS_pidfd_send_signal __NR_pidfd_send_signal #endif #ifdef __NR_pipe # define SYS_pipe __NR_pipe #endif #ifdef __NR_pipe2 # define SYS_pipe2 __NR_pipe2 #endif #ifdef __NR_pivot_root # define SYS_pivot_root __NR_pivot_root #endif #ifdef __NR_pkey_alloc # define SYS_pkey_alloc __NR_pkey_alloc #endif #ifdef __NR_pkey_free # define SYS_pkey_free __NR_pkey_free #endif #ifdef __NR_pkey_mprotect # define SYS_pkey_mprotect __NR_pkey_mprotect #endif #ifdef __NR_poll # define SYS_poll __NR_poll #endif #ifdef __NR_ppoll # define SYS_ppoll __NR_ppoll #endif #ifdef __NR_ppoll_time64 # define SYS_ppoll_time64 __NR_ppoll_time64 #endif #ifdef __NR_prctl # define SYS_prctl __NR_prctl #endif #ifdef __NR_pread64 # define SYS_pread64 __NR_pread64 #endif #ifdef __NR_preadv # define SYS_preadv __NR_preadv #endif #ifdef __NR_preadv2 # define SYS_preadv2 __NR_preadv2 #endif #ifdef __NR_prlimit64 # define SYS_prlimit64 __NR_prlimit64 #endif #ifdef __NR_process_madvise # define SYS_process_madvise __NR_process_madvise #endif #ifdef __NR_process_mrelease # define SYS_process_mrelease __NR_process_mrelease #endif #ifdef __NR_process_vm_readv # define SYS_process_vm_readv __NR_process_vm_readv #endif #ifdef __NR_process_vm_writev # define SYS_process_vm_writev __NR_process_vm_writev #endif #ifdef __NR_prof # define SYS_prof __NR_prof #endif #ifdef __NR_profil # define SYS_profil __NR_profil #endif #ifdef __NR_pselect6 # define SYS_pselect6 __NR_pselect6 #endif #ifdef __NR_pselect6_time64 # define SYS_pselect6_time64 __NR_pselect6_time64 #endif #ifdef __NR_ptrace # define SYS_ptrace __NR_ptrace #endif #ifdef __NR_putpmsg # define SYS_putpmsg __NR_putpmsg #endif #ifdef __NR_pwrite64 # define SYS_pwrite64 __NR_pwrite64 #endif #ifdef __NR_pwritev # define SYS_pwritev __NR_pwritev #endif #ifdef __NR_pwritev2 # define SYS_pwritev2 __NR_pwritev2 #endif #ifdef __NR_query_module # define SYS_query_module __NR_query_module #endif #ifdef __NR_quotactl # define SYS_quotactl __NR_quotactl #endif #ifdef __NR_quotactl_fd # define SYS_quotactl_fd __NR_quotactl_fd #endif #ifdef __NR_read # define SYS_read __NR_read #endif #ifdef __NR_readahead # define SYS_readahead __NR_readahead #endif #ifdef __NR_readdir # define SYS_readdir __NR_readdir #endif #ifdef __NR_readlink # define SYS_readlink __NR_readlink #endif #ifdef __NR_readlinkat # define SYS_readlinkat __NR_readlinkat #endif #ifdef __NR_readv # define SYS_readv __NR_readv #endif #ifdef __NR_reboot # define SYS_reboot __NR_reboot #endif #ifdef __NR_recv # define SYS_recv __NR_recv #endif #ifdef __NR_recvfrom # define SYS_recvfrom __NR_recvfrom #endif #ifdef __NR_recvmmsg # define SYS_recvmmsg __NR_recvmmsg #endif #ifdef __NR_recvmmsg_time64 # define SYS_recvmmsg_time64 __NR_recvmmsg_time64 #endif #ifdef __NR_recvmsg # define SYS_recvmsg __NR_recvmsg #endif #ifdef __NR_remap_file_pages # define SYS_remap_file_pages __NR_remap_file_pages #endif #ifdef __NR_removexattr # define SYS_removexattr __NR_removexattr #endif #ifdef __NR_rename # define SYS_rename __NR_rename #endif #ifdef __NR_renameat # define SYS_renameat __NR_renameat #endif #ifdef __NR_renameat2 # define SYS_renameat2 __NR_renameat2 #endif #ifdef __NR_request_key # define SYS_request_key __NR_request_key #endif #ifdef __NR_restart_syscall # define SYS_restart_syscall __NR_restart_syscall #endif #ifdef __NR_riscv_flush_icache # define SYS_riscv_flush_icache __NR_riscv_flush_icache #endif #ifdef __NR_rmdir # define SYS_rmdir __NR_rmdir #endif #ifdef __NR_rseq # define SYS_rseq __NR_rseq #endif #ifdef __NR_rt_sigaction # define SYS_rt_sigaction __NR_rt_sigaction #endif #ifdef __NR_rt_sigpending # define SYS_rt_sigpending __NR_rt_sigpending #endif #ifdef __NR_rt_sigprocmask # define SYS_rt_sigprocmask __NR_rt_sigprocmask #endif #ifdef __NR_rt_sigqueueinfo # define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo #endif #ifdef __NR_rt_sigreturn # define SYS_rt_sigreturn __NR_rt_sigreturn #endif #ifdef __NR_rt_sigsuspend # define SYS_rt_sigsuspend __NR_rt_sigsuspend #endif #ifdef __NR_rt_sigtimedwait # define SYS_rt_sigtimedwait __NR_rt_sigtimedwait #endif #ifdef __NR_rt_sigtimedwait_time64 # define SYS_rt_sigtimedwait_time64 __NR_rt_sigtimedwait_time64 #endif #ifdef __NR_rt_tgsigqueueinfo # define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo #endif #ifdef __NR_rtas # define SYS_rtas __NR_rtas #endif #ifdef __NR_s390_guarded_storage # define SYS_s390_guarded_storage __NR_s390_guarded_storage #endif #ifdef __NR_s390_pci_mmio_read # define SYS_s390_pci_mmio_read __NR_s390_pci_mmio_read #endif #ifdef __NR_s390_pci_mmio_write # define SYS_s390_pci_mmio_write __NR_s390_pci_mmio_write #endif #ifdef __NR_s390_runtime_instr # define SYS_s390_runtime_instr __NR_s390_runtime_instr #endif #ifdef __NR_s390_sthyi # define SYS_s390_sthyi __NR_s390_sthyi #endif #ifdef __NR_sched_get_affinity # define SYS_sched_get_affinity __NR_sched_get_affinity #endif #ifdef __NR_sched_get_priority_max # define SYS_sched_get_priority_max __NR_sched_get_priority_max #endif #ifdef __NR_sched_get_priority_min # define SYS_sched_get_priority_min __NR_sched_get_priority_min #endif #ifdef __NR_sched_getaffinity # define SYS_sched_getaffinity __NR_sched_getaffinity #endif #ifdef __NR_sched_getattr # define SYS_sched_getattr __NR_sched_getattr #endif #ifdef __NR_sched_getparam # define SYS_sched_getparam __NR_sched_getparam #endif #ifdef __NR_sched_getscheduler # define SYS_sched_getscheduler __NR_sched_getscheduler #endif #ifdef __NR_sched_rr_get_interval # define SYS_sched_rr_get_interval __NR_sched_rr_get_interval #endif #ifdef __NR_sched_rr_get_interval_time64 # define SYS_sched_rr_get_interval_time64 __NR_sched_rr_get_interval_time64 #endif #ifdef __NR_sched_set_affinity # define SYS_sched_set_affinity __NR_sched_set_affinity #endif #ifdef __NR_sched_setaffinity # define SYS_sched_setaffinity __NR_sched_setaffinity #endif #ifdef __NR_sched_setattr # define SYS_sched_setattr __NR_sched_setattr #endif #ifdef __NR_sched_setparam # define SYS_sched_setparam __NR_sched_setparam #endif #ifdef __NR_sched_setscheduler # define SYS_sched_setscheduler __NR_sched_setscheduler #endif #ifdef __NR_sched_yield # define SYS_sched_yield __NR_sched_yield #endif #ifdef __NR_seccomp # define SYS_seccomp __NR_seccomp #endif #ifdef __NR_security # define SYS_security __NR_security #endif #ifdef __NR_select # define SYS_select __NR_select #endif #ifdef __NR_semctl # define SYS_semctl __NR_semctl #endif #ifdef __NR_semget # define SYS_semget __NR_semget #endif #ifdef __NR_semop # define SYS_semop __NR_semop #endif #ifdef __NR_semtimedop # define SYS_semtimedop __NR_semtimedop #endif #ifdef __NR_semtimedop_time64 # define SYS_semtimedop_time64 __NR_semtimedop_time64 #endif #ifdef __NR_send # define SYS_send __NR_send #endif #ifdef __NR_sendfile # define SYS_sendfile __NR_sendfile #endif #ifdef __NR_sendfile64 # define SYS_sendfile64 __NR_sendfile64 #endif #ifdef __NR_sendmmsg # define SYS_sendmmsg __NR_sendmmsg #endif #ifdef __NR_sendmsg # define SYS_sendmsg __NR_sendmsg #endif #ifdef __NR_sendto # define SYS_sendto __NR_sendto #endif #ifdef __NR_set_mempolicy # define SYS_set_mempolicy __NR_set_mempolicy #endif #ifdef __NR_set_mempolicy_home_node # define SYS_set_mempolicy_home_node __NR_set_mempolicy_home_node #endif #ifdef __NR_set_robust_list # define SYS_set_robust_list __NR_set_robust_list #endif #ifdef __NR_set_thread_area # define SYS_set_thread_area __NR_set_thread_area #endif #ifdef __NR_set_tid_address # define SYS_set_tid_address __NR_set_tid_address #endif #ifdef __NR_set_tls # define SYS_set_tls __NR_set_tls #endif #ifdef __NR_setdomainname # define SYS_setdomainname __NR_setdomainname #endif #ifdef __NR_setfsgid # define SYS_setfsgid __NR_setfsgid #endif #ifdef __NR_setfsgid32 # define SYS_setfsgid32 __NR_setfsgid32 #endif #ifdef __NR_setfsuid # define SYS_setfsuid __NR_setfsuid #endif #ifdef __NR_setfsuid32 # define SYS_setfsuid32 __NR_setfsuid32 #endif #ifdef __NR_setgid # define SYS_setgid __NR_setgid #endif #ifdef __NR_setgid32 # define SYS_setgid32 __NR_setgid32 #endif #ifdef __NR_setgroups # define SYS_setgroups __NR_setgroups #endif #ifdef __NR_setgroups32 # define SYS_setgroups32 __NR_setgroups32 #endif #ifdef __NR_sethae # define SYS_sethae __NR_sethae #endif #ifdef __NR_sethostname # define SYS_sethostname __NR_sethostname #endif #ifdef __NR_setitimer # define SYS_setitimer __NR_setitimer #endif #ifdef __NR_setns # define SYS_setns __NR_setns #endif #ifdef __NR_setpgid # define SYS_setpgid __NR_setpgid #endif #ifdef __NR_setpgrp # define SYS_setpgrp __NR_setpgrp #endif #ifdef __NR_setpriority # define SYS_setpriority __NR_setpriority #endif #ifdef __NR_setregid # define SYS_setregid __NR_setregid #endif #ifdef __NR_setregid32 # define SYS_setregid32 __NR_setregid32 #endif #ifdef __NR_setresgid # define SYS_setresgid __NR_setresgid #endif #ifdef __NR_setresgid32 # define SYS_setresgid32 __NR_setresgid32 #endif #ifdef __NR_setresuid # define SYS_setresuid __NR_setresuid #endif #ifdef __NR_setresuid32 # define SYS_setresuid32 __NR_setresuid32 #endif #ifdef __NR_setreuid # define SYS_setreuid __NR_setreuid #endif #ifdef __NR_setreuid32 # define SYS_setreuid32 __NR_setreuid32 #endif #ifdef __NR_setrlimit # define SYS_setrlimit __NR_setrlimit #endif #ifdef __NR_setsid # define SYS_setsid __NR_setsid #endif #ifdef __NR_setsockopt # define SYS_setsockopt __NR_setsockopt #endif #ifdef __NR_settimeofday # define SYS_settimeofday __NR_settimeofday #endif #ifdef __NR_setuid # define SYS_setuid __NR_setuid #endif #ifdef __NR_setuid32 # define SYS_setuid32 __NR_setuid32 #endif #ifdef __NR_setxattr # define SYS_setxattr __NR_setxattr #endif #ifdef __NR_sgetmask # define SYS_sgetmask __NR_sgetmask #endif #ifdef __NR_shmat # define SYS_shmat __NR_shmat #endif #ifdef __NR_shmctl # define SYS_shmctl __NR_shmctl #endif #ifdef __NR_shmdt # define SYS_shmdt __NR_shmdt #endif #ifdef __NR_shmget # define SYS_shmget __NR_shmget #endif #ifdef __NR_shutdown # define SYS_shutdown __NR_shutdown #endif #ifdef __NR_sigaction # define SYS_sigaction __NR_sigaction #endif #ifdef __NR_sigaltstack # define SYS_sigaltstack __NR_sigaltstack #endif #ifdef __NR_signal # define SYS_signal __NR_signal #endif #ifdef __NR_signalfd # define SYS_signalfd __NR_signalfd #endif #ifdef __NR_signalfd4 # define SYS_signalfd4 __NR_signalfd4 #endif #ifdef __NR_sigpending # define SYS_sigpending __NR_sigpending #endif #ifdef __NR_sigprocmask # define SYS_sigprocmask __NR_sigprocmask #endif #ifdef __NR_sigreturn # define SYS_sigreturn __NR_sigreturn #endif #ifdef __NR_sigsuspend # define SYS_sigsuspend __NR_sigsuspend #endif #ifdef __NR_socket # define SYS_socket __NR_socket #endif #ifdef __NR_socketcall # define SYS_socketcall __NR_socketcall #endif #ifdef __NR_socketpair # define SYS_socketpair __NR_socketpair #endif #ifdef __NR_splice # define SYS_splice __NR_splice #endif #ifdef __NR_spu_create # define SYS_spu_create __NR_spu_create #endif #ifdef __NR_spu_run # define SYS_spu_run __NR_spu_run #endif #ifdef __NR_ssetmask # define SYS_ssetmask __NR_ssetmask #endif #ifdef __NR_stat # define SYS_stat __NR_stat #endif #ifdef __NR_stat64 # define SYS_stat64 __NR_stat64 #endif #ifdef __NR_statfs # define SYS_statfs __NR_statfs #endif #ifdef __NR_statfs64 # define SYS_statfs64 __NR_statfs64 #endif #ifdef __NR_statx # define SYS_statx __NR_statx #endif #ifdef __NR_stime # define SYS_stime __NR_stime #endif #ifdef __NR_stty # define SYS_stty __NR_stty #endif #ifdef __NR_subpage_prot # define SYS_subpage_prot __NR_subpage_prot #endif #ifdef __NR_swapcontext # define SYS_swapcontext __NR_swapcontext #endif #ifdef __NR_swapoff # define SYS_swapoff __NR_swapoff #endif #ifdef __NR_swapon # define SYS_swapon __NR_swapon #endif #ifdef __NR_switch_endian # define SYS_switch_endian __NR_switch_endian #endif #ifdef __NR_symlink # define SYS_symlink __NR_symlink #endif #ifdef __NR_symlinkat # define SYS_symlinkat __NR_symlinkat #endif #ifdef __NR_sync # define SYS_sync __NR_sync #endif #ifdef __NR_sync_file_range # define SYS_sync_file_range __NR_sync_file_range #endif #ifdef __NR_sync_file_range2 # define SYS_sync_file_range2 __NR_sync_file_range2 #endif #ifdef __NR_syncfs # define SYS_syncfs __NR_syncfs #endif #ifdef __NR_sys_debug_setcontext # define SYS_sys_debug_setcontext __NR_sys_debug_setcontext #endif #ifdef __NR_sys_epoll_create # define SYS_sys_epoll_create __NR_sys_epoll_create #endif #ifdef __NR_sys_epoll_ctl # define SYS_sys_epoll_ctl __NR_sys_epoll_ctl #endif #ifdef __NR_sys_epoll_wait # define SYS_sys_epoll_wait __NR_sys_epoll_wait #endif #ifdef __NR_syscall # define SYS_syscall __NR_syscall #endif #ifdef __NR_sysfs # define SYS_sysfs __NR_sysfs #endif #ifdef __NR_sysinfo # define SYS_sysinfo __NR_sysinfo #endif #ifdef __NR_syslog # define SYS_syslog __NR_syslog #endif #ifdef __NR_sysmips # define SYS_sysmips __NR_sysmips #endif #ifdef __NR_tee # define SYS_tee __NR_tee #endif #ifdef __NR_tgkill # define SYS_tgkill __NR_tgkill #endif #ifdef __NR_time # define SYS_time __NR_time #endif #ifdef __NR_timer_create # define SYS_timer_create __NR_timer_create #endif #ifdef __NR_timer_delete # define SYS_timer_delete __NR_timer_delete #endif #ifdef __NR_timer_getoverrun # define SYS_timer_getoverrun __NR_timer_getoverrun #endif #ifdef __NR_timer_gettime # define SYS_timer_gettime __NR_timer_gettime #endif #ifdef __NR_timer_gettime64 # define SYS_timer_gettime64 __NR_timer_gettime64 #endif #ifdef __NR_timer_settime # define SYS_timer_settime __NR_timer_settime #endif #ifdef __NR_timer_settime64 # define SYS_timer_settime64 __NR_timer_settime64 #endif #ifdef __NR_timerfd # define SYS_timerfd __NR_timerfd #endif #ifdef __NR_timerfd_create # define SYS_timerfd_create __NR_timerfd_create #endif #ifdef __NR_timerfd_gettime # define SYS_timerfd_gettime __NR_timerfd_gettime #endif #ifdef __NR_timerfd_gettime64 # define SYS_timerfd_gettime64 __NR_timerfd_gettime64 #endif #ifdef __NR_timerfd_settime # define SYS_timerfd_settime __NR_timerfd_settime #endif #ifdef __NR_timerfd_settime64 # define SYS_timerfd_settime64 __NR_timerfd_settime64 #endif #ifdef __NR_times # define SYS_times __NR_times #endif #ifdef __NR_tkill # define SYS_tkill __NR_tkill #endif #ifdef __NR_truncate # define SYS_truncate __NR_truncate #endif #ifdef __NR_truncate64 # define SYS_truncate64 __NR_truncate64 #endif #ifdef __NR_tuxcall # define SYS_tuxcall __NR_tuxcall #endif #ifdef __NR_udftrap # define SYS_udftrap __NR_udftrap #endif #ifdef __NR_ugetrlimit # define SYS_ugetrlimit __NR_ugetrlimit #endif #ifdef __NR_ulimit # define SYS_ulimit __NR_ulimit #endif #ifdef __NR_umask # define SYS_umask __NR_umask #endif #ifdef __NR_umount # define SYS_umount __NR_umount #endif #ifdef __NR_umount2 # define SYS_umount2 __NR_umount2 #endif #ifdef __NR_uname # define SYS_uname __NR_uname #endif #ifdef __NR_unlink # define SYS_unlink __NR_unlink #endif #ifdef __NR_unlinkat # define SYS_unlinkat __NR_unlinkat #endif #ifdef __NR_unshare # define SYS_unshare __NR_unshare #endif #ifdef __NR_uselib # define SYS_uselib __NR_uselib #endif #ifdef __NR_userfaultfd # define SYS_userfaultfd __NR_userfaultfd #endif #ifdef __NR_usr26 # define SYS_usr26 __NR_usr26 #endif #ifdef __NR_usr32 # define SYS_usr32 __NR_usr32 #endif #ifdef __NR_ustat # define SYS_ustat __NR_ustat #endif #ifdef __NR_utime # define SYS_utime __NR_utime #endif #ifdef __NR_utimensat # define SYS_utimensat __NR_utimensat #endif #ifdef __NR_utimensat_time64 # define SYS_utimensat_time64 __NR_utimensat_time64 #endif #ifdef __NR_utimes # define SYS_utimes __NR_utimes #endif #ifdef __NR_utrap_install # define SYS_utrap_install __NR_utrap_install #endif #ifdef __NR_vfork # define SYS_vfork __NR_vfork #endif #ifdef __NR_vhangup # define SYS_vhangup __NR_vhangup #endif #ifdef __NR_vm86 # define SYS_vm86 __NR_vm86 #endif #ifdef __NR_vm86old # define SYS_vm86old __NR_vm86old #endif #ifdef __NR_vmsplice # define SYS_vmsplice __NR_vmsplice #endif #ifdef __NR_vserver # define SYS_vserver __NR_vserver #endif #ifdef __NR_wait4 # define SYS_wait4 __NR_wait4 #endif #ifdef __NR_waitid # define SYS_waitid __NR_waitid #endif #ifdef __NR_waitpid # define SYS_waitpid __NR_waitpid #endif #ifdef __NR_write # define SYS_write __NR_write #endif #ifdef __NR_writev # define SYS_writev __NR_writev #endif PKZ-ޫbits/printf-ldbl.hnu[/* -mlong-double-64 compatibility mode for functions. Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _PRINTF_H # error "Never include directly; use instead." #endif __LDBL_REDIR_DECL (printf_size) PKZ_ bits/fcntl.hnu[/* O_*, F_*, FD_* bit values for Linux/x86. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FCNTL_H # error "Never use directly; include instead." #endif #ifdef __x86_64__ # define __O_LARGEFILE 0 #endif #ifdef __x86_64__ /* Not necessary, we always have 64-bit offsets. */ # define F_GETLK64 5 /* Get record locking info. */ # define F_SETLK64 6 /* Set record locking info (non-blocking). */ # define F_SETLKW64 7 /* Set record locking info (blocking). */ #endif struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ #else __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ #endif __pid_t l_pid; /* Process holding the lock. */ }; #ifdef __USE_LARGEFILE64 struct flock64 { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ __pid_t l_pid; /* Process holding the lock. */ }; #endif /* Include generic Linux declarations. */ #include PKZxs bits/floatn.hnu[/* Macros to control TS 18661-3 glibc features on x86. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H #include /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc includes corresponding *f128 interfaces for it. The required libgcc support was added some time after the basic compiler support, for x86_64 and x86. */ #if (defined __x86_64__ \ ? __GNUC_PREREQ (4, 3) \ : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) # define __HAVE_FLOAT128 1 #else # define __HAVE_FLOAT128 0 #endif /* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct from the default float, double and long double types in this glibc. */ #if __HAVE_FLOAT128 # define __HAVE_DISTINCT_FLOAT128 1 #else # define __HAVE_DISTINCT_FLOAT128 0 #endif /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for _Float64x, and this glibc includes corresponding *f64x interfaces for it. */ #define __HAVE_FLOAT64X 1 /* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has the format of _Float128, which must be different from that of long double. */ #define __HAVE_FLOAT64X_LONG_DOUBLE 1 #ifndef __ASSEMBLER__ /* Defined to concatenate the literal suffix to be used with _Float128 types, if __HAVE_FLOAT128 is 1. */ # if __HAVE_FLOAT128 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus /* The literal suffix f128 exists only since GCC 7.0. */ # define __f128(x) x##q # else # define __f128(x) x##f128 # endif # endif /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ # if __HAVE_FLOAT128 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus /* Add a typedef for older GCC compilers which don't natively support _Complex _Float128. */ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); # define __CFLOAT128 __cfloat128 # else # define __CFLOAT128 _Complex _Float128 # endif # endif /* The remaining of this file provides support for older compilers. */ # if __HAVE_FLOAT128 /* The type _Float128 exists only since GCC 7.0. */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef __float128 _Float128; # endif /* __builtin_huge_valf128 doesn't exist before GCC 7.0. */ # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) # endif /* Older GCC has only a subset of built-in functions for _Float128 on x86, and __builtin_infq is not usable in static initializers. Converting a narrower sNaN to _Float128 produces a quiet NaN, so attempts to use _Float128 sNaNs will not work properly with older compilers. */ # if !__GNUC_PREREQ (7, 0) # define __builtin_copysignf128 __builtin_copysignq # define __builtin_fabsf128 __builtin_fabsq # define __builtin_inff128() ((_Float128) __builtin_inf ()) # define __builtin_nanf128(x) ((_Float128) __builtin_nan (x)) # define __builtin_nansf128(x) ((_Float128) __builtin_nans (x)) # endif /* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, e.g.: __builtin_signbitf128, before GCC 6. However, there has never been a __builtin_signbitf128 in GCC and the type-generic builtin is only available since GCC 6. */ # if !__GNUC_PREREQ (6, 0) # define __builtin_signbitf128 __signbitf128 # endif # endif #endif /* !__ASSEMBLER__. */ #include #endif /* _BITS_FLOATN_H */ PKZNG bits/pthreadtypes-arch.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 #include #ifdef __x86_64__ # if __WORDSIZE == 64 # define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_ATTR_T 56 # define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_RWLOCK_T 56 # define __SIZEOF_PTHREAD_BARRIER_T 32 # else # define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_ATTR_T 32 # define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_RWLOCK_T 44 # define __SIZEOF_PTHREAD_BARRIER_T 20 # endif #else # define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_ATTR_T 36 # define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_RWLOCK_T 32 # define __SIZEOF_PTHREAD_BARRIER_T 20 #endif #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 /* Definitions for internal mutex struct. */ #define __PTHREAD_COMPAT_PADDING_MID #define __PTHREAD_COMPAT_PADDING_END #define __PTHREAD_MUTEX_LOCK_ELISION 1 #ifdef __x86_64__ # define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 # define __PTHREAD_MUTEX_USE_UNION 0 #else # define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 # define __PTHREAD_MUTEX_USE_UNION 1 #endif #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT struct __pthread_rwlock_arch_t { unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex; unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; #ifdef __x86_64__ int __cur_writer; int __shared; signed char __rwelision; # ifdef __ILP32__ unsigned char __pad1[3]; # define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } # else unsigned char __pad1[7]; # define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } # endif unsigned long int __pad2; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; # define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 #else /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __flags; unsigned char __shared; signed char __rwelision; # define __PTHREAD_RWLOCK_ELISION_EXTRA 0 unsigned char __pad2; int __cur_writer; #endif }; #ifndef __x86_64__ /* Extra attributes for the cleanup functions. */ # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) #endif #endif /* bits/pthreadtypes.h */ PKZ $11 bits/stdio2.hnu[/* Checking macros for stdio functions. Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDIO2_H #define _BITS_STDIO2_H 1 #ifndef _STDIO_H # error "Never include directly; use instead." #endif extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, const char *__restrict __format, ...) __THROW; extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, const char *__restrict __format, __gnuc_va_list __ap) __THROW; #ifdef __va_arg_pack __fortify_function int __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...)) { return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, __glibc_objsize (__s), __fmt, __va_arg_pack ()); } #elif !defined __cplusplus # define sprintf(str, ...) \ __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, \ __glibc_objsize (str), __VA_ARGS__) #endif __fortify_function int __NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)) { return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, __glibc_objsize (__s), __fmt, __ap); } #if defined __USE_ISOC99 || defined __USE_UNIX98 extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, ...) __THROW; extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, __gnuc_va_list __ap) __THROW; # ifdef __va_arg_pack __fortify_function int __NTH (snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)) { return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, __glibc_objsize (__s), __fmt, __va_arg_pack ()); } # elif !defined __cplusplus # define snprintf(str, len, ...) \ __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, \ __glibc_objsize (str), __VA_ARGS__) # endif __fortify_function int __NTH (vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)) { return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, __glibc_objsize (__s), __fmt, __ap); } #endif #if __USE_FORTIFY_LEVEL > 1 extern int __fprintf_chk (FILE *__restrict __stream, int __flag, const char *__restrict __format, ...); extern int __printf_chk (int __flag, const char *__restrict __format, ...); extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, const char *__restrict __format, __gnuc_va_list __ap); extern int __vprintf_chk (int __flag, const char *__restrict __format, __gnuc_va_list __ap); # ifdef __va_arg_pack __fortify_function int fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) { return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } __fortify_function int printf (const char *__restrict __fmt, ...) { return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } # elif !defined __cplusplus # define printf(...) \ __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # define fprintf(stream, ...) \ __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # endif __fortify_function int vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) { #ifdef __USE_EXTERN_INLINES return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); #else return __vprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap); #endif } __fortify_function int vfprintf (FILE *__restrict __stream, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); } # ifdef __USE_XOPEN2K8 extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); extern int __vdprintf_chk (int __fd, int __flag, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 3, 0))); # ifdef __va_arg_pack __fortify_function int dprintf (int __fd, const char *__restrict __fmt, ...) { return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } # elif !defined __cplusplus # define dprintf(fd, ...) \ __dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # endif __fortify_function int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) { return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); } # endif # ifdef __USE_GNU extern int __asprintf_chk (char **__restrict __ptr, int __flag, const char *__restrict __fmt, ...) __THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur; extern int __vasprintf_chk (char **__restrict __ptr, int __flag, const char *__restrict __fmt, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur; extern int __obstack_printf_chk (struct obstack *__restrict __obstack, int __flag, const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 3, 4))); extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, int __flag, const char *__restrict __format, __gnuc_va_list __args) __THROW __attribute__ ((__format__ (__printf__, 3, 0))); # ifdef __va_arg_pack __fortify_function int __NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)) { return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } __fortify_function int __NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)) { return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } __fortify_function int __NTH (obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...)) { return __obstack_printf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } # elif !defined __cplusplus # define asprintf(ptr, ...) \ __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # define __asprintf(ptr, ...) \ __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # define obstack_printf(obstack, ...) \ __obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # endif __fortify_function int __NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)) { return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); } __fortify_function int __NTH (obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)) { return __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); } # endif #endif #if __GLIBC_USE (DEPRECATED_GETS) extern char *__gets_chk (char *__str, size_t) __wur; extern char *__REDIRECT (__gets_warn, (char *__str), gets) __wur __warnattr ("please use fgets or getline instead, gets can't " "specify buffer size"); __fortify_function __wur char * gets (char *__str) { if (__glibc_objsize (__str) != (size_t) -1) return __gets_chk (__str, __glibc_objsize (__str)); return __gets_warn (__str); } #endif extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __wur; extern char *__REDIRECT (__fgets_alias, (char *__restrict __s, int __n, FILE *__restrict __stream), fgets) __wur; extern char *__REDIRECT (__fgets_chk_warn, (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream), __fgets_chk) __wur __warnattr ("fgets called with bigger size than length " "of destination buffer"); __fortify_function __wur char * fgets (char *__restrict __s, int __n, FILE *__restrict __stream) { size_t sz = __glibc_objsize (__s); if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz)) return __fgets_alias (__s, __n, __stream); if (__glibc_unsafe_len (__n, sizeof (char), sz)) return __fgets_chk_warn (__s, sz, __n, __stream); return __fgets_chk (__s, sz, __n, __stream); } extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __wur; extern size_t __REDIRECT (__fread_alias, (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream), fread) __wur; extern size_t __REDIRECT (__fread_chk_warn, (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream), __fread_chk) __wur __warnattr ("fread called with bigger size * nmemb than length " "of destination buffer"); __fortify_function __wur size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { size_t sz = __glibc_objsize0 (__ptr); if (__glibc_safe_or_unknown_len (__n, __size, sz)) return __fread_alias (__ptr, __size, __n, __stream); if (__glibc_unsafe_len (__n, __size, sz)) return __fread_chk_warn (__ptr, sz, __size, __n, __stream); return __fread_chk (__ptr, sz, __size, __n, __stream); } #ifdef __USE_GNU extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __wur; extern char *__REDIRECT (__fgets_unlocked_alias, (char *__restrict __s, int __n, FILE *__restrict __stream), fgets_unlocked) __wur; extern char *__REDIRECT (__fgets_unlocked_chk_warn, (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream), __fgets_unlocked_chk) __wur __warnattr ("fgets_unlocked called with bigger size than length " "of destination buffer"); __fortify_function __wur char * fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) { size_t sz = __glibc_objsize (__s); if (__glibc_safe_or_unknown_len (__n, sizeof (char), sz)) return __fgets_unlocked_alias (__s, __n, __stream); if (__glibc_unsafe_len (__n, sizeof (char), sz)) return __fgets_unlocked_chk_warn (__s, sz, __n, __stream); return __fgets_unlocked_chk (__s, sz, __n, __stream); } #endif #ifdef __USE_MISC # undef fread_unlocked extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __wur; extern size_t __REDIRECT (__fread_unlocked_alias, (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream), fread_unlocked) __wur; extern size_t __REDIRECT (__fread_unlocked_chk_warn, (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream), __fread_unlocked_chk) __wur __warnattr ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"); __fortify_function __wur size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) { size_t sz = __glibc_objsize0 (__ptr); if (__glibc_safe_or_unknown_len (__n, __size, sz)) { # ifdef __USE_EXTERN_INLINES if (__builtin_constant_p (__size) && __builtin_constant_p (__n) && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) && __size * __n <= 8) { size_t __cnt = __size * __n; char *__cptr = (char *) __ptr; if (__cnt == 0) return 0; for (; __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == EOF) break; *__cptr++ = __c; } return (__cptr - (char *) __ptr) / __size; } # endif return __fread_unlocked_alias (__ptr, __size, __n, __stream); } if (__glibc_unsafe_len (__n, __size, sz)) return __fread_unlocked_chk_warn (__ptr, sz, __size, __n, __stream); return __fread_unlocked_chk (__ptr, sz, __size, __n, __stream); } #endif #endif /* bits/stdio2.h. */ PKZצF0ffbits/mqueue2.hnu[/* Checking macros for mq functions. Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FCNTL_H # error "Never include directly; use instead." #endif /* Check that calls to mq_open with O_CREAT set have an appropriate third and fourth parameter. */ extern mqd_t mq_open (const char *__name, int __oflag, ...) __THROW __nonnull ((1)); extern mqd_t __mq_open_2 (const char *__name, int __oflag) __THROW __nonnull ((1)); extern mqd_t __REDIRECT_NTH (__mq_open_alias, (const char *__name, int __oflag, ...), mq_open) __nonnull ((1)); __errordecl (__mq_open_wrong_number_of_args, "mq_open can be called either with 2 or 4 arguments"); __errordecl (__mq_open_missing_mode_and_attr, "mq_open with O_CREAT in second argument needs 4 arguments"); __fortify_function mqd_t __NTH (mq_open (const char *__name, int __oflag, ...)) { if (__va_arg_pack_len () != 0 && __va_arg_pack_len () != 2) __mq_open_wrong_number_of_args (); if (__builtin_constant_p (__oflag)) { if ((__oflag & O_CREAT) != 0 && __va_arg_pack_len () == 0) { __mq_open_missing_mode_and_attr (); return __mq_open_2 (__name, __oflag); } return __mq_open_alias (__name, __oflag, __va_arg_pack ()); } if (__va_arg_pack_len () == 0) return __mq_open_2 (__name, __oflag); return __mq_open_alias (__name, __oflag, __va_arg_pack ()); } PKZ 0dbits/cpu-set.hnu[/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_CPU_SET_H #define _BITS_CPU_SET_H 1 #ifndef _SCHED_H # error "Never include directly; use instead." #endif /* Size definition for CPU sets. */ #define __CPU_SETSIZE 1024 #define __NCPUBITS (8 * sizeof (__cpu_mask)) /* Type for array elements in 'cpu_set_t'. */ typedef __CPU_MASK_TYPE __cpu_mask; /* Basic access functions. */ #define __CPUELT(cpu) ((cpu) / __NCPUBITS) #define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS)) /* Data structure to describe CPU mask. */ typedef struct { __cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS]; } cpu_set_t; /* Access functions for CPU masks. */ #if __GNUC_PREREQ (2, 91) # define __CPU_ZERO_S(setsize, cpusetp) \ do __builtin_memset (cpusetp, '\0', setsize); while (0) #else # define __CPU_ZERO_S(setsize, cpusetp) \ do { \ size_t __i; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ __cpu_mask *__bits = (cpusetp)->__bits; \ for (__i = 0; __i < __imax; ++__i) \ __bits[__i] = 0; \ } while (0) #endif #define __CPU_SET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu / 8 < (setsize) \ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ |= __CPUMASK (__cpu)) \ : 0; })) #define __CPU_CLR_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu / 8 < (setsize) \ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ &= ~__CPUMASK (__cpu)) \ : 0; })) #define __CPU_ISSET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu / 8 < (setsize) \ ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ & __CPUMASK (__cpu))) != 0 \ : 0; })) #define __CPU_COUNT_S(setsize, cpusetp) \ __sched_cpucount (setsize, cpusetp) #if __GNUC_PREREQ (2, 91) # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0) #else # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ (__extension__ \ ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \ const __cpu_mask *__arr2 = (cpusetp2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ if (__arr1[__i] != __arr2[__i]) \ break; \ __i == __imax; })) #endif #define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \ (__extension__ \ ({ cpu_set_t *__dest = (destset); \ const __cpu_mask *__arr1 = (srcset1)->__bits; \ const __cpu_mask *__arr2 = (srcset2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \ __dest; })) #define __CPU_ALLOC_SIZE(count) \ ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask)) #define __CPU_ALLOC(count) __sched_cpualloc (count) #define __CPU_FREE(cpuset) __sched_cpufree (cpuset) __BEGIN_DECLS extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) __THROW; extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur; extern void __sched_cpufree (cpu_set_t *__set) __THROW; __END_DECLS #endif /* bits/cpu-set.h */ PKZ bits/mqueue.hnu[/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MQUEUE_H # error "Never use directly; include instead." #endif #include typedef int mqd_t; struct mq_attr { __syscall_slong_t mq_flags; /* Message queue flags. */ __syscall_slong_t mq_maxmsg; /* Maximum number of messages. */ __syscall_slong_t mq_msgsize; /* Maximum message size. */ __syscall_slong_t mq_curmsgs; /* Number of messages currently queued. */ __syscall_slong_t __pad[4]; }; PKZfzzbits/mathdef.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _COMPLEX_H # error "Never use directly; include instead" #endif PKZbits/mathcalls-narrow.hnu[/* Declare functions returning a narrower type. Copyright (C) 2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never include directly; include instead." #endif /* Add. */ __MATHCALL_NARROW (__MATHCALL_NAME (add), __MATHCALL_REDIR_NAME (add), 2); /* Divide. */ __MATHCALL_NARROW (__MATHCALL_NAME (div), __MATHCALL_REDIR_NAME (div), 2); /* Multiply. */ __MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2); /* Subtract. */ __MATHCALL_NARROW (__MATHCALL_NAME (sub), __MATHCALL_REDIR_NAME (sub), 2); PKZGbits/wctype-wchar.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.25 * Wide character classification and mapping utilities */ #ifndef _BITS_WCTYPE_WCHAR_H #define _BITS_WCTYPE_WCHAR_H 1 #if !defined _WCTYPE_H && !defined _WCHAR_H #error "Never include directly; include or instead." #endif #include #include /* The definitions in this header are specified to appear in in ISO C99, but in in Unix98. _GNU_SOURCE follows C99. */ /* Scalar type that can hold values which represent locale-specific character classifications. */ typedef unsigned long int wctype_t; # ifndef _ISwbit /* The characteristics are stored always in network byte order (big endian). We define the bit value interpretations here dependent on the machine's byte order. */ # include # if __BYTE_ORDER == __BIG_ENDIAN # define _ISwbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ # define _ISwbit(bit) \ ((bit) < 8 ? (int) ((1UL << (bit)) << 24) \ : ((bit) < 16 ? (int) ((1UL << (bit)) << 8) \ : ((bit) < 24 ? (int) ((1UL << (bit)) >> 8) \ : (int) ((1UL << (bit)) >> 24)))) # endif enum { __ISwupper = 0, /* UPPERCASE. */ __ISwlower = 1, /* lowercase. */ __ISwalpha = 2, /* Alphabetic. */ __ISwdigit = 3, /* Numeric. */ __ISwxdigit = 4, /* Hexadecimal numeric. */ __ISwspace = 5, /* Whitespace. */ __ISwprint = 6, /* Printing. */ __ISwgraph = 7, /* Graphical. */ __ISwblank = 8, /* Blank (usually SPC and TAB). */ __ISwcntrl = 9, /* Control character. */ __ISwpunct = 10, /* Punctuation. */ __ISwalnum = 11, /* Alphanumeric. */ _ISwupper = _ISwbit (__ISwupper), /* UPPERCASE. */ _ISwlower = _ISwbit (__ISwlower), /* lowercase. */ _ISwalpha = _ISwbit (__ISwalpha), /* Alphabetic. */ _ISwdigit = _ISwbit (__ISwdigit), /* Numeric. */ _ISwxdigit = _ISwbit (__ISwxdigit), /* Hexadecimal numeric. */ _ISwspace = _ISwbit (__ISwspace), /* Whitespace. */ _ISwprint = _ISwbit (__ISwprint), /* Printing. */ _ISwgraph = _ISwbit (__ISwgraph), /* Graphical. */ _ISwblank = _ISwbit (__ISwblank), /* Blank (usually SPC and TAB). */ _ISwcntrl = _ISwbit (__ISwcntrl), /* Control character. */ _ISwpunct = _ISwbit (__ISwpunct), /* Punctuation. */ _ISwalnum = _ISwbit (__ISwalnum) /* Alphanumeric. */ }; # endif /* Not _ISwbit */ __BEGIN_DECLS /* * Wide-character classification functions: 7.15.2.1. */ /* Test for any wide character for which `iswalpha' or `iswdigit' is true. */ extern int iswalnum (wint_t __wc) __THROW; /* Test for any wide character for which `iswupper' or 'iswlower' is true, or any wide character that is one of a locale-specific set of wide-characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswalpha (wint_t __wc) __THROW; /* Test for any control wide character. */ extern int iswcntrl (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a decimal-digit character. */ extern int iswdigit (wint_t __wc) __THROW; /* Test for any wide character for which `iswprint' is true and `iswspace' is false. */ extern int iswgraph (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a lowercase letter or is one of a locale-specific set of wide characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswlower (wint_t __wc) __THROW; /* Test for any printing wide character. */ extern int iswprint (wint_t __wc) __THROW; /* Test for any printing wide character that is one of a locale-specific et of wide characters for which neither `iswspace' nor `iswalnum' is true. */ extern int iswpunct (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a locale-specific set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ extern int iswspace (wint_t __wc) __THROW; /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswupper (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described in the previous subclause. */ extern int iswxdigit (wint_t __wc) __THROW; /* Test for any wide character that corresponds to a standard blank wide character or a locale-specific set of wide characters for which `iswalnum' is false. */ # ifdef __USE_ISOC99 extern int iswblank (wint_t __wc) __THROW; # endif /* * Extensible wide-character classification functions: 7.15.2.2. */ /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ extern wctype_t wctype (const char *__property) __THROW; /* Determine whether the wide-character WC has the property described by DESC. */ extern int iswctype (wint_t __wc, wctype_t __desc) __THROW; /* * Wide-character case-mapping functions: 7.15.3.1. */ /* Converts an uppercase letter to the corresponding lowercase letter. */ extern wint_t towlower (wint_t __wc) __THROW; /* Converts an lowercase letter to the corresponding uppercase letter. */ extern wint_t towupper (wint_t __wc) __THROW; __END_DECLS #endif /* bits/wctype-wchar.h. */ PKZKT T bits/ptrace-shared.hnu[/* `ptrace' debugger support interface. Linux version, not architecture-specific. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PTRACE_H # error "Never use directly; include instead." #endif /* Options set using PTRACE_SETOPTIONS. */ enum __ptrace_setoptions { PTRACE_O_TRACESYSGOOD = 0x00000001, PTRACE_O_TRACEFORK = 0x00000002, PTRACE_O_TRACEVFORK = 0x00000004, PTRACE_O_TRACECLONE = 0x00000008, PTRACE_O_TRACEEXEC = 0x00000010, PTRACE_O_TRACEVFORKDONE = 0x00000020, PTRACE_O_TRACEEXIT = 0x00000040, PTRACE_O_TRACESECCOMP = 0x00000080, PTRACE_O_EXITKILL = 0x00100000, PTRACE_O_SUSPEND_SECCOMP = 0x00200000, PTRACE_O_MASK = 0x003000ff }; enum __ptrace_eventcodes { /* Wait extended result codes for the above trace options. */ PTRACE_EVENT_FORK = 1, PTRACE_EVENT_VFORK = 2, PTRACE_EVENT_CLONE = 3, PTRACE_EVENT_EXEC = 4, PTRACE_EVENT_VFORK_DONE = 5, PTRACE_EVENT_EXIT = 6, PTRACE_EVENT_SECCOMP = 7, /* Extended result codes enabled by means other than options. */ PTRACE_EVENT_STOP = 128 }; /* Arguments for PTRACE_PEEKSIGINFO. */ struct __ptrace_peeksiginfo_args { __uint64_t off; /* From which siginfo to start. */ __uint32_t flags; /* Flags for peeksiginfo. */ __int32_t nr; /* How many siginfos to take. */ }; enum __ptrace_peeksiginfo_flags { /* Read signals from a shared (process wide) queue. */ PTRACE_PEEKSIGINFO_SHARED = (1 << 0) }; /* Argument and results of PTRACE_SECCOMP_GET_METADATA. */ struct __ptrace_seccomp_metadata { __uint64_t filter_off; /* Input: which filter. */ __uint64_t flags; /* Output: filter's flags. */ }; /* Perform process tracing functions. REQUEST is one of the values above, and determines the action to be taken. For all requests except PTRACE_TRACEME, PID specifies the process to be traced. PID and the other arguments described above for the various requests should appear (those that are used for the particular request) as: pid_t PID, void *ADDR, int DATA, void *ADDR2 after REQUEST. */ extern long int ptrace (enum __ptrace_request __request, ...) __THROW; PKZeV!bits/mathcalls-helper-functions.hnu[/* Prototype declarations for math classification macros helpers. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Classify given number. */ __MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) __attribute__ ((__const__)); /* Test for negative number. */ __MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) __attribute__ ((__const__)); /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ __MATHDECL_1 (int, __isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); /* Return nonzero if VALUE is finite and not NaN. Used by isfinite macro. */ __MATHDECL_1 (int, __finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); /* Return nonzero if VALUE is not a number. */ __MATHDECL_1 (int, __isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); /* Test equality. */ __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y)); /* Test for signaling NaN. */ __MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value)) __attribute__ ((__const__)); PKZBd$ bits/iscanonical.hnu[/* Define iscanonical macro. ldbl-96 version. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never use directly; include instead." #endif extern int __iscanonicall (long double __x) __THROW __attribute__ ((__const__)); #define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) #define __iscanonical(x) ((void) (__typeof (x)) (x), 1) #if __HAVE_DISTINCT_FLOAT128 # define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1) #endif /* Return nonzero value if X is canonical. In IEEE interchange binary formats, all values are canonical, but the argument must still be converted to its semantic type for any exceptions arising from the conversion, before being discarded; in extended precision, there are encodings that are not consistently handled as corresponding to any particular value of the type, and we return 0 for those. */ #ifndef __cplusplus # define iscanonical(x) __MATH_TG ((x), __iscanonical, (x)) #else /* In C++ mode, __MATH_TG cannot be used, because it relies on __builtin_types_compatible_p, which is a C-only builtin. On the other hand, overloading provides the means to distinguish between the floating-point types. The overloading resolution will match the correct parameter (regardless of type qualifiers (i.e.: const and volatile)). */ extern "C++" { inline int iscanonical (float __val) { return __iscanonicalf (__val); } inline int iscanonical (double __val) { return __iscanonical (__val); } inline int iscanonical (long double __val) { return __iscanonicall (__val); } # if __HAVE_DISTINCT_FLOAT128 inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } # endif } #endif /* __cplusplus */ PKZS)bits/elfclass.hnu[/* This file specifies the native word size of the machine, which indicates the ELF file class used for executables and shared objects on this machine. */ #ifndef _LINK_H # error "Never use directly; include instead." #endif #include #define __ELF_NATIVE_CLASS __WORDSIZE /* The entries in the .hash table always have a size of 32 bits. */ typedef uint32_t Elf_Symndx; PKZDR bits/hwcap.hnu[/* Defines for bits in AT_HWCAP. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_AUXV_H # error "Never include directly; use instead." #endif /* No bits defined for this architecture. */ PKZ}5DDbits/posix1_lim.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.9.2 Minimum Values Added to * * Never include this file directly; use instead. */ #ifndef _BITS_POSIX1_LIM_H #define _BITS_POSIX1_LIM_H 1 #include /* These are the standard-mandated minimum values. */ /* Minimum number of operations in one list I/O call. */ #define _POSIX_AIO_LISTIO_MAX 2 /* Minimal number of outstanding asynchronous I/O operations. */ #define _POSIX_AIO_MAX 1 /* Maximum length of arguments to `execve', including environment. */ #define _POSIX_ARG_MAX 4096 /* Maximum simultaneous processes per real user ID. */ #ifdef __USE_XOPEN2K # define _POSIX_CHILD_MAX 25 #else # define _POSIX_CHILD_MAX 6 #endif /* Minimal number of timer expiration overruns. */ #define _POSIX_DELAYTIMER_MAX 32 /* Maximum length of a host name (not including the terminating null) as returned from the GETHOSTNAME function. */ #define _POSIX_HOST_NAME_MAX 255 /* Maximum link count of a file. */ #define _POSIX_LINK_MAX 8 /* Maximum length of login name. */ #define _POSIX_LOGIN_NAME_MAX 9 /* Number of bytes in a terminal canonical input queue. */ #define _POSIX_MAX_CANON 255 /* Number of bytes for which space will be available in a terminal input queue. */ #define _POSIX_MAX_INPUT 255 /* Maximum number of message queues open for a process. */ #define _POSIX_MQ_OPEN_MAX 8 /* Maximum number of supported message priorities. */ #define _POSIX_MQ_PRIO_MAX 32 /* Number of bytes in a filename. */ #define _POSIX_NAME_MAX 14 /* Number of simultaneous supplementary group IDs per process. */ #ifdef __USE_XOPEN2K # define _POSIX_NGROUPS_MAX 8 #else # define _POSIX_NGROUPS_MAX 0 #endif /* Number of files one process can have open at once. */ #ifdef __USE_XOPEN2K # define _POSIX_OPEN_MAX 20 #else # define _POSIX_OPEN_MAX 16 #endif #if !defined __USE_XOPEN2K || defined __USE_GNU /* Number of descriptors that a process may examine with `pselect' or `select'. */ # define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX #endif /* Number of bytes in a pathname. */ #define _POSIX_PATH_MAX 256 /* Number of bytes than can be written atomically to a pipe. */ #define _POSIX_PIPE_BUF 512 /* The number of repeated occurrences of a BRE permitted by the REGEXEC and REGCOMP functions when using the interval notation. */ #define _POSIX_RE_DUP_MAX 255 /* Minimal number of realtime signals reserved for the application. */ #define _POSIX_RTSIG_MAX 8 /* Number of semaphores a process can have. */ #define _POSIX_SEM_NSEMS_MAX 256 /* Maximal value of a semaphore. */ #define _POSIX_SEM_VALUE_MAX 32767 /* Number of pending realtime signals. */ #define _POSIX_SIGQUEUE_MAX 32 /* Largest value of a `ssize_t'. */ #define _POSIX_SSIZE_MAX 32767 /* Number of streams a process can have open at once. */ #define _POSIX_STREAM_MAX 8 /* The number of bytes in a symbolic link. */ #define _POSIX_SYMLINK_MAX 255 /* The number of symbolic links that can be traversed in the resolution of a pathname in the absence of a loop. */ #define _POSIX_SYMLOOP_MAX 8 /* Number of timer for a process. */ #define _POSIX_TIMER_MAX 32 /* Maximum number of characters in a tty name. */ #define _POSIX_TTY_NAME_MAX 9 /* Maximum length of a timezone name (element of `tzname'). */ #ifdef __USE_XOPEN2K # define _POSIX_TZNAME_MAX 6 #else # define _POSIX_TZNAME_MAX 3 #endif #if !defined __USE_XOPEN2K || defined __USE_GNU /* Maximum number of connections that can be queued on a socket. */ # define _POSIX_QLIMIT 1 /* Maximum number of bytes that can be buffered on a socket for send or receive. */ # define _POSIX_HIWAT _POSIX_PIPE_BUF /* Maximum number of elements in an `iovec' array. */ # define _POSIX_UIO_MAXIOV 16 #endif /* Maximum clock resolution in nanoseconds. */ #define _POSIX_CLOCKRES_MIN 20000000 /* Get the implementation-specific values for the above. */ #include #ifndef SSIZE_MAX /* ssize_t is not formally required to be the signed type corresponding to size_t, but it is for all configurations supported by glibc. */ # if __WORDSIZE == 64 || __WORDSIZE32_SIZE_ULONG # define SSIZE_MAX LONG_MAX # else # define SSIZE_MAX INT_MAX # endif #endif /* This value is a guaranteed minimum maximum. The current maximum can be got from `sysconf'. */ #ifndef NGROUPS_MAX # define NGROUPS_MAX 8 #endif #endif /* bits/posix1_lim.h */ PKZm   bits/a.out.hnu[#ifndef __A_OUT_GNU_H__ # error "Never use directly; include instead." #endif #ifdef __x86_64__ /* Signal to users of this header that this architecture really doesn't support a.out binary format. */ #define __NO_A_OUT_SUPPORT 1 #endif PKZ$Ҽbits/stdio_lim.hnu[/* Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDIO_LIM_H #define _BITS_STDIO_LIM_H 1 #ifndef _STDIO_H # error "Never include directly; use instead." #endif #define L_tmpnam 20 #define TMP_MAX 238328 #define FILENAME_MAX 4096 #ifdef __USE_POSIX # define L_ctermid 9 # if !defined __USE_XOPEN2K || defined __USE_GNU # define L_cuserid 9 # endif #endif #undef FOPEN_MAX #define FOPEN_MAX 16 #endif /* bits/stdio_lim.h */ PKZ4Mn_ZZbits/stdlib-float.hnu[/* Floating-point inline functions for stdlib.h. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDLIB_H # error "Never use directly; include instead." #endif #ifdef __USE_EXTERN_INLINES __extern_inline double __NTH (atof (const char *__nptr)) { return strtod (__nptr, (char **) NULL); } #endif /* Optimizing and Inlining. */ PKZ޵ bits/link.hnu[/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _LINK_H # error "Never include directly; use instead." #endif #ifndef __x86_64__ /* Registers for entry into PLT on IA-32. */ typedef struct La_i86_regs { uint32_t lr_edx; uint32_t lr_ecx; uint32_t lr_eax; uint32_t lr_ebp; uint32_t lr_esp; } La_i86_regs; /* Return values for calls from PLT on IA-32. */ typedef struct La_i86_retval { uint32_t lrv_eax; uint32_t lrv_edx; long double lrv_st0; long double lrv_st1; uint64_t lrv_bnd0; uint64_t lrv_bnd1; } La_i86_retval; __BEGIN_DECLS extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, La_i86_regs *__regs, unsigned int *__flags, const char *__symname, long int *__framesizep); extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, const La_i86_regs *__inregs, La_i86_retval *__outregs, const char *symname); __END_DECLS #else /* Registers for entry into PLT on x86-64. */ # if __GNUC_PREREQ (4,0) typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16))); typedef float La_x86_64_ymm __attribute__ ((__vector_size__ (32), __aligned__ (16))); typedef double La_x86_64_zmm __attribute__ ((__vector_size__ (64), __aligned__ (16))); # else typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__))); # endif typedef union { # if __GNUC_PREREQ (4,0) La_x86_64_ymm ymm[2]; La_x86_64_zmm zmm[1]; # endif La_x86_64_xmm xmm[4]; } La_x86_64_vector __attribute__ ((__aligned__ (16))); typedef struct La_x86_64_regs { uint64_t lr_rdx; uint64_t lr_r8; uint64_t lr_r9; uint64_t lr_rcx; uint64_t lr_rsi; uint64_t lr_rdi; uint64_t lr_rbp; uint64_t lr_rsp; La_x86_64_xmm lr_xmm[8]; La_x86_64_vector lr_vector[8]; #ifndef __ILP32__ __int128_t lr_bnd[4]; #endif } La_x86_64_regs; /* Return values for calls from PLT on x86-64. */ typedef struct La_x86_64_retval { uint64_t lrv_rax; uint64_t lrv_rdx; La_x86_64_xmm lrv_xmm0; La_x86_64_xmm lrv_xmm1; long double lrv_st0; long double lrv_st1; La_x86_64_vector lrv_vector0; La_x86_64_vector lrv_vector1; #ifndef __ILP32__ __int128_t lrv_bnd0; __int128_t lrv_bnd1; #endif } La_x86_64_retval; #define La_x32_regs La_x86_64_regs #define La_x32_retval La_x86_64_retval __BEGIN_DECLS extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, La_x86_64_regs *__regs, unsigned int *__flags, const char *__symname, long int *__framesizep); extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, const La_x86_64_regs *__inregs, La_x86_64_retval *__outregs, const char *__symname); extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, La_x32_regs *__regs, unsigned int *__flags, const char *__symname, long int *__framesizep); extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, uintptr_t *__refcook, uintptr_t *__defcook, const La_x32_regs *__inregs, La_x32_retval *__outregs, const char *__symname); __END_DECLS #endif PKZ`P] bits/ipc.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." #endif #include /* Mode bits for `msgget', `semget', and `shmget'. */ #define IPC_CREAT 01000 /* Create key if key does not exist. */ #define IPC_EXCL 02000 /* Fail if key exists. */ #define IPC_NOWAIT 04000 /* Return error on wait. */ /* Control commands for `msgctl', `semctl', and `shmctl'. */ #define IPC_RMID 0 /* Remove identifier. */ #define IPC_SET 1 /* Set `ipc_perm' options. */ #define IPC_STAT 2 /* Get `ipc_perm' options. */ #ifdef __USE_GNU # define IPC_INFO 3 /* See ipcs. */ #endif /* Special key values. */ #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ /* Data structure used to pass permission information to IPC operations. */ struct ipc_perm { __key_t __key; /* Key. */ __uid_t uid; /* Owner's user ID. */ __gid_t gid; /* Owner's group ID. */ __uid_t cuid; /* Creator's user ID. */ __gid_t cgid; /* Creator's group ID. */ unsigned short int mode; /* Read/write permission. */ unsigned short int __pad1; unsigned short int __seq; /* Sequence number. */ unsigned short int __pad2; __syscall_ulong_t __glibc_reserved1; __syscall_ulong_t __glibc_reserved2; }; PKZ˵**bits/signalfd.hnu[/* Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SIGNALFD_H # error "Never use directly; include instead." #endif /* Flags for signalfd. */ enum { SFD_CLOEXEC = 02000000, #define SFD_CLOEXEC SFD_CLOEXEC SFD_NONBLOCK = 00004000 #define SFD_NONBLOCK SFD_NONBLOCK }; PKZ1]zRRbits/getopt_core.hnu[/* Declarations for getopt (basic, portable features only). Copyright (C) 1989-2018 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_CORE_H #define _GETOPT_CORE_H 1 /* This header should not be used directly; include getopt.h or unistd.h instead. Unlike most bits headers, it does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ __BEGIN_DECLS /* For communication from 'getopt' to the caller. When 'getopt' finds an option that takes an argument, the argument value is returned here. Also, when 'ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to 'getopt'. On entry to 'getopt', zero means this is the first call; initialize. When 'getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message 'getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, 'optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in 'optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU 'getopt'. The argument '--' causes premature termination of argument scanning, explicitly telling 'getopt' that there are no more options. If OPTS begins with '-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. For standards compliance, the 'argv' argument has the type char *const *, but this is inaccurate; if argument permutation is enabled, the argv array (not the strings it points to) must be writable. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW __nonnull ((2, 3)); __END_DECLS #endif /* getopt_core.h */ PKZTէbits/socket_type.hnu[/* Define enum __socket_type for generic Linux. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SOCKET_H # error "Never include directly; use instead." #endif /* Types of sockets. */ enum __socket_type { SOCK_STREAM = 1, /* Sequenced, reliable, connection-based byte streams. */ #define SOCK_STREAM SOCK_STREAM SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams of fixed maximum length. */ #define SOCK_DGRAM SOCK_DGRAM SOCK_RAW = 3, /* Raw protocol interface. */ #define SOCK_RAW SOCK_RAW SOCK_RDM = 4, /* Reliably-delivered messages. */ #define SOCK_RDM SOCK_RDM SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, datagrams of fixed maximum length. */ #define SOCK_SEQPACKET SOCK_SEQPACKET SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ #define SOCK_DCCP SOCK_DCCP SOCK_PACKET = 10, /* Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level. */ #define SOCK_PACKET SOCK_PACKET /* Flags to be ORed into the type parameter of socket and socketpair and used for the flags parameter of paccept. */ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ #define SOCK_CLOEXEC SOCK_CLOEXEC SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as non-blocking. */ #define SOCK_NONBLOCK SOCK_NONBLOCK }; PKZu\\bits/stdlib-ldbl.hnu[/* -mlong-double-64 compatibility mode for functions. Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDLIB_H # error "Never include directly; use instead." #endif #ifdef __USE_ISOC99 __LDBL_REDIR1_DECL (strtold, strtod) #endif #ifdef __USE_GNU __LDBL_REDIR1_DECL (strtold_l, strtod_l) #endif #if __GLIBC_USE (IEC_60559_BFP_EXT) __LDBL_REDIR1_DECL (strfroml, strfromd) #endif #ifdef __USE_MISC __LDBL_REDIR1_DECL (qecvt, ecvt) __LDBL_REDIR1_DECL (qfcvt, fcvt) __LDBL_REDIR1_DECL (qgcvt, gcvt) __LDBL_REDIR1_DECL (qecvt_r, ecvt_r) __LDBL_REDIR1_DECL (qfcvt_r, fcvt_r) #endif PKZM bits/fenv.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FENV_H # error "Never use directly; include instead." #endif /* Define bits representing the exception. We use the bit positions of the appropriate bits in the FPU control word. */ enum { FE_INVALID = #define FE_INVALID 0x01 FE_INVALID, __FE_DENORM = 0x02, FE_DIVBYZERO = #define FE_DIVBYZERO 0x04 FE_DIVBYZERO, FE_OVERFLOW = #define FE_OVERFLOW 0x08 FE_OVERFLOW, FE_UNDERFLOW = #define FE_UNDERFLOW 0x10 FE_UNDERFLOW, FE_INEXACT = #define FE_INEXACT 0x20 FE_INEXACT }; #define FE_ALL_EXCEPT \ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) /* The ix87 FPU supports all of the four defined rounding modes. We use again the bit positions in the FPU control word as the values for the appropriate macros. */ enum { FE_TONEAREST = #define FE_TONEAREST 0 FE_TONEAREST, FE_DOWNWARD = #define FE_DOWNWARD 0x400 FE_DOWNWARD, FE_UPWARD = #define FE_UPWARD 0x800 FE_UPWARD, FE_TOWARDZERO = #define FE_TOWARDZERO 0xc00 FE_TOWARDZERO }; /* Type representing exception flags. */ typedef unsigned short int fexcept_t; /* Type representing floating-point environment. This structure corresponds to the layout of the block written by the `fstenv' instruction and has additional fields for the contents of the MXCSR register as written by the `stmxcsr' instruction. */ typedef struct { unsigned short int __control_word; unsigned short int __glibc_reserved1; unsigned short int __status_word; unsigned short int __glibc_reserved2; unsigned short int __tags; unsigned short int __glibc_reserved3; unsigned int __eip; unsigned short int __cs_selector; unsigned int __opcode:11; unsigned int __glibc_reserved4:5; unsigned int __data_offset; unsigned short int __data_selector; unsigned short int __glibc_reserved5; #ifdef __x86_64__ unsigned int __mxcsr; #endif } fenv_t; /* If the default argument is used we use this value. */ #define FE_DFL_ENV ((const fenv_t *) -1) #ifdef __USE_GNU /* Floating-point environment where none of the exception is masked. */ # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Type representing floating-point control modes. */ typedef struct { unsigned short int __control_word; unsigned short int __glibc_reserved; unsigned int __mxcsr; } femode_t; /* Default floating-point control modes. */ # define FE_DFL_MODE ((const femode_t *) -1L) #endif #ifdef __USE_EXTERN_INLINES __BEGIN_DECLS /* Optimized versions. */ #ifndef _LIBC extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept); #endif __extern_always_inline void __NTH (__feraiseexcept_invalid_divbyzero (int __excepts)) { if ((FE_INVALID & __excepts) != 0) { /* One example of an invalid operation is 0.0 / 0.0. */ float __f = 0.0; # ifdef __SSE_MATH__ __asm__ __volatile__ ("divss %0, %0 " : "+x" (__f)); # else __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" : "=t" (__f) : "0" (__f)); # endif (void) &__f; } if ((FE_DIVBYZERO & __excepts) != 0) { float __f = 1.0; float __g = 0.0; # ifdef __SSE_MATH__ __asm__ __volatile__ ("divss %1, %0" : "+x" (__f) : "x" (__g)); # else __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); # endif (void) &__f; } } __extern_inline int __NTH (feraiseexcept (int __excepts)) { if (__builtin_constant_p (__excepts) && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0) { __feraiseexcept_invalid_divbyzero (__excepts); return 0; } return __feraiseexcept_renamed (__excepts); } __END_DECLS #endif PKZ ?qq bits/wchar.hnu[/* wchar_t type related definitions. Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_WCHAR_H #define _BITS_WCHAR_H 1 /* The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__ are not defined, give the right value and type as long as both int and wchar_t are 32-bit types. Adding L'\0' to a constant value ensures that the type is correct; it is necessary to use (L'\0' + 0) rather than just L'\0' so that the type in C++ is the promoted version of wchar_t rather than the distinct wchar_t type itself. Because wchar_t in preprocessor #if expressions is treated as intmax_t or uintmax_t, the expression (L'\0' - 1) would have the wrong value for WCHAR_MAX in such expressions and so cannot be used to define __WCHAR_MAX in the unsigned case. */ #ifdef __WCHAR_MAX__ # define __WCHAR_MAX __WCHAR_MAX__ #elif L'\0' - 1 > 0 # define __WCHAR_MAX (0xffffffffu + L'\0') #else # define __WCHAR_MAX (0x7fffffff + L'\0') #endif #ifdef __WCHAR_MIN__ # define __WCHAR_MIN __WCHAR_MIN__ #elif L'\0' - 1 > 0 # define __WCHAR_MIN (L'\0' + 0) #else # define __WCHAR_MIN (-__WCHAR_MAX - 1) #endif #endif /* bits/wchar.h */ PKZho$$ bits/in.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Linux version. */ #ifndef _NETINET_IN_H # error "Never use directly; include instead." #endif /* If the application has already included linux/in6.h from a linux-based kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly. Neither the linux kernel nor glibc should break this ABI without coordination. In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for maximum backwards compatibility. */ #if defined _UAPI_LINUX_IN6_H \ || defined _UAPI_IPV6_H \ || defined _LINUX_IN6_H \ || defined _IPV6_H /* This is not quite the same API since the kernel always defines s6_addr16 and s6_addr32. This is not a violation of POSIX since POSIX says "at least the following member" and that holds true. */ # define __USE_KERNEL_IPV6_DEFS 1 #else # define __USE_KERNEL_IPV6_DEFS 0 #endif /* Options for use with `getsockopt' and `setsockopt' at the IP level. The first word in the comment at the right is the data type used; "bool" means a boolean value stored in an `int'. */ #define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ #define IP_HDRINCL 3 /* int; Header is included with data. */ #define IP_TOS 1 /* int; IP type of service and precedence. */ #define IP_TTL 2 /* int; IP time to live. */ #define IP_RECVOPTS 6 /* bool; Receive all IP options w/datagram. */ /* For BSD compatibility. */ #define IP_RECVRETOPTS IP_RETOPTS /* bool; Receive IP options for response. */ #define IP_RETOPTS 7 /* ip_opts; Set/get IP per-packet options. */ #define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ #define IP_MULTICAST_TTL 33 /* unsigned char; set/get IP multicast ttl */ #define IP_MULTICAST_LOOP 34 /* bool; set/get IP multicast loopback */ #define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ #define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ #define IP_UNBLOCK_SOURCE 37 /* ip_mreq_source: unblock data from source */ #define IP_BLOCK_SOURCE 38 /* ip_mreq_source: block data from source */ #define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */ #define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */ #define IP_MSFILTER 41 #ifdef __USE_MISC # define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */ # define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */ # define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/ # define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */ # define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */ # define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/ # define MCAST_MSFILTER 48 # define IP_MULTICAST_ALL 49 # define IP_UNICAST_IF 50 # define MCAST_EXCLUDE 0 # define MCAST_INCLUDE 1 #endif #define IP_ROUTER_ALERT 5 /* bool */ #define IP_PKTINFO 8 /* bool */ #define IP_PKTOPTIONS 9 #define IP_PMTUDISC 10 /* obsolete name? */ #define IP_MTU_DISCOVER 10 /* int; see below */ #define IP_RECVERR 11 /* bool */ #define IP_RECVTTL 12 /* bool */ #define IP_RECVTOS 13 /* bool */ #define IP_MTU 14 /* int */ #define IP_FREEBIND 15 #define IP_IPSEC_POLICY 16 #define IP_XFRM_POLICY 17 #define IP_PASSSEC 18 #define IP_TRANSPARENT 19 #define IP_MULTICAST_ALL 49 /* bool */ /* TProxy original addresses */ #define IP_ORIGDSTADDR 20 #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR #define IP_MINTTL 21 #define IP_NODEFRAG 22 #define IP_CHECKSUM 23 #define IP_BIND_ADDRESS_NO_PORT 24 #define IP_RECVFRAGSIZE 25 /* IP_MTU_DISCOVER arguments. */ #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ #define IP_PMTUDISC_WANT 1 /* Use per route hints. */ #define IP_PMTUDISC_DO 2 /* Always DF. */ #define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ /* Always use interface mtu (ignores dst pmtu) but don't set DF flag. Also incoming ICMP frag_needed notifications will be ignored on this socket to prevent accepting spoofed ones. */ #define IP_PMTUDISC_INTERFACE 4 /* Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented. */ #define IP_PMTUDISC_OMIT 5 #define IP_MULTICAST_IF 32 #define IP_MULTICAST_TTL 33 #define IP_MULTICAST_LOOP 34 #define IP_ADD_MEMBERSHIP 35 #define IP_DROP_MEMBERSHIP 36 #define IP_UNBLOCK_SOURCE 37 #define IP_BLOCK_SOURCE 38 #define IP_ADD_SOURCE_MEMBERSHIP 39 #define IP_DROP_SOURCE_MEMBERSHIP 40 #define IP_MSFILTER 41 #define IP_MULTICAST_ALL 49 #define IP_UNICAST_IF 50 /* To select the IP level. */ #define SOL_IP 0 #define IP_DEFAULT_MULTICAST_TTL 1 #define IP_DEFAULT_MULTICAST_LOOP 1 #define IP_MAX_MEMBERSHIPS 20 #ifdef __USE_MISC /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. The `ip_dst' field is used for the first-hop gateway when using a source route (this gets put into the header proper). */ struct ip_opts { struct in_addr ip_dst; /* First hop; zero without source route. */ char ip_opts[40]; /* Actually variable in size. */ }; /* Like `struct ip_mreq' but including interface specification by index. */ struct ip_mreqn { struct in_addr imr_multiaddr; /* IP multicast address of group */ struct in_addr imr_address; /* local IP address of interface */ int imr_ifindex; /* Interface index */ }; /* Structure used for IP_PKTINFO. */ struct in_pktinfo { int ipi_ifindex; /* Interface index */ struct in_addr ipi_spec_dst; /* Routing destination address */ struct in_addr ipi_addr; /* Header destination address */ }; #endif /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. The first word in the comment at the right is the data type used; "bool" means a boolean value stored in an `int'. */ #define IPV6_ADDRFORM 1 #define IPV6_2292PKTINFO 2 #define IPV6_2292HOPOPTS 3 #define IPV6_2292DSTOPTS 4 #define IPV6_2292RTHDR 5 #define IPV6_2292PKTOPTIONS 6 #define IPV6_CHECKSUM 7 #define IPV6_2292HOPLIMIT 8 #define SCM_SRCRT IPV6_RXSRCRT #define IPV6_NEXTHOP 9 #define IPV6_AUTHHDR 10 #define IPV6_UNICAST_HOPS 16 #define IPV6_MULTICAST_IF 17 #define IPV6_MULTICAST_HOPS 18 #define IPV6_MULTICAST_LOOP 19 #define IPV6_JOIN_GROUP 20 #define IPV6_LEAVE_GROUP 21 #define IPV6_ROUTER_ALERT 22 #define IPV6_MTU_DISCOVER 23 #define IPV6_MTU 24 #define IPV6_RECVERR 25 #define IPV6_V6ONLY 26 #define IPV6_JOIN_ANYCAST 27 #define IPV6_LEAVE_ANYCAST 28 #define IPV6_IPSEC_POLICY 34 #define IPV6_XFRM_POLICY 35 #define IPV6_HDRINCL 36 /* Advanced API (RFC3542) (1). */ #define IPV6_RECVPKTINFO 49 #define IPV6_PKTINFO 50 #define IPV6_RECVHOPLIMIT 51 #define IPV6_HOPLIMIT 52 #define IPV6_RECVHOPOPTS 53 #define IPV6_HOPOPTS 54 #define IPV6_RTHDRDSTOPTS 55 #define IPV6_RECVRTHDR 56 #define IPV6_RTHDR 57 #define IPV6_RECVDSTOPTS 58 #define IPV6_DSTOPTS 59 #define IPV6_RECVPATHMTU 60 #define IPV6_PATHMTU 61 #define IPV6_DONTFRAG 62 /* Advanced API (RFC3542) (2). */ #define IPV6_RECVTCLASS 66 #define IPV6_TCLASS 67 #define IPV6_AUTOFLOWLABEL 70 /* RFC5014. */ #define IPV6_ADDR_PREFERENCES 72 /* RFC5082. */ #define IPV6_MINHOPCOUNT 73 #define IPV6_ORIGDSTADDR 74 #define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR #define IPV6_TRANSPARENT 75 #define IPV6_UNICAST_IF 76 #define IPV6_RECVFRAGSIZE 77 #define IPV6_FREEBIND 78 /* Obsolete synonyms for the above. */ #if !__USE_KERNEL_IPV6_DEFS # define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP # define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP #endif #define IPV6_RXHOPOPTS IPV6_HOPOPTS #define IPV6_RXDSTOPTS IPV6_DSTOPTS /* IPV6_MTU_DISCOVER values. */ #define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ #define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ #define IPV6_PMTUDISC_DO 2 /* Always DF. */ #define IPV6_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ #define IPV6_PMTUDISC_INTERFACE 4 /* See IP_PMTUDISC_INTERFACE. */ #define IPV6_PMTUDISC_OMIT 5 /* See IP_PMTUDISC_OMIT. */ /* Socket level values for IPv6. */ #define SOL_IPV6 41 #define SOL_ICMPV6 58 /* Routing header options for IPv6. */ #define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ #define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ #define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ PKZIO#O# bits/stab.defnu[/* Table of DBX symbol codes for the GNU system. Copyright (C) 1988, 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This contains contribution from Cygnus Support. */ /* Global variable. Only the name is significant. To find the address, look in the corresponding external symbol. */ __define_stab (N_GSYM, 0x20, "GSYM") /* Function name for BSD Fortran. Only the name is significant. To find the address, look in the corresponding external symbol. */ __define_stab (N_FNAME, 0x22, "FNAME") /* Function name or text-segment variable for C. Value is its address. Desc is supposedly starting line number, but GCC doesn't set it and DBX seems not to miss it. */ __define_stab (N_FUN, 0x24, "FUN") /* Data-segment variable with internal linkage. Value is its address. "Static Sym". */ __define_stab (N_STSYM, 0x26, "STSYM") /* BSS-segment variable with internal linkage. Value is its address. */ __define_stab (N_LCSYM, 0x28, "LCSYM") /* Name of main routine. Only the name is significant. This is not used in C. */ __define_stab (N_MAIN, 0x2a, "MAIN") /* Global symbol in Pascal. Supposedly the value is its line number; I'm skeptical. */ __define_stab (N_PC, 0x30, "PC") /* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ __define_stab (N_NSYMS, 0x32, "NSYMS") /* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ __define_stab (N_NOMAP, 0x34, "NOMAP") /* New stab from Solaris. I don't know what it means, but it don't seem to contain useful information. */ __define_stab (N_OBJ, 0x38, "OBJ") /* New stab from Solaris. I don't know what it means, but it don't seem to contain useful information. Possibly related to the optimization flags used in this module. */ __define_stab (N_OPT, 0x3c, "OPT") /* Register variable. Value is number of register. */ __define_stab (N_RSYM, 0x40, "RSYM") /* Modula-2 compilation unit. Can someone say what info it contains? */ __define_stab (N_M2C, 0x42, "M2C") /* Line number in text segment. Desc is the line number; value is corresponding address. */ __define_stab (N_SLINE, 0x44, "SLINE") /* Similar, for data segment. */ __define_stab (N_DSLINE, 0x46, "DSLINE") /* Similar, for bss segment. */ __define_stab (N_BSLINE, 0x48, "BSLINE") /* Sun's source-code browser stabs. ?? Don't know what the fields are. Supposedly the field is "path to associated .cb file". THIS VALUE OVERLAPS WITH N_BSLINE! */ __define_stab (N_BROWS, 0x48, "BROWS") /* GNU Modula-2 definition module dependency. Value is the modification time of the definition file. Other is non-zero if it is imported with the GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there are enough empty fields? */ __define_stab(N_DEFD, 0x4a, "DEFD") /* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 and one is for C++. Still,... */ /* GNU C++ exception variable. Name is variable name. */ __define_stab (N_EHDECL, 0x50, "EHDECL") /* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ __define_stab (N_MOD2, 0x50, "MOD2") /* GNU C++ `catch' clause. Value is its address. Desc is nonzero if this entry is immediately followed by a CAUGHT stab saying what exception was caught. Multiple CAUGHT stabs means that multiple exceptions can be caught here. If Desc is 0, it means all exceptions are caught here. */ __define_stab (N_CATCH, 0x54, "CATCH") /* Structure or union element. Value is offset in the structure. */ __define_stab (N_SSYM, 0x60, "SSYM") /* Name of main source file. Value is starting text address of the compilation. */ __define_stab (N_SO, 0x64, "SO") /* Automatic variable in the stack. Value is offset from frame pointer. Also used for type descriptions. */ __define_stab (N_LSYM, 0x80, "LSYM") /* Beginning of an include file. Only Sun uses this. In an object file, only the name is significant. The Sun linker puts data into some of the other fields. */ __define_stab (N_BINCL, 0x82, "BINCL") /* Name of sub-source file (#include file). Value is starting text address of the compilation. */ __define_stab (N_SOL, 0x84, "SOL") /* Parameter variable. Value is offset from argument pointer. (On most machines the argument pointer is the same as the frame pointer. */ __define_stab (N_PSYM, 0xa0, "PSYM") /* End of an include file. No name. This and N_BINCL act as brackets around the file's output. In an object file, there is no significant data in this entry. The Sun linker puts data into some of the fields. */ __define_stab (N_EINCL, 0xa2, "EINCL") /* Alternate entry point. Value is its address. */ __define_stab (N_ENTRY, 0xa4, "ENTRY") /* Beginning of lexical block. The desc is the nesting level in lexical blocks. The value is the address of the start of the text for the block. The variables declared inside the block *precede* the N_LBRAC symbol. */ __define_stab (N_LBRAC, 0xc0, "LBRAC") /* Place holder for deleted include file. Replaces a N_BINCL and everything up to the corresponding N_EINCL. The Sun linker generates these when it finds multiple identical copies of the symbols from an include file. This appears only in output from the Sun linker. */ __define_stab (N_EXCL, 0xc2, "EXCL") /* Modula-2 scope information. Can someone say what info it contains? */ __define_stab (N_SCOPE, 0xc4, "SCOPE") /* End of a lexical block. Desc matches the N_LBRAC's desc. The value is the address of the end of the text for the block. */ __define_stab (N_RBRAC, 0xe0, "RBRAC") /* Begin named common block. Only the name is significant. */ __define_stab (N_BCOMM, 0xe2, "BCOMM") /* End named common block. Only the name is significant (and it should match the N_BCOMM). */ __define_stab (N_ECOMM, 0xe4, "ECOMM") /* End common (local name): value is address. I'm not sure how this is used. */ __define_stab (N_ECOML, 0xe8, "ECOML") /* These STAB's are used on Gould systems for Non-Base register symbols or something like that. FIXME. I have assigned the values at random since I don't have a Gould here. Fixups from Gould folk welcome... */ __define_stab (N_NBTEXT, 0xF0, "NBTEXT") __define_stab (N_NBDATA, 0xF2, "NBDATA") __define_stab (N_NBBSS, 0xF4, "NBBSS") __define_stab (N_NBSTS, 0xF6, "NBSTS") __define_stab (N_NBLCS, 0xF8, "NBLCS") /* Second symbol entry containing a length-value for the preceding entry. The value is the length. */ __define_stab (N_LENG, 0xfe, "LENG") /* The above information, in matrix format. STAB MATRIX _________________________________________________ | 00 - 1F are not dbx stab symbols | | In most cases, the low bit is the EXTernal bit| | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | | 09 |EXT | 0B | 0D | 0F | | 10 | 12 COMM | 14 SETA | 16 SETT | | 11 | 13 | 15 | 17 | | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| | 19 | 1B | 1D | 1F FN | |_______________________________________________| | Debug entries with bit 01 set are unused. | | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | | 28 LCSYM | 2A MAIN | 2C | 2E | | 30 PC | 32 NSYMS | 34 NOMAP | 36 | | 38 OBJ | 3A | 3C OPT | 3E | | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | | 48 BSLINE*| 4A DEFD | 4C | 4E | | 50 EHDECL*| 52 | 54 CATCH | 56 | | 58 | 5A | 5C | 5E | | 60 SSYM | 62 | 64 SO | 66 | | 68 | 6A | 6C | 6E | | 70 | 72 | 74 | 76 | | 78 | 7A | 7C | 7E | | 80 LSYM | 82 BINCL | 84 SOL | 86 | | 88 | 8A | 8C | 8E | | 90 | 92 | 94 | 96 | | 98 | 9A | 9C | 9E | | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | | A8 | AA | AC | AE | | B0 | B2 | B4 | B6 | | B8 | BA | BC | BE | | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | | C8 | CA | CC | CE | | D0 | D2 | D4 | D6 | | D8 | DA | DC | DE | | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | | E8 ECOML | EA | EC | EE | | F0 | F2 | F4 | F6 | | F8 | FA | FC | FE LENG | +-----------------------------------------------+ * 50 EHDECL is also MOD2. * 48 BSLINE is also BROWS. */ PKZ bits/endian.hnu[/* i386/x86_64 are little-endian. */ #ifndef _ENDIAN_H # error "Never use directly; include instead." #endif #define __BYTE_ORDER __LITTLE_ENDIAN PKZH; ; bits/sem.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SEM_H # error "Never include directly; use instead." #endif #include /* Flags for `semop'. */ #define SEM_UNDO 0x1000 /* undo the operation on exit */ /* Commands for `semctl'. */ #define GETPID 11 /* get sempid */ #define GETVAL 12 /* get semval */ #define GETALL 13 /* get all semval's */ #define GETNCNT 14 /* get semncnt */ #define GETZCNT 15 /* get semzcnt */ #define SETVAL 16 /* set semval */ #define SETALL 17 /* set all semval's */ /* Data structure describing a set of semaphores. */ struct semid_ds { struct ipc_perm sem_perm; /* operation permission struct */ __time_t sem_otime; /* last semop() time */ __syscall_ulong_t __glibc_reserved1; __time_t sem_ctime; /* last time changed by semctl() */ __syscall_ulong_t __glibc_reserved2; __syscall_ulong_t sem_nsems; /* number of semaphores in set */ __syscall_ulong_t __glibc_reserved3; __syscall_ulong_t __glibc_reserved4; }; /* The user should define a union like the following to use it for arguments for `semctl'. union semun { int val; <= value for SETVAL struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET unsigned short int *array; <= array for GETALL & SETALL struct seminfo *__buf; <= buffer for IPC_INFO }; Previous versions of this file used to define this union but this is incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether one must define the union or not. */ #define _SEM_SEMUN_UNDEFINED 1 #ifdef __USE_MISC /* ipcs ctl cmds */ # define SEM_STAT 18 # define SEM_INFO 19 # define SEM_STAT_ANY 20 struct seminfo { int semmap; int semmni; int semmns; int semmnu; int semmsl; int semopm; int semume; int semusz; int semvmx; int semaem; }; #endif /* __USE_MISC */ PKZb ԝbits/select2.hnu[/* Checking macros for select functions. Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SELECT_H # error "Never include directly; use instead." #endif /* Helper functions to issue warnings and errors when needed. */ extern long int __fdelt_chk (long int __d); extern long int __fdelt_warn (long int __d) __warnattr ("bit outside of fd_set selected"); #undef __FD_ELT #define __FD_ELT(d) \ __extension__ \ ({ long int __d = (d); \ (__builtin_constant_p (__d) \ ? (0 <= __d && __d < __FD_SETSIZE \ ? (__d / __NFDBITS) \ : __fdelt_warn (__d)) \ : __fdelt_chk (__d)); }) PKZ-Obits/signum-generic.hnu[/* Signal number constants. Generic template. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SIGNUM_GENERIC_H #define _BITS_SIGNUM_GENERIC_H 1 #ifndef _SIGNAL_H #error "Never include directly; use instead." #endif /* Fake signal functions. */ #define SIG_ERR ((__sighandler_t) -1) /* Error return. */ #define SIG_DFL ((__sighandler_t) 0) /* Default action. */ #define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ #ifdef __USE_XOPEN # define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ #endif /* We define here all the signal names listed in POSIX (1003.1-2008); as of 1003.1-2013, no additional signals have been added by POSIX. We also define here signal names that historically exist in every real-world POSIX variant (e.g. SIGWINCH). Signals in the 1-15 range are defined with their historical numbers. For other signals, we use the BSD numbers. There are two unallocated signal numbers in the 1-31 range: 7 and 29. Signal number 0 is reserved for use as kill(pid, 0), to test whether a process exists without sending it a signal. */ /* ISO C99 signals. */ #define SIGINT 2 /* Interactive attention signal. */ #define SIGILL 4 /* Illegal instruction. */ #define SIGABRT 6 /* Abnormal termination. */ #define SIGFPE 8 /* Erroneous arithmetic operation. */ #define SIGSEGV 11 /* Invalid access to storage. */ #define SIGTERM 15 /* Termination request. */ /* Historical signals specified by POSIX. */ #define SIGHUP 1 /* Hangup. */ #define SIGQUIT 3 /* Quit. */ #define SIGTRAP 5 /* Trace/breakpoint trap. */ #define SIGKILL 9 /* Killed. */ #define SIGBUS 10 /* Bus error. */ #define SIGSYS 12 /* Bad system call. */ #define SIGPIPE 13 /* Broken pipe. */ #define SIGALRM 14 /* Alarm clock. */ /* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ #define SIGURG 16 /* Urgent data is available at a socket. */ #define SIGSTOP 17 /* Stop, unblockable. */ #define SIGTSTP 18 /* Keyboard stop. */ #define SIGCONT 19 /* Continue. */ #define SIGCHLD 20 /* Child terminated or stopped. */ #define SIGTTIN 21 /* Background read from control terminal. */ #define SIGTTOU 22 /* Background write to control terminal. */ #define SIGPOLL 23 /* Pollable event occurred (System V). */ #define SIGXCPU 24 /* CPU time limit exceeded. */ #define SIGXFSZ 25 /* File size limit exceeded. */ #define SIGVTALRM 26 /* Virtual timer expired. */ #define SIGPROF 27 /* Profiling timer expired. */ #define SIGUSR1 30 /* User-defined signal 1. */ #define SIGUSR2 31 /* User-defined signal 2. */ /* Nonstandard signals found in all modern POSIX systems (including both BSD and Linux). */ #define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ /* Archaic names for compatibility. */ #define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ #define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ #define SIGCLD SIGCHLD /* Old System V name */ /* Not all systems support real-time signals. bits/signum.h indicates that they are supported by overriding __SIGRTMAX to a value greater than __SIGRTMIN. These constants give the kernel-level hard limits, but some real-time signals may be used internally by glibc. Do not use these constants in application code; use SIGRTMIN and SIGRTMAX (defined in signal.h) instead. */ #define __SIGRTMIN 32 #define __SIGRTMAX __SIGRTMIN /* Biggest signal number + 1 (including real-time signals). */ #define _NSIG (__SIGRTMAX + 1) #endif /* bits/signum-generic.h. */ PKZïp p bits/local_lim.hnu[/* Minimum guaranteed maximum values for system limits. Linux version. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A similar thing is true for OPEN_MAX: the limit can be changed at runtime and therefore the macro must not be defined. Remove this after including the header if necessary. */ #ifndef NR_OPEN # define __undef_NR_OPEN #endif #ifndef LINK_MAX # define __undef_LINK_MAX #endif #ifndef OPEN_MAX # define __undef_OPEN_MAX #endif #ifndef ARG_MAX # define __undef_ARG_MAX #endif /* The kernel sources contain a file with all the needed information. */ #include /* Have to remove NR_OPEN? */ #ifdef __undef_NR_OPEN # undef NR_OPEN # undef __undef_NR_OPEN #endif /* Have to remove LINK_MAX? */ #ifdef __undef_LINK_MAX # undef LINK_MAX # undef __undef_LINK_MAX #endif /* Have to remove OPEN_MAX? */ #ifdef __undef_OPEN_MAX # undef OPEN_MAX # undef __undef_OPEN_MAX #endif /* Have to remove ARG_MAX? */ #ifdef __undef_ARG_MAX # undef ARG_MAX # undef __undef_ARG_MAX #endif /* The number of data keys per process. */ #define _POSIX_THREAD_KEYS_MAX 128 /* This is the value this implementation supports. */ #define PTHREAD_KEYS_MAX 1024 /* Controlling the iterations of destructors for thread-specific data. */ #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 /* Number of iterations this implementation does. */ #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS /* The number of threads per process. */ #define _POSIX_THREAD_THREADS_MAX 64 /* We have no predefined limit on the number of threads. */ #undef PTHREAD_THREADS_MAX /* Maximum amount by which a process can descrease its asynchronous I/O priority level. */ #define AIO_PRIO_DELTA_MAX 20 /* Minimum size for a thread. We are free to choose a reasonable value. */ #define PTHREAD_STACK_MIN 16384 /* Maximum number of timer expiration overruns. */ #define DELAYTIMER_MAX 2147483647 /* Maximum tty name length. */ #define TTY_NAME_MAX 32 /* Maximum login name length. This is arbitrary. */ #define LOGIN_NAME_MAX 256 /* Maximum host name length. */ #define HOST_NAME_MAX 64 /* Maximum message queue priority level. */ #define MQ_PRIO_MAX 32768 /* Maximum value the semaphore can have. */ #define SEM_VALUE_MAX (2147483647) PKZ|(bits/resource.hnu[/* Bit values & structures for resource limits. Linux version. Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_RESOURCE_H # error "Never use directly; include instead." #endif #include /* Transmute defines to enumerations. The macro re-definitions are necessary because some programs want to test for operating system features with #ifdef RUSAGE_SELF. In ISO C the reflexive definition is a no-op. */ /* Kinds of resource limit. */ enum __rlimit_resource { /* Per-process CPU limit, in seconds. */ RLIMIT_CPU = 0, #define RLIMIT_CPU RLIMIT_CPU /* Largest file that can be created, in bytes. */ RLIMIT_FSIZE = 1, #define RLIMIT_FSIZE RLIMIT_FSIZE /* Maximum size of data segment, in bytes. */ RLIMIT_DATA = 2, #define RLIMIT_DATA RLIMIT_DATA /* Maximum size of stack segment, in bytes. */ RLIMIT_STACK = 3, #define RLIMIT_STACK RLIMIT_STACK /* Largest core file that can be created, in bytes. */ RLIMIT_CORE = 4, #define RLIMIT_CORE RLIMIT_CORE /* Largest resident set size, in bytes. This affects swapping; processes that are exceeding their resident set size will be more likely to have physical memory taken from them. */ __RLIMIT_RSS = 5, #define RLIMIT_RSS __RLIMIT_RSS /* Number of open files. */ RLIMIT_NOFILE = 7, __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ #define RLIMIT_NOFILE RLIMIT_NOFILE #define RLIMIT_OFILE __RLIMIT_OFILE /* Address space limit. */ RLIMIT_AS = 9, #define RLIMIT_AS RLIMIT_AS /* Number of processes. */ __RLIMIT_NPROC = 6, #define RLIMIT_NPROC __RLIMIT_NPROC /* Locked-in-memory address space. */ __RLIMIT_MEMLOCK = 8, #define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK /* Maximum number of file locks. */ __RLIMIT_LOCKS = 10, #define RLIMIT_LOCKS __RLIMIT_LOCKS /* Maximum number of pending signals. */ __RLIMIT_SIGPENDING = 11, #define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING /* Maximum bytes in POSIX message queues. */ __RLIMIT_MSGQUEUE = 12, #define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE /* Maximum nice priority allowed to raise to. Nice levels 19 .. -20 correspond to 0 .. 39 values of this resource limit. */ __RLIMIT_NICE = 13, #define RLIMIT_NICE __RLIMIT_NICE /* Maximum realtime priority allowed for non-priviledged processes. */ __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO /* Maximum CPU time in µs that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, #define RLIMIT_RTTIME __RLIMIT_RTTIME __RLIMIT_NLIMITS = 16, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS }; /* Value to indicate that there is no limit. */ #ifndef __USE_FILE_OFFSET64 # define RLIM_INFINITY ((__rlim_t) -1) #else # define RLIM_INFINITY 0xffffffffffffffffuLL #endif #ifdef __USE_LARGEFILE64 # define RLIM64_INFINITY 0xffffffffffffffffuLL #endif /* We can represent all limits. */ #define RLIM_SAVED_MAX RLIM_INFINITY #define RLIM_SAVED_CUR RLIM_INFINITY /* Type for resource quantity measurement. */ #ifndef __USE_FILE_OFFSET64 typedef __rlim_t rlim_t; #else typedef __rlim64_t rlim_t; #endif #ifdef __USE_LARGEFILE64 typedef __rlim64_t rlim64_t; #endif struct rlimit { /* The current (soft) limit. */ rlim_t rlim_cur; /* The hard limit. */ rlim_t rlim_max; }; #ifdef __USE_LARGEFILE64 struct rlimit64 { /* The current (soft) limit. */ rlim64_t rlim_cur; /* The hard limit. */ rlim64_t rlim_max; }; #endif /* Whose usage statistics do you want? */ enum __rusage_who { /* The calling process. */ RUSAGE_SELF = 0, #define RUSAGE_SELF RUSAGE_SELF /* All of its terminated child processes. */ RUSAGE_CHILDREN = -1 #define RUSAGE_CHILDREN RUSAGE_CHILDREN #ifdef __USE_GNU , /* The calling thread. */ RUSAGE_THREAD = 1 # define RUSAGE_THREAD RUSAGE_THREAD /* Name for the same functionality on Solaris. */ # define RUSAGE_LWP RUSAGE_THREAD #endif }; #include #include /* Priority limits. */ #define PRIO_MIN -20 /* Minimum priority a process can have. */ #define PRIO_MAX 20 /* Maximum priority a process can have. */ /* The type of the WHICH argument to `getpriority' and `setpriority', indicating what flavor of entity the WHO argument specifies. */ enum __priority_which { PRIO_PROCESS = 0, /* WHO is a process ID. */ #define PRIO_PROCESS PRIO_PROCESS PRIO_PGRP = 1, /* WHO is a process group ID. */ #define PRIO_PGRP PRIO_PGRP PRIO_USER = 2 /* WHO is a user ID. */ #define PRIO_USER PRIO_USER }; __BEGIN_DECLS #ifdef __USE_GNU /* Modify and return resource limits of a process atomically. */ # ifndef __USE_FILE_OFFSET64 extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource, const struct rlimit *__new_limit, struct rlimit *__old_limit) __THROW; # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (prlimit, (__pid_t __pid, enum __rlimit_resource __resource, const struct rlimit *__new_limit, struct rlimit *__old_limit), prlimit64); # else # define prlimit prlimit64 # endif # endif # ifdef __USE_LARGEFILE64 extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource, const struct rlimit64 *__new_limit, struct rlimit64 *__old_limit) __THROW; # endif #endif __END_DECLS PKZ$Ȫ.. bits/epoll.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_EPOLL_H # error "Never use directly; include instead." #endif /* Flags to be passed to epoll_create1. */ enum { EPOLL_CLOEXEC = 02000000 #define EPOLL_CLOEXEC EPOLL_CLOEXEC }; #define __EPOLL_PACKED __attribute__ ((__packed__)) PKZĬbits/monetary-ldbl.hnu[/* -mlong-double-64 compatibility mode for monetary functions. Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MONETARY_H # error "Never include directly; use instead." #endif __LDBL_REDIR_DECL (strfmon) #ifdef __USE_GNU __LDBL_REDIR_DECL (strfmon_l) #endif PKZ"_{ KKbits/string_fortified.hnu[/* Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STRING_FORTIFIED_H #define _BITS_STRING_FORTIFIED_H 1 #ifndef _STRING_H # error "Never use directly; include instead." #endif #if !__GNUC_PREREQ (5,0) __warndecl (__warn_memset_zero_len, "memset used with constant zero length parameter; this could be due to transposed parameters"); #endif __fortify_function void * __NTH (memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)) { return __builtin___memcpy_chk (__dest, __src, __len, __glibc_objsize0 (__dest)); } __fortify_function void * __NTH (memmove (void *__dest, const void *__src, size_t __len)) { return __builtin___memmove_chk (__dest, __src, __len, __glibc_objsize0 (__dest)); } #ifdef __USE_GNU __fortify_function void * __NTH (mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)) { return __builtin___mempcpy_chk (__dest, __src, __len, __glibc_objsize0 (__dest)); } #endif /* The first two tests here help to catch a somewhat common problem where the second and third parameter are transposed. This is especially problematic if the intended fill value is zero. In this case no work is done at all. We detect these problems by referring non-existing functions. */ __fortify_function void * __NTH (memset (void *__dest, int __ch, size_t __len)) { /* GCC-5.0 and newer implements these checks in the compiler, so we don't need them here. */ #if !__GNUC_PREREQ (5,0) if (__builtin_constant_p (__len) && __len == 0 && (!__builtin_constant_p (__ch) || __ch != 0)) { __warn_memset_zero_len (); return __dest; } #endif return __builtin___memset_chk (__dest, __ch, __len, __glibc_objsize0 (__dest)); } #ifdef __USE_MISC # include void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) __THROW __nonnull ((1)); __fortify_function void __NTH (explicit_bzero (void *__dest, size_t __len)) { __explicit_bzero_chk (__dest, __len, __glibc_objsize0 (__dest)); } #endif __fortify_function char * __NTH (strcpy (char *__restrict __dest, const char *__restrict __src)) { return __builtin___strcpy_chk (__dest, __src, __glibc_objsize (__dest)); } #ifdef __USE_XOPEN2K8 __fortify_function char * __NTH (stpcpy (char *__restrict __dest, const char *__restrict __src)) { return __builtin___stpcpy_chk (__dest, __src, __glibc_objsize (__dest)); } #endif __fortify_function char * __NTH (strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)) { return __builtin___strncpy_chk (__dest, __src, __len, __glibc_objsize (__dest)); } #ifdef __USE_XOPEN2K8 # if __GNUC_PREREQ (4, 7) || __glibc_clang_prereq (2, 6) __fortify_function char * __NTH (stpncpy (char *__dest, const char *__src, size_t __n)) { return __builtin___stpncpy_chk (__dest, __src, __n, __glibc_objsize (__dest)); } # else extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, size_t __destlen) __THROW; extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src, size_t __n), stpncpy); __fortify_function char * __NTH (stpncpy (char *__dest, const char *__src, size_t __n)) { if (__bos (__dest) != (size_t) -1 && (!__builtin_constant_p (__n) || __n > __bos (__dest))) return __stpncpy_chk (__dest, __src, __n, __bos (__dest)); return __stpncpy_alias (__dest, __src, __n); } # endif #endif __fortify_function char * __NTH (strcat (char *__restrict __dest, const char *__restrict __src)) { return __builtin___strcat_chk (__dest, __src, __glibc_objsize (__dest)); } __fortify_function char * __NTH (strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)) { return __builtin___strncat_chk (__dest, __src, __len, __glibc_objsize (__dest)); } #endif /* bits/string_fortified.h */ PKZsb\OObits/thread-shared-types.hnu[/* Common threading primitives definitions for both POSIX and C11. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _THREAD_SHARED_TYPES_H #define _THREAD_SHARED_TYPES_H 1 /* Arch-specific definitions. Each architecture must define the following macros to define the expected sizes of pthread data types: __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. Also, the following macros must be define for internal pthread_mutex_t struct definitions (struct __pthread_mutex_s): __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind' and before '__spin' (for 64 bits) or '__nusers' (for 32 bits). __PTHREAD_COMPAT_PADDING_END - any additional members at the end of the internal structure. __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock elision or 0 otherwise. __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The preferred value for new architectures is 0. __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and __list will be place inside a union for linuxthreads compatibility. The preferred value for new architectures is 0. For a new port the preferred values for the required defines are: #define __PTHREAD_COMPAT_PADDING_MID #define __PTHREAD_COMPAT_PADDING_END #define __PTHREAD_MUTEX_LOCK_ELISION 0 #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 #define __PTHREAD_MUTEX_USE_UNION 0 __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to eventually support lock elision using transactional memory. The additional macro defines any constraint for the lock alignment inside the thread structures: __LOCK_ALIGNMENT - for internal lock/futex usage. Same idea but for the once locking primitive: __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t) must be defined. */ #include /* Common definition of pthread_mutex_t. */ #if !__PTHREAD_MUTEX_USE_UNION typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; #else typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; #endif /* Lock elision support. */ #if __PTHREAD_MUTEX_LOCK_ELISION # if !__PTHREAD_MUTEX_USE_UNION # define __PTHREAD_SPINS_DATA \ short __spins; \ short __elision # define __PTHREAD_SPINS 0, 0 # else # define __PTHREAD_SPINS_DATA \ struct \ { \ short __espins; \ short __eelision; \ } __elision_data # define __PTHREAD_SPINS { 0, 0 } # define __spins __elision_data.__espins # define __elision __elision_data.__eelision # endif #else # define __PTHREAD_SPINS_DATA int __spins /* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ # define __PTHREAD_SPINS 0 #endif struct __pthread_mutex_s { int __lock __LOCK_ALIGNMENT; unsigned int __count; int __owner; #if !__PTHREAD_MUTEX_NUSERS_AFTER_KIND unsigned int __nusers; #endif /* KIND must stay at this position in the structure to maintain binary compatibility with static initializers. Concurrency notes: The __kind of a mutex is initialized either by the static PTHREAD_MUTEX_INITIALIZER or by a call to pthread_mutex_init. After a mutex has been initialized, the __kind of a mutex is usually not changed. BUT it can be set to -1 in pthread_mutex_destroy or elision can be enabled. This is done concurrently in the pthread_mutex_*lock functions by using the macro FORCE_ELISION. This macro is only defined for architectures which supports lock elision. For elision, there are the flags PTHREAD_MUTEX_ELISION_NP and PTHREAD_MUTEX_NO_ELISION_NP which can be set in addition to the already set type of a mutex. Before a mutex is initialized, only PTHREAD_MUTEX_NO_ELISION_NP can be set with pthread_mutexattr_settype. After a mutex has been initialized, the functions pthread_mutex_*lock can enable elision - if the mutex-type and the machine supports it - by setting the flag PTHREAD_MUTEX_ELISION_NP. This is done concurrently. Afterwards the lock / unlock functions are using specific elision code-paths. */ int __kind; __PTHREAD_COMPAT_PADDING_MID #if __PTHREAD_MUTEX_NUSERS_AFTER_KIND unsigned int __nusers; #endif #if !__PTHREAD_MUTEX_USE_UNION __PTHREAD_SPINS_DATA; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else __extension__ union { __PTHREAD_SPINS_DATA; __pthread_slist_t __list; }; # define __PTHREAD_MUTEX_HAVE_PREV 0 #endif __PTHREAD_COMPAT_PADDING_END }; /* Common definition of pthread_cond_t. */ struct __pthread_cond_s { __extension__ union { __extension__ unsigned long long int __wseq; struct { unsigned int __low; unsigned int __high; } __wseq32; }; __extension__ union { __extension__ unsigned long long int __g1_start; struct { unsigned int __low; unsigned int __high; } __g1_start32; }; unsigned int __glibc_unused___g_refs[2] __LOCK_ALIGNMENT; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; #endif /* _THREAD_SHARED_TYPES_H */ PKZT!@$bits/ss_flags.hnu[/* ss_flags values for stack_t. Linux version. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SS_FLAGS_H #define _BITS_SS_FLAGS_H 1 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never include this file directly. Use instead" #endif /* Possible values for `ss_flags'. */ enum { SS_ONSTACK = 1, #define SS_ONSTACK SS_ONSTACK SS_DISABLE #define SS_DISABLE SS_DISABLE }; #endif /* bits/ss_flags.h */ PKZKG<< bits/socket.hnu[/* System-specific socket constants and types. Linux version. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H #ifndef _SYS_SOCKET_H # error "Never include directly; use instead." #endif #define __need_size_t #include #include /* Type for length arguments in socket calls. */ #ifndef __socklen_t_defined typedef __socklen_t socklen_t; # define __socklen_t_defined #endif /* Get the architecture-dependent definition of enum __socket_type. */ #include /* Protocol families. */ #define PF_UNSPEC 0 /* Unspecified. */ #define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ #define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */ #define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ #define PF_INET 2 /* IP protocol family. */ #define PF_AX25 3 /* Amateur Radio AX.25. */ #define PF_IPX 4 /* Novell Internet Protocol. */ #define PF_APPLETALK 5 /* Appletalk DDP. */ #define PF_NETROM 6 /* Amateur radio NetROM. */ #define PF_BRIDGE 7 /* Multiprotocol bridge. */ #define PF_ATMPVC 8 /* ATM PVCs. */ #define PF_X25 9 /* Reserved for X.25 project. */ #define PF_INET6 10 /* IP version 6. */ #define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ #define PF_DECnet 12 /* Reserved for DECnet project. */ #define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ #define PF_SECURITY 14 /* Security callback pseudo AF. */ #define PF_KEY 15 /* PF_KEY key management API. */ #define PF_NETLINK 16 #define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ #define PF_PACKET 17 /* Packet family. */ #define PF_ASH 18 /* Ash. */ #define PF_ECONET 19 /* Acorn Econet. */ #define PF_ATMSVC 20 /* ATM SVCs. */ #define PF_RDS 21 /* RDS sockets. */ #define PF_SNA 22 /* Linux SNA Project */ #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_WANPIPE 25 /* Wanpipe API sockets. */ #define PF_LLC 26 /* Linux LLC. */ #define PF_IB 27 /* Native InfiniBand address. */ #define PF_MPLS 28 /* MPLS. */ #define PF_CAN 29 /* Controller Area Network. */ #define PF_TIPC 30 /* TIPC sockets. */ #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ #define PF_IUCV 32 /* IUCV sockets. */ #define PF_RXRPC 33 /* RxRPC sockets. */ #define PF_ISDN 34 /* mISDN sockets. */ #define PF_PHONET 35 /* Phonet sockets. */ #define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ #define PF_CAIF 37 /* CAIF sockets. */ #define PF_ALG 38 /* Algorithm sockets. */ #define PF_NFC 39 /* NFC sockets. */ #define PF_VSOCK 40 /* vSockets. */ #define PF_KCM 41 /* Kernel Connection Multiplexor. */ #define PF_QIPCRTR 42 /* Qualcomm IPC Router. */ #define PF_SMC 43 /* SMC sockets. */ #define PF_XDP 44 /* XDP sockets. */ #define PF_MAX 45 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC #define AF_LOCAL PF_LOCAL #define AF_UNIX PF_UNIX #define AF_FILE PF_FILE #define AF_INET PF_INET #define AF_AX25 PF_AX25 #define AF_IPX PF_IPX #define AF_APPLETALK PF_APPLETALK #define AF_NETROM PF_NETROM #define AF_BRIDGE PF_BRIDGE #define AF_ATMPVC PF_ATMPVC #define AF_X25 PF_X25 #define AF_INET6 PF_INET6 #define AF_ROSE PF_ROSE #define AF_DECnet PF_DECnet #define AF_NETBEUI PF_NETBEUI #define AF_SECURITY PF_SECURITY #define AF_KEY PF_KEY #define AF_NETLINK PF_NETLINK #define AF_ROUTE PF_ROUTE #define AF_PACKET PF_PACKET #define AF_ASH PF_ASH #define AF_ECONET PF_ECONET #define AF_ATMSVC PF_ATMSVC #define AF_RDS PF_RDS #define AF_SNA PF_SNA #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX #define AF_WANPIPE PF_WANPIPE #define AF_LLC PF_LLC #define AF_IB PF_IB #define AF_MPLS PF_MPLS #define AF_CAN PF_CAN #define AF_TIPC PF_TIPC #define AF_BLUETOOTH PF_BLUETOOTH #define AF_IUCV PF_IUCV #define AF_RXRPC PF_RXRPC #define AF_ISDN PF_ISDN #define AF_PHONET PF_PHONET #define AF_IEEE802154 PF_IEEE802154 #define AF_CAIF PF_CAIF #define AF_ALG PF_ALG #define AF_NFC PF_NFC #define AF_VSOCK PF_VSOCK #define AF_KCM PF_KCM #define AF_QIPCRTR PF_QIPCRTR #define AF_SMC PF_SMC #define AF_XDP PF_XDP #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. XXX These definitions also should go into the appropriate headers as far as they are available. */ #define SOL_RAW 255 #define SOL_DECNET 261 #define SOL_X25 262 #define SOL_PACKET 263 #define SOL_ATM 264 /* ATM layer (cell level). */ #define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ #define SOL_IRDA 266 #define SOL_NETBEUI 267 #define SOL_LLC 268 #define SOL_DCCP 269 #define SOL_NETLINK 270 #define SOL_TIPC 271 #define SOL_RXRPC 272 #define SOL_PPPOL2TP 273 #define SOL_BLUETOOTH 274 #define SOL_PNPIPE 275 #define SOL_RDS 276 #define SOL_IUCV 277 #define SOL_CAIF 278 #define SOL_ALG 279 #define SOL_NFC 280 #define SOL_KCM 281 #define SOL_TLS 282 #define SOL_XDP 283 /* Maximum queue length specifiable by listen. */ #define SOMAXCONN 128 /* Get the definition of the macro to define the common sockaddr members. */ #include /* Structure describing a generic socket address. */ struct sockaddr { __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ char sa_data[14]; /* Address data. */ }; /* Structure large enough to hold any socket address (with the historical exception of AF_UNIX). */ #define __ss_aligntype unsigned long int #define _SS_PADSIZE \ (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype)) struct sockaddr_storage { __SOCKADDR_COMMON (ss_); /* Address family, etc. */ char __ss_padding[_SS_PADSIZE]; __ss_aligntype __ss_align; /* Force desired alignment. */ }; /* Bits in the FLAGS argument to `send', `recv', et al. */ enum { MSG_OOB = 0x01, /* Process out-of-band data. */ #define MSG_OOB MSG_OOB MSG_PEEK = 0x02, /* Peek at incoming messages. */ #define MSG_PEEK MSG_PEEK MSG_DONTROUTE = 0x04, /* Don't use local routing. */ #define MSG_DONTROUTE MSG_DONTROUTE #ifdef __USE_GNU /* DECnet uses a different name. */ MSG_TRYHARD = MSG_DONTROUTE, # define MSG_TRYHARD MSG_DONTROUTE #endif MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ #define MSG_CTRUNC MSG_CTRUNC MSG_PROXY = 0x10, /* Supply or ask second address. */ #define MSG_PROXY MSG_PROXY MSG_TRUNC = 0x20, #define MSG_TRUNC MSG_TRUNC MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ #define MSG_DONTWAIT MSG_DONTWAIT MSG_EOR = 0x80, /* End of record. */ #define MSG_EOR MSG_EOR MSG_WAITALL = 0x100, /* Wait for a full request. */ #define MSG_WAITALL MSG_WAITALL MSG_FIN = 0x200, #define MSG_FIN MSG_FIN MSG_SYN = 0x400, #define MSG_SYN MSG_SYN MSG_CONFIRM = 0x800, /* Confirm path validity. */ #define MSG_CONFIRM MSG_CONFIRM MSG_RST = 0x1000, #define MSG_RST MSG_RST MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ #define MSG_ERRQUEUE MSG_ERRQUEUE MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ #define MSG_NOSIGNAL MSG_NOSIGNAL MSG_MORE = 0x8000, /* Sender will send more. */ #define MSG_MORE MSG_MORE MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ #define MSG_WAITFORONE MSG_WAITFORONE MSG_BATCH = 0x40000, /* sendmmsg: more messages coming. */ #define MSG_BATCH MSG_BATCH MSG_ZEROCOPY = 0x4000000, /* Use user data in kernel path. */ #define MSG_ZEROCOPY MSG_ZEROCOPY MSG_FASTOPEN = 0x20000000, /* Send data in TCP SYN. */ #define MSG_FASTOPEN MSG_FASTOPEN MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file descriptor received through SCM_RIGHTS. */ #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC }; /* Structure describing messages sent by `sendmsg' and received by `recvmsg'. */ struct msghdr { void *msg_name; /* Address to send to/receive from. */ socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ size_t msg_iovlen; /* Number of elements in the vector. */ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ size_t msg_controllen; /* Ancillary data buffer length. !! The type should be socklen_t but the definition of the kernel is incompatible with this. */ int msg_flags; /* Flags on received message. */ }; /* Structure used for storage of ancillary data object information. */ struct cmsghdr { size_t cmsg_len; /* Length of data in cmsg_data plus length of cmsghdr structure. !! The type should be socklen_t but the definition of the kernel is incompatible with this. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ #if __glibc_c99_flexarr_available __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ #endif }; /* Ancillary data object manipulation macros. */ #if __glibc_c99_flexarr_available # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) #endif #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) #define CMSG_FIRSTHDR(mhdr) \ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ & (size_t) ~(sizeof (size_t) - 1)) #define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + CMSG_ALIGN (sizeof (struct cmsghdr))) #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) /* Given a length, return the additional padding necessary such that len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */ #define __CMSG_PADDING(len) ((sizeof (size_t) \ - ((len) & (sizeof (size_t) - 1))) \ & (sizeof (size_t) - 1)) extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW; #ifdef __USE_EXTERN_INLINES # ifndef _EXTERN_INLINE # define _EXTERN_INLINE __extern_inline # endif _EXTERN_INLINE struct cmsghdr * __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) { /* We may safely assume that __cmsg lies between __mhdr->msg_control and __mhdr->msg_controllen because the user is required to obtain the first cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs via CMSG_NXTHDR, setting lengths along the way. However, we don't yet trust the value of __cmsg->cmsg_len and therefore do not use it in any pointer arithmetic until we check its value. */ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control; unsigned char * __cmsg_ptr = (unsigned char *) __cmsg; size_t __size_needed = sizeof (struct cmsghdr) + __CMSG_PADDING (__cmsg->cmsg_len); /* The current header is malformed, too small to be a full header. */ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) return (struct cmsghdr *) 0; /* There isn't enough space between __cmsg and the end of the buffer to hold the current cmsg *and* the next one. */ if (((size_t) (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr) < __size_needed) || ((size_t) (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr - __size_needed) < __cmsg->cmsg_len)) return (struct cmsghdr *) 0; /* Now, we trust cmsg_len and can use it to find the next header. */ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); return __cmsg; } #endif /* Use `extern inline'. */ /* Socket level message types. This must match the definitions in . */ enum { SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ #define SCM_RIGHTS SCM_RIGHTS #ifdef __USE_GNU , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ # define SCM_CREDENTIALS SCM_CREDENTIALS #endif }; #ifdef __USE_GNU /* User visible structure for SCM_CREDENTIALS message */ struct ucred { pid_t pid; /* PID of sending process. */ uid_t uid; /* UID of sending process. */ gid_t gid; /* GID of sending process. */ }; #endif /* Ugly workaround for unclean kernel headers. */ #ifndef __USE_MISC # ifndef FIOGETOWN # define __SYS_SOCKET_H_undef_FIOGETOWN # endif # ifndef FIOSETOWN # define __SYS_SOCKET_H_undef_FIOSETOWN # endif # ifndef SIOCATMARK # define __SYS_SOCKET_H_undef_SIOCATMARK # endif # ifndef SIOCGPGRP # define __SYS_SOCKET_H_undef_SIOCGPGRP # endif # ifndef SIOCGSTAMP # define __SYS_SOCKET_H_undef_SIOCGSTAMP # endif # ifndef SIOCGSTAMPNS # define __SYS_SOCKET_H_undef_SIOCGSTAMPNS # endif # ifndef SIOCSPGRP # define __SYS_SOCKET_H_undef_SIOCSPGRP # endif #endif #ifndef IOCSIZE_MASK # define __SYS_SOCKET_H_undef_IOCSIZE_MASK #endif #ifndef IOCSIZE_SHIFT # define __SYS_SOCKET_H_undef_IOCSIZE_SHIFT #endif #ifndef IOC_IN # define __SYS_SOCKET_H_undef_IOC_IN #endif #ifndef IOC_INOUT # define __SYS_SOCKET_H_undef_IOC_INOUT #endif #ifndef IOC_OUT # define __SYS_SOCKET_H_undef_IOC_OUT #endif /* Get socket manipulation related informations from kernel headers. */ #include #ifndef __USE_MISC # ifdef __SYS_SOCKET_H_undef_FIOGETOWN # undef __SYS_SOCKET_H_undef_FIOGETOWN # undef FIOGETOWN # endif # ifdef __SYS_SOCKET_H_undef_FIOSETOWN # undef __SYS_SOCKET_H_undef_FIOSETOWN # undef FIOSETOWN # endif # ifdef __SYS_SOCKET_H_undef_SIOCATMARK # undef __SYS_SOCKET_H_undef_SIOCATMARK # undef SIOCATMARK # endif # ifdef __SYS_SOCKET_H_undef_SIOCGPGRP # undef __SYS_SOCKET_H_undef_SIOCGPGRP # undef SIOCGPGRP # endif # ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP # undef __SYS_SOCKET_H_undef_SIOCGSTAMP # undef SIOCGSTAMP # endif # ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS # undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS # undef SIOCGSTAMPNS # endif # ifdef __SYS_SOCKET_H_undef_SIOCSPGRP # undef __SYS_SOCKET_H_undef_SIOCSPGRP # undef SIOCSPGRP # endif #endif #ifdef __SYS_SOCKET_H_undef_IOCSIZE_MASK # undef __SYS_SOCKET_H_undef_IOCSIZE_MASK # undef IOCSIZE_MASK #endif #ifdef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT # undef __SYS_SOCKET_H_undef_IOCSIZE_SHIFT # undef IOCSIZE_SHIFT #endif #ifdef __SYS_SOCKET_H_undef_IOC_IN # undef __SYS_SOCKET_H_undef_IOC_IN # undef IOC_IN #endif #ifdef __SYS_SOCKET_H_undef_IOC_INOUT # undef __SYS_SOCKET_H_undef_IOC_INOUT # undef IOC_INOUT #endif #ifdef __SYS_SOCKET_H_undef_IOC_OUT # undef __SYS_SOCKET_H_undef_IOC_OUT # undef IOC_OUT #endif /* Structure used to manipulate the SO_LINGER option. */ struct linger { int l_onoff; /* Nonzero to linger on close. */ int l_linger; /* Time to linger. */ }; #endif /* bits/socket.h */ PKZ^ bits/getopt_ext.hnu[/* Declarations for getopt (GNU extensions). Copyright (C) 1989-2018 Free Software Foundation, Inc. This file is part of the GNU C Library and is also part of gnulib. Patches to this file should be submitted to both projects. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_EXT_H #define _GETOPT_EXT_H 1 /* This header should not be used directly; include getopt.h instead. Unlike most bits headers, it does not have a protective #error, because the guard macro for getopt.h in gnulib is not fixed. */ __BEGIN_DECLS /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of 'struct option' terminated by an element containing a name which is zero. The field 'has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field 'flag' is not NULL, it points to a variable that is set to the value given in the field 'val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an 'int' to a compiled-in constant, such as set a value from 'optarg', set the option's 'flag' field to zero and its 'val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero 'flag' field, 'getopt' returns the contents of the 'val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the 'has_arg' field of 'struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW __nonnull ((2, 3)); extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW __nonnull ((2, 3)); __END_DECLS #endif /* getopt_ext.h */ PKZ U܆bits/posix_opt.hnu[/* Define POSIX options for Linux. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ #ifndef _BITS_POSIX_OPT_H #define _BITS_POSIX_OPT_H 1 /* Job control is supported. */ #define _POSIX_JOB_CONTROL 1 /* Processes have a saved set-user-ID and a saved set-group-ID. */ #define _POSIX_SAVED_IDS 1 /* Priority scheduling is supported. */ #define _POSIX_PRIORITY_SCHEDULING 200809L /* Synchronizing file data is supported. */ #define _POSIX_SYNCHRONIZED_IO 200809L /* The fsync function is present. */ #define _POSIX_FSYNC 200809L /* Mapping of files to memory is supported. */ #define _POSIX_MAPPED_FILES 200809L /* Locking of all memory is supported. */ #define _POSIX_MEMLOCK 200809L /* Locking of ranges of memory is supported. */ #define _POSIX_MEMLOCK_RANGE 200809L /* Setting of memory protections is supported. */ #define _POSIX_MEMORY_PROTECTION 200809L /* Some filesystems allow all users to change file ownership. */ #define _POSIX_CHOWN_RESTRICTED 0 /* `c_cc' member of 'struct termios' structure can be disabled by using the value _POSIX_VDISABLE. */ #define _POSIX_VDISABLE '\0' /* Filenames are not silently truncated. */ #define _POSIX_NO_TRUNC 1 /* X/Open realtime support is available. */ #define _XOPEN_REALTIME 1 /* X/Open thread realtime support is available. */ #define _XOPEN_REALTIME_THREADS 1 /* XPG4.2 shared memory is supported. */ #define _XOPEN_SHM 1 /* Tell we have POSIX threads. */ #define _POSIX_THREADS 200809L /* We have the reentrant functions described in POSIX. */ #define _POSIX_REENTRANT_FUNCTIONS 1 #define _POSIX_THREAD_SAFE_FUNCTIONS 200809L /* We provide priority scheduling for threads. */ #define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L /* We support user-defined stack sizes. */ #define _POSIX_THREAD_ATTR_STACKSIZE 200809L /* We support user-defined stacks. */ #define _POSIX_THREAD_ATTR_STACKADDR 200809L /* We support priority inheritence. */ #define _POSIX_THREAD_PRIO_INHERIT 200809L /* We support priority protection, though only for non-robust mutexes. */ #define _POSIX_THREAD_PRIO_PROTECT 200809L #ifdef __USE_XOPEN2K8 /* We support priority inheritence for robust mutexes. */ # define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L /* We do not support priority protection for robust mutexes. */ # define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 #endif /* We support POSIX.1b semaphores. */ #define _POSIX_SEMAPHORES 200809L /* Real-time signals are supported. */ #define _POSIX_REALTIME_SIGNALS 200809L /* We support asynchronous I/O. */ #define _POSIX_ASYNCHRONOUS_IO 200809L #define _POSIX_ASYNC_IO 1 /* Alternative name for Unix98. */ #define _LFS_ASYNCHRONOUS_IO 1 /* Support for prioritization is also available. */ #define _POSIX_PRIORITIZED_IO 200809L /* The LFS support in asynchronous I/O is also available. */ #define _LFS64_ASYNCHRONOUS_IO 1 /* The rest of the LFS is also available. */ #define _LFS_LARGEFILE 1 #define _LFS64_LARGEFILE 1 #define _LFS64_STDIO 1 /* POSIX shared memory objects are implemented. */ #define _POSIX_SHARED_MEMORY_OBJECTS 200809L /* CPU-time clocks support needs to be checked at runtime. */ #define _POSIX_CPUTIME 0 /* Clock support in threads must be also checked at runtime. */ #define _POSIX_THREAD_CPUTIME 0 /* GNU libc provides regular expression handling. */ #define _POSIX_REGEXP 1 /* Reader/Writer locks are available. */ #define _POSIX_READER_WRITER_LOCKS 200809L /* We have a POSIX shell. */ #define _POSIX_SHELL 1 /* We support the Timeouts option. */ #define _POSIX_TIMEOUTS 200809L /* We support spinlocks. */ #define _POSIX_SPIN_LOCKS 200809L /* The `spawn' function family is supported. */ #define _POSIX_SPAWN 200809L /* We have POSIX timers. */ #define _POSIX_TIMERS 200809L /* The barrier functions are available. */ #define _POSIX_BARRIERS 200809L /* POSIX message queues are available. */ #define _POSIX_MESSAGE_PASSING 200809L /* Thread process-shared synchronization is supported. */ #define _POSIX_THREAD_PROCESS_SHARED 200809L /* The monotonic clock might be available. */ #define _POSIX_MONOTONIC_CLOCK 0 /* The clock selection interfaces are available. */ #define _POSIX_CLOCK_SELECTION 200809L /* Advisory information interfaces are available. */ #define _POSIX_ADVISORY_INFO 200809L /* IPv6 support is available. */ #define _POSIX_IPV6 200809L /* Raw socket support is available. */ #define _POSIX_RAW_SOCKETS 200809L /* We have at least one terminal. */ #define _POSIX2_CHAR_TERM 200809L /* Neither process nor thread sporadic server interfaces is available. */ #define _POSIX_SPORADIC_SERVER -1 #define _POSIX_THREAD_SPORADIC_SERVER -1 /* trace.h is not available. */ #define _POSIX_TRACE -1 #define _POSIX_TRACE_EVENT_FILTER -1 #define _POSIX_TRACE_INHERIT -1 #define _POSIX_TRACE_LOG -1 /* Typed memory objects are not available. */ #define _POSIX_TYPED_MEMORY_OBJECTS -1 /* Streams are not available. */ #define _XOPEN_STREAMS -1 #endif /* bits/posix_opt.h */ PKZ" bits/param.hnu[/* Old-style Unix parameters and limits. Linux version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PARAM_H # error "Never use directly; include instead." #endif #ifndef ARG_MAX # define __undef_ARG_MAX #endif #include #include /* The kernel headers define ARG_MAX. The value is wrong, though. */ #ifdef __undef_ARG_MAX # undef ARG_MAX # undef __undef_ARG_MAX #endif #define MAXSYMLINKS 20 /* The following are not really correct but it is a value we used for a long time and which seems to be usable. People should not use NOFILE and NCARGS anyway. */ #define NOFILE 256 #define NCARGS 131072 PKZoBM M bits/msq.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MSG_H # error "Never use directly; include instead." #endif #include /* Define options for message queue functions. */ #define MSG_NOERROR 010000 /* no error if message is too big */ #ifdef __USE_GNU # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ # define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif /* Types used in the structure definition. */ typedef __syscall_ulong_t msgqnum_t; typedef __syscall_ulong_t msglen_t; /* Structure of record for one message inside the kernel. The type `struct msg' is opaque. */ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ __time_t msg_stime; /* time of last msgsnd command */ #ifndef __x86_64__ unsigned long int __glibc_reserved1; #endif __time_t msg_rtime; /* time of last msgrcv command */ #ifndef __x86_64__ unsigned long int __glibc_reserved2; #endif __time_t msg_ctime; /* time of last change */ #ifndef __x86_64__ unsigned long int __glibc_reserved3; #endif __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ msgqnum_t msg_qnum; /* number of messages currently on queue */ msglen_t msg_qbytes; /* max number of bytes allowed on queue */ __pid_t msg_lspid; /* pid of last msgsnd() */ __pid_t msg_lrpid; /* pid of last msgrcv() */ __syscall_ulong_t __glibc_reserved4; __syscall_ulong_t __glibc_reserved5; }; #ifdef __USE_MISC # define msg_cbytes __msg_cbytes /* ipcs ctl commands */ # define MSG_STAT 11 # define MSG_INFO 12 # define MSG_STAT_ANY 13 /* buffer for msgctl calls IPC_INFO, MSG_INFO */ struct msginfo { int msgpool; int msgmap; int msgmax; int msgmnb; int msgmni; int msgssz; int msgtql; unsigned short int msgseg; }; #endif /* __USE_MISC */ PKZDu bits/syslog.hnu[/* Checking macros for syslog functions. Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SYSLOG_H # error "Never include directly; use instead." #endif extern void __syslog_chk (int __pri, int __flag, const char *__fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4))); #ifdef __va_arg_pack __fortify_function void syslog (int __pri, const char *__fmt, ...) { __syslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } #elif !defined __cplusplus # define syslog(pri, ...) \ __syslog_chk (pri, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) #endif #ifdef __USE_MISC extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt, __gnuc_va_list __ap) __attribute__ ((__format__ (__printf__, 3, 0))); __fortify_function void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap) { __vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); } #endif PKZi+sbits/getopt_posix.hnu[/* Declarations for getopt (POSIX compatibility shim). Copyright (C) 1989-2018 Free Software Foundation, Inc. Unlike the bulk of the getopt implementation, this file is NOT part of gnulib. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_POSIX_H #define _GETOPT_POSIX_H 1 #if !defined _UNISTD_H && !defined _STDIO_H #error "Never include getopt_posix.h directly; use unistd.h instead." #endif #include __BEGIN_DECLS #if defined __USE_POSIX2 && !defined __USE_POSIX_IMPLICITLY \ && !defined __USE_GNU && !defined _GETOPT_H /* GNU getopt has more functionality than POSIX getopt. When we are explicitly conforming to POSIX and not GNU, and getopt.h (which is not part of POSIX) has not been included, the extra functionality is disabled. */ # ifdef __REDIRECT extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv, const char *__shortopts), __posix_getopt); # else extern int __posix_getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW __nonnull ((2, 3)); # define getopt __posix_getopt # endif #endif __END_DECLS #endif /* getopt_posix.h */ PKZT bits/time.hnu[/* System-dependent timing definitions. Linux version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #ifndef _BITS_TIME_H #define _BITS_TIME_H 1 #include /* ISO/IEC 9899:1999 7.23.1: Components of time The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is the number per second of the value returned by the `clock' function. */ /* CAE XSH, Issue 4, Version 2: The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ #define CLOCKS_PER_SEC ((__clock_t) 1000000) #if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \ && !defined __USE_XOPEN2K /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ extern long int __sysconf (int); # define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ #endif #ifdef __USE_POSIX199309 /* Identifier for system-wide realtime clock. */ # define CLOCK_REALTIME 0 /* Monotonic system-wide clock. */ # define CLOCK_MONOTONIC 1 /* High-resolution timer from the CPU. */ # define CLOCK_PROCESS_CPUTIME_ID 2 /* Thread-specific CPU-time clock. */ # define CLOCK_THREAD_CPUTIME_ID 3 /* Monotonic system-wide clock, not adjusted for frequency scaling. */ # define CLOCK_MONOTONIC_RAW 4 /* Identifier for system-wide realtime clock, updated only on ticks. */ # define CLOCK_REALTIME_COARSE 5 /* Monotonic system-wide clock, updated only on ticks. */ # define CLOCK_MONOTONIC_COARSE 6 /* Monotonic system-wide clock that includes time spent in suspension. */ # define CLOCK_BOOTTIME 7 /* Like CLOCK_REALTIME but also wakes suspended system. */ # define CLOCK_REALTIME_ALARM 8 /* Like CLOCK_BOOTTIME but also wakes suspended system. */ # define CLOCK_BOOTTIME_ALARM 9 /* Like CLOCK_REALTIME but in International Atomic Time. */ # define CLOCK_TAI 11 /* Flag to indicate time is absolute. */ # define TIMER_ABSTIME 1 #endif #ifdef __USE_GNU # include __BEGIN_DECLS /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW; __END_DECLS #endif /* use GNU */ #endif /* bits/time.h */ PKZH"2 2 bits/posix2_lim.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; include instead. */ #ifndef _BITS_POSIX2_LIM_H #define _BITS_POSIX2_LIM_H 1 /* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ #define _POSIX2_BC_BASE_MAX 99 /* The maximum number of elements allowed in an array by the `bc' utility. */ #define _POSIX2_BC_DIM_MAX 2048 /* The maximum `scale' value allowed by the `bc' utility. */ #define _POSIX2_BC_SCALE_MAX 99 /* The maximum length of a string constant accepted by the `bc' utility. */ #define _POSIX2_BC_STRING_MAX 1000 /* The maximum number of weights that can be assigned to an entry of the LC_COLLATE `order' keyword in the locale definition file. */ #define _POSIX2_COLL_WEIGHTS_MAX 2 /* The maximum number of expressions that can be nested within parentheses by the `expr' utility. */ #define _POSIX2_EXPR_NEST_MAX 32 /* The maximum length, in bytes, of an input line. */ #define _POSIX2_LINE_MAX 2048 /* The maximum number of repeated occurrences of a regular expression permitted when using the interval notation `\{M,N\}'. */ #define _POSIX2_RE_DUP_MAX 255 /* The maximum number of bytes in a character class name. We have no fixed limit, 2048 is a high number. */ #define _POSIX2_CHARCLASS_NAME_MAX 14 /* These values are implementation-specific, and may vary within the implementation. Their precise values can be obtained from sysconf. */ #ifndef BC_BASE_MAX #define BC_BASE_MAX _POSIX2_BC_BASE_MAX #endif #ifndef BC_DIM_MAX #define BC_DIM_MAX _POSIX2_BC_DIM_MAX #endif #ifndef BC_SCALE_MAX #define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX #endif #ifndef BC_STRING_MAX #define BC_STRING_MAX _POSIX2_BC_STRING_MAX #endif #ifndef COLL_WEIGHTS_MAX #define COLL_WEIGHTS_MAX 255 #endif #ifndef EXPR_NEST_MAX #define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX #endif #ifndef LINE_MAX #define LINE_MAX _POSIX2_LINE_MAX #endif #ifndef CHARCLASS_NAME_MAX #define CHARCLASS_NAME_MAX 2048 #endif /* This value is defined like this in regex.h. */ #define RE_DUP_MAX (0x7fff) #endif /* bits/posix2_lim.h */ PKZhhbits/eventfd.hnu[/* Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_EVENTFD_H # error "Never use directly; include instead." #endif /* Flags for eventfd. */ enum { EFD_SEMAPHORE = 00000001, #define EFD_SEMAPHORE EFD_SEMAPHORE EFD_CLOEXEC = 02000000, #define EFD_CLOEXEC EFD_CLOEXEC EFD_NONBLOCK = 00004000 #define EFD_NONBLOCK EFD_NONBLOCK }; PKZP; bits/netdb.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETDB_H # error "Never include directly; use instead." #endif /* Description of data base entry for a single network. NOTE: here a poor assumption is made. The network number is expected to fit into an unsigned long int variable. */ struct netent { char *n_name; /* Official name of network. */ char **n_aliases; /* Alias list. */ int n_addrtype; /* Net address type. */ uint32_t n_net; /* Network number. */ }; PKZPbits/math-finite.hnu[/* Entry points to finite-math-only compiler runs. Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never use directly; include instead." #endif #define __REDIRFROM(...) __REDIRFROM_X(__VA_ARGS__) #define __REDIRTO(...) __REDIRTO_X(__VA_ARGS__) #define __MATH_REDIRCALL_X(from, args, to) \ extern _Mdouble_ __REDIRECT_NTH (from, args, to) #define __MATH_REDIRCALL(function, reentrant, args) \ __MATH_REDIRCALL_X \ (__REDIRFROM (function, reentrant), args, \ __REDIRTO (function, reentrant)) #define __MATH_REDIRCALL_2(from, reentrant, args, to) \ __MATH_REDIRCALL_X \ (__REDIRFROM (from, reentrant), args, \ __REDIRTO (to, reentrant)) #define __MATH_REDIRCALL_INTERNAL(function, reentrant, args) \ __MATH_REDIRCALL_X \ (__REDIRFROM (__CONCAT (__, function), \ __CONCAT (reentrant, _finite)), \ args, __REDIRTO (function, _r)) /* acos. */ __MATH_REDIRCALL (acos, , (_Mdouble_)); #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* acosh. */ __MATH_REDIRCALL (acosh, , (_Mdouble_)); #endif /* asin. */ __MATH_REDIRCALL (asin, , (_Mdouble_)); /* atan2. */ __MATH_REDIRCALL (atan2, , (_Mdouble_, _Mdouble_)); #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* atanh. */ __MATH_REDIRCALL (atanh, , (_Mdouble_)); #endif /* cosh. */ __MATH_REDIRCALL (cosh, , (_Mdouble_)); /* exp. */ __MATH_REDIRCALL (exp, , (_Mdouble_)); #if __GLIBC_USE (IEC_60559_FUNCS_EXT) /* exp10. */ __MATH_REDIRCALL (exp10, , (_Mdouble_)); #endif #ifdef __USE_ISOC99 /* exp2. */ __MATH_REDIRCALL (exp2, , (_Mdouble_)); #endif /* fmod. */ __MATH_REDIRCALL (fmod, , (_Mdouble_, _Mdouble_)); #if defined __USE_XOPEN || defined __USE_ISOC99 /* hypot. */ __MATH_REDIRCALL (hypot, , (_Mdouble_, _Mdouble_)); #endif #if (__MATH_DECLARING_DOUBLE && (defined __USE_MISC || defined __USE_XOPEN)) \ || (!__MATH_DECLARING_DOUBLE && defined __USE_MISC) /* j0. */ __MATH_REDIRCALL (j0, , (_Mdouble_)); /* y0. */ __MATH_REDIRCALL (y0, , (_Mdouble_)); /* j1. */ __MATH_REDIRCALL (j1, , (_Mdouble_)); /* y1. */ __MATH_REDIRCALL (y1, , (_Mdouble_)); /* jn. */ __MATH_REDIRCALL (jn, , (int, _Mdouble_)); /* yn. */ __MATH_REDIRCALL (yn, , (int, _Mdouble_)); #endif #ifdef __USE_MISC /* lgamma_r. */ __MATH_REDIRCALL (lgamma, _r, (_Mdouble_, int *)); #endif /* Redirect __lgammal_r_finite to __lgamma_r_finite when __NO_LONG_DOUBLE_MATH is set and to itself otherwise. It also redirects __lgamma_r_finite and __lgammaf_r_finite to themselves. */ __MATH_REDIRCALL_INTERNAL (lgamma, _r, (_Mdouble_, int *)); #if ((defined __USE_XOPEN || defined __USE_ISOC99) \ && defined __extern_always_inline) /* lgamma. */ __extern_always_inline _Mdouble_ __NTH (__REDIRFROM (lgamma, ) (_Mdouble_ __d)) { # if defined __USE_MISC || defined __USE_XOPEN return __REDIRTO (lgamma, _r) (__d, &signgam); # else int __local_signgam = 0; return __REDIRTO (lgamma, _r) (__d, &__local_signgam); # endif } #endif #if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \ && defined __extern_always_inline) && !__MATH_DECLARING_FLOATN /* gamma. */ __extern_always_inline _Mdouble_ __NTH (__REDIRFROM (gamma, ) (_Mdouble_ __d)) { return __REDIRTO (lgamma, _r) (__d, &signgam); } #endif /* log. */ __MATH_REDIRCALL (log, , (_Mdouble_)); /* log10. */ __MATH_REDIRCALL (log10, , (_Mdouble_)); #ifdef __USE_ISOC99 /* log2. */ __MATH_REDIRCALL (log2, , (_Mdouble_)); #endif /* pow. */ __MATH_REDIRCALL (pow, , (_Mdouble_, _Mdouble_)); #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* remainder. */ __MATH_REDIRCALL (remainder, , (_Mdouble_, _Mdouble_)); #endif #if ((__MATH_DECLARING_DOUBLE \ && (defined __USE_MISC \ || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))) \ || (!defined __MATH_DECLARE_LDOUBLE && defined __USE_MISC)) \ && !__MATH_DECLARING_FLOATN /* scalb. */ __MATH_REDIRCALL (scalb, , (_Mdouble_, _Mdouble_)); #endif /* sinh. */ __MATH_REDIRCALL (sinh, , (_Mdouble_)); /* sqrt. */ __MATH_REDIRCALL (sqrt, , (_Mdouble_)); #if defined __USE_ISOC99 && defined __extern_always_inline /* tgamma. */ extern _Mdouble_ __REDIRFROM (__gamma, _r_finite) (_Mdouble_, int *); __extern_always_inline _Mdouble_ __NTH (__REDIRFROM (tgamma, ) (_Mdouble_ __d)) { int __local_signgam = 0; _Mdouble_ __res = __REDIRTO (gamma, _r) (__d, &__local_signgam); return __local_signgam < 0 ? -__res : __res; } #endif #undef __REDIRFROM #undef __REDIRTO #undef __MATH_REDIRCALL #undef __MATH_REDIRCALL_2 #undef __MATH_REDIRCALL_INTERNAL #undef __MATH_REDIRCALL_X PKZ+^ ^ bits/statvfs.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_STATVFS_H # error "Never include directly; use instead." #endif #include /* For __fsblkcnt_t and __fsfilcnt_t. */ #if (__WORDSIZE == 32 \ && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) #define _STATVFSBUF_F_UNUSED #endif struct statvfs { unsigned long int f_bsize; unsigned long int f_frsize; #ifndef __USE_FILE_OFFSET64 __fsblkcnt_t f_blocks; __fsblkcnt_t f_bfree; __fsblkcnt_t f_bavail; __fsfilcnt_t f_files; __fsfilcnt_t f_ffree; __fsfilcnt_t f_favail; #else __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; __fsfilcnt64_t f_favail; #endif unsigned long int f_fsid; #ifdef _STATVFSBUF_F_UNUSED int __f_unused; #endif unsigned long int f_flag; unsigned long int f_namemax; int __f_spare[6]; }; #ifdef __USE_LARGEFILE64 struct statvfs64 { unsigned long int f_bsize; unsigned long int f_frsize; __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; __fsfilcnt64_t f_favail; unsigned long int f_fsid; #ifdef _STATVFSBUF_F_UNUSED int __f_unused; #endif unsigned long int f_flag; unsigned long int f_namemax; int __f_spare[6]; }; #endif /* Definitions for the flag in `f_flag'. These definitions should be kept in sync with the definitions in . */ enum { ST_RDONLY = 1, /* Mount read-only. */ #define ST_RDONLY ST_RDONLY ST_NOSUID = 2 /* Ignore suid and sgid bits. */ #define ST_NOSUID ST_NOSUID #ifdef __USE_GNU , ST_NODEV = 4, /* Disallow access to device special files. */ # define ST_NODEV ST_NODEV ST_NOEXEC = 8, /* Disallow program execution. */ # define ST_NOEXEC ST_NOEXEC ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ # define ST_SYNCHRONOUS ST_SYNCHRONOUS ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ # define ST_MANDLOCK ST_MANDLOCK ST_WRITE = 128, /* Write on file/directory/symlink. */ # define ST_WRITE ST_WRITE ST_APPEND = 256, /* Append-only file. */ # define ST_APPEND ST_APPEND ST_IMMUTABLE = 512, /* Immutable file. */ # define ST_IMMUTABLE ST_IMMUTABLE ST_NOATIME = 1024, /* Do not update access times. */ # define ST_NOATIME ST_NOATIME ST_NODIRATIME = 2048, /* Do not update directory access times. */ # define ST_NODIRATIME ST_NODIRATIME ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */ # define ST_RELATIME ST_RELATIME #endif /* Use GNU. */ }; PKZxbits/setjmp2.hnu[/* Checking macros for setjmp functions. Copyright (C) 2009-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SETJMP_H # error "Never include directly; use instead." #endif /* Variant of the longjmp functions which perform some sanity checking. */ #ifdef __REDIRECT_NTH extern void __REDIRECT_NTHNL (longjmp, (struct __jmp_buf_tag __env[1], int __val), __longjmp_chk) __attribute__ ((__noreturn__)); extern void __REDIRECT_NTHNL (_longjmp, (struct __jmp_buf_tag __env[1], int __val), __longjmp_chk) __attribute__ ((__noreturn__)); extern void __REDIRECT_NTHNL (siglongjmp, (struct __jmp_buf_tag __env[1], int __val), __longjmp_chk) __attribute__ ((__noreturn__)); #else extern void __longjmp_chk (struct __jmp_buf_tag __env[1], int __val), __THROWNL __attribute__ ((__noreturn__)); # define longjmp __longjmp_chk # define _longjmp __longjmp_chk # define siglongjmp __longjmp_chk #endif PKZU bits/byteswap.hnu[/* Macros and inline functions to swap the order of bytes in integer values. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." #endif #ifndef _BITS_BYTESWAP_H #define _BITS_BYTESWAP_H 1 #include #include /* Swap bytes in 16-bit value. */ #define __bswap_constant_16(x) \ ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) static __inline __uint16_t __bswap_16 (__uint16_t __bsx) { #if __GNUC_PREREQ (4, 8) return __builtin_bswap16 (__bsx); #else return __bswap_constant_16 (__bsx); #endif } /* Swap bytes in 32-bit value. */ #define __bswap_constant_32(x) \ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \ | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) static __inline __uint32_t __bswap_32 (__uint32_t __bsx) { #if __GNUC_PREREQ (4, 3) return __builtin_bswap32 (__bsx); #else return __bswap_constant_32 (__bsx); #endif } /* Swap bytes in 64-bit value. */ #define __bswap_constant_64(x) \ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ | (((x) & 0x0000ff0000000000ull) >> 24) \ | (((x) & 0x000000ff00000000ull) >> 8) \ | (((x) & 0x00000000ff000000ull) << 8) \ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56)) __extension__ static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { #if __GNUC_PREREQ (4, 3) return __builtin_bswap64 (__bsx); #else return __bswap_constant_64 (__bsx); #endif } #endif /* _BITS_BYTESWAP_H */ PKZnc bits/poll.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_POLL_H # error "Never use directly; include instead." #endif /* Event types that can be polled for. These bits may be set in `events' to indicate the interesting event types; they will appear in `revents' to indicate the status of the file descriptor. */ #define POLLIN 0x001 /* There is data to read. */ #define POLLPRI 0x002 /* There is urgent data to read. */ #define POLLOUT 0x004 /* Writing now will not block. */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* These values are defined in XPG4.2. */ # define POLLRDNORM 0x040 /* Normal data may be read. */ # define POLLRDBAND 0x080 /* Priority data may be read. */ # define POLLWRNORM 0x100 /* Writing now will not block. */ # define POLLWRBAND 0x200 /* Priority data may be written. */ #endif #ifdef __USE_GNU /* These are extensions for Linux. */ # define POLLMSG 0x400 # define POLLREMOVE 0x1000 # define POLLRDHUP 0x2000 #endif /* Event types always implicitly polled for. These bits need not be set in `events', but they will appear in `revents' to indicate the status of the file descriptor. */ #define POLLERR 0x008 /* Error condition. */ #define POLLHUP 0x010 /* Hung up. */ #define POLLNVAL 0x020 /* Invalid polling request. */ PKZ4  bits/stdint-intn.hnu[/* Define intN_t types. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDINT_INTN_H #define _BITS_STDINT_INTN_H 1 #include typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; #endif /* bits/stdint-intn.h */ PKZ0G^bits/utsname.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_UTSNAME_H # error "Never include directly; use instead." #endif /* Length of the entries in `struct utsname' is 65. */ #define _UTSNAME_LENGTH 65 /* Linux provides as additional information in the `struct utsname' the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH to a value != 0 to activate this entry. */ #define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH PKZkJrlbits/fp-fast.hnu[/* Define FP_FAST_* macros. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never use directly; include instead." #endif #ifdef __USE_ISOC99 /* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} builtins are supported. */ # ifdef __FP_FAST_FMA # define FP_FAST_FMA 1 # endif # ifdef __FP_FAST_FMAF # define FP_FAST_FMAF 1 # endif # ifdef __FP_FAST_FMAL # define FP_FAST_FMAL 1 # endif #endif PKZdgbits/environments.hnu[/* Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UNISTD_H # error "Never include this file directly. Use instead" #endif #include /* This header should define the following symbols under the described situations. A value `1' means that the model is always supported, `-1' means it is never supported. Undefined means it cannot be statically decided. _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard and are available only for compatibility. */ #if __WORDSIZE == 64 /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: # undef _POSIX_V7_ILP32_OFF32 # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 # undef _XBS5_ILP32_OFFBIG and users need to check at runtime. */ /* We also have no use (for now) for an environment with bigger pointers and offsets. */ # define _POSIX_V7_LPBIG_OFFBIG -1 # define _POSIX_V6_LPBIG_OFFBIG -1 # define _XBS5_LPBIG_OFFBIG -1 /* By default we have 64-bit wide `long int', pointers and `off_t'. */ # define _POSIX_V7_LP64_OFF64 1 # define _POSIX_V6_LP64_OFF64 1 # define _XBS5_LP64_OFF64 1 #else /* __WORDSIZE == 32 */ /* We have 32-bit wide `int', `long int' and pointers and all platforms support LFS. -mx32 has 64-bit wide `off_t'. */ # define _POSIX_V7_ILP32_OFFBIG 1 # define _POSIX_V6_ILP32_OFFBIG 1 # define _XBS5_ILP32_OFFBIG 1 # ifndef __x86_64__ /* -m32 has 32-bit wide `off_t'. */ # define _POSIX_V7_ILP32_OFF32 1 # define _POSIX_V6_ILP32_OFF32 1 # define _XBS5_ILP32_OFF32 1 # endif /* We optionally provide an environment with the above size but an 64-bit side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ /* Environments with 64-bit wide pointers can be provided, so these macros aren't defined: # undef _POSIX_V7_LP64_OFF64 # undef _POSIX_V7_LPBIG_OFFBIG # undef _POSIX_V6_LP64_OFF64 # undef _POSIX_V6_LPBIG_OFFBIG # undef _XBS5_LP64_OFF64 # undef _XBS5_LPBIG_OFFBIG and sysconf tests for it at runtime. */ #endif /* __WORDSIZE == 32 */ #define __ILP32_OFF32_CFLAGS "-m32" #define __ILP32_OFF32_LDFLAGS "-m32" #if defined __x86_64__ && defined __ILP32__ # define __ILP32_OFFBIG_CFLAGS "-mx32" # define __ILP32_OFFBIG_LDFLAGS "-mx32" #else # define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" # define __ILP32_OFFBIG_LDFLAGS "-m32" #endif #define __LP64_OFF64_CFLAGS "-m64" #define __LP64_OFF64_LDFLAGS "-m64" PKZ} bits/pthreadtypes.hnu[/* Declaration of common pthread types for all architectures. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_PTHREADTYPES_COMMON_H # define _BITS_PTHREADTYPES_COMMON_H 1 /* For internal mutex and condition variable definitions. */ #include /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ typedef unsigned long int pthread_t; /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; int __align; } pthread_mutexattr_t; /* Data structure for condition variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[__SIZEOF_PTHREAD_CONDATTR_T]; int __align; } pthread_condattr_t; /* Keys for thread-specific data */ typedef unsigned int pthread_key_t; /* Once-only execution */ typedef int __ONCE_ALIGNMENT pthread_once_t; union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; }; #ifndef __have_pthread_attr_t typedef union pthread_attr_t pthread_attr_t; # define __have_pthread_attr_t 1 #endif typedef union { struct __pthread_mutex_s __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[__SIZEOF_PTHREAD_COND_T]; __extension__ long long int __align; } pthread_cond_t; #if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for reader-writer lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union { struct __pthread_rwlock_arch_t __data; char __size[__SIZEOF_PTHREAD_RWLOCK_T]; long int __align; } pthread_rwlock_t; typedef union { char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; long int __align; } pthread_rwlockattr_t; #endif #ifdef __USE_XOPEN2K /* POSIX spinlock data type. */ typedef volatile int pthread_spinlock_t; /* POSIX barriers data type. The structure of the type is deliberately not exposed. */ typedef union { char __size[__SIZEOF_PTHREAD_BARRIER_T]; long int __align; } pthread_barrier_t; typedef union { char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; int __align; } pthread_barrierattr_t; #endif #endif PKZj-G-G bits/wchar2.hnu[/* Checking macros for wchar functions. Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _WCHAR_H # error "Never include directly; use instead." #endif extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) __THROW; extern wchar_t *__REDIRECT_NTH (__wmemcpy_alias, (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n), wmemcpy); extern wchar_t *__REDIRECT_NTH (__wmemcpy_chk_warn, (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1), __wmemcpy_chk) __warnattr ("wmemcpy called with length bigger than size of destination " "buffer"); __fortify_function wchar_t * __NTH (wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n)) { return __glibc_fortify_n (wmemcpy, __n, sizeof (wchar_t), __glibc_objsize0 (__s1), __s1, __s2, __n); } extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2, size_t __n, size_t __ns1) __THROW; extern wchar_t *__REDIRECT_NTH (__wmemmove_alias, (wchar_t *__s1, const wchar_t *__s2, size_t __n), wmemmove); extern wchar_t *__REDIRECT_NTH (__wmemmove_chk_warn, (wchar_t *__s1, const wchar_t *__s2, size_t __n, size_t __ns1), __wmemmove_chk) __warnattr ("wmemmove called with length bigger than size of destination " "buffer"); __fortify_function wchar_t * __NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n)) { return __glibc_fortify_n (wmemmove, __n, sizeof (wchar_t), __glibc_objsize0 (__s1), __s1, __s2, __n); } #ifdef __USE_GNU extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) __THROW; extern wchar_t *__REDIRECT_NTH (__wmempcpy_alias, (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n), wmempcpy); extern wchar_t *__REDIRECT_NTH (__wmempcpy_chk_warn, (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1), __wmempcpy_chk) __warnattr ("wmempcpy called with length bigger than size of destination " "buffer"); __fortify_function wchar_t * __NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n)) { return __glibc_fortify_n (wmempcpy, __n, sizeof (wchar_t), __glibc_objsize0 (__s1), __s1, __s2, __n); } #endif extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) __THROW; extern wchar_t *__REDIRECT_NTH (__wmemset_alias, (wchar_t *__s, wchar_t __c, size_t __n), wmemset); extern wchar_t *__REDIRECT_NTH (__wmemset_chk_warn, (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns), __wmemset_chk) __warnattr ("wmemset called with length bigger than size of destination " "buffer"); __fortify_function wchar_t * __NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n)) { return __glibc_fortify_n (wmemset, __n, sizeof (wchar_t), __glibc_objsize0 (__s), __s, __c, __n); } extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW; extern wchar_t *__REDIRECT_NTH (__wcscpy_alias, (wchar_t *__restrict __dest, const wchar_t *__restrict __src), wcscpy); __fortify_function wchar_t * __NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src)) { size_t sz = __glibc_objsize (__dest); if (sz != (size_t) -1) return __wcscpy_chk (__dest, __src, sz / sizeof (wchar_t)); return __wcscpy_alias (__dest, __src); } extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __destlen) __THROW; extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias, (wchar_t *__restrict __dest, const wchar_t *__restrict __src), wcpcpy); __fortify_function wchar_t * __NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src)) { size_t sz = __glibc_objsize (__dest); if (sz != (size_t) -1) return __wcpcpy_chk (__dest, __src, sz / sizeof (wchar_t)); return __wcpcpy_alias (__dest, __src); } extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) __THROW; extern wchar_t *__REDIRECT_NTH (__wcsncpy_alias, (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n), wcsncpy); extern wchar_t *__REDIRECT_NTH (__wcsncpy_chk_warn, (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen), __wcsncpy_chk) __warnattr ("wcsncpy called with length bigger than size of destination " "buffer"); __fortify_function wchar_t * __NTH (wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n)) { return __glibc_fortify_n (wcsncpy, __n, sizeof (wchar_t), __glibc_objsize (__dest), __dest, __src, __n); } extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) __THROW; extern wchar_t *__REDIRECT_NTH (__wcpncpy_alias, (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n), wcpncpy); extern wchar_t *__REDIRECT_NTH (__wcpncpy_chk_warn, (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen), __wcpncpy_chk) __warnattr ("wcpncpy called with length bigger than size of destination " "buffer"); __fortify_function wchar_t * __NTH (wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n)) { return __glibc_fortify_n (wcpncpy, __n, sizeof (wchar_t), __glibc_objsize (__dest), __dest, __src, __n); } extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __destlen) __THROW; extern wchar_t *__REDIRECT_NTH (__wcscat_alias, (wchar_t *__restrict __dest, const wchar_t *__restrict __src), wcscat); __fortify_function wchar_t * __NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src)) { size_t sz = __glibc_objsize (__dest); if (sz != (size_t) -1) return __wcscat_chk (__dest, __src, sz / sizeof (wchar_t)); return __wcscat_alias (__dest, __src); } extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) __THROW; extern wchar_t *__REDIRECT_NTH (__wcsncat_alias, (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n), wcsncat); __fortify_function wchar_t * __NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n)) { size_t sz = __glibc_objsize (__dest); if (sz != (size_t) -1) return __wcsncat_chk (__dest, __src, __n, sz / sizeof (wchar_t)); return __wcsncat_alias (__dest, __src, __n); } extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, int __flag, size_t __s_len, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */; extern int __REDIRECT_NTH_LDBL (__swprintf_alias, (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...), swprintf); #ifdef __va_arg_pack __fortify_function int __NTH (swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...)) { size_t sz = __glibc_objsize (__s); if (sz != (size_t) -1 || __USE_FORTIFY_LEVEL > 1) return __swprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, sz / sizeof (wchar_t), __fmt, __va_arg_pack ()); return __swprintf_alias (__s, __n, __fmt, __va_arg_pack ()); } #elif !defined __cplusplus /* XXX We might want to have support in gcc for swprintf. */ # define swprintf(s, n, ...) \ (__glibc_objsize (s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1 \ ? __swprintf_chk (s, n, __USE_FORTIFY_LEVEL - 1, \ __glibc_objsize (s) / sizeof (wchar_t), __VA_ARGS__) \ : swprintf (s, n, __VA_ARGS__)) #endif extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, int __flag, size_t __s_len, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */; extern int __REDIRECT_NTH_LDBL (__vswprintf_alias, (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap), vswprintf); __fortify_function int __NTH (vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap)) { size_t sz = __glibc_objsize (__s); if (sz != (size_t) -1 || __USE_FORTIFY_LEVEL > 1) return __vswprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, sz / sizeof (wchar_t), __fmt, __ap); return __vswprintf_alias (__s, __n, __fmt, __ap); } #if __USE_FORTIFY_LEVEL > 1 extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, const wchar_t *__restrict __format, ...); extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format, ...); extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, const wchar_t *__restrict __format, __gnuc_va_list __ap); extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format, __gnuc_va_list __ap); # ifdef __va_arg_pack __fortify_function int wprintf (const wchar_t *__restrict __fmt, ...) { return __wprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } __fortify_function int fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, ...) { return __fwprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ()); } # elif !defined __cplusplus # define wprintf(...) \ __wprintf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # define fwprintf(stream, ...) \ __fwprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__) # endif __fortify_function int vwprintf (const wchar_t *__restrict __fmt, __gnuc_va_list __ap) { return __vwprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap); } __fortify_function int vfwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) { return __vfwprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); } #endif extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __wur; extern wchar_t *__REDIRECT (__fgetws_alias, (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream), fgetws) __wur; extern wchar_t *__REDIRECT (__fgetws_chk_warn, (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream), __fgetws_chk) __wur __warnattr ("fgetws called with bigger size than length " "of destination buffer"); __fortify_function __wur wchar_t * fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) { size_t sz = __glibc_objsize (__s); if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz)) return __fgetws_alias (__s, __n, __stream); if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz)) return __fgetws_chk_warn (__s, sz / sizeof (wchar_t), __n, __stream); return __fgetws_chk (__s, sz / sizeof (wchar_t), __n, __stream); } #ifdef __USE_GNU extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __wur; extern wchar_t *__REDIRECT (__fgetws_unlocked_alias, (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream), fgetws_unlocked) __wur; extern wchar_t *__REDIRECT (__fgetws_unlocked_chk_warn, (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream), __fgetws_unlocked_chk) __wur __warnattr ("fgetws_unlocked called with bigger size than length " "of destination buffer"); __fortify_function __wur wchar_t * fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) { size_t sz = __glibc_objsize (__s); if (__glibc_safe_or_unknown_len (__n, sizeof (wchar_t), sz)) return __fgetws_unlocked_alias (__s, __n, __stream); if (__glibc_unsafe_len (__n, sizeof (wchar_t), sz)) return __fgetws_unlocked_chk_warn (__s, sz / sizeof (wchar_t), __n, __stream); return __fgetws_unlocked_chk (__s, sz / sizeof (wchar_t), __n, __stream); } #endif extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __p, size_t __buflen) __THROW __wur; extern size_t __REDIRECT_NTH (__wcrtomb_alias, (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps), wcrtomb) __wur; __fortify_function __wur size_t __NTH (wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps)) { /* We would have to include to get a definition of MB_LEN_MAX. But this would only disturb the namespace. So we define our own version here. */ #define __WCHAR_MB_LEN_MAX 16 #if defined MB_LEN_MAX && MB_LEN_MAX != __WCHAR_MB_LEN_MAX # error "Assumed value of MB_LEN_MAX wrong" #endif if (__glibc_objsize (__s) != (size_t) -1 && __WCHAR_MB_LEN_MAX > __glibc_objsize (__s)) return __wcrtomb_chk (__s, __wchar, __ps, __glibc_objsize (__s)); return __wcrtomb_alias (__s, __wchar, __ps); } extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) __THROW; extern size_t __REDIRECT_NTH (__mbsrtowcs_alias, (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps), mbsrtowcs); extern size_t __REDIRECT_NTH (__mbsrtowcs_chk_warn, (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen), __mbsrtowcs_chk) __warnattr ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"); __fortify_function size_t __NTH (mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps)) { return __glibc_fortify_n (mbsrtowcs, __len, sizeof (wchar_t), __glibc_objsize (__dst), __dst, __src, __len, __ps); } extern size_t __wcsrtombs_chk (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) __THROW; extern size_t __REDIRECT_NTH (__wcsrtombs_alias, (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps), wcsrtombs); extern size_t __REDIRECT_NTH (__wcsrtombs_chk_warn, (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen), __wcsrtombs_chk) __warnattr ("wcsrtombs called with dst buffer smaller than len"); __fortify_function size_t __NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps)) { return __glibc_fortify (wcsrtombs, __len, sizeof (char), __glibc_objsize (__dst), __dst, __src, __len, __ps); } #ifdef __USE_XOPEN2K8 extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) __THROW; extern size_t __REDIRECT_NTH (__mbsnrtowcs_alias, (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps), mbsnrtowcs); extern size_t __REDIRECT_NTH (__mbsnrtowcs_chk_warn, (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen), __mbsnrtowcs_chk) __warnattr ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"); __fortify_function size_t __NTH (mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps)) { return __glibc_fortify_n (mbsnrtowcs, __len, sizeof (wchar_t), __glibc_objsize (__dst), __dst, __src, __nmc, __len, __ps); } extern size_t __wcsnrtombs_chk (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) __THROW; extern size_t __REDIRECT_NTH (__wcsnrtombs_alias, (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps), wcsnrtombs); extern size_t __REDIRECT_NTH (__wcsnrtombs_chk_warn, (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen), __wcsnrtombs_chk) __warnattr ("wcsnrtombs called with dst buffer smaller than len"); __fortify_function size_t __NTH (wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps)) { return __glibc_fortify (wcsnrtombs, __len, sizeof (char), __glibc_objsize (__dst), __dst, __src, __nwc, __len, __ps); } #endif PKZ¥ƿbits/sys_errlist.hnu[/* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDIO_H # error "Never include directly; use instead." #endif /* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ #ifdef __USE_MISC extern int sys_nerr; extern const char *const sys_errlist[]; #endif #ifdef __USE_GNU extern int _sys_nerr; extern const char *const _sys_errlist[]; #endif PKZ%NNbits/timerfd.hnu[/* Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_TIMERFD_H # error "Never use directly; include instead." #endif /* Bits to be set in the FLAGS parameter of `timerfd_create'. */ enum { TFD_CLOEXEC = 02000000, #define TFD_CLOEXEC TFD_CLOEXEC TFD_NONBLOCK = 00004000 #define TFD_NONBLOCK TFD_NONBLOCK }; PKZo' bits/fcntl2.hnu[/* Checking macros for fcntl functions. Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FCNTL_H # error "Never include directly; use instead." #endif /* Check that calls to open and openat with O_CREAT or O_TMPFILE set have an appropriate third/fourth parameter. */ #ifndef __USE_FILE_OFFSET64 extern int __open_2 (const char *__path, int __oflag) __nonnull ((1)); extern int __REDIRECT (__open_alias, (const char *__path, int __oflag, ...), open) __nonnull ((1)); #else extern int __REDIRECT (__open_2, (const char *__path, int __oflag), __open64_2) __nonnull ((1)); extern int __REDIRECT (__open_alias, (const char *__path, int __oflag, ...), open64) __nonnull ((1)); #endif __errordecl (__open_too_many_args, "open can be called either with 2 or 3 arguments, not more"); __errordecl (__open_missing_mode, "open with O_CREAT or O_TMPFILE in second argument needs 3 arguments"); __fortify_function int open (const char *__path, int __oflag, ...) { if (__va_arg_pack_len () > 1) __open_too_many_args (); if (__builtin_constant_p (__oflag)) { if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1) { __open_missing_mode (); return __open_2 (__path, __oflag); } return __open_alias (__path, __oflag, __va_arg_pack ()); } if (__va_arg_pack_len () < 1) return __open_2 (__path, __oflag); return __open_alias (__path, __oflag, __va_arg_pack ()); } #ifdef __USE_LARGEFILE64 extern int __open64_2 (const char *__path, int __oflag) __nonnull ((1)); extern int __REDIRECT (__open64_alias, (const char *__path, int __oflag, ...), open64) __nonnull ((1)); __errordecl (__open64_too_many_args, "open64 can be called either with 2 or 3 arguments, not more"); __errordecl (__open64_missing_mode, "open64 with O_CREAT or O_TMPFILE in second argument needs 3 arguments"); __fortify_function int open64 (const char *__path, int __oflag, ...) { if (__va_arg_pack_len () > 1) __open64_too_many_args (); if (__builtin_constant_p (__oflag)) { if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1) { __open64_missing_mode (); return __open64_2 (__path, __oflag); } return __open64_alias (__path, __oflag, __va_arg_pack ()); } if (__va_arg_pack_len () < 1) return __open64_2 (__path, __oflag); return __open64_alias (__path, __oflag, __va_arg_pack ()); } #endif #ifdef __USE_ATFILE # ifndef __USE_FILE_OFFSET64 extern int __openat_2 (int __fd, const char *__path, int __oflag) __nonnull ((2)); extern int __REDIRECT (__openat_alias, (int __fd, const char *__path, int __oflag, ...), openat) __nonnull ((2)); # else extern int __REDIRECT (__openat_2, (int __fd, const char *__path, int __oflag), __openat64_2) __nonnull ((2)); extern int __REDIRECT (__openat_alias, (int __fd, const char *__path, int __oflag, ...), openat64) __nonnull ((2)); # endif __errordecl (__openat_too_many_args, "openat can be called either with 3 or 4 arguments, not more"); __errordecl (__openat_missing_mode, "openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments"); __fortify_function int openat (int __fd, const char *__path, int __oflag, ...) { if (__va_arg_pack_len () > 1) __openat_too_many_args (); if (__builtin_constant_p (__oflag)) { if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1) { __openat_missing_mode (); return __openat_2 (__fd, __path, __oflag); } return __openat_alias (__fd, __path, __oflag, __va_arg_pack ()); } if (__va_arg_pack_len () < 1) return __openat_2 (__fd, __path, __oflag); return __openat_alias (__fd, __path, __oflag, __va_arg_pack ()); } # ifdef __USE_LARGEFILE64 extern int __openat64_2 (int __fd, const char *__path, int __oflag) __nonnull ((2)); extern int __REDIRECT (__openat64_alias, (int __fd, const char *__path, int __oflag, ...), openat64) __nonnull ((2)); __errordecl (__openat64_too_many_args, "openat64 can be called either with 3 or 4 arguments, not more"); __errordecl (__openat64_missing_mode, "openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments"); __fortify_function int openat64 (int __fd, const char *__path, int __oflag, ...) { if (__va_arg_pack_len () > 1) __openat64_too_many_args (); if (__builtin_constant_p (__oflag)) { if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1) { __openat64_missing_mode (); return __openat64_2 (__fd, __path, __oflag); } return __openat64_alias (__fd, __path, __oflag, __va_arg_pack ()); } if (__va_arg_pack_len () < 1) return __openat64_2 (__fd, __path, __oflag); return __openat64_alias (__fd, __path, __oflag, __va_arg_pack ()); } # endif #endif PKZn bits/libm-simd-decl-stubs.hnu[/* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h. Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never include directly;\ include instead." #endif /* Needed definitions could be generated with: for func in $(grep __MATHCALL_VEC math/bits/mathcalls.h |\ sed -r "s|__MATHCALL_VEC.?\(||; s|,.*||"); do echo "#define __DECL_SIMD_${func}"; echo "#define __DECL_SIMD_${func}f"; echo "#define __DECL_SIMD_${func}l"; done */ #ifndef _BITS_LIBM_SIMD_DECL_STUBS_H #define _BITS_LIBM_SIMD_DECL_STUBS_H 1 #define __DECL_SIMD_cos #define __DECL_SIMD_cosf #define __DECL_SIMD_cosl #define __DECL_SIMD_cosf16 #define __DECL_SIMD_cosf32 #define __DECL_SIMD_cosf64 #define __DECL_SIMD_cosf128 #define __DECL_SIMD_cosf32x #define __DECL_SIMD_cosf64x #define __DECL_SIMD_cosf128x #define __DECL_SIMD_sin #define __DECL_SIMD_sinf #define __DECL_SIMD_sinl #define __DECL_SIMD_sinf16 #define __DECL_SIMD_sinf32 #define __DECL_SIMD_sinf64 #define __DECL_SIMD_sinf128 #define __DECL_SIMD_sinf32x #define __DECL_SIMD_sinf64x #define __DECL_SIMD_sinf128x #define __DECL_SIMD_sincos #define __DECL_SIMD_sincosf #define __DECL_SIMD_sincosl #define __DECL_SIMD_sincosf16 #define __DECL_SIMD_sincosf32 #define __DECL_SIMD_sincosf64 #define __DECL_SIMD_sincosf128 #define __DECL_SIMD_sincosf32x #define __DECL_SIMD_sincosf64x #define __DECL_SIMD_sincosf128x #define __DECL_SIMD_log #define __DECL_SIMD_logf #define __DECL_SIMD_logl #define __DECL_SIMD_logf16 #define __DECL_SIMD_logf32 #define __DECL_SIMD_logf64 #define __DECL_SIMD_logf128 #define __DECL_SIMD_logf32x #define __DECL_SIMD_logf64x #define __DECL_SIMD_logf128x #define __DECL_SIMD_exp #define __DECL_SIMD_expf #define __DECL_SIMD_expl #define __DECL_SIMD_expf16 #define __DECL_SIMD_expf32 #define __DECL_SIMD_expf64 #define __DECL_SIMD_expf128 #define __DECL_SIMD_expf32x #define __DECL_SIMD_expf64x #define __DECL_SIMD_expf128x #define __DECL_SIMD_pow #define __DECL_SIMD_powf #define __DECL_SIMD_powl #define __DECL_SIMD_powf16 #define __DECL_SIMD_powf32 #define __DECL_SIMD_powf64 #define __DECL_SIMD_powf128 #define __DECL_SIMD_powf32x #define __DECL_SIMD_powf64x #define __DECL_SIMD_powf128x #endif PKZ]3*Jhhbits/uio_lim.hnu[/* Implementation limits related to sys/uio.h - Linux version. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_UIO_LIM_H #define _BITS_UIO_LIM_H 1 /* Maximum length of the 'struct iovec' array in a single call to readv or writev. This macro has different values in different kernel versions. The latest versions of the kernel use 1024 and this is good choice. Since the C library implementation of readv/writev is able to emulate the functionality even if the currently running kernel does not support this large value the readv/writev call will not fail because of this. */ #define __IOV_MAX 1024 #endif PKZn bits/mman-shared.hnu[/* Memory-mapping-related declarations/definitions, not architecture-specific. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." #endif #ifdef __USE_GNU /* Flags for memfd_create. */ # ifndef MFD_CLOEXEC # define MFD_CLOEXEC 1U # define MFD_ALLOW_SEALING 2U # define MFD_HUGETLB 4U # endif /* Flags for mlock2. */ # ifndef MLOCK_ONFAULT # define MLOCK_ONFAULT 1U # endif /* Access rights for pkey_alloc. */ # ifndef PKEY_DISABLE_ACCESS # define PKEY_DISABLE_ACCESS 0x1 # define PKEY_DISABLE_WRITE 0x2 # endif __BEGIN_DECLS /* Create a new memory file descriptor. NAME is a name for debugging. FLAGS is a combination of the MFD_* constants. */ int memfd_create (const char *__name, unsigned int __flags) __THROW; /* Lock pages from ADDR (inclusive) to ADDR + LENGTH (exclusive) into memory. FLAGS is a combination of the MLOCK_* flags above. */ int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW; /* Allocate a new protection key, with the PKEY_DISABLE_* bits specified in ACCESS_RIGHTS. The protection key mask for the current thread is updated to match the access privilege for the new key. */ int pkey_alloc (unsigned int __flags, unsigned int __access_rights) __THROW; /* Update the access rights for the current thread for KEY, which must have been allocated using pkey_alloc. */ int pkey_set (int __key, unsigned int __access_rights) __THROW; /* Return the access rights for the current thread for KEY, which must have been allocated using pkey_alloc. */ int pkey_get (int __key) __THROW; /* Free an allocated protection key, which must have been allocated using pkey_alloc. */ int pkey_free (int __key) __THROW; /* Apply memory protection flags for KEY to the specified address range. */ int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) __THROW; __END_DECLS #endif /* __USE_GNU */ PKZފbits/syslog-ldbl.hnu[/* -mlong-double-64 compatibility mode for syslog functions. Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SYSLOG_H # error "Never include directly; use instead." #endif __LDBL_REDIR_DECL (syslog) #ifdef __USE_MISC __LDBL_REDIR_DECL (vsyslog) #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function __LDBL_REDIR_DECL (__syslog_chk) # ifdef __USE_MISC __LDBL_REDIR_DECL (__vsyslog_chk) # endif #endif PKZ ZE E bits/typesizes.hnu[/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." #endif #ifndef _BITS_TYPESIZES_H #define _BITS_TYPESIZES_H 1 /* See for the meaning of these macros. This file exists so that need not vary across different GNU platforms. */ /* X32 kernel interface is 64-bit. */ #if defined __x86_64__ && defined __ILP32__ # define __SYSCALL_SLONG_TYPE __SQUAD_TYPE # define __SYSCALL_ULONG_TYPE __UQUAD_TYPE #else # define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE # define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #endif #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __SYSCALL_ULONG_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #ifdef __x86_64__ # define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE # define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE #else # define __NLINK_T_TYPE __UWORD_TYPE # define __FSWORD_T_TYPE __SWORD_TYPE #endif #define __OFF_T_TYPE __SYSCALL_SLONG_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE #define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE #define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE #ifdef __x86_64__ /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ # define __OFF_T_MATCHES_OFF64_T 1 /* Same for ino_t and ino64_t. */ # define __INO_T_MATCHES_INO64_T 1 /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 #endif /* bits/typesizes.h */ PKZ>wKKbits/link_lavcurrent.hnu[/* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. LAV_CURRENT definition. Copyright (C) 2021 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _LINK_H # error "Never include directly; use instead." #endif /* Version numbers for la_version handshake interface. */ #define LAV_CURRENT 2 PKZ7G&22bits/mathinline.hnu[/* Inline math functions for i387 and SSE. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never use directly; include instead." #endif #ifndef __extern_always_inline # define __MATH_INLINE __inline #else # define __MATH_INLINE __extern_always_inline #endif /* Disable x87 inlines when -fpmath=sse is passed and also when we're building on x86_64. Older gcc (gcc-3.2 for example) does not define __SSE2_MATH__ for x86_64. */ #if !defined __SSE2_MATH__ && !defined __x86_64__ # if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ && defined __OPTIMIZE__) /* The inline functions do not set errno or raise necessarily the correct exceptions. */ # undef math_errhandling /* A macro to define float, double, and long double versions of various math functions for the ix87 FPU. FUNC is the function name (which will be suffixed with f and l for the float and long double version, respectively). OP is the name of the FPU operation. We define two sets of macros. The set with the additional NP doesn't add a prototype declaration. */ # ifdef __USE_ISOC99 # define __inline_mathop(func, op) \ __inline_mathop_ (double, func, op) \ __inline_mathop_ (float, __CONCAT(func,f), op) \ __inline_mathop_ (long double, __CONCAT(func,l), op) # define __inline_mathopNP(func, op) \ __inline_mathopNP_ (double, func, op) \ __inline_mathopNP_ (float, __CONCAT(func,f), op) \ __inline_mathopNP_ (long double, __CONCAT(func,l), op) # else # define __inline_mathop(func, op) \ __inline_mathop_ (double, func, op) # define __inline_mathopNP(func, op) \ __inline_mathopNP_ (double, func, op) # endif # define __inline_mathop_(float_type, func, op) \ __inline_mathop_decl_ (float_type, func, op, "0" (__x)) # define __inline_mathopNP_(float_type, func, op) \ __inline_mathop_declNP_ (float_type, func, op, "0" (__x)) # ifdef __USE_ISOC99 # define __inline_mathop_decl(func, op, params...) \ __inline_mathop_decl_ (double, func, op, params) \ __inline_mathop_decl_ (float, __CONCAT(func,f), op, params) \ __inline_mathop_decl_ (long double, __CONCAT(func,l), op, params) # define __inline_mathop_declNP(func, op, params...) \ __inline_mathop_declNP_ (double, func, op, params) \ __inline_mathop_declNP_ (float, __CONCAT(func,f), op, params) \ __inline_mathop_declNP_ (long double, __CONCAT(func,l), op, params) # else # define __inline_mathop_decl(func, op, params...) \ __inline_mathop_decl_ (double, func, op, params) # define __inline_mathop_declNP(func, op, params...) \ __inline_mathop_declNP_ (double, func, op, params) # endif # define __inline_mathop_decl_(float_type, func, op, params...) \ __MATH_INLINE float_type func (float_type) __THROW; \ __inline_mathop_declNP_ (float_type, func, op, params) # define __inline_mathop_declNP_(float_type, func, op, params...) \ __MATH_INLINE float_type __NTH (func (float_type __x)) \ { \ register float_type __result; \ __asm __volatile__ (op : "=t" (__result) : params); \ return __result; \ } # ifdef __USE_ISOC99 # define __inline_mathcode(func, arg, code) \ __inline_mathcode_ (double, func, arg, code) \ __inline_mathcode_ (float, __CONCAT(func,f), arg, code) \ __inline_mathcode_ (long double, __CONCAT(func,l), arg, code) # define __inline_mathcodeNP(func, arg, code) \ __inline_mathcodeNP_ (double, func, arg, code) \ __inline_mathcodeNP_ (float, __CONCAT(func,f), arg, code) \ __inline_mathcodeNP_ (long double, __CONCAT(func,l), arg, code) # define __inline_mathcode2(func, arg1, arg2, code) \ __inline_mathcode2_ (double, func, arg1, arg2, code) \ __inline_mathcode2_ (float, __CONCAT(func,f), arg1, arg2, code) \ __inline_mathcode2_ (long double, __CONCAT(func,l), arg1, arg2, code) # define __inline_mathcodeNP2(func, arg1, arg2, code) \ __inline_mathcodeNP2_ (double, func, arg1, arg2, code) \ __inline_mathcodeNP2_ (float, __CONCAT(func,f), arg1, arg2, code) \ __inline_mathcodeNP2_ (long double, __CONCAT(func,l), arg1, arg2, code) # define __inline_mathcode3(func, arg1, arg2, arg3, code) \ __inline_mathcode3_ (double, func, arg1, arg2, arg3, code) \ __inline_mathcode3_ (float, __CONCAT(func,f), arg1, arg2, arg3, code) \ __inline_mathcode3_ (long double, __CONCAT(func,l), arg1, arg2, arg3, code) # define __inline_mathcodeNP3(func, arg1, arg2, arg3, code) \ __inline_mathcodeNP3_ (double, func, arg1, arg2, arg3, code) \ __inline_mathcodeNP3_ (float, __CONCAT(func,f), arg1, arg2, arg3, code) \ __inline_mathcodeNP3_ (long double, __CONCAT(func,l), arg1, arg2, arg3, code) # else # define __inline_mathcode(func, arg, code) \ __inline_mathcode_ (double, func, (arg), code) # define __inline_mathcodeNP(func, arg, code) \ __inline_mathcodeNP_ (double, func, (arg), code) # define __inline_mathcode2(func, arg1, arg2, code) \ __inline_mathcode2_ (double, func, arg1, arg2, code) # define __inline_mathcodeNP2(func, arg1, arg2, code) \ __inline_mathcodeNP2_ (double, func, arg1, arg2, code) # define __inline_mathcode3(func, arg1, arg2, arg3, code) \ __inline_mathcode3_ (double, func, arg1, arg2, arg3, code) # define __inline_mathcodeNP3(func, arg1, arg2, arg3, code) \ __inline_mathcodeNP3_ (double, func, arg1, arg2, arg3, code) # endif # define __inline_mathcode_(float_type, func, arg, code) \ __MATH_INLINE float_type func (float_type) __THROW; \ __inline_mathcodeNP_(float_type, func, arg, code) # define __inline_mathcodeNP_(float_type, func, arg, code) \ __MATH_INLINE float_type __NTH (func (float_type arg)) \ { \ code; \ } # define __inline_mathcode2_(float_type, func, arg1, arg2, code) \ __MATH_INLINE float_type func (float_type, float_type) __THROW; \ __inline_mathcodeNP2_ (float_type, func, arg1, arg2, code) # define __inline_mathcodeNP2_(float_type, func, arg1, arg2, code) \ __MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2)) \ { \ code; \ } # define __inline_mathcode3_(float_type, func, arg1, arg2, arg3, code) \ __MATH_INLINE float_type func (float_type, float_type, float_type) __THROW; \ __inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code) # define __inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code) \ __MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2, \ float_type arg3)) \ { \ code; \ } # endif # if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ /* Miscellaneous functions */ /* __FAST_MATH__ is defined by gcc -ffast-math. */ # ifdef __FAST_MATH__ /* Optimized inline implementation, sometimes with reduced precision and/or argument range. */ # if __GNUC_PREREQ (3, 5) # define __expm1_code \ register long double __temp; \ __temp = __builtin_expm1l (__x); \ return __temp ? __temp : __x # else # define __expm1_code \ register long double __value; \ register long double __exponent; \ register long double __temp; \ __asm __volatile__ \ ("fldl2e # e^x - 1 = 2^(x * log2(e)) - 1\n\t" \ "fmul %%st(1) # x * log2(e)\n\t" \ "fst %%st(1)\n\t" \ "frndint # int(x * log2(e))\n\t" \ "fxch\n\t" \ "fsub %%st(1) # fract(x * log2(e))\n\t" \ "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" \ "fscale # 2^(x * log2(e)) - 2^(int(x * log2(e)))\n\t" \ : "=t" (__value), "=u" (__exponent) : "0" (__x)); \ __asm __volatile__ \ ("fscale # 2^int(x * log2(e))\n\t" \ : "=t" (__temp) : "0" (1.0), "u" (__exponent)); \ __temp -= 1.0; \ __temp += __value; \ return __temp ? __temp : __x # endif __inline_mathcodeNP_ (long double, __expm1l, __x, __expm1_code) # if __GNUC_PREREQ (3, 4) __inline_mathcodeNP_ (long double, __expl, __x, return __builtin_expl (__x)) # else # define __exp_code \ register long double __value; \ register long double __exponent; \ __asm __volatile__ \ ("fldl2e # e^x = 2^(x * log2(e))\n\t" \ "fmul %%st(1) # x * log2(e)\n\t" \ "fst %%st(1)\n\t" \ "frndint # int(x * log2(e))\n\t" \ "fxch\n\t" \ "fsub %%st(1) # fract(x * log2(e))\n\t" \ "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" \ : "=t" (__value), "=u" (__exponent) : "0" (__x)); \ __value += 1.0; \ __asm __volatile__ \ ("fscale" \ : "=t" (__value) : "0" (__value), "u" (__exponent)); \ return __value __inline_mathcodeNP (exp, __x, __exp_code) __inline_mathcodeNP_ (long double, __expl, __x, __exp_code) # endif # endif /* __FAST_MATH__ */ # ifdef __FAST_MATH__ # if !__GNUC_PREREQ (3,3) __inline_mathopNP (sqrt, "fsqrt") __inline_mathopNP_ (long double, __sqrtl, "fsqrt") # define __libc_sqrtl(n) __sqrtl (n) # else # define __libc_sqrtl(n) __builtin_sqrtl (n) # endif # endif # if __GNUC_PREREQ (2, 8) __inline_mathcodeNP_ (double, fabs, __x, return __builtin_fabs (__x)) # ifdef __USE_ISOC99 __inline_mathcodeNP_ (float, fabsf, __x, return __builtin_fabsf (__x)) __inline_mathcodeNP_ (long double, fabsl, __x, return __builtin_fabsl (__x)) # endif __inline_mathcodeNP_ (long double, __fabsl, __x, return __builtin_fabsl (__x)) # else __inline_mathop (fabs, "fabs") __inline_mathop_ (long double, __fabsl, "fabs") # endif __inline_mathcode_ (long double, __sgn1l, __x, \ __extension__ union { long double __xld; unsigned int __xi[3]; } __n = \ { __xld: __x }; \ __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; \ __n.__xi[1] = 0x80000000; \ __n.__xi[0] = 0; \ return __n.__xld) # ifdef __FAST_MATH__ /* The argument range of the inline version of sinhl is slightly reduced. */ __inline_mathcodeNP (sinh, __x, \ register long double __exm1 = __expm1l (__fabsl (__x)); \ return 0.5 * (__exm1 / (__exm1 + 1.0) + __exm1) * __sgn1l (__x)) __inline_mathcodeNP (cosh, __x, \ register long double __ex = __expl (__x); \ return 0.5 * (__ex + 1.0 / __ex)) __inline_mathcodeNP (tanh, __x, \ register long double __exm1 = __expm1l (-__fabsl (__x + __x)); \ return __exm1 / (__exm1 + 2.0) * __sgn1l (-__x)) # endif /* Optimized versions for some non-standardized functions. */ # ifdef __USE_ISOC99 # ifdef __FAST_MATH__ __inline_mathcodeNP (expm1, __x, __expm1_code) /* The argument range of the inline version of asinhl is slightly reduced. */ __inline_mathcodeNP (asinh, __x, \ register long double __y = __fabsl (__x); \ return (log1pl (__y * __y / (__libc_sqrtl (__y * __y + 1.0) + 1.0) + __y) \ * __sgn1l (__x))) __inline_mathcodeNP (acosh, __x, \ return logl (__x + __libc_sqrtl (__x - 1.0) * __libc_sqrtl (__x + 1.0))) __inline_mathcodeNP (atanh, __x, \ register long double __y = __fabsl (__x); \ return -0.5 * log1pl (-(__y + __y) / (1.0 + __y)) * __sgn1l (__x)) /* The argument range of the inline version of hypotl is slightly reduced. */ __inline_mathcodeNP2 (hypot, __x, __y, return __libc_sqrtl (__x * __x + __y * __y)) # endif # endif /* Undefine some of the large macros which are not used anymore. */ # ifdef __FAST_MATH__ # undef __expm1_code # undef __exp_code # endif /* __FAST_MATH__ */ # endif /* __NO_MATH_INLINES */ /* This code is used internally in the GNU libc. */ # ifdef __LIBC_INTERNAL_MATH_INLINES __inline_mathcode2_ (long double, __ieee754_atan2l, __y, __x, register long double __value; __asm __volatile__ ("fpatan\n\t" : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); return __value;) # endif #endif /* !__SSE2_MATH__ && !__x86_64__ */ PKZbits/fenvinline.hnu[/* This file provides inline versions of floating-pint environment handling functions. If there were any. */ #ifndef __NO_MATH_INLINES /* Here is where the code would go. */ #endif PKZ H&99 bits/select.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SELECT_H # error "Never use directly; include instead." #endif #include #if defined __GNUC__ && __GNUC__ >= 2 # if __WORDSIZE == 64 # define __FD_ZERO_STOS "stosq" # else # define __FD_ZERO_STOS "stosl" # endif # define __FD_ZERO(fdsp) \ do { \ int __d0, __d1; \ __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ : "=c" (__d0), "=D" (__d1) \ : "a" (0), "0" (sizeof (fd_set) \ / sizeof (__fd_mask)), \ "1" (&__FDS_BITS (fdsp)[0]) \ : "memory"); \ } while (0) #else /* ! GNU CC */ /* We don't use `memset' because this would require a prototype and the array isn't too big. */ # define __FD_ZERO(set) \ do { \ unsigned int __i; \ fd_set *__arr = (set); \ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ __FDS_BITS (__arr)[__i] = 0; \ } while (0) #endif /* GNU CC */ #define __FD_SET(d, set) \ ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) #define __FD_CLR(d, set) \ ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) #define __FD_ISSET(d, set) \ ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) PKZv "bits/types/cookie_io_functions_t.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __cookie_io_functions_t_defined #define __cookie_io_functions_t_defined 1 #include /* Functions to do I/O and file management for a stream. */ /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, size_t __nbytes); /* Write NBYTES bytes pointed to by BUF to COOKIE. Write all NBYTES bytes unless there is an error. Return number of bytes written. If there is an error, return 0 and do not write anything. If the file has been opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, size_t __nbytes); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), the current position (if W is SEEK_CUR), or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); /* Close COOKIE. */ typedef int cookie_close_function_t (void *__cookie); /* The structure with the cookie function pointers. The tag name of this struct is _IO_cookie_io_functions_t to preserve historic C++ mangled names for functions taking cookie_io_functions_t arguments. That name should not be used in new code. */ typedef struct _IO_cookie_io_functions_t { cookie_read_function_t *read; /* Read bytes. */ cookie_write_function_t *write; /* Write bytes. */ cookie_seek_function_t *seek; /* Seek/tell file position. */ cookie_close_function_t *close; /* Close file. */ } cookie_io_functions_t; #endif PKZhPbits/types/mbstate_t.hnu[#ifndef __mbstate_t_defined #define __mbstate_t_defined 1 #include typedef __mbstate_t mbstate_t; #endif PKZ%%bits/types/stack_t.hnu[/* Define stack_t. Linux version. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __stack_t_defined #define __stack_t_defined 1 #define __need_size_t #include /* Structure describing a signal stack. */ typedef struct { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; #endif PKZQ bits/types/locale_t.hnu[/* Definition of locale_t. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES_LOCALE_T_H #define _BITS_TYPES_LOCALE_T_H 1 #include typedef __locale_t locale_t; #endif /* bits/types/locale_t.h */ PKZR@  bits/types/struct_itimerspec.hnu[#ifndef __itimerspec_defined #define __itimerspec_defined 1 #include #include /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; #endif PKZ. */ #ifndef __error_t_defined # define __error_t_defined 1 typedef int error_t; #endif PKZ V$bits/types/sig_atomic_t.hnu[#ifndef __sig_atomic_t_defined #define __sig_atomic_t_defined 1 #include /* An integral type that can be modified atomically, without the possibility of a signal arriving in the middle of the operation. */ typedef __sig_atomic_t sig_atomic_t; #endif PKZq {{bits/types/__sigval_t.hnu[/* Define __sigval_t. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef ____sigval_t_defined #define ____sigval_t_defined /* Type for data associated with a signal. */ #ifdef __USE_POSIX199309 union sigval { int sival_int; void *sival_ptr; }; typedef union sigval __sigval_t; #else union __sigval { int __sival_int; void *__sival_ptr; }; typedef union __sigval __sigval_t; #endif #endif PKZA00bits/types/struct_sigstack.hnu[/* Define struct sigstack. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __sigstack_defined #define __sigstack_defined 1 /* Structure describing a signal stack (obsolete). */ struct sigstack { void *ss_sp; /* Signal stack pointer. */ int ss_onstack; /* Nonzero if executing on this stack. */ }; #endif PKZO[5gbits/types/struct_FILE.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __struct_FILE_defined #define __struct_FILE_defined 1 /* Caution: The contents of this file are not part of the official stdio.h API. However, much of it is part of the official *binary* interface, and therefore cannot be changed. */ #if defined _IO_USE_OLD_IO_FILE && !defined _LIBC # error "_IO_USE_OLD_IO_FILE should only be defined when building libc itself" #endif #if defined _IO_lock_t_defined && !defined _LIBC # error "_IO_lock_t_defined should only be defined when building libc itself" #endif #include struct _IO_FILE; struct _IO_marker; struct _IO_codecvt; struct _IO_wide_data; /* During the build of glibc itself, _IO_lock_t will already have been defined by internal headers. */ #ifndef _IO_lock_t_defined typedef void _IO_lock_t; #endif /* The tag name of this struct is _IO_FILE to preserve historic C++ mangled names for functions taking FILE* arguments. That name should not be used in new code. */ struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ /* The following pointers correspond to the C++ streambuf protocol. */ char *_IO_read_ptr; /* Current read pointer */ char *_IO_read_end; /* End of get area. */ char *_IO_read_base; /* Start of putback+get area. */ char *_IO_write_base; /* Start of put area. */ char *_IO_write_ptr; /* Current put pointer. */ char *_IO_write_end; /* End of put area. */ char *_IO_buf_base; /* Start of reserve area. */ char *_IO_buf_end; /* End of reserve area. */ /* The following fields are used to support backing up and undo. */ char *_IO_save_base; /* Pointer to start of non-current get area. */ char *_IO_backup_base; /* Pointer to first valid character of backup area */ char *_IO_save_end; /* Pointer to end of non-current get area. */ struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; /* This used to be _offset but it's too small. */ /* 1+column number of pbase(); 0 is unknown. */ unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; #ifdef _IO_USE_OLD_IO_FILE }; struct _IO_FILE_complete { struct _IO_FILE _file; #endif __off64_t _offset; /* Wide character stream stuff. */ struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t __pad5; int _mode; /* Make sure we don't get into trouble again. */ char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; /* These macros are used by bits/stdio.h and internal headers. */ #define __getc_unlocked_body(_fp) \ (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) \ ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) #define __putc_unlocked_body(_ch, _fp) \ (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \ ? __overflow (_fp, (unsigned char) (_ch)) \ : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) #define _IO_EOF_SEEN 0x0010 #define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ERR_SEEN 0x0020 #define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0) #define _IO_USER_LOCK 0x8000 /* Many more flag bits are defined internally. */ #endif PKZtnnbits/types/__FILE.hnu[#ifndef ____FILE_defined #define ____FILE_defined 1 struct _IO_FILE; typedef struct _IO_FILE __FILE; #endif PKZ4Fbits/types/struct_osockaddr.hnu[#ifndef __osockaddr_defined #define __osockaddr_defined 1 /* This is the 4.3 BSD `struct sockaddr' format, which is used as wire format in the grotty old 4.3 `talk' protocol. */ struct osockaddr { unsigned short int sa_family; unsigned char sa_data[14]; }; #endif PKZ bits/types/__fpos64_t.hnu[#ifndef _____fpos64_t_defined #define _____fpos64_t_defined 1 #include #include /* The tag name of this struct is _G_fpos64_t to preserve historic C++ mangled names for functions taking fpos_t and/or fpos64_t arguments. That name should not be used in new code. */ typedef struct _G_fpos64_t { __off64_t __pos; __mbstate_t __state; } __fpos64_t; #endif PKZ΅8WWbits/types/sigval_t.hnu[#ifndef __sigval_t_defined #define __sigval_t_defined #include /* To avoid sigval_t (not a standard type name) having C++ name mangling depending on whether the selected standard includes union sigval, it should not be defined at all when using a standard for which the sigval name is not reserved; in that case, headers should not include and should use only the internal __sigval_t name. */ #ifndef __USE_POSIX199309 # error "sigval_t defined for standard not including union sigval" #endif typedef __sigval_t sigval_t; #endif PKZء6ߏbits/types/clock_t.hnu[#ifndef __clock_t_defined #define __clock_t_defined 1 #include /* Returned by `clock'. */ typedef __clock_t clock_t; #endif PKZD@~))bits/types/struct_iovec.hnu[/* Define struct iovec. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __iovec_defined #define __iovec_defined 1 #define __need_size_t #include /* Structure for scatter/gather I/O. */ struct iovec { void *iov_base; /* Pointer to data. */ size_t iov_len; /* Length of data. */ }; #endif PKZb}ǟbits/types/timer_t.hnu[#ifndef __timer_t_defined #define __timer_t_defined 1 #include /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif PKZ'+mbits/types/clockid_t.hnu[#ifndef __clockid_t_defined #define __clockid_t_defined 1 #include /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif PKZ>bits/types/sigset_t.hnu[#ifndef __sigset_t_defined #define __sigset_t_defined 1 #include /* A set of signals to be blocked, unblocked, or waited for. */ typedef __sigset_t sigset_t; #endif PKZVbits/types/res_state.hnu[#ifndef __res_state_defined #define __res_state_defined 1 #include #include /* res_state: the global state used by the resolver stub. */ #define MAXNS 3 /* max # name servers we'll track */ #define MAXDFLSRCH 3 /* # default domain levels to try */ #define MAXDNSRCH 6 /* max # domains in search path */ #define MAXRESOLVSORT 10 /* number of net to sort on */ struct __res_state { int retrans; /* retransmition time interval */ int retry; /* number of times to retransmit */ unsigned long options; /* option flags - see below. */ int nscount; /* number of name servers */ struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ unsigned short id; /* current message id */ /* 2 byte hole here. */ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ char defdname[256]; /* default domain (deprecated) */ unsigned long pfcode; /* RES_PRF_ flags - see below. */ unsigned ndots:4; /* threshold for initial abs. query */ unsigned nsort:4; /* number of elements in sort_list[] */ unsigned ipv6_unavail:1; /* connecting to IPv6 server failed */ unsigned unused:23; struct { struct in_addr addr; uint32_t mask; } sort_list[MAXRESOLVSORT]; /* 4 byte hole here on 64-bit architectures. */ void * __glibc_unused_qhook; void * __glibc_unused_rhook; int res_h_errno; /* last one set for this context */ int _vcsock; /* PRIVATE: for res_send VC i/o */ unsigned int _flags; /* PRIVATE: see below */ /* 4 byte hole here on 64-bit architectures. */ union { char pad[52]; /* On an i386 this means 512b total. */ struct { uint16_t nscount; uint16_t nsmap[MAXNS]; int nssocks[MAXNS]; uint16_t nscount6; uint16_t nsinit; struct sockaddr_in6 *nsaddrs[MAXNS]; #ifdef _LIBC unsigned long long int __glibc_extension_index __attribute__((packed)); #else unsigned int __glibc_reserved[2]; #endif } _ext; } _u; }; typedef struct __res_state *res_state; #endif /* __res_state_defined */ PKZyhbits/types/sigevent_t.hnu[#ifndef __sigevent_t_defined #define __sigevent_t_defined 1 #include #include #include #define __SIGEV_MAX_SIZE 64 #if __WORDSIZE == 64 # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) #else # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) #endif /* Forward declaration. */ #ifndef __have_pthread_attr_t typedef union pthread_attr_t pthread_attr_t; # define __have_pthread_attr_t 1 #endif /* Structure to transport application-defined values with signals. */ typedef struct sigevent { __sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[__SIGEV_PAD_SIZE]; /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the thread to receive the signal. */ __pid_t _tid; struct { void (*_function) (__sigval_t); /* Function to start. */ pthread_attr_t *_attribute; /* Thread attributes. */ } _sigev_thread; } _sigev_un; } sigevent_t; /* POSIX names to access some of the members. */ #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute #endif PKZ,ߴbits/types/FILE.hnu[#ifndef __FILE_defined #define __FILE_defined 1 struct _IO_FILE; /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; #endif PKZB;bits/types/struct_timeval.hnu[#ifndef __timeval_defined #define __timeval_defined 1 #include /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; #endif PKZ|hhbits/types/struct_statx.hnu[/* Definition of the generic version of struct statx. Copyright (C) 2018-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_STAT_H # error Never include directly, include instead. #endif #ifndef __statx_defined #define __statx_defined 1 /* Warning: The kernel may add additional fields to this struct in the future. Only use this struct for calling the statx function, not for storing data. (Expansion will be controlled by the mask argument of the statx function.) */ struct statx { __uint32_t stx_mask; __uint32_t stx_blksize; __uint64_t stx_attributes; __uint32_t stx_nlink; __uint32_t stx_uid; __uint32_t stx_gid; __uint16_t stx_mode; __uint16_t __statx_pad1[1]; __uint64_t stx_ino; __uint64_t stx_size; __uint64_t stx_blocks; __uint64_t stx_attributes_mask; struct statx_timestamp stx_atime; struct statx_timestamp stx_btime; struct statx_timestamp stx_ctime; struct statx_timestamp stx_mtime; __uint32_t stx_rdev_major; __uint32_t stx_rdev_minor; __uint32_t stx_dev_major; __uint32_t stx_dev_minor; __uint64_t __statx_pad2[14]; }; #endif /* __statx_defined */ PKZV/cbits/types/struct_tm.hnu[#ifndef __struct_tm_defined #define __struct_tm_defined 1 #include /* ISO C `broken-down time' structure. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ # ifdef __USE_MISC long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ # else long int __tm_gmtoff; /* Seconds east of UTC. */ const char *__tm_zone; /* Timezone abbreviation. */ # endif }; #endif PKZ9xxbits/types/struct_timespec.hnu[/* NB: Include guard matches what uses. */ #ifndef _STRUCT_TIMESPEC #define _STRUCT_TIMESPEC 1 #include /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; #endif PKZA]bits/types/time_t.hnu[#ifndef __time_t_defined #define __time_t_defined 1 #include /* Returned by `time'. */ typedef __time_t time_t; #endif PKZÈ#bits/types/struct_statx_timestamp.hnu[/* Definition of the generic version of struct statx_timestamp. Copyright (C) 2018-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_STAT_H # error Never include directly, include instead. #endif #ifndef __statx_timestamp_defined #define __statx_timestamp_defined 1 struct statx_timestamp { __int64_t tv_sec; __uint32_t tv_nsec; __int32_t __statx_timestamp_pad1[1]; }; #endif /* __statx_timestamp_defined */ PKZEbits/types/__locale_t.hnu[/* Definition of struct __locale_struct and __locale_t. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES___LOCALE_T_H #define _BITS_TYPES___LOCALE_T_H 1 /* POSIX.1-2008: the locale_t type, representing a locale context (implementation-namespace version). This type should be treated as opaque by applications; some details are exposed for the sake of efficiency in e.g. ctype functions. */ struct __locale_struct { /* Note: LC_ALL is not a valid index into this array. */ struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */ /* To increase the speed of this solution we add some special members. */ const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; }; typedef struct __locale_struct *__locale_t; #endif /* bits/types/__locale_t.h */ PKZt@..bits/types/siginfo_t.hnu[#ifndef __siginfo_t_defined #define __siginfo_t_defined 1 #include #include #include #define __SI_MAX_SIZE 128 #if __WORDSIZE == 64 # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) #else # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) #endif /* Some fields of siginfo_t have architecture-specific variations. */ #include #ifndef __SI_ALIGNMENT # define __SI_ALIGNMENT /* nothing */ #endif #ifndef __SI_BAND_TYPE # define __SI_BAND_TYPE long int #endif #ifndef __SI_CLOCK_T # define __SI_CLOCK_T __clock_t #endif #ifndef __SI_ERRNO_THEN_CODE # define __SI_ERRNO_THEN_CODE 1 #endif #ifndef __SI_HAVE_SIGSYS # define __SI_HAVE_SIGSYS 1 #endif #ifndef __SI_SIGFAULT_ADDL # define __SI_SIGFAULT_ADDL /* nothing */ #endif typedef struct { int si_signo; /* Signal number. */ #if __SI_ERRNO_THEN_CODE int si_errno; /* If non-zero, an errno value associated with this signal, as defined in . */ int si_code; /* Signal code. */ #else int si_code; int si_errno; #endif #if __WORDSIZE == 64 int __pad0; /* Explicit padding. */ #endif union { int _pad[__SI_PAD_SIZE]; /* kill(). */ struct { __pid_t si_pid; /* Sending process ID. */ __uid_t si_uid; /* Real user ID of sending process. */ } _kill; /* POSIX.1b timers. */ struct { int si_tid; /* Timer ID. */ int si_overrun; /* Overrun count. */ __sigval_t si_sigval; /* Signal value. */ } _timer; /* POSIX.1b signals. */ struct { __pid_t si_pid; /* Sending process ID. */ __uid_t si_uid; /* Real user ID of sending process. */ __sigval_t si_sigval; /* Signal value. */ } _rt; /* SIGCHLD. */ struct { __pid_t si_pid; /* Which child. */ __uid_t si_uid; /* Real user ID of sending process. */ int si_status; /* Exit value or signal. */ __SI_CLOCK_T si_utime; __SI_CLOCK_T si_stime; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ struct { void *si_addr; /* Faulting insn/memory ref. */ __SI_SIGFAULT_ADDL short int si_addr_lsb; /* Valid LSB of the reported address. */ union { /* used when si_code=SEGV_BNDERR */ struct { void *_lower; void *_upper; } _addr_bnd; /* used when si_code=SEGV_PKUERR */ __uint32_t _pkey; } _bounds; } _sigfault; /* SIGPOLL. */ struct { long int si_band; /* Band event for SIGPOLL. */ int si_fd; } _sigpoll; /* SIGSYS. */ #if __SI_HAVE_SIGSYS struct { void *_call_addr; /* Calling user insn. */ int _syscall; /* Triggering system call number. */ unsigned int _arch; /* AUDIT_ARCH_* of syscall. */ } _sigsys; #endif } _sifields; } siginfo_t __SI_ALIGNMENT; /* X/Open requires some more fields with fixed names. */ #define si_pid _sifields._kill.si_pid #define si_uid _sifields._kill.si_uid #define si_timerid _sifields._timer.si_tid #define si_overrun _sifields._timer.si_overrun #define si_status _sifields._sigchld.si_status #define si_utime _sifields._sigchld.si_utime #define si_stime _sifields._sigchld.si_stime #define si_value _sifields._rt.si_sigval #define si_int _sifields._rt.si_sigval.sival_int #define si_ptr _sifields._rt.si_sigval.sival_ptr #define si_addr _sifields._sigfault.si_addr #define si_addr_lsb _sifields._sigfault.si_addr_lsb #define si_lower _sifields._sigfault._bounds._addr_bnd._lower #define si_upper _sifields._sigfault._bounds._addr_bnd._upper #define si_pkey _sifields._sigfault._bounds._pkey #define si_band _sifields._sigpoll.si_band #define si_fd _sifields._sigpoll.si_fd #if __SI_HAVE_SIGSYS # define si_call_addr _sifields._sigsys._call_addr # define si_syscall _sifields._sigsys._syscall # define si_arch _sifields._sigsys._arch #endif #endif PKZJ00bits/types/struct_sched_param.hnu[/* Sched parameter structure. Generic version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES_STRUCT_SCHED_PARAM #define _BITS_TYPES_STRUCT_SCHED_PARAM 1 /* Data structure to describe a process' schedulability. */ struct sched_param { int sched_priority; }; #endif /* bits/types/struct_sched_param.h */ PKZ!}}bits/types/__fpos_t.hnu[#ifndef _____fpos_t_defined #define _____fpos_t_defined 1 #include #include /* The tag name of this struct is _G_fpos_t to preserve historic C++ mangled names for functions taking fpos_t arguments. That name should not be used in new code. */ typedef struct _G_fpos_t { __off_t __pos; __mbstate_t __state; } __fpos_t; #endif PKZ'bits/types/wint_t.hnu[#ifndef __wint_t_defined #define __wint_t_defined 1 /* Some versions of stddef.h provide wint_t, even though neither the C nor C++ standards, nor POSIX, specifies this. We assume that stddef.h will define the macro _WINT_T if and only if it provides wint_t, and conversely, that it will avoid providing wint_t if _WINT_T is already defined. */ #ifndef _WINT_T #define _WINT_T 1 /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ #ifndef __WINT_TYPE__ # define __WINT_TYPE__ unsigned int #endif typedef __WINT_TYPE__ wint_t; #endif /* _WINT_T */ #endif /* bits/types/wint_t.h */ PKZ<44bits/types/__mbstate_t.hnu[#ifndef ____mbstate_t_defined #define ____mbstate_t_defined 1 /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ #ifndef __WINT_TYPE__ # define __WINT_TYPE__ unsigned int #endif /* Conversion state information. */ typedef struct { int __count; union { __WINT_TYPE__ __wch; char __wchb[4]; } __value; /* Value so far. */ } __mbstate_t; #endif PKZqؠbits/types/__sigset_t.hnu[#ifndef ____sigset_t_defined #define ____sigset_t_defined #define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[_SIGSET_NWORDS]; } __sigset_t; #endif PKZhbits/types/struct_rusage.hnu[/* Define struct rusage. Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __rusage_defined #define __rusage_defined 1 #include #include /* Structure which says how much of each resource has been used. */ /* The purpose of all the unions is to have the kernel-compatible layout while keeping the API type as 'long int', and among machines where __syscall_slong_t is not 'long int', this only does the right thing for little-endian ones, like x32. */ struct rusage { /* Total amount of user time used. */ struct timeval ru_utime; /* Total amount of system time used. */ struct timeval ru_stime; /* Maximum resident set size (in kilobytes). */ __extension__ union { long int ru_maxrss; __syscall_slong_t __ru_maxrss_word; }; /* Amount of sharing of text segment memory with other processes (kilobyte-seconds). */ /* Maximum resident set size (in kilobytes). */ __extension__ union { long int ru_ixrss; __syscall_slong_t __ru_ixrss_word; }; /* Amount of data segment memory used (kilobyte-seconds). */ __extension__ union { long int ru_idrss; __syscall_slong_t __ru_idrss_word; }; /* Amount of stack memory used (kilobyte-seconds). */ __extension__ union { long int ru_isrss; __syscall_slong_t __ru_isrss_word; }; /* Number of soft page faults (i.e. those serviced by reclaiming a page from the list of pages awaiting reallocation. */ __extension__ union { long int ru_minflt; __syscall_slong_t __ru_minflt_word; }; /* Number of hard page faults (i.e. those that required I/O). */ __extension__ union { long int ru_majflt; __syscall_slong_t __ru_majflt_word; }; /* Number of times a process was swapped out of physical memory. */ __extension__ union { long int ru_nswap; __syscall_slong_t __ru_nswap_word; }; /* Number of input operations via the file system. Note: This and `ru_oublock' do not include operations with the cache. */ __extension__ union { long int ru_inblock; __syscall_slong_t __ru_inblock_word; }; /* Number of output operations via the file system. */ __extension__ union { long int ru_oublock; __syscall_slong_t __ru_oublock_word; }; /* Number of IPC messages sent. */ __extension__ union { long int ru_msgsnd; __syscall_slong_t __ru_msgsnd_word; }; /* Number of IPC messages received. */ __extension__ union { long int ru_msgrcv; __syscall_slong_t __ru_msgrcv_word; }; /* Number of signals delivered. */ __extension__ union { long int ru_nsignals; __syscall_slong_t __ru_nsignals_word; }; /* Number of voluntary context switches, i.e. because the process gave up the process before it had to (usually to wait for some resource to be available). */ __extension__ union { long int ru_nvcsw; __syscall_slong_t __ru_nvcsw_word; }; /* Number of involuntary context switches, i.e. a higher priority process became runnable or the current process used up its time slice. */ __extension__ union { long int ru_nivcsw; __syscall_slong_t __ru_nivcsw_word; }; }; #endif PKZj1 bits/types.hnu[/* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #ifndef _BITS_TYPES_H #define _BITS_TYPES_H 1 #include #include /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; /* Fixed-size types, underlying types depend on word size and compiler. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; #if __WORDSIZE == 64 typedef signed long int __int64_t; typedef unsigned long int __uint64_t; #else __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; #endif /* Smallest types with at least a given width. */ typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; /* quad_t is also 64 bits. */ #if __WORDSIZE == 64 typedef long int __quad_t; typedef unsigned long int __u_quad_t; #else __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; #endif /* Largest integral types. */ #if __WORDSIZE == 64 typedef long int __intmax_t; typedef unsigned long int __uintmax_t; #else __extension__ typedef long long int __intmax_t; __extension__ typedef unsigned long long int __uintmax_t; #endif /* The machine-dependent file defines __*_T_TYPE macros for each of the OS types we define below. The definitions of those macros must use the following macros for underlying types. We define __S_TYPE and __U_TYPE for the signed and unsigned variants of each of the following integer types on this machine. 16 -- "natural" 16-bit type (always short) 32 -- "natural" 32-bit type (always int) 64 -- "natural" 64-bit type (long or long long) LONG32 -- 32-bit type, traditionally long QUAD -- 64-bit type, traditionally long long WORD -- natural type of __WORDSIZE bits (int or long) LONGWORD -- type of __WORDSIZE bits, traditionally long We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the conventional uses of `long' or `long long' type modifiers match the types we define, even when a less-adorned type would be the same size. This matters for (somewhat) portably writing printf/scanf formats for these types, where using the appropriate l or ll format modifiers can make the typedefs and the formats match up across all GNU platforms. If we used `long' when it's 64 bits where `long long' is expected, then the compiler would warn about the formats not matching the argument types, and the programmer changing them to shut up the compiler would break the program's portability. Here we assume what is presently the case in all the GCC configurations we support: long long is always 64 bits, long is always word/address size, and int is always 32 bits. */ #define __S16_TYPE short int #define __U16_TYPE unsigned short int #define __S32_TYPE int #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #if __WORDSIZE == 32 # define __SQUAD_TYPE __int64_t # define __UQUAD_TYPE __uint64_t # define __SWORD_TYPE int # define __UWORD_TYPE unsigned int # define __SLONG32_TYPE long int # define __ULONG32_TYPE unsigned long int # define __S64_TYPE __int64_t # define __U64_TYPE __uint64_t /* We want __extension__ before typedef's that use nonstandard base types such as `long long' in C89 mode. */ # define __STD_TYPE __extension__ typedef #elif __WORDSIZE == 64 # define __SQUAD_TYPE long int # define __UQUAD_TYPE unsigned long int # define __SWORD_TYPE long int # define __UWORD_TYPE unsigned long int # define __SLONG32_TYPE int # define __ULONG32_TYPE unsigned int # define __S64_TYPE long int # define __U64_TYPE unsigned long int /* No need to mark the typedef with __extension__. */ # define __STD_TYPE typedef #else # error #endif #include /* Defines __*_T_TYPE macros. */ __STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */ __STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */ __STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */ __STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */ __STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/ __STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */ __STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */ __STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */ __STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */ __STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */ __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */ __STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */ __STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */ __STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ __STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */ __STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */ /* Clock ID used in clock and timer functions. */ __STD_TYPE __CLOCKID_T_TYPE __clockid_t; /* Timer ID returned by `timer_create'. */ __STD_TYPE __TIMER_T_TYPE __timer_t; /* Type to represent block size. */ __STD_TYPE __BLKSIZE_T_TYPE __blksize_t; /* Types from the Large File Support interface. */ /* Type to count number of disk blocks. */ __STD_TYPE __BLKCNT_T_TYPE __blkcnt_t; __STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t; /* Type to count file system blocks. */ __STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t; __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; /* Type to count file system nodes. */ __STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t; __STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t; /* Type of miscellaneous file system fields. */ __STD_TYPE __FSWORD_T_TYPE __fsword_t; __STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */ /* Signed long type used in system calls. */ __STD_TYPE __SYSCALL_SLONG_TYPE __syscall_slong_t; /* Unsigned long type used in system calls. */ __STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t; /* These few don't really vary by system, they always correspond to one of the other defined types. */ typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ typedef char *__caddr_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ __STD_TYPE __SWORD_TYPE __intptr_t; /* Duplicate info from sys/socket.h. */ __STD_TYPE __U32_TYPE __socklen_t; /* C99: An integer type that can be accessed as an atomic entity, even in the presence of asynchronous interrupts. It is not currently necessary for this to be machine-specific. */ typedef int __sig_atomic_t; #undef __STD_TYPE #endif /* bits/types.h */ PKZLd v v bits/sigaction.hnu[/* The proper definitions for Linux's sigaction. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SIGACTION_H #define _BITS_SIGACTION_H 1 #ifndef _SIGNAL_H # error "Never include directly; use instead." #endif /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { /* Signal handler. */ #if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED union { /* Used if SA_SIGINFO is not set. */ __sighandler_t sa_handler; /* Used if SA_SIGINFO is set. */ void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; # define sa_handler __sigaction_handler.sa_handler # define sa_sigaction __sigaction_handler.sa_sigaction #else __sighandler_t sa_handler; #endif /* Additional set of signals to be blocked. */ __sigset_t sa_mask; /* Special flags. */ int sa_flags; /* Restore handler. */ void (*sa_restorer) (void); }; /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ #define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ #define SA_SIGINFO 4 /* Invoke signal-catching function with three arguments instead of one. */ #if defined __USE_XOPEN_EXTENDED || defined __USE_MISC # define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 # define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ # define SA_NODEFER 0x40000000 /* Don't automatically block the signal when its handler is being executed. */ # define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ #endif #ifdef __USE_MISC # define SA_INTERRUPT 0x20000000 /* Historical no-op. */ /* Some aliases for the SA_ constants. */ # define SA_NOMASK SA_NODEFER # define SA_ONESHOT SA_RESETHAND # define SA_STACK SA_ONSTACK #endif /* Values for the HOW argument to `sigprocmask'. */ #define SIG_BLOCK 0 /* Block signals. */ #define SIG_UNBLOCK 1 /* Unblock signals. */ #define SIG_SETMASK 2 /* Set the set of blocked signals. */ #endif PKZR@ bits/shm.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SHM_H # error "Never include directly; use instead." #endif #include /* Permission flag for shmget. */ #define SHM_R 0400 /* or S_IRUGO from */ #define SHM_W 0200 /* or S_IWUGO from */ /* Flags for `shmat'. */ #define SHM_RDONLY 010000 /* attach read-only else read-write */ #define SHM_RND 020000 /* round attach address to SHMLBA */ #define SHM_REMAP 040000 /* take-over region on attach */ #define SHM_EXEC 0100000 /* execution access */ /* Commands for `shmctl'. */ #define SHM_LOCK 11 /* lock segment (root only) */ #define SHM_UNLOCK 12 /* unlock segment (root only) */ __BEGIN_DECLS /* Segment low boundary address multiple. */ #define SHMLBA (__getpagesize ()) extern int __getpagesize (void) __THROW __attribute__ ((__const__)); /* Type to count number of attaches. */ typedef __syscall_ulong_t shmatt_t; /* Data structure describing a shared memory segment. */ struct shmid_ds { struct ipc_perm shm_perm; /* operation permission struct */ size_t shm_segsz; /* size of segment in bytes */ __time_t shm_atime; /* time of last shmat() */ #ifndef __x86_64__ unsigned long int __glibc_reserved1; #endif __time_t shm_dtime; /* time of last shmdt() */ #ifndef __x86_64__ unsigned long int __glibc_reserved2; #endif __time_t shm_ctime; /* time of last change by shmctl() */ #ifndef __x86_64__ unsigned long int __glibc_reserved3; #endif __pid_t shm_cpid; /* pid of creator */ __pid_t shm_lpid; /* pid of last shmop */ shmatt_t shm_nattch; /* number of current attaches */ __syscall_ulong_t __glibc_reserved4; __syscall_ulong_t __glibc_reserved5; }; #ifdef __USE_MISC /* ipcs ctl commands */ # define SHM_STAT 13 # define SHM_INFO 14 # define SHM_STAT_ANY 15 /* shm_mode upper byte flags */ # define SHM_DEST 01000 /* segment will be destroyed on last detach */ # define SHM_LOCKED 02000 /* segment will not be swapped */ # define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */ # define SHM_NORESERVE 010000 /* don't check for reservations */ struct shminfo { __syscall_ulong_t shmmax; __syscall_ulong_t shmmin; __syscall_ulong_t shmmni; __syscall_ulong_t shmseg; __syscall_ulong_t shmall; __syscall_ulong_t __glibc_reserved1; __syscall_ulong_t __glibc_reserved2; __syscall_ulong_t __glibc_reserved3; __syscall_ulong_t __glibc_reserved4; }; struct shm_info { int used_ids; __syscall_ulong_t shm_tot; /* total allocated shm */ __syscall_ulong_t shm_rss; /* total resident shm */ __syscall_ulong_t shm_swp; /* total swapped shm */ __syscall_ulong_t swap_attempts; __syscall_ulong_t swap_successes; }; #endif /* __USE_MISC */ __END_DECLS PKZ)c; bits/sched.hnu[/* Definitions of constants and data structure for POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SCHED_H #define _BITS_SCHED_H 1 #ifndef _SCHED_H # error "Never include directly; use instead." #endif /* Scheduling algorithms. */ #define SCHED_OTHER 0 #define SCHED_FIFO 1 #define SCHED_RR 2 #ifdef __USE_GNU # define SCHED_BATCH 3 # define SCHED_ISO 4 # define SCHED_IDLE 5 # define SCHED_DEADLINE 6 # define SCHED_RESET_ON_FORK 0x40000000 #endif #ifdef __USE_GNU /* Cloning flags. */ # define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ # define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ # define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ # define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ # define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ # define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ # define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to wake it up on mm_release. */ # define CLONE_PARENT 0x00008000 /* Set if we want to have the same parent as the cloner. */ # define CLONE_THREAD 0x00010000 /* Set to add to same thread group. */ # define CLONE_NEWNS 0x00020000 /* Set to create new namespace. */ # define CLONE_SYSVSEM 0x00040000 /* Set to shared SVID SEM_UNDO semantics. */ # define CLONE_SETTLS 0x00080000 /* Set TLS info. */ # define CLONE_PARENT_SETTID 0x00100000 /* Store TID in userlevel buffer before MM copy. */ # define CLONE_CHILD_CLEARTID 0x00200000 /* Register exit futex and memory location to clear. */ # define CLONE_DETACHED 0x00400000 /* Create clone detached. */ # define CLONE_UNTRACED 0x00800000 /* Set if the tracing process can't force CLONE_PTRACE on this clone. */ # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in the child. */ # define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace. */ # define CLONE_NEWUTS 0x04000000 /* New utsname group. */ # define CLONE_NEWIPC 0x08000000 /* New ipcs. */ # define CLONE_NEWUSER 0x10000000 /* New user namespace. */ # define CLONE_NEWPID 0x20000000 /* New pid namespace. */ # define CLONE_NEWNET 0x40000000 /* New network namespace. */ # define CLONE_IO 0x80000000 /* Clone I/O context. */ #endif #include __BEGIN_DECLS #ifdef __USE_GNU /* Clone current process. */ extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) __THROW; /* Unshare the specified resources. */ extern int unshare (int __flags) __THROW; /* Get index of currently used CPU. */ extern int sched_getcpu (void) __THROW; /* Switch process to namespace of type NSTYPE indicated by FD. */ extern int setns (int __fd, int __nstype) __THROW; #endif __END_DECLS #endif /* bits/sched.h */ PKZHbits/sigcontext.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." #endif #include #define FP_XSTATE_MAGIC1 0x46505853U #define FP_XSTATE_MAGIC2 0x46505845U #define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) struct _fpx_sw_bytes { __uint32_t magic1; __uint32_t extended_size; __uint64_t xstate_bv; __uint32_t xstate_size; __uint32_t __glibc_reserved1[7]; }; struct _fpreg { unsigned short significand[4]; unsigned short exponent; }; struct _fpxreg { unsigned short significand[4]; unsigned short exponent; unsigned short __glibc_reserved1[3]; }; struct _xmmreg { __uint32_t element[4]; }; #ifndef __x86_64__ struct _fpstate { /* Regular FPU environment. */ __uint32_t cw; __uint32_t sw; __uint32_t tag; __uint32_t ipoff; __uint32_t cssel; __uint32_t dataoff; __uint32_t datasel; struct _fpreg _st[8]; unsigned short status; unsigned short magic; /* FXSR FPU environment. */ __uint32_t _fxsr_env[6]; __uint32_t mxcsr; __uint32_t __glibc_reserved1; struct _fpxreg _fxsr_st[8]; struct _xmmreg _xmm[8]; __uint32_t __glibc_reserved2[56]; }; #ifndef sigcontext_struct /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but we need sigcontext. Some packages have come to rely on sigcontext_struct being defined on 32-bit x86, so define this for their benefit. */ # define sigcontext_struct sigcontext #endif #define X86_FXSR_MAGIC 0x0000 struct sigcontext { unsigned short gs, __gsh; unsigned short fs, __fsh; unsigned short es, __esh; unsigned short ds, __dsh; unsigned long edi; unsigned long esi; unsigned long ebp; unsigned long esp; unsigned long ebx; unsigned long edx; unsigned long ecx; unsigned long eax; unsigned long trapno; unsigned long err; unsigned long eip; unsigned short cs, __csh; unsigned long eflags; unsigned long esp_at_signal; unsigned short ss, __ssh; struct _fpstate * fpstate; unsigned long oldmask; unsigned long cr2; }; #else /* __x86_64__ */ struct _fpstate { /* FPU environment matching the 64-bit FXSAVE layout. */ __uint16_t cwd; __uint16_t swd; __uint16_t ftw; __uint16_t fop; __uint64_t rip; __uint64_t rdp; __uint32_t mxcsr; __uint32_t mxcr_mask; struct _fpxreg _st[8]; struct _xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; struct sigcontext { __uint64_t r8; __uint64_t r9; __uint64_t r10; __uint64_t r11; __uint64_t r12; __uint64_t r13; __uint64_t r14; __uint64_t r15; __uint64_t rdi; __uint64_t rsi; __uint64_t rbp; __uint64_t rbx; __uint64_t rdx; __uint64_t rax; __uint64_t rcx; __uint64_t rsp; __uint64_t rip; __uint64_t eflags; unsigned short cs; unsigned short gs; unsigned short fs; unsigned short __pad0; __uint64_t err; __uint64_t trapno; __uint64_t oldmask; __uint64_t cr2; __extension__ union { struct _fpstate * fpstate; __uint64_t __fpstate_word; }; __uint64_t __reserved1 [8]; }; #endif /* __x86_64__ */ struct _xsave_hdr { __uint64_t xstate_bv; __uint64_t __glibc_reserved1[2]; __uint64_t __glibc_reserved2[5]; }; struct _ymmh_state { __uint32_t ymmh_space[64]; }; struct _xstate { struct _fpstate fpstate; struct _xsave_hdr xstate_hdr; struct _ymmh_state ymmh; }; #endif /* _BITS_SIGCONTEXT_H */ PKZbits/statx-generic.hnu[/* Generic statx-related definitions and declarations. Copyright (C) 2018-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This interface is based on in Linux. */ #ifndef _SYS_STAT_H # error Never include directly, include instead. #endif #include #include #ifndef STATX_TYPE # define STATX_TYPE 0x0001U # define STATX_MODE 0x0002U # define STATX_NLINK 0x0004U # define STATX_UID 0x0008U # define STATX_GID 0x0010U # define STATX_ATIME 0x0020U # define STATX_MTIME 0x0040U # define STATX_CTIME 0x0080U # define STATX_INO 0x0100U # define STATX_SIZE 0x0200U # define STATX_BLOCKS 0x0400U # define STATX_BASIC_STATS 0x07ffU # define STATX_ALL 0x0fffU # define STATX_BTIME 0x0800U # define STATX__RESERVED 0x80000000U # define STATX_ATTR_COMPRESSED 0x0004 # define STATX_ATTR_IMMUTABLE 0x0010 # define STATX_ATTR_APPEND 0x0020 # define STATX_ATTR_NODUMP 0x0040 # define STATX_ATTR_ENCRYPTED 0x0800 # define STATX_ATTR_AUTOMOUNT 0x1000 #endif /* !STATX_TYPE */ __BEGIN_DECLS /* Fill *BUF with information about PATH in DIRFD. */ int statx (int __dirfd, const char *__restrict __path, int __flags, unsigned int __mask, struct statx *__restrict __buf) __THROW __nonnull ((2, 5)); __END_DECLS PKZNִ bits/sysmacros.hnu[/* Definitions of macros to access `dev_t' values. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SYSMACROS_H #define _BITS_SYSMACROS_H 1 #ifndef _SYS_SYSMACROS_H # error "Never include directly; use instead." #endif /* dev_t in glibc is a 64-bit quantity, with 32-bit major and minor numbers. Our default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major number and m is a hex digit of the minor number. This is downward compatible with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also downward compatible with the Linux kernel, which (as of 2016) uses 32-bit dev_t, encoded as mmmM MMmm. Systems that use an incompatible encoding for dev_t should override this file in the appropriate sysdeps subdirectory. */ #define __SYSMACROS_DECLARE_MAJOR(DECL_TEMPL) \ DECL_TEMPL(unsigned int, major, (__dev_t __dev)) #define __SYSMACROS_DEFINE_MAJOR(DECL_TEMPL) \ __SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \ { \ unsigned int __major; \ __major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); \ __major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); \ return __major; \ } #define __SYSMACROS_DECLARE_MINOR(DECL_TEMPL) \ DECL_TEMPL(unsigned int, minor, (__dev_t __dev)) #define __SYSMACROS_DEFINE_MINOR(DECL_TEMPL) \ __SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \ { \ unsigned int __minor; \ __minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); \ __minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); \ return __minor; \ } #define __SYSMACROS_DECLARE_MAKEDEV(DECL_TEMPL) \ DECL_TEMPL(__dev_t, makedev, (unsigned int __major, unsigned int __minor)) #define __SYSMACROS_DEFINE_MAKEDEV(DECL_TEMPL) \ __SYSMACROS_DECLARE_MAKEDEV (DECL_TEMPL) \ { \ __dev_t __dev; \ __dev = (((__dev_t) (__major & 0x00000fffu)) << 8); \ __dev |= (((__dev_t) (__major & 0xfffff000u)) << 32); \ __dev |= (((__dev_t) (__minor & 0x000000ffu)) << 0); \ __dev |= (((__dev_t) (__minor & 0xffffff00u)) << 12); \ return __dev; \ } #endif /* bits/sysmacros.h */ PKZs9bits/siginfo-consts-arch.hnu[/* Architecture-specific additional siginfo constants. */ #ifndef _BITS_SIGINFO_CONSTS_ARCH_H #define _BITS_SIGINFO_CONSTS_ARCH_H 1 /* This architecture has no additional siginfo constants. */ #endif PKZ'UUbits/siginfo-consts.hnu[/* siginfo constants. Linux version. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SIGINFO_CONSTS_H #define _BITS_SIGINFO_CONSTS_H 1 #ifndef _SIGNAL_H #error "Don't include directly; use instead." #endif /* Most of these constants are uniform across all architectures, but there is one exception. */ #include #ifndef __SI_ASYNCIO_AFTER_SIGIO # define __SI_ASYNCIO_AFTER_SIGIO 1 #endif /* Values for `si_code'. Positive values are reserved for kernel-generated signals. */ enum { SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ SI_TKILL = -6, /* Sent by tkill. */ SI_SIGIO, /* Sent by queued SIGIO. */ #if __SI_ASYNCIO_AFTER_SIGIO SI_ASYNCIO, /* Sent by AIO completion. */ SI_MESGQ, /* Sent by real time mesq state change. */ SI_TIMER, /* Sent by timer expiration. */ #else SI_MESGQ, SI_TIMER, SI_ASYNCIO, #endif SI_QUEUE, /* Sent by sigqueue. */ SI_USER, /* Sent by kill, sigsend. */ SI_KERNEL = 0x80 /* Send by kernel. */ #define SI_ASYNCNL SI_ASYNCNL #define SI_TKILL SI_TKILL #define SI_SIGIO SI_SIGIO #define SI_ASYNCIO SI_ASYNCIO #define SI_MESGQ SI_MESGQ #define SI_TIMER SI_TIMER #define SI_ASYNCIO SI_ASYNCIO #define SI_QUEUE SI_QUEUE #define SI_USER SI_USER #define SI_KERNEL SI_KERNEL }; # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* `si_code' values for SIGILL signal. */ enum { ILL_ILLOPC = 1, /* Illegal opcode. */ # define ILL_ILLOPC ILL_ILLOPC ILL_ILLOPN, /* Illegal operand. */ # define ILL_ILLOPN ILL_ILLOPN ILL_ILLADR, /* Illegal addressing mode. */ # define ILL_ILLADR ILL_ILLADR ILL_ILLTRP, /* Illegal trap. */ # define ILL_ILLTRP ILL_ILLTRP ILL_PRVOPC, /* Privileged opcode. */ # define ILL_PRVOPC ILL_PRVOPC ILL_PRVREG, /* Privileged register. */ # define ILL_PRVREG ILL_PRVREG ILL_COPROC, /* Coprocessor error. */ # define ILL_COPROC ILL_COPROC ILL_BADSTK /* Internal stack error. */ # define ILL_BADSTK ILL_BADSTK }; /* `si_code' values for SIGFPE signal. */ enum { FPE_INTDIV = 1, /* Integer divide by zero. */ # define FPE_INTDIV FPE_INTDIV FPE_INTOVF, /* Integer overflow. */ # define FPE_INTOVF FPE_INTOVF FPE_FLTDIV, /* Floating point divide by zero. */ # define FPE_FLTDIV FPE_FLTDIV FPE_FLTOVF, /* Floating point overflow. */ # define FPE_FLTOVF FPE_FLTOVF FPE_FLTUND, /* Floating point underflow. */ # define FPE_FLTUND FPE_FLTUND FPE_FLTRES, /* Floating point inexact result. */ # define FPE_FLTRES FPE_FLTRES FPE_FLTINV, /* Floating point invalid operation. */ # define FPE_FLTINV FPE_FLTINV FPE_FLTSUB /* Subscript out of range. */ # define FPE_FLTSUB FPE_FLTSUB }; /* `si_code' values for SIGSEGV signal. */ enum { SEGV_MAPERR = 1, /* Address not mapped to object. */ # define SEGV_MAPERR SEGV_MAPERR SEGV_ACCERR, /* Invalid permissions for mapped object. */ # define SEGV_ACCERR SEGV_ACCERR SEGV_BNDERR, /* Bounds checking failure. */ # define SEGV_BNDERR SEGV_BNDERR SEGV_PKUERR /* Protection key checking failure. */ # define SEGV_PKUERR SEGV_PKUERR }; /* `si_code' values for SIGBUS signal. */ enum { BUS_ADRALN = 1, /* Invalid address alignment. */ # define BUS_ADRALN BUS_ADRALN BUS_ADRERR, /* Non-existant physical address. */ # define BUS_ADRERR BUS_ADRERR BUS_OBJERR, /* Object specific hardware error. */ # define BUS_OBJERR BUS_OBJERR BUS_MCEERR_AR, /* Hardware memory error: action required. */ # define BUS_MCEERR_AR BUS_MCEERR_AR BUS_MCEERR_AO /* Hardware memory error: action optional. */ # define BUS_MCEERR_AO BUS_MCEERR_AO }; # endif # ifdef __USE_XOPEN_EXTENDED /* `si_code' values for SIGTRAP signal. */ enum { TRAP_BRKPT = 1, /* Process breakpoint. */ # define TRAP_BRKPT TRAP_BRKPT TRAP_TRACE /* Process trace trap. */ # define TRAP_TRACE TRAP_TRACE }; # endif # if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* `si_code' values for SIGCHLD signal. */ enum { CLD_EXITED = 1, /* Child has exited. */ # define CLD_EXITED CLD_EXITED CLD_KILLED, /* Child was killed. */ # define CLD_KILLED CLD_KILLED CLD_DUMPED, /* Child terminated abnormally. */ # define CLD_DUMPED CLD_DUMPED CLD_TRAPPED, /* Traced child has trapped. */ # define CLD_TRAPPED CLD_TRAPPED CLD_STOPPED, /* Child has stopped. */ # define CLD_STOPPED CLD_STOPPED CLD_CONTINUED /* Stopped child has continued. */ # define CLD_CONTINUED CLD_CONTINUED }; /* `si_code' values for SIGPOLL signal. */ enum { POLL_IN = 1, /* Data input available. */ # define POLL_IN POLL_IN POLL_OUT, /* Output buffers available. */ # define POLL_OUT POLL_OUT POLL_MSG, /* Input message available. */ # define POLL_MSG POLL_MSG POLL_ERR, /* I/O error. */ # define POLL_ERR POLL_ERR POLL_PRI, /* High priority input available. */ # define POLL_PRI POLL_PRI POLL_HUP /* Device disconnected. */ # define POLL_HUP POLL_HUP }; # endif /* Architectures might also add architecture-specific constants. These are all considered GNU extensions. */ #ifdef __USE_GNU # include #endif #endif PKZ\\bits/confname.hnu[/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UNISTD_H # error "Never use directly; include instead." #endif /* Values for the NAME argument to `pathconf' and `fpathconf'. */ enum { _PC_LINK_MAX, #define _PC_LINK_MAX _PC_LINK_MAX _PC_MAX_CANON, #define _PC_MAX_CANON _PC_MAX_CANON _PC_MAX_INPUT, #define _PC_MAX_INPUT _PC_MAX_INPUT _PC_NAME_MAX, #define _PC_NAME_MAX _PC_NAME_MAX _PC_PATH_MAX, #define _PC_PATH_MAX _PC_PATH_MAX _PC_PIPE_BUF, #define _PC_PIPE_BUF _PC_PIPE_BUF _PC_CHOWN_RESTRICTED, #define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED _PC_NO_TRUNC, #define _PC_NO_TRUNC _PC_NO_TRUNC _PC_VDISABLE, #define _PC_VDISABLE _PC_VDISABLE _PC_SYNC_IO, #define _PC_SYNC_IO _PC_SYNC_IO _PC_ASYNC_IO, #define _PC_ASYNC_IO _PC_ASYNC_IO _PC_PRIO_IO, #define _PC_PRIO_IO _PC_PRIO_IO _PC_SOCK_MAXBUF, #define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF _PC_FILESIZEBITS, #define _PC_FILESIZEBITS _PC_FILESIZEBITS _PC_REC_INCR_XFER_SIZE, #define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE _PC_REC_MAX_XFER_SIZE, #define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE _PC_REC_MIN_XFER_SIZE, #define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE _PC_REC_XFER_ALIGN, #define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN _PC_ALLOC_SIZE_MIN, #define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN _PC_SYMLINK_MAX, #define _PC_SYMLINK_MAX _PC_SYMLINK_MAX _PC_2_SYMLINKS #define _PC_2_SYMLINKS _PC_2_SYMLINKS }; /* Values for the argument to `sysconf'. */ enum { _SC_ARG_MAX, #define _SC_ARG_MAX _SC_ARG_MAX _SC_CHILD_MAX, #define _SC_CHILD_MAX _SC_CHILD_MAX _SC_CLK_TCK, #define _SC_CLK_TCK _SC_CLK_TCK _SC_NGROUPS_MAX, #define _SC_NGROUPS_MAX _SC_NGROUPS_MAX _SC_OPEN_MAX, #define _SC_OPEN_MAX _SC_OPEN_MAX _SC_STREAM_MAX, #define _SC_STREAM_MAX _SC_STREAM_MAX _SC_TZNAME_MAX, #define _SC_TZNAME_MAX _SC_TZNAME_MAX _SC_JOB_CONTROL, #define _SC_JOB_CONTROL _SC_JOB_CONTROL _SC_SAVED_IDS, #define _SC_SAVED_IDS _SC_SAVED_IDS _SC_REALTIME_SIGNALS, #define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS _SC_PRIORITY_SCHEDULING, #define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING _SC_TIMERS, #define _SC_TIMERS _SC_TIMERS _SC_ASYNCHRONOUS_IO, #define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO _SC_PRIORITIZED_IO, #define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO _SC_SYNCHRONIZED_IO, #define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO _SC_FSYNC, #define _SC_FSYNC _SC_FSYNC _SC_MAPPED_FILES, #define _SC_MAPPED_FILES _SC_MAPPED_FILES _SC_MEMLOCK, #define _SC_MEMLOCK _SC_MEMLOCK _SC_MEMLOCK_RANGE, #define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE _SC_MEMORY_PROTECTION, #define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION _SC_MESSAGE_PASSING, #define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING _SC_SEMAPHORES, #define _SC_SEMAPHORES _SC_SEMAPHORES _SC_SHARED_MEMORY_OBJECTS, #define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS _SC_AIO_LISTIO_MAX, #define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX _SC_AIO_MAX, #define _SC_AIO_MAX _SC_AIO_MAX _SC_AIO_PRIO_DELTA_MAX, #define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX _SC_DELAYTIMER_MAX, #define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX _SC_MQ_OPEN_MAX, #define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX _SC_MQ_PRIO_MAX, #define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX _SC_VERSION, #define _SC_VERSION _SC_VERSION _SC_PAGESIZE, #define _SC_PAGESIZE _SC_PAGESIZE #define _SC_PAGE_SIZE _SC_PAGESIZE _SC_RTSIG_MAX, #define _SC_RTSIG_MAX _SC_RTSIG_MAX _SC_SEM_NSEMS_MAX, #define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX _SC_SEM_VALUE_MAX, #define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX _SC_SIGQUEUE_MAX, #define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX _SC_TIMER_MAX, #define _SC_TIMER_MAX _SC_TIMER_MAX /* Values for the argument to `sysconf' corresponding to _POSIX2_* symbols. */ _SC_BC_BASE_MAX, #define _SC_BC_BASE_MAX _SC_BC_BASE_MAX _SC_BC_DIM_MAX, #define _SC_BC_DIM_MAX _SC_BC_DIM_MAX _SC_BC_SCALE_MAX, #define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX _SC_BC_STRING_MAX, #define _SC_BC_STRING_MAX _SC_BC_STRING_MAX _SC_COLL_WEIGHTS_MAX, #define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX _SC_EQUIV_CLASS_MAX, #define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX _SC_EXPR_NEST_MAX, #define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX _SC_LINE_MAX, #define _SC_LINE_MAX _SC_LINE_MAX _SC_RE_DUP_MAX, #define _SC_RE_DUP_MAX _SC_RE_DUP_MAX _SC_CHARCLASS_NAME_MAX, #define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX _SC_2_VERSION, #define _SC_2_VERSION _SC_2_VERSION _SC_2_C_BIND, #define _SC_2_C_BIND _SC_2_C_BIND _SC_2_C_DEV, #define _SC_2_C_DEV _SC_2_C_DEV _SC_2_FORT_DEV, #define _SC_2_FORT_DEV _SC_2_FORT_DEV _SC_2_FORT_RUN, #define _SC_2_FORT_RUN _SC_2_FORT_RUN _SC_2_SW_DEV, #define _SC_2_SW_DEV _SC_2_SW_DEV _SC_2_LOCALEDEF, #define _SC_2_LOCALEDEF _SC_2_LOCALEDEF _SC_PII, #define _SC_PII _SC_PII _SC_PII_XTI, #define _SC_PII_XTI _SC_PII_XTI _SC_PII_SOCKET, #define _SC_PII_SOCKET _SC_PII_SOCKET _SC_PII_INTERNET, #define _SC_PII_INTERNET _SC_PII_INTERNET _SC_PII_OSI, #define _SC_PII_OSI _SC_PII_OSI _SC_POLL, #define _SC_POLL _SC_POLL _SC_SELECT, #define _SC_SELECT _SC_SELECT _SC_UIO_MAXIOV, #define _SC_UIO_MAXIOV _SC_UIO_MAXIOV _SC_IOV_MAX = _SC_UIO_MAXIOV, #define _SC_IOV_MAX _SC_IOV_MAX _SC_PII_INTERNET_STREAM, #define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_DGRAM, #define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM _SC_PII_OSI_COTS, #define _SC_PII_OSI_COTS _SC_PII_OSI_COTS _SC_PII_OSI_CLTS, #define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS _SC_PII_OSI_M, #define _SC_PII_OSI_M _SC_PII_OSI_M _SC_T_IOV_MAX, #define _SC_T_IOV_MAX _SC_T_IOV_MAX /* Values according to POSIX 1003.1c (POSIX threads). */ _SC_THREADS, #define _SC_THREADS _SC_THREADS _SC_THREAD_SAFE_FUNCTIONS, #define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS _SC_GETGR_R_SIZE_MAX, #define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX, #define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX _SC_LOGIN_NAME_MAX, #define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX _SC_TTY_NAME_MAX, #define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX _SC_THREAD_DESTRUCTOR_ITERATIONS, #define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_KEYS_MAX, #define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX _SC_THREAD_STACK_MIN, #define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN _SC_THREAD_THREADS_MAX, #define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX _SC_THREAD_ATTR_STACKADDR, #define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKSIZE, #define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_PRIORITY_SCHEDULING, #define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIO_INHERIT, #define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_PROTECT, #define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT _SC_THREAD_PROCESS_SHARED, #define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED _SC_NPROCESSORS_CONF, #define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF _SC_NPROCESSORS_ONLN, #define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN _SC_PHYS_PAGES, #define _SC_PHYS_PAGES _SC_PHYS_PAGES _SC_AVPHYS_PAGES, #define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES _SC_ATEXIT_MAX, #define _SC_ATEXIT_MAX _SC_ATEXIT_MAX _SC_PASS_MAX, #define _SC_PASS_MAX _SC_PASS_MAX _SC_XOPEN_VERSION, #define _SC_XOPEN_VERSION _SC_XOPEN_VERSION _SC_XOPEN_XCU_VERSION, #define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION _SC_XOPEN_UNIX, #define _SC_XOPEN_UNIX _SC_XOPEN_UNIX _SC_XOPEN_CRYPT, #define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT _SC_XOPEN_ENH_I18N, #define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N _SC_XOPEN_SHM, #define _SC_XOPEN_SHM _SC_XOPEN_SHM _SC_2_CHAR_TERM, #define _SC_2_CHAR_TERM _SC_2_CHAR_TERM _SC_2_C_VERSION, #define _SC_2_C_VERSION _SC_2_C_VERSION _SC_2_UPE, #define _SC_2_UPE _SC_2_UPE _SC_XOPEN_XPG2, #define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 _SC_XOPEN_XPG3, #define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 _SC_XOPEN_XPG4, #define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 _SC_CHAR_BIT, #define _SC_CHAR_BIT _SC_CHAR_BIT _SC_CHAR_MAX, #define _SC_CHAR_MAX _SC_CHAR_MAX _SC_CHAR_MIN, #define _SC_CHAR_MIN _SC_CHAR_MIN _SC_INT_MAX, #define _SC_INT_MAX _SC_INT_MAX _SC_INT_MIN, #define _SC_INT_MIN _SC_INT_MIN _SC_LONG_BIT, #define _SC_LONG_BIT _SC_LONG_BIT _SC_WORD_BIT, #define _SC_WORD_BIT _SC_WORD_BIT _SC_MB_LEN_MAX, #define _SC_MB_LEN_MAX _SC_MB_LEN_MAX _SC_NZERO, #define _SC_NZERO _SC_NZERO _SC_SSIZE_MAX, #define _SC_SSIZE_MAX _SC_SSIZE_MAX _SC_SCHAR_MAX, #define _SC_SCHAR_MAX _SC_SCHAR_MAX _SC_SCHAR_MIN, #define _SC_SCHAR_MIN _SC_SCHAR_MIN _SC_SHRT_MAX, #define _SC_SHRT_MAX _SC_SHRT_MAX _SC_SHRT_MIN, #define _SC_SHRT_MIN _SC_SHRT_MIN _SC_UCHAR_MAX, #define _SC_UCHAR_MAX _SC_UCHAR_MAX _SC_UINT_MAX, #define _SC_UINT_MAX _SC_UINT_MAX _SC_ULONG_MAX, #define _SC_ULONG_MAX _SC_ULONG_MAX _SC_USHRT_MAX, #define _SC_USHRT_MAX _SC_USHRT_MAX _SC_NL_ARGMAX, #define _SC_NL_ARGMAX _SC_NL_ARGMAX _SC_NL_LANGMAX, #define _SC_NL_LANGMAX _SC_NL_LANGMAX _SC_NL_MSGMAX, #define _SC_NL_MSGMAX _SC_NL_MSGMAX _SC_NL_NMAX, #define _SC_NL_NMAX _SC_NL_NMAX _SC_NL_SETMAX, #define _SC_NL_SETMAX _SC_NL_SETMAX _SC_NL_TEXTMAX, #define _SC_NL_TEXTMAX _SC_NL_TEXTMAX _SC_XBS5_ILP32_OFF32, #define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFFBIG, #define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG _SC_XBS5_LP64_OFF64, #define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 _SC_XBS5_LPBIG_OFFBIG, #define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG _SC_XOPEN_LEGACY, #define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY _SC_XOPEN_REALTIME, #define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME_THREADS, #define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS _SC_ADVISORY_INFO, #define _SC_ADVISORY_INFO _SC_ADVISORY_INFO _SC_BARRIERS, #define _SC_BARRIERS _SC_BARRIERS _SC_BASE, #define _SC_BASE _SC_BASE _SC_C_LANG_SUPPORT, #define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT_R, #define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R _SC_CLOCK_SELECTION, #define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION _SC_CPUTIME, #define _SC_CPUTIME _SC_CPUTIME _SC_THREAD_CPUTIME, #define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME _SC_DEVICE_IO, #define _SC_DEVICE_IO _SC_DEVICE_IO _SC_DEVICE_SPECIFIC, #define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC_R, #define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R _SC_FD_MGMT, #define _SC_FD_MGMT _SC_FD_MGMT _SC_FIFO, #define _SC_FIFO _SC_FIFO _SC_PIPE, #define _SC_PIPE _SC_PIPE _SC_FILE_ATTRIBUTES, #define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES _SC_FILE_LOCKING, #define _SC_FILE_LOCKING _SC_FILE_LOCKING _SC_FILE_SYSTEM, #define _SC_FILE_SYSTEM _SC_FILE_SYSTEM _SC_MONOTONIC_CLOCK, #define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK _SC_MULTI_PROCESS, #define _SC_MULTI_PROCESS _SC_MULTI_PROCESS _SC_SINGLE_PROCESS, #define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS _SC_NETWORKING, #define _SC_NETWORKING _SC_NETWORKING _SC_READER_WRITER_LOCKS, #define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS _SC_SPIN_LOCKS, #define _SC_SPIN_LOCKS _SC_SPIN_LOCKS _SC_REGEXP, #define _SC_REGEXP _SC_REGEXP _SC_REGEX_VERSION, #define _SC_REGEX_VERSION _SC_REGEX_VERSION _SC_SHELL, #define _SC_SHELL _SC_SHELL _SC_SIGNALS, #define _SC_SIGNALS _SC_SIGNALS _SC_SPAWN, #define _SC_SPAWN _SC_SPAWN _SC_SPORADIC_SERVER, #define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER, #define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER _SC_SYSTEM_DATABASE, #define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE_R, #define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R _SC_TIMEOUTS, #define _SC_TIMEOUTS _SC_TIMEOUTS _SC_TYPED_MEMORY_OBJECTS, #define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS _SC_USER_GROUPS, #define _SC_USER_GROUPS _SC_USER_GROUPS _SC_USER_GROUPS_R, #define _SC_USER_GROUPS_R _SC_USER_GROUPS_R _SC_2_PBS, #define _SC_2_PBS _SC_2_PBS _SC_2_PBS_ACCOUNTING, #define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING _SC_2_PBS_LOCATE, #define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE _SC_2_PBS_MESSAGE, #define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE _SC_2_PBS_TRACK, #define _SC_2_PBS_TRACK _SC_2_PBS_TRACK _SC_SYMLOOP_MAX, #define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX _SC_STREAMS, #define _SC_STREAMS _SC_STREAMS _SC_2_PBS_CHECKPOINT, #define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT _SC_V6_ILP32_OFF32, #define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFFBIG, #define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG _SC_V6_LP64_OFF64, #define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 _SC_V6_LPBIG_OFFBIG, #define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG _SC_HOST_NAME_MAX, #define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX _SC_TRACE, #define _SC_TRACE _SC_TRACE _SC_TRACE_EVENT_FILTER, #define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER _SC_TRACE_INHERIT, #define _SC_TRACE_INHERIT _SC_TRACE_INHERIT _SC_TRACE_LOG, #define _SC_TRACE_LOG _SC_TRACE_LOG _SC_LEVEL1_ICACHE_SIZE, #define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_ASSOC, #define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_LINESIZE, #define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_DCACHE_SIZE, #define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_ASSOC, #define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_LINESIZE, #define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL2_CACHE_SIZE, #define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_ASSOC, #define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_LINESIZE, #define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL3_CACHE_SIZE, #define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_ASSOC, #define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_LINESIZE, #define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL4_CACHE_SIZE, #define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_ASSOC, #define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_LINESIZE, #define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE /* Leave room here, maybe we need a few more cache levels some day. */ _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, #define _SC_IPV6 _SC_IPV6 _SC_RAW_SOCKETS, #define _SC_RAW_SOCKETS _SC_RAW_SOCKETS _SC_V7_ILP32_OFF32, #define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFFBIG, #define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG _SC_V7_LP64_OFF64, #define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64 _SC_V7_LPBIG_OFFBIG, #define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG _SC_SS_REPL_MAX, #define _SC_SS_REPL_MAX _SC_SS_REPL_MAX _SC_TRACE_EVENT_NAME_MAX, #define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_NAME_MAX, #define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX _SC_TRACE_SYS_MAX, #define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX _SC_TRACE_USER_EVENT_MAX, #define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX _SC_XOPEN_STREAMS, #define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS _SC_THREAD_ROBUST_PRIO_INHERIT, #define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_PROTECT #define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT }; /* Values for the NAME argument to `confstr'. */ enum { _CS_PATH, /* The default search path. */ #define _CS_PATH _CS_PATH _CS_V6_WIDTH_RESTRICTED_ENVS, #define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS _CS_GNU_LIBC_VERSION, #define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION _CS_GNU_LIBPTHREAD_VERSION, #define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION _CS_V5_WIDTH_RESTRICTED_ENVS, #define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS, #define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS _CS_LFS_CFLAGS = 1000, #define _CS_LFS_CFLAGS _CS_LFS_CFLAGS _CS_LFS_LDFLAGS, #define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS _CS_LFS_LIBS, #define _CS_LFS_LIBS _CS_LFS_LIBS _CS_LFS_LINTFLAGS, #define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS _CS_LFS64_CFLAGS, #define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS _CS_LFS64_LDFLAGS, #define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS _CS_LFS64_LIBS, #define _CS_LFS64_LIBS _CS_LFS64_LIBS _CS_LFS64_LINTFLAGS, #define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, #define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS, #define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LIBS, #define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LINTFLAGS, #define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS, #define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS, #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LIBS, #define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_LP64_OFF64_CFLAGS, #define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS, #define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LIBS, #define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LINTFLAGS, #define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LIBS, #define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LIBS, #define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LIBS, #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS, #define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS, #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LIBS, #define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, #define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS, #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LIBS, #define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, #define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LIBS, #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, #define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS, #define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS, #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LIBS, #define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, #define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_V6_ENV, #define _CS_V6_ENV _CS_V6_ENV _CS_V7_ENV #define _CS_V7_ENV _CS_V7_ENV }; PKZQ0aa bits/signum.hnu[/* Signal number definitions. Linux version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SIGNUM_H #define _BITS_SIGNUM_H 1 #ifndef _SIGNAL_H #error "Never include directly; use instead." #endif #include /* Adjustments and additions to the signal number constants for most Linux systems. */ #define SIGSTKFLT 16 /* Stack fault (obsolete). */ #define SIGPWR 30 /* Power failure imminent. */ #undef SIGBUS #define SIGBUS 7 #undef SIGUSR1 #define SIGUSR1 10 #undef SIGUSR2 #define SIGUSR2 12 #undef SIGCHLD #define SIGCHLD 17 #undef SIGCONT #define SIGCONT 18 #undef SIGSTOP #define SIGSTOP 19 #undef SIGTSTP #define SIGTSTP 20 #undef SIGURG #define SIGURG 23 #undef SIGPOLL #define SIGPOLL 29 #undef SIGSYS #define SIGSYS 31 #undef __SIGRTMAX #define __SIGRTMAX 64 #endif /* included. */ PKZohbits/sigthread.hnu[/* Signal handling function for threaded programs. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ #ifndef _BITS_SIGTHREAD_H #define _BITS_SIGTHREAD_H 1 #if !defined _SIGNAL_H && !defined _PTHREAD_H # error "Never include this file directly. Use instead" #endif /* Functions for handling signals. */ #include /* Modify the signal mask for the calling thread. The arguments have the same meaning as for sigprocmask(2). */ extern int pthread_sigmask (int __how, const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__THROW; /* Send signal SIGNO to the given thread. */ extern int pthread_kill (pthread_t __threadid, int __signo) __THROW; #ifdef __USE_GNU /* Queue signal and data to a thread. */ extern int pthread_sigqueue (pthread_t __threadid, int __signo, const union sigval __value) __THROW; #endif #endif /* bits/sigthread.h */ PKZ;mp11bits/indirect-return.hnu[/* Definition of __INDIRECT_RETURN. x86 version. Copyright (C) 2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UCONTEXT_H # error "Never include directly; use instead." #endif /* On x86, swapcontext returns via indirect branch when the shadow stack is enabled. Define __INDIRECT_RETURN to indicate whether swapcontext returns via indirect branch. */ #if defined __CET__ && (__CET__ & 2) != 0 # if __glibc_has_attribute (__indirect_return__) # define __INDIRECT_RETURN __attribute__ ((__indirect_return__)) # else /* Newer compilers provide the indirect_return attribute, but without it we can use returns_twice to affect the optimizer in the same way and avoid unsafe optimizations. */ # define __INDIRECT_RETURN __attribute__ ((__returns_twice__)) # endif #else # define __INDIRECT_RETURN #endif PKZ6 bits/stdio.hnu[/* Optimizing macros and inline functions for stdio functions. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_STDIO_H #define _BITS_STDIO_H 1 #ifndef _STDIO_H # error "Never include directly; use instead." #endif #ifndef __extern_inline # define __STDIO_INLINE inline #else # define __STDIO_INLINE __extern_inline #endif #ifdef __USE_EXTERN_INLINES /* For -D_FORTIFY_SOURCE{,=2,=3} bits/stdio2.h will define a different inline. */ # if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function) /* Write formatted output to stdout from argument list ARG. */ __STDIO_INLINE int vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } # endif /* Read a character from stdin. */ __STDIO_INLINE int getchar (void) { return getc (stdin); } # ifdef __USE_MISC /* Faster version when locking is not necessary. */ __STDIO_INLINE int fgetc_unlocked (FILE *__fp) { return __getc_unlocked_body (__fp); } # endif /* misc */ # ifdef __USE_POSIX /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getc_unlocked (FILE *__fp) { return __getc_unlocked_body (__fp); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getchar_unlocked (void) { return __getc_unlocked_body (stdin); } # endif /* POSIX */ /* Write a character to stdout. */ __STDIO_INLINE int putchar (int __c) { return putc (__c, stdout); } # ifdef __USE_MISC /* Faster version when locking is not necessary. */ __STDIO_INLINE int fputc_unlocked (int __c, FILE *__stream) { return __putc_unlocked_body (__c, __stream); } # endif /* misc */ # ifdef __USE_POSIX /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putc_unlocked (int __c, FILE *__stream) { return __putc_unlocked_body (__c, __stream); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putchar_unlocked (int __c) { return __putc_unlocked_body (__c, stdout); } # endif /* POSIX */ # ifdef __USE_GNU /* Like `getdelim', but reads up to a newline. */ __STDIO_INLINE __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } # endif /* GNU */ # ifdef __USE_MISC /* Faster versions when locking is not required. */ __STDIO_INLINE int __NTH (feof_unlocked (FILE *__stream)) { return __feof_unlocked_body (__stream); } /* Faster versions when locking is not required. */ __STDIO_INLINE int __NTH (ferror_unlocked (FILE *__stream)) { return __ferror_unlocked_body (__stream); } # endif /* misc */ #endif /* Use extern inlines. */ #if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \ && !defined __cplusplus /* Perform some simple optimizations. */ # define fread_unlocked(ptr, size, n, stream) \ (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ && (size_t) (size) * (size_t) (n) <= 8 \ && (size_t) (size) != 0) \ ? ({ char *__ptr = (char *) (ptr); \ FILE *__stream = (stream); \ size_t __cnt; \ for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ { \ int __c = getc_unlocked (__stream); \ if (__c == EOF) \ break; \ *__ptr++ = __c; \ } \ ((size_t) (size) * (size_t) (n) - __cnt) \ / (size_t) (size); }) \ : (((__builtin_constant_p (size) && (size_t) (size) == 0) \ || (__builtin_constant_p (n) && (size_t) (n) == 0)) \ /* Evaluate all parameters once. */ \ ? ((void) (ptr), (void) (stream), (void) (size), \ (void) (n), (size_t) 0) \ : fread_unlocked (ptr, size, n, stream)))) # define fwrite_unlocked(ptr, size, n, stream) \ (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ && (size_t) (size) * (size_t) (n) <= 8 \ && (size_t) (size) != 0) \ ? ({ const char *__ptr = (const char *) (ptr); \ FILE *__stream = (stream); \ size_t __cnt; \ for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ if (putc_unlocked (*__ptr++, __stream) == EOF) \ break; \ ((size_t) (size) * (size_t) (n) - __cnt) \ / (size_t) (size); }) \ : (((__builtin_constant_p (size) && (size_t) (size) == 0) \ || (__builtin_constant_p (n) && (size_t) (n) == 0)) \ /* Evaluate all parameters once. */ \ ? ((void) (ptr), (void) (stream), (void) (size), \ (void) (n), (size_t) 0) \ : fwrite_unlocked (ptr, size, n, stream)))) #endif /* Define helper macro. */ #undef __STDIO_INLINE #endif /* bits/stdio.h. */ PKZww bits/statx.hnu[/* statx-related definitions and declarations. Linux version. Copyright (C) 2018-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This interface is based on in Linux. */ #ifndef _SYS_STAT_H # error Never include directly, include instead. #endif /* Use the Linux kernel header if available. */ /* Use "" to work around incorrect macro expansion of the __has_include argument (GCC PR 80005). */ #ifdef __has_include # if __has_include ("linux/stat.h") # include "linux/stat.h" # ifdef STATX_TYPE # define __statx_timestamp_defined 1 # define __statx_defined 1 # endif # endif #endif #include PKZՃbits/xopen_lim.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ /* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 System Interfaces and Headers, 4.16 Please note only the values which are not greater than the minimum stated in the standard document are listed. The `sysconf' functions should be used to obtain the actual value. */ #ifndef _XOPEN_LIM_H #define _XOPEN_LIM_H 1 /* We do not provide fixed values for ARG_MAX Maximum length of argument to the `exec' function including environment data. ATEXIT_MAX Maximum number of functions that may be registered with `atexit'. CHILD_MAX Maximum number of simultaneous processes per real user ID. OPEN_MAX Maximum number of files that one process can have open at anyone time. PAGESIZE PAGE_SIZE Size of bytes of a page. PASS_MAX Maximum number of significant bytes in a password. We only provide a fixed limit for IOV_MAX Maximum number of `iovec' structures that one process has available for use with `readv' or writev'. if this is indeed fixed by the underlying system. */ /* Maximum number of `iovec' structures that may be used in a single call to `readv', `writev', etc. */ #define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV #include #ifdef __IOV_MAX # define IOV_MAX __IOV_MAX #else # undef IOV_MAX #endif /* Maximum value of `digit' in calls to the `printf' and `scanf' functions. We have no limit, so return a reasonable value. */ #define NL_ARGMAX _POSIX_ARG_MAX /* Maximum number of bytes in a `LANG' name. We have no limit. */ #define NL_LANGMAX _POSIX2_LINE_MAX /* Maximum message number. We have no limit. */ #define NL_MSGMAX INT_MAX /* Maximum number of bytes in N-to-1 collation mapping. We have no limit. */ #if defined __USE_GNU || !defined __USE_XOPEN2K8 # define NL_NMAX INT_MAX #endif /* Maximum set number. We have no limit. */ #define NL_SETMAX INT_MAX /* Maximum number of bytes in a message. We have no limit. */ #define NL_TEXTMAX INT_MAX /* Default process priority. */ #define NZERO 20 /* Number of bits in a word of type `int'. */ #ifdef INT_MAX # if INT_MAX == 32767 # define WORD_BIT 16 # else # if INT_MAX == 2147483647 # define WORD_BIT 32 # else /* Safe assumption. */ # define WORD_BIT 64 # endif # endif #elif defined __INT_MAX__ # if __INT_MAX__ == 32767 # define WORD_BIT 16 # else # if __INT_MAX__ == 2147483647 # define WORD_BIT 32 # else /* Safe assumption. */ # define WORD_BIT 64 # endif # endif #else # define WORD_BIT 32 #endif /* Number of bits in a word of type `long int'. */ #ifdef LONG_MAX # if LONG_MAX == 2147483647 # define LONG_BIT 32 # else /* Safe assumption. */ # define LONG_BIT 64 # endif #elif defined __LONG_MAX__ # if __LONG_MAX__ == 2147483647 # define LONG_BIT 32 # else /* Safe assumption. */ # define LONG_BIT 64 # endif #else # include # if __WORDSIZE == 64 # define LONG_BIT 64 # else # define LONG_BIT 32 # endif #endif #endif /* bits/xopen_lim.h */ PKZ+I{ { bits/error.hnu[/* Specializations for error functions. Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ERROR_H # error "Never include directly; use instead." #endif extern void __REDIRECT (__error_alias, (int __status, int __errnum, const char *__format, ...), error) __attribute__ ((__format__ (__printf__, 3, 4))); extern void __REDIRECT (__error_noreturn, (int __status, int __errnum, const char *__format, ...), error) __attribute__ ((__noreturn__, __format__ (__printf__, 3, 4))); /* If we know the function will never return make sure the compiler realizes that, too. */ __extern_always_inline void error (int __status, int __errnum, const char *__format, ...) { if (__builtin_constant_p (__status) && __status != 0) __error_noreturn (__status, __errnum, __format, __va_arg_pack ()); else __error_alias (__status, __errnum, __format, __va_arg_pack ()); } extern void __REDIRECT (__error_at_line_alias, (int __status, int __errnum, const char *__fname, unsigned int __line, const char *__format, ...), error_at_line) __attribute__ ((__format__ (__printf__, 5, 6))); extern void __REDIRECT (__error_at_line_noreturn, (int __status, int __errnum, const char *__fname, unsigned int __line, const char *__format, ...), error_at_line) __attribute__ ((__noreturn__, __format__ (__printf__, 5, 6))); /* If we know the function will never return make sure the compiler realizes that, too. */ __extern_always_inline void error_at_line (int __status, int __errnum, const char *__fname, unsigned int __line, const char *__format, ...) { if (__builtin_constant_p (__status) && __status != 0) __error_at_line_noreturn (__status, __errnum, __fname, __line, __format, __va_arg_pack ()); else __error_at_line_alias (__status, __errnum, __fname, __line, __format, __va_arg_pack ()); } PKZxD,3,3bits/mathcalls.hnu[/* Prototype declarations for math functions; helper file for . Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* NOTE: Because of the special way this file is used by , this file must NOT be protected from multiple inclusion as header files usually are. This file provides prototype declarations for the math functions. Most functions are declared using the macro: __MATHCALL (NAME,[_r], (ARGS...)); This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. Functions returning other types like `int' are declared using the macro: __MATHDECL (TYPE, NAME,[_r], (ARGS...)); This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. Note that there must be no whitespace before the argument passed for NAME, to make token pasting work with -traditional. */ #ifndef _MATH_H # error "Never include directly; include instead." #endif /* Trigonometric functions. */ /* Arc cosine of X. */ __MATHCALL (acos,, (_Mdouble_ __x)); /* Arc sine of X. */ __MATHCALL (asin,, (_Mdouble_ __x)); /* Arc tangent of X. */ __MATHCALL (atan,, (_Mdouble_ __x)); /* Arc tangent of Y/X. */ __MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); /* Cosine of X. */ __MATHCALL_VEC (cos,, (_Mdouble_ __x)); /* Sine of X. */ __MATHCALL_VEC (sin,, (_Mdouble_ __x)); /* Tangent of X. */ __MATHCALL (tan,, (_Mdouble_ __x)); /* Hyperbolic functions. */ /* Hyperbolic cosine of X. */ __MATHCALL (cosh,, (_Mdouble_ __x)); /* Hyperbolic sine of X. */ __MATHCALL (sinh,, (_Mdouble_ __x)); /* Hyperbolic tangent of X. */ __MATHCALL (tanh,, (_Mdouble_ __x)); #ifdef __USE_GNU /* Cosine and sine of X. */ __MATHDECL_VEC (void,sincos,, (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* Hyperbolic arc cosine of X. */ __MATHCALL (acosh,, (_Mdouble_ __x)); /* Hyperbolic arc sine of X. */ __MATHCALL (asinh,, (_Mdouble_ __x)); /* Hyperbolic arc tangent of X. */ __MATHCALL (atanh,, (_Mdouble_ __x)); #endif /* Exponential and logarithmic functions. */ /* Exponential function of X. */ __MATHCALL_VEC (exp,, (_Mdouble_ __x)); /* Break VALUE into a normalized fraction and an integral power of 2. */ __MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); /* X times (two to the EXP power). */ __MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); /* Natural logarithm of X. */ __MATHCALL_VEC (log,, (_Mdouble_ __x)); /* Base-ten logarithm of X. */ __MATHCALL (log10,, (_Mdouble_ __x)); /* Break VALUE into integral and fractional parts. */ __MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2)); #if __GLIBC_USE (IEC_60559_FUNCS_EXT) /* Compute exponent to base ten. */ __MATHCALL (exp10,, (_Mdouble_ __x)); #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* Return exp(X) - 1. */ __MATHCALL (expm1,, (_Mdouble_ __x)); /* Return log(1 + X). */ __MATHCALL (log1p,, (_Mdouble_ __x)); /* Return the base 2 signed integral exponent of X. */ __MATHCALL (logb,, (_Mdouble_ __x)); #endif #ifdef __USE_ISOC99 /* Compute base-2 exponential of X. */ __MATHCALL (exp2,, (_Mdouble_ __x)); /* Compute base-2 logarithm of X. */ __MATHCALL (log2,, (_Mdouble_ __x)); #endif /* Power functions. */ /* Return X to the Y power. */ __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y)); /* Return the square root of X. */ __MATHCALL (sqrt,, (_Mdouble_ __x)); #if defined __USE_XOPEN || defined __USE_ISOC99 /* Return `sqrt(X*X + Y*Y)'. */ __MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* Return the cube root of X. */ __MATHCALL (cbrt,, (_Mdouble_ __x)); #endif /* Nearest integer, absolute value, and remainder functions. */ /* Smallest integral value not less than X. */ __MATHCALLX (ceil,, (_Mdouble_ __x), (__const__)); /* Absolute value of X. */ __MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); /* Largest integer not greater than X. */ __MATHCALLX (floor,, (_Mdouble_ __x), (__const__)); /* Floating-point modulo remainder of X/Y. */ __MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); #ifdef __USE_MISC # if ((!defined __cplusplus \ || __cplusplus < 201103L /* isinf conflicts with C++11. */ \ || __MATH_DECLARING_DOUBLE == 0)) /* isinff or isinfl don't. */ \ && !__MATH_DECLARING_FLOATN /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); # endif # if !__MATH_DECLARING_FLOATN /* Return nonzero if VALUE is finite and not NaN. */ __MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); /* Return the remainder of X/Y. */ __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); /* Return the fractional part of X after dividing out `ilogb (X)'. */ __MATHCALL (significand,, (_Mdouble_ __x)); # endif #endif /* Use misc. */ #ifdef __USE_ISOC99 /* Return X with its signed changed to Y's. */ __MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); #endif #ifdef __USE_ISOC99 /* Return representation of qNaN for double type. */ __MATHCALL (nan,, (const char *__tagb)); #endif #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) # if ((!defined __cplusplus \ || __cplusplus < 201103L /* isnan conflicts with C++11. */ \ || __MATH_DECLARING_DOUBLE == 0)) /* isnanf or isnanl don't. */ \ && !__MATH_DECLARING_FLOATN /* Return nonzero if VALUE is not a number. */ __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); # endif #endif #if defined __USE_MISC || (defined __USE_XOPEN && __MATH_DECLARING_DOUBLE) /* Bessel functions. */ __MATHCALL (j0,, (_Mdouble_)); __MATHCALL (j1,, (_Mdouble_)); __MATHCALL (jn,, (int, _Mdouble_)); __MATHCALL (y0,, (_Mdouble_)); __MATHCALL (y1,, (_Mdouble_)); __MATHCALL (yn,, (int, _Mdouble_)); #endif #if defined __USE_XOPEN || defined __USE_ISOC99 /* Error and gamma functions. */ __MATHCALL (erf,, (_Mdouble_)); __MATHCALL (erfc,, (_Mdouble_)); __MATHCALL (lgamma,, (_Mdouble_)); #endif #ifdef __USE_ISOC99 /* True gamma function. */ __MATHCALL (tgamma,, (_Mdouble_)); #endif #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) # if !__MATH_DECLARING_FLOATN /* Obsolete alias for `lgamma'. */ __MATHCALL (gamma,, (_Mdouble_)); # endif #endif #ifdef __USE_MISC /* Reentrant version of lgamma. This function uses the global variable `signgam'. The reentrant version instead takes a pointer and stores the value through it. */ __MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 /* Return the integer nearest X in the direction of the prevailing rounding mode. */ __MATHCALL (rint,, (_Mdouble_ __x)); /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ __MATHCALL (nextafter,, (_Mdouble_ __x, _Mdouble_ __y)); # if defined __USE_ISOC99 && !defined __LDBL_COMPAT && !__MATH_DECLARING_FLOATN __MATHCALL (nexttoward,, (_Mdouble_ __x, long double __y)); # endif # if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN /* Return X - epsilon. */ __MATHCALL (nextdown,, (_Mdouble_ __x)); /* Return X + epsilon. */ __MATHCALL (nextup,, (_Mdouble_ __x)); # endif /* Return the remainder of integer divison X / Y with infinite precision. */ __MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); # ifdef __USE_ISOC99 /* Return X times (2 to the Nth power). */ __MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); # endif /* Return the binary exponent of X, which must be nonzero. */ __MATHDECL (int,ilogb,, (_Mdouble_ __x)); #endif #if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN /* Like ilogb, but returning long int. */ __MATHDECL (long int, llogb,, (_Mdouble_ __x)); #endif #ifdef __USE_ISOC99 /* Return X times (2 to the Nth power). */ __MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); /* Round X to integral value in floating-point format using current rounding direction, but do not raise inexact exception. */ __MATHCALL (nearbyint,, (_Mdouble_ __x)); /* Round X to nearest integral value, rounding halfway cases away from zero. */ __MATHCALLX (round,, (_Mdouble_ __x), (__const__)); /* Round X to the integral value in floating-point format nearest but not larger in magnitude. */ __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); /* Compute remainder of X and Y and put in *QUO a value with sign of x/y and magnitude congruent `mod 2^n' to the magnitude of the integral quotient x/y, with n >= 3. */ __MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); /* Conversion functions. */ /* Round X to nearest integral value according to current rounding direction. */ __MATHDECL (long int,lrint,, (_Mdouble_ __x)); __extension__ __MATHDECL (long long int,llrint,, (_Mdouble_ __x)); /* Round X to nearest integral value, rounding halfway cases away from zero. */ __MATHDECL (long int,lround,, (_Mdouble_ __x)); __extension__ __MATHDECL (long long int,llround,, (_Mdouble_ __x)); /* Return positive difference between X and Y. */ __MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); /* Return maximum numeric value from X and Y. */ __MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); /* Return minimum numeric value from X and Y. */ __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); /* Multiply-add function computed as a ternary operation. */ __MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); #endif /* Use ISO C99. */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN /* Round X to nearest integer value, rounding halfway cases to even. */ __MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__)); /* Round X to nearest signed integer value, not raising inexact, with control of rounding direction and width of result. */ __MATHDECL (__intmax_t, fromfp,, (_Mdouble_ __x, int __round, unsigned int __width)); /* Round X to nearest unsigned integer value, not raising inexact, with control of rounding direction and width of result. */ __MATHDECL (__uintmax_t, ufromfp,, (_Mdouble_ __x, int __round, unsigned int __width)); /* Round X to nearest signed integer value, raising inexact for non-integers, with control of rounding direction and width of result. */ __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round, unsigned int __width)); /* Round X to nearest unsigned integer value, raising inexact for non-integers, with control of rounding direction and width of result. */ __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round, unsigned int __width)); /* Return value with maximum magnitude. */ __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); /* Return value with minimum magnitude. */ __MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); /* Total order operation. */ __MATHDECL_1 (int, totalorder,, (_Mdouble_ __x, _Mdouble_ __y)) __attribute__ ((__const__)); /* Total order operation on absolute values. */ __MATHDECL_1 (int, totalordermag,, (_Mdouble_ __x, _Mdouble_ __y)) __attribute__ ((__const__)); /* Canonicalize floating-point representation. */ __MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x)); /* Get NaN payload. */ __MATHCALL (getpayload,, (const _Mdouble_ *__x)); /* Set quiet NaN payload. */ __MATHDECL_1 (int, setpayload,, (_Mdouble_ *__x, _Mdouble_ __payload)); /* Set signaling NaN payload. */ __MATHDECL_1 (int, setpayloadsig,, (_Mdouble_ *__x, _Mdouble_ __payload)); #endif #if (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \ && __MATH_DECLARING_DOUBLE \ && !defined __USE_XOPEN2K8)) \ && !__MATH_DECLARING_FLOATN /* Return X times (2 to the Nth power). */ __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); #endif PKZ\bits/wordsize.hnu[/* Determine the wordsize from the preprocessor defines. */ #if defined __x86_64__ && !defined __ILP32__ # define __WORDSIZE 64 #else # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # define __WORDSIZE_TIME64_COMPAT32 0 #endif PKZrbits/strings_fortified.hnu[/* Fortify macros for strings.h functions. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __STRINGS_FORTIFIED # define __STRINGS_FORTIFIED 1 __fortify_function void __NTH (bcopy (const void *__src, void *__dest, size_t __len)) { (void) __builtin___memmove_chk (__dest, __src, __len, __glibc_objsize0 (__dest)); } __fortify_function void __NTH (bzero (void *__dest, size_t __len)) { (void) __builtin___memset_chk (__dest, '\0', __len, __glibc_objsize0 (__dest)); } #endif PKZ薡m bits/timex.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TIMEX_H #define _BITS_TIMEX_H 1 #include #include /* These definitions from linux/timex.h as of 3.18. */ struct timex { unsigned int modes; /* mode selector */ __syscall_slong_t offset; /* time offset (usec) */ __syscall_slong_t freq; /* frequency offset (scaled ppm) */ __syscall_slong_t maxerror; /* maximum error (usec) */ __syscall_slong_t esterror; /* estimated error (usec) */ int status; /* clock command/status */ __syscall_slong_t constant; /* pll time constant */ __syscall_slong_t precision; /* clock precision (usec) (ro) */ __syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */ struct timeval time; /* (read only, except for ADJ_SETOFFSET) */ __syscall_slong_t tick; /* (modified) usecs between clock ticks */ __syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */ __syscall_slong_t jitter; /* pps jitter (us) (ro) */ int shift; /* interval duration (s) (shift) (ro) */ __syscall_slong_t stabil; /* pps stability (scaled ppm) (ro) */ __syscall_slong_t jitcnt; /* jitter limit exceeded (ro) */ __syscall_slong_t calcnt; /* calibration intervals (ro) */ __syscall_slong_t errcnt; /* calibration errors (ro) */ __syscall_slong_t stbcnt; /* stability limit exceeded (ro) */ int tai; /* TAI offset (ro) */ /* ??? */ int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; /* Mode codes (timex.mode) */ #define ADJ_OFFSET 0x0001 /* time offset */ #define ADJ_FREQUENCY 0x0002 /* frequency offset */ #define ADJ_MAXERROR 0x0004 /* maximum time error */ #define ADJ_ESTERROR 0x0008 /* estimated time error */ #define ADJ_STATUS 0x0010 /* clock status */ #define ADJ_TIMECONST 0x0020 /* pll time constant */ #define ADJ_TAI 0x0080 /* set TAI offset */ #define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ #define ADJ_MICRO 0x1000 /* select microsecond resolution */ #define ADJ_NANO 0x2000 /* select nanosecond resolution */ #define ADJ_TICK 0x4000 /* tick value */ #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ /* xntp 3.4 compatibility names */ #define MOD_OFFSET ADJ_OFFSET #define MOD_FREQUENCY ADJ_FREQUENCY #define MOD_MAXERROR ADJ_MAXERROR #define MOD_ESTERROR ADJ_ESTERROR #define MOD_STATUS ADJ_STATUS #define MOD_TIMECONST ADJ_TIMECONST #define MOD_CLKB ADJ_TICK #define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */ #define MOD_TAI ADJ_TAI #define MOD_MICRO ADJ_MICRO #define MOD_NANO ADJ_NANO /* Status codes (timex.status) */ #define STA_PLL 0x0001 /* enable PLL updates (rw) */ #define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */ #define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */ #define STA_FLL 0x0008 /* select frequency-lock mode (rw) */ #define STA_INS 0x0010 /* insert leap (rw) */ #define STA_DEL 0x0020 /* delete leap (rw) */ #define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */ #define STA_FREQHOLD 0x0080 /* hold frequency (rw) */ #define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */ #define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */ #define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */ #define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */ #define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */ #define STA_NANO 0x2000 /* resolution (0 = us, 1 = ns) (ro) */ #define STA_MODE 0x4000 /* mode (0 = PLL, 1 = FLL) (ro) */ #define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */ /* Read-only bits */ #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) #endif /* bits/timex.h */ PKZ bits/setjmp.hnu[/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 #if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif #include #ifndef _ASM # if __WORDSIZE == 64 typedef long int __jmp_buf[8]; # elif defined __x86_64__ __extension__ typedef long long int __jmp_buf[8]; # else typedef int __jmp_buf[6]; # endif #endif #endif /* bits/setjmp.h */ PKZpU. bits/dlfcn.hnu[/* System dependent definitions for run-time dynamic loading. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _DLFCN_H # error "Never use directly; include instead." #endif /* The MODE argument to `dlopen' contains one of the following: */ #define RTLD_LAZY 0x00001 /* Lazy function call binding. */ #define RTLD_NOW 0x00002 /* Immediate function call binding. */ #define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ #define RTLD_NOLOAD 0x00004 /* Do not load the object. */ #define RTLD_DEEPBIND 0x00008 /* Use deep binding. */ /* If the following bit is set in the MODE argument to `dlopen', the symbols of the loaded object and its dependencies are made visible as if the object were linked directly into the program. */ #define RTLD_GLOBAL 0x00100 /* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. The implementation does this by default and so we can define the value to zero. */ #define RTLD_LOCAL 0 /* Do not delete object when closed. */ #define RTLD_NODELETE 0x01000 #ifdef __USE_GNU /* To support profiling of shared objects it is a good idea to call the function found using `dlsym' using the following macro since these calls do not use the PLT. But this would mean the dynamic loader has no chance to find out when the function is called. The macro applies the necessary magic so that profiling is possible. Rewrite foo = (*fctp) (arg1, arg2); into foo = DL_CALL_FCT (fctp, (arg1, arg2)); */ # define DL_CALL_FCT(fctp, args) \ (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args) __BEGIN_DECLS /* This function calls the profiling functions. */ extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; __END_DECLS #endif PKZцWW bits/locale.hnu[/* Definition of locale category symbol values. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _LOCALE_H && !defined _LANGINFO_H # error "Never use directly; include instead." #endif #ifndef _BITS_LOCALE_H #define _BITS_LOCALE_H 1 #define __LC_CTYPE 0 #define __LC_NUMERIC 1 #define __LC_TIME 2 #define __LC_COLLATE 3 #define __LC_MONETARY 4 #define __LC_MESSAGES 5 #define __LC_ALL 6 #define __LC_PAPER 7 #define __LC_NAME 8 #define __LC_ADDRESS 9 #define __LC_TELEPHONE 10 #define __LC_MEASUREMENT 11 #define __LC_IDENTIFICATION 12 #endif /* bits/locale.h */ PKZd֠bits/waitflags.hnu[/* Definitions of flag bits for `waitpid' et al. Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." #endif /* Bits in the third argument to `waitpid'. */ #define WNOHANG 1 /* Don't block waiting. */ #define WUNTRACED 2 /* Report status of stopped children. */ /* Bits in the fourth argument to `waitid'. */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 # define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */ # define WEXITED 4 /* Report dead child. */ # define WCONTINUED 8 /* Report continued child. */ # define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ #endif #define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ #define __WALL 0x40000000 /* Wait for any child. */ #define __WCLONE 0x80000000 /* Wait for cloned process. */ PKZkV bits/errno.hnu[/* Error constants. Linux specific version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_ERRNO_H #define _BITS_ERRNO_H 1 #if !defined _ERRNO_H # error "Never include directly; use instead." #endif # include /* Older Linux headers do not define these constants. */ # ifndef ENOTSUP # define ENOTSUP EOPNOTSUPP # endif # ifndef ECANCELED # define ECANCELED 125 # endif # ifndef EOWNERDEAD # define EOWNERDEAD 130 # endif #ifndef ENOTRECOVERABLE # define ENOTRECOVERABLE 131 # endif # ifndef ERFKILL # define ERFKILL 132 # endif # ifndef EHWPOISON # define EHWPOISON 133 # endif #endif /* bits/errno.h. */ PKZbits/sigstack.hnu[/* sigstack, sigaltstack definitions. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SIGSTACK_H #define _BITS_SIGSTACK_H 1 #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never include this file directly. Use instead" #endif /* Minimum stack size for a signal handler. */ #define MINSIGSTKSZ 2048 /* System default stack size. */ #define SIGSTKSZ 8192 #endif /* bits/sigstack.h */ PKZU7 bits/utmpx.hnu[/* Structures and definitions for the user accounting database. GNU version. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UTMPX_H # error "Never include directly; use instead." #endif #include #include #include #ifdef __USE_GNU # include # define _PATH_UTMPX _PATH_UTMP # define _PATH_WTMPX _PATH_WTMP #endif #define __UT_LINESIZE 32 #define __UT_NAMESIZE 32 #define __UT_HOSTSIZE 256 /* The structure describing the status of a terminated process. This type is used in `struct utmpx' below. */ struct __exit_status { #ifdef __USE_GNU short int e_termination; /* Process termination status. */ short int e_exit; /* Process exit status. */ #else short int __e_termination; /* Process termination status. */ short int __e_exit; /* Process exit status. */ #endif }; /* The structure describing an entry in the user accounting database. */ struct utmpx { short int ut_type; /* Type of login. */ __pid_t ut_pid; /* Process ID of login process. */ char ut_line[__UT_LINESIZE] __attribute_nonstring__; /* Devicename. */ char ut_id[4] __attribute_nonstring__; /* Inittab ID. */ char ut_user[__UT_NAMESIZE] __attribute_nonstring__; /* Username. */ char ut_host[__UT_HOSTSIZE] __attribute_nonstring__; /* Hostname for remote login. */ struct __exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ /* The fields ut_session and ut_tv must be the same size when compiled 32- and 64-bit. This allows files and shared memory to be shared between 32- and 64-bit applications. */ #if __WORDSIZE_TIME64_COMPAT32 __int32_t ut_session; /* Session ID, used for windowing. */ struct { __int32_t tv_sec; /* Seconds. */ __int32_t tv_usec; /* Microseconds. */ } ut_tv; /* Time entry was made. */ #else long int ut_session; /* Session ID, used for windowing. */ struct timeval ut_tv; /* Time entry was made. */ #endif __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ char __glibc_reserved[20]; /* Reserved for future use. */ }; /* Values for the `ut_type' field of a `struct utmpx'. */ #define EMPTY 0 /* No valid user accounting information. */ #ifdef __USE_GNU # define RUN_LVL 1 /* The system's runlevel. */ #endif #define BOOT_TIME 2 /* Time of system boot. */ #define NEW_TIME 3 /* Time after system clock changed. */ #define OLD_TIME 4 /* Time when system clock changed. */ #define INIT_PROCESS 5 /* Process spawned by the init process. */ #define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ #define USER_PROCESS 7 /* Normal process. */ #define DEAD_PROCESS 8 /* Terminated process. */ #ifdef __USE_GNU # define ACCOUNTING 9 /* System accounting. */ #endif PKZbits/fp-logb.hnu[/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never use directly; include instead." #endif #define __FP_LOGB0_IS_MIN 1 #define __FP_LOGBNAN_IS_MIN 1 PKZq bits/ioctl-types.hnu[/* Structure types for pre-termios terminal ioctls. Linux version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_IOCTL_H # error "Never use directly; include instead." #endif /* Get definition of constants for use with `ioctl'. */ #include struct winsize { unsigned short int ws_row; unsigned short int ws_col; unsigned short int ws_xpixel; unsigned short int ws_ypixel; }; #define NCC 8 struct termio { unsigned short int c_iflag; /* input mode flags */ unsigned short int c_oflag; /* output mode flags */ unsigned short int c_cflag; /* control mode flags */ unsigned short int c_lflag; /* local mode flags */ unsigned char c_line; /* line discipline */ unsigned char c_cc[NCC]; /* control characters */ }; /* modem lines */ #define TIOCM_LE 0x001 #define TIOCM_DTR 0x002 #define TIOCM_RTS 0x004 #define TIOCM_ST 0x008 #define TIOCM_SR 0x010 #define TIOCM_CTS 0x020 #define TIOCM_CAR 0x040 #define TIOCM_RNG 0x080 #define TIOCM_DSR 0x100 #define TIOCM_CD TIOCM_CAR #define TIOCM_RI TIOCM_RNG /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ /* line disciplines */ #define N_TTY 0 #define N_SLIP 1 #define N_MOUSE 2 #define N_PPP 3 #define N_STRIP 4 #define N_AX25 5 #define N_X25 6 /* X.25 async */ #define N_6PACK 7 #define N_MASC 8 /* Mobitex module */ #define N_R3964 9 /* Simatic R3964 module */ #define N_PROFIBUS_FDL 10 /* Profibus */ #define N_IRDA 11 /* Linux IR */ #define N_SMSBLOCK 12 /* SMS block mode */ #define N_HDLC 13 /* synchronous HDLC */ #define N_SYNC_PPP 14 /* synchronous PPP */ #define N_HCI 15 /* Bluetooth HCI UART */ PKZ4Ebits/mman-linux.hnu[/* Definitions for POSIX memory map interface. Linux generic version. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." #endif /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ /* Protections are chosen from these bits, OR'd together. The implementation does not necessarily support PROT_EXEC or PROT_WRITE without PROT_READ. The only guarantees are that no writing will be allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ #define PROT_READ 0x1 /* Page can be read. */ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ #define PROT_GROWSDOWN 0x01000000 /* Extend change to start of growsdown vma (mprotect only). */ #define PROT_GROWSUP 0x02000000 /* Extend change to start of growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ #define MAP_PRIVATE 0x02 /* Changes are private. */ #ifdef __USE_MISC # define MAP_SHARED_VALIDATE 0x03 /* Share changes and validate extension flags. */ # define MAP_TYPE 0x0f /* Mask for type of mapping. */ #endif /* Other flags. */ #define MAP_FIXED 0x10 /* Interpret addr exactly. */ #ifdef __USE_MISC # define MAP_FILE 0 # ifdef __MAP_ANONYMOUS # define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */ # else # define MAP_ANONYMOUS 0x20 /* Don't use a file. */ # endif # define MAP_ANON MAP_ANONYMOUS /* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ # define MAP_HUGE_SHIFT 26 # define MAP_HUGE_MASK 0x3f #endif /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ #define MS_SYNC 4 /* Synchronous memory sync. */ #define MS_INVALIDATE 2 /* Invalidate the caches. */ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 # define MREMAP_FIXED 2 #endif /* Advice to `madvise'. */ #ifdef __USE_MISC # define MADV_NORMAL 0 /* No further special treatment. */ # define MADV_RANDOM 1 /* Expect random page references. */ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ # define MADV_FREE 8 /* Free pages only if memory pressure. */ # define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ # define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ # define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, overrides the coredump filter bits. */ # define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_WIPEONFORK 18 /* Zero memory on fork, child only. */ # define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif /* The POSIX people had to invent similar names for the same things. */ #ifdef __USE_XOPEN2K # define POSIX_MADV_NORMAL 0 /* No further special treatment. */ # define POSIX_MADV_RANDOM 1 /* Expect random page references. */ # define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ #endif /* Flags for `mlockall'. */ #ifndef MCL_CURRENT # define MCL_CURRENT 1 /* Lock all currently mapped pages. */ # define MCL_FUTURE 2 /* Lock all additions to address space. */ # define MCL_ONFAULT 4 /* Lock all pages that are faulted in. */ #endif #include PKZY$5  bits/math-vector.hnu[/* Platform-specific SIMD declarations of math functions. Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never include directly;\ include instead." #endif /* Get default empty definitions for simd declarations. */ #include #if defined __x86_64__ && defined __FAST_MATH__ # if defined _OPENMP && _OPENMP >= 201307 /* OpenMP case. */ # define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch") # elif __GNUC_PREREQ (6,0) /* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)). */ # define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch"))) # endif # ifdef __DECL_SIMD_x86_64 # undef __DECL_SIMD_cos # define __DECL_SIMD_cos __DECL_SIMD_x86_64 # undef __DECL_SIMD_cosf # define __DECL_SIMD_cosf __DECL_SIMD_x86_64 # undef __DECL_SIMD_sin # define __DECL_SIMD_sin __DECL_SIMD_x86_64 # undef __DECL_SIMD_sinf # define __DECL_SIMD_sinf __DECL_SIMD_x86_64 # undef __DECL_SIMD_sincos # define __DECL_SIMD_sincos __DECL_SIMD_x86_64 # undef __DECL_SIMD_sincosf # define __DECL_SIMD_sincosf __DECL_SIMD_x86_64 # undef __DECL_SIMD_log # define __DECL_SIMD_log __DECL_SIMD_x86_64 # undef __DECL_SIMD_logf # define __DECL_SIMD_logf __DECL_SIMD_x86_64 # undef __DECL_SIMD_exp # define __DECL_SIMD_exp __DECL_SIMD_x86_64 # undef __DECL_SIMD_expf # define __DECL_SIMD_expf __DECL_SIMD_x86_64 # undef __DECL_SIMD_pow # define __DECL_SIMD_pow __DECL_SIMD_x86_64 # undef __DECL_SIMD_powf # define __DECL_SIMD_powf __DECL_SIMD_x86_64 # endif #endif PKZ3 bits/utmp.hnu[/* The `struct utmp' type, describing entries in the utmp file. Copyright (C) 1993-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UTMP_H # error "Never include directly; use instead." #endif #include #include #include #include #define UT_LINESIZE 32 #define UT_NAMESIZE 32 #define UT_HOSTSIZE 256 /* The structure describing an entry in the database of previous logins. */ struct lastlog { #if __WORDSIZE_TIME64_COMPAT32 int32_t ll_time; #else __time_t ll_time; #endif char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; }; /* The structure describing the status of a terminated process. This type is used in `struct utmp' below. */ struct exit_status { short int e_termination; /* Process termination status. */ short int e_exit; /* Process exit status. */ }; /* The structure describing an entry in the user accounting database. */ struct utmp { short int ut_type; /* Type of login. */ pid_t ut_pid; /* Process ID of login process. */ char ut_line[UT_LINESIZE] __attribute_nonstring__; /* Devicename. */ char ut_id[4] __attribute_nonstring__; /* Inittab ID. */ char ut_user[UT_NAMESIZE] __attribute_nonstring__; /* Username. */ char ut_host[UT_HOSTSIZE] __attribute_nonstring__; /* Hostname for remote login. */ struct exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ /* The ut_session and ut_tv fields must be the same size when compiled 32- and 64-bit. This allows data files and shared memory to be shared between 32- and 64-bit applications. */ #if __WORDSIZE_TIME64_COMPAT32 int32_t ut_session; /* Session ID, used for windowing. */ struct { int32_t tv_sec; /* Seconds. */ int32_t tv_usec; /* Microseconds. */ } ut_tv; /* Time entry was made. */ #else long int ut_session; /* Session ID, used for windowing. */ struct timeval ut_tv; /* Time entry was made. */ #endif int32_t ut_addr_v6[4]; /* Internet address of remote host. */ char __glibc_reserved[20]; /* Reserved for future use. */ }; /* Backwards compatibility hacks. */ #define ut_name ut_user #ifndef _NO_UT_TIME /* We have a problem here: `ut_time' is also used otherwise. Define _NO_UT_TIME if the compiler complains. */ # define ut_time ut_tv.tv_sec #endif #define ut_xtime ut_tv.tv_sec #define ut_addr ut_addr_v6[0] /* Values for the `ut_type' field of a `struct utmp'. */ #define EMPTY 0 /* No valid user accounting information. */ #define RUN_LVL 1 /* The system's runlevel. */ #define BOOT_TIME 2 /* Time of system boot. */ #define NEW_TIME 3 /* Time after system clock changed. */ #define OLD_TIME 4 /* Time when system clock changed. */ #define INIT_PROCESS 5 /* Process spawned by the init process. */ #define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ #define USER_PROCESS 7 /* Normal process. */ #define DEAD_PROCESS 8 /* Terminated process. */ #define ACCOUNTING 9 /* Old Linux name for the EMPTY type. */ #define UT_UNKNOWN EMPTY /* Tell the user that we have a modern system with UT_HOST, UT_PID, UT_TYPE, UT_ID and UT_TV fields. */ #define _HAVE_UT_TYPE 1 #define _HAVE_UT_PID 1 #define _HAVE_UT_ID 1 #define _HAVE_UT_TV 1 #define _HAVE_UT_HOST 1 PKZ%) bits/poll2.hnu[/* Checking macros for poll functions. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_POLL_H # error "Never include directly; use instead." #endif __BEGIN_DECLS extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds, int __timeout), poll); extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout, __SIZE_TYPE__ __fdslen); extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds, int __timeout, __SIZE_TYPE__ __fdslen), __poll_chk) __warnattr ("poll called with fds buffer too small file nfds entries"); __fortify_function int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout) { return __glibc_fortify (poll, __nfds, sizeof (*__fds), __glibc_objsize (__fds), __fds, __nfds, __timeout); } #ifdef __USE_GNU extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss), ppoll); extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss, __SIZE_TYPE__ __fdslen); extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss, __SIZE_TYPE__ __fdslen), __ppoll_chk) __warnattr ("ppoll called with fds buffer too small file nfds entries"); __fortify_function int ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss) { return __glibc_fortify (ppoll, __nfds, sizeof (*__fds), __glibc_objsize (__fds), __fds, __nfds, __timeout, __ss); } #endif __END_DECLS PKZ4#C}} bits/ioctls.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_IOCTL_H # error "Never use directly; include instead." #endif /* Use the definitions from the kernel header files. */ #include /* Routing table calls. */ #define SIOCADDRT 0x890B /* add routing table entry */ #define SIOCDELRT 0x890C /* delete routing table entry */ #define SIOCRTMSG 0x890D /* call to routing system */ /* Socket configuration controls. */ #define SIOCGIFNAME 0x8910 /* get iface name */ #define SIOCSIFLINK 0x8911 /* set iface channel */ #define SIOCGIFCONF 0x8912 /* get iface list */ #define SIOCGIFFLAGS 0x8913 /* get flags */ #define SIOCSIFFLAGS 0x8914 /* set flags */ #define SIOCGIFADDR 0x8915 /* get PA address */ #define SIOCSIFADDR 0x8916 /* set PA address */ #define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ #define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ #define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ #define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ #define SIOCGIFNETMASK 0x891b /* get network PA mask */ #define SIOCSIFNETMASK 0x891c /* set network PA mask */ #define SIOCGIFMETRIC 0x891d /* get metric */ #define SIOCSIFMETRIC 0x891e /* set metric */ #define SIOCGIFMEM 0x891f /* get memory address (BSD) */ #define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ #define SIOCGIFMTU 0x8921 /* get MTU size */ #define SIOCSIFMTU 0x8922 /* set MTU size */ #define SIOCSIFNAME 0x8923 /* set interface name */ #define SIOCSIFHWADDR 0x8924 /* set hardware address */ #define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ #define SIOCSIFENCAP 0x8926 #define SIOCGIFHWADDR 0x8927 /* Get hardware address */ #define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ #define SIOCSIFSLAVE 0x8930 #define SIOCADDMULTI 0x8931 /* Multicast address lists */ #define SIOCDELMULTI 0x8932 #define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ #define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ #define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ #define SIOCGIFPFLAGS 0x8935 #define SIOCDIFADDR 0x8936 /* delete PA address */ #define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ #define SIOCGIFCOUNT 0x8938 /* get number of devices */ #define SIOCGIFBR 0x8940 /* Bridging support */ #define SIOCSIFBR 0x8941 /* Set bridging options */ #define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ #define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ /* ARP cache control calls. */ /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ #define SIOCDARP 0x8953 /* delete ARP table entry */ #define SIOCGARP 0x8954 /* get ARP table entry */ #define SIOCSARP 0x8955 /* set ARP table entry */ /* RARP cache control calls. */ #define SIOCDRARP 0x8960 /* delete RARP table entry */ #define SIOCGRARP 0x8961 /* get RARP table entry */ #define SIOCSRARP 0x8962 /* set RARP table entry */ /* Driver configuration calls */ #define SIOCGIFMAP 0x8970 /* Get device parameters */ #define SIOCSIFMAP 0x8971 /* Set device parameters */ /* DLCI configuration calls */ #define SIOCADDDLCI 0x8980 /* Create new DLCI device */ #define SIOCDELDLCI 0x8981 /* Delete DLCI device */ /* Device private ioctl calls. */ /* These 16 ioctls are available to devices via the do_ioctl() device vector. Each device should include this file and redefine these names as their own. Because these are device dependent it is a good idea _NOT_ to issue them to random objects and hope. */ #define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ /* * These 16 ioctl calls are protocol private */ #define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ PKZ77bits/inotify.hnu[/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_INOTIFY_H # error "Never use directly; include instead." #endif /* Flags for the parameter of inotify_init1. */ enum { IN_CLOEXEC = 02000000, #define IN_CLOEXEC IN_CLOEXEC IN_NONBLOCK = 00004000 #define IN_NONBLOCK IN_NONBLOCK }; PKZ~bits/flt-eval-method.hnu[/* Define __GLIBC_FLT_EVAL_METHOD. x86 version. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _MATH_H # error "Never use directly; include instead." #endif #ifdef __FLT_EVAL_METHOD__ # if __FLT_EVAL_METHOD__ == -1 # define __GLIBC_FLT_EVAL_METHOD 2 # else # define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__ # endif #elif defined __x86_64__ # define __GLIBC_FLT_EVAL_METHOD 0 #else # define __GLIBC_FLT_EVAL_METHOD 2 #endif PKZ1w w bits/wchar-ldbl.hnu[/* -mlong-double-64 compatibility mode for functions. Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _WCHAR_H # error "Never include directly; use instead." #endif #if defined __USE_ISOC95 || defined __USE_UNIX98 __LDBL_REDIR_DECL (fwprintf); __LDBL_REDIR_DECL (wprintf); __LDBL_REDIR_DECL (swprintf); __LDBL_REDIR_DECL (vfwprintf); __LDBL_REDIR_DECL (vwprintf); __LDBL_REDIR_DECL (vswprintf); # if defined __USE_ISOC99 && !defined __USE_GNU \ && !defined __REDIRECT \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) __LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf) __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf) __LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf) # else __LDBL_REDIR_DECL (fwscanf); __LDBL_REDIR_DECL (wscanf); __LDBL_REDIR_DECL (swscanf); # endif #endif #ifdef __USE_ISOC99 __LDBL_REDIR1_DECL (wcstold, wcstod); # if !defined __USE_GNU && !defined __REDIRECT \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) __LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf) __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf) __LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf) # else __LDBL_REDIR_DECL (vfwscanf); __LDBL_REDIR_DECL (vwscanf); __LDBL_REDIR_DECL (vswscanf); # endif #endif #ifdef __USE_GNU __LDBL_REDIR1_DECL (wcstold_l, wcstod_l); #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function __LDBL_REDIR_DECL (__swprintf_chk) __LDBL_REDIR_DECL (__vswprintf_chk) # if __USE_FORTIFY_LEVEL > 1 __LDBL_REDIR_DECL (__fwprintf_chk) __LDBL_REDIR_DECL (__wprintf_chk) __LDBL_REDIR_DECL (__vfwprintf_chk) __LDBL_REDIR_DECL (__vwprintf_chk) # endif #endif PKZ5 bits/stat.hnu[/* Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 /* Versions of the `struct stat' data structure. */ #ifndef __x86_64__ # define _STAT_VER_LINUX_OLD 1 # define _STAT_VER_KERNEL 1 # define _STAT_VER_SVR4 2 # define _STAT_VER_LINUX 3 /* i386 versions of the `xmknod' interface. */ # define _MKNOD_VER_LINUX 1 # define _MKNOD_VER_SVR4 2 # define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ #else # define _STAT_VER_KERNEL 0 # define _STAT_VER_LINUX 1 /* x86-64 versions of the `xmknod' interface. */ # define _MKNOD_VER_LINUX 0 #endif #define _STAT_VER _STAT_VER_LINUX struct stat { __dev_t st_dev; /* Device. */ #ifndef __x86_64__ unsigned short int __pad1; #endif #if defined __x86_64__ || !defined __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ #else __ino_t __st_ino; /* 32bit file serial number. */ #endif #ifndef __x86_64__ __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ #else __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ #endif __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ #ifdef __x86_64__ int __pad0; #endif __dev_t st_rdev; /* Device number, if device. */ #ifndef __x86_64__ unsigned short int __pad2; #endif #if defined __x86_64__ || !defined __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ #else __off64_t st_size; /* Size of file, in bytes. */ #endif __blksize_t st_blksize; /* Optimal block size for I/O. */ #if defined __x86_64__ || !defined __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif #ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec #else __time_t st_atime; /* Time of last access. */ __syscall_ulong_t st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */ #endif #ifdef __x86_64__ __syscall_slong_t __glibc_reserved[3]; #else # ifndef __USE_FILE_OFFSET64 unsigned long int __glibc_reserved4; unsigned long int __glibc_reserved5; # else __ino64_t st_ino; /* File serial number. */ # endif #endif }; #ifdef __USE_LARGEFILE64 /* Note stat64 has the same shape as stat for x86-64. */ struct stat64 { __dev_t st_dev; /* Device. */ # ifdef __x86_64__ __ino64_t st_ino; /* File serial number. */ __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ # else unsigned int __pad1; __ino_t __st_ino; /* 32bit file serial number. */ __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ # endif __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ # ifdef __x86_64__ int __pad0; __dev_t st_rdev; /* Device number, if device. */ __off_t st_size; /* Size of file, in bytes. */ # else __dev_t st_rdev; /* Device number, if device. */ unsigned int __pad2; __off64_t st_size; /* Size of file, in bytes. */ # endif __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ # ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # else __time_t st_atime; /* Time of last access. */ __syscall_ulong_t st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */ # endif # ifdef __x86_64__ __syscall_slong_t __glibc_reserved[3]; # else __ino64_t st_ino; /* File serial number. */ # endif }; #endif /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV /* Nanosecond resolution time values are supported. */ #define _STATBUF_ST_NSEC /* Encoding of the file mode. */ #define __S_IFMT 0170000 /* These bits determine file type. */ /* File types. */ #define __S_IFDIR 0040000 /* Directory. */ #define __S_IFCHR 0020000 /* Character device. */ #define __S_IFBLK 0060000 /* Block device. */ #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0010000 /* FIFO. */ #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ /* POSIX.1b objects. Note that these macros always evaluate to zero. But they do it by enforcing the correct use of the macros. */ #define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ #define __S_ISGID 02000 /* Set group ID on execution. */ #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ #ifdef __USE_ATFILE # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif #endif /* bits/stat.h */ PKZЭvbits/sigevent-consts.hnu[/* sigevent constants. Linux version. Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_SIGEVENT_CONSTS_H #define _BITS_SIGEVENT_CONSTS_H 1 #if !defined _SIGNAL_H && !defined _AIO_H #error "Don't include directly; use instead." #endif /* `sigev_notify' values. */ enum { SIGEV_SIGNAL = 0, /* Notify via signal. */ # define SIGEV_SIGNAL SIGEV_SIGNAL SIGEV_NONE, /* Other notification: meaningless. */ # define SIGEV_NONE SIGEV_NONE SIGEV_THREAD, /* Deliver via thread creation. */ # define SIGEV_THREAD SIGEV_THREAD SIGEV_THREAD_ID = 4 /* Send signal to specific thread. This is a Linux extension. */ #define SIGEV_THREAD_ID SIGEV_THREAD_ID }; #endif PKZ*gc bits/stdio-ldbl.hnu[/* -mlong-double-64 compatibility mode for stdio functions. Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDIO_H # error "Never include directly; use instead." #endif __LDBL_REDIR_DECL (fprintf) __LDBL_REDIR_DECL (printf) __LDBL_REDIR_DECL (sprintf) __LDBL_REDIR_DECL (vfprintf) __LDBL_REDIR_DECL (vprintf) __LDBL_REDIR_DECL (vsprintf) #if defined __USE_ISOC99 && !defined __USE_GNU \ && !defined __REDIRECT \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) __LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf) __LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf) __LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf) #else __LDBL_REDIR_DECL (fscanf) __LDBL_REDIR_DECL (scanf) __LDBL_REDIR_DECL (sscanf) #endif #if defined __USE_ISOC99 || defined __USE_UNIX98 __LDBL_REDIR_DECL (snprintf) __LDBL_REDIR_DECL (vsnprintf) #endif #ifdef __USE_ISOC99 # if !defined __USE_GNU && !defined __REDIRECT \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) __LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf) __LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf) __LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf) # else __LDBL_REDIR_DECL (vfscanf) __LDBL_REDIR_DECL (vsscanf) __LDBL_REDIR_DECL (vscanf) # endif #endif #ifdef __USE_XOPEN2K8 __LDBL_REDIR_DECL (vdprintf) __LDBL_REDIR_DECL (dprintf) #endif #ifdef __USE_GNU __LDBL_REDIR_DECL (vasprintf) __LDBL_REDIR_DECL (__asprintf) __LDBL_REDIR_DECL (asprintf) __LDBL_REDIR_DECL (obstack_printf) __LDBL_REDIR_DECL (obstack_vprintf) #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function __LDBL_REDIR_DECL (__sprintf_chk) __LDBL_REDIR_DECL (__vsprintf_chk) # if defined __USE_ISOC99 || defined __USE_UNIX98 __LDBL_REDIR_DECL (__snprintf_chk) __LDBL_REDIR_DECL (__vsnprintf_chk) # endif # if __USE_FORTIFY_LEVEL > 1 __LDBL_REDIR_DECL (__fprintf_chk) __LDBL_REDIR_DECL (__printf_chk) __LDBL_REDIR_DECL (__vfprintf_chk) __LDBL_REDIR_DECL (__vprintf_chk) # ifdef __USE_XOPEN2K8 __LDBL_REDIR_DECL (__dprintf_chk) __LDBL_REDIR_DECL (__vdprintf_chk) # endif # ifdef __USE_GNU __LDBL_REDIR_DECL (__asprintf_chk) __LDBL_REDIR_DECL (__vasprintf_chk) __LDBL_REDIR_DECL (__obstack_printf_chk) __LDBL_REDIR_DECL (__obstack_vprintf_chk) # endif # endif #endif PKZ/bits/initspin.hnu[/* No thread support. */ PKZC bits/stdlib.hnu[/* Checking macros for stdlib functions. Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDLIB_H # error "Never include directly; use instead." #endif extern char *__realpath_chk (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __THROW __wur; extern char *__REDIRECT_NTH (__realpath_alias, (const char *__restrict __name, char *__restrict __resolved), realpath) __wur; extern char *__REDIRECT_NTH (__realpath_chk_warn, (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen), __realpath_chk) __wur __warnattr ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"); __fortify_function __wur char * __NTH (realpath (const char *__restrict __name, char *__restrict __resolved)) { size_t sz = __glibc_objsize (__resolved); if (sz == (size_t) -1) return __realpath_alias (__name, __resolved); #if defined _LIBC_LIMITS_H_ && defined PATH_MAX if (__glibc_unsafe_len (PATH_MAX, sizeof (char), sz)) return __realpath_chk_warn (__name, __resolved, sz); #endif return __realpath_chk (__name, __resolved, sz); } extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __THROW __nonnull ((2)); extern int __REDIRECT_NTH (__ptsname_r_alias, (int __fd, char *__buf, size_t __buflen), ptsname_r) __nonnull ((2)); extern int __REDIRECT_NTH (__ptsname_r_chk_warn, (int __fd, char *__buf, size_t __buflen, size_t __nreal), __ptsname_r_chk) __nonnull ((2)) __warnattr ("ptsname_r called with buflen bigger than " "size of buf"); __fortify_function int __NTH (ptsname_r (int __fd, char *__buf, size_t __buflen)) { return __glibc_fortify (ptsname_r, __buflen, sizeof (char), __glibc_objsize (__buf), __fd, __buf, __buflen); } extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) __THROW __wur; extern int __REDIRECT_NTH (__wctomb_alias, (char *__s, wchar_t __wchar), wctomb) __wur; __fortify_function __wur int __NTH (wctomb (char *__s, wchar_t __wchar)) { /* We would have to include to get a definition of MB_LEN_MAX. But this would only disturb the namespace. So we define our own version here. */ #define __STDLIB_MB_LEN_MAX 16 #if defined MB_LEN_MAX && MB_LEN_MAX != __STDLIB_MB_LEN_MAX # error "Assumed value of MB_LEN_MAX wrong" #endif if (__glibc_objsize (__s) != (size_t) -1 && __STDLIB_MB_LEN_MAX > __glibc_objsize (__s)) return __wctomb_chk (__s, __wchar, __glibc_objsize (__s)); return __wctomb_alias (__s, __wchar); } extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __THROW; extern size_t __REDIRECT_NTH (__mbstowcs_alias, (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len), mbstowcs); extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn, (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen), __mbstowcs_chk) __warnattr ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"); __fortify_function size_t __NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)) { return __glibc_fortify_n (mbstowcs, __len, sizeof (wchar_t), __glibc_objsize (__dst), __dst, __src, __len); } extern size_t __wcstombs_chk (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __THROW; extern size_t __REDIRECT_NTH (__wcstombs_alias, (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len), wcstombs); extern size_t __REDIRECT_NTH (__wcstombs_chk_warn, (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen), __wcstombs_chk) __warnattr ("wcstombs called with dst buffer smaller than len"); __fortify_function size_t __NTH (wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)) { return __glibc_fortify (wcstombs, __len, sizeof (char), __glibc_objsize (__dst), __dst, __src, __len); } PKZ]51bits/termios.hnu[/* termios type and macro definitions. Linux version. Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _TERMIOS_H # error "Never include directly; use instead." #endif typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; #define NCCS 32 struct termios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ cc_t c_line; /* line discipline */ cc_t c_cc[NCCS]; /* control characters */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ #define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 #define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 }; /* c_cc characters */ #define VINTR 0 #define VQUIT 1 #define VERASE 2 #define VKILL 3 #define VEOF 4 #define VTIME 5 #define VMIN 6 #define VSWTC 7 #define VSTART 8 #define VSTOP 9 #define VSUSP 10 #define VEOL 11 #define VREPRINT 12 #define VDISCARD 13 #define VWERASE 14 #define VLNEXT 15 #define VEOL2 16 /* c_iflag bits */ #define IGNBRK 0000001 #define BRKINT 0000002 #define IGNPAR 0000004 #define PARMRK 0000010 #define INPCK 0000020 #define ISTRIP 0000040 #define INLCR 0000100 #define IGNCR 0000200 #define ICRNL 0000400 #define IUCLC 0001000 #define IXON 0002000 #define IXANY 0004000 #define IXOFF 0010000 #define IMAXBEL 0020000 #define IUTF8 0040000 /* c_oflag bits */ #define OPOST 0000001 #define OLCUC 0000002 #define ONLCR 0000004 #define OCRNL 0000010 #define ONOCR 0000020 #define ONLRET 0000040 #define OFILL 0000100 #define OFDEL 0000200 #if defined __USE_MISC || defined __USE_XOPEN # define NLDLY 0000400 # define NL0 0000000 # define NL1 0000400 # define CRDLY 0003000 # define CR0 0000000 # define CR1 0001000 # define CR2 0002000 # define CR3 0003000 # define TABDLY 0014000 # define TAB0 0000000 # define TAB1 0004000 # define TAB2 0010000 # define TAB3 0014000 # define BSDLY 0020000 # define BS0 0000000 # define BS1 0020000 # define FFDLY 0100000 # define FF0 0000000 # define FF1 0100000 #endif #define VTDLY 0040000 #define VT0 0000000 #define VT1 0040000 #ifdef __USE_MISC # define XTABS 0014000 #endif /* c_cflag bit meaning */ #ifdef __USE_MISC # define CBAUD 0010017 #endif #define B0 0000000 /* hang up */ #define B50 0000001 #define B75 0000002 #define B110 0000003 #define B134 0000004 #define B150 0000005 #define B200 0000006 #define B300 0000007 #define B600 0000010 #define B1200 0000011 #define B1800 0000012 #define B2400 0000013 #define B4800 0000014 #define B9600 0000015 #define B19200 0000016 #define B38400 0000017 #ifdef __USE_MISC # define EXTA B19200 # define EXTB B38400 #endif #define CSIZE 0000060 #define CS5 0000000 #define CS6 0000020 #define CS7 0000040 #define CS8 0000060 #define CSTOPB 0000100 #define CREAD 0000200 #define PARENB 0000400 #define PARODD 0001000 #define HUPCL 0002000 #define CLOCAL 0004000 #ifdef __USE_MISC # define CBAUDEX 0010000 #endif #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 #define __MAX_BAUD B4000000 #ifdef __USE_MISC # define CIBAUD 002003600000 /* input baud rate (not used) */ # define CMSPAR 010000000000 /* mark or space (stick) parity */ # define CRTSCTS 020000000000 /* flow control */ #endif /* c_lflag bits */ #define ISIG 0000001 #define ICANON 0000002 #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) # define XCASE 0000004 #endif #define ECHO 0000010 #define ECHOE 0000020 #define ECHOK 0000040 #define ECHONL 0000100 #define NOFLSH 0000200 #define TOSTOP 0000400 #ifdef __USE_MISC # define ECHOCTL 0001000 # define ECHOPRT 0002000 # define ECHOKE 0004000 # define FLUSHO 0010000 # define PENDIN 0040000 #endif #define IEXTEN 0100000 #ifdef __USE_MISC # define EXTPROC 0200000 #endif /* tcflow() and TCXONC use these */ #define TCOOFF 0 #define TCOON 1 #define TCIOFF 2 #define TCION 3 /* tcflush() and TCFLSH use these */ #define TCIFLUSH 0 #define TCOFLUSH 1 #define TCIOFLUSH 2 /* tcsetattr uses these */ #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 #define _IOT_termios /* Hurd ioctl type field. */ \ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) PKZ?rbits/siginfo-arch.hnu[/* Architecture-specific adjustments to siginfo_t. x86 version. */ #ifndef _BITS_SIGINFO_ARCH_H #define _BITS_SIGINFO_ARCH_H 1 #if defined __x86_64__ && __WORDSIZE == 32 /* si_utime and si_stime must be 4 byte aligned for x32 to match the kernel. We align siginfo_t to 8 bytes so that si_utime and si_stime are actually aligned to 8 bytes since their offsets are multiple of 8 bytes. Note: with some compilers, the alignment attribute would be ignored if it were put in __SI_CLOCK_T instead of encapsulated in a typedef. */ typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t; # define __SI_ALIGNMENT __attribute__ ((__aligned__ (8))) # define __SI_CLOCK_T __sigchld_clock_t #endif #endif PKZFbits/long-double.hnu[/* Properties of long double type. ldbl-96 version. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* long double is distinct from double, so there is nothing to define here. */ PKZ C<*<* bits/unistd.hnu[/* Checking macros for unistd functions. Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UNISTD_H # error "Never include directly; use instead." #endif extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __wur; extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf, size_t __nbytes), read) __wur; extern ssize_t __REDIRECT (__read_chk_warn, (int __fd, void *__buf, size_t __nbytes, size_t __buflen), __read_chk) __wur __warnattr ("read called with bigger length than size of " "the destination buffer"); __fortify_function __wur ssize_t read (int __fd, void *__buf, size_t __nbytes) { return __glibc_fortify (read, __nbytes, sizeof (char), __glibc_objsize0 (__buf), __fd, __buf, __nbytes); } #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __wur; extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __wur; extern ssize_t __REDIRECT (__pread_alias, (int __fd, void *__buf, size_t __nbytes, __off_t __offset), pread) __wur; extern ssize_t __REDIRECT (__pread64_alias, (int __fd, void *__buf, size_t __nbytes, __off64_t __offset), pread64) __wur; extern ssize_t __REDIRECT (__pread_chk_warn, (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize), __pread_chk) __wur __warnattr ("pread called with bigger length than size of " "the destination buffer"); extern ssize_t __REDIRECT (__pread64_chk_warn, (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize), __pread64_chk) __wur __warnattr ("pread64 called with bigger length than size of " "the destination buffer"); # ifndef __USE_FILE_OFFSET64 __fortify_function __wur ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) { return __glibc_fortify (pread, __nbytes, sizeof (char), __glibc_objsize0 (__buf), __fd, __buf, __nbytes, __offset); } # else __fortify_function __wur ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) { return __glibc_fortify (pread64, __nbytes, sizeof (char), __glibc_objsize0 (__buf), __fd, __buf, __nbytes, __offset); } # endif # ifdef __USE_LARGEFILE64 __fortify_function __wur ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) { return __glibc_fortify (pread64, __nbytes, sizeof (char), __glibc_objsize0 (__buf), __fd, __buf, __nbytes, __offset); } # endif #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K extern ssize_t __readlink_chk (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __THROW __nonnull ((1, 2)) __wur; extern ssize_t __REDIRECT_NTH (__readlink_alias, (const char *__restrict __path, char *__restrict __buf, size_t __len), readlink) __nonnull ((1, 2)) __wur; extern ssize_t __REDIRECT_NTH (__readlink_chk_warn, (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen), __readlink_chk) __nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length " "than size of destination buffer"); __fortify_function __nonnull ((1, 2)) __wur ssize_t __NTH (readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)) { return __glibc_fortify (readlink, __len, sizeof (char), __glibc_objsize (__buf), __path, __buf, __len); } #endif #ifdef __USE_ATFILE extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __THROW __nonnull ((2, 3)) __wur; extern ssize_t __REDIRECT_NTH (__readlinkat_alias, (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len), readlinkat) __nonnull ((2, 3)) __wur; extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn, (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen), __readlinkat_chk) __nonnull ((2, 3)) __wur __warnattr ("readlinkat called with bigger " "length than size of destination " "buffer"); __fortify_function __nonnull ((2, 3)) __wur ssize_t __NTH (readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)) { return __glibc_fortify (readlinkat, __len, sizeof (char), __glibc_objsize (__buf), __fd, __path, __buf, __len); } #endif extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) __THROW __wur; extern char *__REDIRECT_NTH (__getcwd_alias, (char *__buf, size_t __size), getcwd) __wur; extern char *__REDIRECT_NTH (__getcwd_chk_warn, (char *__buf, size_t __size, size_t __buflen), __getcwd_chk) __wur __warnattr ("getcwd caller with bigger length than size of " "destination buffer"); __fortify_function __wur char * __NTH (getcwd (char *__buf, size_t __size)) { return __glibc_fortify (getcwd, __size, sizeof (char), __glibc_objsize (__buf), __buf, __size); } #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED extern char *__getwd_chk (char *__buf, size_t buflen) __THROW __nonnull ((1)) __wur; extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd) __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd " "doesn't specify buffer size"); __fortify_function __nonnull ((1)) __attribute_deprecated__ __wur char * __NTH (getwd (char *__buf)) { if (__glibc_objsize (__buf) != (size_t) -1) return __getwd_chk (__buf, __glibc_objsize (__buf)); return __getwd_warn (__buf); } #endif extern size_t __confstr_chk (int __name, char *__buf, size_t __len, size_t __buflen) __THROW; extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf, size_t __len), confstr); extern size_t __REDIRECT_NTH (__confstr_chk_warn, (int __name, char *__buf, size_t __len, size_t __buflen), __confstr_chk) __warnattr ("confstr called with bigger length than size of destination " "buffer"); __fortify_function size_t __NTH (confstr (int __name, char *__buf, size_t __len)) { return __glibc_fortify (confstr, __len, sizeof (char), __glibc_objsize (__buf), __name, __buf, __len); } extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) __THROW __wur; extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]), getgroups) __wur; extern int __REDIRECT_NTH (__getgroups_chk_warn, (int __size, __gid_t __list[], size_t __listlen), __getgroups_chk) __wur __warnattr ("getgroups called with bigger group count than what " "can fit into destination buffer"); __fortify_function int __NTH (getgroups (int __size, __gid_t __list[])) { return __glibc_fortify (getgroups, __size, sizeof (__gid_t), __glibc_objsize (__list), __size, __list); } extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, size_t __nreal) __THROW __nonnull ((2)); extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf, size_t __buflen), ttyname_r) __nonnull ((2)); extern int __REDIRECT_NTH (__ttyname_r_chk_warn, (int __fd, char *__buf, size_t __buflen, size_t __nreal), __ttyname_r_chk) __nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than " "size of destination buffer"); __fortify_function int __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen)) { return __glibc_fortify (ttyname_r, __buflen, sizeof (char), __glibc_objsize (__buf), __fd, __buf, __buflen); } #ifdef __USE_POSIX199506 extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) __nonnull ((1)); extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen), getlogin_r) __nonnull ((1)); extern int __REDIRECT (__getlogin_r_chk_warn, (char *__buf, size_t __buflen, size_t __nreal), __getlogin_r_chk) __nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than " "size of destination buffer"); __fortify_function int getlogin_r (char *__buf, size_t __buflen) { return __glibc_fortify (getlogin_r, __buflen, sizeof (char), __glibc_objsize (__buf), __buf, __buflen); } #endif #if defined __USE_MISC || defined __USE_UNIX98 extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) __THROW __nonnull ((1)); extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen), gethostname) __nonnull ((1)); extern int __REDIRECT_NTH (__gethostname_chk_warn, (char *__buf, size_t __buflen, size_t __nreal), __gethostname_chk) __nonnull ((1)) __warnattr ("gethostname called with bigger buflen than " "size of destination buffer"); __fortify_function int __NTH (gethostname (char *__buf, size_t __buflen)) { return __glibc_fortify (gethostname, __buflen, sizeof (char), __glibc_objsize (__buf), __buf, __buflen); } #endif #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98) extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) __THROW __nonnull ((1)) __wur; extern int __REDIRECT_NTH (__getdomainname_alias, (char *__buf, size_t __buflen), getdomainname) __nonnull ((1)) __wur; extern int __REDIRECT_NTH (__getdomainname_chk_warn, (char *__buf, size_t __buflen, size_t __nreal), __getdomainname_chk) __nonnull ((1)) __wur __warnattr ("getdomainname called with bigger " "buflen than size of destination " "buffer"); __fortify_function int __NTH (getdomainname (char *__buf, size_t __buflen)) { return __glibc_fortify (getdomainname, __buflen, sizeof (char), __glibc_objsize (__buf), __buf, __buflen); } #endif PKZTvbits/semaphore.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." #endif #include #if __WORDSIZE == 64 # define __SIZEOF_SEM_T 32 #else # define __SIZEOF_SEM_T 16 #endif /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) typedef union { char __size[__SIZEOF_SEM_T]; long int __align; } sem_t; PKZ55bits/fcntl-linux.hnu[/* O_*, F_*, FD_* bit values for Linux. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FCNTL_H # error "Never use directly; include instead." #endif /* This file contains shared definitions between Linux architectures and is included by to declare them. The various #ifndef cases allow the architecture specific file to define those values with different values. A minimal contains just: struct flock {...} #ifdef __USE_LARGEFILE64 struct flock64 {...} #endif #include */ #ifdef __USE_GNU # include #endif /* open/fcntl. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 #define O_RDWR 02 #ifndef O_CREAT # define O_CREAT 0100 /* Not fcntl. */ #endif #ifndef O_EXCL # define O_EXCL 0200 /* Not fcntl. */ #endif #ifndef O_NOCTTY # define O_NOCTTY 0400 /* Not fcntl. */ #endif #ifndef O_TRUNC # define O_TRUNC 01000 /* Not fcntl. */ #endif #ifndef O_APPEND # define O_APPEND 02000 #endif #ifndef O_NONBLOCK # define O_NONBLOCK 04000 #endif #ifndef O_NDELAY # define O_NDELAY O_NONBLOCK #endif #ifndef O_SYNC # define O_SYNC 04010000 #endif #define O_FSYNC O_SYNC #ifndef O_ASYNC # define O_ASYNC 020000 #endif #ifndef __O_LARGEFILE # define __O_LARGEFILE 0100000 #endif #ifndef __O_DIRECTORY # define __O_DIRECTORY 0200000 #endif #ifndef __O_NOFOLLOW # define __O_NOFOLLOW 0400000 #endif #ifndef __O_CLOEXEC # define __O_CLOEXEC 02000000 #endif #ifndef __O_DIRECT # define __O_DIRECT 040000 #endif #ifndef __O_NOATIME # define __O_NOATIME 01000000 #endif #ifndef __O_PATH # define __O_PATH 010000000 #endif #ifndef __O_DSYNC # define __O_DSYNC 010000 #endif #ifndef __O_TMPFILE # define __O_TMPFILE (020000000 | __O_DIRECTORY) #endif #ifndef F_GETLK # ifndef __USE_FILE_OFFSET64 # define F_GETLK 5 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ # define F_SETLKW 7 /* Set record locking info (blocking). */ # else # define F_GETLK F_GETLK64 /* Get record locking info. */ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ # endif #endif #ifndef F_GETLK64 # define F_GETLK64 12 /* Get record locking info. */ # define F_SETLK64 13 /* Set record locking info (non-blocking). */ # define F_SETLKW64 14 /* Set record locking info (blocking). */ #endif /* open file description locks. Usually record locks held by a process are released on *any* close and are not inherited across a fork. These cmd values will set locks that conflict with process-associated record locks, but are "owned" by the opened file description, not the process. This means that they are inherited across fork or clone with CLONE_FILES like BSD (flock) locks, and they are only released automatically when the last reference to the the file description against which they were acquired is put. */ #ifdef __USE_GNU # define F_OFD_GETLK 36 # define F_OFD_SETLK 37 # define F_OFD_SETLKW 38 #endif #ifdef __USE_LARGEFILE64 # define O_LARGEFILE __O_LARGEFILE #endif #ifdef __USE_XOPEN2K8 # define O_DIRECTORY __O_DIRECTORY /* Must be a directory. */ # define O_NOFOLLOW __O_NOFOLLOW /* Do not follow links. */ # define O_CLOEXEC __O_CLOEXEC /* Set close_on_exec. */ #endif #ifdef __USE_GNU # define O_DIRECT __O_DIRECT /* Direct disk access. */ # define O_NOATIME __O_NOATIME /* Do not set atime. */ # define O_PATH __O_PATH /* Resolve pathname but do not open file. */ # define O_TMPFILE __O_TMPFILE /* Atomically create nameless file. */ #endif /* For now, Linux has no separate synchronicity options for read operations. We define O_RSYNC therefore as the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 # define O_DSYNC __O_DSYNC /* Synchronize data. */ # if defined __O_RSYNC # define O_RSYNC __O_RSYNC /* Synchronize read operations. */ # else # define O_RSYNC O_SYNC /* Synchronize read operations. */ # endif #endif /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ #ifndef __F_SETOWN # define __F_SETOWN 8 # define __F_GETOWN 9 #endif #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_SETOWN __F_SETOWN /* Get owner (process receiving SIGIO). */ # define F_GETOWN __F_GETOWN /* Set owner (process receiving SIGIO). */ #endif #ifndef __F_SETSIG # define __F_SETSIG 10 /* Set number of signal to be sent. */ # define __F_GETSIG 11 /* Get number of signal to be sent. */ #endif #ifndef __F_SETOWN_EX # define __F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ # define __F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU # define F_SETSIG __F_SETSIG /* Set number of signal to be sent. */ # define F_GETSIG __F_GETSIG /* Get number of signal to be sent. */ # define F_SETOWN_EX __F_SETOWN_EX /* Get owner (thread receiving SIGIO). */ # define F_GETOWN_EX __F_GETOWN_EX /* Set owner (thread receiving SIGIO). */ #endif #ifdef __USE_GNU # define F_SETLEASE 1024 /* Set a lease. */ # define F_GETLEASE 1025 /* Enquire what lease is active. */ # define F_NOTIFY 1026 /* Request notifications on a directory. */ # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ # define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ # define F_ADD_SEALS 1033 /* Add seals to file. */ # define F_GET_SEALS 1034 /* Get seals for file. */ /* Set / get write life time hints. */ # define F_GET_RW_HINT 1035 # define F_SET_RW_HINT 1036 # define F_GET_FILE_RW_HINT 1037 # define F_SET_FILE_RW_HINT 1038 #endif #ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with close-on-exit set. */ #endif /* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* Actually anything with low bit set goes */ #ifndef F_RDLCK /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ # define F_RDLCK 0 /* Read lock. */ # define F_WRLCK 1 /* Write lock. */ # define F_UNLCK 2 /* Remove lock. */ #endif /* For old implementation of BSD flock. */ #ifndef F_EXLCK # define F_EXLCK 4 /* or 3 */ # define F_SHLCK 8 /* or 4 */ #endif #ifdef __USE_MISC /* Operations for BSD flock, also used by the kernel implementation. */ # define LOCK_SH 1 /* Shared lock. */ # define LOCK_EX 2 /* Exclusive lock. */ # define LOCK_NB 4 /* Or'd with one of the above to prevent blocking. */ # define LOCK_UN 8 /* Remove lock. */ #endif #ifdef __USE_GNU # define LOCK_MAND 32 /* This is a mandatory flock: */ # define LOCK_READ 64 /* ... which allows concurrent read operations. */ # define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ # define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ #endif #ifdef __USE_GNU /* Types of directory notifications that may be requested with F_NOTIFY. */ # define DN_ACCESS 0x00000001 /* File accessed. */ # define DN_MODIFY 0x00000002 /* File modified. */ # define DN_CREATE 0x00000004 /* File created. */ # define DN_DELETE 0x00000008 /* File removed. */ # define DN_RENAME 0x00000010 /* File renamed. */ # define DN_ATTRIB 0x00000020 /* File changed attributes. */ # define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ #endif #ifdef __USE_GNU /* Owner types. */ enum __pid_type { F_OWNER_TID = 0, /* Kernel thread. */ F_OWNER_PID, /* Process. */ F_OWNER_PGRP, /* Process group. */ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ }; /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ struct f_owner_ex { enum __pid_type type; /* Owner type of ID. */ __pid_t pid; /* ID of owner. */ }; #endif #ifdef __USE_GNU /* Types of seals. */ # define F_SEAL_SEAL 0x0001 /* Prevent further seals from being set. */ # define F_SEAL_SHRINK 0x0002 /* Prevent file from shrinking. */ # define F_SEAL_GROW 0x0004 /* Prevent file from growing. */ # define F_SEAL_WRITE 0x0008 /* Prevent writes. */ #endif #ifdef __USE_GNU /* Hint values for F_{GET,SET}_RW_HINT. */ # define RWH_WRITE_LIFE_NOT_SET 0 # define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET # define RWH_WRITE_LIFE_NONE 1 # define RWH_WRITE_LIFE_SHORT 2 # define RWH_WRITE_LIFE_MEDIUM 3 # define RWH_WRITE_LIFE_LONG 4 # define RWH_WRITE_LIFE_EXTREME 5 #endif /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_MISC # define FAPPEND O_APPEND # define FFSYNC O_FSYNC # define FASYNC O_ASYNC # define FNONBLOCK O_NONBLOCK # define FNDELAY O_NDELAY #endif /* Use misc. */ #ifndef __POSIX_FADV_DONTNEED # define __POSIX_FADV_DONTNEED 4 # define __POSIX_FADV_NOREUSE 5 #endif /* Advise to `posix_fadvise'. */ #ifdef __USE_XOPEN2K # define POSIX_FADV_NORMAL 0 /* No further special treatment. */ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ # define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_FADV_DONTNEED __POSIX_FADV_DONTNEED /* Don't need these pages. */ # define POSIX_FADV_NOREUSE __POSIX_FADV_NOREUSE /* Data will be accessed once. */ #endif #ifdef __USE_GNU /* Flags for SYNC_FILE_RANGE. */ # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages in the range before performing the write. */ # define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those dirty pages in the range which are not presently under writeback. */ # define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in the range after performing the write. */ /* Flags for SPLICE and VMSPLICE. */ # define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ # define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing (but we may still block on the fd we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ /* Flags for fallocate. */ # include /* File handle structure. */ struct file_handle { unsigned int handle_bytes; int handle_type; /* File identifier. */ unsigned char f_handle[0]; }; /* Maximum handle size (for now). */ # define MAX_HANDLE_SZ 128 #endif __BEGIN_DECLS #ifdef __USE_GNU /* Provide kernel hint to read ahead. */ extern __ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; /* Selective file content synch'ing. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); /* Splice address range into a pipe. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, __off64_t *__offout, size_t __len, unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); /* Reserve storage for the data of the file associated with FD. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else # ifdef __REDIRECT extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, __off64_t __len), fallocate64); # else # define fallocate fallocate64 # endif # endif # ifdef __USE_LARGEFILE64 extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); # endif /* Map file name to file handle. */ extern int name_to_handle_at (int __dfd, const char *__name, struct file_handle *__handle, int *__mnt_id, int __flags) __THROW; /* Open file using the file handle. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, int __flags); #endif /* use GNU */ __END_DECLS PKZsK bits/sysctl.hnu[/* Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if defined __x86_64__ && defined __ILP32__ # error "sysctl system call is unsupported in x32 kernel" #endif PKZl'  bits/mman.hnu[/* Definitions for POSIX memory map interface. Linux/x86_64 version. Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MMAN_H # error "Never use directly; include instead." #endif /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ /* Other flags. */ #ifdef __USE_MISC # define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ #endif /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ # define MAP_DENYWRITE 0x00800 /* ETXTBSY */ # define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ # define MAP_LOCKED 0x02000 /* Lock the mapping. */ # define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ # define MAP_SYNC 0x80000 /* Perform synchronous page faults for the mapping. */ # define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ #endif /* Include generic Linux declarations. */ #include PKZobits/ipctypes.hnu[/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_IPC_H # error "Never use directly; include instead." #endif #ifndef _BITS_IPCTYPES_H #define _BITS_IPCTYPES_H 1 /* Used in `struct shmid_ds'. */ # ifdef __x86_64__ typedef int __ipc_pid_t; # else typedef unsigned short int __ipc_pid_t; # endif #endif /* bits/ipctypes.h */ PKZk$$$bits/syslog-path.hnu[/* -- _PATH_LOG definition Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SYSLOG_H # error "Never include this file directly. Use instead" #endif #ifndef _BITS_SYSLOG_PATH_H #define _BITS_SYSLOG_PATH_H 1 #define _PATH_LOG "/dev/log" #endif /* bits/syslog-path.h */ PKZ aabits/stdlib-bsearch.hnu[/* Perform binary search - inline version. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ __extern_inline void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) { size_t __l, __u, __idx; const void *__p; int __comparison; __l = 0; __u = __nmemb; while (__l < __u) { __idx = (__l + __u) / 2; __p = (void *) (((const char *) __base) + (__idx * __size)); __comparison = (*__compar) (__key, __p); if (__comparison < 0) __u = __idx; else if (__comparison > 0) __l = __idx + 1; else return (void *) __p; } return NULL; } PKZK$&$&bits/floatn-common.hnu[/* Macros to control TS 18661-3 glibc features where the same definitions are appropriate for all platforms. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_FLOATN_COMMON_H #define _BITS_FLOATN_COMMON_H #include #include /* This header should be included at the bottom of each bits/floatn.h. It defines the following macros for each _FloatN and _FloatNx type, where the same definitions, or definitions based only on the macros in bits/floatn.h, are appropriate for all glibc configurations. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for this type, and this glibc includes corresponding *fN or *fNx interfaces for it. */ #define __HAVE_FLOAT16 0 #define __HAVE_FLOAT32 1 #define __HAVE_FLOAT64 1 #define __HAVE_FLOAT32X 1 #define __HAVE_FLOAT128X 0 /* Defined to 1 if the corresponding __HAVE_ macro is 1 and the type is the first with its format in the sequence of (the default choices for) float, double, long double, _Float16, _Float32, _Float64, _Float128, _Float32x, _Float64x, _Float128x for this glibc; that is, if functions present once per floating-point format rather than once per type are present for this type. All configurations supported by glibc have _Float32 the same format as float, _Float64 and _Float32x the same format as double, the _Float64x the same format as either long double or _Float128. No configurations support _Float128x or, as of GCC 7, have compiler support for a type meeting the requirements for _Float128x. */ #define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16 #define __HAVE_DISTINCT_FLOAT32 0 #define __HAVE_DISTINCT_FLOAT64 0 #define __HAVE_DISTINCT_FLOAT32X 0 #define __HAVE_DISTINCT_FLOAT64X 0 #define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X /* Defined to 1 if the corresponding _FloatN type is not binary compatible with the corresponding ISO C type in the current compilation unit as opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built in glibc. */ #define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 \ && __LDBL_MANT_DIG__ != 113) /* Defined to 1 if any _FloatN or _FloatNx types that are not ABI-distinct are however distinct types at the C language level (so for the purposes of __builtin_types_compatible_p and _Generic). */ #if __GNUC_PREREQ (7, 0) && !defined __cplusplus # define __HAVE_FLOATN_NOT_TYPEDEF 1 #else # define __HAVE_FLOATN_NOT_TYPEDEF 0 #endif #ifndef __ASSEMBLER__ /* Defined to concatenate the literal suffix to be used with _FloatN or _FloatNx types, if __HAVE_ is 1. The corresponding literal suffixes exist since GCC 7, for C only. */ # if __HAVE_FLOAT16 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus /* No corresponding suffix available for this type. */ # define __f16(x) ((_Float16) x##f) # else # define __f16(x) x##f16 # endif # endif # if __HAVE_FLOAT32 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # define __f32(x) x##f # else # define __f32(x) x##f32 # endif # endif # if __HAVE_FLOAT64 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # ifdef __NO_LONG_DOUBLE_MATH # define __f64(x) x##l # else # define __f64(x) x # endif # else # define __f64(x) x##f64 # endif # endif # if __HAVE_FLOAT32X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # define __f32x(x) x # else # define __f32x(x) x##f32x # endif # endif # if __HAVE_FLOAT64X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # if __HAVE_FLOAT64X_LONG_DOUBLE # define __f64x(x) x##l # else # define __f64x(x) __f128 (x) # endif # else # define __f64x(x) x##f64x # endif # endif # if __HAVE_FLOAT128X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # error "_Float128X supported but no constant suffix" # else # define __f128x(x) x##f128x # endif # endif /* Defined to a complex type if __HAVE_ is 1. */ # if __HAVE_FLOAT16 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # define __CFLOAT16 __cfloat16 # else # define __CFLOAT16 _Complex _Float16 # endif # endif # if __HAVE_FLOAT32 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # define __CFLOAT32 _Complex float # else # define __CFLOAT32 _Complex _Float32 # endif # endif # if __HAVE_FLOAT64 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # ifdef __NO_LONG_DOUBLE_MATH # define __CFLOAT64 _Complex long double # else # define __CFLOAT64 _Complex double # endif # else # define __CFLOAT64 _Complex _Float64 # endif # endif # if __HAVE_FLOAT32X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # define __CFLOAT32X _Complex double # else # define __CFLOAT32X _Complex _Float32x # endif # endif # if __HAVE_FLOAT64X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # if __HAVE_FLOAT64X_LONG_DOUBLE # define __CFLOAT64X _Complex long double # else # define __CFLOAT64X __CFLOAT128 # endif # else # define __CFLOAT64X _Complex _Float64x # endif # endif # if __HAVE_FLOAT128X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # error "_Float128X supported but no complex type" # else # define __CFLOAT128X _Complex _Float128x # endif # endif /* The remaining of this file provides support for older compilers. */ # if __HAVE_FLOAT16 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef float _Float16 __attribute__ ((__mode__ (__HF__))); # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf16() ((_Float16) __builtin_huge_val ()) # define __builtin_inff16() ((_Float16) __builtin_inf ()) # define __builtin_nanf16(x) ((_Float16) __builtin_nan (x)) # define __builtin_nansf16(x) ((_Float16) __builtin_nans (x)) # endif # endif # if __HAVE_FLOAT32 # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef float _Float32; # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf32() (__builtin_huge_valf ()) # define __builtin_inff32() (__builtin_inff ()) # define __builtin_nanf32(x) (__builtin_nanf (x)) # define __builtin_nansf32(x) (__builtin_nansf (x)) # endif # endif # if __HAVE_FLOAT64 /* If double, long double and _Float64 all have the same set of values, TS 18661-3 requires the usual arithmetic conversions on long double and _Float64 to produce _Float64. For this to be the case when building with a compiler without a distinct _Float64 type, _Float64 must be a typedef for long double, not for double. */ # ifdef __NO_LONG_DOUBLE_MATH # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef long double _Float64; # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf64() (__builtin_huge_vall ()) # define __builtin_inff64() (__builtin_infl ()) # define __builtin_nanf64(x) (__builtin_nanl (x)) # define __builtin_nansf64(x) (__builtin_nansl (x)) # endif # else # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef double _Float64; # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf64() (__builtin_huge_val ()) # define __builtin_inff64() (__builtin_inf ()) # define __builtin_nanf64(x) (__builtin_nan (x)) # define __builtin_nansf64(x) (__builtin_nans (x)) # endif # endif # endif # if __HAVE_FLOAT32X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef double _Float32x; # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf32x() (__builtin_huge_val ()) # define __builtin_inff32x() (__builtin_inf ()) # define __builtin_nanf32x(x) (__builtin_nan (x)) # define __builtin_nansf32x(x) (__builtin_nans (x)) # endif # endif # if __HAVE_FLOAT64X # if __HAVE_FLOAT64X_LONG_DOUBLE # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef long double _Float64x; # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf64x() (__builtin_huge_vall ()) # define __builtin_inff64x() (__builtin_infl ()) # define __builtin_nanf64x(x) (__builtin_nanl (x)) # define __builtin_nansf64x(x) (__builtin_nansl (x)) # endif # else # if !__GNUC_PREREQ (7, 0) || defined __cplusplus typedef _Float128 _Float64x; # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf64x() (__builtin_huge_valf128 ()) # define __builtin_inff64x() (__builtin_inff128 ()) # define __builtin_nanf64x(x) (__builtin_nanf128 (x)) # define __builtin_nansf64x(x) (__builtin_nansf128 (x)) # endif # endif # endif # if __HAVE_FLOAT128X # if !__GNUC_PREREQ (7, 0) || defined __cplusplus # error "_Float128x supported but no type" # endif # if !__GNUC_PREREQ (7, 0) # define __builtin_huge_valf128x() ((_Float128x) __builtin_huge_val ()) # define __builtin_inff128x() ((_Float128x) __builtin_inf ()) # define __builtin_nanf128x(x) ((_Float128x) __builtin_nan (x)) # define __builtin_nansf128x(x) ((_Float128x) __builtin_nans (x)) # endif # endif #endif /* !__ASSEMBLER__. */ #endif /* _BITS_FLOATN_COMMON_H */ PKZmȸ/ / bits/libc-header-start.hnu[/* Handle feature test macros at the start of a header. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include directly." #endif #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) # define __GLIBC_USE_LIB_EXT2 1 #else # define __GLIBC_USE_LIB_EXT2 0 #endif /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif PKZ. bits/dirent.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _DIRENT_H # error "Never use directly; include instead." #endif struct dirent { #ifndef __USE_FILE_OFFSET64 __ino_t d_ino; __off_t d_off; #else __ino64_t d_ino; __off64_t d_off; #endif unsigned short int d_reclen; unsigned char d_type; char d_name[256]; /* We must not include limits.h! */ }; #ifdef __USE_LARGEFILE64 struct dirent64 { __ino64_t d_ino; __off64_t d_off; unsigned short int d_reclen; unsigned char d_type; char d_name[256]; /* We must not include limits.h! */ }; #endif #define d_fileno d_ino /* Backwards compatibility. */ #undef _DIRENT_HAVE_D_NAMLEN #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF #define _DIRENT_HAVE_D_TYPE #if defined __OFF_T_MATCHES_OFF64_T && defined __INO_T_MATCHES_INO64_T /* Inform libc code that these two types are effectively identical. */ # define _DIRENT_MATCHES_DIRENT64 1 #else # define _DIRENT_MATCHES_DIRENT64 0 #endif PKZMB|| bits/statfs.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_STATFS_H # error "Never include directly; use instead." #endif #include struct statfs { __fsword_t f_type; __fsword_t f_bsize; #ifndef __USE_FILE_OFFSET64 __fsblkcnt_t f_blocks; __fsblkcnt_t f_bfree; __fsblkcnt_t f_bavail; __fsfilcnt_t f_files; __fsfilcnt_t f_ffree; #else __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; #endif __fsid_t f_fsid; __fsword_t f_namelen; __fsword_t f_frsize; __fsword_t f_flags; __fsword_t f_spare[4]; }; #ifdef __USE_LARGEFILE64 struct statfs64 { __fsword_t f_type; __fsword_t f_bsize; __fsblkcnt64_t f_blocks; __fsblkcnt64_t f_bfree; __fsblkcnt64_t f_bavail; __fsfilcnt64_t f_files; __fsfilcnt64_t f_ffree; __fsid_t f_fsid; __fsword_t f_namelen; __fsword_t f_frsize; __fsword_t f_flags; __fsword_t f_spare[4]; }; #endif /* Tell code we have these members. */ #define _STATFS_F_NAMELEN #define _STATFS_F_FRSIZE #define _STATFS_F_FLAGS PKZbŢbits/uintn-identity.hnu[/* Inline functions to return unsigned integer values unchanged. Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include or instead." #endif #ifndef _BITS_UINTN_IDENTITY_H #define _BITS_UINTN_IDENTITY_H 1 #include /* These inline functions are to ensure the appropriate type conversions and associated diagnostics from macros that convert to a given endianness. */ static __inline __uint16_t __uint16_identity (__uint16_t __x) { return __x; } static __inline __uint32_t __uint32_identity (__uint32_t __x) { return __x; } static __inline __uint64_t __uint64_identity (__uint64_t __x) { return __x; } #endif /* _BITS_UINTN_IDENTITY_H. */ PKZ)v-4**bits/cmathcalls.hnu[/* Prototype declarations for complex math functions; helper file for . Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* NOTE: Because of the special way this file is used by , this file must NOT be protected from multiple inclusion as header files usually are. This file provides prototype declarations for the math functions. Most functions are declared using the macro: __MATHCALL (NAME, (ARGS...)); This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. Functions returning other types like `int' are declared using the macro: __MATHDECL (TYPE, NAME, (ARGS...)); This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. */ #ifndef _COMPLEX_H #error "Never use directly; include instead." #endif #ifndef _Mdouble_complex_ # define _Mdouble_complex_ _Mdouble_ _Complex #endif /* Trigonometric functions. */ /* Arc cosine of Z. */ __MATHCALL (cacos, (_Mdouble_complex_ __z)); /* Arc sine of Z. */ __MATHCALL (casin, (_Mdouble_complex_ __z)); /* Arc tangent of Z. */ __MATHCALL (catan, (_Mdouble_complex_ __z)); /* Cosine of Z. */ __MATHCALL (ccos, (_Mdouble_complex_ __z)); /* Sine of Z. */ __MATHCALL (csin, (_Mdouble_complex_ __z)); /* Tangent of Z. */ __MATHCALL (ctan, (_Mdouble_complex_ __z)); /* Hyperbolic functions. */ /* Hyperbolic arc cosine of Z. */ __MATHCALL (cacosh, (_Mdouble_complex_ __z)); /* Hyperbolic arc sine of Z. */ __MATHCALL (casinh, (_Mdouble_complex_ __z)); /* Hyperbolic arc tangent of Z. */ __MATHCALL (catanh, (_Mdouble_complex_ __z)); /* Hyperbolic cosine of Z. */ __MATHCALL (ccosh, (_Mdouble_complex_ __z)); /* Hyperbolic sine of Z. */ __MATHCALL (csinh, (_Mdouble_complex_ __z)); /* Hyperbolic tangent of Z. */ __MATHCALL (ctanh, (_Mdouble_complex_ __z)); /* Exponential and logarithmic functions. */ /* Exponential function of Z. */ __MATHCALL (cexp, (_Mdouble_complex_ __z)); /* Natural logarithm of Z. */ __MATHCALL (clog, (_Mdouble_complex_ __z)); #ifdef __USE_GNU /* The base 10 logarithm is not defined by the standard but to implement the standard C++ library it is handy. */ __MATHCALL (clog10, (_Mdouble_complex_ __z)); #endif /* Power functions. */ /* Return X to the Y power. */ __MATHCALL (cpow, (_Mdouble_complex_ __x, _Mdouble_complex_ __y)); /* Return the square root of Z. */ __MATHCALL (csqrt, (_Mdouble_complex_ __z)); /* Absolute value, conjugates, and projection. */ /* Absolute value of Z. */ __MATHDECL (_Mdouble_,cabs, (_Mdouble_complex_ __z)); /* Argument value of Z. */ __MATHDECL (_Mdouble_,carg, (_Mdouble_complex_ __z)); /* Complex conjugate of Z. */ __MATHCALL (conj, (_Mdouble_complex_ __z)); /* Projection of Z onto the Riemann sphere. */ __MATHCALL (cproj, (_Mdouble_complex_ __z)); /* Decomposing complex values. */ /* Imaginary part of Z. */ __MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z)); /* Real part of Z. */ __MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z)); PKZnbits/uio-ext.hnu[/* Operating system-specific extensions to sys/uio.h - Linux version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_UIO_EXT_H #define _BITS_UIO_EXT_H 1 #ifndef _SYS_UIO_H # error "Never include directly; use instead." #endif __BEGIN_DECLS /* Read from another process' address space. */ extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __THROW; /* Write to another process' address space. */ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __THROW; /* Flags for preadv2/pwritev2. */ #define RWF_HIPRI 0x00000001 /* High priority request. */ #define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC. */ #define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */ #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ #define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ __END_DECLS #endif /* bits/uio-ext.h */ PKZiIbits/sockaddr.hnu[/* Definition of struct sockaddr_* common members and sizes, generic version. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #ifndef _BITS_SOCKADDR_H #define _BITS_SOCKADDR_H 1 /* POSIX.1g specifies this type name for the `sa_family' member. */ typedef unsigned short int sa_family_t; /* This macro is used to declare the initial common members of the data types used for socket addresses, `struct sockaddr', `struct sockaddr_in', `struct sockaddr_un', etc. */ #define __SOCKADDR_COMMON(sa_prefix) \ sa_family_t sa_prefix##family #define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) /* Size of struct sockaddr_storage. */ #define _SS_SIZE 128 #endif /* bits/sockaddr.h */ PKZ HHform.hnu[/**************************************************************************** * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /**************************************************************************** * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /* $Id: form.h,v 0.27 2017/02/11 16:35:42 tom Exp $ */ #ifndef FORM_H #define FORM_H /* *INDENT-OFF*/ #include #include #ifdef __cplusplus extern "C" { #endif #ifndef FORM_PRIV_H typedef void *FIELD_CELL; #endif #ifndef NCURSES_FIELD_INTERNALS #define NCURSES_FIELD_INTERNALS /* nothing */ #endif typedef int Form_Options; typedef int Field_Options; /********** * _PAGE * **********/ typedef struct pagenode #if !NCURSES_OPAQUE_FORM { short pmin; /* index of first field on page */ short pmax; /* index of last field on page */ short smin; /* index of top leftmost field on page */ short smax; /* index of bottom rightmost field on page */ } #endif /* !NCURSES_OPAQUE_FORM */ _PAGE; /********** * FIELD * **********/ typedef struct fieldnode #if 1 /* not yet: !NCURSES_OPAQUE_FORM */ { unsigned short status; /* flags */ short rows; /* size in rows */ short cols; /* size in cols */ short frow; /* first row */ short fcol; /* first col */ int drows; /* dynamic rows */ int dcols; /* dynamic cols */ int maxgrow; /* maximum field growth */ int nrow; /* off-screen rows */ short nbuf; /* additional buffers */ short just; /* justification */ short page; /* page on form */ short index; /* into form -> field */ int pad; /* pad character */ chtype fore; /* foreground attribute */ chtype back; /* background attribute */ Field_Options opts; /* options */ struct fieldnode * snext; /* sorted order pointer */ struct fieldnode * sprev; /* sorted order pointer */ struct fieldnode * link; /* linked field chain */ struct formnode * form; /* containing form */ struct typenode * type; /* field type */ void * arg; /* argument for type */ FIELD_CELL * buf; /* field buffers */ void * usrptr; /* user pointer */ /* * The wide-character configuration requires extra information. Because * there are existing applications that manipulate the members of FIELD * directly, we cannot make the struct opaque, except by changing the ABI. * Offsets of members up to this point are the same in the narrow- and * wide-character configuration. But note that the type of buf depends on * the configuration, and is made opaque for that reason. */ NCURSES_FIELD_INTERNALS } #endif /* NCURSES_OPAQUE_FORM */ FIELD; /********* * FORM * *********/ typedef struct formnode #if 1 /* not yet: !NCURSES_OPAQUE_FORM */ { unsigned short status; /* flags */ short rows; /* size in rows */ short cols; /* size in cols */ int currow; /* current row in field window */ int curcol; /* current col in field window */ int toprow; /* in scrollable field window */ int begincol; /* in horiz. scrollable field */ short maxfield; /* number of fields */ short maxpage; /* number of pages */ short curpage; /* index into page */ Form_Options opts; /* options */ WINDOW * win; /* window */ WINDOW * sub; /* subwindow */ WINDOW * w; /* window for current field */ FIELD ** field; /* field [maxfield] */ FIELD * current; /* current field */ _PAGE * page; /* page [maxpage] */ void * usrptr; /* user pointer */ void (*forminit)(struct formnode *); void (*formterm)(struct formnode *); void (*fieldinit)(struct formnode *); void (*fieldterm)(struct formnode *); } #endif /* !NCURSES_OPAQUE_FORM */ FORM; /************** * FIELDTYPE * **************/ typedef struct typenode #if !NCURSES_OPAQUE_FORM { unsigned short status; /* flags */ long ref; /* reference count */ struct typenode * left; /* ptr to operand for | */ struct typenode * right; /* ptr to operand for | */ void* (*makearg)(va_list *); /* make fieldtype arg */ void* (*copyarg)(const void *); /* copy fieldtype arg */ void (*freearg)(void *); /* free fieldtype arg */ #if NCURSES_INTEROP_FUNCS union { bool (*ofcheck)(FIELD *,const void *); /* field validation */ bool (*gfcheck)(FORM*,FIELD *,const void*); /* generic field validation */ } fieldcheck; union { bool (*occheck)(int,const void *); /* character validation */ bool (*gccheck)(int,FORM*, FIELD*,const void*); /* generic char validation */ } charcheck; union { bool (*onext)(FIELD *,const void *); /* enumerate next value */ bool (*gnext)(FORM*,FIELD*,const void*); /* generic enumerate next */ } enum_next; union { bool (*oprev)(FIELD *,const void *); /* enumerate prev value */ bool (*gprev)(FORM*,FIELD*,const void*); /* generic enumerate prev */ } enum_prev; void* (*genericarg)(void*); /* Alternate Arg method */ #else bool (*fcheck)(FIELD *,const void *); /* field validation */ bool (*ccheck)(int,const void *); /* character validation */ bool (*next)(FIELD *,const void *); /* enumerate next value */ bool (*prev)(FIELD *,const void *); /* enumerate prev value */ #endif } #endif /* !NCURSES_OPAQUE_FORM */ FIELDTYPE; typedef void (*Form_Hook)(FORM *); /*************************** * miscellaneous #defines * ***************************/ /* field justification */ #define NO_JUSTIFICATION (0) #define JUSTIFY_LEFT (1) #define JUSTIFY_CENTER (2) #define JUSTIFY_RIGHT (3) /* field options */ #define O_VISIBLE (0x0001U) #define O_ACTIVE (0x0002U) #define O_PUBLIC (0x0004U) #define O_EDIT (0x0008U) #define O_WRAP (0x0010U) #define O_BLANK (0x0020U) #define O_AUTOSKIP (0x0040U) #define O_NULLOK (0x0080U) #define O_PASSOK (0x0100U) #define O_STATIC (0x0200U) #define O_DYNAMIC_JUSTIFY (0x0400U) /* ncurses extension */ #define O_NO_LEFT_STRIP (0x0800U) /* ncurses extension */ /* form options */ #define O_NL_OVERLOAD (0x0001U) #define O_BS_OVERLOAD (0x0002U) /* form driver commands */ #define REQ_NEXT_PAGE (KEY_MAX + 1) /* move to next page */ #define REQ_PREV_PAGE (KEY_MAX + 2) /* move to previous page */ #define REQ_FIRST_PAGE (KEY_MAX + 3) /* move to first page */ #define REQ_LAST_PAGE (KEY_MAX + 4) /* move to last page */ #define REQ_NEXT_FIELD (KEY_MAX + 5) /* move to next field */ #define REQ_PREV_FIELD (KEY_MAX + 6) /* move to previous field */ #define REQ_FIRST_FIELD (KEY_MAX + 7) /* move to first field */ #define REQ_LAST_FIELD (KEY_MAX + 8) /* move to last field */ #define REQ_SNEXT_FIELD (KEY_MAX + 9) /* move to sorted next field */ #define REQ_SPREV_FIELD (KEY_MAX + 10) /* move to sorted prev field */ #define REQ_SFIRST_FIELD (KEY_MAX + 11) /* move to sorted first field */ #define REQ_SLAST_FIELD (KEY_MAX + 12) /* move to sorted last field */ #define REQ_LEFT_FIELD (KEY_MAX + 13) /* move to left to field */ #define REQ_RIGHT_FIELD (KEY_MAX + 14) /* move to right to field */ #define REQ_UP_FIELD (KEY_MAX + 15) /* move to up to field */ #define REQ_DOWN_FIELD (KEY_MAX + 16) /* move to down to field */ #define REQ_NEXT_CHAR (KEY_MAX + 17) /* move to next char in field */ #define REQ_PREV_CHAR (KEY_MAX + 18) /* move to prev char in field */ #define REQ_NEXT_LINE (KEY_MAX + 19) /* move to next line in field */ #define REQ_PREV_LINE (KEY_MAX + 20) /* move to prev line in field */ #define REQ_NEXT_WORD (KEY_MAX + 21) /* move to next word in field */ #define REQ_PREV_WORD (KEY_MAX + 22) /* move to prev word in field */ #define REQ_BEG_FIELD (KEY_MAX + 23) /* move to first char in field */ #define REQ_END_FIELD (KEY_MAX + 24) /* move after last char in fld */ #define REQ_BEG_LINE (KEY_MAX + 25) /* move to beginning of line */ #define REQ_END_LINE (KEY_MAX + 26) /* move after last char in line */ #define REQ_LEFT_CHAR (KEY_MAX + 27) /* move left in field */ #define REQ_RIGHT_CHAR (KEY_MAX + 28) /* move right in field */ #define REQ_UP_CHAR (KEY_MAX + 29) /* move up in field */ #define REQ_DOWN_CHAR (KEY_MAX + 30) /* move down in field */ #define REQ_NEW_LINE (KEY_MAX + 31) /* insert/overlay new line */ #define REQ_INS_CHAR (KEY_MAX + 32) /* insert blank char at cursor */ #define REQ_INS_LINE (KEY_MAX + 33) /* insert blank line at cursor */ #define REQ_DEL_CHAR (KEY_MAX + 34) /* delete char at cursor */ #define REQ_DEL_PREV (KEY_MAX + 35) /* delete char before cursor */ #define REQ_DEL_LINE (KEY_MAX + 36) /* delete line at cursor */ #define REQ_DEL_WORD (KEY_MAX + 37) /* delete word at cursor */ #define REQ_CLR_EOL (KEY_MAX + 38) /* clear to end of line */ #define REQ_CLR_EOF (KEY_MAX + 39) /* clear to end of field */ #define REQ_CLR_FIELD (KEY_MAX + 40) /* clear entire field */ #define REQ_OVL_MODE (KEY_MAX + 41) /* begin overlay mode */ #define REQ_INS_MODE (KEY_MAX + 42) /* begin insert mode */ #define REQ_SCR_FLINE (KEY_MAX + 43) /* scroll field forward a line */ #define REQ_SCR_BLINE (KEY_MAX + 44) /* scroll field backward a line */ #define REQ_SCR_FPAGE (KEY_MAX + 45) /* scroll field forward a page */ #define REQ_SCR_BPAGE (KEY_MAX + 46) /* scroll field backward a page */ #define REQ_SCR_FHPAGE (KEY_MAX + 47) /* scroll field forward half page */ #define REQ_SCR_BHPAGE (KEY_MAX + 48) /* scroll field backward half page */ #define REQ_SCR_FCHAR (KEY_MAX + 49) /* horizontal scroll char */ #define REQ_SCR_BCHAR (KEY_MAX + 50) /* horizontal scroll char */ #define REQ_SCR_HFLINE (KEY_MAX + 51) /* horizontal scroll line */ #define REQ_SCR_HBLINE (KEY_MAX + 52) /* horizontal scroll line */ #define REQ_SCR_HFHALF (KEY_MAX + 53) /* horizontal scroll half line */ #define REQ_SCR_HBHALF (KEY_MAX + 54) /* horizontal scroll half line */ #define REQ_VALIDATION (KEY_MAX + 55) /* validate field */ #define REQ_NEXT_CHOICE (KEY_MAX + 56) /* display next field choice */ #define REQ_PREV_CHOICE (KEY_MAX + 57) /* display prev field choice */ #define MIN_FORM_COMMAND (KEY_MAX + 1) /* used by form_driver */ #define MAX_FORM_COMMAND (KEY_MAX + 57) /* used by form_driver */ #if defined(MAX_COMMAND) # if (MAX_FORM_COMMAND > MAX_COMMAND) # error Something is wrong -- MAX_FORM_COMMAND is greater than MAX_COMMAND # elif (MAX_COMMAND != (KEY_MAX + 128)) # error Something is wrong -- MAX_COMMAND is already inconsistently defined. # endif #else # define MAX_COMMAND (KEY_MAX + 128) #endif /************************* * standard field types * *************************/ extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA; extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM; extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM; extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER; extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC; extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP; /************************************ * built-in additional field types * * They are not defined in SVr4 * ************************************/ extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */ /*********************** * FIELDTYPE routines * ***********************/ extern NCURSES_EXPORT(FIELDTYPE *) new_fieldtype ( bool (* const field_check)(FIELD *,const void *), bool (* const char_check)(int,const void *)); extern NCURSES_EXPORT(FIELDTYPE *) link_fieldtype( FIELDTYPE *, FIELDTYPE *); extern NCURSES_EXPORT(int) free_fieldtype (FIELDTYPE *); extern NCURSES_EXPORT(int) set_fieldtype_arg (FIELDTYPE *, void * (* const make_arg)(va_list *), void * (* const copy_arg)(const void *), void (* const free_arg)(void *)); extern NCURSES_EXPORT(int) set_fieldtype_choice (FIELDTYPE *, bool (* const next_choice)(FIELD *,const void *), bool (* const prev_choice)(FIELD *,const void *)); /******************* * FIELD routines * *******************/ extern NCURSES_EXPORT(FIELD *) new_field (int,int,int,int,int,int); extern NCURSES_EXPORT(FIELD *) dup_field (FIELD *,int,int); extern NCURSES_EXPORT(FIELD *) link_field (FIELD *,int,int); extern NCURSES_EXPORT(int) free_field (FIELD *); extern NCURSES_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *); extern NCURSES_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *); extern NCURSES_EXPORT(int) set_max_field ( FIELD *,int); extern NCURSES_EXPORT(int) move_field (FIELD *,int,int); extern NCURSES_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...); extern NCURSES_EXPORT(int) set_new_page (FIELD *,bool); extern NCURSES_EXPORT(int) set_field_just (FIELD *,int); extern NCURSES_EXPORT(int) field_just (const FIELD *); extern NCURSES_EXPORT(int) set_field_fore (FIELD *,chtype); extern NCURSES_EXPORT(int) set_field_back (FIELD *,chtype); extern NCURSES_EXPORT(int) set_field_pad (FIELD *,int); extern NCURSES_EXPORT(int) field_pad (const FIELD *); extern NCURSES_EXPORT(int) set_field_buffer (FIELD *,int,const char *); extern NCURSES_EXPORT(int) set_field_status (FIELD *,bool); extern NCURSES_EXPORT(int) set_field_userptr (FIELD *, void *); extern NCURSES_EXPORT(int) set_field_opts (FIELD *,Field_Options); extern NCURSES_EXPORT(int) field_opts_on (FIELD *,Field_Options); extern NCURSES_EXPORT(int) field_opts_off (FIELD *,Field_Options); extern NCURSES_EXPORT(chtype) field_fore (const FIELD *); extern NCURSES_EXPORT(chtype) field_back (const FIELD *); extern NCURSES_EXPORT(bool) new_page (const FIELD *); extern NCURSES_EXPORT(bool) field_status (const FIELD *); extern NCURSES_EXPORT(void *) field_arg (const FIELD *); extern NCURSES_EXPORT(void *) field_userptr (const FIELD *); extern NCURSES_EXPORT(FIELDTYPE *) field_type (const FIELD *); extern NCURSES_EXPORT(char *) field_buffer (const FIELD *,int); extern NCURSES_EXPORT(Field_Options) field_opts (const FIELD *); /****************** * FORM routines * ******************/ extern NCURSES_EXPORT(FORM *) new_form (FIELD **); extern NCURSES_EXPORT(FIELD **) form_fields (const FORM *); extern NCURSES_EXPORT(FIELD *) current_field (const FORM *); extern NCURSES_EXPORT(WINDOW *) form_win (const FORM *); extern NCURSES_EXPORT(WINDOW *) form_sub (const FORM *); extern NCURSES_EXPORT(Form_Hook) form_init (const FORM *); extern NCURSES_EXPORT(Form_Hook) form_term (const FORM *); extern NCURSES_EXPORT(Form_Hook) field_init (const FORM *); extern NCURSES_EXPORT(Form_Hook) field_term (const FORM *); extern NCURSES_EXPORT(int) free_form (FORM *); extern NCURSES_EXPORT(int) set_form_fields (FORM *,FIELD **); extern NCURSES_EXPORT(int) field_count (const FORM *); extern NCURSES_EXPORT(int) set_form_win (FORM *,WINDOW *); extern NCURSES_EXPORT(int) set_form_sub (FORM *,WINDOW *); extern NCURSES_EXPORT(int) set_current_field (FORM *,FIELD *); extern NCURSES_EXPORT(int) unfocus_current_field (FORM *); extern NCURSES_EXPORT(int) field_index (const FIELD *); extern NCURSES_EXPORT(int) set_form_page (FORM *,int); extern NCURSES_EXPORT(int) form_page (const FORM *); extern NCURSES_EXPORT(int) scale_form (const FORM *,int *,int *); extern NCURSES_EXPORT(int) set_form_init (FORM *,Form_Hook); extern NCURSES_EXPORT(int) set_form_term (FORM *,Form_Hook); extern NCURSES_EXPORT(int) set_field_init (FORM *,Form_Hook); extern NCURSES_EXPORT(int) set_field_term (FORM *,Form_Hook); extern NCURSES_EXPORT(int) post_form (FORM *); extern NCURSES_EXPORT(int) unpost_form (FORM *); extern NCURSES_EXPORT(int) pos_form_cursor (FORM *); extern NCURSES_EXPORT(int) form_driver (FORM *,int); # if NCURSES_WIDECHAR extern NCURSES_EXPORT(int) form_driver_w (FORM *,int,wchar_t); # endif extern NCURSES_EXPORT(int) set_form_userptr (FORM *,void *); extern NCURSES_EXPORT(int) set_form_opts (FORM *,Form_Options); extern NCURSES_EXPORT(int) form_opts_on (FORM *,Form_Options); extern NCURSES_EXPORT(int) form_opts_off (FORM *,Form_Options); extern NCURSES_EXPORT(int) form_request_by_name (const char *); extern NCURSES_EXPORT(const char *) form_request_name (int); extern NCURSES_EXPORT(void *) form_userptr (const FORM *); extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *); extern NCURSES_EXPORT(bool) data_ahead (const FORM *); extern NCURSES_EXPORT(bool) data_behind (const FORM *); #if NCURSES_SP_FUNCS extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **); #endif #ifdef __cplusplus } #endif /* *INDENT-ON*/ #endif /* FORM_H */ PKZܼ"kkselinux/selinux.hnu[#ifndef _SELINUX_H_ #define _SELINUX_H_ #include #include #ifdef __cplusplus extern "C" { #endif /* Return 1 if we are running on a SELinux kernel, or 0 if not or -1 if we get an error. */ extern int is_selinux_enabled(void); /* Return 1 if we are running on a SELinux MLS kernel, or 0 otherwise. */ extern int is_selinux_mls_enabled(void); /* No longer used; here for compatibility with legacy callers. */ typedef char *security_context_t; /* Free the memory allocated for a context by any of the below get* calls. */ extern void freecon(char * con); /* Free the memory allocated for a context array by security_compute_user. */ extern void freeconary(char ** con); /* Wrappers for the /proc/pid/attr API. */ /* Get current context, and set *con to refer to it. Caller must free via freecon. */ extern int getcon(char ** con); extern int getcon_raw(char ** con); /* Set the current security context to con. Note that use of this function requires that the entire application be trusted to maintain any desired separation between the old and new security contexts, unlike exec-based transitions performed via setexeccon. When possible, decompose your application and use setexeccon()+execve() instead. Note that the application may lose access to its open descriptors as a result of a setcon() unless policy allows it to use descriptors opened by the old context. */ extern int setcon(const char * con); extern int setcon_raw(const char * con); /* Get context of process identified by pid, and set *con to refer to it. Caller must free via freecon. */ extern int getpidcon(pid_t pid, char ** con); extern int getpidcon_raw(pid_t pid, char ** con); /* Get previous context (prior to last exec), and set *con to refer to it. Caller must free via freecon. */ extern int getprevcon(char ** con); extern int getprevcon_raw(char ** con); /* Get exec context, and set *con to refer to it. Sets *con to NULL if no exec context has been set, i.e. using default. If non-NULL, caller must free via freecon. */ extern int getexeccon(char ** con); extern int getexeccon_raw(char ** con); /* Set exec security context for the next execve. Call with NULL if you want to reset to the default. */ extern int setexeccon(const char * con); extern int setexeccon_raw(const char * con); /* Get fscreate context, and set *con to refer to it. Sets *con to NULL if no fs create context has been set, i.e. using default. If non-NULL, caller must free via freecon. */ extern int getfscreatecon(char ** con); extern int getfscreatecon_raw(char ** con); /* Set the fscreate security context for subsequent file creations. Call with NULL if you want to reset to the default. */ extern int setfscreatecon(const char * context); extern int setfscreatecon_raw(const char * context); /* Get keycreate context, and set *con to refer to it. Sets *con to NULL if no key create context has been set, i.e. using default. If non-NULL, caller must free via freecon. */ extern int getkeycreatecon(char ** con); extern int getkeycreatecon_raw(char ** con); /* Set the keycreate security context for subsequent key creations. Call with NULL if you want to reset to the default. */ extern int setkeycreatecon(const char * context); extern int setkeycreatecon_raw(const char * context); /* Get sockcreate context, and set *con to refer to it. Sets *con to NULL if no socket create context has been set, i.e. using default. If non-NULL, caller must free via freecon. */ extern int getsockcreatecon(char ** con); extern int getsockcreatecon_raw(char ** con); /* Set the sockcreate security context for subsequent socket creations. Call with NULL if you want to reset to the default. */ extern int setsockcreatecon(const char * context); extern int setsockcreatecon_raw(const char * context); /* Wrappers for the xattr API. */ /* Get file context, and set *con to refer to it. Caller must free via freecon. */ extern int getfilecon(const char *path, char ** con); extern int getfilecon_raw(const char *path, char ** con); extern int lgetfilecon(const char *path, char ** con); extern int lgetfilecon_raw(const char *path, char ** con); extern int fgetfilecon(int fd, char ** con); extern int fgetfilecon_raw(int fd, char ** con); /* Set file context */ extern int setfilecon(const char *path, const char * con); extern int setfilecon_raw(const char *path, const char * con); extern int lsetfilecon(const char *path, const char * con); extern int lsetfilecon_raw(const char *path, const char * con); extern int fsetfilecon(int fd, const char * con); extern int fsetfilecon_raw(int fd, const char * con); /* Wrappers for the socket API */ /* Get context of peer socket, and set *con to refer to it. Caller must free via freecon. */ extern int getpeercon(int fd, char ** con); extern int getpeercon_raw(int fd, char ** con); /* Wrappers for the selinuxfs (policy) API. */ typedef unsigned int access_vector_t; typedef unsigned short security_class_t; struct av_decision { access_vector_t allowed; access_vector_t decided; access_vector_t auditallow; access_vector_t auditdeny; unsigned int seqno; unsigned int flags; }; /* Definitions of av_decision.flags */ #define SELINUX_AVD_FLAGS_PERMISSIVE 0x0001 /* Structure for passing options, used by AVC and label subsystems */ struct selinux_opt { int type; const char *value; }; /* Callback facilities */ union selinux_callback { /* log the printf-style format and arguments, with the type code indicating the type of message */ int #ifdef __GNUC__ __attribute__ ((format(printf, 2, 3))) #endif (*func_log) (int type, const char *fmt, ...); /* store a string representation of auditdata (corresponding to the given security class) into msgbuf. */ int (*func_audit) (void *auditdata, security_class_t cls, char *msgbuf, size_t msgbufsize); /* validate the supplied context, modifying if necessary */ int (*func_validate) (char **ctx); /* netlink callback for setenforce message */ int (*func_setenforce) (int enforcing); /* netlink callback for policyload message */ int (*func_policyload) (int seqno); }; #define SELINUX_CB_LOG 0 #define SELINUX_CB_AUDIT 1 #define SELINUX_CB_VALIDATE 2 #define SELINUX_CB_SETENFORCE 3 #define SELINUX_CB_POLICYLOAD 4 extern union selinux_callback selinux_get_callback(int type); extern void selinux_set_callback(int type, union selinux_callback cb); /* Logging type codes, passed to the logging callback */ #define SELINUX_ERROR 0 #define SELINUX_WARNING 1 #define SELINUX_INFO 2 #define SELINUX_AVC 3 #define SELINUX_TRANS_DIR "/var/run/setrans" /* Compute an access decision. */ extern int security_compute_av(const char * scon, const char * tcon, security_class_t tclass, access_vector_t requested, struct av_decision *avd); extern int security_compute_av_raw(const char * scon, const char * tcon, security_class_t tclass, access_vector_t requested, struct av_decision *avd); extern int security_compute_av_flags(const char * scon, const char * tcon, security_class_t tclass, access_vector_t requested, struct av_decision *avd); extern int security_compute_av_flags_raw(const char * scon, const char * tcon, security_class_t tclass, access_vector_t requested, struct av_decision *avd); /* Compute a labeling decision and set *newcon to refer to it. Caller must free via freecon. */ extern int security_compute_create(const char * scon, const char * tcon, security_class_t tclass, char ** newcon); extern int security_compute_create_raw(const char * scon, const char * tcon, security_class_t tclass, char ** newcon); extern int security_compute_create_name(const char * scon, const char * tcon, security_class_t tclass, const char *objname, char ** newcon); extern int security_compute_create_name_raw(const char * scon, const char * tcon, security_class_t tclass, const char *objname, char ** newcon); /* Compute a relabeling decision and set *newcon to refer to it. Caller must free via freecon. */ extern int security_compute_relabel(const char * scon, const char * tcon, security_class_t tclass, char ** newcon); extern int security_compute_relabel_raw(const char * scon, const char * tcon, security_class_t tclass, char ** newcon); /* Compute a polyinstantiation member decision and set *newcon to refer to it. Caller must free via freecon. */ extern int security_compute_member(const char * scon, const char * tcon, security_class_t tclass, char ** newcon); extern int security_compute_member_raw(const char * scon, const char * tcon, security_class_t tclass, char ** newcon); /* * Compute the set of reachable user contexts and set *con to refer to * the NULL-terminated array of contexts. Caller must free via freeconary. * These interfaces are deprecated. Use get_ordered_context_list() or * one of its variant interfaces instead. */ extern int security_compute_user(const char * scon, const char *username, char *** con); extern int security_compute_user_raw(const char * scon, const char *username, char *** con); /* Load a policy configuration. */ extern int security_load_policy(void *data, size_t len); /* Get the context of an initial kernel security identifier by name. Caller must free via freecon */ extern int security_get_initial_context(const char *name, char ** con); extern int security_get_initial_context_raw(const char *name, char ** con); /* * Make a policy image and load it. * This function provides a higher level interface for loading policy * than security_load_policy, internally determining the right policy * version, locating and opening the policy file, mapping it into memory, * manipulating it as needed for current boolean settings and/or local * definitions, and then calling security_load_policy to load it. * * 'preservebools' is a boolean flag indicating whether current * policy boolean values should be preserved into the new policy (if 1) * or reset to the saved policy settings (if 0). The former case is the * default for policy reloads, while the latter case is an option for policy * reloads but is primarily for the initial policy load. */ extern int selinux_mkload_policy(int preservebools); /* * Perform the initial policy load. * This function determines the desired enforcing mode, sets the * the *enforce argument accordingly for the caller to use, sets the * SELinux kernel enforcing status to match it, and loads the policy. * It also internally handles the initial selinuxfs mount required to * perform these actions. * * The function returns 0 if everything including the policy load succeeds. * In this case, init is expected to re-exec itself in order to transition * to the proper security context. * Otherwise, the function returns -1, and init must check *enforce to * determine how to proceed. If enforcing (*enforce > 0), then init should * halt the system. Otherwise, init may proceed normally without a re-exec. */ extern int selinux_init_load_policy(int *enforce); /* Translate boolean strict to name value pair. */ typedef struct { char *name; int value; } SELboolean; /* save a list of booleans in a single transaction. */ extern int security_set_boolean_list(size_t boolcnt, SELboolean * boollist, int permanent); /* Load policy boolean settings. Path may be NULL, in which case the booleans are loaded from the active policy boolean configuration file. */ extern int security_load_booleans(char *path); /* Check the validity of a security context. */ extern int security_check_context(const char * con); extern int security_check_context_raw(const char * con); /* Canonicalize a security context. */ extern int security_canonicalize_context(const char * con, char ** canoncon); extern int security_canonicalize_context_raw(const char * con, char ** canoncon); /* Get the enforce flag value. */ extern int security_getenforce(void); /* Set the enforce flag value. */ extern int security_setenforce(int value); /* Get the load-time behavior for undefined classes/permissions */ extern int security_reject_unknown(void); /* Get the runtime behavior for undefined classes/permissions */ extern int security_deny_unknown(void); /* Get the checkreqprot value */ extern int security_get_checkreqprot(void); /* Disable SELinux at runtime (must be done prior to initial policy load). */ extern int security_disable(void); /* Get the policy version number. */ extern int security_policyvers(void); /* Get the boolean names */ extern int security_get_boolean_names(char ***names, int *len); /* Get the pending value for the boolean */ extern int security_get_boolean_pending(const char *name); /* Get the active value for the boolean */ extern int security_get_boolean_active(const char *name); /* Set the pending value for the boolean */ extern int security_set_boolean(const char *name, int value); /* Commit the pending values for the booleans */ extern int security_commit_booleans(void); /* Userspace class mapping support */ struct security_class_mapping { const char *name; const char *perms[sizeof(access_vector_t) * 8 + 1]; }; /** * selinux_set_mapping - Enable dynamic mapping between integer offsets and security class names * @map: array of security_class_mapping structures * * The core avc_has_perm() API uses integers to represent security * classes; previous to the introduction of this function, it was * common for userspace object managers to be compiled using generated * offsets for a particular policy. However, that strongly ties the build of the userspace components to a particular policy. * * By using this function to map between integer offsets and security * class names, it's possible to replace a system policies that have * at least the same set of security class names as used by the * userspace object managers. * * To correctly use this function, you should override the generated * security class defines from the system policy in a local header, * starting at 1, and have one security_class_mapping structure entry * per define. */ extern int selinux_set_mapping(struct security_class_mapping *map); /* Common helpers */ /* Convert between mode and security class values */ extern security_class_t mode_to_security_class(mode_t mode); /* Convert between security class values and string names */ extern security_class_t string_to_security_class(const char *name); extern const char *security_class_to_string(security_class_t cls); /* Convert between individual access vector permissions and string names */ extern const char *security_av_perm_to_string(security_class_t tclass, access_vector_t perm); extern access_vector_t string_to_av_perm(security_class_t tclass, const char *name); /* Returns an access vector in a string representation. User must free the * returned string via free(). */ extern int security_av_string(security_class_t tclass, access_vector_t av, char **result); /* Display an access vector in a string representation. */ extern void print_access_vector(security_class_t tclass, access_vector_t av); /* Set the function used by matchpathcon_init when displaying errors about the file_contexts configuration. If not set, then this defaults to fprintf(stderr, fmt, ...). */ extern void set_matchpathcon_printf(void (*f) (const char *fmt, ...)); /* Set the function used by matchpathcon_init when checking the validity of a context in the file contexts configuration. If not set, then this defaults to a test based on security_check_context(). The function is also responsible for reporting any such error, and may include the 'path' and 'lineno' in such error messages. */ extern void set_matchpathcon_invalidcon(int (*f) (const char *path, unsigned lineno, char *context)); /* Same as above, but also allows canonicalization of the context, by changing *context to refer to the canonical form. If not set, and invalidcon is also not set, then this defaults to calling security_canonicalize_context(). */ extern void set_matchpathcon_canoncon(int (*f) (const char *path, unsigned lineno, char **context)); /* Set flags controlling operation of matchpathcon_init or matchpathcon. */ #define MATCHPATHCON_BASEONLY 1 /* Only process the base file_contexts file. */ #define MATCHPATHCON_NOTRANS 2 /* Do not perform any context translation. */ #define MATCHPATHCON_VALIDATE 4 /* Validate/canonicalize contexts at init time. */ extern void set_matchpathcon_flags(unsigned int flags); /* Load the file contexts configuration specified by 'path' into memory for use by subsequent matchpathcon calls. If 'path' is NULL, then load the active file contexts configuration, i.e. the path returned by selinux_file_context_path(). Unless the MATCHPATHCON_BASEONLY flag has been set, this function also checks for a 'path'.homedirs file and a 'path'.local file and loads additional specifications from them if present. */ extern int matchpathcon_init(const char *path); /* Same as matchpathcon_init, but only load entries with regexes that have stems that are prefixes of 'prefix'. */ extern int matchpathcon_init_prefix(const char *path, const char *prefix); /* Free the memory allocated by matchpathcon_init. */ extern void matchpathcon_fini(void); /* Resolve all of the symlinks and relative portions of a pathname, but NOT * the final component (same a realpath() unless the final component is a * symlink. Resolved path must be a path of size PATH_MAX + 1 */ extern int realpath_not_final(const char *name, char *resolved_path); /* Match the specified pathname and mode against the file contexts configuration and set *con to refer to the resulting context. 'mode' can be 0 to disable mode matching. Caller must free via freecon. If matchpathcon_init has not already been called, then this function will call it upon its first invocation with a NULL path. */ extern int matchpathcon(const char *path, mode_t mode, char ** con); /* Same as above, but return a specification index for later use in a matchpathcon_filespec_add() call - see below. */ extern int matchpathcon_index(const char *path, mode_t mode, char ** con); /* Maintain an association between an inode and a specification index, and check whether a conflicting specification is already associated with the same inode (e.g. due to multiple hard links). If so, then use the latter of the two specifications based on their order in the file contexts configuration. Return the used specification index. */ extern int matchpathcon_filespec_add(ino_t ino, int specind, const char *file); /* Destroy any inode associations that have been added, e.g. to restart for a new filesystem. */ extern void matchpathcon_filespec_destroy(void); /* Display statistics on the hash table usage for the associations. */ extern void matchpathcon_filespec_eval(void); /* Check to see whether any specifications had no matches and report them. The 'str' is used as a prefix for any warning messages. */ extern void matchpathcon_checkmatches(char *str); /* Match the specified media and against the media contexts configuration and set *con to refer to the resulting context. Caller must free con via freecon. */ extern int matchmediacon(const char *media, char ** con); /* selinux_getenforcemode reads the /etc/selinux/config file and determines whether the machine should be started in enforcing (1), permissive (0) or disabled (-1) mode. */ extern int selinux_getenforcemode(int *enforce); /* selinux_boolean_sub reads the /etc/selinux/TYPE/booleans.subs_dist file looking for a record with boolean_name. If a record exists selinux_boolean_sub returns the translated name otherwise it returns the original name. The returned value needs to be freed. On failure NULL will be returned. */ extern char *selinux_boolean_sub(const char *boolean_name); /* selinux_getpolicytype reads the /etc/selinux/config file and determines what the default policy for the machine is. Calling application must free policytype. */ extern int selinux_getpolicytype(char **policytype); /* selinux_policy_root reads the /etc/selinux/config file and returns the directory path under which the compiled policy file and context configuration files exist. */ extern const char *selinux_policy_root(void); /* selinux_set_policy_root sets an alternate policy root directory path under which the compiled policy file and context configuration files exist. */ extern int selinux_set_policy_root(const char *rootpath); /* These functions return the paths to specific files under the policy root directory. */ extern const char *selinux_current_policy_path(void); extern const char *selinux_binary_policy_path(void); extern const char *selinux_failsafe_context_path(void); extern const char *selinux_removable_context_path(void); extern const char *selinux_default_context_path(void); extern const char *selinux_user_contexts_path(void); extern const char *selinux_file_context_path(void); extern const char *selinux_file_context_homedir_path(void); extern const char *selinux_file_context_local_path(void); extern const char *selinux_file_context_subs_path(void); extern const char *selinux_file_context_subs_dist_path(void); extern const char *selinux_homedir_context_path(void); extern const char *selinux_media_context_path(void); extern const char *selinux_virtual_domain_context_path(void); extern const char *selinux_virtual_image_context_path(void); extern const char *selinux_lxc_contexts_path(void); extern const char *selinux_x_context_path(void); extern const char *selinux_sepgsql_context_path(void); extern const char *selinux_openrc_contexts_path(void); extern const char *selinux_openssh_contexts_path(void); extern const char *selinux_snapperd_contexts_path(void); extern const char *selinux_systemd_contexts_path(void); extern const char *selinux_contexts_path(void); extern const char *selinux_securetty_types_path(void); extern const char *selinux_booleans_subs_path(void); extern const char *selinux_booleans_path(void); extern const char *selinux_customizable_types_path(void); extern const char *selinux_users_path(void); extern const char *selinux_usersconf_path(void); extern const char *selinux_translations_path(void); extern const char *selinux_colors_path(void); extern const char *selinux_netfilter_context_path(void); extern const char *selinux_path(void); /** * selinux_check_access - Check permissions and perform appropriate auditing. * @scon: source security context * @tcon: target security context * @tclass: target security class string * @perm: requested permissions string, interpreted based on @tclass * @auditdata: auxiliary audit data * * Check the AVC to determine whether the @perm permissions are granted * for the SID pair (@scon, @tcon), interpreting the permissions * based on @tclass. * Return %0 if all @perm permissions are granted, -%1 with * @errno set to %EACCES if any permissions are denied or to another * value upon other errors. * If auditing or logging is configured the appropriate callbacks will be called * and passed the auditdata field */ extern int selinux_check_access(const char * scon, const char * tcon, const char *tclass, const char *perm, void *auditdata); /* Check a permission in the passwd class. Return 0 if granted or -1 otherwise. */ extern int selinux_check_passwd_access(access_vector_t requested); extern int checkPasswdAccess(access_vector_t requested); /* Check if the tty_context is defined as a securetty Return 0 if secure, < 0 otherwise. */ extern int selinux_check_securetty_context(const char * tty_context); /* Set the path to the selinuxfs mount point explicitly. Normally, this is determined automatically during libselinux initialization, but this is not always possible, e.g. for /sbin/init which performs the initial mount of selinuxfs. */ void set_selinuxmnt(const char *mnt); /* Check if selinuxfs exists as a kernel filesystem */ int selinuxfs_exists(void); /* clear selinuxmnt variable and free allocated memory */ void fini_selinuxmnt(void); /* Set an appropriate security context based on the filename of a helper * program, falling back to a new context with the specified type. */ extern int setexecfilecon(const char *filename, const char *fallback_type); #ifndef DISABLE_RPM /* Execute a helper for rpm in an appropriate security context. */ extern int rpm_execcon(unsigned int verified, const char *filename, char *const argv[], char *const envp[]); #endif /* Returns whether a file context is customizable, and should not be relabeled . */ extern int is_context_customizable(const char * scontext); /* Perform context translation between the human-readable format ("translated") and the internal system format ("raw"). Caller must free the resulting context via freecon. Returns -1 upon an error or 0 otherwise. If passed NULL, sets the returned context to NULL and returns 0. */ extern int selinux_trans_to_raw_context(const char * trans, char ** rawp); extern int selinux_raw_to_trans_context(const char * raw, char ** transp); /* Perform context translation between security contexts and display colors. Returns a space-separated list of ten ten hex RGB triples prefixed by hash marks, e.g. "#ff0000". Caller must free the resulting string via free. Returns -1 upon an error or 0 otherwise. */ extern int selinux_raw_context_to_color(const char * raw, char **color_str); /* Get the SELinux username and level to use for a given Linux username. These values may then be passed into the get_ordered_context_list* and get_default_context* functions to obtain a context for the user. Returns 0 on success or -1 otherwise. Caller must free the returned strings via free. */ extern int getseuserbyname(const char *linuxuser, char **seuser, char **level); /* Get the SELinux username and level to use for a given Linux username and service. These values may then be passed into the get_ordered_context_list* and get_default_context* functions to obtain a context for the user. Returns 0 on success or -1 otherwise. Caller must free the returned strings via free. */ extern int getseuser(const char *username, const char *service, char **r_seuser, char **r_level); /* Compare two file contexts, return 0 if equivalent. */ extern int selinux_file_context_cmp(const char * a, const char * b); /* * Verify the context of the file 'path' against policy. * Return 1 if match, 0 if not and -1 on error. */ extern int selinux_file_context_verify(const char *path, mode_t mode); /* This function sets the file context on to the system defaults returns 0 on success */ extern int selinux_lsetfilecon_default(const char *path); /* * Force a reset of the loaded configuration * WARNING: This is not thread safe. Be very sure that no other threads * are calling into libselinux when this is called. */ extern void selinux_reset_config(void); #ifdef __cplusplus } #endif #endif PKZ;selinux/flask.hnu[/* This file is automatically generated. Do not edit. */ #ifndef _SELINUX_FLASK_H_ #define _SELINUX_FLASK_H_ #warning "Please remove any #include's of this header in your source code." #warning "Instead, use string_to_security_class() to map the class name to a value." /* * Security object class definitions */ #define SECCLASS_SECURITY 1 #define SECCLASS_PROCESS 2 #define SECCLASS_SYSTEM 3 #define SECCLASS_CAPABILITY 4 #define SECCLASS_FILESYSTEM 5 #define SECCLASS_FILE 6 #define SECCLASS_DIR 7 #define SECCLASS_FD 8 #define SECCLASS_LNK_FILE 9 #define SECCLASS_CHR_FILE 10 #define SECCLASS_BLK_FILE 11 #define SECCLASS_SOCK_FILE 12 #define SECCLASS_FIFO_FILE 13 #define SECCLASS_SOCKET 14 #define SECCLASS_TCP_SOCKET 15 #define SECCLASS_UDP_SOCKET 16 #define SECCLASS_RAWIP_SOCKET 17 #define SECCLASS_NODE 18 #define SECCLASS_NETIF 19 #define SECCLASS_NETLINK_SOCKET 20 #define SECCLASS_PACKET_SOCKET 21 #define SECCLASS_KEY_SOCKET 22 #define SECCLASS_UNIX_STREAM_SOCKET 23 #define SECCLASS_UNIX_DGRAM_SOCKET 24 #define SECCLASS_SEM 25 #define SECCLASS_MSG 26 #define SECCLASS_MSGQ 27 #define SECCLASS_SHM 28 #define SECCLASS_IPC 29 #define SECCLASS_PASSWD 30 #define SECCLASS_X_DRAWABLE 31 #define SECCLASS_X_SCREEN 32 #define SECCLASS_X_GC 33 #define SECCLASS_X_FONT 34 #define SECCLASS_X_COLORMAP 35 #define SECCLASS_X_PROPERTY 36 #define SECCLASS_X_SELECTION 37 #define SECCLASS_X_CURSOR 38 #define SECCLASS_X_CLIENT 39 #define SECCLASS_X_DEVICE 40 #define SECCLASS_X_SERVER 41 #define SECCLASS_X_EXTENSION 42 #define SECCLASS_NETLINK_ROUTE_SOCKET 43 #define SECCLASS_NETLINK_FIREWALL_SOCKET 44 #define SECCLASS_NETLINK_TCPDIAG_SOCKET 45 #define SECCLASS_NETLINK_NFLOG_SOCKET 46 #define SECCLASS_NETLINK_XFRM_SOCKET 47 #define SECCLASS_NETLINK_SELINUX_SOCKET 48 #define SECCLASS_NETLINK_AUDIT_SOCKET 49 #define SECCLASS_NETLINK_IP6FW_SOCKET 50 #define SECCLASS_NETLINK_DNRT_SOCKET 51 #define SECCLASS_DBUS 52 #define SECCLASS_NSCD 53 #define SECCLASS_ASSOCIATION 54 #define SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET 55 #define SECCLASS_APPLETALK_SOCKET 56 #define SECCLASS_PACKET 57 #define SECCLASS_KEY 58 #define SECCLASS_CONTEXT 59 #define SECCLASS_DCCP_SOCKET 60 #define SECCLASS_MEMPROTECT 61 #define SECCLASS_DB_DATABASE 62 #define SECCLASS_DB_TABLE 63 #define SECCLASS_DB_PROCEDURE 64 #define SECCLASS_DB_COLUMN 65 #define SECCLASS_DB_TUPLE 66 #define SECCLASS_DB_BLOB 67 #define SECCLASS_PEER 68 #define SECCLASS_CAPABILITY2 69 #define SECCLASS_X_RESOURCE 70 #define SECCLASS_X_EVENT 71 #define SECCLASS_X_SYNTHETIC_EVENT 72 #define SECCLASS_X_APPLICATION_DATA 73 /* * Security identifier indices for initial entities */ #define SECINITSID_KERNEL 1 #define SECINITSID_SECURITY 2 #define SECINITSID_UNLABELED 3 #define SECINITSID_FS 4 #define SECINITSID_FILE 5 #define SECINITSID_FILE_LABELS 6 #define SECINITSID_INIT 7 #define SECINITSID_ANY_SOCKET 8 #define SECINITSID_PORT 9 #define SECINITSID_NETIF 10 #define SECINITSID_NETMSG 11 #define SECINITSID_NODE 12 #define SECINITSID_IGMP_PACKET 13 #define SECINITSID_ICMP_SOCKET 14 #define SECINITSID_TCP_SOCKET 15 #define SECINITSID_SYSCTL_MODPROBE 16 #define SECINITSID_SYSCTL 17 #define SECINITSID_SYSCTL_FS 18 #define SECINITSID_SYSCTL_KERNEL 19 #define SECINITSID_SYSCTL_NET 20 #define SECINITSID_SYSCTL_NET_UNIX 21 #define SECINITSID_SYSCTL_VM 22 #define SECINITSID_SYSCTL_DEV 23 #define SECINITSID_KMOD 24 #define SECINITSID_POLICY 25 #define SECINITSID_SCMP_PACKET 26 #define SECINITSID_DEVNULL 27 #define SECINITSID_NUM 27 #endif PKZAƖuuselinux/get_default_type.hnu[/* get_default_type.h - contains header information and function prototypes * for functions to get the default type for a role */ #ifndef _SELINUX_GET_DEFAULT_TYPE_H_ #define _SELINUX_GET_DEFAULT_TYPE_H_ #ifdef __cplusplus extern "C" { #endif /* Return path to default type file. */ const char *selinux_default_type_path(void); /* Get the default type (domain) for 'role' and set 'type' to refer to it. Caller must free via free(). Return 0 on success or -1 otherwise. */ int get_default_type(const char *role, char **type); #ifdef __cplusplus } #endif #endif /* ifndef _GET_DEFAULT_TYPE_H_ */ PKZ咵>@>@ selinux/avc.hnu[/* * Access vector cache interface for object managers. * * Author : Eamon Walsh */ #ifndef _SELINUX_AVC_H_ #define _SELINUX_AVC_H_ #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* * SID format and operations */ struct security_id { char * ctx; unsigned int refcnt; }; typedef struct security_id *security_id_t; #define SECSID_WILD (security_id_t)NULL /* unspecified SID */ /** * avc_sid_to_context - get copy of context corresponding to SID. * @sid: input SID * @ctx: pointer to context reference * * Return a copy of the security context corresponding to the input * @sid in the memory referenced by @ctx. The caller is expected to * free the context with freecon(). Return %0 on success, -%1 on * failure, with @errno set to %ENOMEM if insufficient memory was * available to make the copy, or %EINVAL if the input SID is invalid. */ int avc_sid_to_context(security_id_t sid, char ** ctx); int avc_sid_to_context_raw(security_id_t sid, char ** ctx); /** * avc_context_to_sid - get SID for context. * @ctx: input security context * @sid: pointer to SID reference * * Look up security context @ctx in SID table, making * a new entry if @ctx is not found. Increment the * reference counter for the SID. Store a pointer * to the SID structure into the memory referenced by @sid, * returning %0 on success or -%1 on error with @errno set. */ int avc_context_to_sid(const char * ctx, security_id_t * sid); int avc_context_to_sid_raw(const char * ctx, security_id_t * sid); /** * sidget - increment SID reference counter. * @sid: SID reference * * Increment the reference counter for @sid, indicating that * @sid is in use by an (additional) object. Return the * new reference count, or zero if @sid is invalid (has zero * reference count). Note that avc_context_to_sid() also * increments reference counts. */ int sidget(security_id_t sid); /** * sidput - decrement SID reference counter. * @sid: SID reference * * Decrement the reference counter for @sid, indicating that * a reference to @sid is no longer in use. Return the * new reference count. When the reference count reaches * zero, the SID is invalid, and avc_context_to_sid() must * be called to obtain a new SID for the security context. */ int sidput(security_id_t sid); /** * avc_get_initial_sid - get SID for an initial kernel security identifier * @name: input name of initial kernel security identifier * @sid: pointer to a SID reference * * Get the context for an initial kernel security identifier specified by * @name using security_get_initial_context() and then call * avc_context_to_sid() to get the corresponding SID. */ int avc_get_initial_sid(const char *name, security_id_t * sid); /* * AVC entry */ struct avc_entry; struct avc_entry_ref { struct avc_entry *ae; }; /** * avc_entry_ref_init - initialize an AVC entry reference. * @aeref: pointer to avc entry reference structure * * Use this macro to initialize an avc entry reference structure * before first use. These structures are passed to avc_has_perm(), * which stores cache entry references in them. They can increase * performance on repeated queries. */ #define avc_entry_ref_init(aeref) ((aeref)->ae = NULL) /* * User-provided callbacks for memory, auditing, and locking */ /* These structures are passed by reference to avc_init(). Passing * a NULL reference will cause the AVC to use a default. The default * memory callbacks are malloc() and free(). The default logging method * is to print on stderr. If no thread callbacks are passed, a separate * listening thread won't be started for kernel policy change messages. * If no locking callbacks are passed, no locking will take place. */ struct avc_memory_callback { /* malloc() equivalent. */ void *(*func_malloc) (size_t size); /* free() equivalent. */ void (*func_free) (void *ptr); /* Note that these functions should set errno on failure. If not, some avc routines may return -1 without errno set. */ }; struct avc_log_callback { /* log the printf-style format and arguments. */ void #ifdef __GNUC__ __attribute__ ((format(printf, 1, 2))) #endif (*func_log) (const char *fmt, ...); /* store a string representation of auditdata (corresponding to the given security class) into msgbuf. */ void (*func_audit) (void *auditdata, security_class_t cls, char *msgbuf, size_t msgbufsize); }; struct avc_thread_callback { /* create and start a thread, returning an opaque pointer to it; the thread should run the given function. */ void *(*func_create_thread) (void (*run) (void)); /* cancel a given thread and free its resources. */ void (*func_stop_thread) (void *thread); }; struct avc_lock_callback { /* create a lock and return an opaque pointer to it. */ void *(*func_alloc_lock) (void); /* obtain a given lock, blocking if necessary. */ void (*func_get_lock) (void *lock); /* release a given lock. */ void (*func_release_lock) (void *lock); /* destroy a given lock (free memory, etc.) */ void (*func_free_lock) (void *lock); }; /* * Available options */ /* no-op option, useful for unused slots in an array of options */ #define AVC_OPT_UNUSED 0 /* override kernel enforcing mode (boolean value) */ #define AVC_OPT_SETENFORCE 1 /* * AVC operations */ /** * avc_init - Initialize the AVC. * @msgprefix: prefix for log messages * @mem_callbacks: user-supplied memory callbacks * @log_callbacks: user-supplied logging callbacks * @thread_callbacks: user-supplied threading callbacks * @lock_callbacks: user-supplied locking callbacks * * Initialize the access vector cache. Return %0 on * success or -%1 with @errno set on failure. * If @msgprefix is NULL, use "uavc". If any callback * structure references are NULL, use default methods * for those callbacks (see the definition of the callback * structures above). */ int avc_init(const char *msgprefix, const struct avc_memory_callback *mem_callbacks, const struct avc_log_callback *log_callbacks, const struct avc_thread_callback *thread_callbacks, const struct avc_lock_callback *lock_callbacks); /** * avc_open - Initialize the AVC. * @opts: array of selabel_opt structures specifying AVC options or NULL. * @nopts: number of elements in opts array or zero for no options. * * This function is identical to avc_init(), except the message prefix * is set to "avc" and any callbacks desired should be specified via * selinux_set_callback(). Available options are listed above. */ int avc_open(struct selinux_opt *opts, unsigned nopts); /** * avc_cleanup - Remove unused SIDs and AVC entries. * * Search the SID table for SID structures with zero * reference counts, and remove them along with all * AVC entries that reference them. This can be used * to return memory to the system. */ void avc_cleanup(void); /** * avc_reset - Flush the cache and reset statistics. * * Remove all entries from the cache and reset all access * statistics (as returned by avc_cache_stats()) to zero. * The SID mapping is not affected. Return %0 on success, * -%1 with @errno set on error. */ int avc_reset(void); /** * avc_destroy - Free all AVC structures. * * Destroy all AVC structures and free all allocated * memory. User-supplied locking, memory, and audit * callbacks will be retained, but security-event * callbacks will not. All SID's will be invalidated. * User must call avc_init() if further use of AVC is desired. */ void avc_destroy(void); /** * avc_has_perm_noaudit - Check permissions but perform no auditing. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @requested: requested permissions, interpreted based on @tclass * @aeref: AVC entry reference * @avd: access vector decisions * * Check the AVC to determine whether the @requested permissions are granted * for the SID pair (@ssid, @tsid), interpreting the permissions * based on @tclass, and call the security server on a cache miss to obtain * a new decision and add it to the cache. Update @aeref to refer to an AVC * entry with the resulting decisions, and return a copy of the decisions * in @avd. Return %0 if all @requested permissions are granted, -%1 with * @errno set to %EACCES if any permissions are denied, or to another value * upon other errors. This function is typically called by avc_has_perm(), * but may also be called directly to separate permission checking from * auditing, e.g. in cases where a lock must be held for the check but * should be released for the auditing. */ int avc_has_perm_noaudit(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t requested, struct avc_entry_ref *aeref, struct av_decision *avd); /** * avc_has_perm - Check permissions and perform any appropriate auditing. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @requested: requested permissions, interpreted based on @tclass * @aeref: AVC entry reference * @auditdata: auxiliary audit data * * Check the AVC to determine whether the @requested permissions are granted * for the SID pair (@ssid, @tsid), interpreting the permissions * based on @tclass, and call the security server on a cache miss to obtain * a new decision and add it to the cache. Update @aeref to refer to an AVC * entry with the resulting decisions. Audit the granting or denial of * permissions in accordance with the policy. Return %0 if all @requested * permissions are granted, -%1 with @errno set to %EACCES if any permissions * are denied or to another value upon other errors. */ int avc_has_perm(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t requested, struct avc_entry_ref *aeref, void *auditdata); /** * avc_audit - Audit the granting or denial of permissions. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @requested: requested permissions * @avd: access vector decisions * @result: result from avc_has_perm_noaudit * @auditdata: auxiliary audit data * * Audit the granting or denial of permissions in accordance * with the policy. This function is typically called by * avc_has_perm() after a permission check, but can also be * called directly by callers who use avc_has_perm_noaudit() * in order to separate the permission check from the auditing. * For example, this separation is useful when the permission check must * be performed under a lock, to allow the lock to be released * before calling the auditing code. */ void avc_audit(security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t requested, struct av_decision *avd, int result, void *auditdata); /** * avc_compute_create - Compute SID for labeling a new object. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @newsid: pointer to SID reference * * Call the security server to obtain a context for labeling a * new object. Look up the context in the SID table, making * a new entry if not found. Increment the reference counter * for the SID. Store a pointer to the SID structure into the * memory referenced by @newsid, returning %0 on success or -%1 on * error with @errno set. */ int avc_compute_create(security_id_t ssid, security_id_t tsid, security_class_t tclass, security_id_t * newsid); /** * avc_compute_member - Compute SID for polyinstantation. * @ssid: source security identifier * @tsid: target security identifier * @tclass: target security class * @newsid: pointer to SID reference * * Call the security server to obtain a context for labeling an * object instance. Look up the context in the SID table, making * a new entry if not found. Increment the reference counter * for the SID. Store a pointer to the SID structure into the * memory referenced by @newsid, returning %0 on success or -%1 on * error with @errno set. */ int avc_compute_member(security_id_t ssid, security_id_t tsid, security_class_t tclass, security_id_t * newsid); /* * security event callback facility */ /* security events */ #define AVC_CALLBACK_GRANT 1 #define AVC_CALLBACK_TRY_REVOKE 2 #define AVC_CALLBACK_REVOKE 4 #define AVC_CALLBACK_RESET 8 #define AVC_CALLBACK_AUDITALLOW_ENABLE 16 #define AVC_CALLBACK_AUDITALLOW_DISABLE 32 #define AVC_CALLBACK_AUDITDENY_ENABLE 64 #define AVC_CALLBACK_AUDITDENY_DISABLE 128 /** * avc_add_callback - Register a callback for security events. * @callback: callback function * @events: bitwise OR of desired security events * @ssid: source security identifier or %SECSID_WILD * @tsid: target security identifier or %SECSID_WILD * @tclass: target security class * @perms: permissions * * Register a callback function for events in the set @events * related to the SID pair (@ssid, @tsid) and * and the permissions @perms, interpreting * @perms based on @tclass. Returns %0 on success or * -%1 if insufficient memory exists to add the callback. */ int avc_add_callback(int (*callback) (uint32_t event, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms, access_vector_t * out_retained), uint32_t events, security_id_t ssid, security_id_t tsid, security_class_t tclass, access_vector_t perms); /* * AVC statistics */ /* If set, cache statistics are tracked. This may * become a compile-time option in the future. */ #define AVC_CACHE_STATS 1 struct avc_cache_stats { unsigned entry_lookups; unsigned entry_hits; unsigned entry_misses; unsigned entry_discards; unsigned cav_lookups; unsigned cav_hits; unsigned cav_probes; unsigned cav_misses; }; /** * avc_cache_stats - get cache access statistics. * @stats: reference to statistics structure * * Fill the supplied structure with information about AVC * activity since the last call to avc_init() or * avc_reset(). See the structure definition for * details. */ void avc_cache_stats(struct avc_cache_stats *stats); /** * avc_av_stats - log av table statistics. * * Log a message with information about the size and * distribution of the access vector table. The audit * callback is used to print the message. */ void avc_av_stats(void); /** * avc_sid_stats - log SID table statistics. * * Log a message with information about the size and * distribution of the SID table. The audit callback * is used to print the message. */ void avc_sid_stats(void); /** * avc_netlink_open - Create a netlink socket and connect to the kernel. */ int avc_netlink_open(int blocking); /** * avc_netlink_loop - Wait for netlink messages from the kernel */ void avc_netlink_loop(void); /** * avc_netlink_close - Close the netlink socket */ void avc_netlink_close(void); /** * avc_netlink_acquire_fd - Acquire netlink socket fd. * * Allows the application to manage messages from the netlink socket in * its own main loop. */ int avc_netlink_acquire_fd(void); /** * avc_netlink_release_fd - Release netlink socket fd. * * Returns ownership of the netlink socket to the library. */ void avc_netlink_release_fd(void); /** * avc_netlink_check_nb - Check netlink socket for new messages. * * Called by the application when using avc_netlink_acquire_fd() to * process kernel netlink events. */ int avc_netlink_check_nb(void); /** * selinux_status_open - Open and map SELinux kernel status page * */ int selinux_status_open(int fallback); /** * selinux_status_close - Unmap and close SELinux kernel status page * */ void selinux_status_close(void); /** * selinux_status_updated - Inform us whether the kernel status has been updated * */ int selinux_status_updated(void); /** * selinux_status_getenforce - Get the enforce flag value * */ int selinux_status_getenforce(void); /** * selinux_status_policyload - Get the number of policy reloaded * */ int selinux_status_policyload(void); /** * selinux_status_deny_unknown - Get the behavior for undefined classes/permissions * */ int selinux_status_deny_unknown(void); #ifdef __cplusplus } #endif #endif /* _SELINUX_AVC_H_ */ PKZAselinux/av_permissions.hnu[#warning "Please remove any #include of this header in your source code." #warning "Instead, use string_to_av_perm() to map the permission name to a value." /* This file is automatically generated. Do not edit. */ #define COMMON_FILE__IOCTL 0x00000001UL #define COMMON_FILE__READ 0x00000002UL #define COMMON_FILE__WRITE 0x00000004UL #define COMMON_FILE__CREATE 0x00000008UL #define COMMON_FILE__GETATTR 0x00000010UL #define COMMON_FILE__SETATTR 0x00000020UL #define COMMON_FILE__LOCK 0x00000040UL #define COMMON_FILE__RELABELFROM 0x00000080UL #define COMMON_FILE__RELABELTO 0x00000100UL #define COMMON_FILE__APPEND 0x00000200UL #define COMMON_FILE__UNLINK 0x00000400UL #define COMMON_FILE__LINK 0x00000800UL #define COMMON_FILE__RENAME 0x00001000UL #define COMMON_FILE__EXECUTE 0x00002000UL #define COMMON_FILE__SWAPON 0x00004000UL #define COMMON_FILE__QUOTAON 0x00008000UL #define COMMON_FILE__MOUNTON 0x00010000UL #define COMMON_SOCKET__IOCTL 0x00000001UL #define COMMON_SOCKET__READ 0x00000002UL #define COMMON_SOCKET__WRITE 0x00000004UL #define COMMON_SOCKET__CREATE 0x00000008UL #define COMMON_SOCKET__GETATTR 0x00000010UL #define COMMON_SOCKET__SETATTR 0x00000020UL #define COMMON_SOCKET__LOCK 0x00000040UL #define COMMON_SOCKET__RELABELFROM 0x00000080UL #define COMMON_SOCKET__RELABELTO 0x00000100UL #define COMMON_SOCKET__APPEND 0x00000200UL #define COMMON_SOCKET__BIND 0x00000400UL #define COMMON_SOCKET__CONNECT 0x00000800UL #define COMMON_SOCKET__LISTEN 0x00001000UL #define COMMON_SOCKET__ACCEPT 0x00002000UL #define COMMON_SOCKET__GETOPT 0x00004000UL #define COMMON_SOCKET__SETOPT 0x00008000UL #define COMMON_SOCKET__SHUTDOWN 0x00010000UL #define COMMON_SOCKET__RECVFROM 0x00020000UL #define COMMON_SOCKET__SENDTO 0x00040000UL #define COMMON_SOCKET__RECV_MSG 0x00080000UL #define COMMON_SOCKET__SEND_MSG 0x00100000UL #define COMMON_SOCKET__NAME_BIND 0x00200000UL #define COMMON_IPC__CREATE 0x00000001UL #define COMMON_IPC__DESTROY 0x00000002UL #define COMMON_IPC__GETATTR 0x00000004UL #define COMMON_IPC__SETATTR 0x00000008UL #define COMMON_IPC__READ 0x00000010UL #define COMMON_IPC__WRITE 0x00000020UL #define COMMON_IPC__ASSOCIATE 0x00000040UL #define COMMON_IPC__UNIX_READ 0x00000080UL #define COMMON_IPC__UNIX_WRITE 0x00000100UL #define COMMON_DATABASE__CREATE 0x00000001UL #define COMMON_DATABASE__DROP 0x00000002UL #define COMMON_DATABASE__GETATTR 0x00000004UL #define COMMON_DATABASE__SETATTR 0x00000008UL #define COMMON_DATABASE__RELABELFROM 0x00000010UL #define COMMON_DATABASE__RELABELTO 0x00000020UL #define FILESYSTEM__MOUNT 0x00000001UL #define FILESYSTEM__REMOUNT 0x00000002UL #define FILESYSTEM__UNMOUNT 0x00000004UL #define FILESYSTEM__GETATTR 0x00000008UL #define FILESYSTEM__RELABELFROM 0x00000010UL #define FILESYSTEM__RELABELTO 0x00000020UL #define FILESYSTEM__TRANSITION 0x00000040UL #define FILESYSTEM__ASSOCIATE 0x00000080UL #define FILESYSTEM__QUOTAMOD 0x00000100UL #define FILESYSTEM__QUOTAGET 0x00000200UL #define DIR__IOCTL 0x00000001UL #define DIR__READ 0x00000002UL #define DIR__WRITE 0x00000004UL #define DIR__CREATE 0x00000008UL #define DIR__GETATTR 0x00000010UL #define DIR__SETATTR 0x00000020UL #define DIR__LOCK 0x00000040UL #define DIR__RELABELFROM 0x00000080UL #define DIR__RELABELTO 0x00000100UL #define DIR__APPEND 0x00000200UL #define DIR__UNLINK 0x00000400UL #define DIR__LINK 0x00000800UL #define DIR__RENAME 0x00001000UL #define DIR__EXECUTE 0x00002000UL #define DIR__SWAPON 0x00004000UL #define DIR__QUOTAON 0x00008000UL #define DIR__MOUNTON 0x00010000UL #define DIR__ADD_NAME 0x00020000UL #define DIR__REMOVE_NAME 0x00040000UL #define DIR__REPARENT 0x00080000UL #define DIR__SEARCH 0x00100000UL #define DIR__RMDIR 0x00200000UL #define DIR__OPEN 0x00400000UL #define FILE__IOCTL 0x00000001UL #define FILE__READ 0x00000002UL #define FILE__WRITE 0x00000004UL #define FILE__CREATE 0x00000008UL #define FILE__GETATTR 0x00000010UL #define FILE__SETATTR 0x00000020UL #define FILE__LOCK 0x00000040UL #define FILE__RELABELFROM 0x00000080UL #define FILE__RELABELTO 0x00000100UL #define FILE__APPEND 0x00000200UL #define FILE__UNLINK 0x00000400UL #define FILE__LINK 0x00000800UL #define FILE__RENAME 0x00001000UL #define FILE__EXECUTE 0x00002000UL #define FILE__SWAPON 0x00004000UL #define FILE__QUOTAON 0x00008000UL #define FILE__MOUNTON 0x00010000UL #define FILE__EXECUTE_NO_TRANS 0x00020000UL #define FILE__ENTRYPOINT 0x00040000UL #define FILE__EXECMOD 0x00080000UL #define FILE__OPEN 0x00100000UL #define LNK_FILE__IOCTL 0x00000001UL #define LNK_FILE__READ 0x00000002UL #define LNK_FILE__WRITE 0x00000004UL #define LNK_FILE__CREATE 0x00000008UL #define LNK_FILE__GETATTR 0x00000010UL #define LNK_FILE__SETATTR 0x00000020UL #define LNK_FILE__LOCK 0x00000040UL #define LNK_FILE__RELABELFROM 0x00000080UL #define LNK_FILE__RELABELTO 0x00000100UL #define LNK_FILE__APPEND 0x00000200UL #define LNK_FILE__UNLINK 0x00000400UL #define LNK_FILE__LINK 0x00000800UL #define LNK_FILE__RENAME 0x00001000UL #define LNK_FILE__EXECUTE 0x00002000UL #define LNK_FILE__SWAPON 0x00004000UL #define LNK_FILE__QUOTAON 0x00008000UL #define LNK_FILE__MOUNTON 0x00010000UL #define CHR_FILE__IOCTL 0x00000001UL #define CHR_FILE__READ 0x00000002UL #define CHR_FILE__WRITE 0x00000004UL #define CHR_FILE__CREATE 0x00000008UL #define CHR_FILE__GETATTR 0x00000010UL #define CHR_FILE__SETATTR 0x00000020UL #define CHR_FILE__LOCK 0x00000040UL #define CHR_FILE__RELABELFROM 0x00000080UL #define CHR_FILE__RELABELTO 0x00000100UL #define CHR_FILE__APPEND 0x00000200UL #define CHR_FILE__UNLINK 0x00000400UL #define CHR_FILE__LINK 0x00000800UL #define CHR_FILE__RENAME 0x00001000UL #define CHR_FILE__EXECUTE 0x00002000UL #define CHR_FILE__SWAPON 0x00004000UL #define CHR_FILE__QUOTAON 0x00008000UL #define CHR_FILE__MOUNTON 0x00010000UL #define CHR_FILE__EXECUTE_NO_TRANS 0x00020000UL #define CHR_FILE__ENTRYPOINT 0x00040000UL #define CHR_FILE__EXECMOD 0x00080000UL #define CHR_FILE__OPEN 0x00100000UL #define BLK_FILE__IOCTL 0x00000001UL #define BLK_FILE__READ 0x00000002UL #define BLK_FILE__WRITE 0x00000004UL #define BLK_FILE__CREATE 0x00000008UL #define BLK_FILE__GETATTR 0x00000010UL #define BLK_FILE__SETATTR 0x00000020UL #define BLK_FILE__LOCK 0x00000040UL #define BLK_FILE__RELABELFROM 0x00000080UL #define BLK_FILE__RELABELTO 0x00000100UL #define BLK_FILE__APPEND 0x00000200UL #define BLK_FILE__UNLINK 0x00000400UL #define BLK_FILE__LINK 0x00000800UL #define BLK_FILE__RENAME 0x00001000UL #define BLK_FILE__EXECUTE 0x00002000UL #define BLK_FILE__SWAPON 0x00004000UL #define BLK_FILE__QUOTAON 0x00008000UL #define BLK_FILE__MOUNTON 0x00010000UL #define BLK_FILE__OPEN 0x00020000UL #define SOCK_FILE__IOCTL 0x00000001UL #define SOCK_FILE__READ 0x00000002UL #define SOCK_FILE__WRITE 0x00000004UL #define SOCK_FILE__CREATE 0x00000008UL #define SOCK_FILE__GETATTR 0x00000010UL #define SOCK_FILE__SETATTR 0x00000020UL #define SOCK_FILE__LOCK 0x00000040UL #define SOCK_FILE__RELABELFROM 0x00000080UL #define SOCK_FILE__RELABELTO 0x00000100UL #define SOCK_FILE__APPEND 0x00000200UL #define SOCK_FILE__UNLINK 0x00000400UL #define SOCK_FILE__LINK 0x00000800UL #define SOCK_FILE__RENAME 0x00001000UL #define SOCK_FILE__EXECUTE 0x00002000UL #define SOCK_FILE__SWAPON 0x00004000UL #define SOCK_FILE__QUOTAON 0x00008000UL #define SOCK_FILE__MOUNTON 0x00010000UL #define FIFO_FILE__IOCTL 0x00000001UL #define FIFO_FILE__READ 0x00000002UL #define FIFO_FILE__WRITE 0x00000004UL #define FIFO_FILE__CREATE 0x00000008UL #define FIFO_FILE__GETATTR 0x00000010UL #define FIFO_FILE__SETATTR 0x00000020UL #define FIFO_FILE__LOCK 0x00000040UL #define FIFO_FILE__RELABELFROM 0x00000080UL #define FIFO_FILE__RELABELTO 0x00000100UL #define FIFO_FILE__APPEND 0x00000200UL #define FIFO_FILE__UNLINK 0x00000400UL #define FIFO_FILE__LINK 0x00000800UL #define FIFO_FILE__RENAME 0x00001000UL #define FIFO_FILE__EXECUTE 0x00002000UL #define FIFO_FILE__SWAPON 0x00004000UL #define FIFO_FILE__QUOTAON 0x00008000UL #define FIFO_FILE__MOUNTON 0x00010000UL #define FIFO_FILE__OPEN 0x00020000UL #define FD__USE 0x00000001UL #define SOCKET__IOCTL 0x00000001UL #define SOCKET__READ 0x00000002UL #define SOCKET__WRITE 0x00000004UL #define SOCKET__CREATE 0x00000008UL #define SOCKET__GETATTR 0x00000010UL #define SOCKET__SETATTR 0x00000020UL #define SOCKET__LOCK 0x00000040UL #define SOCKET__RELABELFROM 0x00000080UL #define SOCKET__RELABELTO 0x00000100UL #define SOCKET__APPEND 0x00000200UL #define SOCKET__BIND 0x00000400UL #define SOCKET__CONNECT 0x00000800UL #define SOCKET__LISTEN 0x00001000UL #define SOCKET__ACCEPT 0x00002000UL #define SOCKET__GETOPT 0x00004000UL #define SOCKET__SETOPT 0x00008000UL #define SOCKET__SHUTDOWN 0x00010000UL #define SOCKET__RECVFROM 0x00020000UL #define SOCKET__SENDTO 0x00040000UL #define SOCKET__RECV_MSG 0x00080000UL #define SOCKET__SEND_MSG 0x00100000UL #define SOCKET__NAME_BIND 0x00200000UL #define TCP_SOCKET__IOCTL 0x00000001UL #define TCP_SOCKET__READ 0x00000002UL #define TCP_SOCKET__WRITE 0x00000004UL #define TCP_SOCKET__CREATE 0x00000008UL #define TCP_SOCKET__GETATTR 0x00000010UL #define TCP_SOCKET__SETATTR 0x00000020UL #define TCP_SOCKET__LOCK 0x00000040UL #define TCP_SOCKET__RELABELFROM 0x00000080UL #define TCP_SOCKET__RELABELTO 0x00000100UL #define TCP_SOCKET__APPEND 0x00000200UL #define TCP_SOCKET__BIND 0x00000400UL #define TCP_SOCKET__CONNECT 0x00000800UL #define TCP_SOCKET__LISTEN 0x00001000UL #define TCP_SOCKET__ACCEPT 0x00002000UL #define TCP_SOCKET__GETOPT 0x00004000UL #define TCP_SOCKET__SETOPT 0x00008000UL #define TCP_SOCKET__SHUTDOWN 0x00010000UL #define TCP_SOCKET__RECVFROM 0x00020000UL #define TCP_SOCKET__SENDTO 0x00040000UL #define TCP_SOCKET__RECV_MSG 0x00080000UL #define TCP_SOCKET__SEND_MSG 0x00100000UL #define TCP_SOCKET__NAME_BIND 0x00200000UL #define TCP_SOCKET__CONNECTTO 0x00400000UL #define TCP_SOCKET__NEWCONN 0x00800000UL #define TCP_SOCKET__ACCEPTFROM 0x01000000UL #define TCP_SOCKET__NODE_BIND 0x02000000UL #define TCP_SOCKET__NAME_CONNECT 0x04000000UL #define UDP_SOCKET__IOCTL 0x00000001UL #define UDP_SOCKET__READ 0x00000002UL #define UDP_SOCKET__WRITE 0x00000004UL #define UDP_SOCKET__CREATE 0x00000008UL #define UDP_SOCKET__GETATTR 0x00000010UL #define UDP_SOCKET__SETATTR 0x00000020UL #define UDP_SOCKET__LOCK 0x00000040UL #define UDP_SOCKET__RELABELFROM 0x00000080UL #define UDP_SOCKET__RELABELTO 0x00000100UL #define UDP_SOCKET__APPEND 0x00000200UL #define UDP_SOCKET__BIND 0x00000400UL #define UDP_SOCKET__CONNECT 0x00000800UL #define UDP_SOCKET__LISTEN 0x00001000UL #define UDP_SOCKET__ACCEPT 0x00002000UL #define UDP_SOCKET__GETOPT 0x00004000UL #define UDP_SOCKET__SETOPT 0x00008000UL #define UDP_SOCKET__SHUTDOWN 0x00010000UL #define UDP_SOCKET__RECVFROM 0x00020000UL #define UDP_SOCKET__SENDTO 0x00040000UL #define UDP_SOCKET__RECV_MSG 0x00080000UL #define UDP_SOCKET__SEND_MSG 0x00100000UL #define UDP_SOCKET__NAME_BIND 0x00200000UL #define UDP_SOCKET__NODE_BIND 0x00400000UL #define RAWIP_SOCKET__IOCTL 0x00000001UL #define RAWIP_SOCKET__READ 0x00000002UL #define RAWIP_SOCKET__WRITE 0x00000004UL #define RAWIP_SOCKET__CREATE 0x00000008UL #define RAWIP_SOCKET__GETATTR 0x00000010UL #define RAWIP_SOCKET__SETATTR 0x00000020UL #define RAWIP_SOCKET__LOCK 0x00000040UL #define RAWIP_SOCKET__RELABELFROM 0x00000080UL #define RAWIP_SOCKET__RELABELTO 0x00000100UL #define RAWIP_SOCKET__APPEND 0x00000200UL #define RAWIP_SOCKET__BIND 0x00000400UL #define RAWIP_SOCKET__CONNECT 0x00000800UL #define RAWIP_SOCKET__LISTEN 0x00001000UL #define RAWIP_SOCKET__ACCEPT 0x00002000UL #define RAWIP_SOCKET__GETOPT 0x00004000UL #define RAWIP_SOCKET__SETOPT 0x00008000UL #define RAWIP_SOCKET__SHUTDOWN 0x00010000UL #define RAWIP_SOCKET__RECVFROM 0x00020000UL #define RAWIP_SOCKET__SENDTO 0x00040000UL #define RAWIP_SOCKET__RECV_MSG 0x00080000UL #define RAWIP_SOCKET__SEND_MSG 0x00100000UL #define RAWIP_SOCKET__NAME_BIND 0x00200000UL #define RAWIP_SOCKET__NODE_BIND 0x00400000UL #define NODE__TCP_RECV 0x00000001UL #define NODE__TCP_SEND 0x00000002UL #define NODE__UDP_RECV 0x00000004UL #define NODE__UDP_SEND 0x00000008UL #define NODE__RAWIP_RECV 0x00000010UL #define NODE__RAWIP_SEND 0x00000020UL #define NODE__ENFORCE_DEST 0x00000040UL #define NODE__DCCP_RECV 0x00000080UL #define NODE__DCCP_SEND 0x00000100UL #define NODE__RECVFROM 0x00000200UL #define NODE__SENDTO 0x00000400UL #define NETIF__TCP_RECV 0x00000001UL #define NETIF__TCP_SEND 0x00000002UL #define NETIF__UDP_RECV 0x00000004UL #define NETIF__UDP_SEND 0x00000008UL #define NETIF__RAWIP_RECV 0x00000010UL #define NETIF__RAWIP_SEND 0x00000020UL #define NETIF__DCCP_RECV 0x00000040UL #define NETIF__DCCP_SEND 0x00000080UL #define NETIF__INGRESS 0x00000100UL #define NETIF__EGRESS 0x00000200UL #define NETLINK_SOCKET__IOCTL 0x00000001UL #define NETLINK_SOCKET__READ 0x00000002UL #define NETLINK_SOCKET__WRITE 0x00000004UL #define NETLINK_SOCKET__CREATE 0x00000008UL #define NETLINK_SOCKET__GETATTR 0x00000010UL #define NETLINK_SOCKET__SETATTR 0x00000020UL #define NETLINK_SOCKET__LOCK 0x00000040UL #define NETLINK_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_SOCKET__RELABELTO 0x00000100UL #define NETLINK_SOCKET__APPEND 0x00000200UL #define NETLINK_SOCKET__BIND 0x00000400UL #define NETLINK_SOCKET__CONNECT 0x00000800UL #define NETLINK_SOCKET__LISTEN 0x00001000UL #define NETLINK_SOCKET__ACCEPT 0x00002000UL #define NETLINK_SOCKET__GETOPT 0x00004000UL #define NETLINK_SOCKET__SETOPT 0x00008000UL #define NETLINK_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_SOCKET__RECVFROM 0x00020000UL #define NETLINK_SOCKET__SENDTO 0x00040000UL #define NETLINK_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_SOCKET__NAME_BIND 0x00200000UL #define PACKET_SOCKET__IOCTL 0x00000001UL #define PACKET_SOCKET__READ 0x00000002UL #define PACKET_SOCKET__WRITE 0x00000004UL #define PACKET_SOCKET__CREATE 0x00000008UL #define PACKET_SOCKET__GETATTR 0x00000010UL #define PACKET_SOCKET__SETATTR 0x00000020UL #define PACKET_SOCKET__LOCK 0x00000040UL #define PACKET_SOCKET__RELABELFROM 0x00000080UL #define PACKET_SOCKET__RELABELTO 0x00000100UL #define PACKET_SOCKET__APPEND 0x00000200UL #define PACKET_SOCKET__BIND 0x00000400UL #define PACKET_SOCKET__CONNECT 0x00000800UL #define PACKET_SOCKET__LISTEN 0x00001000UL #define PACKET_SOCKET__ACCEPT 0x00002000UL #define PACKET_SOCKET__GETOPT 0x00004000UL #define PACKET_SOCKET__SETOPT 0x00008000UL #define PACKET_SOCKET__SHUTDOWN 0x00010000UL #define PACKET_SOCKET__RECVFROM 0x00020000UL #define PACKET_SOCKET__SENDTO 0x00040000UL #define PACKET_SOCKET__RECV_MSG 0x00080000UL #define PACKET_SOCKET__SEND_MSG 0x00100000UL #define PACKET_SOCKET__NAME_BIND 0x00200000UL #define KEY_SOCKET__IOCTL 0x00000001UL #define KEY_SOCKET__READ 0x00000002UL #define KEY_SOCKET__WRITE 0x00000004UL #define KEY_SOCKET__CREATE 0x00000008UL #define KEY_SOCKET__GETATTR 0x00000010UL #define KEY_SOCKET__SETATTR 0x00000020UL #define KEY_SOCKET__LOCK 0x00000040UL #define KEY_SOCKET__RELABELFROM 0x00000080UL #define KEY_SOCKET__RELABELTO 0x00000100UL #define KEY_SOCKET__APPEND 0x00000200UL #define KEY_SOCKET__BIND 0x00000400UL #define KEY_SOCKET__CONNECT 0x00000800UL #define KEY_SOCKET__LISTEN 0x00001000UL #define KEY_SOCKET__ACCEPT 0x00002000UL #define KEY_SOCKET__GETOPT 0x00004000UL #define KEY_SOCKET__SETOPT 0x00008000UL #define KEY_SOCKET__SHUTDOWN 0x00010000UL #define KEY_SOCKET__RECVFROM 0x00020000UL #define KEY_SOCKET__SENDTO 0x00040000UL #define KEY_SOCKET__RECV_MSG 0x00080000UL #define KEY_SOCKET__SEND_MSG 0x00100000UL #define KEY_SOCKET__NAME_BIND 0x00200000UL #define UNIX_STREAM_SOCKET__IOCTL 0x00000001UL #define UNIX_STREAM_SOCKET__READ 0x00000002UL #define UNIX_STREAM_SOCKET__WRITE 0x00000004UL #define UNIX_STREAM_SOCKET__CREATE 0x00000008UL #define UNIX_STREAM_SOCKET__GETATTR 0x00000010UL #define UNIX_STREAM_SOCKET__SETATTR 0x00000020UL #define UNIX_STREAM_SOCKET__LOCK 0x00000040UL #define UNIX_STREAM_SOCKET__RELABELFROM 0x00000080UL #define UNIX_STREAM_SOCKET__RELABELTO 0x00000100UL #define UNIX_STREAM_SOCKET__APPEND 0x00000200UL #define UNIX_STREAM_SOCKET__BIND 0x00000400UL #define UNIX_STREAM_SOCKET__CONNECT 0x00000800UL #define UNIX_STREAM_SOCKET__LISTEN 0x00001000UL #define UNIX_STREAM_SOCKET__ACCEPT 0x00002000UL #define UNIX_STREAM_SOCKET__GETOPT 0x00004000UL #define UNIX_STREAM_SOCKET__SETOPT 0x00008000UL #define UNIX_STREAM_SOCKET__SHUTDOWN 0x00010000UL #define UNIX_STREAM_SOCKET__RECVFROM 0x00020000UL #define UNIX_STREAM_SOCKET__SENDTO 0x00040000UL #define UNIX_STREAM_SOCKET__RECV_MSG 0x00080000UL #define UNIX_STREAM_SOCKET__SEND_MSG 0x00100000UL #define UNIX_STREAM_SOCKET__NAME_BIND 0x00200000UL #define UNIX_STREAM_SOCKET__CONNECTTO 0x00400000UL #define UNIX_STREAM_SOCKET__NEWCONN 0x00800000UL #define UNIX_STREAM_SOCKET__ACCEPTFROM 0x01000000UL #define UNIX_DGRAM_SOCKET__IOCTL 0x00000001UL #define UNIX_DGRAM_SOCKET__READ 0x00000002UL #define UNIX_DGRAM_SOCKET__WRITE 0x00000004UL #define UNIX_DGRAM_SOCKET__CREATE 0x00000008UL #define UNIX_DGRAM_SOCKET__GETATTR 0x00000010UL #define UNIX_DGRAM_SOCKET__SETATTR 0x00000020UL #define UNIX_DGRAM_SOCKET__LOCK 0x00000040UL #define UNIX_DGRAM_SOCKET__RELABELFROM 0x00000080UL #define UNIX_DGRAM_SOCKET__RELABELTO 0x00000100UL #define UNIX_DGRAM_SOCKET__APPEND 0x00000200UL #define UNIX_DGRAM_SOCKET__BIND 0x00000400UL #define UNIX_DGRAM_SOCKET__CONNECT 0x00000800UL #define UNIX_DGRAM_SOCKET__LISTEN 0x00001000UL #define UNIX_DGRAM_SOCKET__ACCEPT 0x00002000UL #define UNIX_DGRAM_SOCKET__GETOPT 0x00004000UL #define UNIX_DGRAM_SOCKET__SETOPT 0x00008000UL #define UNIX_DGRAM_SOCKET__SHUTDOWN 0x00010000UL #define UNIX_DGRAM_SOCKET__RECVFROM 0x00020000UL #define UNIX_DGRAM_SOCKET__SENDTO 0x00040000UL #define UNIX_DGRAM_SOCKET__RECV_MSG 0x00080000UL #define UNIX_DGRAM_SOCKET__SEND_MSG 0x00100000UL #define UNIX_DGRAM_SOCKET__NAME_BIND 0x00200000UL #define PROCESS__FORK 0x00000001UL #define PROCESS__TRANSITION 0x00000002UL #define PROCESS__SIGCHLD 0x00000004UL #define PROCESS__SIGKILL 0x00000008UL #define PROCESS__SIGSTOP 0x00000010UL #define PROCESS__SIGNULL 0x00000020UL #define PROCESS__SIGNAL 0x00000040UL #define PROCESS__PTRACE 0x00000080UL #define PROCESS__GETSCHED 0x00000100UL #define PROCESS__SETSCHED 0x00000200UL #define PROCESS__GETSESSION 0x00000400UL #define PROCESS__GETPGID 0x00000800UL #define PROCESS__SETPGID 0x00001000UL #define PROCESS__GETCAP 0x00002000UL #define PROCESS__SETCAP 0x00004000UL #define PROCESS__SHARE 0x00008000UL #define PROCESS__GETATTR 0x00010000UL #define PROCESS__SETEXEC 0x00020000UL #define PROCESS__SETFSCREATE 0x00040000UL #define PROCESS__NOATSECURE 0x00080000UL #define PROCESS__SIGINH 0x00100000UL #define PROCESS__SETRLIMIT 0x00200000UL #define PROCESS__RLIMITINH 0x00400000UL #define PROCESS__DYNTRANSITION 0x00800000UL #define PROCESS__SETCURRENT 0x01000000UL #define PROCESS__EXECMEM 0x02000000UL #define PROCESS__EXECSTACK 0x04000000UL #define PROCESS__EXECHEAP 0x08000000UL #define PROCESS__SETKEYCREATE 0x10000000UL #define PROCESS__SETSOCKCREATE 0x20000000UL #define IPC__CREATE 0x00000001UL #define IPC__DESTROY 0x00000002UL #define IPC__GETATTR 0x00000004UL #define IPC__SETATTR 0x00000008UL #define IPC__READ 0x00000010UL #define IPC__WRITE 0x00000020UL #define IPC__ASSOCIATE 0x00000040UL #define IPC__UNIX_READ 0x00000080UL #define IPC__UNIX_WRITE 0x00000100UL #define SEM__CREATE 0x00000001UL #define SEM__DESTROY 0x00000002UL #define SEM__GETATTR 0x00000004UL #define SEM__SETATTR 0x00000008UL #define SEM__READ 0x00000010UL #define SEM__WRITE 0x00000020UL #define SEM__ASSOCIATE 0x00000040UL #define SEM__UNIX_READ 0x00000080UL #define SEM__UNIX_WRITE 0x00000100UL #define MSGQ__CREATE 0x00000001UL #define MSGQ__DESTROY 0x00000002UL #define MSGQ__GETATTR 0x00000004UL #define MSGQ__SETATTR 0x00000008UL #define MSGQ__READ 0x00000010UL #define MSGQ__WRITE 0x00000020UL #define MSGQ__ASSOCIATE 0x00000040UL #define MSGQ__UNIX_READ 0x00000080UL #define MSGQ__UNIX_WRITE 0x00000100UL #define MSGQ__ENQUEUE 0x00000200UL #define MSG__SEND 0x00000001UL #define MSG__RECEIVE 0x00000002UL #define SHM__CREATE 0x00000001UL #define SHM__DESTROY 0x00000002UL #define SHM__GETATTR 0x00000004UL #define SHM__SETATTR 0x00000008UL #define SHM__READ 0x00000010UL #define SHM__WRITE 0x00000020UL #define SHM__ASSOCIATE 0x00000040UL #define SHM__UNIX_READ 0x00000080UL #define SHM__UNIX_WRITE 0x00000100UL #define SHM__LOCK 0x00000200UL #define SECURITY__COMPUTE_AV 0x00000001UL #define SECURITY__COMPUTE_CREATE 0x00000002UL #define SECURITY__COMPUTE_MEMBER 0x00000004UL #define SECURITY__CHECK_CONTEXT 0x00000008UL #define SECURITY__LOAD_POLICY 0x00000010UL #define SECURITY__COMPUTE_RELABEL 0x00000020UL #define SECURITY__COMPUTE_USER 0x00000040UL #define SECURITY__SETENFORCE 0x00000080UL #define SECURITY__SETBOOL 0x00000100UL #define SECURITY__SETSECPARAM 0x00000200UL #define SECURITY__SETCHECKREQPROT 0x00000400UL #define SYSTEM__IPC_INFO 0x00000001UL #define SYSTEM__SYSLOG_READ 0x00000002UL #define SYSTEM__SYSLOG_MOD 0x00000004UL #define SYSTEM__SYSLOG_CONSOLE 0x00000008UL #define CAPABILITY__CHOWN 0x00000001UL #define CAPABILITY__DAC_OVERRIDE 0x00000002UL #define CAPABILITY__DAC_READ_SEARCH 0x00000004UL #define CAPABILITY__FOWNER 0x00000008UL #define CAPABILITY__FSETID 0x00000010UL #define CAPABILITY__KILL 0x00000020UL #define CAPABILITY__SETGID 0x00000040UL #define CAPABILITY__SETUID 0x00000080UL #define CAPABILITY__SETPCAP 0x00000100UL #define CAPABILITY__LINUX_IMMUTABLE 0x00000200UL #define CAPABILITY__NET_BIND_SERVICE 0x00000400UL #define CAPABILITY__NET_BROADCAST 0x00000800UL #define CAPABILITY__NET_ADMIN 0x00001000UL #define CAPABILITY__NET_RAW 0x00002000UL #define CAPABILITY__IPC_LOCK 0x00004000UL #define CAPABILITY__IPC_OWNER 0x00008000UL #define CAPABILITY__SYS_MODULE 0x00010000UL #define CAPABILITY__SYS_RAWIO 0x00020000UL #define CAPABILITY__SYS_CHROOT 0x00040000UL #define CAPABILITY__SYS_PTRACE 0x00080000UL #define CAPABILITY__SYS_PACCT 0x00100000UL #define CAPABILITY__SYS_ADMIN 0x00200000UL #define CAPABILITY__SYS_BOOT 0x00400000UL #define CAPABILITY__SYS_NICE 0x00800000UL #define CAPABILITY__SYS_RESOURCE 0x01000000UL #define CAPABILITY__SYS_TIME 0x02000000UL #define CAPABILITY__SYS_TTY_CONFIG 0x04000000UL #define CAPABILITY__MKNOD 0x08000000UL #define CAPABILITY__LEASE 0x10000000UL #define CAPABILITY__AUDIT_WRITE 0x20000000UL #define CAPABILITY__AUDIT_CONTROL 0x40000000UL #define CAPABILITY__SETFCAP 0x80000000UL #define CAPABILITY2__MAC_OVERRIDE 0x00000001UL #define CAPABILITY2__MAC_ADMIN 0x00000002UL #define PASSWD__PASSWD 0x00000001UL #define PASSWD__CHFN 0x00000002UL #define PASSWD__CHSH 0x00000004UL #define PASSWD__ROOTOK 0x00000008UL #define PASSWD__CRONTAB 0x00000010UL #define X_DRAWABLE__CREATE 0x00000001UL #define X_DRAWABLE__DESTROY 0x00000002UL #define X_DRAWABLE__READ 0x00000004UL #define X_DRAWABLE__WRITE 0x00000008UL #define X_DRAWABLE__BLEND 0x00000010UL #define X_DRAWABLE__GETATTR 0x00000020UL #define X_DRAWABLE__SETATTR 0x00000040UL #define X_DRAWABLE__LIST_CHILD 0x00000080UL #define X_DRAWABLE__ADD_CHILD 0x00000100UL #define X_DRAWABLE__REMOVE_CHILD 0x00000200UL #define X_DRAWABLE__LIST_PROPERTY 0x00000400UL #define X_DRAWABLE__GET_PROPERTY 0x00000800UL #define X_DRAWABLE__SET_PROPERTY 0x00001000UL #define X_DRAWABLE__MANAGE 0x00002000UL #define X_DRAWABLE__OVERRIDE 0x00004000UL #define X_DRAWABLE__SHOW 0x00008000UL #define X_DRAWABLE__HIDE 0x00010000UL #define X_DRAWABLE__SEND 0x00020000UL #define X_DRAWABLE__RECEIVE 0x00040000UL #define X_SCREEN__GETATTR 0x00000001UL #define X_SCREEN__SETATTR 0x00000002UL #define X_SCREEN__HIDE_CURSOR 0x00000004UL #define X_SCREEN__SHOW_CURSOR 0x00000008UL #define X_SCREEN__SAVER_GETATTR 0x00000010UL #define X_SCREEN__SAVER_SETATTR 0x00000020UL #define X_SCREEN__SAVER_HIDE 0x00000040UL #define X_SCREEN__SAVER_SHOW 0x00000080UL #define X_GC__CREATE 0x00000001UL #define X_GC__DESTROY 0x00000002UL #define X_GC__GETATTR 0x00000004UL #define X_GC__SETATTR 0x00000008UL #define X_GC__USE 0x00000010UL #define X_FONT__CREATE 0x00000001UL #define X_FONT__DESTROY 0x00000002UL #define X_FONT__GETATTR 0x00000004UL #define X_FONT__ADD_GLYPH 0x00000008UL #define X_FONT__REMOVE_GLYPH 0x00000010UL #define X_FONT__USE 0x00000020UL #define X_COLORMAP__CREATE 0x00000001UL #define X_COLORMAP__DESTROY 0x00000002UL #define X_COLORMAP__READ 0x00000004UL #define X_COLORMAP__WRITE 0x00000008UL #define X_COLORMAP__GETATTR 0x00000010UL #define X_COLORMAP__ADD_COLOR 0x00000020UL #define X_COLORMAP__REMOVE_COLOR 0x00000040UL #define X_COLORMAP__INSTALL 0x00000080UL #define X_COLORMAP__UNINSTALL 0x00000100UL #define X_COLORMAP__USE 0x00000200UL #define X_PROPERTY__CREATE 0x00000001UL #define X_PROPERTY__DESTROY 0x00000002UL #define X_PROPERTY__READ 0x00000004UL #define X_PROPERTY__WRITE 0x00000008UL #define X_PROPERTY__APPEND 0x00000010UL #define X_PROPERTY__GETATTR 0x00000020UL #define X_PROPERTY__SETATTR 0x00000040UL #define X_SELECTION__READ 0x00000001UL #define X_SELECTION__WRITE 0x00000002UL #define X_SELECTION__GETATTR 0x00000004UL #define X_SELECTION__SETATTR 0x00000008UL #define X_CURSOR__CREATE 0x00000001UL #define X_CURSOR__DESTROY 0x00000002UL #define X_CURSOR__READ 0x00000004UL #define X_CURSOR__WRITE 0x00000008UL #define X_CURSOR__GETATTR 0x00000010UL #define X_CURSOR__SETATTR 0x00000020UL #define X_CURSOR__USE 0x00000040UL #define X_CLIENT__DESTROY 0x00000001UL #define X_CLIENT__GETATTR 0x00000002UL #define X_CLIENT__SETATTR 0x00000004UL #define X_CLIENT__MANAGE 0x00000008UL #define X_DEVICE__GETATTR 0x00000001UL #define X_DEVICE__SETATTR 0x00000002UL #define X_DEVICE__USE 0x00000004UL #define X_DEVICE__READ 0x00000008UL #define X_DEVICE__WRITE 0x00000010UL #define X_DEVICE__GETFOCUS 0x00000020UL #define X_DEVICE__SETFOCUS 0x00000040UL #define X_DEVICE__BELL 0x00000080UL #define X_DEVICE__FORCE_CURSOR 0x00000100UL #define X_DEVICE__FREEZE 0x00000200UL #define X_DEVICE__GRAB 0x00000400UL #define X_DEVICE__MANAGE 0x00000800UL #define X_SERVER__GETATTR 0x00000001UL #define X_SERVER__SETATTR 0x00000002UL #define X_SERVER__RECORD 0x00000004UL #define X_SERVER__DEBUG 0x00000008UL #define X_SERVER__GRAB 0x00000010UL #define X_SERVER__MANAGE 0x00000020UL #define X_EXTENSION__QUERY 0x00000001UL #define X_EXTENSION__USE 0x00000002UL #define X_RESOURCE__READ 0x00000001UL #define X_RESOURCE__WRITE 0x00000002UL #define X_EVENT__SEND 0x00000001UL #define X_EVENT__RECEIVE 0x00000002UL #define X_SYNTHETIC_EVENT__SEND 0x00000001UL #define X_SYNTHETIC_EVENT__RECEIVE 0x00000002UL #define NETLINK_ROUTE_SOCKET__IOCTL 0x00000001UL #define NETLINK_ROUTE_SOCKET__READ 0x00000002UL #define NETLINK_ROUTE_SOCKET__WRITE 0x00000004UL #define NETLINK_ROUTE_SOCKET__CREATE 0x00000008UL #define NETLINK_ROUTE_SOCKET__GETATTR 0x00000010UL #define NETLINK_ROUTE_SOCKET__SETATTR 0x00000020UL #define NETLINK_ROUTE_SOCKET__LOCK 0x00000040UL #define NETLINK_ROUTE_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_ROUTE_SOCKET__RELABELTO 0x00000100UL #define NETLINK_ROUTE_SOCKET__APPEND 0x00000200UL #define NETLINK_ROUTE_SOCKET__BIND 0x00000400UL #define NETLINK_ROUTE_SOCKET__CONNECT 0x00000800UL #define NETLINK_ROUTE_SOCKET__LISTEN 0x00001000UL #define NETLINK_ROUTE_SOCKET__ACCEPT 0x00002000UL #define NETLINK_ROUTE_SOCKET__GETOPT 0x00004000UL #define NETLINK_ROUTE_SOCKET__SETOPT 0x00008000UL #define NETLINK_ROUTE_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_ROUTE_SOCKET__RECVFROM 0x00020000UL #define NETLINK_ROUTE_SOCKET__SENDTO 0x00040000UL #define NETLINK_ROUTE_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_ROUTE_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_ROUTE_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_ROUTE_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_ROUTE_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_FIREWALL_SOCKET__IOCTL 0x00000001UL #define NETLINK_FIREWALL_SOCKET__READ 0x00000002UL #define NETLINK_FIREWALL_SOCKET__WRITE 0x00000004UL #define NETLINK_FIREWALL_SOCKET__CREATE 0x00000008UL #define NETLINK_FIREWALL_SOCKET__GETATTR 0x00000010UL #define NETLINK_FIREWALL_SOCKET__SETATTR 0x00000020UL #define NETLINK_FIREWALL_SOCKET__LOCK 0x00000040UL #define NETLINK_FIREWALL_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_FIREWALL_SOCKET__RELABELTO 0x00000100UL #define NETLINK_FIREWALL_SOCKET__APPEND 0x00000200UL #define NETLINK_FIREWALL_SOCKET__BIND 0x00000400UL #define NETLINK_FIREWALL_SOCKET__CONNECT 0x00000800UL #define NETLINK_FIREWALL_SOCKET__LISTEN 0x00001000UL #define NETLINK_FIREWALL_SOCKET__ACCEPT 0x00002000UL #define NETLINK_FIREWALL_SOCKET__GETOPT 0x00004000UL #define NETLINK_FIREWALL_SOCKET__SETOPT 0x00008000UL #define NETLINK_FIREWALL_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_FIREWALL_SOCKET__RECVFROM 0x00020000UL #define NETLINK_FIREWALL_SOCKET__SENDTO 0x00040000UL #define NETLINK_FIREWALL_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_FIREWALL_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_FIREWALL_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_FIREWALL_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_FIREWALL_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_TCPDIAG_SOCKET__IOCTL 0x00000001UL #define NETLINK_TCPDIAG_SOCKET__READ 0x00000002UL #define NETLINK_TCPDIAG_SOCKET__WRITE 0x00000004UL #define NETLINK_TCPDIAG_SOCKET__CREATE 0x00000008UL #define NETLINK_TCPDIAG_SOCKET__GETATTR 0x00000010UL #define NETLINK_TCPDIAG_SOCKET__SETATTR 0x00000020UL #define NETLINK_TCPDIAG_SOCKET__LOCK 0x00000040UL #define NETLINK_TCPDIAG_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_TCPDIAG_SOCKET__RELABELTO 0x00000100UL #define NETLINK_TCPDIAG_SOCKET__APPEND 0x00000200UL #define NETLINK_TCPDIAG_SOCKET__BIND 0x00000400UL #define NETLINK_TCPDIAG_SOCKET__CONNECT 0x00000800UL #define NETLINK_TCPDIAG_SOCKET__LISTEN 0x00001000UL #define NETLINK_TCPDIAG_SOCKET__ACCEPT 0x00002000UL #define NETLINK_TCPDIAG_SOCKET__GETOPT 0x00004000UL #define NETLINK_TCPDIAG_SOCKET__SETOPT 0x00008000UL #define NETLINK_TCPDIAG_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_TCPDIAG_SOCKET__RECVFROM 0x00020000UL #define NETLINK_TCPDIAG_SOCKET__SENDTO 0x00040000UL #define NETLINK_TCPDIAG_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_TCPDIAG_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_TCPDIAG_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_TCPDIAG_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_NFLOG_SOCKET__IOCTL 0x00000001UL #define NETLINK_NFLOG_SOCKET__READ 0x00000002UL #define NETLINK_NFLOG_SOCKET__WRITE 0x00000004UL #define NETLINK_NFLOG_SOCKET__CREATE 0x00000008UL #define NETLINK_NFLOG_SOCKET__GETATTR 0x00000010UL #define NETLINK_NFLOG_SOCKET__SETATTR 0x00000020UL #define NETLINK_NFLOG_SOCKET__LOCK 0x00000040UL #define NETLINK_NFLOG_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_NFLOG_SOCKET__RELABELTO 0x00000100UL #define NETLINK_NFLOG_SOCKET__APPEND 0x00000200UL #define NETLINK_NFLOG_SOCKET__BIND 0x00000400UL #define NETLINK_NFLOG_SOCKET__CONNECT 0x00000800UL #define NETLINK_NFLOG_SOCKET__LISTEN 0x00001000UL #define NETLINK_NFLOG_SOCKET__ACCEPT 0x00002000UL #define NETLINK_NFLOG_SOCKET__GETOPT 0x00004000UL #define NETLINK_NFLOG_SOCKET__SETOPT 0x00008000UL #define NETLINK_NFLOG_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_NFLOG_SOCKET__RECVFROM 0x00020000UL #define NETLINK_NFLOG_SOCKET__SENDTO 0x00040000UL #define NETLINK_NFLOG_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_NFLOG_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_NFLOG_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_XFRM_SOCKET__IOCTL 0x00000001UL #define NETLINK_XFRM_SOCKET__READ 0x00000002UL #define NETLINK_XFRM_SOCKET__WRITE 0x00000004UL #define NETLINK_XFRM_SOCKET__CREATE 0x00000008UL #define NETLINK_XFRM_SOCKET__GETATTR 0x00000010UL #define NETLINK_XFRM_SOCKET__SETATTR 0x00000020UL #define NETLINK_XFRM_SOCKET__LOCK 0x00000040UL #define NETLINK_XFRM_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_XFRM_SOCKET__RELABELTO 0x00000100UL #define NETLINK_XFRM_SOCKET__APPEND 0x00000200UL #define NETLINK_XFRM_SOCKET__BIND 0x00000400UL #define NETLINK_XFRM_SOCKET__CONNECT 0x00000800UL #define NETLINK_XFRM_SOCKET__LISTEN 0x00001000UL #define NETLINK_XFRM_SOCKET__ACCEPT 0x00002000UL #define NETLINK_XFRM_SOCKET__GETOPT 0x00004000UL #define NETLINK_XFRM_SOCKET__SETOPT 0x00008000UL #define NETLINK_XFRM_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_XFRM_SOCKET__RECVFROM 0x00020000UL #define NETLINK_XFRM_SOCKET__SENDTO 0x00040000UL #define NETLINK_XFRM_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_XFRM_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_XFRM_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_XFRM_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_XFRM_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_SELINUX_SOCKET__IOCTL 0x00000001UL #define NETLINK_SELINUX_SOCKET__READ 0x00000002UL #define NETLINK_SELINUX_SOCKET__WRITE 0x00000004UL #define NETLINK_SELINUX_SOCKET__CREATE 0x00000008UL #define NETLINK_SELINUX_SOCKET__GETATTR 0x00000010UL #define NETLINK_SELINUX_SOCKET__SETATTR 0x00000020UL #define NETLINK_SELINUX_SOCKET__LOCK 0x00000040UL #define NETLINK_SELINUX_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_SELINUX_SOCKET__RELABELTO 0x00000100UL #define NETLINK_SELINUX_SOCKET__APPEND 0x00000200UL #define NETLINK_SELINUX_SOCKET__BIND 0x00000400UL #define NETLINK_SELINUX_SOCKET__CONNECT 0x00000800UL #define NETLINK_SELINUX_SOCKET__LISTEN 0x00001000UL #define NETLINK_SELINUX_SOCKET__ACCEPT 0x00002000UL #define NETLINK_SELINUX_SOCKET__GETOPT 0x00004000UL #define NETLINK_SELINUX_SOCKET__SETOPT 0x00008000UL #define NETLINK_SELINUX_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_SELINUX_SOCKET__RECVFROM 0x00020000UL #define NETLINK_SELINUX_SOCKET__SENDTO 0x00040000UL #define NETLINK_SELINUX_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_SELINUX_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_SELINUX_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_AUDIT_SOCKET__IOCTL 0x00000001UL #define NETLINK_AUDIT_SOCKET__READ 0x00000002UL #define NETLINK_AUDIT_SOCKET__WRITE 0x00000004UL #define NETLINK_AUDIT_SOCKET__CREATE 0x00000008UL #define NETLINK_AUDIT_SOCKET__GETATTR 0x00000010UL #define NETLINK_AUDIT_SOCKET__SETATTR 0x00000020UL #define NETLINK_AUDIT_SOCKET__LOCK 0x00000040UL #define NETLINK_AUDIT_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_AUDIT_SOCKET__RELABELTO 0x00000100UL #define NETLINK_AUDIT_SOCKET__APPEND 0x00000200UL #define NETLINK_AUDIT_SOCKET__BIND 0x00000400UL #define NETLINK_AUDIT_SOCKET__CONNECT 0x00000800UL #define NETLINK_AUDIT_SOCKET__LISTEN 0x00001000UL #define NETLINK_AUDIT_SOCKET__ACCEPT 0x00002000UL #define NETLINK_AUDIT_SOCKET__GETOPT 0x00004000UL #define NETLINK_AUDIT_SOCKET__SETOPT 0x00008000UL #define NETLINK_AUDIT_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_AUDIT_SOCKET__RECVFROM 0x00020000UL #define NETLINK_AUDIT_SOCKET__SENDTO 0x00040000UL #define NETLINK_AUDIT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_AUDIT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_AUDIT_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_AUDIT_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_AUDIT_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_AUDIT_SOCKET__NLMSG_RELAY 0x01000000UL #define NETLINK_AUDIT_SOCKET__NLMSG_READPRIV 0x02000000UL #define NETLINK_AUDIT_SOCKET__NLMSG_TTY_AUDIT 0x04000000UL #define NETLINK_IP6FW_SOCKET__IOCTL 0x00000001UL #define NETLINK_IP6FW_SOCKET__READ 0x00000002UL #define NETLINK_IP6FW_SOCKET__WRITE 0x00000004UL #define NETLINK_IP6FW_SOCKET__CREATE 0x00000008UL #define NETLINK_IP6FW_SOCKET__GETATTR 0x00000010UL #define NETLINK_IP6FW_SOCKET__SETATTR 0x00000020UL #define NETLINK_IP6FW_SOCKET__LOCK 0x00000040UL #define NETLINK_IP6FW_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_IP6FW_SOCKET__RELABELTO 0x00000100UL #define NETLINK_IP6FW_SOCKET__APPEND 0x00000200UL #define NETLINK_IP6FW_SOCKET__BIND 0x00000400UL #define NETLINK_IP6FW_SOCKET__CONNECT 0x00000800UL #define NETLINK_IP6FW_SOCKET__LISTEN 0x00001000UL #define NETLINK_IP6FW_SOCKET__ACCEPT 0x00002000UL #define NETLINK_IP6FW_SOCKET__GETOPT 0x00004000UL #define NETLINK_IP6FW_SOCKET__SETOPT 0x00008000UL #define NETLINK_IP6FW_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_IP6FW_SOCKET__RECVFROM 0x00020000UL #define NETLINK_IP6FW_SOCKET__SENDTO 0x00040000UL #define NETLINK_IP6FW_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_IP6FW_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_IP6FW_SOCKET__NAME_BIND 0x00200000UL #define NETLINK_IP6FW_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_IP6FW_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_DNRT_SOCKET__IOCTL 0x00000001UL #define NETLINK_DNRT_SOCKET__READ 0x00000002UL #define NETLINK_DNRT_SOCKET__WRITE 0x00000004UL #define NETLINK_DNRT_SOCKET__CREATE 0x00000008UL #define NETLINK_DNRT_SOCKET__GETATTR 0x00000010UL #define NETLINK_DNRT_SOCKET__SETATTR 0x00000020UL #define NETLINK_DNRT_SOCKET__LOCK 0x00000040UL #define NETLINK_DNRT_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_DNRT_SOCKET__RELABELTO 0x00000100UL #define NETLINK_DNRT_SOCKET__APPEND 0x00000200UL #define NETLINK_DNRT_SOCKET__BIND 0x00000400UL #define NETLINK_DNRT_SOCKET__CONNECT 0x00000800UL #define NETLINK_DNRT_SOCKET__LISTEN 0x00001000UL #define NETLINK_DNRT_SOCKET__ACCEPT 0x00002000UL #define NETLINK_DNRT_SOCKET__GETOPT 0x00004000UL #define NETLINK_DNRT_SOCKET__SETOPT 0x00008000UL #define NETLINK_DNRT_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_DNRT_SOCKET__RECVFROM 0x00020000UL #define NETLINK_DNRT_SOCKET__SENDTO 0x00040000UL #define NETLINK_DNRT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_DNRT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_DNRT_SOCKET__NAME_BIND 0x00200000UL #define DBUS__ACQUIRE_SVC 0x00000001UL #define DBUS__SEND_MSG 0x00000002UL #define NSCD__GETPWD 0x00000001UL #define NSCD__GETGRP 0x00000002UL #define NSCD__GETHOST 0x00000004UL #define NSCD__GETSTAT 0x00000008UL #define NSCD__ADMIN 0x00000010UL #define NSCD__SHMEMPWD 0x00000020UL #define NSCD__SHMEMGRP 0x00000040UL #define NSCD__SHMEMHOST 0x00000080UL #define NSCD__GETSERV 0x00000100UL #define NSCD__SHMEMSERV 0x00000200UL #define NSCD__GETNETGRP 0x00000400UL #define NSCD__SHMEMNETGRP 0x00000800UL #define ASSOCIATION__SENDTO 0x00000001UL #define ASSOCIATION__RECVFROM 0x00000002UL #define ASSOCIATION__SETCONTEXT 0x00000004UL #define ASSOCIATION__POLMATCH 0x00000008UL #define NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL 0x00000001UL #define NETLINK_KOBJECT_UEVENT_SOCKET__READ 0x00000002UL #define NETLINK_KOBJECT_UEVENT_SOCKET__WRITE 0x00000004UL #define NETLINK_KOBJECT_UEVENT_SOCKET__CREATE 0x00000008UL #define NETLINK_KOBJECT_UEVENT_SOCKET__GETATTR 0x00000010UL #define NETLINK_KOBJECT_UEVENT_SOCKET__SETATTR 0x00000020UL #define NETLINK_KOBJECT_UEVENT_SOCKET__LOCK 0x00000040UL #define NETLINK_KOBJECT_UEVENT_SOCKET__RELABELFROM 0x00000080UL #define NETLINK_KOBJECT_UEVENT_SOCKET__RELABELTO 0x00000100UL #define NETLINK_KOBJECT_UEVENT_SOCKET__APPEND 0x00000200UL #define NETLINK_KOBJECT_UEVENT_SOCKET__BIND 0x00000400UL #define NETLINK_KOBJECT_UEVENT_SOCKET__CONNECT 0x00000800UL #define NETLINK_KOBJECT_UEVENT_SOCKET__LISTEN 0x00001000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__ACCEPT 0x00002000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__GETOPT 0x00004000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__SETOPT 0x00008000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__SHUTDOWN 0x00010000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__RECVFROM 0x00020000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__SENDTO 0x00040000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__NAME_BIND 0x00200000UL #define APPLETALK_SOCKET__IOCTL 0x00000001UL #define APPLETALK_SOCKET__READ 0x00000002UL #define APPLETALK_SOCKET__WRITE 0x00000004UL #define APPLETALK_SOCKET__CREATE 0x00000008UL #define APPLETALK_SOCKET__GETATTR 0x00000010UL #define APPLETALK_SOCKET__SETATTR 0x00000020UL #define APPLETALK_SOCKET__LOCK 0x00000040UL #define APPLETALK_SOCKET__RELABELFROM 0x00000080UL #define APPLETALK_SOCKET__RELABELTO 0x00000100UL #define APPLETALK_SOCKET__APPEND 0x00000200UL #define APPLETALK_SOCKET__BIND 0x00000400UL #define APPLETALK_SOCKET__CONNECT 0x00000800UL #define APPLETALK_SOCKET__LISTEN 0x00001000UL #define APPLETALK_SOCKET__ACCEPT 0x00002000UL #define APPLETALK_SOCKET__GETOPT 0x00004000UL #define APPLETALK_SOCKET__SETOPT 0x00008000UL #define APPLETALK_SOCKET__SHUTDOWN 0x00010000UL #define APPLETALK_SOCKET__RECVFROM 0x00020000UL #define APPLETALK_SOCKET__SENDTO 0x00040000UL #define APPLETALK_SOCKET__RECV_MSG 0x00080000UL #define APPLETALK_SOCKET__SEND_MSG 0x00100000UL #define APPLETALK_SOCKET__NAME_BIND 0x00200000UL #define PACKET__SEND 0x00000001UL #define PACKET__RECV 0x00000002UL #define PACKET__RELABELTO 0x00000004UL #define PACKET__FLOW_IN 0x00000008UL #define PACKET__FLOW_OUT 0x00000010UL #define PACKET__FORWARD_IN 0x00000020UL #define PACKET__FORWARD_OUT 0x00000040UL #define KEY__VIEW 0x00000001UL #define KEY__READ 0x00000002UL #define KEY__WRITE 0x00000004UL #define KEY__SEARCH 0x00000008UL #define KEY__LINK 0x00000010UL #define KEY__SETATTR 0x00000020UL #define KEY__CREATE 0x00000040UL #define CONTEXT__TRANSLATE 0x00000001UL #define CONTEXT__CONTAINS 0x00000002UL #define DCCP_SOCKET__IOCTL 0x00000001UL #define DCCP_SOCKET__READ 0x00000002UL #define DCCP_SOCKET__WRITE 0x00000004UL #define DCCP_SOCKET__CREATE 0x00000008UL #define DCCP_SOCKET__GETATTR 0x00000010UL #define DCCP_SOCKET__SETATTR 0x00000020UL #define DCCP_SOCKET__LOCK 0x00000040UL #define DCCP_SOCKET__RELABELFROM 0x00000080UL #define DCCP_SOCKET__RELABELTO 0x00000100UL #define DCCP_SOCKET__APPEND 0x00000200UL #define DCCP_SOCKET__BIND 0x00000400UL #define DCCP_SOCKET__CONNECT 0x00000800UL #define DCCP_SOCKET__LISTEN 0x00001000UL #define DCCP_SOCKET__ACCEPT 0x00002000UL #define DCCP_SOCKET__GETOPT 0x00004000UL #define DCCP_SOCKET__SETOPT 0x00008000UL #define DCCP_SOCKET__SHUTDOWN 0x00010000UL #define DCCP_SOCKET__RECVFROM 0x00020000UL #define DCCP_SOCKET__SENDTO 0x00040000UL #define DCCP_SOCKET__RECV_MSG 0x00080000UL #define DCCP_SOCKET__SEND_MSG 0x00100000UL #define DCCP_SOCKET__NAME_BIND 0x00200000UL #define DCCP_SOCKET__NODE_BIND 0x00400000UL #define DCCP_SOCKET__NAME_CONNECT 0x00800000UL #define MEMPROTECT__MMAP_ZERO 0x00000001UL #define DB_DATABASE__CREATE 0x00000001UL #define DB_DATABASE__DROP 0x00000002UL #define DB_DATABASE__GETATTR 0x00000004UL #define DB_DATABASE__SETATTR 0x00000008UL #define DB_DATABASE__RELABELFROM 0x00000010UL #define DB_DATABASE__RELABELTO 0x00000020UL #define DB_DATABASE__ACCESS 0x00000040UL #define DB_DATABASE__INSTALL_MODULE 0x00000080UL #define DB_DATABASE__LOAD_MODULE 0x00000100UL #define DB_DATABASE__GET_PARAM 0x00000200UL #define DB_DATABASE__SET_PARAM 0x00000400UL #define DB_TABLE__CREATE 0x00000001UL #define DB_TABLE__DROP 0x00000002UL #define DB_TABLE__GETATTR 0x00000004UL #define DB_TABLE__SETATTR 0x00000008UL #define DB_TABLE__RELABELFROM 0x00000010UL #define DB_TABLE__RELABELTO 0x00000020UL #define DB_TABLE__USE 0x00000040UL #define DB_TABLE__SELECT 0x00000080UL #define DB_TABLE__UPDATE 0x00000100UL #define DB_TABLE__INSERT 0x00000200UL #define DB_TABLE__DELETE 0x00000400UL #define DB_TABLE__LOCK 0x00000800UL #define DB_PROCEDURE__CREATE 0x00000001UL #define DB_PROCEDURE__DROP 0x00000002UL #define DB_PROCEDURE__GETATTR 0x00000004UL #define DB_PROCEDURE__SETATTR 0x00000008UL #define DB_PROCEDURE__RELABELFROM 0x00000010UL #define DB_PROCEDURE__RELABELTO 0x00000020UL #define DB_PROCEDURE__EXECUTE 0x00000040UL #define DB_PROCEDURE__ENTRYPOINT 0x00000080UL #define DB_COLUMN__CREATE 0x00000001UL #define DB_COLUMN__DROP 0x00000002UL #define DB_COLUMN__GETATTR 0x00000004UL #define DB_COLUMN__SETATTR 0x00000008UL #define DB_COLUMN__RELABELFROM 0x00000010UL #define DB_COLUMN__RELABELTO 0x00000020UL #define DB_COLUMN__USE 0x00000040UL #define DB_COLUMN__SELECT 0x00000080UL #define DB_COLUMN__UPDATE 0x00000100UL #define DB_COLUMN__INSERT 0x00000200UL #define DB_TUPLE__RELABELFROM 0x00000001UL #define DB_TUPLE__RELABELTO 0x00000002UL #define DB_TUPLE__USE 0x00000004UL #define DB_TUPLE__SELECT 0x00000008UL #define DB_TUPLE__UPDATE 0x00000010UL #define DB_TUPLE__INSERT 0x00000020UL #define DB_TUPLE__DELETE 0x00000040UL #define DB_BLOB__CREATE 0x00000001UL #define DB_BLOB__DROP 0x00000002UL #define DB_BLOB__GETATTR 0x00000004UL #define DB_BLOB__SETATTR 0x00000008UL #define DB_BLOB__RELABELFROM 0x00000010UL #define DB_BLOB__RELABELTO 0x00000020UL #define DB_BLOB__READ 0x00000040UL #define DB_BLOB__WRITE 0x00000080UL #define DB_BLOB__IMPORT 0x00000100UL #define DB_BLOB__EXPORT 0x00000200UL #define PEER__RECV 0x00000001UL #define X_APPLICATION_DATA__PASTE 0x00000001UL #define X_APPLICATION_DATA__PASTE_AFTER_CONFIRM 0x00000002UL #define X_APPLICATION_DATA__COPY 0x00000004UL PKZڱgZZselinux/label.hnu[/* * Labeling interface for userspace object managers and others. * * Author : Eamon Walsh */ #ifndef _SELABEL_H_ #define _SELABEL_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif /* * Opaque type used for all label handles. */ struct selabel_handle; /* * Available backends. */ /* file contexts */ #define SELABEL_CTX_FILE 0 /* media contexts */ #define SELABEL_CTX_MEDIA 1 /* x contexts */ #define SELABEL_CTX_X 2 /* db objects */ #define SELABEL_CTX_DB 3 /* Android property service contexts */ #define SELABEL_CTX_ANDROID_PROP 4 /* Android service contexts */ #define SELABEL_CTX_ANDROID_SERVICE 5 /* * Available options */ /* no-op option, useful for unused slots in an array of options */ #define SELABEL_OPT_UNUSED 0 /* validate contexts before returning them (boolean value) */ #define SELABEL_OPT_VALIDATE 1 /* don't use local customizations to backend data (boolean value) */ #define SELABEL_OPT_BASEONLY 2 /* specify an alternate path to use when loading backend data */ #define SELABEL_OPT_PATH 3 /* select a subset of the search space as an optimization (file backend) */ #define SELABEL_OPT_SUBSET 4 /* require a hash calculation on spec files */ #define SELABEL_OPT_DIGEST 5 /* total number of options */ #define SELABEL_NOPT 6 /* * Label operations */ /** * selabel_open - Create a labeling handle. * @backend: one of the constants specifying a supported labeling backend. * @opts: array of selabel_opt structures specifying label options or NULL. * @nopts: number of elements in opts array or zero for no options. * * Open a labeling backend for use. The available backend identifiers are * listed above. Options may be provided via the opts parameter; available * options are listed above. Not all options may be supported by every * backend. Return value is the created handle on success or NULL with * @errno set on failure. */ struct selabel_handle *selabel_open(unsigned int backend, const struct selinux_opt *opts, unsigned nopts); /** * selabel_close - Close a labeling handle. * @handle: specifies handle to close * * Destroy the specified handle, closing files, freeing allocated memory, * etc. The handle may not be further used after it has been closed. */ void selabel_close(struct selabel_handle *handle); /** * selabel_lookup - Perform labeling lookup operation. * @handle: specifies backend instance to query * @con: returns the appropriate context with which to label the object * @key: string input to lookup operation * @type: numeric input to the lookup operation * * Perform a labeling lookup operation. Return %0 on success, -%1 with * @errno set on failure. The key and type arguments are the inputs to the * lookup operation; appropriate values are dictated by the backend in use. * The result is returned in the memory pointed to by @con and must be freed * by the user with freecon(). */ int selabel_lookup(struct selabel_handle *handle, char **con, const char *key, int type); int selabel_lookup_raw(struct selabel_handle *handle, char **con, const char *key, int type); bool selabel_partial_match(struct selabel_handle *handle, const char *key); int selabel_lookup_best_match(struct selabel_handle *rec, char **con, const char *key, const char **aliases, int type); int selabel_lookup_best_match_raw(struct selabel_handle *rec, char **con, const char *key, const char **aliases, int type); /** * selabel_digest - Retrieve the SHA1 digest and the list of specfiles used to * generate the digest. The SELABEL_OPT_DIGEST option must * be set in selabel_open() to initiate the digest generation. * @handle: specifies backend instance to query * @digest: returns a pointer to the SHA1 digest. * @digest_len: returns length of digest in bytes. * @specfiles: a list of specfiles used in the SHA1 digest generation. * The list is NULL terminated and will hold @num_specfiles entries. * @num_specfiles: number of specfiles in the list. * * Return %0 on success, -%1 with @errno set on failure. */ int selabel_digest(struct selabel_handle *rec, unsigned char **digest, size_t *digest_len, char ***specfiles, size_t *num_specfiles); enum selabel_cmp_result { SELABEL_SUBSET, SELABEL_EQUAL, SELABEL_SUPERSET, SELABEL_INCOMPARABLE }; /** * selabel_cmp - Compare two label configurations. * @h1: handle for the first label configuration * @h2: handle for the first label configuration * * Compare two label configurations. * Return %SELABEL_SUBSET if @h1 is a subset of @h2, %SELABEL_EQUAL * if @h1 is identical to @h2, %SELABEL_SUPERSET if @h1 is a superset * of @h2, and %SELABEL_INCOMPARABLE if @h1 and @h2 are incomparable. */ enum selabel_cmp_result selabel_cmp(struct selabel_handle *h1, struct selabel_handle *h2); /** * selabel_stats - log labeling operation statistics. * @handle: specifies backend instance to query * * Log a message with information about the number of queries performed, * number of unused matching entries, or other operational statistics. * Message is backend-specific, some backends may not output a message. */ void selabel_stats(struct selabel_handle *handle); /* * Type codes used by specific backends */ /* X backend */ #define SELABEL_X_PROP 1 #define SELABEL_X_EXT 2 #define SELABEL_X_CLIENT 3 #define SELABEL_X_EVENT 4 #define SELABEL_X_SELN 5 #define SELABEL_X_POLYPROP 6 #define SELABEL_X_POLYSELN 7 /* DB backend */ #define SELABEL_DB_DATABASE 1 #define SELABEL_DB_SCHEMA 2 #define SELABEL_DB_TABLE 3 #define SELABEL_DB_COLUMN 4 #define SELABEL_DB_SEQUENCE 5 #define SELABEL_DB_VIEW 6 #define SELABEL_DB_PROCEDURE 7 #define SELABEL_DB_BLOB 8 #define SELABEL_DB_TUPLE 9 #define SELABEL_DB_LANGUAGE 10 #define SELABEL_DB_EXCEPTION 11 #define SELABEL_DB_DATATYPE 12 #ifdef __cplusplus } #endif #endif /* _SELABEL_H_ */ PKZ笶h h selinux/get_context_list.hnu[#ifndef _SELINUX_GET_SID_LIST_H_ #define _SELINUX_GET_SID_LIST_H_ #include #ifdef __cplusplus extern "C" { #endif #define SELINUX_DEFAULTUSER "user_u" /* Get an ordered list of authorized security contexts for a user session for 'user' spawned by 'fromcon' and set *conary to refer to the NULL-terminated array of contexts. Every entry in the list will be authorized by the policy, but the ordering is subject to user customizable preferences. Returns number of entries in *conary. If 'fromcon' is NULL, defaults to current context. Caller must free via freeconary. */ extern int get_ordered_context_list(const char *user, char * fromcon, char *** list); /* As above, but use the provided MLS level rather than the default level for the user. */ int get_ordered_context_list_with_level(const char *user, const char *level, char * fromcon, char *** list); /* Get the default security context for a user session for 'user' spawned by 'fromcon' and set *newcon to refer to it. The context will be one of those authorized by the policy, but the selection of a default is subject to user customizable preferences. If 'fromcon' is NULL, defaults to current context. Returns 0 on success or -1 otherwise. Caller must free via freecon. */ extern int get_default_context(const char *user, char * fromcon, char ** newcon); /* As above, but use the provided MLS level rather than the default level for the user. */ int get_default_context_with_level(const char *user, const char *level, char * fromcon, char ** newcon); /* Same as get_default_context, but only return a context that has the specified role. If no reachable context exists for the user with that role, then return -1. */ int get_default_context_with_role(const char *user, const char *role, char * fromcon, char ** newcon); /* Same as get_default_context, but only return a context that has the specified role and level. If no reachable context exists for the user with that role, then return -1. */ int get_default_context_with_rolelevel(const char *user, const char *role, const char *level, char * fromcon, char ** newcon); /* Given a list of authorized security contexts for the user, query the user to select one and set *newcon to refer to it. Caller must free via freecon. Returns 0 on sucess or -1 otherwise. */ extern int query_user_context(char ** list, char ** newcon); /* Allow the user to manually enter a context as a fallback if a list of authorized contexts could not be obtained. Caller must free via freecon. Returns 0 on success or -1 otherwise. */ extern int manual_user_enter_context(const char *user, char ** newcon); #ifdef __cplusplus } #endif #endif PKZoQselinux/context.hnu[#ifndef _SELINUX_CONTEXT_H_ #define _SELINUX_CONTEXT_H_ #ifdef __cplusplus extern "C" { #endif /* * Functions to deal with security contexts in user space. */ typedef struct { void *ptr; } context_s_t; typedef context_s_t *context_t; /* Return a new context initialized to a context string */ extern context_t context_new(const char *); /* * Return a pointer to the string value of the context_t * Valid until the next call to context_str or context_free * for the same context_t* */ extern char *context_str(context_t); /* Free the storage used by a context */ extern void context_free(context_t); /* Get a pointer to the string value of a context component */ extern const char *context_type_get(context_t); extern const char *context_range_get(context_t); extern const char *context_role_get(context_t); extern const char *context_user_get(context_t); /* Set a context component. Returns nonzero if unsuccessful */ extern int context_type_set(context_t, const char *); extern int context_range_set(context_t, const char *); extern int context_role_set(context_t, const char *); extern int context_user_set(context_t, const char *); #ifdef __cplusplus } #endif #endif PKZ宪selinux/restorecon.hnu[#ifndef _RESTORECON_H_ #define _RESTORECON_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif /** * selinux_restorecon - Relabel files. * @pathname: specifies file/directory to relabel. * @restorecon_flags: specifies the actions to be performed when relabeling. * * selinux_restorecon(3) will automatically call * selinux_restorecon_default_handle(3) and selinux_restorecon_set_sehandle(3) * first time through to set the selabel_open(3) parameters to use the * currently loaded policy file_contexts and request their computed digest. * * Should other selabel_open(3) parameters be required see * selinux_restorecon_set_sehandle(3). */ extern int selinux_restorecon(const char *pathname, unsigned int restorecon_flags); /* * restorecon_flags options */ /* * Force the checking of labels even if the stored SHA1 * digest matches the specfiles SHA1 digest. */ #define SELINUX_RESTORECON_IGNORE_DIGEST 0x0001 /* * Do not change file labels. */ #define SELINUX_RESTORECON_NOCHANGE 0x0002 /* * If set, change file label to that in spec file. * If not, only change type component to that in spec file. */ #define SELINUX_RESTORECON_SET_SPECFILE_CTX 0x0004 /* * Recursively descend directories. */ #define SELINUX_RESTORECON_RECURSE 0x0008 /* * Log changes to selinux log. Note that if VERBOSE and * PROGRESS are set, then PROGRESS will take precedence. */ #define SELINUX_RESTORECON_VERBOSE 0x0010 /* * If SELINUX_RESTORECON_PROGRESS is true and * SELINUX_RESTORECON_MASS_RELABEL is true, then output approx % complete, * else output the number of files in 1k blocks processed to stdout. */ #define SELINUX_RESTORECON_PROGRESS 0x0020 /* * Convert passed-in pathname to canonical pathname. */ #define SELINUX_RESTORECON_REALPATH 0x0040 /* * Prevent descending into directories that have a different * device number than the pathname from which the descent began. */ #define SELINUX_RESTORECON_XDEV 0x0080 /* * Attempt to add an association between an inode and a specification. * If there is already an association for the inode and it conflicts * with the specification, then use the last matching specification. */ #define SELINUX_RESTORECON_ADD_ASSOC 0x0100 /* * Abort on errors during the file tree walk. */ #define SELINUX_RESTORECON_ABORT_ON_ERROR 0x0200 /* * Log any label changes to syslog. */ #define SELINUX_RESTORECON_SYSLOG_CHANGES 0x0400 /* * Log what spec matched each file. */ #define SELINUX_RESTORECON_LOG_MATCHES 0x0800 /* * Ignore files that do not exist. */ #define SELINUX_RESTORECON_IGNORE_NOENTRY 0x1000 /* * Do not read /proc/mounts to obtain a list of non-seclabel * mounts to be excluded from relabeling checks. */ #define SELINUX_RESTORECON_IGNORE_MOUNTS 0x2000 /* * Set if there is a mass relabel required. * See SELINUX_RESTORECON_PROGRESS flag for details. */ #define SELINUX_RESTORECON_MASS_RELABEL 0x4000 /** * selinux_restorecon_set_sehandle - Set the global fc handle. * @hndl: specifies handle to set as the global fc handle. * * Called by a process that has already called selabel_open(3) with it's * required parameters, or if selinux_restorecon_default_handle(3) has been * called to set the default selabel_open(3) parameters. */ extern void selinux_restorecon_set_sehandle(struct selabel_handle *hndl); /** * selinux_restorecon_default_handle - Sets default selabel_open(3) parameters * to use the currently loaded policy and * file_contexts, also requests the digest. * * Return value is the created handle on success or NULL with @errno set on * failure. */ extern struct selabel_handle *selinux_restorecon_default_handle(void); /** * selinux_restorecon_set_exclude_list - Add a list of directories that are * to be excluded from relabeling. * @exclude_list: containing a NULL terminated list of one or more * directories not to be relabeled. */ extern void selinux_restorecon_set_exclude_list(const char **exclude_list); /** * selinux_restorecon_set_alt_rootpath - Use alternate rootpath. * @alt_rootpath: containing the alternate rootpath to be used. * * Return %0 on success, -%1 with @errno set on failure. */ extern int selinux_restorecon_set_alt_rootpath(const char *alt_rootpath); /** * selinux_restorecon_xattr - Read/remove RESTORECON_LAST xattr entries. * @pathname: specifies directory path to check. * @xattr_flags: specifies the actions to be performed. * @xattr_list: a linked list of struct dir_xattr structures containing * the directory, digest and result of the action on the * RESTORECON_LAST entry. * * selinux_restorecon_xattr(3) will automatically call * selinux_restorecon_default_handle(3) and selinux_restorecon_set_sehandle(3) * first time through to set the selabel_open(3) parameters to use the * currently loaded policy file_contexts and request their computed digest. * * Should other selabel_open(3) parameters be required see * selinux_restorecon_set_sehandle(3), however note that a file_contexts * computed digest is required for selinux_restorecon_xattr(). */ enum digest_result { MATCH = 0, NOMATCH, DELETED_MATCH, DELETED_NOMATCH, ERROR }; struct dir_xattr { char *directory; char *digest; /* A hex encoded string that can be printed. */ enum digest_result result; struct dir_xattr *next; }; extern int selinux_restorecon_xattr(const char *pathname, unsigned int xattr_flags, struct dir_xattr ***xattr_list); /* * xattr_flags options */ /* Recursively descend directories. */ #define SELINUX_RESTORECON_XATTR_RECURSE 0x0001 /* Delete non-matching digests from each directory in pathname. */ #define SELINUX_RESTORECON_XATTR_DELETE_NONMATCH_DIGESTS 0x0002 /* Delete all digests found in pathname. */ #define SELINUX_RESTORECON_XATTR_DELETE_ALL_DIGESTS 0x0004 /* Do not read /proc/mounts. */ #define SELINUX_RESTORECON_XATTR_IGNORE_MOUNTS 0x0008 #ifdef __cplusplus } #endif #endif PKZՊ.?  libxslt/xsltlocale.hnu[/* * Summary: Locale handling * Description: Interfaces for locale handling. Needed for language dependent * sorting. * * Copy: See Copyright for the status of this software. * * Author: Nick Wellnhofer */ #ifndef __XML_XSLTLOCALE_H__ #define __XML_XSLTLOCALE_H__ #include #include "xsltexports.h" #ifdef HAVE_STRXFRM_L /* * XSLT_LOCALE_POSIX: * Macro indicating to use POSIX locale extensions */ #define XSLT_LOCALE_POSIX #ifdef HAVE_LOCALE_H #include #endif #ifdef HAVE_XLOCALE_H #include #endif typedef locale_t xsltLocale; typedef xmlChar xsltLocaleChar; #elif defined(_WIN32) && !defined(__CYGWIN__) /* * XSLT_LOCALE_WINAPI: * Macro indicating to use WinAPI for extended locale support */ #define XSLT_LOCALE_WINAPI #include #include typedef LCID xsltLocale; typedef wchar_t xsltLocaleChar; #else /* * XSLT_LOCALE_NONE: * Macro indicating that there's no extended locale support */ #define XSLT_LOCALE_NONE typedef void *xsltLocale; typedef xmlChar xsltLocaleChar; #endif XSLTPUBFUN xsltLocale XSLTCALL xsltNewLocale (const xmlChar *langName); XSLTPUBFUN void XSLTCALL xsltFreeLocale (xsltLocale locale); XSLTPUBFUN xsltLocaleChar * XSLTCALL xsltStrxfrm (xsltLocale locale, const xmlChar *string); XSLTPUBFUN int XSLTCALL xsltLocaleStrcmp (xsltLocale locale, const xsltLocaleChar *str1, const xsltLocaleChar *str2); XSLTPUBFUN void XSLTCALL xsltFreeLocales (void); #endif /* __XML_XSLTLOCALE_H__ */ PKZNflibxslt/keys.hnu[/* * Summary: interface for the key matching used in key() and template matches. * Description: implementation of the key mechanims. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_KEY_H__ #define __XML_XSLT_KEY_H__ #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /** * NODE_IS_KEYED: * * check for bit 15 set */ #define NODE_IS_KEYED (1 >> 15) XSLTPUBFUN int XSLTCALL xsltAddKey (xsltStylesheetPtr style, const xmlChar *name, const xmlChar *nameURI, const xmlChar *match, const xmlChar *use, xmlNodePtr inst); XSLTPUBFUN xmlNodeSetPtr XSLTCALL xsltGetKey (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *nameURI, const xmlChar *value); XSLTPUBFUN void XSLTCALL xsltInitCtxtKeys (xsltTransformContextPtr ctxt, xsltDocumentPtr doc); XSLTPUBFUN void XSLTCALL xsltFreeKeys (xsltStylesheetPtr style); XSLTPUBFUN void XSLTCALL xsltFreeDocumentKeys (xsltDocumentPtr doc); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_H__ */ PKZ d ٸlibxslt/transform.hnu[/* * Summary: the XSLT engine transformation part. * Description: This module implements the bulk of the actual * transformation processing. Most of the xsl: element * constructs are implemented in this module. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_TRANSFORM_H__ #define __XML_XSLT_TRANSFORM_H__ #include #include #include "xsltexports.h" #include #ifdef __cplusplus extern "C" { #endif /** * XInclude default processing. */ XSLTPUBFUN void XSLTCALL xsltSetXIncludeDefault (int xinclude); XSLTPUBFUN int XSLTCALL xsltGetXIncludeDefault (void); /** * Export context to users. */ XSLTPUBFUN xsltTransformContextPtr XSLTCALL xsltNewTransformContext (xsltStylesheetPtr style, xmlDocPtr doc); XSLTPUBFUN void XSLTCALL xsltFreeTransformContext(xsltTransformContextPtr ctxt); XSLTPUBFUN xmlDocPtr XSLTCALL xsltApplyStylesheetUser (xsltStylesheetPtr style, xmlDocPtr doc, const char **params, const char *output, FILE * profile, xsltTransformContextPtr userCtxt); XSLTPUBFUN void XSLTCALL xsltProcessOneNode (xsltTransformContextPtr ctxt, xmlNodePtr node, xsltStackElemPtr params); /** * Private Interfaces. */ XSLTPUBFUN void XSLTCALL xsltApplyStripSpaces (xsltTransformContextPtr ctxt, xmlNodePtr node); XSLTPUBFUN xmlDocPtr XSLTCALL xsltApplyStylesheet (xsltStylesheetPtr style, xmlDocPtr doc, const char **params); XSLTPUBFUN xmlDocPtr XSLTCALL xsltProfileStylesheet (xsltStylesheetPtr style, xmlDocPtr doc, const char **params, FILE * output); XSLTPUBFUN int XSLTCALL xsltRunStylesheet (xsltStylesheetPtr style, xmlDocPtr doc, const char **params, const char *output, xmlSAXHandlerPtr SAX, xmlOutputBufferPtr IObuf); XSLTPUBFUN int XSLTCALL xsltRunStylesheetUser (xsltStylesheetPtr style, xmlDocPtr doc, const char **params, const char *output, xmlSAXHandlerPtr SAX, xmlOutputBufferPtr IObuf, FILE * profile, xsltTransformContextPtr userCtxt); XSLTPUBFUN void XSLTCALL xsltApplyOneTemplate (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr list, xsltTemplatePtr templ, xsltStackElemPtr params); XSLTPUBFUN void XSLTCALL xsltDocumentElem (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltSort (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltCopy (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltText (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltElement (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltComment (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltAttribute (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltProcessingInstruction(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltCopyOf (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltValueOf (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltNumber (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltApplyImports (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltCallTemplate (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltApplyTemplates (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltChoose (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltIf (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltForEach (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltRegisterAllElement (xsltTransformContextPtr ctxt); XSLTPUBFUN xmlNodePtr XSLTCALL xsltCopyTextString (xsltTransformContextPtr ctxt, xmlNodePtr target, const xmlChar *string, int noescape); /* Following 2 functions needed for libexslt/functions.c */ XSLTPUBFUN void XSLTCALL xsltLocalVariablePop (xsltTransformContextPtr ctxt, int limitNr, int level); XSLTPUBFUN int XSLTCALL xsltLocalVariablePush (xsltTransformContextPtr ctxt, xsltStackElemPtr variable, int level); /* * Hook for the debugger if activated. */ XSLTPUBFUN void XSLTCALL xslHandleDebugger (xmlNodePtr cur, xmlNodePtr node, xsltTemplatePtr templ, xsltTransformContextPtr ctxt); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_TRANSFORM_H__ */ PKZa$ */ #ifndef __XSLT_EXPORTS_H__ #define __XSLT_EXPORTS_H__ /** * XSLTPUBFUN: * XSLTPUBFUN, XSLTPUBVAR, XSLTCALL * * Macros which declare an exportable function, an exportable variable and * the calling convention used for functions. * * Please use an extra block for every platform/compiler combination when * modifying this, rather than overlong #ifdef lines. This helps * readability as well as the fact that different compilers on the same * platform might need different definitions. */ /** * XSLTPUBFUN: * * Macros which declare an exportable function */ #define XSLTPUBFUN /** * XSLTPUBVAR: * * Macros which declare an exportable variable */ #define XSLTPUBVAR extern /** * XSLTCALL: * * Macros which declare the called convention for exported functions */ #define XSLTCALL /** DOC_DISABLE */ /* Windows platform with MS compiler */ #if defined(_WIN32) && defined(_MSC_VER) #undef XSLTPUBFUN #undef XSLTPUBVAR #undef XSLTCALL #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) #define XSLTPUBFUN __declspec(dllexport) #define XSLTPUBVAR __declspec(dllexport) #else #define XSLTPUBFUN #if !defined(LIBXSLT_STATIC) #define XSLTPUBVAR __declspec(dllimport) extern #else #define XSLTPUBVAR extern #endif #endif #define XSLTCALL __cdecl #if !defined _REENTRANT #define _REENTRANT #endif #endif /* Windows platform with Borland compiler */ #if defined(_WIN32) && defined(__BORLANDC__) #undef XSLTPUBFUN #undef XSLTPUBVAR #undef XSLTCALL #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) #define XSLTPUBFUN __declspec(dllexport) #define XSLTPUBVAR __declspec(dllexport) extern #else #define XSLTPUBFUN #if !defined(LIBXSLT_STATIC) #define XSLTPUBVAR __declspec(dllimport) extern #else #define XSLTPUBVAR extern #endif #endif #define XSLTCALL __cdecl #if !defined _REENTRANT #define _REENTRANT #endif #endif /* Windows platform with GNU compiler (Mingw) */ #if defined(_WIN32) && defined(__MINGW32__) #undef XSLTPUBFUN #undef XSLTPUBVAR #undef XSLTCALL /* #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) */ #if !defined(LIBXSLT_STATIC) #define XSLTPUBFUN __declspec(dllexport) #define XSLTPUBVAR __declspec(dllexport) extern #else #define XSLTPUBFUN #if !defined(LIBXSLT_STATIC) #define XSLTPUBVAR __declspec(dllimport) extern #else #define XSLTPUBVAR extern #endif #endif #define XSLTCALL __cdecl #if !defined _REENTRANT #define _REENTRANT #endif #endif /* Cygwin platform, GNU compiler */ #if defined(_WIN32) && defined(__CYGWIN__) #undef XSLTPUBFUN #undef XSLTPUBVAR #undef XSLTCALL #if defined(IN_LIBXSLT) && !defined(LIBXSLT_STATIC) #define XSLTPUBFUN __declspec(dllexport) #define XSLTPUBVAR __declspec(dllexport) #else #define XSLTPUBFUN #if !defined(LIBXSLT_STATIC) #define XSLTPUBVAR __declspec(dllimport) extern #else #define XSLTPUBVAR #endif #endif #define XSLTCALL __cdecl #endif /* Compatibility */ #if !defined(LIBXSLT_PUBLIC) #define LIBXSLT_PUBLIC XSLTPUBVAR #endif #endif /* __XSLT_EXPORTS_H__ */ PKZw{libxslt/extensions.hnu[/* * Summary: interface for the extension support * Description: This provide the API needed for simple and module * extension support. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_EXTENSION_H__ #define __XML_XSLT_EXTENSION_H__ #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /** * Extension Modules API. */ /** * xsltInitGlobals: * * Initialize the global variables for extensions * */ XSLTPUBFUN void XSLTCALL xsltInitGlobals (void); /** * xsltStyleExtInitFunction: * @ctxt: an XSLT stylesheet * @URI: the namespace URI for the extension * * A function called at initialization time of an XSLT extension module. * * Returns a pointer to the module specific data for this transformation. */ typedef void * (*xsltStyleExtInitFunction) (xsltStylesheetPtr style, const xmlChar *URI); /** * xsltStyleExtShutdownFunction: * @ctxt: an XSLT stylesheet * @URI: the namespace URI for the extension * @data: the data associated to this module * * A function called at shutdown time of an XSLT extension module. */ typedef void (*xsltStyleExtShutdownFunction) (xsltStylesheetPtr style, const xmlChar *URI, void *data); /** * xsltExtInitFunction: * @ctxt: an XSLT transformation context * @URI: the namespace URI for the extension * * A function called at initialization time of an XSLT extension module. * * Returns a pointer to the module specific data for this transformation. */ typedef void * (*xsltExtInitFunction) (xsltTransformContextPtr ctxt, const xmlChar *URI); /** * xsltExtShutdownFunction: * @ctxt: an XSLT transformation context * @URI: the namespace URI for the extension * @data: the data associated to this module * * A function called at shutdown time of an XSLT extension module. */ typedef void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt, const xmlChar *URI, void *data); XSLTPUBFUN int XSLTCALL xsltRegisterExtModule (const xmlChar *URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc); XSLTPUBFUN int XSLTCALL xsltRegisterExtModuleFull (const xmlChar * URI, xsltExtInitFunction initFunc, xsltExtShutdownFunction shutdownFunc, xsltStyleExtInitFunction styleInitFunc, xsltStyleExtShutdownFunction styleShutdownFunc); XSLTPUBFUN int XSLTCALL xsltUnregisterExtModule (const xmlChar * URI); XSLTPUBFUN void * XSLTCALL xsltGetExtData (xsltTransformContextPtr ctxt, const xmlChar *URI); XSLTPUBFUN void * XSLTCALL xsltStyleGetExtData (xsltStylesheetPtr style, const xmlChar *URI); #ifdef XSLT_REFACTORED XSLTPUBFUN void * XSLTCALL xsltStyleStylesheetLevelGetExtData( xsltStylesheetPtr style, const xmlChar * URI); #endif XSLTPUBFUN void XSLTCALL xsltShutdownCtxtExts (xsltTransformContextPtr ctxt); XSLTPUBFUN void XSLTCALL xsltShutdownExts (xsltStylesheetPtr style); XSLTPUBFUN xsltTransformContextPtr XSLTCALL xsltXPathGetTransformContext (xmlXPathParserContextPtr ctxt); /* * extension functions */ XSLTPUBFUN int XSLTCALL xsltRegisterExtModuleFunction (const xmlChar *name, const xmlChar *URI, xmlXPathFunction function); XSLTPUBFUN xmlXPathFunction XSLTCALL xsltExtModuleFunctionLookup (const xmlChar *name, const xmlChar *URI); XSLTPUBFUN int XSLTCALL xsltUnregisterExtModuleFunction (const xmlChar *name, const xmlChar *URI); /* * extension elements */ typedef xsltElemPreCompPtr (*xsltPreComputeFunction) (xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function); XSLTPUBFUN xsltElemPreCompPtr XSLTCALL xsltNewElemPreComp (xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function); XSLTPUBFUN void XSLTCALL xsltInitElemPreComp (xsltElemPreCompPtr comp, xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function, xsltElemPreCompDeallocator freeFunc); XSLTPUBFUN int XSLTCALL xsltRegisterExtModuleElement (const xmlChar *name, const xmlChar *URI, xsltPreComputeFunction precomp, xsltTransformFunction transform); XSLTPUBFUN xsltTransformFunction XSLTCALL xsltExtElementLookup (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI); XSLTPUBFUN xsltTransformFunction XSLTCALL xsltExtModuleElementLookup (const xmlChar *name, const xmlChar *URI); XSLTPUBFUN xsltPreComputeFunction XSLTCALL xsltExtModuleElementPreComputeLookup (const xmlChar *name, const xmlChar *URI); XSLTPUBFUN int XSLTCALL xsltUnregisterExtModuleElement (const xmlChar *name, const xmlChar *URI); /* * top-level elements */ typedef void (*xsltTopLevelFunction) (xsltStylesheetPtr style, xmlNodePtr inst); XSLTPUBFUN int XSLTCALL xsltRegisterExtModuleTopLevel (const xmlChar *name, const xmlChar *URI, xsltTopLevelFunction function); XSLTPUBFUN xsltTopLevelFunction XSLTCALL xsltExtModuleTopLevelLookup (const xmlChar *name, const xmlChar *URI); XSLTPUBFUN int XSLTCALL xsltUnregisterExtModuleTopLevel (const xmlChar *name, const xmlChar *URI); /* These 2 functions are deprecated for use within modules. */ XSLTPUBFUN int XSLTCALL xsltRegisterExtFunction (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI, xmlXPathFunction function); XSLTPUBFUN int XSLTCALL xsltRegisterExtElement (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *URI, xsltTransformFunction function); /* * Extension Prefix handling API. * Those are used by the XSLT (pre)processor. */ XSLTPUBFUN int XSLTCALL xsltRegisterExtPrefix (xsltStylesheetPtr style, const xmlChar *prefix, const xmlChar *URI); XSLTPUBFUN int XSLTCALL xsltCheckExtPrefix (xsltStylesheetPtr style, const xmlChar *URI); XSLTPUBFUN int XSLTCALL xsltCheckExtURI (xsltStylesheetPtr style, const xmlChar *URI); XSLTPUBFUN int XSLTCALL xsltInitCtxtExts (xsltTransformContextPtr ctxt); XSLTPUBFUN void XSLTCALL xsltFreeCtxtExts (xsltTransformContextPtr ctxt); XSLTPUBFUN void XSLTCALL xsltFreeExts (xsltStylesheetPtr style); XSLTPUBFUN xsltElemPreCompPtr XSLTCALL xsltPreComputeExtModuleElement (xsltStylesheetPtr style, xmlNodePtr inst); /* * Extension Infos access. * Used by exslt initialisation */ XSLTPUBFUN xmlHashTablePtr XSLTCALL xsltGetExtInfo (xsltStylesheetPtr style, const xmlChar *URI); /** * Test module http://xmlsoft.org/XSLT/ */ XSLTPUBFUN void XSLTCALL xsltRegisterTestModule (void); XSLTPUBFUN void XSLTCALL xsltDebugDumpExtensions (FILE * output); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_EXTENSION_H__ */ PKZd8Mlibxslt/pattern.hnu[/* * Summary: interface for the pattern matching used in template matches. * Description: the implementation of the lookup of the right template * for a given node must be really fast in order to keep * decent performances. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_PATTERN_H__ #define __XML_XSLT_PATTERN_H__ #include "xsltInternals.h" #include "xsltexports.h" #ifdef __cplusplus extern "C" { #endif /** * xsltCompMatch: * * Data structure used for the implementation of patterns. * It is kept private (in pattern.c). */ typedef struct _xsltCompMatch xsltCompMatch; typedef xsltCompMatch *xsltCompMatchPtr; /* * Pattern related interfaces. */ XSLTPUBFUN xsltCompMatchPtr XSLTCALL xsltCompilePattern (const xmlChar *pattern, xmlDocPtr doc, xmlNodePtr node, xsltStylesheetPtr style, xsltTransformContextPtr runtime); XSLTPUBFUN void XSLTCALL xsltFreeCompMatchList (xsltCompMatchPtr comp); XSLTPUBFUN int XSLTCALL xsltTestCompMatchList (xsltTransformContextPtr ctxt, xmlNodePtr node, xsltCompMatchPtr comp); XSLTPUBFUN void XSLTCALL xsltNormalizeCompSteps (void *payload, void *data, const xmlChar *name); /* * Template related interfaces. */ XSLTPUBFUN int XSLTCALL xsltAddTemplate (xsltStylesheetPtr style, xsltTemplatePtr cur, const xmlChar *mode, const xmlChar *modeURI); XSLTPUBFUN xsltTemplatePtr XSLTCALL xsltGetTemplate (xsltTransformContextPtr ctxt, xmlNodePtr node, xsltStylesheetPtr style); XSLTPUBFUN void XSLTCALL xsltFreeTemplateHashes (xsltStylesheetPtr style); XSLTPUBFUN void XSLTCALL xsltCleanupTemplates (xsltStylesheetPtr style); #if 0 int xsltMatchPattern (xsltTransformContextPtr ctxt, xmlNodePtr node, const xmlChar *pattern, xmlDocPtr ctxtdoc, xmlNodePtr ctxtnode); #endif #ifdef __cplusplus } #endif #endif /* __XML_XSLT_PATTERN_H__ */ PKZHlibxslt/xslt.hnu[/* * Summary: Interfaces, constants and types related to the XSLT engine * Description: Interfaces, constants and types related to the XSLT engine * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_H__ #define __XML_XSLT_H__ #include #include "xsltexports.h" #ifdef __cplusplus extern "C" { #endif /** * XSLT_DEFAULT_VERSION: * * The default version of XSLT supported. */ #define XSLT_DEFAULT_VERSION "1.0" /** * XSLT_DEFAULT_VENDOR: * * The XSLT "vendor" string for this processor. */ #define XSLT_DEFAULT_VENDOR "libxslt" /** * XSLT_DEFAULT_URL: * * The XSLT "vendor" URL for this processor. */ #define XSLT_DEFAULT_URL "http://xmlsoft.org/XSLT/" /** * XSLT_NAMESPACE: * * The XSLT specification namespace. */ #define XSLT_NAMESPACE ((const xmlChar *)"http://www.w3.org/1999/XSL/Transform") /** * XSLT_PARSE_OPTIONS: * * The set of options to pass to an xmlReadxxx when loading files for * XSLT consumption. */ #define XSLT_PARSE_OPTIONS \ XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_NOCDATA /** * xsltMaxDepth: * * This value is used to detect templates loops. */ XSLTPUBVAR int xsltMaxDepth; /** * * xsltMaxVars: * * * * This value is used to detect templates loops. * */ XSLTPUBVAR int xsltMaxVars; /** * xsltEngineVersion: * * The version string for libxslt. */ XSLTPUBVAR const char *xsltEngineVersion; /** * xsltLibxsltVersion: * * The version of libxslt compiled. */ XSLTPUBVAR const int xsltLibxsltVersion; /** * xsltLibxmlVersion: * * The version of libxml libxslt was compiled against. */ XSLTPUBVAR const int xsltLibxmlVersion; /* * Global initialization function. */ XSLTPUBFUN void XSLTCALL xsltInit (void); /* * Global cleanup function. */ XSLTPUBFUN void XSLTCALL xsltCleanupGlobals (void); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_H__ */ PKZآlibxslt/numbersInternals.hnu[/* * Summary: Implementation of the XSLT number functions * Description: Implementation of the XSLT number functions * * Copy: See Copyright for the status of this software. * * Author: Bjorn Reese and Daniel Veillard */ #ifndef __XML_XSLT_NUMBERSINTERNALS_H__ #define __XML_XSLT_NUMBERSINTERNALS_H__ #include #include "xsltexports.h" #ifdef __cplusplus extern "C" { #endif struct _xsltCompMatch; /** * xsltNumberData: * * This data structure is just a wrapper to pass xsl:number data in. */ typedef struct _xsltNumberData xsltNumberData; typedef xsltNumberData *xsltNumberDataPtr; struct _xsltNumberData { const xmlChar *level; const xmlChar *count; const xmlChar *from; const xmlChar *value; const xmlChar *format; int has_format; int digitsPerGroup; int groupingCharacter; int groupingCharacterLen; xmlDocPtr doc; xmlNodePtr node; struct _xsltCompMatch *countPat; struct _xsltCompMatch *fromPat; /* * accelerators */ }; /** * xsltFormatNumberInfo,: * * This data structure lists the various parameters needed to format numbers. */ typedef struct _xsltFormatNumberInfo xsltFormatNumberInfo; typedef xsltFormatNumberInfo *xsltFormatNumberInfoPtr; struct _xsltFormatNumberInfo { int integer_hash; /* Number of '#' in integer part */ int integer_digits; /* Number of '0' in integer part */ int frac_digits; /* Number of '0' in fractional part */ int frac_hash; /* Number of '#' in fractional part */ int group; /* Number of chars per display 'group' */ int multiplier; /* Scaling for percent or permille */ char add_decimal; /* Flag for whether decimal point appears in pattern */ char is_multiplier_set; /* Flag to catch multiple occurences of percent/permille */ char is_negative_pattern;/* Flag for processing -ve prefix/suffix */ }; #ifdef __cplusplus } #endif #endif /* __XML_XSLT_NUMBERSINTERNALS_H__ */ PKZlibxslt/xsltconfig.hnu[/* * Summary: compile-time version informations for the XSLT engine * Description: compile-time version informations for the XSLT engine * this module is autogenerated. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLTCONFIG_H__ #define __XML_XSLTCONFIG_H__ #ifdef __cplusplus extern "C" { #endif /** * LIBXSLT_DOTTED_VERSION: * * the version string like "1.2.3" */ #define LIBXSLT_DOTTED_VERSION "1.1.32" /** * LIBXSLT_VERSION: * * the version number: 1.2.3 value is 10203 */ #define LIBXSLT_VERSION 10132 /** * LIBXSLT_VERSION_STRING: * * the version number string, 1.2.3 value is "10203" */ #define LIBXSLT_VERSION_STRING "10132" /** * LIBXSLT_VERSION_EXTRA: * * extra version information, used to show a CVS compilation */ #define LIBXSLT_VERSION_EXTRA "" /** * WITH_XSLT_DEBUG: * * Activate the compilation of the debug reporting. Speed penalty * is insignifiant and being able to run xsltpoc -v is useful. On * by default unless --without-debug is passed to configure */ #if 1 #define WITH_XSLT_DEBUG #endif #if 0 /** * DEBUG_MEMORY: * * should be activated only when debugging libxslt. It replaces the * allocator with a collect and debug shell to the libc allocator. * Use configure --with-mem-debug to activate it on both library */ #define DEBUG_MEMORY /** * DEBUG_MEMORY_LOCATION: * * should be activated only when debugging libxslt. * DEBUG_MEMORY_LOCATION should be activated only when libxml has * been configured with --with-debug-mem too */ #define DEBUG_MEMORY_LOCATION #endif /** * XSLT_NEED_TRIO: * * should be activated if the existing libc library lacks some of the * string formatting function, in that case reuse the Trio ones already * compiled in the libxml2 library. */ #if 0 #define XSLT_NEED_TRIO #endif #ifdef __VMS #define HAVE_MATH_H 1 #define HAVE_SYS_STAT_H 1 #ifndef XSLT_NEED_TRIO #define XSLT_NEED_TRIO #endif #endif #ifdef XSLT_NEED_TRIO #define TRIO_REPLACE_STDIO #endif /** * WITH_XSLT_DEBUGGER: * * Activate the compilation of the debugger support. Speed penalty * is insignifiant. * On by default unless --without-debugger is passed to configure */ #if 1 #ifndef WITH_DEBUGGER #define WITH_DEBUGGER #endif #endif /** * WITH_MODULES: * * Whether module support is configured into libxslt * Note: no default module path for win32 platforms */ #if 1 #ifndef WITH_MODULES #define WITH_MODULES #endif #ifdef __LP64__ #define LIBXSLT_DEFAULT_PLUGINS_PATH() "/usr/lib64/libxslt-plugins" #else #define LIBXSLT_DEFAULT_PLUGINS_PATH() "/usr/lib/libxslt-plugins" #endif #endif /** * ATTRIBUTE_UNUSED: * * This macro is used to flag unused function parameters to GCC */ #ifdef __GNUC__ #ifdef HAVE_ANSIDECL_H #include #endif #ifndef ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED __attribute__((unused)) #endif #else #define ATTRIBUTE_UNUSED #endif /** * LIBXSLT_ATTR_FORMAT: * * This macro is used to indicate to GCC the parameters are printf-like */ #ifdef __GNUC__ #define LIBXSLT_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) #else #define LIBXSLT_ATTR_FORMAT(fmt,args) #endif /** * LIBXSLT_PUBLIC: * * This macro is used to declare PUBLIC variables for Cygwin and for MSC on Windows */ #if !defined LIBXSLT_PUBLIC #if (defined(__CYGWIN__) || defined _MSC_VER) && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC #define LIBXSLT_PUBLIC __declspec(dllimport) #else #define LIBXSLT_PUBLIC #endif #endif #ifdef __cplusplus } #endif #endif /* __XML_XSLTCONFIG_H__ */ PKZҚC\ \ libxslt/security.hnu[/* * Summary: interface for the libxslt security framework * Description: the libxslt security framework allow to restrict * the access to new resources (file or URL) from * the stylesheet at runtime. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_SECURITY_H__ #define __XML_XSLT_SECURITY_H__ #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /** * xsltSecurityPref: * * structure to indicate the preferences for security in the XSLT * transformation. */ typedef struct _xsltSecurityPrefs xsltSecurityPrefs; typedef xsltSecurityPrefs *xsltSecurityPrefsPtr; /** * xsltSecurityOption: * * the set of option that can be configured */ typedef enum { XSLT_SECPREF_READ_FILE = 1, XSLT_SECPREF_WRITE_FILE, XSLT_SECPREF_CREATE_DIRECTORY, XSLT_SECPREF_READ_NETWORK, XSLT_SECPREF_WRITE_NETWORK } xsltSecurityOption; /** * xsltSecurityCheck: * * User provided function to check the value of a string like a file * path or an URL ... */ typedef int (*xsltSecurityCheck) (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt, const char *value); /* * Module interfaces */ XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL xsltNewSecurityPrefs (void); XSLTPUBFUN void XSLTCALL xsltFreeSecurityPrefs (xsltSecurityPrefsPtr sec); XSLTPUBFUN int XSLTCALL xsltSetSecurityPrefs (xsltSecurityPrefsPtr sec, xsltSecurityOption option, xsltSecurityCheck func); XSLTPUBFUN xsltSecurityCheck XSLTCALL xsltGetSecurityPrefs (xsltSecurityPrefsPtr sec, xsltSecurityOption option); XSLTPUBFUN void XSLTCALL xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec); XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL xsltGetDefaultSecurityPrefs (void); XSLTPUBFUN int XSLTCALL xsltSetCtxtSecurityPrefs (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt); XSLTPUBFUN int XSLTCALL xsltSecurityAllow (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt, const char *value); XSLTPUBFUN int XSLTCALL xsltSecurityForbid (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt, const char *value); /* * internal interfaces */ XSLTPUBFUN int XSLTCALL xsltCheckWrite (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt, const xmlChar *URL); XSLTPUBFUN int XSLTCALL xsltCheckRead (xsltSecurityPrefsPtr sec, xsltTransformContextPtr ctxt, const xmlChar *URL); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_SECURITY_H__ */ PKZ_Dlibxslt/templates.hnu[/* * Summary: interface for the template processing * Description: This set of routine encapsulates XPath calls * and Attribute Value Templates evaluation. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_TEMPLATES_H__ #define __XML_XSLT_TEMPLATES_H__ #include #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif XSLTPUBFUN int XSLTCALL xsltEvalXPathPredicate (xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp, xmlNsPtr *nsList, int nsNr); XSLTPUBFUN xmlChar * XSLTCALL xsltEvalTemplateString (xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr inst); XSLTPUBFUN xmlChar * XSLTCALL xsltEvalAttrValueTemplate (xsltTransformContextPtr ctxt, xmlNodePtr node, const xmlChar *name, const xmlChar *ns); XSLTPUBFUN const xmlChar * XSLTCALL xsltEvalStaticAttrValueTemplate (xsltStylesheetPtr style, xmlNodePtr node, const xmlChar *name, const xmlChar *ns, int *found); /* TODO: this is obviously broken ... the namespaces should be passed too ! */ XSLTPUBFUN xmlChar * XSLTCALL xsltEvalXPathString (xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp); XSLTPUBFUN xmlChar * XSLTCALL xsltEvalXPathStringNs (xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp, int nsNr, xmlNsPtr *nsList); XSLTPUBFUN xmlNodePtr * XSLTCALL xsltTemplateProcess (xsltTransformContextPtr ctxt, xmlNodePtr node); XSLTPUBFUN xmlAttrPtr XSLTCALL xsltAttrListTemplateProcess (xsltTransformContextPtr ctxt, xmlNodePtr target, xmlAttrPtr cur); XSLTPUBFUN xmlAttrPtr XSLTCALL xsltAttrTemplateProcess (xsltTransformContextPtr ctxt, xmlNodePtr target, xmlAttrPtr attr); XSLTPUBFUN xmlChar * XSLTCALL xsltAttrTemplateValueProcess (xsltTransformContextPtr ctxt, const xmlChar* attr); XSLTPUBFUN xmlChar * XSLTCALL xsltAttrTemplateValueProcessNode(xsltTransformContextPtr ctxt, const xmlChar* str, xmlNodePtr node); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_TEMPLATES_H__ */ PKZs 00libxslt/imports.hnu[/* * Summary: interface for the XSLT import support * Description: macros and fuctions needed to implement and * access the import tree * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_IMPORTS_H__ #define __XML_XSLT_IMPORTS_H__ #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /** * XSLT_GET_IMPORT_PTR: * * A macro to import pointers from the stylesheet cascading order. */ #define XSLT_GET_IMPORT_PTR(res, style, name) { \ xsltStylesheetPtr st = style; \ res = NULL; \ while (st != NULL) { \ if (st->name != NULL) { res = st->name; break; } \ st = xsltNextImport(st); \ }} /** * XSLT_GET_IMPORT_INT: * * A macro to import intergers from the stylesheet cascading order. */ #define XSLT_GET_IMPORT_INT(res, style, name) { \ xsltStylesheetPtr st = style; \ res = -1; \ while (st != NULL) { \ if (st->name != -1) { res = st->name; break; } \ st = xsltNextImport(st); \ }} /* * Module interfaces */ XSLTPUBFUN int XSLTCALL xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur); XSLTPUBFUN int XSLTCALL xsltParseStylesheetInclude (xsltStylesheetPtr style, xmlNodePtr cur); XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltNextImport (xsltStylesheetPtr style); XSLTPUBFUN int XSLTCALL xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt); XSLTPUBFUN int XSLTCALL xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt, xmlNodePtr node); XSLTPUBFUN xsltTemplatePtr XSLTCALL xsltFindTemplate (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *nameURI); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_IMPORTS_H__ */ PKZUbiilibxslt/extra.hnu[/* * Summary: interface for the non-standard features * Description: implement some extension outside the XSLT namespace * but not EXSLT with is in a different library. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_EXTRA_H__ #define __XML_XSLT_EXTRA_H__ #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /** * XSLT_LIBXSLT_NAMESPACE: * * This is the libxslt namespace for specific extensions. */ #define XSLT_LIBXSLT_NAMESPACE ((xmlChar *) "http://xmlsoft.org/XSLT/namespace") /** * XSLT_SAXON_NAMESPACE: * * This is Michael Kay's Saxon processor namespace for extensions. */ #define XSLT_SAXON_NAMESPACE ((xmlChar *) "http://icl.com/saxon") /** * XSLT_XT_NAMESPACE: * * This is James Clark's XT processor namespace for extensions. */ #define XSLT_XT_NAMESPACE ((xmlChar *) "http://www.jclark.com/xt") /** * XSLT_XALAN_NAMESPACE: * * This is the Apache project XALAN processor namespace for extensions. */ #define XSLT_XALAN_NAMESPACE ((xmlChar *) \ "org.apache.xalan.xslt.extensions.Redirect") XSLTPUBFUN void XSLTCALL xsltFunctionNodeSet (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltDebug (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltStylePreCompPtr comp); XSLTPUBFUN void XSLTCALL xsltRegisterExtras (xsltTransformContextPtr ctxt); XSLTPUBFUN void XSLTCALL xsltRegisterAllExtras (void); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_EXTRA_H__ */ PKZgN!!libxslt/xsltutils.hnu[/* * Summary: set of utilities for the XSLT engine * Description: interfaces for the utilities module of the XSLT engine. * things like message handling, profiling, and other * generally useful routines. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLTUTILS_H__ #define __XML_XSLTUTILS_H__ #include #ifdef HAVE_STDARG_H #include #endif #include #include #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /** * XSLT_TODO: * * Macro to flag unimplemented blocks. */ #define XSLT_TODO \ xsltGenericError(xsltGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); /** * XSLT_STRANGE: * * Macro to flag that a problem was detected internally. */ #define XSLT_STRANGE \ xsltGenericError(xsltGenericErrorContext, \ "Internal error at %s:%d\n", \ __FILE__, __LINE__); /** * IS_XSLT_ELEM: * * Checks that the element pertains to XSLT namespace. */ #define IS_XSLT_ELEM(n) \ (((n) != NULL) && ((n)->type == XML_ELEMENT_NODE) && \ ((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) /** * IS_XSLT_NAME: * * Checks the value of an element in XSLT namespace. */ #define IS_XSLT_NAME(n, val) \ (xmlStrEqual((n)->name, (const xmlChar *) (val))) /** * IS_XSLT_REAL_NODE: * * Check that a node is a 'real' one: document, element, text or attribute. */ #define IS_XSLT_REAL_NODE(n) \ (((n) != NULL) && \ (((n)->type == XML_ELEMENT_NODE) || \ ((n)->type == XML_TEXT_NODE) || \ ((n)->type == XML_CDATA_SECTION_NODE) || \ ((n)->type == XML_ATTRIBUTE_NODE) || \ ((n)->type == XML_DOCUMENT_NODE) || \ ((n)->type == XML_HTML_DOCUMENT_NODE) || \ ((n)->type == XML_COMMENT_NODE) || \ ((n)->type == XML_PI_NODE))) /* * Our own version of namespaced atributes lookup. */ XSLTPUBFUN xmlChar * XSLTCALL xsltGetNsProp (xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace); XSLTPUBFUN const xmlChar * XSLTCALL xsltGetCNsProp (xsltStylesheetPtr style, xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace); XSLTPUBFUN int XSLTCALL xsltGetUTF8Char (const unsigned char *utf, int *len); /* * XSLT Debug Tracing Tracing Types */ typedef enum { XSLT_TRACE_ALL = -1, XSLT_TRACE_NONE = 0, XSLT_TRACE_COPY_TEXT = 1<<0, XSLT_TRACE_PROCESS_NODE = 1<<1, XSLT_TRACE_APPLY_TEMPLATE = 1<<2, XSLT_TRACE_COPY = 1<<3, XSLT_TRACE_COMMENT = 1<<4, XSLT_TRACE_PI = 1<<5, XSLT_TRACE_COPY_OF = 1<<6, XSLT_TRACE_VALUE_OF = 1<<7, XSLT_TRACE_CALL_TEMPLATE = 1<<8, XSLT_TRACE_APPLY_TEMPLATES = 1<<9, XSLT_TRACE_CHOOSE = 1<<10, XSLT_TRACE_IF = 1<<11, XSLT_TRACE_FOR_EACH = 1<<12, XSLT_TRACE_STRIP_SPACES = 1<<13, XSLT_TRACE_TEMPLATES = 1<<14, XSLT_TRACE_KEYS = 1<<15, XSLT_TRACE_VARIABLES = 1<<16 } xsltDebugTraceCodes; /** * XSLT_TRACE: * * Control the type of xsl debugtrace messages emitted. */ #define XSLT_TRACE(ctxt,code,call) \ if (ctxt->traceCode && (*(ctxt->traceCode) & code)) \ call XSLTPUBFUN void XSLTCALL xsltDebugSetDefaultTrace(xsltDebugTraceCodes val); XSLTPUBFUN xsltDebugTraceCodes XSLTCALL xsltDebugGetDefaultTrace(void); /* * XSLT specific error and debug reporting functions. */ XSLTPUBVAR xmlGenericErrorFunc xsltGenericError; XSLTPUBVAR void *xsltGenericErrorContext; XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug; XSLTPUBVAR void *xsltGenericDebugContext; XSLTPUBFUN void XSLTCALL xsltPrintErrorContext (xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node); XSLTPUBFUN void XSLTCALL xsltMessage (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst); XSLTPUBFUN void XSLTCALL xsltSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler); XSLTPUBFUN void XSLTCALL xsltSetGenericDebugFunc (void *ctx, xmlGenericErrorFunc handler); XSLTPUBFUN void XSLTCALL xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt, void *ctx, xmlGenericErrorFunc handler); XSLTPUBFUN void XSLTCALL xsltTransformError (xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg, ...) LIBXSLT_ATTR_FORMAT(4,5); XSLTPUBFUN int XSLTCALL xsltSetCtxtParseOptions (xsltTransformContextPtr ctxt, int options); /* * Sorting. */ XSLTPUBFUN void XSLTCALL xsltDocumentSortFunction (xmlNodeSetPtr list); XSLTPUBFUN void XSLTCALL xsltSetSortFunc (xsltSortFunc handler); XSLTPUBFUN void XSLTCALL xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt, xsltSortFunc handler); XSLTPUBFUN void XSLTCALL xsltDefaultSortFunction (xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts); XSLTPUBFUN void XSLTCALL xsltDoSortFunction (xsltTransformContextPtr ctxt, xmlNodePtr * sorts, int nbsorts); XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL xsltComputeSortResult (xsltTransformContextPtr ctxt, xmlNodePtr sort); /* * QNames handling. */ XSLTPUBFUN const xmlChar * XSLTCALL xsltSplitQName (xmlDictPtr dict, const xmlChar *name, const xmlChar **prefix); XSLTPUBFUN const xmlChar * XSLTCALL xsltGetQNameURI (xmlNodePtr node, xmlChar **name); XSLTPUBFUN const xmlChar * XSLTCALL xsltGetQNameURI2 (xsltStylesheetPtr style, xmlNodePtr node, const xmlChar **name); /* * Output, reuse libxml I/O buffers. */ XSLTPUBFUN int XSLTCALL xsltSaveResultTo (xmlOutputBufferPtr buf, xmlDocPtr result, xsltStylesheetPtr style); XSLTPUBFUN int XSLTCALL xsltSaveResultToFilename (const char *URI, xmlDocPtr result, xsltStylesheetPtr style, int compression); XSLTPUBFUN int XSLTCALL xsltSaveResultToFile (FILE *file, xmlDocPtr result, xsltStylesheetPtr style); XSLTPUBFUN int XSLTCALL xsltSaveResultToFd (int fd, xmlDocPtr result, xsltStylesheetPtr style); XSLTPUBFUN int XSLTCALL xsltSaveResultToString (xmlChar **doc_txt_ptr, int * doc_txt_len, xmlDocPtr result, xsltStylesheetPtr style); /* * XPath interface */ XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL xsltXPathCompile (xsltStylesheetPtr style, const xmlChar *str); XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL xsltXPathCompileFlags (xsltStylesheetPtr style, const xmlChar *str, int flags); #ifdef IN_LIBXSLT #define XSLT_SOURCE_NODE_MASK 15u #define XSLT_SOURCE_NODE_HAS_KEY 1u #define XSLT_SOURCE_NODE_HAS_ID 2u int xsltGetSourceNodeFlags(xmlNodePtr node); int xsltSetSourceNodeFlags(xsltTransformContextPtr ctxt, xmlNodePtr node, int flags); int xsltClearSourceNodeFlags(xmlNodePtr node, int flags); void ** xsltGetPSVIPtr(xmlNodePtr cur); #endif /* * Profiling. */ XSLTPUBFUN void XSLTCALL xsltSaveProfiling (xsltTransformContextPtr ctxt, FILE *output); XSLTPUBFUN xmlDocPtr XSLTCALL xsltGetProfileInformation (xsltTransformContextPtr ctxt); XSLTPUBFUN long XSLTCALL xsltTimestamp (void); XSLTPUBFUN void XSLTCALL xsltCalibrateAdjust (long delta); /** * XSLT_TIMESTAMP_TICS_PER_SEC: * * Sampling precision for profiling */ #define XSLT_TIMESTAMP_TICS_PER_SEC 100000l #endif /* * Hooks for the debugger. */ typedef enum { XSLT_DEBUG_NONE = 0, /* no debugging allowed */ XSLT_DEBUG_INIT, XSLT_DEBUG_STEP, XSLT_DEBUG_STEPOUT, XSLT_DEBUG_NEXT, XSLT_DEBUG_STOP, XSLT_DEBUG_CONT, XSLT_DEBUG_RUN, XSLT_DEBUG_RUN_RESTART, XSLT_DEBUG_QUIT } xsltDebugStatusCodes; XSLTPUBVAR int xslDebugStatus; typedef void (*xsltHandleDebuggerCallback) (xmlNodePtr cur, xmlNodePtr node, xsltTemplatePtr templ, xsltTransformContextPtr ctxt); typedef int (*xsltAddCallCallback) (xsltTemplatePtr templ, xmlNodePtr source); typedef void (*xsltDropCallCallback) (void); XSLTPUBFUN void XSLTCALL xsltSetDebuggerStatus (int value); XSLTPUBFUN int XSLTCALL xsltGetDebuggerStatus (void); XSLTPUBFUN int XSLTCALL xsltSetDebuggerCallbacks (int no, void *block); XSLTPUBFUN int XSLTCALL xslAddCall (xsltTemplatePtr templ, xmlNodePtr source); XSLTPUBFUN void XSLTCALL xslDropCall (void); #ifdef __cplusplus } #endif /* __XML_XSLTUTILS_H__ */ PKZ4Olibxslt/xsltInternals.hnu[/* * Summary: internal data structures, constants and functions * Description: Internal data structures, constants and functions used * by the XSLT engine. * They are not part of the API or ABI, i.e. they can change * without prior notice, use carefully. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_INTERNALS_H__ #define __XML_XSLT_INTERNALS_H__ #include #include #include #include #include #include #include #include "xsltexports.h" #include "xsltlocale.h" #include "numbersInternals.h" #ifdef __cplusplus extern "C" { #endif /* #define XSLT_DEBUG_PROFILE_CACHE */ /** * XSLT_IS_TEXT_NODE: * * check if the argument is a text node */ #define XSLT_IS_TEXT_NODE(n) ((n != NULL) && \ (((n)->type == XML_TEXT_NODE) || \ ((n)->type == XML_CDATA_SECTION_NODE))) /** * XSLT_MARK_RES_TREE_FRAG: * * internal macro to set up tree fragments */ #define XSLT_MARK_RES_TREE_FRAG(n) \ (n)->name = (char *) xmlStrdup(BAD_CAST " fake node libxslt"); /** * XSLT_IS_RES_TREE_FRAG: * * internal macro to test tree fragments */ #define XSLT_IS_RES_TREE_FRAG(n) \ ((n != NULL) && ((n)->type == XML_DOCUMENT_NODE) && \ ((n)->name != NULL) && ((n)->name[0] == ' ')) /** * XSLT_REFACTORED_KEYCOMP: * * Internal define to enable on-demand xsl:key computation. * That's the only mode now but the define is kept for compatibility */ #define XSLT_REFACTORED_KEYCOMP /** * XSLT_FAST_IF: * * Internal define to enable usage of xmlXPathCompiledEvalToBoolean() * for XSLT "tests"; e.g. in */ #define XSLT_FAST_IF /** * XSLT_REFACTORED: * * Internal define to enable the refactored parts of Libxslt. */ /* #define XSLT_REFACTORED */ /* ==================================================================== */ /** * XSLT_REFACTORED_VARS: * * Internal define to enable the refactored variable part of libxslt */ #define XSLT_REFACTORED_VARS #ifdef XSLT_REFACTORED extern const xmlChar *xsltXSLTAttrMarker; /* TODO: REMOVE: #define XSLT_REFACTORED_EXCLRESNS */ /* TODO: REMOVE: #define XSLT_REFACTORED_NSALIAS */ /** * XSLT_REFACTORED_XSLT_NSCOMP * * Internal define to enable the pointer-comparison of * namespaces of XSLT elements. */ /* #define XSLT_REFACTORED_XSLT_NSCOMP */ /** * XSLT_REFACTORED_XPATHCOMP: * * Internal define to enable the optimization of the * compilation of XPath expressions. */ #define XSLT_REFACTORED_XPATHCOMP #ifdef XSLT_REFACTORED_XSLT_NSCOMP extern const xmlChar *xsltConstNamespaceNameXSLT; /** * IS_XSLT_ELEM_FAST: * * quick test to detect XSLT elements */ #define IS_XSLT_ELEM_FAST(n) \ (((n) != NULL) && ((n)->ns != NULL) && \ ((n)->ns->href == xsltConstNamespaceNameXSLT)) /** * IS_XSLT_ATTR_FAST: * * quick test to detect XSLT attributes */ #define IS_XSLT_ATTR_FAST(a) \ (((a) != NULL) && ((a)->ns != NULL) && \ ((a)->ns->href == xsltConstNamespaceNameXSLT)) /** * XSLT_HAS_INTERNAL_NSMAP: * * check for namespace mapping */ #define XSLT_HAS_INTERNAL_NSMAP(s) \ (((s) != NULL) && ((s)->principal) && \ ((s)->principal->principalData) && \ ((s)->principal->principalData->nsMap)) /** * XSLT_GET_INTERNAL_NSMAP: * * get pointer to namespace map */ #define XSLT_GET_INTERNAL_NSMAP(s) ((s)->principal->principalData->nsMap) #else /* XSLT_REFACTORED_XSLT_NSCOMP */ /** * IS_XSLT_ELEM_FAST: * * quick check whether this is an xslt element */ #define IS_XSLT_ELEM_FAST(n) \ (((n) != NULL) && ((n)->ns != NULL) && \ (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) /** * IS_XSLT_ATTR_FAST: * * quick check for xslt namespace attribute */ #define IS_XSLT_ATTR_FAST(a) \ (((a) != NULL) && ((a)->ns != NULL) && \ (xmlStrEqual((a)->ns->href, XSLT_NAMESPACE))) #endif /* XSLT_REFACTORED_XSLT_NSCOMP */ /** * XSLT_REFACTORED_MANDATORY_VERSION: * * TODO: Currently disabled to surpress regression test failures, since * the old behaviour was that a missing version attribute * produced a only a warning and not an error, which was incerrect. * So the regression tests need to be fixed if this is enabled. */ /* #define XSLT_REFACTORED_MANDATORY_VERSION */ /** * xsltPointerList: * * Pointer-list for various purposes. */ typedef struct _xsltPointerList xsltPointerList; typedef xsltPointerList *xsltPointerListPtr; struct _xsltPointerList { void **items; int number; int size; }; #endif /** * XSLT_REFACTORED_PARSING: * * Internal define to enable the refactored parts of Libxslt * related to parsing. */ /* #define XSLT_REFACTORED_PARSING */ /** * XSLT_MAX_SORT: * * Max number of specified xsl:sort on an element. */ #define XSLT_MAX_SORT 15 /** * XSLT_PAT_NO_PRIORITY: * * Specific value for pattern without priority expressed. */ #define XSLT_PAT_NO_PRIORITY -12345789 /** * xsltRuntimeExtra: * * Extra information added to the transformation context. */ typedef struct _xsltRuntimeExtra xsltRuntimeExtra; typedef xsltRuntimeExtra *xsltRuntimeExtraPtr; struct _xsltRuntimeExtra { void *info; /* pointer to the extra data */ xmlFreeFunc deallocate; /* pointer to the deallocation routine */ union { /* dual-purpose field */ void *ptr; /* data not needing deallocation */ int ival; /* integer value storage */ } val; }; /** * XSLT_RUNTIME_EXTRA_LST: * @ctxt: the transformation context * @nr: the index * * Macro used to access extra information stored in the context */ #define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info /** * XSLT_RUNTIME_EXTRA_FREE: * @ctxt: the transformation context * @nr: the index * * Macro used to free extra information stored in the context */ #define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate /** * XSLT_RUNTIME_EXTRA: * @ctxt: the transformation context * @nr: the index * * Macro used to define extra information stored in the context */ #define XSLT_RUNTIME_EXTRA(ctxt, nr, typ) (ctxt)->extras[(nr)].val.typ /** * xsltTemplate: * * The in-memory structure corresponding to an XSLT Template. */ typedef struct _xsltTemplate xsltTemplate; typedef xsltTemplate *xsltTemplatePtr; struct _xsltTemplate { struct _xsltTemplate *next;/* chained list sorted by priority */ struct _xsltStylesheet *style;/* the containing stylesheet */ xmlChar *match; /* the matching string */ float priority; /* as given from the stylesheet, not computed */ const xmlChar *name; /* the local part of the name QName */ const xmlChar *nameURI; /* the URI part of the name QName */ const xmlChar *mode;/* the local part of the mode QName */ const xmlChar *modeURI;/* the URI part of the mode QName */ xmlNodePtr content; /* the template replacement value */ xmlNodePtr elem; /* the source element */ /* * TODO: @inheritedNsNr and @inheritedNs won't be used in the * refactored code. */ int inheritedNsNr; /* number of inherited namespaces */ xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */ /* Profiling informations */ int nbCalls; /* the number of time the template was called */ unsigned long time; /* the time spent in this template */ void *params; /* xsl:param instructions */ int templNr; /* Nb of templates in the stack */ int templMax; /* Size of the templtes stack */ xsltTemplatePtr *templCalledTab; /* templates called */ int *templCountTab; /* .. and how often */ }; /** * xsltDecimalFormat: * * Data structure of decimal-format. */ typedef struct _xsltDecimalFormat xsltDecimalFormat; typedef xsltDecimalFormat *xsltDecimalFormatPtr; struct _xsltDecimalFormat { struct _xsltDecimalFormat *next; /* chained list */ xmlChar *name; /* Used for interpretation of pattern */ xmlChar *digit; xmlChar *patternSeparator; /* May appear in result */ xmlChar *minusSign; xmlChar *infinity; xmlChar *noNumber; /* Not-a-number */ /* Used for interpretation of pattern and may appear in result */ xmlChar *decimalPoint; xmlChar *grouping; xmlChar *percent; xmlChar *permille; xmlChar *zeroDigit; const xmlChar *nsUri; }; /** * xsltDocument: * * Data structure associated to a parsed document. */ typedef struct _xsltDocument xsltDocument; typedef xsltDocument *xsltDocumentPtr; struct _xsltDocument { struct _xsltDocument *next; /* documents are kept in a chained list */ int main; /* is this the main document */ xmlDocPtr doc; /* the parsed document */ void *keys; /* key tables storage */ struct _xsltDocument *includes; /* subsidiary includes */ int preproc; /* pre-processing already done */ int nbKeysComputed; }; /** * xsltKeyDef: * * Representation of an xsl:key. */ typedef struct _xsltKeyDef xsltKeyDef; typedef xsltKeyDef *xsltKeyDefPtr; struct _xsltKeyDef { struct _xsltKeyDef *next; xmlNodePtr inst; xmlChar *name; xmlChar *nameURI; xmlChar *match; xmlChar *use; xmlXPathCompExprPtr comp; xmlXPathCompExprPtr usecomp; xmlNsPtr *nsList; /* the namespaces in scope */ int nsNr; /* the number of namespaces in scope */ }; /** * xsltKeyTable: * * Holds the computed keys for key definitions of the same QName. * Is owned by an xsltDocument. */ typedef struct _xsltKeyTable xsltKeyTable; typedef xsltKeyTable *xsltKeyTablePtr; struct _xsltKeyTable { struct _xsltKeyTable *next; xmlChar *name; xmlChar *nameURI; xmlHashTablePtr keys; }; /* * The in-memory structure corresponding to an XSLT Stylesheet. * NOTE: most of the content is simply linked from the doc tree * structure, no specific allocation is made. */ typedef struct _xsltStylesheet xsltStylesheet; typedef xsltStylesheet *xsltStylesheetPtr; typedef struct _xsltTransformContext xsltTransformContext; typedef xsltTransformContext *xsltTransformContextPtr; /** * xsltElemPreComp: * * The in-memory structure corresponding to element precomputed data, * designed to be extended by extension implementors. */ typedef struct _xsltElemPreComp xsltElemPreComp; typedef xsltElemPreComp *xsltElemPreCompPtr; /** * xsltTransformFunction: * @ctxt: the XSLT transformation context * @node: the input node * @inst: the stylesheet node * @comp: the compiled information from the stylesheet * * Signature of the function associated to elements part of the * stylesheet language like xsl:if or xsl:apply-templates. */ typedef void (*xsltTransformFunction) (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr comp); /** * xsltSortFunc: * @ctxt: a transformation context * @sorts: the node-set to sort * @nbsorts: the number of sorts * * Signature of the function to use during sorting */ typedef void (*xsltSortFunc) (xsltTransformContextPtr ctxt, xmlNodePtr *sorts, int nbsorts); typedef enum { XSLT_FUNC_COPY=1, XSLT_FUNC_SORT, XSLT_FUNC_TEXT, XSLT_FUNC_ELEMENT, XSLT_FUNC_ATTRIBUTE, XSLT_FUNC_COMMENT, XSLT_FUNC_PI, XSLT_FUNC_COPYOF, XSLT_FUNC_VALUEOF, XSLT_FUNC_NUMBER, XSLT_FUNC_APPLYIMPORTS, XSLT_FUNC_CALLTEMPLATE, XSLT_FUNC_APPLYTEMPLATES, XSLT_FUNC_CHOOSE, XSLT_FUNC_IF, XSLT_FUNC_FOREACH, XSLT_FUNC_DOCUMENT, XSLT_FUNC_WITHPARAM, XSLT_FUNC_PARAM, XSLT_FUNC_VARIABLE, XSLT_FUNC_WHEN, XSLT_FUNC_EXTENSION #ifdef XSLT_REFACTORED , XSLT_FUNC_OTHERWISE, XSLT_FUNC_FALLBACK, XSLT_FUNC_MESSAGE, XSLT_FUNC_INCLUDE, XSLT_FUNC_ATTRSET, XSLT_FUNC_LITERAL_RESULT_ELEMENT, XSLT_FUNC_UNKOWN_FORWARDS_COMPAT #endif } xsltStyleType; /** * xsltElemPreCompDeallocator: * @comp: the #xsltElemPreComp to free up * * Deallocates an #xsltElemPreComp structure. */ typedef void (*xsltElemPreCompDeallocator) (xsltElemPreCompPtr comp); /** * xsltElemPreComp: * * The basic structure for compiled items of the AST of the XSLT processor. * This structure is also intended to be extended by extension implementors. * TODO: This is somehow not nice, since it has a "free" field, which * derived stylesheet-structs do not have. */ struct _xsltElemPreComp { xsltElemPreCompPtr next; /* next item in the global chained list hold by xsltStylesheet. */ xsltStyleType type; /* type of the element */ xsltTransformFunction func; /* handling function */ xmlNodePtr inst; /* the node in the stylesheet's tree corresponding to this item */ /* end of common part */ xsltElemPreCompDeallocator free; /* the deallocator */ }; /** * xsltStylePreComp: * * The abstract basic structure for items of the XSLT processor. * This includes: * 1) compiled forms of XSLT instructions (xsl:if, xsl:attribute, etc.) * 2) compiled forms of literal result elements * 3) compiled forms of extension elements */ typedef struct _xsltStylePreComp xsltStylePreComp; typedef xsltStylePreComp *xsltStylePreCompPtr; #ifdef XSLT_REFACTORED /* * Some pointer-list utility functions. */ XSLTPUBFUN xsltPointerListPtr XSLTCALL xsltPointerListCreate (int initialSize); XSLTPUBFUN void XSLTCALL xsltPointerListFree (xsltPointerListPtr list); XSLTPUBFUN void XSLTCALL xsltPointerListClear (xsltPointerListPtr list); XSLTPUBFUN int XSLTCALL xsltPointerListAddSize (xsltPointerListPtr list, void *item, int initialSize); /************************************************************************ * * * Refactored structures * * * ************************************************************************/ typedef struct _xsltNsListContainer xsltNsListContainer; typedef xsltNsListContainer *xsltNsListContainerPtr; struct _xsltNsListContainer { xmlNsPtr *list; int totalNumber; int xpathNumber; }; /** * XSLT_ITEM_COMPATIBILITY_FIELDS: * * Fields for API compatibility to the structure * _xsltElemPreComp which is used for extension functions. * Note that @next is used for storage; it does not reflect a next * sibling in the tree. * TODO: Evaluate if we really need such a compatibility. */ #define XSLT_ITEM_COMPATIBILITY_FIELDS \ xsltElemPreCompPtr next;\ xsltStyleType type;\ xsltTransformFunction func;\ xmlNodePtr inst; /** * XSLT_ITEM_NAVIGATION_FIELDS: * * Currently empty. * TODO: It is intended to hold navigational fields in the future. */ #define XSLT_ITEM_NAVIGATION_FIELDS /* xsltStylePreCompPtr parent;\ xsltStylePreCompPtr children;\ xsltStylePreCompPtr nextItem; */ /** * XSLT_ITEM_NSINSCOPE_FIELDS: * * The in-scope namespaces. */ #define XSLT_ITEM_NSINSCOPE_FIELDS xsltNsListContainerPtr inScopeNs; /** * XSLT_ITEM_COMMON_FIELDS: * * Common fields used for all items. */ #define XSLT_ITEM_COMMON_FIELDS \ XSLT_ITEM_COMPATIBILITY_FIELDS \ XSLT_ITEM_NAVIGATION_FIELDS \ XSLT_ITEM_NSINSCOPE_FIELDS /** * _xsltStylePreComp: * * The abstract basic structure for items of the XSLT processor. * This includes: * 1) compiled forms of XSLT instructions (e.g. xsl:if, xsl:attribute, etc.) * 2) compiled forms of literal result elements * 3) various properties for XSLT instructions (e.g. xsl:when, * xsl:with-param) * * REVISIT TODO: Keep this structure equal to the fields * defined by XSLT_ITEM_COMMON_FIELDS */ struct _xsltStylePreComp { xsltElemPreCompPtr next; /* next item in the global chained list hold by xsltStylesheet */ xsltStyleType type; /* type of the item */ xsltTransformFunction func; /* handling function */ xmlNodePtr inst; /* the node in the stylesheet's tree corresponding to this item. */ /* Currently no navigational fields. */ xsltNsListContainerPtr inScopeNs; }; /** * xsltStyleBasicEmptyItem: * * Abstract structure only used as a short-cut for * XSLT items with no extra fields. * NOTE that it is intended that this structure looks the same as * _xsltStylePreComp. */ typedef struct _xsltStyleBasicEmptyItem xsltStyleBasicEmptyItem; typedef xsltStyleBasicEmptyItem *xsltStyleBasicEmptyItemPtr; struct _xsltStyleBasicEmptyItem { XSLT_ITEM_COMMON_FIELDS }; /** * xsltStyleBasicExpressionItem: * * Abstract structure only used as a short-cut for * XSLT items with just an expression. */ typedef struct _xsltStyleBasicExpressionItem xsltStyleBasicExpressionItem; typedef xsltStyleBasicExpressionItem *xsltStyleBasicExpressionItemPtr; struct _xsltStyleBasicExpressionItem { XSLT_ITEM_COMMON_FIELDS const xmlChar *select; /* TODO: Change this to "expression". */ xmlXPathCompExprPtr comp; /* TODO: Change this to compExpr. */ }; /************************************************************************ * * * XSLT-instructions/declarations * * * ************************************************************************/ /** * xsltStyleItemElement: * * * * * */ typedef struct _xsltStyleItemElement xsltStyleItemElement; typedef xsltStyleItemElement *xsltStyleItemElementPtr; struct _xsltStyleItemElement { XSLT_ITEM_COMMON_FIELDS const xmlChar *use; int has_use; const xmlChar *name; int has_name; const xmlChar *ns; const xmlChar *nsPrefix; int has_ns; }; /** * xsltStyleItemAttribute: * * * * * */ typedef struct _xsltStyleItemAttribute xsltStyleItemAttribute; typedef xsltStyleItemAttribute *xsltStyleItemAttributePtr; struct _xsltStyleItemAttribute { XSLT_ITEM_COMMON_FIELDS const xmlChar *name; int has_name; const xmlChar *ns; const xmlChar *nsPrefix; int has_ns; }; /** * xsltStyleItemText: * * * * * */ typedef struct _xsltStyleItemText xsltStyleItemText; typedef xsltStyleItemText *xsltStyleItemTextPtr; struct _xsltStyleItemText { XSLT_ITEM_COMMON_FIELDS int noescape; /* text */ }; /** * xsltStyleItemComment: * * * * * */ typedef xsltStyleBasicEmptyItem xsltStyleItemComment; typedef xsltStyleItemComment *xsltStyleItemCommentPtr; /** * xsltStyleItemPI: * * * * * */ typedef struct _xsltStyleItemPI xsltStyleItemPI; typedef xsltStyleItemPI *xsltStyleItemPIPtr; struct _xsltStyleItemPI { XSLT_ITEM_COMMON_FIELDS const xmlChar *name; int has_name; }; /** * xsltStyleItemApplyImports: * * * */ typedef xsltStyleBasicEmptyItem xsltStyleItemApplyImports; typedef xsltStyleItemApplyImports *xsltStyleItemApplyImportsPtr; /** * xsltStyleItemApplyTemplates: * * * * * */ typedef struct _xsltStyleItemApplyTemplates xsltStyleItemApplyTemplates; typedef xsltStyleItemApplyTemplates *xsltStyleItemApplyTemplatesPtr; struct _xsltStyleItemApplyTemplates { XSLT_ITEM_COMMON_FIELDS const xmlChar *mode; /* apply-templates */ const xmlChar *modeURI; /* apply-templates */ const xmlChar *select; /* sort, copy-of, value-of, apply-templates */ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ /* TODO: with-params */ }; /** * xsltStyleItemCallTemplate: * * * * * */ typedef struct _xsltStyleItemCallTemplate xsltStyleItemCallTemplate; typedef xsltStyleItemCallTemplate *xsltStyleItemCallTemplatePtr; struct _xsltStyleItemCallTemplate { XSLT_ITEM_COMMON_FIELDS xsltTemplatePtr templ; /* call-template */ const xmlChar *name; /* element, attribute, pi */ int has_name; /* element, attribute, pi */ const xmlChar *ns; /* element */ int has_ns; /* element */ /* TODO: with-params */ }; /** * xsltStyleItemCopy: * * * * * */ typedef struct _xsltStyleItemCopy xsltStyleItemCopy; typedef xsltStyleItemCopy *xsltStyleItemCopyPtr; struct _xsltStyleItemCopy { XSLT_ITEM_COMMON_FIELDS const xmlChar *use; /* copy, element */ int has_use; /* copy, element */ }; /** * xsltStyleItemIf: * * * * * */ typedef struct _xsltStyleItemIf xsltStyleItemIf; typedef xsltStyleItemIf *xsltStyleItemIfPtr; struct _xsltStyleItemIf { XSLT_ITEM_COMMON_FIELDS const xmlChar *test; /* if */ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ }; /** * xsltStyleItemCopyOf: * * * */ typedef xsltStyleBasicExpressionItem xsltStyleItemCopyOf; typedef xsltStyleItemCopyOf *xsltStyleItemCopyOfPtr; /** * xsltStyleItemValueOf: * * * */ typedef struct _xsltStyleItemValueOf xsltStyleItemValueOf; typedef xsltStyleItemValueOf *xsltStyleItemValueOfPtr; struct _xsltStyleItemValueOf { XSLT_ITEM_COMMON_FIELDS const xmlChar *select; xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ int noescape; }; /** * xsltStyleItemNumber: * * * */ typedef struct _xsltStyleItemNumber xsltStyleItemNumber; typedef xsltStyleItemNumber *xsltStyleItemNumberPtr; struct _xsltStyleItemNumber { XSLT_ITEM_COMMON_FIELDS xsltNumberData numdata; /* number */ }; /** * xsltStyleItemChoose: * * * * * */ typedef xsltStyleBasicEmptyItem xsltStyleItemChoose; typedef xsltStyleItemChoose *xsltStyleItemChoosePtr; /** * xsltStyleItemFallback: * * * * * */ typedef xsltStyleBasicEmptyItem xsltStyleItemFallback; typedef xsltStyleItemFallback *xsltStyleItemFallbackPtr; /** * xsltStyleItemForEach: * * * * * */ typedef xsltStyleBasicExpressionItem xsltStyleItemForEach; typedef xsltStyleItemForEach *xsltStyleItemForEachPtr; /** * xsltStyleItemMessage: * * * * * */ typedef struct _xsltStyleItemMessage xsltStyleItemMessage; typedef xsltStyleItemMessage *xsltStyleItemMessagePtr; struct _xsltStyleItemMessage { XSLT_ITEM_COMMON_FIELDS int terminate; }; /** * xsltStyleItemDocument: * * NOTE: This is not an instruction of XSLT 1.0. */ typedef struct _xsltStyleItemDocument xsltStyleItemDocument; typedef xsltStyleItemDocument *xsltStyleItemDocumentPtr; struct _xsltStyleItemDocument { XSLT_ITEM_COMMON_FIELDS int ver11; /* assigned: in xsltDocumentComp; read: nowhere; TODO: Check if we need. */ const xmlChar *filename; /* document URL */ int has_filename; }; /************************************************************************ * * * Non-instructions (actually properties of instructions/declarations) * * * ************************************************************************/ /** * xsltStyleBasicItemVariable: * * Basic struct for xsl:variable, xsl:param and xsl:with-param. * It's currently important to have equal fields, since * xsltParseStylesheetCallerParam() is used with xsl:with-param from * the xslt side and with xsl:param from the exslt side (in * exsltFuncFunctionFunction()). * * FUTURE NOTE: In XSLT 2.0 xsl:param, xsl:variable and xsl:with-param * have additional different fields. */ typedef struct _xsltStyleBasicItemVariable xsltStyleBasicItemVariable; typedef xsltStyleBasicItemVariable *xsltStyleBasicItemVariablePtr; struct _xsltStyleBasicItemVariable { XSLT_ITEM_COMMON_FIELDS const xmlChar *select; xmlXPathCompExprPtr comp; const xmlChar *name; int has_name; const xmlChar *ns; int has_ns; }; /** * xsltStyleItemVariable: * * * * * */ typedef xsltStyleBasicItemVariable xsltStyleItemVariable; typedef xsltStyleItemVariable *xsltStyleItemVariablePtr; /** * xsltStyleItemParam: * * * * * */ typedef struct _xsltStyleItemParam xsltStyleItemParam; typedef xsltStyleItemParam *xsltStyleItemParamPtr; struct _xsltStyleItemParam { XSLT_ITEM_COMMON_FIELDS const xmlChar *select; xmlXPathCompExprPtr comp; const xmlChar *name; int has_name; const xmlChar *ns; int has_ns; }; /** * xsltStyleItemWithParam: * * * * */ typedef xsltStyleBasicItemVariable xsltStyleItemWithParam; typedef xsltStyleItemWithParam *xsltStyleItemWithParamPtr; /** * xsltStyleItemSort: * * Reflects the XSLT xsl:sort item. * Allowed parents: xsl:apply-templates, xsl:for-each * */ typedef struct _xsltStyleItemSort xsltStyleItemSort; typedef xsltStyleItemSort *xsltStyleItemSortPtr; struct _xsltStyleItemSort { XSLT_ITEM_COMMON_FIELDS const xmlChar *stype; /* sort */ int has_stype; /* sort */ int number; /* sort */ const xmlChar *order; /* sort */ int has_order; /* sort */ int descending; /* sort */ const xmlChar *lang; /* sort */ int has_lang; /* sort */ xsltLocale locale; /* sort */ const xmlChar *case_order; /* sort */ int lower_first; /* sort */ const xmlChar *use; int has_use; const xmlChar *select; /* sort, copy-of, value-of, apply-templates */ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ }; /** * xsltStyleItemWhen: * * * * * Allowed parent: xsl:choose */ typedef struct _xsltStyleItemWhen xsltStyleItemWhen; typedef xsltStyleItemWhen *xsltStyleItemWhenPtr; struct _xsltStyleItemWhen { XSLT_ITEM_COMMON_FIELDS const xmlChar *test; xmlXPathCompExprPtr comp; }; /** * xsltStyleItemOtherwise: * * Allowed parent: xsl:choose * * * */ typedef struct _xsltStyleItemOtherwise xsltStyleItemOtherwise; typedef xsltStyleItemOtherwise *xsltStyleItemOtherwisePtr; struct _xsltStyleItemOtherwise { XSLT_ITEM_COMMON_FIELDS }; typedef struct _xsltStyleItemInclude xsltStyleItemInclude; typedef xsltStyleItemInclude *xsltStyleItemIncludePtr; struct _xsltStyleItemInclude { XSLT_ITEM_COMMON_FIELDS xsltDocumentPtr include; }; /************************************************************************ * * * XSLT elements in forwards-compatible mode * * * ************************************************************************/ typedef struct _xsltStyleItemUknown xsltStyleItemUknown; typedef xsltStyleItemUknown *xsltStyleItemUknownPtr; struct _xsltStyleItemUknown { XSLT_ITEM_COMMON_FIELDS }; /************************************************************************ * * * Extension elements * * * ************************************************************************/ /* * xsltStyleItemExtElement: * * Reflects extension elements. * * NOTE: Due to the fact that the structure xsltElemPreComp is most * probably already heavily in use out there by users, so we cannot * easily change it, we'll create an intermediate structure which will * hold an xsltElemPreCompPtr. * BIG NOTE: The only problem I see here is that the user processes the * content of the stylesheet tree, possibly he'll lookup the node->psvi * fields in order to find subsequent extension functions. * In this case, the user's code will break, since the node->psvi * field will hold now the xsltStyleItemExtElementPtr and not * the xsltElemPreCompPtr. * However the place where the structure is anchored in the node-tree, * namely node->psvi, has beed already once been moved from node->_private * to node->psvi, so we have a precedent here, which, I think, should allow * us to change such semantics without headaches. */ typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement; typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr; struct _xsltStyleItemExtElement { XSLT_ITEM_COMMON_FIELDS xsltElemPreCompPtr item; }; /************************************************************************ * * * Literal result elements * * * ************************************************************************/ typedef struct _xsltEffectiveNs xsltEffectiveNs; typedef xsltEffectiveNs *xsltEffectiveNsPtr; struct _xsltEffectiveNs { xsltEffectiveNsPtr nextInStore; /* storage next */ xsltEffectiveNsPtr next; /* next item in the list */ const xmlChar *prefix; const xmlChar *nsName; /* * Indicates if eclared on the literal result element; dunno if really * needed. */ int holdByElem; }; /* * Info for literal result elements. * This will be set on the elem->psvi field and will be * shared by literal result elements, which have the same * excluded result namespaces; i.e., this *won't* be created uniquely * for every literal result element. */ typedef struct _xsltStyleItemLRElementInfo xsltStyleItemLRElementInfo; typedef xsltStyleItemLRElementInfo *xsltStyleItemLRElementInfoPtr; struct _xsltStyleItemLRElementInfo { XSLT_ITEM_COMMON_FIELDS /* * @effectiveNs is the set of effective ns-nodes * on the literal result element, which will be added to the result * element if not already existing in the result tree. * This means that excluded namespaces (via exclude-result-prefixes, * extension-element-prefixes and the XSLT namespace) not added * to the set. * Namespace-aliasing was applied on the @effectiveNs. */ xsltEffectiveNsPtr effectiveNs; }; #ifdef XSLT_REFACTORED typedef struct _xsltNsAlias xsltNsAlias; typedef xsltNsAlias *xsltNsAliasPtr; struct _xsltNsAlias { xsltNsAliasPtr next; /* next in the list */ xmlNsPtr literalNs; xmlNsPtr targetNs; xmlDocPtr docOfTargetNs; }; #endif #ifdef XSLT_REFACTORED_XSLT_NSCOMP typedef struct _xsltNsMap xsltNsMap; typedef xsltNsMap *xsltNsMapPtr; struct _xsltNsMap { xsltNsMapPtr next; /* next in the list */ xmlDocPtr doc; xmlNodePtr elem; /* the element holding the ns-decl */ xmlNsPtr ns; /* the xmlNs structure holding the XML namespace name */ const xmlChar *origNsName; /* the original XML namespace name */ const xmlChar *newNsName; /* the mapped XML namespace name */ }; #endif /************************************************************************ * * * Compile-time structures for *internal* use only * * * ************************************************************************/ typedef struct _xsltPrincipalStylesheetData xsltPrincipalStylesheetData; typedef xsltPrincipalStylesheetData *xsltPrincipalStylesheetDataPtr; typedef struct _xsltNsList xsltNsList; typedef xsltNsList *xsltNsListPtr; struct _xsltNsList { xsltNsListPtr next; /* next in the list */ xmlNsPtr ns; }; /* * xsltVarInfo: * * Used at compilation time for parameters and variables. */ typedef struct _xsltVarInfo xsltVarInfo; typedef xsltVarInfo *xsltVarInfoPtr; struct _xsltVarInfo { xsltVarInfoPtr next; /* next in the list */ xsltVarInfoPtr prev; int depth; /* the depth in the tree */ const xmlChar *name; const xmlChar *nsName; }; /** * xsltCompilerNodeInfo: * * Per-node information during compile-time. */ typedef struct _xsltCompilerNodeInfo xsltCompilerNodeInfo; typedef xsltCompilerNodeInfo *xsltCompilerNodeInfoPtr; struct _xsltCompilerNodeInfo { xsltCompilerNodeInfoPtr next; xsltCompilerNodeInfoPtr prev; xmlNodePtr node; int depth; xsltTemplatePtr templ; /* The owning template */ int category; /* XSLT element, LR-element or extension element */ xsltStyleType type; xsltElemPreCompPtr item; /* The compiled information */ /* The current in-scope namespaces */ xsltNsListContainerPtr inScopeNs; /* The current excluded result namespaces */ xsltPointerListPtr exclResultNs; /* The current extension instruction namespaces */ xsltPointerListPtr extElemNs; /* The current info for literal result elements. */ xsltStyleItemLRElementInfoPtr litResElemInfo; /* * Set to 1 if in-scope namespaces changed, * or excluded result namespaces changed, * or extension element namespaces changed. * This will trigger creation of new infos * for literal result elements. */ int nsChanged; int preserveWhitespace; int stripWhitespace; int isRoot; /* whether this is the stylesheet's root node */ int forwardsCompat; /* whether forwards-compatible mode is enabled */ /* whether the content of an extension element was processed */ int extContentHandled; /* the type of the current child */ xsltStyleType curChildType; }; /** * XSLT_CCTXT: * * get pointer to compiler context */ #define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt) typedef enum { XSLT_ERROR_SEVERITY_ERROR = 0, XSLT_ERROR_SEVERITY_WARNING } xsltErrorSeverityType; typedef struct _xsltCompilerCtxt xsltCompilerCtxt; typedef xsltCompilerCtxt *xsltCompilerCtxtPtr; struct _xsltCompilerCtxt { void *errorCtxt; /* user specific error context */ /* * used for error/warning reports; e.g. XSLT_ERROR_SEVERITY_WARNING */ xsltErrorSeverityType errSeverity; int warnings; /* TODO: number of warnings found at compilation */ int errors; /* TODO: number of errors found at compilation */ xmlDictPtr dict; xsltStylesheetPtr style; int simplified; /* whether this is a simplified stylesheet */ /* TODO: structured/unstructured error contexts. */ int depth; /* Current depth of processing */ xsltCompilerNodeInfoPtr inode; xsltCompilerNodeInfoPtr inodeList; xsltCompilerNodeInfoPtr inodeLast; xsltPointerListPtr tmpList; /* Used for various purposes */ /* * The XSLT version as specified by the stylesheet's root element. */ int isInclude; int hasForwardsCompat; /* whether forwards-compatible mode was used in a parsing episode */ int maxNodeInfos; /* TEMP TODO: just for the interest */ int maxLREs; /* TEMP TODO: just for the interest */ /* * In order to keep the old behaviour, applying strict rules of * the spec can be turned off. This has effect only on special * mechanisms like whitespace-stripping in the stylesheet. */ int strict; xsltPrincipalStylesheetDataPtr psData; #ifdef XSLT_REFACTORED_XPATHCOMP xmlXPathContextPtr xpathCtxt; #endif xsltStyleItemUknownPtr unknownItem; int hasNsAliases; /* Indicator if there was an xsl:namespace-alias. */ xsltNsAliasPtr nsAliases; xsltVarInfoPtr ivars; /* Storage of local in-scope variables/params. */ xsltVarInfoPtr ivar; /* topmost local variable/param. */ }; #else /* XSLT_REFACTORED */ /* * The old structures before refactoring. */ /** * _xsltStylePreComp: * * The in-memory structure corresponding to XSLT stylesheet constructs * precomputed data. */ struct _xsltStylePreComp { xsltElemPreCompPtr next; /* chained list */ xsltStyleType type; /* type of the element */ xsltTransformFunction func; /* handling function */ xmlNodePtr inst; /* the instruction */ /* * Pre computed values. */ const xmlChar *stype; /* sort */ int has_stype; /* sort */ int number; /* sort */ const xmlChar *order; /* sort */ int has_order; /* sort */ int descending; /* sort */ const xmlChar *lang; /* sort */ int has_lang; /* sort */ xsltLocale locale; /* sort */ const xmlChar *case_order; /* sort */ int lower_first; /* sort */ const xmlChar *use; /* copy, element */ int has_use; /* copy, element */ int noescape; /* text */ const xmlChar *name; /* element, attribute, pi */ int has_name; /* element, attribute, pi */ const xmlChar *ns; /* element */ int has_ns; /* element */ const xmlChar *mode; /* apply-templates */ const xmlChar *modeURI; /* apply-templates */ const xmlChar *test; /* if */ xsltTemplatePtr templ; /* call-template */ const xmlChar *select; /* sort, copy-of, value-of, apply-templates */ int ver11; /* document */ const xmlChar *filename; /* document URL */ int has_filename; /* document */ xsltNumberData numdata; /* number */ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ xmlNsPtr *nsList; /* the namespaces in scope */ int nsNr; /* the number of namespaces in scope */ }; #endif /* XSLT_REFACTORED */ /* * The in-memory structure corresponding to an XSLT Variable * or Param. */ typedef struct _xsltStackElem xsltStackElem; typedef xsltStackElem *xsltStackElemPtr; struct _xsltStackElem { struct _xsltStackElem *next;/* chained list */ xsltStylePreCompPtr comp; /* the compiled form */ int computed; /* was the evaluation done */ const xmlChar *name; /* the local part of the name QName */ const xmlChar *nameURI; /* the URI part of the name QName */ const xmlChar *select; /* the eval string */ xmlNodePtr tree; /* the sequence constructor if no eval string or the location */ xmlXPathObjectPtr value; /* The value if computed */ xmlDocPtr fragment; /* The Result Tree Fragments (needed for XSLT 1.0) which are bound to the variable's lifetime. */ int level; /* the depth in the tree; -1 if persistent (e.g. a given xsl:with-param) */ xsltTransformContextPtr context; /* The transformation context; needed to cache the variables */ int flags; }; #ifdef XSLT_REFACTORED struct _xsltPrincipalStylesheetData { /* * Namespace dictionary for ns-prefixes and ns-names: * TODO: Shared between stylesheets, and XPath mechanisms. * Not used yet. */ xmlDictPtr namespaceDict; /* * Global list of in-scope namespaces. */ xsltPointerListPtr inScopeNamespaces; /* * Global list of information for [xsl:]excluded-result-prefixes. */ xsltPointerListPtr exclResultNamespaces; /* * Global list of information for [xsl:]extension-element-prefixes. */ xsltPointerListPtr extElemNamespaces; xsltEffectiveNsPtr effectiveNs; #ifdef XSLT_REFACTORED_XSLT_NSCOMP /* * Namespace name map to get rid of string comparison of namespace names. */ xsltNsMapPtr nsMap; #endif }; #endif /* * Note that we added a @compCtxt field to anchor an stylesheet compilation * context, since, due to historical reasons, various compile-time function * take only the stylesheet as argument and not a compilation context. */ struct _xsltStylesheet { /* * The stylesheet import relation is kept as a tree. */ struct _xsltStylesheet *parent; struct _xsltStylesheet *next; struct _xsltStylesheet *imports; xsltDocumentPtr docList; /* the include document list */ /* * General data on the style sheet document. */ xmlDocPtr doc; /* the parsed XML stylesheet */ xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and preserve space elements */ int stripAll; /* strip-space * (1) preserve-space * (-1) */ xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */ /* * Global variable or parameters. */ xsltStackElemPtr variables; /* linked list of param and variables */ /* * Template descriptions. */ xsltTemplatePtr templates; /* the ordered list of templates */ void *templatesHash; /* hash table or wherever compiled templates informations are stored */ void *rootMatch; /* template based on / */ void *keyMatch; /* template based on key() */ void *elemMatch; /* template based on * */ void *attrMatch; /* template based on @* */ void *parentMatch; /* template based on .. */ void *textMatch; /* template based on text() */ void *piMatch; /* template based on processing-instruction() */ void *commentMatch; /* template based on comment() */ /* * Namespace aliases. * NOTE: Not used in the refactored code. */ xmlHashTablePtr nsAliases; /* the namespace alias hash tables */ /* * Attribute sets. */ xmlHashTablePtr attributeSets;/* the attribute sets hash tables */ /* * Namespaces. * TODO: Eliminate this. */ xmlHashTablePtr nsHash; /* the set of namespaces in use: ATTENTION: This is used for execution of XPath expressions; unfortunately it restricts the stylesheet to have distinct prefixes. TODO: We need to get rid of this. */ void *nsDefs; /* ATTENTION TODO: This is currently used to store xsltExtDefPtr (in extensions.c) and *not* xmlNsPtr. */ /* * Key definitions. */ void *keys; /* key definitions */ /* * Output related stuff. */ xmlChar *method; /* the output method */ xmlChar *methodURI; /* associated namespace if any */ xmlChar *version; /* version string */ xmlChar *encoding; /* encoding string */ int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */ /* * Number formatting. */ xsltDecimalFormatPtr decimalFormat; int standalone; /* standalone = "yes" | "no" */ xmlChar *doctypePublic; /* doctype-public string */ xmlChar *doctypeSystem; /* doctype-system string */ int indent; /* should output being indented */ xmlChar *mediaType; /* media-type string */ /* * Precomputed blocks. */ xsltElemPreCompPtr preComps;/* list of precomputed blocks */ int warnings; /* number of warnings found at compilation */ int errors; /* number of errors found at compilation */ xmlChar *exclPrefix; /* last excluded prefixes */ xmlChar **exclPrefixTab; /* array of excluded prefixes */ int exclPrefixNr; /* number of excluded prefixes in scope */ int exclPrefixMax; /* size of the array */ void *_private; /* user defined data */ /* * Extensions. */ xmlHashTablePtr extInfos; /* the extension data */ int extrasNr; /* the number of extras required */ /* * For keeping track of nested includes */ xsltDocumentPtr includes; /* points to last nested include */ /* * dictionary: shared between stylesheet, context and documents. */ xmlDictPtr dict; /* * precompiled attribute value templates. */ void *attVTs; /* * if namespace-alias has an alias for the default stylesheet prefix * NOTE: Not used in the refactored code. */ const xmlChar *defaultAlias; /* * bypass pre-processing (already done) (used in imports) */ int nopreproc; /* * all document text strings were internalized */ int internalized; /* * Literal Result Element as Stylesheet c.f. section 2.3 */ int literal_result; /* * The principal stylesheet */ xsltStylesheetPtr principal; #ifdef XSLT_REFACTORED /* * Compilation context used during compile-time. */ xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */ xsltPrincipalStylesheetDataPtr principalData; #endif /* * Forwards-compatible processing */ int forwards_compatible; xmlHashTablePtr namedTemplates; /* hash table of named templates */ }; typedef struct _xsltTransformCache xsltTransformCache; typedef xsltTransformCache *xsltTransformCachePtr; struct _xsltTransformCache { xmlDocPtr RVT; int nbRVT; xsltStackElemPtr stackItems; int nbStackItems; #ifdef XSLT_DEBUG_PROFILE_CACHE int dbgCachedRVTs; int dbgReusedRVTs; int dbgCachedVars; int dbgReusedVars; #endif }; /* * The in-memory structure corresponding to an XSLT Transformation. */ typedef enum { XSLT_OUTPUT_XML = 0, XSLT_OUTPUT_HTML, XSLT_OUTPUT_TEXT } xsltOutputType; typedef enum { XSLT_STATE_OK = 0, XSLT_STATE_ERROR, XSLT_STATE_STOPPED } xsltTransformState; struct _xsltTransformContext { xsltStylesheetPtr style; /* the stylesheet used */ xsltOutputType type; /* the type of output */ xsltTemplatePtr templ; /* the current template */ int templNr; /* Nb of templates in the stack */ int templMax; /* Size of the templtes stack */ xsltTemplatePtr *templTab; /* the template stack */ xsltStackElemPtr vars; /* the current variable list */ int varsNr; /* Nb of variable list in the stack */ int varsMax; /* Size of the variable list stack */ xsltStackElemPtr *varsTab; /* the variable list stack */ int varsBase; /* the var base for current templ */ /* * Extensions */ xmlHashTablePtr extFunctions; /* the extension functions */ xmlHashTablePtr extElements; /* the extension elements */ xmlHashTablePtr extInfos; /* the extension data */ const xmlChar *mode; /* the current mode */ const xmlChar *modeURI; /* the current mode URI */ xsltDocumentPtr docList; /* the document list */ xsltDocumentPtr document; /* the current source document; can be NULL if an RTF */ xmlNodePtr node; /* the current node being processed */ xmlNodeSetPtr nodeList; /* the current node list */ /* xmlNodePtr current; the node */ xmlDocPtr output; /* the resulting document */ xmlNodePtr insert; /* the insertion node */ xmlXPathContextPtr xpathCtxt; /* the XPath context */ xsltTransformState state; /* the current state */ /* * Global variables */ xmlHashTablePtr globalVars; /* the global variables and params */ xmlNodePtr inst; /* the instruction in the stylesheet */ int xinclude; /* should XInclude be processed */ const char * outputFile; /* the output URI if known */ int profile; /* is this run profiled */ long prof; /* the current profiled value */ int profNr; /* Nb of templates in the stack */ int profMax; /* Size of the templtaes stack */ long *profTab; /* the profile template stack */ void *_private; /* user defined data */ int extrasNr; /* the number of extras used */ int extrasMax; /* the number of extras allocated */ xsltRuntimeExtraPtr extras; /* extra per runtime informations */ xsltDocumentPtr styleList; /* the stylesheet docs list */ void * sec; /* the security preferences if any */ xmlGenericErrorFunc error; /* a specific error handler */ void * errctx; /* context for the error handler */ xsltSortFunc sortfunc; /* a ctxt specific sort routine */ /* * handling of temporary Result Value Tree * (XSLT 1.0 term: "Result Tree Fragment") */ xmlDocPtr tmpRVT; /* list of RVT without persistance */ xmlDocPtr persistRVT; /* list of persistant RVTs */ int ctxtflags; /* context processing flags */ /* * Speed optimization when coalescing text nodes */ const xmlChar *lasttext; /* last text node content */ int lasttsize; /* last text node size */ int lasttuse; /* last text node use */ /* * Per Context Debugging */ int debugStatus; /* the context level debug status */ unsigned long* traceCode; /* pointer to the variable holding the mask */ int parserOptions; /* parser options xmlParserOption */ /* * dictionary: shared between stylesheet, context and documents. */ xmlDictPtr dict; xmlDocPtr tmpDoc; /* Obsolete; not used in the library. */ /* * all document text strings are internalized */ int internalized; int nbKeys; int hasTemplKeyPatterns; xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */ xmlNodePtr initialContextNode; xmlDocPtr initialContextDoc; xsltTransformCachePtr cache; void *contextVariable; /* the current variable item */ xmlDocPtr localRVT; /* list of local tree fragments; will be freed when the instruction which created the fragment exits */ xmlDocPtr localRVTBase; /* Obsolete */ int keyInitLevel; /* Needed to catch recursive keys issues */ int depth; /* Needed to catch recursions */ int maxTemplateDepth; int maxTemplateVars; unsigned long opLimit; unsigned long opCount; int sourceDocDirty; unsigned long currentId; /* For generate-id() */ }; /** * CHECK_STOPPED: * * Macro to check if the XSLT processing should be stopped. * Will return from the function. */ #define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return; /** * CHECK_STOPPEDE: * * Macro to check if the XSLT processing should be stopped. * Will goto the error: label. */ #define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error; /** * CHECK_STOPPED0: * * Macro to check if the XSLT processing should be stopped. * Will return from the function with a 0 value. */ #define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0); /* * The macro XML_CAST_FPTR is a hack to avoid a gcc warning about * possible incompatibilities between function pointers and object * pointers. It is defined in libxml/hash.h within recent versions * of libxml2, but is put here for compatibility. */ #ifndef XML_CAST_FPTR /** * XML_CAST_FPTR: * @fptr: pointer to a function * * Macro to do a casting from an object pointer to a * function pointer without encountering a warning from * gcc * * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) * This macro violated ISO C aliasing rules (gcc4 on s390 broke) * so it is disabled now */ #define XML_CAST_FPTR(fptr) fptr #endif /* * Functions associated to the internal types xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet, xmlChar *name); */ XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltNewStylesheet (void); XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetFile (const xmlChar* filename); XSLTPUBFUN void XSLTCALL xsltFreeStylesheet (xsltStylesheetPtr style); XSLTPUBFUN int XSLTCALL xsltIsBlank (xmlChar *str); XSLTPUBFUN void XSLTCALL xsltFreeStackElemList (xsltStackElemPtr elem); XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByName(xsltStylesheetPtr style, xmlChar *name); XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL xsltDecimalFormatGetByQName(xsltStylesheetPtr style, const xmlChar *nsUri, const xmlChar *name); XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetProcess(xsltStylesheetPtr ret, xmlDocPtr doc); XSLTPUBFUN void XSLTCALL xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur); XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetDoc (xmlDocPtr doc); XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltParseStylesheetImportedDoc(xmlDocPtr doc, xsltStylesheetPtr style); XSLTPUBFUN xsltStylesheetPtr XSLTCALL xsltLoadStylesheetPI (xmlDocPtr doc); XSLTPUBFUN void XSLTCALL xsltNumberFormat (xsltTransformContextPtr ctxt, xsltNumberDataPtr data, xmlNodePtr node); XSLTPUBFUN xmlXPathError XSLTCALL xsltFormatNumberConversion(xsltDecimalFormatPtr self, xmlChar *format, double number, xmlChar **result); XSLTPUBFUN void XSLTCALL xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ); XSLTPUBFUN int XSLTCALL xsltAllocateExtra (xsltStylesheetPtr style); XSLTPUBFUN int XSLTCALL xsltAllocateExtraCtxt (xsltTransformContextPtr ctxt); /* * Extra functions for Result Value Trees */ XSLTPUBFUN xmlDocPtr XSLTCALL xsltCreateRVT (xsltTransformContextPtr ctxt); XSLTPUBFUN int XSLTCALL xsltRegisterTmpRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT); XSLTPUBFUN int XSLTCALL xsltRegisterLocalRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT); XSLTPUBFUN int XSLTCALL xsltRegisterPersistRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT); XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultRegister( xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj); XSLTPUBFUN int XSLTCALL xsltExtensionInstructionResultFinalize( xsltTransformContextPtr ctxt); XSLTPUBFUN int XSLTCALL xsltFlagRVTs( xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj, int val); XSLTPUBFUN void XSLTCALL xsltFreeRVTs (xsltTransformContextPtr ctxt); XSLTPUBFUN void XSLTCALL xsltReleaseRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT); /* * Extra functions for Attribute Value Templates */ XSLTPUBFUN void XSLTCALL xsltCompileAttr (xsltStylesheetPtr style, xmlAttrPtr attr); XSLTPUBFUN xmlChar * XSLTCALL xsltEvalAVT (xsltTransformContextPtr ctxt, void *avt, xmlNodePtr node); XSLTPUBFUN void XSLTCALL xsltFreeAVTList (void *avt); /* * Extra function for successful xsltCleanupGlobals / xsltInit sequence. */ XSLTPUBFUN void XSLTCALL xsltUninit (void); /************************************************************************ * * * Compile-time functions for *internal* use only * * * ************************************************************************/ #ifdef XSLT_REFACTORED XSLTPUBFUN void XSLTCALL xsltParseSequenceConstructor( xsltCompilerCtxtPtr cctxt, xmlNodePtr start); XSLTPUBFUN int XSLTCALL xsltParseAnyXSLTElem (xsltCompilerCtxtPtr cctxt, xmlNodePtr elem); #ifdef XSLT_REFACTORED_XSLT_NSCOMP XSLTPUBFUN int XSLTCALL xsltRestoreDocumentNamespaces( xsltNsMapPtr ns, xmlDocPtr doc); #endif #endif /* XSLT_REFACTORED */ /************************************************************************ * * * Transformation-time functions for *internal* use only * * * ************************************************************************/ XSLTPUBFUN int XSLTCALL xsltInitCtxtKey (xsltTransformContextPtr ctxt, xsltDocumentPtr doc, xsltKeyDefPtr keyd); XSLTPUBFUN int XSLTCALL xsltInitAllDocKeys (xsltTransformContextPtr ctxt); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_H__ */ PKZPG G libxslt/variables.hnu[/* * Summary: interface for the variable matching and lookup. * Description: interface for the variable matching and lookup. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_VARIABLES_H__ #define __XML_XSLT_VARIABLES_H__ #include #include #include "xsltexports.h" #include "xsltInternals.h" #include "functions.h" #ifdef __cplusplus extern "C" { #endif /** * XSLT_REGISTER_VARIABLE_LOOKUP: * * Registering macro, not general purpose at all but used in different modules. */ #define XSLT_REGISTER_VARIABLE_LOOKUP(ctxt) \ xmlXPathRegisterVariableLookup((ctxt)->xpathCtxt, \ xsltXPathVariableLookup, (void *)(ctxt)); \ xsltRegisterAllFunctions((ctxt)->xpathCtxt); \ xsltRegisterAllElement(ctxt); \ (ctxt)->xpathCtxt->extra = ctxt /* * Flags for memory management of RVTs */ /** * XSLT_RVT_LOCAL: * * RVT is destroyed after the current instructions ends. */ #define XSLT_RVT_LOCAL 1 /** * XSLT_RVT_FUNC_RESULT: * * RVT is part of results returned with func:result. The RVT won't be * destroyed after exiting a template and will be reset to XSLT_RVT_LOCAL or * XSLT_RVT_VARIABLE in the template that receives the return value. */ #define XSLT_RVT_FUNC_RESULT 2 /** * XSLT_RVT_GLOBAL: * * RVT is part of a global variable. */ #define XSLT_RVT_GLOBAL 3 /* * Interfaces for the variable module. */ XSLTPUBFUN int XSLTCALL xsltEvalGlobalVariables (xsltTransformContextPtr ctxt); XSLTPUBFUN int XSLTCALL xsltEvalUserParams (xsltTransformContextPtr ctxt, const char **params); XSLTPUBFUN int XSLTCALL xsltQuoteUserParams (xsltTransformContextPtr ctxt, const char **params); XSLTPUBFUN int XSLTCALL xsltEvalOneUserParam (xsltTransformContextPtr ctxt, const xmlChar * name, const xmlChar * value); XSLTPUBFUN int XSLTCALL xsltQuoteOneUserParam (xsltTransformContextPtr ctxt, const xmlChar * name, const xmlChar * value); XSLTPUBFUN void XSLTCALL xsltParseGlobalVariable (xsltStylesheetPtr style, xmlNodePtr cur); XSLTPUBFUN void XSLTCALL xsltParseGlobalParam (xsltStylesheetPtr style, xmlNodePtr cur); XSLTPUBFUN void XSLTCALL xsltParseStylesheetVariable (xsltTransformContextPtr ctxt, xmlNodePtr cur); XSLTPUBFUN void XSLTCALL xsltParseStylesheetParam (xsltTransformContextPtr ctxt, xmlNodePtr cur); XSLTPUBFUN xsltStackElemPtr XSLTCALL xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt, xmlNodePtr cur); XSLTPUBFUN int XSLTCALL xsltAddStackElemList (xsltTransformContextPtr ctxt, xsltStackElemPtr elems); XSLTPUBFUN void XSLTCALL xsltFreeGlobalVariables (xsltTransformContextPtr ctxt); XSLTPUBFUN xmlXPathObjectPtr XSLTCALL xsltVariableLookup (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri); XSLTPUBFUN xmlXPathObjectPtr XSLTCALL xsltXPathVariableLookup (void *ctxt, const xmlChar *name, const xmlChar *ns_uri); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_VARIABLES_H__ */ PKZn9libxslt/functions.hnu[/* * Summary: interface for the XSLT functions not from XPath * Description: a set of extra functions coming from XSLT but not in XPath * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard and Bjorn Reese */ #ifndef __XML_XSLT_FUNCTIONS_H__ #define __XML_XSLT_FUNCTIONS_H__ #include #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /** * XSLT_REGISTER_FUNCTION_LOOKUP: * * Registering macro, not general purpose at all but used in different modules. */ #define XSLT_REGISTER_FUNCTION_LOOKUP(ctxt) \ xmlXPathRegisterFuncLookup((ctxt)->xpathCtxt, \ (xmlXPathFuncLookupFunc) xsltXPathFunctionLookup, \ (void *)(ctxt->xpathCtxt)); XSLTPUBFUN xmlXPathFunction XSLTCALL xsltXPathFunctionLookup (xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri); /* * Interfaces for the functions implementations. */ XSLTPUBFUN void XSLTCALL xsltDocumentFunction (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltKeyFunction (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltUnparsedEntityURIFunction (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltFormatNumberFunction (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltGenerateIdFunction (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltSystemPropertyFunction (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt, int nargs); XSLTPUBFUN void XSLTCALL xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt, int nargs); /* * And the registration */ XSLTPUBFUN void XSLTCALL xsltRegisterAllFunctions (xmlXPathContextPtr ctxt); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_FUNCTIONS_H__ */ PKZr/ libxslt/documents.hnu[/* * Summary: interface for the document handling * Description: implements document loading and cache (multiple * document() reference for the same resources must * be equal. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_DOCUMENTS_H__ #define __XML_XSLT_DOCUMENTS_H__ #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif XSLTPUBFUN xsltDocumentPtr XSLTCALL xsltNewDocument (xsltTransformContextPtr ctxt, xmlDocPtr doc); XSLTPUBFUN xsltDocumentPtr XSLTCALL xsltLoadDocument (xsltTransformContextPtr ctxt, const xmlChar *URI); XSLTPUBFUN xsltDocumentPtr XSLTCALL xsltFindDocument (xsltTransformContextPtr ctxt, xmlDocPtr doc); XSLTPUBFUN void XSLTCALL xsltFreeDocuments (xsltTransformContextPtr ctxt); XSLTPUBFUN xsltDocumentPtr XSLTCALL xsltLoadStyleDocument (xsltStylesheetPtr style, const xmlChar *URI); XSLTPUBFUN xsltDocumentPtr XSLTCALL xsltNewStyleDocument (xsltStylesheetPtr style, xmlDocPtr doc); XSLTPUBFUN void XSLTCALL xsltFreeStyleDocuments (xsltStylesheetPtr style); /* * Hooks for document loading */ /** * xsltLoadType: * * Enum defining the kind of loader requirement. */ typedef enum { XSLT_LOAD_START = 0, /* loading for a top stylesheet */ XSLT_LOAD_STYLESHEET = 1, /* loading for a stylesheet include/import */ XSLT_LOAD_DOCUMENT = 2 /* loading document at transformation time */ } xsltLoadType; /** * xsltDocLoaderFunc: * @URI: the URI of the document to load * @dict: the dictionary to use when parsing that document * @options: parsing options, a set of xmlParserOption * @ctxt: the context, either a stylesheet or a transformation context * @type: the xsltLoadType indicating the kind of loading required * * An xsltDocLoaderFunc is a signature for a function which can be * registered to load document not provided by the compilation or * transformation API themselve, for example when an xsl:import, * xsl:include is found at compilation time or when a document() * call is made at runtime. * * Returns the pointer to the document (which will be modified and * freed by the engine later), or NULL in case of error. */ typedef xmlDocPtr (*xsltDocLoaderFunc) (const xmlChar *URI, xmlDictPtr dict, int options, void *ctxt, xsltLoadType type); XSLTPUBFUN void XSLTCALL xsltSetLoaderFunc (xsltDocLoaderFunc f); /* the loader may be needed by extension libraries so it is exported */ XSLTPUBVAR xsltDocLoaderFunc xsltDocDefaultLoader; #ifdef __cplusplus } #endif #endif /* __XML_XSLT_DOCUMENTS_H__ */ PKZ>libxslt/attributes.hnu[/* * Summary: interface for the XSLT attribute handling * Description: this module handles the specificities of attribute * and attribute groups processing. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_ATTRIBUTES_H__ #define __XML_XSLT_ATTRIBUTES_H__ #include #include "xsltexports.h" #ifdef __cplusplus extern "C" { #endif XSLTPUBFUN void XSLTCALL xsltParseStylesheetAttributeSet (xsltStylesheetPtr style, xmlNodePtr cur); XSLTPUBFUN void XSLTCALL xsltFreeAttributeSetsHashes (xsltStylesheetPtr style); XSLTPUBFUN void XSLTCALL xsltApplyAttributeSet (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, const xmlChar *attributes); XSLTPUBFUN void XSLTCALL xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_ATTRIBUTES_H__ */ PKZ||libxslt/preproc.hnu[/* * Summary: precomputing stylesheets * Description: this is the compilation phase, where most of the * stylesheet is "compiled" into faster to use data. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_PRECOMP_H__ #define __XML_XSLT_PRECOMP_H__ #include #include "xsltexports.h" #include "xsltInternals.h" #ifdef __cplusplus extern "C" { #endif /* * Interfaces */ extern const xmlChar *xsltExtMarker; XSLTPUBFUN xsltElemPreCompPtr XSLTCALL xsltDocumentComp (xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function); XSLTPUBFUN void XSLTCALL xsltStylePreCompute (xsltStylesheetPtr style, xmlNodePtr inst); XSLTPUBFUN void XSLTCALL xsltFreeStylePreComps (xsltStylesheetPtr style); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_PRECOMP_H__ */ PKZ揁&libxslt/namespaces.hnu[/* * Summary: interface for the XSLT namespace handling * Description: set of function easing the processing and generation * of namespace nodes in XSLT. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_XSLT_NAMESPACES_H__ #define __XML_XSLT_NAMESPACES_H__ #include #include "xsltexports.h" #ifdef __cplusplus extern "C" { #endif /* * Used within nsAliases hashtable when the default namespace is required * but it's not been explicitly defined */ /** * UNDEFINED_DEFAULT_NS: * * Special value for undefined namespace, internal */ #define UNDEFINED_DEFAULT_NS (const xmlChar *) -1L XSLTPUBFUN void XSLTCALL xsltNamespaceAlias (xsltStylesheetPtr style, xmlNodePtr node); XSLTPUBFUN xmlNsPtr XSLTCALL xsltGetNamespace (xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns, xmlNodePtr out); XSLTPUBFUN xmlNsPtr XSLTCALL xsltGetPlainNamespace (xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns, xmlNodePtr out); XSLTPUBFUN xmlNsPtr XSLTCALL xsltGetSpecialNamespace (xsltTransformContextPtr ctxt, xmlNodePtr cur, const xmlChar *URI, const xmlChar *prefix, xmlNodePtr out); XSLTPUBFUN xmlNsPtr XSLTCALL xsltCopyNamespace (xsltTransformContextPtr ctxt, xmlNodePtr elem, xmlNsPtr ns); XSLTPUBFUN xmlNsPtr XSLTCALL xsltCopyNamespaceList (xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNsPtr cur); XSLTPUBFUN void XSLTCALL xsltFreeNamespaceAliasHashes (xsltStylesheetPtr style); #ifdef __cplusplus } #endif #endif /* __XML_XSLT_NAMESPACES_H__ */ PKZr_>> thread_db.hnu[/* thread_db.h -- interface to libthread_db.so library for debugging -lpthread Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _THREAD_DB_H #define _THREAD_DB_H 1 /* This is the debugger interface for the NPTL library. It is modelled closely after the interface with same names in Solaris with the goal to share the same code in the debugger. */ #include #include #include #include /* Error codes of the library. */ typedef enum { TD_OK, /* No error. */ TD_ERR, /* No further specified error. */ TD_NOTHR, /* No matching thread found. */ TD_NOSV, /* No matching synchronization handle found. */ TD_NOLWP, /* No matching light-weighted process found. */ TD_BADPH, /* Invalid process handle. */ TD_BADTH, /* Invalid thread handle. */ TD_BADSH, /* Invalid synchronization handle. */ TD_BADTA, /* Invalid thread agent. */ TD_BADKEY, /* Invalid key. */ TD_NOMSG, /* No event available. */ TD_NOFPREGS, /* No floating-point register content available. */ TD_NOLIBTHREAD, /* Application not linked with thread library. */ TD_NOEVENT, /* Requested event is not supported. */ TD_NOCAPAB, /* Capability not available. */ TD_DBERR, /* Internal debug library error. */ TD_NOAPLIC, /* Operation is not applicable. */ TD_NOTSD, /* No thread-specific data available. */ TD_MALLOC, /* Out of memory. */ TD_PARTIALREG, /* Not entire register set was read or written. */ TD_NOXREGS, /* X register set not available for given thread. */ TD_TLSDEFER, /* Thread has not yet allocated TLS for given module. */ TD_NOTALLOC = TD_TLSDEFER, TD_VERSION, /* Version if libpthread and libthread_db do not match. */ TD_NOTLS /* There is no TLS segment in the given module. */ } td_err_e; /* Possible thread states. TD_THR_ANY_STATE is a pseudo-state used to select threads regardless of state in td_ta_thr_iter(). */ typedef enum { TD_THR_ANY_STATE, TD_THR_UNKNOWN, TD_THR_STOPPED, TD_THR_RUN, TD_THR_ACTIVE, TD_THR_ZOMBIE, TD_THR_SLEEP, TD_THR_STOPPED_ASLEEP } td_thr_state_e; /* Thread type: user or system. TD_THR_ANY_TYPE is a pseudo-type used to select threads regardless of type in td_ta_thr_iter(). */ typedef enum { TD_THR_ANY_TYPE, TD_THR_USER, TD_THR_SYSTEM } td_thr_type_e; /* Types of the debugging library. */ /* Handle for a process. This type is opaque. */ typedef struct td_thragent td_thragent_t; /* The actual thread handle type. This is also opaque. */ typedef struct td_thrhandle { td_thragent_t *th_ta_p; psaddr_t th_unique; } td_thrhandle_t; /* Forward declaration of a type defined by and for the dynamic linker. */ struct link_map; /* Flags for `td_ta_thr_iter'. */ #define TD_THR_ANY_USER_FLAGS 0xffffffff #define TD_THR_LOWEST_PRIORITY -20 #define TD_SIGNO_MASK NULL #define TD_EVENTSIZE 2 #define BT_UISHIFT 5 /* log base 2 of BT_NBIPUI, to extract word index */ #define BT_NBIPUI (1 << BT_UISHIFT) /* n bits per unsigned int */ #define BT_UIMASK (BT_NBIPUI - 1) /* to extract bit index */ /* Bitmask of enabled events. */ typedef struct td_thr_events { uint32_t event_bits[TD_EVENTSIZE]; } td_thr_events_t; /* Event set manipulation macros. */ #define __td_eventmask(n) \ (UINT32_C (1) << (((n) - 1) & BT_UIMASK)) #define __td_eventword(n) \ ((UINT32_C ((n) - 1)) >> BT_UISHIFT) #define td_event_emptyset(setp) \ do { \ int __i; \ for (__i = TD_EVENTSIZE; __i > 0; --__i) \ (setp)->event_bits[__i - 1] = 0; \ } while (0) #define td_event_fillset(setp) \ do { \ int __i; \ for (__i = TD_EVENTSIZE; __i > 0; --__i) \ (setp)->event_bits[__i - 1] = UINT32_C (0xffffffff); \ } while (0) #define td_event_addset(setp, n) \ (((setp)->event_bits[__td_eventword (n)]) |= __td_eventmask (n)) #define td_event_delset(setp, n) \ (((setp)->event_bits[__td_eventword (n)]) &= ~__td_eventmask (n)) #define td_eventismember(setp, n) \ (__td_eventmask (n) & ((setp)->event_bits[__td_eventword (n)])) #if TD_EVENTSIZE == 2 # define td_eventisempty(setp) \ (!((setp)->event_bits[0]) && !((setp)->event_bits[1])) #else # error "td_eventisempty must be changed to match TD_EVENTSIZE" #endif /* Events reportable by the thread implementation. */ typedef enum { TD_ALL_EVENTS, /* Pseudo-event number. */ TD_EVENT_NONE = TD_ALL_EVENTS, /* Depends on context. */ TD_READY, /* Is executable now. */ TD_SLEEP, /* Blocked in a synchronization obj. */ TD_SWITCHTO, /* Now assigned to a process. */ TD_SWITCHFROM, /* Not anymore assigned to a process. */ TD_LOCK_TRY, /* Trying to get an unavailable lock. */ TD_CATCHSIG, /* Signal posted to the thread. */ TD_IDLE, /* Process getting idle. */ TD_CREATE, /* New thread created. */ TD_DEATH, /* Thread terminated. */ TD_PREEMPT, /* Preempted. */ TD_PRI_INHERIT, /* Inherited elevated priority. */ TD_REAP, /* Reaped. */ TD_CONCURRENCY, /* Number of processes changing. */ TD_TIMEOUT, /* Conditional variable wait timed out. */ TD_MIN_EVENT_NUM = TD_READY, TD_MAX_EVENT_NUM = TD_TIMEOUT, TD_EVENTS_ENABLE = 31 /* Event reporting enabled. */ } td_event_e; /* Values representing the different ways events are reported. */ typedef enum { NOTIFY_BPT, /* User must insert breakpoint at u.bptaddr. */ NOTIFY_AUTOBPT, /* Breakpoint at u.bptaddr is automatically inserted. */ NOTIFY_SYSCALL /* System call u.syscallno will be invoked. */ } td_notify_e; /* Description how event type is reported. */ typedef struct td_notify { td_notify_e type; /* Way the event is reported. */ union { psaddr_t bptaddr; /* Address of breakpoint. */ int syscallno; /* Number of system call used. */ } u; } td_notify_t; /* Structure used to report event. */ typedef struct td_event_msg { td_event_e event; /* Event type being reported. */ const td_thrhandle_t *th_p; /* Thread reporting the event. */ union { # if 0 td_synchandle_t *sh; /* Handle of synchronization object. */ #endif uintptr_t data; /* Event specific data. */ } msg; } td_event_msg_t; /* Structure containing event data available in each thread structure. */ typedef struct { td_thr_events_t eventmask; /* Mask of enabled events. */ td_event_e eventnum; /* Number of last event. */ void *eventdata; /* Data associated with event. */ } td_eventbuf_t; /* Gathered statistics about the process. */ typedef struct td_ta_stats { int nthreads; /* Total number of threads in use. */ int r_concurrency; /* Concurrency level requested by user. */ int nrunnable_num; /* Average runnable threads, numerator. */ int nrunnable_den; /* Average runnable threads, denominator. */ int a_concurrency_num; /* Achieved concurrency level, numerator. */ int a_concurrency_den; /* Achieved concurrency level, denominator. */ int nlwps_num; /* Average number of processes in use, numerator. */ int nlwps_den; /* Average number of processes in use, denominator. */ int nidle_num; /* Average number of idling processes, numerator. */ int nidle_den; /* Average number of idling processes, denominator. */ } td_ta_stats_t; /* Since Sun's library is based on Solaris threads we have to define a few types to map them to POSIX threads. */ typedef pthread_t thread_t; typedef pthread_key_t thread_key_t; /* Callback for iteration over threads. */ typedef int td_thr_iter_f (const td_thrhandle_t *, void *); /* Callback for iteration over thread local data. */ typedef int td_key_iter_f (thread_key_t, void (*) (void *), void *); /* Forward declaration. This has to be defined by the user. */ struct ps_prochandle; /* Information about the thread. */ typedef struct td_thrinfo { td_thragent_t *ti_ta_p; /* Process handle. */ unsigned int ti_user_flags; /* Unused. */ thread_t ti_tid; /* Thread ID returned by pthread_create(). */ char *ti_tls; /* Pointer to thread-local data. */ psaddr_t ti_startfunc; /* Start function passed to pthread_create(). */ psaddr_t ti_stkbase; /* Base of thread's stack. */ long int ti_stksize; /* Size of thread's stack. */ psaddr_t ti_ro_area; /* Unused. */ int ti_ro_size; /* Unused. */ td_thr_state_e ti_state; /* Thread state. */ unsigned char ti_db_suspended; /* Nonzero if suspended by debugger. */ td_thr_type_e ti_type; /* Type of the thread (system vs user thread). */ intptr_t ti_pc; /* Unused. */ intptr_t ti_sp; /* Unused. */ short int ti_flags; /* Unused. */ int ti_pri; /* Thread priority. */ lwpid_t ti_lid; /* Kernel PID for this thread. */ sigset_t ti_sigmask; /* Signal mask. */ unsigned char ti_traceme; /* Nonzero if event reporting enabled. */ unsigned char ti_preemptflag; /* Unused. */ unsigned char ti_pirecflag; /* Unused. */ sigset_t ti_pending; /* Set of pending signals. */ td_thr_events_t ti_events; /* Set of enabled events. */ } td_thrinfo_t; /* Prototypes for exported library functions. */ /* Initialize the thread debug support library. */ extern td_err_e td_init (void); /* Historical relict. Should not be used anymore. */ extern td_err_e td_log (void); /* Return list of symbols the library can request. */ extern const char **td_symbol_list (void); /* Generate new thread debug library handle for process PS. */ extern td_err_e td_ta_new (struct ps_prochandle *__ps, td_thragent_t **__ta); /* Free resources allocated for TA. */ extern td_err_e td_ta_delete (td_thragent_t *__ta); /* Get number of currently running threads in process associated with TA. */ extern td_err_e td_ta_get_nthreads (const td_thragent_t *__ta, int *__np); /* Return process handle passed in `td_ta_new' for process associated with TA. */ extern td_err_e td_ta_get_ph (const td_thragent_t *__ta, struct ps_prochandle **__ph); /* Map thread library handle PT to thread debug library handle for process associated with TA and store result in *TH. */ extern td_err_e td_ta_map_id2thr (const td_thragent_t *__ta, pthread_t __pt, td_thrhandle_t *__th); /* Map process ID LWPID to thread debug library handle for process associated with TA and store result in *TH. */ extern td_err_e td_ta_map_lwp2thr (const td_thragent_t *__ta, lwpid_t __lwpid, td_thrhandle_t *__th); /* Call for each thread in a process associated with TA the callback function CALLBACK. */ extern td_err_e td_ta_thr_iter (const td_thragent_t *__ta, td_thr_iter_f *__callback, void *__cbdata_p, td_thr_state_e __state, int __ti_pri, sigset_t *__ti_sigmask_p, unsigned int __ti_user_flags); /* Call for each defined thread local data entry the callback function KI. */ extern td_err_e td_ta_tsd_iter (const td_thragent_t *__ta, td_key_iter_f *__ki, void *__p); /* Get event address for EVENT. */ extern td_err_e td_ta_event_addr (const td_thragent_t *__ta, td_event_e __event, td_notify_t *__ptr); /* Enable EVENT in global mask. */ extern td_err_e td_ta_set_event (const td_thragent_t *__ta, td_thr_events_t *__event); /* Disable EVENT in global mask. */ extern td_err_e td_ta_clear_event (const td_thragent_t *__ta, td_thr_events_t *__event); /* Return information about last event. */ extern td_err_e td_ta_event_getmsg (const td_thragent_t *__ta, td_event_msg_t *__msg); /* Set suggested concurrency level for process associated with TA. */ extern td_err_e td_ta_setconcurrency (const td_thragent_t *__ta, int __level); /* Enable collecting statistics for process associated with TA. */ extern td_err_e td_ta_enable_stats (const td_thragent_t *__ta, int __enable); /* Reset statistics. */ extern td_err_e td_ta_reset_stats (const td_thragent_t *__ta); /* Retrieve statistics from process associated with TA. */ extern td_err_e td_ta_get_stats (const td_thragent_t *__ta, td_ta_stats_t *__statsp); /* Validate that TH is a thread handle. */ extern td_err_e td_thr_validate (const td_thrhandle_t *__th); /* Return information about thread TH. */ extern td_err_e td_thr_get_info (const td_thrhandle_t *__th, td_thrinfo_t *__infop); /* Retrieve floating-point register contents of process running thread TH. */ extern td_err_e td_thr_getfpregs (const td_thrhandle_t *__th, prfpregset_t *__regset); /* Retrieve general register contents of process running thread TH. */ extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th, prgregset_t __gregs); /* Retrieve extended register contents of process running thread TH. */ extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs); /* Get size of extended register set of process running thread TH. */ extern td_err_e td_thr_getxregsize (const td_thrhandle_t *__th, int *__sizep); /* Set floating-point register contents of process running thread TH. */ extern td_err_e td_thr_setfpregs (const td_thrhandle_t *__th, const prfpregset_t *__fpregs); /* Set general register contents of process running thread TH. */ extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th, prgregset_t __gregs); /* Set extended register contents of process running thread TH. */ extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th, const void *__addr); /* Get address of the given module's TLS storage area for the given thread. */ extern td_err_e td_thr_tlsbase (const td_thrhandle_t *__th, unsigned long int __modid, psaddr_t *__base); /* Get address of thread local variable. */ extern td_err_e td_thr_tls_get_addr (const td_thrhandle_t *__th, psaddr_t __map_address, size_t __offset, psaddr_t *__address); /* Enable reporting for EVENT for thread TH. */ extern td_err_e td_thr_event_enable (const td_thrhandle_t *__th, int __event); /* Enable EVENT for thread TH. */ extern td_err_e td_thr_set_event (const td_thrhandle_t *__th, td_thr_events_t *__event); /* Disable EVENT for thread TH. */ extern td_err_e td_thr_clear_event (const td_thrhandle_t *__th, td_thr_events_t *__event); /* Get event message for thread TH. */ extern td_err_e td_thr_event_getmsg (const td_thrhandle_t *__th, td_event_msg_t *__msg); /* Set priority of thread TH. */ extern td_err_e td_thr_setprio (const td_thrhandle_t *__th, int __prio); /* Set pending signals for thread TH. */ extern td_err_e td_thr_setsigpending (const td_thrhandle_t *__th, unsigned char __n, const sigset_t *__ss); /* Set signal mask for thread TH. */ extern td_err_e td_thr_sigsetmask (const td_thrhandle_t *__th, const sigset_t *__ss); /* Return thread local data associated with key TK in thread TH. */ extern td_err_e td_thr_tsd (const td_thrhandle_t *__th, const thread_key_t __tk, void **__data); /* Suspend execution of thread TH. */ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th); /* Resume execution of thread TH. */ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th); #endif /* thread_db.h */ PKZ1[pR R gdcache.hnu[#ifdef __cplusplus extern "C" { #endif /* * gdcache.h * * Caches of pointers to user structs in which the least-recently-used * element is replaced in the event of a cache miss after the cache has * reached a given size. * * John Ellson (ellson@graphviz.org) Oct 31, 1997 * * Test this with: * gcc -o gdcache -g -Wall -DTEST gdcache.c * * The cache is implemented by a singly-linked list of elements * each containing a pointer to a user struct that is being managed by * the cache. * * The head structure has a pointer to the most-recently-used * element, and elements are moved to this position in the list each * time they are used. The head also contains pointers to three * user defined functions: * - a function to test if a cached userdata matches some keydata * - a function to provide a new userdata struct to the cache * if there has been a cache miss. * - a function to release a userdata struct when it is * no longer being managed by the cache * * In the event of a cache miss the cache is allowed to grow up to * a specified maximum size. After the maximum size is reached then * the least-recently-used element is discarded to make room for the * new. The most-recently-returned value is always left at the * beginning of the list after retrieval. * * In the current implementation the cache is traversed by a linear * search from most-recent to least-recent. This linear search * probably limits the usefulness of this implementation to cache * sizes of a few tens of elements. */ /*********************************************************/ /* header */ /*********************************************************/ #include #ifndef NULL # define NULL (void *)0 #endif /* user defined function templates */ typedef int (*gdCacheTestFn_t)(void *userdata, void *keydata); typedef void *(*gdCacheFetchFn_t)(char **error, void *keydata); typedef void (*gdCacheReleaseFn_t)(void *userdata); /* element structure */ typedef struct gdCache_element_s gdCache_element_t; struct gdCache_element_s { gdCache_element_t *next; void *userdata; }; /* head structure */ typedef struct gdCache_head_s gdCache_head_t; struct gdCache_head_s { gdCache_element_t *mru; int size; char *error; gdCacheTestFn_t gdCacheTest; gdCacheFetchFn_t gdCacheFetch; gdCacheReleaseFn_t gdCacheRelease; }; /* function templates */ gdCache_head_t *gdCacheCreate(int size, gdCacheTestFn_t gdCacheTest, gdCacheFetchFn_t gdCacheFetch, gdCacheReleaseFn_t gdCacheRelease ); void gdCacheDelete(gdCache_head_t *head); void *gdCacheGet(gdCache_head_t *head, void *keydata); #ifdef __cplusplus } #endif PKZ*expat_external.hnu[/* __ __ _ ___\ \/ /_ __ __ _| |_ / _ \\ /| '_ \ / _` | __| | __// \| |_) | (_| | |_ \___/_/\_\ .__/ \__,_|\__| |_| XML parser Copyright (c) 1997-2000 Thai Open Source Software Center Ltd Copyright (c) 2000-2017 Expat development team Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef Expat_External_INCLUDED #define Expat_External_INCLUDED 1 /* External API definitions */ #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) # define XML_USE_MSC_EXTENSIONS 1 #endif /* Expat tries very hard to make the API boundary very specifically defined. There are two macros defined to control this boundary; each of these can be defined before including this header to achieve some different behavior, but doing so it not recommended or tested frequently. XMLCALL - The calling convention to use for all calls across the "library boundary." This will default to cdecl, and try really hard to tell the compiler that's what we want. XMLIMPORT - Whatever magic is needed to note that a function is to be imported from a dynamically loaded library (.dll, .so, or .sl, depending on your platform). The XMLCALL macro was added in Expat 1.95.7. The only one which is expected to be directly useful in client code is XMLCALL. Note that on at least some Unix versions, the Expat library must be compiled with the cdecl calling convention as the default since system headers may assume the cdecl convention. */ #ifndef XMLCALL # if defined(_MSC_VER) # define XMLCALL __cdecl # elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) # define XMLCALL __attribute__((cdecl)) # else /* For any platform which uses this definition and supports more than one calling convention, we need to extend this definition to declare the convention used on that platform, if it's possible to do so. If this is the case for your platform, please file a bug report with information on how to identify your platform via the C pre-processor and how to specify the same calling convention as the platform's malloc() implementation. */ # define XMLCALL # endif #endif /* not defined XMLCALL */ #if !defined(XML_STATIC) && !defined(XMLIMPORT) # ifndef XML_BUILDING_EXPAT /* using Expat from an application */ # ifdef XML_USE_MSC_EXTENSIONS # define XMLIMPORT __declspec(dllimport) # endif # endif #endif /* not defined XML_STATIC */ #if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4) # define XMLIMPORT __attribute__ ((visibility ("default"))) #endif /* If we didn't define it above, define it away: */ #ifndef XMLIMPORT # define XMLIMPORT #endif #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) # define XML_ATTR_MALLOC __attribute__((__malloc__)) #else # define XML_ATTR_MALLOC #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) # define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) #else # define XML_ATTR_ALLOC_SIZE(x) #endif #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL #ifdef __cplusplus extern "C" { #endif #ifdef XML_UNICODE_WCHAR_T # ifndef XML_UNICODE # define XML_UNICODE # endif # if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) # error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" # endif #endif #ifdef XML_UNICODE /* Information is UTF-16 encoded. */ # ifdef XML_UNICODE_WCHAR_T typedef wchar_t XML_Char; typedef wchar_t XML_LChar; # else typedef unsigned short XML_Char; typedef char XML_LChar; # endif /* XML_UNICODE_WCHAR_T */ #else /* Information is UTF-8 encoded. */ typedef char XML_Char; typedef char XML_LChar; #endif /* XML_UNICODE */ #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ # if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 typedef __int64 XML_Index; typedef unsigned __int64 XML_Size; # else typedef long long XML_Index; typedef unsigned long long XML_Size; # endif #else typedef long XML_Index; typedef unsigned long XML_Size; #endif /* XML_LARGE_SIZE */ #ifdef __cplusplus } #endif #endif /* not Expat_External_INCLUDED */ PKZ:h xen/evtchn.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */ /****************************************************************************** * evtchn.h * * Interface to /dev/xen/evtchn. * * Copyright (c) 2003-2005, K A Fraser * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation; or, when distributed * separately from the Linux kernel or incorporated into other * software packages, subject to the following license: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this source file (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef __LINUX_PUBLIC_EVTCHN_H__ #define __LINUX_PUBLIC_EVTCHN_H__ /* * Bind a fresh port to VIRQ @virq. * Return allocated port. */ #define IOCTL_EVTCHN_BIND_VIRQ \ _IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq)) struct ioctl_evtchn_bind_virq { unsigned int virq; }; /* * Bind a fresh port to remote <@remote_domain, @remote_port>. * Return allocated port. */ #define IOCTL_EVTCHN_BIND_INTERDOMAIN \ _IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain)) struct ioctl_evtchn_bind_interdomain { unsigned int remote_domain, remote_port; }; /* * Allocate a fresh port for binding to @remote_domain. * Return allocated port. */ #define IOCTL_EVTCHN_BIND_UNBOUND_PORT \ _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port)) struct ioctl_evtchn_bind_unbound_port { unsigned int remote_domain; }; /* * Unbind previously allocated @port. */ #define IOCTL_EVTCHN_UNBIND \ _IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind)) struct ioctl_evtchn_unbind { unsigned int port; }; /* * Unbind previously allocated @port. */ #define IOCTL_EVTCHN_NOTIFY \ _IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify)) struct ioctl_evtchn_notify { unsigned int port; }; /* Clear and reinitialise the event buffer. Clear error condition. */ #define IOCTL_EVTCHN_RESET \ _IOC(_IOC_NONE, 'E', 5, 0) /* * Restrict this file descriptor so that it can only be used to bind * new interdomain events from one domain. * * Once a file descriptor has been restricted it cannot be * de-restricted, and must be closed and re-opened. Event channels * which were bound before restricting remain bound afterwards, and * can be notified as usual. */ #define IOCTL_EVTCHN_RESTRICT_DOMID \ _IOC(_IOC_NONE, 'E', 6, sizeof(struct ioctl_evtchn_restrict_domid)) struct ioctl_evtchn_restrict_domid { domid_t domid; }; #endif /* __LINUX_PUBLIC_EVTCHN_H__ */ PKZ nn xen/privcmd.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */ /****************************************************************************** * privcmd.h * * Interface to /proc/xen/privcmd. * * Copyright (c) 2003-2005, K A Fraser * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation; or, when distributed * separately from the Linux kernel or incorporated into other * software packages, subject to the following license: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this source file (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef __LINUX_PUBLIC_PRIVCMD_H__ #define __LINUX_PUBLIC_PRIVCMD_H__ #include #include struct privcmd_hypercall { __u64 op; __u64 arg[5]; }; struct privcmd_mmap_entry { __u64 va; /* * This should be a GFN. It's not possible to change the name because * it's exposed to the user-space. */ __u64 mfn; __u64 npages; }; struct privcmd_mmap { int num; domid_t dom; /* target domain */ struct privcmd_mmap_entry *entry; }; struct privcmd_mmapbatch { int num; /* number of pages to populate */ domid_t dom; /* target domain */ __u64 addr; /* virtual address */ xen_pfn_t *arr; /* array of mfns - or'd with PRIVCMD_MMAPBATCH_*_ERROR on err */ }; #define PRIVCMD_MMAPBATCH_MFN_ERROR 0xf0000000U #define PRIVCMD_MMAPBATCH_PAGED_ERROR 0x80000000U struct privcmd_mmapbatch_v2 { unsigned int num; /* number of pages to populate */ domid_t dom; /* target domain */ __u64 addr; /* virtual address */ const xen_pfn_t *arr; /* array of mfns */ int *err; /* array of error codes */ }; struct privcmd_dm_op_buf { void *uptr; size_t size; }; struct privcmd_dm_op { domid_t dom; __u16 num; const struct privcmd_dm_op_buf *ubufs; }; struct privcmd_mmap_resource { domid_t dom; __u32 type; __u32 id; __u32 idx; __u64 num; __u64 addr; }; /* * @cmd: IOCTL_PRIVCMD_HYPERCALL * @arg: &privcmd_hypercall_t * Return: Value returned from execution of the specified hypercall. * * @cmd: IOCTL_PRIVCMD_MMAPBATCH_V2 * @arg: &struct privcmd_mmapbatch_v2 * Return: 0 on success (i.e., arg->err contains valid error codes for * each frame). On an error other than a failed frame remap, -1 is * returned and errno is set to EINVAL, EFAULT etc. As an exception, * if the operation was otherwise successful but any frame failed with * -ENOENT, then -1 is returned and errno is set to ENOENT. */ #define IOCTL_PRIVCMD_HYPERCALL \ _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall)) #define IOCTL_PRIVCMD_MMAP \ _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap)) #define IOCTL_PRIVCMD_MMAPBATCH \ _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch)) #define IOCTL_PRIVCMD_MMAPBATCH_V2 \ _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2)) #define IOCTL_PRIVCMD_DM_OP \ _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op)) #define IOCTL_PRIVCMD_RESTRICT \ _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t)) #define IOCTL_PRIVCMD_MMAP_RESOURCE \ _IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource)) #endif /* __LINUX_PUBLIC_PRIVCMD_H__ */ PKZR; ; xen/gntalloc.hnu[/****************************************************************************** * gntalloc.h * * Interface to /dev/xen/gntalloc. * * Author: Daniel De Graaf * * This file is in the public domain. */ #ifndef __LINUX_PUBLIC_GNTALLOC_H__ #define __LINUX_PUBLIC_GNTALLOC_H__ #include /* * Allocates a new page and creates a new grant reference. */ #define IOCTL_GNTALLOC_ALLOC_GREF \ _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref)) struct ioctl_gntalloc_alloc_gref { /* IN parameters */ /* The ID of the domain to be given access to the grants. */ __u16 domid; /* Flags for this mapping */ __u16 flags; /* Number of pages to map */ __u32 count; /* OUT parameters */ /* The offset to be used on a subsequent call to mmap(). */ __u64 index; /* The grant references of the newly created grant, one per page */ /* Variable size, depending on count */ __u32 gref_ids[1]; }; #define GNTALLOC_FLAG_WRITABLE 1 /* * Deallocates the grant reference, allowing the associated page to be freed if * no other domains are using it. */ #define IOCTL_GNTALLOC_DEALLOC_GREF \ _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref)) struct ioctl_gntalloc_dealloc_gref { /* IN parameters */ /* The offset returned in the map operation */ __u64 index; /* Number of references to unmap */ __u32 count; }; /* * Sets up an unmap notification within the page, so that the other side can do * cleanup if this side crashes. Required to implement cross-domain robust * mutexes or close notification on communication channels. * * Each mapped page only supports one notification; multiple calls referring to * the same page overwrite the previous notification. You must clear the * notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it * to occur. */ #define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \ _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify)) struct ioctl_gntalloc_unmap_notify { /* IN parameters */ /* Offset in the file descriptor for a byte within the page (same as * used in mmap). If using UNMAP_NOTIFY_CLEAR_BYTE, this is the byte to * be cleared. Otherwise, it can be any byte in the page whose * notification we are adjusting. */ __u64 index; /* Action(s) to take on unmap */ __u32 action; /* Event channel to notify */ __u32 event_channel_port; }; /* Clear (set to zero) the byte specified by index */ #define UNMAP_NOTIFY_CLEAR_BYTE 0x1 /* Send an interrupt on the indicated event channel */ #define UNMAP_NOTIFY_SEND_EVENT 0x2 #endif /* __LINUX_PUBLIC_GNTALLOC_H__ */ PKZS,& xen/gntdev.hnu[/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */ /****************************************************************************** * gntdev.h * * Interface to /dev/xen/gntdev. * * Copyright (c) 2007, D G Murray * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation; or, when distributed * separately from the Linux kernel or incorporated into other * software packages, subject to the following license: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this source file (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef __LINUX_PUBLIC_GNTDEV_H__ #define __LINUX_PUBLIC_GNTDEV_H__ #include struct ioctl_gntdev_grant_ref { /* The domain ID of the grant to be mapped. */ __u32 domid; /* The grant reference of the grant to be mapped. */ __u32 ref; }; /* * Inserts the grant references into the mapping table of an instance * of gntdev. N.B. This does not perform the mapping, which is deferred * until mmap() is called with @index as the offset. */ #define IOCTL_GNTDEV_MAP_GRANT_REF \ _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref)) struct ioctl_gntdev_map_grant_ref { /* IN parameters */ /* The number of grants to be mapped. */ __u32 count; __u32 pad; /* OUT parameters */ /* The offset to be used on a subsequent call to mmap(). */ __u64 index; /* Variable IN parameter. */ /* Array of grant references, of size @count. */ struct ioctl_gntdev_grant_ref refs[1]; }; /* * Removes the grant references from the mapping table of an instance of * of gntdev. N.B. munmap() must be called on the relevant virtual address(es) * before this ioctl is called, or an error will result. */ #define IOCTL_GNTDEV_UNMAP_GRANT_REF \ _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref)) struct ioctl_gntdev_unmap_grant_ref { /* IN parameters */ /* The offset was returned by the corresponding map operation. */ __u64 index; /* The number of pages to be unmapped. */ __u32 count; __u32 pad; }; /* * Returns the offset in the driver's address space that corresponds * to @vaddr. This can be used to perform a munmap(), followed by an * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by * the caller. The number of pages that were allocated at the same time as * @vaddr is returned in @count. * * N.B. Where more than one page has been mapped into a contiguous range, the * supplied @vaddr must correspond to the start of the range; otherwise * an error will result. It is only possible to munmap() the entire * contiguously-allocated range at once, and not any subrange thereof. */ #define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \ _IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr)) struct ioctl_gntdev_get_offset_for_vaddr { /* IN parameters */ /* The virtual address of the first mapped page in a range. */ __u64 vaddr; /* OUT parameters */ /* The offset that was used in the initial mmap() operation. */ __u64 offset; /* The number of pages mapped in the VM area that begins at @vaddr. */ __u32 count; __u32 pad; }; /* * Sets the maximum number of grants that may mapped at once by this gntdev * instance. * * N.B. This must be called before any other ioctl is performed on the device. */ #define IOCTL_GNTDEV_SET_MAX_GRANTS \ _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants)) struct ioctl_gntdev_set_max_grants { /* IN parameter */ /* The maximum number of grants that may be mapped at once. */ __u32 count; }; /* * Sets up an unmap notification within the page, so that the other side can do * cleanup if this side crashes. Required to implement cross-domain robust * mutexes or close notification on communication channels. * * Each mapped page only supports one notification; multiple calls referring to * the same page overwrite the previous notification. You must clear the * notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it * to occur. */ #define IOCTL_GNTDEV_SET_UNMAP_NOTIFY \ _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify)) struct ioctl_gntdev_unmap_notify { /* IN parameters */ /* Offset in the file descriptor for a byte within the page (same as * used in mmap). If using UNMAP_NOTIFY_CLEAR_BYTE, this is the byte to * be cleared. Otherwise, it can be any byte in the page whose * notification we are adjusting. */ __u64 index; /* Action(s) to take on unmap */ __u32 action; /* Event channel to notify */ __u32 event_channel_port; }; struct gntdev_grant_copy_segment { union { void *virt; struct { grant_ref_t ref; __u16 offset; domid_t domid; } foreign; } source, dest; __u16 len; __u16 flags; /* GNTCOPY_* */ __s16 status; /* GNTST_* */ }; /* * Copy between grant references and local buffers. * * The copy is split into @count @segments, each of which can copy * to/from one grant reference. * * Each segment is similar to struct gnttab_copy in the hypervisor ABI * except the local buffer is specified using a virtual address * (instead of a GFN and offset). * * The local buffer may cross a Xen page boundary -- the driver will * split segments into multiple ops if required. * * Returns 0 if all segments have been processed and @status in each * segment is valid. Note that one or more segments may have failed * (status != GNTST_okay). * * If the driver had to split a segment into two or more ops, @status * includes the status of the first failed op for that segment (or * GNTST_okay if all ops were successful). * * If -1 is returned, the status of all segments is undefined. * * EINVAL: A segment has local buffers for both source and * destination. * EINVAL: A segment crosses the boundary of a foreign page. * EFAULT: A segment's local buffer is not accessible. */ #define IOCTL_GNTDEV_GRANT_COPY \ _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy)) struct ioctl_gntdev_grant_copy { unsigned int count; struct gntdev_grant_copy_segment *segments; }; /* Clear (set to zero) the byte specified by index */ #define UNMAP_NOTIFY_CLEAR_BYTE 0x1 /* Send an interrupt on the indicated event channel */ #define UNMAP_NOTIFY_SEND_EVENT 0x2 #endif /* __LINUX_PUBLIC_GNTDEV_H__ */ PKZ_i(i(gdbm.hnu[/* gdbm.h - The include file for dbm users. -*- c -*- */ /* This file is part of GDBM, the GNU data base manager, by Philip A. Nelson. Copyright (C) 1990-1991, 1993, 2011, 2016-2018 Free Software Foundation, Inc. GDBM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GDBM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GDBM. If not, see . You may contact the author by: e-mail: phil@cs.wwu.edu us-mail: Philip A. Nelson Computer Science Department Western Washington University Bellingham, WA 98226 *************************************************************************/ /* Protection for multiple includes. */ #ifndef _GDBM_H_ # define _GDBM_H_ # include /* GDBM C++ support */ # if defined(__cplusplus) || defined(c_plusplus) extern "C" { # endif /* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who can create the database. */ # define GDBM_READER 0 /* A reader. */ # define GDBM_WRITER 1 /* A writer. */ # define GDBM_WRCREAT 2 /* A writer. Create the db if needed. */ # define GDBM_NEWDB 3 /* A writer. Always create a new db. */ # define GDBM_OPENMASK 7 /* Mask for the above. */ # define GDBM_FAST 0x010 /* Write fast! => No fsyncs. OBSOLETE. */ # define GDBM_SYNC 0x020 /* Sync operations to the disk. */ # define GDBM_NOLOCK 0x040 /* Don't do file locking operations. */ # define GDBM_NOMMAP 0x080 /* Don't use mmap(). */ # define GDBM_CLOEXEC 0x100 /* Close the underlying fd on exec(3) */ # define GDBM_BSEXACT 0x200 /* Don't adjust block_size. Bail out with GDBM_BLOCK_SIZE_ERROR error if unable to set it. */ # define GDBM_CLOERROR 0x400 /* Only for gdbm_fd_open: close fd on error. */ /* Parameters to gdbm_store for simple insertion or replacement in the case that the key is already in the database. */ # define GDBM_INSERT 0 /* Never replace old data with new. */ # define GDBM_REPLACE 1 /* Always replace old data with new. */ /* Parameters to gdbm_setopt, specifing the type of operation to perform. */ # define GDBM_SETCACHESIZE 1 /* Set the cache size. */ # define GDBM_FASTMODE 2 /* Toggle fast mode. OBSOLETE. */ # define GDBM_SETSYNCMODE 3 /* Turn on or off sync operations. */ # define GDBM_SETCENTFREE 4 /* Keep all free blocks in the header. */ # define GDBM_SETCOALESCEBLKS 5 /* Attempt to coalesce free blocks. */ # define GDBM_SETMAXMAPSIZE 6 /* Set maximum mapped memory size */ # define GDBM_SETMMAP 7 /* Toggle mmap mode */ /* Compatibility defines: */ # define GDBM_CACHESIZE GDBM_SETCACHESIZE # define GDBM_SYNCMODE GDBM_SETSYNCMODE # define GDBM_CENTFREE GDBM_SETCENTFREE # define GDBM_COALESCEBLKS GDBM_SETCOALESCEBLKS # define GDBM_GETFLAGS 8 /* Get gdbm_open flags */ # define GDBM_GETMMAP 9 /* Get mmap status */ # define GDBM_GETCACHESIZE 10 /* Get current cache side */ # define GDBM_GETSYNCMODE 11 /* Get synch mode */ # define GDBM_GETCENTFREE 12 /* Get "centfree" status */ # define GDBM_GETCOALESCEBLKS 13 /* Get free block coalesce status */ # define GDBM_GETMAXMAPSIZE 14 /* Get maximum mapped memory size */ # define GDBM_GETDBNAME 15 /* Return database file name */ # define GDBM_GETBLOCKSIZE 16 /* Return block size */ typedef unsigned long long int gdbm_count_t; /* The data and key structure. */ typedef struct { char *dptr; int dsize; } datum; /* A pointer to the GDBM file. */ typedef struct gdbm_file_info *GDBM_FILE; /* External variable, the gdbm build release string. */ extern const char *gdbm_version; # define GDBM_VERSION_MAJOR 1 # define GDBM_VERSION_MINOR 18 # define GDBM_VERSION_PATCH 0 extern int const gdbm_version_number[3]; /* GDBM external functions. */ extern GDBM_FILE gdbm_fd_open (int fd, const char *file_name, int block_size, int flags, void (*fatal_func) (const char *)); extern GDBM_FILE gdbm_open (const char *, int, int, int, void (*)(const char *)); extern int gdbm_close (GDBM_FILE); extern int gdbm_store (GDBM_FILE, datum, datum, int); extern datum gdbm_fetch (GDBM_FILE, datum); extern int gdbm_delete (GDBM_FILE, datum); extern datum gdbm_firstkey (GDBM_FILE); extern datum gdbm_nextkey (GDBM_FILE, datum); extern int gdbm_reorganize (GDBM_FILE); extern int gdbm_sync (GDBM_FILE); extern int gdbm_exists (GDBM_FILE, datum); extern int gdbm_setopt (GDBM_FILE, int, void *, int); extern int gdbm_fdesc (GDBM_FILE); extern int gdbm_export (GDBM_FILE, const char *, int, int); extern int gdbm_export_to_file (GDBM_FILE dbf, FILE *fp); extern int gdbm_import (GDBM_FILE, const char *, int); extern int gdbm_import_from_file (GDBM_FILE dbf, FILE *fp, int flag); extern int gdbm_count (GDBM_FILE dbf, gdbm_count_t *pcount); typedef struct gdbm_recovery_s { /* Input members. These are initialized before call to gdbm_recover. The flags argument specifies which of them are initialized. */ void (*errfun) (void *data, char const *fmt, ...); void *data; size_t max_failed_keys; size_t max_failed_buckets; size_t max_failures; /* Output members. The gdbm_recover function fills these before returning. */ size_t recovered_keys; size_t recovered_buckets; size_t failed_keys; size_t failed_buckets; size_t duplicate_keys; char *backup_name; } gdbm_recovery; #define GDBM_RCVR_DEFAULT 0x00 /* Default settings */ #define GDBM_RCVR_ERRFUN 0x01 /* errfun is initialized */ #define GDBM_RCVR_MAX_FAILED_KEYS 0x02 /* max_failed_keys is initialized */ #define GDBM_RCVR_MAX_FAILED_BUCKETS 0x04 /* max_failed_buckets is initialized */ #define GDBM_RCVR_MAX_FAILURES 0x08 /* max_failures is initialized */ #define GDBM_RCVR_BACKUP 0x10 /* Keep backup copy of the original database on success */ #define GDBM_RCVR_FORCE 0x20 /* Force recovery by skipping the check pass */ extern int gdbm_recover (GDBM_FILE dbf, gdbm_recovery *rcvr, int flags); #define GDBM_DUMP_FMT_BINARY 0 #define GDBM_DUMP_FMT_ASCII 1 #define GDBM_META_MASK_MODE 0x01 #define GDBM_META_MASK_OWNER 0x02 extern int gdbm_dump (GDBM_FILE, const char *, int fmt, int open_flags, int mode); extern int gdbm_dump_to_file (GDBM_FILE, FILE *, int fmt); extern int gdbm_load (GDBM_FILE *, const char *, int replace, int meta_flags, unsigned long *line); extern int gdbm_load_from_file (GDBM_FILE *, FILE *, int replace, int meta_flags, unsigned long *line); extern int gdbm_copy_meta (GDBM_FILE dst, GDBM_FILE src); # define GDBM_NO_ERROR 0 # define GDBM_MALLOC_ERROR 1 # define GDBM_BLOCK_SIZE_ERROR 2 # define GDBM_FILE_OPEN_ERROR 3 # define GDBM_FILE_WRITE_ERROR 4 # define GDBM_FILE_SEEK_ERROR 5 # define GDBM_FILE_READ_ERROR 6 # define GDBM_BAD_MAGIC_NUMBER 7 # define GDBM_EMPTY_DATABASE 8 # define GDBM_CANT_BE_READER 9 # define GDBM_CANT_BE_WRITER 10 # define GDBM_READER_CANT_DELETE 11 # define GDBM_READER_CANT_STORE 12 # define GDBM_READER_CANT_REORGANIZE 13 # define GDBM_UNKNOWN_ERROR 14 # define GDBM_ITEM_NOT_FOUND 15 # define GDBM_REORGANIZE_FAILED 16 # define GDBM_CANNOT_REPLACE 17 # define GDBM_ILLEGAL_DATA 18 # define GDBM_OPT_ALREADY_SET 19 # define GDBM_OPT_ILLEGAL 20 # define GDBM_BYTE_SWAPPED 21 # define GDBM_BAD_FILE_OFFSET 22 # define GDBM_BAD_OPEN_FLAGS 23 # define GDBM_FILE_STAT_ERROR 24 # define GDBM_FILE_EOF 25 # define GDBM_NO_DBNAME 26 # define GDBM_ERR_FILE_OWNER 27 # define GDBM_ERR_FILE_MODE 28 # define GDBM_NEED_RECOVERY 29 # define GDBM_BACKUP_FAILED 30 # define GDBM_DIR_OVERFLOW 31 # define GDBM_BAD_BUCKET 32 # define GDBM_BAD_HEADER 33 # define GDBM_BAD_AVAIL 34 # define GDBM_BAD_HASH_TABLE 35 # define GDBM_BAD_DIR_ENTRY 36 # define GDBM_FILE_CLOSE_ERROR 37 # define GDBM_FILE_SYNC_ERROR 38 # define GDBM_FILE_TRUNCATE_ERROR 39 # define _GDBM_MIN_ERRNO 0 # define _GDBM_MAX_ERRNO GDBM_FILE_TRUNCATE_ERROR /* This one was never used and will be removed in the future */ # define GDBM_UNKNOWN_UPDATE GDBM_UNKNOWN_ERROR typedef int gdbm_error; extern int *gdbm_errno_location (void); #define gdbm_errno (*gdbm_errno_location ()) extern const char * const gdbm_errlist[]; extern int const gdbm_syserr[]; extern gdbm_error gdbm_last_errno (GDBM_FILE dbf); extern int gdbm_last_syserr (GDBM_FILE dbf); extern void gdbm_set_errno (GDBM_FILE dbf, gdbm_error ec, int fatal); extern void gdbm_clear_error (GDBM_FILE dbf); extern int gdbm_needs_recovery (GDBM_FILE dbf); extern int gdbm_check_syserr (gdbm_error n); /* extra prototypes */ extern const char *gdbm_strerror (gdbm_error); extern const char *gdbm_db_strerror (GDBM_FILE dbf); extern int gdbm_version_cmp (int const a[], int const b[]); #if 0 # define GDBM_DEBUG_ENABLE 1 typedef void (*gdbm_debug_printer_t) (char const *, ...); extern gdbm_debug_printer_t gdbm_debug_printer; extern int gdbm_debug_flags; # define GDBM_DEBUG_ERR 0x00000001 # define GDBM_DEBUG_OPEN 0x00000002 # define GDBM_DEBUG_READ 0x00000004 # define GDBM_DEBUG_STORE 0x00000008 # define GDBM_DEBUG_LOOKUP 0x00000010 # define GDBM_DEBUG_ALL 0xffffffff extern int gdbm_debug_token (char const *tok); extern void gdbm_debug_parse_state (int (*f) (void *, int, char const *), void *d); extern void gdbm_debug_datum (datum dat, char const *pfx); #endif # if defined(__cplusplus) || defined(c_plusplus) } # endif #endif PKZaڷFFmath.hnu[/* Declarations for math functions. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.12 Mathematics */ #ifndef _MATH_H #define _MATH_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include #if defined log && defined __GNUC__ # warning A macro called log was already defined when was included. # warning This will cause compilation problems. #endif __BEGIN_DECLS /* Get definitions of __intmax_t and __uintmax_t. */ #include /* Get machine-dependent vector math functions declarations. */ #include /* Gather machine dependent type support. */ #include /* Value returned on overflow. With IEEE 754 floating point, this is +Infinity, otherwise the largest representable positive value. */ #if __GNUC_PREREQ (3, 3) # define HUGE_VAL (__builtin_huge_val ()) #else /* This may provoke compiler warnings, and may not be rounded to +Infinity in all IEEE 754 rounding modes, but is the best that can be done in ISO C while remaining a constant expression. 10,000 is greater than the maximum (decimal) exponent for all supported floating-point formats and widths. */ # define HUGE_VAL 1e10000 #endif #ifdef __USE_ISOC99 # if __GNUC_PREREQ (3, 3) # define HUGE_VALF (__builtin_huge_valf ()) # define HUGE_VALL (__builtin_huge_vall ()) # else # define HUGE_VALF 1e10000f # define HUGE_VALL 1e10000L # endif #endif #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F16 (__builtin_huge_valf16 ()) #endif #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F32 (__builtin_huge_valf32 ()) #endif #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F64 (__builtin_huge_valf64 ()) #endif #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F128 (__builtin_huge_valf128 ()) #endif #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F32X (__builtin_huge_valf32x ()) #endif #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F64X (__builtin_huge_valf64x ()) #endif #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define HUGE_VAL_F128X (__builtin_huge_valf128x ()) #endif #ifdef __USE_ISOC99 /* IEEE positive infinity. */ # if __GNUC_PREREQ (3, 3) # define INFINITY (__builtin_inff ()) # else # define INFINITY HUGE_VALF # endif /* IEEE Not A Number. */ # if __GNUC_PREREQ (3, 3) # define NAN (__builtin_nanf ("")) # else /* This will raise an "invalid" exception outside static initializers, but is the best that can be done in ISO C while remaining a constant expression. */ # define NAN (0.0f / 0.0f) # endif #endif /* __USE_ISOC99 */ #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Signaling NaN macros, if supported. */ # if __GNUC_PREREQ (3, 3) # define SNANF (__builtin_nansf ("")) # define SNAN (__builtin_nans ("")) # define SNANL (__builtin_nansl ("")) # endif #endif #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF16 (__builtin_nansf16 ("")) #endif #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF32 (__builtin_nansf32 ("")) #endif #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF64 (__builtin_nansf64 ("")) #endif #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF128 (__builtin_nansf128 ("")) #endif #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF32X (__builtin_nansf32x ("")) #endif #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF64X (__builtin_nansf64x ("")) #endif #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define SNANF128X (__builtin_nansf128x ("")) #endif /* Get __GLIBC_FLT_EVAL_METHOD. */ #include #ifdef __USE_ISOC99 /* Define the following typedefs. float_t floating-point type at least as wide as `float' used to evaluate `float' expressions double_t floating-point type at least as wide as `double' used to evaluate `double' expressions */ # if __GLIBC_FLT_EVAL_METHOD == 0 || __GLIBC_FLT_EVAL_METHOD == 16 typedef float float_t; typedef double double_t; # elif __GLIBC_FLT_EVAL_METHOD == 1 typedef double float_t; typedef double double_t; # elif __GLIBC_FLT_EVAL_METHOD == 2 typedef long double float_t; typedef long double double_t; # elif __GLIBC_FLT_EVAL_METHOD == 32 typedef _Float32 float_t; typedef double double_t; # elif __GLIBC_FLT_EVAL_METHOD == 33 typedef _Float32x float_t; typedef _Float32x double_t; # elif __GLIBC_FLT_EVAL_METHOD == 64 typedef _Float64 float_t; typedef _Float64 double_t; # elif __GLIBC_FLT_EVAL_METHOD == 65 typedef _Float64x float_t; typedef _Float64x double_t; # elif __GLIBC_FLT_EVAL_METHOD == 128 typedef _Float128 float_t; typedef _Float128 double_t; # elif __GLIBC_FLT_EVAL_METHOD == 129 typedef _Float128x float_t; typedef _Float128x double_t; # else # error "Unknown __GLIBC_FLT_EVAL_METHOD" # endif #endif /* Define macros for the return values of ilogb and llogb, based on __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. FP_ILOGB0 Expands to a value returned by `ilogb (0.0)'. FP_ILOGBNAN Expands to a value returned by `ilogb (NAN)'. FP_LLOGB0 Expands to a value returned by `llogb (0.0)'. FP_LLOGBNAN Expands to a value returned by `llogb (NAN)'. */ #include #ifdef __USE_ISOC99 # if __FP_LOGB0_IS_MIN # define FP_ILOGB0 (-2147483647 - 1) # else # define FP_ILOGB0 (-2147483647) # endif # if __FP_LOGBNAN_IS_MIN # define FP_ILOGBNAN (-2147483647 - 1) # else # define FP_ILOGBNAN 2147483647 # endif #endif #if __GLIBC_USE (IEC_60559_BFP_EXT) # if __WORDSIZE == 32 # define __FP_LONG_MAX 0x7fffffffL # else # define __FP_LONG_MAX 0x7fffffffffffffffL # endif # if __FP_LOGB0_IS_MIN # define FP_LLOGB0 (-__FP_LONG_MAX - 1) # else # define FP_LLOGB0 (-__FP_LONG_MAX) # endif # if __FP_LOGBNAN_IS_MIN # define FP_LLOGBNAN (-__FP_LONG_MAX - 1) # else # define FP_LLOGBNAN __FP_LONG_MAX # endif #endif /* Get the architecture specific values describing the floating-point evaluation. The following symbols will get defined: FP_FAST_FMA FP_FAST_FMAF FP_FAST_FMAL If defined it indicates that the `fma' function generally executes about as fast as a multiply and an add. This macro is defined only iff the `fma' function is implemented directly with a hardware multiply-add instructions. */ #include #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Rounding direction macros for fromfp functions. */ enum { FP_INT_UPWARD = # define FP_INT_UPWARD 0 FP_INT_UPWARD, FP_INT_DOWNWARD = # define FP_INT_DOWNWARD 1 FP_INT_DOWNWARD, FP_INT_TOWARDZERO = # define FP_INT_TOWARDZERO 2 FP_INT_TOWARDZERO, FP_INT_TONEARESTFROMZERO = # define FP_INT_TONEARESTFROMZERO 3 FP_INT_TONEARESTFROMZERO, FP_INT_TONEAREST = # define FP_INT_TONEAREST 4 FP_INT_TONEAREST, }; #endif /* The file contains the prototypes for all the actual math functions. These macros are used for those prototypes, so we can easily declare each function as both `name' and `__name', and can declare the float versions `namef' and `__namef'. */ #define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function) #define __MATHCALL_VEC(function, suffix, args) \ __SIMD_DECL (__MATH_PRECNAME (function, suffix)) \ __MATHCALL (function, suffix, args) #define __MATHDECL_VEC(type, function,suffix, args) \ __SIMD_DECL (__MATH_PRECNAME (function, suffix)) \ __MATHDECL(type, function,suffix, args) #define __MATHCALL(function,suffix, args) \ __MATHDECL (_Mdouble_,function,suffix, args) #define __MATHDECL(type, function,suffix, args) \ __MATHDECL_1(type, function,suffix, args); \ __MATHDECL_1(type, __CONCAT(__,function),suffix, args) #define __MATHCALLX(function,suffix, args, attrib) \ __MATHDECLX (_Mdouble_,function,suffix, args, attrib) #define __MATHDECLX(type, function,suffix, args, attrib) \ __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \ __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) #define __MATHDECL_1(type, function,suffix, args) \ extern type __MATH_PRECNAME(function,suffix) args __THROW #define _Mdouble_ double #define __MATH_PRECNAME(name,r) __CONCAT(name,r) #define __MATH_DECLARING_DOUBLE 1 #define __MATH_DECLARING_FLOATN 0 #include #include #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATH_DECLARING_DOUBLE #undef __MATH_DECLARING_FLOATN #ifdef __USE_ISOC99 /* Include the file of declarations again, this time using `float' instead of `double' and appending f to each function name. */ # define _Mdouble_ float # define __MATH_PRECNAME(name,r) name##f##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 0 # include # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \ || defined __LDBL_COMPAT \ || defined _LIBC_TEST # ifdef __LDBL_COMPAT # ifdef __USE_ISOC99 extern float __nldbl_nexttowardf (float __x, long double __y) __THROW __attribute__ ((__const__)); # ifdef __REDIRECT_NTH extern float __REDIRECT_NTH (nexttowardf, (float __x, long double __y), __nldbl_nexttowardf) __attribute__ ((__const__)); extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y), nextafter) __attribute__ ((__const__)); extern long double __REDIRECT_NTH (nexttowardl, (long double __x, long double __y), nextafter) __attribute__ ((__const__)); # endif # endif # undef __MATHDECL_1 # define __MATHDECL_2(type, function,suffix, args, alias) \ extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \ args, alias) # define __MATHDECL_1(type, function,suffix, args) \ __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix)) # endif /* Include the file of declarations again, this time using `long double' instead of `double' and appending l to each function name. */ # define _Mdouble_ long double # define __MATH_PRECNAME(name,r) name##l##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 0 # define __MATH_DECLARE_LDOUBLE 1 # include # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # endif /* !(__NO_LONG_DOUBLE_MATH && _LIBC) || __LDBL_COMPAT */ #endif /* Use ISO C99. */ /* Include the file of declarations for _FloatN and _FloatNx types. */ #if __HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !defined _LIBC) # define _Mdouble_ _Float16 # define __MATH_PRECNAME(name,r) name##f16##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # if __HAVE_DISTINCT_FLOAT16 # include # endif # if __GLIBC_USE (IEC_60559_TYPES_EXT) # include # endif # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !_LIBC). */ #if __HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !defined _LIBC) # define _Mdouble_ _Float32 # define __MATH_PRECNAME(name,r) name##f32##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # if __HAVE_DISTINCT_FLOAT32 # include # endif # if __GLIBC_USE (IEC_60559_TYPES_EXT) # include # endif # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !_LIBC). */ #if __HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !defined _LIBC) # define _Mdouble_ _Float64 # define __MATH_PRECNAME(name,r) name##f64##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # if __HAVE_DISTINCT_FLOAT64 # include # endif # if __GLIBC_USE (IEC_60559_TYPES_EXT) # include # endif # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !_LIBC). */ #if __HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC) # define _Mdouble_ _Float128 # define __MATH_PRECNAME(name,r) name##f128##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # if __HAVE_DISTINCT_FLOAT128 # include # endif # if __GLIBC_USE (IEC_60559_TYPES_EXT) # include # endif # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !_LIBC). */ #if __HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !defined _LIBC) # define _Mdouble_ _Float32x # define __MATH_PRECNAME(name,r) name##f32x##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # if __HAVE_DISTINCT_FLOAT32X # include # endif # if __GLIBC_USE (IEC_60559_TYPES_EXT) # include # endif # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !_LIBC). */ #if __HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !defined _LIBC) # define _Mdouble_ _Float64x # define __MATH_PRECNAME(name,r) name##f64x##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # if __HAVE_DISTINCT_FLOAT64X # include # endif # if __GLIBC_USE (IEC_60559_TYPES_EXT) # include # endif # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !_LIBC). */ #if __HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !defined _LIBC) # define _Mdouble_ _Float128x # define __MATH_PRECNAME(name,r) name##f128x##r # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # if __HAVE_DISTINCT_FLOAT128X # include # endif # if __GLIBC_USE (IEC_60559_TYPES_EXT) # include # endif # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC). */ #undef __MATHDECL_1 #undef __MATHDECL #undef __MATHCALL /* Declare functions returning a narrower type. */ #define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x) #define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y) #define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z) #define __MATHCALL_NARROW_NORMAL(func, nargs) \ extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW #define __MATHCALL_NARROW_REDIR(func, redir, nargs) \ extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, \ redir) #define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_NORMAL (func, nargs) #if __GLIBC_USE (IEC_60559_BFP_EXT) # define _Mret_ float # define _Marg_ double # define __MATHCALL_NAME(name) f ## name # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # define _Mret_ float # define _Marg_ long double # define __MATHCALL_NAME(name) f ## name ## l # ifdef __LDBL_COMPAT # define __MATHCALL_REDIR_NAME(name) f ## name # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_REDIR (func, redir, nargs) # endif # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # ifdef __LDBL_COMPAT # undef __MATHCALL_REDIR_NAME # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_NORMAL (func, nargs) # endif # define _Mret_ double # define _Marg_ long double # define __MATHCALL_NAME(name) d ## name ## l # ifdef __LDBL_COMPAT # define __MATHCALL_REDIR_NAME(name) __nldbl_d ## name ## l # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_REDIR (func, redir, nargs) # endif # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # ifdef __LDBL_COMPAT # undef __MATHCALL_REDIR_NAME # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_NORMAL (func, nargs) # endif #endif #if __GLIBC_USE (IEC_60559_TYPES_EXT) # if __HAVE_FLOAT16 && __HAVE_FLOAT32 # define _Mret_ _Float16 # define _Marg_ _Float32 # define __MATHCALL_NAME(name) f16 ## name ## f32 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT16 && __HAVE_FLOAT32X # define _Mret_ _Float16 # define _Marg_ _Float32x # define __MATHCALL_NAME(name) f16 ## name ## f32x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT16 && __HAVE_FLOAT64 # define _Mret_ _Float16 # define _Marg_ _Float64 # define __MATHCALL_NAME(name) f16 ## name ## f64 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT16 && __HAVE_FLOAT64X # define _Mret_ _Float16 # define _Marg_ _Float64x # define __MATHCALL_NAME(name) f16 ## name ## f64x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT16 && __HAVE_FLOAT128 # define _Mret_ _Float16 # define _Marg_ _Float128 # define __MATHCALL_NAME(name) f16 ## name ## f128 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT16 && __HAVE_FLOAT128X # define _Mret_ _Float16 # define _Marg_ _Float128x # define __MATHCALL_NAME(name) f16 ## name ## f128x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32 && __HAVE_FLOAT32X # define _Mret_ _Float32 # define _Marg_ _Float32x # define __MATHCALL_NAME(name) f32 ## name ## f32x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32 && __HAVE_FLOAT64 # define _Mret_ _Float32 # define _Marg_ _Float64 # define __MATHCALL_NAME(name) f32 ## name ## f64 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32 && __HAVE_FLOAT64X # define _Mret_ _Float32 # define _Marg_ _Float64x # define __MATHCALL_NAME(name) f32 ## name ## f64x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32 && __HAVE_FLOAT128 # define _Mret_ _Float32 # define _Marg_ _Float128 # define __MATHCALL_NAME(name) f32 ## name ## f128 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32 && __HAVE_FLOAT128X # define _Mret_ _Float32 # define _Marg_ _Float128x # define __MATHCALL_NAME(name) f32 ## name ## f128x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32X && __HAVE_FLOAT64 # define _Mret_ _Float32x # define _Marg_ _Float64 # define __MATHCALL_NAME(name) f32x ## name ## f64 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32X && __HAVE_FLOAT64X # define _Mret_ _Float32x # define _Marg_ _Float64x # define __MATHCALL_NAME(name) f32x ## name ## f64x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32X && __HAVE_FLOAT128 # define _Mret_ _Float32x # define _Marg_ _Float128 # define __MATHCALL_NAME(name) f32x ## name ## f128 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT32X && __HAVE_FLOAT128X # define _Mret_ _Float32x # define _Marg_ _Float128x # define __MATHCALL_NAME(name) f32x ## name ## f128x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT64 && __HAVE_FLOAT64X # define _Mret_ _Float64 # define _Marg_ _Float64x # define __MATHCALL_NAME(name) f64 ## name ## f64x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT64 && __HAVE_FLOAT128 # define _Mret_ _Float64 # define _Marg_ _Float128 # define __MATHCALL_NAME(name) f64 ## name ## f128 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT64 && __HAVE_FLOAT128X # define _Mret_ _Float64 # define _Marg_ _Float128x # define __MATHCALL_NAME(name) f64 ## name ## f128x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT64X && __HAVE_FLOAT128 # define _Mret_ _Float64x # define _Marg_ _Float128 # define __MATHCALL_NAME(name) f64x ## name ## f128 # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT64X && __HAVE_FLOAT128X # define _Mret_ _Float64x # define _Marg_ _Float128x # define __MATHCALL_NAME(name) f64x ## name ## f128x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif # if __HAVE_FLOAT128 && __HAVE_FLOAT128X # define _Mret_ _Float128 # define _Marg_ _Float128x # define __MATHCALL_NAME(name) f128 ## name ## f128x # include # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME # endif #endif #undef __MATHCALL_NARROW_ARGS_1 #undef __MATHCALL_NARROW_ARGS_2 #undef __MATHCALL_NARROW_ARGS_3 #undef __MATHCALL_NARROW_NORMAL #undef __MATHCALL_NARROW_REDIR #undef __MATHCALL_NARROW #if defined __USE_MISC || defined __USE_XOPEN /* This variable is used by `gamma' and `lgamma'. */ extern int signgam; #endif #if (__HAVE_DISTINCT_FLOAT16 \ || __HAVE_DISTINCT_FLOAT32 \ || __HAVE_DISTINCT_FLOAT64 \ || __HAVE_DISTINCT_FLOAT32X \ || __HAVE_DISTINCT_FLOAT64X \ || __HAVE_DISTINCT_FLOAT128X) # error "Unsupported _FloatN or _FloatNx types for ." #endif /* Depending on the type of TG_ARG, call an appropriately suffixed version of FUNC with arguments (including parentheses) ARGS. Suffixed functions may not exist for long double if it has the same format as double, or for other types with the same format as float, double or long double. The behavior is undefined if the argument does not have a real floating type. The definition may use a conditional expression, so all suffixed versions of FUNC must return the same type (FUNC may include a cast if necessary rather than being a single identifier). */ #ifdef __NO_LONG_DOUBLE_MATH # if __HAVE_DISTINCT_FLOAT128 # error "Distinct _Float128 without distinct long double not supported." # endif # define __MATH_TG(TG_ARG, FUNC, ARGS) \ (sizeof (TG_ARG) == sizeof (float) ? FUNC ## f ARGS : FUNC ARGS) #elif __HAVE_DISTINCT_FLOAT128 # if __HAVE_GENERIC_SELECTION # if __HAVE_FLOATN_NOT_TYPEDEF && __HAVE_FLOAT32 # define __MATH_TG_F32(FUNC, ARGS) _Float32: FUNC ## f ARGS, # else # define __MATH_TG_F32(FUNC, ARGS) # endif # if __HAVE_FLOATN_NOT_TYPEDEF && __HAVE_FLOAT64X # if __HAVE_FLOAT64X_LONG_DOUBLE # define __MATH_TG_F64X(FUNC, ARGS) _Float64x: FUNC ## l ARGS, # else # define __MATH_TG_F64X(FUNC, ARGS) _Float64x: FUNC ## f128 ARGS, # endif # else # define __MATH_TG_F64X(FUNC, ARGS) # endif # define __MATH_TG(TG_ARG, FUNC, ARGS) \ _Generic ((TG_ARG), \ float: FUNC ## f ARGS, \ __MATH_TG_F32 (FUNC, ARGS) \ default: FUNC ARGS, \ long double: FUNC ## l ARGS, \ __MATH_TG_F64X (FUNC, ARGS) \ _Float128: FUNC ## f128 ARGS) # else # if __HAVE_FLOATN_NOT_TYPEDEF # error "Non-typedef _FloatN but no _Generic." # endif # define __MATH_TG(TG_ARG, FUNC, ARGS) \ __builtin_choose_expr \ (__builtin_types_compatible_p (__typeof (TG_ARG), float), \ FUNC ## f ARGS, \ __builtin_choose_expr \ (__builtin_types_compatible_p (__typeof (TG_ARG), double), \ FUNC ARGS, \ __builtin_choose_expr \ (__builtin_types_compatible_p (__typeof (TG_ARG), long double), \ FUNC ## l ARGS, \ FUNC ## f128 ARGS))) # endif #else # define __MATH_TG(TG_ARG, FUNC, ARGS) \ (sizeof (TG_ARG) == sizeof (float) \ ? FUNC ## f ARGS \ : sizeof (TG_ARG) == sizeof (double) \ ? FUNC ARGS \ : FUNC ## l ARGS) #endif /* ISO C99 defines some generic macros which work on any data type. */ #ifdef __USE_ISOC99 /* All floating-point numbers can be put in one of these categories. */ enum { FP_NAN = # define FP_NAN 0 FP_NAN, FP_INFINITE = # define FP_INFINITE 1 FP_INFINITE, FP_ZERO = # define FP_ZERO 2 FP_ZERO, FP_SUBNORMAL = # define FP_SUBNORMAL 3 FP_SUBNORMAL, FP_NORMAL = # define FP_NORMAL 4 FP_NORMAL }; /* GCC bug 66462 means we cannot use the math builtins with -fsignaling-nan, so disable builtins if this is enabled. When fixed in a newer GCC, the __SUPPORT_SNAN__ check may be skipped for those versions. */ /* Return number of classification appropriate for X. */ # if ((__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ || __glibc_clang_prereq (2,8)) \ && (!defined __OPTIMIZE_SIZE__ || defined __cplusplus) /* The check for __cplusplus allows the use of the builtin, even when optimization for size is on. This is provided for libstdc++, only to let its configure test work when it is built with -Os. No further use of this definition of fpclassify is expected in C++ mode, since libstdc++ provides its own version of fpclassify in cmath (which undefines fpclassify). */ # define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, \ FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x) # else # define fpclassify(x) __MATH_TG ((x), __fpclassify, (x)) # endif /* Return nonzero value if sign of X is negative. */ # if __GNUC_PREREQ (6,0) || __glibc_clang_prereq (3,3) # define signbit(x) __builtin_signbit (x) # elif defined __cplusplus /* In C++ mode, __MATH_TG cannot be used, because it relies on __builtin_types_compatible_p, which is a C-only builtin. The check for __cplusplus allows the use of the builtin instead of __MATH_TG. This is provided for libstdc++, only to let its configure test work. No further use of this definition of signbit is expected in C++ mode, since libstdc++ provides its own version of signbit in cmath (which undefines signbit). */ # define signbit(x) __builtin_signbitl (x) # elif __GNUC_PREREQ (4,0) # define signbit(x) __MATH_TG ((x), __builtin_signbit, (x)) # else # define signbit(x) __MATH_TG ((x), __signbit, (x)) # endif /* Return nonzero value if X is not +-Inf or NaN. */ # if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ || __glibc_clang_prereq (2,8) # define isfinite(x) __builtin_isfinite (x) # else # define isfinite(x) __MATH_TG ((x), __finite, (x)) # endif /* Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. */ # if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ || __glibc_clang_prereq (2,8) # define isnormal(x) __builtin_isnormal (x) # else # define isnormal(x) (fpclassify (x) == FP_NORMAL) # endif /* Return nonzero value if X is a NaN. We could use `fpclassify' but we already have this functions `__isnan' and it is faster. */ # if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ || __glibc_clang_prereq (2,8) # define isnan(x) __builtin_isnan (x) # else # define isnan(x) __MATH_TG ((x), __isnan, (x)) # endif /* Return nonzero value if X is positive or negative infinity. */ # if __HAVE_DISTINCT_FLOAT128 && !__GNUC_PREREQ (7,0) \ && !defined __SUPPORT_SNAN__ && !defined __cplusplus /* Since __builtin_isinf_sign is broken for float128 before GCC 7.0, use the helper function, __isinff128, with older compilers. This is only provided for C mode, because in C++ mode, GCC has no support for __builtin_types_compatible_p (and when in C++ mode, this macro is not used anyway, because libstdc++ headers undefine it). */ # define isinf(x) \ (__builtin_types_compatible_p (__typeof (x), _Float128) \ ? __isinff128 (x) : __builtin_isinf_sign (x)) # elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ || __glibc_clang_prereq (3,7) # define isinf(x) __builtin_isinf_sign (x) # else # define isinf(x) __MATH_TG ((x), __isinf, (x)) # endif /* Bitmasks for the math_errhandling macro. */ # define MATH_ERRNO 1 /* errno set by math functions. */ # define MATH_ERREXCEPT 2 /* Exceptions raised by math functions. */ /* By default all math functions support both errno and exception handling (except for soft floating point implementations which may only support errno handling). If errno handling is disabled, exceptions are still supported by GLIBC. Set math_errhandling to 0 with -ffast-math (this is nonconforming but it is more useful than leaving it undefined). */ # ifdef __FAST_MATH__ # define math_errhandling 0 # elif defined __NO_MATH_ERRNO__ # define math_errhandling (MATH_ERREXCEPT) # else # define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) # endif #endif /* Use ISO C99. */ #if __GLIBC_USE (IEC_60559_BFP_EXT) # include /* Return nonzero value if X is a signaling NaN. */ # ifndef __cplusplus # define issignaling(x) __MATH_TG ((x), __issignaling, (x)) # else /* In C++ mode, __MATH_TG cannot be used, because it relies on __builtin_types_compatible_p, which is a C-only builtin. On the other hand, overloading provides the means to distinguish between the floating-point types. The overloading resolution will match the correct parameter (regardless of type qualifiers (i.e.: const and volatile)). */ extern "C++" { inline int issignaling (float __val) { return __issignalingf (__val); } inline int issignaling (double __val) { return __issignaling (__val); } inline int issignaling (long double __val) { # ifdef __NO_LONG_DOUBLE_MATH return __issignaling (__val); # else return __issignalingl (__val); # endif } # if __HAVE_FLOAT128_UNLIKE_LDBL /* When using an IEEE 128-bit long double, _Float128 is defined as long double in C++. */ inline int issignaling (_Float128 __val) { return __issignalingf128 (__val); } # endif } /* extern C++ */ # endif /* Return nonzero value if X is subnormal. */ # define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL) /* Return nonzero value if X is zero. */ # ifndef __cplusplus # ifdef __SUPPORT_SNAN__ # define iszero(x) (fpclassify (x) == FP_ZERO) # else # define iszero(x) (((__typeof (x)) (x)) == 0) # endif # else /* __cplusplus */ extern "C++" { # ifdef __SUPPORT_SNAN__ inline int iszero (float __val) { return __fpclassifyf (__val) == FP_ZERO; } inline int iszero (double __val) { return __fpclassify (__val) == FP_ZERO; } inline int iszero (long double __val) { # ifdef __NO_LONG_DOUBLE_MATH return __fpclassify (__val) == FP_ZERO; # else return __fpclassifyl (__val) == FP_ZERO; # endif } # if __HAVE_FLOAT128_UNLIKE_LDBL /* When using an IEEE 128-bit long double, _Float128 is defined as long double in C++. */ inline int iszero (_Float128 __val) { return __fpclassifyf128 (__val) == FP_ZERO; } # endif # else template inline bool iszero (__T __val) { return __val == 0; } # endif } /* extern C++ */ # endif /* __cplusplus */ #endif /* Use IEC_60559_BFP_EXT. */ #ifdef __USE_XOPEN /* X/Open wants another strange constant. */ # define MAXFLOAT 3.40282347e+38F #endif /* Some useful constants. */ #if defined __USE_MISC || defined __USE_XOPEN # define M_E 2.7182818284590452354 /* e */ # define M_LOG2E 1.4426950408889634074 /* log_2 e */ # define M_LOG10E 0.43429448190325182765 /* log_10 e */ # define M_LN2 0.69314718055994530942 /* log_e 2 */ # define M_LN10 2.30258509299404568402 /* log_e 10 */ # define M_PI 3.14159265358979323846 /* pi */ # define M_PI_2 1.57079632679489661923 /* pi/2 */ # define M_PI_4 0.78539816339744830962 /* pi/4 */ # define M_1_PI 0.31830988618379067154 /* 1/pi */ # define M_2_PI 0.63661977236758134308 /* 2/pi */ # define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ # define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ # define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ #endif /* The above constants are not adequate for computation using `long double's. Therefore we provide as an extension constants with similar names as a GNU extension. Provide enough digits for the 128-bit IEEE quad. */ #ifdef __USE_GNU # define M_El 2.718281828459045235360287471352662498L /* e */ # define M_LOG2El 1.442695040888963407359924681001892137L /* log_2 e */ # define M_LOG10El 0.434294481903251827651128918916605082L /* log_10 e */ # define M_LN2l 0.693147180559945309417232121458176568L /* log_e 2 */ # define M_LN10l 2.302585092994045684017991454684364208L /* log_e 10 */ # define M_PIl 3.141592653589793238462643383279502884L /* pi */ # define M_PI_2l 1.570796326794896619231321691639751442L /* pi/2 */ # define M_PI_4l 0.785398163397448309615660845819875721L /* pi/4 */ # define M_1_PIl 0.318309886183790671537767526745028724L /* 1/pi */ # define M_2_PIl 0.636619772367581343075535053490057448L /* 2/pi */ # define M_2_SQRTPIl 1.128379167095512573896158903121545172L /* 2/sqrt(pi) */ # define M_SQRT2l 1.414213562373095048801688724209698079L /* sqrt(2) */ # define M_SQRT1_2l 0.707106781186547524400844362104849039L /* 1/sqrt(2) */ #endif #if __HAVE_FLOAT16 && defined __USE_GNU # define M_Ef16 __f16 (2.718281828459045235360287471352662498) /* e */ # define M_LOG2Ef16 __f16 (1.442695040888963407359924681001892137) /* log_2 e */ # define M_LOG10Ef16 __f16 (0.434294481903251827651128918916605082) /* log_10 e */ # define M_LN2f16 __f16 (0.693147180559945309417232121458176568) /* log_e 2 */ # define M_LN10f16 __f16 (2.302585092994045684017991454684364208) /* log_e 10 */ # define M_PIf16 __f16 (3.141592653589793238462643383279502884) /* pi */ # define M_PI_2f16 __f16 (1.570796326794896619231321691639751442) /* pi/2 */ # define M_PI_4f16 __f16 (0.785398163397448309615660845819875721) /* pi/4 */ # define M_1_PIf16 __f16 (0.318309886183790671537767526745028724) /* 1/pi */ # define M_2_PIf16 __f16 (0.636619772367581343075535053490057448) /* 2/pi */ # define M_2_SQRTPIf16 __f16 (1.128379167095512573896158903121545172) /* 2/sqrt(pi) */ # define M_SQRT2f16 __f16 (1.414213562373095048801688724209698079) /* sqrt(2) */ # define M_SQRT1_2f16 __f16 (0.707106781186547524400844362104849039) /* 1/sqrt(2) */ #endif #if __HAVE_FLOAT32 && defined __USE_GNU # define M_Ef32 __f32 (2.718281828459045235360287471352662498) /* e */ # define M_LOG2Ef32 __f32 (1.442695040888963407359924681001892137) /* log_2 e */ # define M_LOG10Ef32 __f32 (0.434294481903251827651128918916605082) /* log_10 e */ # define M_LN2f32 __f32 (0.693147180559945309417232121458176568) /* log_e 2 */ # define M_LN10f32 __f32 (2.302585092994045684017991454684364208) /* log_e 10 */ # define M_PIf32 __f32 (3.141592653589793238462643383279502884) /* pi */ # define M_PI_2f32 __f32 (1.570796326794896619231321691639751442) /* pi/2 */ # define M_PI_4f32 __f32 (0.785398163397448309615660845819875721) /* pi/4 */ # define M_1_PIf32 __f32 (0.318309886183790671537767526745028724) /* 1/pi */ # define M_2_PIf32 __f32 (0.636619772367581343075535053490057448) /* 2/pi */ # define M_2_SQRTPIf32 __f32 (1.128379167095512573896158903121545172) /* 2/sqrt(pi) */ # define M_SQRT2f32 __f32 (1.414213562373095048801688724209698079) /* sqrt(2) */ # define M_SQRT1_2f32 __f32 (0.707106781186547524400844362104849039) /* 1/sqrt(2) */ #endif #if __HAVE_FLOAT64 && defined __USE_GNU # define M_Ef64 __f64 (2.718281828459045235360287471352662498) /* e */ # define M_LOG2Ef64 __f64 (1.442695040888963407359924681001892137) /* log_2 e */ # define M_LOG10Ef64 __f64 (0.434294481903251827651128918916605082) /* log_10 e */ # define M_LN2f64 __f64 (0.693147180559945309417232121458176568) /* log_e 2 */ # define M_LN10f64 __f64 (2.302585092994045684017991454684364208) /* log_e 10 */ # define M_PIf64 __f64 (3.141592653589793238462643383279502884) /* pi */ # define M_PI_2f64 __f64 (1.570796326794896619231321691639751442) /* pi/2 */ # define M_PI_4f64 __f64 (0.785398163397448309615660845819875721) /* pi/4 */ # define M_1_PIf64 __f64 (0.318309886183790671537767526745028724) /* 1/pi */ # define M_2_PIf64 __f64 (0.636619772367581343075535053490057448) /* 2/pi */ # define M_2_SQRTPIf64 __f64 (1.128379167095512573896158903121545172) /* 2/sqrt(pi) */ # define M_SQRT2f64 __f64 (1.414213562373095048801688724209698079) /* sqrt(2) */ # define M_SQRT1_2f64 __f64 (0.707106781186547524400844362104849039) /* 1/sqrt(2) */ #endif #if __HAVE_FLOAT128 && defined __USE_GNU # define M_Ef128 __f128 (2.718281828459045235360287471352662498) /* e */ # define M_LOG2Ef128 __f128 (1.442695040888963407359924681001892137) /* log_2 e */ # define M_LOG10Ef128 __f128 (0.434294481903251827651128918916605082) /* log_10 e */ # define M_LN2f128 __f128 (0.693147180559945309417232121458176568) /* log_e 2 */ # define M_LN10f128 __f128 (2.302585092994045684017991454684364208) /* log_e 10 */ # define M_PIf128 __f128 (3.141592653589793238462643383279502884) /* pi */ # define M_PI_2f128 __f128 (1.570796326794896619231321691639751442) /* pi/2 */ # define M_PI_4f128 __f128 (0.785398163397448309615660845819875721) /* pi/4 */ # define M_1_PIf128 __f128 (0.318309886183790671537767526745028724) /* 1/pi */ # define M_2_PIf128 __f128 (0.636619772367581343075535053490057448) /* 2/pi */ # define M_2_SQRTPIf128 __f128 (1.128379167095512573896158903121545172) /* 2/sqrt(pi) */ # define M_SQRT2f128 __f128 (1.414213562373095048801688724209698079) /* sqrt(2) */ # define M_SQRT1_2f128 __f128 (0.707106781186547524400844362104849039) /* 1/sqrt(2) */ #endif #if __HAVE_FLOAT32X && defined __USE_GNU # define M_Ef32x __f32x (2.718281828459045235360287471352662498) /* e */ # define M_LOG2Ef32x __f32x (1.442695040888963407359924681001892137) /* log_2 e */ # define M_LOG10Ef32x __f32x (0.434294481903251827651128918916605082) /* log_10 e */ # define M_LN2f32x __f32x (0.693147180559945309417232121458176568) /* log_e 2 */ # define M_LN10f32x __f32x (2.302585092994045684017991454684364208) /* log_e 10 */ # define M_PIf32x __f32x (3.141592653589793238462643383279502884) /* pi */ # define M_PI_2f32x __f32x (1.570796326794896619231321691639751442) /* pi/2 */ # define M_PI_4f32x __f32x (0.785398163397448309615660845819875721) /* pi/4 */ # define M_1_PIf32x __f32x (0.318309886183790671537767526745028724) /* 1/pi */ # define M_2_PIf32x __f32x (0.636619772367581343075535053490057448) /* 2/pi */ # define M_2_SQRTPIf32x __f32x (1.128379167095512573896158903121545172) /* 2/sqrt(pi) */ # define M_SQRT2f32x __f32x (1.414213562373095048801688724209698079) /* sqrt(2) */ # define M_SQRT1_2f32x __f32x (0.707106781186547524400844362104849039) /* 1/sqrt(2) */ #endif #if __HAVE_FLOAT64X && defined __USE_GNU # define M_Ef64x __f64x (2.718281828459045235360287471352662498) /* e */ # define M_LOG2Ef64x __f64x (1.442695040888963407359924681001892137) /* log_2 e */ # define M_LOG10Ef64x __f64x (0.434294481903251827651128918916605082) /* log_10 e */ # define M_LN2f64x __f64x (0.693147180559945309417232121458176568) /* log_e 2 */ # define M_LN10f64x __f64x (2.302585092994045684017991454684364208) /* log_e 10 */ # define M_PIf64x __f64x (3.141592653589793238462643383279502884) /* pi */ # define M_PI_2f64x __f64x (1.570796326794896619231321691639751442) /* pi/2 */ # define M_PI_4f64x __f64x (0.785398163397448309615660845819875721) /* pi/4 */ # define M_1_PIf64x __f64x (0.318309886183790671537767526745028724) /* 1/pi */ # define M_2_PIf64x __f64x (0.636619772367581343075535053490057448) /* 2/pi */ # define M_2_SQRTPIf64x __f64x (1.128379167095512573896158903121545172) /* 2/sqrt(pi) */ # define M_SQRT2f64x __f64x (1.414213562373095048801688724209698079) /* sqrt(2) */ # define M_SQRT1_2f64x __f64x (0.707106781186547524400844362104849039) /* 1/sqrt(2) */ #endif #if __HAVE_FLOAT128X && defined __USE_GNU # error "M_* values needed for _Float128x" #endif /* When compiling in strict ISO C compatible mode we must not use the inline functions since they, among other things, do not set the `errno' variable correctly. */ #if defined __STRICT_ANSI__ && !defined __NO_MATH_INLINES # define __NO_MATH_INLINES 1 #endif #ifdef __USE_ISOC99 # if __GNUC_PREREQ (3, 1) /* ISO C99 defines some macros to compare number while taking care for unordered numbers. Many FPUs provide special instructions to support these operations. Generic support in GCC for these as builtins went in 2.97, but not all cpus added their patterns until 3.1. Therefore we enable the builtins from 3.1 onwards and use a generic implementation othwerwise. */ # define isgreater(x, y) __builtin_isgreater(x, y) # define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) # define isless(x, y) __builtin_isless(x, y) # define islessequal(x, y) __builtin_islessequal(x, y) # define islessgreater(x, y) __builtin_islessgreater(x, y) # define isunordered(x, y) __builtin_isunordered(x, y) # else # define isgreater(x, y) \ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ !isunordered (__x, __y) && __x > __y; })) # define isgreaterequal(x, y) \ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ !isunordered (__x, __y) && __x >= __y; })) # define isless(x, y) \ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ !isunordered (__x, __y) && __x < __y; })) # define islessequal(x, y) \ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ !isunordered (__x, __y) && __x <= __y; })) # define islessgreater(x, y) \ (__extension__ ({ __typeof__ (x) __x = (x); __typeof__ (y) __y = (y); \ !isunordered (__x, __y) && __x != __y; })) /* isunordered must always check both operands first for signaling NaNs. */ # define isunordered(x, y) \ (__extension__ ({ __typeof__ (x) __u = (x); __typeof__ (y) __v = (y); \ __u != __v && (__u != __u || __v != __v); })) # endif #endif /* Get machine-dependent inline versions (if there are any). */ #ifdef __USE_EXTERN_INLINES # include #endif /* Define special entry points to use when the compiler got told to only expect finite results. */ #if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 /* Include bits/math-finite.h for double. */ # define _Mdouble_ double # define __MATH_DECLARING_DOUBLE 1 # define __MATH_DECLARING_FLOATN 0 # define __REDIRFROM_X(function, reentrant) \ function ## reentrant # define __REDIRTO_X(function, reentrant) \ __ ## function ## reentrant ## _finite # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X /* When __USE_ISOC99 is defined, include math-finite for float and long double, as well. */ # ifdef __USE_ISOC99 /* Include bits/math-finite.h for float. */ # define _Mdouble_ float # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 0 # define __REDIRFROM_X(function, reentrant) \ function ## f ## reentrant # define __REDIRTO_X(function, reentrant) \ __ ## function ## f ## reentrant ## _finite # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X /* Include bits/math-finite.h for long double. */ # ifdef __MATH_DECLARE_LDOUBLE # define _Mdouble_ long double # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 0 # define __REDIRFROM_X(function, reentrant) \ function ## l ## reentrant # ifdef __NO_LONG_DOUBLE_MATH # define __REDIRTO_X(function, reentrant) \ __ ## function ## reentrant ## _finite # else # define __REDIRTO_X(function, reentrant) \ __ ## function ## l ## reentrant ## _finite # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif # endif /* __USE_ISOC99. */ /* Include bits/math-finite.h for _FloatN and _FloatNx. */ # if (__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # define _Mdouble_ _Float16 # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # define __REDIRFROM_X(function, reentrant) \ function ## f16 ## reentrant # if __HAVE_DISTINCT_FLOAT16 # define __REDIRTO_X(function, reentrant) \ __ ## function ## f16 ## reentrant ## _finite # else # error "non-disinct _Float16" # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif # if (__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # define _Mdouble_ _Float32 # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # define __REDIRFROM_X(function, reentrant) \ function ## f32 ## reentrant # if __HAVE_DISTINCT_FLOAT32 # define __REDIRTO_X(function, reentrant) \ __ ## function ## f32 ## reentrant ## _finite # else # define __REDIRTO_X(function, reentrant) \ __ ## function ## f ## reentrant ## _finite # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif # if (__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # define _Mdouble_ _Float64 # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # define __REDIRFROM_X(function, reentrant) \ function ## f64 ## reentrant # if __HAVE_DISTINCT_FLOAT64 # define __REDIRTO_X(function, reentrant) \ __ ## function ## f64 ## reentrant ## _finite # else # define __REDIRTO_X(function, reentrant) \ __ ## function ## reentrant ## _finite # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif # if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # define _Mdouble_ _Float128 # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # define __REDIRFROM_X(function, reentrant) \ function ## f128 ## reentrant # if __HAVE_DISTINCT_FLOAT128 # define __REDIRTO_X(function, reentrant) \ __ ## function ## f128 ## reentrant ## _finite # else # define __REDIRTO_X(function, reentrant) \ __ ## function ## l ## reentrant ## _finite # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif # if (__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # define _Mdouble_ _Float32x # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # define __REDIRFROM_X(function, reentrant) \ function ## f32x ## reentrant # if __HAVE_DISTINCT_FLOAT32X # define __REDIRTO_X(function, reentrant) \ __ ## function ## f32x ## reentrant ## _finite # else # define __REDIRTO_X(function, reentrant) \ __ ## function ## reentrant ## _finite # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif # if (__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # define _Mdouble_ _Float64x # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # define __REDIRFROM_X(function, reentrant) \ function ## f64x ## reentrant # if __HAVE_DISTINCT_FLOAT64X # define __REDIRTO_X(function, reentrant) \ __ ## function ## f64x ## reentrant ## _finite # elif __HAVE_FLOAT64X_LONG_DOUBLE # define __REDIRTO_X(function, reentrant) \ __ ## function ## l ## reentrant ## _finite # else # define __REDIRTO_X(function, reentrant) \ __ ## function ## f128 ## reentrant ## _finite # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif # if (__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # define _Mdouble_ _Float128x # define __MATH_DECLARING_DOUBLE 0 # define __MATH_DECLARING_FLOATN 1 # define __REDIRFROM_X(function, reentrant) \ function ## f128x ## reentrant # if __HAVE_DISTINCT_FLOAT128X # define __REDIRTO_X(function, reentrant) \ __ ## function ## f128x ## reentrant ## _finite # else # error "non-disinct _Float128x" # endif # include # undef _Mdouble_ # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN # undef __REDIRFROM_X # undef __REDIRTO_X # endif #endif /* __FINITE_MATH_ONLY__ > 0. */ #if __GLIBC_USE (IEC_60559_BFP_EXT) /* An expression whose type has the widest of the evaluation formats of X and Y (which are of floating-point types). */ # if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64 # define __MATH_EVAL_FMT2(x, y) ((x) + (y) + 0.0L) # elif __FLT_EVAL_METHOD__ == 1 || __FLT_EVAL_METHOD__ > 32 # define __MATH_EVAL_FMT2(x, y) ((x) + (y) + 0.0) # elif __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 32 # define __MATH_EVAL_FMT2(x, y) ((x) + (y) + 0.0f) # else # define __MATH_EVAL_FMT2(x, y) ((x) + (y)) # endif /* Return X == Y but raising "invalid" and setting errno if X or Y is a NaN. */ # if !defined __cplusplus || (__cplusplus < 201103L && !defined __GNUC__) # define iseqsig(x, y) \ __MATH_TG (__MATH_EVAL_FMT2 (x, y), __iseqsig, ((x), (y))) # else /* In C++ mode, __MATH_TG cannot be used, because it relies on __builtin_types_compatible_p, which is a C-only builtin. Moreover, the comparison macros from ISO C take two floating-point arguments, which need not have the same type. Choosing what underlying function to call requires evaluating the formats of the arguments, then selecting which is wider. The macro __MATH_EVAL_FMT2 provides this information, however, only the type of the macro expansion is relevant (actually evaluating the expression would be incorrect). Thus, the type is used as a template parameter for __iseqsig_type, which calls the appropriate underlying function. */ extern "C++" { template struct __iseqsig_type; template<> struct __iseqsig_type { static int __call (float __x, float __y) throw () { return __iseqsigf (__x, __y); } }; template<> struct __iseqsig_type { static int __call (double __x, double __y) throw () { return __iseqsig (__x, __y); } }; template<> struct __iseqsig_type { static int __call (long double __x, long double __y) throw () { # ifndef __NO_LONG_DOUBLE_MATH return __iseqsigl (__x, __y); # else return __iseqsig (__x, __y); # endif } }; # if __HAVE_FLOAT128_UNLIKE_LDBL /* When using an IEEE 128-bit long double, _Float128 is defined as long double in C++. */ template<> struct __iseqsig_type<_Float128> { static int __call (_Float128 __x, _Float128 __y) throw () { return __iseqsigf128 (__x, __y); } }; # endif template inline int iseqsig (_T1 __x, _T2 __y) throw () { # if __cplusplus >= 201103L typedef decltype (__MATH_EVAL_FMT2 (__x, __y)) _T3; # else typedef __typeof (__MATH_EVAL_FMT2 (__x, __y)) _T3; # endif return __iseqsig_type<_T3>::__call (__x, __y); } } /* extern "C++" */ # endif /* __cplusplus */ #endif __END_DECLS #endif /* math.h */ PKZ )) gdfontg.hnu[#ifndef _GDFONTG_H_ #define _GDFONTG_H_ 1 #ifdef __cplusplus extern "C" { #endif /* This is a header file for gd font, generated using bdftogd version 0.51 by Jan Pazdziora, adelton@fi.muni.cz from bdf font -Misc-Fixed-Bold-R-Normal-Sans-15-140-75-75-C-90-ISO8859-2 at Mon Jan 26 14:45:58 1998. The original bdf was holding following copyright: "Libor Skarvada, libor@informatics.muni.cz" */ #include "gd.h" extern BGD_EXPORT_DATA_PROT gdFontPtr gdFontGiant; BGD_DECLARE(gdFontPtr) gdFontGetGiant(void); #ifdef __cplusplus } #endif #endif PKZOۘFcFcargp.hnu[/* Hierarchial argument parsing, layered over getopt. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ARGP_H #define _ARGP_H #include #include #include #include #include __BEGIN_DECLS /* error_t may or may not be available from errno.h, depending on the operating system. */ #ifndef __error_t_defined # define __error_t_defined 1 typedef int error_t; #endif /* A description of a particular option. A pointer to an array of these is passed in the OPTIONS field of an argp structure. Each option entry can correspond to one long option and/or one short option; more names for the same option can be added by following an entry in an option array with options having the OPTION_ALIAS flag set. */ struct argp_option { /* The long option name. For more than one name for the same option, you can use following options with the OPTION_ALIAS flag set. */ const char *name; /* What key is returned for this option. If > 0 and printable, then it's also accepted as a short option. */ int key; /* If non-NULL, this is the name of the argument associated with this option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */ const char *arg; /* OPTION_ flags. */ int flags; /* The doc string for this option. If both NAME and KEY are 0, This string will be printed outdented from the normal option column, making it useful as a group header (it will be the first thing printed in its group); in this usage, it's conventional to end the string with a `:'. */ const char *doc; /* The group this option is in. In a long help message, options are sorted alphabetically within each group, and the groups presented in the order 0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with if this field 0 will inherit the group number of the previous entry, or zero if it's the first one, unless its a group header (NAME and KEY both 0), in which case, the previous entry + 1 is the default. Automagic options such as --help are put into group -1. */ int group; }; /* The argument associated with this option is optional. */ #define OPTION_ARG_OPTIONAL 0x1 /* This option isn't displayed in any help messages. */ #define OPTION_HIDDEN 0x2 /* This option is an alias for the closest previous non-alias option. This means that it will be displayed in the same help entry, and will inherit fields other than NAME and KEY from the aliased option. */ #define OPTION_ALIAS 0x4 /* This option isn't actually an option (and so should be ignored by the actual option parser), but rather an arbitrary piece of documentation that should be displayed in much the same manner as the options. If this flag is set, then the option NAME field is displayed unmodified (e.g., no `--' prefix is added) at the left-margin (where a *short* option would normally be displayed), and the documentation string in the normal place. For purposes of sorting, any leading whitespace and punctuation is ignored, except that if the first non-whitespace character is not `-', this entry is displayed after all options (and OPTION_DOC entries with a leading `-') in the same group. */ #define OPTION_DOC 0x8 /* This option shouldn't be included in `long' usage messages (but is still included in help messages). This is mainly intended for options that are completely documented in an argp's ARGS_DOC field, in which case including the option in the generic usage list would be redundant. For instance, if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to distinguish these two cases, -x should probably be marked OPTION_NO_USAGE. */ #define OPTION_NO_USAGE 0x10 struct argp; /* fwd declare this type */ struct argp_state; /* " */ struct argp_child; /* " */ /* The type of a pointer to an argp parsing function. */ typedef error_t (*argp_parser_t) (int __key, char *__arg, struct argp_state *__state); /* What to return for unrecognized keys. For special ARGP_KEY_ keys, such returns will simply be ignored. For user keys, this error will be turned into EINVAL (if the call to argp_parse is such that errors are propagated back to the user instead of exiting); returning EINVAL itself would result in an immediate stop to parsing in *all* cases. */ #define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */ /* Special values for the KEY argument to an argument parsing function. ARGP_ERR_UNKNOWN should be returned if they aren't understood. The sequence of keys to a parsing function is either (where each uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key): INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized The third case is where every parser returned ARGP_KEY_UNKNOWN for an argument, in which case parsing stops at that argument (returning the unparsed arguments to the caller of argp_parse if requested, or stopping with an error message if not). If an error occurs (either detected by argp, or because the parsing function returned an error value), then the parser is called with ARGP_KEY_ERROR, and no further calls are made. */ /* This is not an option at all, but rather a command line argument. If a parser receiving this key returns success, the fact is recorded, and the ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the argument, a parser function decrements the NEXT field of the state it's passed, the option won't be considered processed; this is to allow you to actually modify the argument (perhaps into an option), and have it processed again. */ #define ARGP_KEY_ARG 0 /* There are remaining arguments not parsed by any parser, which may be found starting at (STATE->argv + STATE->next). If success is returned, but STATE->next left untouched, it's assumed that all arguments were consume, otherwise, the parser should adjust STATE->next to reflect any arguments consumed. */ #define ARGP_KEY_ARGS 0x1000006 /* There are no more command line arguments at all. */ #define ARGP_KEY_END 0x1000001 /* Because it's common to want to do some special processing if there aren't any non-option args, user parsers are called with this key if they didn't successfully process any non-option arguments. Called just before ARGP_KEY_END (where more general validity checks on previously parsed arguments can take place). */ #define ARGP_KEY_NO_ARGS 0x1000002 /* Passed in before any parsing is done. Afterwards, the values of each element of the CHILD_INPUT field, if any, in the state structure is copied to each child's state to be the initial value of the INPUT field. */ #define ARGP_KEY_INIT 0x1000003 /* Use after all other keys, including SUCCESS & END. */ #define ARGP_KEY_FINI 0x1000007 /* Passed in when parsing has successfully been completed (even if there are still arguments remaining). */ #define ARGP_KEY_SUCCESS 0x1000004 /* Passed in if an error occurs. */ #define ARGP_KEY_ERROR 0x1000005 /* An argp structure contains a set of options declarations, a function to deal with parsing one, documentation string, a possible vector of child argp's, and perhaps a function to filter help output. When actually parsing options, getopt is called with the union of all the argp structures chained together through their CHILD pointers, with conflicts being resolved in favor of the first occurrence in the chain. */ struct argp { /* An array of argp_option structures, terminated by an entry with both NAME and KEY having a value of 0. */ const struct argp_option *options; /* What to do with an option from this structure. KEY is the key associated with the option, and ARG is any associated argument (NULL if none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then parsing is stopped immediately, and that value is returned from argp_parse(). For special (non-user-supplied) values of KEY, see the ARGP_KEY_ definitions below. */ argp_parser_t parser; /* A string describing what other arguments are wanted by this program. It is only used by argp_usage to print the `Usage:' message. If it contains newlines, the strings separated by them are considered alternative usage patterns, and printed on separate lines (lines after the first are prefix by ` or: ' instead of `Usage:'). */ const char *args_doc; /* If non-NULL, a string containing extra text to be printed before and after the options in a long help message (separated by a vertical tab `\v' character). */ const char *doc; /* A vector of argp_children structures, terminated by a member with a 0 argp field, pointing to child argps should be parsed with this one. Any conflicts are resolved in favor of this argp, or early argps in the CHILDREN list. This field is useful if you use libraries that supply their own argp structure, which you want to use in conjunction with your own. */ const struct argp_child *children; /* If non-zero, this should be a function to filter the output of help messages. KEY is either a key from an option, in which case TEXT is that option's help text, or a special key from the ARGP_KEY_HELP_ defines, below, describing which other help text TEXT is. The function should return either TEXT, if it should be used as-is, a replacement string, which should be malloced, and will be freed by argp, or NULL, meaning `print nothing'. The value for TEXT is *after* any translation has been done, so if any of the replacement text also needs translation, that should be done by the filter function. INPUT is either the input supplied to argp_parse, or NULL, if argp_help was called directly. */ char *(*help_filter) (int __key, const char *__text, void *__input); /* If non-zero the strings used in the argp library are translated using the domain described by this string. Otherwise the currently installed default domain is used. */ const char *argp_domain; }; /* Possible KEY arguments to a help filter function. */ #define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */ #define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */ #define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */ #define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation; TEXT is NULL for this key. */ /* Explanatory note emitted when duplicate option arguments have been suppressed. */ #define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005 #define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */ /* When an argp has a non-zero CHILDREN field, it should point to a vector of argp_child structures, each of which describes a subsidiary argp. */ struct argp_child { /* The child parser. */ const struct argp *argp; /* Flags for this child. */ int flags; /* If non-zero, an optional header to be printed in help output before the child options. As a side-effect, a non-zero value forces the child options to be grouped together; to achieve this effect without actually printing a header string, use a value of "". */ const char *header; /* Where to group the child options relative to the other (`consolidated') options in the parent argp; the values are the same as the GROUP field in argp_option structs, but all child-groupings follow parent options at a particular group level. If both this field and HEADER are zero, then they aren't grouped at all, but rather merged with the parent options (merging the child's grouping levels with the parents). */ int group; }; /* Parsing state. This is provided to parsing functions called by argp, which may examine and, as noted, modify fields. */ struct argp_state { /* The top level ARGP being parsed. */ const struct argp *root_argp; /* The argument vector being parsed. May be modified. */ int argc; char **argv; /* The index in ARGV of the next arg that to be parsed. May be modified. */ int next; /* The flags supplied to argp_parse. May be modified. */ unsigned flags; /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the number of the current arg, starting at zero, and incremented after each such call returns. At all other times, this is the number of such arguments that have been processed. */ unsigned arg_num; /* If non-zero, the index in ARGV of the first argument following a special `--' argument (which prevents anything following being interpreted as an option). Only set once argument parsing has proceeded past this point. */ int quoted; /* An arbitrary pointer passed in from the user. */ void *input; /* Values to pass to child parsers. This vector will be the same length as the number of children for the current parser. */ void **child_inputs; /* For the parser's use. Initialized to 0. */ void *hook; /* The name used when printing messages. This is initialized to ARGV[0], or PROGRAM_INVOCATION_NAME if that is unavailable. */ char *name; /* Streams used when argp prints something. */ FILE *err_stream; /* For errors; initialized to stderr. */ FILE *out_stream; /* For information; initialized to stdout. */ void *pstate; /* Private, for use by argp. */ }; /* Flags for argp_parse (note that the defaults are those that are convenient for program command line parsing): */ /* Don't ignore the first element of ARGV. Normally (and always unless ARGP_NO_ERRS is set) the first element of the argument vector is skipped for option parsing purposes, as it corresponds to the program name in a command line. */ #define ARGP_PARSE_ARGV0 0x01 /* Don't print error messages for unknown options to stderr; unless this flag is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program name in the error messages. This flag implies ARGP_NO_EXIT (on the assumption that silent exiting upon errors is bad behaviour). */ #define ARGP_NO_ERRS 0x02 /* Don't parse any non-option args. Normally non-option args are parsed by calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg as the value. Since it's impossible to know which parse function wants to handle it, each one is called in turn, until one returns 0 or an error other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the argp_parse returns prematurely (but with a return value of 0). If all args have been parsed without error, all parsing functions are called one last time with a key of ARGP_KEY_END. This flag needn't normally be set, as the normal behavior is to stop parsing as soon as some argument can't be handled. */ #define ARGP_NO_ARGS 0x04 /* Parse options and arguments in the same order they occur on the command line -- normally they're rearranged so that all options come first. */ #define ARGP_IN_ORDER 0x08 /* Don't provide the standard long option --help, which causes usage and option help information to be output to stdout, and exit (0) called. */ #define ARGP_NO_HELP 0x10 /* Don't exit on errors (they may still result in error messages). */ #define ARGP_NO_EXIT 0x20 /* Use the gnu getopt `long-only' rules for parsing arguments. */ #define ARGP_LONG_ONLY 0x40 /* Turns off any message-printing/exiting options. */ #define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP) /* Parse the options strings in ARGC & ARGV according to the options in ARGP. FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the index in ARGV of the first unparsed option is returned in it. If an unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser routine returned a non-zero value, it is returned; otherwise 0 is returned. This function may also call exit unless the ARGP_NO_HELP flag is set. INPUT is a pointer to a value to be passed in to the parser. */ extern error_t argp_parse (const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, void *__restrict __input); extern error_t __argp_parse (const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, void *__restrict __input); /* Global variables. */ /* If defined or set by the user program to a non-zero value, then a default option --version is added (unless the ARGP_NO_HELP flag is used), which will print this string followed by a newline and exit (unless the ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */ extern const char *argp_program_version; /* If defined or set by the user program to a non-zero value, then a default option --version is added (unless the ARGP_NO_HELP flag is used), which calls this function with a stream to print the version to and a pointer to the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is used). This variable takes precedent over ARGP_PROGRAM_VERSION. */ extern void (*argp_program_version_hook) (FILE *__restrict __stream, struct argp_state *__restrict __state); /* If defined or set by the user program, it should point to string that is the bug-reporting address for the program. It will be printed by argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help messages), embedded in a sentence that says something like `Report bugs to ADDR.'. */ extern const char *argp_program_bug_address; /* The exit status that argp will use when exiting due to a parsing error. If not defined or set by the user program, this defaults to EX_USAGE from . */ extern error_t argp_err_exit_status; /* Flags for argp_help. */ #define ARGP_HELP_USAGE 0x01 /* a Usage: message. */ #define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */ #define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */ #define ARGP_HELP_LONG 0x08 /* a long help message. */ #define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */ #define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */ #define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC) #define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */ #define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to reflect ARGP_LONG_ONLY mode. */ /* These ARGP_HELP flags are only understood by argp_state_help. */ #define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */ #define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */ /* The standard thing to do after a program command line parsing error, if an error message has already been printed. */ #define ARGP_HELP_STD_ERR \ (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR) /* The standard thing to do after a program command line parsing error, if no more specific error message has been printed. */ #define ARGP_HELP_STD_USAGE \ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR) /* The standard thing to do in response to a --help option. */ #define ARGP_HELP_STD_HELP \ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \ | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR) /* Output a usage message for ARGP to STREAM. FLAGS are from the set ARGP_HELP_*. */ extern void argp_help (const struct argp *__restrict __argp, FILE *__restrict __stream, unsigned __flags, char *__restrict __name); extern void __argp_help (const struct argp *__restrict __argp, FILE *__restrict __stream, unsigned __flags, char *__name); /* The following routines are intended to be called from within an argp parsing routine (thus taking an argp_state structure as the first argument). They may or may not print an error message and exit, depending on the flags in STATE -- in any case, the caller should be prepared for them *not* to exit, and should return an appropiate error after calling them. [argp_usage & argp_error should probably be called argp_state_..., but they're used often enough that they should be short] */ /* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are from the set ARGP_HELP_*. */ extern void argp_state_help (const struct argp_state *__restrict __state, FILE *__restrict __stream, unsigned int __flags); extern void __argp_state_help (const struct argp_state *__restrict __state, FILE *__restrict __stream, unsigned int __flags); /* Possibly output the standard usage message for ARGP to stderr and exit. */ extern void argp_usage (const struct argp_state *__state); extern void __argp_usage (const struct argp_state *__state); /* If appropriate, print the printf string FMT and following args, preceded by the program name and `:', to stderr, and followed by a `Try ... --help' message, then exit (1). */ extern void argp_error (const struct argp_state *__restrict __state, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern void __argp_error (const struct argp_state *__restrict __state, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); /* Similar to the standard gnu error-reporting function error(), but will respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print to STATE->err_stream. This is useful for argument parsing code that is shared between program startup (when exiting is desired) and runtime option parsing (when typically an error code is returned instead). The difference between this function and argp_error is that the latter is for *parsing errors*, and the former is for other problems that occur during parsing but don't reflect a (syntactic) problem with the input. */ extern void argp_failure (const struct argp_state *__restrict __state, int __status, int __errnum, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 4, 5))); extern void __argp_failure (const struct argp_state *__restrict __state, int __status, int __errnum, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 4, 5))); /* Returns true if the option OPT is a valid short option. */ extern int _option_is_short (const struct argp_option *__opt) __THROW; extern int __option_is_short (const struct argp_option *__opt) __THROW; /* Returns true if the option OPT is in fact the last (unused) entry in an options array. */ extern int _option_is_end (const struct argp_option *__opt) __THROW; extern int __option_is_end (const struct argp_option *__opt) __THROW; /* Return the input field for ARGP in the parser corresponding to STATE; used by the help routines. */ extern void *_argp_input (const struct argp *__restrict __argp, const struct argp_state *__restrict __state) __THROW; extern void *__argp_input (const struct argp *__restrict __argp, const struct argp_state *__restrict __state) __THROW; #ifdef __USE_EXTERN_INLINES # if !(defined _LIBC && _LIBC) # define __argp_usage argp_usage # define __argp_state_help argp_state_help # define __option_is_short _option_is_short # define __option_is_end _option_is_end # endif # ifndef ARGP_EI # define ARGP_EI __extern_inline # endif ARGP_EI void __argp_usage (const struct argp_state *__state) { __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); } ARGP_EI int __NTH (__option_is_short (const struct argp_option *__opt)) { if (__opt->flags & OPTION_DOC) return 0; else { int __key = __opt->key; return __key > 0 && __key <= UCHAR_MAX && isprint (__key); } } ARGP_EI int __NTH (__option_is_end (const struct argp_option *__opt)) { return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; } # if !(defined _LIBC && _LIBC) # undef __argp_usage # undef __argp_state_help # undef __option_is_short # undef __option_is_end # endif #endif /* Use extern inlines. */ __END_DECLS #endif /* argp.h */ PKZpcre2.hnu[/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* This is the public header file for the PCRE library, second API, to be #included by applications that call PCRE2 functions. Copyright (c) 2016-2018 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ #ifndef PCRE2_H_IDEMPOTENT_GUARD #define PCRE2_H_IDEMPOTENT_GUARD /* The current PCRE version information. */ #define PCRE2_MAJOR 10 #define PCRE2_MINOR 32 #define PCRE2_PRERELEASE #define PCRE2_DATE 2018-09-10 /* For the benefit of systems without stdint.h, an alternative is to use inttypes.h. The existence of these headers is checked by configure or CMake. */ #define PCRE2_HAVE_STDINT_H 1 #define PCRE2_HAVE_INTTYPES_H 1 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE2, the appropriate export setting is defined in pcre2_internal.h, which includes this file. So we don't change existing definitions of PCRE2_EXP_DECL. */ #if defined(_WIN32) && !defined(PCRE2_STATIC) # ifndef PCRE2_EXP_DECL # define PCRE2_EXP_DECL extern __declspec(dllimport) # endif #endif /* By default, we use the standard "extern" declarations. */ #ifndef PCRE2_EXP_DECL # ifdef __cplusplus # define PCRE2_EXP_DECL extern "C" # else # define PCRE2_EXP_DECL extern # endif #endif /* When compiling with the MSVC compiler, it is sometimes necessary to include a "calling convention" before exported function names. (This is secondhand information; I know nothing about MSVC myself). For example, something like void __cdecl function(....) might be needed. In order so make this easy, all the exported functions have PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not set, we ensure here that it has no effect. */ #ifndef PCRE2_CALL_CONVENTION #define PCRE2_CALL_CONVENTION #endif /* Have to include limits.h, stdlib.h and stdint.h (or inttypes.h) to ensure that size_t and uint8_t, UCHAR_MAX, etc are defined. If the system has neither header, the relevant values must be provided by some other means. */ #include #include #if PCRE2_HAVE_STDINT_H #include #elif PCRE2_HAVE_INTTYPES_H #include #endif /* Allow for C++ users compiling this directly. */ #ifdef __cplusplus extern "C" { #endif /* The following option bits can be passed to pcre2_compile(), pcre2_match(), or pcre2_dfa_match(). PCRE2_NO_UTF_CHECK affects only the function to which it is passed. Put these bits at the most significant end of the options word so others can be added next to them */ #define PCRE2_ANCHORED 0x80000000u #define PCRE2_NO_UTF_CHECK 0x40000000u #define PCRE2_ENDANCHORED 0x20000000u /* The following option bits can be passed only to pcre2_compile(). However, they may affect compilation, JIT compilation, and/or interpretive execution. The following tags indicate which: C alters what is compiled by pcre2_compile() J alters what is compiled by pcre2_jit_compile() M is inspected during pcre2_match() execution D is inspected during pcre2_dfa_match() execution */ #define PCRE2_ALLOW_EMPTY_CLASS 0x00000001u /* C */ #define PCRE2_ALT_BSUX 0x00000002u /* C */ #define PCRE2_AUTO_CALLOUT 0x00000004u /* C */ #define PCRE2_CASELESS 0x00000008u /* C */ #define PCRE2_DOLLAR_ENDONLY 0x00000010u /* J M D */ #define PCRE2_DOTALL 0x00000020u /* C */ #define PCRE2_DUPNAMES 0x00000040u /* C */ #define PCRE2_EXTENDED 0x00000080u /* C */ #define PCRE2_FIRSTLINE 0x00000100u /* J M D */ #define PCRE2_MATCH_UNSET_BACKREF 0x00000200u /* C J M */ #define PCRE2_MULTILINE 0x00000400u /* C */ #define PCRE2_NEVER_UCP 0x00000800u /* C */ #define PCRE2_NEVER_UTF 0x00001000u /* C */ #define PCRE2_NO_AUTO_CAPTURE 0x00002000u /* C */ #define PCRE2_NO_AUTO_POSSESS 0x00004000u /* C */ #define PCRE2_NO_DOTSTAR_ANCHOR 0x00008000u /* C */ #define PCRE2_NO_START_OPTIMIZE 0x00010000u /* J M D */ #define PCRE2_UCP 0x00020000u /* C J M D */ #define PCRE2_UNGREEDY 0x00040000u /* C */ #define PCRE2_UTF 0x00080000u /* C J M D */ #define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */ #define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */ #define PCRE2_ALT_VERBNAMES 0x00400000u /* C */ #define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */ #define PCRE2_EXTENDED_MORE 0x01000000u /* C */ #define PCRE2_LITERAL 0x02000000u /* C */ /* An additional compile options word is available in the compile context. */ #define PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES 0x00000001u /* C */ #define PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL 0x00000002u /* C */ #define PCRE2_EXTRA_MATCH_WORD 0x00000004u /* C */ #define PCRE2_EXTRA_MATCH_LINE 0x00000008u /* C */ /* These are for pcre2_jit_compile(). */ #define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */ #define PCRE2_JIT_PARTIAL_SOFT 0x00000002u #define PCRE2_JIT_PARTIAL_HARD 0x00000004u /* These are for pcre2_match(), pcre2_dfa_match(), and pcre2_jit_match(). Note that PCRE2_ANCHORED and PCRE2_NO_UTF_CHECK can also be passed to these functions (though pcre2_jit_match() ignores the latter since it bypasses all sanity checks). */ #define PCRE2_NOTBOL 0x00000001u #define PCRE2_NOTEOL 0x00000002u #define PCRE2_NOTEMPTY 0x00000004u /* ) These two must be kept */ #define PCRE2_NOTEMPTY_ATSTART 0x00000008u /* ) adjacent to each other. */ #define PCRE2_PARTIAL_SOFT 0x00000010u #define PCRE2_PARTIAL_HARD 0x00000020u /* These are additional options for pcre2_dfa_match(). */ #define PCRE2_DFA_RESTART 0x00000040u #define PCRE2_DFA_SHORTEST 0x00000080u /* These are additional options for pcre2_substitute(), which passes any others through to pcre2_match(). */ #define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u #define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u #define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u #define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u #define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u /* A further option for pcre2_match(), not allowed for pcre2_dfa_match(), ignored for pcre2_jit_match(). */ #define PCRE2_NO_JIT 0x00002000u /* Options for pcre2_pattern_convert(). */ #define PCRE2_CONVERT_UTF 0x00000001u #define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u #define PCRE2_CONVERT_POSIX_BASIC 0x00000004u #define PCRE2_CONVERT_POSIX_EXTENDED 0x00000008u #define PCRE2_CONVERT_GLOB 0x00000010u #define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR 0x00000030u #define PCRE2_CONVERT_GLOB_NO_STARSTAR 0x00000050u /* Newline and \R settings, for use in compile contexts. The newline values must be kept in step with values set in config.h and both sets must all be greater than zero. */ #define PCRE2_NEWLINE_CR 1 #define PCRE2_NEWLINE_LF 2 #define PCRE2_NEWLINE_CRLF 3 #define PCRE2_NEWLINE_ANY 4 #define PCRE2_NEWLINE_ANYCRLF 5 #define PCRE2_NEWLINE_NUL 6 #define PCRE2_BSR_UNICODE 1 #define PCRE2_BSR_ANYCRLF 2 /* Error codes for pcre2_compile(). Some of these are also used by pcre2_pattern_convert(). */ #define PCRE2_ERROR_END_BACKSLASH 101 #define PCRE2_ERROR_END_BACKSLASH_C 102 #define PCRE2_ERROR_UNKNOWN_ESCAPE 103 #define PCRE2_ERROR_QUANTIFIER_OUT_OF_ORDER 104 #define PCRE2_ERROR_QUANTIFIER_TOO_BIG 105 #define PCRE2_ERROR_MISSING_SQUARE_BRACKET 106 #define PCRE2_ERROR_ESCAPE_INVALID_IN_CLASS 107 #define PCRE2_ERROR_CLASS_RANGE_ORDER 108 #define PCRE2_ERROR_QUANTIFIER_INVALID 109 #define PCRE2_ERROR_INTERNAL_UNEXPECTED_REPEAT 110 #define PCRE2_ERROR_INVALID_AFTER_PARENS_QUERY 111 #define PCRE2_ERROR_POSIX_CLASS_NOT_IN_CLASS 112 #define PCRE2_ERROR_POSIX_NO_SUPPORT_COLLATING 113 #define PCRE2_ERROR_MISSING_CLOSING_PARENTHESIS 114 #define PCRE2_ERROR_BAD_SUBPATTERN_REFERENCE 115 #define PCRE2_ERROR_NULL_PATTERN 116 #define PCRE2_ERROR_BAD_OPTIONS 117 #define PCRE2_ERROR_MISSING_COMMENT_CLOSING 118 #define PCRE2_ERROR_PARENTHESES_NEST_TOO_DEEP 119 #define PCRE2_ERROR_PATTERN_TOO_LARGE 120 #define PCRE2_ERROR_HEAP_FAILED 121 #define PCRE2_ERROR_UNMATCHED_CLOSING_PARENTHESIS 122 #define PCRE2_ERROR_INTERNAL_CODE_OVERFLOW 123 #define PCRE2_ERROR_MISSING_CONDITION_CLOSING 124 #define PCRE2_ERROR_LOOKBEHIND_NOT_FIXED_LENGTH 125 #define PCRE2_ERROR_ZERO_RELATIVE_REFERENCE 126 #define PCRE2_ERROR_TOO_MANY_CONDITION_BRANCHES 127 #define PCRE2_ERROR_CONDITION_ASSERTION_EXPECTED 128 #define PCRE2_ERROR_BAD_RELATIVE_REFERENCE 129 #define PCRE2_ERROR_UNKNOWN_POSIX_CLASS 130 #define PCRE2_ERROR_INTERNAL_STUDY_ERROR 131 #define PCRE2_ERROR_UNICODE_NOT_SUPPORTED 132 #define PCRE2_ERROR_PARENTHESES_STACK_CHECK 133 #define PCRE2_ERROR_CODE_POINT_TOO_BIG 134 #define PCRE2_ERROR_LOOKBEHIND_TOO_COMPLICATED 135 #define PCRE2_ERROR_LOOKBEHIND_INVALID_BACKSLASH_C 136 #define PCRE2_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE 137 #define PCRE2_ERROR_CALLOUT_NUMBER_TOO_BIG 138 #define PCRE2_ERROR_MISSING_CALLOUT_CLOSING 139 #define PCRE2_ERROR_ESCAPE_INVALID_IN_VERB 140 #define PCRE2_ERROR_UNRECOGNIZED_AFTER_QUERY_P 141 #define PCRE2_ERROR_MISSING_NAME_TERMINATOR 142 #define PCRE2_ERROR_DUPLICATE_SUBPATTERN_NAME 143 #define PCRE2_ERROR_INVALID_SUBPATTERN_NAME 144 #define PCRE2_ERROR_UNICODE_PROPERTIES_UNAVAILABLE 145 #define PCRE2_ERROR_MALFORMED_UNICODE_PROPERTY 146 #define PCRE2_ERROR_UNKNOWN_UNICODE_PROPERTY 147 #define PCRE2_ERROR_SUBPATTERN_NAME_TOO_LONG 148 #define PCRE2_ERROR_TOO_MANY_NAMED_SUBPATTERNS 149 #define PCRE2_ERROR_CLASS_INVALID_RANGE 150 #define PCRE2_ERROR_OCTAL_BYTE_TOO_BIG 151 #define PCRE2_ERROR_INTERNAL_OVERRAN_WORKSPACE 152 #define PCRE2_ERROR_INTERNAL_MISSING_SUBPATTERN 153 #define PCRE2_ERROR_DEFINE_TOO_MANY_BRANCHES 154 #define PCRE2_ERROR_BACKSLASH_O_MISSING_BRACE 155 #define PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE 156 #define PCRE2_ERROR_BACKSLASH_G_SYNTAX 157 #define PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING 158 /* Error 159 is obsolete and should now never occur */ #define PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED 159 #define PCRE2_ERROR_VERB_UNKNOWN 160 #define PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG 161 #define PCRE2_ERROR_SUBPATTERN_NAME_EXPECTED 162 #define PCRE2_ERROR_INTERNAL_PARSED_OVERFLOW 163 #define PCRE2_ERROR_INVALID_OCTAL 164 #define PCRE2_ERROR_SUBPATTERN_NAMES_MISMATCH 165 #define PCRE2_ERROR_MARK_MISSING_ARGUMENT 166 #define PCRE2_ERROR_INVALID_HEXADECIMAL 167 #define PCRE2_ERROR_BACKSLASH_C_SYNTAX 168 #define PCRE2_ERROR_BACKSLASH_K_SYNTAX 169 #define PCRE2_ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS 170 #define PCRE2_ERROR_BACKSLASH_N_IN_CLASS 171 #define PCRE2_ERROR_CALLOUT_STRING_TOO_LONG 172 #define PCRE2_ERROR_UNICODE_DISALLOWED_CODE_POINT 173 #define PCRE2_ERROR_UTF_IS_DISABLED 174 #define PCRE2_ERROR_UCP_IS_DISABLED 175 #define PCRE2_ERROR_VERB_NAME_TOO_LONG 176 #define PCRE2_ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG 177 #define PCRE2_ERROR_MISSING_OCTAL_OR_HEX_DIGITS 178 #define PCRE2_ERROR_VERSION_CONDITION_SYNTAX 179 #define PCRE2_ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS 180 #define PCRE2_ERROR_CALLOUT_NO_STRING_DELIMITER 181 #define PCRE2_ERROR_CALLOUT_BAD_STRING_DELIMITER 182 #define PCRE2_ERROR_BACKSLASH_C_CALLER_DISABLED 183 #define PCRE2_ERROR_QUERY_BARJX_NEST_TOO_DEEP 184 #define PCRE2_ERROR_BACKSLASH_C_LIBRARY_DISABLED 185 #define PCRE2_ERROR_PATTERN_TOO_COMPLICATED 186 #define PCRE2_ERROR_LOOKBEHIND_TOO_LONG 187 #define PCRE2_ERROR_PATTERN_STRING_TOO_LONG 188 #define PCRE2_ERROR_INTERNAL_BAD_CODE 189 #define PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP 190 #define PCRE2_ERROR_NO_SURROGATES_IN_UTF16 191 #define PCRE2_ERROR_BAD_LITERAL_OPTIONS 192 #define PCRE2_ERROR_SUPPORTED_ONLY_IN_UNICODE 193 #define PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS 194 /* "Expected" matching error codes: no match and partial match. */ #define PCRE2_ERROR_NOMATCH (-1) #define PCRE2_ERROR_PARTIAL (-2) /* Error codes for UTF-8 validity checks */ #define PCRE2_ERROR_UTF8_ERR1 (-3) #define PCRE2_ERROR_UTF8_ERR2 (-4) #define PCRE2_ERROR_UTF8_ERR3 (-5) #define PCRE2_ERROR_UTF8_ERR4 (-6) #define PCRE2_ERROR_UTF8_ERR5 (-7) #define PCRE2_ERROR_UTF8_ERR6 (-8) #define PCRE2_ERROR_UTF8_ERR7 (-9) #define PCRE2_ERROR_UTF8_ERR8 (-10) #define PCRE2_ERROR_UTF8_ERR9 (-11) #define PCRE2_ERROR_UTF8_ERR10 (-12) #define PCRE2_ERROR_UTF8_ERR11 (-13) #define PCRE2_ERROR_UTF8_ERR12 (-14) #define PCRE2_ERROR_UTF8_ERR13 (-15) #define PCRE2_ERROR_UTF8_ERR14 (-16) #define PCRE2_ERROR_UTF8_ERR15 (-17) #define PCRE2_ERROR_UTF8_ERR16 (-18) #define PCRE2_ERROR_UTF8_ERR17 (-19) #define PCRE2_ERROR_UTF8_ERR18 (-20) #define PCRE2_ERROR_UTF8_ERR19 (-21) #define PCRE2_ERROR_UTF8_ERR20 (-22) #define PCRE2_ERROR_UTF8_ERR21 (-23) /* Error codes for UTF-16 validity checks */ #define PCRE2_ERROR_UTF16_ERR1 (-24) #define PCRE2_ERROR_UTF16_ERR2 (-25) #define PCRE2_ERROR_UTF16_ERR3 (-26) /* Error codes for UTF-32 validity checks */ #define PCRE2_ERROR_UTF32_ERR1 (-27) #define PCRE2_ERROR_UTF32_ERR2 (-28) /* Miscellaneous error codes for pcre2[_dfa]_match(), substring extraction functions, context functions, and serializing functions. They are in numerical order. Originally they were in alphabetical order too, but now that PCRE2 is released, the numbers must not be changed. */ #define PCRE2_ERROR_BADDATA (-29) #define PCRE2_ERROR_MIXEDTABLES (-30) /* Name was changed */ #define PCRE2_ERROR_BADMAGIC (-31) #define PCRE2_ERROR_BADMODE (-32) #define PCRE2_ERROR_BADOFFSET (-33) #define PCRE2_ERROR_BADOPTION (-34) #define PCRE2_ERROR_BADREPLACEMENT (-35) #define PCRE2_ERROR_BADUTFOFFSET (-36) #define PCRE2_ERROR_CALLOUT (-37) /* Never used by PCRE2 itself */ #define PCRE2_ERROR_DFA_BADRESTART (-38) #define PCRE2_ERROR_DFA_RECURSE (-39) #define PCRE2_ERROR_DFA_UCOND (-40) #define PCRE2_ERROR_DFA_UFUNC (-41) #define PCRE2_ERROR_DFA_UITEM (-42) #define PCRE2_ERROR_DFA_WSSIZE (-43) #define PCRE2_ERROR_INTERNAL (-44) #define PCRE2_ERROR_JIT_BADOPTION (-45) #define PCRE2_ERROR_JIT_STACKLIMIT (-46) #define PCRE2_ERROR_MATCHLIMIT (-47) #define PCRE2_ERROR_NOMEMORY (-48) #define PCRE2_ERROR_NOSUBSTRING (-49) #define PCRE2_ERROR_NOUNIQUESUBSTRING (-50) #define PCRE2_ERROR_NULL (-51) #define PCRE2_ERROR_RECURSELOOP (-52) #define PCRE2_ERROR_DEPTHLIMIT (-53) #define PCRE2_ERROR_RECURSIONLIMIT (-53) /* Obsolete synonym */ #define PCRE2_ERROR_UNAVAILABLE (-54) #define PCRE2_ERROR_UNSET (-55) #define PCRE2_ERROR_BADOFFSETLIMIT (-56) #define PCRE2_ERROR_BADREPESCAPE (-57) #define PCRE2_ERROR_REPMISSINGBRACE (-58) #define PCRE2_ERROR_BADSUBSTITUTION (-59) #define PCRE2_ERROR_BADSUBSPATTERN (-60) #define PCRE2_ERROR_TOOMANYREPLACE (-61) #define PCRE2_ERROR_BADSERIALIZEDDATA (-62) #define PCRE2_ERROR_HEAPLIMIT (-63) #define PCRE2_ERROR_CONVERT_SYNTAX (-64) #define PCRE2_ERROR_INTERNAL_DUPMATCH (-65) /* Request types for pcre2_pattern_info() */ #define PCRE2_INFO_ALLOPTIONS 0 #define PCRE2_INFO_ARGOPTIONS 1 #define PCRE2_INFO_BACKREFMAX 2 #define PCRE2_INFO_BSR 3 #define PCRE2_INFO_CAPTURECOUNT 4 #define PCRE2_INFO_FIRSTCODEUNIT 5 #define PCRE2_INFO_FIRSTCODETYPE 6 #define PCRE2_INFO_FIRSTBITMAP 7 #define PCRE2_INFO_HASCRORLF 8 #define PCRE2_INFO_JCHANGED 9 #define PCRE2_INFO_JITSIZE 10 #define PCRE2_INFO_LASTCODEUNIT 11 #define PCRE2_INFO_LASTCODETYPE 12 #define PCRE2_INFO_MATCHEMPTY 13 #define PCRE2_INFO_MATCHLIMIT 14 #define PCRE2_INFO_MAXLOOKBEHIND 15 #define PCRE2_INFO_MINLENGTH 16 #define PCRE2_INFO_NAMECOUNT 17 #define PCRE2_INFO_NAMEENTRYSIZE 18 #define PCRE2_INFO_NAMETABLE 19 #define PCRE2_INFO_NEWLINE 20 #define PCRE2_INFO_DEPTHLIMIT 21 #define PCRE2_INFO_RECURSIONLIMIT 21 /* Obsolete synonym */ #define PCRE2_INFO_SIZE 22 #define PCRE2_INFO_HASBACKSLASHC 23 #define PCRE2_INFO_FRAMESIZE 24 #define PCRE2_INFO_HEAPLIMIT 25 #define PCRE2_INFO_EXTRAOPTIONS 26 /* Request types for pcre2_config(). */ #define PCRE2_CONFIG_BSR 0 #define PCRE2_CONFIG_JIT 1 #define PCRE2_CONFIG_JITTARGET 2 #define PCRE2_CONFIG_LINKSIZE 3 #define PCRE2_CONFIG_MATCHLIMIT 4 #define PCRE2_CONFIG_NEWLINE 5 #define PCRE2_CONFIG_PARENSLIMIT 6 #define PCRE2_CONFIG_DEPTHLIMIT 7 #define PCRE2_CONFIG_RECURSIONLIMIT 7 /* Obsolete synonym */ #define PCRE2_CONFIG_STACKRECURSE 8 /* Obsolete */ #define PCRE2_CONFIG_UNICODE 9 #define PCRE2_CONFIG_UNICODE_VERSION 10 #define PCRE2_CONFIG_VERSION 11 #define PCRE2_CONFIG_HEAPLIMIT 12 #define PCRE2_CONFIG_NEVER_BACKSLASH_C 13 #define PCRE2_CONFIG_COMPILED_WIDTHS 14 /* Types for code units in patterns and subject strings. */ typedef uint8_t PCRE2_UCHAR8; typedef uint16_t PCRE2_UCHAR16; typedef uint32_t PCRE2_UCHAR32; typedef const PCRE2_UCHAR8 *PCRE2_SPTR8; typedef const PCRE2_UCHAR16 *PCRE2_SPTR16; typedef const PCRE2_UCHAR32 *PCRE2_SPTR32; /* The PCRE2_SIZE type is used for all string lengths and offsets in PCRE2, including pattern offsets for errors and subject offsets after a match. We define special values to indicate zero-terminated strings and unset offsets in the offset vector (ovector). */ #define PCRE2_SIZE size_t #define PCRE2_SIZE_MAX SIZE_MAX #define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0) #define PCRE2_UNSET (~(PCRE2_SIZE)0) /* Generic types for opaque structures and JIT callback functions. These declarations are defined in a macro that is expanded for each width later. */ #define PCRE2_TYPES_LIST \ struct pcre2_real_general_context; \ typedef struct pcre2_real_general_context pcre2_general_context; \ \ struct pcre2_real_compile_context; \ typedef struct pcre2_real_compile_context pcre2_compile_context; \ \ struct pcre2_real_match_context; \ typedef struct pcre2_real_match_context pcre2_match_context; \ \ struct pcre2_real_convert_context; \ typedef struct pcre2_real_convert_context pcre2_convert_context; \ \ struct pcre2_real_code; \ typedef struct pcre2_real_code pcre2_code; \ \ struct pcre2_real_match_data; \ typedef struct pcre2_real_match_data pcre2_match_data; \ \ struct pcre2_real_jit_stack; \ typedef struct pcre2_real_jit_stack pcre2_jit_stack; \ \ typedef pcre2_jit_stack *(*pcre2_jit_callback)(void *); /* The structure for passing out data via the pcre_callout_function. We use a structure so that new fields can be added on the end in future versions, without changing the API of the function, thereby allowing old clients to work without modification. Define the generic version in a macro; the width-specific versions are generated from this macro below. */ /* Flags for the callout_flags field. These are cleared after a callout. */ #define PCRE2_CALLOUT_STARTMATCH 0x00000001u /* Set for each bumpalong */ #define PCRE2_CALLOUT_BACKTRACK 0x00000002u /* Set after a backtrack */ #define PCRE2_STRUCTURE_LIST \ typedef struct pcre2_callout_block { \ uint32_t version; /* Identifies version of block */ \ /* ------------------------ Version 0 ------------------------------- */ \ uint32_t callout_number; /* Number compiled into pattern */ \ uint32_t capture_top; /* Max current capture */ \ uint32_t capture_last; /* Most recently closed capture */ \ PCRE2_SIZE *offset_vector; /* The offset vector */ \ PCRE2_SPTR mark; /* Pointer to current mark or NULL */ \ PCRE2_SPTR subject; /* The subject being matched */ \ PCRE2_SIZE subject_length; /* The length of the subject */ \ PCRE2_SIZE start_match; /* Offset to start of this match attempt */ \ PCRE2_SIZE current_position; /* Where we currently are in the subject */ \ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \ /* ------------------- Added for Version 1 -------------------------- */ \ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \ PCRE2_SPTR callout_string; /* String compiled into pattern */ \ /* ------------------- Added for Version 2 -------------------------- */ \ uint32_t callout_flags; /* See above for list */ \ /* ------------------------------------------------------------------ */ \ } pcre2_callout_block; \ \ typedef struct pcre2_callout_enumerate_block { \ uint32_t version; /* Identifies version of block */ \ /* ------------------------ Version 0 ------------------------------- */ \ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \ uint32_t callout_number; /* Number compiled into pattern */ \ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \ PCRE2_SPTR callout_string; /* String compiled into pattern */ \ /* ------------------------------------------------------------------ */ \ } pcre2_callout_enumerate_block; /* List the generic forms of all other functions in macros, which will be expanded for each width below. Start with functions that give general information. */ #define PCRE2_GENERAL_INFO_FUNCTIONS \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_config(uint32_t, void *); /* Functions for manipulating contexts. */ #define PCRE2_GENERAL_CONTEXT_FUNCTIONS \ PCRE2_EXP_DECL pcre2_general_context PCRE2_CALL_CONVENTION \ *pcre2_general_context_copy(pcre2_general_context *); \ PCRE2_EXP_DECL pcre2_general_context PCRE2_CALL_CONVENTION \ *pcre2_general_context_create(void *(*)(PCRE2_SIZE, void *), \ void (*)(void *, void *), void *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_general_context_free(pcre2_general_context *); #define PCRE2_COMPILE_CONTEXT_FUNCTIONS \ PCRE2_EXP_DECL pcre2_compile_context PCRE2_CALL_CONVENTION \ *pcre2_compile_context_copy(pcre2_compile_context *); \ PCRE2_EXP_DECL pcre2_compile_context PCRE2_CALL_CONVENTION \ *pcre2_compile_context_create(pcre2_general_context *);\ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_compile_context_free(pcre2_compile_context *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_bsr(pcre2_compile_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_character_tables(pcre2_compile_context *, const unsigned char *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_newline(pcre2_compile_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_compile_recursion_guard(pcre2_compile_context *, \ int (*)(uint32_t, void *), void *); #define PCRE2_MATCH_CONTEXT_FUNCTIONS \ PCRE2_EXP_DECL pcre2_match_context PCRE2_CALL_CONVENTION \ *pcre2_match_context_copy(pcre2_match_context *); \ PCRE2_EXP_DECL pcre2_match_context PCRE2_CALL_CONVENTION \ *pcre2_match_context_create(pcre2_general_context *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_match_context_free(pcre2_match_context *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_callout(pcre2_match_context *, \ int (*)(pcre2_callout_block *, void *), void *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_heap_limit(pcre2_match_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_match_limit(pcre2_match_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_offset_limit(pcre2_match_context *, PCRE2_SIZE); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_recursion_limit(pcre2_match_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_recursion_memory_management(pcre2_match_context *, \ void *(*)(PCRE2_SIZE, void *), void (*)(void *, void *), void *); #define PCRE2_CONVERT_CONTEXT_FUNCTIONS \ PCRE2_EXP_DECL pcre2_convert_context PCRE2_CALL_CONVENTION \ *pcre2_convert_context_copy(pcre2_convert_context *); \ PCRE2_EXP_DECL pcre2_convert_context PCRE2_CALL_CONVENTION \ *pcre2_convert_context_create(pcre2_general_context *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_convert_context_free(pcre2_convert_context *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_glob_escape(pcre2_convert_context *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_set_glob_separator(pcre2_convert_context *, uint32_t); /* Functions concerned with compiling a pattern to PCRE internal code. */ #define PCRE2_COMPILE_FUNCTIONS \ PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \ *pcre2_compile(PCRE2_SPTR, PCRE2_SIZE, uint32_t, int *, PCRE2_SIZE *, \ pcre2_compile_context *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_code_free(pcre2_code *); \ PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \ *pcre2_code_copy(const pcre2_code *); \ PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \ *pcre2_code_copy_with_tables(const pcre2_code *); /* Functions that give information about a compiled pattern. */ #define PCRE2_PATTERN_INFO_FUNCTIONS \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_pattern_info(const pcre2_code *, uint32_t, void *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_callout_enumerate(const pcre2_code *, \ int (*)(pcre2_callout_enumerate_block *, void *), void *); /* Functions for running a match and inspecting the result. */ #define PCRE2_MATCH_FUNCTIONS \ PCRE2_EXP_DECL pcre2_match_data PCRE2_CALL_CONVENTION \ *pcre2_match_data_create(uint32_t, pcre2_general_context *); \ PCRE2_EXP_DECL pcre2_match_data PCRE2_CALL_CONVENTION \ *pcre2_match_data_create_from_pattern(const pcre2_code *, \ pcre2_general_context *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_dfa_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ uint32_t, pcre2_match_data *, pcre2_match_context *, int *, PCRE2_SIZE); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ uint32_t, pcre2_match_data *, pcre2_match_context *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_match_data_free(pcre2_match_data *); \ PCRE2_EXP_DECL PCRE2_SPTR PCRE2_CALL_CONVENTION \ pcre2_get_mark(pcre2_match_data *); \ PCRE2_EXP_DECL uint32_t PCRE2_CALL_CONVENTION \ pcre2_get_ovector_count(pcre2_match_data *); \ PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \ *pcre2_get_ovector_pointer(pcre2_match_data *); \ PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \ pcre2_get_startchar(pcre2_match_data *); /* Convenience functions for handling matched substrings. */ #define PCRE2_SUBSTRING_FUNCTIONS \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_copy_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR *, \ PCRE2_SIZE *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_copy_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR *, \ PCRE2_SIZE *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_substring_free(PCRE2_UCHAR *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_get_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR **, \ PCRE2_SIZE *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_get_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR **, \ PCRE2_SIZE *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_length_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_SIZE *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_length_bynumber(pcre2_match_data *, uint32_t, PCRE2_SIZE *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_nametable_scan(const pcre2_code *, PCRE2_SPTR, PCRE2_SPTR *, \ PCRE2_SPTR *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_number_from_name(const pcre2_code *, PCRE2_SPTR); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_substring_list_free(PCRE2_SPTR *); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **); /* Functions for serializing / deserializing compiled patterns. */ #define PCRE2_SERIALIZE_FUNCTIONS \ PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \ pcre2_serialize_encode(const pcre2_code **, int32_t, uint8_t **, \ PCRE2_SIZE *, pcre2_general_context *); \ PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \ pcre2_serialize_decode(pcre2_code **, int32_t, const uint8_t *, \ pcre2_general_context *); \ PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \ pcre2_serialize_get_number_of_codes(const uint8_t *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_serialize_free(uint8_t *); /* Convenience function for match + substitute. */ #define PCRE2_SUBSTITUTE_FUNCTION \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_substitute(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ uint32_t, pcre2_match_data *, pcre2_match_context *, PCRE2_SPTR, \ PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE *); /* Functions for converting pattern source strings. */ #define PCRE2_CONVERT_FUNCTIONS \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_pattern_convert(PCRE2_SPTR, PCRE2_SIZE, uint32_t, PCRE2_UCHAR **, \ PCRE2_SIZE *, pcre2_convert_context *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_converted_pattern_free(PCRE2_UCHAR *); /* Functions for JIT processing */ #define PCRE2_JIT_FUNCTIONS \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_jit_compile(pcre2_code *, uint32_t); \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_jit_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \ uint32_t, pcre2_match_data *, pcre2_match_context *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_jit_free_unused_memory(pcre2_general_context *); \ PCRE2_EXP_DECL pcre2_jit_stack PCRE2_CALL_CONVENTION \ *pcre2_jit_stack_create(PCRE2_SIZE, PCRE2_SIZE, pcre2_general_context *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_jit_stack_assign(pcre2_match_context *, pcre2_jit_callback, void *); \ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \ pcre2_jit_stack_free(pcre2_jit_stack *); /* Other miscellaneous functions. */ #define PCRE2_OTHER_FUNCTIONS \ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \ pcre2_get_error_message(int, PCRE2_UCHAR *, PCRE2_SIZE); \ PCRE2_EXP_DECL const uint8_t PCRE2_CALL_CONVENTION \ *pcre2_maketables(pcre2_general_context *); \ /* Define macros that generate width-specific names from generic versions. The three-level macro scheme is necessary to get the macros expanded when we want them to be. First we get the width from PCRE2_LOCAL_WIDTH, which is used for generating three versions of everything below. After that, PCRE2_SUFFIX will be re-defined to use PCRE2_CODE_UNIT_WIDTH, for use when macros such as pcre2_compile are called by application code. */ #define PCRE2_JOIN(a,b) a ## b #define PCRE2_GLUE(a,b) PCRE2_JOIN(a,b) #define PCRE2_SUFFIX(a) PCRE2_GLUE(a,PCRE2_LOCAL_WIDTH) /* Data types */ #define PCRE2_UCHAR PCRE2_SUFFIX(PCRE2_UCHAR) #define PCRE2_SPTR PCRE2_SUFFIX(PCRE2_SPTR) #define pcre2_code PCRE2_SUFFIX(pcre2_code_) #define pcre2_jit_callback PCRE2_SUFFIX(pcre2_jit_callback_) #define pcre2_jit_stack PCRE2_SUFFIX(pcre2_jit_stack_) #define pcre2_real_code PCRE2_SUFFIX(pcre2_real_code_) #define pcre2_real_general_context PCRE2_SUFFIX(pcre2_real_general_context_) #define pcre2_real_compile_context PCRE2_SUFFIX(pcre2_real_compile_context_) #define pcre2_real_convert_context PCRE2_SUFFIX(pcre2_real_convert_context_) #define pcre2_real_match_context PCRE2_SUFFIX(pcre2_real_match_context_) #define pcre2_real_jit_stack PCRE2_SUFFIX(pcre2_real_jit_stack_) #define pcre2_real_match_data PCRE2_SUFFIX(pcre2_real_match_data_) /* Data blocks */ #define pcre2_callout_block PCRE2_SUFFIX(pcre2_callout_block_) #define pcre2_callout_enumerate_block PCRE2_SUFFIX(pcre2_callout_enumerate_block_) #define pcre2_general_context PCRE2_SUFFIX(pcre2_general_context_) #define pcre2_compile_context PCRE2_SUFFIX(pcre2_compile_context_) #define pcre2_convert_context PCRE2_SUFFIX(pcre2_convert_context_) #define pcre2_match_context PCRE2_SUFFIX(pcre2_match_context_) #define pcre2_match_data PCRE2_SUFFIX(pcre2_match_data_) /* Functions: the complete list in alphabetical order */ #define pcre2_callout_enumerate PCRE2_SUFFIX(pcre2_callout_enumerate_) #define pcre2_code_copy PCRE2_SUFFIX(pcre2_code_copy_) #define pcre2_code_copy_with_tables PCRE2_SUFFIX(pcre2_code_copy_with_tables_) #define pcre2_code_free PCRE2_SUFFIX(pcre2_code_free_) #define pcre2_compile PCRE2_SUFFIX(pcre2_compile_) #define pcre2_compile_context_copy PCRE2_SUFFIX(pcre2_compile_context_copy_) #define pcre2_compile_context_create PCRE2_SUFFIX(pcre2_compile_context_create_) #define pcre2_compile_context_free PCRE2_SUFFIX(pcre2_compile_context_free_) #define pcre2_config PCRE2_SUFFIX(pcre2_config_) #define pcre2_convert_context_copy PCRE2_SUFFIX(pcre2_convert_context_copy_) #define pcre2_convert_context_create PCRE2_SUFFIX(pcre2_convert_context_create_) #define pcre2_convert_context_free PCRE2_SUFFIX(pcre2_convert_context_free_) #define pcre2_converted_pattern_free PCRE2_SUFFIX(pcre2_converted_pattern_free_) #define pcre2_dfa_match PCRE2_SUFFIX(pcre2_dfa_match_) #define pcre2_general_context_copy PCRE2_SUFFIX(pcre2_general_context_copy_) #define pcre2_general_context_create PCRE2_SUFFIX(pcre2_general_context_create_) #define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_) #define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_) #define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_) #define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_) #define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_) #define pcre2_get_startchar PCRE2_SUFFIX(pcre2_get_startchar_) #define pcre2_jit_compile PCRE2_SUFFIX(pcre2_jit_compile_) #define pcre2_jit_match PCRE2_SUFFIX(pcre2_jit_match_) #define pcre2_jit_free_unused_memory PCRE2_SUFFIX(pcre2_jit_free_unused_memory_) #define pcre2_jit_stack_assign PCRE2_SUFFIX(pcre2_jit_stack_assign_) #define pcre2_jit_stack_create PCRE2_SUFFIX(pcre2_jit_stack_create_) #define pcre2_jit_stack_free PCRE2_SUFFIX(pcre2_jit_stack_free_) #define pcre2_maketables PCRE2_SUFFIX(pcre2_maketables_) #define pcre2_match PCRE2_SUFFIX(pcre2_match_) #define pcre2_match_context_copy PCRE2_SUFFIX(pcre2_match_context_copy_) #define pcre2_match_context_create PCRE2_SUFFIX(pcre2_match_context_create_) #define pcre2_match_context_free PCRE2_SUFFIX(pcre2_match_context_free_) #define pcre2_match_data_create PCRE2_SUFFIX(pcre2_match_data_create_) #define pcre2_match_data_create_from_pattern PCRE2_SUFFIX(pcre2_match_data_create_from_pattern_) #define pcre2_match_data_free PCRE2_SUFFIX(pcre2_match_data_free_) #define pcre2_pattern_convert PCRE2_SUFFIX(pcre2_pattern_convert_) #define pcre2_pattern_info PCRE2_SUFFIX(pcre2_pattern_info_) #define pcre2_serialize_decode PCRE2_SUFFIX(pcre2_serialize_decode_) #define pcre2_serialize_encode PCRE2_SUFFIX(pcre2_serialize_encode_) #define pcre2_serialize_free PCRE2_SUFFIX(pcre2_serialize_free_) #define pcre2_serialize_get_number_of_codes PCRE2_SUFFIX(pcre2_serialize_get_number_of_codes_) #define pcre2_set_bsr PCRE2_SUFFIX(pcre2_set_bsr_) #define pcre2_set_callout PCRE2_SUFFIX(pcre2_set_callout_) #define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_) #define pcre2_set_compile_extra_options PCRE2_SUFFIX(pcre2_set_compile_extra_options_) #define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_) #define pcre2_set_depth_limit PCRE2_SUFFIX(pcre2_set_depth_limit_) #define pcre2_set_glob_escape PCRE2_SUFFIX(pcre2_set_glob_escape_) #define pcre2_set_glob_separator PCRE2_SUFFIX(pcre2_set_glob_separator_) #define pcre2_set_heap_limit PCRE2_SUFFIX(pcre2_set_heap_limit_) #define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_) #define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_) #define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_) #define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_) #define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_) #define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_) #define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_) #define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_) #define pcre2_substring_free PCRE2_SUFFIX(pcre2_substring_free_) #define pcre2_substring_get_byname PCRE2_SUFFIX(pcre2_substring_get_byname_) #define pcre2_substring_get_bynumber PCRE2_SUFFIX(pcre2_substring_get_bynumber_) #define pcre2_substring_length_byname PCRE2_SUFFIX(pcre2_substring_length_byname_) #define pcre2_substring_length_bynumber PCRE2_SUFFIX(pcre2_substring_length_bynumber_) #define pcre2_substring_list_get PCRE2_SUFFIX(pcre2_substring_list_get_) #define pcre2_substring_list_free PCRE2_SUFFIX(pcre2_substring_list_free_) #define pcre2_substring_nametable_scan PCRE2_SUFFIX(pcre2_substring_nametable_scan_) #define pcre2_substring_number_from_name PCRE2_SUFFIX(pcre2_substring_number_from_name_) /* Keep this old function name for backwards compatibility */ #define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_) /* Keep this obsolete function for backwards compatibility: it is now a noop. */ #define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_) /* Now generate all three sets of width-specific structures and function prototypes. */ #define PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS \ PCRE2_TYPES_LIST \ PCRE2_STRUCTURE_LIST \ PCRE2_GENERAL_INFO_FUNCTIONS \ PCRE2_GENERAL_CONTEXT_FUNCTIONS \ PCRE2_COMPILE_CONTEXT_FUNCTIONS \ PCRE2_CONVERT_CONTEXT_FUNCTIONS \ PCRE2_CONVERT_FUNCTIONS \ PCRE2_MATCH_CONTEXT_FUNCTIONS \ PCRE2_COMPILE_FUNCTIONS \ PCRE2_PATTERN_INFO_FUNCTIONS \ PCRE2_MATCH_FUNCTIONS \ PCRE2_SUBSTRING_FUNCTIONS \ PCRE2_SERIALIZE_FUNCTIONS \ PCRE2_SUBSTITUTE_FUNCTION \ PCRE2_JIT_FUNCTIONS \ PCRE2_OTHER_FUNCTIONS #define PCRE2_LOCAL_WIDTH 8 PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS #undef PCRE2_LOCAL_WIDTH #define PCRE2_LOCAL_WIDTH 16 PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS #undef PCRE2_LOCAL_WIDTH #define PCRE2_LOCAL_WIDTH 32 PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS #undef PCRE2_LOCAL_WIDTH /* Undefine the list macros; they are no longer needed. */ #undef PCRE2_TYPES_LIST #undef PCRE2_STRUCTURE_LIST #undef PCRE2_GENERAL_INFO_FUNCTIONS #undef PCRE2_GENERAL_CONTEXT_FUNCTIONS #undef PCRE2_COMPILE_CONTEXT_FUNCTIONS #undef PCRE2_CONVERT_CONTEXT_FUNCTIONS #undef PCRE2_MATCH_CONTEXT_FUNCTIONS #undef PCRE2_COMPILE_FUNCTIONS #undef PCRE2_PATTERN_INFO_FUNCTIONS #undef PCRE2_MATCH_FUNCTIONS #undef PCRE2_SUBSTRING_FUNCTIONS #undef PCRE2_SERIALIZE_FUNCTIONS #undef PCRE2_SUBSTITUTE_FUNCTION #undef PCRE2_JIT_FUNCTIONS #undef PCRE2_OTHER_FUNCTIONS #undef PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS /* PCRE2_CODE_UNIT_WIDTH must be defined. If it is 8, 16, or 32, redefine PCRE2_SUFFIX to use it. If it is 0, undefine the other macros and make PCRE2_SUFFIX a no-op. Otherwise, generate an error. */ #undef PCRE2_SUFFIX #ifndef PCRE2_CODE_UNIT_WIDTH #error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h. #error Use 8, 16, or 32; or 0 for a multi-width application. #else /* PCRE2_CODE_UNIT_WIDTH is defined */ #if PCRE2_CODE_UNIT_WIDTH == 8 || \ PCRE2_CODE_UNIT_WIDTH == 16 || \ PCRE2_CODE_UNIT_WIDTH == 32 #define PCRE2_SUFFIX(a) PCRE2_GLUE(a, PCRE2_CODE_UNIT_WIDTH) #elif PCRE2_CODE_UNIT_WIDTH == 0 #undef PCRE2_JOIN #undef PCRE2_GLUE #define PCRE2_SUFFIX(a) a #else #error PCRE2_CODE_UNIT_WIDTH must be 0, 8, 16, or 32. #endif #endif /* PCRE2_CODE_UNIT_WIDTH is defined */ #ifdef __cplusplus } /* extern "C" */ #endif #endif /* PCRE2_H_IDEMPOTENT_GUARD */ /* End of pcre2.h */ PKZ1Nbftw.hnu[/* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * X/Open Portability Guide 4.2: ftw.h */ #ifndef _FTW_H #define _FTW_H 1 #include #include #include __BEGIN_DECLS /* Values for the FLAG argument to the user function passed to `ftw' and 'nftw'. */ enum { FTW_F, /* Regular file. */ #define FTW_F FTW_F FTW_D, /* Directory. */ #define FTW_D FTW_D FTW_DNR, /* Unreadable directory. */ #define FTW_DNR FTW_DNR FTW_NS, /* Unstatable file. */ #define FTW_NS FTW_NS #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED FTW_SL, /* Symbolic link. */ # define FTW_SL FTW_SL #endif #ifdef __USE_XOPEN_EXTENDED /* These flags are only passed from the `nftw' function. */ FTW_DP, /* Directory, all subdirs have been visited. */ # define FTW_DP FTW_DP FTW_SLN /* Symbolic link naming non-existing file. */ # define FTW_SLN FTW_SLN #endif /* extended X/Open */ }; #ifdef __USE_XOPEN_EXTENDED /* Flags for fourth argument of `nftw'. */ enum { FTW_PHYS = 1, /* Perform physical walk, ignore symlinks. */ # define FTW_PHYS FTW_PHYS FTW_MOUNT = 2, /* Report only files on same file system as the argument. */ # define FTW_MOUNT FTW_MOUNT FTW_CHDIR = 4, /* Change to current directory while processing it. */ # define FTW_CHDIR FTW_CHDIR FTW_DEPTH = 8 /* Report files in directory before directory itself.*/ # define FTW_DEPTH FTW_DEPTH # ifdef __USE_GNU , FTW_ACTIONRETVAL = 16 /* Assume callback to return FTW_* values instead of zero to continue and non-zero to terminate. */ # define FTW_ACTIONRETVAL FTW_ACTIONRETVAL # endif }; #ifdef __USE_GNU /* Return values from callback functions. */ enum { FTW_CONTINUE = 0, /* Continue with next sibling or for FTW_D with the first child. */ # define FTW_CONTINUE FTW_CONTINUE FTW_STOP = 1, /* Return from `ftw' or `nftw' with FTW_STOP as return value. */ # define FTW_STOP FTW_STOP FTW_SKIP_SUBTREE = 2, /* Only meaningful for FTW_D: Don't walk through the subtree, instead just continue with its next sibling. */ # define FTW_SKIP_SUBTREE FTW_SKIP_SUBTREE FTW_SKIP_SIBLINGS = 3,/* Continue with FTW_DP callback for current directory (if FTW_DEPTH) and then its siblings. */ # define FTW_SKIP_SIBLINGS FTW_SKIP_SIBLINGS }; #endif /* Structure used for fourth argument to callback function for `nftw'. */ struct FTW { int base; int level; }; #endif /* extended X/Open */ /* Convenient types for callback functions. */ typedef int (*__ftw_func_t) (const char *__filename, const struct stat *__status, int __flag); #ifdef __USE_LARGEFILE64 typedef int (*__ftw64_func_t) (const char *__filename, const struct stat64 *__status, int __flag); #endif #ifdef __USE_XOPEN_EXTENDED typedef int (*__nftw_func_t) (const char *__filename, const struct stat *__status, int __flag, struct FTW *__info); # ifdef __USE_LARGEFILE64 typedef int (*__nftw64_func_t) (const char *__filename, const struct stat64 *__status, int __flag, struct FTW *__info); # endif #endif /* Call a function on every element in a directory tree. This function is a possible cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors) __nonnull ((1, 2)); #else # ifdef __REDIRECT extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func, int __descriptors), ftw64) __nonnull ((1, 2)); # else # define ftw ftw64 # endif #endif #ifdef __USE_LARGEFILE64 extern int ftw64 (const char *__dir, __ftw64_func_t __func, int __descriptors) __nonnull ((1, 2)); #endif #ifdef __USE_XOPEN_EXTENDED /* Call a function on every element in a directory tree. FLAG allows to specify the behaviour more detailed. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors, int __flag) __nonnull ((1, 2)); # else # ifdef __REDIRECT extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func, int __descriptors, int __flag), nftw64) __nonnull ((1, 2)); # else # define nftw nftw64 # endif # endif # ifdef __USE_LARGEFILE64 extern int nftw64 (const char *__dir, __nftw64_func_t __func, int __descriptors, int __flag) __nonnull ((1, 2)); # endif #endif __END_DECLS #endif /* ftw.h */ PKZV(libltdl/lt_system.hnu[/* lt_system.h -- system portability abstraction layer Copyright (C) 2004, 2007, 2010-2015 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined LT_SYSTEM_H #define LT_SYSTEM_H 1 #include #include #include /* Some systems do not define EXIT_*, even with STDC_HEADERS. */ #if !defined EXIT_SUCCESS # define EXIT_SUCCESS 0 #endif #if !defined EXIT_FAILURE # define EXIT_FAILURE 1 #endif /* Just pick a big number... */ #define LT_FILENAME_MAX 2048 /* Saves on those hard to debug '\0' typos.... */ #define LT_EOS_CHAR '\0' /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at the end of C declarations. */ #if defined __cplusplus # define LT_BEGIN_C_DECLS extern "C" { # define LT_END_C_DECLS } #else # define LT_BEGIN_C_DECLS /* empty */ # define LT_END_C_DECLS /* empty */ #endif /* LT_STMT_START/END are used to create macros that expand to a a single compound statement in a portable way. */ #if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus # define LT_STMT_START (void)( # define LT_STMT_END ) #else # if (defined sun || defined __sun__) # define LT_STMT_START if (1) # define LT_STMT_END else (void)0 # else # define LT_STMT_START do # define LT_STMT_END while (0) # endif #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* Canonicalise Windows and Cygwin recognition macros. To match the values set by recent Cygwin compilers, make sure that if __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */ #if defined __CYGWIN32__ && !defined __CYGWIN__ # define __CYGWIN__ __CYGWIN32__ #endif #if defined __CYGWIN__ # if defined __WINDOWS__ # undef __WINDOWS__ # endif #elif defined _WIN32 # define __WINDOWS__ _WIN32 #elif defined WIN32 # define __WINDOWS__ WIN32 #endif #if defined __CYGWIN__ && defined __WINDOWS__ # undef __WINDOWS__ #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ #if !defined LT_SCOPE # if defined __WINDOWS__ || defined __CYGWIN__ # if defined DLL_EXPORT /* defined by libtool (if required) */ # define LT_SCOPE extern __declspec(dllexport) # endif # if defined LIBLTDL_DLL_IMPORT /* define if linking with this dll */ /* note: cygwin/mingw compilers can rely instead on auto-import */ # define LT_SCOPE extern __declspec(dllimport) # endif # endif # if !defined LT_SCOPE /* static linking or !__WINDOWS__ */ # define LT_SCOPE extern # endif #endif #if defined __WINDOWS__ /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory separator when it is set. */ # define LT_DIRSEP_CHAR '\\' # define LT_PATHSEP_CHAR ';' #else # define LT_PATHSEP_CHAR ':' #endif #if defined _MSC_VER /* Visual Studio */ # define R_OK 4 #endif /* fopen() mode flags for reading a text file */ #undef LT_READTEXT_MODE #if defined __WINDOWS__ || defined __CYGWIN__ # define LT_READTEXT_MODE "rt" #else # define LT_READTEXT_MODE "r" #endif /* The extra indirection to the LT__STR and LT__CONC macros is required so that if the arguments to LT_STR() (or LT_CONC()) are themselves macros, they will be expanded before being quoted. */ #ifndef LT_STR # define LT__STR(arg) #arg # define LT_STR(arg) LT__STR(arg) #endif #ifndef LT_CONC # define LT__CONC(a, b) a##b # define LT_CONC(a, b) LT__CONC(a, b) #endif #ifndef LT_CONC3 # define LT__CONC3(a, b, c) a##b##c # define LT_CONC3(a, b, c) LT__CONC3(a, b, c) #endif #endif /*!defined LT_SYSTEM_H*/ PKZ.pG??libltdl/lt_error.hnu[/* lt_error.h -- error propagation interface Copyright (C) 1999-2001, 2004, 2007, 2011-2015 Free Software Foundation, Inc. Written by Thomas Tanner, 1999 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Only include this header file once. */ #if !defined LT_ERROR_H #define LT_ERROR_H 1 #include LT_BEGIN_C_DECLS /* Defining error strings alongside their symbolic names in a macro in this way allows us to expand the macro in different contexts with confidence that the enumeration of symbolic names will map correctly onto the table of error strings. \0 is appended to the strings to expilicitely initialize the string terminator. */ #define lt_dlerror_table \ LT_ERROR(UNKNOWN, "unknown error\0") \ LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available\0") \ LT_ERROR(INVALID_LOADER, "invalid loader\0") \ LT_ERROR(INIT_LOADER, "loader initialization failed\0") \ LT_ERROR(REMOVE_LOADER, "loader removal failed\0") \ LT_ERROR(FILE_NOT_FOUND, "file not found\0") \ LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found\0") \ LT_ERROR(NO_SYMBOLS, "no symbols defined\0") \ LT_ERROR(CANNOT_OPEN, "can't open the module\0") \ LT_ERROR(CANNOT_CLOSE, "can't close the module\0") \ LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found\0") \ LT_ERROR(NO_MEMORY, "not enough memory\0") \ LT_ERROR(INVALID_HANDLE, "invalid module handle\0") \ LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow\0") \ LT_ERROR(INVALID_ERRORCODE, "invalid errorcode\0") \ LT_ERROR(SHUTDOWN, "library already shutdown\0") \ LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module\0") \ LT_ERROR(INVALID_MUTEX_ARGS, "internal error (code withdrawn)\0")\ LT_ERROR(INVALID_POSITION, "invalid search path insert position\0")\ LT_ERROR(CONFLICTING_FLAGS, "symbol visibility can be global or local\0") /* Enumerate the symbolic error names. */ enum { #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), lt_dlerror_table #undef LT_ERROR LT_ERROR_MAX }; /* Should be max of the error string lengths above (plus one for C++) */ #define LT_ERROR_LEN_MAX (41) /* These functions are only useful from inside custom module loaders. */ LT_SCOPE int lt_dladderror (const char *diagnostic); LT_SCOPE int lt_dlseterror (int errorcode); LT_END_C_DECLS #endif /*!defined LT_ERROR_H*/ PKZ libltdl/lt_dlloader.hnu[/* lt_dlloader.h -- dynamic library loader interface Copyright (C) 2004, 2007-2008, 2011-2015 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if !defined LT_DLLOADER_H #define LT_DLLOADER_H 1 #include LT_BEGIN_C_DECLS typedef void * lt_dlloader; typedef void * lt_module; typedef void * lt_user_data; typedef struct lt__advise * lt_dladvise; /* Function pointer types for module loader vtable entries: */ typedef lt_module lt_module_open (lt_user_data data, const char *filename, lt_dladvise advise); typedef int lt_module_close (lt_user_data data, lt_module module); typedef void * lt_find_sym (lt_user_data data, lt_module module, const char *symbolname); typedef int lt_dlloader_init (lt_user_data data); typedef int lt_dlloader_exit (lt_user_data data); /* Default priority is LT_DLLOADER_PREPEND if none is explicitly given. */ typedef enum { LT_DLLOADER_PREPEND = 0, LT_DLLOADER_APPEND } lt_dlloader_priority; /* This structure defines a module loader, as populated by the get_vtable entry point of each loader. */ typedef struct { const char * name; const char * sym_prefix; lt_module_open * module_open; lt_module_close * module_close; lt_find_sym * find_sym; lt_dlloader_init * dlloader_init; lt_dlloader_exit * dlloader_exit; lt_user_data dlloader_data; lt_dlloader_priority priority; } lt_dlvtable; LT_SCOPE int lt_dlloader_add (const lt_dlvtable *vtable); LT_SCOPE lt_dlloader lt_dlloader_next (const lt_dlloader loader); LT_SCOPE lt_dlvtable * lt_dlloader_remove (const char *name); LT_SCOPE const lt_dlvtable *lt_dlloader_find (const char *name); LT_SCOPE const lt_dlvtable *lt_dlloader_get (lt_dlloader loader); /* Type of a function to get a loader's vtable: */ typedef const lt_dlvtable *lt_get_vtable (lt_user_data data); #ifdef LT_DEBUG_LOADERS LT_SCOPE void lt_dlloader_dump (void); #endif LT_END_C_DECLS #endif /*!defined LT_DLLOADER_H*/ PKZCerr.hnu[/* 4.4BSD utility functions for error messages. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ERR_H #define _ERR_H 1 #include #define __need___va_list #include #ifndef __GNUC_VA_LIST # define __gnuc_va_list void * #endif __BEGIN_DECLS /* Print "program: ", FORMAT, ": ", the standard error string for errno, and a newline, on stderr. */ extern void warn (const char *__format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); extern void vwarn (const char *__format, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0))); /* Likewise, but without ": " and the standard error string. */ extern void warnx (const char *__format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); extern void vwarnx (const char *__format, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0))); /* Likewise, and then exit with STATUS. */ extern void err (int __status, const char *__format, ...) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); extern void verr (int __status, const char *__format, __gnuc_va_list) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); extern void errx (int __status, const char *__format, ...) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3))); extern void verrx (int __status, const char *, __gnuc_va_list) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); __END_DECLS #endif /* err.h */ PKZB complex.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.3 Complex arithmetic */ #ifndef _COMPLEX_H #define _COMPLEX_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include /* Get general and ISO C99 specific information. */ #include /* Gather machine-dependent _FloatN type support. */ #include __BEGIN_DECLS /* We might need to add support for more compilers here. But since ISO C99 is out hopefully all maintained compilers will soon provide the data types `float complex' and `double complex'. */ #if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97) # define _Complex __complex__ #endif #define complex _Complex /* Narrowest imaginary unit. This depends on the floating-point evaluation method. XXX This probably has to go into a gcc related file. */ #define _Complex_I (__extension__ 1.0iF) /* Another more descriptive name is `I'. XXX Once we have the imaginary support switch this to _Imaginary_I. */ #undef I #define I _Complex_I #if defined __USE_ISOC11 && __GNUC_PREREQ (4, 7) /* Macros to expand into expression of specified complex type. */ # define CMPLX(x, y) __builtin_complex ((double) (x), (double) (y)) # define CMPLXF(x, y) __builtin_complex ((float) (x), (float) (y)) # define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y)) #endif #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define CMPLXF16(x, y) __builtin_complex ((_Float16) (x), (_Float16) (y)) #endif #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define CMPLXF32(x, y) __builtin_complex ((_Float32) (x), (_Float32) (y)) #endif #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define CMPLXF64(x, y) __builtin_complex ((_Float64) (x), (_Float64) (y)) #endif #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define CMPLXF128(x, y) __builtin_complex ((_Float128) (x), (_Float128) (y)) #endif #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define CMPLXF32X(x, y) __builtin_complex ((_Float32x) (x), (_Float32x) (y)) #endif #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define CMPLXF64X(x, y) __builtin_complex ((_Float64x) (x), (_Float64x) (y)) #endif #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define CMPLXF128X(x, y) \ __builtin_complex ((_Float128x) (x), (_Float128x) (y)) #endif /* The file contains the prototypes for all the actual math functions. These macros are used for those prototypes, so we can easily declare each function as both `name' and `__name', and can declare the float versions `namef' and `__namef'. */ #define __MATHCALL(function, args) \ __MATHDECL (_Mdouble_complex_,function, args) #define __MATHDECL(type, function, args) \ __MATHDECL_1(type, function, args); \ __MATHDECL_1(type, __CONCAT(__,function), args) #define __MATHDECL_1(type, function, args) \ extern type __MATH_PRECNAME(function) args __THROW #define _Mdouble_ double #define __MATH_PRECNAME(name) name #include #undef _Mdouble_ #undef __MATH_PRECNAME /* Now the float versions. */ #define _Mdouble_ float #define __MATH_PRECNAME(name) name##f #include #undef _Mdouble_ #undef __MATH_PRECNAME /* And the long double versions. It is non-critical to define them here unconditionally since `long double' is required in ISO C99. */ #if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \ || defined __LDBL_COMPAT # ifdef __LDBL_COMPAT # undef __MATHDECL_1 # define __MATHDECL_1(type, function, args) \ extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, function) # endif # define _Mdouble_ long double # define __MATH_PRECNAME(name) name##l # include #endif #undef _Mdouble_ #undef __MATH_PRECNAME #if (__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # undef _Mdouble_complex_ # define _Mdouble_complex_ __CFLOAT16 # define _Mdouble_ _Float16 # define __MATH_PRECNAME(name) name##f16 # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef _Mdouble_complex_ #endif #if (__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # undef _Mdouble_complex_ # define _Mdouble_complex_ __CFLOAT32 # define _Mdouble_ _Float32 # define __MATH_PRECNAME(name) name##f32 # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef _Mdouble_complex_ #endif #if (__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # undef _Mdouble_complex_ # define _Mdouble_complex_ __CFLOAT64 # define _Mdouble_ _Float64 # define __MATH_PRECNAME(name) name##f64 # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef _Mdouble_complex_ #endif #if (__HAVE_DISTINCT_FLOAT128 || (__HAVE_FLOAT128 && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # undef _Mdouble_complex_ # define _Mdouble_complex_ __CFLOAT128 # define _Mdouble_ _Float128 # define __MATH_PRECNAME(name) name##f128 # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef _Mdouble_complex_ #endif #if (__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # undef _Mdouble_complex_ # define _Mdouble_complex_ __CFLOAT32X # define _Mdouble_ _Float32x # define __MATH_PRECNAME(name) name##f32x # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef _Mdouble_complex_ #endif #if (__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # undef _Mdouble_complex_ # define _Mdouble_complex_ __CFLOAT64X # define _Mdouble_ _Float64x # define __MATH_PRECNAME(name) name##f64x # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef _Mdouble_complex_ #endif #if (__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !defined _LIBC)) \ && __GLIBC_USE (IEC_60559_TYPES_EXT) # undef _Mdouble_complex_ # define _Mdouble_complex_ __CFLOAT128X # define _Mdouble_ _Float128x # define __MATH_PRECNAME(name) name##f128x # include # undef _Mdouble_ # undef __MATH_PRECNAME # undef _Mdouble_complex_ #endif #undef __MATHDECL_1 #undef __MATHDECL #undef __MATHCALL __END_DECLS #endif /* complex.h */ PKZjsyslog.hnu[#include PKZex(x(time.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ #ifndef _TIME_H #define _TIME_H 1 #include #define __need_size_t #define __need_NULL #include /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second, and possibly a number of other constants. */ #include /* Many of the typedefs and structs whose official home is this header may also need to be defined by other headers. */ #include #include #include #if defined __USE_POSIX199309 || defined __USE_ISOC11 # include #endif #ifdef __USE_POSIX199309 # include # include # include struct sigevent; #endif #ifdef __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif #endif #ifdef __USE_XOPEN2K8 # include #endif #ifdef __USE_ISOC11 /* Time base values for timespec_get. */ # define TIME_UTC 1 #endif __BEGIN_DECLS /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SEC is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; #ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; #endif #ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) __THROW; #endif #ifdef __USE_GNU extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, locale_t __loc) __THROW; #endif /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; #ifdef __USE_POSIX /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; #endif /* POSIX */ /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; #ifdef __USE_POSIX /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; #endif /* POSIX */ /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ #ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; #endif #if defined __USE_MISC || defined __USE_XOPEN extern int daylight; extern long int timezone; #endif #ifdef __USE_MISC /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) __THROW; #endif /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ #define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); #endif #ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __THROW; /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; #endif #ifdef __USE_ISOC11 /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); #endif #ifdef __USE_XOPEN_EXTENDED /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); #endif #ifdef __USE_GNU /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); #endif __END_DECLS #endif /* time.h. */ PKZX֢argz.hnu[/* Routines for dealing with '\0' separated arg vectors. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ARGZ_H #define _ARGZ_H 1 #include #include #include /* Need size_t, and strchr is called below. */ __BEGIN_DECLS /* error_t may or may not be available from errno.h, depending on the operating system. */ #ifndef __error_t_defined # define __error_t_defined 1 typedef int error_t; #endif /* Make a '\0' separated arg vector from a unix argv vector, returning it in ARGZ, and the total length in LEN. If a memory allocation error occurs, ENOMEM is returned, otherwise 0. The result can be destroyed using free. */ extern error_t __argz_create (char *const __argv[], char **__restrict __argz, size_t *__restrict __len) __THROW; extern error_t argz_create (char *const __argv[], char **__restrict __argz, size_t *__restrict __len) __THROW; /* Make a '\0' separated arg vector from a SEP separated list in STRING, returning it in ARGZ, and the total length in LEN. If a memory allocation error occurs, ENOMEM is returned, otherwise 0. The result can be destroyed using free. */ extern error_t argz_create_sep (const char *__restrict __string, int __sep, char **__restrict __argz, size_t *__restrict __len) __THROW; /* Returns the number of strings in ARGZ. */ extern size_t __argz_count (const char *__argz, size_t __len) __THROW __attribute_pure__; extern size_t argz_count (const char *__argz, size_t __len) __THROW __attribute_pure__; /* Puts pointers to each string in ARGZ into ARGV, which must be large enough to hold them all. */ extern void __argz_extract (const char *__restrict __argz, size_t __len, char **__restrict __argv) __THROW; extern void argz_extract (const char *__restrict __argz, size_t __len, char **__restrict __argv) __THROW; /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ extern void __argz_stringify (char *__argz, size_t __len, int __sep) __THROW; extern void argz_stringify (char *__argz, size_t __len, int __sep) __THROW; /* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */ extern error_t argz_append (char **__restrict __argz, size_t *__restrict __argz_len, const char *__restrict __buf, size_t __buf_len) __THROW; /* Append STR to the argz vector in ARGZ & ARGZ_LEN. */ extern error_t argz_add (char **__restrict __argz, size_t *__restrict __argz_len, const char *__restrict __str) __THROW; /* Append SEP separated list in STRING to the argz vector in ARGZ & ARGZ_LEN. */ extern error_t argz_add_sep (char **__restrict __argz, size_t *__restrict __argz_len, const char *__restrict __string, int __delim) __THROW; /* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */ extern void argz_delete (char **__restrict __argz, size_t *__restrict __argz_len, char *__restrict __entry) __THROW; /* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end. Since ARGZ's first entry is the same as ARGZ, argz_insert (ARGZ, ARGZ_LEN, ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not in ARGZ, EINVAL is returned, else if memory can't be allocated for the new ARGZ, ENOMEM is returned, else 0. */ extern error_t argz_insert (char **__restrict __argz, size_t *__restrict __argz_len, char *__restrict __before, const char *__restrict __entry) __THROW; /* Replace any occurrences of the string STR in ARGZ with WITH, reallocating ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be incremented by number of replacements performed. */ extern error_t argz_replace (char **__restrict __argz, size_t *__restrict __argz_len, const char *__restrict __str, const char *__restrict __with, unsigned int *__restrict __replace_count); /* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there are no more. If entry is NULL, then the first entry is returned. This behavior allows two convenient iteration styles: char *entry = 0; while ((entry = argz_next (argz, argz_len, entry))) ...; or char *entry; for (entry = argz; entry; entry = argz_next (argz, argz_len, entry)) ...; */ extern char *__argz_next (const char *__restrict __argz, size_t __argz_len, const char *__restrict __entry) __THROW; extern char *argz_next (const char *__restrict __argz, size_t __argz_len, const char *__restrict __entry) __THROW; #ifdef __USE_EXTERN_INLINES __extern_inline char * __NTH (__argz_next (const char *__argz, size_t __argz_len, const char *__entry)) { if (__entry) { if (__entry < __argz + __argz_len) __entry = strchr (__entry, '\0') + 1; return __entry >= __argz + __argz_len ? (char *) NULL : (char *) __entry; } else return __argz_len > 0 ? (char *) __argz : 0; } __extern_inline char * __NTH (argz_next (const char *__argz, size_t __argz_len, const char *__entry)) { return __argz_next (__argz, __argz_len, __entry); } #endif /* Use extern inlines. */ __END_DECLS #endif /* argz.h */ PKZ8{{tgmath.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.22 Type-generic math */ #ifndef _TGMATH_H #define _TGMATH_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include /* Include the needed headers. */ #include #include #include /* There are two variant implementations of type-generic macros in this file: one for GCC 8 and later, using __builtin_tgmath and where each macro expands each of its arguments only once, and one for older GCC, using other compiler extensions but with macros expanding their arguments many times (so resulting in exponential blowup of the size of expansions when calls to such macros are nested inside arguments to such macros). */ #define __HAVE_BUILTIN_TGMATH __GNUC_PREREQ (8, 0) #if __GNUC_PREREQ (2, 7) # if __HAVE_BUILTIN_TGMATH # if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define __TG_F16_ARG(X) X ## f16, # else # define __TG_F16_ARG(X) # endif # if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define __TG_F32_ARG(X) X ## f32, # else # define __TG_F32_ARG(X) # endif # if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define __TG_F64_ARG(X) X ## f64, # else # define __TG_F64_ARG(X) # endif # if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) # define __TG_F128_ARG(X) X ## f128, # else # define __TG_F128_ARG(X) # endif # if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define __TG_F32X_ARG(X) X ## f32x, # else # define __TG_F32X_ARG(X) # endif # if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define __TG_F64X_ARG(X) X ## f64x, # else # define __TG_F64X_ARG(X) # endif # if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) # define __TG_F128X_ARG(X) X ## f128x, # else # define __TG_F128X_ARG(X) # endif # define __TGMATH_FUNCS(X) X ## f, X, X ## l, \ __TG_F16_ARG (X) __TG_F32_ARG (X) __TG_F64_ARG (X) __TG_F128_ARG (X) \ __TG_F32X_ARG (X) __TG_F64X_ARG (X) __TG_F128X_ARG (X) # define __TGMATH_RCFUNCS(F, C) __TGMATH_FUNCS (F) __TGMATH_FUNCS (C) # define __TGMATH_1(F, X) __builtin_tgmath (__TGMATH_FUNCS (F) (X)) # define __TGMATH_2(F, X, Y) __builtin_tgmath (__TGMATH_FUNCS (F) (X), (Y)) # define __TGMATH_2STD(F, X, Y) __builtin_tgmath (F ## f, F, F ## l, (X), (Y)) # define __TGMATH_3(F, X, Y, Z) __builtin_tgmath (__TGMATH_FUNCS (F) \ (X), (Y), (Z)) # define __TGMATH_1C(F, C, X) __builtin_tgmath (__TGMATH_RCFUNCS (F, C) (X)) # define __TGMATH_2C(F, C, X, Y) __builtin_tgmath (__TGMATH_RCFUNCS (F, C) \ (X), (Y)) # else /* !__HAVE_BUILTIN_TGMATH. */ # ifdef __NO_LONG_DOUBLE_MATH # define __tgml(fct) fct # else # define __tgml(fct) fct ## l # endif /* __floating_type expands to 1 if TYPE is a floating type (including complex floating types), 0 if TYPE is an integer type (including complex integer types). __real_integer_type expands to 1 if TYPE is a real integer type. __complex_integer_type expands to 1 if TYPE is a complex integer type. All these macros expand to integer constant expressions. All these macros can assume their argument has an arithmetic type (not vector, decimal floating-point or fixed-point), valid to pass to tgmath.h macros. */ # if __GNUC_PREREQ (3, 1) /* __builtin_classify_type expands to an integer constant expression in GCC 3.1 and later. Default conversions applied to the argument of __builtin_classify_type mean it always returns 1 for real integer types rather than ever returning different values for character, boolean or enumerated types. */ # define __floating_type(type) \ (__builtin_classify_type (__real__ ((type) 0)) == 8) # define __real_integer_type(type) \ (__builtin_classify_type ((type) 0) == 1) # define __complex_integer_type(type) \ (__builtin_classify_type ((type) 0) == 9 \ && __builtin_classify_type (__real__ ((type) 0)) == 1) # else /* GCC versions predating __builtin_classify_type are also looser on what counts as an integer constant expression. */ # define __floating_type(type) (((type) 1.25) != 1) # define __real_integer_type(type) (((type) (1.25 + _Complex_I)) == 1) # define __complex_integer_type(type) \ (((type) (1.25 + _Complex_I)) == (1 + _Complex_I)) # endif /* Whether an expression (of arithmetic type) has a real type. */ # define __expr_is_real(E) (__builtin_classify_type (E) != 9) /* The tgmath real type for T, where E is 0 if T is an integer type and 1 for a floating type. If T has a complex type, it is unspecified whether the return type is real or complex (but it has the correct corresponding real type). */ # define __tgmath_real_type_sub(T, E) \ __typeof__ (*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0 \ : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0)) /* The tgmath real type of EXPR. */ # define __tgmath_real_type(expr) \ __tgmath_real_type_sub (__typeof__ ((__typeof__ (+(expr))) 0), \ __floating_type (__typeof__ (+(expr)))) /* The tgmath complex type for T, where E1 is 1 if T has a floating type and 0 otherwise, E2 is 1 if T has a real integer type and 0 otherwise, and E3 is 1 if T has a complex type and 0 otherwise. */ # define __tgmath_complex_type_sub(T, E1, E2, E3) \ __typeof__ (*(0 \ ? (__typeof__ (0 ? (T *) 0 : (void *) (!(E1)))) 0 \ : (__typeof__ (0 \ ? (__typeof__ (0 \ ? (double *) 0 \ : (void *) (!(E2)))) 0 \ : (__typeof__ (0 \ ? (_Complex double *) 0 \ : (void *) (!(E3)))) 0)) 0)) /* The tgmath complex type of EXPR. */ # define __tgmath_complex_type(expr) \ __tgmath_complex_type_sub (__typeof__ ((__typeof__ (+(expr))) 0), \ __floating_type (__typeof__ (+(expr))), \ __real_integer_type (__typeof__ (+(expr))), \ __complex_integer_type (__typeof__ (+(expr)))) # if (__HAVE_DISTINCT_FLOAT16 \ || __HAVE_DISTINCT_FLOAT32 \ || __HAVE_DISTINCT_FLOAT64 \ || __HAVE_DISTINCT_FLOAT32X \ || __HAVE_DISTINCT_FLOAT64X \ || __HAVE_DISTINCT_FLOAT128X) # error "Unsupported _FloatN or _FloatNx types for ." # endif /* Expand to text that checks if ARG_COMB has type _Float128, and if so calls the appropriately suffixed FCT (which may include a cast), or FCT and CFCT for complex functions, with arguments ARG_CALL. */ # if __HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) # if (!__HAVE_FLOAT64X \ || __HAVE_FLOAT64X_LONG_DOUBLE \ || !__HAVE_FLOATN_NOT_TYPEDEF) # define __TGMATH_F128(arg_comb, fct, arg_call) \ __builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128) \ ? fct ## f128 arg_call : # define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) \ __builtin_types_compatible_p (__typeof (+__real__ (arg_comb)), _Float128) \ ? (__expr_is_real (arg_comb) \ ? fct ## f128 arg_call \ : cfct ## f128 arg_call) : # else /* _Float64x is a distinct type at the C language level, which must be handled like _Float128. */ # define __TGMATH_F128(arg_comb, fct, arg_call) \ (__builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128) \ || __builtin_types_compatible_p (__typeof (+(arg_comb)), _Float64x)) \ ? fct ## f128 arg_call : # define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) \ (__builtin_types_compatible_p (__typeof (+__real__ (arg_comb)), _Float128) \ || __builtin_types_compatible_p (__typeof (+__real__ (arg_comb)), \ _Float64x)) \ ? (__expr_is_real (arg_comb) \ ? fct ## f128 arg_call \ : cfct ## f128 arg_call) : # endif # else # define __TGMATH_F128(arg_comb, fct, arg_call) /* Nothing. */ # define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) /* Nothing. */ # endif # endif /* !__HAVE_BUILTIN_TGMATH. */ /* We have two kinds of generic macros: to support functions which are only defined on real valued parameters and those which are defined for complex functions as well. */ # if __HAVE_BUILTIN_TGMATH # define __TGMATH_UNARY_REAL_ONLY(Val, Fct) __TGMATH_1 (Fct, (Val)) # define __TGMATH_UNARY_REAL_RET_ONLY(Val, Fct) __TGMATH_1 (Fct, (Val)) # define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \ __TGMATH_2 (Fct, (Val1), (Val2)) # define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct) \ __TGMATH_2STD (Fct, (Val1), (Val2)) # define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \ __TGMATH_2 (Fct, (Val1), (Val2)) # define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \ __TGMATH_2STD (Fct, (Val1), (Val2)) # define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \ __TGMATH_2 (Fct, (Val1), (Val2)) # define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \ __TGMATH_3 (Fct, (Val1), (Val2), (Val3)) # define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \ __TGMATH_3 (Fct, (Val1), (Val2), (Val3)) # define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \ __TGMATH_3 (Fct, (Val1), (Val2), (Val3)) # define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \ __TGMATH_1C (Fct, Cfct, (Val)) # define __TGMATH_UNARY_IMAG(Val, Cfct) __TGMATH_1 (Cfct, (Val)) # define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) \ __TGMATH_1C (Fct, Cfct, (Val)) # define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct) \ __TGMATH_1 (Cfct, (Val)) # define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \ __TGMATH_2C (Fct, Cfct, (Val1), (Val2)) # else /* !__HAVE_BUILTIN_TGMATH. */ # define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \ (__extension__ ((sizeof (+(Val)) == sizeof (double) \ || __builtin_classify_type (Val) != 8) \ ? (__tgmath_real_type (Val)) Fct (Val) \ : (sizeof (+(Val)) == sizeof (float)) \ ? (__tgmath_real_type (Val)) Fct##f (Val) \ : __TGMATH_F128 ((Val), (__tgmath_real_type (Val)) Fct, \ (Val)) \ (__tgmath_real_type (Val)) __tgml(Fct) (Val))) # define __TGMATH_UNARY_REAL_RET_ONLY(Val, Fct) \ (__extension__ ((sizeof (+(Val)) == sizeof (double) \ || __builtin_classify_type (Val) != 8) \ ? Fct (Val) \ : (sizeof (+(Val)) == sizeof (float)) \ ? Fct##f (Val) \ : __TGMATH_F128 ((Val), Fct, (Val)) \ __tgml(Fct) (Val))) # define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \ (__extension__ ((sizeof (+(Val1)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8) \ ? (__tgmath_real_type (Val1)) Fct (Val1, Val2) \ : (sizeof (+(Val1)) == sizeof (float)) \ ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2) \ : __TGMATH_F128 ((Val1), (__tgmath_real_type (Val1)) Fct, \ (Val1, Val2)) \ (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2))) # define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct) \ (__extension__ ((sizeof (+(Val1)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8) \ ? (__tgmath_real_type (Val1)) Fct (Val1, Val2) \ : (sizeof (+(Val1)) == sizeof (float)) \ ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2) \ : (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2))) # define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \ && __builtin_classify_type ((Val1) + (Val2)) == 8) \ ? __TGMATH_F128 ((Val1) + (Val2), \ (__typeof \ ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) Fct, \ (Val1, Val2)) \ (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ __tgml(Fct) (Val1, Val2) \ : (sizeof (+(Val1)) == sizeof (double) \ || sizeof (+(Val2)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8 \ || __builtin_classify_type (Val2) != 8) \ ? (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ Fct (Val1, Val2) \ : (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ Fct##f (Val1, Val2))) # define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \ && __builtin_classify_type ((Val1) + (Val2)) == 8) \ ? (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ __tgml(Fct) (Val1, Val2) \ : (sizeof (+(Val1)) == sizeof (double) \ || sizeof (+(Val2)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8 \ || __builtin_classify_type (Val2) != 8) \ ? (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ Fct (Val1, Val2) \ : (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ Fct##f (Val1, Val2))) # define __TGMATH_BINARY_REAL_RET_ONLY(Val1, Val2, Fct) \ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \ && __builtin_classify_type ((Val1) + (Val2)) == 8) \ ? __TGMATH_F128 ((Val1) + (Val2), Fct, (Val1, Val2)) \ __tgml(Fct) (Val1, Val2) \ : (sizeof (+(Val1)) == sizeof (double) \ || sizeof (+(Val2)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8 \ || __builtin_classify_type (Val2) != 8) \ ? Fct (Val1, Val2) \ : Fct##f (Val1, Val2))) # define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \ (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \ && __builtin_classify_type ((Val1) + (Val2)) == 8) \ ? __TGMATH_F128 ((Val1) + (Val2), \ (__typeof \ ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) Fct, \ (Val1, Val2, Val3)) \ (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ __tgml(Fct) (Val1, Val2, Val3) \ : (sizeof (+(Val1)) == sizeof (double) \ || sizeof (+(Val2)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8 \ || __builtin_classify_type (Val2) != 8) \ ? (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ Fct (Val1, Val2, Val3) \ : (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0)) \ Fct##f (Val1, Val2, Val3))) # define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \ (__extension__ ((sizeof ((Val1) + (Val2) + (Val3)) > sizeof (double) \ && __builtin_classify_type ((Val1) + (Val2) + (Val3)) \ == 8) \ ? __TGMATH_F128 ((Val1) + (Val2) + (Val3), \ (__typeof \ ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0 \ + (__tgmath_real_type (Val3)) 0)) Fct, \ (Val1, Val2, Val3)) \ (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0 \ + (__tgmath_real_type (Val3)) 0)) \ __tgml(Fct) (Val1, Val2, Val3) \ : (sizeof (+(Val1)) == sizeof (double) \ || sizeof (+(Val2)) == sizeof (double) \ || sizeof (+(Val3)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8 \ || __builtin_classify_type (Val2) != 8 \ || __builtin_classify_type (Val3) != 8) \ ? (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0 \ + (__tgmath_real_type (Val3)) 0)) \ Fct (Val1, Val2, Val3) \ : (__typeof ((__tgmath_real_type (Val1)) 0 \ + (__tgmath_real_type (Val2)) 0 \ + (__tgmath_real_type (Val3)) 0)) \ Fct##f (Val1, Val2, Val3))) # define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) \ (__extension__ ((sizeof (+(Val1)) == sizeof (double) \ || __builtin_classify_type (Val1) != 8) \ ? Fct (Val1, Val2, Val3) \ : (sizeof (+(Val1)) == sizeof (float)) \ ? Fct##f (Val1, Val2, Val3) \ : __TGMATH_F128 ((Val1), Fct, (Val1, Val2, Val3)) \ __tgml(Fct) (Val1, Val2, Val3))) /* XXX This definition has to be changed as soon as the compiler understands the imaginary keyword. */ # define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \ (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double) \ || __builtin_classify_type (__real__ (Val)) != 8) \ ? (__expr_is_real (Val) \ ? (__tgmath_complex_type (Val)) Fct (Val) \ : (__tgmath_complex_type (Val)) Cfct (Val)) \ : (sizeof (+__real__ (Val)) == sizeof (float)) \ ? (__expr_is_real (Val) \ ? (__tgmath_complex_type (Val)) Fct##f (Val) \ : (__tgmath_complex_type (Val)) Cfct##f (Val)) \ : __TGMATH_CF128 ((Val), \ (__tgmath_complex_type (Val)) Fct, \ (__tgmath_complex_type (Val)) Cfct, \ (Val)) \ (__expr_is_real (Val) \ ? (__tgmath_complex_type (Val)) __tgml(Fct) (Val) \ : (__tgmath_complex_type (Val)) __tgml(Cfct) (Val)))) # define __TGMATH_UNARY_IMAG(Val, Cfct) \ (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double) \ || __builtin_classify_type (__real__ (Val)) != 8) \ ? (__typeof__ ((__tgmath_real_type (Val)) 0 \ + _Complex_I)) Cfct (Val) \ : (sizeof (+__real__ (Val)) == sizeof (float)) \ ? (__typeof__ ((__tgmath_real_type (Val)) 0 \ + _Complex_I)) Cfct##f (Val) \ : __TGMATH_F128 (__real__ (Val), \ (__typeof__ \ ((__tgmath_real_type (Val)) 0 \ + _Complex_I)) Cfct, (Val)) \ (__typeof__ ((__tgmath_real_type (Val)) 0 \ + _Complex_I)) __tgml(Cfct) (Val))) /* XXX This definition has to be changed as soon as the compiler understands the imaginary keyword. */ # define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) \ (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double) \ || __builtin_classify_type (__real__ (Val)) != 8) \ ? (__expr_is_real (Val) \ ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\ Fct (Val) \ : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\ Cfct (Val)) \ : (sizeof (+__real__ (Val)) == sizeof (float)) \ ? (__expr_is_real (Val) \ ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\ Fct##f (Val) \ : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\ Cfct##f (Val)) \ : __TGMATH_CF128 ((Val), \ (__typeof__ \ (__real__ \ (__tgmath_real_type (Val)) 0)) Fct, \ (__typeof__ \ (__real__ \ (__tgmath_real_type (Val)) 0)) Cfct, \ (Val)) \ (__expr_is_real (Val) \ ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \ __tgml(Fct) (Val) \ : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \ __tgml(Cfct) (Val)))) # define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct) \ __TGMATH_UNARY_REAL_IMAG_RET_REAL ((Val), Cfct, Cfct) /* XXX This definition has to be changed as soon as the compiler understands the imaginary keyword. */ # define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \ (__extension__ ((sizeof (__real__ (Val1) \ + __real__ (Val2)) > sizeof (double) \ && __builtin_classify_type (__real__ (Val1) \ + __real__ (Val2)) == 8) \ ? __TGMATH_CF128 ((Val1) + (Val2), \ (__typeof \ ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ Fct, \ (__typeof \ ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ Cfct, \ (Val1, Val2)) \ (__expr_is_real ((Val1) + (Val2)) \ ? (__typeof ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ __tgml(Fct) (Val1, Val2) \ : (__typeof ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ __tgml(Cfct) (Val1, Val2)) \ : (sizeof (+__real__ (Val1)) == sizeof (double) \ || sizeof (+__real__ (Val2)) == sizeof (double) \ || __builtin_classify_type (__real__ (Val1)) != 8 \ || __builtin_classify_type (__real__ (Val2)) != 8) \ ? (__expr_is_real ((Val1) + (Val2)) \ ? (__typeof ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ Fct (Val1, Val2) \ : (__typeof ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ Cfct (Val1, Val2)) \ : (__expr_is_real ((Val1) + (Val2)) \ ? (__typeof ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ Fct##f (Val1, Val2) \ : (__typeof ((__tgmath_complex_type (Val1)) 0 \ + (__tgmath_complex_type (Val2)) 0)) \ Cfct##f (Val1, Val2)))) # endif /* !__HAVE_BUILTIN_TGMATH. */ #else # error "Unsupported compiler; you cannot use " #endif /* Unary functions defined for real and complex values. */ /* Trigonometric functions. */ /* Arc cosine of X. */ #define acos(Val) __TGMATH_UNARY_REAL_IMAG (Val, acos, cacos) /* Arc sine of X. */ #define asin(Val) __TGMATH_UNARY_REAL_IMAG (Val, asin, casin) /* Arc tangent of X. */ #define atan(Val) __TGMATH_UNARY_REAL_IMAG (Val, atan, catan) /* Arc tangent of Y/X. */ #define atan2(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, atan2) /* Cosine of X. */ #define cos(Val) __TGMATH_UNARY_REAL_IMAG (Val, cos, ccos) /* Sine of X. */ #define sin(Val) __TGMATH_UNARY_REAL_IMAG (Val, sin, csin) /* Tangent of X. */ #define tan(Val) __TGMATH_UNARY_REAL_IMAG (Val, tan, ctan) /* Hyperbolic functions. */ /* Hyperbolic arc cosine of X. */ #define acosh(Val) __TGMATH_UNARY_REAL_IMAG (Val, acosh, cacosh) /* Hyperbolic arc sine of X. */ #define asinh(Val) __TGMATH_UNARY_REAL_IMAG (Val, asinh, casinh) /* Hyperbolic arc tangent of X. */ #define atanh(Val) __TGMATH_UNARY_REAL_IMAG (Val, atanh, catanh) /* Hyperbolic cosine of X. */ #define cosh(Val) __TGMATH_UNARY_REAL_IMAG (Val, cosh, ccosh) /* Hyperbolic sine of X. */ #define sinh(Val) __TGMATH_UNARY_REAL_IMAG (Val, sinh, csinh) /* Hyperbolic tangent of X. */ #define tanh(Val) __TGMATH_UNARY_REAL_IMAG (Val, tanh, ctanh) /* Exponential and logarithmic functions. */ /* Exponential function of X. */ #define exp(Val) __TGMATH_UNARY_REAL_IMAG (Val, exp, cexp) /* Break VALUE into a normalized fraction and an integral power of 2. */ #define frexp(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, frexp) /* X times (two to the EXP power). */ #define ldexp(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, ldexp) /* Natural logarithm of X. */ #define log(Val) __TGMATH_UNARY_REAL_IMAG (Val, log, clog) /* Base-ten logarithm of X. */ #ifdef __USE_GNU # define log10(Val) __TGMATH_UNARY_REAL_IMAG (Val, log10, clog10) #else # define log10(Val) __TGMATH_UNARY_REAL_ONLY (Val, log10) #endif /* Return exp(X) - 1. */ #define expm1(Val) __TGMATH_UNARY_REAL_ONLY (Val, expm1) /* Return log(1 + X). */ #define log1p(Val) __TGMATH_UNARY_REAL_ONLY (Val, log1p) /* Return the base 2 signed integral exponent of X. */ #define logb(Val) __TGMATH_UNARY_REAL_ONLY (Val, logb) /* Compute base-2 exponential of X. */ #define exp2(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp2) /* Compute base-2 logarithm of X. */ #define log2(Val) __TGMATH_UNARY_REAL_ONLY (Val, log2) /* Power functions. */ /* Return X to the Y power. */ #define pow(Val1, Val2) __TGMATH_BINARY_REAL_IMAG (Val1, Val2, pow, cpow) /* Return the square root of X. */ #define sqrt(Val) __TGMATH_UNARY_REAL_IMAG (Val, sqrt, csqrt) /* Return `sqrt(X*X + Y*Y)'. */ #define hypot(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, hypot) /* Return the cube root of X. */ #define cbrt(Val) __TGMATH_UNARY_REAL_ONLY (Val, cbrt) /* Nearest integer, absolute value, and remainder functions. */ /* Smallest integral value not less than X. */ #define ceil(Val) __TGMATH_UNARY_REAL_ONLY (Val, ceil) /* Absolute value of X. */ #define fabs(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, fabs, cabs) /* Largest integer not greater than X. */ #define floor(Val) __TGMATH_UNARY_REAL_ONLY (Val, floor) /* Floating-point modulo remainder of X/Y. */ #define fmod(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmod) /* Round X to integral valuein floating-point format using current rounding direction, but do not raise inexact exception. */ #define nearbyint(Val) __TGMATH_UNARY_REAL_ONLY (Val, nearbyint) /* Round X to nearest integral value, rounding halfway cases away from zero. */ #define round(Val) __TGMATH_UNARY_REAL_ONLY (Val, round) /* Round X to the integral value in floating-point format nearest but not larger in magnitude. */ #define trunc(Val) __TGMATH_UNARY_REAL_ONLY (Val, trunc) /* Compute remainder of X and Y and put in *QUO a value with sign of x/y and magnitude congruent `mod 2^n' to the magnitude of the integral quotient x/y, with n >= 3. */ #define remquo(Val1, Val2, Val3) \ __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY (Val1, Val2, Val3, remquo) /* Round X to nearest integral value according to current rounding direction. */ #define lrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, lrint) #define llrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llrint) /* Round X to nearest integral value, rounding halfway cases away from zero. */ #define lround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, lround) #define llround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llround) /* Return X with its signed changed to Y's. */ #define copysign(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, copysign) /* Error and gamma functions. */ #define erf(Val) __TGMATH_UNARY_REAL_ONLY (Val, erf) #define erfc(Val) __TGMATH_UNARY_REAL_ONLY (Val, erfc) #define tgamma(Val) __TGMATH_UNARY_REAL_ONLY (Val, tgamma) #define lgamma(Val) __TGMATH_UNARY_REAL_ONLY (Val, lgamma) /* Return the integer nearest X in the direction of the prevailing rounding mode. */ #define rint(Val) __TGMATH_UNARY_REAL_ONLY (Val, rint) #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Return X - epsilon. */ # define nextdown(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextdown) /* Return X + epsilon. */ # define nextup(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextup) #endif /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ #define nextafter(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, nextafter) #define nexttoward(Val1, Val2) \ __TGMATH_BINARY_FIRST_REAL_STD_ONLY (Val1, Val2, nexttoward) /* Return the remainder of integer divison X / Y with infinite precision. */ #define remainder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, remainder) /* Return X times (2 to the Nth power). */ #ifdef __USE_MISC # define scalb(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, scalb) #endif /* Return X times (2 to the Nth power). */ #define scalbn(Val1, Val2) __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbn) /* Return X times (2 to the Nth power). */ #define scalbln(Val1, Val2) \ __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbln) /* Return the binary exponent of X, which must be nonzero. */ #define ilogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, ilogb) /* Return positive difference between X and Y. */ #define fdim(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fdim) /* Return maximum numeric value from X and Y. */ #define fmax(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmax) /* Return minimum numeric value from X and Y. */ #define fmin(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmin) /* Multiply-add function computed as a ternary operation. */ #define fma(Val1, Val2, Val3) \ __TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma) #if __GLIBC_USE (IEC_60559_BFP_EXT) /* Round X to nearest integer value, rounding halfway cases to even. */ # define roundeven(Val) __TGMATH_UNARY_REAL_ONLY (Val, roundeven) # define fromfp(Val1, Val2, Val3) \ __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, fromfp) # define ufromfp(Val1, Val2, Val3) \ __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, ufromfp) # define fromfpx(Val1, Val2, Val3) \ __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, fromfpx) # define ufromfpx(Val1, Val2, Val3) \ __TGMATH_TERNARY_FIRST_REAL_RET_ONLY (Val1, Val2, Val3, ufromfpx) /* Like ilogb, but returning long int. */ # define llogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llogb) /* Return value with maximum magnitude. */ # define fmaxmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaxmag) /* Return value with minimum magnitude. */ # define fminmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminmag) /* Total order operation. */ # define totalorder(Val1, Val2) \ __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalorder) /* Total order operation on absolute values. */ # define totalordermag(Val1, Val2) \ __TGMATH_BINARY_REAL_RET_ONLY (Val1, Val2, totalordermag) #endif /* Absolute value, conjugates, and projection. */ /* Argument value of Z. */ #define carg(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, carg) /* Complex conjugate of Z. */ #define conj(Val) __TGMATH_UNARY_IMAG (Val, conj) /* Projection of Z onto the Riemann sphere. */ #define cproj(Val) __TGMATH_UNARY_IMAG (Val, cproj) /* Decomposing complex values. */ /* Imaginary part of Z. */ #define cimag(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, cimag) /* Real part of Z. */ #define creal(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, creal) #endif /* tgmath.h */ PKZ+-o-ofontconfig/fontconfig.hnu[/* * fontconfig/fontconfig/fontconfig.h * * Copyright © 2001 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of the author(s) not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. The authors make no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _FONTCONFIG_H_ #define _FONTCONFIG_H_ #include #include #include #include #if defined(__GNUC__) && (__GNUC__ >= 4) #define FC_ATTRIBUTE_SENTINEL(x) __attribute__((__sentinel__(0))) #else #define FC_ATTRIBUTE_SENTINEL(x) #endif #ifndef FcPublic #define FcPublic #endif typedef unsigned char FcChar8; typedef unsigned short FcChar16; typedef unsigned int FcChar32; typedef int FcBool; /* * Current Fontconfig version number. This same number * must appear in the fontconfig configure.in file. Yes, * it'a a pain to synchronize version numbers like this. */ #define FC_MAJOR 2 #define FC_MINOR 13 #define FC_REVISION 1 #define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION)) /* * Current font cache file format version * This is appended to the cache files so that multiple * versions of the library will peacefully coexist * * Change this value whenever the disk format for the cache file * changes in any non-compatible way. Try to avoid such changes as * it means multiple copies of the font information. */ #define FC_CACHE_VERSION_NUMBER 7 #define _FC_STRINGIFY_(s) #s #define _FC_STRINGIFY(s) _FC_STRINGIFY_(s) #define FC_CACHE_VERSION _FC_STRINGIFY(FC_CACHE_VERSION_NUMBER) #define FcFalse 0 #define FcTrue 1 #define FcDontCare 2 #define FC_FAMILY "family" /* String */ #define FC_STYLE "style" /* String */ #define FC_SLANT "slant" /* Int */ #define FC_WEIGHT "weight" /* Int */ #define FC_SIZE "size" /* Range (double) */ #define FC_ASPECT "aspect" /* Double */ #define FC_PIXEL_SIZE "pixelsize" /* Double */ #define FC_SPACING "spacing" /* Int */ #define FC_FOUNDRY "foundry" /* String */ #define FC_ANTIALIAS "antialias" /* Bool (depends) */ #define FC_HINTING "hinting" /* Bool (true) */ #define FC_HINT_STYLE "hintstyle" /* Int */ #define FC_VERTICAL_LAYOUT "verticallayout" /* Bool (false) */ #define FC_AUTOHINT "autohint" /* Bool (false) */ /* FC_GLOBAL_ADVANCE is deprecated. this is simply ignored on freetype 2.4.5 or later */ #define FC_GLOBAL_ADVANCE "globaladvance" /* Bool (true) */ #define FC_WIDTH "width" /* Int */ #define FC_FILE "file" /* String */ #define FC_INDEX "index" /* Int */ #define FC_FT_FACE "ftface" /* FT_Face */ #define FC_RASTERIZER "rasterizer" /* String (deprecated) */ #define FC_OUTLINE "outline" /* Bool */ #define FC_SCALABLE "scalable" /* Bool */ #define FC_COLOR "color" /* Bool */ #define FC_VARIABLE "variable" /* Bool */ #define FC_SCALE "scale" /* double (deprecated) */ #define FC_SYMBOL "symbol" /* Bool */ #define FC_DPI "dpi" /* double */ #define FC_RGBA "rgba" /* Int */ #define FC_MINSPACE "minspace" /* Bool use minimum line spacing */ #define FC_SOURCE "source" /* String (deprecated) */ #define FC_CHARSET "charset" /* CharSet */ #define FC_LANG "lang" /* String RFC 3066 langs */ #define FC_FONTVERSION "fontversion" /* Int from 'head' table */ #define FC_FULLNAME "fullname" /* String */ #define FC_FAMILYLANG "familylang" /* String RFC 3066 langs */ #define FC_STYLELANG "stylelang" /* String RFC 3066 langs */ #define FC_FULLNAMELANG "fullnamelang" /* String RFC 3066 langs */ #define FC_CAPABILITY "capability" /* String */ #define FC_FONTFORMAT "fontformat" /* String */ #define FC_EMBOLDEN "embolden" /* Bool - true if emboldening needed*/ #define FC_EMBEDDED_BITMAP "embeddedbitmap" /* Bool - true to enable embedded bitmaps */ #define FC_DECORATIVE "decorative" /* Bool - true if style is a decorative variant */ #define FC_LCD_FILTER "lcdfilter" /* Int */ #define FC_FONT_FEATURES "fontfeatures" /* String */ #define FC_FONT_VARIATIONS "fontvariations" /* String */ #define FC_NAMELANG "namelang" /* String RFC 3866 langs */ #define FC_PRGNAME "prgname" /* String */ #define FC_HASH "hash" /* String (deprecated) */ #define FC_POSTSCRIPT_NAME "postscriptname" /* String */ #define FC_CACHE_SUFFIX ".cache-" FC_CACHE_VERSION #define FC_DIR_CACHE_FILE "fonts.cache-" FC_CACHE_VERSION #define FC_USER_CACHE_FILE ".fonts.cache-" FC_CACHE_VERSION /* Adjust outline rasterizer */ #define FC_CHARWIDTH "charwidth" /* Int */ #define FC_CHAR_WIDTH FC_CHARWIDTH #define FC_CHAR_HEIGHT "charheight"/* Int */ #define FC_MATRIX "matrix" /* FcMatrix */ #define FC_WEIGHT_THIN 0 #define FC_WEIGHT_EXTRALIGHT 40 #define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT #define FC_WEIGHT_LIGHT 50 #define FC_WEIGHT_DEMILIGHT 55 #define FC_WEIGHT_SEMILIGHT FC_WEIGHT_DEMILIGHT #define FC_WEIGHT_BOOK 75 #define FC_WEIGHT_REGULAR 80 #define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR #define FC_WEIGHT_MEDIUM 100 #define FC_WEIGHT_DEMIBOLD 180 #define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD #define FC_WEIGHT_BOLD 200 #define FC_WEIGHT_EXTRABOLD 205 #define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD #define FC_WEIGHT_BLACK 210 #define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK #define FC_WEIGHT_EXTRABLACK 215 #define FC_WEIGHT_ULTRABLACK FC_WEIGHT_EXTRABLACK #define FC_SLANT_ROMAN 0 #define FC_SLANT_ITALIC 100 #define FC_SLANT_OBLIQUE 110 #define FC_WIDTH_ULTRACONDENSED 50 #define FC_WIDTH_EXTRACONDENSED 63 #define FC_WIDTH_CONDENSED 75 #define FC_WIDTH_SEMICONDENSED 87 #define FC_WIDTH_NORMAL 100 #define FC_WIDTH_SEMIEXPANDED 113 #define FC_WIDTH_EXPANDED 125 #define FC_WIDTH_EXTRAEXPANDED 150 #define FC_WIDTH_ULTRAEXPANDED 200 #define FC_PROPORTIONAL 0 #define FC_DUAL 90 #define FC_MONO 100 #define FC_CHARCELL 110 /* sub-pixel order */ #define FC_RGBA_UNKNOWN 0 #define FC_RGBA_RGB 1 #define FC_RGBA_BGR 2 #define FC_RGBA_VRGB 3 #define FC_RGBA_VBGR 4 #define FC_RGBA_NONE 5 /* hinting style */ #define FC_HINT_NONE 0 #define FC_HINT_SLIGHT 1 #define FC_HINT_MEDIUM 2 #define FC_HINT_FULL 3 /* LCD filter */ #define FC_LCD_NONE 0 #define FC_LCD_DEFAULT 1 #define FC_LCD_LIGHT 2 #define FC_LCD_LEGACY 3 typedef enum _FcType { FcTypeUnknown = -1, FcTypeVoid, FcTypeInteger, FcTypeDouble, FcTypeString, FcTypeBool, FcTypeMatrix, FcTypeCharSet, FcTypeFTFace, FcTypeLangSet, FcTypeRange } FcType; typedef struct _FcMatrix { double xx, xy, yx, yy; } FcMatrix; #define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \ (m)->xy = (m)->yx = 0) /* * A data structure to represent the available glyphs in a font. * This is represented as a sparse boolean btree. */ typedef struct _FcCharSet FcCharSet; typedef struct _FcObjectType { char *object; FcType type; } FcObjectType; typedef struct _FcConstant { const FcChar8 *name; const char *object; int value; } FcConstant; typedef enum _FcResult { FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId, FcResultOutOfMemory } FcResult; typedef enum _FcValueBinding { FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame, /* to make sure sizeof (FcValueBinding) == 4 even with -fshort-enums */ FcValueBindingEnd = INT_MAX } FcValueBinding; typedef struct _FcPattern FcPattern; typedef struct _FcPatternIter { void *dummy1; void *dummy2; } FcPatternIter; typedef struct _FcLangSet FcLangSet; typedef struct _FcRange FcRange; typedef struct _FcValue { FcType type; union { const FcChar8 *s; int i; FcBool b; double d; const FcMatrix *m; const FcCharSet *c; void *f; const FcLangSet *l; const FcRange *r; } u; } FcValue; typedef struct _FcFontSet { int nfont; int sfont; FcPattern **fonts; } FcFontSet; typedef struct _FcObjectSet { int nobject; int sobject; const char **objects; } FcObjectSet; typedef enum _FcMatchKind { FcMatchPattern, FcMatchFont, FcMatchScan, FcMatchKindEnd, FcMatchKindBegin = FcMatchPattern } FcMatchKind; typedef enum _FcLangResult { FcLangEqual = 0, FcLangDifferentCountry = 1, FcLangDifferentTerritory = 1, FcLangDifferentLang = 2 } FcLangResult; typedef enum _FcSetName { FcSetSystem = 0, FcSetApplication = 1 } FcSetName; typedef struct _FcConfigFileInfoIter { void *dummy1; void *dummy2; void *dummy3; } FcConfigFileInfoIter; typedef struct _FcAtomic FcAtomic; #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ #define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ #define _FCFUNCPROTOEND } #else #define _FCFUNCPROTOBEGIN #define _FCFUNCPROTOEND #endif typedef enum { FcEndianBig, FcEndianLittle } FcEndian; typedef struct _FcConfig FcConfig; typedef struct _FcGlobalCache FcFileCache; typedef struct _FcBlanks FcBlanks; typedef struct _FcStrList FcStrList; typedef struct _FcStrSet FcStrSet; typedef struct _FcCache FcCache; _FCFUNCPROTOBEGIN /* fcblanks.c */ FcPublic FcBlanks * FcBlanksCreate (void); FcPublic void FcBlanksDestroy (FcBlanks *b); FcPublic FcBool FcBlanksAdd (FcBlanks *b, FcChar32 ucs4); FcPublic FcBool FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4); /* fccache.c */ FcPublic const FcChar8 * FcCacheDir(const FcCache *c); FcPublic FcFontSet * FcCacheCopySet(const FcCache *c); FcPublic const FcChar8 * FcCacheSubdir (const FcCache *c, int i); FcPublic int FcCacheNumSubdir (const FcCache *c); FcPublic int FcCacheNumFont (const FcCache *c); FcPublic FcBool FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config); FcPublic FcBool FcDirCacheValid (const FcChar8 *cache_file); FcPublic FcBool FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose); FcPublic void FcCacheCreateTagFile (const FcConfig *config); FcPublic FcBool FcDirCacheCreateUUID (FcChar8 *dir, FcBool force, FcConfig *config); FcPublic FcBool FcDirCacheDeleteUUID (const FcChar8 *dir, FcConfig *config); /* fccfg.c */ FcPublic FcChar8 * FcConfigHome (void); FcPublic FcBool FcConfigEnableHome (FcBool enable); FcPublic FcChar8 * FcConfigFilename (const FcChar8 *url); FcPublic FcConfig * FcConfigCreate (void); FcPublic FcConfig * FcConfigReference (FcConfig *config); FcPublic void FcConfigDestroy (FcConfig *config); FcPublic FcBool FcConfigSetCurrent (FcConfig *config); FcPublic FcConfig * FcConfigGetCurrent (void); FcPublic FcBool FcConfigUptoDate (FcConfig *config); FcPublic FcBool FcConfigBuildFonts (FcConfig *config); FcPublic FcStrList * FcConfigGetFontDirs (FcConfig *config); FcPublic FcStrList * FcConfigGetConfigDirs (FcConfig *config); FcPublic FcStrList * FcConfigGetConfigFiles (FcConfig *config); FcPublic FcChar8 * FcConfigGetCache (FcConfig *config); FcPublic FcBlanks * FcConfigGetBlanks (FcConfig *config); FcPublic FcStrList * FcConfigGetCacheDirs (const FcConfig *config); FcPublic int FcConfigGetRescanInterval (FcConfig *config); FcPublic FcBool FcConfigSetRescanInterval (FcConfig *config, int rescanInterval); FcPublic FcFontSet * FcConfigGetFonts (FcConfig *config, FcSetName set); FcPublic FcBool FcConfigAppFontAddFile (FcConfig *config, const FcChar8 *file); FcPublic FcBool FcConfigAppFontAddDir (FcConfig *config, const FcChar8 *dir); FcPublic void FcConfigAppFontClear (FcConfig *config); FcPublic FcBool FcConfigSubstituteWithPat (FcConfig *config, FcPattern *p, FcPattern *p_pat, FcMatchKind kind); FcPublic FcBool FcConfigSubstitute (FcConfig *config, FcPattern *p, FcMatchKind kind); FcPublic const FcChar8 * FcConfigGetSysRoot (const FcConfig *config); FcPublic void FcConfigSetSysRoot (FcConfig *config, const FcChar8 *sysroot); FcPublic void FcConfigFileInfoIterInit (FcConfig *config, FcConfigFileInfoIter *iter); FcPublic FcBool FcConfigFileInfoIterNext (FcConfig *config, FcConfigFileInfoIter *iter); FcPublic FcBool FcConfigFileInfoIterGet (FcConfig *config, FcConfigFileInfoIter *iter, FcChar8 **name, FcChar8 **description, FcBool *enabled); /* fccharset.c */ FcPublic FcCharSet* FcCharSetCreate (void); /* deprecated alias for FcCharSetCreate */ FcPublic FcCharSet * FcCharSetNew (void); FcPublic void FcCharSetDestroy (FcCharSet *fcs); FcPublic FcBool FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4); FcPublic FcBool FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4); FcPublic FcCharSet* FcCharSetCopy (FcCharSet *src); FcPublic FcBool FcCharSetEqual (const FcCharSet *a, const FcCharSet *b); FcPublic FcCharSet* FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b); FcPublic FcCharSet* FcCharSetUnion (const FcCharSet *a, const FcCharSet *b); FcPublic FcCharSet* FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b); FcPublic FcBool FcCharSetMerge (FcCharSet *a, const FcCharSet *b, FcBool *changed); FcPublic FcBool FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4); FcPublic FcChar32 FcCharSetCount (const FcCharSet *a); FcPublic FcChar32 FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b); FcPublic FcChar32 FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b); FcPublic FcBool FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b); #define FC_CHARSET_MAP_SIZE (256/32) #define FC_CHARSET_DONE ((FcChar32) -1) FcPublic FcChar32 FcCharSetFirstPage (const FcCharSet *a, FcChar32 map[FC_CHARSET_MAP_SIZE], FcChar32 *next); FcPublic FcChar32 FcCharSetNextPage (const FcCharSet *a, FcChar32 map[FC_CHARSET_MAP_SIZE], FcChar32 *next); /* * old coverage API, rather hard to use correctly */ FcPublic FcChar32 FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result); /* fcdbg.c */ FcPublic void FcValuePrint (const FcValue v); FcPublic void FcPatternPrint (const FcPattern *p); FcPublic void FcFontSetPrint (const FcFontSet *s); /* fcdefault.c */ FcPublic FcStrSet * FcGetDefaultLangs (void); FcPublic void FcDefaultSubstitute (FcPattern *pattern); /* fcdir.c */ FcPublic FcBool FcFileIsDir (const FcChar8 *file); FcPublic FcBool FcFileScan (FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, FcBlanks *blanks, const FcChar8 *file, FcBool force); FcPublic FcBool FcDirScan (FcFontSet *set, FcStrSet *dirs, FcFileCache *cache, FcBlanks *blanks, const FcChar8 *dir, FcBool force); FcPublic FcBool FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); FcPublic FcCache * FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file); FcPublic FcCache * FcDirCacheRescan (const FcChar8 *dir, FcConfig *config); FcPublic FcCache * FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config); FcPublic FcCache * FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat); FcPublic void FcDirCacheUnload (FcCache *cache); /* fcfreetype.c */ FcPublic FcPattern * FcFreeTypeQuery (const FcChar8 *file, unsigned int id, FcBlanks *blanks, int *count); FcPublic unsigned int FcFreeTypeQueryAll(const FcChar8 *file, unsigned int id, FcBlanks *blanks, int *count, FcFontSet *set); /* fcfs.c */ FcPublic FcFontSet * FcFontSetCreate (void); FcPublic void FcFontSetDestroy (FcFontSet *s); FcPublic FcBool FcFontSetAdd (FcFontSet *s, FcPattern *font); /* fcinit.c */ FcPublic FcConfig * FcInitLoadConfig (void); FcPublic FcConfig * FcInitLoadConfigAndFonts (void); FcPublic FcBool FcInit (void); FcPublic void FcFini (void); FcPublic int FcGetVersion (void); FcPublic FcBool FcInitReinitialize (void); FcPublic FcBool FcInitBringUptoDate (void); /* fclang.c */ FcPublic FcStrSet * FcGetLangs (void); FcPublic FcChar8 * FcLangNormalize (const FcChar8 *lang); FcPublic const FcCharSet * FcLangGetCharSet (const FcChar8 *lang); FcPublic FcLangSet* FcLangSetCreate (void); FcPublic void FcLangSetDestroy (FcLangSet *ls); FcPublic FcLangSet* FcLangSetCopy (const FcLangSet *ls); FcPublic FcBool FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang); FcPublic FcBool FcLangSetDel (FcLangSet *ls, const FcChar8 *lang); FcPublic FcLangResult FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang); FcPublic FcLangResult FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb); FcPublic FcBool FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb); FcPublic FcBool FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb); FcPublic FcChar32 FcLangSetHash (const FcLangSet *ls); FcPublic FcStrSet * FcLangSetGetLangs (const FcLangSet *ls); FcPublic FcLangSet * FcLangSetUnion (const FcLangSet *a, const FcLangSet *b); FcPublic FcLangSet * FcLangSetSubtract (const FcLangSet *a, const FcLangSet *b); /* fclist.c */ FcPublic FcObjectSet * FcObjectSetCreate (void); FcPublic FcBool FcObjectSetAdd (FcObjectSet *os, const char *object); FcPublic void FcObjectSetDestroy (FcObjectSet *os); FcPublic FcObjectSet * FcObjectSetVaBuild (const char *first, va_list va); FcPublic FcObjectSet * FcObjectSetBuild (const char *first, ...) FC_ATTRIBUTE_SENTINEL(0); FcPublic FcFontSet * FcFontSetList (FcConfig *config, FcFontSet **sets, int nsets, FcPattern *p, FcObjectSet *os); FcPublic FcFontSet * FcFontList (FcConfig *config, FcPattern *p, FcObjectSet *os); /* fcatomic.c */ FcPublic FcAtomic * FcAtomicCreate (const FcChar8 *file); FcPublic FcBool FcAtomicLock (FcAtomic *atomic); FcPublic FcChar8 * FcAtomicNewFile (FcAtomic *atomic); FcPublic FcChar8 * FcAtomicOrigFile (FcAtomic *atomic); FcPublic FcBool FcAtomicReplaceOrig (FcAtomic *atomic); FcPublic void FcAtomicDeleteNew (FcAtomic *atomic); FcPublic void FcAtomicUnlock (FcAtomic *atomic); FcPublic void FcAtomicDestroy (FcAtomic *atomic); /* fcmatch.c */ FcPublic FcPattern * FcFontSetMatch (FcConfig *config, FcFontSet **sets, int nsets, FcPattern *p, FcResult *result); FcPublic FcPattern * FcFontMatch (FcConfig *config, FcPattern *p, FcResult *result); FcPublic FcPattern * FcFontRenderPrepare (FcConfig *config, FcPattern *pat, FcPattern *font); FcPublic FcFontSet * FcFontSetSort (FcConfig *config, FcFontSet **sets, int nsets, FcPattern *p, FcBool trim, FcCharSet **csp, FcResult *result); FcPublic FcFontSet * FcFontSort (FcConfig *config, FcPattern *p, FcBool trim, FcCharSet **csp, FcResult *result); FcPublic void FcFontSetSortDestroy (FcFontSet *fs); /* fcmatrix.c */ FcPublic FcMatrix * FcMatrixCopy (const FcMatrix *mat); FcPublic FcBool FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2); FcPublic void FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b); FcPublic void FcMatrixRotate (FcMatrix *m, double c, double s); FcPublic void FcMatrixScale (FcMatrix *m, double sx, double sy); FcPublic void FcMatrixShear (FcMatrix *m, double sh, double sv); /* fcname.c */ /* Deprecated. Does nothing. Returns FcFalse. */ FcPublic FcBool FcNameRegisterObjectTypes (const FcObjectType *types, int ntype); /* Deprecated. Does nothing. Returns FcFalse. */ FcPublic FcBool FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype); FcPublic const FcObjectType * FcNameGetObjectType (const char *object); /* Deprecated. Does nothing. Returns FcFalse. */ FcPublic FcBool FcNameRegisterConstants (const FcConstant *consts, int nconsts); /* Deprecated. Does nothing. Returns FcFalse. */ FcPublic FcBool FcNameUnregisterConstants (const FcConstant *consts, int nconsts); FcPublic const FcConstant * FcNameGetConstant (const FcChar8 *string); FcPublic FcBool FcNameConstant (const FcChar8 *string, int *result); FcPublic FcPattern * FcNameParse (const FcChar8 *name); FcPublic FcChar8 * FcNameUnparse (FcPattern *pat); /* fcpat.c */ FcPublic FcPattern * FcPatternCreate (void); FcPublic FcPattern * FcPatternDuplicate (const FcPattern *p); FcPublic void FcPatternReference (FcPattern *p); FcPublic FcPattern * FcPatternFilter (FcPattern *p, const FcObjectSet *os); FcPublic void FcValueDestroy (FcValue v); FcPublic FcBool FcValueEqual (FcValue va, FcValue vb); FcPublic FcValue FcValueSave (FcValue v); FcPublic void FcPatternDestroy (FcPattern *p); int FcPatternObjectCount (const FcPattern *pat); FcPublic FcBool FcPatternEqual (const FcPattern *pa, const FcPattern *pb); FcPublic FcBool FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os); FcPublic FcChar32 FcPatternHash (const FcPattern *p); FcPublic FcBool FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append); FcPublic FcBool FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append); FcPublic FcResult FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v); FcPublic FcResult FcPatternGetWithBinding (const FcPattern *p, const char *object, int id, FcValue *v, FcValueBinding *b); FcPublic FcBool FcPatternDel (FcPattern *p, const char *object); FcPublic FcBool FcPatternRemove (FcPattern *p, const char *object, int id); FcPublic FcBool FcPatternAddInteger (FcPattern *p, const char *object, int i); FcPublic FcBool FcPatternAddDouble (FcPattern *p, const char *object, double d); FcPublic FcBool FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s); FcPublic FcBool FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s); FcPublic FcBool FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c); FcPublic FcBool FcPatternAddBool (FcPattern *p, const char *object, FcBool b); FcPublic FcBool FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls); FcPublic FcBool FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r); FcPublic FcResult FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i); FcPublic FcResult FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d); FcPublic FcResult FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s); FcPublic FcResult FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s); FcPublic FcResult FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c); FcPublic FcResult FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b); FcPublic FcResult FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls); FcPublic FcResult FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r); FcPublic FcPattern * FcPatternVaBuild (FcPattern *p, va_list va); FcPublic FcPattern * FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0); FcPublic FcChar8 * FcPatternFormat (FcPattern *pat, const FcChar8 *format); /* fcrange.c */ FcPublic FcRange * FcRangeCreateDouble (double begin, double end); FcPublic FcRange * FcRangeCreateInteger (FcChar32 begin, FcChar32 end); FcPublic void FcRangeDestroy (FcRange *range); FcPublic FcRange * FcRangeCopy (const FcRange *r); FcPublic FcBool FcRangeGetDouble(const FcRange *range, double *begin, double *end); FcPublic void FcPatternIterStart (const FcPattern *pat, FcPatternIter *iter); FcPublic FcBool FcPatternIterNext (const FcPattern *pat, FcPatternIter *iter); FcPublic FcBool FcPatternIterEqual (const FcPattern *p1, FcPatternIter *i1, const FcPattern *p2, FcPatternIter *i2); FcPublic FcBool FcPatternFindIter (const FcPattern *pat, FcPatternIter *iter, const char *object); FcPublic FcBool FcPatternIterIsValid (const FcPattern *pat, FcPatternIter *iter); FcPublic const char * FcPatternIterGetObject (const FcPattern *pat, FcPatternIter *iter); FcPublic int FcPatternIterValueCount (const FcPattern *pat, FcPatternIter *iter); FcPublic FcResult FcPatternIterGetValue (const FcPattern *pat, FcPatternIter *iter, int id, FcValue *v, FcValueBinding *b); /* fcweight.c */ FcPublic int FcWeightFromOpenType (int ot_weight); FcPublic double FcWeightFromOpenTypeDouble (double ot_weight); FcPublic int FcWeightToOpenType (int fc_weight); FcPublic double FcWeightToOpenTypeDouble (double fc_weight); /* fcstr.c */ FcPublic FcChar8 * FcStrCopy (const FcChar8 *s); FcPublic FcChar8 * FcStrCopyFilename (const FcChar8 *s); FcPublic FcChar8 * FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); FcPublic void FcStrFree (FcChar8 *s); /* These are ASCII only, suitable only for pattern element names */ #define FcIsUpper(c) ((0101 <= (c) && (c) <= 0132)) #define FcIsLower(c) ((0141 <= (c) && (c) <= 0172)) #define FcToLower(c) (FcIsUpper(c) ? (c) - 0101 + 0141 : (c)) FcPublic FcChar8 * FcStrDowncase (const FcChar8 *s); FcPublic int FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); FcPublic int FcStrCmp (const FcChar8 *s1, const FcChar8 *s2); FcPublic const FcChar8 * FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); FcPublic const FcChar8 * FcStrStr (const FcChar8 *s1, const FcChar8 *s2); FcPublic int FcUtf8ToUcs4 (const FcChar8 *src_orig, FcChar32 *dst, int len); FcPublic FcBool FcUtf8Len (const FcChar8 *string, int len, int *nchar, int *wchar); #define FC_UTF8_MAX_LEN 6 FcPublic int FcUcs4ToUtf8 (FcChar32 ucs4, FcChar8 dest[FC_UTF8_MAX_LEN]); FcPublic int FcUtf16ToUcs4 (const FcChar8 *src_orig, FcEndian endian, FcChar32 *dst, int len); /* in bytes */ FcPublic FcBool FcUtf16Len (const FcChar8 *string, FcEndian endian, int len, /* in bytes */ int *nchar, int *wchar); FcPublic FcChar8 * FcStrDirname (const FcChar8 *file); FcPublic FcChar8 * FcStrBasename (const FcChar8 *file); FcPublic FcStrSet * FcStrSetCreate (void); FcPublic FcBool FcStrSetMember (FcStrSet *set, const FcChar8 *s); FcPublic FcBool FcStrSetEqual (FcStrSet *sa, FcStrSet *sb); FcPublic FcBool FcStrSetAdd (FcStrSet *set, const FcChar8 *s); FcPublic FcBool FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s); FcPublic FcBool FcStrSetDel (FcStrSet *set, const FcChar8 *s); FcPublic void FcStrSetDestroy (FcStrSet *set); FcPublic FcStrList * FcStrListCreate (FcStrSet *set); FcPublic void FcStrListFirst (FcStrList *list); FcPublic FcChar8 * FcStrListNext (FcStrList *list); FcPublic void FcStrListDone (FcStrList *list); /* fcxml.c */ FcPublic FcBool FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain); FcPublic FcBool FcConfigParseAndLoadFromMemory (FcConfig *config, const FcChar8 *buffer, FcBool complain); _FCFUNCPROTOEND #undef FC_ATTRIBUTE_SENTINEL #ifndef _FCINT_H_ /* * Deprecated functions are placed here to help users fix their code without * digging through documentation */ #define FcConfigGetRescanInverval FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval #define FcConfigSetRescanInverval FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval #endif #endif /* _FONTCONFIG_H_ */ PKZpfontconfig/fcprivate.hnu[/* * fontconfig/fontconfig/fcprivate.h * * Copyright © 2001 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of the author(s) not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. The authors make no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _FCPRIVATE_H_ #define _FCPRIVATE_H_ /* * I tried this with functions that took va_list* arguments * but portability concerns made me change these functions * into macros (sigh). */ #define FcPatternVapBuild(result, orig, va) \ { \ FcPattern *__p__ = (orig); \ const char *__o__; \ FcValue __v__; \ \ if (!__p__) \ { \ __p__ = FcPatternCreate (); \ if (!__p__) \ goto _FcPatternVapBuild_bail0; \ } \ for (;;) \ { \ __o__ = va_arg (va, const char *); \ if (!__o__) \ break; \ __v__.type = va_arg (va, int); \ switch (__v__.type) { \ case FcTypeUnknown: \ case FcTypeVoid: \ goto _FcPatternVapBuild_bail1; \ case FcTypeInteger: \ __v__.u.i = va_arg (va, int); \ break; \ case FcTypeDouble: \ __v__.u.d = va_arg (va, double); \ break; \ case FcTypeString: \ __v__.u.s = va_arg (va, const FcChar8 *); \ break; \ case FcTypeBool: \ __v__.u.b = va_arg (va, FcBool); \ break; \ case FcTypeMatrix: \ __v__.u.m = va_arg (va, const FcMatrix *); \ break; \ case FcTypeCharSet: \ __v__.u.c = va_arg (va, const FcCharSet *); \ break; \ case FcTypeFTFace: \ __v__.u.f = va_arg (va, FT_Face); \ break; \ case FcTypeLangSet: \ __v__.u.l = va_arg (va, const FcLangSet *); \ break; \ case FcTypeRange: \ __v__.u.r = va_arg (va, const FcRange *); \ break; \ } \ if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \ goto _FcPatternVapBuild_bail1; \ } \ result = __p__; \ goto _FcPatternVapBuild_return; \ \ _FcPatternVapBuild_bail1: \ if (!orig) \ FcPatternDestroy (__p__); \ _FcPatternVapBuild_bail0: \ result = (void*)0; \ \ _FcPatternVapBuild_return: \ ; \ } #define FcObjectSetVapBuild(__ret__, __first__, __va__) \ { \ FcObjectSet *__os__; \ const char *__ob__; \ \ __ret__ = 0; \ __os__ = FcObjectSetCreate (); \ if (!__os__) \ goto _FcObjectSetVapBuild_bail0; \ __ob__ = __first__; \ while (__ob__) \ { \ if (!FcObjectSetAdd (__os__, __ob__)) \ goto _FcObjectSetVapBuild_bail1; \ __ob__ = va_arg (__va__, const char *); \ } \ __ret__ = __os__; \ \ _FcObjectSetVapBuild_bail1: \ if (!__ret__ && __os__) \ FcObjectSetDestroy (__os__); \ _FcObjectSetVapBuild_bail0: \ ; \ } #ifndef FC_ATTRIBUTE_VISIBILITY_HIDDEN #define FC_ATTRIBUTE_VISIBILITY_HIDDEN __attribute((visibility("hidden"))) #endif #ifndef FC_ATTRIBUTE_VISIBILITY_EXPORT #define FC_ATTRIBUTE_VISIBILITY_EXPORT __attribute((visibility("default"))) #endif #endif /* _FCPRIVATE_H_ */ PKZsΦfontconfig/fcfreetype.hnu[/* * fontconfig/fontconfig/fcfreetype.h * * Copyright © 2001 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of the author(s) not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. The authors make no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _FCFREETYPE_H_ #define _FCFREETYPE_H_ #include #include FT_FREETYPE_H #ifndef FcPublic #define FcPublic #endif _FCFUNCPROTOBEGIN FcPublic FT_UInt FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4); FcPublic FcCharSet * FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing); FcPublic FcCharSet * FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks); FcPublic FcResult FcPatternGetFTFace (const FcPattern *p, const char *object, int n, FT_Face *f); FcPublic FcBool FcPatternAddFTFace (FcPattern *p, const char *object, const FT_Face f); FcPublic FcPattern * FcFreeTypeQueryFace (const FT_Face face, const FcChar8 *file, unsigned int id, FcBlanks *blanks); _FCFUNCPROTOEND #endif PKZ|Q fts.hnu[/* File tree traversal functions declarations. Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)fts.h 8.3 (Berkeley) 8/14/94 */ #ifndef _FTS_H #define _FTS_H 1 #include #include typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ int (*fts_compar) (const void *, const void *); /* compare fn */ #define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ #define FTS_LOGICAL 0x0002 /* logical walk */ #define FTS_NOCHDIR 0x0004 /* don't change directories */ #define FTS_NOSTAT 0x0008 /* don't get stat info */ #define FTS_PHYSICAL 0x0010 /* physical walk */ #define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ #define FTS_XDEV 0x0040 /* don't cross devices */ #define FTS_WHITEOUT 0x0080 /* return whiteout information */ #define FTS_OPTIONMASK 0x00ff /* valid user option mask */ #define FTS_NAMEONLY 0x0100 /* (private) child names only */ #define FTS_STOP 0x0200 /* (private) unrecoverable error */ int fts_options; /* fts_open options, global flags */ } FTS; #ifdef __USE_LARGEFILE64 typedef struct { struct _ftsent64 *fts_cur; /* current node */ struct _ftsent64 *fts_child; /* linked list of children */ struct _ftsent64 **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ int (*fts_compar) (const void *, const void *); /* compare fn */ int fts_options; /* fts_open options, global flags */ } FTS64; #endif typedef struct _ftsent { struct _ftsent *fts_cycle; /* cycle node */ struct _ftsent *fts_parent; /* parent directory */ struct _ftsent *fts_link; /* next file in directory */ long fts_number; /* local numeric value */ void *fts_pointer; /* local address value */ char *fts_accpath; /* access path */ char *fts_path; /* root path */ int fts_errno; /* errno for this node */ int fts_symfd; /* fd for symlink */ unsigned short fts_pathlen; /* strlen(fts_path) */ unsigned short fts_namelen; /* strlen(fts_name) */ ino_t fts_ino; /* inode */ dev_t fts_dev; /* device */ nlink_t fts_nlink; /* link count */ #define FTS_ROOTPARENTLEVEL -1 #define FTS_ROOTLEVEL 0 short fts_level; /* depth (-1 to N) */ #define FTS_D 1 /* preorder directory */ #define FTS_DC 2 /* directory that causes cycles */ #define FTS_DEFAULT 3 /* none of the above */ #define FTS_DNR 4 /* unreadable directory */ #define FTS_DOT 5 /* dot or dot-dot */ #define FTS_DP 6 /* postorder directory */ #define FTS_ERR 7 /* error; errno is set */ #define FTS_F 8 /* regular file */ #define FTS_INIT 9 /* initialized only */ #define FTS_NS 10 /* stat(2) failed */ #define FTS_NSOK 11 /* no stat(2) requested */ #define FTS_SL 12 /* symbolic link */ #define FTS_SLNONE 13 /* symbolic link without target */ #define FTS_W 14 /* whiteout object */ unsigned short fts_info; /* user flags for FTSENT structure */ #define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ #define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ unsigned short fts_flags; /* private flags for FTSENT structure */ #define FTS_AGAIN 1 /* read node again */ #define FTS_FOLLOW 2 /* follow symbolic link */ #define FTS_NOINSTR 3 /* no instructions */ #define FTS_SKIP 4 /* discard node */ unsigned short fts_instr; /* fts_set() instructions */ struct stat *fts_statp; /* stat(2) information */ char fts_name[1]; /* file name */ } FTSENT; #ifdef __USE_LARGEFILE64 typedef struct _ftsent64 { struct _ftsent64 *fts_cycle; /* cycle node */ struct _ftsent64 *fts_parent; /* parent directory */ struct _ftsent64 *fts_link; /* next file in directory */ long fts_number; /* local numeric value */ void *fts_pointer; /* local address value */ char *fts_accpath; /* access path */ char *fts_path; /* root path */ int fts_errno; /* errno for this node */ int fts_symfd; /* fd for symlink */ unsigned short fts_pathlen; /* strlen(fts_path) */ unsigned short fts_namelen; /* strlen(fts_name) */ ino64_t fts_ino; /* inode */ dev_t fts_dev; /* device */ nlink_t fts_nlink; /* link count */ short fts_level; /* depth (-1 to N) */ unsigned short fts_info; /* user flags for FTSENT structure */ unsigned short fts_flags; /* private flags for FTSENT structure */ unsigned short fts_instr; /* fts_set() instructions */ struct stat64 *fts_statp; /* stat(2) information */ char fts_name[1]; /* file name */ } FTSENT64; #endif __BEGIN_DECLS #ifndef __USE_FILE_OFFSET64 FTSENT *fts_children (FTS *, int); int fts_close (FTS *); FTS *fts_open (char * const *, int, int (*)(const FTSENT **, const FTSENT **)); FTSENT *fts_read (FTS *); int fts_set (FTS *, FTSENT *, int) __THROW; #else # ifdef __REDIRECT FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children); int __REDIRECT (fts_close, (FTS *), fts64_close); FTS *__REDIRECT (fts_open, (char * const *, int, int (*)(const FTSENT **, const FTSENT **)), fts64_open); FTSENT *__REDIRECT (fts_read, (FTS *), fts64_read); int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int), fts64_set); # else # define fts_children fts64_children # define fts_close fts64_close # define fts_open fts64_open # define fts_read fts64_read # define fts_set fts64_set # endif #endif #ifdef __USE_LARGEFILE64 FTSENT64 *fts64_children (FTS64 *, int); int fts64_close (FTS64 *); FTS64 *fts64_open (char * const *, int, int (*)(const FTSENT64 **, const FTSENT64 **)); FTSENT64 *fts64_read (FTS64 *); int fts64_set (FTS64 *, FTSENT64 *, int) __THROW; #endif __END_DECLS #endif /* fts.h */ PKZ8¾evutil.hnu[/* * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT1_EVUTIL_H_INCLUDED_ #define EVENT1_EVUTIL_H_INCLUDED_ /** @file evutil.h Utility and compatibility functions for Libevent. The header is deprecated in Libevent 2.0 and later; please use instead. */ #include #endif /* EVENT1_EVUTIL_H_INCLUDED_ */ PKZ`Q!!stdint.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.18 Integer types */ #ifndef _STDINT_H #define _STDINT_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include #include #include #include /* Exact integral types. */ /* Signed. */ #include /* Unsigned. */ #include /* Small types. */ /* Signed. */ typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; typedef __int_least64_t int_least64_t; /* Unsigned. */ typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; /* Fast types. */ /* Signed. */ typedef signed char int_fast8_t; #if __WORDSIZE == 64 typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; #else typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; #endif /* Unsigned. */ typedef unsigned char uint_fast8_t; #if __WORDSIZE == 64 typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; #else typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; #endif /* Types for `void *' pointers. */ #if __WORDSIZE == 64 # ifndef __intptr_t_defined typedef long int intptr_t; # define __intptr_t_defined # endif typedef unsigned long int uintptr_t; #else # ifndef __intptr_t_defined typedef int intptr_t; # define __intptr_t_defined # endif typedef unsigned int uintptr_t; #endif /* Largest integral types. */ typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; # if __WORDSIZE == 64 # define __INT64_C(c) c ## L # define __UINT64_C(c) c ## UL # else # define __INT64_C(c) c ## LL # define __UINT64_C(c) c ## ULL # endif /* Limits of integral types. */ /* Minimum of signed integral types. */ # define INT8_MIN (-128) # define INT16_MIN (-32767-1) # define INT32_MIN (-2147483647-1) # define INT64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types. */ # define INT8_MAX (127) # define INT16_MAX (32767) # define INT32_MAX (2147483647) # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ # define UINT8_MAX (255) # define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of signed integral types having a minimum size. */ # define INT_LEAST8_MIN (-128) # define INT_LEAST16_MIN (-32767-1) # define INT_LEAST32_MIN (-2147483647-1) # define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types having a minimum size. */ # define INT_LEAST8_MAX (127) # define INT_LEAST16_MAX (32767) # define INT_LEAST32_MAX (2147483647) # define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types having a minimum size. */ # define UINT_LEAST8_MAX (255) # define UINT_LEAST16_MAX (65535) # define UINT_LEAST32_MAX (4294967295U) # define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of fast signed integral types having a minimum size. */ # define INT_FAST8_MIN (-128) # if __WORDSIZE == 64 # define INT_FAST16_MIN (-9223372036854775807L-1) # define INT_FAST32_MIN (-9223372036854775807L-1) # else # define INT_FAST16_MIN (-2147483647-1) # define INT_FAST32_MIN (-2147483647-1) # endif # define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of fast signed integral types having a minimum size. */ # define INT_FAST8_MAX (127) # if __WORDSIZE == 64 # define INT_FAST16_MAX (9223372036854775807L) # define INT_FAST32_MAX (9223372036854775807L) # else # define INT_FAST16_MAX (2147483647) # define INT_FAST32_MAX (2147483647) # endif # define INT_FAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of fast unsigned integral types having a minimum size. */ # define UINT_FAST8_MAX (255) # if __WORDSIZE == 64 # define UINT_FAST16_MAX (18446744073709551615UL) # define UINT_FAST32_MAX (18446744073709551615UL) # else # define UINT_FAST16_MAX (4294967295U) # define UINT_FAST32_MAX (4294967295U) # endif # define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) /* Values to test for integral types holding `void *' pointer. */ # if __WORDSIZE == 64 # define INTPTR_MIN (-9223372036854775807L-1) # define INTPTR_MAX (9223372036854775807L) # define UINTPTR_MAX (18446744073709551615UL) # else # define INTPTR_MIN (-2147483647-1) # define INTPTR_MAX (2147483647) # define UINTPTR_MAX (4294967295U) # endif /* Minimum for largest signed integral type. */ # define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum for largest signed integral type. */ # define INTMAX_MAX (__INT64_C(9223372036854775807)) /* Maximum for largest unsigned integral type. */ # define UINTMAX_MAX (__UINT64_C(18446744073709551615)) /* Limits of other integer types. */ /* Limits of `ptrdiff_t' type. */ # if __WORDSIZE == 64 # define PTRDIFF_MIN (-9223372036854775807L-1) # define PTRDIFF_MAX (9223372036854775807L) # else # if __WORDSIZE32_PTRDIFF_LONG # define PTRDIFF_MIN (-2147483647L-1) # define PTRDIFF_MAX (2147483647L) # else # define PTRDIFF_MIN (-2147483647-1) # define PTRDIFF_MAX (2147483647) # endif # endif /* Limits of `sig_atomic_t'. */ # define SIG_ATOMIC_MIN (-2147483647-1) # define SIG_ATOMIC_MAX (2147483647) /* Limit of `size_t' type. */ # if __WORDSIZE == 64 # define SIZE_MAX (18446744073709551615UL) # else # if __WORDSIZE32_SIZE_ULONG # define SIZE_MAX (4294967295UL) # else # define SIZE_MAX (4294967295U) # endif # endif /* Limits of `wchar_t'. */ # ifndef WCHAR_MIN /* These constants might also be defined in . */ # define WCHAR_MIN __WCHAR_MIN # define WCHAR_MAX __WCHAR_MAX # endif /* Limits of `wint_t'. */ # define WINT_MIN (0u) # define WINT_MAX (4294967295u) /* Signed. */ # define INT8_C(c) c # define INT16_C(c) c # define INT32_C(c) c # if __WORDSIZE == 64 # define INT64_C(c) c ## L # else # define INT64_C(c) c ## LL # endif /* Unsigned. */ # define UINT8_C(c) c # define UINT16_C(c) c # define UINT32_C(c) c ## U # if __WORDSIZE == 64 # define UINT64_C(c) c ## UL # else # define UINT64_C(c) c ## ULL # endif /* Maximal type. */ # if __WORDSIZE == 64 # define INTMAX_C(c) c ## L # define UINTMAX_C(c) c ## UL # else # define INTMAX_C(c) c ## LL # define UINTMAX_C(c) c ## ULL # endif #if __GLIBC_USE (IEC_60559_BFP_EXT) # define INT8_WIDTH 8 # define UINT8_WIDTH 8 # define INT16_WIDTH 16 # define UINT16_WIDTH 16 # define INT32_WIDTH 32 # define UINT32_WIDTH 32 # define INT64_WIDTH 64 # define UINT64_WIDTH 64 # define INT_LEAST8_WIDTH 8 # define UINT_LEAST8_WIDTH 8 # define INT_LEAST16_WIDTH 16 # define UINT_LEAST16_WIDTH 16 # define INT_LEAST32_WIDTH 32 # define UINT_LEAST32_WIDTH 32 # define INT_LEAST64_WIDTH 64 # define UINT_LEAST64_WIDTH 64 # define INT_FAST8_WIDTH 8 # define UINT_FAST8_WIDTH 8 # define INT_FAST16_WIDTH __WORDSIZE # define UINT_FAST16_WIDTH __WORDSIZE # define INT_FAST32_WIDTH __WORDSIZE # define UINT_FAST32_WIDTH __WORDSIZE # define INT_FAST64_WIDTH 64 # define UINT_FAST64_WIDTH 64 # define INTPTR_WIDTH __WORDSIZE # define UINTPTR_WIDTH __WORDSIZE # define INTMAX_WIDTH 64 # define UINTMAX_WIDTH 64 # define PTRDIFF_WIDTH __WORDSIZE # define SIG_ATOMIC_WIDTH 32 # define SIZE_WIDTH __WORDSIZE # define WCHAR_WIDTH 32 # define WINT_WIDTH 32 #endif #endif /* stdint.h */ PKZ$wo wordexp.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _WORDEXP_H #define _WORDEXP_H 1 #include #define __need_size_t #include __BEGIN_DECLS /* Bits set in the FLAGS argument to `wordexp'. */ enum { WRDE_DOOFFS = (1 << 0), /* Insert PWORDEXP->we_offs NULLs. */ WRDE_APPEND = (1 << 1), /* Append to results of a previous call. */ WRDE_NOCMD = (1 << 2), /* Don't do command substitution. */ WRDE_REUSE = (1 << 3), /* Reuse storage in PWORDEXP. */ WRDE_SHOWERR = (1 << 4), /* Don't redirect stderr to /dev/null. */ WRDE_UNDEF = (1 << 5), /* Error for expanding undefined variables. */ __WRDE_FLAGS = (WRDE_DOOFFS | WRDE_APPEND | WRDE_NOCMD | WRDE_REUSE | WRDE_SHOWERR | WRDE_UNDEF) }; /* Structure describing a word-expansion run. */ typedef struct { size_t we_wordc; /* Count of words matched. */ char **we_wordv; /* List of expanded words. */ size_t we_offs; /* Slots to reserve in `we_wordv'. */ } wordexp_t; /* Possible nonzero return values from `wordexp'. */ enum { #ifdef __USE_XOPEN WRDE_NOSYS = -1, /* Never used since we support `wordexp'. */ #endif WRDE_NOSPACE = 1, /* Ran out of memory. */ WRDE_BADCHAR, /* A metachar appears in the wrong place. */ WRDE_BADVAL, /* Undefined var reference with WRDE_UNDEF. */ WRDE_CMDSUB, /* Command substitution with WRDE_NOCMD. */ WRDE_SYNTAX /* Shell syntax error. */ }; /* Do word expansion of WORDS into PWORDEXP. */ extern int wordexp (const char *__restrict __words, wordexp_t *__restrict __pwordexp, int __flags); /* Free the storage allocated by a `wordexp' call. */ extern void wordfree (wordexp_t *__wordexp) __THROW; __END_DECLS #endif /* wordexp.h */ PKZ:mmnetdb.hnu[ /* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* All data returned by the network data base library are supplied in host order and returned in network order (suitable for use in system calls). */ #ifndef _NETDB_H #define _NETDB_H 1 #include #include #include #ifdef __USE_MISC /* This is necessary to make this include file properly replace the Sun version. */ # include #endif #ifdef __USE_GNU # include # include #endif #include /* Absolute file name for network data base files. */ #define _PATH_HEQUIV "/etc/hosts.equiv" #define _PATH_HOSTS "/etc/hosts" #define _PATH_NETWORKS "/etc/networks" #define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" #define _PATH_PROTOCOLS "/etc/protocols" #define _PATH_SERVICES "/etc/services" __BEGIN_DECLS #if defined __USE_MISC || !defined __USE_XOPEN2K8 /* Error status for non-reentrant lookup functions. We use a macro to access always the thread-specific `h_errno' variable. */ # define h_errno (*__h_errno_location ()) /* Function to get address of global `h_errno' variable. */ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); /* Possible values left in `h_errno'. */ # define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */ # define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL. */ # define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP. */ # define NO_DATA 4 /* Valid name, no data record of requested type. */ #endif #ifdef __USE_MISC # define NETDB_INTERNAL -1 /* See errno. */ # define NETDB_SUCCESS 0 /* No problem. */ # define NO_ADDRESS NO_DATA /* No address, look for MX record. */ #endif #if defined __USE_XOPEN2K || defined __USE_XOPEN_EXTENDED /* Highest reserved Internet port number. */ # define IPPORT_RESERVED 1024 #endif #ifdef __USE_GNU /* Scope delimiter for getaddrinfo(), getnameinfo(). */ # define SCOPE_DELIMITER '%' #endif #ifdef __USE_MISC /* Print error indicated by `h_errno' variable on standard error. STR if non-null is printed before the error string. */ extern void herror (const char *__str) __THROW; /* Return string associated with error ERR_NUM. */ extern const char *hstrerror (int __err_num) __THROW; #endif /* Description of data base entry for a single host. */ struct hostent { char *h_name; /* Official name of host. */ char **h_aliases; /* Alias list. */ int h_addrtype; /* Host address type. */ int h_length; /* Length of address. */ char **h_addr_list; /* List of addresses from name server. */ #ifdef __USE_MISC # define h_addr h_addr_list[0] /* Address, for backward compatibility.*/ #endif }; /* Open host data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void sethostent (int __stay_open); /* Close host data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endhostent (void); /* Get next entry from host data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostent (void); /* Return entry from host data base which address match ADDR with length LEN and type TYPE. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len, int __type); /* Return entry from host data base for host with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyname (const char *__name); #ifdef __USE_MISC /* Return entry from host data base for host with NAME. AF must be set to the address type which is `AF_INET' for IPv4 or `AF_INET6' for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyname2 (const char *__name, int __af); /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. The last argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int gethostent_r (struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len, int __type, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname_r (const char *__restrict __name, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname2_r (const char *__restrict __name, int __af, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); #endif /* misc */ /* Open network data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setnetent (int __stay_open); /* Close network data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endnetent (void); /* Get next entry from network data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetent (void); /* Return entry from network data base which address match NET and type TYPE. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetbyaddr (uint32_t __net, int __type); /* Return entry from network data base for network with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetbyname (const char *__name); #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. The last argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getnetent_r (struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyaddr_r (uint32_t __net, int __type, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyname_r (const char *__restrict __name, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); #endif /* misc */ /* Description of data base entry for a single service. */ struct servent { char *s_name; /* Official service name. */ char **s_aliases; /* Alias list. */ int s_port; /* Port number. */ char *s_proto; /* Protocol to use. */ }; /* Open service data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setservent (int __stay_open); /* Close service data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endservent (void); /* Get next entry from service data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservent (void); /* Return entry from network data base for network with NAME and protocol PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservbyname (const char *__name, const char *__proto); /* Return entry from service data base which matches port PORT and protocol PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservbyport (int __port, const char *__proto); #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getservent_r (struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyname_r (const char *__restrict __name, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyport_r (int __port, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); #endif /* misc */ /* Description of data base entry for a single service. */ struct protoent { char *p_name; /* Official protocol name. */ char **p_aliases; /* Alias list. */ int p_proto; /* Protocol number. */ }; /* Open protocol data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setprotoent (int __stay_open); /* Close protocol data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endprotoent (void); /* Get next entry from protocol data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotoent (void); /* Return entry from protocol data base for network with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotobyname (const char *__name); /* Return entry from protocol data base which number is PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotobynumber (int __proto); #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getprotoent_r (struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobyname_r (const char *__restrict __name, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobynumber_r (int __proto, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); /* Establish network group NETGROUP for enumeration. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int setnetgrent (const char *__netgroup); /* Free all space allocated by previous `setnetgrent' call. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern void endnetgrent (void); /* Get next member of netgroup established by last `setnetgrent' call and return pointers to elements in HOSTP, USERP, and DOMAINP. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getnetgrent (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp); /* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int innetgr (const char *__netgroup, const char *__host, const char *__user, const char *__domain); /* Reentrant version of `getnetgrent' where result is placed in BUFFER. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getnetgrent_r (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp, char *__restrict __buffer, size_t __buflen); #endif /* misc */ #ifdef __USE_MISC /* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD. The local user is LOCUSER, on the remote machine the command is executed as REMUSER. In *FD2P the descriptor to the socket for the connection is returned. The caller must have the right to use a reserved port. When the function returns *AHOST contains the official host name. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); /* Call `rexecd' at port RPORT on remote machine *AHOST to execute CMD. The process runs at the remote machine using the ID of user NAME whose cleartext password is PASSWD. In *FD2P the descriptor to the socket for the connection is returned. When the function returns *AHOST contains the official host name. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec_af (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); /* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER. If SUSER is not zero the user tries to become superuser. Return 0 if it is possible. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int ruserok (const char *__rhost, int __suser, const char *__remuser, const char *__locuser); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int ruserok_af (const char *__rhost, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); /* Check whether user REMUSER on system indicated by IPv4 address RADDR is allowed to login as LOCUSER. Non-IPv4 (e.g., IPv6) are not supported. If SUSER is not zero the user tries to become superuser. Return 0 if it is possible. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int iruserok (uint32_t __raddr, int __suser, const char *__remuser, const char *__locuser); /* This is the equivalent function where the pfamiliy if the address pointed to by RADDR is determined by the value of AF. It therefore can be used for IPv6 This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int iruserok_af (const void *__raddr, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); /* Try to allocate reserved port, returning a descriptor for a socket opened at this port or -1 if unsuccessful. The search for an available port will start at ALPORT and continues with lower numbers. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rresvport (int *__alport); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rresvport_af (int *__alport, sa_family_t __af); #endif /* Extension from POSIX.1:2001. */ #ifdef __USE_XOPEN2K /* Structure to contain information about address of a service provider. */ struct addrinfo { int ai_flags; /* Input flags. */ int ai_family; /* Protocol family for socket. */ int ai_socktype; /* Socket type. */ int ai_protocol; /* Protocol for socket. */ socklen_t ai_addrlen; /* Length of socket address. */ struct sockaddr *ai_addr; /* Socket address for socket. */ char *ai_canonname; /* Canonical name for service location. */ struct addrinfo *ai_next; /* Pointer to next in list. */ }; # ifdef __USE_GNU /* Structure used as control block for asynchronous lookup. */ struct gaicb { const char *ar_name; /* Name to look up. */ const char *ar_service; /* Service name. */ const struct addrinfo *ar_request; /* Additional request specification. */ struct addrinfo *ar_result; /* Pointer to result. */ /* The following are internal elements. */ int __return; int __glibc_reserved[5]; }; /* Lookup mode. */ # define GAI_WAIT 0 # define GAI_NOWAIT 1 # endif /* Possible values for `ai_flags' field in `addrinfo' structure. */ # define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ # define AI_CANONNAME 0x0002 /* Request for canonical name. */ # define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ # define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */ # define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */ # define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose returned address type.. */ # ifdef __USE_GNU # define AI_IDN 0x0040 /* IDN encode input (assuming it is encoded in the current locale's character set) before looking it up. */ # define AI_CANONIDN 0x0080 /* Translate canonical name from IDN format. */ # define AI_IDN_ALLOW_UNASSIGNED \ __glibc_macro_warning ("AI_IDN_ALLOW_UNASSIGNED is deprecated") 0x0100 # define AI_IDN_USE_STD3_ASCII_RULES \ __glibc_macro_warning ("AI_IDN_USE_STD3_ASCII_RULES is deprecated") 0x0200 # endif # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ /* Error values for `getaddrinfo' function. */ # define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ # define EAI_AGAIN -3 /* Temporary failure in name resolution. */ # define EAI_FAIL -4 /* Non-recoverable failure in name res. */ # define EAI_FAMILY -6 /* `ai_family' not supported. */ # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ # define EAI_SYSTEM -11 /* System error returned in `errno'. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */ # ifdef __USE_GNU # define EAI_NODATA -5 /* No address associated with NAME. */ # define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ # define EAI_INPROGRESS -100 /* Processing request in progress. */ # define EAI_CANCELED -101 /* Request canceled. */ # define EAI_NOTCANCELED -102 /* Request not canceled. */ # define EAI_ALLDONE -103 /* All requests done. */ # define EAI_INTR -104 /* Interrupted by a signal. */ # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ # endif # ifdef __USE_MISC # define NI_MAXHOST 1025 # define NI_MAXSERV 32 # endif # define NI_NUMERICHOST 1 /* Don't try to look up hostname. */ # define NI_NUMERICSERV 2 /* Don't convert port number to name. */ # define NI_NOFQDN 4 /* Only return nodename portion. */ # define NI_NAMEREQD 8 /* Don't return numeric addresses. */ # define NI_DGRAM 16 /* Look up UDP service rather than TCP. */ # ifdef __USE_GNU # define NI_IDN 32 /* Convert name from IDN format. */ # define NI_IDN_ALLOW_UNASSIGNED \ __glibc_macro_warning ("NI_IDN_ALLOW_UNASSIGNED is deprecated") 64 # define NI_IDN_USE_STD3_ASCII_RULES \ __glibc_macro_warning ("NI_IDN_USE_STD3_ASCII_RULES is deprecated") 128 # endif /* Translate name of a service location and/or a service name to set of socket addresses. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getaddrinfo (const char *__restrict __name, const char *__restrict __service, const struct addrinfo *__restrict __req, struct addrinfo **__restrict __pai); /* Free `addrinfo' structure AI including associated storage. */ extern void freeaddrinfo (struct addrinfo *__ai) __THROW; /* Convert error return from getaddrinfo() to a string. */ extern const char *gai_strerror (int __ecode) __THROW; /* Translate a socket address to a location and service name. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, socklen_t __servlen, int __flags); #endif /* POSIX */ #ifdef __USE_GNU /* Enqueue ENT requests from the LIST. If MODE is GAI_WAIT wait until all requests are handled. If WAIT is GAI_NOWAIT return immediately after queueing the requests and signal completion according to SIG. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr], int __ent, struct sigevent *__restrict __sig); /* Suspend execution of the thread until at least one of the ENT requests in LIST is handled. If TIMEOUT is not a null pointer it specifies the longest time the function keeps waiting before returning with an error. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int gai_suspend (const struct gaicb *const __list[], int __ent, const struct timespec *__timeout); /* Get the error status of the request REQ. */ extern int gai_error (struct gaicb *__req) __THROW; /* Cancel the requests associated with GAICBP. */ extern int gai_cancel (struct gaicb *__gaicbp) __THROW; #endif /* GNU */ __END_DECLS #endif /* netdb.h */ PKZ*  pcrecpparg.hnu[// Copyright (c) 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Author: Sanjay Ghemawat #ifndef _PCRECPPARG_H #define _PCRECPPARG_H #include // for NULL #include #include namespace pcrecpp { class StringPiece; // Hex/Octal/Binary? // Special class for parsing into objects that define a ParseFrom() method template class _RE_MatchObject { public: static inline bool Parse(const char* str, int n, void* dest) { if (dest == NULL) return true; T* object = reinterpret_cast(dest); return object->ParseFrom(str, n); } }; class PCRECPP_EXP_DEFN Arg { public: // Empty constructor so we can declare arrays of Arg Arg(); // Constructor specially designed for NULL arguments Arg(void*); typedef bool (*Parser)(const char* str, int n, void* dest); // Type-specific parsers #define PCRE_MAKE_PARSER(type,name) \ Arg(type* p) : arg_(p), parser_(name) { } \ Arg(type* p, Parser parser) : arg_(p), parser_(parser) { } PCRE_MAKE_PARSER(char, parse_char); PCRE_MAKE_PARSER(unsigned char, parse_uchar); PCRE_MAKE_PARSER(short, parse_short); PCRE_MAKE_PARSER(unsigned short, parse_ushort); PCRE_MAKE_PARSER(int, parse_int); PCRE_MAKE_PARSER(unsigned int, parse_uint); PCRE_MAKE_PARSER(long, parse_long); PCRE_MAKE_PARSER(unsigned long, parse_ulong); #if 1 PCRE_MAKE_PARSER(long long, parse_longlong); #endif #if 1 PCRE_MAKE_PARSER(unsigned long long, parse_ulonglong); #endif PCRE_MAKE_PARSER(float, parse_float); PCRE_MAKE_PARSER(double, parse_double); PCRE_MAKE_PARSER(std::string, parse_string); PCRE_MAKE_PARSER(StringPiece, parse_stringpiece); #undef PCRE_MAKE_PARSER // Generic constructor template Arg(T*, Parser parser); // Generic constructor template template Arg(T* p) : arg_(p), parser_(_RE_MatchObject::Parse) { } // Parse the data bool Parse(const char* str, int n) const; private: void* arg_; Parser parser_; static bool parse_null (const char* str, int n, void* dest); static bool parse_char (const char* str, int n, void* dest); static bool parse_uchar (const char* str, int n, void* dest); static bool parse_float (const char* str, int n, void* dest); static bool parse_double (const char* str, int n, void* dest); static bool parse_string (const char* str, int n, void* dest); static bool parse_stringpiece (const char* str, int n, void* dest); #define PCRE_DECLARE_INTEGER_PARSER(name) \ private: \ static bool parse_ ## name(const char* str, int n, void* dest); \ static bool parse_ ## name ## _radix( \ const char* str, int n, void* dest, int radix); \ public: \ static bool parse_ ## name ## _hex(const char* str, int n, void* dest); \ static bool parse_ ## name ## _octal(const char* str, int n, void* dest); \ static bool parse_ ## name ## _cradix(const char* str, int n, void* dest) PCRE_DECLARE_INTEGER_PARSER(short); PCRE_DECLARE_INTEGER_PARSER(ushort); PCRE_DECLARE_INTEGER_PARSER(int); PCRE_DECLARE_INTEGER_PARSER(uint); PCRE_DECLARE_INTEGER_PARSER(long); PCRE_DECLARE_INTEGER_PARSER(ulong); PCRE_DECLARE_INTEGER_PARSER(longlong); PCRE_DECLARE_INTEGER_PARSER(ulonglong); #undef PCRE_DECLARE_INTEGER_PARSER }; inline Arg::Arg() : arg_(NULL), parser_(parse_null) { } inline Arg::Arg(void* p) : arg_(p), parser_(parse_null) { } inline bool Arg::Parse(const char* str, int n) const { return (*parser_)(str, n, arg_); } // This part of the parser, appropriate only for ints, deals with bases #define MAKE_INTEGER_PARSER(type, name) \ inline Arg Hex(type* ptr) { \ return Arg(ptr, Arg::parse_ ## name ## _hex); } \ inline Arg Octal(type* ptr) { \ return Arg(ptr, Arg::parse_ ## name ## _octal); } \ inline Arg CRadix(type* ptr) { \ return Arg(ptr, Arg::parse_ ## name ## _cradix); } MAKE_INTEGER_PARSER(short, short) /* */ MAKE_INTEGER_PARSER(unsigned short, ushort) /* */ MAKE_INTEGER_PARSER(int, int) /* Don't use semicolons */ MAKE_INTEGER_PARSER(unsigned int, uint) /* after these statement */ MAKE_INTEGER_PARSER(long, long) /* because they can cause */ MAKE_INTEGER_PARSER(unsigned long, ulong) /* compiler warnings if */ #if 1 /* the checking level is */ MAKE_INTEGER_PARSER(long long, longlong) /* turned up high enough. */ #endif /* */ #if 1 /* */ MAKE_INTEGER_PARSER(unsigned long long, ulonglong) /* */ #endif #undef PCRE_IS_SET #undef PCRE_SET_OR_CLEAR #undef MAKE_INTEGER_PARSER } // namespace pcrecpp #endif /* _PCRECPPARG_H */ PKZ:MMltdl.hnu[/* ltdl.h -- generic dlopen functions Copyright (C) 1998-2000, 2004-2005, 2007-2008, 2011-2015 Free Software Foundation, Inc. Written by Thomas Tanner, 1998 NOTE: The canonical source of this file is maintained with the GNU Libtool package. Report bugs to bug-libtool@gnu.org. GNU Libltdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU Libtool, you may include this file under the same distribution terms that you use for the rest of that program. GNU Libltdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with GNU Libltdl; see the file COPYING.LIB. If not, a copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, or obtained by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Only include this header file once. */ #if !defined LTDL_H #define LTDL_H 1 #include #include #include LT_BEGIN_C_DECLS /* LT_STRLEN can be used safely on NULL pointers. */ #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) /* --- DYNAMIC MODULE LOADING API --- */ typedef struct lt__handle *lt_dlhandle; /* A loaded module. */ /* Initialisation and finalisation functions for libltdl. */ LT_SCOPE int lt_dlinit (void); LT_SCOPE int lt_dlexit (void); /* Module search path manipulation. */ LT_SCOPE int lt_dladdsearchdir (const char *search_dir); LT_SCOPE int lt_dlinsertsearchdir (const char *before, const char *search_dir); LT_SCOPE int lt_dlsetsearchpath (const char *search_path); LT_SCOPE const char *lt_dlgetsearchpath (void); LT_SCOPE int lt_dlforeachfile ( const char *search_path, int (*func) (const char *filename, void *data), void *data); /* User module loading advisors. */ LT_SCOPE int lt_dladvise_init (lt_dladvise *advise); LT_SCOPE int lt_dladvise_destroy (lt_dladvise *advise); LT_SCOPE int lt_dladvise_ext (lt_dladvise *advise); LT_SCOPE int lt_dladvise_resident (lt_dladvise *advise); LT_SCOPE int lt_dladvise_local (lt_dladvise *advise); LT_SCOPE int lt_dladvise_global (lt_dladvise *advise); LT_SCOPE int lt_dladvise_preload (lt_dladvise *advise); /* Portable libltdl versions of the system dlopen() API. */ LT_SCOPE lt_dlhandle lt_dlopen (const char *filename); LT_SCOPE lt_dlhandle lt_dlopenext (const char *filename); LT_SCOPE lt_dlhandle lt_dlopenadvise (const char *filename, lt_dladvise advise); LT_SCOPE void * lt_dlsym (lt_dlhandle handle, const char *name); LT_SCOPE const char *lt_dlerror (void); LT_SCOPE int lt_dlclose (lt_dlhandle handle); /* --- PRELOADED MODULE SUPPORT --- */ /* A preopened symbol. Arrays of this type comprise the exported symbols for a dlpreopened module. */ typedef struct { const char *name; void *address; } lt_dlsymlist; typedef int lt_dlpreload_callback_func (lt_dlhandle handle); LT_SCOPE int lt_dlpreload (const lt_dlsymlist *preloaded); LT_SCOPE int lt_dlpreload_default (const lt_dlsymlist *preloaded); LT_SCOPE int lt_dlpreload_open (const char *originator, lt_dlpreload_callback_func *func); #define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols /* Ensure C linkage. */ extern LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[]; #define LTDL_SET_PRELOADED_SYMBOLS() \ lt_dlpreload_default(lt_preloaded_symbols) /* --- MODULE INFORMATION --- */ /* Associating user data with loaded modules. */ typedef void * lt_dlinterface_id; typedef int lt_dlhandle_interface (lt_dlhandle handle, const char *id_string); LT_SCOPE lt_dlinterface_id lt_dlinterface_register (const char *id_string, lt_dlhandle_interface *iface); LT_SCOPE void lt_dlinterface_free (lt_dlinterface_id key); LT_SCOPE void * lt_dlcaller_set_data (lt_dlinterface_id key, lt_dlhandle handle, void *data); LT_SCOPE void * lt_dlcaller_get_data (lt_dlinterface_id key, lt_dlhandle handle); /* Read only information pertaining to a loaded module. */ typedef struct { char * filename; /* file name */ char * name; /* module name */ int ref_count; /* number of times lt_dlopened minus number of times lt_dlclosed. */ unsigned int is_resident:1; /* module can't be unloaded. */ unsigned int is_symglobal:1; /* module symbols can satisfy subsequently loaded modules. */ unsigned int is_symlocal:1; /* module symbols are only available locally. */ } lt_dlinfo; LT_SCOPE const lt_dlinfo *lt_dlgetinfo (lt_dlhandle handle); LT_SCOPE lt_dlhandle lt_dlhandle_iterate (lt_dlinterface_id iface, lt_dlhandle place); LT_SCOPE lt_dlhandle lt_dlhandle_fetch (lt_dlinterface_id iface, const char *module_name); LT_SCOPE int lt_dlhandle_map (lt_dlinterface_id iface, int (*func) (lt_dlhandle handle, void *data), void *data); /* Deprecated module residency management API. */ LT_SCOPE int lt_dlmakeresident (lt_dlhandle handle); LT_SCOPE int lt_dlisresident (lt_dlhandle handle); #define lt_ptr void * LT_END_C_DECLS #endif /*!defined LTDL_H*/ PKZzfm**tld.hnu[/* tld.h --- Declarations for TLD restriction checking. Copyright (C) 2004-2016 Simon Josefsson. Copyright (C) 2003-2014, 2016 Free Software Foundation, Inc. Author: Thomas Jacob, Internet24.de This file is part of GNU Libidn. GNU Libidn is free software: you can redistribute it and/or modify it under the terms of either: * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. or * the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. or both in parallel, as here. GNU Libidn is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received copies of the GNU General Public License and the GNU Lesser General Public License along with this program. If not, see . */ #ifndef TLD_H # define TLD_H # ifndef IDNAPI # if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY # define IDNAPI __attribute__((__visibility__("default"))) # elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC # define IDNAPI __declspec(dllexport) # elif defined _MSC_VER && ! defined LIBIDN_STATIC # define IDNAPI __declspec(dllimport) # else # define IDNAPI # endif # endif # ifdef __cplusplus extern "C" { # endif /* Get size_t. */ # include /* Get uint32_t. */ # include /* Interval of valid code points in the TLD. */ struct Tld_table_element { uint32_t start; /* Start of range. */ uint32_t end; /* End of range, end == start if single. */ }; typedef struct Tld_table_element Tld_table_element; /* List valid code points in a TLD. */ struct Tld_table { const char *name; /* TLD name, e.g., "no". */ const char *version; /* Version string from TLD file. */ size_t nvalid; /* Number of entries in data. */ const Tld_table_element *valid; /* Sorted array of valid code points. */ }; typedef struct Tld_table Tld_table; /* Error codes. */ typedef enum { TLD_SUCCESS = 0, TLD_INVALID = 1, /* Invalid character found. */ TLD_NODATA = 2, /* Char, domain or inlen = 0. */ TLD_MALLOC_ERROR = 3, TLD_ICONV_ERROR = 4, TLD_NO_TLD = 5, /* Workaround typo in earlier versions. */ TLD_NOTLD = TLD_NO_TLD } Tld_rc; extern IDNAPI const char *tld_strerror (Tld_rc rc); /* Extract TLD, as ASCII string, of UCS4 domain name into "out". */ extern IDNAPI int tld_get_4 (const uint32_t * in, size_t inlen, char **out); extern IDNAPI int tld_get_4z (const uint32_t * in, char **out); extern IDNAPI int tld_get_z (const char *in, char **out); /* Return structure corresponding to the named TLD from specified * list of TLD tables, or return NULL if no matching TLD can be * found. */ extern IDNAPI const Tld_table *tld_get_table (const char *tld, const Tld_table ** tables); /* Return structure corresponding to the named TLD, first looking * thru overrides then thru built-in list, or return NULL if no * matching TLD can be found. */ extern IDNAPI const Tld_table * tld_default_table (const char *tld, const Tld_table ** overrides); /* Check NAMEPREPPED domain name for valid characters as defined by * the relevant registering body (plus [a-z0-9.-]). If error is * TLD_INVALID, set errpos to position of offending character. */ extern IDNAPI int tld_check_4t (const uint32_t * in, size_t inlen, size_t * errpos, const Tld_table * tld); extern IDNAPI int tld_check_4tz (const uint32_t * in, size_t * errpos, const Tld_table * tld); /* Utility interfaces that uses tld_get_4* to find TLD of string, then tld_default_table (with overrides) to find proper TLD table for the string, and then hands over to tld_check_4t*. */ extern IDNAPI int tld_check_4 (const uint32_t * in, size_t inlen, size_t * errpos, const Tld_table ** overrides); extern IDNAPI int tld_check_4z (const uint32_t * in, size_t * errpos, const Tld_table ** overrides); extern IDNAPI int tld_check_8z (const char *in, size_t * errpos, const Tld_table ** overrides); extern IDNAPI int tld_check_lz (const char *in, size_t * errpos, const Tld_table ** overrides); # ifdef __cplusplus } # endif #endif /* TLD_H */ PKZo\e e tiffconf-64.hnu[/* libtiff/tiffconf.h. Generated from tiffconf.h.in by configure. */ /* Configuration defines for installed libtiff. This file maintained for backward compatibility. Do not use definitions from this file in your programs. */ #ifndef _TIFFCONF_ #define _TIFFCONF_ /* Signed 16-bit type */ #define TIFF_INT16_T signed short /* Signed 32-bit type */ #define TIFF_INT32_T signed int /* Signed 64-bit type */ #define TIFF_INT64_T signed long /* Signed 8-bit type */ #define TIFF_INT8_T signed char /* Unsigned 16-bit type */ #define TIFF_UINT16_T unsigned short /* Unsigned 32-bit type */ #define TIFF_UINT32_T unsigned int /* Unsigned 64-bit type */ #define TIFF_UINT64_T unsigned long /* Unsigned 8-bit type */ #define TIFF_UINT8_T unsigned char /* Signed size type */ #define TIFF_SSIZE_T signed long /* Pointer difference type */ #define TIFF_PTRDIFF_T ptrdiff_t /* Define to 1 if the system has the type `int16'. */ /* #undef HAVE_INT16 */ /* Define to 1 if the system has the type `int32'. */ /* #undef HAVE_INT32 */ /* Define to 1 if the system has the type `int8'. */ /* #undef HAVE_INT8 */ /* Compatibility stuff. */ /* Define as 0 or 1 according to the floating point format suported by the machine */ #define HAVE_IEEEFP 1 /* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ #define HOST_FILLORDER FILLORDER_LSB2MSB /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian (Intel) */ #define HOST_BIGENDIAN 0 /* Support CCITT Group 3 & 4 algorithms */ #define CCITT_SUPPORT 1 /* Support JPEG compression (requires IJG JPEG library) */ #define JPEG_SUPPORT 1 /* Support JBIG compression (requires JBIG-KIT library) */ #define JBIG_SUPPORT 1 /* Support LogLuv high dynamic range encoding */ #define LOGLUV_SUPPORT 1 /* Support LZW algorithm */ #define LZW_SUPPORT 1 /* Support NeXT 2-bit RLE algorithm */ #define NEXT_SUPPORT 1 /* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation fails with unpatched IJG JPEG library) */ #define OJPEG_SUPPORT 1 /* Support Macintosh PackBits algorithm */ #define PACKBITS_SUPPORT 1 /* Support Pixar log-format algorithm (requires Zlib) */ #define PIXARLOG_SUPPORT 1 /* Support ThunderScan 4-bit RLE algorithm */ #define THUNDER_SUPPORT 1 /* Support Deflate compression */ #define ZIP_SUPPORT 1 /* Support strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of ~8Kb to reduce memory usage) */ #define STRIPCHOP_DEFAULT TIFF_STRIPCHOP /* Enable SubIFD tag (330) support */ #define SUBIFD_SUPPORT 1 /* Treat extra sample as alpha (default enabled). The RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly. */ #define DEFAULT_EXTRASAMPLE_AS_ALPHA 1 /* Pick up YCbCr subsampling info from the JPEG data stream to support files lacking the tag (default enabled). */ #define CHECK_JPEG_YCBCR_SUBSAMPLING 1 /* Support MS MDI magic number files as TIFF */ #define MDI_SUPPORT 1 /* * Feature support definitions. * XXX: These macros are obsoleted. Don't use them in your apps! * Macros stays here for backward compatibility and should be always defined. */ #define COLORIMETRY_SUPPORT #define YCBCR_SUPPORT #define CMYK_SUPPORT #define ICC_SUPPORT #define PHOTOSHOP_SUPPORT #define IPTC_SUPPORT #endif /* _TIFFCONF_ */ PKZw4gdfx.hnu[#ifdef __cplusplus extern "C" { #endif #ifndef GDFX_H #define GDFX_H 1 BGD_DECLARE(gdImagePtr) gdImageSquareToCircle(gdImagePtr im, int radius); BGD_DECLARE(char *) gdImageStringFTCircle( gdImagePtr im, int cx, int cy, double radius, double textRadius, double fillPortion, char *font, double points, char *top, char *bottom, int fgcolor); BGD_DECLARE(void) gdImageSharpen (gdImagePtr im, int pct); #endif /* GDFX_H */ #ifdef __cplusplus } #endif PKZw BFF et/com_err.hnu[/* * Header file for common error description library. * * Copyright 1988, Student Information Processing Board of the * Massachusetts Institute of Technology. * * For copyright and distribution info, see the documentation supplied * with this package. */ #if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__) #ifdef __GNUC__ #define COM_ERR_ATTR(x) __attribute__(x) #else #define COM_ERR_ATTR(x) #endif #include #include typedef long errcode_t; struct error_table { char const * const * msgs; long base; int n_msgs; }; struct et_list; extern void com_err (const char *, long, const char *, ...) COM_ERR_ATTR((format(printf, 3, 4))); extern void com_err_va (const char *whoami, errcode_t code, const char *fmt, va_list args) COM_ERR_ATTR((format(printf, 3, 0))); extern char const *error_message (long); extern void (*com_err_hook) (const char *, long, const char *, va_list); extern void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list))) (const char *, long, const char *, va_list); extern void (*reset_com_err_hook (void)) (const char *, long, const char *, va_list); extern int init_error_table(const char * const *msgs, long base, int count); extern char *(*set_com_err_gettext (char *(*) (const char *))) (const char *); extern errcode_t add_error_table(const struct error_table * et); extern errcode_t remove_error_table(const struct error_table * et); extern void add_to_error_table(struct et_list *new_table); /* Provided for Heimdall compatibility */ extern const char *com_right(struct et_list *list, long code); extern const char *com_right_r(struct et_list *list, long code, char *str, size_t len); extern void initialize_error_table_r(struct et_list **list, const char **messages, int num_errors, long base); extern void free_error_table(struct et_list *et); /* Provided for compatibility with other com_err libraries */ extern int et_list_lock(void); extern int et_list_unlock(void); #define __COM_ERR_H #define __COM_ERR_H__ #endif /* !defined(__COM_ERR_H) && !defined(__COM_ERR_H__)*/ PKZ1grp.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 9.2.1 Group Database Access */ #ifndef _GRP_H #define _GRP_H 1 #include __BEGIN_DECLS #include #define __need_size_t #include /* For the Single Unix specification we must define this type here. */ #if (defined __USE_XOPEN || defined __USE_XOPEN2K) && !defined __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined #endif /* The group structure. */ struct group { char *gr_name; /* Group name. */ char *gr_passwd; /* Password. */ __gid_t gr_gid; /* Group ID. */ char **gr_mem; /* Member list. */ }; #ifdef __USE_MISC # include #endif #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED /* Rewind the group-file stream. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setgrent (void); /* Close the group-file stream. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endgrent (void); /* Read an entry from the group-file stream, opening it if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct group *getgrent (void); #endif #ifdef __USE_MISC /* Read a group entry from STREAM. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern struct group *fgetgrent (FILE *__stream); #endif #ifdef __USE_GNU /* Write the given entry onto the given stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int putgrent (const struct group *__restrict __p, FILE *__restrict __f); #endif /* Search for an entry with a matching group ID. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct group *getgrgid (__gid_t __gid); /* Search for an entry with a matching group name. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct group *getgrnam (const char *__name); #ifdef __USE_POSIX # ifdef __USE_MISC /* Reasonable value for the buffer sized used in the reentrant functions below. But better use `sysconf'. */ # define NSS_BUFLEN_GROUP 1024 # endif /* Reentrant versions of some of the functions above. PLEASE NOTE: the `getgrent_r' function is not (yet) standardized. The interface may change in later versions of this library. But the interface is designed following the principals used for the other reentrant functions so the chances are good this is what the POSIX people would choose. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ # ifdef __USE_GNU extern int getgrent_r (struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct group **__restrict __result); # endif /* Search for an entry with a matching group ID. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct group **__restrict __result); /* Search for an entry with a matching group name. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getgrnam_r (const char *__restrict __name, struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct group **__restrict __result); # ifdef __USE_MISC /* Read a group entry from STREAM. This function is not standardized an probably never will. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fgetgrent_r (FILE *__restrict __stream, struct group *__restrict __resultbuf, char *__restrict __buffer, size_t __buflen, struct group **__restrict __result); # endif #endif /* POSIX or reentrant */ #ifdef __USE_MISC # define __need_size_t # include /* Set the group set for the current user to GROUPS (N of them). */ extern int setgroups (size_t __n, const __gid_t *__groups) __THROW; /* Store at most *NGROUPS members of the group set for USER into *GROUPS. Also include GROUP. The actual number of groups found is returned in *NGROUPS. Return -1 if the if *NGROUPS is too small. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getgrouplist (const char *__user, __gid_t __group, __gid_t *__groups, int *__ngroups); /* Initialize the group set for the current user by reading the group database and using all groups of which USER is a member. Also include GROUP. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int initgroups (const char *__user, __gid_t __group); #endif /* Use misc. */ __END_DECLS #endif /* grp.h */ PKZO(assert.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.2 Diagnostics */ #ifdef _ASSERT_H # undef _ASSERT_H # undef assert # undef __ASSERT_VOID_CAST # ifdef __USE_GNU # undef assert_perror # endif #endif /* assert.h */ #define _ASSERT_H 1 #include #if defined __cplusplus && __GNUC_PREREQ (2,95) # define __ASSERT_VOID_CAST static_cast #else # define __ASSERT_VOID_CAST (void) #endif /* void assert (int expression); If NDEBUG is defined, do nothing. If not, and EXPRESSION is zero, print an error message and abort. */ #ifdef NDEBUG # define assert(expr) (__ASSERT_VOID_CAST (0)) /* void assert_perror (int errnum); If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an error message with the error text for ERRNUM and abort. (This is a GNU extension.) */ # ifdef __USE_GNU # define assert_perror(errnum) (__ASSERT_VOID_CAST (0)) # endif #else /* Not NDEBUG. */ __BEGIN_DECLS /* This prints an "Assertion failed" message and aborts. */ extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); /* Likewise, but prints the error text for ERRNUM. */ extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); /* The following is not at all used here but needed for standard compliance. */ extern void __assert (const char *__assertion, const char *__file, int __line) __THROW __attribute__ ((__noreturn__)); __END_DECLS /* When possible, define assert so that it does not add extra parentheses around EXPR. Otherwise, those added parentheses would suppress warnings we'd expect to be detected by gcc's -Wparentheses. */ # if defined __cplusplus # define assert(expr) \ (static_cast (expr) \ ? void (0) \ : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION)) # elif !defined __GNUC__ || defined __STRICT_ANSI__ # define assert(expr) \ ((expr) \ ? __ASSERT_VOID_CAST (0) \ : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION)) # else /* The first occurrence of EXPR is not evaluated due to the sizeof, but will trigger any pedantic warnings masked by the __extension__ for the second occurrence. The ternary operator is required to support function pointers and bit fields in this context, and to suppress the evaluation of variable length arrays. */ # define assert(expr) \ ((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \ if (expr) \ ; /* empty */ \ else \ __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \ })) # endif # ifdef __USE_GNU # define assert_perror(errnum) \ (!(errnum) \ ? __ASSERT_VOID_CAST (0) \ : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION)) # endif /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' which contains the name of the function currently being defined. This is broken in G++ before version 2.6. C9x has a similar variable called __func__, but prefer the GCC one since it demangles C++ function names. */ # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) # define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__ # else # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __ASSERT_FUNCTION __func__ # else # define __ASSERT_FUNCTION ((const char *) 0) # endif # endif #endif /* NDEBUG. */ #if defined __USE_ISOC11 && !defined __cplusplus # undef static_assert # define static_assert _Static_assert #endif PKZ1\ numacompat1.hnu[#define numa_set_interleave_mask(m) numa_set_interleave_mask_compat(m) #define numa_get_interleave_mask() numa_get_interleave_mask_compat() #define numa_bind(m) numa_bind_compat(m) #define numa_get_membind(m) numa_get_membind_compat(m) #define numa_set_membind(m) numa_set_membind_compat(m) #define numa_alloc_interleaved_subset(s,m) numa_alloc_interleaved_subset_compat(s,m) #define numa_run_on_node_mask(m) numa_run_on_node_mask_compat(m) #define numa_get_run_node_mask() numa_get_run_node_mask_compat() #define numa_interleave_memory(st,si,m) numa_interleave_memory_compat(st,si,m) #define numa_tonodemask_memory(st,si,m) numa_tonodemask_memory_compat(st,si,m) #define numa_sched_getaffinity(p,l,m) numa_sched_getaffinity_compat(p,l,m) #define numa_sched_setaffinity(p,l,m) numa_sched_setaffinity_compat(p,l,m) #define numa_node_to_cpus(n,b,bl) numa_node_to_cpus_compat(n,b,bl) #define nodemask_zero(m) nodemask_zero_compat(m) #define nodemask_set(m, n) nodemask_set_compat(m, n) #define nodemask_clr(m, n) nodemask_clr_compat(m, n) #define nodemask_isset(m, n) nodemask_isset_compat(m, n) #define nodemask_equal(a, b) nodemask_equal_compat(a, b) PKZw BFF com_err.hnu[/* * Header file for common error description library. * * Copyright 1988, Student Information Processing Board of the * Massachusetts Institute of Technology. * * For copyright and distribution info, see the documentation supplied * with this package. */ #if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__) #ifdef __GNUC__ #define COM_ERR_ATTR(x) __attribute__(x) #else #define COM_ERR_ATTR(x) #endif #include #include typedef long errcode_t; struct error_table { char const * const * msgs; long base; int n_msgs; }; struct et_list; extern void com_err (const char *, long, const char *, ...) COM_ERR_ATTR((format(printf, 3, 4))); extern void com_err_va (const char *whoami, errcode_t code, const char *fmt, va_list args) COM_ERR_ATTR((format(printf, 3, 0))); extern char const *error_message (long); extern void (*com_err_hook) (const char *, long, const char *, va_list); extern void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list))) (const char *, long, const char *, va_list); extern void (*reset_com_err_hook (void)) (const char *, long, const char *, va_list); extern int init_error_table(const char * const *msgs, long base, int count); extern char *(*set_com_err_gettext (char *(*) (const char *))) (const char *); extern errcode_t add_error_table(const struct error_table * et); extern errcode_t remove_error_table(const struct error_table * et); extern void add_to_error_table(struct et_list *new_table); /* Provided for Heimdall compatibility */ extern const char *com_right(struct et_list *list, long code); extern const char *com_right_r(struct et_list *list, long code, char *str, size_t len); extern void initialize_error_table_r(struct et_list **list, const char **messages, int num_errors, long base); extern void free_error_table(struct et_list *et); /* Provided for compatibility with other com_err libraries */ extern int et_list_lock(void); extern int et_list_unlock(void); #define __COM_ERR_H #define __COM_ERR_H__ #endif /* !defined(__COM_ERR_H) && !defined(__COM_ERR_H__)*/ PKZ}7B threads.hnu[/* ISO C11 Standard: 7.26 - Thread support library . Copyright (C) 2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _THREADS_H #define _THREADS_H 1 #include #include __BEGIN_DECLS #include #include #ifndef __cplusplus # define thread_local _Thread_local #endif #define TSS_DTOR_ITERATIONS 4 typedef unsigned int tss_t; typedef void (*tss_dtor_t) (void*); typedef unsigned long int thrd_t; typedef int (*thrd_start_t) (void*); /* Exit and error codes. */ enum { thrd_success = 0, thrd_busy = 1, thrd_error = 2, thrd_nomem = 3, thrd_timedout = 4 }; /* Mutex types. */ enum { mtx_plain = 0, mtx_recursive = 1, mtx_timed = 2 }; typedef struct { int __data __ONCE_ALIGNMENT; } once_flag; #define ONCE_FLAG_INIT { 0 } typedef union { char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align __LOCK_ALIGNMENT; } mtx_t; typedef union { char __size[__SIZEOF_PTHREAD_COND_T]; __extension__ long long int __align __LOCK_ALIGNMENT; } cnd_t; /* Threads functions. */ /* Create a new thread executing the function __FUNC. Arguments for __FUNC are passed through __ARG. If succesful, __THR is set to new thread identifier. */ extern int thrd_create (thrd_t *__thr, thrd_start_t __func, void *__arg); /* Check if __LHS and __RHS point to the same thread. */ extern int thrd_equal (thrd_t __lhs, thrd_t __rhs); /* Return current thread identifier. */ extern thrd_t thrd_current (void); /* Block current thread execution for at least the time pointed by __TIME_POINT. The current thread may resume if receives a signal. In that case, if __REMAINING is not NULL, the remaining time is stored in the object pointed by it. */ extern int thrd_sleep (const struct timespec *__time_point, struct timespec *__remaining); /* Terminate current thread execution, cleaning up any thread local storage and freeing resources. Returns the value specified in __RES. */ extern void thrd_exit (int __res) __attribute__ ((__noreturn__)); /* Detach the thread identified by __THR from the current environment (it does not allow join or wait for it). */ extern int thrd_detach (thrd_t __thr); /* Block current thread until execution of __THR is complete. In case that __RES is not NULL, will store the return value of __THR when exiting. */ extern int thrd_join (thrd_t __thr, int *__res); /* Stop current thread execution and call the scheduler to decide which thread should execute next. The current thread may be selected by the scheduler to keep running. */ extern void thrd_yield (void); #ifdef __USE_EXTERN_INLINES /* Optimizations. */ __extern_inline int thrd_equal (thrd_t __thread1, thrd_t __thread2) { return __thread1 == __thread2; } #endif /* Mutex functions. */ /* Creates a new mutex object with type __TYPE. If successful the new object is pointed by __MUTEX. */ extern int mtx_init (mtx_t *__mutex, int __type); /* Block the current thread until the mutex pointed to by __MUTEX is unlocked. In that case current thread will not be blocked. */ extern int mtx_lock (mtx_t *__mutex); /* Block the current thread until the mutex pointed by __MUTEX is unlocked or time pointed by __TIME_POINT is reached. In case the mutex is unlock, the current thread will not be blocked. */ extern int mtx_timedlock (mtx_t *__restrict __mutex, const struct timespec *__restrict __time_point); /* Try to lock the mutex pointed by __MUTEX without blocking. If the mutex is free the current threads takes control of it, otherwise it returns immediately. */ extern int mtx_trylock (mtx_t *__mutex); /* Unlock the mutex pointed by __MUTEX. It may potentially awake other threads waiting on this mutex. */ extern int mtx_unlock (mtx_t *__mutex); /* Destroy the mutex object pointed by __MUTEX. */ extern void mtx_destroy (mtx_t *__mutex); /* Call function __FUNC exactly once, even if invoked from several threads. All calls must be made with the same __FLAGS object. */ extern void call_once (once_flag *__flag, void (*__func)(void)); /* Condition variable functions. */ /* Initialize new condition variable pointed by __COND. */ extern int cnd_init (cnd_t *__cond); /* Unblock one thread that currently waits on condition variable pointed by __COND. */ extern int cnd_signal (cnd_t *__cond); /* Unblock all threads currently waiting on condition variable pointed by __COND. */ extern int cnd_broadcast (cnd_t *__cond); /* Block current thread on the condition variable pointed by __COND. */ extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex); /* Block current thread on the condition variable until condition variable pointed by __COND is signaled or time pointed by __TIME_POINT is reached. */ extern int cnd_timedwait (cnd_t *__restrict __cond, mtx_t *__restrict __mutex, const struct timespec *__restrict __time_point); /* Destroy condition variable pointed by __cond and free all of its resources. */ extern void cnd_destroy (cnd_t *__COND); /* Thread specific storage functions. */ /* Create new thread-specific storage key and stores it in the object pointed by __TSS_ID. If __DESTRUCTOR is not NULL, the function will be called when the thread terminates. */ extern int tss_create (tss_t *__tss_id, tss_dtor_t __destructor); /* Return the value held in thread-specific storage for the current thread identified by __TSS_ID. */ extern void *tss_get (tss_t __tss_id); /* Sets the value of the thread-specific storage identified by __TSS_ID for the current thread to __VAL. */ extern int tss_set (tss_t __tss_id, void *__val); /* Destroys the thread-specific storage identified by __TSS_ID. The destructor is not called until thrd_exit is called. */ extern void tss_delete (tss_t __tss_id); __END_DECLS #endif /* _THREADS_H */ PKZrռ|| byteswap.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BYTESWAP_H #define _BYTESWAP_H 1 #include /* Get the machine specific, optimized definitions. */ #include /* The following definitions must all be macros since otherwise some of the possible optimizations are not possible. */ /* Return a value with all bytes in the 16 bit argument swapped. */ #define bswap_16(x) __bswap_16 (x) /* Return a value with all bytes in the 32 bit argument swapped. */ #define bswap_32(x) __bswap_32 (x) /* Return a value with all bytes in the 64 bit argument swapped. */ #define bswap_64(x) __bswap_64 (x) #endif /* byteswap.h */ PKZ.elf.hnu[/* This file defines standard ELF types, structures, and macros. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ELF_H #define _ELF_H 1 #include __BEGIN_DECLS /* Standard ELF types. */ #include /* Type for a 16-bit quantity. */ typedef uint16_t Elf32_Half; typedef uint16_t Elf64_Half; /* Types for signed and unsigned 32-bit quantities. */ typedef uint32_t Elf32_Word; typedef int32_t Elf32_Sword; typedef uint32_t Elf64_Word; typedef int32_t Elf64_Sword; /* Types for signed and unsigned 64-bit quantities. */ typedef uint64_t Elf32_Xword; typedef int64_t Elf32_Sxword; typedef uint64_t Elf64_Xword; typedef int64_t Elf64_Sxword; /* Type of addresses. */ typedef uint32_t Elf32_Addr; typedef uint64_t Elf64_Addr; /* Type of file offsets. */ typedef uint32_t Elf32_Off; typedef uint64_t Elf64_Off; /* Type for section indices, which are 16-bit quantities. */ typedef uint16_t Elf32_Section; typedef uint16_t Elf64_Section; /* Type for version symbol information. */ typedef Elf32_Half Elf32_Versym; typedef Elf64_Half Elf64_Versym; /* The ELF file header. This appears at the start of every ELF file. */ #define EI_NIDENT (16) typedef struct { unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ Elf32_Half e_type; /* Object file type */ Elf32_Half e_machine; /* Architecture */ Elf32_Word e_version; /* Object file version */ Elf32_Addr e_entry; /* Entry point virtual address */ Elf32_Off e_phoff; /* Program header table file offset */ Elf32_Off e_shoff; /* Section header table file offset */ Elf32_Word e_flags; /* Processor-specific flags */ Elf32_Half e_ehsize; /* ELF header size in bytes */ Elf32_Half e_phentsize; /* Program header table entry size */ Elf32_Half e_phnum; /* Program header table entry count */ Elf32_Half e_shentsize; /* Section header table entry size */ Elf32_Half e_shnum; /* Section header table entry count */ Elf32_Half e_shstrndx; /* Section header string table index */ } Elf32_Ehdr; typedef struct { unsigned char e_ident[EI_NIDENT]; /* Magic number and other info */ Elf64_Half e_type; /* Object file type */ Elf64_Half e_machine; /* Architecture */ Elf64_Word e_version; /* Object file version */ Elf64_Addr e_entry; /* Entry point virtual address */ Elf64_Off e_phoff; /* Program header table file offset */ Elf64_Off e_shoff; /* Section header table file offset */ Elf64_Word e_flags; /* Processor-specific flags */ Elf64_Half e_ehsize; /* ELF header size in bytes */ Elf64_Half e_phentsize; /* Program header table entry size */ Elf64_Half e_phnum; /* Program header table entry count */ Elf64_Half e_shentsize; /* Section header table entry size */ Elf64_Half e_shnum; /* Section header table entry count */ Elf64_Half e_shstrndx; /* Section header string table index */ } Elf64_Ehdr; /* Fields in the e_ident array. The EI_* macros are indices into the array. The macros under each EI_* macro are the values the byte may have. */ #define EI_MAG0 0 /* File identification byte 0 index */ #define ELFMAG0 0x7f /* Magic number byte 0 */ #define EI_MAG1 1 /* File identification byte 1 index */ #define ELFMAG1 'E' /* Magic number byte 1 */ #define EI_MAG2 2 /* File identification byte 2 index */ #define ELFMAG2 'L' /* Magic number byte 2 */ #define EI_MAG3 3 /* File identification byte 3 index */ #define ELFMAG3 'F' /* Magic number byte 3 */ /* Conglomeration of the identification bytes, for easy testing as a word. */ #define ELFMAG "\177ELF" #define SELFMAG 4 #define EI_CLASS 4 /* File class byte index */ #define ELFCLASSNONE 0 /* Invalid class */ #define ELFCLASS32 1 /* 32-bit objects */ #define ELFCLASS64 2 /* 64-bit objects */ #define ELFCLASSNUM 3 #define EI_DATA 5 /* Data encoding byte index */ #define ELFDATANONE 0 /* Invalid data encoding */ #define ELFDATA2LSB 1 /* 2's complement, little endian */ #define ELFDATA2MSB 2 /* 2's complement, big endian */ #define ELFDATANUM 3 #define EI_VERSION 6 /* File version byte index */ /* Value must be EV_CURRENT */ #define EI_OSABI 7 /* OS ABI identification */ #define ELFOSABI_NONE 0 /* UNIX System V ABI */ #define ELFOSABI_SYSV 0 /* Alias. */ #define ELFOSABI_HPUX 1 /* HP-UX */ #define ELFOSABI_NETBSD 2 /* NetBSD. */ #define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */ #define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */ #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */ #define ELFOSABI_AIX 7 /* IBM AIX. */ #define ELFOSABI_IRIX 8 /* SGI Irix. */ #define ELFOSABI_FREEBSD 9 /* FreeBSD. */ #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */ #define ELFOSABI_MODESTO 11 /* Novell Modesto. */ #define ELFOSABI_OPENBSD 12 /* OpenBSD. */ #define ELFOSABI_ARM_AEABI 64 /* ARM EABI */ #define ELFOSABI_ARM 97 /* ARM */ #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ #define EI_ABIVERSION 8 /* ABI version */ #define EI_PAD 9 /* Byte index of padding bytes */ /* Legal values for e_type (object file type). */ #define ET_NONE 0 /* No file type */ #define ET_REL 1 /* Relocatable file */ #define ET_EXEC 2 /* Executable file */ #define ET_DYN 3 /* Shared object file */ #define ET_CORE 4 /* Core file */ #define ET_NUM 5 /* Number of defined types */ #define ET_LOOS 0xfe00 /* OS-specific range start */ #define ET_HIOS 0xfeff /* OS-specific range end */ #define ET_LOPROC 0xff00 /* Processor-specific range start */ #define ET_HIPROC 0xffff /* Processor-specific range end */ /* Legal values for e_machine (architecture). */ #define EM_NONE 0 /* No machine */ #define EM_M32 1 /* AT&T WE 32100 */ #define EM_SPARC 2 /* SUN SPARC */ #define EM_386 3 /* Intel 80386 */ #define EM_68K 4 /* Motorola m68k family */ #define EM_88K 5 /* Motorola m88k family */ #define EM_IAMCU 6 /* Intel MCU */ #define EM_860 7 /* Intel 80860 */ #define EM_MIPS 8 /* MIPS R3000 big-endian */ #define EM_S370 9 /* IBM System/370 */ #define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */ /* reserved 11-14 */ #define EM_PARISC 15 /* HPPA */ /* reserved 16 */ #define EM_VPP500 17 /* Fujitsu VPP500 */ #define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ #define EM_960 19 /* Intel 80960 */ #define EM_PPC 20 /* PowerPC */ #define EM_PPC64 21 /* PowerPC 64-bit */ #define EM_S390 22 /* IBM S390 */ #define EM_SPU 23 /* IBM SPU/SPC */ /* reserved 24-35 */ #define EM_V800 36 /* NEC V800 series */ #define EM_FR20 37 /* Fujitsu FR20 */ #define EM_RH32 38 /* TRW RH-32 */ #define EM_RCE 39 /* Motorola RCE */ #define EM_ARM 40 /* ARM */ #define EM_FAKE_ALPHA 41 /* Digital Alpha */ #define EM_SH 42 /* Hitachi SH */ #define EM_SPARCV9 43 /* SPARC v9 64-bit */ #define EM_TRICORE 44 /* Siemens Tricore */ #define EM_ARC 45 /* Argonaut RISC Core */ #define EM_H8_300 46 /* Hitachi H8/300 */ #define EM_H8_300H 47 /* Hitachi H8/300H */ #define EM_H8S 48 /* Hitachi H8S */ #define EM_H8_500 49 /* Hitachi H8/500 */ #define EM_IA_64 50 /* Intel Merced */ #define EM_MIPS_X 51 /* Stanford MIPS-X */ #define EM_COLDFIRE 52 /* Motorola Coldfire */ #define EM_68HC12 53 /* Motorola M68HC12 */ #define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator */ #define EM_PCP 55 /* Siemens PCP */ #define EM_NCPU 56 /* Sony nCPU embeeded RISC */ #define EM_NDR1 57 /* Denso NDR1 microprocessor */ #define EM_STARCORE 58 /* Motorola Start*Core processor */ #define EM_ME16 59 /* Toyota ME16 processor */ #define EM_ST100 60 /* STMicroelectronic ST100 processor */ #define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam */ #define EM_X86_64 62 /* AMD x86-64 architecture */ #define EM_PDSP 63 /* Sony DSP Processor */ #define EM_PDP10 64 /* Digital PDP-10 */ #define EM_PDP11 65 /* Digital PDP-11 */ #define EM_FX66 66 /* Siemens FX66 microcontroller */ #define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ #define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ #define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */ #define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */ #define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */ #define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */ #define EM_SVX 73 /* Silicon Graphics SVx */ #define EM_ST19 74 /* STMicroelectronics ST19 8 bit mc */ #define EM_VAX 75 /* Digital VAX */ #define EM_CRIS 76 /* Axis Communications 32-bit emb.proc */ #define EM_JAVELIN 77 /* Infineon Technologies 32-bit emb.proc */ #define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */ #define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */ #define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc */ #define EM_HUANY 81 /* Harvard University machine-independent object files */ #define EM_PRISM 82 /* SiTera Prism */ #define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ #define EM_FR30 84 /* Fujitsu FR30 */ #define EM_D10V 85 /* Mitsubishi D10V */ #define EM_D30V 86 /* Mitsubishi D30V */ #define EM_V850 87 /* NEC v850 */ #define EM_M32R 88 /* Mitsubishi M32R */ #define EM_MN10300 89 /* Matsushita MN10300 */ #define EM_MN10200 90 /* Matsushita MN10200 */ #define EM_PJ 91 /* picoJava */ #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ #define EM_ARC_COMPACT 93 /* ARC International ARCompact */ #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ #define EM_VIDEOCORE 95 /* Alphamosaic VideoCore */ #define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Proc */ #define EM_NS32K 97 /* National Semi. 32000 */ #define EM_TPC 98 /* Tenor Network TPC */ #define EM_SNP1K 99 /* Trebia SNP 1000 */ #define EM_ST200 100 /* STMicroelectronics ST200 */ #define EM_IP2K 101 /* Ubicom IP2xxx */ #define EM_MAX 102 /* MAX processor */ #define EM_CR 103 /* National Semi. CompactRISC */ #define EM_F2MC16 104 /* Fujitsu F2MC16 */ #define EM_MSP430 105 /* Texas Instruments msp430 */ #define EM_BLACKFIN 106 /* Analog Devices Blackfin DSP */ #define EM_SE_C33 107 /* Seiko Epson S1C33 family */ #define EM_SEP 108 /* Sharp embedded microprocessor */ #define EM_ARCA 109 /* Arca RISC */ #define EM_UNICORE 110 /* PKU-Unity & MPRC Peking Uni. mc series */ #define EM_EXCESS 111 /* eXcess configurable cpu */ #define EM_DXP 112 /* Icera Semi. Deep Execution Processor */ #define EM_ALTERA_NIOS2 113 /* Altera Nios II */ #define EM_CRX 114 /* National Semi. CompactRISC CRX */ #define EM_XGATE 115 /* Motorola XGATE */ #define EM_C166 116 /* Infineon C16x/XC16x */ #define EM_M16C 117 /* Renesas M16C */ #define EM_DSPIC30F 118 /* Microchip Technology dsPIC30F */ #define EM_CE 119 /* Freescale Communication Engine RISC */ #define EM_M32C 120 /* Renesas M32C */ /* reserved 121-130 */ #define EM_TSK3000 131 /* Altium TSK3000 */ #define EM_RS08 132 /* Freescale RS08 */ #define EM_SHARC 133 /* Analog Devices SHARC family */ #define EM_ECOG2 134 /* Cyan Technology eCOG2 */ #define EM_SCORE7 135 /* Sunplus S+core7 RISC */ #define EM_DSP24 136 /* New Japan Radio (NJR) 24-bit DSP */ #define EM_VIDEOCORE3 137 /* Broadcom VideoCore III */ #define EM_LATTICEMICO32 138 /* RISC for Lattice FPGA */ #define EM_SE_C17 139 /* Seiko Epson C17 */ #define EM_TI_C6000 140 /* Texas Instruments TMS320C6000 DSP */ #define EM_TI_C2000 141 /* Texas Instruments TMS320C2000 DSP */ #define EM_TI_C5500 142 /* Texas Instruments TMS320C55x DSP */ #define EM_TI_ARP32 143 /* Texas Instruments App. Specific RISC */ #define EM_TI_PRU 144 /* Texas Instruments Prog. Realtime Unit */ /* reserved 145-159 */ #define EM_MMDSP_PLUS 160 /* STMicroelectronics 64bit VLIW DSP */ #define EM_CYPRESS_M8C 161 /* Cypress M8C */ #define EM_R32C 162 /* Renesas R32C */ #define EM_TRIMEDIA 163 /* NXP Semi. TriMedia */ #define EM_QDSP6 164 /* QUALCOMM DSP6 */ #define EM_8051 165 /* Intel 8051 and variants */ #define EM_STXP7X 166 /* STMicroelectronics STxP7x */ #define EM_NDS32 167 /* Andes Tech. compact code emb. RISC */ #define EM_ECOG1X 168 /* Cyan Technology eCOG1X */ #define EM_MAXQ30 169 /* Dallas Semi. MAXQ30 mc */ #define EM_XIMO16 170 /* New Japan Radio (NJR) 16-bit DSP */ #define EM_MANIK 171 /* M2000 Reconfigurable RISC */ #define EM_CRAYNV2 172 /* Cray NV2 vector architecture */ #define EM_RX 173 /* Renesas RX */ #define EM_METAG 174 /* Imagination Tech. META */ #define EM_MCST_ELBRUS 175 /* MCST Elbrus */ #define EM_ECOG16 176 /* Cyan Technology eCOG16 */ #define EM_CR16 177 /* National Semi. CompactRISC CR16 */ #define EM_ETPU 178 /* Freescale Extended Time Processing Unit */ #define EM_SLE9X 179 /* Infineon Tech. SLE9X */ #define EM_L10M 180 /* Intel L10M */ #define EM_K10M 181 /* Intel K10M */ /* reserved 182 */ #define EM_AARCH64 183 /* ARM AARCH64 */ /* reserved 184 */ #define EM_AVR32 185 /* Amtel 32-bit microprocessor */ #define EM_STM8 186 /* STMicroelectronics STM8 */ #define EM_TILE64 187 /* Tileta TILE64 */ #define EM_TILEPRO 188 /* Tilera TILEPro */ #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */ #define EM_CUDA 190 /* NVIDIA CUDA */ #define EM_TILEGX 191 /* Tilera TILE-Gx */ #define EM_CLOUDSHIELD 192 /* CloudShield */ #define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */ #define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */ #define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */ #define EM_OPEN8 196 /* Open8 RISC */ #define EM_RL78 197 /* Renesas RL78 */ #define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */ #define EM_78KOR 199 /* Renesas 78KOR */ #define EM_56800EX 200 /* Freescale 56800EX DSC */ #define EM_BA1 201 /* Beyond BA1 */ #define EM_BA2 202 /* Beyond BA2 */ #define EM_XCORE 203 /* XMOS xCORE */ #define EM_MCHP_PIC 204 /* Microchip 8-bit PIC(r) */ /* reserved 205-209 */ #define EM_KM32 210 /* KM211 KM32 */ #define EM_KMX32 211 /* KM211 KMX32 */ #define EM_EMX16 212 /* KM211 KMX16 */ #define EM_EMX8 213 /* KM211 KMX8 */ #define EM_KVARC 214 /* KM211 KVARC */ #define EM_CDP 215 /* Paneve CDP */ #define EM_COGE 216 /* Cognitive Smart Memory Processor */ #define EM_COOL 217 /* Bluechip CoolEngine */ #define EM_NORC 218 /* Nanoradio Optimized RISC */ #define EM_CSR_KALIMBA 219 /* CSR Kalimba */ #define EM_Z80 220 /* Zilog Z80 */ #define EM_VISIUM 221 /* Controls and Data Services VISIUMcore */ #define EM_FT32 222 /* FTDI Chip FT32 */ #define EM_MOXIE 223 /* Moxie processor */ #define EM_AMDGPU 224 /* AMD GPU */ /* reserved 225-242 */ #define EM_RISCV 243 /* RISC-V */ #define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */ #define EM_NUM 248 /* Old spellings/synonyms. */ #define EM_ARC_A5 EM_ARC_COMPACT /* If it is necessary to assign new unofficial EM_* values, please pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision with official or non-GNU unofficial values. */ #define EM_ALPHA 0x9026 /* Legal values for e_version (version). */ #define EV_NONE 0 /* Invalid ELF version */ #define EV_CURRENT 1 /* Current version */ #define EV_NUM 2 /* Section header. */ typedef struct { Elf32_Word sh_name; /* Section name (string tbl index) */ Elf32_Word sh_type; /* Section type */ Elf32_Word sh_flags; /* Section flags */ Elf32_Addr sh_addr; /* Section virtual addr at execution */ Elf32_Off sh_offset; /* Section file offset */ Elf32_Word sh_size; /* Section size in bytes */ Elf32_Word sh_link; /* Link to another section */ Elf32_Word sh_info; /* Additional section information */ Elf32_Word sh_addralign; /* Section alignment */ Elf32_Word sh_entsize; /* Entry size if section holds table */ } Elf32_Shdr; typedef struct { Elf64_Word sh_name; /* Section name (string tbl index) */ Elf64_Word sh_type; /* Section type */ Elf64_Xword sh_flags; /* Section flags */ Elf64_Addr sh_addr; /* Section virtual addr at execution */ Elf64_Off sh_offset; /* Section file offset */ Elf64_Xword sh_size; /* Section size in bytes */ Elf64_Word sh_link; /* Link to another section */ Elf64_Word sh_info; /* Additional section information */ Elf64_Xword sh_addralign; /* Section alignment */ Elf64_Xword sh_entsize; /* Entry size if section holds table */ } Elf64_Shdr; /* Special section indices. */ #define SHN_UNDEF 0 /* Undefined section */ #define SHN_LORESERVE 0xff00 /* Start of reserved indices */ #define SHN_LOPROC 0xff00 /* Start of processor-specific */ #define SHN_BEFORE 0xff00 /* Order section before all others (Solaris). */ #define SHN_AFTER 0xff01 /* Order section after all others (Solaris). */ #define SHN_HIPROC 0xff1f /* End of processor-specific */ #define SHN_LOOS 0xff20 /* Start of OS-specific */ #define SHN_HIOS 0xff3f /* End of OS-specific */ #define SHN_ABS 0xfff1 /* Associated symbol is absolute */ #define SHN_COMMON 0xfff2 /* Associated symbol is common */ #define SHN_XINDEX 0xffff /* Index is in extra table. */ #define SHN_HIRESERVE 0xffff /* End of reserved indices */ /* Legal values for sh_type (section type). */ #define SHT_NULL 0 /* Section header table entry unused */ #define SHT_PROGBITS 1 /* Program data */ #define SHT_SYMTAB 2 /* Symbol table */ #define SHT_STRTAB 3 /* String table */ #define SHT_RELA 4 /* Relocation entries with addends */ #define SHT_HASH 5 /* Symbol hash table */ #define SHT_DYNAMIC 6 /* Dynamic linking information */ #define SHT_NOTE 7 /* Notes */ #define SHT_NOBITS 8 /* Program space with no data (bss) */ #define SHT_REL 9 /* Relocation entries, no addends */ #define SHT_SHLIB 10 /* Reserved */ #define SHT_DYNSYM 11 /* Dynamic linker symbol table */ #define SHT_INIT_ARRAY 14 /* Array of constructors */ #define SHT_FINI_ARRAY 15 /* Array of destructors */ #define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */ #define SHT_GROUP 17 /* Section group */ #define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ #define SHT_NUM 19 /* Number of defined types. */ #define SHT_LOOS 0x60000000 /* Start OS-specific. */ #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */ #define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */ #define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */ #define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */ #define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */ #define SHT_SUNW_move 0x6ffffffa #define SHT_SUNW_COMDAT 0x6ffffffb #define SHT_SUNW_syminfo 0x6ffffffc #define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */ #define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */ #define SHT_GNU_versym 0x6fffffff /* Version symbol table. */ #define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */ #define SHT_HIOS 0x6fffffff /* End OS-specific type */ #define SHT_LOPROC 0x70000000 /* Start of processor-specific */ #define SHT_HIPROC 0x7fffffff /* End of processor-specific */ #define SHT_LOUSER 0x80000000 /* Start of application-specific */ #define SHT_HIUSER 0x8fffffff /* End of application-specific */ /* Legal values for sh_flags (section flags). */ #define SHF_WRITE (1 << 0) /* Writable */ #define SHF_ALLOC (1 << 1) /* Occupies memory during execution */ #define SHF_EXECINSTR (1 << 2) /* Executable */ #define SHF_MERGE (1 << 4) /* Might be merged */ #define SHF_STRINGS (1 << 5) /* Contains nul-terminated strings */ #define SHF_INFO_LINK (1 << 6) /* `sh_info' contains SHT index */ #define SHF_LINK_ORDER (1 << 7) /* Preserve order after combining */ #define SHF_OS_NONCONFORMING (1 << 8) /* Non-standard OS specific handling required */ #define SHF_GROUP (1 << 9) /* Section is member of a group. */ #define SHF_TLS (1 << 10) /* Section hold thread-local data. */ #define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ #define SHF_MASKOS 0x0ff00000 /* OS-specific. */ #define SHF_MASKPROC 0xf0000000 /* Processor-specific */ #define SHF_ORDERED (1 << 30) /* Special ordering requirement (Solaris). */ #define SHF_EXCLUDE (1U << 31) /* Section is excluded unless referenced or allocated (Solaris).*/ /* Section compression header. Used when SHF_COMPRESSED is set. */ typedef struct { Elf32_Word ch_type; /* Compression format. */ Elf32_Word ch_size; /* Uncompressed data size. */ Elf32_Word ch_addralign; /* Uncompressed data alignment. */ } Elf32_Chdr; typedef struct { Elf64_Word ch_type; /* Compression format. */ Elf64_Word ch_reserved; Elf64_Xword ch_size; /* Uncompressed data size. */ Elf64_Xword ch_addralign; /* Uncompressed data alignment. */ } Elf64_Chdr; /* Legal values for ch_type (compression algorithm). */ #define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */ #define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */ #define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */ #define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */ #define ELFCOMPRESS_HIPROC 0x7fffffff /* End of processor-specific. */ /* Section group handling. */ #define GRP_COMDAT 0x1 /* Mark group as COMDAT. */ /* Symbol table entry. */ typedef struct { Elf32_Word st_name; /* Symbol name (string tbl index) */ Elf32_Addr st_value; /* Symbol value */ Elf32_Word st_size; /* Symbol size */ unsigned char st_info; /* Symbol type and binding */ unsigned char st_other; /* Symbol visibility */ Elf32_Section st_shndx; /* Section index */ } Elf32_Sym; typedef struct { Elf64_Word st_name; /* Symbol name (string tbl index) */ unsigned char st_info; /* Symbol type and binding */ unsigned char st_other; /* Symbol visibility */ Elf64_Section st_shndx; /* Section index */ Elf64_Addr st_value; /* Symbol value */ Elf64_Xword st_size; /* Symbol size */ } Elf64_Sym; /* The syminfo section if available contains additional information about every dynamic symbol. */ typedef struct { Elf32_Half si_boundto; /* Direct bindings, symbol bound to */ Elf32_Half si_flags; /* Per symbol flags */ } Elf32_Syminfo; typedef struct { Elf64_Half si_boundto; /* Direct bindings, symbol bound to */ Elf64_Half si_flags; /* Per symbol flags */ } Elf64_Syminfo; /* Possible values for si_boundto. */ #define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */ #define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */ #define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */ /* Possible bitmasks for si_flags. */ #define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ #define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ #define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ #define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */ /* Syminfo version values. */ #define SYMINFO_NONE 0 #define SYMINFO_CURRENT 1 #define SYMINFO_NUM 2 /* How to extract and insert information held in the st_info field. */ #define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) #define ELF32_ST_TYPE(val) ((val) & 0xf) #define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) /* Both Elf32_Sym and Elf64_Sym use the same one-byte st_info field. */ #define ELF64_ST_BIND(val) ELF32_ST_BIND (val) #define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) #define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) /* Legal values for ST_BIND subfield of st_info (symbol binding). */ #define STB_LOCAL 0 /* Local symbol */ #define STB_GLOBAL 1 /* Global symbol */ #define STB_WEAK 2 /* Weak symbol */ #define STB_NUM 3 /* Number of defined types. */ #define STB_LOOS 10 /* Start of OS-specific */ #define STB_GNU_UNIQUE 10 /* Unique symbol. */ #define STB_HIOS 12 /* End of OS-specific */ #define STB_LOPROC 13 /* Start of processor-specific */ #define STB_HIPROC 15 /* End of processor-specific */ /* Legal values for ST_TYPE subfield of st_info (symbol type). */ #define STT_NOTYPE 0 /* Symbol type is unspecified */ #define STT_OBJECT 1 /* Symbol is a data object */ #define STT_FUNC 2 /* Symbol is a code object */ #define STT_SECTION 3 /* Symbol associated with a section */ #define STT_FILE 4 /* Symbol's name is file name */ #define STT_COMMON 5 /* Symbol is a common data object */ #define STT_TLS 6 /* Symbol is thread-local data object*/ #define STT_NUM 7 /* Number of defined types. */ #define STT_LOOS 10 /* Start of OS-specific */ #define STT_GNU_IFUNC 10 /* Symbol is indirect code object */ #define STT_HIOS 12 /* End of OS-specific */ #define STT_LOPROC 13 /* Start of processor-specific */ #define STT_HIPROC 15 /* End of processor-specific */ /* Symbol table indices are found in the hash buckets and chain table of a symbol hash table section. This special index value indicates the end of a chain, meaning no further symbols are found in that bucket. */ #define STN_UNDEF 0 /* End of a chain. */ /* How to extract and insert information held in the st_other field. */ #define ELF32_ST_VISIBILITY(o) ((o) & 0x03) /* For ELF64 the definitions are the same. */ #define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) /* Symbol visibility specification encoded in the st_other field. */ #define STV_DEFAULT 0 /* Default symbol visibility rules */ #define STV_INTERNAL 1 /* Processor specific hidden class */ #define STV_HIDDEN 2 /* Sym unavailable in other modules */ #define STV_PROTECTED 3 /* Not preemptible, not exported */ /* Relocation table entry without addend (in section of type SHT_REL). */ typedef struct { Elf32_Addr r_offset; /* Address */ Elf32_Word r_info; /* Relocation type and symbol index */ } Elf32_Rel; /* I have seen two different definitions of the Elf64_Rel and Elf64_Rela structures, so we'll leave them out until Novell (or whoever) gets their act together. */ /* The following, at least, is used on Sparc v9, MIPS, and Alpha. */ typedef struct { Elf64_Addr r_offset; /* Address */ Elf64_Xword r_info; /* Relocation type and symbol index */ } Elf64_Rel; /* Relocation table entry with addend (in section of type SHT_RELA). */ typedef struct { Elf32_Addr r_offset; /* Address */ Elf32_Word r_info; /* Relocation type and symbol index */ Elf32_Sword r_addend; /* Addend */ } Elf32_Rela; typedef struct { Elf64_Addr r_offset; /* Address */ Elf64_Xword r_info; /* Relocation type and symbol index */ Elf64_Sxword r_addend; /* Addend */ } Elf64_Rela; /* How to extract and insert information held in the r_info field. */ #define ELF32_R_SYM(val) ((val) >> 8) #define ELF32_R_TYPE(val) ((val) & 0xff) #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) #define ELF64_R_SYM(i) ((i) >> 32) #define ELF64_R_TYPE(i) ((i) & 0xffffffff) #define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) /* Program segment header. */ typedef struct { Elf32_Word p_type; /* Segment type */ Elf32_Off p_offset; /* Segment file offset */ Elf32_Addr p_vaddr; /* Segment virtual address */ Elf32_Addr p_paddr; /* Segment physical address */ Elf32_Word p_filesz; /* Segment size in file */ Elf32_Word p_memsz; /* Segment size in memory */ Elf32_Word p_flags; /* Segment flags */ Elf32_Word p_align; /* Segment alignment */ } Elf32_Phdr; typedef struct { Elf64_Word p_type; /* Segment type */ Elf64_Word p_flags; /* Segment flags */ Elf64_Off p_offset; /* Segment file offset */ Elf64_Addr p_vaddr; /* Segment virtual address */ Elf64_Addr p_paddr; /* Segment physical address */ Elf64_Xword p_filesz; /* Segment size in file */ Elf64_Xword p_memsz; /* Segment size in memory */ Elf64_Xword p_align; /* Segment alignment */ } Elf64_Phdr; /* Special value for e_phnum. This indicates that the real number of program headers is too large to fit into e_phnum. Instead the real value is in the field sh_info of section 0. */ #define PN_XNUM 0xffff /* Legal values for p_type (segment type). */ #define PT_NULL 0 /* Program header table entry unused */ #define PT_LOAD 1 /* Loadable program segment */ #define PT_DYNAMIC 2 /* Dynamic linking information */ #define PT_INTERP 3 /* Program interpreter */ #define PT_NOTE 4 /* Auxiliary information */ #define PT_SHLIB 5 /* Reserved */ #define PT_PHDR 6 /* Entry for header table itself */ #define PT_TLS 7 /* Thread-local storage segment */ #define PT_NUM 8 /* Number of defined types */ #define PT_LOOS 0x60000000 /* Start of OS-specific */ #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ #define PT_LOSUNW 0x6ffffffa #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ #define PT_HISUNW 0x6fffffff #define PT_HIOS 0x6fffffff /* End of OS-specific */ #define PT_LOPROC 0x70000000 /* Start of processor-specific */ #define PT_HIPROC 0x7fffffff /* End of processor-specific */ /* Legal values for p_flags (segment flags). */ #define PF_X (1 << 0) /* Segment is executable */ #define PF_W (1 << 1) /* Segment is writable */ #define PF_R (1 << 2) /* Segment is readable */ #define PF_MASKOS 0x0ff00000 /* OS-specific */ #define PF_MASKPROC 0xf0000000 /* Processor-specific */ /* Legal values for note segment descriptor types for core files. */ #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ #define NT_PRFPREG 2 /* Contains copy of fpregset struct. */ #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ #define NT_PRXREG 4 /* Contains copy of prxregset struct */ #define NT_TASKSTRUCT 4 /* Contains copy of task structure */ #define NT_PLATFORM 5 /* String from sysinfo(SI_PLATFORM) */ #define NT_AUXV 6 /* Contains copy of auxv array */ #define NT_GWINDOWS 7 /* Contains copy of gwindows struct */ #define NT_ASRS 8 /* Contains copy of asrset struct */ #define NT_PSTATUS 10 /* Contains copy of pstatus struct */ #define NT_PSINFO 13 /* Contains copy of psinfo struct */ #define NT_PRCRED 14 /* Contains copy of prcred struct */ #define NT_UTSNAME 15 /* Contains copy of utsname struct */ #define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */ #define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */ #define NT_PRFPXREG 20 /* Contains copy of fprxregset struct */ #define NT_SIGINFO 0x53494749 /* Contains copy of siginfo_t, size might increase */ #define NT_FILE 0x46494c45 /* Contains information about mapped files */ #define NT_PRXFPREG 0x46e62b7f /* Contains copy of user_fxsr_struct */ #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ #define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */ #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ #define NT_PPC_TAR 0x103 /* Target Address Register */ #define NT_PPC_PPR 0x104 /* Program Priority Register */ #define NT_PPC_DSCR 0x105 /* Data Stream Control Register */ #define NT_PPC_EBB 0x106 /* Event Based Branch Registers */ #define NT_PPC_PMU 0x107 /* Performance Monitor Registers */ #define NT_PPC_TM_CGPR 0x108 /* TM checkpointed GPR Registers */ #define NT_PPC_TM_CFPR 0x109 /* TM checkpointed FPR Registers */ #define NT_PPC_TM_CVMX 0x10a /* TM checkpointed VMX Registers */ #define NT_PPC_TM_CVSX 0x10b /* TM checkpointed VSX Registers */ #define NT_PPC_TM_SPR 0x10c /* TM Special Purpose Registers */ #define NT_PPC_TM_CTAR 0x10d /* TM checkpointed Target Address Register */ #define NT_PPC_TM_CPPR 0x10e /* TM checkpointed Program Priority Register */ #define NT_PPC_TM_CDSCR 0x10f /* TM checkpointed Data Stream Control Register */ #define NT_PPC_PKEY 0x110 /* Memory Protection Keys registers. */ #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ #define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */ #define NT_S390_TIMER 0x301 /* s390 timer register */ #define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */ #define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */ #define NT_S390_CTRS 0x304 /* s390 control registers */ #define NT_S390_PREFIX 0x305 /* s390 prefix register */ #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ #define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ #define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 upper half. */ #define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31. */ #define NT_S390_GS_CB 0x30b /* s390 guarded storage registers. */ #define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block. */ #define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */ #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ #define NT_ARM_TLS 0x401 /* ARM TLS register */ #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ #define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */ /* Legal values for the note segment descriptor types for object files. */ #define NT_VERSION 1 /* Contains a version string. */ /* Dynamic section entry. */ typedef struct { Elf32_Sword d_tag; /* Dynamic entry type */ union { Elf32_Word d_val; /* Integer value */ Elf32_Addr d_ptr; /* Address value */ } d_un; } Elf32_Dyn; typedef struct { Elf64_Sxword d_tag; /* Dynamic entry type */ union { Elf64_Xword d_val; /* Integer value */ Elf64_Addr d_ptr; /* Address value */ } d_un; } Elf64_Dyn; /* Legal values for d_tag (dynamic entry type). */ #define DT_NULL 0 /* Marks end of dynamic section */ #define DT_NEEDED 1 /* Name of needed library */ #define DT_PLTRELSZ 2 /* Size in bytes of PLT relocs */ #define DT_PLTGOT 3 /* Processor defined value */ #define DT_HASH 4 /* Address of symbol hash table */ #define DT_STRTAB 5 /* Address of string table */ #define DT_SYMTAB 6 /* Address of symbol table */ #define DT_RELA 7 /* Address of Rela relocs */ #define DT_RELASZ 8 /* Total size of Rela relocs */ #define DT_RELAENT 9 /* Size of one Rela reloc */ #define DT_STRSZ 10 /* Size of string table */ #define DT_SYMENT 11 /* Size of one symbol table entry */ #define DT_INIT 12 /* Address of init function */ #define DT_FINI 13 /* Address of termination function */ #define DT_SONAME 14 /* Name of shared object */ #define DT_RPATH 15 /* Library search path (deprecated) */ #define DT_SYMBOLIC 16 /* Start symbol search here */ #define DT_REL 17 /* Address of Rel relocs */ #define DT_RELSZ 18 /* Total size of Rel relocs */ #define DT_RELENT 19 /* Size of one Rel reloc */ #define DT_PLTREL 20 /* Type of reloc in PLT */ #define DT_DEBUG 21 /* For debugging; unspecified */ #define DT_TEXTREL 22 /* Reloc might modify .text */ #define DT_JMPREL 23 /* Address of PLT relocs */ #define DT_BIND_NOW 24 /* Process relocations of object */ #define DT_INIT_ARRAY 25 /* Array with addresses of init fct */ #define DT_FINI_ARRAY 26 /* Array with addresses of fini fct */ #define DT_INIT_ARRAYSZ 27 /* Size in bytes of DT_INIT_ARRAY */ #define DT_FINI_ARRAYSZ 28 /* Size in bytes of DT_FINI_ARRAY */ #define DT_RUNPATH 29 /* Library search path */ #define DT_FLAGS 30 /* Flags for the object being loaded */ #define DT_ENCODING 32 /* Start of encoded range */ #define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/ #define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */ #define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */ #define DT_NUM 35 /* Number used */ #define DT_LOOS 0x6000000d /* Start of OS-specific */ #define DT_HIOS 0x6ffff000 /* End of OS-specific */ #define DT_LOPROC 0x70000000 /* Start of processor-specific */ #define DT_HIPROC 0x7fffffff /* End of processor-specific */ #define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */ /* DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the Dyn.d_un.d_val field of the Elf*_Dyn structure. This follows Sun's approach. */ #define DT_VALRNGLO 0x6ffffd00 #define DT_GNU_PRELINKED 0x6ffffdf5 /* Prelinking timestamp */ #define DT_GNU_CONFLICTSZ 0x6ffffdf6 /* Size of conflict section */ #define DT_GNU_LIBLISTSZ 0x6ffffdf7 /* Size of library list */ #define DT_CHECKSUM 0x6ffffdf8 #define DT_PLTPADSZ 0x6ffffdf9 #define DT_MOVEENT 0x6ffffdfa #define DT_MOVESZ 0x6ffffdfb #define DT_FEATURE_1 0x6ffffdfc /* Feature selection (DTF_*). */ #define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting the following DT_* entry. */ #define DT_SYMINSZ 0x6ffffdfe /* Size of syminfo table (in bytes) */ #define DT_SYMINENT 0x6ffffdff /* Entry size of syminfo */ #define DT_VALRNGHI 0x6ffffdff #define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) /* Reverse order! */ #define DT_VALNUM 12 /* DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the Dyn.d_un.d_ptr field of the Elf*_Dyn structure. If any adjustment is made to the ELF object after it has been built these entries will need to be adjusted. */ #define DT_ADDRRNGLO 0x6ffffe00 #define DT_GNU_HASH 0x6ffffef5 /* GNU-style hash table. */ #define DT_TLSDESC_PLT 0x6ffffef6 #define DT_TLSDESC_GOT 0x6ffffef7 #define DT_GNU_CONFLICT 0x6ffffef8 /* Start of conflict section */ #define DT_GNU_LIBLIST 0x6ffffef9 /* Library list */ #define DT_CONFIG 0x6ffffefa /* Configuration information. */ #define DT_DEPAUDIT 0x6ffffefb /* Dependency auditing. */ #define DT_AUDIT 0x6ffffefc /* Object auditing. */ #define DT_PLTPAD 0x6ffffefd /* PLT padding. */ #define DT_MOVETAB 0x6ffffefe /* Move table. */ #define DT_SYMINFO 0x6ffffeff /* Syminfo table. */ #define DT_ADDRRNGHI 0x6ffffeff #define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) /* Reverse order! */ #define DT_ADDRNUM 11 /* The versioning entry types. The next are defined as part of the GNU extension. */ #define DT_VERSYM 0x6ffffff0 #define DT_RELACOUNT 0x6ffffff9 #define DT_RELCOUNT 0x6ffffffa /* These were chosen by Sun. */ #define DT_FLAGS_1 0x6ffffffb /* State flags, see DF_1_* below. */ #define DT_VERDEF 0x6ffffffc /* Address of version definition table */ #define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */ #define DT_VERNEED 0x6ffffffe /* Address of table with needed versions */ #define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */ #define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */ #define DT_VERSIONTAGNUM 16 /* Sun added these machine-independent extensions in the "processor-specific" range. Be compatible. */ #define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */ #define DT_FILTER 0x7fffffff /* Shared object to get values from */ #define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) #define DT_EXTRANUM 3 /* Values of `d_un.d_val' in the DT_FLAGS entry. */ #define DF_ORIGIN 0x00000001 /* Object may use DF_ORIGIN */ #define DF_SYMBOLIC 0x00000002 /* Symbol resolutions starts here */ #define DF_TEXTREL 0x00000004 /* Object contains text relocations */ #define DF_BIND_NOW 0x00000008 /* No lazy binding for this object */ #define DF_STATIC_TLS 0x00000010 /* Module uses the static TLS model */ /* State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1 entry in the dynamic section. */ #define DF_1_NOW 0x00000001 /* Set RTLD_NOW for this object. */ #define DF_1_GLOBAL 0x00000002 /* Set RTLD_GLOBAL for this object. */ #define DF_1_GROUP 0x00000004 /* Set RTLD_GROUP for this object. */ #define DF_1_NODELETE 0x00000008 /* Set RTLD_NODELETE for this object.*/ #define DF_1_LOADFLTR 0x00000010 /* Trigger filtee loading at runtime.*/ #define DF_1_INITFIRST 0x00000020 /* Set RTLD_INITFIRST for this object*/ #define DF_1_NOOPEN 0x00000040 /* Set RTLD_NOOPEN for this object. */ #define DF_1_ORIGIN 0x00000080 /* $ORIGIN must be handled. */ #define DF_1_DIRECT 0x00000100 /* Direct binding enabled. */ #define DF_1_TRANS 0x00000200 #define DF_1_INTERPOSE 0x00000400 /* Object is used to interpose. */ #define DF_1_NODEFLIB 0x00000800 /* Ignore default lib search path. */ #define DF_1_NODUMP 0x00001000 /* Object can't be dldump'ed. */ #define DF_1_CONFALT 0x00002000 /* Configuration alternative created.*/ #define DF_1_ENDFILTEE 0x00004000 /* Filtee terminates filters search. */ #define DF_1_DISPRELDNE 0x00008000 /* Disp reloc applied at build time. */ #define DF_1_DISPRELPND 0x00010000 /* Disp reloc applied at run-time. */ #define DF_1_NODIRECT 0x00020000 /* Object has no-direct binding. */ #define DF_1_IGNMULDEF 0x00040000 #define DF_1_NOKSYMS 0x00080000 #define DF_1_NOHDR 0x00100000 #define DF_1_EDITED 0x00200000 /* Object is modified after built. */ #define DF_1_NORELOC 0x00400000 #define DF_1_SYMINTPOSE 0x00800000 /* Object has individual interposers. */ #define DF_1_GLOBAUDIT 0x01000000 /* Global auditing required. */ #define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */ #define DF_1_STUB 0x04000000 #define DF_1_PIE 0x08000000 /* Flags for the feature selection in DT_FEATURE_1. */ #define DTF_1_PARINIT 0x00000001 #define DTF_1_CONFEXP 0x00000002 /* Flags in the DT_POSFLAG_1 entry effecting only the next DT_* entry. */ #define DF_P1_LAZYLOAD 0x00000001 /* Lazyload following object. */ #define DF_P1_GROUPPERM 0x00000002 /* Symbols from next object are not generally available. */ /* Version definition sections. */ typedef struct { Elf32_Half vd_version; /* Version revision */ Elf32_Half vd_flags; /* Version information */ Elf32_Half vd_ndx; /* Version Index */ Elf32_Half vd_cnt; /* Number of associated aux entries */ Elf32_Word vd_hash; /* Version name hash value */ Elf32_Word vd_aux; /* Offset in bytes to verdaux array */ Elf32_Word vd_next; /* Offset in bytes to next verdef entry */ } Elf32_Verdef; typedef struct { Elf64_Half vd_version; /* Version revision */ Elf64_Half vd_flags; /* Version information */ Elf64_Half vd_ndx; /* Version Index */ Elf64_Half vd_cnt; /* Number of associated aux entries */ Elf64_Word vd_hash; /* Version name hash value */ Elf64_Word vd_aux; /* Offset in bytes to verdaux array */ Elf64_Word vd_next; /* Offset in bytes to next verdef entry */ } Elf64_Verdef; /* Legal values for vd_version (version revision). */ #define VER_DEF_NONE 0 /* No version */ #define VER_DEF_CURRENT 1 /* Current version */ #define VER_DEF_NUM 2 /* Given version number */ /* Legal values for vd_flags (version information flags). */ #define VER_FLG_BASE 0x1 /* Version definition of file itself */ #define VER_FLG_WEAK 0x2 /* Weak version identifier. Also used by vna_flags below. */ /* Versym symbol index values. */ #define VER_NDX_LOCAL 0 /* Symbol is local. */ #define VER_NDX_GLOBAL 1 /* Symbol is global. */ #define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */ #define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */ /* Auxialiary version information. */ typedef struct { Elf32_Word vda_name; /* Version or dependency names */ Elf32_Word vda_next; /* Offset in bytes to next verdaux entry */ } Elf32_Verdaux; typedef struct { Elf64_Word vda_name; /* Version or dependency names */ Elf64_Word vda_next; /* Offset in bytes to next verdaux entry */ } Elf64_Verdaux; /* Version dependency section. */ typedef struct { Elf32_Half vn_version; /* Version of structure */ Elf32_Half vn_cnt; /* Number of associated aux entries */ Elf32_Word vn_file; /* Offset of filename for this dependency */ Elf32_Word vn_aux; /* Offset in bytes to vernaux array */ Elf32_Word vn_next; /* Offset in bytes to next verneed entry */ } Elf32_Verneed; typedef struct { Elf64_Half vn_version; /* Version of structure */ Elf64_Half vn_cnt; /* Number of associated aux entries */ Elf64_Word vn_file; /* Offset of filename for this dependency */ Elf64_Word vn_aux; /* Offset in bytes to vernaux array */ Elf64_Word vn_next; /* Offset in bytes to next verneed entry */ } Elf64_Verneed; /* Legal values for vn_version (version revision). */ #define VER_NEED_NONE 0 /* No version */ #define VER_NEED_CURRENT 1 /* Current version */ #define VER_NEED_NUM 2 /* Given version number */ /* Auxiliary needed version information. */ typedef struct { Elf32_Word vna_hash; /* Hash value of dependency name */ Elf32_Half vna_flags; /* Dependency specific information */ Elf32_Half vna_other; /* Unused */ Elf32_Word vna_name; /* Dependency name string offset */ Elf32_Word vna_next; /* Offset in bytes to next vernaux entry */ } Elf32_Vernaux; typedef struct { Elf64_Word vna_hash; /* Hash value of dependency name */ Elf64_Half vna_flags; /* Dependency specific information */ Elf64_Half vna_other; /* Unused */ Elf64_Word vna_name; /* Dependency name string offset */ Elf64_Word vna_next; /* Offset in bytes to next vernaux entry */ } Elf64_Vernaux; /* Auxiliary vector. */ /* This vector is normally only used by the program interpreter. The usual definition in an ABI supplement uses the name auxv_t. The vector is not usually defined in a standard file, but it can't hurt. We rename it to avoid conflicts. The sizes of these types are an arrangement between the exec server and the program interpreter, so we don't fully specify them here. */ typedef struct { uint32_t a_type; /* Entry type */ union { uint32_t a_val; /* Integer value */ /* We use to have pointer elements added here. We cannot do that, though, since it does not work when using 32-bit definitions on 64-bit platforms and vice versa. */ } a_un; } Elf32_auxv_t; typedef struct { uint64_t a_type; /* Entry type */ union { uint64_t a_val; /* Integer value */ /* We use to have pointer elements added here. We cannot do that, though, since it does not work when using 32-bit definitions on 64-bit platforms and vice versa. */ } a_un; } Elf64_auxv_t; /* Legal values for a_type (entry type). */ #define AT_NULL 0 /* End of vector */ #define AT_IGNORE 1 /* Entry should be ignored */ #define AT_EXECFD 2 /* File descriptor of program */ #define AT_PHDR 3 /* Program headers for program */ #define AT_PHENT 4 /* Size of program header entry */ #define AT_PHNUM 5 /* Number of program headers */ #define AT_PAGESZ 6 /* System page size */ #define AT_BASE 7 /* Base address of interpreter */ #define AT_FLAGS 8 /* Flags */ #define AT_ENTRY 9 /* Entry point of program */ #define AT_NOTELF 10 /* Program is not ELF */ #define AT_UID 11 /* Real uid */ #define AT_EUID 12 /* Effective uid */ #define AT_GID 13 /* Real gid */ #define AT_EGID 14 /* Effective gid */ #define AT_CLKTCK 17 /* Frequency of times() */ /* Some more special a_type values describing the hardware. */ #define AT_PLATFORM 15 /* String identifying platform. */ #define AT_HWCAP 16 /* Machine-dependent hints about processor capabilities. */ /* This entry gives some information about the FPU initialization performed by the kernel. */ #define AT_FPUCW 18 /* Used FPU control word. */ /* Cache block sizes. */ #define AT_DCACHEBSIZE 19 /* Data cache block size. */ #define AT_ICACHEBSIZE 20 /* Instruction cache block size. */ #define AT_UCACHEBSIZE 21 /* Unified cache block size. */ /* A special ignored value for PPC, used by the kernel to control the interpretation of the AUXV. Must be > 16. */ #define AT_IGNOREPPC 22 /* Entry should be ignored. */ #define AT_SECURE 23 /* Boolean, was exec setuid-like? */ #define AT_BASE_PLATFORM 24 /* String identifying real platforms.*/ #define AT_RANDOM 25 /* Address of 16 random bytes. */ #define AT_HWCAP2 26 /* More machine-dependent hints about processor capabilities. */ #define AT_EXECFN 31 /* Filename of executable. */ /* Pointer to the global system page used for system calls and other nice things. */ #define AT_SYSINFO 32 #define AT_SYSINFO_EHDR 33 /* Shapes of the caches. Bits 0-3 contains associativity; bits 4-7 contains log2 of line size; mask those to get cache size. */ #define AT_L1I_CACHESHAPE 34 #define AT_L1D_CACHESHAPE 35 #define AT_L2_CACHESHAPE 36 #define AT_L3_CACHESHAPE 37 /* Shapes of the caches, with more room to describe them. *GEOMETRY are comprised of cache line size in bytes in the bottom 16 bits and the cache associativity in the next 16 bits. */ #define AT_L1I_CACHESIZE 40 #define AT_L1I_CACHEGEOMETRY 41 #define AT_L1D_CACHESIZE 42 #define AT_L1D_CACHEGEOMETRY 43 #define AT_L2_CACHESIZE 44 #define AT_L2_CACHEGEOMETRY 45 #define AT_L3_CACHESIZE 46 #define AT_L3_CACHEGEOMETRY 47 /* Note section contents. Each entry in the note section begins with a header of a fixed form. */ typedef struct { Elf32_Word n_namesz; /* Length of the note's name. */ Elf32_Word n_descsz; /* Length of the note's descriptor. */ Elf32_Word n_type; /* Type of the note. */ } Elf32_Nhdr; typedef struct { Elf64_Word n_namesz; /* Length of the note's name. */ Elf64_Word n_descsz; /* Length of the note's descriptor. */ Elf64_Word n_type; /* Type of the note. */ } Elf64_Nhdr; /* Known names of notes. */ /* Solaris entries in the note section have this name. */ #define ELF_NOTE_SOLARIS "SUNW Solaris" /* Note entries for GNU systems have this name. */ #define ELF_NOTE_GNU "GNU" /* Defined types of notes for Solaris. */ /* Value of descriptor (one word) is desired pagesize for the binary. */ #define ELF_NOTE_PAGESIZE_HINT 1 /* Defined note types for GNU systems. */ /* ABI information. The descriptor consists of words: word 0: OS descriptor word 1: major version of the ABI word 2: minor version of the ABI word 3: subminor version of the ABI */ #define NT_GNU_ABI_TAG 1 #define ELF_NOTE_ABI NT_GNU_ABI_TAG /* Old name. */ /* Known OSes. These values can appear in word 0 of an NT_GNU_ABI_TAG note section entry. */ #define ELF_NOTE_OS_LINUX 0 #define ELF_NOTE_OS_GNU 1 #define ELF_NOTE_OS_SOLARIS2 2 #define ELF_NOTE_OS_FREEBSD 3 /* Synthetic hwcap information. The descriptor begins with two words: word 0: number of entries word 1: bitmask of enabled entries Then follow variable-length entries, one byte followed by a '\0'-terminated hwcap name string. The byte gives the bit number to test if enabled, (1U << bit) & bitmask. */ #define NT_GNU_HWCAP 2 /* Build ID bits as generated by ld --build-id. The descriptor consists of any nonzero number of bytes. */ #define NT_GNU_BUILD_ID 3 /* Version note generated by GNU gold containing a version string. */ #define NT_GNU_GOLD_VERSION 4 /* Program property. */ #define NT_GNU_PROPERTY_TYPE_0 5 /* Note section name of program property. */ #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" /* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0). */ /* Stack size. */ #define GNU_PROPERTY_STACK_SIZE 1 /* No copy relocation on protected data symbol. */ #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 /* Processor-specific semantics, lo */ #define GNU_PROPERTY_LOPROC 0xc0000000 /* Processor-specific semantics, hi */ #define GNU_PROPERTY_HIPROC 0xdfffffff /* Application-specific semantics, lo */ #define GNU_PROPERTY_LOUSER 0xe0000000 /* Application-specific semantics, hi */ #define GNU_PROPERTY_HIUSER 0xffffffff /* The x86 instruction sets indicated by the corresponding bits are used in program. Their support in the hardware is optional. */ #define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 /* The x86 instruction sets indicated by the corresponding bits are used in program and they must be supported by the hardware. */ #define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 /* X86 processor-specific features used in program. */ #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 #define GNU_PROPERTY_X86_ISA_1_486 (1U << 0) #define GNU_PROPERTY_X86_ISA_1_586 (1U << 1) #define GNU_PROPERTY_X86_ISA_1_686 (1U << 2) #define GNU_PROPERTY_X86_ISA_1_SSE (1U << 3) #define GNU_PROPERTY_X86_ISA_1_SSE2 (1U << 4) #define GNU_PROPERTY_X86_ISA_1_SSE3 (1U << 5) #define GNU_PROPERTY_X86_ISA_1_SSSE3 (1U << 6) #define GNU_PROPERTY_X86_ISA_1_SSE4_1 (1U << 7) #define GNU_PROPERTY_X86_ISA_1_SSE4_2 (1U << 8) #define GNU_PROPERTY_X86_ISA_1_AVX (1U << 9) #define GNU_PROPERTY_X86_ISA_1_AVX2 (1U << 10) #define GNU_PROPERTY_X86_ISA_1_AVX512F (1U << 11) #define GNU_PROPERTY_X86_ISA_1_AVX512CD (1U << 12) #define GNU_PROPERTY_X86_ISA_1_AVX512ER (1U << 13) #define GNU_PROPERTY_X86_ISA_1_AVX512PF (1U << 14) #define GNU_PROPERTY_X86_ISA_1_AVX512VL (1U << 15) #define GNU_PROPERTY_X86_ISA_1_AVX512DQ (1U << 16) #define GNU_PROPERTY_X86_ISA_1_AVX512BW (1U << 17) /* This indicates that all executable sections are compatible with IBT. */ #define GNU_PROPERTY_X86_FEATURE_1_IBT (1U << 0) /* This indicates that all executable sections are compatible with SHSTK. */ #define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1) /* Move records. */ typedef struct { Elf32_Xword m_value; /* Symbol value. */ Elf32_Word m_info; /* Size and index. */ Elf32_Word m_poffset; /* Symbol offset. */ Elf32_Half m_repeat; /* Repeat count. */ Elf32_Half m_stride; /* Stride info. */ } Elf32_Move; typedef struct { Elf64_Xword m_value; /* Symbol value. */ Elf64_Xword m_info; /* Size and index. */ Elf64_Xword m_poffset; /* Symbol offset. */ Elf64_Half m_repeat; /* Repeat count. */ Elf64_Half m_stride; /* Stride info. */ } Elf64_Move; /* Macro to construct move records. */ #define ELF32_M_SYM(info) ((info) >> 8) #define ELF32_M_SIZE(info) ((unsigned char) (info)) #define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) #define ELF64_M_SYM(info) ELF32_M_SYM (info) #define ELF64_M_SIZE(info) ELF32_M_SIZE (info) #define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) /* Motorola 68k specific definitions. */ /* Values for Elf32_Ehdr.e_flags. */ #define EF_CPU32 0x00810000 /* m68k relocs. */ #define R_68K_NONE 0 /* No reloc */ #define R_68K_32 1 /* Direct 32 bit */ #define R_68K_16 2 /* Direct 16 bit */ #define R_68K_8 3 /* Direct 8 bit */ #define R_68K_PC32 4 /* PC relative 32 bit */ #define R_68K_PC16 5 /* PC relative 16 bit */ #define R_68K_PC8 6 /* PC relative 8 bit */ #define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */ #define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */ #define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */ #define R_68K_GOT32O 10 /* 32 bit GOT offset */ #define R_68K_GOT16O 11 /* 16 bit GOT offset */ #define R_68K_GOT8O 12 /* 8 bit GOT offset */ #define R_68K_PLT32 13 /* 32 bit PC relative PLT address */ #define R_68K_PLT16 14 /* 16 bit PC relative PLT address */ #define R_68K_PLT8 15 /* 8 bit PC relative PLT address */ #define R_68K_PLT32O 16 /* 32 bit PLT offset */ #define R_68K_PLT16O 17 /* 16 bit PLT offset */ #define R_68K_PLT8O 18 /* 8 bit PLT offset */ #define R_68K_COPY 19 /* Copy symbol at runtime */ #define R_68K_GLOB_DAT 20 /* Create GOT entry */ #define R_68K_JMP_SLOT 21 /* Create PLT entry */ #define R_68K_RELATIVE 22 /* Adjust by program base */ #define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */ #define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */ #define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */ #define R_68K_TLS_LDM32 28 /* 32 bit GOT offset for LDM */ #define R_68K_TLS_LDM16 29 /* 16 bit GOT offset for LDM */ #define R_68K_TLS_LDM8 30 /* 8 bit GOT offset for LDM */ #define R_68K_TLS_LDO32 31 /* 32 bit module-relative offset */ #define R_68K_TLS_LDO16 32 /* 16 bit module-relative offset */ #define R_68K_TLS_LDO8 33 /* 8 bit module-relative offset */ #define R_68K_TLS_IE32 34 /* 32 bit GOT offset for IE */ #define R_68K_TLS_IE16 35 /* 16 bit GOT offset for IE */ #define R_68K_TLS_IE8 36 /* 8 bit GOT offset for IE */ #define R_68K_TLS_LE32 37 /* 32 bit offset relative to static TLS block */ #define R_68K_TLS_LE16 38 /* 16 bit offset relative to static TLS block */ #define R_68K_TLS_LE8 39 /* 8 bit offset relative to static TLS block */ #define R_68K_TLS_DTPMOD32 40 /* 32 bit module number */ #define R_68K_TLS_DTPREL32 41 /* 32 bit module-relative offset */ #define R_68K_TLS_TPREL32 42 /* 32 bit TP-relative offset */ /* Keep this the last entry. */ #define R_68K_NUM 43 /* Intel 80386 specific definitions. */ /* i386 relocs. */ #define R_386_NONE 0 /* No reloc */ #define R_386_32 1 /* Direct 32 bit */ #define R_386_PC32 2 /* PC relative 32 bit */ #define R_386_GOT32 3 /* 32 bit GOT entry */ #define R_386_PLT32 4 /* 32 bit PLT address */ #define R_386_COPY 5 /* Copy symbol at runtime */ #define R_386_GLOB_DAT 6 /* Create GOT entry */ #define R_386_JMP_SLOT 7 /* Create PLT entry */ #define R_386_RELATIVE 8 /* Adjust by program base */ #define R_386_GOTOFF 9 /* 32 bit offset to GOT */ #define R_386_GOTPC 10 /* 32 bit PC relative offset to GOT */ #define R_386_32PLT 11 #define R_386_TLS_TPOFF 14 /* Offset in static TLS block */ #define R_386_TLS_IE 15 /* Address of GOT entry for static TLS block offset */ #define R_386_TLS_GOTIE 16 /* GOT entry for static TLS block offset */ #define R_386_TLS_LE 17 /* Offset relative to static TLS block */ #define R_386_TLS_GD 18 /* Direct 32 bit for GNU version of general dynamic thread local data */ #define R_386_TLS_LDM 19 /* Direct 32 bit for GNU version of local dynamic thread local data in LE code */ #define R_386_16 20 #define R_386_PC16 21 #define R_386_8 22 #define R_386_PC8 23 #define R_386_TLS_GD_32 24 /* Direct 32 bit for general dynamic thread local data */ #define R_386_TLS_GD_PUSH 25 /* Tag for pushl in GD TLS code */ #define R_386_TLS_GD_CALL 26 /* Relocation for call to __tls_get_addr() */ #define R_386_TLS_GD_POP 27 /* Tag for popl in GD TLS code */ #define R_386_TLS_LDM_32 28 /* Direct 32 bit for local dynamic thread local data in LE code */ #define R_386_TLS_LDM_PUSH 29 /* Tag for pushl in LDM TLS code */ #define R_386_TLS_LDM_CALL 30 /* Relocation for call to __tls_get_addr() in LDM code */ #define R_386_TLS_LDM_POP 31 /* Tag for popl in LDM TLS code */ #define R_386_TLS_LDO_32 32 /* Offset relative to TLS block */ #define R_386_TLS_IE_32 33 /* GOT entry for negated static TLS block offset */ #define R_386_TLS_LE_32 34 /* Negated offset relative to static TLS block */ #define R_386_TLS_DTPMOD32 35 /* ID of module containing symbol */ #define R_386_TLS_DTPOFF32 36 /* Offset in TLS block */ #define R_386_TLS_TPOFF32 37 /* Negated offset in static TLS block */ #define R_386_SIZE32 38 /* 32-bit symbol size */ #define R_386_TLS_GOTDESC 39 /* GOT offset for TLS descriptor. */ #define R_386_TLS_DESC_CALL 40 /* Marker of call through TLS descriptor for relaxation. */ #define R_386_TLS_DESC 41 /* TLS descriptor containing pointer to code and to argument, returning the TLS offset for the symbol. */ #define R_386_IRELATIVE 42 /* Adjust indirectly by program base */ #define R_386_GOT32X 43 /* Load from 32 bit GOT entry, relaxable. */ /* Keep this the last entry. */ #define R_386_NUM 44 /* SUN SPARC specific definitions. */ /* Legal values for ST_TYPE subfield of st_info (symbol type). */ #define STT_SPARC_REGISTER 13 /* Global register reserved to app. */ /* Values for Elf64_Ehdr.e_flags. */ #define EF_SPARCV9_MM 3 #define EF_SPARCV9_TSO 0 #define EF_SPARCV9_PSO 1 #define EF_SPARCV9_RMO 2 #define EF_SPARC_LEDATA 0x800000 /* little endian data */ #define EF_SPARC_EXT_MASK 0xFFFF00 #define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */ #define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */ #define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */ #define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */ /* SPARC relocs. */ #define R_SPARC_NONE 0 /* No reloc */ #define R_SPARC_8 1 /* Direct 8 bit */ #define R_SPARC_16 2 /* Direct 16 bit */ #define R_SPARC_32 3 /* Direct 32 bit */ #define R_SPARC_DISP8 4 /* PC relative 8 bit */ #define R_SPARC_DISP16 5 /* PC relative 16 bit */ #define R_SPARC_DISP32 6 /* PC relative 32 bit */ #define R_SPARC_WDISP30 7 /* PC relative 30 bit shifted */ #define R_SPARC_WDISP22 8 /* PC relative 22 bit shifted */ #define R_SPARC_HI22 9 /* High 22 bit */ #define R_SPARC_22 10 /* Direct 22 bit */ #define R_SPARC_13 11 /* Direct 13 bit */ #define R_SPARC_LO10 12 /* Truncated 10 bit */ #define R_SPARC_GOT10 13 /* Truncated 10 bit GOT entry */ #define R_SPARC_GOT13 14 /* 13 bit GOT entry */ #define R_SPARC_GOT22 15 /* 22 bit GOT entry shifted */ #define R_SPARC_PC10 16 /* PC relative 10 bit truncated */ #define R_SPARC_PC22 17 /* PC relative 22 bit shifted */ #define R_SPARC_WPLT30 18 /* 30 bit PC relative PLT address */ #define R_SPARC_COPY 19 /* Copy symbol at runtime */ #define R_SPARC_GLOB_DAT 20 /* Create GOT entry */ #define R_SPARC_JMP_SLOT 21 /* Create PLT entry */ #define R_SPARC_RELATIVE 22 /* Adjust by program base */ #define R_SPARC_UA32 23 /* Direct 32 bit unaligned */ /* Additional Sparc64 relocs. */ #define R_SPARC_PLT32 24 /* Direct 32 bit ref to PLT entry */ #define R_SPARC_HIPLT22 25 /* High 22 bit PLT entry */ #define R_SPARC_LOPLT10 26 /* Truncated 10 bit PLT entry */ #define R_SPARC_PCPLT32 27 /* PC rel 32 bit ref to PLT entry */ #define R_SPARC_PCPLT22 28 /* PC rel high 22 bit PLT entry */ #define R_SPARC_PCPLT10 29 /* PC rel trunc 10 bit PLT entry */ #define R_SPARC_10 30 /* Direct 10 bit */ #define R_SPARC_11 31 /* Direct 11 bit */ #define R_SPARC_64 32 /* Direct 64 bit */ #define R_SPARC_OLO10 33 /* 10bit with secondary 13bit addend */ #define R_SPARC_HH22 34 /* Top 22 bits of direct 64 bit */ #define R_SPARC_HM10 35 /* High middle 10 bits of ... */ #define R_SPARC_LM22 36 /* Low middle 22 bits of ... */ #define R_SPARC_PC_HH22 37 /* Top 22 bits of pc rel 64 bit */ #define R_SPARC_PC_HM10 38 /* High middle 10 bit of ... */ #define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */ #define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */ #define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */ #define R_SPARC_GLOB_JMP 42 /* was part of v9 ABI but was removed */ #define R_SPARC_7 43 /* Direct 7 bit */ #define R_SPARC_5 44 /* Direct 5 bit */ #define R_SPARC_6 45 /* Direct 6 bit */ #define R_SPARC_DISP64 46 /* PC relative 64 bit */ #define R_SPARC_PLT64 47 /* Direct 64 bit ref to PLT entry */ #define R_SPARC_HIX22 48 /* High 22 bit complemented */ #define R_SPARC_LOX10 49 /* Truncated 11 bit complemented */ #define R_SPARC_H44 50 /* Direct high 12 of 44 bit */ #define R_SPARC_M44 51 /* Direct mid 22 of 44 bit */ #define R_SPARC_L44 52 /* Direct low 10 of 44 bit */ #define R_SPARC_REGISTER 53 /* Global register usage */ #define R_SPARC_UA64 54 /* Direct 64 bit unaligned */ #define R_SPARC_UA16 55 /* Direct 16 bit unaligned */ #define R_SPARC_TLS_GD_HI22 56 #define R_SPARC_TLS_GD_LO10 57 #define R_SPARC_TLS_GD_ADD 58 #define R_SPARC_TLS_GD_CALL 59 #define R_SPARC_TLS_LDM_HI22 60 #define R_SPARC_TLS_LDM_LO10 61 #define R_SPARC_TLS_LDM_ADD 62 #define R_SPARC_TLS_LDM_CALL 63 #define R_SPARC_TLS_LDO_HIX22 64 #define R_SPARC_TLS_LDO_LOX10 65 #define R_SPARC_TLS_LDO_ADD 66 #define R_SPARC_TLS_IE_HI22 67 #define R_SPARC_TLS_IE_LO10 68 #define R_SPARC_TLS_IE_LD 69 #define R_SPARC_TLS_IE_LDX 70 #define R_SPARC_TLS_IE_ADD 71 #define R_SPARC_TLS_LE_HIX22 72 #define R_SPARC_TLS_LE_LOX10 73 #define R_SPARC_TLS_DTPMOD32 74 #define R_SPARC_TLS_DTPMOD64 75 #define R_SPARC_TLS_DTPOFF32 76 #define R_SPARC_TLS_DTPOFF64 77 #define R_SPARC_TLS_TPOFF32 78 #define R_SPARC_TLS_TPOFF64 79 #define R_SPARC_GOTDATA_HIX22 80 #define R_SPARC_GOTDATA_LOX10 81 #define R_SPARC_GOTDATA_OP_HIX22 82 #define R_SPARC_GOTDATA_OP_LOX10 83 #define R_SPARC_GOTDATA_OP 84 #define R_SPARC_H34 85 #define R_SPARC_SIZE32 86 #define R_SPARC_SIZE64 87 #define R_SPARC_WDISP10 88 #define R_SPARC_JMP_IREL 248 #define R_SPARC_IRELATIVE 249 #define R_SPARC_GNU_VTINHERIT 250 #define R_SPARC_GNU_VTENTRY 251 #define R_SPARC_REV32 252 /* Keep this the last entry. */ #define R_SPARC_NUM 253 /* For Sparc64, legal values for d_tag of Elf64_Dyn. */ #define DT_SPARC_REGISTER 0x70000001 #define DT_SPARC_NUM 2 /* MIPS R3000 specific definitions. */ /* Legal values for e_flags field of Elf32_Ehdr. */ #define EF_MIPS_NOREORDER 1 /* A .noreorder directive was used. */ #define EF_MIPS_PIC 2 /* Contains PIC code. */ #define EF_MIPS_CPIC 4 /* Uses PIC calling sequence. */ #define EF_MIPS_XGOT 8 #define EF_MIPS_64BIT_WHIRL 16 #define EF_MIPS_ABI2 32 #define EF_MIPS_ABI_ON32 64 #define EF_MIPS_FP64 512 /* Uses FP64 (12 callee-saved). */ #define EF_MIPS_NAN2008 1024 /* Uses IEEE 754-2008 NaN encoding. */ #define EF_MIPS_ARCH 0xf0000000 /* MIPS architecture level. */ /* Legal values for MIPS architecture level. */ #define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ #define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ #define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ #define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ #define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ #define EF_MIPS_ARCH_32 0x50000000 /* MIPS32 code. */ #define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */ #define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32r2 code. */ #define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64r2 code. */ /* The following are unofficial names and should not be used. */ #define E_MIPS_ARCH_1 EF_MIPS_ARCH_1 #define E_MIPS_ARCH_2 EF_MIPS_ARCH_2 #define E_MIPS_ARCH_3 EF_MIPS_ARCH_3 #define E_MIPS_ARCH_4 EF_MIPS_ARCH_4 #define E_MIPS_ARCH_5 EF_MIPS_ARCH_5 #define E_MIPS_ARCH_32 EF_MIPS_ARCH_32 #define E_MIPS_ARCH_64 EF_MIPS_ARCH_64 /* Special section indices. */ #define SHN_MIPS_ACOMMON 0xff00 /* Allocated common symbols. */ #define SHN_MIPS_TEXT 0xff01 /* Allocated test symbols. */ #define SHN_MIPS_DATA 0xff02 /* Allocated data symbols. */ #define SHN_MIPS_SCOMMON 0xff03 /* Small common symbols. */ #define SHN_MIPS_SUNDEFINED 0xff04 /* Small undefined symbols. */ /* Legal values for sh_type field of Elf32_Shdr. */ #define SHT_MIPS_LIBLIST 0x70000000 /* Shared objects used in link. */ #define SHT_MIPS_MSYM 0x70000001 #define SHT_MIPS_CONFLICT 0x70000002 /* Conflicting symbols. */ #define SHT_MIPS_GPTAB 0x70000003 /* Global data area sizes. */ #define SHT_MIPS_UCODE 0x70000004 /* Reserved for SGI/MIPS compilers */ #define SHT_MIPS_DEBUG 0x70000005 /* MIPS ECOFF debugging info. */ #define SHT_MIPS_REGINFO 0x70000006 /* Register usage information. */ #define SHT_MIPS_PACKAGE 0x70000007 #define SHT_MIPS_PACKSYM 0x70000008 #define SHT_MIPS_RELD 0x70000009 #define SHT_MIPS_IFACE 0x7000000b #define SHT_MIPS_CONTENT 0x7000000c #define SHT_MIPS_OPTIONS 0x7000000d /* Miscellaneous options. */ #define SHT_MIPS_SHDR 0x70000010 #define SHT_MIPS_FDESC 0x70000011 #define SHT_MIPS_EXTSYM 0x70000012 #define SHT_MIPS_DENSE 0x70000013 #define SHT_MIPS_PDESC 0x70000014 #define SHT_MIPS_LOCSYM 0x70000015 #define SHT_MIPS_AUXSYM 0x70000016 #define SHT_MIPS_OPTSYM 0x70000017 #define SHT_MIPS_LOCSTR 0x70000018 #define SHT_MIPS_LINE 0x70000019 #define SHT_MIPS_RFDESC 0x7000001a #define SHT_MIPS_DELTASYM 0x7000001b #define SHT_MIPS_DELTAINST 0x7000001c #define SHT_MIPS_DELTACLASS 0x7000001d #define SHT_MIPS_DWARF 0x7000001e /* DWARF debugging information. */ #define SHT_MIPS_DELTADECL 0x7000001f #define SHT_MIPS_SYMBOL_LIB 0x70000020 #define SHT_MIPS_EVENTS 0x70000021 /* Event section. */ #define SHT_MIPS_TRANSLATE 0x70000022 #define SHT_MIPS_PIXIE 0x70000023 #define SHT_MIPS_XLATE 0x70000024 #define SHT_MIPS_XLATE_DEBUG 0x70000025 #define SHT_MIPS_WHIRL 0x70000026 #define SHT_MIPS_EH_REGION 0x70000027 #define SHT_MIPS_XLATE_OLD 0x70000028 #define SHT_MIPS_PDR_EXCEPTION 0x70000029 #define SHT_MIPS_XHASH 0x7000002b /* Legal values for sh_flags field of Elf32_Shdr. */ #define SHF_MIPS_GPREL 0x10000000 /* Must be in global data area. */ #define SHF_MIPS_MERGE 0x20000000 #define SHF_MIPS_ADDR 0x40000000 #define SHF_MIPS_STRINGS 0x80000000 #define SHF_MIPS_NOSTRIP 0x08000000 #define SHF_MIPS_LOCAL 0x04000000 #define SHF_MIPS_NAMES 0x02000000 #define SHF_MIPS_NODUPE 0x01000000 /* Symbol tables. */ /* MIPS specific values for `st_other'. */ #define STO_MIPS_DEFAULT 0x0 #define STO_MIPS_INTERNAL 0x1 #define STO_MIPS_HIDDEN 0x2 #define STO_MIPS_PROTECTED 0x3 #define STO_MIPS_PLT 0x8 #define STO_MIPS_SC_ALIGN_UNUSED 0xff /* MIPS specific values for `st_info'. */ #define STB_MIPS_SPLIT_COMMON 13 /* Entries found in sections of type SHT_MIPS_GPTAB. */ typedef union { struct { Elf32_Word gt_current_g_value; /* -G value used for compilation. */ Elf32_Word gt_unused; /* Not used. */ } gt_header; /* First entry in section. */ struct { Elf32_Word gt_g_value; /* If this value were used for -G. */ Elf32_Word gt_bytes; /* This many bytes would be used. */ } gt_entry; /* Subsequent entries in section. */ } Elf32_gptab; /* Entry found in sections of type SHT_MIPS_REGINFO. */ typedef struct { Elf32_Word ri_gprmask; /* General registers used. */ Elf32_Word ri_cprmask[4]; /* Coprocessor registers used. */ Elf32_Sword ri_gp_value; /* $gp register value. */ } Elf32_RegInfo; /* Entries found in sections of type SHT_MIPS_OPTIONS. */ typedef struct { unsigned char kind; /* Determines interpretation of the variable part of descriptor. */ unsigned char size; /* Size of descriptor, including header. */ Elf32_Section section; /* Section header index of section affected, 0 for global options. */ Elf32_Word info; /* Kind-specific information. */ } Elf_Options; /* Values for `kind' field in Elf_Options. */ #define ODK_NULL 0 /* Undefined. */ #define ODK_REGINFO 1 /* Register usage information. */ #define ODK_EXCEPTIONS 2 /* Exception processing options. */ #define ODK_PAD 3 /* Section padding options. */ #define ODK_HWPATCH 4 /* Hardware workarounds performed */ #define ODK_FILL 5 /* record the fill value used by the linker. */ #define ODK_TAGS 6 /* reserve space for desktop tools to write. */ #define ODK_HWAND 7 /* HW workarounds. 'AND' bits when merging. */ #define ODK_HWOR 8 /* HW workarounds. 'OR' bits when merging. */ /* Values for `info' in Elf_Options for ODK_EXCEPTIONS entries. */ #define OEX_FPU_MIN 0x1f /* FPE's which MUST be enabled. */ #define OEX_FPU_MAX 0x1f00 /* FPE's which MAY be enabled. */ #define OEX_PAGE0 0x10000 /* page zero must be mapped. */ #define OEX_SMM 0x20000 /* Force sequential memory mode? */ #define OEX_FPDBUG 0x40000 /* Force floating point debug mode? */ #define OEX_PRECISEFP OEX_FPDBUG #define OEX_DISMISS 0x80000 /* Dismiss invalid address faults? */ #define OEX_FPU_INVAL 0x10 #define OEX_FPU_DIV0 0x08 #define OEX_FPU_OFLO 0x04 #define OEX_FPU_UFLO 0x02 #define OEX_FPU_INEX 0x01 /* Masks for `info' in Elf_Options for an ODK_HWPATCH entry. */ #define OHW_R4KEOP 0x1 /* R4000 end-of-page patch. */ #define OHW_R8KPFETCH 0x2 /* may need R8000 prefetch patch. */ #define OHW_R5KEOP 0x4 /* R5000 end-of-page patch. */ #define OHW_R5KCVTL 0x8 /* R5000 cvt.[ds].l bug. clean=1. */ #define OPAD_PREFIX 0x1 #define OPAD_POSTFIX 0x2 #define OPAD_SYMBOL 0x4 /* Entry found in `.options' section. */ typedef struct { Elf32_Word hwp_flags1; /* Extra flags. */ Elf32_Word hwp_flags2; /* Extra flags. */ } Elf_Options_Hw; /* Masks for `info' in ElfOptions for ODK_HWAND and ODK_HWOR entries. */ #define OHWA0_R4KEOP_CHECKED 0x00000001 #define OHWA1_R4KEOP_CLEAN 0x00000002 /* MIPS relocs. */ #define R_MIPS_NONE 0 /* No reloc */ #define R_MIPS_16 1 /* Direct 16 bit */ #define R_MIPS_32 2 /* Direct 32 bit */ #define R_MIPS_REL32 3 /* PC relative 32 bit */ #define R_MIPS_26 4 /* Direct 26 bit shifted */ #define R_MIPS_HI16 5 /* High 16 bit */ #define R_MIPS_LO16 6 /* Low 16 bit */ #define R_MIPS_GPREL16 7 /* GP relative 16 bit */ #define R_MIPS_LITERAL 8 /* 16 bit literal entry */ #define R_MIPS_GOT16 9 /* 16 bit GOT entry */ #define R_MIPS_PC16 10 /* PC relative 16 bit */ #define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ #define R_MIPS_GPREL32 12 /* GP relative 32 bit */ #define R_MIPS_SHIFT5 16 #define R_MIPS_SHIFT6 17 #define R_MIPS_64 18 #define R_MIPS_GOT_DISP 19 #define R_MIPS_GOT_PAGE 20 #define R_MIPS_GOT_OFST 21 #define R_MIPS_GOT_HI16 22 #define R_MIPS_GOT_LO16 23 #define R_MIPS_SUB 24 #define R_MIPS_INSERT_A 25 #define R_MIPS_INSERT_B 26 #define R_MIPS_DELETE 27 #define R_MIPS_HIGHER 28 #define R_MIPS_HIGHEST 29 #define R_MIPS_CALL_HI16 30 #define R_MIPS_CALL_LO16 31 #define R_MIPS_SCN_DISP 32 #define R_MIPS_REL16 33 #define R_MIPS_ADD_IMMEDIATE 34 #define R_MIPS_PJUMP 35 #define R_MIPS_RELGOT 36 #define R_MIPS_JALR 37 #define R_MIPS_TLS_DTPMOD32 38 /* Module number 32 bit */ #define R_MIPS_TLS_DTPREL32 39 /* Module-relative offset 32 bit */ #define R_MIPS_TLS_DTPMOD64 40 /* Module number 64 bit */ #define R_MIPS_TLS_DTPREL64 41 /* Module-relative offset 64 bit */ #define R_MIPS_TLS_GD 42 /* 16 bit GOT offset for GD */ #define R_MIPS_TLS_LDM 43 /* 16 bit GOT offset for LDM */ #define R_MIPS_TLS_DTPREL_HI16 44 /* Module-relative offset, high 16 bits */ #define R_MIPS_TLS_DTPREL_LO16 45 /* Module-relative offset, low 16 bits */ #define R_MIPS_TLS_GOTTPREL 46 /* 16 bit GOT offset for IE */ #define R_MIPS_TLS_TPREL32 47 /* TP-relative offset, 32 bit */ #define R_MIPS_TLS_TPREL64 48 /* TP-relative offset, 64 bit */ #define R_MIPS_TLS_TPREL_HI16 49 /* TP-relative offset, high 16 bits */ #define R_MIPS_TLS_TPREL_LO16 50 /* TP-relative offset, low 16 bits */ #define R_MIPS_GLOB_DAT 51 #define R_MIPS_COPY 126 #define R_MIPS_JUMP_SLOT 127 /* Keep this the last entry. */ #define R_MIPS_NUM 128 /* Legal values for p_type field of Elf32_Phdr. */ #define PT_MIPS_REGINFO 0x70000000 /* Register usage information. */ #define PT_MIPS_RTPROC 0x70000001 /* Runtime procedure table. */ #define PT_MIPS_OPTIONS 0x70000002 #define PT_MIPS_ABIFLAGS 0x70000003 /* FP mode requirement. */ /* Special program header types. */ #define PF_MIPS_LOCAL 0x10000000 /* Legal values for d_tag field of Elf32_Dyn. */ #define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime linker interface version */ #define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */ #define DT_MIPS_ICHECKSUM 0x70000003 /* Checksum */ #define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ #define DT_MIPS_FLAGS 0x70000005 /* Flags */ #define DT_MIPS_BASE_ADDRESS 0x70000006 /* Base address */ #define DT_MIPS_MSYM 0x70000007 #define DT_MIPS_CONFLICT 0x70000008 /* Address of CONFLICT section */ #define DT_MIPS_LIBLIST 0x70000009 /* Address of LIBLIST section */ #define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local GOT entries */ #define DT_MIPS_CONFLICTNO 0x7000000b /* Number of CONFLICT entries */ #define DT_MIPS_LIBLISTNO 0x70000010 /* Number of LIBLIST entries */ #define DT_MIPS_SYMTABNO 0x70000011 /* Number of DYNSYM entries */ #define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */ #define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in DYNSYM */ #define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ #define DT_MIPS_RLD_MAP 0x70000016 /* Address of run time loader map. */ #define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition. */ #define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* Number of entries in DT_MIPS_DELTA_CLASS. */ #define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances. */ #define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a /* Number of entries in DT_MIPS_DELTA_INSTANCE. */ #define DT_MIPS_DELTA_RELOC 0x7000001b /* Delta relocations. */ #define DT_MIPS_DELTA_RELOC_NO 0x7000001c /* Number of entries in DT_MIPS_DELTA_RELOC. */ #define DT_MIPS_DELTA_SYM 0x7000001d /* Delta symbols that Delta relocations refer to. */ #define DT_MIPS_DELTA_SYM_NO 0x7000001e /* Number of entries in DT_MIPS_DELTA_SYM. */ #define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols that hold the class declaration. */ #define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* Number of entries in DT_MIPS_DELTA_CLASSSYM. */ #define DT_MIPS_CXX_FLAGS 0x70000022 /* Flags indicating for C++ flavor. */ #define DT_MIPS_PIXIE_INIT 0x70000023 #define DT_MIPS_SYMBOL_LIB 0x70000024 #define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 #define DT_MIPS_LOCAL_GOTIDX 0x70000026 #define DT_MIPS_HIDDEN_GOTIDX 0x70000027 #define DT_MIPS_PROTECTED_GOTIDX 0x70000028 #define DT_MIPS_OPTIONS 0x70000029 /* Address of .options. */ #define DT_MIPS_INTERFACE 0x7000002a /* Address of .interface. */ #define DT_MIPS_DYNSTR_ALIGN 0x7000002b #define DT_MIPS_INTERFACE_SIZE 0x7000002c /* Size of the .interface section. */ #define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d /* Address of rld_text_rsolve function stored in GOT. */ #define DT_MIPS_PERF_SUFFIX 0x7000002e /* Default suffix of dso to be added by rld on dlopen() calls. */ #define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */ #define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */ #define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */ /* The address of .got.plt in an executable using the new non-PIC ABI. */ #define DT_MIPS_PLTGOT 0x70000032 /* The base of the PLT in an executable using the new non-PIC ABI if that PLT is writable. For a non-writable PLT, this is omitted or has a zero value. */ #define DT_MIPS_RWPLT 0x70000034 /* An alternative description of the classic MIPS RLD_MAP that is usable in a PIE as it stores a relative offset from the address of the tag rather than an absolute address. */ #define DT_MIPS_RLD_MAP_REL 0x70000035 /* GNU-style hash table with xlat. */ #define DT_MIPS_XHASH 0x70000036 #define DT_MIPS_NUM 0x37 /* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */ #define RHF_NONE 0 /* No flags */ #define RHF_QUICKSTART (1 << 0) /* Use quickstart */ #define RHF_NOTPOT (1 << 1) /* Hash size not power of 2 */ #define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) /* Ignore LD_LIBRARY_PATH */ #define RHF_NO_MOVE (1 << 3) #define RHF_SGI_ONLY (1 << 4) #define RHF_GUARANTEE_INIT (1 << 5) #define RHF_DELTA_C_PLUS_PLUS (1 << 6) #define RHF_GUARANTEE_START_INIT (1 << 7) #define RHF_PIXIE (1 << 8) #define RHF_DEFAULT_DELAY_LOAD (1 << 9) #define RHF_REQUICKSTART (1 << 10) #define RHF_REQUICKSTARTED (1 << 11) #define RHF_CORD (1 << 12) #define RHF_NO_UNRES_UNDEF (1 << 13) #define RHF_RLD_ORDER_SAFE (1 << 14) /* Entries found in sections of type SHT_MIPS_LIBLIST. */ typedef struct { Elf32_Word l_name; /* Name (string table index) */ Elf32_Word l_time_stamp; /* Timestamp */ Elf32_Word l_checksum; /* Checksum */ Elf32_Word l_version; /* Interface version */ Elf32_Word l_flags; /* Flags */ } Elf32_Lib; typedef struct { Elf64_Word l_name; /* Name (string table index) */ Elf64_Word l_time_stamp; /* Timestamp */ Elf64_Word l_checksum; /* Checksum */ Elf64_Word l_version; /* Interface version */ Elf64_Word l_flags; /* Flags */ } Elf64_Lib; /* Legal values for l_flags. */ #define LL_NONE 0 #define LL_EXACT_MATCH (1 << 0) /* Require exact match */ #define LL_IGNORE_INT_VER (1 << 1) /* Ignore interface version */ #define LL_REQUIRE_MINOR (1 << 2) #define LL_EXPORTS (1 << 3) #define LL_DELAY_LOAD (1 << 4) #define LL_DELTA (1 << 5) /* Entries found in sections of type SHT_MIPS_CONFLICT. */ typedef Elf32_Addr Elf32_Conflict; typedef struct { /* Version of flags structure. */ Elf32_Half version; /* The level of the ISA: 1-5, 32, 64. */ unsigned char isa_level; /* The revision of ISA: 0 for MIPS V and below, 1-n otherwise. */ unsigned char isa_rev; /* The size of general purpose registers. */ unsigned char gpr_size; /* The size of co-processor 1 registers. */ unsigned char cpr1_size; /* The size of co-processor 2 registers. */ unsigned char cpr2_size; /* The floating-point ABI. */ unsigned char fp_abi; /* Processor-specific extension. */ Elf32_Word isa_ext; /* Mask of ASEs used. */ Elf32_Word ases; /* Mask of general flags. */ Elf32_Word flags1; Elf32_Word flags2; } Elf_MIPS_ABIFlags_v0; /* Values for the register size bytes of an abi flags structure. */ #define MIPS_AFL_REG_NONE 0x00 /* No registers. */ #define MIPS_AFL_REG_32 0x01 /* 32-bit registers. */ #define MIPS_AFL_REG_64 0x02 /* 64-bit registers. */ #define MIPS_AFL_REG_128 0x03 /* 128-bit registers. */ /* Masks for the ases word of an ABI flags structure. */ #define MIPS_AFL_ASE_DSP 0x00000001 /* DSP ASE. */ #define MIPS_AFL_ASE_DSPR2 0x00000002 /* DSP R2 ASE. */ #define MIPS_AFL_ASE_EVA 0x00000004 /* Enhanced VA Scheme. */ #define MIPS_AFL_ASE_MCU 0x00000008 /* MCU (MicroController) ASE. */ #define MIPS_AFL_ASE_MDMX 0x00000010 /* MDMX ASE. */ #define MIPS_AFL_ASE_MIPS3D 0x00000020 /* MIPS-3D ASE. */ #define MIPS_AFL_ASE_MT 0x00000040 /* MT ASE. */ #define MIPS_AFL_ASE_SMARTMIPS 0x00000080 /* SmartMIPS ASE. */ #define MIPS_AFL_ASE_VIRT 0x00000100 /* VZ ASE. */ #define MIPS_AFL_ASE_MSA 0x00000200 /* MSA ASE. */ #define MIPS_AFL_ASE_MIPS16 0x00000400 /* MIPS16 ASE. */ #define MIPS_AFL_ASE_MICROMIPS 0x00000800 /* MICROMIPS ASE. */ #define MIPS_AFL_ASE_XPA 0x00001000 /* XPA ASE. */ #define MIPS_AFL_ASE_MASK 0x00001fff /* All ASEs. */ /* Values for the isa_ext word of an ABI flags structure. */ #define MIPS_AFL_EXT_XLR 1 /* RMI Xlr instruction. */ #define MIPS_AFL_EXT_OCTEON2 2 /* Cavium Networks Octeon2. */ #define MIPS_AFL_EXT_OCTEONP 3 /* Cavium Networks OcteonP. */ #define MIPS_AFL_EXT_LOONGSON_3A 4 /* Loongson 3A. */ #define MIPS_AFL_EXT_OCTEON 5 /* Cavium Networks Octeon. */ #define MIPS_AFL_EXT_5900 6 /* MIPS R5900 instruction. */ #define MIPS_AFL_EXT_4650 7 /* MIPS R4650 instruction. */ #define MIPS_AFL_EXT_4010 8 /* LSI R4010 instruction. */ #define MIPS_AFL_EXT_4100 9 /* NEC VR4100 instruction. */ #define MIPS_AFL_EXT_3900 10 /* Toshiba R3900 instruction. */ #define MIPS_AFL_EXT_10000 11 /* MIPS R10000 instruction. */ #define MIPS_AFL_EXT_SB1 12 /* Broadcom SB-1 instruction. */ #define MIPS_AFL_EXT_4111 13 /* NEC VR4111/VR4181 instruction. */ #define MIPS_AFL_EXT_4120 14 /* NEC VR4120 instruction. */ #define MIPS_AFL_EXT_5400 15 /* NEC VR5400 instruction. */ #define MIPS_AFL_EXT_5500 16 /* NEC VR5500 instruction. */ #define MIPS_AFL_EXT_LOONGSON_2E 17 /* ST Microelectronics Loongson 2E. */ #define MIPS_AFL_EXT_LOONGSON_2F 18 /* ST Microelectronics Loongson 2F. */ /* Masks for the flags1 word of an ABI flags structure. */ #define MIPS_AFL_FLAGS1_ODDSPREG 1 /* Uses odd single-precision registers. */ /* Object attribute values. */ enum { /* Not tagged or not using any ABIs affected by the differences. */ Val_GNU_MIPS_ABI_FP_ANY = 0, /* Using hard-float -mdouble-float. */ Val_GNU_MIPS_ABI_FP_DOUBLE = 1, /* Using hard-float -msingle-float. */ Val_GNU_MIPS_ABI_FP_SINGLE = 2, /* Using soft-float. */ Val_GNU_MIPS_ABI_FP_SOFT = 3, /* Using -mips32r2 -mfp64. */ Val_GNU_MIPS_ABI_FP_OLD_64 = 4, /* Using -mfpxx. */ Val_GNU_MIPS_ABI_FP_XX = 5, /* Using -mips32r2 -mfp64. */ Val_GNU_MIPS_ABI_FP_64 = 6, /* Using -mips32r2 -mfp64 -mno-odd-spreg. */ Val_GNU_MIPS_ABI_FP_64A = 7, /* Maximum allocated FP ABI value. */ Val_GNU_MIPS_ABI_FP_MAX = 7 }; /* HPPA specific definitions. */ /* Legal values for e_flags field of Elf32_Ehdr. */ #define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */ #define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */ #define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */ #define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */ #define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch prediction. */ #define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */ #define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */ /* Defined values for `e_flags & EF_PARISC_ARCH' are: */ #define EFA_PARISC_1_0 0x020b /* PA-RISC 1.0 big-endian. */ #define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */ #define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */ /* Additional section indeces. */ #define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared symbols in ANSI C. */ #define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */ /* Legal values for sh_type field of Elf32_Shdr. */ #define SHT_PARISC_EXT 0x70000000 /* Contains product specific ext. */ #define SHT_PARISC_UNWIND 0x70000001 /* Unwind information. */ #define SHT_PARISC_DOC 0x70000002 /* Debug info for optimized code. */ /* Legal values for sh_flags field of Elf32_Shdr. */ #define SHF_PARISC_SHORT 0x20000000 /* Section with short addressing. */ #define SHF_PARISC_HUGE 0x40000000 /* Section far from gp. */ #define SHF_PARISC_SBP 0x80000000 /* Static branch prediction code. */ /* Legal values for ST_TYPE subfield of st_info (symbol type). */ #define STT_PARISC_MILLICODE 13 /* Millicode function entry point. */ #define STT_HP_OPAQUE (STT_LOOS + 0x1) #define STT_HP_STUB (STT_LOOS + 0x2) /* HPPA relocs. */ #define R_PARISC_NONE 0 /* No reloc. */ #define R_PARISC_DIR32 1 /* Direct 32-bit reference. */ #define R_PARISC_DIR21L 2 /* Left 21 bits of eff. address. */ #define R_PARISC_DIR17R 3 /* Right 17 bits of eff. address. */ #define R_PARISC_DIR17F 4 /* 17 bits of eff. address. */ #define R_PARISC_DIR14R 6 /* Right 14 bits of eff. address. */ #define R_PARISC_PCREL32 9 /* 32-bit rel. address. */ #define R_PARISC_PCREL21L 10 /* Left 21 bits of rel. address. */ #define R_PARISC_PCREL17R 11 /* Right 17 bits of rel. address. */ #define R_PARISC_PCREL17F 12 /* 17 bits of rel. address. */ #define R_PARISC_PCREL14R 14 /* Right 14 bits of rel. address. */ #define R_PARISC_DPREL21L 18 /* Left 21 bits of rel. address. */ #define R_PARISC_DPREL14R 22 /* Right 14 bits of rel. address. */ #define R_PARISC_GPREL21L 26 /* GP-relative, left 21 bits. */ #define R_PARISC_GPREL14R 30 /* GP-relative, right 14 bits. */ #define R_PARISC_LTOFF21L 34 /* LT-relative, left 21 bits. */ #define R_PARISC_LTOFF14R 38 /* LT-relative, right 14 bits. */ #define R_PARISC_SECREL32 41 /* 32 bits section rel. address. */ #define R_PARISC_SEGBASE 48 /* No relocation, set segment base. */ #define R_PARISC_SEGREL32 49 /* 32 bits segment rel. address. */ #define R_PARISC_PLTOFF21L 50 /* PLT rel. address, left 21 bits. */ #define R_PARISC_PLTOFF14R 54 /* PLT rel. address, right 14 bits. */ #define R_PARISC_LTOFF_FPTR32 57 /* 32 bits LT-rel. function pointer. */ #define R_PARISC_LTOFF_FPTR21L 58 /* LT-rel. fct ptr, left 21 bits. */ #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */ #define R_PARISC_FPTR64 64 /* 64 bits function address. */ #define R_PARISC_PLABEL32 65 /* 32 bits function address. */ #define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */ #define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */ #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */ #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */ #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */ #define R_PARISC_PCREL14DR 76 /* PC rel. address, right 14 bits. */ #define R_PARISC_PCREL16F 77 /* 16 bits PC-rel. address. */ #define R_PARISC_PCREL16WF 78 /* 16 bits PC-rel. address. */ #define R_PARISC_PCREL16DF 79 /* 16 bits PC-rel. address. */ #define R_PARISC_DIR64 80 /* 64 bits of eff. address. */ #define R_PARISC_DIR14WR 83 /* 14 bits of eff. address. */ #define R_PARISC_DIR14DR 84 /* 14 bits of eff. address. */ #define R_PARISC_DIR16F 85 /* 16 bits of eff. address. */ #define R_PARISC_DIR16WF 86 /* 16 bits of eff. address. */ #define R_PARISC_DIR16DF 87 /* 16 bits of eff. address. */ #define R_PARISC_GPREL64 88 /* 64 bits of GP-rel. address. */ #define R_PARISC_GPREL14WR 91 /* GP-rel. address, right 14 bits. */ #define R_PARISC_GPREL14DR 92 /* GP-rel. address, right 14 bits. */ #define R_PARISC_GPREL16F 93 /* 16 bits GP-rel. address. */ #define R_PARISC_GPREL16WF 94 /* 16 bits GP-rel. address. */ #define R_PARISC_GPREL16DF 95 /* 16 bits GP-rel. address. */ #define R_PARISC_LTOFF64 96 /* 64 bits LT-rel. address. */ #define R_PARISC_LTOFF14WR 99 /* LT-rel. address, right 14 bits. */ #define R_PARISC_LTOFF14DR 100 /* LT-rel. address, right 14 bits. */ #define R_PARISC_LTOFF16F 101 /* 16 bits LT-rel. address. */ #define R_PARISC_LTOFF16WF 102 /* 16 bits LT-rel. address. */ #define R_PARISC_LTOFF16DF 103 /* 16 bits LT-rel. address. */ #define R_PARISC_SECREL64 104 /* 64 bits section rel. address. */ #define R_PARISC_SEGREL64 112 /* 64 bits segment rel. address. */ #define R_PARISC_PLTOFF14WR 115 /* PLT-rel. address, right 14 bits. */ #define R_PARISC_PLTOFF14DR 116 /* PLT-rel. address, right 14 bits. */ #define R_PARISC_PLTOFF16F 117 /* 16 bits LT-rel. address. */ #define R_PARISC_PLTOFF16WF 118 /* 16 bits PLT-rel. address. */ #define R_PARISC_PLTOFF16DF 119 /* 16 bits PLT-rel. address. */ #define R_PARISC_LTOFF_FPTR64 120 /* 64 bits LT-rel. function ptr. */ #define R_PARISC_LTOFF_FPTR14WR 123 /* LT-rel. fct. ptr., right 14 bits. */ #define R_PARISC_LTOFF_FPTR14DR 124 /* LT-rel. fct. ptr., right 14 bits. */ #define R_PARISC_LTOFF_FPTR16F 125 /* 16 bits LT-rel. function ptr. */ #define R_PARISC_LTOFF_FPTR16WF 126 /* 16 bits LT-rel. function ptr. */ #define R_PARISC_LTOFF_FPTR16DF 127 /* 16 bits LT-rel. function ptr. */ #define R_PARISC_LORESERVE 128 #define R_PARISC_COPY 128 /* Copy relocation. */ #define R_PARISC_IPLT 129 /* Dynamic reloc, imported PLT */ #define R_PARISC_EPLT 130 /* Dynamic reloc, exported PLT */ #define R_PARISC_TPREL32 153 /* 32 bits TP-rel. address. */ #define R_PARISC_TPREL21L 154 /* TP-rel. address, left 21 bits. */ #define R_PARISC_TPREL14R 158 /* TP-rel. address, right 14 bits. */ #define R_PARISC_LTOFF_TP21L 162 /* LT-TP-rel. address, left 21 bits. */ #define R_PARISC_LTOFF_TP14R 166 /* LT-TP-rel. address, right 14 bits.*/ #define R_PARISC_LTOFF_TP14F 167 /* 14 bits LT-TP-rel. address. */ #define R_PARISC_TPREL64 216 /* 64 bits TP-rel. address. */ #define R_PARISC_TPREL14WR 219 /* TP-rel. address, right 14 bits. */ #define R_PARISC_TPREL14DR 220 /* TP-rel. address, right 14 bits. */ #define R_PARISC_TPREL16F 221 /* 16 bits TP-rel. address. */ #define R_PARISC_TPREL16WF 222 /* 16 bits TP-rel. address. */ #define R_PARISC_TPREL16DF 223 /* 16 bits TP-rel. address. */ #define R_PARISC_LTOFF_TP64 224 /* 64 bits LT-TP-rel. address. */ #define R_PARISC_LTOFF_TP14WR 227 /* LT-TP-rel. address, right 14 bits.*/ #define R_PARISC_LTOFF_TP14DR 228 /* LT-TP-rel. address, right 14 bits.*/ #define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */ #define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */ #define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */ #define R_PARISC_GNU_VTENTRY 232 #define R_PARISC_GNU_VTINHERIT 233 #define R_PARISC_TLS_GD21L 234 /* GD 21-bit left. */ #define R_PARISC_TLS_GD14R 235 /* GD 14-bit right. */ #define R_PARISC_TLS_GDCALL 236 /* GD call to __t_g_a. */ #define R_PARISC_TLS_LDM21L 237 /* LD module 21-bit left. */ #define R_PARISC_TLS_LDM14R 238 /* LD module 14-bit right. */ #define R_PARISC_TLS_LDMCALL 239 /* LD module call to __t_g_a. */ #define R_PARISC_TLS_LDO21L 240 /* LD offset 21-bit left. */ #define R_PARISC_TLS_LDO14R 241 /* LD offset 14-bit right. */ #define R_PARISC_TLS_DTPMOD32 242 /* DTP module 32-bit. */ #define R_PARISC_TLS_DTPMOD64 243 /* DTP module 64-bit. */ #define R_PARISC_TLS_DTPOFF32 244 /* DTP offset 32-bit. */ #define R_PARISC_TLS_DTPOFF64 245 /* DTP offset 32-bit. */ #define R_PARISC_TLS_LE21L R_PARISC_TPREL21L #define R_PARISC_TLS_LE14R R_PARISC_TPREL14R #define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L #define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R #define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32 #define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64 #define R_PARISC_HIRESERVE 255 /* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */ #define PT_HP_TLS (PT_LOOS + 0x0) #define PT_HP_CORE_NONE (PT_LOOS + 0x1) #define PT_HP_CORE_VERSION (PT_LOOS + 0x2) #define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) #define PT_HP_CORE_COMM (PT_LOOS + 0x4) #define PT_HP_CORE_PROC (PT_LOOS + 0x5) #define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) #define PT_HP_CORE_STACK (PT_LOOS + 0x7) #define PT_HP_CORE_SHM (PT_LOOS + 0x8) #define PT_HP_CORE_MMF (PT_LOOS + 0x9) #define PT_HP_PARALLEL (PT_LOOS + 0x10) #define PT_HP_FASTBIND (PT_LOOS + 0x11) #define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) #define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) #define PT_HP_STACK (PT_LOOS + 0x14) #define PT_PARISC_ARCHEXT 0x70000000 #define PT_PARISC_UNWIND 0x70000001 /* Legal values for p_flags field of Elf32_Phdr/Elf64_Phdr. */ #define PF_PARISC_SBP 0x08000000 #define PF_HP_PAGE_SIZE 0x00100000 #define PF_HP_FAR_SHARED 0x00200000 #define PF_HP_NEAR_SHARED 0x00400000 #define PF_HP_CODE 0x01000000 #define PF_HP_MODIFY 0x02000000 #define PF_HP_LAZYSWAP 0x04000000 #define PF_HP_SBP 0x08000000 /* Alpha specific definitions. */ /* Legal values for e_flags field of Elf64_Ehdr. */ #define EF_ALPHA_32BIT 1 /* All addresses must be < 2GB. */ #define EF_ALPHA_CANRELAX 2 /* Relocations for relaxing exist. */ /* Legal values for sh_type field of Elf64_Shdr. */ /* These two are primerily concerned with ECOFF debugging info. */ #define SHT_ALPHA_DEBUG 0x70000001 #define SHT_ALPHA_REGINFO 0x70000002 /* Legal values for sh_flags field of Elf64_Shdr. */ #define SHF_ALPHA_GPREL 0x10000000 /* Legal values for st_other field of Elf64_Sym. */ #define STO_ALPHA_NOPV 0x80 /* No PV required. */ #define STO_ALPHA_STD_GPLOAD 0x88 /* PV only used for initial ldgp. */ /* Alpha relocs. */ #define R_ALPHA_NONE 0 /* No reloc */ #define R_ALPHA_REFLONG 1 /* Direct 32 bit */ #define R_ALPHA_REFQUAD 2 /* Direct 64 bit */ #define R_ALPHA_GPREL32 3 /* GP relative 32 bit */ #define R_ALPHA_LITERAL 4 /* GP relative 16 bit w/optimization */ #define R_ALPHA_LITUSE 5 /* Optimization hint for LITERAL */ #define R_ALPHA_GPDISP 6 /* Add displacement to GP */ #define R_ALPHA_BRADDR 7 /* PC+4 relative 23 bit shifted */ #define R_ALPHA_HINT 8 /* PC+4 relative 16 bit shifted */ #define R_ALPHA_SREL16 9 /* PC relative 16 bit */ #define R_ALPHA_SREL32 10 /* PC relative 32 bit */ #define R_ALPHA_SREL64 11 /* PC relative 64 bit */ #define R_ALPHA_GPRELHIGH 17 /* GP relative 32 bit, high 16 bits */ #define R_ALPHA_GPRELLOW 18 /* GP relative 32 bit, low 16 bits */ #define R_ALPHA_GPREL16 19 /* GP relative 16 bit */ #define R_ALPHA_COPY 24 /* Copy symbol at runtime */ #define R_ALPHA_GLOB_DAT 25 /* Create GOT entry */ #define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */ #define R_ALPHA_RELATIVE 27 /* Adjust by program base */ #define R_ALPHA_TLS_GD_HI 28 #define R_ALPHA_TLSGD 29 #define R_ALPHA_TLS_LDM 30 #define R_ALPHA_DTPMOD64 31 #define R_ALPHA_GOTDTPREL 32 #define R_ALPHA_DTPREL64 33 #define R_ALPHA_DTPRELHI 34 #define R_ALPHA_DTPRELLO 35 #define R_ALPHA_DTPREL16 36 #define R_ALPHA_GOTTPREL 37 #define R_ALPHA_TPREL64 38 #define R_ALPHA_TPRELHI 39 #define R_ALPHA_TPRELLO 40 #define R_ALPHA_TPREL16 41 /* Keep this the last entry. */ #define R_ALPHA_NUM 46 /* Magic values of the LITUSE relocation addend. */ #define LITUSE_ALPHA_ADDR 0 #define LITUSE_ALPHA_BASE 1 #define LITUSE_ALPHA_BYTOFF 2 #define LITUSE_ALPHA_JSR 3 #define LITUSE_ALPHA_TLS_GD 4 #define LITUSE_ALPHA_TLS_LDM 5 /* Legal values for d_tag of Elf64_Dyn. */ #define DT_ALPHA_PLTRO (DT_LOPROC + 0) #define DT_ALPHA_NUM 1 /* PowerPC specific declarations */ /* Values for Elf32/64_Ehdr.e_flags. */ #define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */ /* Cygnus local bits below */ #define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag*/ #define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */ /* PowerPC relocations defined by the ABIs */ #define R_PPC_NONE 0 #define R_PPC_ADDR32 1 /* 32bit absolute address */ #define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ #define R_PPC_ADDR16 3 /* 16bit absolute address */ #define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ #define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ #define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ #define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ #define R_PPC_ADDR14_BRTAKEN 8 #define R_PPC_ADDR14_BRNTAKEN 9 #define R_PPC_REL24 10 /* PC relative 26 bit */ #define R_PPC_REL14 11 /* PC relative 16 bit */ #define R_PPC_REL14_BRTAKEN 12 #define R_PPC_REL14_BRNTAKEN 13 #define R_PPC_GOT16 14 #define R_PPC_GOT16_LO 15 #define R_PPC_GOT16_HI 16 #define R_PPC_GOT16_HA 17 #define R_PPC_PLTREL24 18 #define R_PPC_COPY 19 #define R_PPC_GLOB_DAT 20 #define R_PPC_JMP_SLOT 21 #define R_PPC_RELATIVE 22 #define R_PPC_LOCAL24PC 23 #define R_PPC_UADDR32 24 #define R_PPC_UADDR16 25 #define R_PPC_REL32 26 #define R_PPC_PLT32 27 #define R_PPC_PLTREL32 28 #define R_PPC_PLT16_LO 29 #define R_PPC_PLT16_HI 30 #define R_PPC_PLT16_HA 31 #define R_PPC_SDAREL16 32 #define R_PPC_SECTOFF 33 #define R_PPC_SECTOFF_LO 34 #define R_PPC_SECTOFF_HI 35 #define R_PPC_SECTOFF_HA 36 /* PowerPC relocations defined for the TLS access ABI. */ #define R_PPC_TLS 67 /* none (sym+add)@tls */ #define R_PPC_DTPMOD32 68 /* word32 (sym+add)@dtpmod */ #define R_PPC_TPREL16 69 /* half16* (sym+add)@tprel */ #define R_PPC_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ #define R_PPC_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ #define R_PPC_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ #define R_PPC_TPREL32 73 /* word32 (sym+add)@tprel */ #define R_PPC_DTPREL16 74 /* half16* (sym+add)@dtprel */ #define R_PPC_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ #define R_PPC_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ #define R_PPC_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ #define R_PPC_DTPREL32 78 /* word32 (sym+add)@dtprel */ #define R_PPC_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ #define R_PPC_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ #define R_PPC_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ #define R_PPC_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ #define R_PPC_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ #define R_PPC_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ #define R_PPC_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ #define R_PPC_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ #define R_PPC_GOT_TPREL16 87 /* half16* (sym+add)@got@tprel */ #define R_PPC_GOT_TPREL16_LO 88 /* half16 (sym+add)@got@tprel@l */ #define R_PPC_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ #define R_PPC_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ #define R_PPC_GOT_DTPREL16 91 /* half16* (sym+add)@got@dtprel */ #define R_PPC_GOT_DTPREL16_LO 92 /* half16* (sym+add)@got@dtprel@l */ #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */ #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */ #define R_PPC_TLSGD 95 /* none (sym+add)@tlsgd */ #define R_PPC_TLSLD 96 /* none (sym+add)@tlsld */ /* The remaining relocs are from the Embedded ELF ABI, and are not in the SVR4 ELF ABI. */ #define R_PPC_EMB_NADDR32 101 #define R_PPC_EMB_NADDR16 102 #define R_PPC_EMB_NADDR16_LO 103 #define R_PPC_EMB_NADDR16_HI 104 #define R_PPC_EMB_NADDR16_HA 105 #define R_PPC_EMB_SDAI16 106 #define R_PPC_EMB_SDA2I16 107 #define R_PPC_EMB_SDA2REL 108 #define R_PPC_EMB_SDA21 109 /* 16 bit offset in SDA */ #define R_PPC_EMB_MRKREF 110 #define R_PPC_EMB_RELSEC16 111 #define R_PPC_EMB_RELST_LO 112 #define R_PPC_EMB_RELST_HI 113 #define R_PPC_EMB_RELST_HA 114 #define R_PPC_EMB_BIT_FLD 115 #define R_PPC_EMB_RELSDA 116 /* 16 bit relative offset in SDA */ /* Diab tool relocations. */ #define R_PPC_DIAB_SDA21_LO 180 /* like EMB_SDA21, but lower 16 bit */ #define R_PPC_DIAB_SDA21_HI 181 /* like EMB_SDA21, but high 16 bit */ #define R_PPC_DIAB_SDA21_HA 182 /* like EMB_SDA21, adjusted high 16 */ #define R_PPC_DIAB_RELSDA_LO 183 /* like EMB_RELSDA, but lower 16 bit */ #define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */ #define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */ /* GNU extension to support local ifunc. */ #define R_PPC_IRELATIVE 248 /* GNU relocs used in PIC code sequences. */ #define R_PPC_REL16 249 /* half16 (sym+add-.) */ #define R_PPC_REL16_LO 250 /* half16 (sym+add-.)@l */ #define R_PPC_REL16_HI 251 /* half16 (sym+add-.)@h */ #define R_PPC_REL16_HA 252 /* half16 (sym+add-.)@ha */ /* This is a phony reloc to handle any old fashioned TOC16 references that may still be in object files. */ #define R_PPC_TOC16 255 /* PowerPC specific values for the Dyn d_tag field. */ #define DT_PPC_GOT (DT_LOPROC + 0) #define DT_PPC_OPT (DT_LOPROC + 1) #define DT_PPC_NUM 2 /* PowerPC specific values for the DT_PPC_OPT Dyn entry. */ #define PPC_OPT_TLS 1 /* PowerPC64 relocations defined by the ABIs */ #define R_PPC64_NONE R_PPC_NONE #define R_PPC64_ADDR32 R_PPC_ADDR32 /* 32bit absolute address */ #define R_PPC64_ADDR24 R_PPC_ADDR24 /* 26bit address, word aligned */ #define R_PPC64_ADDR16 R_PPC_ADDR16 /* 16bit absolute address */ #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of address */ #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of address. */ #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits. */ #define R_PPC64_ADDR14 R_PPC_ADDR14 /* 16bit address, word aligned */ #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN #define R_PPC64_REL24 R_PPC_REL24 /* PC-rel. 26 bit, word aligned */ #define R_PPC64_REL14 R_PPC_REL14 /* PC relative 16 bit */ #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN #define R_PPC64_GOT16 R_PPC_GOT16 #define R_PPC64_GOT16_LO R_PPC_GOT16_LO #define R_PPC64_GOT16_HI R_PPC_GOT16_HI #define R_PPC64_GOT16_HA R_PPC_GOT16_HA #define R_PPC64_COPY R_PPC_COPY #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT #define R_PPC64_RELATIVE R_PPC_RELATIVE #define R_PPC64_UADDR32 R_PPC_UADDR32 #define R_PPC64_UADDR16 R_PPC_UADDR16 #define R_PPC64_REL32 R_PPC_REL32 #define R_PPC64_PLT32 R_PPC_PLT32 #define R_PPC64_PLTREL32 R_PPC_PLTREL32 #define R_PPC64_PLT16_LO R_PPC_PLT16_LO #define R_PPC64_PLT16_HI R_PPC_PLT16_HI #define R_PPC64_PLT16_HA R_PPC_PLT16_HA #define R_PPC64_SECTOFF R_PPC_SECTOFF #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA #define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2 */ #define R_PPC64_ADDR64 38 /* doubleword64 S + A */ #define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A) */ #define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A) */ #define R_PPC64_ADDR16_HIGHEST 41 /* half16 #highest(S + A) */ #define R_PPC64_ADDR16_HIGHESTA 42 /* half16 #highesta(S + A) */ #define R_PPC64_UADDR64 43 /* doubleword64 S + A */ #define R_PPC64_REL64 44 /* doubleword64 S + A - P */ #define R_PPC64_PLT64 45 /* doubleword64 L + A */ #define R_PPC64_PLTREL64 46 /* doubleword64 L + A - P */ #define R_PPC64_TOC16 47 /* half16* S + A - .TOC */ #define R_PPC64_TOC16_LO 48 /* half16 #lo(S + A - .TOC.) */ #define R_PPC64_TOC16_HI 49 /* half16 #hi(S + A - .TOC.) */ #define R_PPC64_TOC16_HA 50 /* half16 #ha(S + A - .TOC.) */ #define R_PPC64_TOC 51 /* doubleword64 .TOC */ #define R_PPC64_PLTGOT16 52 /* half16* M + A */ #define R_PPC64_PLTGOT16_LO 53 /* half16 #lo(M + A) */ #define R_PPC64_PLTGOT16_HI 54 /* half16 #hi(M + A) */ #define R_PPC64_PLTGOT16_HA 55 /* half16 #ha(M + A) */ #define R_PPC64_ADDR16_DS 56 /* half16ds* (S + A) >> 2 */ #define R_PPC64_ADDR16_LO_DS 57 /* half16ds #lo(S + A) >> 2 */ #define R_PPC64_GOT16_DS 58 /* half16ds* (G + A) >> 2 */ #define R_PPC64_GOT16_LO_DS 59 /* half16ds #lo(G + A) >> 2 */ #define R_PPC64_PLT16_LO_DS 60 /* half16ds #lo(L + A) >> 2 */ #define R_PPC64_SECTOFF_DS 61 /* half16ds* (R + A) >> 2 */ #define R_PPC64_SECTOFF_LO_DS 62 /* half16ds #lo(R + A) >> 2 */ #define R_PPC64_TOC16_DS 63 /* half16ds* (S + A - .TOC.) >> 2 */ #define R_PPC64_TOC16_LO_DS 64 /* half16ds #lo(S + A - .TOC.) >> 2 */ #define R_PPC64_PLTGOT16_DS 65 /* half16ds* (M + A) >> 2 */ #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds #lo(M + A) >> 2 */ /* PowerPC64 relocations defined for the TLS access ABI. */ #define R_PPC64_TLS 67 /* none (sym+add)@tls */ #define R_PPC64_DTPMOD64 68 /* doubleword64 (sym+add)@dtpmod */ #define R_PPC64_TPREL16 69 /* half16* (sym+add)@tprel */ #define R_PPC64_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ #define R_PPC64_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ #define R_PPC64_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ #define R_PPC64_TPREL64 73 /* doubleword64 (sym+add)@tprel */ #define R_PPC64_DTPREL16 74 /* half16* (sym+add)@dtprel */ #define R_PPC64_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ #define R_PPC64_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ #define R_PPC64_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ #define R_PPC64_DTPREL64 78 /* doubleword64 (sym+add)@dtprel */ #define R_PPC64_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ #define R_PPC64_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ #define R_PPC64_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ #define R_PPC64_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ #define R_PPC64_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ #define R_PPC64_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ #define R_PPC64_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ #define R_PPC64_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ #define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */ #define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */ #define R_PPC64_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ #define R_PPC64_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ #define R_PPC64_GOT_DTPREL16_DS 91 /* half16ds* (sym+add)@got@dtprel */ #define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */ #define R_PPC64_GOT_DTPREL16_HI 93 /* half16 (sym+add)@got@dtprel@h */ #define R_PPC64_GOT_DTPREL16_HA 94 /* half16 (sym+add)@got@dtprel@ha */ #define R_PPC64_TPREL16_DS 95 /* half16ds* (sym+add)@tprel */ #define R_PPC64_TPREL16_LO_DS 96 /* half16ds (sym+add)@tprel@l */ #define R_PPC64_TPREL16_HIGHER 97 /* half16 (sym+add)@tprel@higher */ #define R_PPC64_TPREL16_HIGHERA 98 /* half16 (sym+add)@tprel@highera */ #define R_PPC64_TPREL16_HIGHEST 99 /* half16 (sym+add)@tprel@highest */ #define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */ #define R_PPC64_DTPREL16_DS 101 /* half16ds* (sym+add)@dtprel */ #define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */ #define R_PPC64_DTPREL16_HIGHER 103 /* half16 (sym+add)@dtprel@higher */ #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ #define R_PPC64_TLSGD 107 /* none (sym+add)@tlsgd */ #define R_PPC64_TLSLD 108 /* none (sym+add)@tlsld */ #define R_PPC64_TOCSAVE 109 /* none */ /* Added when HA and HI relocs were changed to report overflows. */ #define R_PPC64_ADDR16_HIGH 110 #define R_PPC64_ADDR16_HIGHA 111 #define R_PPC64_TPREL16_HIGH 112 #define R_PPC64_TPREL16_HIGHA 113 #define R_PPC64_DTPREL16_HIGH 114 #define R_PPC64_DTPREL16_HIGHA 115 /* GNU extension to support local ifunc. */ #define R_PPC64_JMP_IREL 247 #define R_PPC64_IRELATIVE 248 #define R_PPC64_REL16 249 /* half16 (sym+add-.) */ #define R_PPC64_REL16_LO 250 /* half16 (sym+add-.)@l */ #define R_PPC64_REL16_HI 251 /* half16 (sym+add-.)@h */ #define R_PPC64_REL16_HA 252 /* half16 (sym+add-.)@ha */ /* e_flags bits specifying ABI. 1 for original function descriptor using ABI, 2 for revised ABI without function descriptors, 0 for unspecified or not using any features affected by the differences. */ #define EF_PPC64_ABI 3 /* PowerPC64 specific values for the Dyn d_tag field. */ #define DT_PPC64_GLINK (DT_LOPROC + 0) #define DT_PPC64_OPD (DT_LOPROC + 1) #define DT_PPC64_OPDSZ (DT_LOPROC + 2) #define DT_PPC64_OPT (DT_LOPROC + 3) #define DT_PPC64_NUM 4 /* PowerPC64 specific bits in the DT_PPC64_OPT Dyn entry. */ #define PPC64_OPT_TLS 1 #define PPC64_OPT_MULTI_TOC 2 #define PPC64_OPT_LOCALENTRY 4 /* PowerPC64 specific values for the Elf64_Sym st_other field. */ #define STO_PPC64_LOCAL_BIT 5 #define STO_PPC64_LOCAL_MASK (7 << STO_PPC64_LOCAL_BIT) #define PPC64_LOCAL_ENTRY_OFFSET(other) \ (((1 << (((other) & STO_PPC64_LOCAL_MASK) >> STO_PPC64_LOCAL_BIT)) >> 2) << 2) /* ARM specific declarations */ /* Processor specific flags for the ELF header e_flags field. */ #define EF_ARM_RELEXEC 0x01 #define EF_ARM_HASENTRY 0x02 #define EF_ARM_INTERWORK 0x04 #define EF_ARM_APCS_26 0x08 #define EF_ARM_APCS_FLOAT 0x10 #define EF_ARM_PIC 0x20 #define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use */ #define EF_ARM_NEW_ABI 0x80 #define EF_ARM_OLD_ABI 0x100 #define EF_ARM_SOFT_FLOAT 0x200 #define EF_ARM_VFP_FLOAT 0x400 #define EF_ARM_MAVERICK_FLOAT 0x800 #define EF_ARM_ABI_FLOAT_SOFT 0x200 /* NB conflicts with EF_ARM_SOFT_FLOAT */ #define EF_ARM_ABI_FLOAT_HARD 0x400 /* NB conflicts with EF_ARM_VFP_FLOAT */ /* Other constants defined in the ARM ELF spec. version B-01. */ /* NB. These conflict with values defined above. */ #define EF_ARM_SYMSARESORTED 0x04 #define EF_ARM_DYNSYMSUSESEGIDX 0x08 #define EF_ARM_MAPSYMSFIRST 0x10 #define EF_ARM_EABIMASK 0XFF000000 /* Constants defined in AAELF. */ #define EF_ARM_BE8 0x00800000 #define EF_ARM_LE8 0x00400000 #define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) #define EF_ARM_EABI_UNKNOWN 0x00000000 #define EF_ARM_EABI_VER1 0x01000000 #define EF_ARM_EABI_VER2 0x02000000 #define EF_ARM_EABI_VER3 0x03000000 #define EF_ARM_EABI_VER4 0x04000000 #define EF_ARM_EABI_VER5 0x05000000 /* Additional symbol types for Thumb. */ #define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ /* ARM-specific values for sh_flags */ #define SHF_ARM_ENTRYSECT 0x10000000 /* Section contains an entry point */ #define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ /* ARM-specific program header flags */ #define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */ #define PF_ARM_PI 0x20000000 /* Position-independent segment. */ #define PF_ARM_ABS 0x40000000 /* Absolute segment. */ /* Processor specific values for the Phdr p_type field. */ #define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */ /* Processor specific values for the Shdr sh_type field. */ #define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */ #define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */ #define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */ /* AArch64 relocs. */ #define R_AARCH64_NONE 0 /* No relocation. */ /* ILP32 AArch64 relocs. */ #define R_AARCH64_P32_ABS32 1 /* Direct 32 bit. */ #define R_AARCH64_P32_COPY 180 /* Copy symbol at runtime. */ #define R_AARCH64_P32_GLOB_DAT 181 /* Create GOT entry. */ #define R_AARCH64_P32_JUMP_SLOT 182 /* Create PLT entry. */ #define R_AARCH64_P32_RELATIVE 183 /* Adjust by program base. */ #define R_AARCH64_P32_TLS_DTPMOD 184 /* Module number, 32 bit. */ #define R_AARCH64_P32_TLS_DTPREL 185 /* Module-relative offset, 32 bit. */ #define R_AARCH64_P32_TLS_TPREL 186 /* TP-relative offset, 32 bit. */ #define R_AARCH64_P32_TLSDESC 187 /* TLS Descriptor. */ #define R_AARCH64_P32_IRELATIVE 188 /* STT_GNU_IFUNC relocation. */ /* LP64 AArch64 relocs. */ #define R_AARCH64_ABS64 257 /* Direct 64 bit. */ #define R_AARCH64_ABS32 258 /* Direct 32 bit. */ #define R_AARCH64_ABS16 259 /* Direct 16-bit. */ #define R_AARCH64_PREL64 260 /* PC-relative 64-bit. */ #define R_AARCH64_PREL32 261 /* PC-relative 32-bit. */ #define R_AARCH64_PREL16 262 /* PC-relative 16-bit. */ #define R_AARCH64_MOVW_UABS_G0 263 /* Dir. MOVZ imm. from bits 15:0. */ #define R_AARCH64_MOVW_UABS_G0_NC 264 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_UABS_G1 265 /* Dir. MOVZ imm. from bits 31:16. */ #define R_AARCH64_MOVW_UABS_G1_NC 266 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_UABS_G2 267 /* Dir. MOVZ imm. from bits 47:32. */ #define R_AARCH64_MOVW_UABS_G2_NC 268 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_UABS_G3 269 /* Dir. MOV{K,Z} imm. from 63:48. */ #define R_AARCH64_MOVW_SABS_G0 270 /* Dir. MOV{N,Z} imm. from 15:0. */ #define R_AARCH64_MOVW_SABS_G1 271 /* Dir. MOV{N,Z} imm. from 31:16. */ #define R_AARCH64_MOVW_SABS_G2 272 /* Dir. MOV{N,Z} imm. from 47:32. */ #define R_AARCH64_LD_PREL_LO19 273 /* PC-rel. LD imm. from bits 20:2. */ #define R_AARCH64_ADR_PREL_LO21 274 /* PC-rel. ADR imm. from bits 20:0. */ #define R_AARCH64_ADR_PREL_PG_HI21 275 /* Page-rel. ADRP imm. from 32:12. */ #define R_AARCH64_ADR_PREL_PG_HI21_NC 276 /* Likewise; no overflow check. */ #define R_AARCH64_ADD_ABS_LO12_NC 277 /* Dir. ADD imm. from bits 11:0. */ #define R_AARCH64_LDST8_ABS_LO12_NC 278 /* Likewise for LD/ST; no check. */ #define R_AARCH64_TSTBR14 279 /* PC-rel. TBZ/TBNZ imm. from 15:2. */ #define R_AARCH64_CONDBR19 280 /* PC-rel. cond. br. imm. from 20:2. */ #define R_AARCH64_JUMP26 282 /* PC-rel. B imm. from bits 27:2. */ #define R_AARCH64_CALL26 283 /* Likewise for CALL. */ #define R_AARCH64_LDST16_ABS_LO12_NC 284 /* Dir. ADD imm. from bits 11:1. */ #define R_AARCH64_LDST32_ABS_LO12_NC 285 /* Likewise for bits 11:2. */ #define R_AARCH64_LDST64_ABS_LO12_NC 286 /* Likewise for bits 11:3. */ #define R_AARCH64_MOVW_PREL_G0 287 /* PC-rel. MOV{N,Z} imm. from 15:0. */ #define R_AARCH64_MOVW_PREL_G0_NC 288 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_PREL_G1 289 /* PC-rel. MOV{N,Z} imm. from 31:16. */ #define R_AARCH64_MOVW_PREL_G1_NC 290 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_PREL_G2 291 /* PC-rel. MOV{N,Z} imm. from 47:32. */ #define R_AARCH64_MOVW_PREL_G2_NC 292 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_PREL_G3 293 /* PC-rel. MOV{N,Z} imm. from 63:48. */ #define R_AARCH64_LDST128_ABS_LO12_NC 299 /* Dir. ADD imm. from bits 11:4. */ #define R_AARCH64_MOVW_GOTOFF_G0 300 /* GOT-rel. off. MOV{N,Z} imm. 15:0. */ #define R_AARCH64_MOVW_GOTOFF_G0_NC 301 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_GOTOFF_G1 302 /* GOT-rel. o. MOV{N,Z} imm. 31:16. */ #define R_AARCH64_MOVW_GOTOFF_G1_NC 303 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_GOTOFF_G2 304 /* GOT-rel. o. MOV{N,Z} imm. 47:32. */ #define R_AARCH64_MOVW_GOTOFF_G2_NC 305 /* Likewise for MOVK; no check. */ #define R_AARCH64_MOVW_GOTOFF_G3 306 /* GOT-rel. o. MOV{N,Z} imm. 63:48. */ #define R_AARCH64_GOTREL64 307 /* GOT-relative 64-bit. */ #define R_AARCH64_GOTREL32 308 /* GOT-relative 32-bit. */ #define R_AARCH64_GOT_LD_PREL19 309 /* PC-rel. GOT off. load imm. 20:2. */ #define R_AARCH64_LD64_GOTOFF_LO15 310 /* GOT-rel. off. LD/ST imm. 14:3. */ #define R_AARCH64_ADR_GOT_PAGE 311 /* P-page-rel. GOT off. ADRP 32:12. */ #define R_AARCH64_LD64_GOT_LO12_NC 312 /* Dir. GOT off. LD/ST imm. 11:3. */ #define R_AARCH64_LD64_GOTPAGE_LO15 313 /* GOT-page-rel. GOT off. LD/ST 14:3 */ #define R_AARCH64_TLSGD_ADR_PREL21 512 /* PC-relative ADR imm. 20:0. */ #define R_AARCH64_TLSGD_ADR_PAGE21 513 /* page-rel. ADRP imm. 32:12. */ #define R_AARCH64_TLSGD_ADD_LO12_NC 514 /* direct ADD imm. from 11:0. */ #define R_AARCH64_TLSGD_MOVW_G1 515 /* GOT-rel. MOV{N,Z} 31:16. */ #define R_AARCH64_TLSGD_MOVW_G0_NC 516 /* GOT-rel. MOVK imm. 15:0. */ #define R_AARCH64_TLSLD_ADR_PREL21 517 /* Like 512; local dynamic model. */ #define R_AARCH64_TLSLD_ADR_PAGE21 518 /* Like 513; local dynamic model. */ #define R_AARCH64_TLSLD_ADD_LO12_NC 519 /* Like 514; local dynamic model. */ #define R_AARCH64_TLSLD_MOVW_G1 520 /* Like 515; local dynamic model. */ #define R_AARCH64_TLSLD_MOVW_G0_NC 521 /* Like 516; local dynamic model. */ #define R_AARCH64_TLSLD_LD_PREL19 522 /* TLS PC-rel. load imm. 20:2. */ #define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523 /* TLS DTP-rel. MOV{N,Z} 47:32. */ #define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524 /* TLS DTP-rel. MOV{N,Z} 31:16. */ #define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525 /* Likewise; MOVK; no check. */ #define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526 /* TLS DTP-rel. MOV{N,Z} 15:0. */ #define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527 /* Likewise; MOVK; no check. */ #define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528 /* DTP-rel. ADD imm. from 23:12. */ #define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529 /* DTP-rel. ADD imm. from 11:0. */ #define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530 /* Likewise; no ovfl. check. */ #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531 /* DTP-rel. LD/ST imm. 11:0. */ #define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532 /* Likewise; no check. */ #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533 /* DTP-rel. LD/ST imm. 11:1. */ #define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534 /* Likewise; no check. */ #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535 /* DTP-rel. LD/ST imm. 11:2. */ #define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536 /* Likewise; no check. */ #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537 /* DTP-rel. LD/ST imm. 11:3. */ #define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538 /* Likewise; no check. */ #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539 /* GOT-rel. MOV{N,Z} 31:16. */ #define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540 /* GOT-rel. MOVK 15:0. */ #define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541 /* Page-rel. ADRP 32:12. */ #define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542 /* Direct LD off. 11:3. */ #define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543 /* PC-rel. load imm. 20:2. */ #define R_AARCH64_TLSLE_MOVW_TPREL_G2 544 /* TLS TP-rel. MOV{N,Z} 47:32. */ #define R_AARCH64_TLSLE_MOVW_TPREL_G1 545 /* TLS TP-rel. MOV{N,Z} 31:16. */ #define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546 /* Likewise; MOVK; no check. */ #define R_AARCH64_TLSLE_MOVW_TPREL_G0 547 /* TLS TP-rel. MOV{N,Z} 15:0. */ #define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548 /* Likewise; MOVK; no check. */ #define R_AARCH64_TLSLE_ADD_TPREL_HI12 549 /* TP-rel. ADD imm. 23:12. */ #define R_AARCH64_TLSLE_ADD_TPREL_LO12 550 /* TP-rel. ADD imm. 11:0. */ #define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551 /* Likewise; no ovfl. check. */ #define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552 /* TP-rel. LD/ST off. 11:0. */ #define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553 /* Likewise; no ovfl. check. */ #define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554 /* TP-rel. LD/ST off. 11:1. */ #define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555 /* Likewise; no check. */ #define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556 /* TP-rel. LD/ST off. 11:2. */ #define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557 /* Likewise; no check. */ #define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558 /* TP-rel. LD/ST off. 11:3. */ #define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559 /* Likewise; no check. */ #define R_AARCH64_TLSDESC_LD_PREL19 560 /* PC-rel. load immediate 20:2. */ #define R_AARCH64_TLSDESC_ADR_PREL21 561 /* PC-rel. ADR immediate 20:0. */ #define R_AARCH64_TLSDESC_ADR_PAGE21 562 /* Page-rel. ADRP imm. 32:12. */ #define R_AARCH64_TLSDESC_LD64_LO12 563 /* Direct LD off. from 11:3. */ #define R_AARCH64_TLSDESC_ADD_LO12 564 /* Direct ADD imm. from 11:0. */ #define R_AARCH64_TLSDESC_OFF_G1 565 /* GOT-rel. MOV{N,Z} imm. 31:16. */ #define R_AARCH64_TLSDESC_OFF_G0_NC 566 /* GOT-rel. MOVK imm. 15:0; no ck. */ #define R_AARCH64_TLSDESC_LDR 567 /* Relax LDR. */ #define R_AARCH64_TLSDESC_ADD 568 /* Relax ADD. */ #define R_AARCH64_TLSDESC_CALL 569 /* Relax BLR. */ #define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570 /* TP-rel. LD/ST off. 11:4. */ #define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571 /* Likewise; no check. */ #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572 /* DTP-rel. LD/ST imm. 11:4. */ #define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573 /* Likewise; no check. */ #define R_AARCH64_COPY 1024 /* Copy symbol at runtime. */ #define R_AARCH64_GLOB_DAT 1025 /* Create GOT entry. */ #define R_AARCH64_JUMP_SLOT 1026 /* Create PLT entry. */ #define R_AARCH64_RELATIVE 1027 /* Adjust by program base. */ #define R_AARCH64_TLS_DTPMOD 1028 /* Module number, 64 bit. */ #define R_AARCH64_TLS_DTPREL 1029 /* Module-relative offset, 64 bit. */ #define R_AARCH64_TLS_TPREL 1030 /* TP-relative offset, 64 bit. */ #define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */ #define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */ /* AArch64 specific values for the Dyn d_tag field. */ #define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5) #define DT_AARCH64_NUM 6 /* AArch64 specific values for the st_other field. */ #define STO_AARCH64_VARIANT_PCS 0x80 /* ARM relocs. */ #define R_ARM_NONE 0 /* No reloc */ #define R_ARM_PC24 1 /* Deprecated PC relative 26 bit branch. */ #define R_ARM_ABS32 2 /* Direct 32 bit */ #define R_ARM_REL32 3 /* PC relative 32 bit */ #define R_ARM_PC13 4 #define R_ARM_ABS16 5 /* Direct 16 bit */ #define R_ARM_ABS12 6 /* Direct 12 bit */ #define R_ARM_THM_ABS5 7 /* Direct & 0x7C (LDR, STR). */ #define R_ARM_ABS8 8 /* Direct 8 bit */ #define R_ARM_SBREL32 9 #define R_ARM_THM_PC22 10 /* PC relative 24 bit (Thumb32 BL). */ #define R_ARM_THM_PC8 11 /* PC relative & 0x3FC (Thumb16 LDR, ADD, ADR). */ #define R_ARM_AMP_VCALL9 12 #define R_ARM_SWI24 13 /* Obsolete static relocation. */ #define R_ARM_TLS_DESC 13 /* Dynamic relocation. */ #define R_ARM_THM_SWI8 14 /* Reserved. */ #define R_ARM_XPC25 15 /* Reserved. */ #define R_ARM_THM_XPC22 16 /* Reserved. */ #define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */ #define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */ #define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */ #define R_ARM_COPY 20 /* Copy symbol at runtime */ #define R_ARM_GLOB_DAT 21 /* Create GOT entry */ #define R_ARM_JUMP_SLOT 22 /* Create PLT entry */ #define R_ARM_RELATIVE 23 /* Adjust by program base */ #define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */ #define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ #define R_ARM_GOT32 26 /* 32 bit GOT entry */ #define R_ARM_PLT32 27 /* Deprecated, 32 bit PLT address. */ #define R_ARM_CALL 28 /* PC relative 24 bit (BL, BLX). */ #define R_ARM_JUMP24 29 /* PC relative 24 bit (B, BL). */ #define R_ARM_THM_JUMP24 30 /* PC relative 24 bit (Thumb32 B.W). */ #define R_ARM_BASE_ABS 31 /* Adjust by program base. */ #define R_ARM_ALU_PCREL_7_0 32 /* Obsolete. */ #define R_ARM_ALU_PCREL_15_8 33 /* Obsolete. */ #define R_ARM_ALU_PCREL_23_15 34 /* Obsolete. */ #define R_ARM_LDR_SBREL_11_0 35 /* Deprecated, prog. base relative. */ #define R_ARM_ALU_SBREL_19_12 36 /* Deprecated, prog. base relative. */ #define R_ARM_ALU_SBREL_27_20 37 /* Deprecated, prog. base relative. */ #define R_ARM_TARGET1 38 #define R_ARM_SBREL31 39 /* Program base relative. */ #define R_ARM_V4BX 40 #define R_ARM_TARGET2 41 #define R_ARM_PREL31 42 /* 32 bit PC relative. */ #define R_ARM_MOVW_ABS_NC 43 /* Direct 16-bit (MOVW). */ #define R_ARM_MOVT_ABS 44 /* Direct high 16-bit (MOVT). */ #define R_ARM_MOVW_PREL_NC 45 /* PC relative 16-bit (MOVW). */ #define R_ARM_MOVT_PREL 46 /* PC relative (MOVT). */ #define R_ARM_THM_MOVW_ABS_NC 47 /* Direct 16 bit (Thumb32 MOVW). */ #define R_ARM_THM_MOVT_ABS 48 /* Direct high 16 bit (Thumb32 MOVT). */ #define R_ARM_THM_MOVW_PREL_NC 49 /* PC relative 16 bit (Thumb32 MOVW). */ #define R_ARM_THM_MOVT_PREL 50 /* PC relative high 16 bit (Thumb32 MOVT). */ #define R_ARM_THM_JUMP19 51 /* PC relative 20 bit (Thumb32 B.W). */ #define R_ARM_THM_JUMP6 52 /* PC relative X & 0x7E (Thumb16 CBZ, CBNZ). */ #define R_ARM_THM_ALU_PREL_11_0 53 /* PC relative 12 bit (Thumb32 ADR.W). */ #define R_ARM_THM_PC12 54 /* PC relative 12 bit (Thumb32 LDR{D,SB,H,SH}). */ #define R_ARM_ABS32_NOI 55 /* Direct 32-bit. */ #define R_ARM_REL32_NOI 56 /* PC relative 32-bit. */ #define R_ARM_ALU_PC_G0_NC 57 /* PC relative (ADD, SUB). */ #define R_ARM_ALU_PC_G0 58 /* PC relative (ADD, SUB). */ #define R_ARM_ALU_PC_G1_NC 59 /* PC relative (ADD, SUB). */ #define R_ARM_ALU_PC_G1 60 /* PC relative (ADD, SUB). */ #define R_ARM_ALU_PC_G2 61 /* PC relative (ADD, SUB). */ #define R_ARM_LDR_PC_G1 62 /* PC relative (LDR,STR,LDRB,STRB). */ #define R_ARM_LDR_PC_G2 63 /* PC relative (LDR,STR,LDRB,STRB). */ #define R_ARM_LDRS_PC_G0 64 /* PC relative (STR{D,H}, LDR{D,SB,H,SH}). */ #define R_ARM_LDRS_PC_G1 65 /* PC relative (STR{D,H}, LDR{D,SB,H,SH}). */ #define R_ARM_LDRS_PC_G2 66 /* PC relative (STR{D,H}, LDR{D,SB,H,SH}). */ #define R_ARM_LDC_PC_G0 67 /* PC relative (LDC, STC). */ #define R_ARM_LDC_PC_G1 68 /* PC relative (LDC, STC). */ #define R_ARM_LDC_PC_G2 69 /* PC relative (LDC, STC). */ #define R_ARM_ALU_SB_G0_NC 70 /* Program base relative (ADD,SUB). */ #define R_ARM_ALU_SB_G0 71 /* Program base relative (ADD,SUB). */ #define R_ARM_ALU_SB_G1_NC 72 /* Program base relative (ADD,SUB). */ #define R_ARM_ALU_SB_G1 73 /* Program base relative (ADD,SUB). */ #define R_ARM_ALU_SB_G2 74 /* Program base relative (ADD,SUB). */ #define R_ARM_LDR_SB_G0 75 /* Program base relative (LDR, STR, LDRB, STRB). */ #define R_ARM_LDR_SB_G1 76 /* Program base relative (LDR, STR, LDRB, STRB). */ #define R_ARM_LDR_SB_G2 77 /* Program base relative (LDR, STR, LDRB, STRB). */ #define R_ARM_LDRS_SB_G0 78 /* Program base relative (LDR, STR, LDRB, STRB). */ #define R_ARM_LDRS_SB_G1 79 /* Program base relative (LDR, STR, LDRB, STRB). */ #define R_ARM_LDRS_SB_G2 80 /* Program base relative (LDR, STR, LDRB, STRB). */ #define R_ARM_LDC_SB_G0 81 /* Program base relative (LDC,STC). */ #define R_ARM_LDC_SB_G1 82 /* Program base relative (LDC,STC). */ #define R_ARM_LDC_SB_G2 83 /* Program base relative (LDC,STC). */ #define R_ARM_MOVW_BREL_NC 84 /* Program base relative 16 bit (MOVW). */ #define R_ARM_MOVT_BREL 85 /* Program base relative high 16 bit (MOVT). */ #define R_ARM_MOVW_BREL 86 /* Program base relative 16 bit (MOVW). */ #define R_ARM_THM_MOVW_BREL_NC 87 /* Program base relative 16 bit (Thumb32 MOVW). */ #define R_ARM_THM_MOVT_BREL 88 /* Program base relative high 16 bit (Thumb32 MOVT). */ #define R_ARM_THM_MOVW_BREL 89 /* Program base relative 16 bit (Thumb32 MOVW). */ #define R_ARM_TLS_GOTDESC 90 #define R_ARM_TLS_CALL 91 #define R_ARM_TLS_DESCSEQ 92 /* TLS relaxation. */ #define R_ARM_THM_TLS_CALL 93 #define R_ARM_PLT32_ABS 94 #define R_ARM_GOT_ABS 95 /* GOT entry. */ #define R_ARM_GOT_PREL 96 /* PC relative GOT entry. */ #define R_ARM_GOT_BREL12 97 /* GOT entry relative to GOT origin (LDR). */ #define R_ARM_GOTOFF12 98 /* 12 bit, GOT entry relative to GOT origin (LDR, STR). */ #define R_ARM_GOTRELAX 99 #define R_ARM_GNU_VTENTRY 100 #define R_ARM_GNU_VTINHERIT 101 #define R_ARM_THM_PC11 102 /* PC relative & 0xFFE (Thumb16 B). */ #define R_ARM_THM_PC9 103 /* PC relative & 0x1FE (Thumb16 B/B). */ #define R_ARM_TLS_GD32 104 /* PC-rel 32 bit for global dynamic thread local data */ #define R_ARM_TLS_LDM32 105 /* PC-rel 32 bit for local dynamic thread local data */ #define R_ARM_TLS_LDO32 106 /* 32 bit offset relative to TLS block */ #define R_ARM_TLS_IE32 107 /* PC-rel 32 bit for GOT entry of static TLS block offset */ #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static TLS block */ #define R_ARM_TLS_LDO12 109 /* 12 bit relative to TLS block (LDR, STR). */ #define R_ARM_TLS_LE12 110 /* 12 bit relative to static TLS block (LDR, STR). */ #define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative to GOT origin (LDR). */ #define R_ARM_ME_TOO 128 /* Obsolete. */ #define R_ARM_THM_TLS_DESCSEQ 129 #define R_ARM_THM_TLS_DESCSEQ16 129 #define R_ARM_THM_TLS_DESCSEQ32 130 #define R_ARM_THM_GOT_BREL12 131 /* GOT entry relative to GOT origin, 12 bit (Thumb32 LDR). */ #define R_ARM_IRELATIVE 160 #define R_ARM_RXPC25 249 #define R_ARM_RSBREL32 250 #define R_ARM_THM_RPC22 251 #define R_ARM_RREL32 252 #define R_ARM_RABS22 253 #define R_ARM_RPC24 254 #define R_ARM_RBASE 255 /* Keep this the last entry. */ #define R_ARM_NUM 256 /* IA-64 specific declarations. */ /* Processor specific flags for the Ehdr e_flags field. */ #define EF_IA_64_MASKOS 0x0000000f /* os-specific flags */ #define EF_IA_64_ABI64 0x00000010 /* 64-bit ABI */ #define EF_IA_64_ARCH 0xff000000 /* arch. version mask */ /* Processor specific values for the Phdr p_type field. */ #define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* arch extension bits */ #define PT_IA_64_UNWIND (PT_LOPROC + 1) /* ia64 unwind bits */ #define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12) #define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13) #define PT_IA_64_HP_STACK (PT_LOOS + 0x14) /* Processor specific flags for the Phdr p_flags field. */ #define PF_IA_64_NORECOV 0x80000000 /* spec insns w/o recovery */ /* Processor specific values for the Shdr sh_type field. */ #define SHT_IA_64_EXT (SHT_LOPROC + 0) /* extension bits */ #define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */ /* Processor specific flags for the Shdr sh_flags field. */ #define SHF_IA_64_SHORT 0x10000000 /* section near gp */ #define SHF_IA_64_NORECOV 0x20000000 /* spec insns w/o recovery */ /* Processor specific values for the Dyn d_tag field. */ #define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) #define DT_IA_64_NUM 1 /* IA-64 relocations. */ #define R_IA64_NONE 0x00 /* none */ #define R_IA64_IMM14 0x21 /* symbol + addend, add imm14 */ #define R_IA64_IMM22 0x22 /* symbol + addend, add imm22 */ #define R_IA64_IMM64 0x23 /* symbol + addend, mov imm64 */ #define R_IA64_DIR32MSB 0x24 /* symbol + addend, data4 MSB */ #define R_IA64_DIR32LSB 0x25 /* symbol + addend, data4 LSB */ #define R_IA64_DIR64MSB 0x26 /* symbol + addend, data8 MSB */ #define R_IA64_DIR64LSB 0x27 /* symbol + addend, data8 LSB */ #define R_IA64_GPREL22 0x2a /* @gprel(sym + add), add imm22 */ #define R_IA64_GPREL64I 0x2b /* @gprel(sym + add), mov imm64 */ #define R_IA64_GPREL32MSB 0x2c /* @gprel(sym + add), data4 MSB */ #define R_IA64_GPREL32LSB 0x2d /* @gprel(sym + add), data4 LSB */ #define R_IA64_GPREL64MSB 0x2e /* @gprel(sym + add), data8 MSB */ #define R_IA64_GPREL64LSB 0x2f /* @gprel(sym + add), data8 LSB */ #define R_IA64_LTOFF22 0x32 /* @ltoff(sym + add), add imm22 */ #define R_IA64_LTOFF64I 0x33 /* @ltoff(sym + add), mov imm64 */ #define R_IA64_PLTOFF22 0x3a /* @pltoff(sym + add), add imm22 */ #define R_IA64_PLTOFF64I 0x3b /* @pltoff(sym + add), mov imm64 */ #define R_IA64_PLTOFF64MSB 0x3e /* @pltoff(sym + add), data8 MSB */ #define R_IA64_PLTOFF64LSB 0x3f /* @pltoff(sym + add), data8 LSB */ #define R_IA64_FPTR64I 0x43 /* @fptr(sym + add), mov imm64 */ #define R_IA64_FPTR32MSB 0x44 /* @fptr(sym + add), data4 MSB */ #define R_IA64_FPTR32LSB 0x45 /* @fptr(sym + add), data4 LSB */ #define R_IA64_FPTR64MSB 0x46 /* @fptr(sym + add), data8 MSB */ #define R_IA64_FPTR64LSB 0x47 /* @fptr(sym + add), data8 LSB */ #define R_IA64_PCREL60B 0x48 /* @pcrel(sym + add), brl */ #define R_IA64_PCREL21B 0x49 /* @pcrel(sym + add), ptb, call */ #define R_IA64_PCREL21M 0x4a /* @pcrel(sym + add), chk.s */ #define R_IA64_PCREL21F 0x4b /* @pcrel(sym + add), fchkf */ #define R_IA64_PCREL32MSB 0x4c /* @pcrel(sym + add), data4 MSB */ #define R_IA64_PCREL32LSB 0x4d /* @pcrel(sym + add), data4 LSB */ #define R_IA64_PCREL64MSB 0x4e /* @pcrel(sym + add), data8 MSB */ #define R_IA64_PCREL64LSB 0x4f /* @pcrel(sym + add), data8 LSB */ #define R_IA64_LTOFF_FPTR22 0x52 /* @ltoff(@fptr(s+a)), imm22 */ #define R_IA64_LTOFF_FPTR64I 0x53 /* @ltoff(@fptr(s+a)), imm64 */ #define R_IA64_LTOFF_FPTR32MSB 0x54 /* @ltoff(@fptr(s+a)), data4 MSB */ #define R_IA64_LTOFF_FPTR32LSB 0x55 /* @ltoff(@fptr(s+a)), data4 LSB */ #define R_IA64_LTOFF_FPTR64MSB 0x56 /* @ltoff(@fptr(s+a)), data8 MSB */ #define R_IA64_LTOFF_FPTR64LSB 0x57 /* @ltoff(@fptr(s+a)), data8 LSB */ #define R_IA64_SEGREL32MSB 0x5c /* @segrel(sym + add), data4 MSB */ #define R_IA64_SEGREL32LSB 0x5d /* @segrel(sym + add), data4 LSB */ #define R_IA64_SEGREL64MSB 0x5e /* @segrel(sym + add), data8 MSB */ #define R_IA64_SEGREL64LSB 0x5f /* @segrel(sym + add), data8 LSB */ #define R_IA64_SECREL32MSB 0x64 /* @secrel(sym + add), data4 MSB */ #define R_IA64_SECREL32LSB 0x65 /* @secrel(sym + add), data4 LSB */ #define R_IA64_SECREL64MSB 0x66 /* @secrel(sym + add), data8 MSB */ #define R_IA64_SECREL64LSB 0x67 /* @secrel(sym + add), data8 LSB */ #define R_IA64_REL32MSB 0x6c /* data 4 + REL */ #define R_IA64_REL32LSB 0x6d /* data 4 + REL */ #define R_IA64_REL64MSB 0x6e /* data 8 + REL */ #define R_IA64_REL64LSB 0x6f /* data 8 + REL */ #define R_IA64_LTV32MSB 0x74 /* symbol + addend, data4 MSB */ #define R_IA64_LTV32LSB 0x75 /* symbol + addend, data4 LSB */ #define R_IA64_LTV64MSB 0x76 /* symbol + addend, data8 MSB */ #define R_IA64_LTV64LSB 0x77 /* symbol + addend, data8 LSB */ #define R_IA64_PCREL21BI 0x79 /* @pcrel(sym + add), 21bit inst */ #define R_IA64_PCREL22 0x7a /* @pcrel(sym + add), 22bit inst */ #define R_IA64_PCREL64I 0x7b /* @pcrel(sym + add), 64bit inst */ #define R_IA64_IPLTMSB 0x80 /* dynamic reloc, imported PLT, MSB */ #define R_IA64_IPLTLSB 0x81 /* dynamic reloc, imported PLT, LSB */ #define R_IA64_COPY 0x84 /* copy relocation */ #define R_IA64_SUB 0x85 /* Addend and symbol difference */ #define R_IA64_LTOFF22X 0x86 /* LTOFF22, relaxable. */ #define R_IA64_LDXMOV 0x87 /* Use of LTOFF22X. */ #define R_IA64_TPREL14 0x91 /* @tprel(sym + add), imm14 */ #define R_IA64_TPREL22 0x92 /* @tprel(sym + add), imm22 */ #define R_IA64_TPREL64I 0x93 /* @tprel(sym + add), imm64 */ #define R_IA64_TPREL64MSB 0x96 /* @tprel(sym + add), data8 MSB */ #define R_IA64_TPREL64LSB 0x97 /* @tprel(sym + add), data8 LSB */ #define R_IA64_LTOFF_TPREL22 0x9a /* @ltoff(@tprel(s+a)), imm2 */ #define R_IA64_DTPMOD64MSB 0xa6 /* @dtpmod(sym + add), data8 MSB */ #define R_IA64_DTPMOD64LSB 0xa7 /* @dtpmod(sym + add), data8 LSB */ #define R_IA64_LTOFF_DTPMOD22 0xaa /* @ltoff(@dtpmod(sym + add)), imm22 */ #define R_IA64_DTPREL14 0xb1 /* @dtprel(sym + add), imm14 */ #define R_IA64_DTPREL22 0xb2 /* @dtprel(sym + add), imm22 */ #define R_IA64_DTPREL64I 0xb3 /* @dtprel(sym + add), imm64 */ #define R_IA64_DTPREL32MSB 0xb4 /* @dtprel(sym + add), data4 MSB */ #define R_IA64_DTPREL32LSB 0xb5 /* @dtprel(sym + add), data4 LSB */ #define R_IA64_DTPREL64MSB 0xb6 /* @dtprel(sym + add), data8 MSB */ #define R_IA64_DTPREL64LSB 0xb7 /* @dtprel(sym + add), data8 LSB */ #define R_IA64_LTOFF_DTPREL22 0xba /* @ltoff(@dtprel(s+a)), imm22 */ /* SH specific declarations */ /* Processor specific flags for the ELF header e_flags field. */ #define EF_SH_MACH_MASK 0x1f #define EF_SH_UNKNOWN 0x0 #define EF_SH1 0x1 #define EF_SH2 0x2 #define EF_SH3 0x3 #define EF_SH_DSP 0x4 #define EF_SH3_DSP 0x5 #define EF_SH4AL_DSP 0x6 #define EF_SH3E 0x8 #define EF_SH4 0x9 #define EF_SH2E 0xb #define EF_SH4A 0xc #define EF_SH2A 0xd #define EF_SH4_NOFPU 0x10 #define EF_SH4A_NOFPU 0x11 #define EF_SH4_NOMMU_NOFPU 0x12 #define EF_SH2A_NOFPU 0x13 #define EF_SH3_NOMMU 0x14 #define EF_SH2A_SH4_NOFPU 0x15 #define EF_SH2A_SH3_NOFPU 0x16 #define EF_SH2A_SH4 0x17 #define EF_SH2A_SH3E 0x18 /* SH relocs. */ #define R_SH_NONE 0 #define R_SH_DIR32 1 #define R_SH_REL32 2 #define R_SH_DIR8WPN 3 #define R_SH_IND12W 4 #define R_SH_DIR8WPL 5 #define R_SH_DIR8WPZ 6 #define R_SH_DIR8BP 7 #define R_SH_DIR8W 8 #define R_SH_DIR8L 9 #define R_SH_SWITCH16 25 #define R_SH_SWITCH32 26 #define R_SH_USES 27 #define R_SH_COUNT 28 #define R_SH_ALIGN 29 #define R_SH_CODE 30 #define R_SH_DATA 31 #define R_SH_LABEL 32 #define R_SH_SWITCH8 33 #define R_SH_GNU_VTINHERIT 34 #define R_SH_GNU_VTENTRY 35 #define R_SH_TLS_GD_32 144 #define R_SH_TLS_LD_32 145 #define R_SH_TLS_LDO_32 146 #define R_SH_TLS_IE_32 147 #define R_SH_TLS_LE_32 148 #define R_SH_TLS_DTPMOD32 149 #define R_SH_TLS_DTPOFF32 150 #define R_SH_TLS_TPOFF32 151 #define R_SH_GOT32 160 #define R_SH_PLT32 161 #define R_SH_COPY 162 #define R_SH_GLOB_DAT 163 #define R_SH_JMP_SLOT 164 #define R_SH_RELATIVE 165 #define R_SH_GOTOFF 166 #define R_SH_GOTPC 167 /* Keep this the last entry. */ #define R_SH_NUM 256 /* S/390 specific definitions. */ /* Valid values for the e_flags field. */ #define EF_S390_HIGH_GPRS 0x00000001 /* High GPRs kernel facility needed. */ /* Additional s390 relocs */ #define R_390_NONE 0 /* No reloc. */ #define R_390_8 1 /* Direct 8 bit. */ #define R_390_12 2 /* Direct 12 bit. */ #define R_390_16 3 /* Direct 16 bit. */ #define R_390_32 4 /* Direct 32 bit. */ #define R_390_PC32 5 /* PC relative 32 bit. */ #define R_390_GOT12 6 /* 12 bit GOT offset. */ #define R_390_GOT32 7 /* 32 bit GOT offset. */ #define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ #define R_390_COPY 9 /* Copy symbol at runtime. */ #define R_390_GLOB_DAT 10 /* Create GOT entry. */ #define R_390_JMP_SLOT 11 /* Create PLT entry. */ #define R_390_RELATIVE 12 /* Adjust by program base. */ #define R_390_GOTOFF32 13 /* 32 bit offset to GOT. */ #define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ #define R_390_GOT16 15 /* 16 bit GOT offset. */ #define R_390_PC16 16 /* PC relative 16 bit. */ #define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ #define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ #define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ #define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ #define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ #define R_390_64 22 /* Direct 64 bit. */ #define R_390_PC64 23 /* PC relative 64 bit. */ #define R_390_GOT64 24 /* 64 bit GOT offset. */ #define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ #define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ #define R_390_GOTOFF16 27 /* 16 bit offset to GOT. */ #define R_390_GOTOFF64 28 /* 64 bit offset to GOT. */ #define R_390_GOTPLT12 29 /* 12 bit offset to jump slot. */ #define R_390_GOTPLT16 30 /* 16 bit offset to jump slot. */ #define R_390_GOTPLT32 31 /* 32 bit offset to jump slot. */ #define R_390_GOTPLT64 32 /* 64 bit offset to jump slot. */ #define R_390_GOTPLTENT 33 /* 32 bit rel. offset to jump slot. */ #define R_390_PLTOFF16 34 /* 16 bit offset from GOT to PLT. */ #define R_390_PLTOFF32 35 /* 32 bit offset from GOT to PLT. */ #define R_390_PLTOFF64 36 /* 16 bit offset from GOT to PLT. */ #define R_390_TLS_LOAD 37 /* Tag for load insn in TLS code. */ #define R_390_TLS_GDCALL 38 /* Tag for function call in general dynamic TLS code. */ #define R_390_TLS_LDCALL 39 /* Tag for function call in local dynamic TLS code. */ #define R_390_TLS_GD32 40 /* Direct 32 bit for general dynamic thread local data. */ #define R_390_TLS_GD64 41 /* Direct 64 bit for general dynamic thread local data. */ #define R_390_TLS_GOTIE12 42 /* 12 bit GOT offset for static TLS block offset. */ #define R_390_TLS_GOTIE32 43 /* 32 bit GOT offset for static TLS block offset. */ #define R_390_TLS_GOTIE64 44 /* 64 bit GOT offset for static TLS block offset. */ #define R_390_TLS_LDM32 45 /* Direct 32 bit for local dynamic thread local data in LE code. */ #define R_390_TLS_LDM64 46 /* Direct 64 bit for local dynamic thread local data in LE code. */ #define R_390_TLS_IE32 47 /* 32 bit address of GOT entry for negated static TLS block offset. */ #define R_390_TLS_IE64 48 /* 64 bit address of GOT entry for negated static TLS block offset. */ #define R_390_TLS_IEENT 49 /* 32 bit rel. offset to GOT entry for negated static TLS block offset. */ #define R_390_TLS_LE32 50 /* 32 bit negated offset relative to static TLS block. */ #define R_390_TLS_LE64 51 /* 64 bit negated offset relative to static TLS block. */ #define R_390_TLS_LDO32 52 /* 32 bit offset relative to TLS block. */ #define R_390_TLS_LDO64 53 /* 64 bit offset relative to TLS block. */ #define R_390_TLS_DTPMOD 54 /* ID of module containing symbol. */ #define R_390_TLS_DTPOFF 55 /* Offset in TLS block. */ #define R_390_TLS_TPOFF 56 /* Negated offset in static TLS block. */ #define R_390_20 57 /* Direct 20 bit. */ #define R_390_GOT20 58 /* 20 bit GOT offset. */ #define R_390_GOTPLT20 59 /* 20 bit offset to jump slot. */ #define R_390_TLS_GOTIE20 60 /* 20 bit GOT offset for static TLS block offset. */ #define R_390_IRELATIVE 61 /* STT_GNU_IFUNC relocation. */ /* Keep this the last entry. */ #define R_390_NUM 62 /* CRIS relocations. */ #define R_CRIS_NONE 0 #define R_CRIS_8 1 #define R_CRIS_16 2 #define R_CRIS_32 3 #define R_CRIS_8_PCREL 4 #define R_CRIS_16_PCREL 5 #define R_CRIS_32_PCREL 6 #define R_CRIS_GNU_VTINHERIT 7 #define R_CRIS_GNU_VTENTRY 8 #define R_CRIS_COPY 9 #define R_CRIS_GLOB_DAT 10 #define R_CRIS_JUMP_SLOT 11 #define R_CRIS_RELATIVE 12 #define R_CRIS_16_GOT 13 #define R_CRIS_32_GOT 14 #define R_CRIS_16_GOTPLT 15 #define R_CRIS_32_GOTPLT 16 #define R_CRIS_32_GOTREL 17 #define R_CRIS_32_PLT_GOTREL 18 #define R_CRIS_32_PLT_PCREL 19 #define R_CRIS_NUM 20 /* AMD x86-64 relocations. */ #define R_X86_64_NONE 0 /* No reloc */ #define R_X86_64_64 1 /* Direct 64 bit */ #define R_X86_64_PC32 2 /* PC relative 32 bit signed */ #define R_X86_64_GOT32 3 /* 32 bit GOT entry */ #define R_X86_64_PLT32 4 /* 32 bit PLT address */ #define R_X86_64_COPY 5 /* Copy symbol at runtime */ #define R_X86_64_GLOB_DAT 6 /* Create GOT entry */ #define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */ #define R_X86_64_RELATIVE 8 /* Adjust by program base */ #define R_X86_64_GOTPCREL 9 /* 32 bit signed PC relative offset to GOT */ #define R_X86_64_32 10 /* Direct 32 bit zero extended */ #define R_X86_64_32S 11 /* Direct 32 bit sign extended */ #define R_X86_64_16 12 /* Direct 16 bit zero extended */ #define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */ #define R_X86_64_8 14 /* Direct 8 bit sign extended */ #define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */ #define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ #define R_X86_64_DTPOFF64 17 /* Offset in module's TLS block */ #define R_X86_64_TPOFF64 18 /* Offset in initial TLS block */ #define R_X86_64_TLSGD 19 /* 32 bit signed PC relative offset to two GOT entries for GD symbol */ #define R_X86_64_TLSLD 20 /* 32 bit signed PC relative offset to two GOT entries for LD symbol */ #define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ #define R_X86_64_GOTTPOFF 22 /* 32 bit signed PC relative offset to GOT entry for IE symbol */ #define R_X86_64_TPOFF32 23 /* Offset in initial TLS block */ #define R_X86_64_PC64 24 /* PC relative 64 bit */ #define R_X86_64_GOTOFF64 25 /* 64 bit offset to GOT */ #define R_X86_64_GOTPC32 26 /* 32 bit signed pc relative offset to GOT */ #define R_X86_64_GOT64 27 /* 64-bit GOT entry offset */ #define R_X86_64_GOTPCREL64 28 /* 64-bit PC relative offset to GOT entry */ #define R_X86_64_GOTPC64 29 /* 64-bit PC relative offset to GOT */ #define R_X86_64_GOTPLT64 30 /* like GOT64, says PLT entry needed */ #define R_X86_64_PLTOFF64 31 /* 64-bit GOT relative offset to PLT entry */ #define R_X86_64_SIZE32 32 /* Size of symbol plus 32-bit addend */ #define R_X86_64_SIZE64 33 /* Size of symbol plus 64-bit addend */ #define R_X86_64_GOTPC32_TLSDESC 34 /* GOT offset for TLS descriptor. */ #define R_X86_64_TLSDESC_CALL 35 /* Marker for call through TLS descriptor. */ #define R_X86_64_TLSDESC 36 /* TLS descriptor. */ #define R_X86_64_IRELATIVE 37 /* Adjust indirectly by program base */ #define R_X86_64_RELATIVE64 38 /* 64-bit adjust by program base */ /* 39 Reserved was R_X86_64_PC32_BND */ /* 40 Reserved was R_X86_64_PLT32_BND */ #define R_X86_64_GOTPCRELX 41 /* Load from 32 bit signed pc relative offset to GOT entry without REX prefix, relaxable. */ #define R_X86_64_REX_GOTPCRELX 42 /* Load from 32 bit signed pc relative offset to GOT entry with REX prefix, relaxable. */ #define R_X86_64_NUM 43 /* x86-64 sh_type values. */ #define SHT_X86_64_UNWIND 0x70000001 /* Unwind information. */ /* AM33 relocations. */ #define R_MN10300_NONE 0 /* No reloc. */ #define R_MN10300_32 1 /* Direct 32 bit. */ #define R_MN10300_16 2 /* Direct 16 bit. */ #define R_MN10300_8 3 /* Direct 8 bit. */ #define R_MN10300_PCREL32 4 /* PC-relative 32-bit. */ #define R_MN10300_PCREL16 5 /* PC-relative 16-bit signed. */ #define R_MN10300_PCREL8 6 /* PC-relative 8-bit signed. */ #define R_MN10300_GNU_VTINHERIT 7 /* Ancient C++ vtable garbage... */ #define R_MN10300_GNU_VTENTRY 8 /* ... collection annotation. */ #define R_MN10300_24 9 /* Direct 24 bit. */ #define R_MN10300_GOTPC32 10 /* 32-bit PCrel offset to GOT. */ #define R_MN10300_GOTPC16 11 /* 16-bit PCrel offset to GOT. */ #define R_MN10300_GOTOFF32 12 /* 32-bit offset from GOT. */ #define R_MN10300_GOTOFF24 13 /* 24-bit offset from GOT. */ #define R_MN10300_GOTOFF16 14 /* 16-bit offset from GOT. */ #define R_MN10300_PLT32 15 /* 32-bit PCrel to PLT entry. */ #define R_MN10300_PLT16 16 /* 16-bit PCrel to PLT entry. */ #define R_MN10300_GOT32 17 /* 32-bit offset to GOT entry. */ #define R_MN10300_GOT24 18 /* 24-bit offset to GOT entry. */ #define R_MN10300_GOT16 19 /* 16-bit offset to GOT entry. */ #define R_MN10300_COPY 20 /* Copy symbol at runtime. */ #define R_MN10300_GLOB_DAT 21 /* Create GOT entry. */ #define R_MN10300_JMP_SLOT 22 /* Create PLT entry. */ #define R_MN10300_RELATIVE 23 /* Adjust by program base. */ #define R_MN10300_TLS_GD 24 /* 32-bit offset for global dynamic. */ #define R_MN10300_TLS_LD 25 /* 32-bit offset for local dynamic. */ #define R_MN10300_TLS_LDO 26 /* Module-relative offset. */ #define R_MN10300_TLS_GOTIE 27 /* GOT offset for static TLS block offset. */ #define R_MN10300_TLS_IE 28 /* GOT address for static TLS block offset. */ #define R_MN10300_TLS_LE 29 /* Offset relative to static TLS block. */ #define R_MN10300_TLS_DTPMOD 30 /* ID of module containing symbol. */ #define R_MN10300_TLS_DTPOFF 31 /* Offset in module TLS block. */ #define R_MN10300_TLS_TPOFF 32 /* Offset in static TLS block. */ #define R_MN10300_SYM_DIFF 33 /* Adjustment for next reloc as needed by linker relaxation. */ #define R_MN10300_ALIGN 34 /* Alignment requirement for linker relaxation. */ #define R_MN10300_NUM 35 /* M32R relocs. */ #define R_M32R_NONE 0 /* No reloc. */ #define R_M32R_16 1 /* Direct 16 bit. */ #define R_M32R_32 2 /* Direct 32 bit. */ #define R_M32R_24 3 /* Direct 24 bit. */ #define R_M32R_10_PCREL 4 /* PC relative 10 bit shifted. */ #define R_M32R_18_PCREL 5 /* PC relative 18 bit shifted. */ #define R_M32R_26_PCREL 6 /* PC relative 26 bit shifted. */ #define R_M32R_HI16_ULO 7 /* High 16 bit with unsigned low. */ #define R_M32R_HI16_SLO 8 /* High 16 bit with signed low. */ #define R_M32R_LO16 9 /* Low 16 bit. */ #define R_M32R_SDA16 10 /* 16 bit offset in SDA. */ #define R_M32R_GNU_VTINHERIT 11 #define R_M32R_GNU_VTENTRY 12 /* M32R relocs use SHT_RELA. */ #define R_M32R_16_RELA 33 /* Direct 16 bit. */ #define R_M32R_32_RELA 34 /* Direct 32 bit. */ #define R_M32R_24_RELA 35 /* Direct 24 bit. */ #define R_M32R_10_PCREL_RELA 36 /* PC relative 10 bit shifted. */ #define R_M32R_18_PCREL_RELA 37 /* PC relative 18 bit shifted. */ #define R_M32R_26_PCREL_RELA 38 /* PC relative 26 bit shifted. */ #define R_M32R_HI16_ULO_RELA 39 /* High 16 bit with unsigned low */ #define R_M32R_HI16_SLO_RELA 40 /* High 16 bit with signed low */ #define R_M32R_LO16_RELA 41 /* Low 16 bit */ #define R_M32R_SDA16_RELA 42 /* 16 bit offset in SDA */ #define R_M32R_RELA_GNU_VTINHERIT 43 #define R_M32R_RELA_GNU_VTENTRY 44 #define R_M32R_REL32 45 /* PC relative 32 bit. */ #define R_M32R_GOT24 48 /* 24 bit GOT entry */ #define R_M32R_26_PLTREL 49 /* 26 bit PC relative to PLT shifted */ #define R_M32R_COPY 50 /* Copy symbol at runtime */ #define R_M32R_GLOB_DAT 51 /* Create GOT entry */ #define R_M32R_JMP_SLOT 52 /* Create PLT entry */ #define R_M32R_RELATIVE 53 /* Adjust by program base */ #define R_M32R_GOTOFF 54 /* 24 bit offset to GOT */ #define R_M32R_GOTPC24 55 /* 24 bit PC relative offset to GOT */ #define R_M32R_GOT16_HI_ULO 56 /* High 16 bit GOT entry with unsigned low */ #define R_M32R_GOT16_HI_SLO 57 /* High 16 bit GOT entry with signed low */ #define R_M32R_GOT16_LO 58 /* Low 16 bit GOT entry */ #define R_M32R_GOTPC_HI_ULO 59 /* High 16 bit PC relative offset to GOT with unsigned low */ #define R_M32R_GOTPC_HI_SLO 60 /* High 16 bit PC relative offset to GOT with signed low */ #define R_M32R_GOTPC_LO 61 /* Low 16 bit PC relative offset to GOT */ #define R_M32R_GOTOFF_HI_ULO 62 /* High 16 bit offset to GOT with unsigned low */ #define R_M32R_GOTOFF_HI_SLO 63 /* High 16 bit offset to GOT with signed low */ #define R_M32R_GOTOFF_LO 64 /* Low 16 bit offset to GOT */ #define R_M32R_NUM 256 /* Keep this the last entry. */ /* MicroBlaze relocations */ #define R_MICROBLAZE_NONE 0 /* No reloc. */ #define R_MICROBLAZE_32 1 /* Direct 32 bit. */ #define R_MICROBLAZE_32_PCREL 2 /* PC relative 32 bit. */ #define R_MICROBLAZE_64_PCREL 3 /* PC relative 64 bit. */ #define R_MICROBLAZE_32_PCREL_LO 4 /* Low 16 bits of PCREL32. */ #define R_MICROBLAZE_64 5 /* Direct 64 bit. */ #define R_MICROBLAZE_32_LO 6 /* Low 16 bit. */ #define R_MICROBLAZE_SRO32 7 /* Read-only small data area. */ #define R_MICROBLAZE_SRW32 8 /* Read-write small data area. */ #define R_MICROBLAZE_64_NONE 9 /* No reloc. */ #define R_MICROBLAZE_32_SYM_OP_SYM 10 /* Symbol Op Symbol relocation. */ #define R_MICROBLAZE_GNU_VTINHERIT 11 /* GNU C++ vtable hierarchy. */ #define R_MICROBLAZE_GNU_VTENTRY 12 /* GNU C++ vtable member usage. */ #define R_MICROBLAZE_GOTPC_64 13 /* PC-relative GOT offset. */ #define R_MICROBLAZE_GOT_64 14 /* GOT entry offset. */ #define R_MICROBLAZE_PLT_64 15 /* PLT offset (PC-relative). */ #define R_MICROBLAZE_REL 16 /* Adjust by program base. */ #define R_MICROBLAZE_JUMP_SLOT 17 /* Create PLT entry. */ #define R_MICROBLAZE_GLOB_DAT 18 /* Create GOT entry. */ #define R_MICROBLAZE_GOTOFF_64 19 /* 64 bit offset to GOT. */ #define R_MICROBLAZE_GOTOFF_32 20 /* 32 bit offset to GOT. */ #define R_MICROBLAZE_COPY 21 /* Runtime copy. */ #define R_MICROBLAZE_TLS 22 /* TLS Reloc. */ #define R_MICROBLAZE_TLSGD 23 /* TLS General Dynamic. */ #define R_MICROBLAZE_TLSLD 24 /* TLS Local Dynamic. */ #define R_MICROBLAZE_TLSDTPMOD32 25 /* TLS Module ID. */ #define R_MICROBLAZE_TLSDTPREL32 26 /* TLS Offset Within TLS Block. */ #define R_MICROBLAZE_TLSDTPREL64 27 /* TLS Offset Within TLS Block. */ #define R_MICROBLAZE_TLSGOTTPREL32 28 /* TLS Offset From Thread Pointer. */ #define R_MICROBLAZE_TLSTPREL32 29 /* TLS Offset From Thread Pointer. */ /* Legal values for d_tag (dynamic entry type). */ #define DT_NIOS2_GP 0x70000002 /* Address of _gp. */ /* Nios II relocations. */ #define R_NIOS2_NONE 0 /* No reloc. */ #define R_NIOS2_S16 1 /* Direct signed 16 bit. */ #define R_NIOS2_U16 2 /* Direct unsigned 16 bit. */ #define R_NIOS2_PCREL16 3 /* PC relative 16 bit. */ #define R_NIOS2_CALL26 4 /* Direct call. */ #define R_NIOS2_IMM5 5 /* 5 bit constant expression. */ #define R_NIOS2_CACHE_OPX 6 /* 5 bit expression, shift 22. */ #define R_NIOS2_IMM6 7 /* 6 bit constant expression. */ #define R_NIOS2_IMM8 8 /* 8 bit constant expression. */ #define R_NIOS2_HI16 9 /* High 16 bit. */ #define R_NIOS2_LO16 10 /* Low 16 bit. */ #define R_NIOS2_HIADJ16 11 /* High 16 bit, adjusted. */ #define R_NIOS2_BFD_RELOC_32 12 /* 32 bit symbol value + addend. */ #define R_NIOS2_BFD_RELOC_16 13 /* 16 bit symbol value + addend. */ #define R_NIOS2_BFD_RELOC_8 14 /* 8 bit symbol value + addend. */ #define R_NIOS2_GPREL 15 /* 16 bit GP pointer offset. */ #define R_NIOS2_GNU_VTINHERIT 16 /* GNU C++ vtable hierarchy. */ #define R_NIOS2_GNU_VTENTRY 17 /* GNU C++ vtable member usage. */ #define R_NIOS2_UJMP 18 /* Unconditional branch. */ #define R_NIOS2_CJMP 19 /* Conditional branch. */ #define R_NIOS2_CALLR 20 /* Indirect call through register. */ #define R_NIOS2_ALIGN 21 /* Alignment requirement for linker relaxation. */ #define R_NIOS2_GOT16 22 /* 16 bit GOT entry. */ #define R_NIOS2_CALL16 23 /* 16 bit GOT entry for function. */ #define R_NIOS2_GOTOFF_LO 24 /* %lo of offset to GOT pointer. */ #define R_NIOS2_GOTOFF_HA 25 /* %hiadj of offset to GOT pointer. */ #define R_NIOS2_PCREL_LO 26 /* %lo of PC relative offset. */ #define R_NIOS2_PCREL_HA 27 /* %hiadj of PC relative offset. */ #define R_NIOS2_TLS_GD16 28 /* 16 bit GOT offset for TLS GD. */ #define R_NIOS2_TLS_LDM16 29 /* 16 bit GOT offset for TLS LDM. */ #define R_NIOS2_TLS_LDO16 30 /* 16 bit module relative offset. */ #define R_NIOS2_TLS_IE16 31 /* 16 bit GOT offset for TLS IE. */ #define R_NIOS2_TLS_LE16 32 /* 16 bit LE TP-relative offset. */ #define R_NIOS2_TLS_DTPMOD 33 /* Module number. */ #define R_NIOS2_TLS_DTPREL 34 /* Module-relative offset. */ #define R_NIOS2_TLS_TPREL 35 /* TP-relative offset. */ #define R_NIOS2_COPY 36 /* Copy symbol at runtime. */ #define R_NIOS2_GLOB_DAT 37 /* Create GOT entry. */ #define R_NIOS2_JUMP_SLOT 38 /* Create PLT entry. */ #define R_NIOS2_RELATIVE 39 /* Adjust by program base. */ #define R_NIOS2_GOTOFF 40 /* 16 bit offset to GOT pointer. */ #define R_NIOS2_CALL26_NOAT 41 /* Direct call in .noat section. */ #define R_NIOS2_GOT_LO 42 /* %lo() of GOT entry. */ #define R_NIOS2_GOT_HA 43 /* %hiadj() of GOT entry. */ #define R_NIOS2_CALL_LO 44 /* %lo() of function GOT entry. */ #define R_NIOS2_CALL_HA 45 /* %hiadj() of function GOT entry. */ /* TILEPro relocations. */ #define R_TILEPRO_NONE 0 /* No reloc */ #define R_TILEPRO_32 1 /* Direct 32 bit */ #define R_TILEPRO_16 2 /* Direct 16 bit */ #define R_TILEPRO_8 3 /* Direct 8 bit */ #define R_TILEPRO_32_PCREL 4 /* PC relative 32 bit */ #define R_TILEPRO_16_PCREL 5 /* PC relative 16 bit */ #define R_TILEPRO_8_PCREL 6 /* PC relative 8 bit */ #define R_TILEPRO_LO16 7 /* Low 16 bit */ #define R_TILEPRO_HI16 8 /* High 16 bit */ #define R_TILEPRO_HA16 9 /* High 16 bit, adjusted */ #define R_TILEPRO_COPY 10 /* Copy relocation */ #define R_TILEPRO_GLOB_DAT 11 /* Create GOT entry */ #define R_TILEPRO_JMP_SLOT 12 /* Create PLT entry */ #define R_TILEPRO_RELATIVE 13 /* Adjust by program base */ #define R_TILEPRO_BROFF_X1 14 /* X1 pipe branch offset */ #define R_TILEPRO_JOFFLONG_X1 15 /* X1 pipe jump offset */ #define R_TILEPRO_JOFFLONG_X1_PLT 16 /* X1 pipe jump offset to PLT */ #define R_TILEPRO_IMM8_X0 17 /* X0 pipe 8-bit */ #define R_TILEPRO_IMM8_Y0 18 /* Y0 pipe 8-bit */ #define R_TILEPRO_IMM8_X1 19 /* X1 pipe 8-bit */ #define R_TILEPRO_IMM8_Y1 20 /* Y1 pipe 8-bit */ #define R_TILEPRO_MT_IMM15_X1 21 /* X1 pipe mtspr */ #define R_TILEPRO_MF_IMM15_X1 22 /* X1 pipe mfspr */ #define R_TILEPRO_IMM16_X0 23 /* X0 pipe 16-bit */ #define R_TILEPRO_IMM16_X1 24 /* X1 pipe 16-bit */ #define R_TILEPRO_IMM16_X0_LO 25 /* X0 pipe low 16-bit */ #define R_TILEPRO_IMM16_X1_LO 26 /* X1 pipe low 16-bit */ #define R_TILEPRO_IMM16_X0_HI 27 /* X0 pipe high 16-bit */ #define R_TILEPRO_IMM16_X1_HI 28 /* X1 pipe high 16-bit */ #define R_TILEPRO_IMM16_X0_HA 29 /* X0 pipe high 16-bit, adjusted */ #define R_TILEPRO_IMM16_X1_HA 30 /* X1 pipe high 16-bit, adjusted */ #define R_TILEPRO_IMM16_X0_PCREL 31 /* X0 pipe PC relative 16 bit */ #define R_TILEPRO_IMM16_X1_PCREL 32 /* X1 pipe PC relative 16 bit */ #define R_TILEPRO_IMM16_X0_LO_PCREL 33 /* X0 pipe PC relative low 16 bit */ #define R_TILEPRO_IMM16_X1_LO_PCREL 34 /* X1 pipe PC relative low 16 bit */ #define R_TILEPRO_IMM16_X0_HI_PCREL 35 /* X0 pipe PC relative high 16 bit */ #define R_TILEPRO_IMM16_X1_HI_PCREL 36 /* X1 pipe PC relative high 16 bit */ #define R_TILEPRO_IMM16_X0_HA_PCREL 37 /* X0 pipe PC relative ha() 16 bit */ #define R_TILEPRO_IMM16_X1_HA_PCREL 38 /* X1 pipe PC relative ha() 16 bit */ #define R_TILEPRO_IMM16_X0_GOT 39 /* X0 pipe 16-bit GOT offset */ #define R_TILEPRO_IMM16_X1_GOT 40 /* X1 pipe 16-bit GOT offset */ #define R_TILEPRO_IMM16_X0_GOT_LO 41 /* X0 pipe low 16-bit GOT offset */ #define R_TILEPRO_IMM16_X1_GOT_LO 42 /* X1 pipe low 16-bit GOT offset */ #define R_TILEPRO_IMM16_X0_GOT_HI 43 /* X0 pipe high 16-bit GOT offset */ #define R_TILEPRO_IMM16_X1_GOT_HI 44 /* X1 pipe high 16-bit GOT offset */ #define R_TILEPRO_IMM16_X0_GOT_HA 45 /* X0 pipe ha() 16-bit GOT offset */ #define R_TILEPRO_IMM16_X1_GOT_HA 46 /* X1 pipe ha() 16-bit GOT offset */ #define R_TILEPRO_MMSTART_X0 47 /* X0 pipe mm "start" */ #define R_TILEPRO_MMEND_X0 48 /* X0 pipe mm "end" */ #define R_TILEPRO_MMSTART_X1 49 /* X1 pipe mm "start" */ #define R_TILEPRO_MMEND_X1 50 /* X1 pipe mm "end" */ #define R_TILEPRO_SHAMT_X0 51 /* X0 pipe shift amount */ #define R_TILEPRO_SHAMT_X1 52 /* X1 pipe shift amount */ #define R_TILEPRO_SHAMT_Y0 53 /* Y0 pipe shift amount */ #define R_TILEPRO_SHAMT_Y1 54 /* Y1 pipe shift amount */ #define R_TILEPRO_DEST_IMM8_X1 55 /* X1 pipe destination 8-bit */ /* Relocs 56-59 are currently not defined. */ #define R_TILEPRO_TLS_GD_CALL 60 /* "jal" for TLS GD */ #define R_TILEPRO_IMM8_X0_TLS_GD_ADD 61 /* X0 pipe "addi" for TLS GD */ #define R_TILEPRO_IMM8_X1_TLS_GD_ADD 62 /* X1 pipe "addi" for TLS GD */ #define R_TILEPRO_IMM8_Y0_TLS_GD_ADD 63 /* Y0 pipe "addi" for TLS GD */ #define R_TILEPRO_IMM8_Y1_TLS_GD_ADD 64 /* Y1 pipe "addi" for TLS GD */ #define R_TILEPRO_TLS_IE_LOAD 65 /* "lw_tls" for TLS IE */ #define R_TILEPRO_IMM16_X0_TLS_GD 66 /* X0 pipe 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X1_TLS_GD 67 /* X1 pipe 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X0_TLS_GD_LO 68 /* X0 pipe low 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X1_TLS_GD_LO 69 /* X1 pipe low 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X0_TLS_GD_HI 70 /* X0 pipe high 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X1_TLS_GD_HI 71 /* X1 pipe high 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X0_TLS_GD_HA 72 /* X0 pipe ha() 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X1_TLS_GD_HA 73 /* X1 pipe ha() 16-bit TLS GD offset */ #define R_TILEPRO_IMM16_X0_TLS_IE 74 /* X0 pipe 16-bit TLS IE offset */ #define R_TILEPRO_IMM16_X1_TLS_IE 75 /* X1 pipe 16-bit TLS IE offset */ #define R_TILEPRO_IMM16_X0_TLS_IE_LO 76 /* X0 pipe low 16-bit TLS IE offset */ #define R_TILEPRO_IMM16_X1_TLS_IE_LO 77 /* X1 pipe low 16-bit TLS IE offset */ #define R_TILEPRO_IMM16_X0_TLS_IE_HI 78 /* X0 pipe high 16-bit TLS IE offset */ #define R_TILEPRO_IMM16_X1_TLS_IE_HI 79 /* X1 pipe high 16-bit TLS IE offset */ #define R_TILEPRO_IMM16_X0_TLS_IE_HA 80 /* X0 pipe ha() 16-bit TLS IE offset */ #define R_TILEPRO_IMM16_X1_TLS_IE_HA 81 /* X1 pipe ha() 16-bit TLS IE offset */ #define R_TILEPRO_TLS_DTPMOD32 82 /* ID of module containing symbol */ #define R_TILEPRO_TLS_DTPOFF32 83 /* Offset in TLS block */ #define R_TILEPRO_TLS_TPOFF32 84 /* Offset in static TLS block */ #define R_TILEPRO_IMM16_X0_TLS_LE 85 /* X0 pipe 16-bit TLS LE offset */ #define R_TILEPRO_IMM16_X1_TLS_LE 86 /* X1 pipe 16-bit TLS LE offset */ #define R_TILEPRO_IMM16_X0_TLS_LE_LO 87 /* X0 pipe low 16-bit TLS LE offset */ #define R_TILEPRO_IMM16_X1_TLS_LE_LO 88 /* X1 pipe low 16-bit TLS LE offset */ #define R_TILEPRO_IMM16_X0_TLS_LE_HI 89 /* X0 pipe high 16-bit TLS LE offset */ #define R_TILEPRO_IMM16_X1_TLS_LE_HI 90 /* X1 pipe high 16-bit TLS LE offset */ #define R_TILEPRO_IMM16_X0_TLS_LE_HA 91 /* X0 pipe ha() 16-bit TLS LE offset */ #define R_TILEPRO_IMM16_X1_TLS_LE_HA 92 /* X1 pipe ha() 16-bit TLS LE offset */ #define R_TILEPRO_GNU_VTINHERIT 128 /* GNU C++ vtable hierarchy */ #define R_TILEPRO_GNU_VTENTRY 129 /* GNU C++ vtable member usage */ #define R_TILEPRO_NUM 130 /* TILE-Gx relocations. */ #define R_TILEGX_NONE 0 /* No reloc */ #define R_TILEGX_64 1 /* Direct 64 bit */ #define R_TILEGX_32 2 /* Direct 32 bit */ #define R_TILEGX_16 3 /* Direct 16 bit */ #define R_TILEGX_8 4 /* Direct 8 bit */ #define R_TILEGX_64_PCREL 5 /* PC relative 64 bit */ #define R_TILEGX_32_PCREL 6 /* PC relative 32 bit */ #define R_TILEGX_16_PCREL 7 /* PC relative 16 bit */ #define R_TILEGX_8_PCREL 8 /* PC relative 8 bit */ #define R_TILEGX_HW0 9 /* hword 0 16-bit */ #define R_TILEGX_HW1 10 /* hword 1 16-bit */ #define R_TILEGX_HW2 11 /* hword 2 16-bit */ #define R_TILEGX_HW3 12 /* hword 3 16-bit */ #define R_TILEGX_HW0_LAST 13 /* last hword 0 16-bit */ #define R_TILEGX_HW1_LAST 14 /* last hword 1 16-bit */ #define R_TILEGX_HW2_LAST 15 /* last hword 2 16-bit */ #define R_TILEGX_COPY 16 /* Copy relocation */ #define R_TILEGX_GLOB_DAT 17 /* Create GOT entry */ #define R_TILEGX_JMP_SLOT 18 /* Create PLT entry */ #define R_TILEGX_RELATIVE 19 /* Adjust by program base */ #define R_TILEGX_BROFF_X1 20 /* X1 pipe branch offset */ #define R_TILEGX_JUMPOFF_X1 21 /* X1 pipe jump offset */ #define R_TILEGX_JUMPOFF_X1_PLT 22 /* X1 pipe jump offset to PLT */ #define R_TILEGX_IMM8_X0 23 /* X0 pipe 8-bit */ #define R_TILEGX_IMM8_Y0 24 /* Y0 pipe 8-bit */ #define R_TILEGX_IMM8_X1 25 /* X1 pipe 8-bit */ #define R_TILEGX_IMM8_Y1 26 /* Y1 pipe 8-bit */ #define R_TILEGX_DEST_IMM8_X1 27 /* X1 pipe destination 8-bit */ #define R_TILEGX_MT_IMM14_X1 28 /* X1 pipe mtspr */ #define R_TILEGX_MF_IMM14_X1 29 /* X1 pipe mfspr */ #define R_TILEGX_MMSTART_X0 30 /* X0 pipe mm "start" */ #define R_TILEGX_MMEND_X0 31 /* X0 pipe mm "end" */ #define R_TILEGX_SHAMT_X0 32 /* X0 pipe shift amount */ #define R_TILEGX_SHAMT_X1 33 /* X1 pipe shift amount */ #define R_TILEGX_SHAMT_Y0 34 /* Y0 pipe shift amount */ #define R_TILEGX_SHAMT_Y1 35 /* Y1 pipe shift amount */ #define R_TILEGX_IMM16_X0_HW0 36 /* X0 pipe hword 0 */ #define R_TILEGX_IMM16_X1_HW0 37 /* X1 pipe hword 0 */ #define R_TILEGX_IMM16_X0_HW1 38 /* X0 pipe hword 1 */ #define R_TILEGX_IMM16_X1_HW1 39 /* X1 pipe hword 1 */ #define R_TILEGX_IMM16_X0_HW2 40 /* X0 pipe hword 2 */ #define R_TILEGX_IMM16_X1_HW2 41 /* X1 pipe hword 2 */ #define R_TILEGX_IMM16_X0_HW3 42 /* X0 pipe hword 3 */ #define R_TILEGX_IMM16_X1_HW3 43 /* X1 pipe hword 3 */ #define R_TILEGX_IMM16_X0_HW0_LAST 44 /* X0 pipe last hword 0 */ #define R_TILEGX_IMM16_X1_HW0_LAST 45 /* X1 pipe last hword 0 */ #define R_TILEGX_IMM16_X0_HW1_LAST 46 /* X0 pipe last hword 1 */ #define R_TILEGX_IMM16_X1_HW1_LAST 47 /* X1 pipe last hword 1 */ #define R_TILEGX_IMM16_X0_HW2_LAST 48 /* X0 pipe last hword 2 */ #define R_TILEGX_IMM16_X1_HW2_LAST 49 /* X1 pipe last hword 2 */ #define R_TILEGX_IMM16_X0_HW0_PCREL 50 /* X0 pipe PC relative hword 0 */ #define R_TILEGX_IMM16_X1_HW0_PCREL 51 /* X1 pipe PC relative hword 0 */ #define R_TILEGX_IMM16_X0_HW1_PCREL 52 /* X0 pipe PC relative hword 1 */ #define R_TILEGX_IMM16_X1_HW1_PCREL 53 /* X1 pipe PC relative hword 1 */ #define R_TILEGX_IMM16_X0_HW2_PCREL 54 /* X0 pipe PC relative hword 2 */ #define R_TILEGX_IMM16_X1_HW2_PCREL 55 /* X1 pipe PC relative hword 2 */ #define R_TILEGX_IMM16_X0_HW3_PCREL 56 /* X0 pipe PC relative hword 3 */ #define R_TILEGX_IMM16_X1_HW3_PCREL 57 /* X1 pipe PC relative hword 3 */ #define R_TILEGX_IMM16_X0_HW0_LAST_PCREL 58 /* X0 pipe PC-rel last hword 0 */ #define R_TILEGX_IMM16_X1_HW0_LAST_PCREL 59 /* X1 pipe PC-rel last hword 0 */ #define R_TILEGX_IMM16_X0_HW1_LAST_PCREL 60 /* X0 pipe PC-rel last hword 1 */ #define R_TILEGX_IMM16_X1_HW1_LAST_PCREL 61 /* X1 pipe PC-rel last hword 1 */ #define R_TILEGX_IMM16_X0_HW2_LAST_PCREL 62 /* X0 pipe PC-rel last hword 2 */ #define R_TILEGX_IMM16_X1_HW2_LAST_PCREL 63 /* X1 pipe PC-rel last hword 2 */ #define R_TILEGX_IMM16_X0_HW0_GOT 64 /* X0 pipe hword 0 GOT offset */ #define R_TILEGX_IMM16_X1_HW0_GOT 65 /* X1 pipe hword 0 GOT offset */ #define R_TILEGX_IMM16_X0_HW0_PLT_PCREL 66 /* X0 pipe PC-rel PLT hword 0 */ #define R_TILEGX_IMM16_X1_HW0_PLT_PCREL 67 /* X1 pipe PC-rel PLT hword 0 */ #define R_TILEGX_IMM16_X0_HW1_PLT_PCREL 68 /* X0 pipe PC-rel PLT hword 1 */ #define R_TILEGX_IMM16_X1_HW1_PLT_PCREL 69 /* X1 pipe PC-rel PLT hword 1 */ #define R_TILEGX_IMM16_X0_HW2_PLT_PCREL 70 /* X0 pipe PC-rel PLT hword 2 */ #define R_TILEGX_IMM16_X1_HW2_PLT_PCREL 71 /* X1 pipe PC-rel PLT hword 2 */ #define R_TILEGX_IMM16_X0_HW0_LAST_GOT 72 /* X0 pipe last hword 0 GOT offset */ #define R_TILEGX_IMM16_X1_HW0_LAST_GOT 73 /* X1 pipe last hword 0 GOT offset */ #define R_TILEGX_IMM16_X0_HW1_LAST_GOT 74 /* X0 pipe last hword 1 GOT offset */ #define R_TILEGX_IMM16_X1_HW1_LAST_GOT 75 /* X1 pipe last hword 1 GOT offset */ #define R_TILEGX_IMM16_X0_HW3_PLT_PCREL 76 /* X0 pipe PC-rel PLT hword 3 */ #define R_TILEGX_IMM16_X1_HW3_PLT_PCREL 77 /* X1 pipe PC-rel PLT hword 3 */ #define R_TILEGX_IMM16_X0_HW0_TLS_GD 78 /* X0 pipe hword 0 TLS GD offset */ #define R_TILEGX_IMM16_X1_HW0_TLS_GD 79 /* X1 pipe hword 0 TLS GD offset */ #define R_TILEGX_IMM16_X0_HW0_TLS_LE 80 /* X0 pipe hword 0 TLS LE offset */ #define R_TILEGX_IMM16_X1_HW0_TLS_LE 81 /* X1 pipe hword 0 TLS LE offset */ #define R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE 82 /* X0 pipe last hword 0 LE off */ #define R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE 83 /* X1 pipe last hword 0 LE off */ #define R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE 84 /* X0 pipe last hword 1 LE off */ #define R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE 85 /* X1 pipe last hword 1 LE off */ #define R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD 86 /* X0 pipe last hword 0 GD off */ #define R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD 87 /* X1 pipe last hword 0 GD off */ #define R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD 88 /* X0 pipe last hword 1 GD off */ #define R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD 89 /* X1 pipe last hword 1 GD off */ /* Relocs 90-91 are currently not defined. */ #define R_TILEGX_IMM16_X0_HW0_TLS_IE 92 /* X0 pipe hword 0 TLS IE offset */ #define R_TILEGX_IMM16_X1_HW0_TLS_IE 93 /* X1 pipe hword 0 TLS IE offset */ #define R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL 94 /* X0 pipe PC-rel PLT last hword 0 */ #define R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL 95 /* X1 pipe PC-rel PLT last hword 0 */ #define R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL 96 /* X0 pipe PC-rel PLT last hword 1 */ #define R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL 97 /* X1 pipe PC-rel PLT last hword 1 */ #define R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL 98 /* X0 pipe PC-rel PLT last hword 2 */ #define R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL 99 /* X1 pipe PC-rel PLT last hword 2 */ #define R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE 100 /* X0 pipe last hword 0 IE off */ #define R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE 101 /* X1 pipe last hword 0 IE off */ #define R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE 102 /* X0 pipe last hword 1 IE off */ #define R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE 103 /* X1 pipe last hword 1 IE off */ /* Relocs 104-105 are currently not defined. */ #define R_TILEGX_TLS_DTPMOD64 106 /* 64-bit ID of symbol's module */ #define R_TILEGX_TLS_DTPOFF64 107 /* 64-bit offset in TLS block */ #define R_TILEGX_TLS_TPOFF64 108 /* 64-bit offset in static TLS block */ #define R_TILEGX_TLS_DTPMOD32 109 /* 32-bit ID of symbol's module */ #define R_TILEGX_TLS_DTPOFF32 110 /* 32-bit offset in TLS block */ #define R_TILEGX_TLS_TPOFF32 111 /* 32-bit offset in static TLS block */ #define R_TILEGX_TLS_GD_CALL 112 /* "jal" for TLS GD */ #define R_TILEGX_IMM8_X0_TLS_GD_ADD 113 /* X0 pipe "addi" for TLS GD */ #define R_TILEGX_IMM8_X1_TLS_GD_ADD 114 /* X1 pipe "addi" for TLS GD */ #define R_TILEGX_IMM8_Y0_TLS_GD_ADD 115 /* Y0 pipe "addi" for TLS GD */ #define R_TILEGX_IMM8_Y1_TLS_GD_ADD 116 /* Y1 pipe "addi" for TLS GD */ #define R_TILEGX_TLS_IE_LOAD 117 /* "ld_tls" for TLS IE */ #define R_TILEGX_IMM8_X0_TLS_ADD 118 /* X0 pipe "addi" for TLS GD/IE */ #define R_TILEGX_IMM8_X1_TLS_ADD 119 /* X1 pipe "addi" for TLS GD/IE */ #define R_TILEGX_IMM8_Y0_TLS_ADD 120 /* Y0 pipe "addi" for TLS GD/IE */ #define R_TILEGX_IMM8_Y1_TLS_ADD 121 /* Y1 pipe "addi" for TLS GD/IE */ #define R_TILEGX_GNU_VTINHERIT 128 /* GNU C++ vtable hierarchy */ #define R_TILEGX_GNU_VTENTRY 129 /* GNU C++ vtable member usage */ #define R_TILEGX_NUM 130 /* RISC-V ELF Flags */ #define EF_RISCV_RVC 0x0001 #define EF_RISCV_FLOAT_ABI 0x0006 #define EF_RISCV_FLOAT_ABI_SOFT 0x0000 #define EF_RISCV_FLOAT_ABI_SINGLE 0x0002 #define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004 #define EF_RISCV_FLOAT_ABI_QUAD 0x0006 /* RISC-V relocations. */ #define R_RISCV_NONE 0 #define R_RISCV_32 1 #define R_RISCV_64 2 #define R_RISCV_RELATIVE 3 #define R_RISCV_COPY 4 #define R_RISCV_JUMP_SLOT 5 #define R_RISCV_TLS_DTPMOD32 6 #define R_RISCV_TLS_DTPMOD64 7 #define R_RISCV_TLS_DTPREL32 8 #define R_RISCV_TLS_DTPREL64 9 #define R_RISCV_TLS_TPREL32 10 #define R_RISCV_TLS_TPREL64 11 #define R_RISCV_BRANCH 16 #define R_RISCV_JAL 17 #define R_RISCV_CALL 18 #define R_RISCV_CALL_PLT 19 #define R_RISCV_GOT_HI20 20 #define R_RISCV_TLS_GOT_HI20 21 #define R_RISCV_TLS_GD_HI20 22 #define R_RISCV_PCREL_HI20 23 #define R_RISCV_PCREL_LO12_I 24 #define R_RISCV_PCREL_LO12_S 25 #define R_RISCV_HI20 26 #define R_RISCV_LO12_I 27 #define R_RISCV_LO12_S 28 #define R_RISCV_TPREL_HI20 29 #define R_RISCV_TPREL_LO12_I 30 #define R_RISCV_TPREL_LO12_S 31 #define R_RISCV_TPREL_ADD 32 #define R_RISCV_ADD8 33 #define R_RISCV_ADD16 34 #define R_RISCV_ADD32 35 #define R_RISCV_ADD64 36 #define R_RISCV_SUB8 37 #define R_RISCV_SUB16 38 #define R_RISCV_SUB32 39 #define R_RISCV_SUB64 40 #define R_RISCV_GNU_VTINHERIT 41 #define R_RISCV_GNU_VTENTRY 42 #define R_RISCV_ALIGN 43 #define R_RISCV_RVC_BRANCH 44 #define R_RISCV_RVC_JUMP 45 #define R_RISCV_RVC_LUI 46 #define R_RISCV_GPREL_I 47 #define R_RISCV_GPREL_S 48 #define R_RISCV_TPREL_I 49 #define R_RISCV_TPREL_S 50 #define R_RISCV_RELAX 51 #define R_RISCV_SUB6 52 #define R_RISCV_SET6 53 #define R_RISCV_SET8 54 #define R_RISCV_SET16 55 #define R_RISCV_SET32 56 #define R_RISCV_32_PCREL 57 #define R_RISCV_NUM 58 /* BPF specific declarations. */ #define R_BPF_NONE 0 /* No reloc */ #define R_BPF_64_64 1 #define R_BPF_64_32 10 /* Imagination Meta specific relocations. */ #define R_METAG_HIADDR16 0 #define R_METAG_LOADDR16 1 #define R_METAG_ADDR32 2 /* 32bit absolute address */ #define R_METAG_NONE 3 /* No reloc */ #define R_METAG_RELBRANCH 4 #define R_METAG_GETSETOFF 5 /* Backward compatability */ #define R_METAG_REG32OP1 6 #define R_METAG_REG32OP2 7 #define R_METAG_REG32OP3 8 #define R_METAG_REG16OP1 9 #define R_METAG_REG16OP2 10 #define R_METAG_REG16OP3 11 #define R_METAG_REG32OP4 12 #define R_METAG_HIOG 13 #define R_METAG_LOOG 14 #define R_METAG_REL8 15 #define R_METAG_REL16 16 /* GNU */ #define R_METAG_GNU_VTINHERIT 30 #define R_METAG_GNU_VTENTRY 31 /* PIC relocations */ #define R_METAG_HI16_GOTOFF 32 #define R_METAG_LO16_GOTOFF 33 #define R_METAG_GETSET_GOTOFF 34 #define R_METAG_GETSET_GOT 35 #define R_METAG_HI16_GOTPC 36 #define R_METAG_LO16_GOTPC 37 #define R_METAG_HI16_PLT 38 #define R_METAG_LO16_PLT 39 #define R_METAG_RELBRANCH_PLT 40 #define R_METAG_GOTOFF 41 #define R_METAG_PLT 42 #define R_METAG_COPY 43 #define R_METAG_JMP_SLOT 44 #define R_METAG_RELATIVE 45 #define R_METAG_GLOB_DAT 46 /* TLS relocations */ #define R_METAG_TLS_GD 47 #define R_METAG_TLS_LDM 48 #define R_METAG_TLS_LDO_HI16 49 #define R_METAG_TLS_LDO_LO16 50 #define R_METAG_TLS_LDO 51 #define R_METAG_TLS_IE 52 #define R_METAG_TLS_IENONPIC 53 #define R_METAG_TLS_IENONPIC_HI16 54 #define R_METAG_TLS_IENONPIC_LO16 55 #define R_METAG_TLS_TPOFF 56 #define R_METAG_TLS_DTPMOD 57 #define R_METAG_TLS_DTPOFF 58 #define R_METAG_TLS_LE 59 #define R_METAG_TLS_LE_HI16 60 #define R_METAG_TLS_LE_LO16 61 /* NDS32 relocations. */ #define R_NDS32_NONE 0 #define R_NDS32_32_RELA 20 #define R_NDS32_COPY 39 #define R_NDS32_GLOB_DAT 40 #define R_NDS32_JMP_SLOT 41 #define R_NDS32_RELATIVE 42 #define R_NDS32_TLS_TPOFF 102 #define R_NDS32_TLS_DESC 119 __END_DECLS #endif /* elf.h */ PKZԊ sys/file.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_FILE_H #define _SYS_FILE_H 1 #include #ifndef _FCNTL_H # include #endif __BEGIN_DECLS /* Alternate names for values for the WHENCE argument to `lseek'. These are the same as SEEK_SET, SEEK_CUR, and SEEK_END, respectively. */ #ifndef L_SET # define L_SET 0 /* Seek from beginning of file. */ # define L_INCR 1 /* Seek from current position. */ # define L_XTND 2 /* Seek from end of file. */ #endif /* Operations for the `flock' call. */ #define LOCK_SH 1 /* Shared lock. */ #define LOCK_EX 2 /* Exclusive lock. */ #define LOCK_UN 8 /* Unlock. */ /* Can be OR'd in to one of the above. */ #define LOCK_NB 4 /* Don't block when locking. */ /* Apply or remove an advisory lock, according to OPERATION, on the file FD refers to. */ extern int flock (int __fd, int __operation) __THROW; __END_DECLS #endif /* sys/file.h */ PKZ M sys/vfs.hnu[/* Other systems declare `struct statfs' et al in , so we have this file to be compatible with programs expecting it. */ #include PKZ,X++ sys/mtio.hnu[/* Structures and definitions for magnetic tape I/O control commands. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Written by H. Bergman . */ #ifndef _SYS_MTIO_H #define _SYS_MTIO_H 1 /* Get necessary definitions from system and kernel headers. */ #include #include /* Structure for MTIOCTOP - magnetic tape operation command. */ struct mtop { short int mt_op; /* Operations defined below. */ int mt_count; /* How many of them. */ }; #define _IOT_mtop /* Hurd ioctl type field. */ \ _IOT (_IOTS (short), 1, _IOTS (int), 1, 0, 0) /* Magnetic Tape operations [Not all operations supported by all drivers]. */ #define MTRESET 0 /* +reset drive in case of problems. */ #define MTFSF 1 /* Forward space over FileMark, * position at first record of next file. */ #define MTBSF 2 /* Backward space FileMark (position before FM). */ #define MTFSR 3 /* Forward space record. */ #define MTBSR 4 /* Backward space record. */ #define MTWEOF 5 /* Write an end-of-file record (mark). */ #define MTREW 6 /* Rewind. */ #define MTOFFL 7 /* Rewind and put the drive offline (eject?). */ #define MTNOP 8 /* No op, set status only (read with MTIOCGET). */ #define MTRETEN 9 /* Retension tape. */ #define MTBSFM 10 /* +backward space FileMark, position at FM. */ #define MTFSFM 11 /* +forward space FileMark, position at FM. */ #define MTEOM 12 /* Goto end of recorded media (for appending files). MTEOM positions after the last FM, ready for appending another file. */ #define MTERASE 13 /* Erase tape -- be careful! */ #define MTRAS1 14 /* Run self test 1 (nondestructive). */ #define MTRAS2 15 /* Run self test 2 (destructive). */ #define MTRAS3 16 /* Reserved for self test 3. */ #define MTSETBLK 20 /* Set block length (SCSI). */ #define MTSETDENSITY 21 /* Set tape density (SCSI). */ #define MTSEEK 22 /* Seek to block (Tandberg, etc.). */ #define MTTELL 23 /* Tell block (Tandberg, etc.). */ #define MTSETDRVBUFFER 24 /* Set the drive buffering according to SCSI-2. Ordinary buffered operation with code 1. */ #define MTFSS 25 /* Space forward over setmarks. */ #define MTBSS 26 /* Space backward over setmarks. */ #define MTWSM 27 /* Write setmarks. */ #define MTLOCK 28 /* Lock the drive door. */ #define MTUNLOCK 29 /* Unlock the drive door. */ #define MTLOAD 30 /* Execute the SCSI load command. */ #define MTUNLOAD 31 /* Execute the SCSI unload command. */ #define MTCOMPRESSION 32/* Control compression with SCSI mode page 15. */ #define MTSETPART 33 /* Change the active tape partition. */ #define MTMKPART 34 /* Format the tape with one or two partitions. */ /* structure for MTIOCGET - mag tape get status command */ struct mtget { long int mt_type; /* Type of magtape device. */ long int mt_resid; /* Residual count: (not sure) number of bytes ignored, or number of files not skipped, or number of records not skipped. */ /* The following registers are device dependent. */ long int mt_dsreg; /* Status register. */ long int mt_gstat; /* Generic (device independent) status. */ long int mt_erreg; /* Error register. */ /* The next two fields are not always used. */ __daddr_t mt_fileno; /* Number of current file on tape. */ __daddr_t mt_blkno; /* Current block number. */ }; #define _IOT_mtget /* Hurd ioctl type field. */ \ _IOT (_IOTS (long), 7, 0, 0, 0, 0) /* Constants for mt_type. Not all of these are supported, and these are not all of the ones that are supported. */ #define MT_ISUNKNOWN 0x01 #define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer. */ #define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02. */ #define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02?. */ #define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?). */ #define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24. */ #define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02. */ #define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L. */ #define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L. */ #define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller. */ #define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features. */ #define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24. */ #define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type). */ #define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40). */ #define MT_ISDDS1 0x51 /* DDS device without partitions. */ #define MT_ISDDS2 0x52 /* DDS device with partitions. */ #define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit. */ #define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit. */ /* QIC-40/80/3010/3020 ftape supported drives. 20bit vendor ID + 0x800000 (see vendors.h in ftape distribution). */ #define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ #define MT_ISFTAPE_FLAG 0x800000 struct mt_tape_info { long int t_type; /* Device type id (mt_type). */ char *t_name; /* Descriptive name. */ }; #define MT_TAPE_INFO \ { \ {MT_ISUNKNOWN, "Unknown type of tape device"}, \ {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \ {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \ {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \ {MT_ISCMSJ500, "CMS Jumbo 500"}, \ {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \ {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \ {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \ {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \ {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \ {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \ {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \ {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \ {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \ {MT_ISSCSI1, "Generic SCSI-1 tape"}, \ {MT_ISSCSI2, "Generic SCSI-2 tape"}, \ {0, NULL} \ } /* Structure for MTIOCPOS - mag tape get position command. */ struct mtpos { long int mt_blkno; /* Current block number. */ }; #define _IOT_mtpos /* Hurd ioctl type field. */ \ _IOT_SIMPLE (long) /* Structure for MTIOCGETCONFIG/MTIOCSETCONFIG primarily intended as an interim solution for QIC-02 until DDI is fully implemented. */ struct mtconfiginfo { long int mt_type; /* Drive type. */ long int ifc_type; /* Interface card type. */ unsigned short int irqnr; /* IRQ number to use. */ unsigned short int dmanr; /* DMA channel to use. */ unsigned short int port; /* IO port base address. */ unsigned long int debug; /* Debugging flags. */ unsigned have_dens:1; unsigned have_bsf:1; unsigned have_fsr:1; unsigned have_bsr:1; unsigned have_eod:1; unsigned have_seek:1; unsigned have_tell:1; unsigned have_ras1:1; unsigned have_ras2:1; unsigned have_ras3:1; unsigned have_qfa:1; unsigned pad1:5; char reserved[10]; }; #define _IOT_mtconfiginfo /* Hurd ioctl type field. */ \ _IOT (_IOTS (long), 2, _IOTS (short), 3, _IOTS (long), 1) /* XXX wrong */ /* Magnetic tape I/O control commands. */ #define MTIOCTOP _IOW('m', 1, struct mtop) /* Do a mag tape op. */ #define MTIOCGET _IOR('m', 2, struct mtget) /* Get tape status. */ #define MTIOCPOS _IOR('m', 3, struct mtpos) /* Get tape position.*/ /* The next two are used by the QIC-02 driver for runtime reconfiguration. See tpqic02.h for struct mtconfiginfo. */ #define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* Get tape config.*/ #define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* Set tape config.*/ /* Generic Mag Tape (device independent) status macros for examining mt_gstat -- HP-UX compatible. There is room for more generic status bits here, but I don't know which of them are reserved. At least three or so should be added to make this really useful. */ #define GMT_EOF(x) ((x) & 0x80000000) #define GMT_BOT(x) ((x) & 0x40000000) #define GMT_EOT(x) ((x) & 0x20000000) #define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */ #define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */ #define GMT_WR_PROT(x) ((x) & 0x04000000) /* #define GMT_ ? ((x) & 0x02000000) */ #define GMT_ONLINE(x) ((x) & 0x01000000) #define GMT_D_6250(x) ((x) & 0x00800000) #define GMT_D_1600(x) ((x) & 0x00400000) #define GMT_D_800(x) ((x) & 0x00200000) /* #define GMT_ ? ((x) & 0x00100000) */ /* #define GMT_ ? ((x) & 0x00080000) */ #define GMT_DR_OPEN(x) ((x) & 0x00040000) /* Door open (no tape). */ /* #define GMT_ ? ((x) & 0x00020000) */ #define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* Immediate report mode.*/ /* 16 generic status bits unused. */ /* SCSI-tape specific definitions. Bitfield shifts in the status */ #define MT_ST_BLKSIZE_SHIFT 0 #define MT_ST_BLKSIZE_MASK 0xffffff #define MT_ST_DENSITY_SHIFT 24 #define MT_ST_DENSITY_MASK 0xff000000 #define MT_ST_SOFTERR_SHIFT 0 #define MT_ST_SOFTERR_MASK 0xffff /* Bitfields for the MTSETDRVBUFFER ioctl. */ #define MT_ST_OPTIONS 0xf0000000 #define MT_ST_BOOLEANS 0x10000000 #define MT_ST_SETBOOLEANS 0x30000000 #define MT_ST_CLEARBOOLEANS 0x40000000 #define MT_ST_WRITE_THRESHOLD 0x20000000 #define MT_ST_DEF_BLKSIZE 0x50000000 #define MT_ST_DEF_OPTIONS 0x60000000 #define MT_ST_BUFFER_WRITES 0x1 #define MT_ST_ASYNC_WRITES 0x2 #define MT_ST_READ_AHEAD 0x4 #define MT_ST_DEBUGGING 0x8 #define MT_ST_TWO_FM 0x10 #define MT_ST_FAST_MTEOM 0x20 #define MT_ST_AUTO_LOCK 0x40 #define MT_ST_DEF_WRITES 0x80 #define MT_ST_CAN_BSR 0x100 #define MT_ST_NO_BLKLIMS 0x200 #define MT_ST_CAN_PARTITIONS 0x400 #define MT_ST_SCSI2LOGICAL 0x800 /* The mode parameters to be controlled. Parameter chosen with bits 20-28. */ #define MT_ST_CLEAR_DEFAULT 0xfffff #define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000) #define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000) #define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000) /* The offset for the arguments for the special HP changer load command. */ #define MT_ST_HPLOADER_OFFSET 10000 /* Specify default tape device. */ #ifndef DEFTAPE # define DEFTAPE "/dev/tape" #endif #endif /* mtio.h */ PKZNX sys/sysinfo.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SYSINFO_H #define _SYS_SYSINFO_H 1 #include /* Get sysinfo structure from kernel header. */ #include __BEGIN_DECLS /* Returns information on overall system statistics. */ extern int sysinfo (struct sysinfo *__info) __THROW; /* Return number of configured processors. */ extern int get_nprocs_conf (void) __THROW; /* Return number of available processors. */ extern int get_nprocs (void) __THROW; /* Return number of physical pages of memory in the system. */ extern long int get_phys_pages (void) __THROW; /* Return number of available physical pages of memory in the system. */ extern long int get_avphys_pages (void) __THROW; __END_DECLS #endif /* sys/sysinfo.h */ PKZkW77 sys/syscall.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYSCALL_H #define _SYSCALL_H 1 /* This file should list the numbers of the system calls the system knows. But instead of duplicating this we use the information available from the kernel sources. */ #include #ifndef _LIBC /* The Linux kernel header file defines macros `__NR_', but some programs expect the traditional form `SYS_'. So in building libc we scan the kernel's list and produce with macros for all the `SYS_' names. */ # include #endif #endif PKZi@ sys/fcntl.hnu[#include PKZt sys/ttydefaults.hnu[/*- * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * (c) UNIX System Laboratories, Inc. * All or some portions of this file are derived from material licensed * to the University of California by American Telephone and Telegraph * Co. or Unix System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 */ /* * System wide defaults for terminal state. Linux version. */ #ifndef _SYS_TTYDEFAULTS_H_ #define _SYS_TTYDEFAULTS_H_ /* * Defaults on "first" open. */ #define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY) #define TTYDEF_OFLAG (OPOST | ONLCR | XTABS) #define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL) #define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL) #define TTYDEF_SPEED (B9600) /* * Control Character Defaults */ #define CTRL(x) (x&037) #define CEOF CTRL('d') #ifdef _POSIX_VDISABLE # define CEOL _POSIX_VDISABLE #else # define CEOL '\0' /* XXX avoid _POSIX_VDISABLE */ #endif #define CERASE 0177 #define CINTR CTRL('c') #ifdef _POSIX_VDISABLE # define CSTATUS _POSIX_VDISABLE #else # define CSTATUS '\0' /* XXX avoid _POSIX_VDISABLE */ #endif #define CKILL CTRL('u') #define CMIN 1 #define CQUIT 034 /* FS, ^\ */ #define CSUSP CTRL('z') #define CTIME 0 #define CDSUSP CTRL('y') #define CSTART CTRL('q') #define CSTOP CTRL('s') #define CLNEXT CTRL('v') #define CDISCARD CTRL('o') #define CWERASE CTRL('w') #define CREPRINT CTRL('r') #define CEOT CEOF /* compat */ #define CBRK CEOL #define CRPRNT CREPRINT #define CFLUSH CDISCARD /* PROTECTED INCLUSION ENDS HERE */ #endif /* !_SYS_TTYDEFAULTS_H_ */ /* * #define TTYDEFCHARS to include an array of default control characters. */ #ifdef TTYDEFCHARS cc_t ttydefchars[NCCS] = { CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT, _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT, CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE }; #undef TTYDEFCHARS #endif PKZT  sys/sendfile.hnu[/* sendfile -- copy data directly from one file descriptor to another Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SENDFILE_H #define _SYS_SENDFILE_H 1 #include #include __BEGIN_DECLS /* Send up to COUNT bytes from file associated with IN_FD starting at *OFFSET to descriptor OUT_FD. Set *OFFSET to the IN_FD's file position following the read bytes. If OFFSET is a null pointer, use the normal file position instead. Return the number of written bytes, or -1 in case of error. */ #ifndef __USE_FILE_OFFSET64 extern ssize_t sendfile (int __out_fd, int __in_fd, off_t *__offset, size_t __count) __THROW; #else # ifdef __REDIRECT_NTH extern ssize_t __REDIRECT_NTH (sendfile, (int __out_fd, int __in_fd, __off64_t *__offset, size_t __count), sendfile64); # else # define sendfile sendfile64 # endif #endif #ifdef __USE_LARGEFILE64 extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset, size_t __count) __THROW; #endif __END_DECLS #endif /* sys/sendfile.h */ PKZI sys/ioctl.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_IOCTL_H #define _SYS_IOCTL_H 1 #include __BEGIN_DECLS /* Get the list of `ioctl' requests and related constants. */ #include /* Define some types used by `ioctl' requests. */ #include /* On a Unix system, the system probably defines some of the symbols we define in (usually with the same values). The code to generate has omitted these symbols to avoid the conflict, but a Unix program expects to define them, so we must include here. */ #include /* Perform the I/O control operation specified by REQUEST on FD. One argument may follow; its presence and type depend on REQUEST. Return value depends on REQUEST. Usually -1 indicates error. */ extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; __END_DECLS #endif /* sys/ioctl.h */ PKZ  sys/fanotify.hnu[/* Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_FANOTIFY_H #define _SYS_FANOTIFY_H 1 #include #include __BEGIN_DECLS /* Create and initialize fanotify group. */ extern int fanotify_init (unsigned int __flags, unsigned int __event_f_flags) __THROW; /* Add, remove, or modify an fanotify mark on a filesystem object. */ extern int fanotify_mark (int __fanotify_fd, unsigned int __flags, uint64_t __mask, int __dfd, const char *__pathname) __THROW; __END_DECLS #endif /* sys/fanotify.h */ PKZ|  sys/psx_syscall.hnu[/* * Copyright (c) 2019 Andrew G. Morgan * * This header, and the -lpsx library, provide a number of things to * support POSIX semantics for syscalls associated with the pthread * library. Linking this code is tricky and is done as follows: * * ld ... -lpsx -lpthread --wrap=pthread_create * or, gcc ... -lpsx -lpthread -Wl,-wrap,pthread_create * * glibc provides a subset of this functionality natively through the * nptl:setxid mechanism and could implement psx_syscall() directly * using that style of functionality but, as of 2019-11-30, the setxid * mechanism is limited to 9 specific set*() syscalls that do not * support the syscall6 API (needed for prctl functions and the ambient * capabilities set for example). */ #ifndef _SYS_PSX_SYSCALL_H #define _SYS_PSX_SYSCALL_H #ifdef __cplusplus extern "C" { #endif #include /* * psx_syscall performs the specified syscall on all psx registered * threads. The mechanism by which this occurs is much less efficient * than a standard system call on Linux, so it should only be used * when POSIX semantics are required to change process relevant * security state. * * Glibc has native support for POSIX semantics on setgroups() and the * 8 set*[gu]id() functions. So, there is no need to use psx_syscall() * for these calls. This call exists for all the other system calls * that need to maintain parity on all pthreads of a program. * * Some macrology is used to allow the caller to provide only as many * arguments as needed, thus psx_syscall() cannot be used as a * function pointer. For those situations, we define psx_syscall3() * and psx_syscall6(). */ #define psx_syscall(syscall_nr, ...) \ __psx_syscall(syscall_nr, __VA_ARGS__, (long int) 6, (long int) 5, \ (long int) 4, (long int) 3, (long int) 2, \ (long int) 1, (long int) 0) long int __psx_syscall(long int syscall_nr, ...); long int psx_syscall3(long int syscall_nr, long int arg1, long int arg2, long int arg3); long int psx_syscall6(long int syscall_nr, long int arg1, long int arg2, long int arg3, long int arg4, long int arg5, long int arg6); /* * This function should be used by systems to obtain pointers to the * two syscall functions provided by the PSX library. A linkage trick * is to define this function as weak in a library that can optionally * use libpsx and then, should the caller link -lpsx, that library can * implicitly use these POSIX semantics syscalls. See libcap for an * example of this useage. */ void psx_load_syscalls(long int (**syscall_fn)(long int, long int, long int, long int), long int (**syscall6_fn)(long int, long int, long int, long int, long int, long int, long int)); #ifdef __cplusplus } #endif #endif /* _SYS_PSX_SYSCALL_H */ PKZ.(= = sys/msg.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MSG_H #define _SYS_MSG_H #include #define __need_size_t #include /* Get common definition of System V style IPC. */ #include /* Get system dependent definition of `struct msqid_ds' and more. */ #include /* Define types required by the standard. */ #include #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif /* The following System V style IPC functions implement a message queue system. The definition is found in XPG2. */ #ifdef __USE_GNU /* Template for struct to be used as argument for `msgsnd' and `msgrcv'. */ struct msgbuf { __syscall_slong_t mtype; /* type of received/sent message */ char mtext[1]; /* text of the message */ }; #endif __BEGIN_DECLS /* Message queue control operation. */ extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW; /* Get messages queue. */ extern int msgget (key_t __key, int __msgflg) __THROW; /* Receive message from message queue. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t msgrcv (int __msqid, void *__msgp, size_t __msgsz, long int __msgtyp, int __msgflg); /* Send message to message queue. This function is a cancellation point and therefore not marked with __THROW. */ extern int msgsnd (int __msqid, const void *__msgp, size_t __msgsz, int __msgflg); __END_DECLS #endif /* sys/msg.h */ PKZƀ"" sys/prctl.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PRCTL_H #define _SYS_PRCTL_H 1 #include #include /* The magic values come from here */ __BEGIN_DECLS /* Control process execution. */ extern int prctl (int __option, ...) __THROW; __END_DECLS #endif /* sys/prctl.h */ PKZю sys/debugreg.hnu[/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_DEBUGREG_H #define _SYS_DEBUGREG_H 1 /* Indicate the register numbers for a number of the specific debug registers. Registers 0-3 contain the addresses we wish to trap on */ #define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */ #define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */ #define DR_STATUS 6 /* u_debugreg[DR_STATUS] */ #define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */ /* Define a few things for the status register. We can use this to determine which debugging register was responsible for the trap. The other bits are either reserved or not of interest to us. */ #define DR_TRAP0 (0x1) /* db0 */ #define DR_TRAP1 (0x2) /* db1 */ #define DR_TRAP2 (0x4) /* db2 */ #define DR_TRAP3 (0x8) /* db3 */ #define DR_STEP (0x4000) /* single-step */ #define DR_SWITCH (0x8000) /* task switch */ /* Now define a bunch of things for manipulating the control register. The top two bytes of the control register consist of 4 fields of 4 bits - each field corresponds to one of the four debug registers, and indicates what types of access we trap on, and how large the data field is that we are looking at */ #define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */ #define DR_CONTROL_SIZE 4 /* 4 control bits per register */ #define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */ #define DR_RW_WRITE (0x1) #define DR_RW_READ (0x3) #define DR_LEN_1 (0x0) /* Settings for data length to trap on */ #define DR_LEN_2 (0x4) #define DR_LEN_4 (0xC) #ifdef __x86_64__ # define DR_LEN_8 (0x8) #endif /* The low byte to the control register determine which registers are enabled. There are 4 fields of two bits. One bit is "local", meaning that the processor will reset the bit after a task switch and the other is global meaning that we have to explicitly reset the bit. With linux, you can use either one, since we explicitly zero the register when we enter kernel mode. */ #define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */ #define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */ #define DR_ENABLE_SIZE 2 /* 2 enable bits per register */ #define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */ #define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */ /* The second byte to the control register has a few special things. */ #ifdef __x86_64__ # define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00ULL) /* Reserved */ #else # define DR_CONTROL_RESERVED (0x00FC00U) /* Reserved */ #endif #define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ #define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ #endif /* sys/debugreg.h */ PKZ sys/mount.hnu[/* Header file for mounting/unmount Linux filesystems. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This is taken from /usr/include/linux/fs.h. */ #ifndef _SYS_MOUNT_H #define _SYS_MOUNT_H 1 #include #include #define BLOCK_SIZE 1024 #define BLOCK_SIZE_BITS 10 /* These are the fs-independent mount-flags: up to 16 flags are supported */ enum { MS_RDONLY = 1, /* Mount read-only. */ #define MS_RDONLY MS_RDONLY MS_NOSUID = 2, /* Ignore suid and sgid bits. */ #define MS_NOSUID MS_NOSUID MS_NODEV = 4, /* Disallow access to device special files. */ #define MS_NODEV MS_NODEV MS_NOEXEC = 8, /* Disallow program execution. */ #define MS_NOEXEC MS_NOEXEC MS_SYNCHRONOUS = 16, /* Writes are synced at once. */ #define MS_SYNCHRONOUS MS_SYNCHRONOUS MS_REMOUNT = 32, /* Alter flags of a mounted FS. */ #define MS_REMOUNT MS_REMOUNT MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ #define MS_MANDLOCK MS_MANDLOCK MS_DIRSYNC = 128, /* Directory modifications are synchronous. */ #define MS_DIRSYNC MS_DIRSYNC MS_NOATIME = 1024, /* Do not update access times. */ #define MS_NOATIME MS_NOATIME MS_NODIRATIME = 2048, /* Do not update directory access times. */ #define MS_NODIRATIME MS_NODIRATIME MS_BIND = 4096, /* Bind directory at different place. */ #define MS_BIND MS_BIND MS_MOVE = 8192, #define MS_MOVE MS_MOVE MS_REC = 16384, #define MS_REC MS_REC MS_SILENT = 32768, #define MS_SILENT MS_SILENT MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */ #define MS_POSIXACL MS_POSIXACL MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */ #define MS_UNBINDABLE MS_UNBINDABLE MS_PRIVATE = 1 << 18, /* Change to private. */ #define MS_PRIVATE MS_PRIVATE MS_SLAVE = 1 << 19, /* Change to slave. */ #define MS_SLAVE MS_SLAVE MS_SHARED = 1 << 20, /* Change to shared. */ #define MS_SHARED MS_SHARED MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */ #define MS_RELATIME MS_RELATIME MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */ #define MS_KERNMOUNT MS_KERNMOUNT MS_I_VERSION = 1 << 23, /* Update inode I_version field. */ #define MS_I_VERSION MS_I_VERSION MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */ #define MS_STRICTATIME MS_STRICTATIME MS_LAZYTIME = 1 << 25, /* Update the on-disk [acm]times lazily. */ #define MS_LAZYTIME MS_LAZYTIME MS_ACTIVE = 1 << 30, #define MS_ACTIVE MS_ACTIVE MS_NOUSER = 1 << 31 #define MS_NOUSER MS_NOUSER }; /* Flags that can be altered by MS_REMOUNT */ #define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION \ |MS_LAZYTIME) /* Magic mount flag number. Has to be or-ed to the flag values. */ #define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */ #define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */ /* The read-only stuff doesn't really belong here, but any other place is probably as bad and I don't want to create yet another include file. */ #define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */ #define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */ #define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */ #define BLKGETSIZE _IO(0x12, 96) /* Return device size. */ #define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */ #define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */ #define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */ #define BLKFRASET _IO(0x12,100) /* Set filesystem read-ahead. */ #define BLKFRAGET _IO(0x12,101) /* Get filesystem read-ahead. */ #define BLKSECTSET _IO(0x12,102) /* Set max sectors per request. */ #define BLKSECTGET _IO(0x12,103) /* Get max sectors per request. */ #define BLKSSZGET _IO(0x12,104) /* Get block device sector size. */ #define BLKBSZGET _IOR(0x12,112,size_t) #define BLKBSZSET _IOW(0x12,113,size_t) #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size. */ /* Possible value for FLAGS parameter of `umount2'. */ enum { MNT_FORCE = 1, /* Force unmounting. */ #define MNT_FORCE MNT_FORCE MNT_DETACH = 2, /* Just detach from the tree. */ #define MNT_DETACH MNT_DETACH MNT_EXPIRE = 4, /* Mark for expiry. */ #define MNT_EXPIRE MNT_EXPIRE UMOUNT_NOFOLLOW = 8 /* Don't follow symlink on umount. */ #define UMOUNT_NOFOLLOW UMOUNT_NOFOLLOW }; __BEGIN_DECLS /* Mount a filesystem. */ extern int mount (const char *__special_file, const char *__dir, const char *__fstype, unsigned long int __rwflag, const void *__data) __THROW; /* Unmount a filesystem. */ extern int umount (const char *__special_file) __THROW; /* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */ extern int umount2 (const char *__special_file, int __flags) __THROW; __END_DECLS #endif /* _SYS_MOUNT_H */ PKZIT sys/vtimes.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_VTIMES_H #define _SYS_VTIMES_H 1 #include __BEGIN_DECLS /* This interface is obsolete; use `getrusage' instead. */ /* Granularity of the `vm_utime' and `vm_stime' fields of a `struct vtimes'. (This is the frequency of the machine's power supply, in Hz.) */ #define VTIMES_UNITS_PER_SECOND 60 struct vtimes { /* User time used in units of 1/VTIMES_UNITS_PER_SECOND seconds. */ int vm_utime; /* System time used in units of 1/VTIMES_UNITS_PER_SECOND seconds. */ int vm_stime; /* Amount of data and stack memory used (kilobyte-seconds). */ unsigned int vm_idsrss; /* Amount of text memory used (kilobyte-seconds). */ unsigned int vm_ixrss; /* Maximum resident set size (text, data, and stack) (kilobytes). */ int vm_maxrss; /* Number of hard page faults (i.e. those that required I/O). */ int vm_majflt; /* Number of soft page faults (i.e. those serviced by reclaiming a page from the list of pages awaiting reallocation. */ int vm_minflt; /* Number of times a process was swapped out of physical memory. */ int vm_nswap; /* Number of input operations via the file system. Note: This and `ru_oublock' do not include operations with the cache. */ int vm_inblk; /* Number of output operations via the file system. */ int vm_oublk; }; /* If CURRENT is not NULL, write statistics for the current process into *CURRENT. If CHILD is not NULL, write statistics for all terminated child processes into *CHILD. Returns 0 for success, -1 for failure. */ extern int vtimes (struct vtimes * __current, struct vtimes * __child) __THROW; __END_DECLS #endif /* sys/vtimes.h */ PKZ sys/ipc.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_IPC_H #define _SYS_IPC_H 1 #include /* Get system dependent definition of `struct ipc_perm' and more. */ #include #include #ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined #endif #ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined #endif #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif #ifndef __key_t_defined typedef __key_t key_t; # define __key_t_defined #endif __BEGIN_DECLS /* Generates key for System V style IPC. */ extern key_t ftok (const char *__pathname, int __proj_id) __THROW; __END_DECLS #endif /* sys/ipc.h */ PKZ{ sys/profil.hnu[/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _PROFIL_H #define _PROFIL_H 1 #include #include #include /* This interface is intended to follow the sprofil() system calls as described by the sprofil(2) man page of Irix v6.5, except that: - there is no a priori limit on number of text sections - pr_scale is declared as unsigned long (instead of "unsigned int") - pr_size is declared as size_t (instead of "unsigned int") - pr_off is declared as void * (instead of "__psunsigned_t") - the overflow bin (pr_base==0, pr_scale==2) can appear anywhere in the profp array - PROF_FAST has no effect */ struct prof { void *pr_base; /* buffer base */ size_t pr_size; /* buffer size */ size_t pr_off; /* pc offset */ unsigned long int pr_scale; /* pc scaling (fixed-point number) */ }; enum { PROF_USHORT = 0, /* use 16-bit counters (default) */ PROF_UINT = 1 << 0, /* use 32-bit counters */ PROF_FAST = 1 << 1 /* profile faster than usual */ }; __BEGIN_DECLS extern int sprofil (struct prof *__profp, int __profcnt, struct timeval *__tvp, unsigned int __flags) __THROW; __END_DECLS #endif /* profil.h */ PKZB. */ #ifndef _SYS_SIGNALFD_H #define _SYS_SIGNALFD_H 1 #include #include /* Get the platform-dependent flags. */ #include struct signalfd_siginfo { uint32_t ssi_signo; int32_t ssi_errno; int32_t ssi_code; uint32_t ssi_pid; uint32_t ssi_uid; int32_t ssi_fd; uint32_t ssi_tid; uint32_t ssi_band; uint32_t ssi_overrun; uint32_t ssi_trapno; int32_t ssi_status; int32_t ssi_int; uint64_t ssi_ptr; uint64_t ssi_utime; uint64_t ssi_stime; uint64_t ssi_addr; uint8_t __pad[48]; }; __BEGIN_DECLS /* Request notification for delivery of signals in MASK to be performed using descriptor FD.*/ extern int signalfd (int __fd, const sigset_t *__mask, int __flags) __THROW __nonnull ((2)); __END_DECLS #endif /* sys/signalfd.h */ PKZ `` sys/timeb.hnu[/* Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_TIMEB_H #define _SYS_TIMEB_H 1 #include #include __BEGIN_DECLS /* Structure returned by the `ftime' function. */ struct timeb { time_t time; /* Seconds since epoch, as from `time'. */ unsigned short int millitm; /* Additional milliseconds. */ short int timezone; /* Minutes west of GMT. */ short int dstflag; /* Nonzero if Daylight Savings Time used. */ }; /* Fill in TIMEBUF with information about the current time. */ extern int ftime (struct timeb *__timebuf); __END_DECLS #endif /* sys/timeb.h */ PKZ fsys/soundcard.hnu[#include PKZU@ sys/sem.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SEM_H #define _SYS_SEM_H 1 #include #define __need_size_t #include /* Get common definition of System V style IPC. */ #include /* Get system dependent definition of `struct semid_ds' and more. */ #include #ifdef __USE_GNU # include #endif /* The following System V style IPC functions implement a semaphore handling. The definition is found in XPG2. */ /* Structure used for argument to `semop' to describe operations. */ struct sembuf { unsigned short int sem_num; /* semaphore number */ short int sem_op; /* semaphore operation */ short int sem_flg; /* operation flag */ }; __BEGIN_DECLS /* Semaphore control operation. */ extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW; /* Get semaphore. */ extern int semget (key_t __key, int __nsems, int __semflg) __THROW; /* Operate on semaphore. */ extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW; #ifdef __USE_GNU /* Operate on semaphore with timeout. */ extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops, const struct timespec *__timeout) __THROW; #endif __END_DECLS #endif /* sys/sem.h */ PKZǝ sys/raw.hnu[/* Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_RAW_H #define _SYS_RAW_H 1 #include #include /* The major device number for raw devices. */ #define RAW_MAJOR 162 /* `ioctl' commands for raw devices. */ #define RAW_SETBIND _IO(0xac, 0) #define RAW_GETBIND _IO(0xac, 1) struct raw_config_request { int raw_minor; uint64_t block_major; uint64_t block_minor; }; #endif /* sys/raw.h */ PKZn-N==sys/resource.hnu[/* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_RESOURCE_H #define _SYS_RESOURCE_H 1 #include /* Get the system-dependent definitions of structures and bit values. */ #include #ifndef __id_t_defined typedef __id_t id_t; # define __id_t_defined #endif __BEGIN_DECLS /* The X/Open standard defines that all the functions below must use `int' as the type for the first argument. When we are compiling with GNU extensions we change this slightly to provide better error checking. */ #if defined __USE_GNU && !defined __cplusplus typedef enum __rlimit_resource __rlimit_resource_t; typedef enum __rusage_who __rusage_who_t; typedef enum __priority_which __priority_which_t; #else typedef int __rlimit_resource_t; typedef int __rusage_who_t; typedef int __priority_which_t; #endif /* Put the soft and hard limits for RESOURCE in *RLIMITS. Returns 0 if successful, -1 if not (and sets errno). */ #ifndef __USE_FILE_OFFSET64 extern int getrlimit (__rlimit_resource_t __resource, struct rlimit *__rlimits) __THROW; #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource, struct rlimit *__rlimits), getrlimit64); # else # define getrlimit getrlimit64 # endif #endif #ifdef __USE_LARGEFILE64 extern int getrlimit64 (__rlimit_resource_t __resource, struct rlimit64 *__rlimits) __THROW; #endif /* Set the soft and hard limits for RESOURCE to *RLIMITS. Only the super-user can increase hard limits. Return 0 if successful, -1 if not (and sets errno). */ #ifndef __USE_FILE_OFFSET64 extern int setrlimit (__rlimit_resource_t __resource, const struct rlimit *__rlimits) __THROW; #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource, const struct rlimit *__rlimits), setrlimit64); # else # define setrlimit setrlimit64 # endif #endif #ifdef __USE_LARGEFILE64 extern int setrlimit64 (__rlimit_resource_t __resource, const struct rlimit64 *__rlimits) __THROW; #endif /* Return resource usage information on process indicated by WHO and put it in *USAGE. Returns 0 for success, -1 for failure. */ extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW; /* Return the highest priority of any process specified by WHICH and WHO (see above); if WHO is zero, the current process, process group, or user (as specified by WHO) is used. A lower priority number means higher priority. Priorities range from PRIO_MIN to PRIO_MAX (above). */ extern int getpriority (__priority_which_t __which, id_t __who) __THROW; /* Set the priority of all processes specified by WHICH and WHO (see above) to PRIO. Returns 0 on success, -1 on errors. */ extern int setpriority (__priority_which_t __which, id_t __who, int __prio) __THROW; __END_DECLS #endif /* sys/resource.h */ PKZ;:: sys/epoll.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_EPOLL_H #define _SYS_EPOLL_H 1 #include #include #include /* Get the platform-dependent flags. */ #include #ifndef __EPOLL_PACKED # define __EPOLL_PACKED #endif enum EPOLL_EVENTS { EPOLLIN = 0x001, #define EPOLLIN EPOLLIN EPOLLPRI = 0x002, #define EPOLLPRI EPOLLPRI EPOLLOUT = 0x004, #define EPOLLOUT EPOLLOUT EPOLLRDNORM = 0x040, #define EPOLLRDNORM EPOLLRDNORM EPOLLRDBAND = 0x080, #define EPOLLRDBAND EPOLLRDBAND EPOLLWRNORM = 0x100, #define EPOLLWRNORM EPOLLWRNORM EPOLLWRBAND = 0x200, #define EPOLLWRBAND EPOLLWRBAND EPOLLMSG = 0x400, #define EPOLLMSG EPOLLMSG EPOLLERR = 0x008, #define EPOLLERR EPOLLERR EPOLLHUP = 0x010, #define EPOLLHUP EPOLLHUP EPOLLRDHUP = 0x2000, #define EPOLLRDHUP EPOLLRDHUP EPOLLEXCLUSIVE = 1u << 28, #define EPOLLEXCLUSIVE EPOLLEXCLUSIVE EPOLLWAKEUP = 1u << 29, #define EPOLLWAKEUP EPOLLWAKEUP EPOLLONESHOT = 1u << 30, #define EPOLLONESHOT EPOLLONESHOT EPOLLET = 1u << 31 #define EPOLLET EPOLLET }; /* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */ #define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */ #define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */ #define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */ typedef union epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */ } __EPOLL_PACKED; __BEGIN_DECLS /* Creates an epoll instance. Returns an fd for the new instance. The "size" parameter is a hint specifying the number of file descriptors to be associated with the new instance. The fd returned by epoll_create() should be closed with close(). */ extern int epoll_create (int __size) __THROW; /* Same as epoll_create but with an FLAGS parameter. The unused SIZE parameter has been dropped. */ extern int epoll_create1 (int __flags) __THROW; /* Manipulate an epoll instance "epfd". Returns 0 in case of success, -1 in case of error ( the "errno" variable will contain the specific error code ) The "op" parameter is one of the EPOLL_CTL_* constants defined above. The "fd" parameter is the target of the operation. The "event" parameter describes which events the caller is interested in and any associated user data. */ extern int epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event) __THROW; /* Wait for events on an epoll instance "epfd". Returns the number of triggered events returned in "events" buffer. Or -1 in case of error with the "errno" variable set to the specific error code. The "events" parameter is a buffer that will contain triggered events. The "maxevents" is the maximum number of events to be returned ( usually size of "events" ). The "timeout" parameter specifies the maximum wait time in milliseconds (-1 == infinite). This function is a cancellation point and therefore not marked with __THROW. */ extern int epoll_wait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout); /* Same as epoll_wait, but the thread's signal mask is temporarily and atomically replaced with the one provided as parameter. This function is a cancellation point and therefore not marked with __THROW. */ extern int epoll_pwait (int __epfd, struct epoll_event *__events, int __maxevents, int __timeout, const __sigset_t *__ss); __END_DECLS #endif /* sys/epoll.h */ PKZN sys/random.hnu[/* Interfaces for obtaining random bytes. Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_RANDOM_H #define _SYS_RANDOM_H 1 #include #include /* Flags for use with getrandom. */ #define GRND_NONBLOCK 0x01 #define GRND_RANDOM 0x02 __BEGIN_DECLS /* Write LENGTH bytes of randomness starting at BUFFER. Return the number of bytes written, or -1 on error. */ ssize_t getrandom (void *__buffer, size_t __length, unsigned int __flags) __wur; /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success or -1 on error. */ int getentropy (void *__buffer, size_t __length) __wur; __END_DECLS #endif /* _SYS_RANDOM_H */ PKZm sys/dir.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_DIR_H #define _SYS_DIR_H 1 #include #include #define direct dirent #endif /* sys/dir.h */ PKZ^oa4PP sys/cdefs.hnu[/* Copyright (C) 1992-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_CDEFS_H #define _SYS_CDEFS_H 1 /* We are almost always included from features.h. */ #ifndef _FEATURES_H # include #endif /* The GNU libc does not support any K&R compilers or the traditional mode of ISO C compilers anymore. Check for some of the combinations not anymore supported. */ #if defined __GNUC__ && !defined __STDC__ # error "You need a ISO C conforming compiler to use the glibc headers" #endif /* Some user header file might have defined this before. */ #undef __P #undef __PMT #ifdef __GNUC__ /* All functions, except those with callbacks or those that synchronize memory, are leaf functions. */ # if __GNUC_PREREQ (4, 6) && !defined _LIBC # define __LEAF , __leaf__ # define __LEAF_ATTR __attribute__ ((__leaf__)) # else # define __LEAF # define __LEAF_ATTR # endif /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ # if !defined __cplusplus && __GNUC_PREREQ (3, 3) # define __THROW __attribute__ ((__nothrow__ __LEAF)) # define __THROWNL __attribute__ ((__nothrow__)) # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct # else # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # define __THROWNL throw () # define __NTH(fct) __LEAF_ATTR fct throw () # define __NTHNL(fct) fct throw () # else # define __THROW # define __THROWNL # define __NTH(fct) fct # define __NTHNL(fct) fct # endif # endif #else /* Not GCC. */ # if (defined __cplusplus \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) # define __inline inline # else # define __inline /* No inline functions. */ # endif # define __THROW # define __THROWNL # define __NTH(fct) fct #endif /* GCC. */ /* Compilers that are not clang may object to #if defined __clang__ && __has_extension(...) even though they do not need to evaluate the right-hand side of the &&. */ #if defined __clang__ && defined __has_extension # define __glibc_clang_has_extension(ext) __has_extension (ext) #else # define __glibc_clang_has_extension(ext) 0 #endif /* These two macros are not used in glibc anymore. They are kept here only because some other projects expect the macros to be defined. */ #define __P(args) args #define __PMT(args) args /* For these things, GCC behaves the ANSI way normally, and the non-ANSI way under -traditional. */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x /* This is not a typedef so `const __ptr_t' does the right thing. */ #define __ptr_t void * /* C++ needs to know that types and declarations are C, not C++. */ #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS # define __END_DECLS #endif /* Fortify support. */ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) /* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ #if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \ || __GNUC_PREREQ (12, 0)) # define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) # define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) #else # define __glibc_objsize0(__o) __bos0 (__o) # define __glibc_objsize(__o) __bos (__o) #endif #if __USE_FORTIFY_LEVEL > 0 /* Compile time conditions to choose between the regular, _chk and _chk_warn variants. These conditions should get evaluated to constant and optimized away. */ #define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s)) #define __glibc_unsigned_or_positive(__l) \ ((__typeof (__l)) 0 < (__typeof (__l)) -1 \ || (__builtin_constant_p (__l) && (__l) > 0)) /* Length is known to be safe at compile time if the __L * __S <= __OBJSZ condition can be folded to a constant and if it is true, or unknown (-1) */ #define __glibc_safe_or_unknown_len(__l, __s, __osz) \ ((__builtin_constant_p (__osz) && (__osz) == (__SIZE_TYPE__) -1) \ || (__glibc_unsigned_or_positive (__l) \ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ (__s), (__osz))) \ && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz)))) /* Conversely, we know at compile time that the length is unsafe if the __L * __S <= __OBJSZ condition can be folded to a constant and if it is false. */ #define __glibc_unsafe_len(__l, __s, __osz) \ (__glibc_unsigned_or_positive (__l) \ && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ __s, __osz)) \ && !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) /* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be declared. */ #define __glibc_fortify(f, __l, __s, __osz, ...) \ (__glibc_safe_or_unknown_len (__l, __s, __osz) \ ? __ ## f ## _alias (__VA_ARGS__) \ : (__glibc_unsafe_len (__l, __s, __osz) \ ? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \ : __ ## f ## _chk (__VA_ARGS__, __osz))) /* Fortify function f, where object size argument passed to f is the number of elements and not total size. */ #define __glibc_fortify_n(f, __l, __s, __osz, ...) \ (__glibc_safe_or_unknown_len (__l, __s, __osz) \ ? __ ## f ## _alias (__VA_ARGS__) \ : (__glibc_unsafe_len (__l, __s, __osz) \ ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \ : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) #endif #if __GNUC_PREREQ (4,3) # define __warndecl(name, msg) \ extern void name (void) __attribute__((__warning__ (msg))) # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg))) #else # define __warndecl(name, msg) extern void name (void) # define __warnattr(msg) # define __errordecl(name, msg) extern void name (void) #endif /* Support for flexible arrays. Headers that should use flexible arrays only if they're "real" (e.g. only if they won't affect sizeof()) should test #if __glibc_c99_flexarr_available. */ #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __flexarr [] # define __glibc_c99_flexarr_available 1 #elif __GNUC_PREREQ (2,97) /* GCC 2.97 supports C99 flexible array members as an extension, even when in C89 mode or compiling C++ (any version). */ # define __flexarr [] # define __glibc_c99_flexarr_available 1 #elif defined __GNUC__ /* Pre-2.97 GCC did not support C99 flexible arrays but did have an equivalent extension with slightly different notation. */ # define __flexarr [0] # define __glibc_c99_flexarr_available 1 #else /* Some other non-C99 compiler. Approximate with [1]. */ # define __flexarr [1] # define __glibc_c99_flexarr_available 0 #endif /* __asm__ ("xyz") is used throughout the headers to rename functions at the assembly language level. This is wrapped by the __REDIRECT macro, in order to support compilers that can do this some other way. When compilers don't support asm-names at all, we have to do preprocessor tricks instead (which don't have exactly the right semantics, but it's the best we can do). Example: int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ #if defined __GNUC__ && __GNUC__ >= 2 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) # ifdef __cplusplus # define __REDIRECT_NTH(name, proto, alias) \ name proto __THROW __asm__ (__ASMNAME (#alias)) # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __THROWNL __asm__ (__ASMNAME (#alias)) # else # define __REDIRECT_NTH(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROW # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROWNL # endif # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) # define __ASMNAME2(prefix, cname) __STRING (prefix) cname /* #elif __SOME_OTHER_COMPILER__ # define __REDIRECT(name, proto, alias) name proto; \ _Pragma("let " #name " = " #alias) */ #endif /* GCC has various useful declarations that can be made with the `__attribute__' syntax. All of the ways we use this do fine if they are omitted for compilers that don't understand it. */ #if !defined __GNUC__ || __GNUC__ < 2 # define __attribute__(xyz) /* Ignore */ #endif /* At some point during the gcc 2.96 development the `malloc' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (2,96) # define __attribute_malloc__ __attribute__ ((__malloc__)) #else # define __attribute_malloc__ /* Ignore */ #endif /* Tell the compiler which arguments to an allocation function indicate the size of the allocation. */ #if __GNUC_PREREQ (4, 3) # define __attribute_alloc_size__(params) \ __attribute__ ((__alloc_size__ params)) #else # define __attribute_alloc_size__(params) /* Ignore. */ #endif /* At some point during the gcc 2.96 development the `pure' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (2,96) # define __attribute_pure__ __attribute__ ((__pure__)) #else # define __attribute_pure__ /* Ignore */ #endif /* This declaration tells the compiler that the value is constant. */ #if __GNUC_PREREQ (2,5) # define __attribute_const__ __attribute__ ((__const__)) #else # define __attribute_const__ /* Ignore */ #endif /* At some point during the gcc 3.1 development the `used' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (3,1) # define __attribute_used__ __attribute__ ((__used__)) # define __attribute_noinline__ __attribute__ ((__noinline__)) #else # define __attribute_used__ __attribute__ ((__unused__)) # define __attribute_noinline__ /* Ignore */ #endif /* Since version 3.2, gcc allows marking deprecated functions. */ #if __GNUC_PREREQ (3,2) # define __attribute_deprecated__ __attribute__ ((__deprecated__)) #else # define __attribute_deprecated__ /* Ignore */ #endif /* Since version 4.5, gcc also allows one to specify the message printed when a deprecated function is used. clang claims to be gcc 4.2, but may also support this feature. */ #if __GNUC_PREREQ (4,5) || \ __glibc_clang_has_extension (__attribute_deprecated_with_message__) # define __attribute_deprecated_msg__(msg) \ __attribute__ ((__deprecated__ (msg))) #else # define __attribute_deprecated_msg__(msg) __attribute_deprecated__ #endif /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. If several `format_arg' attributes are given for the same function, in gcc-3.0 and older, all but the last one are ignored. In newer gccs, all designated arguments are considered. */ #if __GNUC_PREREQ (2,8) # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) #else # define __attribute_format_arg__(x) /* Ignore */ #endif /* At some point during the gcc 2.97 development the `strfmon' format attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (2,97) # define __attribute_format_strfmon__(a,b) \ __attribute__ ((__format__ (__strfmon__, a, b))) #else # define __attribute_format_strfmon__(a,b) /* Ignore */ #endif /* The nonull function attribute allows to mark pointer parameters which must not be NULL. */ #if __GNUC_PREREQ (3,3) # define __nonnull(params) __attribute__ ((__nonnull__ params)) #else # define __nonnull(params) #endif /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ #if __GNUC_PREREQ (3,4) # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) # if __USE_FORTIFY_LEVEL > 0 # define __wur __attribute_warn_unused_result__ # endif #else # define __attribute_warn_unused_result__ /* empty */ #endif #ifndef __wur # define __wur /* Ignore */ #endif /* Forces a function to be always inlined. */ #if __GNUC_PREREQ (3,2) /* The Linux kernel defines __always_inline in stddef.h (283d7573), and it conflicts with this definition. Therefore undefine it first to allow either header to be included first. */ # undef __always_inline # define __always_inline __inline __attribute__ ((__always_inline__)) #else # undef __always_inline # define __always_inline __inline #endif /* Associate error messages with the source location of the call site rather than with the source location inside the function. */ #if __GNUC_PREREQ (4,3) # define __attribute_artificial__ __attribute__ ((__artificial__)) #else # define __attribute_artificial__ /* Ignore */ #endif /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions older than 4.3 may define these macros and still not guarantee GNU inlining semantics. clang++ identifies itself as gcc-4.2, but has support for GNU inlining semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and __GNUC_GNU_INLINE__ macro definitions. */ #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ || defined __GNUC_GNU_INLINE__))) # if defined __GNUC_STDC_INLINE__ || defined __cplusplus # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # define __extern_always_inline \ extern __always_inline __attribute__ ((__gnu_inline__)) # else # define __extern_inline extern __inline # define __extern_always_inline extern __always_inline # endif #endif #ifdef __extern_always_inline # define __fortify_function __extern_always_inline __attribute_artificial__ #endif /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ #if __GNUC_PREREQ (4,3) # define __va_arg_pack() __builtin_va_arg_pack () # define __va_arg_pack_len() __builtin_va_arg_pack_len () #endif /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ #if !__GNUC_PREREQ (2,8) # define __extension__ /* Ignore */ #endif /* __restrict is known in EGCS 1.2 and above. */ #if !__GNUC_PREREQ (2,92) # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __restrict restrict # else # define __restrict /* Ignore */ # endif #endif /* ISO C99 also allows to declare arrays as non-overlapping. The syntax is array_name[restrict] GCC 3.1 supports this. */ #if __GNUC_PREREQ (3,1) && !defined __GNUG__ # define __restrict_arr __restrict #else # ifdef __GNUC__ # define __restrict_arr /* Not supported in old GCC. */ # else # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __restrict_arr restrict # else /* Some other non-C99 compiler. */ # define __restrict_arr /* Not supported. */ # endif # endif #endif #if __GNUC__ >= 3 # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # define __glibc_likely(cond) __builtin_expect ((cond), 1) #else # define __glibc_unlikely(cond) (cond) # define __glibc_likely(cond) (cond) #endif #ifdef __has_attribute # define __glibc_has_attribute(attr) __has_attribute (attr) #else # define __glibc_has_attribute(attr) 0 #endif #if (!defined _Noreturn \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && !__GNUC_PREREQ (4,7)) # if __GNUC_PREREQ (2,8) # define _Noreturn __attribute__ ((__noreturn__)) # else # define _Noreturn # endif #endif #if __GNUC_PREREQ (8, 0) /* Describes a char array whose address can safely be passed as the first argument to strncpy and strncat, as the char array is not necessarily a NUL-terminated string. */ # define __attribute_nonstring__ __attribute__ ((__nonstring__)) #else # define __attribute_nonstring__ #endif #if (!defined _Static_assert && !defined __cplusplus \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) # define _Static_assert(expr, diagnostic) \ extern int (*__Static_assert_function (void)) \ [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] #endif #include #include #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH # define __LDBL_COMPAT 1 # ifdef __REDIRECT # define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) # define __LDBL_REDIR(name, proto) \ __LDBL_REDIR1 (name, proto, __nldbl_##name) # define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) # define __LDBL_REDIR_NTH(name, proto) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) # define __LDBL_REDIR1_DECL(name, alias) \ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR_DECL(name) \ extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name)); # define __REDIRECT_LDBL(name, proto, alias) \ __LDBL_REDIR1 (name, proto, __nldbl_##alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) # endif #endif #if !defined __LDBL_COMPAT || !defined __REDIRECT # define __LDBL_REDIR1(name, proto, alias) name proto # define __LDBL_REDIR(name, proto) name proto # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW # define __LDBL_REDIR_NTH(name, proto) name proto __THROW # define __LDBL_REDIR_DECL(name) # ifdef __REDIRECT # define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __REDIRECT_NTH (name, proto, alias) # endif #endif /* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is intended for use in preprocessor macros. Note: MESSAGE must be a _single_ string; concatenation of string literals is not supported. */ #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5) # define __glibc_macro_warning1(message) _Pragma (#message) # define __glibc_macro_warning(message) \ __glibc_macro_warning1 (GCC warning message) #else # define __glibc_macro_warning(msg) #endif /* Generic selection (ISO C11) is a C-only feature, available in GCC since version 4.9. Previous versions do not provide generic selection, even though they might set __STDC_VERSION__ to 201112L, when in -std=c11 mode. Thus, we must check for !defined __GNUC__ when testing __STDC_VERSION__ for generic selection support. On the other hand, Clang also defines __GNUC__, so a clang-specific check is required to enable the use of generic selection. */ #if !defined __cplusplus \ && (__GNUC_PREREQ (4, 9) \ || __glibc_clang_has_extension (c_generic_selections) \ || (!defined __GNUC__ && defined __STDC_VERSION__ \ && __STDC_VERSION__ >= 201112L)) # define __HAVE_GENERIC_SELECTION 1 #else # define __HAVE_GENERIC_SELECTION 0 #endif #endif /* sys/cdefs.h */ PKZ u]yy sys/procfs.hnu[/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PROCFS_H #define _SYS_PROCFS_H 1 /* This is somewhat modelled after the file of the same name on SVR4 systems. It provides a definition of the core file format for ELF used on Linux. It doesn't have anything to do with the /proc file system, even though Linux has one. Anyway, the whole purpose of this file is for GDB and GDB only. Don't read too much into it. Don't use it for anything other than GDB unless you know what you are doing. */ #include #include #include #include __BEGIN_DECLS /* Type for a general-purpose register. */ #ifdef __x86_64__ __extension__ typedef unsigned long long elf_greg_t; #else typedef unsigned long elf_greg_t; #endif /* And the whole bunch of them. We could have used `struct user_regs_struct' directly in the typedef, but tradition says that the register set is an array, which does have some peculiar semantics, so leave it that way. */ #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) typedef elf_greg_t elf_gregset_t[ELF_NGREG]; #ifndef __x86_64__ /* Register set for the floating-point registers. */ typedef struct user_fpregs_struct elf_fpregset_t; /* Register set for the extended floating-point registers. Includes the Pentium III SSE registers in addition to the classic floating-point stuff. */ typedef struct user_fpxregs_struct elf_fpxregset_t; #else /* Register set for the extended floating-point registers. Includes the Pentium III SSE registers in addition to the classic floating-point stuff. */ typedef struct user_fpregs_struct elf_fpregset_t; #endif /* Signal info. */ struct elf_siginfo { int si_signo; /* Signal number. */ int si_code; /* Extra code. */ int si_errno; /* Errno. */ }; /* Definitions to generate Intel SVR4-like core files. These mostly have the same names as the SVR4 types with "elf_" tacked on the front to prevent clashes with Linux definitions, and the typedef forms have been avoided. This is mostly like the SVR4 structure, but more Linuxy, with things that Linux does not support and which GDB doesn't really use excluded. */ struct elf_prstatus { struct elf_siginfo pr_info; /* Info associated with signal. */ short int pr_cursig; /* Current signal. */ unsigned long int pr_sigpend; /* Set of pending signals. */ unsigned long int pr_sighold; /* Set of held signals. */ __pid_t pr_pid; __pid_t pr_ppid; __pid_t pr_pgrp; __pid_t pr_sid; struct timeval pr_utime; /* User time. */ struct timeval pr_stime; /* System time. */ struct timeval pr_cutime; /* Cumulative user time. */ struct timeval pr_cstime; /* Cumulative system time. */ elf_gregset_t pr_reg; /* GP registers. */ int pr_fpvalid; /* True if math copro being used. */ }; #define ELF_PRARGSZ (80) /* Number of chars for args. */ struct elf_prpsinfo { char pr_state; /* Numeric process state. */ char pr_sname; /* Char for pr_state. */ char pr_zomb; /* Zombie. */ char pr_nice; /* Nice val. */ unsigned long int pr_flag; /* Flags. */ #if __WORDSIZE == 32 unsigned short int pr_uid; unsigned short int pr_gid; #else unsigned int pr_uid; unsigned int pr_gid; #endif int pr_pid, pr_ppid, pr_pgrp, pr_sid; /* Lots missing */ char pr_fname[16]; /* Filename of executable. */ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ }; /* The rest of this file provides the types for emulation of the Solaris interfaces that should be implemented by users of libthread_db. */ /* Addresses. */ typedef void *psaddr_t; /* Register sets. Linux has different names. */ typedef elf_gregset_t prgregset_t; typedef elf_fpregset_t prfpregset_t; /* We don't have any differences between processes and threads, therefore have only one PID type. */ typedef __pid_t lwpid_t; /* Process status and info. In the end we do provide typedefs for them. */ typedef struct elf_prstatus prstatus_t; typedef struct elf_prpsinfo prpsinfo_t; __END_DECLS #endif /* sys/procfs.h */ PKZC/88 sys/swap.hnu[/* Calls to enable and disable swapping on specified locations. Linux version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SWAP_H #define _SYS_SWAP_H 1 #include /* The swap priority is encoded as: (prio << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK */ #define SWAP_FLAG_PREFER 0x8000 /* Set if swap priority is specified. */ #define SWAP_FLAG_PRIO_MASK 0x7fff #define SWAP_FLAG_PRIO_SHIFT 0 #define SWAP_FLAG_DISCARD 0x10000 /* Discard swap cluster after use. */ __BEGIN_DECLS /* Make the block special device PATH available to the system for swapping. This call is restricted to the super-user. */ extern int swapon (const char *__path, int __flags) __THROW; /* Stop using block special device PATH for swapping. */ extern int swapoff (const char *__path) __THROW; __END_DECLS #endif /* _SYS_SWAP_H */ PKZu쨩'' sys/socket.hnu[/* Declarations of socket constants, types, and functions. Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SOCKET_H #define _SYS_SOCKET_H 1 #include __BEGIN_DECLS #include #define __need_size_t #include /* This operating system-specific header file defines the SOCK_*, PF_*, AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', `struct msghdr', and `struct linger' types. */ #include #ifdef __USE_MISC # include #endif /* The following constants should be used for the second parameter of `shutdown'. */ enum { SHUT_RD = 0, /* No more receptions. */ #define SHUT_RD SHUT_RD SHUT_WR, /* No more transmissions. */ #define SHUT_WR SHUT_WR SHUT_RDWR /* No more receptions or transmissions. */ #define SHUT_RDWR SHUT_RDWR }; /* This is the type we use for generic socket address arguments. With GCC 2.7 and later, the funky union causes redeclarations or uses with any of the listed types to be allowed without complaint. G++ 2.7 does not support transparent unions so there we want the old-style declaration, too. */ #if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU # define __SOCKADDR_ARG struct sockaddr *__restrict # define __CONST_SOCKADDR_ARG const struct sockaddr * #else /* Add more `struct sockaddr_AF' types here as necessary. These are all the ones I found on NetBSD and Linux. */ # define __SOCKADDR_ALLTYPES \ __SOCKADDR_ONETYPE (sockaddr) \ __SOCKADDR_ONETYPE (sockaddr_at) \ __SOCKADDR_ONETYPE (sockaddr_ax25) \ __SOCKADDR_ONETYPE (sockaddr_dl) \ __SOCKADDR_ONETYPE (sockaddr_eon) \ __SOCKADDR_ONETYPE (sockaddr_in) \ __SOCKADDR_ONETYPE (sockaddr_in6) \ __SOCKADDR_ONETYPE (sockaddr_inarp) \ __SOCKADDR_ONETYPE (sockaddr_ipx) \ __SOCKADDR_ONETYPE (sockaddr_iso) \ __SOCKADDR_ONETYPE (sockaddr_ns) \ __SOCKADDR_ONETYPE (sockaddr_un) \ __SOCKADDR_ONETYPE (sockaddr_x25) # define __SOCKADDR_ONETYPE(type) struct type *__restrict __##type##__; typedef union { __SOCKADDR_ALLTYPES } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); # undef __SOCKADDR_ONETYPE # define __SOCKADDR_ONETYPE(type) const struct type *__restrict __##type##__; typedef union { __SOCKADDR_ALLTYPES } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); # undef __SOCKADDR_ONETYPE #endif #ifdef __USE_GNU /* For `recvmmsg' and `sendmmsg'. */ struct mmsghdr { struct msghdr msg_hdr; /* Actual message header. */ unsigned int msg_len; /* Number of received or sent bytes for the entry. */ }; #endif /* Create a new socket of type TYPE in domain DOMAIN, using protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically. Returns a file descriptor for the new socket, or -1 for errors. */ extern int socket (int __domain, int __type, int __protocol) __THROW; /* Create two new sockets, of type TYPE in domain DOMAIN and using protocol PROTOCOL, which are connected to each other, and put file descriptors for them in FDS[0] and FDS[1]. If PROTOCOL is zero, one will be chosen automatically. Returns 0 on success, -1 for errors. */ extern int socketpair (int __domain, int __type, int __protocol, int __fds[2]) __THROW; /* Give the socket FD the local address ADDR (which is LEN bytes long). */ extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) __THROW; /* Put the local address of FD into *ADDR and its length in *LEN. */ extern int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __THROW; /* Open a connection on socket FD to peer at ADDR (which LEN bytes long). For connectionless socket types, just set the default address to send to and the only address from which to accept transmissions. Return 0 on success, -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); /* Put the address of the peer connected to socket FD into *ADDR (which is *LEN bytes long), and its actual length into *LEN. */ extern int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __THROW; /* Send N bytes of BUF to socket FD. Returns the number sent or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); /* Read N bytes into BUF from socket FD. Returns the number read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); /* Send N bytes of BUF on socket FD to peer at address ADDR (which is ADDR_LEN bytes long). Returns the number sent, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t sendto (int __fd, const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); /* Read N bytes into BUF through socket FD. If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of the sender, and store the actual size of the address in *ADDR_LEN. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); /* Send a message described MESSAGE on socket FD. Returns the number of bytes sent, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); #ifdef __USE_GNU /* Send a VLEN messages as described by VMESSAGES to socket FD. Returns the number of datagrams successfully written or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags); #endif /* Receive a message as described by MESSAGE from socket FD. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); #ifdef __USE_GNU /* Receive up to VLEN messages as described by VMESSAGES from socket FD. Returns the number of messages received or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags, struct timespec *__tmo); #endif /* Put the current value for socket FD's option OPTNAME at protocol level LEVEL into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's actual length. Returns 0 on success, -1 for errors. */ extern int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __THROW; /* Set socket FD's option OPTNAME at protocol level LEVEL to *OPTVAL (which is OPTLEN bytes long). Returns 0 on success, -1 for errors. */ extern int setsockopt (int __fd, int __level, int __optname, const void *__optval, socklen_t __optlen) __THROW; /* Prepare to accept connections on socket FD. N connection requests will be queued before further requests are refused. Returns 0 on success, -1 for errors. */ extern int listen (int __fd, int __n) __THROW; /* Await a connection on socket FD. When a connection arrives, open a new socket to communicate with it, set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting peer and *ADDR_LEN to the address's actual length, and return the new socket's descriptor, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); #ifdef __USE_GNU /* Similar to 'accept' but takes an additional parameter to specify flags. This function is a cancellation point and therefore not marked with __THROW. */ extern int accept4 (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len, int __flags); #endif /* Shut down all or part of the connection open on socket FD. HOW determines what to shut down: SHUT_RD = No more receptions; SHUT_WR = No more transmissions; SHUT_RDWR = No more receptions or transmissions. Returns 0 on success, -1 for errors. */ extern int shutdown (int __fd, int __how) __THROW; #ifdef __USE_XOPEN2K /* Determine wheter socket is at a out-of-band mark. */ extern int sockatmark (int __fd) __THROW; #endif #ifdef __USE_MISC /* FDTYPE is S_IFSOCK or another S_IF* macro defined in ; returns 1 if FD is open on an object of the indicated type, 0 if not, or -1 for errors (setting errno). */ extern int isfdtype (int __fd, int __fdtype) __THROW; #endif /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include #endif __END_DECLS #endif /* sys/socket.h */ PKZL L sys/param.hnu[/* Compatibility header for old-style Unix parameters and limits. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PARAM_H #define _SYS_PARAM_H 1 #define __need_NULL #include #include #include #include /* Define BYTE_ORDER et al. */ #include /* Define NSIG. */ /* This file defines some things in system-specific ways. */ #include /* BSD names for some values. */ #define NBBY CHAR_BIT #if !defined NGROUPS && defined NGROUPS_MAX # define NGROUPS NGROUPS_MAX #endif #if !defined MAXSYMLINKS && defined SYMLOOP_MAX # define MAXSYMLINKS SYMLOOP_MAX #endif #if !defined CANBSIZ && defined MAX_CANON # define CANBSIZ MAX_CANON #endif #if !defined MAXPATHLEN && defined PATH_MAX # define MAXPATHLEN PATH_MAX #endif #if !defined NOFILE && defined OPEN_MAX # define NOFILE OPEN_MAX #endif #if !defined MAXHOSTNAMELEN && defined HOST_NAME_MAX # define MAXHOSTNAMELEN HOST_NAME_MAX #endif #ifndef NCARGS # ifdef ARG_MAX # define NCARGS ARG_MAX # else /* ARG_MAX is unlimited, but we define NCARGS for BSD programs that want to compare against some fixed limit. */ # define NCARGS INT_MAX # endif #endif /* Magical constants. */ #ifndef NOGROUP # define NOGROUP 65535 /* Marker for empty group set member. */ #endif #ifndef NODEV # define NODEV ((dev_t) -1) /* Non-existent device. */ #endif /* Unit of `st_blocks'. */ #ifndef DEV_BSIZE # define DEV_BSIZE 512 #endif /* Bit map related macros. */ #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* Macros for counting and rounding. */ #ifndef howmany # define howmany(x, y) (((x) + ((y) - 1)) / (y)) #endif #ifdef __GNUC__ # define roundup(x, y) (__builtin_constant_p (y) && powerof2 (y) \ ? (((x) + (y) - 1) & ~((y) - 1)) \ : ((((x) + ((y) - 1)) / (y)) * (y))) #else # define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #endif #define powerof2(x) ((((x) - 1) & (x)) == 0) /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #endif /* sys/param.h */ PKZs sys/syslog.hnu[/* * Copyright (c) 1982, 1986, 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)syslog.h 8.1 (Berkeley) 6/2/93 */ #ifndef _SYS_SYSLOG_H #define _SYS_SYSLOG_H 1 #include #define __need___va_list #include /* This file defines _PATH_LOG. */ #include /* * priorities/facilities are encoded into a single 32-bit quantity, where the * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility * (0-big number). Both the priorities and the facilities map roughly * one-to-one to strings in the syslogd(8) source code. This mapping is * included in this file. * * priorities (these are ordered) */ #define LOG_EMERG 0 /* system is unusable */ #define LOG_ALERT 1 /* action must be taken immediately */ #define LOG_CRIT 2 /* critical conditions */ #define LOG_ERR 3 /* error conditions */ #define LOG_WARNING 4 /* warning conditions */ #define LOG_NOTICE 5 /* normal but significant condition */ #define LOG_INFO 6 /* informational */ #define LOG_DEBUG 7 /* debug-level messages */ #define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */ /* extract priority */ #define LOG_PRI(p) ((p) & LOG_PRIMASK) #define LOG_MAKEPRI(fac, pri) ((fac) | (pri)) #ifdef SYSLOG_NAMES #define INTERNAL_NOPRI 0x10 /* the "no priority" priority */ /* mark "facility" */ #define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES << 3, 0) typedef struct _code { char *c_name; int c_val; } CODE; CODE prioritynames[] = { { "alert", LOG_ALERT }, { "crit", LOG_CRIT }, { "debug", LOG_DEBUG }, { "emerg", LOG_EMERG }, { "err", LOG_ERR }, { "error", LOG_ERR }, /* DEPRECATED */ { "info", LOG_INFO }, { "none", INTERNAL_NOPRI }, /* INTERNAL */ { "notice", LOG_NOTICE }, { "panic", LOG_EMERG }, /* DEPRECATED */ { "warn", LOG_WARNING }, /* DEPRECATED */ { "warning", LOG_WARNING }, { NULL, -1 } }; #endif /* facility codes */ #define LOG_KERN (0<<3) /* kernel messages */ #define LOG_USER (1<<3) /* random user-level messages */ #define LOG_MAIL (2<<3) /* mail system */ #define LOG_DAEMON (3<<3) /* system daemons */ #define LOG_AUTH (4<<3) /* security/authorization messages */ #define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ #define LOG_LPR (6<<3) /* line printer subsystem */ #define LOG_NEWS (7<<3) /* network news subsystem */ #define LOG_UUCP (8<<3) /* UUCP subsystem */ #define LOG_CRON (9<<3) /* clock daemon */ #define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */ #define LOG_FTP (11<<3) /* ftp daemon */ /* other codes through 15 reserved for system use */ #define LOG_LOCAL0 (16<<3) /* reserved for local use */ #define LOG_LOCAL1 (17<<3) /* reserved for local use */ #define LOG_LOCAL2 (18<<3) /* reserved for local use */ #define LOG_LOCAL3 (19<<3) /* reserved for local use */ #define LOG_LOCAL4 (20<<3) /* reserved for local use */ #define LOG_LOCAL5 (21<<3) /* reserved for local use */ #define LOG_LOCAL6 (22<<3) /* reserved for local use */ #define LOG_LOCAL7 (23<<3) /* reserved for local use */ #define LOG_NFACILITIES 24 /* current number of facilities */ #define LOG_FACMASK 0x03f8 /* mask to extract facility part */ /* facility of pri */ #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) #ifdef SYSLOG_NAMES CODE facilitynames[] = { { "auth", LOG_AUTH }, { "authpriv", LOG_AUTHPRIV }, { "cron", LOG_CRON }, { "daemon", LOG_DAEMON }, { "ftp", LOG_FTP }, { "kern", LOG_KERN }, { "lpr", LOG_LPR }, { "mail", LOG_MAIL }, { "mark", INTERNAL_MARK }, /* INTERNAL */ { "news", LOG_NEWS }, { "security", LOG_AUTH }, /* DEPRECATED */ { "syslog", LOG_SYSLOG }, { "user", LOG_USER }, { "uucp", LOG_UUCP }, { "local0", LOG_LOCAL0 }, { "local1", LOG_LOCAL1 }, { "local2", LOG_LOCAL2 }, { "local3", LOG_LOCAL3 }, { "local4", LOG_LOCAL4 }, { "local5", LOG_LOCAL5 }, { "local6", LOG_LOCAL6 }, { "local7", LOG_LOCAL7 }, { NULL, -1 } }; #endif /* * arguments to setlogmask. */ #define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ /* * Option flags for openlog. * * LOG_ODELAY no longer does anything. * LOG_NDELAY is the inverse of what it used to be. */ #define LOG_PID 0x01 /* log the pid with each message */ #define LOG_CONS 0x02 /* log on the console if errors in sending */ #define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */ #define LOG_NDELAY 0x08 /* don't delay open */ #define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */ #define LOG_PERROR 0x20 /* log to stderr as well */ __BEGIN_DECLS /* Close descriptor used to write to system logger. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void closelog (void); /* Open connection to system logger. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void openlog (const char *__ident, int __option, int __facility); /* Set the log mask level. */ extern int setlogmask (int __mask) __THROW; /* Generate a log message using FMT string and option arguments. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void syslog (int __pri, const char *__fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #ifdef __USE_MISC /* Generate a log message using FMT and using arguments pointed to by AP. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap) __attribute__ ((__format__ (__printf__, 2, 0))); #endif /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include #endif #ifdef __LDBL_COMPAT # include #endif __END_DECLS #endif /* sys/syslog.h */ PKZ=SLSL sys/queue.hnu[/* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ /* * This file defines five types of data structures: singly-linked lists, * lists, simple queues, tail queues, and circular queues. * * A singly-linked list is headed by a single forward pointer. The * elements are singly linked for minimum space and pointer manipulation * overhead at the expense of O(n) removal for arbitrary elements. New * elements can be added to the list after an existing element or at the * head of the list. Elements being removed from the head of the list * should use the explicit macro for this purpose for optimum * efficiency. A singly-linked list may only be traversed in the forward * direction. Singly-linked lists are ideal for applications with large * datasets and few or no removals or for implementing a LIFO queue. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A simple queue is headed by a pair of pointers, one the head of the * list and the other to the tail of the list. The elements are singly * linked to save space, so elements can only be removed from the * head of the list. New elements can be added to the list after * an existing element, at the head of the list, or at the end of the * list. A simple queue may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may be traversed in either direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the list. * A circle queue may be traversed in either direction, but has a more * complex end of list detection. * * For details on the use of these macros, see the queue(3) manual page. */ /* * List definitions. */ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #define LIST_HEAD_INITIALIZER(head) \ { NULL } #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } /* * List functions. */ #define LIST_INIT(head) do { \ (head)->lh_first = NULL; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_AFTER(listelm, elm, field) do { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \ (listelm)->field.le_next = (elm); \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.le_prev = (listelm)->field.le_prev; \ (elm)->field.le_next = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &(elm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } while (/*CONSTCOND*/0) #define LIST_REMOVE(elm, field) do { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = (elm)->field.le_next; \ } while (/*CONSTCOND*/0) #define LIST_FOREACH(var, head, field) \ for ((var) = ((head)->lh_first); \ (var); \ (var) = ((var)->field.le_next)) /* * List access methods. */ #define LIST_EMPTY(head) ((head)->lh_first == NULL) #define LIST_FIRST(head) ((head)->lh_first) #define LIST_NEXT(elm, field) ((elm)->field.le_next) /* * Singly-linked List definitions. */ #define SLIST_HEAD(name, type) \ struct name { \ struct type *slh_first; /* first element */ \ } #define SLIST_HEAD_INITIALIZER(head) \ { NULL } #define SLIST_ENTRY(type) \ struct { \ struct type *sle_next; /* next element */ \ } /* * Singly-linked List functions. */ #define SLIST_INIT(head) do { \ (head)->slh_first = NULL; \ } while (/*CONSTCOND*/0) #define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ (elm)->field.sle_next = (slistelm)->field.sle_next; \ (slistelm)->field.sle_next = (elm); \ } while (/*CONSTCOND*/0) #define SLIST_INSERT_HEAD(head, elm, field) do { \ (elm)->field.sle_next = (head)->slh_first; \ (head)->slh_first = (elm); \ } while (/*CONSTCOND*/0) #define SLIST_REMOVE_HEAD(head, field) do { \ (head)->slh_first = (head)->slh_first->field.sle_next; \ } while (/*CONSTCOND*/0) #define SLIST_REMOVE(head, elm, type, field) do { \ if ((head)->slh_first == (elm)) { \ SLIST_REMOVE_HEAD((head), field); \ } \ else { \ struct type *curelm = (head)->slh_first; \ while(curelm->field.sle_next != (elm)) \ curelm = curelm->field.sle_next; \ curelm->field.sle_next = \ curelm->field.sle_next->field.sle_next; \ } \ } while (/*CONSTCOND*/0) #define SLIST_FOREACH(var, head, field) \ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) /* * Singly-linked List access methods. */ #define SLIST_EMPTY(head) ((head)->slh_first == NULL) #define SLIST_FIRST(head) ((head)->slh_first) #define SLIST_NEXT(elm, field) ((elm)->field.sle_next) /* * Singly-linked Tail queue declarations. */ #define STAILQ_HEAD(name, type) \ struct name { \ struct type *stqh_first; /* first element */ \ struct type **stqh_last; /* addr of last next element */ \ } #define STAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).stqh_first } #define STAILQ_ENTRY(type) \ struct { \ struct type *stqe_next; /* next element */ \ } /* * Singly-linked Tail queue functions. */ #define STAILQ_INIT(head) do { \ (head)->stqh_first = NULL; \ (head)->stqh_last = &(head)->stqh_first; \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ (head)->stqh_last = &(elm)->field.stqe_next; \ (head)->stqh_first = (elm); \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.stqe_next = NULL; \ *(head)->stqh_last = (elm); \ (head)->stqh_last = &(elm)->field.stqe_next; \ } while (/*CONSTCOND*/0) #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ (head)->stqh_last = &(elm)->field.stqe_next; \ (listelm)->field.stqe_next = (elm); \ } while (/*CONSTCOND*/0) #define STAILQ_REMOVE_HEAD(head, field) do { \ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ (head)->stqh_last = &(head)->stqh_first; \ } while (/*CONSTCOND*/0) #define STAILQ_REMOVE(head, elm, type, field) do { \ if ((head)->stqh_first == (elm)) { \ STAILQ_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->stqh_first; \ while (curelm->field.stqe_next != (elm)) \ curelm = curelm->field.stqe_next; \ if ((curelm->field.stqe_next = \ curelm->field.stqe_next->field.stqe_next) == NULL) \ (head)->stqh_last = &(curelm)->field.stqe_next; \ } \ } while (/*CONSTCOND*/0) #define STAILQ_FOREACH(var, head, field) \ for ((var) = ((head)->stqh_first); \ (var); \ (var) = ((var)->field.stqe_next)) #define STAILQ_CONCAT(head1, head2) do { \ if (!STAILQ_EMPTY((head2))) { \ *(head1)->stqh_last = (head2)->stqh_first; \ (head1)->stqh_last = (head2)->stqh_last; \ STAILQ_INIT((head2)); \ } \ } while (/*CONSTCOND*/0) /* * Singly-linked Tail queue access methods. */ #define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) #define STAILQ_FIRST(head) ((head)->stqh_first) #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) /* * Simple queue definitions. */ #define SIMPLEQ_HEAD(name, type) \ struct name { \ struct type *sqh_first; /* first element */ \ struct type **sqh_last; /* addr of last next element */ \ } #define SIMPLEQ_HEAD_INITIALIZER(head) \ { NULL, &(head).sqh_first } #define SIMPLEQ_ENTRY(type) \ struct { \ struct type *sqe_next; /* next element */ \ } /* * Simple queue functions. */ #define SIMPLEQ_INIT(head) do { \ (head)->sqh_first = NULL; \ (head)->sqh_last = &(head)->sqh_first; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ (head)->sqh_last = &(elm)->field.sqe_next; \ (head)->sqh_first = (elm); \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.sqe_next = NULL; \ *(head)->sqh_last = (elm); \ (head)->sqh_last = &(elm)->field.sqe_next; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ (head)->sqh_last = &(elm)->field.sqe_next; \ (listelm)->field.sqe_next = (elm); \ } while (/*CONSTCOND*/0) #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ (head)->sqh_last = &(head)->sqh_first; \ } while (/*CONSTCOND*/0) #define SIMPLEQ_REMOVE(head, elm, type, field) do { \ if ((head)->sqh_first == (elm)) { \ SIMPLEQ_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->sqh_first; \ while (curelm->field.sqe_next != (elm)) \ curelm = curelm->field.sqe_next; \ if ((curelm->field.sqe_next = \ curelm->field.sqe_next->field.sqe_next) == NULL) \ (head)->sqh_last = &(curelm)->field.sqe_next; \ } \ } while (/*CONSTCOND*/0) #define SIMPLEQ_FOREACH(var, head, field) \ for ((var) = ((head)->sqh_first); \ (var); \ (var) = ((var)->field.sqe_next)) /* * Simple queue access methods. */ #define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) #define SIMPLEQ_FIRST(head) ((head)->sqh_first) #define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) /* * Tail queue definitions. */ #define _TAILQ_HEAD(name, type, qual) \ struct name { \ qual type *tqh_first; /* first element */ \ qual type *qual *tqh_last; /* addr of last next element */ \ } #define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) #define TAILQ_HEAD_INITIALIZER(head) \ { NULL, &(head).tqh_first } #define _TAILQ_ENTRY(type, qual) \ struct { \ qual type *tqe_next; /* next element */ \ qual type *qual *tqe_prev; /* address of previous next element */\ } #define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) /* * Tail queue functions. */ #define TAILQ_INIT(head) do { \ (head)->tqh_first = NULL; \ (head)->tqh_last = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_HEAD(head, elm, field) do { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.tqe_next = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ (elm)->field.tqe_next = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_REMOVE(head, elm, field) do { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ } while (/*CONSTCOND*/0) #define TAILQ_FOREACH(var, head, field) \ for ((var) = ((head)->tqh_first); \ (var); \ (var) = ((var)->field.tqe_next)) #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ (var); \ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) #define TAILQ_CONCAT(head1, head2, field) do { \ if (!TAILQ_EMPTY(head2)) { \ *(head1)->tqh_last = (head2)->tqh_first; \ (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ (head1)->tqh_last = (head2)->tqh_last; \ TAILQ_INIT((head2)); \ } \ } while (/*CONSTCOND*/0) /* * Tail queue access methods. */ #define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) #define TAILQ_FIRST(head) ((head)->tqh_first) #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)->tqh_last))->tqh_last)) #define TAILQ_PREV(elm, headname, field) \ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) /* * Circular queue definitions. */ #define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_last; /* last element */ \ } #define CIRCLEQ_HEAD_INITIALIZER(head) \ { (void *)&head, (void *)&head } #define CIRCLEQ_ENTRY(type) \ struct { \ struct type *cqe_next; /* next element */ \ struct type *cqe_prev; /* previous element */ \ } /* * Circular queue functions. */ #define CIRCLEQ_INIT(head) do { \ (head)->cqh_first = (void *)(head); \ (head)->cqh_last = (void *)(head); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_prev = (listelm); \ if ((listelm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ (listelm)->field.cqe_next = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ (elm)->field.cqe_next = (listelm); \ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ if ((listelm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ (listelm)->field.cqe_prev = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ (elm)->field.cqe_next = (head)->cqh_first; \ (elm)->field.cqe_prev = (void *)(head); \ if ((head)->cqh_last == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (head)->cqh_first->field.cqe_prev = (elm); \ (head)->cqh_first = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ (elm)->field.cqe_next = (void *)(head); \ (elm)->field.cqe_prev = (head)->cqh_last; \ if ((head)->cqh_first == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (head)->cqh_last->field.cqe_next = (elm); \ (head)->cqh_last = (elm); \ } while (/*CONSTCOND*/0) #define CIRCLEQ_REMOVE(head, elm, field) do { \ if ((elm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm)->field.cqe_prev; \ else \ (elm)->field.cqe_next->field.cqe_prev = \ (elm)->field.cqe_prev; \ if ((elm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm)->field.cqe_next; \ else \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ } while (/*CONSTCOND*/0) #define CIRCLEQ_FOREACH(var, head, field) \ for ((var) = ((head)->cqh_first); \ (var) != (const void *)(head); \ (var) = ((var)->field.cqe_next)) #define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ for ((var) = ((head)->cqh_last); \ (var) != (const void *)(head); \ (var) = ((var)->field.cqe_prev)) /* * Circular queue access methods. */ #define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) #define CIRCLEQ_FIRST(head) ((head)->cqh_first) #define CIRCLEQ_LAST(head) ((head)->cqh_last) #define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) #define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) #define CIRCLEQ_LOOP_NEXT(head, elm, field) \ (((elm)->field.cqe_next == (void *)(head)) \ ? ((head)->cqh_first) \ : (elm->field.cqe_next)) #define CIRCLEQ_LOOP_PREV(head, elm, field) \ (((elm)->field.cqe_prev == (void *)(head)) \ ? ((head)->cqh_last) \ : (elm->field.cqe_prev)) #endif /* sys/queue.h */ PKZ:鯺 sys/time.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_TIME_H #define _SYS_TIME_H 1 #include #include #include #include #ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined #endif #include __BEGIN_DECLS #ifdef __USE_GNU /* Macros for converting between `struct timeval' and `struct timespec'. */ # define TIMEVAL_TO_TIMESPEC(tv, ts) { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; \ } # define TIMESPEC_TO_TIMEVAL(tv, ts) { \ (tv)->tv_sec = (ts)->tv_sec; \ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ } #endif #ifdef __USE_MISC /* Structure crudely representing a timezone. This is obsolete and should never be used. */ struct timezone { int tz_minuteswest; /* Minutes west of GMT. */ int tz_dsttime; /* Nonzero if DST is ever in effect. */ }; typedef struct timezone *__restrict __timezone_ptr_t; #else typedef void *__restrict __timezone_ptr_t; #endif /* Get the current time of day and timezone information, putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. Returns 0 on success, -1 on errors. NOTE: This form of timezone information is obsolete. Use the functions and variables declared in instead. */ extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz) __THROW __nonnull ((1)); #ifdef __USE_MISC /* Set the current time of day and timezone information. This call is restricted to the super-user. */ extern int settimeofday (const struct timeval *__tv, const struct timezone *__tz) __THROW; /* Adjust the current time of day by the amount in DELTA. If OLDDELTA is not NULL, it is filled in with the amount of time adjustment remaining to be done from the last `adjtime' call. This call is restricted to the super-user. */ extern int adjtime (const struct timeval *__delta, struct timeval *__olddelta) __THROW; #endif /* Values for the first argument to `getitimer' and `setitimer'. */ enum __itimer_which { /* Timers run in real time. */ ITIMER_REAL = 0, #define ITIMER_REAL ITIMER_REAL /* Timers run only when the process is executing. */ ITIMER_VIRTUAL = 1, #define ITIMER_VIRTUAL ITIMER_VIRTUAL /* Timers run when the process is executing and when the system is executing on behalf of the process. */ ITIMER_PROF = 2 #define ITIMER_PROF ITIMER_PROF }; /* Type of the second argument to `getitimer' and the second and third arguments `setitimer'. */ struct itimerval { /* Value to put into `it_value' when the timer expires. */ struct timeval it_interval; /* Time to the next timer expiration. */ struct timeval it_value; }; #if defined __USE_GNU && !defined __cplusplus /* Use the nicer parameter type only in GNU mode and not for C++ since the strict C++ rules prevent the automatic promotion. */ typedef enum __itimer_which __itimer_which_t; #else typedef int __itimer_which_t; #endif /* Set *VALUE to the current setting of timer WHICH. Return 0 on success, -1 on errors. */ extern int getitimer (__itimer_which_t __which, struct itimerval *__value) __THROW; /* Set the timer WHICH to *NEW. If OLD is not NULL, set *OLD to the old value of timer WHICH. Returns 0 on success, -1 on errors. */ extern int setitimer (__itimer_which_t __which, const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __THROW; /* Change the access time of FILE to TVP[0] and the modification time of FILE to TVP[1]. If TVP is a null pointer, use the current time instead. Returns 0 on success, -1 on errors. */ extern int utimes (const char *__file, const struct timeval __tvp[2]) __THROW __nonnull ((1)); #ifdef __USE_MISC /* Same as `utimes', but does not follow symbolic links. */ extern int lutimes (const char *__file, const struct timeval __tvp[2]) __THROW __nonnull ((1)); /* Same as `utimes', but takes an open file descriptor instead of a name. */ extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW; #endif #ifdef __USE_GNU /* Change the access time of FILE relative to FD to TVP[0] and the modification time of FILE to TVP[1]. If TVP is a null pointer, use the current time instead. Returns 0 on success, -1 on errors. */ extern int futimesat (int __fd, const char *__file, const struct timeval __tvp[2]) __THROW; #endif #ifdef __USE_MISC /* Convenience macros for operations on timevals. NOTE: `timercmp' does not work for >= or <=. */ # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) # define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) # define timercmp(a, b, CMP) \ (((a)->tv_sec == (b)->tv_sec) ? \ ((a)->tv_usec CMP (b)->tv_usec) : \ ((a)->tv_sec CMP (b)->tv_sec)) # define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ if ((result)->tv_usec >= 1000000) \ { \ ++(result)->tv_sec; \ (result)->tv_usec -= 1000000; \ } \ } while (0) # define timersub(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ if ((result)->tv_usec < 0) { \ --(result)->tv_sec; \ (result)->tv_usec += 1000000; \ } \ } while (0) #endif /* Misc. */ __END_DECLS #endif /* sys/time.h */ PKZ0DWW sys/vlimit.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_VLIMIT_H #define _SYS_VLIMIT_H 1 #include __BEGIN_DECLS /* This interface is obsolete, and is superseded by . */ /* Kinds of resource limit. */ enum __vlimit_resource { /* Setting this non-zero makes it impossible to raise limits. Only the super-use can set it to zero. This is not implemented in recent versions of BSD, nor by the GNU C library. */ LIM_NORAISE, /* CPU time available for each process (seconds). */ LIM_CPU, /* Largest file which can be created (bytes). */ LIM_FSIZE, /* Maximum size of the data segment (bytes). */ LIM_DATA, /* Maximum size of the stack segment (bytes). */ LIM_STACK, /* Largest core file that will be created (bytes). */ LIM_CORE, /* Resident set size (bytes). */ LIM_MAXRSS }; /* This means no limit. */ #define INFINITY 0x7fffffff /* Set the soft limit for RESOURCE to be VALUE. Returns 0 for success, -1 for failure. */ extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW; __END_DECLS #endif /* sys/vlimit.h */ PKZgww sys/eventfd.hnu[/* Copyright (C) 2007-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_EVENTFD_H #define _SYS_EVENTFD_H 1 #include /* Get the platform-dependent flags. */ #include /* Type for event counter. */ typedef uint64_t eventfd_t; __BEGIN_DECLS /* Return file descriptor for generic event channel. Set initial value to COUNT. */ extern int eventfd (unsigned int __count, int __flags) __THROW; /* Read event counter and possibly wait for events. */ extern int eventfd_read (int __fd, eventfd_t *__value); /* Increment event counter. */ extern int eventfd_write (int __fd, eventfd_t __value); __END_DECLS #endif /* sys/eventfd.h */ PKZQRsys/un.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_UN_H #define _SYS_UN_H 1 #include /* Get the definition of the macro to define the common sockaddr members. */ #include __BEGIN_DECLS /* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket. */ struct sockaddr_un { __SOCKADDR_COMMON (sun_); char sun_path[108]; /* Path name. */ }; #ifdef __USE_MISC # include /* For prototype of `strlen'. */ /* Evaluate to actual length of the `sockaddr_un' structure. */ # define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ + strlen ((ptr)->sun_path)) #endif __END_DECLS #endif /* sys/un.h */ PKZejB  sys/statvfs.hnu[/* Definitions for getting information about a filesystem. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_STATVFS_H #define _SYS_STATVFS_H 1 #include /* Get the system-specific definition of `struct statfs'. */ #include #ifndef __USE_FILE_OFFSET64 # ifndef __fsblkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # ifndef __fsfilcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif #else # ifndef __fsblkcnt_t_defined typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # ifndef __fsfilcnt_t_defined typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif #endif __BEGIN_DECLS /* Return information about the filesystem on which FILE resides. */ #ifndef __USE_FILE_OFFSET64 extern int statvfs (const char *__restrict __file, struct statvfs *__restrict __buf) __THROW __nonnull ((1, 2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (statvfs, (const char *__restrict __file, struct statvfs *__restrict __buf), statvfs64) __nonnull ((1, 2)); # else # define statvfs statvfs64 # endif #endif #ifdef __USE_LARGEFILE64 extern int statvfs64 (const char *__restrict __file, struct statvfs64 *__restrict __buf) __THROW __nonnull ((1, 2)); #endif /* Return information about the filesystem containing the file FILDES refers to. */ #ifndef __USE_FILE_OFFSET64 extern int fstatvfs (int __fildes, struct statvfs *__buf) __THROW __nonnull ((2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (fstatvfs, (int __fildes, struct statvfs *__buf), fstatvfs64) __nonnull ((2)); # else # define fstatvfs fstatvfs64 # endif #endif #ifdef __USE_LARGEFILE64 extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf) __THROW __nonnull ((2)); #endif __END_DECLS #endif /* sys/statvfs.h */ PKZ!Ɩ sys/vm86.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_VM86_H #define _SYS_VM86_H 1 #include #ifdef __x86_64__ # error This header is unsupported on x86-64. #else /* Get constants and data types from kernel header file. */ # include __BEGIN_DECLS /* Enter virtual 8086 mode. */ extern int vm86 (unsigned long int __subfunction, struct vm86plus_struct *__info) __THROW; __END_DECLS # endif #endif /* _SYS_VM86_H */ PKZ 9f sys/elf.hnu[/* Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_ELF_H #define _SYS_ELF_H 1 #ifdef __x86_64__ # error This header is unsupported on x86-64. #else # warning "This header is obsolete; use instead." # include #endif #endif /* _SYS_ELF_H */ PKZE sys/xattr.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_XATTR_H #define _SYS_XATTR_H 1 #include #include __BEGIN_DECLS /* The following constants should be used for the fifth parameter of `*setxattr'. */ #ifndef __USE_KERNEL_XATTR_DEFS enum { XATTR_CREATE = 1, /* set value, fail if attr already exists. */ #define XATTR_CREATE XATTR_CREATE XATTR_REPLACE = 2 /* set value, fail if attr does not exist. */ #define XATTR_REPLACE XATTR_REPLACE }; #endif /* Set the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ extern int setxattr (const char *__path, const char *__name, const void *__value, size_t __size, int __flags) __THROW; /* Set the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long), not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ extern int lsetxattr (const char *__path, const char *__name, const void *__value, size_t __size, int __flags) __THROW; /* Set the attribute NAME of the file descriptor FD to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ extern int fsetxattr (int __fd, const char *__name, const void *__value, size_t __size, int __flags) __THROW; /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ extern ssize_t getxattr (const char *__path, const char *__name, void *__value, size_t __size) __THROW; /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long), not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ extern ssize_t lgetxattr (const char *__path, const char *__name, void *__value, size_t __size) __THROW; /* Get the attribute NAME of the file descriptor FD to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ extern ssize_t fgetxattr (int __fd, const char *__name, void *__value, size_t __size) __THROW; /* List attributes of the file pointed to by PATH into the user-supplied buffer LIST (which is SIZE bytes big). Return 0 on success, -1 for errors. */ extern ssize_t listxattr (const char *__path, char *__list, size_t __size) __THROW; /* List attributes of the file pointed to by PATH into the user-supplied buffer LIST (which is SIZE bytes big), not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ extern ssize_t llistxattr (const char *__path, char *__list, size_t __size) __THROW; /* List attributes of the file descriptor FD into the user-supplied buffer LIST (which is SIZE bytes big). Return 0 on success, -1 for errors. */ extern ssize_t flistxattr (int __fd, char *__list, size_t __size) __THROW; /* Remove the attribute NAME from the file pointed to by PATH. Return 0 on success, -1 for errors. */ extern int removexattr (const char *__path, const char *__name) __THROW; /* Remove the attribute NAME from the file pointed to by PATH, not following symlinks for the last pathname component. Return 0 on success, -1 for errors. */ extern int lremovexattr (const char *__path, const char *__name) __THROW; /* Remove the attribute NAME from the file descriptor FD. Return 0 on success, -1 for errors. */ extern int fremovexattr (int __fd, const char *__name) __THROW; __END_DECLS #endif /* sys/xattr.h */ PKZdd sys/ptrace.hnu[/* `ptrace' debugger support interface. Linux/x86 version. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PTRACE_H #define _SYS_PTRACE_H 1 #include #include __BEGIN_DECLS /* Type of the REQUEST argument to `ptrace.' */ enum __ptrace_request { /* Indicate that the process making this request should be traced. All signals received by this process can be intercepted by its parent, and its parent can use the other `ptrace' requests. */ PTRACE_TRACEME = 0, #define PT_TRACE_ME PTRACE_TRACEME /* Return the word in the process's text space at address ADDR. */ PTRACE_PEEKTEXT = 1, #define PT_READ_I PTRACE_PEEKTEXT /* Return the word in the process's data space at address ADDR. */ PTRACE_PEEKDATA = 2, #define PT_READ_D PTRACE_PEEKDATA /* Return the word in the process's user area at offset ADDR. */ PTRACE_PEEKUSER = 3, #define PT_READ_U PTRACE_PEEKUSER /* Write the word DATA into the process's text space at address ADDR. */ PTRACE_POKETEXT = 4, #define PT_WRITE_I PTRACE_POKETEXT /* Write the word DATA into the process's data space at address ADDR. */ PTRACE_POKEDATA = 5, #define PT_WRITE_D PTRACE_POKEDATA /* Write the word DATA into the process's user area at offset ADDR. */ PTRACE_POKEUSER = 6, #define PT_WRITE_U PTRACE_POKEUSER /* Continue the process. */ PTRACE_CONT = 7, #define PT_CONTINUE PTRACE_CONT /* Kill the process. */ PTRACE_KILL = 8, #define PT_KILL PTRACE_KILL /* Single step the process. */ PTRACE_SINGLESTEP = 9, #define PT_STEP PTRACE_SINGLESTEP /* Get all general purpose registers used by a processes. */ PTRACE_GETREGS = 12, #define PT_GETREGS PTRACE_GETREGS /* Set all general purpose registers used by a processes. */ PTRACE_SETREGS = 13, #define PT_SETREGS PTRACE_SETREGS /* Get all floating point registers used by a processes. */ PTRACE_GETFPREGS = 14, #define PT_GETFPREGS PTRACE_GETFPREGS /* Set all floating point registers used by a processes. */ PTRACE_SETFPREGS = 15, #define PT_SETFPREGS PTRACE_SETFPREGS /* Attach to a process that is already running. */ PTRACE_ATTACH = 16, #define PT_ATTACH PTRACE_ATTACH /* Detach from a process attached to with PTRACE_ATTACH. */ PTRACE_DETACH = 17, #define PT_DETACH PTRACE_DETACH /* Get all extended floating point registers used by a processes. */ PTRACE_GETFPXREGS = 18, #define PT_GETFPXREGS PTRACE_GETFPXREGS /* Set all extended floating point registers used by a processes. */ PTRACE_SETFPXREGS = 19, #define PT_SETFPXREGS PTRACE_SETFPXREGS /* Continue and stop at the next entry to or return from syscall. */ PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL /* Get a TLS entry in the GDT. */ PTRACE_GET_THREAD_AREA = 25, #define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA /* Change a TLS entry in the GDT. */ PTRACE_SET_THREAD_AREA = 26, #define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA #ifdef __x86_64__ /* Access TLS data. */ PTRACE_ARCH_PRCTL = 30, # define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL #endif /* Continue and stop at the next syscall, it will not be executed. */ PTRACE_SYSEMU = 31, #define PT_SYSEMU PTRACE_SYSEMU /* Single step the process, the next syscall will not be executed. */ PTRACE_SYSEMU_SINGLESTEP = 32, #define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP /* Execute process until next taken branch. */ PTRACE_SINGLEBLOCK = 33, #define PT_STEPBLOCK PTRACE_SINGLEBLOCK /* Set ptrace filter options. */ PTRACE_SETOPTIONS = 0x4200, #define PT_SETOPTIONS PTRACE_SETOPTIONS /* Get last ptrace message. */ PTRACE_GETEVENTMSG = 0x4201, #define PT_GETEVENTMSG PTRACE_GETEVENTMSG /* Get siginfo for process. */ PTRACE_GETSIGINFO = 0x4202, #define PT_GETSIGINFO PTRACE_GETSIGINFO /* Set new siginfo for process. */ PTRACE_SETSIGINFO = 0x4203, #define PT_SETSIGINFO PTRACE_SETSIGINFO /* Get register content. */ PTRACE_GETREGSET = 0x4204, #define PTRACE_GETREGSET PTRACE_GETREGSET /* Set register content. */ PTRACE_SETREGSET = 0x4205, #define PTRACE_SETREGSET PTRACE_SETREGSET /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect signal or group stop state. */ PTRACE_SEIZE = 0x4206, #define PTRACE_SEIZE PTRACE_SEIZE /* Trap seized tracee. */ PTRACE_INTERRUPT = 0x4207, #define PTRACE_INTERRUPT PTRACE_INTERRUPT /* Wait for next group event. */ PTRACE_LISTEN = 0x4208, #define PTRACE_LISTEN PTRACE_LISTEN /* Retrieve siginfo_t structures without removing signals from a queue. */ PTRACE_PEEKSIGINFO = 0x4209, #define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO /* Get the mask of blocked signals. */ PTRACE_GETSIGMASK = 0x420a, #define PTRACE_GETSIGMASK PTRACE_GETSIGMASK /* Change the mask of blocked signals. */ PTRACE_SETSIGMASK = 0x420b, #define PTRACE_SETSIGMASK PTRACE_SETSIGMASK /* Get seccomp BPF filters. */ PTRACE_SECCOMP_GET_FILTER = 0x420c, #define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER /* Get seccomp BPF filter metadata. */ PTRACE_SECCOMP_GET_METADATA = 0x420d #define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA }; #include __END_DECLS #endif /* _SYS_PTRACE_H */ PKZ sys/poll.hnu[/* Compatibility definitions for System V `poll' interface. Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_POLL_H #define _SYS_POLL_H 1 #include /* Get the platform dependent bits of `poll'. */ #include #ifdef __USE_GNU # include # include #endif /* Type used for the number of file descriptors. */ typedef unsigned long int nfds_t; /* Data structure describing a polling request. */ struct pollfd { int fd; /* File descriptor to poll. */ short int events; /* Types of events poller cares about. */ short int revents; /* Types of events that actually occurred. */ }; __BEGIN_DECLS /* Poll the file descriptors described by the NFDS structures starting at FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for an event to occur; if TIMEOUT is -1, block until an event occurs. Returns the number of file descriptors with events, zero if timed out, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout); #ifdef __USE_GNU /* Like poll, but before waiting the threads signal mask is replaced with that specified in the fourth parameter. For better usability, the timeout value is specified using a TIMESPEC object. This function is a cancellation point and therefore not marked with __THROW. */ extern int ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, const __sigset_t *__ss); #endif __END_DECLS /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include #endif #endif /* sys/poll.h */ PKZr` sys/utsname.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 4.4 System Identification */ #ifndef _SYS_UTSNAME_H #define _SYS_UTSNAME_H 1 #include __BEGIN_DECLS #include #ifndef _UTSNAME_SYSNAME_LENGTH # define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH #endif #ifndef _UTSNAME_NODENAME_LENGTH # define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH #endif #ifndef _UTSNAME_RELEASE_LENGTH # define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH #endif #ifndef _UTSNAME_VERSION_LENGTH # define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH #endif #ifndef _UTSNAME_MACHINE_LENGTH # define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH #endif /* Structure describing the system and machine. */ struct utsname { /* Name of the implementation of the operating system. */ char sysname[_UTSNAME_SYSNAME_LENGTH]; /* Name of this node on the network. */ char nodename[_UTSNAME_NODENAME_LENGTH]; /* Current release level of this implementation. */ char release[_UTSNAME_RELEASE_LENGTH]; /* Current version level of this release. */ char version[_UTSNAME_VERSION_LENGTH]; /* Name of the hardware type the system is running on. */ char machine[_UTSNAME_MACHINE_LENGTH]; #if _UTSNAME_DOMAIN_LENGTH - 0 /* Name of the domain of this node on the network. */ # ifdef __USE_GNU char domainname[_UTSNAME_DOMAIN_LENGTH]; # else char __domainname[_UTSNAME_DOMAIN_LENGTH]; # endif #endif }; #ifdef __USE_MISC /* Note that SVID assumes all members have the same size. */ # define SYS_NMLN _UTSNAME_LENGTH #endif /* Put information about the system in NAME. */ extern int uname (struct utsname *__name) __THROW; __END_DECLS #endif /* sys/utsname.h */ PKZ=AAsys/capability.hnu[/* * * * Copyright (C) 1997 Aleph One * Copyright (C) 1997,8, 2008,19,20 Andrew G. Morgan * * defunct POSIX.1e Standard: 25.2 Capabilities */ #ifndef _SYS_CAPABILITY_H #define _SYS_CAPABILITY_H #ifdef __cplusplus extern "C" { #endif /* * This file complements the kernel file by providing prototype * information for the user library. */ #include #include #include #ifndef __user #define __user #endif #include /* * POSIX capability types */ /* * Opaque capability handle (defined internally by libcap) * internal capability representation */ typedef struct _cap_struct *cap_t; /* "external" capability representation is a (void *) */ /* * This is the type used to identify capabilities */ typedef int cap_value_t; /* * libcap initialized first unnamed capability of the running kernel. * capsh includes a runtime test to flag when this is larger than * what is known to libcap... Time for a new libcap release! */ extern cap_value_t cap_max_bits(void); /* * Set identifiers */ typedef enum { CAP_EFFECTIVE = 0, /* Specifies the effective flag */ CAP_PERMITTED = 1, /* Specifies the permitted flag */ CAP_INHERITABLE = 2 /* Specifies the inheritable flag */ } cap_flag_t; typedef enum { CAP_IAB_INH = 2, CAP_IAB_AMB = 3, CAP_IAB_BOUND = 4 } cap_iab_vector_t; /* * An opaque generalization of the inheritable bits that includes both * what ambient bits to raise and what bounding bits to *lower* (aka * drop). None of these bits once set, using cap_iab_set(), affect * the running process but are consulted, through the execve() system * call, by the kernel. Note, the ambient bits ('A') of the running * process are fragile with respect to other aspects of the "posix" * (cap_t) operations: most importantly, 'A' cannot ever hold bits not * present in the intersection of 'pI' and 'pP'. The kernel * immediately drops all ambient caps whenever such a situation * arises. Typically, the ambient bits are used to support a naive * capability inheritance model - at odds with the POSIX (sic) model * of inheritance where inherited (pI) capabilities need to also be * wanted by the executed binary (fI) in order to become raised * through exec. */ typedef struct cap_iab_s *cap_iab_t; /* * These are the states available to each capability */ typedef enum { CAP_CLEAR=0, /* The flag is cleared/disabled */ CAP_SET=1 /* The flag is set/enabled */ } cap_flag_value_t; /* * User-space capability manipulation routines */ typedef unsigned cap_mode_t; #define CAP_MODE_UNCERTAIN ((cap_mode_t) 0) #define CAP_MODE_NOPRIV ((cap_mode_t) 1) #define CAP_MODE_PURE1E_INIT ((cap_mode_t) 2) #define CAP_MODE_PURE1E ((cap_mode_t) 3) /* libcap/cap_alloc.c */ extern cap_t cap_dup(cap_t); extern int cap_free(void *); extern cap_t cap_init(void); extern cap_iab_t cap_iab_init(void); /* libcap/cap_flag.c */ extern int cap_get_flag(cap_t, cap_value_t, cap_flag_t, cap_flag_value_t *); extern int cap_set_flag(cap_t, cap_flag_t, int, const cap_value_t *, cap_flag_value_t); extern int cap_clear(cap_t); extern int cap_clear_flag(cap_t, cap_flag_t); extern cap_flag_value_t cap_iab_get_vector(cap_iab_t, cap_iab_vector_t, cap_value_t); extern int cap_iab_set_vector(cap_iab_t, cap_iab_vector_t, cap_value_t, cap_flag_value_t); extern int cap_iab_fill(cap_iab_t, cap_iab_vector_t, cap_t, cap_flag_t); /* libcap/cap_file.c */ extern cap_t cap_get_fd(int); extern cap_t cap_get_file(const char *); extern uid_t cap_get_nsowner(cap_t); extern int cap_set_fd(int, cap_t); extern int cap_set_file(const char *, cap_t); extern int cap_set_nsowner(cap_t, uid_t); /* libcap/cap_proc.c */ extern cap_t cap_get_proc(void); extern cap_t cap_get_pid(pid_t); extern int cap_set_proc(cap_t); extern int cap_get_bound(cap_value_t); extern int cap_drop_bound(cap_value_t); #define CAP_IS_SUPPORTED(cap) (cap_get_bound(cap) >= 0) extern int cap_get_ambient(cap_value_t); extern int cap_set_ambient(cap_value_t, cap_flag_value_t); extern int cap_reset_ambient(void); #define CAP_AMBIENT_SUPPORTED() (cap_get_ambient(CAP_CHOWN) >= 0) /* libcap/cap_extint.c */ extern ssize_t cap_size(cap_t); extern ssize_t cap_copy_ext(void *, cap_t, ssize_t); extern cap_t cap_copy_int(const void *); /* libcap/cap_text.c */ extern cap_t cap_from_text(const char *); extern char * cap_to_text(cap_t, ssize_t *); extern int cap_from_name(const char *, cap_value_t *); extern char * cap_to_name(cap_value_t); extern char * cap_iab_to_text(cap_iab_t iab); extern cap_iab_t cap_iab_from_text(const char *text); #define CAP_DIFFERS(result, flag) (((result) & (1 << (flag))) != 0) extern int cap_compare(cap_t, cap_t); /* libcap/cap_proc.c */ extern void cap_set_syscall(long int (*new_syscall)(long int, long int, long int, long int), long int (*new_syscall6)(long int, long int, long int, long int, long int, long int, long int)); extern int cap_set_mode(cap_mode_t flavor); extern cap_mode_t cap_get_mode(void); extern const char *cap_mode_name(cap_mode_t flavor); extern unsigned cap_get_secbits(void); extern int cap_set_secbits(unsigned bits); extern int cap_prctl(long int pr_cmd, long int arg1, long int arg2, long int arg3, long int arg4, long int arg5); extern int cap_prctlw(long int pr_cmd, long int arg1, long int arg2, long int arg3, long int arg4, long int arg5); extern int cap_setuid(uid_t uid); extern int cap_setgroups(gid_t gid, size_t ngroups, const gid_t groups[]); extern cap_iab_t cap_iab_get_proc(void); extern int cap_iab_set_proc(cap_iab_t iab); typedef struct cap_launch_s *cap_launch_t; extern cap_launch_t cap_new_launcher(const char *arg0, const char * const *argv, const char * const *envp); extern void cap_launcher_callback(cap_launch_t attr, int (callback_fn)(void *detail)); extern void cap_launcher_setuid(cap_launch_t attr, uid_t uid); extern void cap_launcher_setgroups(cap_launch_t attr, gid_t gid, int ngroups, const gid_t *groups); extern void cap_launcher_set_mode(cap_launch_t attr, cap_mode_t flavor); extern cap_iab_t cap_launcher_set_iab(cap_launch_t attr, cap_iab_t iab); extern void cap_launcher_set_chroot(cap_launch_t attr, const char *chroot); extern pid_t cap_launch(cap_launch_t attr, void *data); /* * system calls - look to libc for function to system call * mapping. Note, libcap does not use capset directly, but permits the * cap_set_syscall() to redirect the system call function. */ extern int capget(cap_user_header_t header, cap_user_data_t data); extern int capset(cap_user_header_t header, const cap_user_data_t data); /* deprecated - use cap_get_pid() */ extern int capgetp(pid_t pid, cap_t cap_d); /* not valid with filesystem capability support - use cap_set_proc() */ extern int capsetp(pid_t pid, cap_t cap_d); #ifdef __cplusplus } #endif #endif /* _SYS_CAPABILITY_H */ PKZDU$VV sys/bitypes.hnu[/* The GNU defines all the necessary types. */ #include PKZQ"GQQ sys/timerfd.hnu[/* Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_TIMERFD_H #define _SYS_TIMERFD_H 1 #include #include /* Get the platform-dependent flags. */ #include /* Bits to be set in the FLAGS parameter of `timerfd_settime'. */ enum { TFD_TIMER_ABSTIME = 1 << 0, #define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME TFD_TIMER_CANCEL_ON_SET = 1 << 1 #define TFD_TIMER_CANCEL_ON_SET TFD_TIMER_CANCEL_ON_SET }; __BEGIN_DECLS /* Return file descriptor for new interval timer source. */ extern int timerfd_create (__clockid_t __clock_id, int __flags) __THROW; /* Set next expiration time of interval timer source UFD to UTMR. If FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is absolute. Optionally return the old expiration time in OTMR. */ extern int timerfd_settime (int __ufd, int __flags, const struct itimerspec *__utmr, struct itimerspec *__otmr) __THROW; /* Return the next expiration time of UFD. */ extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; __END_DECLS #endif /* sys/timerfd.h */ PKZ? sys/uio.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_UIO_H #define _SYS_UIO_H 1 #include #include #include #include #ifdef __IOV_MAX # define UIO_MAXIOV __IOV_MAX #else # undef UIO_MAXIOV #endif __BEGIN_DECLS /* Read data from file descriptor FD, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'read' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) __wur; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD. The data is written in the order specified. Operates just like 'write' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) __wur; #ifdef __USE_MISC # ifndef __USE_FILE_OFFSET64 /* Read data from file descriptor FD at the given position OFFSET without change the file pointer, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'pread' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __wur; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD at the given position OFFSET without change the file pointer. The data is written in the order specified. Operates just like 'pwrite' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __wur; # else # ifdef __REDIRECT extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset), preadv64) __wur; extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset), pwritev64) __wur; # else # define preadv preadv64 # define pwritev pwritev64 # endif # endif # ifdef __USE_LARGEFILE64 /* Read data from file descriptor FD at the given position OFFSET without change the file pointer, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'pread' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __wur; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD at the given position OFFSET without change the file pointer. The data is written in the order specified. Operates just like 'pwrite' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __wur; # endif #endif /* Use misc. */ #ifdef __USE_GNU # ifndef __USE_FILE_OFFSET64 /* Same as preadv but with an additional flag argumenti defined at uio.h. */ extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count, __off_t __offset, int ___flags) __wur; /* Same as preadv but with an additional flag argument defined at uio.h. */ extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count, __off_t __offset, int __flags) __wur; # else # ifdef __REDIRECT extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset, int __flags), pwritev64v2) __wur; extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset, int __flags), preadv64v2) __wur; # else # define preadv2 preadv64v2 # define pwritev2 pwritev64v2 # endif # endif # ifdef __USE_LARGEFILE64 /* Same as preadv but with an additional flag argumenti defined at uio.h. */ extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec, int __count, __off64_t __offset, int ___flags) __wur; /* Same as preadv but with an additional flag argument defined at uio.h. */ extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev, int __count, __off64_t __offset, int __flags) __wur; # endif #endif /* Use GNU. */ __END_DECLS /* Some operating systems provide system-specific extensions to this header. */ #ifdef __USE_GNU # include #endif #endif /* sys/uio.h */ PKZ:璍sys/socketvar.hnu[/* This header is used on many systems but for GNU we have everything already defined in the standard header. */ #include PKZJWWsys/kd.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_KD_H #define _SYS_KD_H 1 /* Make sure the header is not loaded. */ #ifndef _LINUX_TYPES_H # define _LINUX_TYPES_H 1 # define __undef_LINUX_TYPES_H #endif #include #ifdef __undef_LINUX_TYPES_H # undef _LINUX_TYPES_H # undef __undef_LINUX_TYPES_H #endif #endif /* sys/kd.h */ PKZ,, sys/select.hnu[/* `fd_set' type and related macros, and `select'/`pselect' declarations. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets */ #ifndef _SYS_SELECT_H #define _SYS_SELECT_H 1 #include /* Get definition of needed basic types. */ #include /* Get __FD_* definitions. */ #include /* Get sigset_t. */ #include /* Get definition of timer specification structures. */ #include #include #ifdef __USE_XOPEN2K # include #endif #ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined #endif /* The fd_set member is required to be an array of longs. */ typedef long int __fd_mask; /* Some versions of define this macros. */ #undef __NFDBITS /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ #define __NFDBITS (8 * (int) sizeof (__fd_mask)) #define __FD_ELT(d) ((d) / __NFDBITS) #define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS))) /* fd_set for select and pselect. */ typedef struct { /* XPG4.2 requires this member name. Otherwise avoid the name from the global namespace. */ #ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->fds_bits) #else __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->__fds_bits) #endif } fd_set; /* Maximum number of file descriptors in `fd_set'. */ #define FD_SETSIZE __FD_SETSIZE #ifdef __USE_MISC /* Sometimes the fd_set member is assumed to have this type. */ typedef __fd_mask fd_mask; /* Number of bits per word of `fd_set' (some code assumes this is 32). */ # define NFDBITS __NFDBITS #endif /* Access macros for `fd_set'. */ #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp) #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp) #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) __BEGIN_DECLS /* Check the first NFDS descriptors each in READFDS (if not NULL) for read readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out after waiting the interval specified therein. Returns the number of ready descriptors, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); #ifdef __USE_XOPEN2K /* Same as above only that the TIMEOUT value is given with higher resolution and a sigmask which is been set temporarily. This version should be used. This function is a cancellation point and therefore not marked with __THROW. */ extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); #endif /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__ # include #endif __END_DECLS #endif /* sys/select.h */ PKZBNsys/ucontext.hnu[/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 #include #include #include #include #ifdef __USE_MISC # define __ctx(fld) fld #else # define __ctx(fld) __ ## fld #endif #ifdef __x86_64__ /* Type for general register. */ __extension__ typedef long long int greg_t; /* Number of general registers. */ #define __NGREG 23 #ifdef __USE_MISC # define NGREG __NGREG #endif /* Container for all general registers. */ typedef greg_t gregset_t[__NGREG]; #ifdef __USE_GNU /* Number of each register in the `gregset_t' array. */ enum { REG_R8 = 0, # define REG_R8 REG_R8 REG_R9, # define REG_R9 REG_R9 REG_R10, # define REG_R10 REG_R10 REG_R11, # define REG_R11 REG_R11 REG_R12, # define REG_R12 REG_R12 REG_R13, # define REG_R13 REG_R13 REG_R14, # define REG_R14 REG_R14 REG_R15, # define REG_R15 REG_R15 REG_RDI, # define REG_RDI REG_RDI REG_RSI, # define REG_RSI REG_RSI REG_RBP, # define REG_RBP REG_RBP REG_RBX, # define REG_RBX REG_RBX REG_RDX, # define REG_RDX REG_RDX REG_RAX, # define REG_RAX REG_RAX REG_RCX, # define REG_RCX REG_RCX REG_RSP, # define REG_RSP REG_RSP REG_RIP, # define REG_RIP REG_RIP REG_EFL, # define REG_EFL REG_EFL REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */ # define REG_CSGSFS REG_CSGSFS REG_ERR, # define REG_ERR REG_ERR REG_TRAPNO, # define REG_TRAPNO REG_TRAPNO REG_OLDMASK, # define REG_OLDMASK REG_OLDMASK REG_CR2 # define REG_CR2 REG_CR2 }; #endif struct _libc_fpxreg { unsigned short int __ctx(significand)[4]; unsigned short int __ctx(exponent); unsigned short int __glibc_reserved1[3]; }; struct _libc_xmmreg { __uint32_t __ctx(element)[4]; }; struct _libc_fpstate { /* 64-bit FXSAVE format. */ __uint16_t __ctx(cwd); __uint16_t __ctx(swd); __uint16_t __ctx(ftw); __uint16_t __ctx(fop); __uint64_t __ctx(rip); __uint64_t __ctx(rdp); __uint32_t __ctx(mxcsr); __uint32_t __ctx(mxcr_mask); struct _libc_fpxreg _st[8]; struct _libc_xmmreg _xmm[16]; __uint32_t __glibc_reserved1[24]; }; /* Structure to describe FPU registers. */ typedef struct _libc_fpstate *fpregset_t; /* Context to describe whole processor state. */ typedef struct { gregset_t __ctx(gregs); /* Note that fpregs is a pointer. */ fpregset_t __ctx(fpregs); __extension__ unsigned long long __reserved1 [8]; } mcontext_t; /* Userlevel context. */ typedef struct ucontext_t { unsigned long int __ctx(uc_flags); struct ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; __extension__ unsigned long long int __ssp[4]; } ucontext_t; #else /* !__x86_64__ */ /* Type for general register. */ typedef int greg_t; /* Number of general registers. */ #define __NGREG 19 #ifdef __USE_MISC # define NGREG __NGREG #endif /* Container for all general registers. */ typedef greg_t gregset_t[__NGREG]; #ifdef __USE_GNU /* Number of each register is the `gregset_t' array. */ enum { REG_GS = 0, # define REG_GS REG_GS REG_FS, # define REG_FS REG_FS REG_ES, # define REG_ES REG_ES REG_DS, # define REG_DS REG_DS REG_EDI, # define REG_EDI REG_EDI REG_ESI, # define REG_ESI REG_ESI REG_EBP, # define REG_EBP REG_EBP REG_ESP, # define REG_ESP REG_ESP REG_EBX, # define REG_EBX REG_EBX REG_EDX, # define REG_EDX REG_EDX REG_ECX, # define REG_ECX REG_ECX REG_EAX, # define REG_EAX REG_EAX REG_TRAPNO, # define REG_TRAPNO REG_TRAPNO REG_ERR, # define REG_ERR REG_ERR REG_EIP, # define REG_EIP REG_EIP REG_CS, # define REG_CS REG_CS REG_EFL, # define REG_EFL REG_EFL REG_UESP, # define REG_UESP REG_UESP REG_SS # define REG_SS REG_SS }; #endif /* Definitions taken from the kernel headers. */ struct _libc_fpreg { unsigned short int __ctx(significand)[4]; unsigned short int __ctx(exponent); }; struct _libc_fpstate { unsigned long int __ctx(cw); unsigned long int __ctx(sw); unsigned long int __ctx(tag); unsigned long int __ctx(ipoff); unsigned long int __ctx(cssel); unsigned long int __ctx(dataoff); unsigned long int __ctx(datasel); struct _libc_fpreg _st[8]; unsigned long int __ctx(status); }; /* Structure to describe FPU registers. */ typedef struct _libc_fpstate *fpregset_t; /* Context to describe whole processor state. */ typedef struct { gregset_t __ctx(gregs); /* Due to Linux's history we have to use a pointer here. The SysV/i386 ABI requires a struct with the values. */ fpregset_t __ctx(fpregs); unsigned long int __ctx(oldmask); unsigned long int __ctx(cr2); } mcontext_t; /* Userlevel context. */ typedef struct ucontext_t { unsigned long int __ctx(uc_flags); struct ucontext_t *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; unsigned long int __ssp[4]; } ucontext_t; #endif /* !__x86_64__ */ #undef __ctx #endif /* sys/ucontext.h */ PKZbrPP sys/types.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H 1 #include __BEGIN_DECLS #include #ifdef __USE_MISC # ifndef __u_char_defined typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; # define __u_char_defined # endif typedef __loff_t loff_t; #endif #ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t; # else typedef __ino64_t ino_t; # endif # define __ino_t_defined #endif #if defined __USE_LARGEFILE64 && !defined __ino64_t_defined typedef __ino64_t ino64_t; # define __ino64_t_defined #endif #ifndef __dev_t_defined typedef __dev_t dev_t; # define __dev_t_defined #endif #ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined #endif #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif #ifndef __nlink_t_defined typedef __nlink_t nlink_t; # define __nlink_t_defined #endif #ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined #endif #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else typedef __off64_t off_t; # endif # define __off_t_defined #endif #if defined __USE_LARGEFILE64 && !defined __off64_t_defined typedef __off64_t off64_t; # define __off64_t_defined #endif #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) \ && !defined __id_t_defined typedef __id_t id_t; # define __id_t_defined #endif #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif #ifdef __USE_MISC # ifndef __daddr_t_defined typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; # define __daddr_t_defined # endif #endif #if (defined __USE_MISC || defined __USE_XOPEN) && !defined __key_t_defined typedef __key_t key_t; # define __key_t_defined #endif #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # include #endif #include #include #include #ifdef __USE_XOPEN # ifndef __useconds_t_defined typedef __useconds_t useconds_t; # define __useconds_t_defined # endif # ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined # endif #endif #define __need_size_t #include #ifdef __USE_MISC /* Old compatibility names for C types. */ typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; #endif /* These size-specific names are used by some of the inet code. */ #include /* These were defined by ISO C without the first `_'. */ typedef __uint8_t u_int8_t; typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; #if __GNUC_PREREQ (2, 7) typedef int register_t __attribute__ ((__mode__ (__word__))); #else typedef int register_t; #endif /* Some code from BIND tests this macro to see if the types above are defined. */ #define __BIT_TYPES_DEFINED__ 1 #ifdef __USE_MISC /* In BSD is expected to define BYTE_ORDER. */ # include /* It also defines `fd_set' and the FD_* macros for `select'. */ # include #endif /* Use misc. */ #if (defined __USE_UNIX98 || defined __USE_XOPEN2K8) \ && !defined __blksize_t_defined typedef __blksize_t blksize_t; # define __blksize_t_defined #endif /* Types from the Large File Support interface. */ #ifndef __USE_FILE_OFFSET64 # ifndef __blkcnt_t_defined typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # ifndef __fsblkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # ifndef __fsfilcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif #else # ifndef __blkcnt_t_defined typedef __blkcnt64_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # ifndef __fsblkcnt_t_defined typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # ifndef __fsfilcnt_t_defined typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif #endif #ifdef __USE_LARGEFILE64 typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ #endif /* Now add the thread types. */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 # include #endif __END_DECLS #endif /* sys/types.h */ PKZ!QQ sys/shm.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SHM_H #define _SYS_SHM_H 1 #include #define __need_size_t #include /* Get common definition of System V style IPC. */ #include /* Get system dependent definition of `struct shmid_ds' and more. */ #include /* Define types required by the standard. */ #include #ifdef __USE_XOPEN # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif #endif /* X/Open */ __BEGIN_DECLS /* The following System V style IPC functions implement a shared memory facility. The definition is found in XPG4.2. */ /* Shared memory control operation. */ extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW; /* Get shared memory segment. */ extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW; /* Attach shared memory segment. */ extern void *shmat (int __shmid, const void *__shmaddr, int __shmflg) __THROW; /* Detach shared memory segment. */ extern int shmdt (const void *__shmaddr) __THROW; __END_DECLS #endif /* sys/shm.h */ PKZ<< sys/times.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 4.5.2 Process Times */ #ifndef _SYS_TIMES_H #define _SYS_TIMES_H 1 #include #include __BEGIN_DECLS /* Structure describing CPU time used by a process and its children. */ struct tms { clock_t tms_utime; /* User CPU time. */ clock_t tms_stime; /* System CPU time. */ clock_t tms_cutime; /* User CPU time of dead children. */ clock_t tms_cstime; /* System CPU time of dead children. */ }; /* Store the CPU time used by this process and all its dead children (and their dead children) in BUFFER. Return the elapsed real time, or (clock_t) -1 for errors. All times are in CLK_TCKths of a second. */ extern clock_t times (struct tms *__buffer) __THROW; __END_DECLS #endif /* sys/times.h */ PKZ8$44 sys/quota.hnu[/* This just represents the non-kernel parts of . Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Robert Elz at The University of Melbourne. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_QUOTA_H #define _SYS_QUOTA_H 1 #include #include #include /* * Convert diskblocks to blocks and the other way around. * currently only to fool the BSD source. :-) */ #define dbtob(num) ((num) << 10) #define btodb(num) ((num) >> 10) /* * Convert count of filesystem blocks to diskquota blocks, meant for * filesystems where i_blksize != 1024. */ #define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / 1024) /* * Definitions for disk quotas imposed on the average user * (big brother finally hits Linux). * * The following constants define the amount of time given a user * before the soft limits are treated as hard limits (usually resulting * in an allocation failure). The timer is started when the user crosses * their soft limit, it is reset when they go below their soft limit. */ #define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */ #define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */ #define QUOTAFILENAME "quota" #define QUOTAGROUP "staff" #define NR_DQHASH 43 /* Just an arbitrary number any suggestions ? */ #define NR_DQUOTS 256 /* Number of quotas active at one time */ /* Old name for struct if_dqblk. */ struct dqblk { __uint64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */ __uint64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */ __uint64_t dqb_curspace; /* current quota block count */ __uint64_t dqb_ihardlimit; /* maximum # allocated inodes */ __uint64_t dqb_isoftlimit; /* preferred inode limit */ __uint64_t dqb_curinodes; /* current # allocated inodes */ __uint64_t dqb_btime; /* time limit for excessive disk use */ __uint64_t dqb_itime; /* time limit for excessive files */ __uint32_t dqb_valid; /* bitmask of QIF_* constants */ }; /* * Shorthand notation. */ #define dq_bhardlimit dq_dqb.dqb_bhardlimit #define dq_bsoftlimit dq_dqb.dqb_bsoftlimit #define dq_curspace dq_dqb.dqb_curspace #define dq_valid dq_dqb.dqb_valid #define dq_ihardlimit dq_dqb.dqb_ihardlimit #define dq_isoftlimit dq_dqb.dqb_isoftlimit #define dq_curinodes dq_dqb.dqb_curinodes #define dq_btime dq_dqb.dqb_btime #define dq_itime dq_dqb.dqb_itime #define dqoff(UID) ((__loff_t)((UID) * sizeof (struct dqblk))) /* Old name for struct if_dqinfo. */ struct dqinfo { __uint64_t dqi_bgrace; __uint64_t dqi_igrace; __uint32_t dqi_flags; __uint32_t dqi_valid; }; __BEGIN_DECLS extern int quotactl (int __cmd, const char *__special, int __id, __caddr_t __addr) __THROW; __END_DECLS #endif /* sys/quota.h */ PKZ$sys/vt.hnu[#include PKZ266sys/sysmacros.hnu[/* Definitions of macros to access `dev_t' values. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SYSMACROS_H #define _SYS_SYSMACROS_H 1 #include #include #include #define __SYSMACROS_DECL_TEMPL(rtype, name, proto) \ extern rtype gnu_dev_##name proto __THROW __attribute_const__; #define __SYSMACROS_IMPL_TEMPL(rtype, name, proto) \ __extension__ __extern_inline __attribute_const__ rtype \ __NTH (gnu_dev_##name proto) __BEGIN_DECLS __SYSMACROS_DECLARE_MAJOR (__SYSMACROS_DECL_TEMPL) __SYSMACROS_DECLARE_MINOR (__SYSMACROS_DECL_TEMPL) __SYSMACROS_DECLARE_MAKEDEV (__SYSMACROS_DECL_TEMPL) #ifdef __USE_EXTERN_INLINES __SYSMACROS_DEFINE_MAJOR (__SYSMACROS_IMPL_TEMPL) __SYSMACROS_DEFINE_MINOR (__SYSMACROS_IMPL_TEMPL) __SYSMACROS_DEFINE_MAKEDEV (__SYSMACROS_IMPL_TEMPL) #endif __END_DECLS #ifndef __SYSMACROS_NEED_IMPLEMENTATION # undef __SYSMACROS_DECL_TEMPL # undef __SYSMACROS_IMPL_TEMPL # undef __SYSMACROS_DECLARE_MAJOR # undef __SYSMACROS_DECLARE_MINOR # undef __SYSMACROS_DECLARE_MAKEDEV # undef __SYSMACROS_DEFINE_MAJOR # undef __SYSMACROS_DEFINE_MINOR # undef __SYSMACROS_DEFINE_MAKEDEV #endif #define major(dev) gnu_dev_major (dev) #define minor(dev) gnu_dev_minor (dev) #define makedev(maj, min) gnu_dev_makedev (maj, min) #endif /* sys/sysmacros.h */ PKZVV sys/sdt.hnu[/* - Systemtap static probe definition macros. This file is dedicated to the public domain, pursuant to CC0 (https://creativecommons.org/publicdomain/zero/1.0/) */ #ifndef _SYS_SDT_H #define _SYS_SDT_H 1 /* This file defines a family of macros STAP_PROBEn(op1, ..., opn) that emit a nop into the instruction stream, and some data into an auxiliary note section. The data in the note section describes the operands, in terms of size and location. Each location is encoded as assembler operand string. Consumer tools such as gdb or systemtap insert breakpoints on top of the nop, and decode the location operand-strings, like an assembler, to find the values being passed. The operand strings are selected by the compiler for each operand. They are constrained by gcc inline-assembler codes. The default is: #define STAP_SDT_ARG_CONSTRAINT nor This is a good default if the operands tend to be integral and moderate in number (smaller than number of registers). In other cases, the compiler may report "'asm' requires impossible reload" or similar. In this case, consider simplifying the macro call (fewer and simpler operands), reduce optimization, or override the default constraints string via: #define STAP_SDT_ARG_CONSTRAINT g #include See also: https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation https://gcc.gnu.org/onlinedocs/gcc/Constraints.html */ #ifdef __ASSEMBLER__ # define _SDT_PROBE(provider, name, n, arglist) \ _SDT_ASM_BODY(provider, name, _SDT_ASM_SUBSTR_1, (_SDT_DEPAREN_##n arglist)) \ _SDT_ASM_BASE # define _SDT_ASM_1(x) x; # define _SDT_ASM_2(a, b) a,b; # define _SDT_ASM_3(a, b, c) a,b,c; # define _SDT_ASM_5(a, b, c, d, e) a,b,c,d,e; # define _SDT_ASM_STRING_1(x) .asciz #x; # define _SDT_ASM_SUBSTR_1(x) .ascii #x; # define _SDT_DEPAREN_0() /* empty */ # define _SDT_DEPAREN_1(a) a # define _SDT_DEPAREN_2(a,b) a b # define _SDT_DEPAREN_3(a,b,c) a b c # define _SDT_DEPAREN_4(a,b,c,d) a b c d # define _SDT_DEPAREN_5(a,b,c,d,e) a b c d e # define _SDT_DEPAREN_6(a,b,c,d,e,f) a b c d e f # define _SDT_DEPAREN_7(a,b,c,d,e,f,g) a b c d e f g # define _SDT_DEPAREN_8(a,b,c,d,e,f,g,h) a b c d e f g h # define _SDT_DEPAREN_9(a,b,c,d,e,f,g,h,i) a b c d e f g h i # define _SDT_DEPAREN_10(a,b,c,d,e,f,g,h,i,j) a b c d e f g h i j # define _SDT_DEPAREN_11(a,b,c,d,e,f,g,h,i,j,k) a b c d e f g h i j k # define _SDT_DEPAREN_12(a,b,c,d,e,f,g,h,i,j,k,l) a b c d e f g h i j k l #else #if defined _SDT_HAS_SEMAPHORES #define _SDT_NOTE_SEMAPHORE_USE(provider, name) \ __asm__ __volatile__ ("" :: "m" (provider##_##name##_semaphore)); #else #define _SDT_NOTE_SEMAPHORE_USE(provider, name) #endif # define _SDT_PROBE(provider, name, n, arglist) \ do { \ _SDT_NOTE_SEMAPHORE_USE(provider, name); \ __asm__ __volatile__ (_SDT_ASM_BODY(provider, name, _SDT_ASM_ARGS, (n)) \ :: _SDT_ASM_OPERANDS_##n arglist); \ __asm__ __volatile__ (_SDT_ASM_BASE); \ } while (0) # define _SDT_S(x) #x # define _SDT_ASM_1(x) _SDT_S(x) "\n" # define _SDT_ASM_2(a, b) _SDT_S(a) "," _SDT_S(b) "\n" # define _SDT_ASM_3(a, b, c) _SDT_S(a) "," _SDT_S(b) "," \ _SDT_S(c) "\n" # define _SDT_ASM_5(a, b, c, d, e) _SDT_S(a) "," _SDT_S(b) "," \ _SDT_S(c) "," _SDT_S(d) "," \ _SDT_S(e) "\n" # define _SDT_ASM_ARGS(n) _SDT_ASM_TEMPLATE_##n # define _SDT_ASM_STRING_1(x) _SDT_ASM_1(.asciz #x) # define _SDT_ASM_SUBSTR_1(x) _SDT_ASM_1(.ascii #x) # define _SDT_ARGFMT(no) _SDT_ASM_1(_SDT_SIGN %n[_SDT_S##no]) \ _SDT_ASM_1(_SDT_SIZE %n[_SDT_S##no]) \ _SDT_ASM_1(_SDT_TYPE %n[_SDT_S##no]) \ _SDT_ASM_SUBSTR(_SDT_ARGTMPL(_SDT_A##no)) # ifndef STAP_SDT_ARG_CONSTRAINT # if defined __powerpc__ # define STAP_SDT_ARG_CONSTRAINT nZr # elif defined __arm__ # define STAP_SDT_ARG_CONSTRAINT g # else # define STAP_SDT_ARG_CONSTRAINT nor # endif # endif # define _SDT_STRINGIFY(x) #x # define _SDT_ARG_CONSTRAINT_STRING(x) _SDT_STRINGIFY(x) /* _SDT_S encodes the size and type as 0xSSTT which is decoded by the assembler macros _SDT_SIZE and _SDT_TYPE */ # define _SDT_ARG(n, x) \ [_SDT_S##n] "n" ((_SDT_ARGSIGNED (x) ? (int)-1 : 1) * (-(((int) _SDT_ARGSIZE (x)) << 8) + (-(0x7f & __builtin_classify_type (x))))), \ [_SDT_A##n] _SDT_ARG_CONSTRAINT_STRING (STAP_SDT_ARG_CONSTRAINT) (_SDT_ARGVAL (x)) #endif #define _SDT_ASM_STRING(x) _SDT_ASM_STRING_1(x) #define _SDT_ASM_SUBSTR(x) _SDT_ASM_SUBSTR_1(x) #define _SDT_ARGARRAY(x) (__builtin_classify_type (x) == 14 \ || __builtin_classify_type (x) == 5) #ifdef __cplusplus # define _SDT_ARGSIGNED(x) (!_SDT_ARGARRAY (x) \ && __sdt_type<__typeof (x)>::__sdt_signed) # define _SDT_ARGSIZE(x) (_SDT_ARGARRAY (x) \ ? sizeof (void *) : sizeof (x)) # define _SDT_ARGVAL(x) (x) # include template struct __sdt_type { static const bool __sdt_signed = false; }; #define __SDT_ALWAYS_SIGNED(T) \ template<> struct __sdt_type { static const bool __sdt_signed = true; }; #define __SDT_COND_SIGNED(T,CT) \ template<> struct __sdt_type { static const bool __sdt_signed = ((CT)(-1) < 1); }; __SDT_ALWAYS_SIGNED(signed char) __SDT_ALWAYS_SIGNED(short) __SDT_ALWAYS_SIGNED(int) __SDT_ALWAYS_SIGNED(long) __SDT_ALWAYS_SIGNED(long long) __SDT_ALWAYS_SIGNED(volatile signed char) __SDT_ALWAYS_SIGNED(volatile short) __SDT_ALWAYS_SIGNED(volatile int) __SDT_ALWAYS_SIGNED(volatile long) __SDT_ALWAYS_SIGNED(volatile long long) __SDT_ALWAYS_SIGNED(const signed char) __SDT_ALWAYS_SIGNED(const short) __SDT_ALWAYS_SIGNED(const int) __SDT_ALWAYS_SIGNED(const long) __SDT_ALWAYS_SIGNED(const long long) __SDT_ALWAYS_SIGNED(const volatile signed char) __SDT_ALWAYS_SIGNED(const volatile short) __SDT_ALWAYS_SIGNED(const volatile int) __SDT_ALWAYS_SIGNED(const volatile long) __SDT_ALWAYS_SIGNED(const volatile long long) __SDT_COND_SIGNED(char, char) __SDT_COND_SIGNED(wchar_t, wchar_t) __SDT_COND_SIGNED(volatile char, char) __SDT_COND_SIGNED(volatile wchar_t, wchar_t) __SDT_COND_SIGNED(const char, char) __SDT_COND_SIGNED(const wchar_t, wchar_t) __SDT_COND_SIGNED(const volatile char, char) __SDT_COND_SIGNED(const volatile wchar_t, wchar_t) #if defined (__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) /* __SDT_COND_SIGNED(char16_t) */ /* __SDT_COND_SIGNED(char32_t) */ #endif template struct __sdt_type<__sdt_E[]> : public __sdt_type<__sdt_E *> {}; template struct __sdt_type<__sdt_E[__sdt_N]> : public __sdt_type<__sdt_E *> {}; #elif !defined(__ASSEMBLER__) __extension__ extern unsigned long long __sdt_unsp; # define _SDT_ARGINTTYPE(x) \ __typeof (__builtin_choose_expr (((__builtin_classify_type (x) \ + 3) & -4) == 4, (x), 0U)) # define _SDT_ARGSIGNED(x) \ (!__extension__ \ (__builtin_constant_p ((((unsigned long long) \ (_SDT_ARGINTTYPE (x)) __sdt_unsp) \ & ((unsigned long long)1 << (sizeof (unsigned long long) \ * __CHAR_BIT__ - 1))) == 0) \ || (_SDT_ARGINTTYPE (x)) -1 > (_SDT_ARGINTTYPE (x)) 0)) # define _SDT_ARGSIZE(x) \ (_SDT_ARGARRAY (x) ? sizeof (void *) : sizeof (x)) # define _SDT_ARGVAL(x) (x) #endif #if defined __powerpc__ || defined __powerpc64__ # define _SDT_ARGTMPL(id) %I[id]%[id] #elif defined __i386__ # define _SDT_ARGTMPL(id) %k[id] /* gcc.gnu.org/PR80115 sourceware.org/PR24541 */ #else # define _SDT_ARGTMPL(id) %[id] #endif /* NB: gdb PR24541 highlighted an unspecified corner of the sdt.h operand note format. The named register may be a longer or shorter (!) alias for the storage where the value in question is found. For example, on i386, 64-bit value may be put in register pairs, and the register name stored would identify just one of them. Previously, gcc was asked to emit the %w[id] (16-bit alias of some registers holding operands), even when a wider 32-bit value was used. Bottom line: the byte-width given before the @ sign governs. If there is a mismatch between that width and that of the named register, then a sys/sdt.h note consumer may need to employ architecture-specific heuristics to figure out where the compiler has actually put the complete value. */ #ifdef __LP64__ # define _SDT_ASM_ADDR .8byte #else # define _SDT_ASM_ADDR .4byte #endif /* The ia64 and s390 nop instructions take an argument. */ #if defined(__ia64__) || defined(__s390__) || defined(__s390x__) #define _SDT_NOP nop 0 #else #define _SDT_NOP nop #endif #define _SDT_NOTE_NAME "stapsdt" #define _SDT_NOTE_TYPE 3 /* If the assembler supports the necessary feature, then we can play nice with code in COMDAT sections, which comes up in C++ code. Without that assembler support, some combinations of probe placements in certain kinds of C++ code may produce link-time errors. */ #include "sdt-config.h" #if _SDT_ASM_SECTION_AUTOGROUP_SUPPORT # define _SDT_ASM_AUTOGROUP "?" #else # define _SDT_ASM_AUTOGROUP "" #endif #define _SDT_DEF_MACROS \ _SDT_ASM_1(.altmacro) \ _SDT_ASM_1(.macro _SDT_SIGN x) \ _SDT_ASM_1(.iflt \\x) \ _SDT_ASM_1(.ascii "-") \ _SDT_ASM_1(.endif) \ _SDT_ASM_1(.endm) \ _SDT_ASM_1(.macro _SDT_SIZE_ x) \ _SDT_ASM_1(.ascii "\x") \ _SDT_ASM_1(.endm) \ _SDT_ASM_1(.macro _SDT_SIZE x) \ _SDT_ASM_1(_SDT_SIZE_ %%((-(-\\x*((-\\x>0)-(-\\x<0))))>>8)) \ _SDT_ASM_1(.endm) \ _SDT_ASM_1(.macro _SDT_TYPE_ x) \ _SDT_ASM_2(.ifc 8,\\x) \ _SDT_ASM_1(.ascii "f") \ _SDT_ASM_1(.endif) \ _SDT_ASM_1(.ascii "@") \ _SDT_ASM_1(.endm) \ _SDT_ASM_1(.macro _SDT_TYPE x) \ _SDT_ASM_1(_SDT_TYPE_ %%((\\x)&(0xff))) \ _SDT_ASM_1(.endm) #define _SDT_UNDEF_MACROS \ _SDT_ASM_1(.purgem _SDT_SIGN) \ _SDT_ASM_1(.purgem _SDT_SIZE_) \ _SDT_ASM_1(.purgem _SDT_SIZE) \ _SDT_ASM_1(.purgem _SDT_TYPE_) \ _SDT_ASM_1(.purgem _SDT_TYPE) #define _SDT_ASM_BODY(provider, name, pack_args, args, ...) \ _SDT_DEF_MACROS \ _SDT_ASM_1(990: _SDT_NOP) \ _SDT_ASM_3( .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,"note") \ _SDT_ASM_1( .balign 4) \ _SDT_ASM_3( .4byte 992f-991f, 994f-993f, _SDT_NOTE_TYPE) \ _SDT_ASM_1(991: .asciz _SDT_NOTE_NAME) \ _SDT_ASM_1(992: .balign 4) \ _SDT_ASM_1(993: _SDT_ASM_ADDR 990b) \ _SDT_ASM_1( _SDT_ASM_ADDR _.stapsdt.base) \ _SDT_SEMAPHORE(provider,name) \ _SDT_ASM_STRING(provider) \ _SDT_ASM_STRING(name) \ pack_args args \ _SDT_ASM_SUBSTR(\x00) \ _SDT_UNDEF_MACROS \ _SDT_ASM_1(994: .balign 4) \ _SDT_ASM_1( .popsection) #define _SDT_ASM_BASE \ _SDT_ASM_1(.ifndef _.stapsdt.base) \ _SDT_ASM_5( .pushsection .stapsdt.base,"aG","progbits", \ .stapsdt.base,comdat) \ _SDT_ASM_1( .weak _.stapsdt.base) \ _SDT_ASM_1( .hidden _.stapsdt.base) \ _SDT_ASM_1( _.stapsdt.base: .space 1) \ _SDT_ASM_2( .size _.stapsdt.base, 1) \ _SDT_ASM_1( .popsection) \ _SDT_ASM_1(.endif) #if defined _SDT_HAS_SEMAPHORES #define _SDT_SEMAPHORE(p,n) \ _SDT_ASM_1( _SDT_ASM_ADDR p##_##n##_semaphore) #else #define _SDT_SEMAPHORE(p,n) _SDT_ASM_1( _SDT_ASM_ADDR 0) #endif #define _SDT_ASM_BLANK _SDT_ASM_SUBSTR(\x20) #define _SDT_ASM_TEMPLATE_0 /* no arguments */ #define _SDT_ASM_TEMPLATE_1 _SDT_ARGFMT(1) #define _SDT_ASM_TEMPLATE_2 _SDT_ASM_TEMPLATE_1 _SDT_ASM_BLANK _SDT_ARGFMT(2) #define _SDT_ASM_TEMPLATE_3 _SDT_ASM_TEMPLATE_2 _SDT_ASM_BLANK _SDT_ARGFMT(3) #define _SDT_ASM_TEMPLATE_4 _SDT_ASM_TEMPLATE_3 _SDT_ASM_BLANK _SDT_ARGFMT(4) #define _SDT_ASM_TEMPLATE_5 _SDT_ASM_TEMPLATE_4 _SDT_ASM_BLANK _SDT_ARGFMT(5) #define _SDT_ASM_TEMPLATE_6 _SDT_ASM_TEMPLATE_5 _SDT_ASM_BLANK _SDT_ARGFMT(6) #define _SDT_ASM_TEMPLATE_7 _SDT_ASM_TEMPLATE_6 _SDT_ASM_BLANK _SDT_ARGFMT(7) #define _SDT_ASM_TEMPLATE_8 _SDT_ASM_TEMPLATE_7 _SDT_ASM_BLANK _SDT_ARGFMT(8) #define _SDT_ASM_TEMPLATE_9 _SDT_ASM_TEMPLATE_8 _SDT_ASM_BLANK _SDT_ARGFMT(9) #define _SDT_ASM_TEMPLATE_10 _SDT_ASM_TEMPLATE_9 _SDT_ASM_BLANK _SDT_ARGFMT(10) #define _SDT_ASM_TEMPLATE_11 _SDT_ASM_TEMPLATE_10 _SDT_ASM_BLANK _SDT_ARGFMT(11) #define _SDT_ASM_TEMPLATE_12 _SDT_ASM_TEMPLATE_11 _SDT_ASM_BLANK _SDT_ARGFMT(12) #define _SDT_ASM_OPERANDS_0() [__sdt_dummy] "g" (0) #define _SDT_ASM_OPERANDS_1(arg1) _SDT_ARG(1, arg1) #define _SDT_ASM_OPERANDS_2(arg1, arg2) \ _SDT_ASM_OPERANDS_1(arg1), _SDT_ARG(2, arg2) #define _SDT_ASM_OPERANDS_3(arg1, arg2, arg3) \ _SDT_ASM_OPERANDS_2(arg1, arg2), _SDT_ARG(3, arg3) #define _SDT_ASM_OPERANDS_4(arg1, arg2, arg3, arg4) \ _SDT_ASM_OPERANDS_3(arg1, arg2, arg3), _SDT_ARG(4, arg4) #define _SDT_ASM_OPERANDS_5(arg1, arg2, arg3, arg4, arg5) \ _SDT_ASM_OPERANDS_4(arg1, arg2, arg3, arg4), _SDT_ARG(5, arg5) #define _SDT_ASM_OPERANDS_6(arg1, arg2, arg3, arg4, arg5, arg6) \ _SDT_ASM_OPERANDS_5(arg1, arg2, arg3, arg4, arg5), _SDT_ARG(6, arg6) #define _SDT_ASM_OPERANDS_7(arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ _SDT_ASM_OPERANDS_6(arg1, arg2, arg3, arg4, arg5, arg6), _SDT_ARG(7, arg7) #define _SDT_ASM_OPERANDS_8(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \ _SDT_ASM_OPERANDS_7(arg1, arg2, arg3, arg4, arg5, arg6, arg7), \ _SDT_ARG(8, arg8) #define _SDT_ASM_OPERANDS_9(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) \ _SDT_ASM_OPERANDS_8(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8), \ _SDT_ARG(9, arg9) #define _SDT_ASM_OPERANDS_10(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) \ _SDT_ASM_OPERANDS_9(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9), \ _SDT_ARG(10, arg10) #define _SDT_ASM_OPERANDS_11(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11) \ _SDT_ASM_OPERANDS_10(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10), \ _SDT_ARG(11, arg11) #define _SDT_ASM_OPERANDS_12(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12) \ _SDT_ASM_OPERANDS_11(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11), \ _SDT_ARG(12, arg12) /* These macros can be used in C, C++, or assembly code. In assembly code the arguments should use normal assembly operand syntax. */ #define STAP_PROBE(provider, name) \ _SDT_PROBE(provider, name, 0, ()) #define STAP_PROBE1(provider, name, arg1) \ _SDT_PROBE(provider, name, 1, (arg1)) #define STAP_PROBE2(provider, name, arg1, arg2) \ _SDT_PROBE(provider, name, 2, (arg1, arg2)) #define STAP_PROBE3(provider, name, arg1, arg2, arg3) \ _SDT_PROBE(provider, name, 3, (arg1, arg2, arg3)) #define STAP_PROBE4(provider, name, arg1, arg2, arg3, arg4) \ _SDT_PROBE(provider, name, 4, (arg1, arg2, arg3, arg4)) #define STAP_PROBE5(provider, name, arg1, arg2, arg3, arg4, arg5) \ _SDT_PROBE(provider, name, 5, (arg1, arg2, arg3, arg4, arg5)) #define STAP_PROBE6(provider, name, arg1, arg2, arg3, arg4, arg5, arg6) \ _SDT_PROBE(provider, name, 6, (arg1, arg2, arg3, arg4, arg5, arg6)) #define STAP_PROBE7(provider, name, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ _SDT_PROBE(provider, name, 7, (arg1, arg2, arg3, arg4, arg5, arg6, arg7)) #define STAP_PROBE8(provider,name,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) \ _SDT_PROBE(provider, name, 8, (arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) #define STAP_PROBE9(provider,name,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)\ _SDT_PROBE(provider, name, 9, (arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)) #define STAP_PROBE10(provider,name,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) \ _SDT_PROBE(provider, name, 10, \ (arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10)) #define STAP_PROBE11(provider,name,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11) \ _SDT_PROBE(provider, name, 11, \ (arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11)) #define STAP_PROBE12(provider,name,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12) \ _SDT_PROBE(provider, name, 12, \ (arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12)) /* This STAP_PROBEV macro can be used in variadic scenarios, where the number of probe arguments is not known until compile time. Since variadic macro support may vary with compiler options, you must pre-#define SDT_USE_VARIADIC to enable this type of probe. The trick to count __VA_ARGS__ was inspired by this post by Laurent Deniau : http://groups.google.com/group/comp.std.c/msg/346fc464319b1ee5 Note that our _SDT_NARG is called with an extra 0 arg that's not counted, so we don't have to worry about the behavior of macros called without any arguments. */ #define _SDT_NARG(...) __SDT_NARG(__VA_ARGS__, 12,11,10,9,8,7,6,5,4,3,2,1,0) #define __SDT_NARG(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12, N, ...) N #ifdef SDT_USE_VARIADIC #define _SDT_PROBE_N(provider, name, N, ...) \ _SDT_PROBE(provider, name, N, (__VA_ARGS__)) #define STAP_PROBEV(provider, name, ...) \ _SDT_PROBE_N(provider, name, _SDT_NARG(0, ##__VA_ARGS__), ##__VA_ARGS__) #endif /* These macros are for use in asm statements. You must compile with -std=gnu99 or -std=c99 to use the STAP_PROBE_ASM macro. The STAP_PROBE_ASM macro generates a quoted string to be used in the template portion of the asm statement, concatenated with strings that contain the actual assembly code around the probe site. For example: asm ("before\n" STAP_PROBE_ASM(provider, fooprobe, %eax 4(%esi)) "after"); emits the assembly code for "before\nafter", with a probe in between. The probe arguments are the %eax register, and the value of the memory word located 4 bytes past the address in the %esi register. Note that because this is a simple asm, not a GNU C extended asm statement, these % characters do not need to be doubled to generate literal %reg names. In a GNU C extended asm statement, the probe arguments can be specified using the macro STAP_PROBE_ASM_TEMPLATE(n) for n arguments. The paired macro STAP_PROBE_ASM_OPERANDS gives the C values of these probe arguments, and appears in the input operand list of the asm statement. For example: asm ("someinsn %0,%1\n" // %0 is output operand, %1 is input operand STAP_PROBE_ASM(provider, fooprobe, STAP_PROBE_ASM_TEMPLATE(3)) "otherinsn %[namedarg]" : "r" (outvar) : "g" (some_value), [namedarg] "i" (1234), STAP_PROBE_ASM_OPERANDS(3, some_value, some_ptr->field, 1234)); This is just like writing: STAP_PROBE3(provider, fooprobe, some_value, some_ptr->field, 1234)); but the probe site is right between "someinsn" and "otherinsn". The probe arguments in STAP_PROBE_ASM can be given as assembly operands instead, even inside a GNU C extended asm statement. Note that these can use operand templates like %0 or %[name], and likewise they must write %%reg for a literal operand of %reg. */ #define _SDT_ASM_BODY_1(p,n,...) _SDT_ASM_BODY(p,n,_SDT_ASM_SUBSTR,(__VA_ARGS__)) #define _SDT_ASM_BODY_2(p,n,...) _SDT_ASM_BODY(p,n,/*_SDT_ASM_STRING */,__VA_ARGS__) #define _SDT_ASM_BODY_N2(p,n,no,...) _SDT_ASM_BODY_ ## no(p,n,__VA_ARGS__) #define _SDT_ASM_BODY_N1(p,n,no,...) _SDT_ASM_BODY_N2(p,n,no,__VA_ARGS__) #define _SDT_ASM_BODY_N(p,n,...) _SDT_ASM_BODY_N1(p,n,_SDT_NARG(0, __VA_ARGS__),__VA_ARGS__) #if __STDC_VERSION__ >= 199901L # define STAP_PROBE_ASM(provider, name, ...) \ _SDT_ASM_BODY_N(provider, name, __VA_ARGS__) \ _SDT_ASM_BASE # define STAP_PROBE_ASM_OPERANDS(n, ...) _SDT_ASM_OPERANDS_##n(__VA_ARGS__) #else # define STAP_PROBE_ASM(provider, name, args) \ _SDT_ASM_BODY(provider, name, /* _SDT_ASM_STRING */, (args)) \ _SDT_ASM_BASE #endif #define STAP_PROBE_ASM_TEMPLATE(n) _SDT_ASM_TEMPLATE_##n,"use _SDT_ASM_TEMPLATE_" /* DTrace compatible macro names. */ #define DTRACE_PROBE(provider,probe) \ STAP_PROBE(provider,probe) #define DTRACE_PROBE1(provider,probe,parm1) \ STAP_PROBE1(provider,probe,parm1) #define DTRACE_PROBE2(provider,probe,parm1,parm2) \ STAP_PROBE2(provider,probe,parm1,parm2) #define DTRACE_PROBE3(provider,probe,parm1,parm2,parm3) \ STAP_PROBE3(provider,probe,parm1,parm2,parm3) #define DTRACE_PROBE4(provider,probe,parm1,parm2,parm3,parm4) \ STAP_PROBE4(provider,probe,parm1,parm2,parm3,parm4) #define DTRACE_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) \ STAP_PROBE5(provider,probe,parm1,parm2,parm3,parm4,parm5) #define DTRACE_PROBE6(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) \ STAP_PROBE6(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6) #define DTRACE_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) \ STAP_PROBE7(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7) #define DTRACE_PROBE8(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) \ STAP_PROBE8(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8) #define DTRACE_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) \ STAP_PROBE9(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9) #define DTRACE_PROBE10(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10) \ STAP_PROBE10(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10) #define DTRACE_PROBE11(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10,parm11) \ STAP_PROBE11(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10,parm11) #define DTRACE_PROBE12(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10,parm11,parm12) \ STAP_PROBE12(provider,probe,parm1,parm2,parm3,parm4,parm5,parm6,parm7,parm8,parm9,parm10,parm11,parm12) #endif /* sys/sdt.h */ PKZa8 @WW sys/user.hnu[/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_USER_H #define _SYS_USER_H 1 /* The whole purpose of this file is for GDB and GDB only. Don't read too much into it. Don't use it for anything other than GDB unless you know what you are doing. */ #ifdef __x86_64__ struct user_fpregs_struct { unsigned short int cwd; unsigned short int swd; unsigned short int ftw; unsigned short int fop; __extension__ unsigned long long int rip; __extension__ unsigned long long int rdp; unsigned int mxcsr; unsigned int mxcr_mask; unsigned int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ unsigned int xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */ unsigned int padding[24]; }; struct user_regs_struct { __extension__ unsigned long long int r15; __extension__ unsigned long long int r14; __extension__ unsigned long long int r13; __extension__ unsigned long long int r12; __extension__ unsigned long long int rbp; __extension__ unsigned long long int rbx; __extension__ unsigned long long int r11; __extension__ unsigned long long int r10; __extension__ unsigned long long int r9; __extension__ unsigned long long int r8; __extension__ unsigned long long int rax; __extension__ unsigned long long int rcx; __extension__ unsigned long long int rdx; __extension__ unsigned long long int rsi; __extension__ unsigned long long int rdi; __extension__ unsigned long long int orig_rax; __extension__ unsigned long long int rip; __extension__ unsigned long long int cs; __extension__ unsigned long long int eflags; __extension__ unsigned long long int rsp; __extension__ unsigned long long int ss; __extension__ unsigned long long int fs_base; __extension__ unsigned long long int gs_base; __extension__ unsigned long long int ds; __extension__ unsigned long long int es; __extension__ unsigned long long int fs; __extension__ unsigned long long int gs; }; struct user { struct user_regs_struct regs; int u_fpvalid; struct user_fpregs_struct i387; __extension__ unsigned long long int u_tsize; __extension__ unsigned long long int u_dsize; __extension__ unsigned long long int u_ssize; __extension__ unsigned long long int start_code; __extension__ unsigned long long int start_stack; __extension__ long long int signal; int reserved; __extension__ union { struct user_regs_struct* u_ar0; __extension__ unsigned long long int __u_ar0_word; }; __extension__ union { struct user_fpregs_struct* u_fpstate; __extension__ unsigned long long int __u_fpstate_word; }; __extension__ unsigned long long int magic; char u_comm [32]; __extension__ unsigned long long int u_debugreg [8]; }; #else /* These are the 32-bit x86 structures. */ struct user_fpregs_struct { long int cwd; long int swd; long int twd; long int fip; long int fcs; long int foo; long int fos; long int st_space [20]; }; struct user_fpxregs_struct { unsigned short int cwd; unsigned short int swd; unsigned short int twd; unsigned short int fop; long int fip; long int fcs; long int foo; long int fos; long int mxcsr; long int reserved; long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ long int padding[56]; }; struct user_regs_struct { long int ebx; long int ecx; long int edx; long int esi; long int edi; long int ebp; long int eax; long int xds; long int xes; long int xfs; long int xgs; long int orig_eax; long int eip; long int xcs; long int eflags; long int esp; long int xss; }; struct user { struct user_regs_struct regs; int u_fpvalid; struct user_fpregs_struct i387; unsigned long int u_tsize; unsigned long int u_dsize; unsigned long int u_ssize; unsigned long int start_code; unsigned long int start_stack; long int signal; int reserved; struct user_regs_struct* u_ar0; struct user_fpregs_struct* u_fpstate; unsigned long int magic; char u_comm [32]; int u_debugreg [8]; }; #endif /* __x86_64__ */ #define PAGE_SHIFT 12 #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) #define NBPG PAGE_SIZE #define UPAGES 1 #define HOST_TEXT_START_ADDR (u.start_code) #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) #endif /* _SYS_USER_H */ PKZ*.)`` sys/reboot.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This file should define RB_* macros to be used as flag bits in the argument to the `reboot' system call. */ #ifndef _SYS_REBOOT_H #define _SYS_REBOOT_H 1 #include /* Perform a hard reset now. */ #define RB_AUTOBOOT 0x01234567 /* Halt the system. */ #define RB_HALT_SYSTEM 0xcdef0123 /* Enable reboot using Ctrl-Alt-Delete keystroke. */ #define RB_ENABLE_CAD 0x89abcdef /* Disable reboot using Ctrl-Alt-Delete keystroke. */ #define RB_DISABLE_CAD 0 /* Stop system and switch power off if possible. */ #define RB_POWER_OFF 0x4321fedc /* Suspend system using software suspend. */ #define RB_SW_SUSPEND 0xd000fce2 /* Reboot system into new kernel. */ #define RB_KEXEC 0x45584543 __BEGIN_DECLS /* Reboot or halt the system. */ extern int reboot (int __howto) __THROW; __END_DECLS #endif /* _SYS_REBOOT_H */ PKZ$9;ff sys/perm.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PERM_H #define _SYS_PERM_H 1 #include __BEGIN_DECLS /* Set port input/output permissions. */ extern int ioperm (unsigned long int __from, unsigned long int __num, int __turn_on) __THROW; /* Change I/O privilege level. */ extern int iopl (int __level) __THROW; __END_DECLS #endif /* _SYS_PERM_H */ PKZf= sys/timex.hnu[/* Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_TIMEX_H #define _SYS_TIMEX_H 1 #include #include /* These definitions from linux/timex.h as of 2.6.30. */ #include #define NTP_API 4 /* NTP API version */ struct ntptimeval { struct timeval time; /* current time (ro) */ long int maxerror; /* maximum error (us) (ro) */ long int esterror; /* estimated error (us) (ro) */ long int tai; /* TAI offset (ro) */ long int __glibc_reserved1; long int __glibc_reserved2; long int __glibc_reserved3; long int __glibc_reserved4; }; /* Clock states (time_state) */ #define TIME_OK 0 /* clock synchronized, no leap second */ #define TIME_INS 1 /* insert leap second */ #define TIME_DEL 2 /* delete leap second */ #define TIME_OOP 3 /* leap second in progress */ #define TIME_WAIT 4 /* leap second has occurred */ #define TIME_ERROR 5 /* clock not synchronized */ #define TIME_BAD TIME_ERROR /* bw compat */ /* Maximum time constant of the PLL. */ #define MAXTC 6 __BEGIN_DECLS extern int __adjtimex (struct timex *__ntx) __THROW; extern int adjtimex (struct timex *__ntx) __THROW; #ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv), ntp_gettimex); #else extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW; # define ntp_gettime ntp_gettimex #endif extern int ntp_adjtime (struct timex *__tntx) __THROW; __END_DECLS #endif /* sys/timex.h */ PKZ-߲ sys/wait.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 3.2.1 Wait for Process Termination */ #ifndef _SYS_WAIT_H #define _SYS_WAIT_H 1 #include __BEGIN_DECLS #include #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 # include #endif #if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8 /* Some older standards require the contents of struct rusage to be defined here. */ # include #endif /* These macros could also be defined in . */ #if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8) /* This will define the `W*' macros for the flag bits to `waitpid', `wait3', and `wait4'. */ # include /* This will define all the `__W*' macros. */ # include # define WEXITSTATUS(status) __WEXITSTATUS (status) # define WTERMSIG(status) __WTERMSIG (status) # define WSTOPSIG(status) __WSTOPSIG (status) # define WIFEXITED(status) __WIFEXITED (status) # define WIFSIGNALED(status) __WIFSIGNALED (status) # define WIFSTOPPED(status) __WIFSTOPPED (status) # ifdef __WIFCONTINUED # define WIFCONTINUED(status) __WIFCONTINUED (status) # endif #endif /* not included. */ #ifdef __USE_MISC # define WCOREFLAG __WCOREFLAG # define WCOREDUMP(status) __WCOREDUMP (status) # define W_EXITCODE(ret, sig) __W_EXITCODE (ret, sig) # define W_STOPCODE(sig) __W_STOPCODE (sig) #endif /* The following values are used by the `waitid' function. */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 typedef enum { P_ALL, /* Wait for any child. */ P_PID, /* Wait for specified process. */ P_PGID /* Wait for members of process group. */ } idtype_t; #endif /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. This function is a cancellation point and therefore not marked with __THROW. */ extern __pid_t wait (int *__stat_loc); #ifdef __USE_MISC /* Special values for the PID argument to `waitpid' and `wait4'. */ # define WAIT_ANY (-1) /* Any process. */ # define WAIT_MYPGRP 0 /* Any process in my process group. */ #endif /* Wait for a child matching PID to die. If PID is greater than 0, match any process whose process ID is PID. If PID is (pid_t) -1, match any process. If PID is (pid_t) 0, match any process with the same process group as the current process. If PID is less than -1, match any process whose process group is the absolute value of PID. If the WNOHANG bit is set in OPTIONS, and that child is not already dead, return (pid_t) 0. If successful, return PID and store the dead child's status in STAT_LOC. Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. This function is a cancellation point and therefore not marked with __THROW. */ extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 # ifndef __id_t_defined typedef __id_t id_t; # define __id_t_defined # endif # include /* Wait for a childing matching IDTYPE and ID to change the status and place appropriate information in *INFOP. If IDTYPE is P_PID, match any process whose process ID is ID. If IDTYPE is P_PGID, match any process whose process group is ID. If IDTYPE is P_ALL, match any process. If the WNOHANG bit is set in OPTIONS, and that child is not already dead, clear *INFOP and return 0. If successful, store exit code and status in *INFOP. This function is a cancellation point and therefore not marked with __THROW. */ extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, int __options); #endif #if defined __USE_MISC \ || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) /* This being here makes the prototypes valid whether or not we have already included to define `struct rusage'. */ struct rusage; /* Wait for a child to exit. When one does, put its status in *STAT_LOC and return its process ID. For errors return (pid_t) -1. If USAGE is not nil, store information about the child's resource usage there. If the WUNTRACED bit is set in OPTIONS, return status for stopped children; otherwise don't. */ extern __pid_t wait3 (int *__stat_loc, int __options, struct rusage * __usage) __THROWNL; #endif #ifdef __USE_MISC /* PID is like waitpid. Other args are like wait3. */ extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options, struct rusage *__usage) __THROWNL; #endif /* Use misc. */ __END_DECLS #endif /* sys/wait.h */ PKZXf sys/errno.hnu[#include PKZC sys/pci.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PCI_H #define _SYS_PCI_H 1 /* We use the constants from the kernel. */ #include #endif /* sys/pci.h */ PKZ sys/ttychars.hnu[/*- * Copyright (c) 1982, 1986, 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ttychars.h 8.2 (Berkeley) 1/4/94 */ /* * 4.3 COMPATIBILITY FILE * * User visible structures and constants related to terminal handling. */ #ifndef _SYS_TTYCHARS_H #define _SYS_TTYCHARS_H 1 struct ttychars { char tc_erase; /* erase last character */ char tc_kill; /* erase entire line */ char tc_intrc; /* interrupt */ char tc_quitc; /* quit */ char tc_startc; /* start output */ char tc_stopc; /* stop output */ char tc_eofc; /* end-of-file */ char tc_brkc; /* input delimiter (like nl) */ char tc_suspc; /* stop process signal */ char tc_dsuspc; /* delayed stop process signal */ char tc_rprntc; /* reprint line */ char tc_flushc; /* flush output (toggles) */ char tc_werasc; /* word erase */ char tc_lnextc; /* literal next character */ }; #ifdef __USE_OLD_TTY #include /* to pick up character defaults */ #endif #endif /* sys/ttychars.h */ PKZh  sys/inotify.hnu[/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_INOTIFY_H #define _SYS_INOTIFY_H 1 #include /* Get the platform-dependent flags. */ #include /* Structure describing an inotify event. */ struct inotify_event { int wd; /* Watch descriptor. */ uint32_t mask; /* Watch mask. */ uint32_t cookie; /* Cookie to synchronize two events. */ uint32_t len; /* Length (including NULs) of name. */ char name __flexarr; /* Name. */ }; /* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */ #define IN_ACCESS 0x00000001 /* File was accessed. */ #define IN_MODIFY 0x00000002 /* File was modified. */ #define IN_ATTRIB 0x00000004 /* Metadata changed. */ #define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */ #define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */ #define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ #define IN_OPEN 0x00000020 /* File was opened. */ #define IN_MOVED_FROM 0x00000040 /* File was moved from X. */ #define IN_MOVED_TO 0x00000080 /* File was moved to Y. */ #define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ #define IN_CREATE 0x00000100 /* Subfile was created. */ #define IN_DELETE 0x00000200 /* Subfile was deleted. */ #define IN_DELETE_SELF 0x00000400 /* Self was deleted. */ #define IN_MOVE_SELF 0x00000800 /* Self was moved. */ /* Events sent by the kernel. */ #define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */ #define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */ #define IN_IGNORED 0x00008000 /* File was ignored. */ /* Helper events. */ #define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */ #define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */ /* Special flags. */ #define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a directory. */ #define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */ #define IN_EXCL_UNLINK 0x04000000 /* Exclude events on unlinked objects. */ #define IN_MASK_ADD 0x20000000 /* Add to the mask of an already existing watch. */ #define IN_ISDIR 0x40000000 /* Event occurred against dir. */ #define IN_ONESHOT 0x80000000 /* Only send event once. */ /* All events which a program can wait on. */ #define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ | IN_MOVED_TO | IN_CREATE | IN_DELETE \ | IN_DELETE_SELF | IN_MOVE_SELF) __BEGIN_DECLS /* Create and initialize inotify instance. */ extern int inotify_init (void) __THROW; /* Create and initialize inotify instance. */ extern int inotify_init1 (int __flags) __THROW; /* Add watch of object NAME to inotify instance FD. Notify about events specified by MASK. */ extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) __THROW; /* Remove the watch specified by WD from the inotify instance FD. */ extern int inotify_rm_watch (int __fd, int __wd) __THROW; __END_DECLS #endif /* sys/inotify.h */ PKZnl?l? sys/stat.hnu[/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 5.6 File Characteristics */ #ifndef _SYS_STAT_H #define _SYS_STAT_H 1 #include #include /* For __mode_t and __dev_t. */ #ifdef __USE_XOPEN2K8 # include #endif #if defined __USE_XOPEN || defined __USE_XOPEN2K /* The Single Unix specification says that some more types are available here. */ # include # ifndef __dev_t_defined typedef __dev_t dev_t; # define __dev_t_defined # endif # ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined # endif # ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t; # else typedef __ino64_t ino_t; # endif # define __ino_t_defined # endif # ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined # endif # ifndef __nlink_t_defined typedef __nlink_t nlink_t; # define __nlink_t_defined # endif # ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else typedef __off64_t off_t; # endif # define __off_t_defined # endif # ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined # endif #endif /* X/Open */ #ifdef __USE_UNIX98 # ifndef __blkcnt_t_defined # ifndef __USE_FILE_OFFSET64 typedef __blkcnt_t blkcnt_t; # else typedef __blkcnt64_t blkcnt_t; # endif # define __blkcnt_t_defined # endif # ifndef __blksize_t_defined typedef __blksize_t blksize_t; # define __blksize_t_defined # endif #endif /* Unix98 */ __BEGIN_DECLS #include #if defined __USE_MISC || defined __USE_XOPEN # define S_IFMT __S_IFMT # define S_IFDIR __S_IFDIR # define S_IFCHR __S_IFCHR # define S_IFBLK __S_IFBLK # define S_IFREG __S_IFREG # ifdef __S_IFIFO # define S_IFIFO __S_IFIFO # endif # ifdef __S_IFLNK # define S_IFLNK __S_IFLNK # endif # if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \ && defined __S_IFSOCK # define S_IFSOCK __S_IFSOCK # endif #endif /* Test macros for file types. */ #define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask)) #define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR) #define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR) #define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK) #define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG) #ifdef __S_IFIFO # define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO) #endif #ifdef __S_IFLNK # define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK) #endif #if defined __USE_MISC && !defined __S_IFLNK # define S_ISLNK(mode) 0 #endif #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K) \ && defined __S_IFSOCK # define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK) #elif defined __USE_XOPEN2K # define S_ISSOCK(mode) 0 #endif /* These are from POSIX.1b. If the objects are not implemented using separate distinct file types, the macros always will evaluate to zero. Unlike the other S_* macros the following three take a pointer to a `struct stat' object as the argument. */ #ifdef __USE_POSIX199309 # define S_TYPEISMQ(buf) __S_TYPEISMQ(buf) # define S_TYPEISSEM(buf) __S_TYPEISSEM(buf) # define S_TYPEISSHM(buf) __S_TYPEISSHM(buf) #endif /* Protection bits. */ #define S_ISUID __S_ISUID /* Set user ID on execution. */ #define S_ISGID __S_ISGID /* Set group ID on execution. */ #if defined __USE_MISC || defined __USE_XOPEN /* Save swapped text after use (sticky bit). This is pretty well obsolete. */ # define S_ISVTX __S_ISVTX #endif #define S_IRUSR __S_IREAD /* Read by owner. */ #define S_IWUSR __S_IWRITE /* Write by owner. */ #define S_IXUSR __S_IEXEC /* Execute by owner. */ /* Read, write, and execute by owner. */ #define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC) #ifdef __USE_MISC # define S_IREAD S_IRUSR # define S_IWRITE S_IWUSR # define S_IEXEC S_IXUSR #endif #define S_IRGRP (S_IRUSR >> 3) /* Read by group. */ #define S_IWGRP (S_IWUSR >> 3) /* Write by group. */ #define S_IXGRP (S_IXUSR >> 3) /* Execute by group. */ /* Read, write, and execute by group. */ #define S_IRWXG (S_IRWXU >> 3) #define S_IROTH (S_IRGRP >> 3) /* Read by others. */ #define S_IWOTH (S_IWGRP >> 3) /* Write by others. */ #define S_IXOTH (S_IXGRP >> 3) /* Execute by others. */ /* Read, write, and execute by others. */ #define S_IRWXO (S_IRWXG >> 3) #ifdef __USE_MISC /* Macros for common mode bit masks. */ # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ # define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ # define S_BLKSIZE 512 /* Block size for `st_blocks'. */ #endif #ifndef __USE_FILE_OFFSET64 /* Get file attributes for FILE and put them in BUF. */ extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); /* Get file attributes for the file, device, pipe, or socket that file descriptor FD is open on and put them in BUF. */ extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (stat, (const char *__restrict __file, struct stat *__restrict __buf), stat64) __nonnull ((1, 2)); extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64) __nonnull ((2)); # else # define stat stat64 # define fstat fstat64 # endif #endif #ifdef __USE_LARGEFILE64 extern int stat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); #endif #ifdef __USE_ATFILE /* Similar to stat, get the attributes for FILE and put them in BUF. Relative path names are interpreted relative to FD unless FD is AT_FDCWD. */ # ifndef __USE_FILE_OFFSET64 extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag), fstatat64) __nonnull ((2, 3)); # else # define fstatat fstatat64 # endif # endif # ifdef __USE_LARGEFILE64 extern int fstatat64 (int __fd, const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); # endif #endif #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K # ifndef __USE_FILE_OFFSET64 /* Get file attributes about FILE and put them in BUF. If FILE is a symbolic link, do not follow it. */ extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); # else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (lstat, (const char *__restrict __file, struct stat *__restrict __buf), lstat64) __nonnull ((1, 2)); # else # define lstat lstat64 # endif # endif # ifdef __USE_LARGEFILE64 extern int lstat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); # endif #endif /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects its target instead. */ extern int chmod (const char *__file, __mode_t __mode) __THROW __nonnull ((1)); #ifdef __USE_MISC /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects the link itself rather than its target. */ extern int lchmod (const char *__file, __mode_t __mode) __THROW __nonnull ((1)); #endif /* Set file access permissions of the file FD is open on to MODE. */ #if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif #ifdef __USE_ATFILE /* Set file access permissions of FILE relative to the directory FD is open on. */ extern int fchmodat (int __fd, const char *__file, __mode_t __mode, int __flag) __THROW __nonnull ((2)) __wur; #endif /* Use ATFILE. */ /* Set the file creation mask of the current process to MASK, and return the old creation mask. */ extern __mode_t umask (__mode_t __mask) __THROW; #ifdef __USE_GNU /* Get the current `umask' value without changing it. This function is only available under the GNU Hurd. */ extern __mode_t getumask (void) __THROW; #endif /* Create a new directory named PATH, with permission bits MODE. */ extern int mkdir (const char *__path, __mode_t __mode) __THROW __nonnull ((1)); #ifdef __USE_ATFILE /* Like mkdir, create a new directory with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ extern int mkdirat (int __fd, const char *__path, __mode_t __mode) __THROW __nonnull ((2)); #endif /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((1)); # ifdef __USE_ATFILE /* Like mknod, create a new device file with permission bits MODE and device number DEV. But interpret relative PATH names relative to the directory associated with FD. */ extern int mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((2)); # endif #endif /* Create a new FIFO named PATH, with permission bits MODE. */ extern int mkfifo (const char *__path, __mode_t __mode) __THROW __nonnull ((1)); #ifdef __USE_ATFILE /* Like mkfifo, create a new FIFO with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) __THROW __nonnull ((2)); #endif #ifdef __USE_ATFILE /* Set file access and modification times relative to directory file descriptor. */ extern int utimensat (int __fd, const char *__path, const struct timespec __times[2], int __flags) __THROW __nonnull ((2)); #endif #ifdef __USE_XOPEN2K8 /* Set file access and modification times of the file associated with FD. */ extern int futimens (int __fd, const struct timespec __times[2]) __THROW; #endif /* To allow the `struct stat' structure and the file type `mode_t' bits to vary without changing shared library major version number, the `stat' family of functions and `mknod' are in fact inline wrappers around calls to `xstat', `fxstat', `lxstat', and `xmknod', which all take a leading version-number argument designating the data structure and bits used. defines _STAT_VER with the version number corresponding to `struct stat' as defined in that file; and _MKNOD_VER with the version number corresponding to the S_IF* macros defined therein. It is arranged that when not inlined these function are always statically linked; that way a dynamically-linked executable always encodes the version number corresponding to the data structures it uses, so the `x' functions in the shared library can adapt without needing to recompile all callers. */ #ifndef _STAT_VER # define _STAT_VER 0 #endif #ifndef _MKNOD_VER # define _MKNOD_VER 0 #endif /* Wrappers for stat and mknod system calls. */ #ifndef __USE_FILE_OFFSET64 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __THROW __nonnull ((3)); extern int __xstat (int __ver, const char *__filename, struct stat *__stat_buf) __THROW __nonnull ((2, 3)); extern int __lxstat (int __ver, const char *__filename, struct stat *__stat_buf) __THROW __nonnull ((2, 3)); extern int __fxstatat (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag) __THROW __nonnull ((3, 4)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (__fxstat, (int __ver, int __fildes, struct stat *__stat_buf), __fxstat64) __nonnull ((3)); extern int __REDIRECT_NTH (__xstat, (int __ver, const char *__filename, struct stat *__stat_buf), __xstat64) __nonnull ((2, 3)); extern int __REDIRECT_NTH (__lxstat, (int __ver, const char *__filename, struct stat *__stat_buf), __lxstat64) __nonnull ((2, 3)); extern int __REDIRECT_NTH (__fxstatat, (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag), __fxstatat64) __nonnull ((3, 4)); # else # define __fxstat __fxstat64 # define __xstat __xstat64 # define __lxstat __lxstat64 # endif #endif #ifdef __USE_LARGEFILE64 extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) __THROW __nonnull ((3)); extern int __xstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __THROW __nonnull ((2, 3)); extern int __lxstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __THROW __nonnull ((2, 3)); extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, struct stat64 *__stat_buf, int __flag) __THROW __nonnull ((3, 4)); #endif extern int __xmknod (int __ver, const char *__path, __mode_t __mode, __dev_t *__dev) __THROW __nonnull ((2, 4)); extern int __xmknodat (int __ver, int __fd, const char *__path, __mode_t __mode, __dev_t *__dev) __THROW __nonnull ((3, 5)); #ifdef __USE_GNU # include #endif #ifdef __USE_EXTERN_INLINES /* Inlined versions of the real stat and mknod functions. */ __extern_inline int __NTH (stat (const char *__path, struct stat *__statbuf)) { return __xstat (_STAT_VER, __path, __statbuf); } # if defined __USE_MISC || defined __USE_XOPEN_EXTENDED __extern_inline int __NTH (lstat (const char *__path, struct stat *__statbuf)) { return __lxstat (_STAT_VER, __path, __statbuf); } # endif __extern_inline int __NTH (fstat (int __fd, struct stat *__statbuf)) { return __fxstat (_STAT_VER, __fd, __statbuf); } # ifdef __USE_ATFILE __extern_inline int __NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag)) { return __fxstatat (_STAT_VER, __fd, __filename, __statbuf, __flag); } # endif # ifdef __USE_MISC __extern_inline int __NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev)) { return __xmknod (_MKNOD_VER, __path, __mode, &__dev); } # endif # ifdef __USE_ATFILE __extern_inline int __NTH (mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev)) { return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev); } # endif # if defined __USE_LARGEFILE64 \ && (! defined __USE_FILE_OFFSET64 \ || (defined __REDIRECT_NTH && defined __OPTIMIZE__)) __extern_inline int __NTH (stat64 (const char *__path, struct stat64 *__statbuf)) { return __xstat64 (_STAT_VER, __path, __statbuf); } # if defined __USE_MISC || defined __USE_XOPEN_EXTENDED __extern_inline int __NTH (lstat64 (const char *__path, struct stat64 *__statbuf)) { return __lxstat64 (_STAT_VER, __path, __statbuf); } # endif __extern_inline int __NTH (fstat64 (int __fd, struct stat64 *__statbuf)) { return __fxstat64 (_STAT_VER, __fd, __statbuf); } # ifdef __USE_ATFILE __extern_inline int __NTH (fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag)) { return __fxstatat64 (_STAT_VER, __fd, __filename, __statbuf, __flag); } # endif # endif #endif __END_DECLS #endif /* sys/stat.h */ PKZ|fs sys/personality.hnu[/* Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Taken verbatim from Linux 2.6 (include/linux/personality.h). */ #ifndef _SYS_PERSONALITY_H #define _SYS_PERSONALITY_H 1 #include /* Flags for bug emulation. These occupy the top three bytes. */ enum { UNAME26 = 0x0020000, ADDR_NO_RANDOMIZE = 0x0040000, FDPIC_FUNCPTRS = 0x0080000, MMAP_PAGE_ZERO = 0x0100000, ADDR_COMPAT_LAYOUT = 0x0200000, READ_IMPLIES_EXEC = 0x0400000, ADDR_LIMIT_32BIT = 0x0800000, SHORT_INODE = 0x1000000, WHOLE_SECONDS = 0x2000000, STICKY_TIMEOUTS = 0x4000000, ADDR_LIMIT_3GB = 0x8000000 }; /* Personality types. These go in the low byte. Avoid using the top bit, it will conflict with error returns. */ enum { PER_LINUX = 0x0000, PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT, PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS, PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE, PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE, PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS, PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE, PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS, PER_BSD = 0x0006, PER_SUNOS = 0x0006 | STICKY_TIMEOUTS, PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE, PER_LINUX32 = 0x0008, PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB, PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS, /* IRIX5 32-bit */ PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS, /* IRIX6 new 32-bit */ PER_IRIX64 = 0x000b | STICKY_TIMEOUTS, /* IRIX6 64-bit */ PER_RISCOS = 0x000c, PER_SOLARIS = 0x000d | STICKY_TIMEOUTS, PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, PER_OSF4 = 0x000f, PER_HPUX = 0x0010, PER_MASK = 0x00ff, }; __BEGIN_DECLS /* Set different ABIs (personalities). */ extern int personality (unsigned long int __persona) __THROW; __END_DECLS #endif /* sys/personality.h */ PKZ;JJ sys/termios.hnu[#ifndef _SYS_TERMIOS_H #define _SYS_TERMIOS_H #include #endif PKZM_  sys/unistd.hnu[#include PKZy"" sys/reg.hnu[/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_REG_H #define _SYS_REG_H 1 #ifdef __x86_64__ /* Index into an array of 8 byte longs returned from ptrace for location of the users' stored general purpose registers. */ # define R15 0 # define R14 1 # define R13 2 # define R12 3 # define RBP 4 # define RBX 5 # define R11 6 # define R10 7 # define R9 8 # define R8 9 # define RAX 10 # define RCX 11 # define RDX 12 # define RSI 13 # define RDI 14 # define ORIG_RAX 15 # define RIP 16 # define CS 17 # define EFLAGS 18 # define RSP 19 # define SS 20 # define FS_BASE 21 # define GS_BASE 22 # define DS 23 # define ES 24 # define FS 25 # define GS 26 #else /* Index into an array of 4 byte integers returned from ptrace for * location of the users' stored general purpose registers. */ # define EBX 0 # define ECX 1 # define EDX 2 # define ESI 3 # define EDI 4 # define EBP 5 # define EAX 6 # define DS 7 # define ES 8 # define FS 9 # define GS 10 # define ORIG_EAX 11 # define EIP 12 # define CS 13 # define EFL 14 # define UESP 15 # define SS 16 #endif #endif PKZx sys/auxv.hnu[/* Access to the auxiliary vector. Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_AUXV_H #define _SYS_AUXV_H 1 #include #include #include __BEGIN_DECLS /* Return the value associated with an Elf*_auxv_t type from the auxv list passed to the program on startup. If TYPE was not present in the auxv list, returns zero and sets errno to ENOENT. */ extern unsigned long int getauxval (unsigned long int __type) __THROW; __END_DECLS #endif /* sys/auxv.h */ PKZI'sys/io.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_IO_H #define _SYS_IO_H 1 #include __BEGIN_DECLS /* If TURN_ON is TRUE, request for permission to do direct i/o on the port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O permission off for that range. This call requires root privileges. Portability note: not all Linux platforms support this call. Most platforms based on the PC I/O architecture probably will, however. E.g., Linux/Alpha for Alpha PCs supports this. */ extern int ioperm (unsigned long int __from, unsigned long int __num, int __turn_on) __THROW; /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to access any I/O port is granted. This call requires root privileges. */ extern int iopl (int __level) __THROW; #if defined __GNUC__ && __GNUC__ >= 2 static __inline unsigned char inb (unsigned short int __port) { unsigned char _v; __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port)); return _v; } static __inline unsigned char inb_p (unsigned short int __port) { unsigned char _v; __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); return _v; } static __inline unsigned short int inw (unsigned short int __port) { unsigned short _v; __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port)); return _v; } static __inline unsigned short int inw_p (unsigned short int __port) { unsigned short int _v; __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); return _v; } static __inline unsigned int inl (unsigned short int __port) { unsigned int _v; __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port)); return _v; } static __inline unsigned int inl_p (unsigned short int __port) { unsigned int _v; __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); return _v; } static __inline void outb (unsigned char __value, unsigned short int __port) { __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port)); } static __inline void outb_p (unsigned char __value, unsigned short int __port) { __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value), "Nd" (__port)); } static __inline void outw (unsigned short int __value, unsigned short int __port) { __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port)); } static __inline void outw_p (unsigned short int __value, unsigned short int __port) { __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value), "Nd" (__port)); } static __inline void outl (unsigned int __value, unsigned short int __port) { __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port)); } static __inline void outl_p (unsigned int __value, unsigned short int __port) { __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value), "Nd" (__port)); } static __inline void insb (unsigned short int __port, void *__addr, unsigned long int __count) { __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count) :"d" (__port), "0" (__addr), "1" (__count)); } static __inline void insw (unsigned short int __port, void *__addr, unsigned long int __count) { __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count) :"d" (__port), "0" (__addr), "1" (__count)); } static __inline void insl (unsigned short int __port, void *__addr, unsigned long int __count) { __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count) :"d" (__port), "0" (__addr), "1" (__count)); } static __inline void outsb (unsigned short int __port, const void *__addr, unsigned long int __count) { __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count) :"d" (__port), "0" (__addr), "1" (__count)); } static __inline void outsw (unsigned short int __port, const void *__addr, unsigned long int __count) { __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count) :"d" (__port), "0" (__addr), "1" (__count)); } static __inline void outsl (unsigned short int __port, const void *__addr, unsigned long int __count) { __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count) :"d" (__port), "0" (__addr), "1" (__count)); } #endif /* GNU C */ __END_DECLS #endif /* _SYS_IO_H */ PKZٽsys/sdt-config.hnu[/* includes/sys/sdt-config.h. Generated from sdt-config.h.in by configure. This file just defines _SDT_ASM_SECTION_AUTOGROUP_SUPPORT to 0 or 1 to indicate whether the assembler supports "?" in .pushsection directives. */ #define _SDT_ASM_SECTION_AUTOGROUP_SUPPORT 1 PKZW1 sys/sysctl.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SYSCTL_H #define _SYS_SYSCTL_H 1 #include #define __need_size_t #include /* Prevent more kernel headers than necessary to be included. */ #ifndef _LINUX_KERNEL_H # define _LINUX_KERNEL_H 1 # define __undef_LINUX_KERNEL_H #endif #ifndef _LINUX_TYPES_H # define _LINUX_TYPES_H 1 # define __undef_LINUX_TYPES_H #endif #ifndef _LINUX_LIST_H # define _LINUX_LIST_H 1 # define __undef_LINUX_LIST_H #endif #ifndef __LINUX_COMPILER_H # define __LINUX_COMPILER_H 1 # define __user # define __undef__LINUX_COMPILER_H #endif #include #ifdef __undef_LINUX_KERNEL_H # undef _LINUX_KERNEL_H # undef __undef_LINUX_KERNEL_H #endif #ifdef __undef_LINUX_TYPES_H # undef _LINUX_TYPES_H # undef __undef_LINUX_TYPES_H #endif #ifdef __undef_LINUX_LIST_H # undef _LINUX_LIST_H # undef __undef_LINUX_LIST_H #endif #ifdef __undef__LINUX_COMPILER_H # undef __LINUX_COMPILER_H # undef __user # undef __undef__LINUX_COMPILER_H #endif #include __BEGIN_DECLS /* Read or write system parameters. */ extern int sysctl (int *__name, int __nlen, void *__oldval, size_t *__oldlenp, void *__newval, size_t __newlen) __THROW; __END_DECLS #endif /* _SYS_SYSCTL_H */ PKZkG sys/mman.hnu[/* Definitions for BSD-style memory management. Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MMAN_H #define _SYS_MMAN_H 1 #include #include #define __need_size_t #include #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else typedef __off64_t off_t; # endif # define __off_t_defined #endif #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif #include /* Return value of `mmap' in case of an error. */ #define MAP_FAILED ((void *) -1) __BEGIN_DECLS /* Map addresses starting near ADDR and extending for LEN bytes. from OFFSET into the file FD describes according to PROT and FLAGS. If ADDR is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ #ifndef __USE_FILE_OFFSET64 extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset) __THROW; #else # ifdef __REDIRECT_NTH extern void * __REDIRECT_NTH (mmap, (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset), mmap64); # else # define mmap mmap64 # endif #endif #ifdef __USE_LARGEFILE64 extern void *mmap64 (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) __THROW; #endif /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ extern int munmap (void *__addr, size_t __len) __THROW; /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ extern int mprotect (void *__addr, size_t __len, int __prot) __THROW; /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. Flags are from the MS_* set. This function is a cancellation point and therefore not marked with __THROW. */ extern int msync (void *__addr, size_t __len, int __flags); #ifdef __USE_MISC /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ extern int madvise (void *__addr, size_t __len, int __advice) __THROW; #endif #ifdef __USE_XOPEN2K /* This is the POSIX name for this function. */ extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW; #endif /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to be memory resident. */ extern int mlock (const void *__addr, size_t __len) __THROW; /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */ extern int munlock (const void *__addr, size_t __len) __THROW; /* Cause all currently mapped pages of the process to be memory resident until unlocked by a call to the `munlockall', until the process exits, or until the process calls `execve'. */ extern int mlockall (int __flags) __THROW; /* All currently mapped pages of the process' address space become unlocked. */ extern int munlockall (void) __THROW; #ifdef __USE_MISC /* mincore returns the memory residency status of the pages in the current process's address space specified by [start, start + len). The status is returned in a vector of bytes. The least significant bit of each byte is 1 if the referenced page is in memory, otherwise it is zero. */ extern int mincore (void *__start, size_t __len, unsigned char *__vec) __THROW; #endif #ifdef __USE_GNU /* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function takes another parameter which is a fixed address at which the block resides after a successful call. */ extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...) __THROW; /* Remap arbitrary pages of a shared backing store within an existing VMA. */ extern int remap_file_pages (void *__start, size_t __size, int __prot, size_t __pgoff, int __flags) __THROW; #endif /* Open shared memory segment. */ extern int shm_open (const char *__name, int __oflag, mode_t __mode); /* Remove shared memory segment. */ extern int shm_unlink (const char *__name); __END_DECLS #endif /* sys/mman.h */ PKZT  sys/fsuid.hnu[/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_FSUID_H #define _SYS_FSUID_H 1 #include #include __BEGIN_DECLS /* Change uid used for file access control to UID, without affecting other privileges (such as who can send signals at the process). */ extern int setfsuid (__uid_t __uid) __THROW; /* Ditto for group id. */ extern int setfsgid (__gid_t __gid) __THROW; __END_DECLS #endif /* fsuid.h */ PKZS-- sys/statfs.hnu[/* Definitions for getting information about a filesystem. Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_STATFS_H #define _SYS_STATFS_H 1 #include /* Get the system-specific definition of `struct statfs'. */ #include __BEGIN_DECLS /* Return information about the filesystem on which FILE resides. */ #ifndef __USE_FILE_OFFSET64 extern int statfs (const char *__file, struct statfs *__buf) __THROW __nonnull ((1, 2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (statfs, (const char *__file, struct statfs *__buf), statfs64) __nonnull ((1, 2)); # else # define statfs statfs64 # endif #endif #ifdef __USE_LARGEFILE64 extern int statfs64 (const char *__file, struct statfs64 *__buf) __THROW __nonnull ((1, 2)); #endif /* Return information about the filesystem containing the file FILDES refers to. */ #ifndef __USE_FILE_OFFSET64 extern int fstatfs (int __fildes, struct statfs *__buf) __THROW __nonnull ((2)); #else # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf), fstatfs64) __nonnull ((2)); # else # define fstatfs fstatfs64 # endif #endif #ifdef __USE_LARGEFILE64 extern int fstatfs64 (int __fildes, struct statfs64 *__buf) __THROW __nonnull ((2)); #endif __END_DECLS #endif /* sys/statfs.h */ PKZ_VV sys/gmon.hnu[/*- * Copyright (c) 1982, 1986, 1992, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)gmon.h 8.2 (Berkeley) 1/4/94 */ #ifndef _SYS_GMON_H #define _SYS_GMON_H 1 #include #include /* * See gmon_out.h for gmon.out format. */ /* structure emitted by "gcc -a". This must match struct bb in gcc/libgcc2.c. It is OK for gcc to declare a longer structure as long as the members below are present. */ struct __bb { long zero_word; const char *filename; long *counts; long ncounts; struct __bb *next; const unsigned long *addresses; }; extern struct __bb *__bb_head; /* * histogram counters are unsigned shorts (according to the kernel). */ #define HISTCOUNTER unsigned short /* * fraction of text space to allocate for histogram counters here, 1/2 */ #define HISTFRACTION 2 /* * Fraction of text space to allocate for from hash buckets. * The value of HASHFRACTION is based on the minimum number of bytes * of separation between two subroutine call points in the object code. * Given MIN_SUBR_SEPARATION bytes of separation the value of * HASHFRACTION is calculated as: * * HASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof(short) - 1); * * For example, on the VAX, the shortest two call sequence is: * * calls $0,(r0) * calls $0,(r0) * * which is separated by only three bytes, thus HASHFRACTION is * calculated as: * * HASHFRACTION = 3 / (2 * 2 - 1) = 1 * * Note that the division above rounds down, thus if MIN_SUBR_FRACTION * is less than three, this algorithm will not work! * * In practice, however, call instructions are rarely at a minimal * distance. Hence, we will define HASHFRACTION to be 2 across all * architectures. This saves a reasonable amount of space for * profiling data structures without (in practice) sacrificing * any granularity. */ #define HASHFRACTION 2 /* * Percent of text space to allocate for tostructs. * This is a heuristic; we will fail with a warning when profiling programs * with a very large number of very small functions, but that's * normally OK. * 2 is probably still a good value for normal programs. * Profiling a test case with 64000 small functions will work if * you raise this value to 3 and link statically (which bloats the * text size, thus raising the number of arcs expected by the heuristic). */ #define ARCDENSITY 3 /* * Always allocate at least this many tostructs. This * hides the inadequacy of the ARCDENSITY heuristic, at least * for small programs. * * Value can be overridden at runtime by glibc.gmon.minarcs tunable. */ #define MINARCS 50 /* * The type used to represent indices into gmonparam.tos[]. */ #define ARCINDEX unsigned long /* * Maximum number of arcs we want to allow. * Used to be max representable value of ARCINDEX minus 2, but now * that ARCINDEX is a long, that's too large; we don't really want * to allow a 48 gigabyte table. * * Value can be overridden at runtime by glibc.gmon.maxarcs tunable. */ #define MAXARCS (1 << 20) struct tostruct { unsigned long selfpc; long count; ARCINDEX link; }; /* * a raw arc, with pointers to the calling site and * the called site and a count. */ struct rawarc { unsigned long raw_frompc; unsigned long raw_selfpc; long raw_count; }; /* * general rounding functions. */ #define ROUNDDOWN(x,y) (((x)/(y))*(y)) #define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y)) /* * The profiling data structures are housed in this structure. */ struct gmonparam { long int state; unsigned short *kcount; unsigned long kcountsize; ARCINDEX *froms; unsigned long fromssize; struct tostruct *tos; unsigned long tossize; long tolimit; unsigned long lowpc; unsigned long highpc; unsigned long textsize; unsigned long hashfraction; long log_hashfraction; }; /* * Possible states of profiling. */ #define GMON_PROF_ON 0 #define GMON_PROF_BUSY 1 #define GMON_PROF_ERROR 2 #define GMON_PROF_OFF 3 /* * Sysctl definitions for extracting profiling information from the kernel. */ #define GPROF_STATE 0 /* int: profiling enabling variable */ #define GPROF_COUNT 1 /* struct: profile tick count buffer */ #define GPROF_FROMS 2 /* struct: from location hash bucket */ #define GPROF_TOS 3 /* struct: destination/count structure */ #define GPROF_GMONPARAM 4 /* struct: profiling parameters (see above) */ __BEGIN_DECLS /* Set up data structures and start profiling. */ extern void __monstartup (unsigned long __lowpc, unsigned long __highpc) __THROW; extern void monstartup (unsigned long __lowpc, unsigned long __highpc) __THROW; /* Clean up profiling and write out gmon.out. */ extern void _mcleanup (void) __THROW; __END_DECLS #endif /* sys/gmon.h */ PKZmK K sys/gmon_out.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* This file specifies the format of gmon.out files. It should have as few external dependencies as possible as it is going to be included in many different programs. That is, minimize the number of #include's. A gmon.out file consists of a header (defined by gmon_hdr) followed by a sequence of records. Each record starts with a one-byte tag identifying the type of records, followed by records specific data. */ #ifndef _SYS_GMON_OUT_H #define _SYS_GMON_OUT_H 1 #include #define GMON_MAGIC "gmon" /* magic cookie */ #define GMON_VERSION 1 /* version number */ /* For profiling shared object we need a new format. */ #define GMON_SHOBJ_VERSION 0x1ffff __BEGIN_DECLS /* * Raw header as it appears on file (without padding). This header * always comes first in gmon.out and is then followed by a series * records defined below. */ struct gmon_hdr { char cookie[4]; char version[4]; char spare[3 * 4]; }; /* types of records in this file: */ typedef enum { GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2 } GMON_Record_Tag; struct gmon_hist_hdr { char low_pc[sizeof (char *)]; /* base pc address of sample buffer */ char high_pc[sizeof (char *)]; /* max pc address of sampled buffer */ char hist_size[4]; /* size of sample buffer */ char prof_rate[4]; /* profiling clock rate */ char dimen[15]; /* phys. dim., usually "seconds" */ char dimen_abbrev; /* usually 's' for "seconds" */ }; struct gmon_cg_arc_record { char from_pc[sizeof (char *)]; /* address within caller's body */ char self_pc[sizeof (char *)]; /* address within callee's body */ char count[4]; /* number of arc traversals */ }; __END_DECLS #endif /* sys/gmon_out.h */ PKZg sys/signal.hnu[#include PKZM sys/acct.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_ACCT_H #define _SYS_ACCT_H 1 #include #include #include #include __BEGIN_DECLS #define ACCT_COMM 16 /* comp_t is a 16-bit "floating" point number with a 3-bit base 8 exponent and a 13-bit fraction. See linux/kernel/acct.c for the specific encoding system used. */ typedef uint16_t comp_t; struct acct { char ac_flag; /* Flags. */ uint16_t ac_uid; /* Real user ID. */ uint16_t ac_gid; /* Real group ID. */ uint16_t ac_tty; /* Controlling terminal. */ uint32_t ac_btime; /* Beginning time. */ comp_t ac_utime; /* User time. */ comp_t ac_stime; /* System time. */ comp_t ac_etime; /* Elapsed time. */ comp_t ac_mem; /* Average memory usage. */ comp_t ac_io; /* Chars transferred. */ comp_t ac_rw; /* Blocks read or written. */ comp_t ac_minflt; /* Minor pagefaults. */ comp_t ac_majflt; /* Major pagefaults. */ comp_t ac_swaps; /* Number of swaps. */ uint32_t ac_exitcode; /* Process exitcode. */ char ac_comm[ACCT_COMM+1]; /* Command name. */ char ac_pad[10]; /* Padding bytes. */ }; struct acct_v3 { char ac_flag; /* Flags */ char ac_version; /* Always set to ACCT_VERSION */ uint16_t ac_tty; /* Control Terminal */ uint32_t ac_exitcode; /* Exitcode */ uint32_t ac_uid; /* Real User ID */ uint32_t ac_gid; /* Real Group ID */ uint32_t ac_pid; /* Process ID */ uint32_t ac_ppid; /* Parent Process ID */ uint32_t ac_btime; /* Process Creation Time */ float ac_etime; /* Elapsed Time */ comp_t ac_utime; /* User Time */ comp_t ac_stime; /* System Time */ comp_t ac_mem; /* Average Memory Usage */ comp_t ac_io; /* Chars Transferred */ comp_t ac_rw; /* Blocks Read or Written */ comp_t ac_minflt; /* Minor Pagefaults */ comp_t ac_majflt; /* Major Pagefaults */ comp_t ac_swaps; /* Number of Swaps */ char ac_comm[ACCT_COMM]; /* Command Name */ }; enum { AFORK = 0x01, /* Has executed fork, but no exec. */ ASU = 0x02, /* Used super-user privileges. */ ACORE = 0x08, /* Dumped core. */ AXSIG = 0x10 /* Killed by a signal. */ }; #if __BYTE_ORDER == __BIG_ENDIAN # define ACCT_BYTEORDER 0x80 /* Accounting file is big endian. */ #else # define ACCT_BYTEORDER 0x00 /* Accounting file is little endian. */ #endif #define AHZ 100 /* Switch process accounting on and off. */ extern int acct (const char *__filename) __THROW; __END_DECLS #endif /* sys/acct.h */ PKZH+ sys/klog.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_KLOG_H #define _SYS_KLOG_H 1 #include __BEGIN_DECLS /* Control the kernel's logging facility. This corresponds exactly to the kernel's syslog system call, but that name is easily confused with the user-level syslog facility, which is something completely different. */ extern int klogctl (int __type, char *__bufp, int __len) __THROW; __END_DECLS #endif /* _SYS_KLOG_H */ PKZڤ[neteconet/ec.hnu[/* Definitions for use with Linux AF_ECONET sockets. Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETECONET_EC_H #define _NETECONET_EC_H 1 #include #include struct ec_addr { unsigned char station; /* Station number. */ unsigned char net; /* Network number. */ }; struct sockaddr_ec { __SOCKADDR_COMMON (sec_); unsigned char port; /* Port number. */ unsigned char cb; /* Control/flag byte. */ unsigned char type; /* Type of message. */ struct ec_addr addr; unsigned long cookie; }; #define ECTYPE_PACKET_RECEIVED 0 /* Packet received */ #define ECTYPE_TRANSMIT_STATUS 0x10 /* Transmit completed */ #define ECTYPE_TRANSMIT_OK 1 #define ECTYPE_TRANSMIT_NOT_LISTENING 2 #define ECTYPE_TRANSMIT_NET_ERROR 3 #define ECTYPE_TRANSMIT_NO_CLOCK 4 #define ECTYPE_TRANSMIT_LINE_JAMMED 5 #define ECTYPE_TRANSMIT_NOT_PRESENT 6 #endif PKZd~ jconfig-64.hnu[/* jconfig.h. Generated from jconfig.h.in by configure. */ /* Version ID for the JPEG library. * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". */ #define JPEG_LIB_VERSION 62 /* libjpeg-turbo version */ #define LIBJPEG_TURBO_VERSION 1.5.3 /* libjpeg-turbo version in integer form */ #define LIBJPEG_TURBO_VERSION_NUMBER 1005003 /* Support arithmetic encoding */ #define C_ARITH_CODING_SUPPORTED 1 /* Support arithmetic decoding */ #define D_ARITH_CODING_SUPPORTED 1 /* * Define BITS_IN_JSAMPLE as either * 8 for 8-bit sample values (the usual setting) * 12 for 12-bit sample values * Only 8 and 12 are legal data precisions for lossy JPEG according to the * JPEG standard, and the IJG code does not support anything else! * We do not support run-time selection of data precision, sorry. */ #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if the system has the type `unsigned char'. */ #define HAVE_UNSIGNED_CHAR 1 /* Define to 1 if the system has the type `unsigned short'. */ #define HAVE_UNSIGNED_SHORT 1 /* Compiler does not support pointers to undefined structures. */ /* #undef INCOMPLETE_TYPES_BROKEN */ /* Support in-memory source/destination managers */ #define MEM_SRCDST_SUPPORTED 1 /* Define if you have BSD-like bzero and bcopy in rather than memset/memcpy in . */ /* #undef NEED_BSD_STRINGS */ /* Define if you need to include to get size_t. */ #define NEED_SYS_TYPES_H 1 /* Define if your (broken) compiler shifts signed values as if they were unsigned. */ /* #undef RIGHT_SHIFT_IS_UNSIGNED */ /* Use accelerated SIMD routines. */ #define WITH_SIMD 1 /* Define to 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ /* # undef __CHAR_UNSIGNED__ */ #endif /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ PKZQ'event2/bufferevent_ssl.hnu[/* * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ #define EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ /** @file event2/bufferevent_ssl.h OpenSSL support for bufferevents. */ #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* This is what openssl's SSL objects are underneath. */ struct ssl_st; /** The state of an SSL object to be used when creating a new SSL bufferevent. */ enum bufferevent_ssl_state { BUFFEREVENT_SSL_OPEN = 0, BUFFEREVENT_SSL_CONNECTING = 1, BUFFEREVENT_SSL_ACCEPTING = 2 }; #if defined(EVENT__HAVE_OPENSSL) || defined(EVENT_IN_DOXYGEN_) /** Create a new SSL bufferevent to send its data over another bufferevent. @param base An event_base to use to detect reading and writing. It must also be the base for the underlying bufferevent. @param underlying A socket to use for this SSL @param ssl A SSL* object from openssl. @param state The current state of the SSL connection @param options One or more bufferevent_options @return A new bufferevent on success, or NULL on failure */ EVENT2_EXPORT_SYMBOL struct bufferevent * bufferevent_openssl_filter_new(struct event_base *base, struct bufferevent *underlying, struct ssl_st *ssl, enum bufferevent_ssl_state state, int options); /** Create a new SSL bufferevent to send its data over an SSL * on a socket. @param base An event_base to use to detect reading and writing @param fd A socket to use for this SSL @param ssl A SSL* object from openssl. @param state The current state of the SSL connection @param options One or more bufferevent_options @return A new bufferevent on success, or NULL on failure. */ EVENT2_EXPORT_SYMBOL struct bufferevent * bufferevent_openssl_socket_new(struct event_base *base, evutil_socket_t fd, struct ssl_st *ssl, enum bufferevent_ssl_state state, int options); /** Control how to report dirty SSL shutdowns. If the peer (or the network, or an attacker) closes the TCP connection before closing the SSL channel, and the protocol is SSL >= v3, this is a "dirty" shutdown. If allow_dirty_shutdown is 0 (default), this is reported as BEV_EVENT_ERROR. If instead allow_dirty_shutdown=1, a dirty shutdown is reported as BEV_EVENT_EOF. (Note that if the protocol is < SSLv3, you will always receive BEV_EVENT_EOF, since SSL 2 and earlier cannot distinguish a secure connection close from a dirty one. This is one reason (among many) not to use SSL 2.) */ EVENT2_EXPORT_SYMBOL int bufferevent_openssl_get_allow_dirty_shutdown(struct bufferevent *bev); EVENT2_EXPORT_SYMBOL void bufferevent_openssl_set_allow_dirty_shutdown(struct bufferevent *bev, int allow_dirty_shutdown); /** Return the underlying openssl SSL * object for an SSL bufferevent. */ EVENT2_EXPORT_SYMBOL struct ssl_st * bufferevent_openssl_get_ssl(struct bufferevent *bufev); /** Tells a bufferevent to begin SSL renegotiation. */ EVENT2_EXPORT_SYMBOL int bufferevent_ssl_renegotiate(struct bufferevent *bev); /** Return the most recent OpenSSL error reported on an SSL bufferevent. */ EVENT2_EXPORT_SYMBOL unsigned long bufferevent_get_openssl_error(struct bufferevent *bev); #endif #ifdef __cplusplus } #endif #endif /* EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ */ PKZf:event2/event.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_EVENT_H_INCLUDED_ #define EVENT2_EVENT_H_INCLUDED_ /** @mainpage @section intro Introduction Libevent is an event notification library for developing scalable network servers. The Libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, Libevent also support callbacks due to signals or regular timeouts. Libevent is meant to replace the event loop found in event driven network servers. An application just needs to call event_base_dispatch() and then add or remove events dynamically without having to change the event loop. Currently, Libevent supports /dev/poll, kqueue(2), select(2), poll(2), epoll(4), and evports. The internal event mechanism is completely independent of the exposed event API, and a simple update of Libevent can provide new functionality without having to redesign the applications. As a result, Libevent allows for portable application development and provides the most scalable event notification mechanism available on an operating system. Libevent can also be used for multithreaded programs. Libevent should compile on Linux, *BSD, Mac OS X, Solaris and, Windows. @section usage Standard usage Every program that uses Libevent must include the header, and pass the -levent flag to the linker. (You can instead link -levent_core if you only want the main event and buffered IO-based code, and don't want to link any protocol code.) @section setup Library setup Before you call any other Libevent functions, you need to set up the library. If you're going to use Libevent from multiple threads in a multithreaded application, you need to initialize thread support -- typically by using evthread_use_pthreads() or evthread_use_windows_threads(). See for more information. This is also the point where you can replace Libevent's memory management functions with event_set_mem_functions, and enable debug mode with event_enable_debug_mode(). @section base Creating an event base Next, you need to create an event_base structure, using event_base_new() or event_base_new_with_config(). The event_base is responsible for keeping track of which events are "pending" (that is to say, being watched to see if they become active) and which events are "active". Every event is associated with a single event_base. @section event Event notification For each file descriptor that you wish to monitor, you must create an event structure with event_new(). (You may also declare an event structure and call event_assign() to initialize the members of the structure.) To enable notification, you add the structure to the list of monitored events by calling event_add(). The event structure must remain allocated as long as it is active, so it should generally be allocated on the heap. @section loop Dispatching events. Finally, you call event_base_dispatch() to loop and dispatch events. You can also use event_base_loop() for more fine-grained control. Currently, only one thread can be dispatching a given event_base at a time. If you want to run events in multiple threads at once, you can either have a single event_base whose events add work to a work queue, or you can create multiple event_base objects. @section bufferevent I/O Buffers Libevent provides a buffered I/O abstraction on top of the regular event callbacks. This abstraction is called a bufferevent. A bufferevent provides input and output buffers that get filled and drained automatically. The user of a buffered event no longer deals directly with the I/O, but instead is reading from input and writing to output buffers. Once initialized via bufferevent_socket_new(), the bufferevent structure can be used repeatedly with bufferevent_enable() and bufferevent_disable(). Instead of reading and writing directly to a socket, you would call bufferevent_read() and bufferevent_write(). When read enabled the bufferevent will try to read from the file descriptor and call the read callback. The write callback is executed whenever the output buffer is drained below the write low watermark, which is 0 by default. See for more information. @section timers Timers Libevent can also be used to create timers that invoke a callback after a certain amount of time has expired. The evtimer_new() macro returns an event struct to use as a timer. To activate the timer, call evtimer_add(). Timers can be deactivated by calling evtimer_del(). (These macros are thin wrappers around event_new(), event_add(), and event_del(); you can also use those instead.) @section evdns Asynchronous DNS resolution Libevent provides an asynchronous DNS resolver that should be used instead of the standard DNS resolver functions. See the functions for more detail. @section evhttp Event-driven HTTP servers Libevent provides a very simple event-driven HTTP server that can be embedded in your program and used to service HTTP requests. To use this capability, you need to include the header in your program. See that header for more information. @section evrpc A framework for RPC servers and clients Libevent provides a framework for creating RPC servers and clients. It takes care of marshaling and unmarshaling all data structures. @section api API Reference To browse the complete documentation of the libevent API, click on any of the following links. event2/event.h The primary libevent header event2/thread.h Functions for use by multithreaded programs event2/buffer.h and event2/bufferevent.h Buffer management for network reading and writing event2/util.h Utility functions for portable nonblocking network code event2/dns.h Asynchronous DNS resolution event2/http.h An embedded libevent-based HTTP server event2/rpc.h A framework for creating RPC servers and clients */ /** @file event2/event.h Core functions for waiting for and receiving events, and using event bases. */ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif #include /* For int types. */ #include /** * Structure to hold information and state for a Libevent dispatch loop. * * The event_base lies at the center of Libevent; every application will * have one. It keeps track of all pending and active events, and * notifies your application of the active ones. * * This is an opaque structure; you can allocate one using * event_base_new() or event_base_new_with_config(). * * @see event_base_new(), event_base_free(), event_base_loop(), * event_base_new_with_config() */ struct event_base #ifdef EVENT_IN_DOXYGEN_ {/*Empty body so that doxygen will generate documentation here.*/} #endif ; /** * @struct event * * Structure to represent a single event. * * An event can have some underlying condition it represents: a socket * becoming readable or writeable (or both), or a signal becoming raised. * (An event that represents no underlying condition is still useful: you * can use one to implement a timer, or to communicate between threads.) * * Generally, you can create events with event_new(), then make them * pending with event_add(). As your event_base runs, it will run the * callbacks of an events whose conditions are triggered. When you * longer want the event, free it with event_free(). * * In more depth: * * An event may be "pending" (one whose condition we are watching), * "active" (one whose condition has triggered and whose callback is about * to run), neither, or both. Events come into existence via * event_assign() or event_new(), and are then neither active nor pending. * * To make an event pending, pass it to event_add(). When doing so, you * can also set a timeout for the event. * * Events become active during an event_base_loop() call when either their * condition has triggered, or when their timeout has elapsed. You can * also activate an event manually using event_active(). The even_base * loop will run the callbacks of active events; after it has done so, it * marks them as no longer active. * * You can make an event non-pending by passing it to event_del(). This * also makes the event non-active. * * Events can be "persistent" or "non-persistent". A non-persistent event * becomes non-pending as soon as it is triggered: thus, it only runs at * most once per call to event_add(). A persistent event remains pending * even when it becomes active: you'll need to event_del() it manually in * order to make it non-pending. When a persistent event with a timeout * becomes active, its timeout is reset: this means you can use persistent * events to implement periodic timeouts. * * This should be treated as an opaque structure; you should never read or * write any of its fields directly. For backward compatibility with old * code, it is defined in the event2/event_struct.h header; including this * header may make your code incompatible with other versions of Libevent. * * @see event_new(), event_free(), event_assign(), event_get_assignment(), * event_add(), event_del(), event_active(), event_pending(), * event_get_fd(), event_get_base(), event_get_events(), * event_get_callback(), event_get_callback_arg(), * event_priority_set() */ struct event #ifdef EVENT_IN_DOXYGEN_ {/*Empty body so that doxygen will generate documentation here.*/} #endif ; /** * Configuration for an event_base. * * There are many options that can be used to alter the behavior and * implementation of an event_base. To avoid having to pass them all in a * complex many-argument constructor, we provide an abstract data type * wrhere you set up configation information before passing it to * event_base_new_with_config(). * * @see event_config_new(), event_config_free(), event_base_new_with_config(), * event_config_avoid_method(), event_config_require_features(), * event_config_set_flag(), event_config_set_num_cpus_hint() */ struct event_config #ifdef EVENT_IN_DOXYGEN_ {/*Empty body so that doxygen will generate documentation here.*/} #endif ; /** * Enable some relatively expensive debugging checks in Libevent that * would normally be turned off. Generally, these checks cause code that * would otherwise crash mysteriously to fail earlier with an assertion * failure. Note that this method MUST be called before any events or * event_bases have been created. * * Debug mode can currently catch the following errors: * An event is re-assigned while it is added * Any function is called on a non-assigned event * * Note that debugging mode uses memory to track every event that has been * initialized (via event_assign, event_set, or event_new) but not yet * released (via event_free or event_debug_unassign). If you want to use * debug mode, and you find yourself running out of memory, you will need * to use event_debug_unassign to explicitly stop tracking events that * are no longer considered set-up. * * @see event_debug_unassign() */ EVENT2_EXPORT_SYMBOL void event_enable_debug_mode(void); /** * When debugging mode is enabled, informs Libevent that an event should no * longer be considered as assigned. When debugging mode is not enabled, does * nothing. * * This function must only be called on a non-added event. * * @see event_enable_debug_mode() */ EVENT2_EXPORT_SYMBOL void event_debug_unassign(struct event *); /** * Create and return a new event_base to use with the rest of Libevent. * * @return a new event_base on success, or NULL on failure. * * @see event_base_free(), event_base_new_with_config() */ EVENT2_EXPORT_SYMBOL struct event_base *event_base_new(void); /** Reinitialize the event base after a fork Some event mechanisms do not survive across fork. The event base needs to be reinitialized with the event_reinit() function. @param base the event base that needs to be re-initialized @return 0 if successful, or -1 if some events could not be re-added. @see event_base_new() */ EVENT2_EXPORT_SYMBOL int event_reinit(struct event_base *base); /** Event dispatching loop This loop will run the event base until either there are no more pending or active, or until something calls event_base_loopbreak() or event_base_loopexit(). @param base the event_base structure returned by event_base_new() or event_base_new_with_config() @return 0 if successful, -1 if an error occurred, or 1 if we exited because no events were pending or active. @see event_base_loop() */ EVENT2_EXPORT_SYMBOL int event_base_dispatch(struct event_base *); /** Get the kernel event notification mechanism used by Libevent. @param eb the event_base structure returned by event_base_new() @return a string identifying the kernel event mechanism (kqueue, epoll, etc.) */ EVENT2_EXPORT_SYMBOL const char *event_base_get_method(const struct event_base *); /** Gets all event notification mechanisms supported by Libevent. This functions returns the event mechanism in order preferred by Libevent. Note that this list will include all backends that Libevent has compiled-in support for, and will not necessarily check your OS to see whether it has the required resources. @return an array with pointers to the names of support methods. The end of the array is indicated by a NULL pointer. If an error is encountered NULL is returned. */ EVENT2_EXPORT_SYMBOL const char **event_get_supported_methods(void); /** Query the current monotonic time from a the timer for a struct * event_base. */ EVENT2_EXPORT_SYMBOL int event_gettime_monotonic(struct event_base *base, struct timeval *tp); /** @name event type flag Flags to pass to event_base_get_num_events() to specify the kinds of events we want to aggregate counts for */ /**@{*/ /** count the number of active events, which have been triggered.*/ #define EVENT_BASE_COUNT_ACTIVE 1U /** count the number of virtual events, which is used to represent an internal * condition, other than a pending event, that keeps the loop from exiting. */ #define EVENT_BASE_COUNT_VIRTUAL 2U /** count the number of events which have been added to event base, including * internal events. */ #define EVENT_BASE_COUNT_ADDED 4U /**@}*/ /** Gets the number of events in event_base, as specified in the flags. Since event base has some internal events added to make some of its functionalities work, EVENT_BASE_COUNT_ADDED may return more than the number of events you added using event_add(). If you pass EVENT_BASE_COUNT_ACTIVE and EVENT_BASE_COUNT_ADDED together, an active event will be counted twice. However, this might not be the case in future libevent versions. The return value is an indication of the work load, but the user shouldn't rely on the exact value as this may change in the future. @param eb the event_base structure returned by event_base_new() @param flags a bitwise combination of the kinds of events to aggregate counts for @return the number of events specified in the flags */ EVENT2_EXPORT_SYMBOL int event_base_get_num_events(struct event_base *, unsigned int); /** Get the maximum number of events in a given event_base as specified in the flags. @param eb the event_base structure returned by event_base_new() @param flags a bitwise combination of the kinds of events to aggregate counts for @param clear option used to reset the maximum count. @return the number of events specified in the flags */ EVENT2_EXPORT_SYMBOL int event_base_get_max_events(struct event_base *, unsigned int, int); /** Allocates a new event configuration object. The event configuration object can be used to change the behavior of an event base. @return an event_config object that can be used to store configuration, or NULL if an error is encountered. @see event_base_new_with_config(), event_config_free(), event_config */ EVENT2_EXPORT_SYMBOL struct event_config *event_config_new(void); /** Deallocates all memory associated with an event configuration object @param cfg the event configuration object to be freed. */ EVENT2_EXPORT_SYMBOL void event_config_free(struct event_config *cfg); /** Enters an event method that should be avoided into the configuration. This can be used to avoid event mechanisms that do not support certain file descriptor types, or for debugging to avoid certain event mechanisms. An application can make use of multiple event bases to accommodate incompatible file descriptor types. @param cfg the event configuration object @param method the name of the event method to avoid @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int event_config_avoid_method(struct event_config *cfg, const char *method); /** A flag used to describe which features an event_base (must) provide. Because of OS limitations, not every Libevent backend supports every possible feature. You can use this type with event_config_require_features() to tell Libevent to only proceed if your event_base implements a given feature, and you can receive this type from event_base_get_features() to see which features are available. */ enum event_method_feature { /** Require an event method that allows edge-triggered events with EV_ET. */ EV_FEATURE_ET = 0x01, /** Require an event method where having one event triggered among * many is [approximately] an O(1) operation. This excludes (for * example) select and poll, which are approximately O(N) for N * equal to the total number of possible events. */ EV_FEATURE_O1 = 0x02, /** Require an event method that allows file descriptors as well as * sockets. */ EV_FEATURE_FDS = 0x04, /** Require an event method that allows you to use EV_CLOSED to detect * connection close without the necessity of reading all the pending data. * * Methods that do support EV_CLOSED may not be able to provide support on * all kernel versions. **/ EV_FEATURE_EARLY_CLOSE = 0x08 }; /** A flag passed to event_config_set_flag(). These flags change the behavior of an allocated event_base. @see event_config_set_flag(), event_base_new_with_config(), event_method_feature */ enum event_base_config_flag { /** Do not allocate a lock for the event base, even if we have locking set up. Setting this option will make it unsafe and nonfunctional to call functions on the base concurrently from multiple threads. */ EVENT_BASE_FLAG_NOLOCK = 0x01, /** Do not check the EVENT_* environment variables when configuring an event_base */ EVENT_BASE_FLAG_IGNORE_ENV = 0x02, /** Windows only: enable the IOCP dispatcher at startup If this flag is set then bufferevent_socket_new() and evconn_listener_new() will use IOCP-backed implementations instead of the usual select-based one on Windows. */ EVENT_BASE_FLAG_STARTUP_IOCP = 0x04, /** Instead of checking the current time every time the event loop is ready to run timeout callbacks, check after each timeout callback. */ EVENT_BASE_FLAG_NO_CACHE_TIME = 0x08, /** If we are using the epoll backend, this flag says that it is safe to use Libevent's internal change-list code to batch up adds and deletes in order to try to do as few syscalls as possible. Setting this flag can make your code run faster, but it may trigger a Linux bug: it is not safe to use this flag if you have any fds cloned by dup() or its variants. Doing so will produce strange and hard-to-diagnose bugs. This flag can also be activated by setting the EVENT_EPOLL_USE_CHANGELIST environment variable. This flag has no effect if you wind up using a backend other than epoll. */ EVENT_BASE_FLAG_EPOLL_USE_CHANGELIST = 0x10, /** Ordinarily, Libevent implements its time and timeout code using the fastest monotonic timer that we have. If this flag is set, however, we use less efficient more precise timer, assuming one is present. */ EVENT_BASE_FLAG_PRECISE_TIMER = 0x20 }; /** Return a bitmask of the features implemented by an event base. This will be a bitwise OR of one or more of the values of event_method_feature @see event_method_feature */ EVENT2_EXPORT_SYMBOL int event_base_get_features(const struct event_base *base); /** Enters a required event method feature that the application demands. Note that not every feature or combination of features is supported on every platform. Code that requests features should be prepared to handle the case where event_base_new_with_config() returns NULL, as in:
     event_config_require_features(cfg, EV_FEATURE_ET);
     base = event_base_new_with_config(cfg);
     if (base == NULL) {
       // We can't get edge-triggered behavior here.
       event_config_require_features(cfg, 0);
       base = event_base_new_with_config(cfg);
     }
   
@param cfg the event configuration object @param feature a bitfield of one or more event_method_feature values. Replaces values from previous calls to this function. @return 0 on success, -1 on failure. @see event_method_feature, event_base_new_with_config() */ EVENT2_EXPORT_SYMBOL int event_config_require_features(struct event_config *cfg, int feature); /** * Sets one or more flags to configure what parts of the eventual event_base * will be initialized, and how they'll work. * * @see event_base_config_flags, event_base_new_with_config() **/ EVENT2_EXPORT_SYMBOL int event_config_set_flag(struct event_config *cfg, int flag); /** * Records a hint for the number of CPUs in the system. This is used for * tuning thread pools, etc, for optimal performance. In Libevent 2.0, * it is only on Windows, and only when IOCP is in use. * * @param cfg the event configuration object * @param cpus the number of cpus * @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int event_config_set_num_cpus_hint(struct event_config *cfg, int cpus); /** * Record an interval and/or a number of callbacks after which the event base * should check for new events. By default, the event base will run as many * events are as activated at the higest activated priority before checking * for new events. If you configure it by setting max_interval, it will check * the time after each callback, and not allow more than max_interval to * elapse before checking for new events. If you configure it by setting * max_callbacks to a value >= 0, it will run no more than max_callbacks * callbacks before checking for new events. * * This option can decrease the latency of high-priority events, and * avoid priority inversions where multiple low-priority events keep us from * polling for high-priority events, but at the expense of slightly decreasing * the throughput. Use it with caution! * * @param cfg The event_base configuration object. * @param max_interval An interval after which Libevent should stop running * callbacks and check for more events, or NULL if there should be * no such interval. * @param max_callbacks A number of callbacks after which Libevent should * stop running callbacks and check for more events, or -1 if there * should be no such limit. * @param min_priority A priority below which max_interval and max_callbacks * should not be enforced. If this is set to 0, they are enforced * for events of every priority; if it's set to 1, they're enforced * for events of priority 1 and above, and so on. * @return 0 on success, -1 on failure. **/ EVENT2_EXPORT_SYMBOL int event_config_set_max_dispatch_interval(struct event_config *cfg, const struct timeval *max_interval, int max_callbacks, int min_priority); /** Initialize the event API. Use event_base_new_with_config() to initialize a new event base, taking the specified configuration under consideration. The configuration object can currently be used to avoid certain event notification mechanisms. @param cfg the event configuration object @return an initialized event_base that can be used to registering events, or NULL if no event base can be created with the requested event_config. @see event_base_new(), event_base_free(), event_init(), event_assign() */ EVENT2_EXPORT_SYMBOL struct event_base *event_base_new_with_config(const struct event_config *); /** Deallocate all memory associated with an event_base, and free the base. Note that this function will not close any fds or free any memory passed to event_new as the argument to callback. If there are any pending finalizer callbacks, this function will invoke them. @param eb an event_base to be freed */ EVENT2_EXPORT_SYMBOL void event_base_free(struct event_base *); /** As event_free, but do not run finalizers. THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES BECOMES STABLE. */ EVENT2_EXPORT_SYMBOL void event_base_free_nofinalize(struct event_base *); /** @name Log severities */ /**@{*/ #define EVENT_LOG_DEBUG 0 #define EVENT_LOG_MSG 1 #define EVENT_LOG_WARN 2 #define EVENT_LOG_ERR 3 /**@}*/ /* Obsolete names: these are deprecated, but older programs might use them. * They violate the reserved-identifier namespace. */ #define _EVENT_LOG_DEBUG EVENT_LOG_DEBUG #define _EVENT_LOG_MSG EVENT_LOG_MSG #define _EVENT_LOG_WARN EVENT_LOG_WARN #define _EVENT_LOG_ERR EVENT_LOG_ERR /** A callback function used to intercept Libevent's log messages. @see event_set_log_callback */ typedef void (*event_log_cb)(int severity, const char *msg); /** Redirect Libevent's log messages. @param cb a function taking two arguments: an integer severity between EVENT_LOG_DEBUG and EVENT_LOG_ERR, and a string. If cb is NULL, then the default log is used. NOTE: The function you provide *must not* call any other libevent functionality. Doing so can produce undefined behavior. */ EVENT2_EXPORT_SYMBOL void event_set_log_callback(event_log_cb cb); /** A function to be called if Libevent encounters a fatal internal error. @see event_set_fatal_callback */ typedef void (*event_fatal_cb)(int err); /** Override Libevent's behavior in the event of a fatal internal error. By default, Libevent will call exit(1) if a programming error makes it impossible to continue correct operation. This function allows you to supply another callback instead. Note that if the function is ever invoked, something is wrong with your program, or with Libevent: any subsequent calls to Libevent may result in undefined behavior. Libevent will (almost) always log an EVENT_LOG_ERR message before calling this function; look at the last log message to see why Libevent has died. */ EVENT2_EXPORT_SYMBOL void event_set_fatal_callback(event_fatal_cb cb); #define EVENT_DBG_ALL 0xffffffffu #define EVENT_DBG_NONE 0 /** Turn on debugging logs and have them sent to the default log handler. This is a global setting; if you are going to call it, you must call this before any calls that create an event-base. You must call it before any multithreaded use of Libevent. Debug logs are verbose. @param which Controls which debug messages are turned on. This option is unused for now; for forward compatibility, you must pass in the constant "EVENT_DBG_ALL" to turn debugging logs on, or "EVENT_DBG_NONE" to turn debugging logs off. */ EVENT2_EXPORT_SYMBOL void event_enable_debug_logging(ev_uint32_t which); /** Associate a different event base with an event. The event to be associated must not be currently active or pending. @param eb the event base @param ev the event @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int event_base_set(struct event_base *, struct event *); /** @name Loop flags These flags control the behavior of event_base_loop(). */ /**@{*/ /** Block until we have an active event, then exit once all active events * have had their callbacks run. */ #define EVLOOP_ONCE 0x01 /** Do not block: see which events are ready now, run the callbacks * of the highest-priority ones, then exit. */ #define EVLOOP_NONBLOCK 0x02 /** Do not exit the loop because we have no pending events. Instead, keep * running until event_base_loopexit() or event_base_loopbreak() makes us * stop. */ #define EVLOOP_NO_EXIT_ON_EMPTY 0x04 /**@}*/ /** Wait for events to become active, and run their callbacks. This is a more flexible version of event_base_dispatch(). By default, this loop will run the event base until either there are no more pending or active events, or until something calls event_base_loopbreak() or event_base_loopexit(). You can override this behavior with the 'flags' argument. @param eb the event_base structure returned by event_base_new() or event_base_new_with_config() @param flags any combination of EVLOOP_ONCE | EVLOOP_NONBLOCK @return 0 if successful, -1 if an error occurred, or 1 if we exited because no events were pending or active. @see event_base_loopexit(), event_base_dispatch(), EVLOOP_ONCE, EVLOOP_NONBLOCK */ EVENT2_EXPORT_SYMBOL int event_base_loop(struct event_base *, int); /** Exit the event loop after the specified time The next event_base_loop() iteration after the given timer expires will complete normally (handling all queued events) then exit without blocking for events again. Subsequent invocations of event_base_loop() will proceed normally. @param eb the event_base structure returned by event_init() @param tv the amount of time after which the loop should terminate, or NULL to exit after running all currently active events. @return 0 if successful, or -1 if an error occurred @see event_base_loopbreak() */ EVENT2_EXPORT_SYMBOL int event_base_loopexit(struct event_base *, const struct timeval *); /** Abort the active event_base_loop() immediately. event_base_loop() will abort the loop after the next event is completed; event_base_loopbreak() is typically invoked from this event's callback. This behavior is analogous to the "break;" statement. Subsequent invocations of event_base_loop() will proceed normally. @param eb the event_base structure returned by event_init() @return 0 if successful, or -1 if an error occurred @see event_base_loopexit() */ EVENT2_EXPORT_SYMBOL int event_base_loopbreak(struct event_base *); /** Tell the active event_base_loop() to scan for new events immediately. Calling this function makes the currently active event_base_loop() start the loop over again (scanning for new events) after the current event callback finishes. If the event loop is not running, this function has no effect. event_base_loopbreak() is typically invoked from this event's callback. This behavior is analogous to the "continue;" statement. Subsequent invocations of event loop will proceed normally. @param eb the event_base structure returned by event_init() @return 0 if successful, or -1 if an error occurred @see event_base_loopbreak() */ EVENT2_EXPORT_SYMBOL int event_base_loopcontinue(struct event_base *); /** Checks if the event loop was told to exit by event_base_loopexit(). This function will return true for an event_base at every point after event_loopexit() is called, until the event loop is next entered. @param eb the event_base structure returned by event_init() @return true if event_base_loopexit() was called on this event base, or 0 otherwise @see event_base_loopexit() @see event_base_got_break() */ EVENT2_EXPORT_SYMBOL int event_base_got_exit(struct event_base *); /** Checks if the event loop was told to abort immediately by event_base_loopbreak(). This function will return true for an event_base at every point after event_base_loopbreak() is called, until the event loop is next entered. @param eb the event_base structure returned by event_init() @return true if event_base_loopbreak() was called on this event base, or 0 otherwise @see event_base_loopbreak() @see event_base_got_exit() */ EVENT2_EXPORT_SYMBOL int event_base_got_break(struct event_base *); /** * @name event flags * * Flags to pass to event_new(), event_assign(), event_pending(), and * anything else with an argument of the form "short events" */ /**@{*/ /** Indicates that a timeout has occurred. It's not necessary to pass * this flag to event_for new()/event_assign() to get a timeout. */ #define EV_TIMEOUT 0x01 /** Wait for a socket or FD to become readable */ #define EV_READ 0x02 /** Wait for a socket or FD to become writeable */ #define EV_WRITE 0x04 /** Wait for a POSIX signal to be raised*/ #define EV_SIGNAL 0x08 /** * Persistent event: won't get removed automatically when activated. * * When a persistent event with a timeout becomes activated, its timeout * is reset to 0. */ #define EV_PERSIST 0x10 /** Select edge-triggered behavior, if supported by the backend. */ #define EV_ET 0x20 /** * If this option is provided, then event_del() will not block in one thread * while waiting for the event callback to complete in another thread. * * To use this option safely, you may need to use event_finalize() or * event_free_finalize() in order to safely tear down an event in a * multithreaded application. See those functions for more information. * * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES * BECOMES STABLE. **/ #define EV_FINALIZE 0x40 /** * Detects connection close events. You can use this to detect when a * connection has been closed, without having to read all the pending data * from a connection. * * Not all backends support EV_CLOSED. To detect or require it, use the * feature flag EV_FEATURE_EARLY_CLOSE. **/ #define EV_CLOSED 0x80 /**@}*/ /** @name evtimer_* macros Aliases for working with one-shot timer events */ /**@{*/ #define evtimer_assign(ev, b, cb, arg) \ event_assign((ev), (b), -1, 0, (cb), (arg)) #define evtimer_new(b, cb, arg) event_new((b), -1, 0, (cb), (arg)) #define evtimer_add(ev, tv) event_add((ev), (tv)) #define evtimer_del(ev) event_del(ev) #define evtimer_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) #define evtimer_initialized(ev) event_initialized(ev) /**@}*/ /** @name evsignal_* macros Aliases for working with signal events */ /**@{*/ #define evsignal_add(ev, tv) event_add((ev), (tv)) #define evsignal_assign(ev, b, x, cb, arg) \ event_assign((ev), (b), (x), EV_SIGNAL|EV_PERSIST, cb, (arg)) #define evsignal_new(b, x, cb, arg) \ event_new((b), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg)) #define evsignal_del(ev) event_del(ev) #define evsignal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) #define evsignal_initialized(ev) event_initialized(ev) /**@}*/ /** A callback function for an event. It receives three arguments: @param fd An fd or signal @param events One or more EV_* flags @param arg A user-supplied argument. @see event_new() */ typedef void (*event_callback_fn)(evutil_socket_t, short, void *); /** Return a value used to specify that the event itself must be used as the callback argument. The function event_new() takes a callback argument which is passed to the event's callback function. To specify that the argument to be passed to the callback function is the event that event_new() returns, pass in the return value of event_self_cbarg() as the callback argument for event_new(). For example:
      struct event *ev = event_new(base, sock, events, callback, %event_self_cbarg());
  
For consistency with event_new(), it is possible to pass the return value of this function as the callback argument for event_assign() – this achieves the same result as passing the event in directly. @return a value to be passed as the callback argument to event_new() or event_assign(). @see event_new(), event_assign() */ EVENT2_EXPORT_SYMBOL void *event_self_cbarg(void); /** Allocate and asssign a new event structure, ready to be added. The function event_new() returns a new event that can be used in future calls to event_add() and event_del(). The fd and events arguments determine which conditions will trigger the event; the callback and callback_arg arguments tell Libevent what to do when the event becomes active. If events contains one of EV_READ, EV_WRITE, or EV_READ|EV_WRITE, then fd is a file descriptor or socket that should get monitored for readiness to read, readiness to write, or readiness for either operation (respectively). If events contains EV_SIGNAL, then fd is a signal number to wait for. If events contains none of those flags, then the event can be triggered only by a timeout or by manual activation with event_active(): In this case, fd must be -1. The EV_PERSIST flag can also be passed in the events argument: it makes event_add() persistent until event_del() is called. The EV_ET flag is compatible with EV_READ and EV_WRITE, and supported only by certain backends. It tells Libevent to use edge-triggered events. The EV_TIMEOUT flag has no effect here. It is okay to have multiple events all listening on the same fds; but they must either all be edge-triggered, or all not be edge triggerd. When the event becomes active, the event loop will run the provided callbuck function, with three arguments. The first will be the provided fd value. The second will be a bitfield of the events that triggered: EV_READ, EV_WRITE, or EV_SIGNAL. Here the EV_TIMEOUT flag indicates that a timeout occurred, and EV_ET indicates that an edge-triggered event occurred. The third event will be the callback_arg pointer that you provide. @param base the event base to which the event should be attached. @param fd the file descriptor or signal to be monitored, or -1. @param events desired events to monitor: bitfield of EV_READ, EV_WRITE, EV_SIGNAL, EV_PERSIST, EV_ET. @param callback callback function to be invoked when the event occurs @param callback_arg an argument to be passed to the callback function @return a newly allocated struct event that must later be freed with event_free(). @see event_free(), event_add(), event_del(), event_assign() */ EVENT2_EXPORT_SYMBOL struct event *event_new(struct event_base *, evutil_socket_t, short, event_callback_fn, void *); /** Prepare a new, already-allocated event structure to be added. The function event_assign() prepares the event structure ev to be used in future calls to event_add() and event_del(). Unlike event_new(), it doesn't allocate memory itself: it requires that you have already allocated a struct event, probably on the heap. Doing this will typically make your code depend on the size of the event structure, and thereby create incompatibility with future versions of Libevent. The easiest way to avoid this problem is just to use event_new() and event_free() instead. A slightly harder way to future-proof your code is to use event_get_struct_event_size() to determine the required size of an event at runtime. Note that it is NOT safe to call this function on an event that is active or pending. Doing so WILL corrupt internal data structures in Libevent, and lead to strange, hard-to-diagnose bugs. You _can_ use event_assign to change an existing event, but only if it is not active or pending! The arguments for this function, and the behavior of the events that it makes, are as for event_new(). @param ev an event struct to be modified @param base the event base to which ev should be attached. @param fd the file descriptor to be monitored @param events desired events to monitor; can be EV_READ and/or EV_WRITE @param callback callback function to be invoked when the event occurs @param callback_arg an argument to be passed to the callback function @return 0 if success, or -1 on invalid arguments. @see event_new(), event_add(), event_del(), event_base_once(), event_get_struct_event_size() */ EVENT2_EXPORT_SYMBOL int event_assign(struct event *, struct event_base *, evutil_socket_t, short, event_callback_fn, void *); /** Deallocate a struct event * returned by event_new(). If the event is pending or active, first make it non-pending and non-active. */ EVENT2_EXPORT_SYMBOL void event_free(struct event *); /** * Callback type for event_finalize and event_free_finalize(). * * THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES * BECOMES STABLE. * **/ typedef void (*event_finalize_callback_fn)(struct event *, void *); /** @name Finalization functions These functions are used to safely tear down an event in a multithreaded application. If you construct your events with EV_FINALIZE to avoid deadlocks, you will need a way to remove an event in the certainty that it will definitely not be running its callback when you deallocate it and its callback argument. To do this, call one of event_finalize() or event_free_finalize with 0 for its first argument, the event to tear down as its second argument, and a callback function as its third argument. The callback will be invoked as part of the event loop, with the event's priority. After you call a finalizer function, event_add() and event_active() will no longer work on the event, and event_del() will produce a no-op. You must not try to change the event's fields with event_assign() or event_set() while the finalize callback is in progress. Once the callback has been invoked, you should treat the event structure as containing uninitialized memory. The event_free_finalize() function frees the event after it's finalized; event_finalize() does not. A finalizer callback must not make events pending or active. It must not add events, activate events, or attempt to "resucitate" the event being finalized in any way. THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES BECOMES STABLE. @return 0 on succes, -1 on failure. */ /**@{*/ EVENT2_EXPORT_SYMBOL int event_finalize(unsigned, struct event *, event_finalize_callback_fn); EVENT2_EXPORT_SYMBOL int event_free_finalize(unsigned, struct event *, event_finalize_callback_fn); /**@}*/ /** Schedule a one-time event The function event_base_once() is similar to event_new(). However, it schedules a callback to be called exactly once, and does not require the caller to prepare an event structure. Note that in Libevent 2.0 and earlier, if the event is never triggered, the internal memory used to hold it will never be freed. In Libevent 2.1, the internal memory will get freed by event_base_free() if the event is never triggered. The 'arg' value, however, will not get freed in either case--you'll need to free that on your own if you want it to go away. @param base an event_base @param fd a file descriptor to monitor, or -1 for no fd. @param events event(s) to monitor; can be any of EV_READ | EV_WRITE, or EV_TIMEOUT @param callback callback function to be invoked when the event occurs @param arg an argument to be passed to the callback function @param timeout the maximum amount of time to wait for the event. NULL makes an EV_READ/EV_WRITE event make forever; NULL makes an EV_TIMEOUT event succees immediately. @return 0 if successful, or -1 if an error occurred */ EVENT2_EXPORT_SYMBOL int event_base_once(struct event_base *, evutil_socket_t, short, event_callback_fn, void *, const struct timeval *); /** Add an event to the set of pending events. The function event_add() schedules the execution of the event 'ev' when the condition specified by event_assign() or event_new() occurs, or when the time specified in timeout has elapesed. If atimeout is NULL, no timeout occurs and the function will only be called if a matching event occurs. The event in the ev argument must be already initialized by event_assign() or event_new() and may not be used in calls to event_assign() until it is no longer pending. If the event in the ev argument already has a scheduled timeout, calling event_add() replaces the old timeout with the new one if tv is non-NULL. @param ev an event struct initialized via event_assign() or event_new() @param timeout the maximum amount of time to wait for the event, or NULL to wait forever @return 0 if successful, or -1 if an error occurred @see event_del(), event_assign(), event_new() */ EVENT2_EXPORT_SYMBOL int event_add(struct event *ev, const struct timeval *timeout); /** Remove a timer from a pending event without removing the event itself. If the event has a scheduled timeout, this function unschedules it but leaves the event otherwise pending. @param ev an event struct initialized via event_assign() or event_new() @return 0 on success, or -1 if an error occurrect. */ EVENT2_EXPORT_SYMBOL int event_remove_timer(struct event *ev); /** Remove an event from the set of monitored events. The function event_del() will cancel the event in the argument ev. If the event has already executed or has never been added the call will have no effect. @param ev an event struct to be removed from the working set @return 0 if successful, or -1 if an error occurred @see event_add() */ EVENT2_EXPORT_SYMBOL int event_del(struct event *); /** As event_del(), but never blocks while the event's callback is running in another thread, even if the event was constructed without the EV_FINALIZE flag. THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES BECOMES STABLE. */ EVENT2_EXPORT_SYMBOL int event_del_noblock(struct event *ev); /** As event_del(), but always blocks while the event's callback is running in another thread, even if the event was constructed with the EV_FINALIZE flag. THIS IS AN EXPERIMENTAL API. IT MIGHT CHANGE BEFORE THE LIBEVENT 2.1 SERIES BECOMES STABLE. */ EVENT2_EXPORT_SYMBOL int event_del_block(struct event *ev); /** Make an event active. You can use this function on a pending or a non-pending event to make it active, so that its callback will be run by event_base_dispatch() or event_base_loop(). One common use in multithreaded programs is to wake the thread running event_base_loop() from another thread. @param ev an event to make active. @param res a set of flags to pass to the event's callback. @param ncalls an obsolete argument: this is ignored. **/ EVENT2_EXPORT_SYMBOL void event_active(struct event *ev, int res, short ncalls); /** Checks if a specific event is pending or scheduled. @param ev an event struct previously passed to event_add() @param events the requested event type; any of EV_TIMEOUT|EV_READ| EV_WRITE|EV_SIGNAL @param tv if this field is not NULL, and the event has a timeout, this field is set to hold the time at which the timeout will expire. @return true if the event is pending on any of the events in 'what', (that is to say, it has been added), or 0 if the event is not added. */ EVENT2_EXPORT_SYMBOL int event_pending(const struct event *ev, short events, struct timeval *tv); /** If called from within the callback for an event, returns that event. The behavior of this function is not defined when called from outside the callback function for an event. */ EVENT2_EXPORT_SYMBOL struct event *event_base_get_running_event(struct event_base *base); /** Test if an event structure might be initialized. The event_initialized() function can be used to check if an event has been initialized. Warning: This function is only useful for distinguishing a a zeroed-out piece of memory from an initialized event, it can easily be confused by uninitialized memory. Thus, it should ONLY be used to distinguish an initialized event from zero. @param ev an event structure to be tested @return 1 if the structure might be initialized, or 0 if it has not been initialized */ EVENT2_EXPORT_SYMBOL int event_initialized(const struct event *ev); /** Get the signal number assigned to a signal event */ #define event_get_signal(ev) ((int)event_get_fd(ev)) /** Get the socket or signal assigned to an event, or -1 if the event has no socket. */ EVENT2_EXPORT_SYMBOL evutil_socket_t event_get_fd(const struct event *ev); /** Get the event_base associated with an event. */ EVENT2_EXPORT_SYMBOL struct event_base *event_get_base(const struct event *ev); /** Return the events (EV_READ, EV_WRITE, etc) assigned to an event. */ EVENT2_EXPORT_SYMBOL short event_get_events(const struct event *ev); /** Return the callback assigned to an event. */ EVENT2_EXPORT_SYMBOL event_callback_fn event_get_callback(const struct event *ev); /** Return the callback argument assigned to an event. */ EVENT2_EXPORT_SYMBOL void *event_get_callback_arg(const struct event *ev); /** Return the priority of an event. @see event_priority_init(), event_get_priority() */ EVENT2_EXPORT_SYMBOL int event_get_priority(const struct event *ev); /** Extract _all_ of arguments given to construct a given event. The event_base is copied into *base_out, the fd is copied into *fd_out, and so on. If any of the "_out" arguments is NULL, it will be ignored. */ EVENT2_EXPORT_SYMBOL void event_get_assignment(const struct event *event, struct event_base **base_out, evutil_socket_t *fd_out, short *events_out, event_callback_fn *callback_out, void **arg_out); /** Return the size of struct event that the Libevent library was compiled with. This will be NO GREATER than sizeof(struct event) if you're running with the same version of Libevent that your application was built with, but otherwise might not. Note that it might be SMALLER than sizeof(struct event) if some future version of Libevent adds extra padding to the end of struct event. We might do this to help ensure ABI-compatibility between different versions of Libevent. */ EVENT2_EXPORT_SYMBOL size_t event_get_struct_event_size(void); /** Get the Libevent version. Note that this will give you the version of the library that you're currently linked against, not the version of the headers that you've compiled against. @return a string containing the version number of Libevent */ EVENT2_EXPORT_SYMBOL const char *event_get_version(void); /** Return a numeric representation of Libevent's version. Note that this will give you the version of the library that you're currently linked against, not the version of the headers you've used to compile. The format uses one byte each for the major, minor, and patchlevel parts of the version number. The low-order byte is unused. For example, version 2.0.1-alpha has a numeric representation of 0x02000100 */ EVENT2_EXPORT_SYMBOL ev_uint32_t event_get_version_number(void); /** As event_get_version, but gives the version of Libevent's headers. */ #define LIBEVENT_VERSION EVENT__VERSION /** As event_get_version_number, but gives the version number of Libevent's * headers. */ #define LIBEVENT_VERSION_NUMBER EVENT__NUMERIC_VERSION /** Largest number of priorities that Libevent can support. */ #define EVENT_MAX_PRIORITIES 256 /** Set the number of different event priorities By default Libevent schedules all active events with the same priority. However, some time it is desirable to process some events with a higher priority than others. For that reason, Libevent supports strict priority queues. Active events with a lower priority are always processed before events with a higher priority. The number of different priorities can be set initially with the event_base_priority_init() function. This function should be called before the first call to event_base_dispatch(). The event_priority_set() function can be used to assign a priority to an event. By default, Libevent assigns the middle priority to all events unless their priority is explicitly set. Note that urgent-priority events can starve less-urgent events: after running all urgent-priority callbacks, Libevent checks for more urgent events again, before running less-urgent events. Less-urgent events will not have their callbacks run until there are no events more urgent than them that want to be active. @param eb the event_base structure returned by event_base_new() @param npriorities the maximum number of priorities @return 0 if successful, or -1 if an error occurred @see event_priority_set() */ EVENT2_EXPORT_SYMBOL int event_base_priority_init(struct event_base *, int); /** Get the number of different event priorities. @param eb the event_base structure returned by event_base_new() @return Number of different event priorities @see event_base_priority_init() */ EVENT2_EXPORT_SYMBOL int event_base_get_npriorities(struct event_base *eb); /** Assign a priority to an event. @param ev an event struct @param priority the new priority to be assigned @return 0 if successful, or -1 if an error occurred @see event_priority_init(), event_get_priority() */ EVENT2_EXPORT_SYMBOL int event_priority_set(struct event *, int); /** Prepare an event_base to use a large number of timeouts with the same duration. Libevent's default scheduling algorithm is optimized for having a large number of timeouts with their durations more or less randomly distributed. But if you have a large number of timeouts that all have the same duration (for example, if you have a large number of connections that all have a 10-second timeout), then you can improve Libevent's performance by telling Libevent about it. To do this, call this function with the common duration. It will return a pointer to a different, opaque timeout value. (Don't depend on its actual contents!) When you use this timeout value in event_add(), Libevent will schedule the event more efficiently. (This optimization probably will not be worthwhile until you have thousands or tens of thousands of events with the same timeout.) */ EVENT2_EXPORT_SYMBOL const struct timeval *event_base_init_common_timeout(struct event_base *base, const struct timeval *duration); #if !defined(EVENT__DISABLE_MM_REPLACEMENT) || defined(EVENT_IN_DOXYGEN_) /** Override the functions that Libevent uses for memory management. Usually, Libevent uses the standard libc functions malloc, realloc, and free to allocate memory. Passing replacements for those functions to event_set_mem_functions() overrides this behavior. Note that all memory returned from Libevent will be allocated by the replacement functions rather than by malloc() and realloc(). Thus, if you have replaced those functions, it will not be appropriate to free() memory that you get from Libevent. Instead, you must use the free_fn replacement that you provided. Note also that if you are going to call this function, you should do so before any call to any Libevent function that does allocation. Otherwise, those funtions will allocate their memory using malloc(), but then later free it using your provided free_fn. @param malloc_fn A replacement for malloc. @param realloc_fn A replacement for realloc @param free_fn A replacement for free. **/ EVENT2_EXPORT_SYMBOL void event_set_mem_functions( void *(*malloc_fn)(size_t sz), void *(*realloc_fn)(void *ptr, size_t sz), void (*free_fn)(void *ptr)); /** This definition is present if Libevent was built with support for event_set_mem_functions() */ #define EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED #endif /** Writes a human-readable description of all inserted and/or active events to a provided stdio stream. This is intended for debugging; its format is not guaranteed to be the same between libevent versions. @param base An event_base on which to scan the events. @param output A stdio file to write on. */ EVENT2_EXPORT_SYMBOL void event_base_dump_events(struct event_base *, FILE *); /** Activates all pending events for the given fd and event mask. This function activates pending events only. Events which have not been added will not become active. @param base the event_base on which to activate the events. @param fd An fd to active events on. @param events One or more of EV_{READ,WRITE}. */ EVENT2_EXPORT_SYMBOL void event_base_active_by_fd(struct event_base *base, evutil_socket_t fd, short events); /** Activates all pending signals with a given signal number This function activates pending events only. Events which have not been added will not become active. @param base the event_base on which to activate the events. @param fd The signal to active events on. */ EVENT2_EXPORT_SYMBOL void event_base_active_by_signal(struct event_base *base, int sig); /** * Callback for iterating events in an event base via event_base_foreach_event */ typedef int (*event_base_foreach_event_cb)(const struct event_base *, const struct event *, void *); /** Iterate over all added or active events events in an event loop, and invoke a given callback on each one. The callback must not call any function that modifies the event base, that modifies any event in the event base, or that adds or removes any event to the event base. Doing so is unsupported and will lead to undefined behavior -- likely, to crashes. event_base_foreach_event() holds a lock on the event_base() for the whole time it's running: slow callbacks are not advisable. Note that Libevent adds some events of its own to make pieces of its functionality work. You must not assume that the only events you'll encounter will be the ones you added yourself. The callback function must return 0 to continue iteration, or some other integer to stop iterating. @param base An event_base on which to scan the events. @param fn A callback function to receive the events. @param arg An argument passed to the callback function. @return 0 if we iterated over every event, or the value returned by the callback function if the loop exited early. */ EVENT2_EXPORT_SYMBOL int event_base_foreach_event(struct event_base *base, event_base_foreach_event_cb fn, void *arg); /** Sets 'tv' to the current time (as returned by gettimeofday()), looking at the cached value in 'base' if possible, and calling gettimeofday() or clock_gettime() as appropriate if there is no cached time. Generally, this value will only be cached while actually processing event callbacks, and may be very inaccuate if your callbacks take a long time to execute. Returns 0 on success, negative on failure. */ EVENT2_EXPORT_SYMBOL int event_base_gettimeofday_cached(struct event_base *base, struct timeval *tv); /** Update cached_tv in the 'base' to the current time * * You can use this function is useful for selectively increasing * the accuracy of the cached time value in 'base' during callbacks * that take a long time to execute. * * This function has no effect if the base is currently not in its * event loop, or if timeval caching is disabled via * EVENT_BASE_FLAG_NO_CACHE_TIME. * * @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int event_base_update_cache_time(struct event_base *base); /** Release up all globally-allocated resources allocated by Libevent. This function does not free developer-controlled resources like event_bases, events, bufferevents, listeners, and so on. It only releases resources like global locks that there is no other way to free. It is not actually necessary to call this function before exit: every resource that it frees would be released anyway on exit. It mainly exists so that resource-leak debugging tools don't see Libevent as holding resources at exit. You should only call this function when no other Libevent functions will be invoked -- e.g., when cleanly exiting a program. */ EVENT2_EXPORT_SYMBOL void libevent_global_shutdown(void); #ifdef __cplusplus } #endif #endif /* EVENT2_EVENT_H_INCLUDED_ */ PKZsňAAevent2/event-config-64.hnu[/* event2/event-config.h * * This file was generated by autoconf when libevent was built, and post- * processed by Libevent so that its macros would have a uniform prefix. * * DO NOT EDIT THIS FILE. * * Do not rely on macros in this file existing in later versions. */ #ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_ #define EVENT2_EVENT_CONFIG_H_INCLUDED_ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define if libevent should build without support for a debug mode */ /* #undef EVENT__DISABLE_DEBUG_MODE */ /* Define if libevent should not allow replacing the mm functions */ /* #undef EVENT__DISABLE_MM_REPLACEMENT */ /* Define if libevent should not be compiled with thread support */ /* #undef EVENT__DISABLE_THREAD_SUPPORT */ /* Define to 1 if you have the `accept4' function. */ #define EVENT__HAVE_ACCEPT4 1 /* Define to 1 if you have the `arc4random' function. */ /* #undef EVENT__HAVE_ARC4RANDOM */ /* Define to 1 if you have the `arc4random_buf' function. */ /* #undef EVENT__HAVE_ARC4RANDOM_BUF */ /* Define to 1 if you have the header file. */ #define EVENT__HAVE_ARPA_INET_H 1 /* Define to 1 if you have the `clock_gettime' function. */ #define EVENT__HAVE_CLOCK_GETTIME 1 /* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you don't. */ #define EVENT__HAVE_DECL_CTL_KERN 1 /* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you don't. */ #define EVENT__HAVE_DECL_KERN_ARND 0 /* Define to 1 if you have the declaration of `KERN_RANDOM', and to 0 if you don't. */ #define EVENT__HAVE_DECL_KERN_RANDOM 1 /* Define to 1 if you have the declaration of `RANDOM_UUID', and to 0 if you don't. */ #define EVENT__HAVE_DECL_RANDOM_UUID 1 /* Define if /dev/poll is available */ /* #undef EVENT__HAVE_DEVPOLL */ /* Define to 1 if you have the header file. */ #define EVENT__HAVE_DLFCN_H 1 /* Define if your system supports the epoll system calls */ #define EVENT__HAVE_EPOLL 1 /* Define to 1 if you have the `epoll_create1' function. */ #define EVENT__HAVE_EPOLL_CREATE1 1 /* Define to 1 if you have the `epoll_ctl' function. */ #define EVENT__HAVE_EPOLL_CTL 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_ERRNO_H 1 /* Define to 1 if you have ERR_remove_thread_stat(). */ #define EVENT__HAVE_ERR_REMOVE_THREAD_STATE 1 /* Define to 1 if you have the `eventfd' function. */ #define EVENT__HAVE_EVENTFD 1 /* Define if your system supports event ports */ /* #undef EVENT__HAVE_EVENT_PORTS */ /* Define to 1 if you have the `fcntl' function. */ #define EVENT__HAVE_FCNTL 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_FCNTL_H 1 /* Define to 1 if the system has the type `fd_mask'. */ #define EVENT__HAVE_FD_MASK 1 /* Do we have getaddrinfo()? */ #define EVENT__HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getegid' function. */ #define EVENT__HAVE_GETEGID 1 /* Define to 1 if you have the `geteuid' function. */ #define EVENT__HAVE_GETEUID 1 /* Define this if you have any gethostbyname_r() */ /* #undef EVENT__HAVE_GETHOSTBYNAME_R */ /* Define this if gethostbyname_r takes 3 arguments */ /* #undef EVENT__HAVE_GETHOSTBYNAME_R_3_ARG */ /* Define this if gethostbyname_r takes 5 arguments */ /* #undef EVENT__HAVE_GETHOSTBYNAME_R_5_ARG */ /* Define this if gethostbyname_r takes 6 arguments */ /* #undef EVENT__HAVE_GETHOSTBYNAME_R_6_ARG */ /* Define to 1 if you have the `getifaddrs' function. */ #define EVENT__HAVE_GETIFADDRS 1 /* Define to 1 if you have the `getnameinfo' function. */ #define EVENT__HAVE_GETNAMEINFO 1 /* Define to 1 if you have the `getprotobynumber' function. */ #define EVENT__HAVE_GETPROTOBYNUMBER 1 /* Define to 1 if you have the `getservbyname' function. */ #define EVENT__HAVE_GETSERVBYNAME 1 /* Define to 1 if you have the `gettimeofday' function. */ #define EVENT__HAVE_GETTIMEOFDAY 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_IFADDRS_H 1 /* Define to 1 if you have the `inet_ntop' function. */ #define EVENT__HAVE_INET_NTOP 1 /* Define to 1 if you have the `inet_pton' function. */ #define EVENT__HAVE_INET_PTON 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_INTTYPES_H 1 /* Define to 1 if you have the `issetugid' function. */ /* #undef EVENT__HAVE_ISSETUGID */ /* Define to 1 if you have the `kqueue' function. */ /* #undef EVENT__HAVE_KQUEUE */ /* Define if the system has zlib */ #define EVENT__HAVE_LIBZ 1 /* Define to 1 if you have the `mach_absolute_time' function. */ /* #undef EVENT__HAVE_MACH_ABSOLUTE_TIME */ /* Define to 1 if you have the header file. */ /* #undef EVENT__HAVE_MACH_MACH_TIME_H */ /* Define to 1 if you have the header file. */ #define EVENT__HAVE_MEMORY_H 1 /* Define to 1 if you have the `mmap' function. */ #define EVENT__HAVE_MMAP 1 /* Define to 1 if you have the `nanosleep' function. */ #define EVENT__HAVE_NANOSLEEP 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_NETDB_H 1 /* Define to 1 if you have the header file. */ /* #undef EVENT__HAVE_NETINET_IN6_H */ /* Define to 1 if you have the header file. */ #define EVENT__HAVE_NETINET_IN_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_NETINET_TCP_H 1 /* Define if the system has openssl */ #define EVENT__HAVE_OPENSSL 1 /* Define to 1 if you have the `pipe' function. */ #define EVENT__HAVE_PIPE 1 /* Define to 1 if you have the `pipe2' function. */ #define EVENT__HAVE_PIPE2 1 /* Define to 1 if you have the `poll' function. */ #define EVENT__HAVE_POLL 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_POLL_H 1 /* Define to 1 if you have the `port_create' function. */ /* #undef EVENT__HAVE_PORT_CREATE */ /* Define to 1 if you have the header file. */ /* #undef EVENT__HAVE_PORT_H */ /* Define if you have POSIX threads libraries and header files. */ /* #undef EVENT__HAVE_PTHREAD */ /* Define if we have pthreads on this system */ #define EVENT__HAVE_PTHREADS 1 /* Define to 1 if you have the `putenv' function. */ #define EVENT__HAVE_PUTENV 1 /* Define to 1 if the system has the type `sa_family_t'. */ #define EVENT__HAVE_SA_FAMILY_T 1 /* Define to 1 if you have the `select' function. */ #define EVENT__HAVE_SELECT 1 /* Define to 1 if you have the `sendfile' function. */ #define EVENT__HAVE_SENDFILE 1 /* Define to 1 if you have the `setenv' function. */ #define EVENT__HAVE_SETENV 1 /* Define if F_SETFD is defined in */ #define EVENT__HAVE_SETFD 1 /* Define to 1 if you have the `setrlimit' function. */ #define EVENT__HAVE_SETRLIMIT 1 /* Define to 1 if you have the `sigaction' function. */ #define EVENT__HAVE_SIGACTION 1 /* Define to 1 if you have the `signal' function. */ #define EVENT__HAVE_SIGNAL 1 /* Define to 1 if you have the `splice' function. */ #define EVENT__HAVE_SPLICE 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_STDARG_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_STRING_H 1 /* Define to 1 if you have the `strlcpy' function. */ /* #undef EVENT__HAVE_STRLCPY */ /* Define to 1 if you have the `strsep' function. */ #define EVENT__HAVE_STRSEP 1 /* Define to 1 if you have the `strtok_r' function. */ #define EVENT__HAVE_STRTOK_R 1 /* Define to 1 if you have the `strtoll' function. */ #define EVENT__HAVE_STRTOLL 1 /* Define to 1 if the system has the type `struct addrinfo'. */ #define EVENT__HAVE_STRUCT_ADDRINFO 1 /* Define to 1 if the system has the type `struct in6_addr'. */ #define EVENT__HAVE_STRUCT_IN6_ADDR 1 /* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */ #define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1 /* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */ #define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1 /* Define to 1 if the system has the type `struct sockaddr_in6'. */ #define EVENT__HAVE_STRUCT_SOCKADDR_IN6 1 /* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */ /* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */ /* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */ /* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1 /* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ #define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 /* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ /* #undef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ /* Define to 1 if the system has the type `struct so_linger'. */ /* #undef EVENT__HAVE_STRUCT_SO_LINGER */ /* Define to 1 if you have the `sysctl' function. */ #define EVENT__HAVE_SYSCTL 1 /* Define to 1 if you have the header file. */ /* #undef EVENT__HAVE_SYS_DEVPOLL_H */ /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_EPOLL_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_EVENTFD_H 1 /* Define to 1 if you have the header file. */ /* #undef EVENT__HAVE_SYS_EVENT_H */ /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_MMAN_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_QUEUE_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_RESOURCE_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_SENDFILE_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_SYSCTL_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_TIMERFD_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_UIO_H 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_SYS_WAIT_H 1 /* Define if TAILQ_FOREACH is defined in */ #define EVENT__HAVE_TAILQFOREACH 1 /* Define if timeradd is defined in */ #define EVENT__HAVE_TIMERADD 1 /* Define if timerclear is defined in */ #define EVENT__HAVE_TIMERCLEAR 1 /* Define if timercmp is defined in */ #define EVENT__HAVE_TIMERCMP 1 /* Define to 1 if you have the `timerfd_create' function. */ #define EVENT__HAVE_TIMERFD_CREATE 1 /* Define if timerisset is defined in */ #define EVENT__HAVE_TIMERISSET 1 /* Define to 1 if the system has the type `uint16_t'. */ #define EVENT__HAVE_UINT16_T 1 /* Define to 1 if the system has the type `uint32_t'. */ #define EVENT__HAVE_UINT32_T 1 /* Define to 1 if the system has the type `uint64_t'. */ #define EVENT__HAVE_UINT64_T 1 /* Define to 1 if the system has the type `uint8_t'. */ #define EVENT__HAVE_UINT8_T 1 /* Define to 1 if the system has the type `uintptr_t'. */ #define EVENT__HAVE_UINTPTR_T 1 /* Define to 1 if you have the `umask' function. */ #define EVENT__HAVE_UMASK 1 /* Define to 1 if you have the header file. */ #define EVENT__HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ #define EVENT__HAVE_UNSETENV 1 /* Define to 1 if you have the `usleep' function. */ #define EVENT__HAVE_USLEEP 1 /* Define to 1 if you have the `vasprintf' function. */ #define EVENT__HAVE_VASPRINTF 1 /* Define if waitpid() supports WNOWAIT */ /* #undef EVENT__HAVE_WAITPID_WITH_WNOWAIT */ /* Define if kqueue works correctly with pipes */ /* #undef EVENT__HAVE_WORKING_KQUEUE */ /* Define to 1 if you have the header file. */ #define EVENT__HAVE_ZLIB_H 1 /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define EVENT__LT_OBJDIR ".libs/" /* Numeric representation of the version */ #define EVENT__NUMERIC_VERSION 0x02010800 /* Name of package */ #define EVENT__PACKAGE "libevent" /* Define to the address where bug reports for this package should be sent. */ #define EVENT__PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define EVENT__PACKAGE_NAME "libevent" /* Define to the full name and version of this package. */ #define EVENT__PACKAGE_STRING "libevent 2.1.8-stable" /* Define to the one symbol short name of this package. */ #define EVENT__PACKAGE_TARNAME "libevent" /* Define to the home page for this package. */ #define EVENT__PACKAGE_URL "" /* Define to the version of this package. */ #define EVENT__PACKAGE_VERSION "2.1.8-stable" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ /* #undef EVENT__PTHREAD_CREATE_JOINABLE */ /* The size of `int', as computed by sizeof. */ #define EVENT__SIZEOF_INT 4 /* The size of `long', as computed by sizeof. */ #define EVENT__SIZEOF_LONG 8 /* The size of `long long', as computed by sizeof. */ #define EVENT__SIZEOF_LONG_LONG 8 /* The size of `off_t', as computed by sizeof. */ #define EVENT__SIZEOF_OFF_T 8 /* The size of `pthread_t', as computed by sizeof. */ #define EVENT__SIZEOF_PTHREAD_T 8 /* The size of `short', as computed by sizeof. */ #define EVENT__SIZEOF_SHORT 2 /* The size of `size_t', as computed by sizeof. */ #define EVENT__SIZEOF_SIZE_T 8 /* The size of `void *', as computed by sizeof. */ #define EVENT__SIZEOF_VOID_P 8 /* Define to 1 if you have the ANSI C header files. */ #define EVENT__STDC_HEADERS 1 /* Define to 1 if you can safely include both and . */ #define EVENT__TIME_WITH_SYS_TIME 1 /* Enable extensions on AIX 3, Interix. */ #ifndef EVENT___ALL_SOURCE # define EVENT___ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef EVENT___GNU_SOURCE # define EVENT___GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef EVENT___POSIX_PTHREAD_SEMANTICS # define EVENT___POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef EVENT___TANDEM_SOURCE # define EVENT___TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef EVENT____EXTENSIONS__ # define EVENT____EXTENSIONS__ 1 #endif /* Version number of package */ #define EVENT__VERSION "2.1.8-stable" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef EVENT___DARWIN_USE_64_BIT_INODE # define EVENT___DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef EVENT___FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef EVENT___LARGE_FILES */ /* Define to 1 if on MINIX. */ /* #undef EVENT___MINIX */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef EVENT___POSIX_1_SOURCE */ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef EVENT___POSIX_SOURCE */ /* Define to appropriate substitue if compiler doesnt have __func__ */ /* #undef EVENT____func__ */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef EVENT__const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef EVENT____cplusplus /* #undef EVENT__inline */ #endif /* Define to `int' if does not define. */ /* #undef EVENT__pid_t */ /* Define to `unsigned int' if does not define. */ /* #undef EVENT__size_t */ /* Define to unsigned int if you dont have it */ /* #undef EVENT__socklen_t */ /* Define to `int' if does not define. */ /* #undef EVENT__ssize_t */ #endif /* event2/event-config.h */ PKZ+),event2/buffer.hnu[/* * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_BUFFER_H_INCLUDED_ #define EVENT2_BUFFER_H_INCLUDED_ /** @file event2/buffer.h Functions for buffering data for network sending or receiving. An evbuffer can be used for preparing data before sending it to the network or conversely for reading data from the network. Evbuffers try to avoid memory copies as much as possible. As a result, evbuffers can be used to pass data around without actually incurring the overhead of copying the data. A new evbuffer can be allocated with evbuffer_new(), and can be freed with evbuffer_free(). Most users will be using evbuffers via the bufferevent interface. To access a bufferevent's evbuffers, use bufferevent_get_input() and bufferevent_get_output(). There are several guidelines for using evbuffers. - if you already know how much data you are going to add as a result of calling evbuffer_add() multiple times, it makes sense to use evbuffer_expand() first to make sure that enough memory is allocated before hand. - evbuffer_add_buffer() adds the contents of one buffer to the other without incurring any unnecessary memory copies. - evbuffer_add() and evbuffer_add_buffer() do not mix very well: if you use them, you will wind up with fragmented memory in your buffer. - For high-performance code, you may want to avoid copying data into and out of buffers. You can skip the copy step by using evbuffer_reserve_space()/evbuffer_commit_space() when writing into a buffer, and evbuffer_peek() when reading. In Libevent 2.0 and later, evbuffers are represented using a linked list of memory chunks, with pointers to the first and last chunk in the chain. As the contents of an evbuffer can be stored in multiple different memory blocks, it cannot be accessed directly. Instead, evbuffer_pullup() can be used to force a specified number of bytes to be contiguous. This will cause memory reallocation and memory copies if the data is split across multiple blocks. It is more efficient, however, to use evbuffer_peek() if you don't require that the memory to be contiguous. */ #include #ifdef __cplusplus extern "C" { #endif #include #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_UIO_H #include #endif #include /** An evbuffer is an opaque data type for efficiently buffering data to be sent or received on the network. @see event2/event.h for more information */ struct evbuffer #ifdef EVENT_IN_DOXYGEN_ {} #endif ; /** Pointer to a position within an evbuffer. Used when repeatedly searching through a buffer. Calling any function that modifies or re-packs the buffer contents may invalidate all evbuffer_ptrs for that buffer. Do not modify or contruct these values except with evbuffer_ptr_set. An evbuffer_ptr can represent any position from the start of a buffer up to a position immediately after the end of a buffer. @see evbuffer_ptr_set() */ struct evbuffer_ptr { ev_ssize_t pos; /* Do not alter or rely on the values of fields: they are for internal * use */ struct { void *chain; size_t pos_in_chain; } internal_; }; /** Describes a single extent of memory inside an evbuffer. Used for direct-access functions. @see evbuffer_reserve_space, evbuffer_commit_space, evbuffer_peek */ #ifdef EVENT__HAVE_SYS_UIO_H #define evbuffer_iovec iovec /* Internal use -- defined only if we are using the native struct iovec */ #define EVBUFFER_IOVEC_IS_NATIVE_ #else struct evbuffer_iovec { /** The start of the extent of memory. */ void *iov_base; /** The length of the extent of memory. */ size_t iov_len; }; #endif /** Allocate storage for a new evbuffer. @return a pointer to a newly allocated evbuffer struct, or NULL if an error occurred */ EVENT2_EXPORT_SYMBOL struct evbuffer *evbuffer_new(void); /** Deallocate storage for an evbuffer. @param buf pointer to the evbuffer to be freed */ EVENT2_EXPORT_SYMBOL void evbuffer_free(struct evbuffer *buf); /** Enable locking on an evbuffer so that it can safely be used by multiple threads at the same time. NOTE: when locking is enabled, the lock will be held when callbacks are invoked. This could result in deadlock if you aren't careful. Plan accordingly! @param buf An evbuffer to make lockable. @param lock A lock object, or NULL if we should allocate our own. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_enable_locking(struct evbuffer *buf, void *lock); /** Acquire the lock on an evbuffer. Has no effect if locking was not enabled with evbuffer_enable_locking. */ EVENT2_EXPORT_SYMBOL void evbuffer_lock(struct evbuffer *buf); /** Release the lock on an evbuffer. Has no effect if locking was not enabled with evbuffer_enable_locking. */ EVENT2_EXPORT_SYMBOL void evbuffer_unlock(struct evbuffer *buf); /** If this flag is set, then we will not use evbuffer_peek(), * evbuffer_remove(), evbuffer_remove_buffer(), and so on to read bytes * from this buffer: we'll only take bytes out of this buffer by * writing them to the network (as with evbuffer_write_atmost), by * removing them without observing them (as with evbuffer_drain), * or by copying them all out at once (as with evbuffer_add_buffer). * * Using this option allows the implementation to use sendfile-based * operations for evbuffer_add_file(); see that function for more * information. * * This flag is on by default for bufferevents that can take advantage * of it; you should never actually need to set it on a bufferevent's * output buffer. */ #define EVBUFFER_FLAG_DRAINS_TO_FD 1 /** Change the flags that are set for an evbuffer by adding more. * * @param buffer the evbuffer that the callback is watching. * @param cb the callback whose status we want to change. * @param flags One or more EVBUFFER_FLAG_* options * @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_set_flags(struct evbuffer *buf, ev_uint64_t flags); /** Change the flags that are set for an evbuffer by removing some. * * @param buffer the evbuffer that the callback is watching. * @param cb the callback whose status we want to change. * @param flags One or more EVBUFFER_FLAG_* options * @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_clear_flags(struct evbuffer *buf, ev_uint64_t flags); /** Returns the total number of bytes stored in the evbuffer @param buf pointer to the evbuffer @return the number of bytes stored in the evbuffer */ EVENT2_EXPORT_SYMBOL size_t evbuffer_get_length(const struct evbuffer *buf); /** Returns the number of contiguous available bytes in the first buffer chain. This is useful when processing data that might be split into multiple chains, or that might all be in the first chain. Calls to evbuffer_pullup() that cause reallocation and copying of data can thus be avoided. @param buf pointer to the evbuffer @return 0 if no data is available, otherwise the number of available bytes in the first buffer chain. */ EVENT2_EXPORT_SYMBOL size_t evbuffer_get_contiguous_space(const struct evbuffer *buf); /** Expands the available space in an evbuffer. Expands the available space in the evbuffer to at least datlen, so that appending datlen additional bytes will not require any new allocations. @param buf the evbuffer to be expanded @param datlen the new minimum length requirement @return 0 if successful, or -1 if an error occurred */ EVENT2_EXPORT_SYMBOL int evbuffer_expand(struct evbuffer *buf, size_t datlen); /** Reserves space in the last chain or chains of an evbuffer. Makes space available in the last chain or chains of an evbuffer that can be arbitrarily written to by a user. The space does not become available for reading until it has been committed with evbuffer_commit_space(). The space is made available as one or more extents, represented by an initial pointer and a length. You can force the memory to be available as only one extent. Allowing more extents, however, makes the function more efficient. Multiple subsequent calls to this function will make the same space available until evbuffer_commit_space() has been called. It is an error to do anything that moves around the buffer's internal memory structures before committing the space. NOTE: The code currently does not ever use more than two extents. This may change in future versions. @param buf the evbuffer in which to reserve space. @param size how much space to make available, at minimum. The total length of the extents may be greater than the requested length. @param vec an array of one or more evbuffer_iovec structures to hold pointers to the reserved extents of memory. @param n_vec The length of the vec array. Must be at least 1; 2 is more efficient. @return the number of provided extents, or -1 on error. @see evbuffer_commit_space() */ EVENT2_EXPORT_SYMBOL int evbuffer_reserve_space(struct evbuffer *buf, ev_ssize_t size, struct evbuffer_iovec *vec, int n_vec); /** Commits previously reserved space. Commits some of the space previously reserved with evbuffer_reserve_space(). It then becomes available for reading. This function may return an error if the pointer in the extents do not match those returned from evbuffer_reserve_space, or if data has been added to the buffer since the space was reserved. If you want to commit less data than you got reserved space for, modify the iov_len pointer of the appropriate extent to a smaller value. Note that you may have received more space than you requested if it was available! @param buf the evbuffer in which to reserve space. @param vec one or two extents returned by evbuffer_reserve_space. @param n_vecs the number of extents. @return 0 on success, -1 on error @see evbuffer_reserve_space() */ EVENT2_EXPORT_SYMBOL int evbuffer_commit_space(struct evbuffer *buf, struct evbuffer_iovec *vec, int n_vecs); /** Append data to the end of an evbuffer. @param buf the evbuffer to be appended to @param data pointer to the beginning of the data buffer @param datlen the number of bytes to be copied from the data buffer @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_add(struct evbuffer *buf, const void *data, size_t datlen); /** Read data from an evbuffer and drain the bytes read. If more bytes are requested than are available in the evbuffer, we only extract as many bytes as were available. @param buf the evbuffer to be read from @param data the destination buffer to store the result @param datlen the maximum size of the destination buffer @return the number of bytes read, or -1 if we can't drain the buffer. */ EVENT2_EXPORT_SYMBOL int evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen); /** Read data from an evbuffer, and leave the buffer unchanged. If more bytes are requested than are available in the evbuffer, we only extract as many bytes as were available. @param buf the evbuffer to be read from @param data_out the destination buffer to store the result @param datlen the maximum size of the destination buffer @return the number of bytes read, or -1 if we can't drain the buffer. */ EVENT2_EXPORT_SYMBOL ev_ssize_t evbuffer_copyout(struct evbuffer *buf, void *data_out, size_t datlen); /** Read data from the middle of an evbuffer, and leave the buffer unchanged. If more bytes are requested than are available in the evbuffer, we only extract as many bytes as were available. @param buf the evbuffer to be read from @param pos the position to start reading from @param data_out the destination buffer to store the result @param datlen the maximum size of the destination buffer @return the number of bytes read, or -1 if we can't drain the buffer. */ EVENT2_EXPORT_SYMBOL ev_ssize_t evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos, void *data_out, size_t datlen); /** Read data from an evbuffer into another evbuffer, draining the bytes from the source buffer. This function avoids copy operations to the extent possible. If more bytes are requested than are available in src, the src buffer is drained completely. @param src the evbuffer to be read from @param dst the destination evbuffer to store the result into @param datlen the maximum numbers of bytes to transfer @return the number of bytes read */ EVENT2_EXPORT_SYMBOL int evbuffer_remove_buffer(struct evbuffer *src, struct evbuffer *dst, size_t datlen); /** Used to tell evbuffer_readln what kind of line-ending to look for. */ enum evbuffer_eol_style { /** Any sequence of CR and LF characters is acceptable as an * EOL. * * Note that this style can produce ambiguous results: the * sequence "CRLF" will be treated as a single EOL if it is * all in the buffer at once, but if you first read a CR from * the network and later read an LF from the network, it will * be treated as two EOLs. */ EVBUFFER_EOL_ANY, /** An EOL is an LF, optionally preceded by a CR. This style is * most useful for implementing text-based internet protocols. */ EVBUFFER_EOL_CRLF, /** An EOL is a CR followed by an LF. */ EVBUFFER_EOL_CRLF_STRICT, /** An EOL is a LF. */ EVBUFFER_EOL_LF, /** An EOL is a NUL character (that is, a single byte with value 0) */ EVBUFFER_EOL_NUL }; /** * Read a single line from an evbuffer. * * Reads a line terminated by an EOL as determined by the evbuffer_eol_style * argument. Returns a newly allocated nul-terminated string; the caller must * free the returned value. The EOL is not included in the returned string. * * @param buffer the evbuffer to read from * @param n_read_out if non-NULL, points to a size_t that is set to the * number of characters in the returned string. This is useful for * strings that can contain NUL characters. * @param eol_style the style of line-ending to use. * @return pointer to a single line, or NULL if an error occurred */ EVENT2_EXPORT_SYMBOL char *evbuffer_readln(struct evbuffer *buffer, size_t *n_read_out, enum evbuffer_eol_style eol_style); /** Move all data from one evbuffer into another evbuffer. This is a destructive add. The data from one buffer moves into the other buffer. However, no unnecessary memory copies occur. @param outbuf the output buffer @param inbuf the input buffer @return 0 if successful, or -1 if an error occurred @see evbuffer_remove_buffer() */ EVENT2_EXPORT_SYMBOL int evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf); /** Copy data from one evbuffer into another evbuffer. This is a non-destructive add. The data from one buffer is copied into the other buffer. However, no unnecessary memory copies occur. Note that buffers already containing buffer references can't be added to other buffers. @param outbuf the output buffer @param inbuf the input buffer @return 0 if successful, or -1 if an error occurred */ EVENT2_EXPORT_SYMBOL int evbuffer_add_buffer_reference(struct evbuffer *outbuf, struct evbuffer *inbuf); /** A cleanup function for a piece of memory added to an evbuffer by reference. @see evbuffer_add_reference() */ typedef void (*evbuffer_ref_cleanup_cb)(const void *data, size_t datalen, void *extra); /** Reference memory into an evbuffer without copying. The memory needs to remain valid until all the added data has been read. This function keeps just a reference to the memory without actually incurring the overhead of a copy. @param outbuf the output buffer @param data the memory to reference @param datlen how memory to reference @param cleanupfn callback to be invoked when the memory is no longer referenced by this evbuffer. @param cleanupfn_arg optional argument to the cleanup callback @return 0 if successful, or -1 if an error occurred */ EVENT2_EXPORT_SYMBOL int evbuffer_add_reference(struct evbuffer *outbuf, const void *data, size_t datlen, evbuffer_ref_cleanup_cb cleanupfn, void *cleanupfn_arg); /** Copy data from a file into the evbuffer for writing to a socket. This function avoids unnecessary data copies between userland and kernel. If sendfile is available and the EVBUFFER_FLAG_DRAINS_TO_FD flag is set, it uses those functions. Otherwise, it tries to use mmap (or CreateFileMapping on Windows). The function owns the resulting file descriptor and will close it when finished transferring data. The results of using evbuffer_remove() or evbuffer_pullup() on evbuffers whose data was added using this function are undefined. For more fine-grained control, use evbuffer_add_file_segment. @param outbuf the output buffer @param fd the file descriptor @param offset the offset from which to read data @param length how much data to read, or -1 to read as much as possible. (-1 requires that 'fd' support fstat.) @return 0 if successful, or -1 if an error occurred */ EVENT2_EXPORT_SYMBOL int evbuffer_add_file(struct evbuffer *outbuf, int fd, ev_off_t offset, ev_off_t length); /** An evbuffer_file_segment holds a reference to a range of a file -- possibly the whole file! -- for use in writing from an evbuffer to a socket. It could be implemented with mmap, sendfile, splice, or (if all else fails) by just pulling all the data into RAM. A single evbuffer_file_segment can be added more than once, and to more than one evbuffer. */ struct evbuffer_file_segment; /** Flag for creating evbuffer_file_segment: If this flag is set, then when the evbuffer_file_segment is freed and no longer in use by any evbuffer, the underlying fd is closed. */ #define EVBUF_FS_CLOSE_ON_FREE 0x01 /** Flag for creating evbuffer_file_segment: Disable memory-map based implementations. */ #define EVBUF_FS_DISABLE_MMAP 0x02 /** Flag for creating evbuffer_file_segment: Disable direct fd-to-fd implementations (including sendfile and splice). You might want to use this option if data needs to be taken from the evbuffer by any means other than writing it to the network: the sendfile backend is fast, but it only works for sending files directly to the network. */ #define EVBUF_FS_DISABLE_SENDFILE 0x04 /** Flag for creating evbuffer_file_segment: Do not allocate a lock for this segment. If this option is set, then neither the segment nor any evbuffer it is added to may ever be accessed from more than one thread at a time. */ #define EVBUF_FS_DISABLE_LOCKING 0x08 /** A cleanup function for a evbuffer_file_segment added to an evbuffer for reference. */ typedef void (*evbuffer_file_segment_cleanup_cb)( struct evbuffer_file_segment const* seg, int flags, void* arg); /** Create and return a new evbuffer_file_segment for reading data from a file and sending it out via an evbuffer. This function avoids unnecessary data copies between userland and kernel. Where available, it uses sendfile or splice. The file descriptor must not be closed so long as any evbuffer is using this segment. The results of using evbuffer_remove() or evbuffer_pullup() or any other function that reads bytes from an evbuffer on any evbuffer containing the newly returned segment are undefined, unless you pass the EVBUF_FS_DISABLE_SENDFILE flag to this function. @param fd an open file to read from. @param offset an index within the file at which to start reading @param length how much data to read, or -1 to read as much as possible. (-1 requires that 'fd' support fstat.) @param flags any number of the EVBUF_FS_* flags @return a new evbuffer_file_segment, or NULL on failure. **/ EVENT2_EXPORT_SYMBOL struct evbuffer_file_segment *evbuffer_file_segment_new( int fd, ev_off_t offset, ev_off_t length, unsigned flags); /** Free an evbuffer_file_segment It is safe to call this function even if the segment has been added to one or more evbuffers. The evbuffer_file_segment will not be freed until no more references to it exist. */ EVENT2_EXPORT_SYMBOL void evbuffer_file_segment_free(struct evbuffer_file_segment *seg); /** Add cleanup callback and argument for the callback to an evbuffer_file_segment. The cleanup callback will be invoked when no more references to the evbuffer_file_segment exist. **/ EVENT2_EXPORT_SYMBOL void evbuffer_file_segment_add_cleanup_cb(struct evbuffer_file_segment *seg, evbuffer_file_segment_cleanup_cb cb, void* arg); /** Insert some or all of an evbuffer_file_segment at the end of an evbuffer Note that the offset and length parameters of this function have a different meaning from those provided to evbuffer_file_segment_new: When you create the segment, the offset is the offset _within the file_, and the length is the length _of the segment_, whereas when you add a segment to an evbuffer, the offset is _within the segment_ and the length is the length of the _part of the segment you want to use. In other words, if you have a 10 KiB file, and you create an evbuffer_file_segment for it with offset 20 and length 1000, it will refer to bytes 20..1019 inclusive. If you then pass this segment to evbuffer_add_file_segment and specify an offset of 20 and a length of 50, you will be adding bytes 40..99 inclusive. @param buf the evbuffer to append to @param seg the segment to add @param offset the offset within the segment to start from @param length the amount of data to add, or -1 to add it all. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_add_file_segment(struct evbuffer *buf, struct evbuffer_file_segment *seg, ev_off_t offset, ev_off_t length); /** Append a formatted string to the end of an evbuffer. The string is formated as printf. @param buf the evbuffer that will be appended to @param fmt a format string @param ... arguments that will be passed to printf(3) @return The number of bytes added if successful, or -1 if an error occurred. @see evutil_printf(), evbuffer_add_vprintf() */ EVENT2_EXPORT_SYMBOL int evbuffer_add_printf(struct evbuffer *buf, const char *fmt, ...) #ifdef __GNUC__ __attribute__((format(printf, 2, 3))) #endif ; /** Append a va_list formatted string to the end of an evbuffer. @param buf the evbuffer that will be appended to @param fmt a format string @param ap a varargs va_list argument array that will be passed to vprintf(3) @return The number of bytes added if successful, or -1 if an error occurred. */ EVENT2_EXPORT_SYMBOL int evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap) #ifdef __GNUC__ __attribute__((format(printf, 2, 0))) #endif ; /** Remove a specified number of bytes data from the beginning of an evbuffer. @param buf the evbuffer to be drained @param len the number of bytes to drain from the beginning of the buffer @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_drain(struct evbuffer *buf, size_t len); /** Write the contents of an evbuffer to a file descriptor. The evbuffer will be drained after the bytes have been successfully written. @param buffer the evbuffer to be written and drained @param fd the file descriptor to be written to @return the number of bytes written, or -1 if an error occurred @see evbuffer_read() */ EVENT2_EXPORT_SYMBOL int evbuffer_write(struct evbuffer *buffer, evutil_socket_t fd); /** Write some of the contents of an evbuffer to a file descriptor. The evbuffer will be drained after the bytes have been successfully written. @param buffer the evbuffer to be written and drained @param fd the file descriptor to be written to @param howmuch the largest allowable number of bytes to write, or -1 to write as many bytes as we can. @return the number of bytes written, or -1 if an error occurred @see evbuffer_read() */ EVENT2_EXPORT_SYMBOL int evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd, ev_ssize_t howmuch); /** Read from a file descriptor and store the result in an evbuffer. @param buffer the evbuffer to store the result @param fd the file descriptor to read from @param howmuch the number of bytes to be read @return the number of bytes read, or -1 if an error occurred @see evbuffer_write() */ EVENT2_EXPORT_SYMBOL int evbuffer_read(struct evbuffer *buffer, evutil_socket_t fd, int howmuch); /** Search for a string within an evbuffer. @param buffer the evbuffer to be searched @param what the string to be searched for @param len the length of the search string @param start NULL or a pointer to a valid struct evbuffer_ptr. @return a struct evbuffer_ptr whose 'pos' field has the offset of the first occurrence of the string in the buffer after 'start'. The 'pos' field of the result is -1 if the string was not found. */ EVENT2_EXPORT_SYMBOL struct evbuffer_ptr evbuffer_search(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start); /** Search for a string within part of an evbuffer. @param buffer the evbuffer to be searched @param what the string to be searched for @param len the length of the search string @param start NULL or a pointer to a valid struct evbuffer_ptr that indicates where we should start searching. @param end NULL or a pointer to a valid struct evbuffer_ptr that indicates where we should stop searching. @return a struct evbuffer_ptr whose 'pos' field has the offset of the first occurrence of the string in the buffer after 'start'. The 'pos' field of the result is -1 if the string was not found. */ EVENT2_EXPORT_SYMBOL struct evbuffer_ptr evbuffer_search_range(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start, const struct evbuffer_ptr *end); /** Defines how to adjust an evbuffer_ptr by evbuffer_ptr_set() @see evbuffer_ptr_set() */ enum evbuffer_ptr_how { /** Sets the pointer to the position; can be called on with an uninitialized evbuffer_ptr. */ EVBUFFER_PTR_SET, /** Advances the pointer by adding to the current position. */ EVBUFFER_PTR_ADD }; /** Sets the search pointer in the buffer to position. There are two ways to use this function: you can call evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_SET) to move 'pos' to a position 'N' bytes after the start of the buffer, or evbuffer_ptr_set(buf, &pos, N, EVBUFFER_PTR_ADD) to move 'pos' forward by 'N' bytes. If evbuffer_ptr is not initialized, this function can only be called with EVBUFFER_PTR_SET. An evbuffer_ptr can represent any position from the start of the buffer to a position immediately after the end of the buffer. @param buffer the evbuffer to be search @param ptr a pointer to a struct evbuffer_ptr @param position the position at which to start the next search @param how determines how the pointer should be manipulated. @returns 0 on success or -1 otherwise */ EVENT2_EXPORT_SYMBOL int evbuffer_ptr_set(struct evbuffer *buffer, struct evbuffer_ptr *ptr, size_t position, enum evbuffer_ptr_how how); /** Search for an end-of-line string within an evbuffer. @param buffer the evbuffer to be searched @param start NULL or a pointer to a valid struct evbuffer_ptr to start searching at. @param eol_len_out If non-NULL, the pointed-to value will be set to the length of the end-of-line string. @param eol_style The kind of EOL to look for; see evbuffer_readln() for more information @return a struct evbuffer_ptr whose 'pos' field has the offset of the first occurrence EOL in the buffer after 'start'. The 'pos' field of the result is -1 if the string was not found. */ EVENT2_EXPORT_SYMBOL struct evbuffer_ptr evbuffer_search_eol(struct evbuffer *buffer, struct evbuffer_ptr *start, size_t *eol_len_out, enum evbuffer_eol_style eol_style); /** Function to peek at data inside an evbuffer without removing it or copying it out. Pointers to the data are returned by filling the 'vec_out' array with pointers to one or more extents of data inside the buffer. The total data in the extents that you get back may be more than you requested (if there is more data last extent than you asked for), or less (if you do not provide enough evbuffer_iovecs, or if the buffer does not have as much data as you asked to see). @param buffer the evbuffer to peek into, @param len the number of bytes to try to peek. If len is negative, we will try to fill as much of vec_out as we can. If len is negative and vec_out is not provided, we return the number of evbuffer_iovecs that would be needed to get all the data in the buffer. @param start_at an evbuffer_ptr indicating the point at which we should start looking for data. NULL means, "At the start of the buffer." @param vec_out an array of evbuffer_iovec @param n_vec the length of vec_out. If 0, we only count how many extents would be necessary to point to the requested amount of data. @return The number of extents needed. This may be less than n_vec if we didn't need all the evbuffer_iovecs we were given, or more than n_vec if we would need more to return all the data that was requested. */ EVENT2_EXPORT_SYMBOL int evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len, struct evbuffer_ptr *start_at, struct evbuffer_iovec *vec_out, int n_vec); /** Structure passed to an evbuffer_cb_func evbuffer callback @see evbuffer_cb_func, evbuffer_add_cb() */ struct evbuffer_cb_info { /** The number of bytes in this evbuffer when callbacks were last * invoked. */ size_t orig_size; /** The number of bytes added since callbacks were last invoked. */ size_t n_added; /** The number of bytes removed since callbacks were last invoked. */ size_t n_deleted; }; /** Type definition for a callback that is invoked whenever data is added or removed from an evbuffer. An evbuffer may have one or more callbacks set at a time. The order in which they are executed is undefined. A callback function may add more callbacks, or remove itself from the list of callbacks, or add or remove data from the buffer. It may not remove another callback from the list. If a callback adds or removes data from the buffer or from another buffer, this can cause a recursive invocation of your callback or other callbacks. If you ask for an infinite loop, you might just get one: watch out! @param buffer the buffer whose size has changed @param info a structure describing how the buffer changed. @param arg a pointer to user data */ typedef void (*evbuffer_cb_func)(struct evbuffer *buffer, const struct evbuffer_cb_info *info, void *arg); struct evbuffer_cb_entry; /** Add a new callback to an evbuffer. Subsequent calls to evbuffer_add_cb() add new callbacks. To remove this callback, call evbuffer_remove_cb or evbuffer_remove_cb_entry. @param buffer the evbuffer to be monitored @param cb the callback function to invoke when the evbuffer is modified, or NULL to remove all callbacks. @param cbarg an argument to be provided to the callback function @return a handle to the callback on success, or NULL on failure. */ EVENT2_EXPORT_SYMBOL struct evbuffer_cb_entry *evbuffer_add_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg); /** Remove a callback from an evbuffer, given a handle returned from evbuffer_add_cb. Calling this function invalidates the handle. @return 0 if a callback was removed, or -1 if no matching callback was found. */ EVENT2_EXPORT_SYMBOL int evbuffer_remove_cb_entry(struct evbuffer *buffer, struct evbuffer_cb_entry *ent); /** Remove a callback from an evbuffer, given the function and argument used to add it. @return 0 if a callback was removed, or -1 if no matching callback was found. */ EVENT2_EXPORT_SYMBOL int evbuffer_remove_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg); /** If this flag is not set, then a callback is temporarily disabled, and * should not be invoked. * * @see evbuffer_cb_set_flags(), evbuffer_cb_clear_flags() */ #define EVBUFFER_CB_ENABLED 1 /** Change the flags that are set for a callback on a buffer by adding more. @param buffer the evbuffer that the callback is watching. @param cb the callback whose status we want to change. @param flags EVBUFFER_CB_ENABLED to re-enable the callback. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_cb_set_flags(struct evbuffer *buffer, struct evbuffer_cb_entry *cb, ev_uint32_t flags); /** Change the flags that are set for a callback on a buffer by removing some @param buffer the evbuffer that the callback is watching. @param cb the callback whose status we want to change. @param flags EVBUFFER_CB_ENABLED to disable the callback. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_cb_clear_flags(struct evbuffer *buffer, struct evbuffer_cb_entry *cb, ev_uint32_t flags); #if 0 /** Postpone calling a given callback until unsuspend is called later. This is different from disabling the callback, since the callback will get invoked later if the buffer size changes between now and when we unsuspend it. @param the buffer that the callback is watching. @param cb the callback we want to suspend. */ EVENT2_EXPORT_SYMBOL void evbuffer_cb_suspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb); /** Stop postponing a callback that we postponed with evbuffer_cb_suspend. If data was added to or removed from the buffer while the callback was suspended, the callback will get called once now. @param the buffer that the callback is watching. @param cb the callback we want to stop suspending. */ EVENT2_EXPORT_SYMBOL void evbuffer_cb_unsuspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb); #endif /** Makes the data at the beginning of an evbuffer contiguous. @param buf the evbuffer to make contiguous @param size the number of bytes to make contiguous, or -1 to make the entire buffer contiguous. @return a pointer to the contiguous memory array, or NULL if param size requested more data than is present in the buffer. */ EVENT2_EXPORT_SYMBOL unsigned char *evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size); /** Prepends data to the beginning of the evbuffer @param buf the evbuffer to which to prepend data @param data a pointer to the memory to prepend @param size the number of bytes to prepend @return 0 if successful, or -1 otherwise */ EVENT2_EXPORT_SYMBOL int evbuffer_prepend(struct evbuffer *buf, const void *data, size_t size); /** Prepends all data from the src evbuffer to the beginning of the dst evbuffer. @param dst the evbuffer to which to prepend data @param src the evbuffer to prepend; it will be emptied as a result @return 0 if successful, or -1 otherwise */ EVENT2_EXPORT_SYMBOL int evbuffer_prepend_buffer(struct evbuffer *dst, struct evbuffer* src); /** Prevent calls that modify an evbuffer from succeeding. A buffer may frozen at the front, at the back, or at both the front and the back. If the front of a buffer is frozen, operations that drain data from the front of the buffer, or that prepend data to the buffer, will fail until it is unfrozen. If the back a buffer is frozen, operations that append data from the buffer will fail until it is unfrozen. @param buf The buffer to freeze @param at_front If true, we freeze the front of the buffer. If false, we freeze the back. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_freeze(struct evbuffer *buf, int at_front); /** Re-enable calls that modify an evbuffer. @param buf The buffer to un-freeze @param at_front If true, we unfreeze the front of the buffer. If false, we unfreeze the back. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evbuffer_unfreeze(struct evbuffer *buf, int at_front); struct event_base; /** Force all the callbacks on an evbuffer to be run, not immediately after the evbuffer is altered, but instead from inside the event loop. This can be used to serialize all the callbacks to a single thread of execution. */ EVENT2_EXPORT_SYMBOL int evbuffer_defer_callbacks(struct evbuffer *buffer, struct event_base *base); /** Append data from 1 or more iovec's to an evbuffer Calculates the number of bytes needed for an iovec structure and guarantees all data will fit into a single chain. Can be used in lieu of functionality which calls evbuffer_add() constantly before being used to increase performance. @param buffer the destination buffer @param vec the source iovec @param n_vec the number of iovec structures. @return the number of bytes successfully written to the output buffer. */ EVENT2_EXPORT_SYMBOL size_t evbuffer_add_iovec(struct evbuffer * buffer, struct evbuffer_iovec * vec, int n_vec); #ifdef __cplusplus } #endif #endif /* EVENT2_BUFFER_H_INCLUDED_ */ PKZEDr, , event2/visibility.hnu[/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_VISIBILITY_H_INCLUDED_ #define EVENT2_VISIBILITY_H_INCLUDED_ #include #if defined(event_EXPORTS) || defined(event_extra_EXPORTS) || defined(event_core_EXPORTS) # if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) # define EVENT2_EXPORT_SYMBOL __global # elif defined __GNUC__ # define EVENT2_EXPORT_SYMBOL __attribute__ ((visibility("default"))) # elif defined(_MSC_VER) # define EVENT2_EXPORT_SYMBOL extern __declspec(dllexport) # else # define EVENT2_EXPORT_SYMBOL /* unknown compiler */ # endif #else # if defined(EVENT__NEED_DLLIMPORT) && defined(_MSC_VER) && !defined(EVENT_BUILDING_REGRESS_TEST) # define EVENT2_EXPORT_SYMBOL extern __declspec(dllimport) # else # define EVENT2_EXPORT_SYMBOL # endif #endif #endif /* EVENT2_VISIBILITY_H_INCLUDED_ */ PKZUevent2/http_struct.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_HTTP_STRUCT_H_INCLUDED_ #define EVENT2_HTTP_STRUCT_H_INCLUDED_ /** @file event2/http_struct.h Data structures for http. Using these structures may hurt forward compatibility with later versions of Libevent: be careful! */ #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /** * the request structure that a server receives. * WARNING: expect this structure to change. I will try to provide * reasonable accessors. */ struct evhttp_request { #if defined(TAILQ_ENTRY) TAILQ_ENTRY(evhttp_request) next; #else struct { struct evhttp_request *tqe_next; struct evhttp_request **tqe_prev; } next; #endif /* the connection object that this request belongs to */ struct evhttp_connection *evcon; int flags; /** The request obj owns the evhttp connection and needs to free it */ #define EVHTTP_REQ_OWN_CONNECTION 0x0001 /** Request was made via a proxy */ #define EVHTTP_PROXY_REQUEST 0x0002 /** The request object is owned by the user; the user must free it */ #define EVHTTP_USER_OWNED 0x0004 /** The request will be used again upstack; freeing must be deferred */ #define EVHTTP_REQ_DEFER_FREE 0x0008 /** The request should be freed upstack */ #define EVHTTP_REQ_NEEDS_FREE 0x0010 struct evkeyvalq *input_headers; struct evkeyvalq *output_headers; /* address of the remote host and the port connection came from */ char *remote_host; ev_uint16_t remote_port; /* cache of the hostname for evhttp_request_get_host */ char *host_cache; enum evhttp_request_kind kind; enum evhttp_cmd_type type; size_t headers_size; size_t body_size; char *uri; /* uri after HTTP request was parsed */ struct evhttp_uri *uri_elems; /* uri elements */ char major; /* HTTP Major number */ char minor; /* HTTP Minor number */ int response_code; /* HTTP Response code */ char *response_code_line; /* Readable response */ struct evbuffer *input_buffer; /* read data */ ev_int64_t ntoread; unsigned chunked:1, /* a chunked request */ userdone:1; /* the user has sent all data */ struct evbuffer *output_buffer; /* outgoing post or data */ /* Callback */ void (*cb)(struct evhttp_request *, void *); void *cb_arg; /* * Chunked data callback - call for each completed chunk if * specified. If not specified, all the data is delivered via * the regular callback. */ void (*chunk_cb)(struct evhttp_request *, void *); /* * Callback added for forked-daapd so they can collect ICY * (shoutcast) metadata from the http header. If return * int is negative the connection will be closed. */ int (*header_cb)(struct evhttp_request *, void *); /* * Error callback - called when error is occured. * @see evhttp_request_error for error types. * * @see evhttp_request_set_error_cb() */ void (*error_cb)(enum evhttp_request_error, void *); /* * Send complete callback - called when the request is actually * sent and completed. */ void (*on_complete_cb)(struct evhttp_request *, void *); void *on_complete_cb_arg; }; #ifdef __cplusplus } #endif #endif /* EVENT2_HTTP_STRUCT_H_INCLUDED_ */ PKZZ9 event2/http.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_HTTP_H_INCLUDED_ #define EVENT2_HTTP_H_INCLUDED_ /* For int types. */ #include #include #ifdef __cplusplus extern "C" { #endif /* In case we haven't included the right headers yet. */ struct evbuffer; struct event_base; struct bufferevent; struct evhttp_connection; /** @file event2/http.h * * Basic support for HTTP serving. * * As Libevent is a library for dealing with event notification and most * interesting applications are networked today, I have often found the * need to write HTTP code. The following prototypes and definitions provide * an application with a minimal interface for making HTTP requests and for * creating a very simple HTTP server. */ /* Response codes */ #define HTTP_OK 200 /**< request completed ok */ #define HTTP_NOCONTENT 204 /**< request does not have content */ #define HTTP_MOVEPERM 301 /**< the uri moved permanently */ #define HTTP_MOVETEMP 302 /**< the uri moved temporarily */ #define HTTP_NOTMODIFIED 304 /**< page was not modified from last */ #define HTTP_BADREQUEST 400 /**< invalid http request was made */ #define HTTP_NOTFOUND 404 /**< could not find content for uri */ #define HTTP_BADMETHOD 405 /**< method not allowed for this uri */ #define HTTP_ENTITYTOOLARGE 413 /**< */ #define HTTP_EXPECTATIONFAILED 417 /**< we can't handle this expectation */ #define HTTP_INTERNAL 500 /**< internal error */ #define HTTP_NOTIMPLEMENTED 501 /**< not implemented */ #define HTTP_SERVUNAVAIL 503 /**< the server is not available */ struct evhttp; struct evhttp_request; struct evkeyvalq; struct evhttp_bound_socket; struct evconnlistener; struct evdns_base; /** * Create a new HTTP server. * * @param base (optional) the event base to receive the HTTP events * @return a pointer to a newly initialized evhttp server structure * @see evhttp_free() */ EVENT2_EXPORT_SYMBOL struct evhttp *evhttp_new(struct event_base *base); /** * Binds an HTTP server on the specified address and port. * * Can be called multiple times to bind the same http server * to multiple different ports. * * @param http a pointer to an evhttp object * @param address a string containing the IP address to listen(2) on * @param port the port number to listen on * @return 0 on success, -1 on failure. * @see evhttp_accept_socket() */ EVENT2_EXPORT_SYMBOL int evhttp_bind_socket(struct evhttp *http, const char *address, ev_uint16_t port); /** * Like evhttp_bind_socket(), but returns a handle for referencing the socket. * * The returned pointer is not valid after \a http is freed. * * @param http a pointer to an evhttp object * @param address a string containing the IP address to listen(2) on * @param port the port number to listen on * @return Handle for the socket on success, NULL on failure. * @see evhttp_bind_socket(), evhttp_del_accept_socket() */ EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket *evhttp_bind_socket_with_handle(struct evhttp *http, const char *address, ev_uint16_t port); /** * Makes an HTTP server accept connections on the specified socket. * * This may be useful to create a socket and then fork multiple instances * of an http server, or when a socket has been communicated via file * descriptor passing in situations where an http servers does not have * permissions to bind to a low-numbered port. * * Can be called multiple times to have the http server listen to * multiple different sockets. * * @param http a pointer to an evhttp object * @param fd a socket fd that is ready for accepting connections * @return 0 on success, -1 on failure. * @see evhttp_bind_socket() */ EVENT2_EXPORT_SYMBOL int evhttp_accept_socket(struct evhttp *http, evutil_socket_t fd); /** * Like evhttp_accept_socket(), but returns a handle for referencing the socket. * * The returned pointer is not valid after \a http is freed. * * @param http a pointer to an evhttp object * @param fd a socket fd that is ready for accepting connections * @return Handle for the socket on success, NULL on failure. * @see evhttp_accept_socket(), evhttp_del_accept_socket() */ EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket *evhttp_accept_socket_with_handle(struct evhttp *http, evutil_socket_t fd); /** * The most low-level evhttp_bind/accept method: takes an evconnlistener, and * returns an evhttp_bound_socket. The listener will be freed when the bound * socket is freed. */ EVENT2_EXPORT_SYMBOL struct evhttp_bound_socket *evhttp_bind_listener(struct evhttp *http, struct evconnlistener *listener); /** * Return the listener used to implement a bound socket. */ EVENT2_EXPORT_SYMBOL struct evconnlistener *evhttp_bound_socket_get_listener(struct evhttp_bound_socket *bound); typedef void evhttp_bound_socket_foreach_fn(struct evhttp_bound_socket *, void *); /** * Applies the function specified in the first argument to all * evhttp_bound_sockets associated with "http". The user must not * attempt to free or remove any connections, sockets or listeners * in the callback "function". * * @param http pointer to an evhttp object * @param function function to apply to every bound socket * @param argument pointer value passed to function for every socket iterated */ EVENT2_EXPORT_SYMBOL void evhttp_foreach_bound_socket(struct evhttp *http, evhttp_bound_socket_foreach_fn *function, void *argument); /** * Makes an HTTP server stop accepting connections on the specified socket * * This may be useful when a socket has been sent via file descriptor passing * and is no longer needed by the current process. * * If you created this bound socket with evhttp_bind_socket_with_handle or * evhttp_accept_socket_with_handle, this function closes the fd you provided. * If you created this bound socket with evhttp_bind_listener, this function * frees the listener you provided. * * \a bound_socket is an invalid pointer after this call returns. * * @param http a pointer to an evhttp object * @param bound_socket a handle returned by evhttp_{bind,accept}_socket_with_handle * @see evhttp_bind_socket_with_handle(), evhttp_accept_socket_with_handle() */ EVENT2_EXPORT_SYMBOL void evhttp_del_accept_socket(struct evhttp *http, struct evhttp_bound_socket *bound_socket); /** * Get the raw file descriptor referenced by an evhttp_bound_socket. * * @param bound_socket a handle returned by evhttp_{bind,accept}_socket_with_handle * @return the file descriptor used by the bound socket * @see evhttp_bind_socket_with_handle(), evhttp_accept_socket_with_handle() */ EVENT2_EXPORT_SYMBOL evutil_socket_t evhttp_bound_socket_get_fd(struct evhttp_bound_socket *bound_socket); /** * Free the previously created HTTP server. * * Works only if no requests are currently being served. * * @param http the evhttp server object to be freed * @see evhttp_start() */ EVENT2_EXPORT_SYMBOL void evhttp_free(struct evhttp* http); /** XXX Document. */ EVENT2_EXPORT_SYMBOL void evhttp_set_max_headers_size(struct evhttp* http, ev_ssize_t max_headers_size); /** XXX Document. */ EVENT2_EXPORT_SYMBOL void evhttp_set_max_body_size(struct evhttp* http, ev_ssize_t max_body_size); /** Set the value to use for the Content-Type header when none was provided. If the content type string is NULL, the Content-Type header will not be automatically added. @param http the http server on which to set the default content type @param content_type the value for the Content-Type header */ EVENT2_EXPORT_SYMBOL void evhttp_set_default_content_type(struct evhttp *http, const char *content_type); /** Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks. If not supported they will generate a "405 Method not allowed" response. By default this includes the following methods: GET, POST, HEAD, PUT, DELETE @param http the http server on which to set the methods @param methods bit mask constructed from evhttp_cmd_type values */ EVENT2_EXPORT_SYMBOL void evhttp_set_allowed_methods(struct evhttp* http, ev_uint16_t methods); /** Set a callback for a specified URI @param http the http sever on which to set the callback @param path the path for which to invoke the callback @param cb the callback function that gets invoked on requesting path @param cb_arg an additional context argument for the callback @return 0 on success, -1 if the callback existed already, -2 on failure */ EVENT2_EXPORT_SYMBOL int evhttp_set_cb(struct evhttp *http, const char *path, void (*cb)(struct evhttp_request *, void *), void *cb_arg); /** Removes the callback for a specified URI */ EVENT2_EXPORT_SYMBOL int evhttp_del_cb(struct evhttp *, const char *); /** Set a callback for all requests that are not caught by specific callbacks Invokes the specified callback for all requests that do not match any of the previously specified request paths. This is catchall for requests not specifically configured with evhttp_set_cb(). @param http the evhttp server object for which to set the callback @param cb the callback to invoke for any unmatched requests @param arg an context argument for the callback */ EVENT2_EXPORT_SYMBOL void evhttp_set_gencb(struct evhttp *http, void (*cb)(struct evhttp_request *, void *), void *arg); /** Set a callback used to create new bufferevents for connections to a given evhttp object. You can use this to override the default bufferevent type -- for example, to make this evhttp object use SSL bufferevents rather than unencrypted ones. New bufferevents must be allocated with no fd set on them. @param http the evhttp server object for which to set the callback @param cb the callback to invoke for incoming connections @param arg an context argument for the callback */ EVENT2_EXPORT_SYMBOL void evhttp_set_bevcb(struct evhttp *http, struct bufferevent *(*cb)(struct event_base *, void *), void *arg); /** Adds a virtual host to the http server. A virtual host is a newly initialized evhttp object that has request callbacks set on it via evhttp_set_cb() or evhttp_set_gencb(). It most not have any listing sockets associated with it. If the virtual host has not been removed by the time that evhttp_free() is called on the main http server, it will be automatically freed, too. It is possible to have hierarchical vhosts. For example: A vhost with the pattern *.example.com may have other vhosts with patterns foo.example.com and bar.example.com associated with it. @param http the evhttp object to which to add a virtual host @param pattern the glob pattern against which the hostname is matched. The match is case insensitive and follows otherwise regular shell matching. @param vhost the virtual host to add the regular http server. @return 0 on success, -1 on failure @see evhttp_remove_virtual_host() */ EVENT2_EXPORT_SYMBOL int evhttp_add_virtual_host(struct evhttp* http, const char *pattern, struct evhttp* vhost); /** Removes a virtual host from the http server. @param http the evhttp object from which to remove the virtual host @param vhost the virtual host to remove from the regular http server. @return 0 on success, -1 on failure @see evhttp_add_virtual_host() */ EVENT2_EXPORT_SYMBOL int evhttp_remove_virtual_host(struct evhttp* http, struct evhttp* vhost); /** Add a server alias to an http object. The http object can be a virtual host or the main server. @param http the evhttp object @param alias the alias to add @see evhttp_add_remove_alias() */ EVENT2_EXPORT_SYMBOL int evhttp_add_server_alias(struct evhttp *http, const char *alias); /** Remove a server alias from an http object. @param http the evhttp object @param alias the alias to remove @see evhttp_add_server_alias() */ EVENT2_EXPORT_SYMBOL int evhttp_remove_server_alias(struct evhttp *http, const char *alias); /** * Set the timeout for an HTTP request. * * @param http an evhttp object * @param timeout_in_secs the timeout, in seconds */ EVENT2_EXPORT_SYMBOL void evhttp_set_timeout(struct evhttp *http, int timeout_in_secs); /** * Set the timeout for an HTTP request. * * @param http an evhttp object * @param tv the timeout, or NULL */ EVENT2_EXPORT_SYMBOL void evhttp_set_timeout_tv(struct evhttp *http, const struct timeval* tv); /* Read all the clients body, and only after this respond with an error if the * clients body exceed max_body_size */ #define EVHTTP_SERVER_LINGERING_CLOSE 0x0001 /** * Set connection flags for HTTP server. * * @see EVHTTP_SERVER_* * @return 0 on success, otherwise non zero (for example if flag doesn't * supported). */ EVENT2_EXPORT_SYMBOL int evhttp_set_flags(struct evhttp *http, int flags); /* Request/Response functionality */ /** * Send an HTML error message to the client. * * @param req a request object * @param error the HTTP error code * @param reason a brief explanation of the error. If this is NULL, we'll * just use the standard meaning of the error code. */ EVENT2_EXPORT_SYMBOL void evhttp_send_error(struct evhttp_request *req, int error, const char *reason); /** * Send an HTML reply to the client. * * The body of the reply consists of the data in databuf. After calling * evhttp_send_reply() databuf will be empty, but the buffer is still * owned by the caller and needs to be deallocated by the caller if * necessary. * * @param req a request object * @param code the HTTP response code to send * @param reason a brief message to send with the response code * @param databuf the body of the response */ EVENT2_EXPORT_SYMBOL void evhttp_send_reply(struct evhttp_request *req, int code, const char *reason, struct evbuffer *databuf); /* Low-level response interface, for streaming/chunked replies */ /** Initiate a reply that uses Transfer-Encoding chunked. This allows the caller to stream the reply back to the client and is useful when either not all of the reply data is immediately available or when sending very large replies. The caller needs to supply data chunks with evhttp_send_reply_chunk() and complete the reply by calling evhttp_send_reply_end(). @param req a request object @param code the HTTP response code to send @param reason a brief message to send with the response code */ EVENT2_EXPORT_SYMBOL void evhttp_send_reply_start(struct evhttp_request *req, int code, const char *reason); /** Send another data chunk as part of an ongoing chunked reply. The reply chunk consists of the data in databuf. After calling evhttp_send_reply_chunk() databuf will be empty, but the buffer is still owned by the caller and needs to be deallocated by the caller if necessary. @param req a request object @param databuf the data chunk to send as part of the reply. */ EVENT2_EXPORT_SYMBOL void evhttp_send_reply_chunk(struct evhttp_request *req, struct evbuffer *databuf); /** Send another data chunk as part of an ongoing chunked reply. The reply chunk consists of the data in databuf. After calling evhttp_send_reply_chunk() databuf will be empty, but the buffer is still owned by the caller and needs to be deallocated by the caller if necessary. @param req a request object @param databuf the data chunk to send as part of the reply. @param cb callback funcion @param call back's argument. */ EVENT2_EXPORT_SYMBOL void evhttp_send_reply_chunk_with_cb(struct evhttp_request *, struct evbuffer *, void (*cb)(struct evhttp_connection *, void *), void *arg); /** Complete a chunked reply, freeing the request as appropriate. @param req a request object */ EVENT2_EXPORT_SYMBOL void evhttp_send_reply_end(struct evhttp_request *req); /* * Interfaces for making requests */ /** The different request types supported by evhttp. These are as specified * in RFC2616, except for PATCH which is specified by RFC5789. * * By default, only some of these methods are accepted and passed to user * callbacks; use evhttp_set_allowed_methods() to change which methods * are allowed. */ enum evhttp_cmd_type { EVHTTP_REQ_GET = 1 << 0, EVHTTP_REQ_POST = 1 << 1, EVHTTP_REQ_HEAD = 1 << 2, EVHTTP_REQ_PUT = 1 << 3, EVHTTP_REQ_DELETE = 1 << 4, EVHTTP_REQ_OPTIONS = 1 << 5, EVHTTP_REQ_TRACE = 1 << 6, EVHTTP_REQ_CONNECT = 1 << 7, EVHTTP_REQ_PATCH = 1 << 8 }; /** a request object can represent either a request or a reply */ enum evhttp_request_kind { EVHTTP_REQUEST, EVHTTP_RESPONSE }; /** * Create and return a connection object that can be used to for making HTTP * requests. The connection object tries to resolve address and establish the * connection when it is given an http request object. * * @param base the event_base to use for handling the connection * @param dnsbase the dns_base to use for resolving host names; if not * specified host name resolution will block. * @param bev a bufferevent to use for connecting to the server; if NULL, a * socket-based bufferevent will be created. This buffrevent will be freed * when the connection closes. It must have no fd set on it. * @param address the address to which to connect * @param port the port to connect to * @return an evhttp_connection object that can be used for making requests */ EVENT2_EXPORT_SYMBOL struct evhttp_connection *evhttp_connection_base_bufferevent_new( struct event_base *base, struct evdns_base *dnsbase, struct bufferevent* bev, const char *address, ev_uint16_t port); /** * Return the bufferevent that an evhttp_connection is using. */ EVENT2_EXPORT_SYMBOL struct bufferevent* evhttp_connection_get_bufferevent(struct evhttp_connection *evcon); /** * Return the HTTP server associated with this connection, or NULL. */ EVENT2_EXPORT_SYMBOL struct evhttp *evhttp_connection_get_server(struct evhttp_connection *evcon); /** * Creates a new request object that needs to be filled in with the request * parameters. The callback is executed when the request completed or an * error occurred. */ EVENT2_EXPORT_SYMBOL struct evhttp_request *evhttp_request_new( void (*cb)(struct evhttp_request *, void *), void *arg); /** * Enable delivery of chunks to requestor. * @param cb will be called after every read of data with the same argument * as the completion callback. Will never be called on an empty * response. May drain the input buffer; it will be drained * automatically on return. */ EVENT2_EXPORT_SYMBOL void evhttp_request_set_chunked_cb(struct evhttp_request *, void (*cb)(struct evhttp_request *, void *)); /** * Register callback for additional parsing of request headers. * @param cb will be called after receiving and parsing the full header. * It allows analyzing the header and possibly closing the connection * by returning a value < 0. */ EVENT2_EXPORT_SYMBOL void evhttp_request_set_header_cb(struct evhttp_request *, int (*cb)(struct evhttp_request *, void *)); /** * The different error types supported by evhttp * * @see evhttp_request_set_error_cb() */ enum evhttp_request_error { /** * Timeout reached, also @see evhttp_connection_set_timeout() */ EVREQ_HTTP_TIMEOUT, /** * EOF reached */ EVREQ_HTTP_EOF, /** * Error while reading header, or invalid header */ EVREQ_HTTP_INVALID_HEADER, /** * Error encountered while reading or writing */ EVREQ_HTTP_BUFFER_ERROR, /** * The evhttp_cancel_request() called on this request. */ EVREQ_HTTP_REQUEST_CANCEL, /** * Body is greater then evhttp_connection_set_max_body_size() */ EVREQ_HTTP_DATA_TOO_LONG }; /** * Set a callback for errors * @see evhttp_request_error for error types. * * On error, both the error callback and the regular callback will be called, * error callback is called before the regular callback. **/ EVENT2_EXPORT_SYMBOL void evhttp_request_set_error_cb(struct evhttp_request *, void (*)(enum evhttp_request_error, void *)); /** * Set a callback to be called on request completion of evhttp_send_* function. * * The callback function will be called on the completion of the request after * the output data has been written and before the evhttp_request object * is destroyed. This can be useful for tracking resources associated with a * request (ex: timing metrics). * * @param req a request object * @param cb callback function that will be called on request completion * @param cb_arg an additional context argument for the callback */ EVENT2_EXPORT_SYMBOL void evhttp_request_set_on_complete_cb(struct evhttp_request *req, void (*cb)(struct evhttp_request *, void *), void *cb_arg); /** Frees the request object and removes associated events. */ EVENT2_EXPORT_SYMBOL void evhttp_request_free(struct evhttp_request *req); /** * Create and return a connection object that can be used to for making HTTP * requests. The connection object tries to resolve address and establish the * connection when it is given an http request object. * * @param base the event_base to use for handling the connection * @param dnsbase the dns_base to use for resolving host names; if not * specified host name resolution will block. * @param address the address to which to connect * @param port the port to connect to * @return an evhttp_connection object that can be used for making requests */ EVENT2_EXPORT_SYMBOL struct evhttp_connection *evhttp_connection_base_new( struct event_base *base, struct evdns_base *dnsbase, const char *address, ev_uint16_t port); /** * Set family hint for DNS requests. */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_family(struct evhttp_connection *evcon, int family); /* reuse connection address on retry */ #define EVHTTP_CON_REUSE_CONNECTED_ADDR 0x0008 /* Try to read error, since server may already send and close * connection, but if at that time we have some data to send then we * can send get EPIPE and fail, while we can read that HTTP error. */ #define EVHTTP_CON_READ_ON_WRITE_ERROR 0x0010 /* @see EVHTTP_SERVER_LINGERING_CLOSE */ #define EVHTTP_CON_LINGERING_CLOSE 0x0020 /* Padding for public flags, @see EVHTTP_CON_* in http-internal.h */ #define EVHTTP_CON_PUBLIC_FLAGS_END 0x100000 /** * Set connection flags. * * @see EVHTTP_CON_* * @return 0 on success, otherwise non zero (for example if flag doesn't * supported). */ EVENT2_EXPORT_SYMBOL int evhttp_connection_set_flags(struct evhttp_connection *evcon, int flags); /** Takes ownership of the request object * * Can be used in a request callback to keep onto the request until * evhttp_request_free() is explicitly called by the user. */ EVENT2_EXPORT_SYMBOL void evhttp_request_own(struct evhttp_request *req); /** Returns 1 if the request is owned by the user */ EVENT2_EXPORT_SYMBOL int evhttp_request_is_owned(struct evhttp_request *req); /** * Returns the connection object associated with the request or NULL * * The user needs to either free the request explicitly or call * evhttp_send_reply_end(). */ EVENT2_EXPORT_SYMBOL struct evhttp_connection *evhttp_request_get_connection(struct evhttp_request *req); /** * Returns the underlying event_base for this connection */ EVENT2_EXPORT_SYMBOL struct event_base *evhttp_connection_get_base(struct evhttp_connection *req); EVENT2_EXPORT_SYMBOL void evhttp_connection_set_max_headers_size(struct evhttp_connection *evcon, ev_ssize_t new_max_headers_size); EVENT2_EXPORT_SYMBOL void evhttp_connection_set_max_body_size(struct evhttp_connection* evcon, ev_ssize_t new_max_body_size); /** Frees an http connection */ EVENT2_EXPORT_SYMBOL void evhttp_connection_free(struct evhttp_connection *evcon); /** Disowns a given connection object * * Can be used to tell libevent to free the connection object after * the last request has completed or failed. */ EVENT2_EXPORT_SYMBOL void evhttp_connection_free_on_completion(struct evhttp_connection *evcon); /** sets the ip address from which http connections are made */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_local_address(struct evhttp_connection *evcon, const char *address); /** sets the local port from which http connections are made */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_local_port(struct evhttp_connection *evcon, ev_uint16_t port); /** Sets the timeout in seconds for events related to this connection */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_timeout(struct evhttp_connection *evcon, int timeout_in_secs); /** Sets the timeout for events related to this connection. Takes a struct * timeval. */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_timeout_tv(struct evhttp_connection *evcon, const struct timeval *tv); /** Sets the delay before retrying requests on this connection. This is only * used if evhttp_connection_set_retries is used to make the number of retries * at least one. Each retry after the first is twice as long as the one before * it. */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_initial_retry_tv(struct evhttp_connection *evcon, const struct timeval *tv); /** Sets the retry limit for this connection - -1 repeats indefinitely */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_retries(struct evhttp_connection *evcon, int retry_max); /** Set a callback for connection close. */ EVENT2_EXPORT_SYMBOL void evhttp_connection_set_closecb(struct evhttp_connection *evcon, void (*)(struct evhttp_connection *, void *), void *); /** Get the remote address and port associated with this connection. */ EVENT2_EXPORT_SYMBOL void evhttp_connection_get_peer(struct evhttp_connection *evcon, char **address, ev_uint16_t *port); /** Get the remote address associated with this connection. * extracted from getpeername() OR from nameserver. * * @return NULL if getpeername() return non success, * or connection is not connected, * otherwise it return pointer to struct sockaddr_storage */ EVENT2_EXPORT_SYMBOL const struct sockaddr* evhttp_connection_get_addr(struct evhttp_connection *evcon); /** Make an HTTP request over the specified connection. The connection gets ownership of the request. On failure, the request object is no longer valid as it has been freed. @param evcon the evhttp_connection object over which to send the request @param req the previously created and configured request object @param type the request type EVHTTP_REQ_GET, EVHTTP_REQ_POST, etc. @param uri the URI associated with the request @return 0 on success, -1 on failure @see evhttp_cancel_request() */ EVENT2_EXPORT_SYMBOL int evhttp_make_request(struct evhttp_connection *evcon, struct evhttp_request *req, enum evhttp_cmd_type type, const char *uri); /** Cancels a pending HTTP request. Cancels an ongoing HTTP request. The callback associated with this request is not executed and the request object is freed. If the request is currently being processed, e.g. it is ongoing, the corresponding evhttp_connection object is going to get reset. A request cannot be canceled if its callback has executed already. A request may be canceled reentrantly from its chunked callback. @param req the evhttp_request to cancel; req becomes invalid after this call. */ EVENT2_EXPORT_SYMBOL void evhttp_cancel_request(struct evhttp_request *req); /** * A structure to hold a parsed URI or Relative-Ref conforming to RFC3986. */ struct evhttp_uri; /** Returns the request URI */ EVENT2_EXPORT_SYMBOL const char *evhttp_request_get_uri(const struct evhttp_request *req); /** Returns the request URI (parsed) */ EVENT2_EXPORT_SYMBOL const struct evhttp_uri *evhttp_request_get_evhttp_uri(const struct evhttp_request *req); /** Returns the request command */ EVENT2_EXPORT_SYMBOL enum evhttp_cmd_type evhttp_request_get_command(const struct evhttp_request *req); EVENT2_EXPORT_SYMBOL int evhttp_request_get_response_code(const struct evhttp_request *req); EVENT2_EXPORT_SYMBOL const char * evhttp_request_get_response_code_line(const struct evhttp_request *req); /** Returns the input headers */ EVENT2_EXPORT_SYMBOL struct evkeyvalq *evhttp_request_get_input_headers(struct evhttp_request *req); /** Returns the output headers */ EVENT2_EXPORT_SYMBOL struct evkeyvalq *evhttp_request_get_output_headers(struct evhttp_request *req); /** Returns the input buffer */ EVENT2_EXPORT_SYMBOL struct evbuffer *evhttp_request_get_input_buffer(struct evhttp_request *req); /** Returns the output buffer */ EVENT2_EXPORT_SYMBOL struct evbuffer *evhttp_request_get_output_buffer(struct evhttp_request *req); /** Returns the host associated with the request. If a client sends an absolute URI, the host part of that is preferred. Otherwise, the input headers are searched for a Host: header. NULL is returned if no absolute URI or Host: header is provided. */ EVENT2_EXPORT_SYMBOL const char *evhttp_request_get_host(struct evhttp_request *req); /* Interfaces for dealing with HTTP headers */ /** Finds the value belonging to a header. @param headers the evkeyvalq object in which to find the header @param key the name of the header to find @returns a pointer to the value for the header or NULL if the header could not be found. @see evhttp_add_header(), evhttp_remove_header() */ EVENT2_EXPORT_SYMBOL const char *evhttp_find_header(const struct evkeyvalq *headers, const char *key); /** Removes a header from a list of existing headers. @param headers the evkeyvalq object from which to remove a header @param key the name of the header to remove @returns 0 if the header was removed, -1 otherwise. @see evhttp_find_header(), evhttp_add_header() */ EVENT2_EXPORT_SYMBOL int evhttp_remove_header(struct evkeyvalq *headers, const char *key); /** Adds a header to a list of existing headers. @param headers the evkeyvalq object to which to add a header @param key the name of the header @param value the value belonging to the header @returns 0 on success, -1 otherwise. @see evhttp_find_header(), evhttp_clear_headers() */ EVENT2_EXPORT_SYMBOL int evhttp_add_header(struct evkeyvalq *headers, const char *key, const char *value); /** Removes all headers from the header list. @param headers the evkeyvalq object from which to remove all headers */ EVENT2_EXPORT_SYMBOL void evhttp_clear_headers(struct evkeyvalq *headers); /* Miscellaneous utility functions */ /** Helper function to encode a string for inclusion in a URI. All characters are replaced by their hex-escaped (%22) equivalents, except for characters explicitly unreserved by RFC3986 -- that is, ASCII alphanumeric characters, hyphen, dot, underscore, and tilde. The returned string must be freed by the caller. @param str an unencoded string @return a newly allocated URI-encoded string or NULL on failure */ EVENT2_EXPORT_SYMBOL char *evhttp_encode_uri(const char *str); /** As evhttp_encode_uri, but if 'size' is nonnegative, treat the string as being 'size' bytes long. This allows you to encode strings that may contain 0-valued bytes. The returned string must be freed by the caller. @param str an unencoded string @param size the length of the string to encode, or -1 if the string is NUL-terminated @param space_to_plus if true, space characters in 'str' are encoded as +, not %20. @return a newly allocate URI-encoded string, or NULL on failure. */ EVENT2_EXPORT_SYMBOL char *evhttp_uriencode(const char *str, ev_ssize_t size, int space_to_plus); /** Helper function to sort of decode a URI-encoded string. Unlike evhttp_get_decoded_uri, it decodes all plus characters that appear _after_ the first question mark character, but no plusses that occur before. This is not a good way to decode URIs in whole or in part. The returned string must be freed by the caller @deprecated This function is deprecated; you probably want to use evhttp_get_decoded_uri instead. @param uri an encoded URI @return a newly allocated unencoded URI or NULL on failure */ EVENT2_EXPORT_SYMBOL char *evhttp_decode_uri(const char *uri); /** Helper function to decode a URI-escaped string or HTTP parameter. If 'decode_plus' is 1, then we decode the string as an HTTP parameter value, and convert all plus ('+') characters to spaces. If 'decode_plus' is 0, we leave all plus characters unchanged. The returned string must be freed by the caller. @param uri a URI-encode encoded URI @param decode_plus determines whether we convert '+' to space. @param size_out if size_out is not NULL, *size_out is set to the size of the returned string @return a newly allocated unencoded URI or NULL on failure */ EVENT2_EXPORT_SYMBOL char *evhttp_uridecode(const char *uri, int decode_plus, size_t *size_out); /** Helper function to parse out arguments in a query. Parsing a URI like http://foo.com/?q=test&s=some+thing will result in two entries in the key value queue. The first entry is: key="q", value="test" The second entry is: key="s", value="some thing" @deprecated This function is deprecated as of Libevent 2.0.9. Use evhttp_uri_parse and evhttp_parse_query_str instead. @param uri the request URI @param headers the head of the evkeyval queue @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int evhttp_parse_query(const char *uri, struct evkeyvalq *headers); /** Helper function to parse out arguments from the query portion of an HTTP URI. Parsing a query string like q=test&s=some+thing will result in two entries in the key value queue. The first entry is: key="q", value="test" The second entry is: key="s", value="some thing" @param query_parse the query portion of the URI @param headers the head of the evkeyval queue @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int evhttp_parse_query_str(const char *uri, struct evkeyvalq *headers); /** * Escape HTML character entities in a string. * * Replaces <, >, ", ' and & with <, >, ", * ' and & correspondingly. * * The returned string needs to be freed by the caller. * * @param html an unescaped HTML string * @return an escaped HTML string or NULL on error */ EVENT2_EXPORT_SYMBOL char *evhttp_htmlescape(const char *html); /** * Return a new empty evhttp_uri with no fields set. */ EVENT2_EXPORT_SYMBOL struct evhttp_uri *evhttp_uri_new(void); /** * Changes the flags set on a given URI. See EVHTTP_URI_* for * a list of flags. **/ EVENT2_EXPORT_SYMBOL void evhttp_uri_set_flags(struct evhttp_uri *uri, unsigned flags); /** Return the scheme of an evhttp_uri, or NULL if there is no scheme has * been set and the evhttp_uri contains a Relative-Ref. */ EVENT2_EXPORT_SYMBOL const char *evhttp_uri_get_scheme(const struct evhttp_uri *uri); /** * Return the userinfo part of an evhttp_uri, or NULL if it has no userinfo * set. */ EVENT2_EXPORT_SYMBOL const char *evhttp_uri_get_userinfo(const struct evhttp_uri *uri); /** * Return the host part of an evhttp_uri, or NULL if it has no host set. * The host may either be a regular hostname (conforming to the RFC 3986 * "regname" production), or an IPv4 address, or the empty string, or a * bracketed IPv6 address, or a bracketed 'IP-Future' address. * * Note that having a NULL host means that the URI has no authority * section, but having an empty-string host means that the URI has an * authority section with no host part. For example, * "mailto:user@example.com" has a host of NULL, but "file:///etc/motd" * has a host of "". */ EVENT2_EXPORT_SYMBOL const char *evhttp_uri_get_host(const struct evhttp_uri *uri); /** Return the port part of an evhttp_uri, or -1 if there is no port set. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_get_port(const struct evhttp_uri *uri); /** Return the path part of an evhttp_uri, or NULL if it has no path set */ EVENT2_EXPORT_SYMBOL const char *evhttp_uri_get_path(const struct evhttp_uri *uri); /** Return the query part of an evhttp_uri (excluding the leading "?"), or * NULL if it has no query set */ EVENT2_EXPORT_SYMBOL const char *evhttp_uri_get_query(const struct evhttp_uri *uri); /** Return the fragment part of an evhttp_uri (excluding the leading "#"), * or NULL if it has no fragment set */ EVENT2_EXPORT_SYMBOL const char *evhttp_uri_get_fragment(const struct evhttp_uri *uri); /** Set the scheme of an evhttp_uri, or clear the scheme if scheme==NULL. * Returns 0 on success, -1 if scheme is not well-formed. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_set_scheme(struct evhttp_uri *uri, const char *scheme); /** Set the userinfo of an evhttp_uri, or clear the userinfo if userinfo==NULL. * Returns 0 on success, -1 if userinfo is not well-formed. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_set_userinfo(struct evhttp_uri *uri, const char *userinfo); /** Set the host of an evhttp_uri, or clear the host if host==NULL. * Returns 0 on success, -1 if host is not well-formed. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_set_host(struct evhttp_uri *uri, const char *host); /** Set the port of an evhttp_uri, or clear the port if port==-1. * Returns 0 on success, -1 if port is not well-formed. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_set_port(struct evhttp_uri *uri, int port); /** Set the path of an evhttp_uri, or clear the path if path==NULL. * Returns 0 on success, -1 if path is not well-formed. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_set_path(struct evhttp_uri *uri, const char *path); /** Set the query of an evhttp_uri, or clear the query if query==NULL. * The query should not include a leading "?". * Returns 0 on success, -1 if query is not well-formed. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_set_query(struct evhttp_uri *uri, const char *query); /** Set the fragment of an evhttp_uri, or clear the fragment if fragment==NULL. * The fragment should not include a leading "#". * Returns 0 on success, -1 if fragment is not well-formed. */ EVENT2_EXPORT_SYMBOL int evhttp_uri_set_fragment(struct evhttp_uri *uri, const char *fragment); /** * Helper function to parse a URI-Reference as specified by RFC3986. * * This function matches the URI-Reference production from RFC3986, * which includes both URIs like * * scheme://[[userinfo]@]foo.com[:port]]/[path][?query][#fragment] * * and relative-refs like * * [path][?query][#fragment] * * Any optional elements portions not present in the original URI are * left set to NULL in the resulting evhttp_uri. If no port is * specified, the port is set to -1. * * Note that no decoding is performed on percent-escaped characters in * the string; if you want to parse them, use evhttp_uridecode or * evhttp_parse_query_str as appropriate. * * Note also that most URI schemes will have additional constraints that * this function does not know about, and cannot check. For example, * mailto://www.example.com/cgi-bin/fortune.pl is not a reasonable * mailto url, http://www.example.com:99999/ is not a reasonable HTTP * URL, and ftp:username@example.com is not a reasonable FTP URL. * Nevertheless, all of these URLs conform to RFC3986, and this function * accepts all of them as valid. * * @param source_uri the request URI * @param flags Zero or more EVHTTP_URI_* flags to affect the behavior * of the parser. * @return uri container to hold parsed data, or NULL if there is error * @see evhttp_uri_free() */ EVENT2_EXPORT_SYMBOL struct evhttp_uri *evhttp_uri_parse_with_flags(const char *source_uri, unsigned flags); /** Tolerate URIs that do not conform to RFC3986. * * Unfortunately, some HTTP clients generate URIs that, according to RFC3986, * are not conformant URIs. If you need to support these URIs, you can * do so by passing this flag to evhttp_uri_parse_with_flags. * * Currently, these changes are: *
    *
  • Nonconformant URIs are allowed to contain otherwise unreasonable * characters in their path, query, and fragment components. *
*/ #define EVHTTP_URI_NONCONFORMANT 0x01 /** Alias for evhttp_uri_parse_with_flags(source_uri, 0) */ EVENT2_EXPORT_SYMBOL struct evhttp_uri *evhttp_uri_parse(const char *source_uri); /** * Free all memory allocated for a parsed uri. Only use this for URIs * generated by evhttp_uri_parse. * * @param uri container with parsed data * @see evhttp_uri_parse() */ EVENT2_EXPORT_SYMBOL void evhttp_uri_free(struct evhttp_uri *uri); /** * Join together the uri parts from parsed data to form a URI-Reference. * * Note that no escaping of reserved characters is done on the members * of the evhttp_uri, so the generated string might not be a valid URI * unless the members of evhttp_uri are themselves valid. * * @param uri container with parsed data * @param buf destination buffer * @param limit destination buffer size * @return an joined uri as string or NULL on error * @see evhttp_uri_parse() */ EVENT2_EXPORT_SYMBOL char *evhttp_uri_join(struct evhttp_uri *uri, char *buf, size_t limit); #ifdef __cplusplus } #endif #endif /* EVENT2_HTTP_H_INCLUDED_ */ PKZ8event2/event_struct.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_EVENT_STRUCT_H_INCLUDED_ #define EVENT2_EVENT_STRUCT_H_INCLUDED_ /** @file event2/event_struct.h Structures used by event.h. Using these structures directly WILL harm forward compatibility: be careful. No field declared in this file should be used directly in user code. Except for historical reasons, these fields would not be exposed at all. */ #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /* For evkeyvalq */ #include #define EVLIST_TIMEOUT 0x01 #define EVLIST_INSERTED 0x02 #define EVLIST_SIGNAL 0x04 #define EVLIST_ACTIVE 0x08 #define EVLIST_INTERNAL 0x10 #define EVLIST_ACTIVE_LATER 0x20 #define EVLIST_FINALIZING 0x40 #define EVLIST_INIT 0x80 #define EVLIST_ALL 0xff /* Fix so that people don't have to run with */ #ifndef TAILQ_ENTRY #define EVENT_DEFINED_TQENTRY_ #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ } #endif /* !TAILQ_ENTRY */ #ifndef TAILQ_HEAD #define EVENT_DEFINED_TQHEAD_ #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; \ struct type **tqh_last; \ } #endif /* Fix so that people don't have to run with */ #ifndef LIST_ENTRY #define EVENT_DEFINED_LISTENTRY_ #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } #endif /* !LIST_ENTRY */ #ifndef LIST_HEAD #define EVENT_DEFINED_LISTHEAD_ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #endif /* !LIST_HEAD */ struct event; struct event_callback { TAILQ_ENTRY(event_callback) evcb_active_next; short evcb_flags; ev_uint8_t evcb_pri; /* smaller numbers are higher priority */ ev_uint8_t evcb_closure; /* allows us to adopt for different types of events */ union { void (*evcb_callback)(evutil_socket_t, short, void *); void (*evcb_selfcb)(struct event_callback *, void *); void (*evcb_evfinalize)(struct event *, void *); void (*evcb_cbfinalize)(struct event_callback *, void *); } evcb_cb_union; void *evcb_arg; }; struct event_base; struct event { struct event_callback ev_evcallback; /* for managing timeouts */ union { TAILQ_ENTRY(event) ev_next_with_common_timeout; int min_heap_idx; } ev_timeout_pos; evutil_socket_t ev_fd; struct event_base *ev_base; union { /* used for io events */ struct { LIST_ENTRY (event) ev_io_next; struct timeval ev_timeout; } ev_io; /* used by signal events */ struct { LIST_ENTRY (event) ev_signal_next; short ev_ncalls; /* Allows deletes in callback */ short *ev_pncalls; } ev_signal; } ev_; short ev_events; short ev_res; /* result passed to event callback */ struct timeval ev_timeout; }; TAILQ_HEAD (event_list, event); #ifdef EVENT_DEFINED_TQENTRY_ #undef TAILQ_ENTRY #endif #ifdef EVENT_DEFINED_TQHEAD_ #undef TAILQ_HEAD #endif LIST_HEAD (event_dlist, event); #ifdef EVENT_DEFINED_LISTENTRY_ #undef LIST_ENTRY #endif #ifdef EVENT_DEFINED_LISTHEAD_ #undef LIST_HEAD #endif #ifdef __cplusplus } #endif #endif /* EVENT2_EVENT_STRUCT_H_INCLUDED_ */ PKZRGT nn event2/util.hnu[/* * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_UTIL_H_INCLUDED_ #define EVENT2_UTIL_H_INCLUDED_ /** @file event2/util.h Common convenience functions for cross-platform portability and related socket manipulations. */ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TIME_H #include #endif #ifdef EVENT__HAVE_STDINT_H #include #elif defined(EVENT__HAVE_INTTYPES_H) #include #endif #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_STDDEF_H #include #endif #ifdef _MSC_VER #include #endif #include #ifdef EVENT__HAVE_NETDB_H #if !defined(_GNU_SOURCE) #define _GNU_SOURCE #endif #include #endif #ifdef _WIN32 #include #ifdef EVENT__HAVE_GETADDRINFO /* for EAI_* definitions. */ #include #endif #else #ifdef EVENT__HAVE_ERRNO_H #include #endif #include #endif #include /* Some openbsd autoconf versions get the name of this macro wrong. */ #if defined(EVENT__SIZEOF_VOID__) && !defined(EVENT__SIZEOF_VOID_P) #define EVENT__SIZEOF_VOID_P EVENT__SIZEOF_VOID__ #endif /** * @name Standard integer types. * * Integer type definitions for types that are supposed to be defined in the * C99-specified stdint.h. Shamefully, some platforms do not include * stdint.h, so we need to replace it. (If you are on a platform like this, * your C headers are now over 10 years out of date. You should bug them to * do something about this.) * * We define: * *
*
ev_uint64_t, ev_uint32_t, ev_uint16_t, ev_uint8_t
*
unsigned integer types of exactly 64, 32, 16, and 8 bits * respectively.
*
ev_int64_t, ev_int32_t, ev_int16_t, ev_int8_t
*
signed integer types of exactly 64, 32, 16, and 8 bits * respectively.
*
ev_uintptr_t, ev_intptr_t
*
unsigned/signed integers large enough * to hold a pointer without loss of bits.
*
ev_ssize_t
*
A signed type of the same size as size_t
*
ev_off_t
*
A signed type typically used to represent offsets within a * (potentially large) file
* * @{ */ #ifdef EVENT__HAVE_UINT64_T #define ev_uint64_t uint64_t #define ev_int64_t int64_t #elif defined(_WIN32) #define ev_uint64_t unsigned __int64 #define ev_int64_t signed __int64 #elif EVENT__SIZEOF_LONG_LONG == 8 #define ev_uint64_t unsigned long long #define ev_int64_t long long #elif EVENT__SIZEOF_LONG == 8 #define ev_uint64_t unsigned long #define ev_int64_t long #elif defined(EVENT_IN_DOXYGEN_) #define ev_uint64_t ... #define ev_int64_t ... #else #error "No way to define ev_uint64_t" #endif #ifdef EVENT__HAVE_UINT32_T #define ev_uint32_t uint32_t #define ev_int32_t int32_t #elif defined(_WIN32) #define ev_uint32_t unsigned int #define ev_int32_t signed int #elif EVENT__SIZEOF_LONG == 4 #define ev_uint32_t unsigned long #define ev_int32_t signed long #elif EVENT__SIZEOF_INT == 4 #define ev_uint32_t unsigned int #define ev_int32_t signed int #elif defined(EVENT_IN_DOXYGEN_) #define ev_uint32_t ... #define ev_int32_t ... #else #error "No way to define ev_uint32_t" #endif #ifdef EVENT__HAVE_UINT16_T #define ev_uint16_t uint16_t #define ev_int16_t int16_t #elif defined(_WIN32) #define ev_uint16_t unsigned short #define ev_int16_t signed short #elif EVENT__SIZEOF_INT == 2 #define ev_uint16_t unsigned int #define ev_int16_t signed int #elif EVENT__SIZEOF_SHORT == 2 #define ev_uint16_t unsigned short #define ev_int16_t signed short #elif defined(EVENT_IN_DOXYGEN_) #define ev_uint16_t ... #define ev_int16_t ... #else #error "No way to define ev_uint16_t" #endif #ifdef EVENT__HAVE_UINT8_T #define ev_uint8_t uint8_t #define ev_int8_t int8_t #elif defined(EVENT_IN_DOXYGEN_) #define ev_uint8_t ... #define ev_int8_t ... #else #define ev_uint8_t unsigned char #define ev_int8_t signed char #endif #ifdef EVENT__HAVE_UINTPTR_T #define ev_uintptr_t uintptr_t #define ev_intptr_t intptr_t #elif EVENT__SIZEOF_VOID_P <= 4 #define ev_uintptr_t ev_uint32_t #define ev_intptr_t ev_int32_t #elif EVENT__SIZEOF_VOID_P <= 8 #define ev_uintptr_t ev_uint64_t #define ev_intptr_t ev_int64_t #elif defined(EVENT_IN_DOXYGEN_) #define ev_uintptr_t ... #define ev_intptr_t ... #else #error "No way to define ev_uintptr_t" #endif #ifdef EVENT__ssize_t #define ev_ssize_t EVENT__ssize_t #else #define ev_ssize_t ssize_t #endif /* Note that we define ev_off_t based on the compile-time size of off_t that * we used to build Libevent, and not based on the current size of off_t. * (For example, we don't define ev_off_t to off_t.). We do this because * some systems let you build your software with different off_t sizes * at runtime, and so putting in any dependency on off_t would risk API * mismatch. */ #ifdef _WIN32 #define ev_off_t ev_int64_t #elif EVENT__SIZEOF_OFF_T == 8 #define ev_off_t ev_int64_t #elif EVENT__SIZEOF_OFF_T == 4 #define ev_off_t ev_int32_t #elif defined(EVENT_IN_DOXYGEN_) #define ev_off_t ... #else #define ev_off_t off_t #endif /**@}*/ /* Limits for integer types. We're making two assumptions here: - The compiler does constant folding properly. - The platform does signed arithmetic in two's complement. */ /** @name Limits for integer types These macros hold the largest or smallest values possible for the ev_[u]int*_t types. @{ */ #ifndef EVENT__HAVE_STDINT_H #define EV_UINT64_MAX ((((ev_uint64_t)0xffffffffUL) << 32) | 0xffffffffUL) #define EV_INT64_MAX ((((ev_int64_t) 0x7fffffffL) << 32) | 0xffffffffL) #define EV_INT64_MIN ((-EV_INT64_MAX) - 1) #define EV_UINT32_MAX ((ev_uint32_t)0xffffffffUL) #define EV_INT32_MAX ((ev_int32_t) 0x7fffffffL) #define EV_INT32_MIN ((-EV_INT32_MAX) - 1) #define EV_UINT16_MAX ((ev_uint16_t)0xffffUL) #define EV_INT16_MAX ((ev_int16_t) 0x7fffL) #define EV_INT16_MIN ((-EV_INT16_MAX) - 1) #define EV_UINT8_MAX 255 #define EV_INT8_MAX 127 #define EV_INT8_MIN ((-EV_INT8_MAX) - 1) #else #define EV_UINT64_MAX UINT64_MAX #define EV_INT64_MAX INT64_MAX #define EV_INT64_MIN INT64_MIN #define EV_UINT32_MAX UINT32_MAX #define EV_INT32_MAX INT32_MAX #define EV_INT32_MIN INT32_MIN #define EV_UINT16_MAX UINT16_MAX #define EV_INT16_MAX INT16_MAX #define EV_UINT8_MAX UINT8_MAX #define EV_INT8_MAX INT8_MAX #define EV_INT8_MIN INT8_MIN /** @} */ #endif /** @name Limits for SIZE_T and SSIZE_T @{ */ #if EVENT__SIZEOF_SIZE_T == 8 #define EV_SIZE_MAX EV_UINT64_MAX #define EV_SSIZE_MAX EV_INT64_MAX #elif EVENT__SIZEOF_SIZE_T == 4 #define EV_SIZE_MAX EV_UINT32_MAX #define EV_SSIZE_MAX EV_INT32_MAX #elif defined(EVENT_IN_DOXYGEN_) #define EV_SIZE_MAX ... #define EV_SSIZE_MAX ... #else #error "No way to define SIZE_MAX" #endif #define EV_SSIZE_MIN ((-EV_SSIZE_MAX) - 1) /**@}*/ #ifdef _WIN32 #define ev_socklen_t int #elif defined(EVENT__socklen_t) #define ev_socklen_t EVENT__socklen_t #else #define ev_socklen_t socklen_t #endif #ifdef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY #if !defined(EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) \ && !defined(ss_family) #define ss_family __ss_family #endif #endif /** * A type wide enough to hold the output of "socket()" or "accept()". On * Windows, this is an intptr_t; elsewhere, it is an int. */ #ifdef _WIN32 #define evutil_socket_t intptr_t #else #define evutil_socket_t int #endif /** * Structure to hold information about a monotonic timer * * Use this with evutil_configure_monotonic_time() and * evutil_gettime_monotonic(). * * This is an opaque structure; you can allocate one using * evutil_monotonic_timer_new(). * * @see evutil_monotonic_timer_new(), evutil_monotonic_timer_free(), * evutil_configure_monotonic_time(), evutil_gettime_monotonic() */ struct evutil_monotonic_timer #ifdef EVENT_IN_DOXYGEN_ {/*Empty body so that doxygen will generate documentation here.*/} #endif ; #define EV_MONOT_PRECISE 1 #define EV_MONOT_FALLBACK 2 /** Format a date string using RFC 1123 format (used in HTTP). * If `tm` is NULL, current system's time will be used. * The number of characters written will be returned. * One should check if the return value is smaller than `datelen` to check if * the result is truncated or not. */ EVENT2_EXPORT_SYMBOL int evutil_date_rfc1123(char *date, const size_t datelen, const struct tm *tm); /** Allocate a new struct evutil_monotonic_timer for use with the * evutil_configure_monotonic_time() and evutil_gettime_monotonic() * functions. You must configure the timer with * evutil_configure_monotonic_time() before using it. */ EVENT2_EXPORT_SYMBOL struct evutil_monotonic_timer * evutil_monotonic_timer_new(void); /** Free a struct evutil_monotonic_timer that was allocated using * evutil_monotonic_timer_new(). */ EVENT2_EXPORT_SYMBOL void evutil_monotonic_timer_free(struct evutil_monotonic_timer *timer); /** Set up a struct evutil_monotonic_timer; flags can include * EV_MONOT_PRECISE and EV_MONOT_FALLBACK. */ EVENT2_EXPORT_SYMBOL int evutil_configure_monotonic_time(struct evutil_monotonic_timer *timer, int flags); /** Query the current monotonic time from a struct evutil_monotonic_timer * previously configured with evutil_configure_monotonic_time(). Monotonic * time is guaranteed never to run in reverse, but is not necessarily epoch- * based, or relative to any other definite point. Use it to make reliable * measurements of elapsed time between events even when the system time * may be changed. * * It is not safe to use this funtion on the same timer from multiple * threads. */ EVENT2_EXPORT_SYMBOL int evutil_gettime_monotonic(struct evutil_monotonic_timer *timer, struct timeval *tp); /** Create two new sockets that are connected to each other. On Unix, this simply calls socketpair(). On Windows, it uses the loopback network interface on 127.0.0.1, and only AF_INET,SOCK_STREAM are supported. (This may fail on some Windows hosts where firewall software has cleverly decided to keep 127.0.0.1 from talking to itself.) Parameters and return values are as for socketpair() */ EVENT2_EXPORT_SYMBOL int evutil_socketpair(int d, int type, int protocol, evutil_socket_t sv[2]); /** Do platform-specific operations as needed to make a socket nonblocking. @param sock The socket to make nonblocking @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int evutil_make_socket_nonblocking(evutil_socket_t sock); /** Do platform-specific operations to make a listener socket reusable. Specifically, we want to make sure that another program will be able to bind this address right after we've closed the listener. This differs from Windows's interpretation of "reusable", which allows multiple listeners to bind the same address at the same time. @param sock The socket to make reusable @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int evutil_make_listen_socket_reuseable(evutil_socket_t sock); /** Do platform-specific operations to make a listener port reusable. Specifically, we want to make sure that multiple programs which also set the same socket option will be able to bind, listen at the same time. This is a feature available only to Linux 3.9+ @param sock The socket to make reusable @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int evutil_make_listen_socket_reuseable_port(evutil_socket_t sock); /** Do platform-specific operations as needed to close a socket upon a successful execution of one of the exec*() functions. @param sock The socket to be closed @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int evutil_make_socket_closeonexec(evutil_socket_t sock); /** Do the platform-specific call needed to close a socket returned from socket() or accept(). @param sock The socket to be closed @return 0 on success, -1 on failure */ EVENT2_EXPORT_SYMBOL int evutil_closesocket(evutil_socket_t sock); #define EVUTIL_CLOSESOCKET(s) evutil_closesocket(s) /** Do platform-specific operations, if possible, to make a tcp listener * socket defer accept()s until there is data to read. * * Not all platforms support this. You don't want to do this for every * listener socket: only the ones that implement a protocol where the * client transmits before the server needs to respond. * * @param sock The listening socket to to make deferred * @return 0 on success (whether the operation is supported or not), * -1 on failure */ EVENT2_EXPORT_SYMBOL int evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock); #ifdef _WIN32 /** Return the most recent socket error. Not idempotent on all platforms. */ #define EVUTIL_SOCKET_ERROR() WSAGetLastError() /** Replace the most recent socket error with errcode */ #define EVUTIL_SET_SOCKET_ERROR(errcode) \ do { WSASetLastError(errcode); } while (0) /** Return the most recent socket error to occur on sock. */ EVENT2_EXPORT_SYMBOL int evutil_socket_geterror(evutil_socket_t sock); /** Convert a socket error to a string. */ EVENT2_EXPORT_SYMBOL const char *evutil_socket_error_to_string(int errcode); #elif defined(EVENT_IN_DOXYGEN_) /** @name Socket error functions These functions are needed for making programs compatible between Windows and Unix-like platforms. You see, Winsock handles socket errors differently from the rest of the world. Elsewhere, a socket error is like any other error and is stored in errno. But winsock functions require you to retrieve the error with a special function, and don't let you use strerror for the error codes. And handling EWOULDBLOCK is ... different. @{ */ /** Return the most recent socket error. Not idempotent on all platforms. */ #define EVUTIL_SOCKET_ERROR() ... /** Replace the most recent socket error with errcode */ #define EVUTIL_SET_SOCKET_ERROR(errcode) ... /** Return the most recent socket error to occur on sock. */ #define evutil_socket_geterror(sock) ... /** Convert a socket error to a string. */ #define evutil_socket_error_to_string(errcode) ... /**@}*/ #else #define EVUTIL_SOCKET_ERROR() (errno) #define EVUTIL_SET_SOCKET_ERROR(errcode) \ do { errno = (errcode); } while (0) #define evutil_socket_geterror(sock) (errno) #define evutil_socket_error_to_string(errcode) (strerror(errcode)) #endif /** * @name Manipulation macros for struct timeval. * * We define replacements * for timeradd, timersub, timerclear, timercmp, and timerisset. * * @{ */ #ifdef EVENT__HAVE_TIMERADD #define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp)) #define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp)) #else #define evutil_timeradd(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ if ((vvp)->tv_usec >= 1000000) { \ (vvp)->tv_sec++; \ (vvp)->tv_usec -= 1000000; \ } \ } while (0) #define evutil_timersub(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ if ((vvp)->tv_usec < 0) { \ (vvp)->tv_sec--; \ (vvp)->tv_usec += 1000000; \ } \ } while (0) #endif /* !EVENT__HAVE_TIMERADD */ #ifdef EVENT__HAVE_TIMERCLEAR #define evutil_timerclear(tvp) timerclear(tvp) #else #define evutil_timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #endif /**@}*/ /** Return true iff the tvp is related to uvp according to the relational * operator cmp. Recognized values for cmp are ==, <=, <, >=, and >. */ #define evutil_timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #ifdef EVENT__HAVE_TIMERISSET #define evutil_timerisset(tvp) timerisset(tvp) #else #define evutil_timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #endif /** Replacement for offsetof on platforms that don't define it. */ #ifdef offsetof #define evutil_offsetof(type, field) offsetof(type, field) #else #define evutil_offsetof(type, field) ((off_t)(&((type *)0)->field)) #endif /* big-int related functions */ /** Parse a 64-bit value from a string. Arguments are as for strtol. */ EVENT2_EXPORT_SYMBOL ev_int64_t evutil_strtoll(const char *s, char **endptr, int base); /** Replacement for gettimeofday on platforms that lack it. */ #ifdef EVENT__HAVE_GETTIMEOFDAY #define evutil_gettimeofday(tv, tz) gettimeofday((tv), (tz)) #else struct timezone; EVENT2_EXPORT_SYMBOL int evutil_gettimeofday(struct timeval *tv, struct timezone *tz); #endif /** Replacement for snprintf to get consistent behavior on platforms for which the return value of snprintf does not conform to C99. */ EVENT2_EXPORT_SYMBOL int evutil_snprintf(char *buf, size_t buflen, const char *format, ...) #ifdef __GNUC__ __attribute__((format(printf, 3, 4))) #endif ; /** Replacement for vsnprintf to get consistent behavior on platforms for which the return value of snprintf does not conform to C99. */ EVENT2_EXPORT_SYMBOL int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) #ifdef __GNUC__ __attribute__((format(printf, 3, 0))) #endif ; /** Replacement for inet_ntop for platforms which lack it. */ EVENT2_EXPORT_SYMBOL const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len); /** Replacement for inet_pton for platforms which lack it. */ EVENT2_EXPORT_SYMBOL int evutil_inet_pton(int af, const char *src, void *dst); struct sockaddr; /** Parse an IPv4 or IPv6 address, with optional port, from a string. Recognized formats are: - [IPv6Address]:port - [IPv6Address] - IPv6Address - IPv4Address:port - IPv4Address If no port is specified, the port in the output is set to 0. @param str The string to parse. @param out A struct sockaddr to hold the result. This should probably be a struct sockaddr_storage. @param outlen A pointer to the number of bytes that that 'out' can safely hold. Set to the number of bytes used in 'out' on success. @return -1 if the address is not well-formed, if the port is out of range, or if out is not large enough to hold the result. Otherwise returns 0 on success. */ EVENT2_EXPORT_SYMBOL int evutil_parse_sockaddr_port(const char *str, struct sockaddr *out, int *outlen); /** Compare two sockaddrs; return 0 if they are equal, or less than 0 if sa1 * preceeds sa2, or greater than 0 if sa1 follows sa2. If include_port is * true, consider the port as well as the address. Only implemented for * AF_INET and AF_INET6 addresses. The ordering is not guaranteed to remain * the same between Libevent versions. */ EVENT2_EXPORT_SYMBOL int evutil_sockaddr_cmp(const struct sockaddr *sa1, const struct sockaddr *sa2, int include_port); /** As strcasecmp, but always compares the characters in locale-independent ASCII. That's useful if you're handling data in ASCII-based protocols. */ EVENT2_EXPORT_SYMBOL int evutil_ascii_strcasecmp(const char *str1, const char *str2); /** As strncasecmp, but always compares the characters in locale-independent ASCII. That's useful if you're handling data in ASCII-based protocols. */ EVENT2_EXPORT_SYMBOL int evutil_ascii_strncasecmp(const char *str1, const char *str2, size_t n); /* Here we define evutil_addrinfo to the native addrinfo type, or redefine it * if this system has no getaddrinfo(). */ #ifdef EVENT__HAVE_STRUCT_ADDRINFO #define evutil_addrinfo addrinfo #else /** A definition of struct addrinfo for systems that lack it. (This is just an alias for struct addrinfo if the system defines struct addrinfo.) */ struct evutil_addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ int ai_family; /* PF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ size_t ai_addrlen; /* length of ai_addr */ char *ai_canonname; /* canonical name for nodename */ struct sockaddr *ai_addr; /* binary address */ struct evutil_addrinfo *ai_next; /* next structure in linked list */ }; #endif /** @name evutil_getaddrinfo() error codes These values are possible error codes for evutil_getaddrinfo() and related functions. @{ */ #if defined(EAI_ADDRFAMILY) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_ADDRFAMILY EAI_ADDRFAMILY #else #define EVUTIL_EAI_ADDRFAMILY -901 #endif #if defined(EAI_AGAIN) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_AGAIN EAI_AGAIN #else #define EVUTIL_EAI_AGAIN -902 #endif #if defined(EAI_BADFLAGS) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_BADFLAGS EAI_BADFLAGS #else #define EVUTIL_EAI_BADFLAGS -903 #endif #if defined(EAI_FAIL) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_FAIL EAI_FAIL #else #define EVUTIL_EAI_FAIL -904 #endif #if defined(EAI_FAMILY) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_FAMILY EAI_FAMILY #else #define EVUTIL_EAI_FAMILY -905 #endif #if defined(EAI_MEMORY) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_MEMORY EAI_MEMORY #else #define EVUTIL_EAI_MEMORY -906 #endif /* This test is a bit complicated, since some MS SDKs decide to * remove NODATA or redefine it to be the same as NONAME, in a * fun interpretation of RFC 2553 and RFC 3493. */ #if defined(EAI_NODATA) && defined(EVENT__HAVE_GETADDRINFO) && (!defined(EAI_NONAME) || EAI_NODATA != EAI_NONAME) #define EVUTIL_EAI_NODATA EAI_NODATA #else #define EVUTIL_EAI_NODATA -907 #endif #if defined(EAI_NONAME) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_NONAME EAI_NONAME #else #define EVUTIL_EAI_NONAME -908 #endif #if defined(EAI_SERVICE) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_SERVICE EAI_SERVICE #else #define EVUTIL_EAI_SERVICE -909 #endif #if defined(EAI_SOCKTYPE) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_SOCKTYPE EAI_SOCKTYPE #else #define EVUTIL_EAI_SOCKTYPE -910 #endif #if defined(EAI_SYSTEM) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_EAI_SYSTEM EAI_SYSTEM #else #define EVUTIL_EAI_SYSTEM -911 #endif #define EVUTIL_EAI_CANCEL -90001 #if defined(AI_PASSIVE) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_AI_PASSIVE AI_PASSIVE #else #define EVUTIL_AI_PASSIVE 0x1000 #endif #if defined(AI_CANONNAME) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_AI_CANONNAME AI_CANONNAME #else #define EVUTIL_AI_CANONNAME 0x2000 #endif #if defined(AI_NUMERICHOST) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_AI_NUMERICHOST AI_NUMERICHOST #else #define EVUTIL_AI_NUMERICHOST 0x4000 #endif #if defined(AI_NUMERICSERV) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_AI_NUMERICSERV AI_NUMERICSERV #else #define EVUTIL_AI_NUMERICSERV 0x8000 #endif #if defined(AI_V4MAPPED) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_AI_V4MAPPED AI_V4MAPPED #else #define EVUTIL_AI_V4MAPPED 0x10000 #endif #if defined(AI_ALL) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_AI_ALL AI_ALL #else #define EVUTIL_AI_ALL 0x20000 #endif #if defined(AI_ADDRCONFIG) && defined(EVENT__HAVE_GETADDRINFO) #define EVUTIL_AI_ADDRCONFIG AI_ADDRCONFIG #else #define EVUTIL_AI_ADDRCONFIG 0x40000 #endif /**@}*/ struct evutil_addrinfo; /** * This function clones getaddrinfo for systems that don't have it. For full * details, see RFC 3493, section 6.1. * * Limitations: * - When the system has no getaddrinfo, we fall back to gethostbyname_r or * gethostbyname, with their attendant issues. * - The AI_V4MAPPED and AI_ALL flags are not currently implemented. * * For a nonblocking variant, see evdns_getaddrinfo. */ EVENT2_EXPORT_SYMBOL int evutil_getaddrinfo(const char *nodename, const char *servname, const struct evutil_addrinfo *hints_in, struct evutil_addrinfo **res); /** Release storage allocated by evutil_getaddrinfo or evdns_getaddrinfo. */ EVENT2_EXPORT_SYMBOL void evutil_freeaddrinfo(struct evutil_addrinfo *ai); EVENT2_EXPORT_SYMBOL const char *evutil_gai_strerror(int err); /** Generate n bytes of secure pseudorandom data, and store them in buf. * * Current versions of Libevent use an ARC4-based random number generator, * seeded using the platform's entropy source (/dev/urandom on Unix-like * systems; CryptGenRandom on Windows). This is not actually as secure as it * should be: ARC4 is a pretty lousy cipher, and the current implementation * provides only rudimentary prediction- and backtracking-resistance. Don't * use this for serious cryptographic applications. */ EVENT2_EXPORT_SYMBOL void evutil_secure_rng_get_bytes(void *buf, size_t n); /** * Seed the secure random number generator if needed, and return 0 on * success or -1 on failure. * * It is okay to call this function more than once; it will still return * 0 if the RNG has been successfully seeded and -1 if it can't be * seeded. * * Ordinarily you don't need to call this function from your own code; * Libevent will seed the RNG itself the first time it needs good random * numbers. You only need to call it if (a) you want to double-check * that one of the seeding methods did succeed, or (b) you plan to drop * the capability to seed (by chrooting, or dropping capabilities, or * whatever), and you want to make sure that seeding happens before your * program loses the ability to do it. */ EVENT2_EXPORT_SYMBOL int evutil_secure_rng_init(void); /** * Set a filename to use in place of /dev/urandom for seeding the secure * PRNG. Return 0 on success, -1 on failure. * * Call this function BEFORE calling any other initialization or RNG * functions. * * (This string will _NOT_ be copied internally. Do not free it while any * user of the secure RNG might be running. Don't pass anything other than a * real /dev/...random device file here, or you might lose security.) * * This API is unstable, and might change in a future libevent version. */ EVENT2_EXPORT_SYMBOL int evutil_secure_rng_set_urandom_device_file(char *fname); /** Seed the random number generator with extra random bytes. You should almost never need to call this function; it should be sufficient to invoke evutil_secure_rng_init(), or let Libevent take care of calling evutil_secure_rng_init() on its own. If you call this function as a _replacement_ for the regular entropy sources, then you need to be sure that your input contains a fairly large amount of strong entropy. Doing so is notoriously hard: most people who try get it wrong. Watch out! @param dat a buffer full of a strong source of random numbers @param datlen the number of bytes to read from datlen */ EVENT2_EXPORT_SYMBOL void evutil_secure_rng_add_bytes(const char *dat, size_t datlen); #ifdef __cplusplus } #endif #endif /* EVENT1_EVUTIL_H_INCLUDED_ */ PKZ Gֆֆevent2/bufferevent.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_BUFFEREVENT_H_INCLUDED_ #define EVENT2_BUFFEREVENT_H_INCLUDED_ /** @file event2/bufferevent.h Functions for buffering data for network sending or receiving. Bufferevents are higher level than evbuffers: each has an underlying evbuffer for reading and one for writing, and callbacks that are invoked under certain circumstances. A bufferevent provides input and output buffers that get filled and drained automatically. The user of a bufferevent no longer deals directly with the I/O, but instead is reading from input and writing to output buffers. Once initialized, the bufferevent structure can be used repeatedly with bufferevent_enable() and bufferevent_disable(). When reading is enabled, the bufferevent will try to read from the file descriptor onto its input buffer, and call the read callback. When writing is enabled, the bufferevent will try to write data onto its file descriptor when the output buffer has enough data, and call the write callback when the output buffer is sufficiently drained. Bufferevents come in several flavors, including:
Socket-based bufferevents
A bufferevent that reads and writes data onto a network socket. Created with bufferevent_socket_new().
Paired bufferevents
A pair of bufferevents that send and receive data to one another without touching the network. Created with bufferevent_pair_new().
Filtering bufferevents
A bufferevent that transforms data, and sends or receives it over another underlying bufferevent. Created with bufferevent_filter_new().
SSL-backed bufferevents
A bufferevent that uses the openssl library to send and receive data over an encrypted connection. Created with bufferevent_openssl_socket_new() or bufferevent_openssl_filter_new().
*/ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /** @name Bufferevent event codes These flags are passed as arguments to a bufferevent's event callback. @{ */ #define BEV_EVENT_READING 0x01 /**< error encountered while reading */ #define BEV_EVENT_WRITING 0x02 /**< error encountered while writing */ #define BEV_EVENT_EOF 0x10 /**< eof file reached */ #define BEV_EVENT_ERROR 0x20 /**< unrecoverable error encountered */ #define BEV_EVENT_TIMEOUT 0x40 /**< user-specified timeout reached */ #define BEV_EVENT_CONNECTED 0x80 /**< connect operation finished. */ /**@}*/ /** An opaque type for handling buffered IO @see event2/bufferevent.h */ struct bufferevent #ifdef EVENT_IN_DOXYGEN_ {} #endif ; struct event_base; struct evbuffer; struct sockaddr; /** A read or write callback for a bufferevent. The read callback is triggered when new data arrives in the input buffer and the amount of readable data exceed the low watermark which is 0 by default. The write callback is triggered if the write buffer has been exhausted or fell below its low watermark. @param bev the bufferevent that triggered the callback @param ctx the user-specified context for this bufferevent */ typedef void (*bufferevent_data_cb)(struct bufferevent *bev, void *ctx); /** An event/error callback for a bufferevent. The event callback is triggered if either an EOF condition or another unrecoverable error was encountered. For bufferevents with deferred callbacks, this is a bitwise OR of all errors that have happened on the bufferevent since the last callback invocation. @param bev the bufferevent for which the error condition was reached @param what a conjunction of flags: BEV_EVENT_READING or BEV_EVENT_WRITING to indicate if the error was encountered on the read or write path, and one of the following flags: BEV_EVENT_EOF, BEV_EVENT_ERROR, BEV_EVENT_TIMEOUT, BEV_EVENT_CONNECTED. @param ctx the user-specified context for this bufferevent */ typedef void (*bufferevent_event_cb)(struct bufferevent *bev, short what, void *ctx); /** Options that can be specified when creating a bufferevent */ enum bufferevent_options { /** If set, we close the underlying file * descriptor/bufferevent/whatever when this bufferevent is freed. */ BEV_OPT_CLOSE_ON_FREE = (1<<0), /** If set, and threading is enabled, operations on this bufferevent * are protected by a lock */ BEV_OPT_THREADSAFE = (1<<1), /** If set, callbacks are run deferred in the event loop. */ BEV_OPT_DEFER_CALLBACKS = (1<<2), /** If set, callbacks are executed without locks being held on the * bufferevent. This option currently requires that * BEV_OPT_DEFER_CALLBACKS also be set; a future version of Libevent * might remove the requirement.*/ BEV_OPT_UNLOCK_CALLBACKS = (1<<3) }; /** Create a new socket bufferevent over an existing socket. @param base the event base to associate with the new bufferevent. @param fd the file descriptor from which data is read and written to. This file descriptor is not allowed to be a pipe(2). It is safe to set the fd to -1, so long as you later set it with bufferevent_setfd or bufferevent_socket_connect(). @param options Zero or more BEV_OPT_* flags @return a pointer to a newly allocated bufferevent struct, or NULL if an error occurred @see bufferevent_free() */ EVENT2_EXPORT_SYMBOL struct bufferevent *bufferevent_socket_new(struct event_base *base, evutil_socket_t fd, int options); /** Launch a connect() attempt with a socket-based bufferevent. When the connect succeeds, the eventcb will be invoked with BEV_EVENT_CONNECTED set. If the bufferevent does not already have a socket set, we allocate a new socket here and make it nonblocking before we begin. If no address is provided, we assume that the socket is already connecting, and configure the bufferevent so that a BEV_EVENT_CONNECTED event will be yielded when it is done connecting. @param bufev an existing bufferevent allocated with bufferevent_socket_new(). @param addr the address we should connect to @param socklen The length of the address @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int bufferevent_socket_connect(struct bufferevent *, const struct sockaddr *, int); struct evdns_base; /** Resolve the hostname 'hostname' and connect to it as with bufferevent_socket_connect(). @param bufev An existing bufferevent allocated with bufferevent_socket_new() @param evdns_base Optionally, an evdns_base to use for resolving hostnames asynchronously. May be set to NULL for a blocking resolve. @param family A preferred address family to resolve addresses to, or AF_UNSPEC for no preference. Only AF_INET, AF_INET6, and AF_UNSPEC are supported. @param hostname The hostname to resolve; see below for notes on recognized formats @param port The port to connect to on the resolved address. @return 0 if successful, -1 on failure. Recognized hostname formats are: www.example.com (hostname) 1.2.3.4 (ipv4address) ::1 (ipv6address) [::1] ([ipv6address]) Performance note: If you do not provide an evdns_base, this function may block while it waits for a DNS response. This is probably not what you want. */ EVENT2_EXPORT_SYMBOL int bufferevent_socket_connect_hostname(struct bufferevent *, struct evdns_base *, int, const char *, int); /** Return the error code for the last failed DNS lookup attempt made by bufferevent_socket_connect_hostname(). @param bev The bufferevent object. @return DNS error code. @see evutil_gai_strerror() */ EVENT2_EXPORT_SYMBOL int bufferevent_socket_get_dns_error(struct bufferevent *bev); /** Assign a bufferevent to a specific event_base. NOTE that only socket bufferevents support this function. @param base an event_base returned by event_init() @param bufev a bufferevent struct returned by bufferevent_new() or bufferevent_socket_new() @return 0 if successful, or -1 if an error occurred @see bufferevent_new() */ EVENT2_EXPORT_SYMBOL int bufferevent_base_set(struct event_base *base, struct bufferevent *bufev); /** Return the event_base used by a bufferevent */ EVENT2_EXPORT_SYMBOL struct event_base *bufferevent_get_base(struct bufferevent *bev); /** Assign a priority to a bufferevent. Only supported for socket bufferevents. @param bufev a bufferevent struct @param pri the priority to be assigned @return 0 if successful, or -1 if an error occurred */ EVENT2_EXPORT_SYMBOL int bufferevent_priority_set(struct bufferevent *bufev, int pri); /** Return the priority of a bufferevent. Only supported for socket bufferevents */ EVENT2_EXPORT_SYMBOL int bufferevent_get_priority(const struct bufferevent *bufev); /** Deallocate the storage associated with a bufferevent structure. If there is pending data to write on the bufferevent, it probably won't be flushed before the bufferevent is freed. @param bufev the bufferevent structure to be freed. */ EVENT2_EXPORT_SYMBOL void bufferevent_free(struct bufferevent *bufev); /** Changes the callbacks for a bufferevent. @param bufev the bufferevent object for which to change callbacks @param readcb callback to invoke when there is data to be read, or NULL if no callback is desired @param writecb callback to invoke when the file descriptor is ready for writing, or NULL if no callback is desired @param eventcb callback to invoke when there is an event on the file descriptor @param cbarg an argument that will be supplied to each of the callbacks (readcb, writecb, and errorcb) @see bufferevent_new() */ EVENT2_EXPORT_SYMBOL void bufferevent_setcb(struct bufferevent *bufev, bufferevent_data_cb readcb, bufferevent_data_cb writecb, bufferevent_event_cb eventcb, void *cbarg); /** Retrieves the callbacks for a bufferevent. @param bufev the bufferevent to examine. @param readcb_ptr if readcb_ptr is nonnull, *readcb_ptr is set to the current read callback for the bufferevent. @param writecb_ptr if writecb_ptr is nonnull, *writecb_ptr is set to the current write callback for the bufferevent. @param eventcb_ptr if eventcb_ptr is nonnull, *eventcb_ptr is set to the current event callback for the bufferevent. @param cbarg_ptr if cbarg_ptr is nonnull, *cbarg_ptr is set to the current callback argument for the bufferevent. @see buffervent_setcb() */ EVENT2_EXPORT_SYMBOL void bufferevent_getcb(struct bufferevent *bufev, bufferevent_data_cb *readcb_ptr, bufferevent_data_cb *writecb_ptr, bufferevent_event_cb *eventcb_ptr, void **cbarg_ptr); /** Changes the file descriptor on which the bufferevent operates. Not supported for all bufferevent types. @param bufev the bufferevent object for which to change the file descriptor @param fd the file descriptor to operate on */ EVENT2_EXPORT_SYMBOL int bufferevent_setfd(struct bufferevent *bufev, evutil_socket_t fd); /** Returns the file descriptor associated with a bufferevent, or -1 if no file descriptor is associated with the bufferevent. */ EVENT2_EXPORT_SYMBOL evutil_socket_t bufferevent_getfd(struct bufferevent *bufev); /** Returns the underlying bufferevent associated with a bufferevent (if the bufferevent is a wrapper), or NULL if there is no underlying bufferevent. */ EVENT2_EXPORT_SYMBOL struct bufferevent *bufferevent_get_underlying(struct bufferevent *bufev); /** Write data to a bufferevent buffer. The bufferevent_write() function can be used to write data to the file descriptor. The data is appended to the output buffer and written to the descriptor automatically as it becomes available for writing. @param bufev the bufferevent to be written to @param data a pointer to the data to be written @param size the length of the data, in bytes @return 0 if successful, or -1 if an error occurred @see bufferevent_write_buffer() */ EVENT2_EXPORT_SYMBOL int bufferevent_write(struct bufferevent *bufev, const void *data, size_t size); /** Write data from an evbuffer to a bufferevent buffer. The evbuffer is being drained as a result. @param bufev the bufferevent to be written to @param buf the evbuffer to be written @return 0 if successful, or -1 if an error occurred @see bufferevent_write() */ EVENT2_EXPORT_SYMBOL int bufferevent_write_buffer(struct bufferevent *bufev, struct evbuffer *buf); /** Read data from a bufferevent buffer. The bufferevent_read() function is used to read data from the input buffer. @param bufev the bufferevent to be read from @param data pointer to a buffer that will store the data @param size the size of the data buffer, in bytes @return the amount of data read, in bytes. */ EVENT2_EXPORT_SYMBOL size_t bufferevent_read(struct bufferevent *bufev, void *data, size_t size); /** Read data from a bufferevent buffer into an evbuffer. This avoids memory copies. @param bufev the bufferevent to be read from @param buf the evbuffer to which to add data @return 0 if successful, or -1 if an error occurred. */ EVENT2_EXPORT_SYMBOL int bufferevent_read_buffer(struct bufferevent *bufev, struct evbuffer *buf); /** Returns the input buffer. The user MUST NOT set the callback on this buffer. @param bufev the bufferevent from which to get the evbuffer @return the evbuffer object for the input buffer */ EVENT2_EXPORT_SYMBOL struct evbuffer *bufferevent_get_input(struct bufferevent *bufev); /** Returns the output buffer. The user MUST NOT set the callback on this buffer. When filters are being used, the filters need to be manually triggered if the output buffer was manipulated. @param bufev the bufferevent from which to get the evbuffer @return the evbuffer object for the output buffer */ EVENT2_EXPORT_SYMBOL struct evbuffer *bufferevent_get_output(struct bufferevent *bufev); /** Enable a bufferevent. @param bufev the bufferevent to be enabled @param event any combination of EV_READ | EV_WRITE. @return 0 if successful, or -1 if an error occurred @see bufferevent_disable() */ EVENT2_EXPORT_SYMBOL int bufferevent_enable(struct bufferevent *bufev, short event); /** Disable a bufferevent. @param bufev the bufferevent to be disabled @param event any combination of EV_READ | EV_WRITE. @return 0 if successful, or -1 if an error occurred @see bufferevent_enable() */ EVENT2_EXPORT_SYMBOL int bufferevent_disable(struct bufferevent *bufev, short event); /** Return the events that are enabled on a given bufferevent. @param bufev the bufferevent to inspect @return A combination of EV_READ | EV_WRITE */ EVENT2_EXPORT_SYMBOL short bufferevent_get_enabled(struct bufferevent *bufev); /** Set the read and write timeout for a bufferevent. A bufferevent's timeout will fire the first time that the indicated amount of time has elapsed since a successful read or write operation, during which the bufferevent was trying to read or write. (In other words, if reading or writing is disabled, or if the bufferevent's read or write operation has been suspended because there's no data to write, or not enough banwidth, or so on, the timeout isn't active. The timeout only becomes active when we we're willing to actually read or write.) Calling bufferevent_enable or setting a timeout for a bufferevent whose timeout is already pending resets its timeout. If the timeout elapses, the corresponding operation (EV_READ or EV_WRITE) becomes disabled until you re-enable it again. The bufferevent's event callback is called with the BEV_EVENT_TIMEOUT|BEV_EVENT_READING or BEV_EVENT_TIMEOUT|BEV_EVENT_WRITING. @param bufev the bufferevent to be modified @param timeout_read the read timeout, or NULL @param timeout_write the write timeout, or NULL */ EVENT2_EXPORT_SYMBOL int bufferevent_set_timeouts(struct bufferevent *bufev, const struct timeval *timeout_read, const struct timeval *timeout_write); /** Sets the watermarks for read and write events. On input, a bufferevent does not invoke the user read callback unless there is at least low watermark data in the buffer. If the read buffer is beyond the high watermark, the bufferevent stops reading from the network. On output, the user write callback is invoked whenever the buffered data falls below the low watermark. Filters that write to this bufev will try not to write more bytes to this buffer than the high watermark would allow, except when flushing. @param bufev the bufferevent to be modified @param events EV_READ, EV_WRITE or both @param lowmark the lower watermark to set @param highmark the high watermark to set */ EVENT2_EXPORT_SYMBOL void bufferevent_setwatermark(struct bufferevent *bufev, short events, size_t lowmark, size_t highmark); /** Retrieves the watermarks for read or write events. Returns non-zero if events contains not only EV_READ or EV_WRITE. Returns zero if events equal EV_READ or EV_WRITE @param bufev the bufferevent to be examined @param events EV_READ or EV_WRITE @param lowmark receives the lower watermark if not NULL @param highmark receives the high watermark if not NULL */ EVENT2_EXPORT_SYMBOL int bufferevent_getwatermark(struct bufferevent *bufev, short events, size_t *lowmark, size_t *highmark); /** Acquire the lock on a bufferevent. Has no effect if locking was not enabled with BEV_OPT_THREADSAFE. */ EVENT2_EXPORT_SYMBOL void bufferevent_lock(struct bufferevent *bufev); /** Release the lock on a bufferevent. Has no effect if locking was not enabled with BEV_OPT_THREADSAFE. */ EVENT2_EXPORT_SYMBOL void bufferevent_unlock(struct bufferevent *bufev); /** * Public interface to manually increase the reference count of a bufferevent * this is useful in situations where a user may reference the bufferevent * somewhere eles (unknown to libevent) * * @param bufev the bufferevent to increase the refcount on * */ EVENT2_EXPORT_SYMBOL void bufferevent_incref(struct bufferevent *bufev); /** * Public interface to manually decrement the reference count of a bufferevent * * Warning: make sure you know what you're doing. This is mainly used in * conjunction with bufferevent_incref(). This will free up all data associated * with a bufferevent if the reference count hits 0. * * @param bufev the bufferevent to decrement the refcount on * * @return 1 if the bufferevent was freed, otherwise 0 (still referenced) */ EVENT2_EXPORT_SYMBOL int bufferevent_decref(struct bufferevent *bufev); /** Flags that can be passed into filters to let them know how to deal with the incoming data. */ enum bufferevent_flush_mode { /** usually set when processing data */ BEV_NORMAL = 0, /** want to checkpoint all data sent. */ BEV_FLUSH = 1, /** encountered EOF on read or done sending data */ BEV_FINISHED = 2 }; /** Triggers the bufferevent to produce more data if possible. @param bufev the bufferevent object @param iotype either EV_READ or EV_WRITE or both. @param mode either BEV_NORMAL or BEV_FLUSH or BEV_FINISHED @return -1 on failure, 0 if no data was produces, 1 if data was produced */ EVENT2_EXPORT_SYMBOL int bufferevent_flush(struct bufferevent *bufev, short iotype, enum bufferevent_flush_mode mode); /** Flags for bufferevent_trigger(_event) that modify when and how to trigger the callback. */ enum bufferevent_trigger_options { /** trigger the callback regardless of the watermarks */ BEV_TRIG_IGNORE_WATERMARKS = (1<<16), /** defer even if the callbacks are not */ BEV_TRIG_DEFER_CALLBACKS = BEV_OPT_DEFER_CALLBACKS /* (Note: for internal reasons, these need to be disjoint from * bufferevent_options, except when they mean the same thing. */ }; /** Triggers bufferevent data callbacks. The function will honor watermarks unless options contain BEV_TRIG_IGNORE_WATERMARKS. If the options contain BEV_OPT_DEFER_CALLBACKS, the callbacks are deferred. @param bufev the bufferevent object @param iotype either EV_READ or EV_WRITE or both. @param options */ EVENT2_EXPORT_SYMBOL void bufferevent_trigger(struct bufferevent *bufev, short iotype, int options); /** Triggers the bufferevent event callback. If the options contain BEV_OPT_DEFER_CALLBACKS, the callbacks are deferred. @param bufev the bufferevent object @param what the flags to pass onto the event callback @param options */ EVENT2_EXPORT_SYMBOL void bufferevent_trigger_event(struct bufferevent *bufev, short what, int options); /** @name Filtering support @{ */ /** Values that filters can return. */ enum bufferevent_filter_result { /** everything is okay */ BEV_OK = 0, /** the filter needs to read more data before output */ BEV_NEED_MORE = 1, /** the filter encountered a critical error, no further data can be processed. */ BEV_ERROR = 2 }; /** A callback function to implement a filter for a bufferevent. @param src An evbuffer to drain data from. @param dst An evbuffer to add data to. @param limit A suggested upper bound of bytes to write to dst. The filter may ignore this value, but doing so means that it will overflow the high-water mark associated with dst. -1 means "no limit". @param mode Whether we should write data as may be convenient (BEV_NORMAL), or flush as much data as we can (BEV_FLUSH), or flush as much as we can, possibly including an end-of-stream marker (BEV_FINISH). @param ctx A user-supplied pointer. @return BEV_OK if we wrote some data; BEV_NEED_MORE if we can't produce any more output until we get some input; and BEV_ERROR on an error. */ typedef enum bufferevent_filter_result (*bufferevent_filter_cb)( struct evbuffer *src, struct evbuffer *dst, ev_ssize_t dst_limit, enum bufferevent_flush_mode mode, void *ctx); /** Allocate a new filtering bufferevent on top of an existing bufferevent. @param underlying the underlying bufferevent. @param input_filter The filter to apply to data we read from the underlying bufferevent @param output_filter The filer to apply to data we write to the underlying bufferevent @param options A bitfield of bufferevent options. @param free_context A function to use to free the filter context when this bufferevent is freed. @param ctx A context pointer to pass to the filter functions. */ EVENT2_EXPORT_SYMBOL struct bufferevent * bufferevent_filter_new(struct bufferevent *underlying, bufferevent_filter_cb input_filter, bufferevent_filter_cb output_filter, int options, void (*free_context)(void *), void *ctx); /**@}*/ /** Allocate a pair of linked bufferevents. The bufferevents behave as would two bufferevent_sock instances connected to opposite ends of a socketpair(), except that no internal socketpair is allocated. @param base The event base to associate with the socketpair. @param options A set of options for this bufferevent @param pair A pointer to an array to hold the two new bufferevent objects. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int bufferevent_pair_new(struct event_base *base, int options, struct bufferevent *pair[2]); /** Given one bufferevent returned by bufferevent_pair_new(), returns the other one if it still exists. Otherwise returns NULL. */ EVENT2_EXPORT_SYMBOL struct bufferevent *bufferevent_pair_get_partner(struct bufferevent *bev); /** Abstract type used to configure rate-limiting on a bufferevent or a group of bufferevents. */ struct ev_token_bucket_cfg; /** A group of bufferevents which are configured to respect the same rate limit. */ struct bufferevent_rate_limit_group; /** Maximum configurable rate- or burst-limit. */ #define EV_RATE_LIMIT_MAX EV_SSIZE_MAX /** Initialize and return a new object to configure the rate-limiting behavior of bufferevents. @param read_rate The maximum number of bytes to read per tick on average. @param read_burst The maximum number of bytes to read in any single tick. @param write_rate The maximum number of bytes to write per tick on average. @param write_burst The maximum number of bytes to write in any single tick. @param tick_len The length of a single tick. Defaults to one second. Any fractions of a millisecond are ignored. Note that all rate-limits hare are currently best-effort: future versions of Libevent may implement them more tightly. */ EVENT2_EXPORT_SYMBOL struct ev_token_bucket_cfg *ev_token_bucket_cfg_new( size_t read_rate, size_t read_burst, size_t write_rate, size_t write_burst, const struct timeval *tick_len); /** Free all storage held in 'cfg'. Note: 'cfg' is not currently reference-counted; it is not safe to free it until no bufferevent is using it. */ EVENT2_EXPORT_SYMBOL void ev_token_bucket_cfg_free(struct ev_token_bucket_cfg *cfg); /** Set the rate-limit of a the bufferevent 'bev' to the one specified in 'cfg'. If 'cfg' is NULL, disable any per-bufferevent rate-limiting on 'bev'. Note that only some bufferevent types currently respect rate-limiting. They are: socket-based bufferevents (normal and IOCP-based), and SSL-based bufferevents. Return 0 on sucess, -1 on failure. */ EVENT2_EXPORT_SYMBOL int bufferevent_set_rate_limit(struct bufferevent *bev, struct ev_token_bucket_cfg *cfg); /** Create a new rate-limit group for bufferevents. A rate-limit group constrains the maximum number of bytes sent and received, in toto, by all of its bufferevents. @param base An event_base to run any necessary timeouts for the group. Note that all bufferevents in the group do not necessarily need to share this event_base. @param cfg The rate-limit for this group. Note that all rate-limits hare are currently best-effort: future versions of Libevent may implement them more tightly. Note also that only some bufferevent types currently respect rate-limiting. They are: socket-based bufferevents (normal and IOCP-based), and SSL-based bufferevents. */ EVENT2_EXPORT_SYMBOL struct bufferevent_rate_limit_group *bufferevent_rate_limit_group_new( struct event_base *base, const struct ev_token_bucket_cfg *cfg); /** Change the rate-limiting settings for a given rate-limiting group. Return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int bufferevent_rate_limit_group_set_cfg( struct bufferevent_rate_limit_group *, const struct ev_token_bucket_cfg *); /** Change the smallest quantum we're willing to allocate to any single bufferevent in a group for reading or writing at a time. The rationale is that, because of TCP/IP protocol overheads and kernel behavior, if a rate-limiting group is so tight on bandwidth that you're only willing to send 1 byte per tick per bufferevent, you might instead want to batch up the reads and writes so that you send N bytes per 1/N of the bufferevents (chosen at random) each tick, so you still wind up send 1 byte per tick per bufferevent on average, but you don't send so many tiny packets. The default min-share is currently 64 bytes. Returns 0 on success, -1 on faulre. */ EVENT2_EXPORT_SYMBOL int bufferevent_rate_limit_group_set_min_share( struct bufferevent_rate_limit_group *, size_t); /** Free a rate-limiting group. The group must have no members when this function is called. */ EVENT2_EXPORT_SYMBOL void bufferevent_rate_limit_group_free(struct bufferevent_rate_limit_group *); /** Add 'bev' to the list of bufferevents whose aggregate reading and writing is restricted by 'g'. If 'g' is NULL, remove 'bev' from its current group. A bufferevent may belong to no more than one rate-limit group at a time. If 'bev' is already a member of a group, it will be removed from its old group before being added to 'g'. Return 0 on success and -1 on failure. */ EVENT2_EXPORT_SYMBOL int bufferevent_add_to_rate_limit_group(struct bufferevent *bev, struct bufferevent_rate_limit_group *g); /** Remove 'bev' from its current rate-limit group (if any). */ EVENT2_EXPORT_SYMBOL int bufferevent_remove_from_rate_limit_group(struct bufferevent *bev); /** Set the size limit for single read operation. Set to 0 for a reasonable default. Return 0 on success and -1 on failure. */ EVENT2_EXPORT_SYMBOL int bufferevent_set_max_single_read(struct bufferevent *bev, size_t size); /** Set the size limit for single write operation. Set to 0 for a reasonable default. Return 0 on success and -1 on failure. */ EVENT2_EXPORT_SYMBOL int bufferevent_set_max_single_write(struct bufferevent *bev, size_t size); /** Get the current size limit for single read operation. */ EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_get_max_single_read(struct bufferevent *bev); /** Get the current size limit for single write operation. */ EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_get_max_single_write(struct bufferevent *bev); /** @name Rate limit inspection Return the current read or write bucket size for a bufferevent. If it is not configured with a per-bufferevent ratelimit, return EV_SSIZE_MAX. This function does not inspect the group limit, if any. Note that it can return a negative value if the bufferevent has been made to read or write more than its limit. @{ */ EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_get_read_limit(struct bufferevent *bev); EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_get_write_limit(struct bufferevent *bev); /*@}*/ EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_get_max_to_read(struct bufferevent *bev); EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_get_max_to_write(struct bufferevent *bev); EVENT2_EXPORT_SYMBOL const struct ev_token_bucket_cfg *bufferevent_get_token_bucket_cfg(const struct bufferevent * bev); /** @name Group Rate limit inspection Return the read or write bucket size for a bufferevent rate limit group. Note that it can return a negative value if bufferevents in the group have been made to read or write more than their limits. @{ */ EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_rate_limit_group_get_read_limit( struct bufferevent_rate_limit_group *); EVENT2_EXPORT_SYMBOL ev_ssize_t bufferevent_rate_limit_group_get_write_limit( struct bufferevent_rate_limit_group *); /*@}*/ /** @name Rate limit manipulation Subtract a number of bytes from a bufferevent's read or write bucket. The decrement value can be negative, if you want to manually refill the bucket. If the change puts the bucket above or below zero, the bufferevent will resume or suspend reading writing as appropriate. These functions make no change in the buckets for the bufferevent's group, if any. Returns 0 on success, -1 on internal error. @{ */ EVENT2_EXPORT_SYMBOL int bufferevent_decrement_read_limit(struct bufferevent *bev, ev_ssize_t decr); EVENT2_EXPORT_SYMBOL int bufferevent_decrement_write_limit(struct bufferevent *bev, ev_ssize_t decr); /*@}*/ /** @name Group rate limit manipulation Subtract a number of bytes from a bufferevent rate-limiting group's read or write bucket. The decrement value can be negative, if you want to manually refill the bucket. If the change puts the bucket above or below zero, the bufferevents in the group will resume or suspend reading writing as appropriate. Returns 0 on success, -1 on internal error. @{ */ EVENT2_EXPORT_SYMBOL int bufferevent_rate_limit_group_decrement_read( struct bufferevent_rate_limit_group *, ev_ssize_t); EVENT2_EXPORT_SYMBOL int bufferevent_rate_limit_group_decrement_write( struct bufferevent_rate_limit_group *, ev_ssize_t); /*@}*/ /** * Inspect the total bytes read/written on a group. * * Set the variable pointed to by total_read_out to the total number of bytes * ever read on grp, and the variable pointed to by total_written_out to the * total number of bytes ever written on grp. */ EVENT2_EXPORT_SYMBOL void bufferevent_rate_limit_group_get_totals( struct bufferevent_rate_limit_group *grp, ev_uint64_t *total_read_out, ev_uint64_t *total_written_out); /** * Reset the total bytes read/written on a group. * * Reset the number of bytes read or written on grp as given by * bufferevent_rate_limit_group_reset_totals(). */ EVENT2_EXPORT_SYMBOL void bufferevent_rate_limit_group_reset_totals( struct bufferevent_rate_limit_group *grp); #ifdef __cplusplus } #endif #endif /* EVENT2_BUFFEREVENT_H_INCLUDED_ */ PKZfevent2/event_compat.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_EVENT_COMPAT_H_INCLUDED_ #define EVENT2_EVENT_COMPAT_H_INCLUDED_ /** @file event2/event_compat.h Potentially non-threadsafe versions of the functions in event.h: provided only for backwards compatibility. In the oldest versions of Libevent, event_base was not a first-class structure. Instead, there was a single event base that every function manipulated. Later, when separate event bases were added, the old functions that didn't take an event_base argument needed to work by manipulating the "current" event base. This could lead to thread-safety issues, and obscure, hard-to-diagnose bugs. @deprecated All functions in this file are by definition deprecated. */ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /** Initialize the event API. The event API needs to be initialized with event_init() before it can be used. Sets the global current base that gets used for events that have no base associated with them. @deprecated This function is deprecated because it replaces the "current" event_base, and is totally unsafe for multithreaded use. The replacement is event_base_new(). @see event_base_set(), event_base_new() */ EVENT2_EXPORT_SYMBOL struct event_base *event_init(void); /** Loop to process events. Like event_base_dispatch(), but uses the "current" base. @deprecated This function is deprecated because it is easily confused by multiple calls to event_init(), and because it is not safe for multithreaded use. The replacement is event_base_dispatch(). @see event_base_dispatch(), event_init() */ EVENT2_EXPORT_SYMBOL int event_dispatch(void); /** Handle events. This function behaves like event_base_loop(), but uses the "current" base @deprecated This function is deprecated because it uses the event base from the last call to event_init, and is therefore not safe for multithreaded use. The replacement is event_base_loop(). @see event_base_loop(), event_init() */ EVENT2_EXPORT_SYMBOL int event_loop(int); /** Exit the event loop after the specified time. This function behaves like event_base_loopexit(), except that it uses the "current" base. @deprecated This function is deprecated because it uses the event base from the last call to event_init, and is therefore not safe for multithreaded use. The replacement is event_base_loopexit(). @see event_init, event_base_loopexit() */ EVENT2_EXPORT_SYMBOL int event_loopexit(const struct timeval *); /** Abort the active event_loop() immediately. This function behaves like event_base_loopbreakt(), except that it uses the "current" base. @deprecated This function is deprecated because it uses the event base from the last call to event_init, and is therefore not safe for multithreaded use. The replacement is event_base_loopbreak(). @see event_base_loopbreak(), event_init() */ EVENT2_EXPORT_SYMBOL int event_loopbreak(void); /** Schedule a one-time event to occur. @deprecated This function is obsolete, and has been replaced by event_base_once(). Its use is deprecated because it relies on the "current" base configured by event_init(). @see event_base_once() */ EVENT2_EXPORT_SYMBOL int event_once(evutil_socket_t , short, void (*)(evutil_socket_t, short, void *), void *, const struct timeval *); /** Get the kernel event notification mechanism used by Libevent. @deprecated This function is obsolete, and has been replaced by event_base_get_method(). Its use is deprecated because it relies on the "current" base configured by event_init(). @see event_base_get_method() */ EVENT2_EXPORT_SYMBOL const char *event_get_method(void); /** Set the number of different event priorities. @deprecated This function is deprecated because it is easily confused by multiple calls to event_init(), and because it is not safe for multithreaded use. The replacement is event_base_priority_init(). @see event_base_priority_init() */ EVENT2_EXPORT_SYMBOL int event_priority_init(int); /** Prepare an event structure to be added. @deprecated event_set() is not recommended for new code, because it requires a subsequent call to event_base_set() to be safe under most circumstances. Use event_assign() or event_new() instead. */ EVENT2_EXPORT_SYMBOL void event_set(struct event *, evutil_socket_t, short, void (*)(evutil_socket_t, short, void *), void *); #define evtimer_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg)) #define evsignal_set(ev, x, cb, arg) \ event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg)) /** @name timeout_* macros @deprecated These macros are deprecated because their naming is inconsistent with the rest of Libevent. Use the evtimer_* macros instead. @{ */ #define timeout_add(ev, tv) event_add((ev), (tv)) #define timeout_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg)) #define timeout_del(ev) event_del(ev) #define timeout_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) #define timeout_initialized(ev) event_initialized(ev) /**@}*/ /** @name signal_* macros @deprecated These macros are deprecated because their naming is inconsistent with the rest of Libevent. Use the evsignal_* macros instead. @{ */ #define signal_add(ev, tv) event_add((ev), (tv)) #define signal_set(ev, x, cb, arg) \ event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg)) #define signal_del(ev) event_del(ev) #define signal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) #define signal_initialized(ev) event_initialized(ev) /**@}*/ #ifndef EVENT_FD /* These macros are obsolete; use event_get_fd and event_get_signal instead. */ #define EVENT_FD(ev) ((int)event_get_fd(ev)) #define EVENT_SIGNAL(ev) event_get_signal(ev) #endif #ifdef __cplusplus } #endif #endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ PKZ*(7ppevent2/bufferevent_compat.hnu[/* * Copyright (c) 2007-2012 Niels Provos, Nick Mathewson * Copyright (c) 2000-2007 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_ #define EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_ #define evbuffercb bufferevent_data_cb #define everrorcb bufferevent_event_cb /** Create a new bufferevent for an fd. This function is deprecated. Use bufferevent_socket_new and bufferevent_set_callbacks instead. Libevent provides an abstraction on top of the regular event callbacks. This abstraction is called a buffered event. A buffered event provides input and output buffers that get filled and drained automatically. The user of a buffered event no longer deals directly with the I/O, but instead is reading from input and writing to output buffers. Once initialized, the bufferevent structure can be used repeatedly with bufferevent_enable() and bufferevent_disable(). When read enabled the bufferevent will try to read from the file descriptor and call the read callback. The write callback is executed whenever the output buffer is drained below the write low watermark, which is 0 by default. If multiple bases are in use, bufferevent_base_set() must be called before enabling the bufferevent for the first time. @deprecated This function is deprecated because it uses the current event base, and as such can be error prone for multithreaded programs. Use bufferevent_socket_new() instead. @param fd the file descriptor from which data is read and written to. This file descriptor is not allowed to be a pipe(2). @param readcb callback to invoke when there is data to be read, or NULL if no callback is desired @param writecb callback to invoke when the file descriptor is ready for writing, or NULL if no callback is desired @param errorcb callback to invoke when there is an error on the file descriptor @param cbarg an argument that will be supplied to each of the callbacks (readcb, writecb, and errorcb) @return a pointer to a newly allocated bufferevent struct, or NULL if an error occurred @see bufferevent_base_set(), bufferevent_free() */ struct bufferevent *bufferevent_new(evutil_socket_t fd, evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg); /** Set the read and write timeout for a buffered event. @param bufev the bufferevent to be modified @param timeout_read the read timeout @param timeout_write the write timeout */ void bufferevent_settimeout(struct bufferevent *bufev, int timeout_read, int timeout_write); #define EVBUFFER_READ BEV_EVENT_READING #define EVBUFFER_WRITE BEV_EVENT_WRITING #define EVBUFFER_EOF BEV_EVENT_EOF #define EVBUFFER_ERROR BEV_EVENT_ERROR #define EVBUFFER_TIMEOUT BEV_EVENT_TIMEOUT /** macro for getting access to the input buffer of a bufferevent */ #define EVBUFFER_INPUT(x) bufferevent_get_input(x) /** macro for getting access to the output buffer of a bufferevent */ #define EVBUFFER_OUTPUT(x) bufferevent_get_output(x) #endif PKZz22 event2/tag.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_TAG_H_INCLUDED_ #define EVENT2_TAG_H_INCLUDED_ /** @file event2/tag.h Helper functions for reading and writing tagged data onto buffers. */ #include #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include struct evbuffer; /* * Marshaling tagged data - We assume that all tags are inserted in their * numeric order - so that unknown tags will always be higher than the * known ones - and we can just ignore the end of an event buffer. */ EVENT2_EXPORT_SYMBOL void evtag_init(void); /** Unmarshals the header and returns the length of the payload @param evbuf the buffer from which to unmarshal data @param ptag a pointer in which the tag id is being stored @returns -1 on failure or the number of bytes in the remaining payload. */ EVENT2_EXPORT_SYMBOL int evtag_unmarshal_header(struct evbuffer *evbuf, ev_uint32_t *ptag); EVENT2_EXPORT_SYMBOL void evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag, const void *data, ev_uint32_t len); EVENT2_EXPORT_SYMBOL void evtag_marshal_buffer(struct evbuffer *evbuf, ev_uint32_t tag, struct evbuffer *data); /** Encode an integer and store it in an evbuffer. We encode integers by nybbles; the first nibble contains the number of significant nibbles - 1; this allows us to encode up to 64-bit integers. This function is byte-order independent. @param evbuf evbuffer to store the encoded number @param number a 32-bit integer */ EVENT2_EXPORT_SYMBOL void evtag_encode_int(struct evbuffer *evbuf, ev_uint32_t number); EVENT2_EXPORT_SYMBOL void evtag_encode_int64(struct evbuffer *evbuf, ev_uint64_t number); EVENT2_EXPORT_SYMBOL void evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag, ev_uint32_t integer); EVENT2_EXPORT_SYMBOL void evtag_marshal_int64(struct evbuffer *evbuf, ev_uint32_t tag, ev_uint64_t integer); EVENT2_EXPORT_SYMBOL void evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag, const char *string); EVENT2_EXPORT_SYMBOL void evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag, struct timeval *tv); EVENT2_EXPORT_SYMBOL int evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag, struct evbuffer *dst); EVENT2_EXPORT_SYMBOL int evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag); EVENT2_EXPORT_SYMBOL int evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t *plength); EVENT2_EXPORT_SYMBOL int evtag_payload_length(struct evbuffer *evbuf, ev_uint32_t *plength); EVENT2_EXPORT_SYMBOL int evtag_consume(struct evbuffer *evbuf); EVENT2_EXPORT_SYMBOL int evtag_unmarshal_int(struct evbuffer *evbuf, ev_uint32_t need_tag, ev_uint32_t *pinteger); EVENT2_EXPORT_SYMBOL int evtag_unmarshal_int64(struct evbuffer *evbuf, ev_uint32_t need_tag, ev_uint64_t *pinteger); EVENT2_EXPORT_SYMBOL int evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag, void *data, size_t len); EVENT2_EXPORT_SYMBOL int evtag_unmarshal_string(struct evbuffer *evbuf, ev_uint32_t need_tag, char **pstring); EVENT2_EXPORT_SYMBOL int evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag, struct timeval *ptv); #ifdef __cplusplus } #endif #endif /* EVENT2_TAG_H_INCLUDED_ */ PKZ&hh event2/dns.hnu[/* * Copyright (c) 2006-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * The original DNS code is due to Adam Langley with heavy * modifications by Nick Mathewson. Adam put his DNS software in the * public domain. You can find his original copyright below. Please, * aware that the code as part of Libevent is governed by the 3-clause * BSD license above. * * This software is Public Domain. To view a copy of the public domain dedication, * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. * * I ask and expect, but do not require, that all derivative works contain an * attribution similar to: * Parts developed by Adam Langley * * You may wish to replace the word "Parts" with something else depending on * the amount of original code. * * (Derivative works does not include programs which link against, run or include * the source verbatim in their source distributions) */ /** @file event2/dns.h * * Welcome, gentle reader * * Async DNS lookups are really a whole lot harder than they should be, * mostly stemming from the fact that the libc resolver has never been * very good at them. Before you use this library you should see if libc * can do the job for you with the modern async call getaddrinfo_a * (see http://www.imperialviolet.org/page25.html#e498). Otherwise, * please continue. * * The library keeps track of the state of nameservers and will avoid * them when they go down. Otherwise it will round robin between them. * * Quick start guide: * #include "evdns.h" * void callback(int result, char type, int count, int ttl, * void *addresses, void *arg); * evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf"); * evdns_resolve("www.hostname.com", 0, callback, NULL); * * When the lookup is complete the callback function is called. The * first argument will be one of the DNS_ERR_* defines in evdns.h. * Hopefully it will be DNS_ERR_NONE, in which case type will be * DNS_IPv4_A, count will be the number of IP addresses, ttl is the time * which the data can be cached for (in seconds), addresses will point * to an array of uint32_t's and arg will be whatever you passed to * evdns_resolve. * * Searching: * * In order for this library to be a good replacement for glibc's resolver it * supports searching. This involves setting a list of default domains, in * which names will be queried for. The number of dots in the query name * determines the order in which this list is used. * * Searching appears to be a single lookup from the point of view of the API, * although many DNS queries may be generated from a single call to * evdns_resolve. Searching can also drastically slow down the resolution * of names. * * To disable searching: * 1. Never set it up. If you never call evdns_resolv_conf_parse or * evdns_search_add then no searching will occur. * * 2. If you do call evdns_resolv_conf_parse then don't pass * DNS_OPTION_SEARCH (or DNS_OPTIONS_ALL, which implies it). * * 3. When calling evdns_resolve, pass the DNS_QUERY_NO_SEARCH flag. * * The order of searches depends on the number of dots in the name. If the * number is greater than the ndots setting then the names is first tried * globally. Otherwise each search domain is appended in turn. * * The ndots setting can either be set from a resolv.conf, or by calling * evdns_search_ndots_set. * * For example, with ndots set to 1 (the default) and a search domain list of * ["myhome.net"]: * Query: www * Order: www.myhome.net, www. * * Query: www.abc * Order: www.abc., www.abc.myhome.net * * Internals: * * Requests are kept in two queues. The first is the inflight queue. In * this queue requests have an allocated transaction id and nameserver. * They will soon be transmitted if they haven't already been. * * The second is the waiting queue. The size of the inflight ring is * limited and all other requests wait in waiting queue for space. This * bounds the number of concurrent requests so that we don't flood the * nameserver. Several algorithms require a full walk of the inflight * queue and so bounding its size keeps thing going nicely under huge * (many thousands of requests) loads. * * If a nameserver loses too many requests it is considered down and we * try not to use it. After a while we send a probe to that nameserver * (a lookup for google.com) and, if it replies, we consider it working * again. If the nameserver fails a probe we wait longer to try again * with the next probe. */ #ifndef EVENT2_DNS_H_INCLUDED_ #define EVENT2_DNS_H_INCLUDED_ #include #ifdef __cplusplus extern "C" { #endif /* For integer types. */ #include /** Error codes 0-5 are as described in RFC 1035. */ #define DNS_ERR_NONE 0 /** The name server was unable to interpret the query */ #define DNS_ERR_FORMAT 1 /** The name server was unable to process this query due to a problem with the * name server */ #define DNS_ERR_SERVERFAILED 2 /** The domain name does not exist */ #define DNS_ERR_NOTEXIST 3 /** The name server does not support the requested kind of query */ #define DNS_ERR_NOTIMPL 4 /** The name server refuses to reform the specified operation for policy * reasons */ #define DNS_ERR_REFUSED 5 /** The reply was truncated or ill-formatted */ #define DNS_ERR_TRUNCATED 65 /** An unknown error occurred */ #define DNS_ERR_UNKNOWN 66 /** Communication with the server timed out */ #define DNS_ERR_TIMEOUT 67 /** The request was canceled because the DNS subsystem was shut down. */ #define DNS_ERR_SHUTDOWN 68 /** The request was canceled via a call to evdns_cancel_request */ #define DNS_ERR_CANCEL 69 /** There were no answers and no error condition in the DNS packet. * This can happen when you ask for an address that exists, but a record * type that doesn't. */ #define DNS_ERR_NODATA 70 #define DNS_IPv4_A 1 #define DNS_PTR 2 #define DNS_IPv6_AAAA 3 #define DNS_QUERY_NO_SEARCH 1 #define DNS_OPTION_SEARCH 1 #define DNS_OPTION_NAMESERVERS 2 #define DNS_OPTION_MISC 4 #define DNS_OPTION_HOSTSFILE 8 #define DNS_OPTIONS_ALL 15 /* Obsolete name for DNS_QUERY_NO_SEARCH */ #define DNS_NO_SEARCH DNS_QUERY_NO_SEARCH /** * The callback that contains the results from a lookup. * - result is one of the DNS_ERR_* values (DNS_ERR_NONE for success) * - type is either DNS_IPv4_A or DNS_PTR or DNS_IPv6_AAAA * - count contains the number of addresses of form type * - ttl is the number of seconds the resolution may be cached for. * - addresses needs to be cast according to type. It will be an array of * 4-byte sequences for ipv4, or an array of 16-byte sequences for ipv6, * or a nul-terminated string for PTR. */ typedef void (*evdns_callback_type) (int result, char type, int count, int ttl, void *addresses, void *arg); struct evdns_base; struct event_base; /** Flag for evdns_base_new: process resolv.conf. */ #define EVDNS_BASE_INITIALIZE_NAMESERVERS 1 /** Flag for evdns_base_new: Do not prevent the libevent event loop from * exiting when we have no active dns requests. */ #define EVDNS_BASE_DISABLE_WHEN_INACTIVE 0x8000 /** Initialize the asynchronous DNS library. This function initializes support for non-blocking name resolution by calling evdns_resolv_conf_parse() on UNIX and evdns_config_windows_nameservers() on Windows. @param event_base the event base to associate the dns client with @param flags any of EVDNS_BASE_INITIALIZE_NAMESERVERS| EVDNS_BASE_DISABLE_WHEN_INACTIVE @return evdns_base object if successful, or NULL if an error occurred. @see evdns_base_free() */ EVENT2_EXPORT_SYMBOL struct evdns_base * evdns_base_new(struct event_base *event_base, int initialize_nameservers); /** Shut down the asynchronous DNS resolver and terminate all active requests. If the 'fail_requests' option is enabled, all active requests will return an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise, the requests will be silently discarded. @param evdns_base the evdns base to free @param fail_requests if zero, active requests will be aborted; if non-zero, active requests will return DNS_ERR_SHUTDOWN. @see evdns_base_new() */ EVENT2_EXPORT_SYMBOL void evdns_base_free(struct evdns_base *base, int fail_requests); /** Remove all hosts entries that have been loaded into the event_base via evdns_base_load_hosts or via event_base_resolv_conf_parse. @param evdns_base the evdns base to remove outdated host addresses from */ EVENT2_EXPORT_SYMBOL void evdns_base_clear_host_addresses(struct evdns_base *base); /** Convert a DNS error code to a string. @param err the DNS error code @return a string containing an explanation of the error code */ EVENT2_EXPORT_SYMBOL const char *evdns_err_to_string(int err); /** Add a nameserver. The address should be an IPv4 address in network byte order. The type of address is chosen so that it matches in_addr.s_addr. @param base the evdns_base to which to add the name server @param address an IP address in network byte order @return 0 if successful, or -1 if an error occurred @see evdns_base_nameserver_ip_add() */ EVENT2_EXPORT_SYMBOL int evdns_base_nameserver_add(struct evdns_base *base, unsigned long int address); /** Get the number of configured nameservers. This returns the number of configured nameservers (not necessarily the number of running nameservers). This is useful for double-checking whether our calls to the various nameserver configuration functions have been successful. @param base the evdns_base to which to apply this operation @return the number of configured nameservers @see evdns_base_nameserver_add() */ EVENT2_EXPORT_SYMBOL int evdns_base_count_nameservers(struct evdns_base *base); /** Remove all configured nameservers, and suspend all pending resolves. Resolves will not necessarily be re-attempted until evdns_base_resume() is called. @param base the evdns_base to which to apply this operation @return 0 if successful, or -1 if an error occurred @see evdns_base_resume() */ EVENT2_EXPORT_SYMBOL int evdns_base_clear_nameservers_and_suspend(struct evdns_base *base); /** Resume normal operation and continue any suspended resolve requests. Re-attempt resolves left in limbo after an earlier call to evdns_base_clear_nameservers_and_suspend(). @param base the evdns_base to which to apply this operation @return 0 if successful, or -1 if an error occurred @see evdns_base_clear_nameservers_and_suspend() */ EVENT2_EXPORT_SYMBOL int evdns_base_resume(struct evdns_base *base); /** Add a nameserver by string address. This function parses a n IPv4 or IPv6 address from a string and adds it as a nameserver. It supports the following formats: - [IPv6Address]:port - [IPv6Address] - IPv6Address - IPv4Address:port - IPv4Address If no port is specified, it defaults to 53. @param base the evdns_base to which to apply this operation @return 0 if successful, or -1 if an error occurred @see evdns_base_nameserver_add() */ EVENT2_EXPORT_SYMBOL int evdns_base_nameserver_ip_add(struct evdns_base *base, const char *ip_as_string); /** Add a nameserver by sockaddr. **/ EVENT2_EXPORT_SYMBOL int evdns_base_nameserver_sockaddr_add(struct evdns_base *base, const struct sockaddr *sa, ev_socklen_t len, unsigned flags); struct evdns_request; /** Lookup an A record for a given name. @param base the evdns_base to which to apply this operation @param name a DNS hostname @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return an evdns_request object if successful, or NULL if an error occurred. @see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6(), evdns_cancel_request() */ EVENT2_EXPORT_SYMBOL struct evdns_request *evdns_base_resolve_ipv4(struct evdns_base *base, const char *name, int flags, evdns_callback_type callback, void *ptr); /** Lookup an AAAA record for a given name. @param base the evdns_base to which to apply this operation @param name a DNS hostname @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return an evdns_request object if successful, or NULL if an error occurred. @see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6(), evdns_cancel_request() */ EVENT2_EXPORT_SYMBOL struct evdns_request *evdns_base_resolve_ipv6(struct evdns_base *base, const char *name, int flags, evdns_callback_type callback, void *ptr); struct in_addr; struct in6_addr; /** Lookup a PTR record for a given IP address. @param base the evdns_base to which to apply this operation @param in an IPv4 address @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return an evdns_request object if successful, or NULL if an error occurred. @see evdns_resolve_reverse_ipv6(), evdns_cancel_request() */ EVENT2_EXPORT_SYMBOL struct evdns_request *evdns_base_resolve_reverse(struct evdns_base *base, const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr); /** Lookup a PTR record for a given IPv6 address. @param base the evdns_base to which to apply this operation @param in an IPv6 address @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return an evdns_request object if successful, or NULL if an error occurred. @see evdns_resolve_reverse_ipv6(), evdns_cancel_request() */ EVENT2_EXPORT_SYMBOL struct evdns_request *evdns_base_resolve_reverse_ipv6(struct evdns_base *base, const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr); /** Cancels a pending DNS resolution request. @param base the evdns_base that was used to make the request @param req the evdns_request that was returned by calling a resolve function @see evdns_base_resolve_ipv4(), evdns_base_resolve_ipv6, evdns_base_resolve_reverse */ EVENT2_EXPORT_SYMBOL void evdns_cancel_request(struct evdns_base *base, struct evdns_request *req); /** Set the value of a configuration option. The currently available configuration options are: ndots, timeout, max-timeouts, max-inflight, attempts, randomize-case, bind-to, initial-probe-timeout, getaddrinfo-allow-skew. In versions before Libevent 2.0.3-alpha, the option name needed to end with a colon. @param base the evdns_base to which to apply this operation @param option the name of the configuration option to be modified @param val the value to be set @return 0 if successful, or -1 if an error occurred */ EVENT2_EXPORT_SYMBOL int evdns_base_set_option(struct evdns_base *base, const char *option, const char *val); /** Parse a resolv.conf file. The 'flags' parameter determines what information is parsed from the resolv.conf file. See the man page for resolv.conf for the format of this file. The following directives are not parsed from the file: sortlist, rotate, no-check-names, inet6, debug. If this function encounters an error, the possible return values are: 1 = failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of memory, 5 = short read from file, 6 = no nameservers listed in the file @param base the evdns_base to which to apply this operation @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC| DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL @param filename the path to the resolv.conf file @return 0 if successful, or various positive error codes if an error occurred (see above) @see resolv.conf(3), evdns_config_windows_nameservers() */ EVENT2_EXPORT_SYMBOL int evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char *const filename); /** Load an /etc/hosts-style file from 'hosts_fname' into 'base'. If hosts_fname is NULL, add minimal entries for localhost, and nothing else. Note that only evdns_getaddrinfo uses the /etc/hosts entries. This function does not replace previously loaded hosts entries; to do that, call evdns_base_clear_host_addresses first. Return 0 on success, negative on failure. */ EVENT2_EXPORT_SYMBOL int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname); /** Obtain nameserver information using the Windows API. Attempt to configure a set of nameservers based on platform settings on a win32 host. Preferentially tries to use GetNetworkParams; if that fails, looks in the registry. @return 0 if successful, or -1 if an error occurred @see evdns_resolv_conf_parse() */ #ifdef _WIN32 EVENT2_EXPORT_SYMBOL int evdns_base_config_windows_nameservers(struct evdns_base *); #define EVDNS_BASE_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED #endif /** Clear the list of search domains. */ EVENT2_EXPORT_SYMBOL void evdns_base_search_clear(struct evdns_base *base); /** Add a domain to the list of search domains @param domain the domain to be added to the search list */ EVENT2_EXPORT_SYMBOL void evdns_base_search_add(struct evdns_base *base, const char *domain); /** Set the 'ndots' parameter for searches. Sets the number of dots which, when found in a name, causes the first query to be without any search domain. @param ndots the new ndots parameter */ EVENT2_EXPORT_SYMBOL void evdns_base_search_ndots_set(struct evdns_base *base, const int ndots); /** A callback that is invoked when a log message is generated @param is_warning indicates if the log message is a 'warning' @param msg the content of the log message */ typedef void (*evdns_debug_log_fn_type)(int is_warning, const char *msg); /** Set the callback function to handle DNS log messages. If this callback is not set, evdns log messages are handled with the regular Libevent logging system. @param fn the callback to be invoked when a log message is generated */ EVENT2_EXPORT_SYMBOL void evdns_set_log_fn(evdns_debug_log_fn_type fn); /** Set a callback that will be invoked to generate transaction IDs. By default, we pick transaction IDs based on the current clock time, which is bad for security. @param fn the new callback, or NULL to use the default. NOTE: This function has no effect in Libevent 2.0.4-alpha and later, since Libevent now provides its own secure RNG. */ EVENT2_EXPORT_SYMBOL void evdns_set_transaction_id_fn(ev_uint16_t (*fn)(void)); /** Set a callback used to generate random bytes. By default, we use the same function as passed to evdns_set_transaction_id_fn to generate bytes two at a time. If a function is provided here, it's also used to generate transaction IDs. NOTE: This function has no effect in Libevent 2.0.4-alpha and later, since Libevent now provides its own secure RNG. */ EVENT2_EXPORT_SYMBOL void evdns_set_random_bytes_fn(void (*fn)(char *, size_t)); /* * Functions used to implement a DNS server. */ struct evdns_server_request; struct evdns_server_question; /** A callback to implement a DNS server. The callback function receives a DNS request. It should then optionally add a number of answers to the reply using the evdns_server_request_add_*_reply functions, before calling either evdns_server_request_respond to send the reply back, or evdns_server_request_drop to decline to answer the request. @param req A newly received request @param user_data A pointer that was passed to evdns_add_server_port_with_base(). */ typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, void *); #define EVDNS_ANSWER_SECTION 0 #define EVDNS_AUTHORITY_SECTION 1 #define EVDNS_ADDITIONAL_SECTION 2 #define EVDNS_TYPE_A 1 #define EVDNS_TYPE_NS 2 #define EVDNS_TYPE_CNAME 5 #define EVDNS_TYPE_SOA 6 #define EVDNS_TYPE_PTR 12 #define EVDNS_TYPE_MX 15 #define EVDNS_TYPE_TXT 16 #define EVDNS_TYPE_AAAA 28 #define EVDNS_QTYPE_AXFR 252 #define EVDNS_QTYPE_ALL 255 #define EVDNS_CLASS_INET 1 /* flags that can be set in answers; as part of the err parameter */ #define EVDNS_FLAGS_AA 0x400 #define EVDNS_FLAGS_RD 0x080 /** Create a new DNS server port. @param base The event base to handle events for the server port. @param socket A UDP socket to accept DNS requests. @param flags Always 0 for now. @param callback A function to invoke whenever we get a DNS request on the socket. @param user_data Data to pass to the callback. @return an evdns_server_port structure for this server port. */ EVENT2_EXPORT_SYMBOL struct evdns_server_port *evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data); /** Close down a DNS server port, and free associated structures. */ EVENT2_EXPORT_SYMBOL void evdns_close_server_port(struct evdns_server_port *port); /** Sets some flags in a reply we're building. Allows setting of the AA or RD flags */ EVENT2_EXPORT_SYMBOL void evdns_server_request_set_flags(struct evdns_server_request *req, int flags); /* Functions to add an answer to an in-progress DNS reply. */ EVENT2_EXPORT_SYMBOL int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int dns_class, int ttl, int datalen, int is_name, const char *data); EVENT2_EXPORT_SYMBOL int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl); EVENT2_EXPORT_SYMBOL int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl); EVENT2_EXPORT_SYMBOL int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl); EVENT2_EXPORT_SYMBOL int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl); /** Send back a response to a DNS request, and free the request structure. */ EVENT2_EXPORT_SYMBOL int evdns_server_request_respond(struct evdns_server_request *req, int err); /** Free a DNS request without sending back a reply. */ EVENT2_EXPORT_SYMBOL int evdns_server_request_drop(struct evdns_server_request *req); struct sockaddr; /** Get the address that made a DNS request. */ EVENT2_EXPORT_SYMBOL int evdns_server_request_get_requesting_addr(struct evdns_server_request *req, struct sockaddr *sa, int addr_len); /** Callback for evdns_getaddrinfo. */ typedef void (*evdns_getaddrinfo_cb)(int result, struct evutil_addrinfo *res, void *arg); struct evdns_base; struct evdns_getaddrinfo_request; /** Make a non-blocking getaddrinfo request using the dns_base in 'dns_base'. * * If we can answer the request immediately (with an error or not!), then we * invoke cb immediately and return NULL. Otherwise we return * an evdns_getaddrinfo_request and invoke cb later. * * When the callback is invoked, we pass as its first argument the error code * that getaddrinfo would return (or 0 for no error). As its second argument, * we pass the evutil_addrinfo structures we found (or NULL on error). We * pass 'arg' as the third argument. * * Limitations: * * - The AI_V4MAPPED and AI_ALL flags are not currently implemented. * - For ai_socktype, we only handle SOCKTYPE_STREAM, SOCKTYPE_UDP, and 0. * - For ai_protocol, we only handle IPPROTO_TCP, IPPROTO_UDP, and 0. */ EVENT2_EXPORT_SYMBOL struct evdns_getaddrinfo_request *evdns_getaddrinfo( struct evdns_base *dns_base, const char *nodename, const char *servname, const struct evutil_addrinfo *hints_in, evdns_getaddrinfo_cb cb, void *arg); /* Cancel an in-progress evdns_getaddrinfo. This MUST NOT be called after the * getaddrinfo's callback has been invoked. The resolves will be canceled, * and the callback will be invoked with the error EVUTIL_EAI_CANCEL. */ EVENT2_EXPORT_SYMBOL void evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *req); /** Retrieve the address of the 'idx'th configured nameserver. @param base The evdns_base to examine. @param idx The index of the nameserver to get the address of. @param sa A location to receive the server's address. @param len The number of bytes available at sa. @return the number of bytes written into sa on success. On failure, returns -1 if idx is greater than the number of configured nameservers, or a value greater than 'len' if len was not high enough. */ EVENT2_EXPORT_SYMBOL int evdns_base_get_nameserver_addr(struct evdns_base *base, int idx, struct sockaddr *sa, ev_socklen_t len); #ifdef __cplusplus } #endif #endif /* !EVENT2_DNS_H_INCLUDED_ */ PKZDVevent2/listener.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_LISTENER_H_INCLUDED_ #define EVENT2_LISTENER_H_INCLUDED_ #include #ifdef __cplusplus extern "C" { #endif #include struct sockaddr; struct evconnlistener; /** A callback that we invoke when a listener has a new connection. @param listener The evconnlistener @param fd The new file descriptor @param addr The source address of the connection @param socklen The length of addr @param user_arg the pointer passed to evconnlistener_new() */ typedef void (*evconnlistener_cb)(struct evconnlistener *, evutil_socket_t, struct sockaddr *, int socklen, void *); /** A callback that we invoke when a listener encounters a non-retriable error. @param listener The evconnlistener @param user_arg the pointer passed to evconnlistener_new() */ typedef void (*evconnlistener_errorcb)(struct evconnlistener *, void *); /** Flag: Indicates that we should not make incoming sockets nonblocking * before passing them to the callback. */ #define LEV_OPT_LEAVE_SOCKETS_BLOCKING (1u<<0) /** Flag: Indicates that freeing the listener should close the underlying * socket. */ #define LEV_OPT_CLOSE_ON_FREE (1u<<1) /** Flag: Indicates that we should set the close-on-exec flag, if possible */ #define LEV_OPT_CLOSE_ON_EXEC (1u<<2) /** Flag: Indicates that we should disable the timeout (if any) between when * this socket is closed and when we can listen again on the same port. */ #define LEV_OPT_REUSEABLE (1u<<3) /** Flag: Indicates that the listener should be locked so it's safe to use * from multiple threadcs at once. */ #define LEV_OPT_THREADSAFE (1u<<4) /** Flag: Indicates that the listener should be created in disabled * state. Use evconnlistener_enable() to enable it later. */ #define LEV_OPT_DISABLED (1u<<5) /** Flag: Indicates that the listener should defer accept() until data is * available, if possible. Ignored on platforms that do not support this. * * This option can help performance for protocols where the client transmits * immediately after connecting. Do not use this option if your protocol * _doesn't_ start out with the client transmitting data, since in that case * this option will sometimes cause the kernel to never tell you about the * connection. * * This option is only supported by evconnlistener_new_bind(): it can't * work with evconnlistener_new_fd(), since the listener needs to be told * to use the option before it is actually bound. */ #define LEV_OPT_DEFERRED_ACCEPT (1u<<6) /** Flag: Indicates that we ask to allow multiple servers (processes or * threads) to bind to the same port if they each set the option. * * SO_REUSEPORT is what most people would expect SO_REUSEADDR to be, however * SO_REUSEPORT does not imply SO_REUSEADDR. * * This is only available on Linux and kernel 3.9+ */ #define LEV_OPT_REUSEABLE_PORT (1u<<7) /** Allocate a new evconnlistener object to listen for incoming TCP connections on a given file descriptor. @param base The event base to associate the listener with. @param cb A callback to be invoked when a new connection arrives. If the callback is NULL, the listener will be treated as disabled until the callback is set. @param ptr A user-supplied pointer to give to the callback. @param flags Any number of LEV_OPT_* flags @param backlog Passed to the listen() call to determine the length of the acceptable connection backlog. Set to -1 for a reasonable default. Set to 0 if the socket is already listening. @param fd The file descriptor to listen on. It must be a nonblocking file descriptor, and it should already be bound to an appropriate port and address. */ EVENT2_EXPORT_SYMBOL struct evconnlistener *evconnlistener_new(struct event_base *base, evconnlistener_cb cb, void *ptr, unsigned flags, int backlog, evutil_socket_t fd); /** Allocate a new evconnlistener object to listen for incoming TCP connections on a given address. @param base The event base to associate the listener with. @param cb A callback to be invoked when a new connection arrives. If the callback is NULL, the listener will be treated as disabled until the callback is set. @param ptr A user-supplied pointer to give to the callback. @param flags Any number of LEV_OPT_* flags @param backlog Passed to the listen() call to determine the length of the acceptable connection backlog. Set to -1 for a reasonable default. @param addr The address to listen for connections on. @param socklen The length of the address. */ EVENT2_EXPORT_SYMBOL struct evconnlistener *evconnlistener_new_bind(struct event_base *base, evconnlistener_cb cb, void *ptr, unsigned flags, int backlog, const struct sockaddr *sa, int socklen); /** Disable and deallocate an evconnlistener. */ EVENT2_EXPORT_SYMBOL void evconnlistener_free(struct evconnlistener *lev); /** Re-enable an evconnlistener that has been disabled. */ EVENT2_EXPORT_SYMBOL int evconnlistener_enable(struct evconnlistener *lev); /** Stop listening for connections on an evconnlistener. */ EVENT2_EXPORT_SYMBOL int evconnlistener_disable(struct evconnlistener *lev); /** Return an evconnlistener's associated event_base. */ EVENT2_EXPORT_SYMBOL struct event_base *evconnlistener_get_base(struct evconnlistener *lev); /** Return the socket that an evconnlistner is listening on. */ EVENT2_EXPORT_SYMBOL evutil_socket_t evconnlistener_get_fd(struct evconnlistener *lev); /** Change the callback on the listener to cb and its user_data to arg. */ EVENT2_EXPORT_SYMBOL void evconnlistener_set_cb(struct evconnlistener *lev, evconnlistener_cb cb, void *arg); /** Set an evconnlistener's error callback. */ EVENT2_EXPORT_SYMBOL void evconnlistener_set_error_cb(struct evconnlistener *lev, evconnlistener_errorcb errorcb); #ifdef __cplusplus } #endif #endif PKZ&&event2/thread.hnu[/* * Copyright (c) 2008-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_THREAD_H_INCLUDED_ #define EVENT2_THREAD_H_INCLUDED_ /** @file event2/thread.h Functions for multi-threaded applications using Libevent. When using a multi-threaded application in which multiple threads add and delete events from a single event base, Libevent needs to lock its data structures. Like the memory-management function hooks, all of the threading functions _must_ be set up before an event_base is created if you want the base to use them. Most programs will either be using Windows threads or Posix threads. You can configure Libevent to use one of these event_use_windows_threads() or event_use_pthreads() respectively. If you're using another threading library, you'll need to configure threading functions manually using evthread_set_lock_callbacks() and evthread_set_condition_callbacks(). */ #include #ifdef __cplusplus extern "C" { #endif #include /** @name Flags passed to lock functions @{ */ /** A flag passed to a locking callback when the lock was allocated as a * read-write lock, and we want to acquire or release the lock for writing. */ #define EVTHREAD_WRITE 0x04 /** A flag passed to a locking callback when the lock was allocated as a * read-write lock, and we want to acquire or release the lock for reading. */ #define EVTHREAD_READ 0x08 /** A flag passed to a locking callback when we don't want to block waiting * for the lock; if we can't get the lock immediately, we will instead * return nonzero from the locking callback. */ #define EVTHREAD_TRY 0x10 /**@}*/ #if !defined(EVENT__DISABLE_THREAD_SUPPORT) || defined(EVENT_IN_DOXYGEN_) #define EVTHREAD_LOCK_API_VERSION 1 /** @name Types of locks @{*/ /** A recursive lock is one that can be acquired multiple times at once by the * same thread. No other process can allocate the lock until the thread that * has been holding it has unlocked it as many times as it locked it. */ #define EVTHREAD_LOCKTYPE_RECURSIVE 1 /* A read-write lock is one that allows multiple simultaneous readers, but * where any one writer excludes all other writers and readers. */ #define EVTHREAD_LOCKTYPE_READWRITE 2 /**@}*/ /** This structure describes the interface a threading library uses for * locking. It's used to tell evthread_set_lock_callbacks() how to use * locking on this platform. */ struct evthread_lock_callbacks { /** The current version of the locking API. Set this to * EVTHREAD_LOCK_API_VERSION */ int lock_api_version; /** Which kinds of locks does this version of the locking API * support? A bitfield of EVTHREAD_LOCKTYPE_RECURSIVE and * EVTHREAD_LOCKTYPE_READWRITE. * * (Note that RECURSIVE locks are currently mandatory, and * READWRITE locks are not currently used.) **/ unsigned supported_locktypes; /** Function to allocate and initialize new lock of type 'locktype'. * Returns NULL on failure. */ void *(*alloc)(unsigned locktype); /** Funtion to release all storage held in 'lock', which was created * with type 'locktype'. */ void (*free)(void *lock, unsigned locktype); /** Acquire an already-allocated lock at 'lock' with mode 'mode'. * Returns 0 on success, and nonzero on failure. */ int (*lock)(unsigned mode, void *lock); /** Release a lock at 'lock' using mode 'mode'. Returns 0 on success, * and nonzero on failure. */ int (*unlock)(unsigned mode, void *lock); }; /** Sets a group of functions that Libevent should use for locking. * For full information on the required callback API, see the * documentation for the individual members of evthread_lock_callbacks. * * Note that if you're using Windows or the Pthreads threading library, you * probably shouldn't call this function; instead, use * evthread_use_windows_threads() or evthread_use_posix_threads() if you can. */ EVENT2_EXPORT_SYMBOL int evthread_set_lock_callbacks(const struct evthread_lock_callbacks *); #define EVTHREAD_CONDITION_API_VERSION 1 struct timeval; /** This structure describes the interface a threading library uses for * condition variables. It's used to tell evthread_set_condition_callbacks * how to use locking on this platform. */ struct evthread_condition_callbacks { /** The current version of the conditions API. Set this to * EVTHREAD_CONDITION_API_VERSION */ int condition_api_version; /** Function to allocate and initialize a new condition variable. * Returns the condition variable on success, and NULL on failure. * The 'condtype' argument will be 0 with this API version. */ void *(*alloc_condition)(unsigned condtype); /** Function to free a condition variable. */ void (*free_condition)(void *cond); /** Function to signal a condition variable. If 'broadcast' is 1, all * threads waiting on 'cond' should be woken; otherwise, only on one * thread is worken. Should return 0 on success, -1 on failure. * This function will only be called while holding the associated * lock for the condition. */ int (*signal_condition)(void *cond, int broadcast); /** Function to wait for a condition variable. The lock 'lock' * will be held when this function is called; should be released * while waiting for the condition to be come signalled, and * should be held again when this function returns. * If timeout is provided, it is interval of seconds to wait for * the event to become signalled; if it is NULL, the function * should wait indefinitely. * * The function should return -1 on error; 0 if the condition * was signalled, or 1 on a timeout. */ int (*wait_condition)(void *cond, void *lock, const struct timeval *timeout); }; /** Sets a group of functions that Libevent should use for condition variables. * For full information on the required callback API, see the * documentation for the individual members of evthread_condition_callbacks. * * Note that if you're using Windows or the Pthreads threading library, you * probably shouldn't call this function; instead, use * evthread_use_windows_threads() or evthread_use_pthreads() if you can. */ EVENT2_EXPORT_SYMBOL int evthread_set_condition_callbacks( const struct evthread_condition_callbacks *); /** Sets the function for determining the thread id. @param base the event base for which to set the id function @param id_fn the identify function Libevent should invoke to determine the identity of a thread. */ EVENT2_EXPORT_SYMBOL void evthread_set_id_callback( unsigned long (*id_fn)(void)); #if (defined(_WIN32) && !defined(EVENT__DISABLE_THREAD_SUPPORT)) || defined(EVENT_IN_DOXYGEN_) /** Sets up Libevent for use with Windows builtin locking and thread ID functions. Unavailable if Libevent is not built for Windows. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evthread_use_windows_threads(void); /** Defined if Libevent was built with support for evthread_use_windows_threads() */ #define EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED 1 #endif #if defined(EVENT__HAVE_PTHREADS) || defined(EVENT_IN_DOXYGEN_) /** Sets up Libevent for use with Pthreads locking and thread ID functions. Unavailable if Libevent is not build for use with pthreads. Requires libraries to link against Libevent_pthreads as well as Libevent. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evthread_use_pthreads(void); /** Defined if Libevent was built with support for evthread_use_pthreads() */ #define EVTHREAD_USE_PTHREADS_IMPLEMENTED 1 #endif /** Enable debugging wrappers around the current lock callbacks. If Libevent * makes one of several common locking errors, exit with an assertion failure. * * If you're going to call this function, you must do so before any locks are * allocated. **/ EVENT2_EXPORT_SYMBOL void evthread_enable_lock_debugging(void); /* Old (misspelled) version: This is deprecated; use * evthread_enable_log_debugging instead. */ EVENT2_EXPORT_SYMBOL void evthread_enable_lock_debuging(void); #endif /* EVENT__DISABLE_THREAD_SUPPORT */ struct event_base; /** Make sure it's safe to tell an event base to wake up from another thread or a signal handler. You shouldn't need to call this by hand; configuring the base with thread support should be necessary and sufficient. @return 0 on success, -1 on failure. */ EVENT2_EXPORT_SYMBOL int evthread_make_base_notifiable(struct event_base *base); #ifdef __cplusplus } #endif #endif /* EVENT2_THREAD_H_INCLUDED_ */ PKZQ$ $ event2/dns_struct.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_DNS_STRUCT_H_INCLUDED_ #define EVENT2_DNS_STRUCT_H_INCLUDED_ /** @file event2/dns_struct.h Data structures for dns. Using these structures may hurt forward compatibility with later versions of Libevent: be careful! */ #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /* * Structures used to implement a DNS server. */ struct evdns_server_request { int flags; int nquestions; struct evdns_server_question **questions; }; struct evdns_server_question { int type; #ifdef __cplusplus int dns_question_class; #else /* You should refer to this field as "dns_question_class". The * name "class" works in C for backward compatibility, and will be * removed in a future version. (1.5 or later). */ int class; #define dns_question_class class #endif char name[1]; }; #ifdef __cplusplus } #endif #endif /* EVENT2_DNS_STRUCT_H_INCLUDED_ */ PKZ;k!R!R event2/rpc.hnu[/* * Copyright (c) 2006-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_RPC_H_INCLUDED_ #define EVENT2_RPC_H_INCLUDED_ #ifdef __cplusplus extern "C" { #endif /** @file rpc.h * * This header files provides basic support for an RPC server and client. * * To support RPCs in a server, every supported RPC command needs to be * defined and registered. * * EVRPC_HEADER(SendCommand, Request, Reply); * * SendCommand is the name of the RPC command. * Request is the name of a structure generated by event_rpcgen.py. * It contains all parameters relating to the SendCommand RPC. The * server needs to fill in the Reply structure. * Reply is the name of a structure generated by event_rpcgen.py. It * contains the answer to the RPC. * * To register an RPC with an HTTP server, you need to first create an RPC * base with: * * struct evrpc_base *base = evrpc_init(http); * * A specific RPC can then be registered with * * EVRPC_REGISTER(base, SendCommand, Request, Reply, FunctionCB, arg); * * when the server receives an appropriately formatted RPC, the user callback * is invoked. The callback needs to fill in the reply structure. * * void FunctionCB(EVRPC_STRUCT(SendCommand)* rpc, void *arg); * * To send the reply, call EVRPC_REQUEST_DONE(rpc); * * See the regression test for an example. */ /** Determines if the member has been set in the message @param msg the message to inspect @param member the member variable to test for presences @return 1 if it's present or 0 otherwise. */ #define EVTAG_HAS(msg, member) \ ((msg)->member##_set == 1) #ifndef EVENT2_RPC_COMPAT_H_INCLUDED_ /** Assigns a value to the member in the message. @param msg the message to which to assign a value @param member the name of the member variable @param value the value to assign */ #define EVTAG_ASSIGN(msg, member, value) \ (*(msg)->base->member##_assign)((msg), (value)) /** Assigns a value to the member in the message. @param msg the message to which to assign a value @param member the name of the member variable @param value the value to assign @param len the length of the value */ #define EVTAG_ASSIGN_WITH_LEN(msg, member, value, len) \ (*(msg)->base->member##_assign)((msg), (value), (len)) /** Returns the value for a member. @param msg the message from which to get the value @param member the name of the member variable @param pvalue a pointer to the variable to hold the value @return 0 on success, -1 otherwise. */ #define EVTAG_GET(msg, member, pvalue) \ (*(msg)->base->member##_get)((msg), (pvalue)) /** Returns the value for a member. @param msg the message from which to get the value @param member the name of the member variable @param pvalue a pointer to the variable to hold the value @param plen a pointer to the length of the value @return 0 on success, -1 otherwise. */ #define EVTAG_GET_WITH_LEN(msg, member, pvalue, plen) \ (*(msg)->base->member##_get)((msg), (pvalue), (plen)) #endif /* EVENT2_RPC_COMPAT_H_INCLUDED_ */ /** Adds a value to an array. */ #define EVTAG_ARRAY_ADD_VALUE(msg, member, value) \ (*(msg)->base->member##_add)((msg), (value)) /** Allocates a new entry in the array and returns it. */ #define EVTAG_ARRAY_ADD(msg, member) \ (*(msg)->base->member##_add)(msg) /** Gets a variable at the specified offset from the array. */ #define EVTAG_ARRAY_GET(msg, member, offset, pvalue) \ (*(msg)->base->member##_get)((msg), (offset), (pvalue)) /** Returns the number of entries in the array. */ #define EVTAG_ARRAY_LEN(msg, member) ((msg)->member##_length) struct evbuffer; struct event_base; struct evrpc_req_generic; struct evrpc_request_wrapper; struct evrpc; /** The type of a specific RPC Message * * @param rpcname the name of the RPC message */ #define EVRPC_STRUCT(rpcname) struct evrpc_req__##rpcname struct evhttp_request; struct evrpc_status; struct evrpc_hook_meta; /** Creates the definitions and prototypes for an RPC * * You need to use EVRPC_HEADER to create structures and function prototypes * needed by the server and client implementation. The structures have to be * defined in an .rpc file and converted to source code via event_rpcgen.py * * @param rpcname the name of the RPC * @param reqstruct the name of the RPC request structure * @param replystruct the name of the RPC reply structure * @see EVRPC_GENERATE() */ #define EVRPC_HEADER(rpcname, reqstruct, rplystruct) \ EVRPC_STRUCT(rpcname) { \ struct evrpc_hook_meta *hook_meta; \ struct reqstruct* request; \ struct rplystruct* reply; \ struct evrpc* rpc; \ struct evhttp_request* http_req; \ struct evbuffer* rpc_data; \ }; \ int evrpc_send_request_##rpcname(struct evrpc_pool *, \ struct reqstruct *, struct rplystruct *, \ void (*)(struct evrpc_status *, \ struct reqstruct *, struct rplystruct *, void *cbarg), \ void *); struct evrpc_pool; /** use EVRPC_GENERATE instead */ struct evrpc_request_wrapper *evrpc_make_request_ctx( struct evrpc_pool *pool, void *request, void *reply, const char *rpcname, void (*req_marshal)(struct evbuffer*, void *), void (*rpl_clear)(void *), int (*rpl_unmarshal)(void *, struct evbuffer *), void (*cb)(struct evrpc_status *, void *, void *, void *), void *cbarg); /** Creates a context structure that contains rpc specific information. * * EVRPC_MAKE_CTX is used to populate a RPC specific context that * contains information about marshaling the RPC data types. * * @param rpcname the name of the RPC * @param reqstruct the name of the RPC request structure * @param replystruct the name of the RPC reply structure * @param pool the evrpc_pool over which to make the request * @param request a pointer to the RPC request structure object * @param reply a pointer to the RPC reply structure object * @param cb the callback function to call when the RPC has completed * @param cbarg the argument to supply to the callback */ #define EVRPC_MAKE_CTX(rpcname, reqstruct, rplystruct, \ pool, request, reply, cb, cbarg) \ evrpc_make_request_ctx(pool, request, reply, \ #rpcname, \ (void (*)(struct evbuffer *, void *))reqstruct##_marshal, \ (void (*)(void *))rplystruct##_clear, \ (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal, \ (void (*)(struct evrpc_status *, void *, void *, void *))cb, \ cbarg) /** Generates the code for receiving and sending an RPC message * * EVRPC_GENERATE is used to create the code corresponding to sending * and receiving a particular RPC message * * @param rpcname the name of the RPC * @param reqstruct the name of the RPC request structure * @param replystruct the name of the RPC reply structure * @see EVRPC_HEADER() */ #define EVRPC_GENERATE(rpcname, reqstruct, rplystruct) \ int evrpc_send_request_##rpcname(struct evrpc_pool *pool, \ struct reqstruct *request, struct rplystruct *reply, \ void (*cb)(struct evrpc_status *, \ struct reqstruct *, struct rplystruct *, void *cbarg), \ void *cbarg) { \ return evrpc_send_request_generic(pool, request, reply, \ (void (*)(struct evrpc_status *, void *, void *, void *))cb, \ cbarg, \ #rpcname, \ (void (*)(struct evbuffer *, void *))reqstruct##_marshal, \ (void (*)(void *))rplystruct##_clear, \ (int (*)(void *, struct evbuffer *))rplystruct##_unmarshal); \ } /** Provides access to the HTTP request object underlying an RPC * * Access to the underlying http object; can be used to look at headers or * for getting the remote ip address * * @param rpc_req the rpc request structure provided to the server callback * @return an struct evhttp_request object that can be inspected for * HTTP headers or sender information. */ #define EVRPC_REQUEST_HTTP(rpc_req) (rpc_req)->http_req /** completes the server response to an rpc request */ void evrpc_request_done(struct evrpc_req_generic *req); /** accessors for request and reply */ void *evrpc_get_request(struct evrpc_req_generic *req); void *evrpc_get_reply(struct evrpc_req_generic *req); /** Creates the reply to an RPC request * * EVRPC_REQUEST_DONE is used to answer a request; the reply is expected * to have been filled in. The request and reply pointers become invalid * after this call has finished. * * @param rpc_req the rpc request structure provided to the server callback */ #define EVRPC_REQUEST_DONE(rpc_req) do { \ struct evrpc_req_generic *req_ = (struct evrpc_req_generic *)(rpc_req); \ evrpc_request_done(req_); \ } while (0) struct evrpc_base; struct evhttp; /* functions to start up the rpc system */ /** Creates a new rpc base from which RPC requests can be received * * @param server a pointer to an existing HTTP server * @return a newly allocated evrpc_base struct * @see evrpc_free() */ struct evrpc_base *evrpc_init(struct evhttp *server); /** * Frees the evrpc base * * For now, you are responsible for making sure that no rpcs are ongoing. * * @param base the evrpc_base object to be freed * @see evrpc_init */ void evrpc_free(struct evrpc_base *base); /** register RPCs with the HTTP Server * * registers a new RPC with the HTTP server, each RPC needs to have * a unique name under which it can be identified. * * @param base the evrpc_base structure in which the RPC should be * registered. * @param name the name of the RPC * @param request the name of the RPC request structure * @param reply the name of the RPC reply structure * @param callback the callback that should be invoked when the RPC * is received. The callback has the following prototype * void (*callback)(EVRPC_STRUCT(Message)* rpc, void *arg) * @param cbarg an additional parameter that can be passed to the callback. * The parameter can be used to carry around state. */ #define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \ evrpc_register_generic(base, #name, \ (void (*)(struct evrpc_req_generic *, void *))callback, cbarg, \ (void *(*)(void *))request##_new, NULL, \ (void (*)(void *))request##_free, \ (int (*)(void *, struct evbuffer *))request##_unmarshal, \ (void *(*)(void *))reply##_new, NULL, \ (void (*)(void *))reply##_free, \ (int (*)(void *))reply##_complete, \ (void (*)(struct evbuffer *, void *))reply##_marshal) /** Low level function for registering an RPC with a server. Use EVRPC_REGISTER() instead. @see EVRPC_REGISTER() */ int evrpc_register_rpc(struct evrpc_base *, struct evrpc *, void (*)(struct evrpc_req_generic*, void *), void *); /** * Unregisters an already registered RPC * * @param base the evrpc_base object from which to unregister an RPC * @param name the name of the rpc to unregister * @return -1 on error or 0 when successful. * @see EVRPC_REGISTER() */ #define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc((base), #name) int evrpc_unregister_rpc(struct evrpc_base *base, const char *name); /* * Client-side RPC support */ struct evhttp_connection; struct evrpc_status; /** launches an RPC and sends it to the server * * EVRPC_MAKE_REQUEST() is used by the client to send an RPC to the server. * * @param name the name of the RPC * @param pool the evrpc_pool that contains the connection objects over which * the request should be sent. * @param request a pointer to the RPC request structure - it contains the * data to be sent to the server. * @param reply a pointer to the RPC reply structure. It is going to be filled * if the request was answered successfully * @param cb the callback to invoke when the RPC request has been answered * @param cbarg an additional argument to be passed to the client * @return 0 on success, -1 on failure */ #define EVRPC_MAKE_REQUEST(name, pool, request, reply, cb, cbarg) \ evrpc_send_request_##name((pool), (request), (reply), (cb), (cbarg)) /** Makes an RPC request based on the provided context. This is a low-level function and should not be used directly unless a custom context object is provided. Use EVRPC_MAKE_REQUEST() instead. @param ctx a context from EVRPC_MAKE_CTX() @returns 0 on success, -1 otherwise. @see EVRPC_MAKE_REQUEST(), EVRPC_MAKE_CTX() */ int evrpc_make_request(struct evrpc_request_wrapper *ctx); /** creates an rpc connection pool * * a pool has a number of connections associated with it. * rpc requests are always made via a pool. * * @param base a pointer to an struct event_based object; can be left NULL * in singled-threaded applications * @return a newly allocated struct evrpc_pool object * @see evrpc_pool_free() */ struct evrpc_pool *evrpc_pool_new(struct event_base *base); /** frees an rpc connection pool * * @param pool a pointer to an evrpc_pool allocated via evrpc_pool_new() * @see evrpc_pool_new() */ void evrpc_pool_free(struct evrpc_pool *pool); /** * Adds a connection over which rpc can be dispatched to the pool. * * The connection object must have been newly created. * * @param pool the pool to which to add the connection * @param evcon the connection to add to the pool. */ void evrpc_pool_add_connection(struct evrpc_pool *pool, struct evhttp_connection *evcon); /** * Removes a connection from the pool. * * The connection object must have been newly created. * * @param pool the pool from which to remove the connection * @param evcon the connection to remove from the pool. */ void evrpc_pool_remove_connection(struct evrpc_pool *pool, struct evhttp_connection *evcon); /** * Sets the timeout in secs after which a request has to complete. The * RPC is completely aborted if it does not complete by then. Setting * the timeout to 0 means that it never timeouts and can be used to * implement callback type RPCs. * * Any connection already in the pool will be updated with the new * timeout. Connections added to the pool after set_timeout has be * called receive the pool timeout only if no timeout has been set * for the connection itself. * * @param pool a pointer to a struct evrpc_pool object * @param timeout_in_secs the number of seconds after which a request should * timeout and a failure be returned to the callback. */ void evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs); /** * Hooks for changing the input and output of RPCs; this can be used to * implement compression, authentication, encryption, ... */ enum EVRPC_HOOK_TYPE { EVRPC_INPUT, /**< apply the function to an input hook */ EVRPC_OUTPUT /**< apply the function to an output hook */ }; #ifndef _WIN32 /** Deprecated alias for EVRPC_INPUT. Not available on windows, where it * conflicts with platform headers. */ #define INPUT EVRPC_INPUT /** Deprecated alias for EVRPC_OUTPUT. Not available on windows, where it * conflicts with platform headers. */ #define OUTPUT EVRPC_OUTPUT #endif /** * Return value from hook processing functions */ enum EVRPC_HOOK_RESULT { EVRPC_TERMINATE = -1, /**< indicates the rpc should be terminated */ EVRPC_CONTINUE = 0, /**< continue processing the rpc */ EVRPC_PAUSE = 1 /**< pause processing request until resumed */ }; /** adds a processing hook to either an rpc base or rpc pool * * If a hook returns TERMINATE, the processing is aborted. On CONTINUE, * the request is immediately processed after the hook returns. If the * hook returns PAUSE, request processing stops until evrpc_resume_request() * has been called. * * The add functions return handles that can be used for removing hooks. * * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool * @param hook_type either INPUT or OUTPUT * @param cb the callback to call when the hook is activated * @param cb_arg an additional argument for the callback * @return a handle to the hook so it can be removed later * @see evrpc_remove_hook() */ void *evrpc_add_hook(void *vbase, enum EVRPC_HOOK_TYPE hook_type, int (*cb)(void *, struct evhttp_request *, struct evbuffer *, void *), void *cb_arg); /** removes a previously added hook * * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool * @param hook_type either INPUT or OUTPUT * @param handle a handle returned by evrpc_add_hook() * @return 1 on success or 0 on failure * @see evrpc_add_hook() */ int evrpc_remove_hook(void *vbase, enum EVRPC_HOOK_TYPE hook_type, void *handle); /** resume a paused request * * @param vbase a pointer to either struct evrpc_base or struct evrpc_pool * @param ctx the context pointer provided to the original hook call */ int evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res); /** adds meta data to request * * evrpc_hook_add_meta() allows hooks to add meta data to a request. for * a client request, the meta data can be inserted by an outgoing request hook * and retrieved by the incoming request hook. * * @param ctx the context provided to the hook call * @param key a NUL-terminated c-string * @param data the data to be associated with the key * @param data_size the size of the data */ void evrpc_hook_add_meta(void *ctx, const char *key, const void *data, size_t data_size); /** retrieves meta data previously associated * * evrpc_hook_find_meta() can be used to retrieve meta data associated to a * request by a previous hook. * @param ctx the context provided to the hook call * @param key a NUL-terminated c-string * @param data pointer to a data pointer that will contain the retrieved data * @param data_size pointer to the size of the data * @return 0 on success or -1 on failure */ int evrpc_hook_find_meta(void *ctx, const char *key, void **data, size_t *data_size); /** * returns the connection object associated with the request * * @param ctx the context provided to the hook call * @return a pointer to the evhttp_connection object */ struct evhttp_connection *evrpc_hook_get_connection(void *ctx); /** Function for sending a generic RPC request. Do not call this function directly, use EVRPC_MAKE_REQUEST() instead. @see EVRPC_MAKE_REQUEST() */ int evrpc_send_request_generic(struct evrpc_pool *pool, void *request, void *reply, void (*cb)(struct evrpc_status *, void *, void *, void *), void *cb_arg, const char *rpcname, void (*req_marshal)(struct evbuffer *, void *), void (*rpl_clear)(void *), int (*rpl_unmarshal)(void *, struct evbuffer *)); /** Function for registering a generic RPC with the RPC base. Do not call this function directly, use EVRPC_REGISTER() instead. @see EVRPC_REGISTER() */ int evrpc_register_generic(struct evrpc_base *base, const char *name, void (*callback)(struct evrpc_req_generic *, void *), void *cbarg, void *(*req_new)(void *), void *req_new_arg, void (*req_free)(void *), int (*req_unmarshal)(void *, struct evbuffer *), void *(*rpl_new)(void *), void *rpl_new_arg, void (*rpl_free)(void *), int (*rpl_complete)(void *), void (*rpl_marshal)(struct evbuffer *, void *)); /** accessors for obscure and undocumented functionality */ struct evrpc_pool* evrpc_request_get_pool(struct evrpc_request_wrapper *ctx); void evrpc_request_set_pool(struct evrpc_request_wrapper *ctx, struct evrpc_pool *pool); void evrpc_request_set_cb(struct evrpc_request_wrapper *ctx, void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg), void *cb_arg); #ifdef __cplusplus } #endif #endif /* EVENT2_RPC_H_INCLUDED_ */ PKZ"(\\event2/buffer_compat.hnu[/* * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_BUFFER_COMPAT_H_INCLUDED_ #define EVENT2_BUFFER_COMPAT_H_INCLUDED_ #include /** @file event2/buffer_compat.h Obsolete and deprecated versions of the functions in buffer.h: provided only for backward compatibility. */ /** Obsolete alias for evbuffer_readln(buffer, NULL, EVBUFFER_EOL_ANY). @deprecated This function is deprecated because its behavior is not correct for almost any protocol, and also because it's wholly subsumed by evbuffer_readln(). @param buffer the evbuffer to read from @return pointer to a single line, or NULL if an error occurred */ EVENT2_EXPORT_SYMBOL char *evbuffer_readline(struct evbuffer *buffer); /** Type definition for a callback that is invoked whenever data is added or removed from an evbuffer. An evbuffer may have one or more callbacks set at a time. The order in which they are executed is undefined. A callback function may add more callbacks, or remove itself from the list of callbacks, or add or remove data from the buffer. It may not remove another callback from the list. If a callback adds or removes data from the buffer or from another buffer, this can cause a recursive invocation of your callback or other callbacks. If you ask for an infinite loop, you might just get one: watch out! @param buffer the buffer whose size has changed @param old_len the previous length of the buffer @param new_len the current length of the buffer @param arg a pointer to user data */ typedef void (*evbuffer_cb)(struct evbuffer *buffer, size_t old_len, size_t new_len, void *arg); /** Replace all callbacks on an evbuffer with a single new callback, or remove them. Subsequent calls to evbuffer_setcb() replace callbacks set by previous calls. Setting the callback to NULL removes any previously set callback. @deprecated This function is deprecated because it clears all previous callbacks set on the evbuffer, which can cause confusing behavior if multiple parts of the code all want to add their own callbacks on a buffer. Instead, use evbuffer_add(), evbuffer_del(), and evbuffer_setflags() to manage your own evbuffer callbacks without interfering with callbacks set by others. @param buffer the evbuffer to be monitored @param cb the callback function to invoke when the evbuffer is modified, or NULL to remove all callbacks. @param cbarg an argument to be provided to the callback function */ EVENT2_EXPORT_SYMBOL void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg); /** Find a string within an evbuffer. @param buffer the evbuffer to be searched @param what the string to be searched for @param len the length of the search string @return a pointer to the beginning of the search string, or NULL if the search failed. */ EVENT2_EXPORT_SYMBOL unsigned char *evbuffer_find(struct evbuffer *buffer, const unsigned char *what, size_t len); /** deprecated in favor of calling the functions directly */ #define EVBUFFER_LENGTH(x) evbuffer_get_length(x) /** deprecated in favor of calling the functions directly */ #define EVBUFFER_DATA(x) evbuffer_pullup((x), -1) #endif PKZ{O|/|/event2/dns_compat.hnu[/* * Copyright (c) 2006-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_DNS_COMPAT_H_INCLUDED_ #define EVENT2_DNS_COMPAT_H_INCLUDED_ /** @file event2/dns_compat.h Potentially non-threadsafe versions of the functions in dns.h: provided only for backwards compatibility. */ #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /** Initialize the asynchronous DNS library. This function initializes support for non-blocking name resolution by calling evdns_resolv_conf_parse() on UNIX and evdns_config_windows_nameservers() on Windows. @deprecated This function is deprecated because it always uses the current event base, and is easily confused by multiple calls to event_init(), and so is not safe for multithreaded use. Additionally, it allocates a global structure that only one thread can use. The replacement is evdns_base_new(). @return 0 if successful, or -1 if an error occurred @see evdns_shutdown() */ int evdns_init(void); struct evdns_base; /** Return the global evdns_base created by event_init() and used by the other deprecated functions. @deprecated This function is deprecated because use of the global evdns_base is error-prone. */ struct evdns_base *evdns_get_global_base(void); /** Shut down the asynchronous DNS resolver and terminate all active requests. If the 'fail_requests' option is enabled, all active requests will return an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise, the requests will be silently discarded. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_shutdown(). @param fail_requests if zero, active requests will be aborted; if non-zero, active requests will return DNS_ERR_SHUTDOWN. @see evdns_init() */ void evdns_shutdown(int fail_requests); /** Add a nameserver. The address should be an IPv4 address in network byte order. The type of address is chosen so that it matches in_addr.s_addr. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_nameserver_add(). @param address an IP address in network byte order @return 0 if successful, or -1 if an error occurred @see evdns_nameserver_ip_add() */ int evdns_nameserver_add(unsigned long int address); /** Get the number of configured nameservers. This returns the number of configured nameservers (not necessarily the number of running nameservers). This is useful for double-checking whether our calls to the various nameserver configuration functions have been successful. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_count_nameservers(). @return the number of configured nameservers @see evdns_nameserver_add() */ int evdns_count_nameservers(void); /** Remove all configured nameservers, and suspend all pending resolves. Resolves will not necessarily be re-attempted until evdns_resume() is called. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_clear_nameservers_and_suspend(). @return 0 if successful, or -1 if an error occurred @see evdns_resume() */ int evdns_clear_nameservers_and_suspend(void); /** Resume normal operation and continue any suspended resolve requests. Re-attempt resolves left in limbo after an earlier call to evdns_clear_nameservers_and_suspend(). @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_resume(). @return 0 if successful, or -1 if an error occurred @see evdns_clear_nameservers_and_suspend() */ int evdns_resume(void); /** Add a nameserver. This wraps the evdns_nameserver_add() function by parsing a string as an IP address and adds it as a nameserver. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_nameserver_ip_add(). @return 0 if successful, or -1 if an error occurred @see evdns_nameserver_add() */ int evdns_nameserver_ip_add(const char *ip_as_string); /** Lookup an A record for a given name. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_resolve_ipv4(). @param name a DNS hostname @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return 0 if successful, or -1 if an error occurred @see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() */ int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr); /** Lookup an AAAA record for a given name. @param name a DNS hostname @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return 0 if successful, or -1 if an error occurred @see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6() */ int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr); struct in_addr; struct in6_addr; /** Lookup a PTR record for a given IP address. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_resolve_reverse(). @param in an IPv4 address @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return 0 if successful, or -1 if an error occurred @see evdns_resolve_reverse_ipv6() */ int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr); /** Lookup a PTR record for a given IPv6 address. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_resolve_reverse_ipv6(). @param in an IPv6 address @param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query. @param callback a callback function to invoke when the request is completed @param ptr an argument to pass to the callback function @return 0 if successful, or -1 if an error occurred @see evdns_resolve_reverse_ipv6() */ int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr); /** Set the value of a configuration option. The currently available configuration options are: ndots, timeout, max-timeouts, max-inflight, and attempts @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_set_option(). @param option the name of the configuration option to be modified @param val the value to be set @param flags Ignored. @return 0 if successful, or -1 if an error occurred */ int evdns_set_option(const char *option, const char *val, int flags); /** Parse a resolv.conf file. The 'flags' parameter determines what information is parsed from the resolv.conf file. See the man page for resolv.conf for the format of this file. The following directives are not parsed from the file: sortlist, rotate, no-check-names, inet6, debug. If this function encounters an error, the possible return values are: 1 = failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of memory, 5 = short read from file, 6 = no nameservers listed in the file @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_resolv_conf_parse(). @param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC| DNS_OPTIONS_ALL @param filename the path to the resolv.conf file @return 0 if successful, or various positive error codes if an error occurred (see above) @see resolv.conf(3), evdns_config_windows_nameservers() */ int evdns_resolv_conf_parse(int flags, const char *const filename); /** Clear the list of search domains. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_search_clear(). */ void evdns_search_clear(void); /** Add a domain to the list of search domains @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_search_add(). @param domain the domain to be added to the search list */ void evdns_search_add(const char *domain); /** Set the 'ndots' parameter for searches. Sets the number of dots which, when found in a name, causes the first query to be without any search domain. @deprecated This function is deprecated because it does not allow the caller to specify which evdns_base it applies to. The recommended function is evdns_base_search_ndots_set(). @param ndots the new ndots parameter */ void evdns_search_ndots_set(const int ndots); /** As evdns_server_new_with_base. @deprecated This function is deprecated because it does not allow the caller to specify which even_base it uses. The recommended function is evdns_add_server_port_with_base(). */ struct evdns_server_port *evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data); #ifdef _WIN32 int evdns_config_windows_nameservers(void); #define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED #endif #ifdef __cplusplus } #endif #endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ PKZczaevent2/event-config.hnu[#include #if __WORDSIZE == 32 #include #elif __WORDSIZE == 64 #include #else #error "Unknown word size" #endif PKZD?/ / event2/rpc_compat.hnu[/* * Copyright (c) 2006-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_RPC_COMPAT_H_INCLUDED_ #define EVENT2_RPC_COMPAT_H_INCLUDED_ /** @file event2/rpc_compat.h Deprecated versions of the functions in rpc.h: provided only for backwards compatibility. */ #ifdef __cplusplus extern "C" { #endif /** backwards compatible accessors that work only with gcc */ #if defined(__GNUC__) && !defined(__STRICT_ANSI__) #undef EVTAG_ASSIGN #undef EVTAG_GET #undef EVTAG_ADD #define EVTAG_ASSIGN(msg, member, args...) \ (*(msg)->base->member##_assign)(msg, ## args) #define EVTAG_GET(msg, member, args...) \ (*(msg)->base->member##_get)(msg, ## args) #define EVTAG_ADD(msg, member, args...) \ (*(msg)->base->member##_add)(msg, ## args) #endif #define EVTAG_LEN(msg, member) ((msg)->member##_length) #ifdef __cplusplus } #endif #endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ PKZA''event2/bufferevent_struct.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ #define EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ /** @file event2/bufferevent_struct.h Data structures for bufferevents. Using these structures may hurt forward compatibility with later versions of Libevent: be careful! @deprecated Use of bufferevent_struct.h is completely deprecated; these structures are only exposed for backward compatibility with programs written before Libevent 2.0 that used them. */ #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /* For struct event */ #include struct event_watermark { size_t low; size_t high; }; /** Shared implementation of a bufferevent. This type is exposed only because it was exposed in previous versions, and some people's code may rely on manipulating it. Otherwise, you should really not rely on the layout, size, or contents of this structure: it is fairly volatile, and WILL change in future versions of the code. **/ struct bufferevent { /** Event base for which this bufferevent was created. */ struct event_base *ev_base; /** Pointer to a table of function pointers to set up how this bufferevent behaves. */ const struct bufferevent_ops *be_ops; /** A read event that triggers when a timeout has happened or a socket is ready to read data. Only used by some subtypes of bufferevent. */ struct event ev_read; /** A write event that triggers when a timeout has happened or a socket is ready to write data. Only used by some subtypes of bufferevent. */ struct event ev_write; /** An input buffer. Only the bufferevent is allowed to add data to this buffer, though the user is allowed to drain it. */ struct evbuffer *input; /** An input buffer. Only the bufferevent is allowed to drain data from this buffer, though the user is allowed to add it. */ struct evbuffer *output; struct event_watermark wm_read; struct event_watermark wm_write; bufferevent_data_cb readcb; bufferevent_data_cb writecb; /* This should be called 'eventcb', but renaming it would break * backward compatibility */ bufferevent_event_cb errorcb; void *cbarg; struct timeval timeout_read; struct timeval timeout_write; /** Events that are currently enabled: currently EV_READ and EV_WRITE are supported. */ short enabled; }; #ifdef __cplusplus } #endif #endif /* EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ */ PKZ\/7]]event2/tag_compat.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_TAG_COMPAT_H_INCLUDED_ #define EVENT2_TAG_COMPAT_H_INCLUDED_ /** @file event2/tag_compat.h Obsolete/deprecated functions from tag.h; provided only for backwards compatibility. */ /** @name Misnamed functions @deprecated These macros are deprecated because their names don't follow Libevent's naming conventions. Use evtag_encode_int and evtag_encode_int64 instead. @{ */ #define encode_int(evbuf, number) evtag_encode_int((evbuf), (number)) #define encode_int64(evbuf, number) evtag_encode_int64((evbuf), (number)) /**@}*/ #endif /* EVENT2_TAG_H_INCLUDED_ */ PKZ+羣 event2/rpc_struct.hnu[/* * Copyright (c) 2006-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_RPC_STRUCT_H_INCLUDED_ #define EVENT2_RPC_STRUCT_H_INCLUDED_ #ifdef __cplusplus extern "C" { #endif /** @file event2/rpc_struct.h Structures used by rpc.h. Using these structures directly may harm forward compatibility: be careful! */ /** * provides information about the completed RPC request. */ struct evrpc_status { #define EVRPC_STATUS_ERR_NONE 0 #define EVRPC_STATUS_ERR_TIMEOUT 1 #define EVRPC_STATUS_ERR_BADPAYLOAD 2 #define EVRPC_STATUS_ERR_UNSTARTED 3 #define EVRPC_STATUS_ERR_HOOKABORTED 4 int error; /* for looking at headers or other information */ struct evhttp_request *http_req; }; /* the structure below needs to be synchronized with evrpc_req_generic */ /* Encapsulates a request */ struct evrpc { TAILQ_ENTRY(evrpc) next; /* the URI at which the request handler lives */ const char* uri; /* creates a new request structure */ void *(*request_new)(void *); void *request_new_arg; /* frees the request structure */ void (*request_free)(void *); /* unmarshals the buffer into the proper request structure */ int (*request_unmarshal)(void *, struct evbuffer *); /* creates a new reply structure */ void *(*reply_new)(void *); void *reply_new_arg; /* frees the reply structure */ void (*reply_free)(void *); /* verifies that the reply is valid */ int (*reply_complete)(void *); /* marshals the reply into a buffer */ void (*reply_marshal)(struct evbuffer*, void *); /* the callback invoked for each received rpc */ void (*cb)(struct evrpc_req_generic *, void *); void *cb_arg; /* reference for further configuration */ struct evrpc_base *base; }; #ifdef __cplusplus } #endif #endif /* EVENT2_RPC_STRUCT_H_INCLUDED_ */ PKZœ% + + event2/keyvalq_struct.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_KEYVALQ_STRUCT_H_INCLUDED_ #define EVENT2_KEYVALQ_STRUCT_H_INCLUDED_ #ifdef __cplusplus extern "C" { #endif /* Fix so that people don't have to run with */ /* XXXX This code is duplicated with event_struct.h */ #ifndef TAILQ_ENTRY #define EVENT_DEFINED_TQENTRY_ #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ } #endif /* !TAILQ_ENTRY */ #ifndef TAILQ_HEAD #define EVENT_DEFINED_TQHEAD_ #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; \ struct type **tqh_last; \ } #endif /* * Key-Value pairs. Can be used for HTTP headers but also for * query argument parsing. */ struct evkeyval { TAILQ_ENTRY(evkeyval) next; char *key; char *value; }; TAILQ_HEAD (evkeyvalq, evkeyval); /* XXXX This code is duplicated with event_struct.h */ #ifdef EVENT_DEFINED_TQENTRY_ #undef TAILQ_ENTRY #endif #ifdef EVENT_DEFINED_TQHEAD_ #undef TAILQ_HEAD #endif #ifdef __cplusplus } #endif #endif PKZnK K event2/http_compat.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT2_HTTP_COMPAT_H_INCLUDED_ #define EVENT2_HTTP_COMPAT_H_INCLUDED_ /** @file event2/http_compat.h Potentially non-threadsafe versions of the functions in http.h: provided only for backwards compatibility. */ #ifdef __cplusplus extern "C" { #endif #include #ifdef EVENT__HAVE_SYS_TYPES_H #include #endif #ifdef EVENT__HAVE_SYS_TIME_H #include #endif /* For int types. */ #include /** * Start an HTTP server on the specified address and port * * @deprecated It does not allow an event base to be specified * * @param address the address to which the HTTP server should be bound * @param port the port number on which the HTTP server should listen * @return an struct evhttp object */ struct evhttp *evhttp_start(const char *address, ev_uint16_t port); /** * A connection object that can be used to for making HTTP requests. The * connection object tries to establish the connection when it is given an * http request object. * * @deprecated It does not allow an event base to be specified */ struct evhttp_connection *evhttp_connection_new( const char *address, ev_uint16_t port); /** * Associates an event base with the connection - can only be called * on a freshly created connection object that has not been used yet. * * @deprecated XXXX Why? */ void evhttp_connection_set_base(struct evhttp_connection *evcon, struct event_base *base); /** Returns the request URI */ #define evhttp_request_uri evhttp_request_get_uri #ifdef __cplusplus } #endif #endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */ PKZJAZpoll.hnu[#include PKZ2LSSbash/bashintl.hnu[/* bashintl.h -- Internationalization functions and defines. */ /* Copyright (C) 1996-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_BASHINTL_H_) #define _BASHINTL_H_ #if defined (BUILDTOOL) # undef ENABLE_NLS # define ENABLE_NLS 0 #endif /* Include this *after* config.h */ #include "gettext.h" #if defined (HAVE_LOCALE_H) # include #endif #define _(msgid) gettext(msgid) #define N_(msgid) msgid #define D_(d, msgid) dgettext(d, msgid) #define P_(m1, m2, n) ngettext(m1, m2, n) #if defined (HAVE_SETLOCALE) && !defined (LC_ALL) # undef HAVE_SETLOCALE #endif #if !defined (HAVE_SETLOCALE) # define setlocale(cat, loc) #endif #endif /* !_BASHINTL_H_ */ PKZ!:o o bash/make_cmd.hnu[/* make_cmd.h -- Declarations of functions found in make_cmd.c */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_MAKE_CMD_H_) #define _MAKE_CMD_H_ #include "stdc.h" extern void cmd_init __P((void)); extern WORD_DESC *alloc_word_desc __P((void)); extern WORD_DESC *make_bare_word __P((const char *)); extern WORD_DESC *make_word_flags __P((WORD_DESC *, const char *)); extern WORD_DESC *make_word __P((const char *)); extern WORD_DESC *make_word_from_token __P((int)); extern WORD_LIST *make_word_list __P((WORD_DESC *, WORD_LIST *)); #define add_string_to_list(s, l) make_word_list (make_word(s), (l)) extern COMMAND *make_command __P((enum command_type, SIMPLE_COM *)); extern COMMAND *command_connect __P((COMMAND *, COMMAND *, int)); extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int)); extern COMMAND *make_group_command __P((COMMAND *)); extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *, int)); extern PATTERN_LIST *make_pattern_list __P((WORD_LIST *, COMMAND *)); extern COMMAND *make_if_command __P((COMMAND *, COMMAND *, COMMAND *)); extern COMMAND *make_while_command __P((COMMAND *, COMMAND *)); extern COMMAND *make_until_command __P((COMMAND *, COMMAND *)); extern COMMAND *make_bare_simple_command __P((void)); extern COMMAND *make_simple_command __P((ELEMENT, COMMAND *)); extern void make_here_document __P((REDIRECT *, int)); extern REDIRECT *make_redirection __P((REDIRECTEE, enum r_instruction, REDIRECTEE, int)); extern COMMAND *make_function_def __P((WORD_DESC *, COMMAND *, int, int)); extern COMMAND *clean_simple_command __P((COMMAND *)); extern COMMAND *make_arith_command __P((WORD_LIST *)); extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int)); #if defined (COND_COMMAND) extern COND_COM *make_cond_node __P((int, WORD_DESC *, COND_COM *, COND_COM *)); extern COMMAND *make_cond_command __P((COND_COM *)); #endif extern COMMAND *make_arith_for_command __P((WORD_LIST *, COMMAND *, int)); extern COMMAND *make_subshell_command __P((COMMAND *)); extern COMMAND *make_coproc_command __P((char *, COMMAND *)); extern COMMAND *connect_async_list __P((COMMAND *, COMMAND *, int)); #endif /* !_MAKE_CMD_H */ PKZ9!Q bash/hashlib.hnu[/* hashlib.h -- the data structures used in hashing in Bash. */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_HASHLIB_H_) #define _HASHLIB_H_ #include "stdc.h" #ifndef PTR_T # ifdef __STDC__ # define PTR_T void * # else # define PTR_T char * # endif #endif typedef struct bucket_contents { struct bucket_contents *next; /* Link to next hashed key in this bucket. */ char *key; /* What we look up. */ PTR_T data; /* What we really want. */ unsigned int khash; /* What key hashes to */ int times_found; /* Number of times this item has been found. */ } BUCKET_CONTENTS; typedef struct hash_table { BUCKET_CONTENTS **bucket_array; /* Where the data is kept. */ int nbuckets; /* How many buckets does this table have. */ int nentries; /* How many entries does this table have. */ } HASH_TABLE; typedef int hash_wfunc __P((BUCKET_CONTENTS *)); /* Operations on tables as a whole */ extern HASH_TABLE *hash_create __P((int)); extern HASH_TABLE *hash_copy __P((HASH_TABLE *, sh_string_func_t *)); extern void hash_flush __P((HASH_TABLE *, sh_free_func_t *)); extern void hash_dispose __P((HASH_TABLE *)); extern void hash_walk __P((HASH_TABLE *, hash_wfunc *)); /* Operations to extract information from or pieces of tables */ extern int hash_bucket __P((const char *, HASH_TABLE *)); extern int hash_size __P((HASH_TABLE *)); /* Operations on hash table entries */ extern BUCKET_CONTENTS *hash_search __P((const char *, HASH_TABLE *, int)); extern BUCKET_CONTENTS *hash_insert __P((char *, HASH_TABLE *, int)); extern BUCKET_CONTENTS *hash_remove __P((const char *, HASH_TABLE *, int)); /* Miscellaneous */ extern unsigned int hash_string __P((const char *)); /* Redefine the function as a macro for speed. */ #define hash_items(bucket, table) \ ((table && (bucket < table->nbuckets)) ? \ table->bucket_array[bucket] : \ (BUCKET_CONTENTS *)NULL) /* Default number of buckets in the hash table. */ #define DEFAULT_HASH_BUCKETS 128 /* must be power of two */ #define HASH_ENTRIES(ht) ((ht) ? (ht)->nentries : 0) /* flags for hash_search and hash_insert */ #define HASH_NOSRCH 0x01 #define HASH_CREATE 0x02 #if !defined (NULL) # if defined (__STDC__) # define NULL ((void *) 0) # else # define NULL 0x0 # endif /* !__STDC__ */ #endif /* !NULL */ #endif /* _HASHLIB_H */ PKZ:1BBbash/config-top.hnu[/* config-top.h - various user-settable options not under the control of autoconf. */ /* Copyright (C) 2002-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* Define CONTINUE_AFTER_KILL_ERROR if you want the kill command to continue processing arguments after one of them fails. This is what POSIX.2 specifies. */ #define CONTINUE_AFTER_KILL_ERROR #define NON_INTERACTIVE_LOGIN_SHELLS /* Define BREAK_COMPLAINS if you want the non-standard, but useful error messages about `break' and `continue' out of context. */ #define BREAK_COMPLAINS /* Define CD_COMPLAINS if you want the non-standard, but sometimes-desired error messages about multiple directory arguments to `cd'. */ #define CD_COMPLAINS /* Define BUFFERED_INPUT if you want the shell to do its own input buffering, rather than using stdio. Do not undefine this; it's required to preserve semantics required by POSIX. */ #define BUFFERED_INPUT /* Define ONESHOT if you want sh -c 'command' to avoid forking to execute `command' whenever possible. This is a big efficiency improvement. */ #define ONESHOT /* Define V9_ECHO if you want to give the echo builtin backslash-escape interpretation using the -e option, in the style of the Bell Labs 9th Edition version of echo. You cannot emulate the System V echo behavior without this option. */ #define V9_ECHO /* Define DONT_REPORT_SIGPIPE if you don't want to see `Broken pipe' messages when a job like `cat jobs.c | exit 1' terminates due to a SIGPIPE. */ #define DONT_REPORT_SIGPIPE /* Define DONT_REPORT_SIGTERM if you don't want to see `Terminates' message when a job exits due to SIGTERM, since that's the default signal sent by the kill builtin. */ /* #define DONT_REPORT_SIGTERM */ /* Define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS if you don't want builtins like `echo' and `printf' to report errors when output does not succeed due to EPIPE. */ #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS /* The default value of the PATH variable. */ #ifndef DEFAULT_PATH_VALUE #define DEFAULT_PATH_VALUE \ "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:." #endif /* The value for PATH when invoking `command -p'. This is only used when the Posix.2 confstr () function, or CS_PATH define are not present. */ #ifndef STANDARD_UTILS_PATH #define STANDARD_UTILS_PATH \ "/bin:/usr/bin:/usr/sbin:/sbin" #endif /* Default primary and secondary prompt strings. */ #define PPROMPT "\\s-\\v\\$ " #define SPROMPT "> " /* Undefine this if you don't want the ksh-compatible behavior of reprinting the select menu after a valid choice is made only if REPLY is set to NULL in the body of the select command. The menu is always reprinted if the reply to the select query is an empty line. */ #define KSH_COMPATIBLE_SELECT /* Default interactive shell startup file. */ #define DEFAULT_BASHRC "~/.bashrc" /* System-wide .bashrc file for interactive shells. */ /* #define SYS_BASHRC "/etc/bash.bashrc" */ /* System-wide .bash_logout for login shells. */ #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" /* Define this to make non-interactive shells begun with argv[0][0] == '-' run the startup files when not in posix mode. */ /* #define NON_INTERACTIVE_LOGIN_SHELLS */ /* Define this if you want bash to try to check whether it's being run by sshd and source the .bashrc if so (like the rshd behavior). This checks for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment, which can be fooled under certain not-uncommon circumstances. */ #define SSH_SOURCE_BASHRC /* Define if you want the case-capitalizing operators (~[~]) and the `capcase' variable attribute (declare -c). */ #define CASEMOD_CAPCASE /* This is used as the name of a shell function to call when a command name is not found. If you want to name it something other than the default ("command_not_found_handle"), change it here. */ /* #define NOTFOUND_HOOK "command_not_found_handle" */ /* Define if you want each line saved to the history list in bashhist.c: bash_add_history() to be sent to syslog(). */ /* #define SYSLOG_HISTORY */ #if defined (SYSLOG_HISTORY) # define SYSLOG_FACILITY LOG_USER # define SYSLOG_LEVEL LOG_INFO # define OPENLOG_OPTS LOG_PID #endif /* Define if you want syslogging history to be controllable at runtime via a shell option; if defined, the value is the default for the syslog_history shopt option */ #if defined (SYSLOG_HISTORY) #define SYSLOG_SHOPT 0 #endif /* Define if you want to include code in shell.c to support wordexp(3) */ /* #define WORDEXP_OPTION */ /* Define as 1 if you want to enable code that implements multiple coprocs */ #ifndef MULTIPLE_COPROCS # define MULTIPLE_COPROCS 0 #endif /* Define to 0 if you want the checkwinsize option off by default, 1 if you want it on. */ #define CHECKWINSIZE_DEFAULT 0 /* Define to 1 if you want to optimize for sequential array assignment when using indexed arrays, 0 if you want bash-4.2 behavior, which favors random access but is O(N) for each array assignment. */ #define OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT 1 /* Define to 1 if you want to be able to export indexed arrays to processes using the foo=([0]=one [1]=two) and so on */ /* #define ARRAY_EXPORT 1 */ /* Define to 1 if you want the shell to exit if it is running setuid and its attempt to drop privilege using setuid(getuid()) fails with errno == EAGAIN */ /* #define EXIT_ON_SETUID_FAILURE 1 */ /* Define to 1 if you want the shell to re-check $PATH if a hashed filename no longer exists. This behavior is the default in Posix mode. */ #define CHECKHASH_DEFAULT 0 /* Define to the maximum level of recursion you want for the eval builtin. 0 means the limit is not active. */ #define EVALNEST_MAX 0 /* Define to the maximum level of recursion you want for the source/. builtin. 0 means the limit is not active. */ #define SOURCENEST_MAX 0 /* Define to use libc mktemp/mkstemp instead of replacements in lib/sh/tmpfile.c */ #define USE_MKTEMP #define USE_MKSTEMP PKZFc  bash/arrayfunc.hnu[/* arrayfunc.h -- declarations for miscellaneous array functions in arrayfunc.c */ /* Copyright (C) 2001-2010 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_ARRAYFUNC_H_) #define _ARRAYFUNC_H_ /* Must include variables.h before including this file. */ #if defined (ARRAY_VARS) /* Flags for array_value_internal and callers array_value/get_array_value */ #define AV_ALLOWALL 0x001 #define AV_QUOTED 0x002 #define AV_USEIND 0x004 #define AV_USEVAL 0x008 /* XXX - should move this */ #define AV_ASSIGNRHS 0x010 /* no splitting, special case ${a[@]} */ extern SHELL_VAR *convert_var_to_array __P((SHELL_VAR *)); extern SHELL_VAR *convert_var_to_assoc __P((SHELL_VAR *)); extern char *make_array_variable_value __P((SHELL_VAR *, arrayind_t, char *, char *, int)); extern SHELL_VAR *bind_array_variable __P((char *, arrayind_t, char *, int)); extern SHELL_VAR *bind_array_element __P((SHELL_VAR *, arrayind_t, char *, int)); extern SHELL_VAR *assign_array_element __P((char *, char *, int)); extern SHELL_VAR *bind_assoc_variable __P((SHELL_VAR *, char *, char *, char *, int)); extern SHELL_VAR *find_or_make_array_variable __P((char *, int)); extern SHELL_VAR *assign_array_from_string __P((char *, char *, int)); extern SHELL_VAR *assign_array_var_from_word_list __P((SHELL_VAR *, WORD_LIST *, int)); extern WORD_LIST *expand_compound_array_assignment __P((SHELL_VAR *, char *, int)); extern void assign_compound_array_list __P((SHELL_VAR *, WORD_LIST *, int)); extern SHELL_VAR *assign_array_var_from_string __P((SHELL_VAR *, char *, int)); extern int unbind_array_element __P((SHELL_VAR *, char *)); extern int skipsubscript __P((const char *, int, int)); extern void print_array_assignment __P((SHELL_VAR *, int)); extern void print_assoc_assignment __P((SHELL_VAR *, int)); extern arrayind_t array_expand_index __P((SHELL_VAR *, char *, int)); extern int valid_array_reference __P((const char *, int)); extern char *array_value __P((const char *, int, int, int *, arrayind_t *)); extern char *get_array_value __P((const char *, int, int *, arrayind_t *)); extern char *array_keys __P((char *, int)); extern char *array_variable_name __P((const char *, char **, int *)); extern SHELL_VAR *array_variable_part __P((const char *, char **, int *)); #else #define AV_ALLOWALL 0 #define AV_QUOTED 0 #define AV_USEIND 0 #define AV_ASSIGNRHS 0 #endif #endif /* !_ARRAYFUNC_H_ */ PKZrwXXbash/signames.hnu[/* This file was automatically created by ./mksignames. Do not edit. Edit support/mksignames.c instead. */ /* A translation list so we can be polite to our users. */ char *signal_names[NSIG + 4] = { "EXIT", "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP", "SIGABRT", "SIGBUS", "SIGFPE", "SIGKILL", "SIGUSR1", "SIGSEGV", "SIGUSR2", "SIGPIPE", "SIGALRM", "SIGTERM", "SIGSTKFLT", "SIGCHLD", "SIGCONT", "SIGSTOP", "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG", "SIGXCPU", "SIGXFSZ", "SIGVTALRM", "SIGPROF", "SIGWINCH", "SIGIO", "SIGPWR", "SIGSYS", "SIGJUNK(32)", "SIGJUNK(33)", "SIGRTMIN", "SIGRTMIN+1", "SIGRTMIN+2", "SIGRTMIN+3", "SIGRTMIN+4", "SIGRTMIN+5", "SIGRTMIN+6", "SIGRTMIN+7", "SIGRTMIN+8", "SIGRTMIN+9", "SIGRTMIN+10", "SIGRTMIN+11", "SIGRTMIN+12", "SIGRTMIN+13", "SIGRTMIN+14", "SIGRTMIN+15", "SIGRTMAX-14", "SIGRTMAX-13", "SIGRTMAX-12", "SIGRTMAX-11", "SIGRTMAX-10", "SIGRTMAX-9", "SIGRTMAX-8", "SIGRTMAX-7", "SIGRTMAX-6", "SIGRTMAX-5", "SIGRTMAX-4", "SIGRTMAX-3", "SIGRTMAX-2", "SIGRTMAX-1", "SIGRTMAX", "DEBUG", "ERR", "RETURN", (char *)0x0 }; #define initialize_signames() PKZY8Y8 bash/subst.hnu[/* subst.h -- Names of externally visible functions in subst.c. */ /* Copyright (C) 1993-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_SUBST_H_) #define _SUBST_H_ #include "stdc.h" /* Constants which specify how to handle backslashes and quoting in expand_word_internal (). Q_DOUBLE_QUOTES means to use the function slashify_in_quotes () to decide whether the backslash should be retained. Q_HERE_DOCUMENT means slashify_in_here_document () to decide whether to retain the backslash. Q_KEEP_BACKSLASH means to unconditionally retain the backslash. Q_PATQUOTE means that we're expanding a pattern ${var%#[#%]pattern} in an expansion surrounded by double quotes. Q_DOLBRACE means we are expanding a ${...} word, so backslashes should also escape { and } and be removed. */ #define Q_DOUBLE_QUOTES 0x001 #define Q_HERE_DOCUMENT 0x002 #define Q_KEEP_BACKSLASH 0x004 #define Q_PATQUOTE 0x008 #define Q_QUOTED 0x010 #define Q_ADDEDQUOTES 0x020 #define Q_QUOTEDNULL 0x040 #define Q_DOLBRACE 0x080 #define Q_ARITH 0x100 /* expanding string for arithmetic evaluation */ #define Q_ARRAYSUB 0x200 /* expanding indexed array subscript */ /* Flag values controlling how assignment statements are treated. */ #define ASS_APPEND 0x0001 #define ASS_MKLOCAL 0x0002 #define ASS_MKASSOC 0x0004 #define ASS_MKGLOBAL 0x0008 /* force global assignment */ #define ASS_NAMEREF 0x0010 /* assigning to nameref variable */ #define ASS_FORCE 0x0020 /* force assignment even to readonly variable */ /* Flags for the string extraction functions. */ #define SX_NOALLOC 0x0001 /* just skip; don't return substring */ #define SX_VARNAME 0x0002 /* variable name; for string_extract () */ #define SX_REQMATCH 0x0004 /* closing/matching delimiter required */ #define SX_COMMAND 0x0008 /* extracting a shell script/command */ #define SX_NOCTLESC 0x0010 /* don't honor CTLESC quoting */ #define SX_NOESCCTLNUL 0x0020 /* don't let CTLESC quote CTLNUL */ #define SX_NOLONGJMP 0x0040 /* don't longjmp on fatal error */ #define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */ #define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */ #define SX_WORD 0x0200 /* extracting word in ${param op word} */ #define SX_COMPLETE 0x0400 /* extracting word for completion */ #define SX_STRIPDQ 0x0800 /* strip double quotes when extracting double-quoted string */ /* Remove backslashes which are quoting backquotes from STRING. Modifies STRING, and returns a pointer to it. */ extern char * de_backslash __P((char *)); /* Replace instances of \! in a string with !. */ extern void unquote_bang __P((char *)); /* Extract the $( construct in STRING, and return a new string. Start extracting at (SINDEX) as if we had just seen "$(". Make (SINDEX) get the position just after the matching ")". XFLAGS is additional flags to pass to other extraction functions, */ extern char *extract_command_subst __P((char *, int *, int)); /* Extract the $[ construct in STRING, and return a new string. Start extracting at (SINDEX) as if we had just seen "$[". Make (SINDEX) get the position just after the matching "]". */ extern char *extract_arithmetic_subst __P((char *, int *)); #if defined (PROCESS_SUBSTITUTION) /* Extract the <( or >( construct in STRING, and return a new string. Start extracting at (SINDEX) as if we had just seen "<(". Make (SINDEX) get the position just after the matching ")". */ extern char *extract_process_subst __P((char *, char *, int *, int)); #endif /* PROCESS_SUBSTITUTION */ /* Extract the name of the variable to bind to from the assignment string. */ extern char *assignment_name __P((char *)); /* Return a single string of all the words present in LIST, separating each word with SEP. */ extern char *string_list_internal __P((WORD_LIST *, char *)); /* Return a single string of all the words present in LIST, separating each word with a space. */ extern char *string_list __P((WORD_LIST *)); /* Turn $* into a single string, obeying POSIX rules. */ extern char *string_list_dollar_star __P((WORD_LIST *)); /* Expand $@ into a single string, obeying POSIX rules. */ extern char *string_list_dollar_at __P((WORD_LIST *, int, int)); /* Turn the positional paramters into a string, understanding quoting and the various subtleties of using the first character of $IFS as the separator. Calls string_list_dollar_at, string_list_dollar_star, and string_list as appropriate. */ extern char *string_list_pos_params __P((int, WORD_LIST *, int)); /* Perform quoted null character removal on each element of LIST. This modifies LIST. */ extern void word_list_remove_quoted_nulls __P((WORD_LIST *)); /* This performs word splitting and quoted null character removal on STRING. */ extern WORD_LIST *list_string __P((char *, char *, int)); extern char *ifs_firstchar __P((int *)); extern char *get_word_from_string __P((char **, char *, char **)); extern char *strip_trailing_ifs_whitespace __P((char *, char *, int)); /* Given STRING, an assignment string, get the value of the right side of the `=', and bind it to the left side. If EXPAND is true, then perform tilde expansion, parameter expansion, command substitution, and arithmetic expansion on the right-hand side. Do not perform word splitting on the result of expansion. */ extern int do_assignment __P((char *)); extern int do_assignment_no_expand __P((char *)); extern int do_word_assignment __P((WORD_DESC *, int)); /* Append SOURCE to TARGET at INDEX. SIZE is the current amount of space allocated to TARGET. SOURCE can be NULL, in which case nothing happens. Gets rid of SOURCE by free ()ing it. Returns TARGET in case the location has changed. */ extern char *sub_append_string __P((char *, char *, int *, size_t *)); /* Append the textual representation of NUMBER to TARGET. INDEX and SIZE are as in SUB_APPEND_STRING. */ extern char *sub_append_number __P((intmax_t, char *, int *, int *)); /* Return the word list that corresponds to `$*'. */ extern WORD_LIST *list_rest_of_args __P((void)); /* Make a single large string out of the dollar digit variables, and the rest_of_args. If DOLLAR_STAR is 1, then obey the special case of "$*" with respect to IFS. */ extern char *string_rest_of_args __P((int)); extern int number_of_args __P((void)); /* Expand STRING by performing parameter expansion, command substitution, and arithmetic expansion. Dequote the resulting WORD_LIST before returning it, but do not perform word splitting. The call to remove_quoted_nulls () is made here because word splitting normally takes care of quote removal. */ extern WORD_LIST *expand_string_unsplit __P((char *, int)); /* Expand the rhs of an assignment statement. */ extern WORD_LIST *expand_string_assignment __P((char *, int)); /* Expand a prompt string. */ extern WORD_LIST *expand_prompt_string __P((char *, int, int)); /* Expand STRING just as if you were expanding a word. This also returns a list of words. Note that filename globbing is *NOT* done for word or string expansion, just when the shell is expanding a command. This does parameter expansion, command substitution, arithmetic expansion, and word splitting. Dequote the resultant WORD_LIST before returning. */ extern WORD_LIST *expand_string __P((char *, int)); /* Convenience functions that expand strings to strings, taking care of converting the WORD_LIST * returned by the expand_string* functions to a string and deallocating the WORD_LIST *. */ extern char *expand_string_to_string __P((char *, int)); extern char *expand_string_unsplit_to_string __P((char *, int)); extern char *expand_assignment_string_to_string __P((char *, int)); /* Expand an arithmetic expression string */ extern char *expand_arith_string __P((char *, int)); /* De-quote quoted characters in STRING. */ extern char *dequote_string __P((char *)); /* De-quote CTLESC-escaped CTLESC or CTLNUL characters in STRING. */ extern char *dequote_escapes __P((char *)); /* De-quote quoted characters in each word in LIST. */ extern WORD_LIST *dequote_list __P((WORD_LIST *)); /* Expand WORD, performing word splitting on the result. This does parameter expansion, command substitution, arithmetic expansion, word splitting, and quote removal. */ extern WORD_LIST *expand_word __P((WORD_DESC *, int)); /* Expand WORD, but do not perform word splitting on the result. This does parameter expansion, command substitution, arithmetic expansion, and quote removal. */ extern WORD_LIST *expand_word_unsplit __P((WORD_DESC *, int)); extern WORD_LIST *expand_word_leave_quoted __P((WORD_DESC *, int)); /* Return the value of a positional parameter. This handles values > 10. */ extern char *get_dollar_var_value __P((intmax_t)); /* Quote a string to protect it from word splitting. */ extern char *quote_string __P((char *)); /* Quote escape characters (characters special to interals of expansion) in a string. */ extern char *quote_escapes __P((char *)); /* And remove such quoted special characters. */ extern char *remove_quoted_escapes __P((char *)); /* Remove CTLNUL characters from STRING unless they are quoted with CTLESC. */ extern char *remove_quoted_nulls __P((char *)); /* Perform quote removal on STRING. If QUOTED > 0, assume we are obeying the backslash quoting rules for within double quotes. */ extern char *string_quote_removal __P((char *, int)); /* Perform quote removal on word WORD. This allocates and returns a new WORD_DESC *. */ extern WORD_DESC *word_quote_removal __P((WORD_DESC *, int)); /* Perform quote removal on all words in LIST. If QUOTED is non-zero, the members of the list are treated as if they are surrounded by double quotes. Return a new list, or NULL if LIST is NULL. */ extern WORD_LIST *word_list_quote_removal __P((WORD_LIST *, int)); /* Called when IFS is changed to maintain some private variables. */ extern void setifs __P((SHELL_VAR *)); /* Return the value of $IFS, or " \t\n" if IFS is unset. */ extern char *getifs __P((void)); /* This splits a single word into a WORD LIST on $IFS, but only if the word is not quoted. list_string () performs quote removal for us, even if we don't do any splitting. */ extern WORD_LIST *word_split __P((WORD_DESC *, char *)); /* Take the list of words in LIST and do the various substitutions. Return a new list of words which is the expanded list, and without things like variable assignments. */ extern WORD_LIST *expand_words __P((WORD_LIST *)); /* Same as expand_words (), but doesn't hack variable or environment variables. */ extern WORD_LIST *expand_words_no_vars __P((WORD_LIST *)); /* Perform the `normal shell expansions' on a WORD_LIST. These are brace expansion, tilde expansion, parameter and variable substitution, command substitution, arithmetic expansion, and word splitting. */ extern WORD_LIST *expand_words_shellexp __P((WORD_LIST *)); extern WORD_DESC *command_substitute __P((char *, int)); extern char *pat_subst __P((char *, char *, char *, int)); extern int fifos_pending __P((void)); extern int num_fifos __P((void)); extern void unlink_fifo_list __P((void)); extern void unlink_fifo __P((int)); extern char *copy_fifo_list __P((int *)); extern void unlink_new_fifos __P((char *, int)); extern void close_new_fifos __P((char *, int)); extern void clear_fifo_list __P((void)); extern WORD_LIST *list_string_with_quotes __P((char *)); #if defined (ARRAY_VARS) extern char *extract_array_assignment_list __P((char *, int *)); #endif #if defined (COND_COMMAND) extern char *remove_backslashes __P((char *)); extern char *cond_expand_word __P((WORD_DESC *, int)); #endif /* Flags for skip_to_delim */ #define SD_NOJMP 0x001 /* don't longjmp on fatal error. */ #define SD_INVERT 0x002 /* look for chars NOT in passed set */ #define SD_NOQUOTEDELIM 0x004 /* don't let single or double quotes act as delimiters */ #define SD_NOSKIPCMD 0x008 /* don't skip over $(, <(, or >( command/process substitution; parse them as commands */ #define SD_EXTGLOB 0x010 /* skip over extended globbing patterns if appropriate */ #define SD_IGNOREQUOTE 0x020 /* single and double quotes are not special */ #define SD_GLOB 0x040 /* skip over glob patterns like bracket expressions */ #define SD_NOPROCSUB 0x080 /* don't parse process substitutions as commands */ #define SD_COMPLETE 0x100 /* skip_to_delim during completion */ #define SD_HISTEXP 0x200 /* skip_to_delim during history expansion */ #define SD_ARITHEXP 0x400 /* skip_to_delim during arithmetic expansion */ extern int skip_to_delim __P((char *, int, char *, int)); #if defined (BANG_HISTORY) extern int skip_to_histexp __P((char *, int, char *, int)); #endif #if defined (READLINE) extern int char_is_quoted __P((char *, int)); extern int unclosed_pair __P((char *, int, char *)); extern WORD_LIST *split_at_delims __P((char *, int, char *, int, int, int *, int *)); #endif /* Variables used to keep track of the characters in IFS. */ extern SHELL_VAR *ifs_var; extern char *ifs_value; extern unsigned char ifs_cmap[]; #if defined (HANDLE_MULTIBYTE) extern unsigned char ifs_firstc[]; extern size_t ifs_firstc_len; #else extern unsigned char ifs_firstc; #endif /* Evaluates to 1 if C is a character in $IFS. */ #define isifs(c) (ifs_cmap[(unsigned char)(c)] != 0) /* How to determine the quoted state of the character C. */ #define QUOTED_CHAR(c) ((c) == CTLESC) /* Is the first character of STRING a quoted NULL character? */ #define QUOTED_NULL(string) ((string)[0] == CTLNUL && (string)[1] == '\0') extern void invalidate_cached_quoted_dollar_at __P((void)); #endif /* !_SUBST_H_ */ PKZrrbash/config-bot.hnu[/* config-bot.h */ /* modify settings or make new ones based on what autoconf tells us. */ /* Copyright (C) 1989-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /*********************************************************/ /* Modify or set defines based on the configure results. */ /*********************************************************/ #if !defined (HAVE_VPRINTF) && defined (HAVE_DOPRNT) # define USE_VFPRINTF_EMULATION # define HAVE_VPRINTF #endif #if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT) # define HAVE_RESOURCE #endif #if !defined (GETPGRP_VOID) # define HAVE_BSD_PGRP #endif /* Try this without testing __STDC__ for the time being. */ #if defined (HAVE_STDARG_H) # define PREFER_STDARG # define USE_VARARGS #else # if defined (HAVE_VARARGS_H) # define PREFER_VARARGS # define USE_VARARGS # endif #endif #if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && defined (HAVE_NETINET_IN_H) # define HAVE_NETWORK #endif #if defined (HAVE_REGEX_H) && defined (HAVE_REGCOMP) && defined (HAVE_REGEXEC) # define HAVE_POSIX_REGEXP #endif /* backwards compatibility between different autoconf versions */ #if HAVE_DECL_SYS_SIGLIST && !defined (SYS_SIGLIST_DECLARED) # define SYS_SIGLIST_DECLARED #endif /***********************************************************************/ /* Unset defines based on what configure reports as missing or broken. */ /***********************************************************************/ /* Ultrix botches type-ahead when switching from canonical to non-canonical mode, at least through version 4.3 */ #if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix) # define TERMIOS_MISSING #endif /* If we have a getcwd(3), but one that does not dynamically allocate memory, #undef HAVE_GETCWD so the replacement in getcwd.c will be built. We do not do this on Solaris, because their implementation of loopback mounts breaks the traditional file system assumptions that getcwd uses. */ #if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS) # undef HAVE_GETCWD #endif #if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING) # undef PROCESS_SUBSTITUTION #endif #if defined (JOB_CONTROL_MISSING) # undef JOB_CONTROL #endif #if defined (STRCOLL_BROKEN) # undef HAVE_STRCOLL #endif #if !defined (HAVE_POSIX_REGEXP) # undef COND_REGEXP #endif #if !HAVE_MKSTEMP # undef USE_MKSTEMP #endif /* If the shell is called by this name, it will become restricted. */ #if defined (RESTRICTED_SHELL) # define RESTRICTED_SHELL_NAME "rbash" #endif /***********************************************************/ /* Make sure feature defines have necessary prerequisites. */ /***********************************************************/ /* BANG_HISTORY requires HISTORY. */ #if defined (BANG_HISTORY) && !defined (HISTORY) # define HISTORY #endif /* BANG_HISTORY && !HISTORY */ #if defined (READLINE) && !defined (HISTORY) # define HISTORY #endif #if defined (PROGRAMMABLE_COMPLETION) && !defined (READLINE) # undef PROGRAMMABLE_COMPLETION #endif #if !defined (V9_ECHO) # undef DEFAULT_ECHO_TO_XPG #endif #if !defined (PROMPT_STRING_DECODE) # undef PPROMPT # define PPROMPT "$ " #endif #if !defined (HAVE_SYSLOG) || !defined (HAVE_SYSLOG_H) # undef SYSLOG_HISTORY #endif /************************************************/ /* check multibyte capability for I18N code */ /************************************************/ /* For platforms which support the ISO C amendement 1 functionality we support user defined character classes. */ /* Solaris 2.5 has a bug: must be included before . */ #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) # include # include # if defined (HAVE_ISWCTYPE) && \ defined (HAVE_ISWLOWER) && \ defined (HAVE_ISWUPPER) && \ defined (HAVE_MBSRTOWCS) && \ defined (HAVE_MBRTOWC) && \ defined (HAVE_MBRLEN) && \ defined (HAVE_TOWLOWER) && \ defined (HAVE_TOWUPPER) && \ defined (HAVE_WCHAR_T) && \ defined (HAVE_WCTYPE_T) && \ defined (HAVE_WINT_T) && \ defined (HAVE_WCWIDTH) && \ defined (HAVE_WCTYPE) /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif #endif /* If we don't want multibyte chars even on a system that supports them, let the configuring user turn multibyte support off. */ #if defined (NO_MULTIBYTE_SUPPORT) # undef HANDLE_MULTIBYTE #endif /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) # define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) # define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) # define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) # define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) # define mbrlen(s, n, ps) (mbrlen) (s, n, 0) # define mbstate_t int #endif /* Make sure MB_LEN_MAX is at least 16 (some systems define MB_LEN_MAX as 1) */ #ifdef HANDLE_MULTIBYTE # include # if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) # undef MB_LEN_MAX # endif # if !defined (MB_LEN_MAX) # define MB_LEN_MAX 16 # endif #endif /************************************************/ /* end of multibyte capability checks for I18N */ /************************************************/ /******************************************************************/ /* Placeholder for builders to #undef any unwanted features from */ /* config-top.h or created by configure (such as the default mail */ /* file for mail checking). */ /******************************************************************/ /* If you don't want bash to provide a default mail file to check. */ /* #undef DEFAULT_MAIL_DIRECTORY */ PKZd bash/include/systimes.hnu[/* Copyright (C) 1991, 1992, 1996, 2008,2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* * POSIX Standard: 4.5.2 Process Times */ /* * If we don't have a standard system clock_t type, this must be included * after config.h */ #ifndef _BASH_SYSTIMES_H #define _BASH_SYSTIMES_H 1 #if defined (HAVE_SYS_TIMES_H) # include #else /* !HAVE_SYS_TIMES_H */ #include /* Structure describing CPU time used by a process and its children. */ struct tms { clock_t tms_utime; /* User CPU time. */ clock_t tms_stime; /* System CPU time. */ clock_t tms_cutime; /* User CPU time of dead children. */ clock_t tms_cstime; /* System CPU time of dead children. */ }; /* Store the CPU time used by this process and all its dead descendants in BUFFER. Return the elapsed real time from an arbitrary point in the past (the bash emulation uses the epoch), or (clock_t) -1 for errors. All times are in CLK_TCKths of a second. */ extern clock_t times __P((struct tms *buffer)); #endif /* !HAVE_SYS_TIMES_H */ #endif /* _BASH_SYSTIMES_H */ PKZ51--bash/include/filecntl.hnu[/* filecntl.h - Definitions to set file descriptors to close-on-exec. */ /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_FILECNTL_H_) #define _FILECNTL_H_ #include /* Definitions to set file descriptors to close-on-exec, the Posix way. */ #if !defined (FD_CLOEXEC) #define FD_CLOEXEC 1 #endif #define FD_NCLOEXEC 0 #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC)) #define SET_OPEN_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_NCLOEXEC)) /* How to open a file in non-blocking mode, the Posix.1 way. */ #if !defined (O_NONBLOCK) # if defined (O_NDELAY) # define O_NONBLOCK O_NDELAY # else # define O_NONBLOCK 0 # endif #endif /* Make sure O_BINARY and O_TEXT are defined to avoid Windows-specific code. */ #if !defined (O_BINARY) # define O_BINARY 0 #endif #if !defined (O_TEXT) # define O_TEXT 0 #endif #endif /* ! _FILECNTL_H_ */ PKZj] bash/include/unionwait.hnu[/* unionwait.h -- definitions for using a `union wait' on systems without one. */ /* Copyright (C) 1996 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _UNIONWAIT_H #define _UNIONWAIT_H #if !defined (WORDS_BIGENDIAN) union wait { int w_status; /* used in syscall */ /* Terminated process status. */ struct { unsigned short w_Termsig : 7, /* termination signal */ w_Coredump : 1, /* core dump indicator */ w_Retcode : 8, /* exit code if w_termsig==0 */ w_Fill1 : 16; /* high 16 bits unused */ } w_T; /* Stopped process status. Returned only for traced children unless requested with the WUNTRACED option bit. */ struct { unsigned short w_Stopval : 8, /* == W_STOPPED if stopped */ w_Stopsig : 8, /* actually zero on XENIX */ w_Fill2 : 16; /* high 16 bits unused */ } w_S; }; #else /* WORDS_BIGENDIAN */ /* This is for big-endian machines like the IBM RT, HP 9000, or Sun-3 */ union wait { int w_status; /* used in syscall */ /* Terminated process status. */ struct { unsigned short w_Fill1 : 16; /* high 16 bits unused */ unsigned w_Retcode : 8; /* exit code if w_termsig==0 */ unsigned w_Coredump : 1; /* core dump indicator */ unsigned w_Termsig : 7; /* termination signal */ } w_T; /* Stopped process status. Returned only for traced children unless requested with the WUNTRACED option bit. */ struct { unsigned short w_Fill2 : 16; /* high 16 bits unused */ unsigned w_Stopsig : 8; /* signal that stopped us */ unsigned w_Stopval : 8; /* == W_STOPPED if stopped */ } w_S; }; #endif /* WORDS_BIGENDIAN */ #define w_termsig w_T.w_Termsig #define w_coredump w_T.w_Coredump #define w_retcode w_T.w_Retcode #define w_stopval w_S.w_Stopval #define w_stopsig w_S.w_Stopsig #define WSTOPPED 0177 #define WIFSTOPPED(x) ((x).w_stopval == WSTOPPED) #define WIFEXITED(x) ((x).w_stopval != WSTOPPED && (x).w_termsig == 0) #define WIFSIGNALED(x) ((x).w_stopval != WSTOPPED && (x).w_termsig != 0) #define WTERMSIG(x) ((x).w_termsig) #define WSTOPSIG(x) ((x).w_stopsig) #define WEXITSTATUS(x) ((x).w_retcode) #define WIFCORED(x) ((x).w_coredump) #endif /* _UNIONWAIT_H */ PKZ`^bash/include/memalloc.hnu[/* memalloc.h -- consolidate code for including alloca.h or malloc.h and defining alloca. */ /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_MEMALLOC_H_) # define _MEMALLOC_H_ #if defined (sparc) && defined (sun) && !defined (HAVE_ALLOCA_H) # define HAVE_ALLOCA_H #endif #if defined (__GNUC__) && !defined (HAVE_ALLOCA) # define HAVE_ALLOCA #endif #if defined (HAVE_ALLOCA_H) && !defined (HAVE_ALLOCA) && !defined (C_ALLOCA) # define HAVE_ALLOCA #endif /* HAVE_ALLOCA_H && !HAVE_ALLOCA */ #if defined (__GNUC__) && !defined (C_ALLOCA) # undef alloca # define alloca __builtin_alloca #else /* !__GNUC__ || C_ALLOCA */ # if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA) # if defined (IBMESA) # include # else /* !IBMESA */ # include # endif /* !IBMESA */ # else /* !HAVE_ALLOCA_H || C_ALLOCA */ # if defined (__hpux) && defined (__STDC__) && !defined (alloca) extern void *alloca (); # else # if !defined (alloca) # if defined (__STDC__) extern void *alloca (size_t); # else extern char *alloca (); # endif /* !__STDC__ */ # endif /* !alloca */ # endif /* !__hpux || !__STDC__ && !alloca */ # endif /* !HAVE_ALLOCA_H || C_ALLOCA */ #endif /* !__GNUC__ || C_ALLOCA */ #endif /* _MEMALLOC_H_ */ PKZ*bash/include/posixstat.hnu[/* posixstat.h -- Posix stat(2) definitions for systems that don't have them. */ /* Copyright (C) 1987,1991 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* This file should be included instead of . It relies on the local sys/stat.h to work though. */ #if !defined (_POSIXSTAT_H_) #define _POSIXSTAT_H_ #include #if defined (STAT_MACROS_BROKEN) # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISREG # undef S_ISLNK #endif /* STAT_MACROS_BROKEN */ /* These are guaranteed to work only on isc386 */ #if !defined (S_IFDIR) && !defined (S_ISDIR) # define S_IFDIR 0040000 #endif /* !S_IFDIR && !S_ISDIR */ #if !defined (S_IFMT) # define S_IFMT 0170000 #endif /* !S_IFMT */ /* Posix 1003.1 5.6.1.1 file types */ /* Some Posix-wannabe systems define _S_IF* macros instead of S_IF*, but do not provide the S_IS* macros that Posix requires. */ #if defined (_S_IFMT) && !defined (S_IFMT) #define S_IFMT _S_IFMT #endif #if defined (_S_IFIFO) && !defined (S_IFIFO) #define S_IFIFO _S_IFIFO #endif #if defined (_S_IFCHR) && !defined (S_IFCHR) #define S_IFCHR _S_IFCHR #endif #if defined (_S_IFDIR) && !defined (S_IFDIR) #define S_IFDIR _S_IFDIR #endif #if defined (_S_IFBLK) && !defined (S_IFBLK) #define S_IFBLK _S_IFBLK #endif #if defined (_S_IFREG) && !defined (S_IFREG) #define S_IFREG _S_IFREG #endif #if defined (_S_IFLNK) && !defined (S_IFLNK) #define S_IFLNK _S_IFLNK #endif #if defined (_S_IFSOCK) && !defined (S_IFSOCK) #define S_IFSOCK _S_IFSOCK #endif /* Test for each symbol individually and define the ones necessary (some systems claiming Posix compatibility define some but not all). */ #if defined (S_IFBLK) && !defined (S_ISBLK) #define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ #endif #if defined (S_IFCHR) && !defined (S_ISCHR) #define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ #endif #if defined (S_IFDIR) && !defined (S_ISDIR) #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ #endif #if defined (S_IFREG) && !defined (S_ISREG) #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ #endif #if defined (S_IFIFO) && !defined (S_ISFIFO) #define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ #endif #if defined (S_IFLNK) && !defined (S_ISLNK) #define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ #endif #if defined (S_IFSOCK) && !defined (S_ISSOCK) #define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ #endif /* * POSIX 1003.1 5.6.1.2 File Modes */ #if !defined (S_IRWXU) # if !defined (S_IREAD) # define S_IREAD 00400 # define S_IWRITE 00200 # define S_IEXEC 00100 # endif /* S_IREAD */ # if !defined (S_IRUSR) # define S_IRUSR S_IREAD /* read, owner */ # define S_IWUSR S_IWRITE /* write, owner */ # define S_IXUSR S_IEXEC /* execute, owner */ # define S_IRGRP (S_IREAD >> 3) /* read, group */ # define S_IWGRP (S_IWRITE >> 3) /* write, group */ # define S_IXGRP (S_IEXEC >> 3) /* execute, group */ # define S_IROTH (S_IREAD >> 6) /* read, other */ # define S_IWOTH (S_IWRITE >> 6) /* write, other */ # define S_IXOTH (S_IEXEC >> 6) /* execute, other */ # endif /* !S_IRUSR */ # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* !S_IRWXU */ /* These are non-standard, but are used in builtins.c$symbolic_umask() */ #define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) #define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif /* _POSIXSTAT_H_ */ PKZbash/include/chartypes.hnu[/* chartypes.h -- extend ctype.h */ /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _SH_CHARTYPES_H #define _SH_CHARTYPES_H #include /* Jim Meyering writes: "... Some ctype macros are valid only for character codes that isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when using /bin/cc or gcc but without giving an ansi option). So, all ctype uses should be through macros like ISPRINT... If STDC_HEADERS is defined, then autoconf has verified that the ctype macros don't need to be guarded with references to isascii. ... Defining IN_CTYPE_DOMAIN to 1 should let any compiler worth its salt eliminate the && through constant folding." Solaris defines some of these symbols so we must undefine them first. */ #if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII) # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif #if !defined (isspace) && !defined (HAVE_ISSPACE) # define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\f') #endif #if !defined (isprint) && !defined (HAVE_ISPRINT) # define isprint(c) (isalpha((unsigned char)c) || isdigit((unsigned char)c) || ispunct((unsigned char)c)) #endif #if defined (isblank) || defined (HAVE_ISBLANK) # define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank ((unsigned char)c)) #else # define ISBLANK(c) ((c) == ' ' || (c) == '\t') #endif #if defined (isgraph) || defined (HAVE_ISGRAPH) # define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c)) #else # define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c) && !isspace ((unsigned char)c)) #endif #if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) # define isxdigit(c) (((c) >= '0' && (c) <= '9') || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) #endif #undef ISPRINT #define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint ((unsigned char)c)) #define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit ((unsigned char)c)) #define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum ((unsigned char)c)) #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha ((unsigned char)c)) #define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl ((unsigned char)c)) #define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower ((unsigned char)c)) #define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct ((unsigned char)c)) #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace ((unsigned char)c)) #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper ((unsigned char)c)) #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit ((unsigned char)c)) #define ISLETTER(c) (ISALPHA(c)) #define DIGIT(c) ((c) >= '0' && (c) <= '9') #define ISWORD(c) (ISLETTER(c) || DIGIT(c) || ((c) == '_')) #define HEXVALUE(c) \ (((c) >= 'a' && (c) <= 'f') \ ? (c)-'a'+10 \ : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') #ifndef ISOCTAL # define ISOCTAL(c) ((c) >= '0' && (c) <= '7') #endif #define OCTVALUE(c) ((c) - '0') #define TODIGIT(c) ((c) - '0') #define TOCHAR(c) ((c) + '0') #define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c)) #define TOUPPER(c) (ISLOWER(c) ? toupper(c) : (c)) #ifndef TOCTRL /* letter to control char -- ASCII. The TOUPPER is in there so \ce and \cE will map to the same character in $'...' expansions. */ # define TOCTRL(x) ((x) == '?' ? 0x7f : (TOUPPER(x) & 0x1f)) #endif #ifndef UNCTRL /* control char to letter -- ASCII */ # define UNCTRL(x) (TOUPPER(x) ^ 0x40) #endif #endif /* _SH_CHARTYPES_H */ PKZ'3'3bash/include/shmbutil.hnu[/* shmbutil.h -- utility functions for multibyte characters. */ /* Copyright (C) 2002-2004 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_SH_MBUTIL_H_) #define _SH_MBUTIL_H_ #include "stdc.h" /* Include config.h for HANDLE_MULTIBYTE */ #include #if defined (HANDLE_MULTIBYTE) #include "shmbchar.h" extern size_t xmbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *)); extern size_t xdupmbstowcs __P((wchar_t **, char ***, const char *)); extern size_t mbstrlen __P((const char *)); extern char *xstrchr __P((const char *, int)); extern int locale_mb_cur_max; /* XXX */ #ifndef MB_INVALIDCH #define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) #define MB_NULLWCH(x) ((x) == 0) #endif #define MBSLEN(s) (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0) #define MB_STRLEN(s) ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s)) #define MBLEN(s, n) ((MB_CUR_MAX > 1) ? mblen ((s), (n)) : 1) #define MBRLEN(s, n, p) ((MB_CUR_MAX > 1) ? mbrlen ((s), (n), (p)) : 1) #else /* !HANDLE_MULTIBYTE */ #undef MB_LEN_MAX #undef MB_CUR_MAX #define MB_LEN_MAX 1 #define MB_CUR_MAX 1 #undef xstrchr #define xstrchr(s, c) strchr(s, c) #ifndef MB_INVALIDCH #define MB_INVALIDCH(x) (0) #define MB_NULLWCH(x) (0) #endif #define MB_STRLEN(s) (STRLEN(s)) #define MBLEN(s, n) 1 #define MBRLEN(s, n, p) 1 #ifndef wchar_t # define wchar_t int #endif #endif /* !HANDLE_MULTIBYTE */ /* Declare and initialize a multibyte state. Call must be terminated with `;'. */ #if defined (HANDLE_MULTIBYTE) # define DECLARE_MBSTATE \ mbstate_t state; \ memset (&state, '\0', sizeof (mbstate_t)) #else # define DECLARE_MBSTATE #endif /* !HANDLE_MULTIBYTE */ /* Initialize or reinitialize a multibyte state named `state'. Call must be terminated with `;'. */ #if defined (HANDLE_MULTIBYTE) # define INITIALIZE_MBSTATE memset (&state, '\0', sizeof (mbstate_t)) #else # define INITIALIZE_MBSTATE #endif /* !HANDLE_MULTIBYTE */ /* Advance one (possibly multi-byte) character in string _STR of length _STRSIZE, starting at index _I. STATE must have already been declared. */ #if defined (HANDLE_MULTIBYTE) # define ADVANCE_CHAR(_str, _strsize, _i) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _f; \ \ _f = is_basic ((_str)[_i]); \ if (_f) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_str) + (_i), (_strsize) - (_i), &state); \ } \ \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ (_i)++; \ } \ else if (mblength == 0) \ (_i)++; \ else \ (_i) += mblength; \ } \ else \ (_i)++; \ } \ while (0) #else # define ADVANCE_CHAR(_str, _strsize, _i) (_i)++ #endif /* !HANDLE_MULTIBYTE */ /* Advance one (possibly multibyte) character in the string _STR of length _STRSIZE. SPECIAL: assume that _STR will be incremented by 1 after this call. */ #if defined (HANDLE_MULTIBYTE) # define ADVANCE_CHAR_P(_str, _strsize) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _f; \ \ _f = is_basic (*(_str)); \ if (_f) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_str), (_strsize), &state); \ } \ \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ mblength = 1; \ } \ else \ (_str) += (mblength < 1) ? 0 : (mblength - 1); \ } \ } \ while (0) #else # define ADVANCE_CHAR_P(_str, _strsize) #endif /* !HANDLE_MULTIBYTE */ /* Back up one (possibly multi-byte) character in string _STR of length _STRSIZE, starting at index _I. STATE must have already been declared. */ #if defined (HANDLE_MULTIBYTE) # define BACKUP_CHAR(_str, _strsize, _i) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _x, _p; /* _x == temp index into string, _p == prev index */ \ \ _x = _p = 0; \ while (_x < (_i)) \ { \ state_bak = state; \ mblength = mbrlen ((_str) + (_x), (_strsize) - (_x), &state); \ \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ _x++; \ } \ else if (mblength == 0) \ _x++; \ else \ { \ _p = _x; /* _p == start of prev mbchar */ \ _x += mblength; \ } \ } \ (_i) = _p; \ } \ else \ (_i)--; \ } \ while (0) #else # define BACKUP_CHAR(_str, _strsize, _i) (_i)-- #endif /* !HANDLE_MULTIBYTE */ /* Back up one (possibly multibyte) character in the string _BASE of length _STRSIZE starting at _STR (_BASE <= _STR <= (_BASE + _STRSIZE) ). SPECIAL: DO NOT assume that _STR will be decremented by 1 after this call. */ #if defined (HANDLE_MULTIBYTE) # define BACKUP_CHAR_P(_base, _strsize, _str) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ char *_x, _p; /* _x == temp pointer into string, _p == prev pointer */ \ \ _x = _p = _base; \ while (_x < (_str)) \ { \ state_bak = state; \ mblength = mbrlen (_x, (_strsize) - _x, &state); \ \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ _x++; \ } \ else if (mblength == 0) \ _x++; \ else \ { \ _p = _x; /* _p == start of prev mbchar */ \ _x += mblength; \ } \ } \ (_str) = _p; \ } \ else \ (_str)--; \ } \ while (0) #else # define BACKUP_CHAR_P(_base, _strsize, _str) (_str)-- #endif /* !HANDLE_MULTIBYTE */ /* Copy a single character from the string _SRC to the string _DST. _SRCEND is a pointer to the end of _SRC. */ #if defined (HANDLE_MULTIBYTE) # define COPY_CHAR_P(_dst, _src, _srcend) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _k; \ \ _k = is_basic (*(_src)); \ if (_k) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_src), (_srcend) - (_src), &state); \ } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ mblength = 1; \ } \ else \ mblength = (mblength < 1) ? 1 : mblength; \ \ for (_k = 0; _k < mblength; _k++) \ *(_dst)++ = *(_src)++; \ } \ else \ *(_dst)++ = *(_src)++; \ } \ while (0) #else # define COPY_CHAR_P(_dst, _src, _srcend) *(_dst)++ = *(_src)++ #endif /* !HANDLE_MULTIBYTE */ /* Copy a single character from the string _SRC at index _SI to the string _DST at index _DI. _SRCEND is a pointer to the end of _SRC. */ #if defined (HANDLE_MULTIBYTE) # define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _k; \ \ _k = is_basic (*((_src) + (_si))); \ if (_k) \ mblength = 1; \ else \ {\ state_bak = state; \ mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src)+(_si)), &state); \ } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ mblength = 1; \ } \ else \ mblength = (mblength < 1) ? 1 : mblength; \ \ for (_k = 0; _k < mblength; _k++) \ _dst[_di++] = _src[_si++]; \ } \ else \ _dst[_di++] = _src[_si++]; \ } \ while (0) #else # define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) _dst[_di++] = _src[_si++] #endif /* !HANDLE_MULTIBYTE */ /**************************************************************** * * * The following are only guaranteed to work in subst.c * * * ****************************************************************/ #if defined (HANDLE_MULTIBYTE) # define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _i; \ \ _i = is_basic (*((_src) + (_si))); \ if (_i) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_src) + (_si), (_slen) - (_si), &state); \ } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ mblength = 1; \ } \ else \ mblength = (mblength < 1) ? 1 : mblength; \ \ temp = xmalloc (mblength + 2); \ temp[0] = _escchar; \ for (_i = 0; _i < mblength; _i++) \ temp[_i + 1] = _src[_si++]; \ temp[mblength + 1] = '\0'; \ \ goto add_string; \ } \ else \ { \ _dst[0] = _escchar; \ _dst[1] = _sc; \ } \ } \ while (0) #else # define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \ _dst[0] = _escchar; \ _dst[1] = _sc #endif /* !HANDLE_MULTIBYTE */ #if defined (HANDLE_MULTIBYTE) # define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ mbstate_t state_bak; \ size_t mblength; \ int _i; \ \ _i = is_basic (*((_src) + (_si))); \ if (_i) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src) + (_si)), &state); \ } \ if (mblength == (size_t)-2 || mblength == (size_t)-1) \ { \ state = state_bak; \ mblength = 1; \ } \ else \ mblength = (mblength < 1) ? 1 : mblength; \ \ FASTCOPY(((_src) + (_si)), (_dst), mblength); \ \ (_dst) += mblength; \ (_si) += mblength; \ } \ else \ { \ *(_dst)++ = _src[(_si)]; \ (_si)++; \ } \ } \ while (0) #else # define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \ *(_dst)++ = _src[(_si)]; \ (_si)++ #endif /* !HANDLE_MULTIBYTE */ #if HANDLE_MULTIBYTE # define SADD_MBCHAR(_dst, _src, _si, _srcsize) \ do \ { \ if (locale_mb_cur_max > 1) \ { \ int i; \ mbstate_t state_bak; \ size_t mblength; \ \ i = is_basic (*((_src) + (_si))); \ if (i) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ } \ if (mblength == (size_t)-1 || mblength == (size_t)-2) \ { \ state = state_bak; \ mblength = 1; \ } \ if (mblength < 1) \ mblength = 1; \ \ _dst = (char *)xmalloc (mblength + 1); \ for (i = 0; i < mblength; i++) \ (_dst)[i] = (_src)[(_si)++]; \ (_dst)[mblength] = '\0'; \ \ goto add_string; \ } \ } \ while (0) #else # define SADD_MBCHAR(_dst, _src, _si, _srcsize) #endif /* Watch out when using this -- it's just straight textual substitution */ #if defined (HANDLE_MULTIBYTE) # define SADD_MBQCHAR_BODY(_dst, _src, _si, _srcsize) \ \ int i; \ mbstate_t state_bak; \ size_t mblength; \ \ i = is_basic (*((_src) + (_si))); \ if (i) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ } \ if (mblength == (size_t)-1 || mblength == (size_t)-2) \ { \ state = state_bak; \ mblength = 1; \ } \ if (mblength < 1) \ mblength = 1; \ \ (_dst) = (char *)xmalloc (mblength + 2); \ (_dst)[0] = CTLESC; \ for (i = 0; i < mblength; i++) \ (_dst)[i+1] = (_src)[(_si)++]; \ (_dst)[mblength+1] = '\0'; \ \ goto add_string # define SADD_MBCHAR_BODY(_dst, _src, _si, _srcsize) \ \ int i; \ mbstate_t state_bak; \ size_t mblength; \ \ i = is_basic (*((_src) + (_si))); \ if (i) \ mblength = 1; \ else \ { \ state_bak = state; \ mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \ } \ if (mblength == (size_t)-1 || mblength == (size_t)-2) \ { \ state = state_bak; \ mblength = 1; \ } \ if (mblength < 1) \ mblength = 1; \ \ (_dst) = (char *)xmalloc (mblength + 1); \ for (i = 0; i < mblength; i++) \ (_dst)[i+1] = (_src)[(_si)++]; \ (_dst)[mblength+1] = '\0'; \ \ goto add_string #endif /* HANDLE_MULTIBYTE */ #endif /* _SH_MBUTIL_H_ */ PKZ  bash/include/posixdir.hnu[/* posixdir.h -- Posix directory reading includes and defines. */ /* Copyright (C) 1987,1991,2012 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* This file should be included instead of or . */ #if !defined (_POSIXDIR_H_) #define _POSIXDIR_H_ #if defined (HAVE_DIRENT_H) # include # if defined (HAVE_STRUCT_DIRENT_D_NAMLEN) # define D_NAMLEN(d) ((d)->d_namlen) # else # define D_NAMLEN(d) (strlen ((d)->d_name)) # endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */ #else # if defined (HAVE_SYS_NDIR_H) # include # endif # if defined (HAVE_SYS_DIR_H) # include # endif # if defined (HAVE_NDIR_H) # include # endif # if !defined (dirent) # define dirent direct # endif /* !dirent */ # define D_NAMLEN(d) ((d)->d_namlen) #endif /* !HAVE_DIRENT_H */ /* The bash code fairly consistenly uses d_fileno; make sure it's available */ #if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO) # define d_fileno d_ino #endif /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ #if !defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO) # define REAL_DIR_ENTRY(dp) 1 #else # define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) #endif /* _POSIX_SOURCE */ #if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (BROKEN_DIRENT_D_INO) # define D_INO_AVAILABLE #endif /* Signal the rest of the code that it can safely use dirent.d_fileno */ #if defined (D_INO_AVAILABLE) || defined (HAVE_STRUCT_DIRENT_D_FILENO) # define D_FILENO_AVAILABLE 1 #endif #endif /* !_POSIXDIR_H_ */ PKZGQm bash/include/gettext.hnu[/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2008,2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne-Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String #endif /* _LIBGETTEXT_H */ PKZ fyUUbash/include/ocache.hnu[/* ocache.h -- a minimal object caching implementation. */ /* Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_OCACHE_H_) #define _OCACHE_H_ 1 #ifndef PTR_T #if defined (__STDC__) # define PTR_T void * #else # define PTR_T char * #endif #endif /* PTR_T */ #define OC_MEMSET(memp, xch, nbytes) \ do { \ if ((nbytes) <= 32) { \ register char * mzp = (char *)(memp); \ unsigned long mctmp = (nbytes); \ register long mcn; \ if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \ switch (mctmp) { \ case 0: for(;;) { *mzp++ = xch; \ case 7: *mzp++ = xch; \ case 6: *mzp++ = xch; \ case 5: *mzp++ = xch; \ case 4: *mzp++ = xch; \ case 3: *mzp++ = xch; \ case 2: *mzp++ = xch; \ case 1: *mzp++ = xch; if(mcn <= 0) break; mcn--; } \ } \ } else \ memset ((memp), (xch), (nbytes)); \ } while(0) typedef struct objcache { PTR_T data; int cs; /* cache size, number of objects */ int nc; /* number of cache entries */ } sh_obj_cache_t; /* Create an object cache C of N pointers to OTYPE. */ #define ocache_create(c, otype, n) \ do { \ (c).data = xmalloc((n) * sizeof (otype *)); \ (c).cs = (n); \ (c).nc = 0; \ } while (0) /* Destroy an object cache C. */ #define ocache_destroy(c) \ do { \ if ((c).data) \ xfree ((c).data); \ (c).data = 0; \ (c).cs = (c).nc = 0; \ } while (0) /* Free all cached items, which are pointers to OTYPE, in object cache C. */ #define ocache_flush(c, otype) \ do { \ while ((c).nc > 0) \ xfree (((otype **)((c).data))[--(c).nc]); \ } while (0) /* * Allocate a new item of type pointer to OTYPE, using data from object * cache C if any cached items exist, otherwise calling xmalloc. Return * the object in R. */ #define ocache_alloc(c, otype, r) \ do { \ if ((c).nc > 0) { \ (r) = (otype *)((otype **)((c).data))[--(c).nc]; \ } else \ (r) = (otype *)xmalloc (sizeof (otype)); \ } while (0) /* * Free an item R of type pointer to OTYPE, adding to object cache C if * there is room and calling xfree if the cache is full. If R is added * to the object cache, the contents are scrambled. */ #define ocache_free(c, otype, r) \ do { \ if ((c).nc < (c).cs) { \ OC_MEMSET ((r), 0xdf, sizeof(otype)); \ ((otype **)((c).data))[(c).nc++] = (r); \ } else \ xfree (r); \ } while (0) /* * One may declare and use an object cache as (for instance): * * sh_obj_cache_t wdcache = {0, 0, 0}; * sh_obj_cache_t wlcache = {0, 0, 0}; * * ocache_create(wdcache, WORD_DESC, 30); * ocache_create(wlcache, WORD_LIST, 30); * * WORD_DESC *wd; * ocache_alloc (wdcache, WORD_DESC, wd); * * WORD_LIST *wl; * ocache_alloc (wlcache, WORD_LIST, wl); * * ocache_free(wdcache, WORD_DESC, wd); * ocache_free(wlcache, WORD_LIST, wl); * * The use is almost arbitrary. */ #endif /* _OCACHE_H */ PKZݝbash/include/ansi_stdlib.hnu[/* ansi_stdlib.h -- An ANSI Standard stdlib.h. */ /* A minimal stdlib.h containing extern declarations for those functions that bash uses. */ /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_STDLIB_H_) #define _STDLIB_H_ 1 /* String conversion functions. */ extern int atoi (); extern double atof (); extern double strtod (); /* Memory allocation functions. */ /* Generic pointer type. */ #ifndef PTR_T #if defined (__STDC__) # define PTR_T void * #else # define PTR_T char * #endif #endif /* PTR_T */ extern PTR_T malloc (); extern PTR_T realloc (); extern void free (); /* Other miscellaneous functions. */ extern void abort (); extern void exit (); extern char *getenv (); extern void qsort (); #endif /* _STDLIB_H */ PKZzbash/include/posixjmp.hnu[/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ /* Copyright (C) 1987,1991-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _POSIXJMP_H_ #define _POSIXJMP_H_ #include /* This *must* be included *after* config.h */ #if defined (HAVE_POSIX_SIGSETJMP) # define procenv_t sigjmp_buf # define setjmp_nosigs(x) sigsetjmp((x), 0) # define setjmp_sigs(x) sigsetjmp((x), 1) # define _rl_longjmp(x, n) siglongjmp((x), (n)) # define sh_longjmp(x, n) siglongjmp((x), (n)) #else # define procenv_t jmp_buf # define setjmp_nosigs setjmp # define setjmp_sigs setjmp # define _rl_longjmp(x, n) longjmp((x), (n)) # define sh_longjmp(x, n) longjmp((x), (n)) #endif #endif /* _POSIXJMP_H_ */ PKZw6 J J bash/include/typemax.hnu[/* typemax.h -- encapsulate max values for long, long long, etc. */ /* Copyright (C) 2001 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* * NOTE: This should be included after config.h, limits.h, stdint.h, and * inttypes.h */ #ifndef _SH_TYPEMAX_H #define _SH_TYPEMAX_H #ifndef CHAR_BIT # define CHAR_BIT 8 #endif /* Nonzero if the integer type T is signed. */ #ifndef TYPE_SIGNED # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) #endif #ifndef TYPE_SIGNED_MAGNITUDE # define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) #endif #ifndef TYPE_WIDTH # define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) #endif #ifndef TYPE_MINIMUM # define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) #endif #ifndef TYPE_MAXIMUM # define TYPE_MAXIMUM(t) \ ((t) (! TYPE_SIGNED (t) \ ? (t) -1 \ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) #endif #ifdef HAVE_LONG_LONG # ifndef LLONG_MAX # define LLONG_MAX TYPE_MAXIMUM(long long int) # define LLONG_MIN TYPE_MINIMUM(long long int) # endif # ifndef ULLONG_MAX # define ULLONG_MAX TYPE_MAXIMUM(unsigned long long int) # endif #endif #ifndef ULONG_MAX # define ULONG_MAX ((unsigned long) ~(unsigned long) 0) #endif #ifndef LONG_MAX # define LONG_MAX ((long int) (ULONG_MAX >> 1)) # define LONG_MIN ((long int) (-LONG_MAX - 1L)) #endif #ifndef INT_MAX /* ouch */ # define INT_MAX TYPE_MAXIMUM(int) # define INT_MIN TYPE_MINIMUM(int) # define UINT_MAX ((unsigned int) ~(unsigned int)0) #endif /* workaround for gcc bug in versions < 2.7 */ #if defined (HAVE_LONG_LONG) && __GNUC__ == 2 && __GNUC_MINOR__ < 7 static const unsigned long long int maxquad = ULLONG_MAX; # undef ULLONG_MAX # define ULLONG_MAX maxquad #endif #if !defined (INTMAX_MAX) || !defined (INTMAX_MIN) #if SIZEOF_INTMAX_T == SIZEOF_LONG_LONG # define INTMAX_MAX LLONG_MAX # define INTMAX_MIN LLONG_MIN #elif SIZEOF_INTMAX_T == SIZEOF_LONG # define INTMAX_MAX LONG_MAX # define INTMAX_MIN LONG_MIN #else # define INTMAX_MAX INT_MAX # define INTMAX_MIN INT_MIN #endif #endif #ifndef SSIZE_MAX # define SSIZE_MAX 32767 /* POSIX minimum max */ #endif #ifndef SIZE_MAX # define SIZE_MAX 65535 /* POSIX minimum max */ #endif #endif /* _SH_TYPEMAX_H */ PKZfWAAbash/include/maxpath.hnu[/* maxpath.h - Find out what this system thinks PATH_MAX and NAME_MAX are. */ /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_MAXPATH_H_) #define _MAXPATH_H_ /* These values are supposed to be in or one of the files it includes. */ #if defined (HAVE_LIMITS_H) # include #endif /* !HAVE_LIMITS_H */ /* If PATH_MAX is not defined, look for MAXPATHLEN */ #if !defined (PATH_MAX) # if defined (HAVE_SYS_PARAM_H) # include # define maxpath_param_h # endif # if defined (MAXPATHLEN) && !defined (PATH_MAX) # define PATH_MAX MAXPATHLEN # endif /* MAXPATHLEN && !PATH_MAX */ #endif /* !PATH_MAX */ /* If NAME_MAX is not defined, look for MAXNAMLEN */ #if !defined (NAME_MAX) # if defined (HAVE_SYS_PARAM_H) && !defined (maxpath_param_h) # include # endif # if defined (MAXNAMLEN) && !defined (NAME_MAX) # define NAME_MAX MAXNAMLEN # endif /* MAXNAMLEN && !NAME_MAX */ #endif /* !NAME_MAX */ /* Default POSIX values */ #if !defined (PATH_MAX) && defined (_POSIX_PATH_MAX) # define PATH_MAX _POSIX_PATH_MAX #endif #if !defined (NAME_MAX) && defined (_POSIX_NAME_MAX) # define NAME_MAX _POSIX_NAME_MAX #endif /* Default values */ #if !defined (PATH_MAX) # define PATH_MAX 1024 #endif #if !defined (NAME_MAX) # define NAME_MAX 14 #endif #if PATH_MAX < 1024 # undef PATH_MAX # define PATH_MAX 1024 #endif #endif /* _MAXPATH_H_ */ PKZ*/,44bash/include/shtty.hnu[/* Copyright (C) 1999 Free Software Foundation, Inc. */ /* This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* * shtty.h -- include the correct system-dependent files to manipulate the * tty */ #ifndef __SH_TTY_H_ #define __SH_TTY_H_ #include "stdc.h" #if defined (_POSIX_VERSION) && defined (HAVE_TERMIOS_H) && defined (HAVE_TCGETATTR) && !defined (TERMIOS_MISSING) # define TERMIOS_TTY_DRIVER #else # if defined (HAVE_TERMIO_H) # define TERMIO_TTY_DRIVER # else # define NEW_TTY_DRIVER # endif #endif /* * The _POSIX_SOURCE define is to avoid multiple symbol definitions * between sys/ioctl.h and termios.h. Ditto for the test against SunOS4 * and the undefining of several symbols. */ #ifdef TERMIOS_TTY_DRIVER # if (defined (SunOS4) || defined (SunOS5)) && !defined (_POSIX_SOURCE) # define _POSIX_SOURCE # endif # if defined (SunOS4) # undef ECHO # undef NOFLSH # undef TOSTOP # endif /* SunOS4 */ # include # define TTYSTRUCT struct termios #else # ifdef TERMIO_TTY_DRIVER # include # define TTYSTRUCT struct termio # else /* NEW_TTY_DRIVER */ # include # define TTYSTRUCT struct sgttyb # endif #endif /* Functions imported from lib/sh/shtty.c */ /* Get and set terminal attributes for the file descriptor passed as an argument. */ extern int ttgetattr __P((int, TTYSTRUCT *)); extern int ttsetattr __P((int, TTYSTRUCT *)); /* Save and restore the terminal's attributes from static storage. */ extern void ttsave __P((void)); extern void ttrestore __P((void)); /* Return the attributes corresponding to the file descriptor (0 or 1) passed as an argument. */ extern TTYSTRUCT *ttattr __P((int)); /* These functions only operate on the passed TTYSTRUCT; they don't actually change anything with the kernel's current tty settings. */ extern int tt_setonechar __P((TTYSTRUCT *)); extern int tt_setnoecho __P((TTYSTRUCT *)); extern int tt_seteightbit __P((TTYSTRUCT *)); extern int tt_setnocanon __P((TTYSTRUCT *)); extern int tt_setcbreak __P((TTYSTRUCT *)); /* These functions are all generally mutually exclusive. If you call more than one (bracketed with calls to ttsave and ttrestore, of course), the right thing will happen, but more system calls will be executed than absolutely necessary. You can do all of this yourself with the other functions; these are only conveniences. */ /* These functions work with a given file descriptor and set terminal attributes */ extern int ttfd_onechar __P((int, TTYSTRUCT *)); extern int ttfd_noecho __P((int, TTYSTRUCT *)); extern int ttfd_eightbit __P((int, TTYSTRUCT *)); extern int ttfd_nocanon __P((int, TTYSTRUCT *)); extern int ttfd_cbreak __P((int, TTYSTRUCT *)); /* These functions work with fd 0 and the TTYSTRUCT saved with ttsave () */ extern int ttonechar __P((void)); extern int ttnoecho __P((void)); extern int tteightbit __P((void)); extern int ttnocanon __P((void)); extern int ttcbreak __P((void)); #endif PKZsbash/include/posixtime.hnu[/* posixtime.h -- wrapper for time.h, sys/times.h mess. */ /* Copyright (C) 1999 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _POSIXTIME_H_ #define _POSIXTIME_H_ /* include this after config.h */ /* Some systems require this, mostly for the definition of `struct timezone'. For example, Dynix/ptx has that definition in rather than sys/time.h */ #if defined (TIME_WITH_SYS_TIME) # include # include #else # if defined (HAVE_SYS_TIME_H) # include # else # include # endif #endif #if !defined (HAVE_SYSCONF) || !defined (_SC_CLK_TCK) # if !defined (CLK_TCK) # if defined (HZ) # define CLK_TCK HZ # else # define CLK_TCK 60 /* 60HZ */ # endif # endif /* !CLK_TCK */ #endif /* !HAVE_SYSCONF && !_SC_CLK_TCK */ #endif /* _POSIXTIME_H_ */ PKZCi/ / bash/include/stdc.hnu[/* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_STDC_H_) #define _STDC_H_ /* Adapted from BSD /usr/include/sys/cdefs.h. */ /* A function can be defined using prototypes and compile on both ANSI C and traditional C compilers with something like this: extern char *func __P((char *, char *, int)); */ #if !defined (__P) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES) # define __P(protos) protos # else # define __P(protos) () # endif #endif /* Fortify, at least, has trouble with this definition */ #if defined (HAVE_STRINGIZE) # define CPP_STRING(x) #x #else # define CPP_STRING(x) "x" #endif #if !defined (__STDC__) #if defined (__GNUC__) /* gcc with -traditional */ # if !defined (signed) # define signed __signed # endif # if !defined (volatile) # define volatile __volatile # endif #else /* !__GNUC__ */ # if !defined (inline) # define inline # endif # if !defined (signed) # define signed # endif # if !defined (volatile) # define volatile # endif #endif /* !__GNUC__ */ #endif /* !__STDC__ */ #ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif #endif /* For those situations when gcc handles inlining a particular function but other compilers complain. */ #ifdef __GNUC__ # define INLINE inline #else # define INLINE #endif #if defined (PREFER_STDARG) # define SH_VA_START(va, arg) va_start(va, arg) #else # define SH_VA_START(va, arg) va_start(va) #endif #endif /* !_STDC_H_ */ PKZ ( bash/include/posixwait.hnu[/* posixwait.h -- job control definitions from POSIX 1003.1 */ /* Copyright (C) 1997 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_POSIXWAIT_H_) # define _POSIXWAIT_H_ /* If _POSIX_VERSION is not defined, we assume that defines a `union wait' and various macros used to manipulate it. Look in unionwait.h for the things we expect to find. */ #if defined (HAVE_SYS_WAIT_H) # include #else /* !HAVE_SYS_WAIT_H */ # if !defined (_POSIX_VERSION) # include "unionwait.h" # endif #endif /* !HAVE_SYS_WAIT_H */ /* How to get the status of a job. For Posix, this is just an int, but for other systems we have to crack the union wait. */ #if !defined (_POSIX_VERSION) typedef union wait WAIT; # define WSTATUS(t) (t.w_status) #else /* _POSIX_VERSION */ typedef int WAIT; # define WSTATUS(t) (t) #endif /* _POSIX_VERSION */ /* Make sure that parameters to wait3 are defined. */ #if !defined (WNOHANG) # define WNOHANG 1 # define WUNTRACED 2 #endif /* WNOHANG */ /* More Posix P1003.1 definitions. In the POSIX versions, the parameter is passed as an `int', in the non-POSIX version, as `union wait'. */ #if defined (_POSIX_VERSION) # if !defined (WSTOPSIG) # define WSTOPSIG(s) ((s) >> 8) # endif /* !WSTOPSIG */ # if !defined (WTERMSIG) # define WTERMSIG(s) ((s) & 0177) # endif /* !WTERMSIG */ # if !defined (WEXITSTATUS) # define WEXITSTATUS(s) ((s) >> 8) # endif /* !WEXITSTATUS */ # if !defined (WIFSTOPPED) # define WIFSTOPPED(s) (((s) & 0177) == 0177) # endif /* !WIFSTOPPED */ # if !defined (WIFEXITED) # define WIFEXITED(s) (((s) & 0377) == 0) # endif /* !WIFEXITED */ # if !defined (WIFSIGNALED) # define WIFSIGNALED(s) (!WIFSTOPPED(s) && !WIFEXITED(s)) # endif /* !WIFSIGNALED */ # if !defined (WIFCORED) # define WIFCORED(s) ((s) & 0200) # endif /* !WIFCORED */ #else /* !_POSIX_VERSION */ # if !defined (WSTOPSIG) # define WSTOPSIG(s) ((s).w_stopsig) # endif /* !WSTOPSIG */ # if !defined (WTERMSIG) # define WTERMSIG(s) ((s).w_termsig) # endif /* !WTERMSIG */ # if !defined (WEXITSTATUS) # define WEXITSTATUS(s) ((s).w_retcode) # endif /* !WEXITSTATUS */ # if !defined (WIFCORED) # define WIFCORED(s) ((s).w_coredump) # endif /* !WIFCORED */ #endif /* !_POSIX_VERSION */ #endif /* !_POSIXWAIT_H_ */ PKZ(`bash/include/stat-time.hnu[/* stat-related time functions. Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Written by Paul Eggert. */ #ifndef STAT_TIME_H #define STAT_TIME_H 1 #include #if defined (TIME_H_DEFINES_STRUCT_TIMESPEC) # include #elif defined (SYS_TIME_H_DEFINES_STRUCT_TIMESPEC) # include #elif defined (PTHREAD_H_DEFINES_STRUCT_TIMESPEC) # include #endif #ifndef HAVE_STRUCT_TIMESPEC struct timespec { time_t tv_sec; long int tv_nsec; }; #endif /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim for access, status change, data modification, or birth (creation) time respectively. These macros are private to stat-time.h. */ #if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC # ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) # else # define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) # endif #elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC # define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) #elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC # define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) #elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC # define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) #endif /* Return the nanosecond component of *ST's access time. */ static inline long int get_stat_atime_ns (struct stat const *st) { # if defined STAT_TIMESPEC return STAT_TIMESPEC (st, st_atim).tv_nsec; # elif defined STAT_TIMESPEC_NS return STAT_TIMESPEC_NS (st, st_atim); # else return 0; # endif } /* Return the nanosecond component of *ST's status change time. */ static inline long int get_stat_ctime_ns (struct stat const *st) { # if defined STAT_TIMESPEC return STAT_TIMESPEC (st, st_ctim).tv_nsec; # elif defined STAT_TIMESPEC_NS return STAT_TIMESPEC_NS (st, st_ctim); # else return 0; # endif } /* Return the nanosecond component of *ST's data modification time. */ static inline long int get_stat_mtime_ns (struct stat const *st) { # if defined STAT_TIMESPEC return STAT_TIMESPEC (st, st_mtim).tv_nsec; # elif defined STAT_TIMESPEC_NS return STAT_TIMESPEC_NS (st, st_mtim); # else return 0; # endif } /* Return the nanosecond component of *ST's birth time. */ static inline long int get_stat_birthtime_ns (struct stat const *st) { # if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC return STAT_TIMESPEC (st, st_birthtim).tv_nsec; # elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC return STAT_TIMESPEC_NS (st, st_birthtim); # else /* Avoid a "parameter unused" warning. */ (void) st; return 0; # endif } /* Return *ST's access time. */ static inline struct timespec get_stat_atime (struct stat const *st) { #ifdef STAT_TIMESPEC return STAT_TIMESPEC (st, st_atim); #else struct timespec t; t.tv_sec = st->st_atime; t.tv_nsec = get_stat_atime_ns (st); return t; #endif } /* Return *ST's status change time. */ static inline struct timespec get_stat_ctime (struct stat const *st) { #ifdef STAT_TIMESPEC return STAT_TIMESPEC (st, st_ctim); #else struct timespec t; t.tv_sec = st->st_ctime; t.tv_nsec = get_stat_ctime_ns (st); return t; #endif } /* Return *ST's data modification time. */ static inline struct timespec get_stat_mtime (struct stat const *st) { #ifdef STAT_TIMESPEC return STAT_TIMESPEC (st, st_mtim); #else struct timespec t; t.tv_sec = st->st_mtime; t.tv_nsec = get_stat_mtime_ns (st); return t; #endif } static inline int timespec_cmp (struct timespec a, struct timespec b) { return (a.tv_sec < b.tv_sec ? -1 : (a.tv_sec > b.tv_sec ? 1 : (int) (a.tv_nsec - b.tv_nsec))); } /* Return *ST's birth time, if available; otherwise return a value with tv_sec and tv_nsec both equal to -1. */ static inline struct timespec get_stat_birthtime (struct stat const *st) { struct timespec t; #if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) t = STAT_TIMESPEC (st, st_birthtim); #elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC t.tv_sec = st->st_birthtime; t.tv_nsec = st->st_birthtimensec; #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows platforms (but not Cygwin) put the "file creation time" in st_ctime (!). See . */ t.tv_sec = st->st_ctime; t.tv_nsec = 0; #else /* Birth time is not supported. */ t.tv_sec = -1; t.tv_nsec = -1; /* Avoid a "parameter unused" warning. */ (void) st; #endif #if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) /* FreeBSD and NetBSD sometimes signal the absence of knowledge by using zero. Attempt to work around this problem. Alas, this can report failure even for valid time stamps. Also, NetBSD sometimes returns junk in the birth time fields; work around this bug if it is detected. */ if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000)) { t.tv_sec = -1; t.tv_nsec = -1; } #endif return t; } #endif PKZ/bash/include/shmbchar.hnu[/* Multibyte character data type. Copyright (C) 2001, 2005-2007, 2009-2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* Written by Bruno Haible . */ #ifndef _SHMBCHAR_H #define _SHMBCHAR_H 1 #if defined (HANDLE_MULTIBYTE) #include /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.1 has a bug: and must be included before . */ #include #include #include #include /* is_basic(c) tests whether the single-byte character c is in the ISO C "basic character set". */ #if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) /* The character set is ISO-646, not EBCDIC. */ # define IS_BASIC_ASCII 1 extern const unsigned int is_basic_table[]; static inline int is_basic (char c) { return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) & 1; } #else static inline int is_basic (char c) { switch (c) { case '\b': case '\r': case '\n': case '\t': case '\v': case '\f': case ' ': case '!': case '"': case '#': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case ':': case ';': case '<': case '=': case '>': case '?': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': case '~': return 1; default: return 0; } } #endif #endif /* HANDLE_MULTIBYTE */ #endif /* _SHMBCHAR_H */ PKZ2Z`PP bash/alias.hnu[/* alias.h -- structure definitions. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_ALIAS_H_) #define _ALIAS_H_ #include "stdc.h" #include "hashlib.h" typedef struct alias { char *name; char *value; char flags; } alias_t; /* Values for `flags' member of struct alias. */ #define AL_EXPANDNEXT 0x1 #define AL_BEINGEXPANDED 0x2 /* The list of known aliases. */ extern HASH_TABLE *aliases; extern void initialize_aliases __P((void)); /* Scan the list of aliases looking for one with NAME. Return NULL if the alias doesn't exist, else a pointer to the alias. */ extern alias_t *find_alias __P((char *)); /* Return the value of the alias for NAME, or NULL if there is none. */ extern char *get_alias_value __P((char *)); /* Make a new alias from NAME and VALUE. If NAME can be found, then replace its value. */ extern void add_alias __P((char *, char *)); /* Remove the alias with name NAME from the alias list. Returns the index of the removed alias, or -1 if the alias didn't exist. */ extern int remove_alias __P((char *)); /* Remove all aliases. */ extern void delete_all_aliases __P((void)); /* Return an array of all defined aliases. */ extern alias_t **all_aliases __P((void)); /* Expand a single word for aliases. */ extern char *alias_expand_word __P((char *)); /* Return a new line, with any aliases expanded. */ extern char *alias_expand __P((char *)); #endif /* _ALIAS_H_ */ PKZn2bash/unwind_prot.hnu[/* unwind_prot.h - Macros and functions for hacking unwind protection. */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_UNWIND_PROT_H) #define _UNWIND_PROT_H extern void uwp_init __P((void)); /* Run a function without interrupts. */ extern void begin_unwind_frame __P((char *)); extern void discard_unwind_frame __P((char *)); extern void run_unwind_frame __P((char *)); extern void add_unwind_protect (); /* Not portable to arbitrary C99 hosts. */ extern void remove_unwind_protect __P((void)); extern void run_unwind_protects __P((void)); extern void clear_unwind_protect_list __P((int)); extern int have_unwind_protects __P((void)); extern int unwind_protect_tag_on_stack __P((const char *)); extern void uwp_init __P((void)); /* Define for people who like their code to look a certain way. */ #define end_unwind_frame() /* How to protect a variable. */ #define unwind_protect_var(X) unwind_protect_mem ((char *)&(X), sizeof (X)) extern void unwind_protect_mem __P((char *, int)); /* Backwards compatibility */ #define unwind_protect_int unwind_protect_var #define unwind_protect_short unwind_protect_var #define unwind_protect_string unwind_protect_var #define unwind_protect_pointer unwind_protect_var #define unwind_protect_jmp_buf unwind_protect_var #endif /* _UNWIND_PROT_H */ PKZ@?;NNbash/bashjmp.hnu[/* bashjmp.h -- wrapper for setjmp.h with necessary bash definitions. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _BASHJMP_H_ #define _BASHJMP_H_ #include "posixjmp.h" extern procenv_t top_level; extern procenv_t subshell_top_level; extern procenv_t return_catch; /* used by `return' builtin */ extern int no_longjmp_on_fatal_error; #define SHFUNC_RETURN() sh_longjmp (return_catch, 1) #define COPY_PROCENV(old, save) \ xbcopy ((char *)old, (char *)save, sizeof (procenv_t)); /* Values for the second argument to longjmp/siglongjmp. */ #define NOT_JUMPED 0 /* Not returning from a longjmp. */ #define FORCE_EOF 1 /* We want to stop parsing. */ #define DISCARD 2 /* Discard current command. */ #define EXITPROG 3 /* Unconditionally exit the program now. */ #define ERREXIT 4 /* Exit due to error condition */ #define SIGEXIT 5 /* Exit due to fatal terminating signal */ #endif /* _BASHJMP_H_ */ PKZ $bash/bashansi.hnu[/* bashansi.h -- Typically included information required by picky compilers. */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_BASHANSI_H_) #define _BASHANSI_H_ #if defined (HAVE_STRING_H) # if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) # include # endif # include #endif /* !HAVE_STRING_H */ #if defined (HAVE_STRINGS_H) # include #endif /* !HAVE_STRINGS_H */ #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* !HAVE_STDLIB_H */ #endif /* !_BASHANSI_H_ */ PKZ&~Uo}} bash/config.hnu[/* config.h. Generated from config.h.in by configure. */ /* config.h -- Configuration file for bash. */ /* Copyright (C) 1987-2009,2011-2012 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _CONFIG_H_ #define _CONFIG_H_ /* Template settings for autoconf */ #define __EXTENSIONS__ 1 #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 /* #undef _POSIX_SOURCE */ /* #undef _POSIX_1_SOURCE */ #define _POSIX_PTHREAD_SEMANTICS 1 #define _TANDEM_SOURCE 1 /* #undef _MINIX */ /* Configuration feature settings controllable by autoconf. */ /* Define JOB_CONTROL if your operating system supports BSD-like job control. */ #define JOB_CONTROL 1 /* Define ALIAS if you want the alias features. */ #define ALIAS 1 /* Define PUSHD_AND_POPD if you want those commands to be compiled in. (Also the `dirs' commands.) */ #define PUSHD_AND_POPD 1 /* Define BRACE_EXPANSION if you want curly brace expansion a la Csh: foo{a,b} -> fooa foob. Even if this is compiled in (the default) you can turn it off at shell startup with `-nobraceexpansion', or during shell execution with `set +o braceexpand'. */ #define BRACE_EXPANSION 1 /* Define READLINE to get the nifty/glitzy editing features. This is on by default. You can turn it off interactively with the -nolineediting flag. */ #define READLINE 1 /* Define BANG_HISTORY if you want to have Csh style "!" history expansion. This is unrelated to READLINE. */ #define BANG_HISTORY 1 /* Define HISTORY if you want to have access to previously typed commands. If both HISTORY and READLINE are defined, you can get at the commands with line editing commands, and you can directly manipulate the history from the command line. If only HISTORY is defined, the `fc' and `history' builtins are available. */ #define HISTORY 1 /* Define this if you want completion that puts all alternatives into a brace expansion shell expression. */ #if defined (BRACE_EXPANSION) && defined (READLINE) # define BRACE_COMPLETION #endif /* BRACE_EXPANSION */ /* Define DEFAULT_ECHO_TO_XPG if you want the echo builtin to interpret the backslash-escape characters by default, like the XPG Single Unix Specification V2 for echo. This requires that V9_ECHO be defined. */ /* #undef DEFAULT_ECHO_TO_XPG */ /* Define HELP_BUILTIN if you want the `help' shell builtin and the long documentation strings compiled into the shell. */ #define HELP_BUILTIN 1 /* Define RESTRICTED_SHELL if you want the generated shell to have the ability to be a restricted one. The shell thus generated can become restricted by being run with the name "rbash", or by setting the -r flag. */ #define RESTRICTED_SHELL 1 /* Define DISABLED_BUILTINS if you want "builtin foo" to always run the shell builtin "foo", even if it has been disabled with "enable -n foo". */ /* #undef DISABLED_BUILTINS */ /* Define PROCESS_SUBSTITUTION if you want the K*rn shell-like process substitution features "<(file)". */ /* Right now, you cannot do this on machines without fully operational FIFO support. This currently include NeXT and Alliant. */ #define PROCESS_SUBSTITUTION 1 /* Define PROMPT_STRING_DECODE if you want the backslash-escaped special characters in PS1 and PS2 expanded. Variable expansion will still be performed. */ #define PROMPT_STRING_DECODE 1 /* Define SELECT_COMMAND if you want the Korn-shell style `select' command: select word in word_list; do command_list; done */ #define SELECT_COMMAND 1 /* Define COMMAND_TIMING of you want the ksh-style `time' reserved word and the ability to time pipelines, functions, and builtins. */ #define COMMAND_TIMING 1 /* Define ARRAY_VARS if you want ksh-style one-dimensional array variables. */ #define ARRAY_VARS 1 /* Define DPAREN_ARITHMETIC if you want the ksh-style ((...)) arithmetic evaluation command. */ #define DPAREN_ARITHMETIC 1 /* Define EXTENDED_GLOB if you want the ksh-style [*+@?!](patlist) extended pattern matching. */ #define EXTENDED_GLOB 1 /* Define EXTGLOB_DEFAULT to the value you'd like the extglob shell option to have by default */ #define EXTGLOB_DEFAULT 0 /* Define COND_COMMAND if you want the ksh-style [[...]] conditional command. */ #define COND_COMMAND 1 /* Define COND_REGEXP if you want extended regular expression matching and the =~ binary operator in the [[...]] conditional command. */ #define COND_REGEXP 1 /* Define COPROCESS_SUPPORT if you want support for ksh-like coprocesses and the `coproc' reserved word */ #define COPROCESS_SUPPORT 1 /* Define ARITH_FOR_COMMAND if you want the ksh93-style for (( init; test; step )) do list; done arithmetic for command. */ #define ARITH_FOR_COMMAND 1 /* Define NETWORK_REDIRECTIONS if you want /dev/(tcp|udp)/host/port to open socket connections when used in redirections */ #define NETWORK_REDIRECTIONS 1 /* Define PROGRAMMABLE_COMPLETION for the programmable completion features and the complete builtin. */ #define PROGRAMMABLE_COMPLETION 1 /* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte characters, even if the OS supports them. */ /* #undef NO_MULTIBYTE_SUPPORT */ /* Define DEBUGGER if you want to compile in some features used only by the bash debugger. */ #define DEBUGGER 1 /* Define STRICT_POSIX if you want bash to be strictly posix.2 conformant by default (except for echo; that is controlled separately). */ /* #undef STRICT_POSIX */ /* Define MEMSCRAMBLE if you want the bash malloc and free to scramble memory contents on malloc() and free(). */ #define MEMSCRAMBLE 1 /* Define for case-modifying variable attributes; variables modified on assignment */ #define CASEMOD_ATTRS 1 /* Define for case-modifying word expansions */ #define CASEMOD_EXPANSIONS 1 /* Define to make the `direxpand' shopt option enabled by default. */ /* #undef DIRCOMPLETE_EXPAND_DEFAULT */ /* Define to make the `globasciiranges' shopt option enabled by default. */ #define GLOBASCII_DEFAULT 0 /* Define to allow functions to be imported from the environment. */ #define FUNCTION_IMPORT 1 /* Define AFS if you are using Transarc's AFS. */ #define AFS 1 #define ENABLE_NLS 1 /* End of configuration settings controllable by autoconf. */ /* Other settable options appear in config-top.h. */ #include "config-top.h" /* Beginning of autoconf additions. */ /* Characteristics of the C compiler */ /* #undef const */ /* #undef inline */ #define restrict __restrict /* #undef volatile */ /* Define if cpp supports the ANSI-C stringizing `#' operator */ #define HAVE_STRINGIZE 1 /* Define if the compiler supports `long double' variables. */ #define HAVE_LONG_DOUBLE 1 #define PROTOTYPES 1 #define __PROTOTYPES 1 /* #undef __CHAR_UNSIGNED__ */ /* Define if the compiler supports `long long' variables. */ #define HAVE_LONG_LONG 1 #define HAVE_UNSIGNED_LONG_LONG 1 /* The number of bytes in a int. */ #define SIZEOF_INT 4 /* The number of bytes in a long. */ #define SIZEOF_LONG 8 /* The number of bytes in a pointer to char. */ #define SIZEOF_CHAR_P 8 /* The number of bytes in a double (hopefully 8). */ #define SIZEOF_DOUBLE 8 /* The number of bytes in an `intmax_t'. */ #define SIZEOF_INTMAX_T 8 /* The number of bytes in a `long long', if we have one. */ #define SIZEOF_LONG_LONG 8 /* System paths */ #define DEFAULT_MAIL_DIRECTORY "/var/mail" /* Characteristics of the system's header files and libraries that affect the compilation environment. */ /* Define if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define if you need to in order for stat and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define to use GNU libc extensions */ #define _GNU_SOURCE 1 /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Memory management functions. */ /* Define if using the bash version of malloc in lib/malloc/malloc.c */ /* #undef USING_BASH_MALLOC */ /* #undef DISABLE_MALLOC_WRAPPERS */ /* Define if using alloca.c. */ /* #undef C_ALLOCA */ /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define if you have alloca, as a function or macro. */ #define HAVE_ALLOCA 1 /* Define if you have and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* SYSTEM TYPES */ /* Define to `long' if doesn't define. */ /* #undef off_t */ /* Define to `int' if doesn't define. */ /* #undef mode_t */ /* Define to `int' if doesn't define. */ /* #undef sigset_t */ /* Define to `int' if doesn't define. */ /* #undef pid_t */ /* Define to `short' if doesn't define. */ #define bits16_t short /* Define to `unsigned short' if doesn't define. */ #define u_bits16_t unsigned short /* Define to `int' if doesn't define. */ #define bits32_t int /* Define to `unsigned int' if doesn't define. */ #define u_bits32_t unsigned int /* Define to `double' if doesn't define. */ #define bits64_t char * /* Define to `unsigned int' if doesn't define. */ /* #undef u_int */ /* Define to `unsigned long' if doesn't define. */ /* #undef u_long */ /* Define to `int' if doesn't define. */ /* #undef ptrdiff_t */ /* Define to `unsigned' if doesn't define. */ /* #undef size_t */ /* Define to `int' if doesn't define. */ /* #undef ssize_t */ /* Define to `long' if doesn't define. */ /* #undef intmax_t */ /* Define to `unsigned long' if doesn't define. */ /* #undef uintmax_t */ /* Define to integer type wide enough to hold a pointer if doesn't define. */ /* #undef uintptr_t */ /* Define to `int' if doesn't define. */ /* #undef uid_t */ /* Define to `long' if doesn't define. */ /* #undef clock_t */ /* Define to `long' if doesn't define. */ /* #undef time_t */ /* Define to `int' if doesn't define. */ /* #undef gid_t */ /* Define to `unsigned int' if doesn't define. */ /* #undef socklen_t */ /* Define to `int' if doesn't define. */ /* #undef sig_atomic_t */ #define HAVE_MBSTATE_T 1 /* Define if you have quad_t in . */ #define HAVE_QUAD_T 1 /* Define if you have wchar_t in . */ #define HAVE_WCHAR_T 1 /* Define if you have wctype_t in . */ #define HAVE_WCTYPE_T 1 /* Define if you have wint_t in . */ #define HAVE_WINT_T 1 #define RLIMTYPE rlim_t /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #define GETGROUPS_T gid_t /* Characteristics of the machine archictecture. */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define if the machine architecture is big-endian. */ /* #undef WORDS_BIGENDIAN */ /* Check for the presence of certain non-function symbols in the system libraries. */ /* Define if `sys_siglist' is declared by or . */ #define HAVE_DECL_SYS_SIGLIST 1 /* #undef SYS_SIGLIST_DECLARED */ /* Define if `_sys_siglist' is declared by or . */ #define UNDER_SYS_SIGLIST_DECLARED 1 #define HAVE_SYS_SIGLIST 1 #define HAVE_UNDER_SYS_SIGLIST 1 #define HAVE_SYS_ERRLIST 1 /* #undef HAVE_TZNAME */ /* #undef HAVE_DECL_TZNAME */ /* Characteristics of some of the system structures. */ #define HAVE_STRUCT_DIRENT_D_INO 1 #define HAVE_STRUCT_DIRENT_D_FILENO 1 /* #undef HAVE_STRUCT_DIRENT_D_NAMLEN */ /* #undef TIOCSTAT_IN_SYS_IOCTL */ #define FIONREAD_IN_SYS_IOCTL 1 #define GWINSZ_IN_SYS_IOCTL 1 #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 /* #undef TM_IN_SYS_TIME */ /* #undef STRUCT_WINSIZE_IN_TERMIOS */ /* #undef SPEED_T_IN_SYS_TYPES */ #define TERMIOS_LDISC 1 #define TERMIO_LDISC 1 #define HAVE_STRUCT_STAT_ST_BLOCKS 1 #define HAVE_STRUCT_TM_TM_ZONE 1 #define HAVE_TM_ZONE 1 #define HAVE_TIMEVAL 1 #define HAVE_STRUCT_TIMEZONE 1 #define WEXITSTATUS_OFFSET 8 #define HAVE_STRUCT_TIMESPEC 1 #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 /* #undef SYS_TIME_H_DEFINES_STRUCT_TIMESPEC */ /* #undef PTHREAD_H_DEFINES_STRUCT_TIMESPEC */ #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 /* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ /* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ /* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ /* Characteristics of definitions in the system header files. */ #define HAVE_GETPW_DECLS 1 /* #undef HAVE_RESOURCE */ /* #undef HAVE_LIBC_FNM_EXTMATCH */ /* Define if you have and it defines AUDIT_USER_TTY */ #define HAVE_DECL_AUDIT_USER_TTY 1 #define HAVE_DECL_CONFSTR 1 #define HAVE_DECL_PRINTF 1 #define HAVE_DECL_SBRK 1 #define HAVE_DECL_STRCPY 1 #define HAVE_DECL_STRSIGNAL 1 #define HAVE_DECL_STRTOLD 1 /* #undef PRI_MACROS_BROKEN */ /* #undef STRTOLD_BROKEN */ /* Define if WCONTINUED is defined in system headers, but rejected by waitpid */ /* #undef WCONTINUED_BROKEN */ /* These are checked with BASH_CHECK_DECL */ #define HAVE_DECL_STRTOIMAX 1 #define HAVE_DECL_STRTOL 1 #define HAVE_DECL_STRTOLL 1 #define HAVE_DECL_STRTOUL 1 #define HAVE_DECL_STRTOULL 1 #define HAVE_DECL_STRTOUMAX 1 /* Characteristics of system calls and C library functions. */ /* Define if the `getpgrp' function takes no argument. */ #define GETPGRP_VOID 1 /* #undef NAMED_PIPES_MISSING */ /* #undef OPENDIR_NOT_ROBUST */ #define PGRP_PIPE 1 /* Define if the setvbuf function takes the buffering type as its second argument and the buffer pointer as the third, as on System V before release 3. */ /* #undef SETVBUF_REVERSED */ /* #undef STAT_MACROS_BROKEN */ #define ULIMIT_MAXFDS 1 #define CAN_REDEFINE_GETENV 1 #define HAVE_STD_PUTENV 1 #define HAVE_STD_UNSETENV 1 #define HAVE_PRINTF_A_FORMAT 1 #define CTYPE_NON_ASCII 1 /* Define if you have and nl_langinfo(CODESET). */ #define HAVE_LANGINFO_CODESET 1 /* Characteristics of properties exported by the kernel. */ /* Define if the kernel can exec files beginning with #! */ #define HAVE_HASH_BANG_EXEC 1 /* Define if you have the /dev/fd devices to map open files into the file system. */ #define HAVE_DEV_FD 1 /* Defined to /dev/fd or /proc/self/fd (linux). */ #define DEV_FD_PREFIX "/dev/fd/" /* Define if you have the /dev/stdin device. */ #define HAVE_DEV_STDIN 1 /* The type of iconv's `inbuf' argument */ #define ICONV_CONST /* Type and behavior of signal handling functions. */ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void /* Define if return type of signal handlers is void */ #define VOID_SIGHANDLER 1 /* #undef MUST_REINSTALL_SIGHANDLERS */ /* #undef HAVE_BSD_SIGNALS */ #define HAVE_POSIX_SIGNALS 1 /* #undef HAVE_USG_SIGHOLD */ /* #undef UNUSABLE_RT_SIGNALS */ /* Presence of system and C library functions. */ /* Define if you have the asprintf function. */ #define HAVE_ASPRINTF 1 /* Define if you have the bcopy function. */ #define HAVE_BCOPY 1 /* Define if you have the bzero function. */ #define HAVE_BZERO 1 /* Define if you have the chown function. */ #define HAVE_CHOWN 1 /* Define if you have the confstr function. */ #define HAVE_CONFSTR 1 /* Define if you have the dlclose function. */ #define HAVE_DLCLOSE 1 /* Define if you have the dlopen function. */ #define HAVE_DLOPEN 1 /* Define if you have the dlsym function. */ #define HAVE_DLSYM 1 /* Define if you don't have vprintf but do have _doprnt. */ /* #undef HAVE_DOPRNT */ /* Define if you have the dprintf function. */ #define HAVE_DPRINTF 1 /* Define if you have the dup2 function. */ #define HAVE_DUP2 1 /* Define if you have the eaccess function. */ #define HAVE_EACCESS 1 /* Define if you have the faccessat function. */ #define HAVE_FACCESSAT 1 /* Define if you have the fcntl function. */ #define HAVE_FCNTL 1 /* Define if you have the fpurge/__fpurge function. */ /* #undef HAVE_FPURGE */ #define HAVE___FPURGE 1 #define HAVE_DECL_FPURGE 0 /* Define if you have the getaddrinfo function. */ #define HAVE_GETADDRINFO 1 /* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 /* Define if you have the getdtablesize function. */ #define HAVE_GETDTABLESIZE 1 /* Define if you have the getgroups function. */ #define HAVE_GETGROUPS 1 /* Define if you have the gethostbyname function. */ #define HAVE_GETHOSTBYNAME 1 /* Define if you have the gethostname function. */ #define HAVE_GETHOSTNAME 1 /* Define if you have the getpagesize function. */ #define HAVE_GETPAGESIZE 1 /* Define if you have the getpeername function. */ #define HAVE_GETPEERNAME 1 /* Define if you have the getpwent function. */ #define HAVE_GETPWENT 1 /* Define if you have the getpwnam function. */ #define HAVE_GETPWNAM 1 /* Define if you have the getpwuid function. */ #define HAVE_GETPWUID 1 /* Define if you have the getrlimit function. */ #define HAVE_GETRLIMIT 1 /* Define if you have the getrusage function. */ #define HAVE_GETRUSAGE 1 /* Define if you have the getservbyname function. */ #define HAVE_GETSERVBYNAME 1 /* Define if you have the getservent function. */ #define HAVE_GETSERVENT 1 /* Define if you have the gettimeofday function. */ #define HAVE_GETTIMEOFDAY 1 /* Define if you have the getwd function. */ /* #undef HAVE_GETWD */ /* Define if you have the iconv function. */ #define HAVE_ICONV 1 /* Define if you have the imaxdiv function. */ #define HAVE_IMAXDIV 1 /* Define if you have the inet_aton function. */ #define HAVE_INET_ATON 1 /* Define if you have the isascii function. */ #define HAVE_ISASCII 1 /* Define if you have the isblank function. */ #define HAVE_ISBLANK 1 /* Define if you have the isgraph function. */ #define HAVE_ISGRAPH 1 /* Define if you have the isprint function. */ #define HAVE_ISPRINT 1 /* Define if you have the isspace function. */ #define HAVE_ISSPACE 1 /* Define if you have the iswctype function. */ #define HAVE_ISWCTYPE 1 /* Define if you have the iswlower function. */ #define HAVE_ISWLOWER 1 /* Define if you have the iswupper function. */ #define HAVE_ISWUPPER 1 /* Define if you have the isxdigit function. */ #define HAVE_ISXDIGIT 1 /* Define if you have the kill function. */ #define HAVE_KILL 1 /* Define if you have the killpg function. */ #define HAVE_KILLPG 1 /* Define if you have the lstat function. */ #define HAVE_LSTAT 1 /* Define if you have the locale_charset function. */ /* #undef HAVE_LOCALE_CHARSET */ /* Define if you have the mbrlen function. */ #define HAVE_MBRLEN 1 /* Define if you have the mbrtowc function. */ #define HAVE_MBRTOWC 1 /* Define if you have the mbscasecmp function. */ /* #undef HAVE_MBSCASECMP */ /* Define if you have the mbschr function. */ /* #undef HAVE_MBSCHR */ /* Define if you have the mbscmp function. */ /* #undef HAVE_MBSCMP */ /* Define if you have the mbsnrtowcs function. */ #define HAVE_MBSNRTOWCS 1 /* Define if you have the mbsrtowcs function. */ #define HAVE_MBSRTOWCS 1 /* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 /* Define if you have the memset function. */ #define HAVE_MEMSET 1 /* Define if you have the mkfifo function. */ #define HAVE_MKFIFO 1 /* Define if you have the mkstemp function. */ #define HAVE_MKSTEMP 1 /* Define if you have the pathconf function. */ #define HAVE_PATHCONF 1 /* Define if you have the pselect function. */ #define HAVE_PSELECT 1 /* Define if you have the pread function. */ #define HAVE_PREAD 1 /* Define if you have the putenv function. */ #define HAVE_PUTENV 1 /* Define if you have the raise function. */ #define HAVE_RAISE 1 /* Define if you have the random function. */ #define HAVE_RANDOM 1 /* Define if you have the readlink function. */ #define HAVE_READLINK 1 /* Define if you have the regcomp function. */ #define HAVE_REGCOMP 1 /* Define if you have the regexec function. */ #define HAVE_REGEXEC 1 /* Define if you have the rename function. */ #define HAVE_RENAME 1 /* Define if you have the sbrk function. */ #define HAVE_SBRK 1 /* Define if you have the select function. */ #define HAVE_SELECT 1 /* Define if you have the setdtablesize function. */ /* #undef HAVE_SETDTABLESIZE */ /* Define if you have the setenv function. */ #define HAVE_SETENV 1 /* Define if you have the setitimer function. */ #define HAVE_SETITIMER 1 /* Define if you have the setlinebuf function. */ #define HAVE_SETLINEBUF 1 /* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 /* Define if you have the setostype function. */ /* #undef HAVE_SETOSTYPE */ /* Define if you have the setregid function. */ /* #undef HAVE_SETREGID */ #define HAVE_DECL_SETREGID 1 /* Define if you have the setregid function. */ #define HAVE_SETRESGID 1 /* #undef HAVE_DECL_SETRESGID */ /* Define if you have the setresuid function. */ #define HAVE_SETRESUID 1 /* #undef HAVE_DECL_SETRESUID */ /* Define if you have the setvbuf function. */ #define HAVE_SETVBUF 1 /* Define if you have the siginterrupt function. */ #define HAVE_SIGINTERRUPT 1 /* Define if you have the POSIX.1-style sigsetjmp function. */ #define HAVE_POSIX_SIGSETJMP 1 /* Define if you have the snprintf function. */ #define HAVE_SNPRINTF 1 /* Define if you have the strcasecmp function. */ #define HAVE_STRCASECMP 1 /* Define if you have the strcasestr function. */ #define HAVE_STRCASESTR 1 /* Define if you have the strchr function. */ #define HAVE_STRCHR 1 /* Define if you have the strchrnul function. */ #define HAVE_STRCHRNUL 1 /* Define if you have the strcoll function. */ #define HAVE_STRCOLL 1 /* Define if you have the strerror function. */ #define HAVE_STRERROR 1 /* Define if you have the strftime function. */ #define HAVE_STRFTIME 1 /* Define if you have the strnlen function. */ #define HAVE_STRNLEN 1 /* Define if you have the strpbrk function. */ #define HAVE_STRPBRK 1 /* Define if you have the strstr function. */ #define HAVE_STRSTR 1 /* Define if you have the strtod function. */ #define HAVE_STRTOD 1 /* Define if you have the strtoimax function. */ #define HAVE_STRTOIMAX 1 /* Define if you have the strtol function. */ #define HAVE_STRTOL 1 /* Define if you have the strtoll function. */ #define HAVE_STRTOLL 1 /* Define if you have the strtoul function. */ #define HAVE_STRTOUL 1 /* Define if you have the strtoull function. */ #define HAVE_STRTOULL 1 /* Define if you have the strtoumax function. */ #define HAVE_STRTOUMAX 1 /* Define if you have the strsignal function or macro. */ #define HAVE_STRSIGNAL 1 /* Define if you have the sysconf function. */ #define HAVE_SYSCONF 1 /* Define if you have the syslog function. */ #define HAVE_SYSLOG 1 /* Define if you have the tcgetattr function. */ #define HAVE_TCGETATTR 1 /* Define if you have the tcgetpgrp function. */ #define HAVE_TCGETPGRP 1 /* Define if you have the times function. */ #define HAVE_TIMES 1 /* Define if you have the towlower function. */ #define HAVE_TOWLOWER 1 /* Define if you have the towupper function. */ #define HAVE_TOWUPPER 1 /* Define if you have the ttyname function. */ #define HAVE_TTYNAME 1 /* Define if you have the tzset function. */ #define HAVE_TZSET 1 /* Define if you have the ulimit function. */ #define HAVE_ULIMIT 1 /* Define if you have the uname function. */ #define HAVE_UNAME 1 /* Define if you have the unsetenv function. */ #define HAVE_UNSETENV 1 /* Define if you have the vasprintf function. */ #define HAVE_VASPRINTF 1 /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define if you have the vsnprintf function. */ #define HAVE_VSNPRINTF 1 /* Define if you have the waitpid function. */ #define HAVE_WAITPID 1 /* Define if you have the wait3 function. */ #define HAVE_WAIT3 1 /* Define if you have the wcrtomb function. */ #define HAVE_WCRTOMB 1 /* Define if you have the wcscoll function. */ #define HAVE_WCSCOLL 1 /* Define if you have the wcsdup function. */ #define HAVE_WCSDUP 1 /* Define if you have the wctype function. */ #define HAVE_WCTYPE 1 /* Define if you have the wcswidth function. */ #define HAVE_WCSWIDTH 1 /* Define if you have the wcwidth function. */ #define HAVE_WCWIDTH 1 /* and if it works */ /* #undef WCWIDTH_BROKEN */ /* Presence of certain system include files. */ /* Define if you have the header file. */ #define HAVE_ARPA_INET_H 1 /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 /* Define if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define if you have the header file. */ #define HAVE_ELF_H 1 /* Define if you have the header file. */ #define HAVE_GRP_H 1 /* Define if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define if you have the header file. */ #define HAVE_LANGINFO_H 1 /* Define if you have the header file. */ /* #undef HAVE_LIBAUDIT_H */ /* Define if you have the header file. */ /* #undef HAVE_LIBINTL_H */ /* Define if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define if you have the header file. */ #define HAVE_LOCALE_H 1 /* Define if you have the header file. */ /* #undef HAVE_MBSTR_H */ /* Define if you have the header file. */ /* #undef HAVE_NDIR_H */ /* Define if you have the header file. */ #define HAVE_NETDB_H 1 /* Define if you have the header file. */ #define HAVE_NETINET_IN_H 1 /* Define if you have the header file. */ #define HAVE_PWD_H 1 /* Define if you have the header file. */ #define HAVE_REGEX_H 1 /* Define if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define if you have the header file. */ #define HAVE_STDARG_H 1 /* Define if you have the header file. */ #define HAVE_STRING_H 1 /* Define if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define if you have the header file. */ #define HAVE_STDINT_H 1 /* Define if you have the header file. */ #define HAVE_SYSLOG_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_DIR_H */ /* Define if you have the header file. */ #define HAVE_SYS_FILE_H 1 /* Define if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_NDIR_H */ /* Define if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_PTE_H */ /* Define if you have the header file. */ /* #undef HAVE_SYS_PTEM_H */ /* Define if you have the header file. */ #define HAVE_SYS_RESOURCE_H 1 /* Define if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_STREAM_H */ /* Define if you have */ #define HAVE_SYS_TIME_H 1 #define TIME_WITH_SYS_TIME 1 /* Define if you have */ #define HAVE_SYS_TIMES_H 1 /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define if you have that is POSIX.1 compatible. */ #define HAVE_SYS_WAIT_H 1 /* Define if you have the header file. */ #define HAVE_TERMCAP_H 1 /* Define if you have the header file. */ #define HAVE_TERMIO_H 1 /* Define if you have the header file. */ #define HAVE_TERMIOS_H 1 /* Define if you have the header file. */ #define HAVE_ULIMIT_H 1 /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define if you have the header file. */ /* #undef HAVE_VARARGS_H */ /* Define if you have the header file. */ #define HAVE_WCHAR_H 1 /* Define if you have the header file. */ #define HAVE_WCTYPE_H 1 /* Presence of certain system libraries. */ #define HAVE_LIBDL 1 /* #undef HAVE_LIBSUN */ /* #undef HAVE_LIBSOCKET */ /* Are we running the GNU C library, version 2.1 or later? */ /* #undef GLIBC21 */ /* Are we running SVR5 (UnixWare 7)? */ /* #undef SVR5 */ /* Are we running SVR4.2? */ /* #undef SVR4_2 */ /* Are we running some version of SVR4? */ /* #undef SVR4 */ /* Define if job control is unusable or unsupported. */ /* #undef JOB_CONTROL_MISSING */ /* Do we need to define _KERNEL to get the RLIMIT_* defines from ? */ /* #undef RLIMIT_NEEDS_KERNEL */ /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files on AIX-style hosts. */ /* #undef _LARGE_FILES */ /* Do strcoll(3) and strcmp(3) give different results in the default locale? */ /* #undef STRCOLL_BROKEN */ /* #undef DUP2_BROKEN */ /* #undef GETCWD_BROKEN */ /* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */ /* Define if you have the header file. */ #define HAVE_ARGZ_H 1 /* Define if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define if you have the header file. */ #define HAVE_STDIO_EXT_H 1 /* Define if you have the `dcgettext' function. */ #define HAVE_DCGETTEXT 1 /* Define if you have the `localeconv' function. */ #define HAVE_LOCALECONV 1 /* Define if your system has a working `malloc' function. */ /* #undef HAVE_MALLOC */ /* Define if you have the `mempcpy' function. */ #define HAVE_MEMPCPY 1 /* Define if you have a working `mmap' system call. */ #define HAVE_MMAP 1 /* Define if you have the `munmap' function. */ #define HAVE_MUNMAP 1 /* Define if you have the `nl_langinfo' function. */ /* #undef HAVE_NL_LANGINFO */ /* Define if you have the `stpcpy' function. */ #define HAVE_STPCPY 1 /* Define if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 /* Define if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define if you have the `__argz_count' function. */ #define HAVE___ARGZ_COUNT 1 /* Define if you have the `__argz_next' function. */ #define HAVE___ARGZ_NEXT 1 /* Define if you have the `__argz_stringify' function. */ #define HAVE___ARGZ_STRINGIFY 1 /* End additions for lib/intl */ /* Additions for lib/readline */ /* Define if you have and it defines AUDIT_USER_TTY */ #define HAVE_DECL_AUDIT_USER_TTY 1 /* End additions for lib/readline */ #include "config-bot.h" #endif /* _CONFIG_H_ */ PKZBfZ1 bash/sig.hnu[/* sig.h -- header file for signal handler definitions. */ /* Copyright (C) 1994-2013 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* Make sure that this is included *after* config.h! */ #if !defined (_SIG_H_) # define _SIG_H_ #include "stdc.h" #include /* for sig_atomic_t */ #if !defined (SIGABRT) && defined (SIGIOT) # define SIGABRT SIGIOT #endif #define sighandler RETSIGTYPE typedef RETSIGTYPE SigHandler __P((int)); #if defined (VOID_SIGHANDLER) # define SIGRETURN(n) return #else # define SIGRETURN(n) return(n) #endif /* !VOID_SIGHANDLER */ /* Here is a definition for set_signal_handler () which simply expands to a call to signal () for non-Posix systems. The code for set_signal_handler in the Posix case resides in general.c. */ #if !defined (HAVE_POSIX_SIGNALS) # define set_signal_handler(sig, handler) (SigHandler *)signal (sig, handler) #else extern SigHandler *set_signal_handler __P((int, SigHandler *)); /* in sig.c */ #endif /* _POSIX_VERSION */ #if !defined (SIGCHLD) && defined (SIGCLD) # define SIGCHLD SIGCLD #endif #if !defined (HAVE_POSIX_SIGNALS) && !defined (sigmask) # define sigmask(x) (1 << ((x)-1)) #endif /* !HAVE_POSIX_SIGNALS && !sigmask */ #if !defined (HAVE_POSIX_SIGNALS) # if !defined (SIG_BLOCK) # define SIG_BLOCK 2 # define SIG_SETMASK 3 # endif /* SIG_BLOCK */ /* sigset_t defined in config.h */ /* Make sure there is nothing inside the signal set. */ # define sigemptyset(set) (*(set) = 0) /* Initialize the signal set to hold all signals. */ # define sigfillset(set) (*set) = sigmask (NSIG) - 1 /* Add SIG to the contents of SET. */ # define sigaddset(set, sig) *(set) |= sigmask (sig) /* Delete SIG from signal set SET. */ # define sigdelset(set, sig) *(set) &= ~sigmask (sig) /* Is SIG a member of the signal set SET? */ # define sigismember(set, sig) ((*(set) & sigmask (sig)) != 0) /* Suspend the process until the reception of one of the signals not present in SET. */ # define sigsuspend(set) sigpause (*(set)) #endif /* !HAVE_POSIX_SIGNALS */ /* These definitions are used both in POSIX and non-POSIX implementations. */ #define BLOCK_SIGNAL(sig, nvar, ovar) \ do { \ sigemptyset (&nvar); \ sigaddset (&nvar, sig); \ sigemptyset (&ovar); \ sigprocmask (SIG_BLOCK, &nvar, &ovar); \ } while (0) #define UNBLOCK_SIGNAL(ovar) sigprocmask (SIG_SETMASK, &ovar, (sigset_t *) NULL) #if defined (HAVE_POSIX_SIGNALS) # define BLOCK_CHILD(nvar, ovar) BLOCK_SIGNAL (SIGCHLD, nvar, ovar) # define UNBLOCK_CHILD(ovar) UNBLOCK_SIGNAL(ovar) #else /* !HAVE_POSIX_SIGNALS */ # define BLOCK_CHILD(nvar, ovar) ovar = sigblock (sigmask (SIGCHLD)) # define UNBLOCK_CHILD(ovar) sigsetmask (ovar) #endif /* !HAVE_POSIX_SIGNALS */ /* Extern variables */ extern volatile sig_atomic_t sigwinch_received; extern volatile sig_atomic_t sigterm_received; extern int interrupt_immediately; /* no longer used */ extern int terminate_immediately; /* Functions from sig.c. */ extern sighandler termsig_sighandler __P((int)); extern void termsig_handler __P((int)); extern sighandler sigint_sighandler __P((int)); extern void initialize_signals __P((int)); extern void initialize_terminating_signals __P((void)); extern void reset_terminating_signals __P((void)); extern void top_level_cleanup __P((void)); extern void throw_to_top_level __P((void)); extern void jump_to_top_level __P((int)) __attribute__((__noreturn__)); extern sighandler sigwinch_sighandler __P((int)); extern void set_sigwinch_handler __P((void)); extern void unset_sigwinch_handler __P((void)); extern sighandler sigterm_sighandler __P((int)); /* Functions defined in trap.c. */ extern SigHandler *set_sigint_handler __P((void)); extern SigHandler *trap_to_sighandler __P((int)); extern sighandler trap_handler __P((int)); #endif /* _SIG_H_ */ PKZuubash/dispose_cmd.hnu[/* dispose_cmd.h -- Functions appearing in dispose_cmd.c. */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_DISPOSE_CMD_H_) #define _DISPOSE_CMD_H_ #include "stdc.h" extern void dispose_command __P((COMMAND *)); extern void dispose_word_desc __P((WORD_DESC *)); extern void dispose_word __P((WORD_DESC *)); extern void dispose_words __P((WORD_LIST *)); extern void dispose_word_array __P((char **)); extern void dispose_redirects __P((REDIRECT *)); #if defined (COND_COMMAND) extern void dispose_cond_node __P((COND_COM *)); #endif extern void dispose_function_def_contents __P((FUNCTION_DEF *)); extern void dispose_function_def __P((FUNCTION_DEF *)); #endif /* !_DISPOSE_CMD_H_ */ PKZBTq bash/syntax.hnu[/* syntax.h -- Syntax definitions for the shell */ /* Copyright (C) 2000, 2001, 2005, 2008,2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _SYNTAX_H_ #define _SYNTAX_H_ /* Defines for use by mksyntax.c */ #define slashify_in_quotes "\\`$\"\n" #define slashify_in_here_document "\\`$" #define shell_meta_chars "()<>;&|" #define shell_break_chars "()<>;&| \t\n" #define shell_quote_chars "\"`'" #if defined (PROCESS_SUBSTITUTION) # define shell_exp_chars "$<>" #else # define shell_exp_chars "$" #endif #if defined (EXTENDED_GLOB) # define ext_glob_chars "@*+?!" #else # define ext_glob_chars "" #endif #define shell_glob_chars "*?[]^" /* Defines shared by mksyntax.c and the rest of the shell code. */ /* Values for character flags in syntax tables */ #define CWORD 0x0000 /* nothing special; an ordinary character */ #define CSHMETA 0x0001 /* shell meta character */ #define CSHBRK 0x0002 /* shell break character */ #define CBACKQ 0x0004 /* back quote */ #define CQUOTE 0x0008 /* shell quote character */ #define CSPECL 0x0010 /* special character that needs quoting */ #define CEXP 0x0020 /* shell expansion character */ #define CBSDQUOTE 0x0040 /* characters escaped by backslash in double quotes */ #define CBSHDOC 0x0080 /* characters escaped by backslash in here doc */ #define CGLOB 0x0100 /* globbing characters */ #define CXGLOB 0x0200 /* extended globbing characters */ #define CXQUOTE 0x0400 /* cquote + backslash */ #define CSPECVAR 0x0800 /* single-character shell variable name */ #define CSUBSTOP 0x1000 /* values of OP for ${word[:]OPstuff} */ #define CBLANK 0x2000 /* whitespace (blank) character */ /* Defines for use by the rest of the shell. */ extern int sh_syntaxtab[]; extern int sh_syntabsiz; #define shellmeta(c) (sh_syntaxtab[(unsigned char)(c)] & CSHMETA) #define shellbreak(c) (sh_syntaxtab[(unsigned char)(c)] & CSHBRK) #define shellquote(c) (sh_syntaxtab[(unsigned char)(c)] & CQUOTE) #define shellxquote(c) (sh_syntaxtab[(unsigned char)(c)] & CXQUOTE) #define shellblank(c) (sh_syntaxtab[(unsigned char)(c)] & CBLANK) #define parserblank(c) ((c) == ' ' || (c) == '\t') #define issyntype(c, t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) != 0) #define notsyntype(c,t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) == 0) #if defined (PROCESS_SUBSTITUTION) # define shellexp(c) ((c) == '$' || (c) == '<' || (c) == '>') #else # define shellexp(c) ((c) == '$') #endif #if defined (EXTENDED_GLOB) # define PATTERN_CHAR(c) \ ((c) == '@' || (c) == '*' || (c) == '+' || (c) == '?' || (c) == '!') #else # define PATTERN_CHAR(c) 0 #endif #define GLOB_CHAR(c) \ ((c) == '*' || (c) == '?' || (c) == '[' || (c) == ']' || (c) == '^') #define CTLESC '\001' #define CTLNUL '\177' #if !defined (HAVE_ISBLANK) && !defined (isblank) # define isblank(x) ((x) == ' ' || (x) == '\t') #endif #endif /* _SYNTAX_H_ */ PKZ_]bash/conftypes.hnu[/* conftypes.h -- defines for build and host system. */ /* Copyright (C) 2001, 2005, 2008,2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_CONFTYPES_H_) #define _CONFTYPES_H_ /* Placeholder for future modifications if cross-compiling or building a `fat' binary, e.g. on Apple Rhapsody. These values are used in multiple files, so they appear here. */ #if !defined (RHAPSODY) && !defined (MACOSX) # define HOSTTYPE CONF_HOSTTYPE # define OSTYPE CONF_OSTYPE # define MACHTYPE CONF_MACHTYPE #else /* RHAPSODY */ # if defined(__powerpc__) || defined(__ppc__) # define HOSTTYPE "powerpc" # elif defined(__i386__) # define HOSTTYPE "i386" # else # define HOSTTYPE CONF_HOSTTYPE # endif # define OSTYPE CONF_OSTYPE # define VENDOR CONF_VENDOR # define MACHTYPE HOSTTYPE "-" VENDOR "-" OSTYPE #endif /* RHAPSODY */ #ifndef HOSTTYPE # define HOSTTYPE "unknown" #endif #ifndef OSTYPE # define OSTYPE "unknown" #endif #ifndef MACHTYPE # define MACHTYPE "unknown" #endif #endif /* _CONFTYPES_H_ */ PKZnI$I$ bash/jobs.hnu[/* jobs.h -- structures and definitions used by the jobs.c file. */ /* Copyright (C) 1993-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_JOBS_H_) # define _JOBS_H_ #include "quit.h" #include "siglist.h" #include "stdc.h" #include "posixwait.h" /* Defines controlling the fashion in which jobs are listed. */ #define JLIST_STANDARD 0 #define JLIST_LONG 1 #define JLIST_PID_ONLY 2 #define JLIST_CHANGED_ONLY 3 #define JLIST_NONINTERACTIVE 4 /* I looked it up. For pretty_print_job (). The real answer is 24. */ #define LONGEST_SIGNAL_DESC 24 /* The max time to sleep while retrying fork() on EAGAIN failure */ #define FORKSLEEP_MAX 16 /* We keep an array of jobs. Each entry in the array is a linked list of processes that are piped together. The first process encountered is the group leader. */ /* Values for the `running' field of a struct process. */ #define PS_DONE 0 #define PS_RUNNING 1 #define PS_STOPPED 2 #define PS_RECYCLED 4 /* Each child of the shell is remembered in a STRUCT PROCESS. A circular chain of such structures is a pipeline. */ typedef struct process { struct process *next; /* Next process in the pipeline. A circular chain. */ pid_t pid; /* Process ID. */ WAIT status; /* The status of this command as returned by wait. */ int running; /* Non-zero if this process is running. */ char *command; /* The particular program that is running. */ } PROCESS; struct pipeline_saver { struct process *pipeline; struct pipeline_saver *next; }; /* PALIVE really means `not exited' */ #define PSTOPPED(p) (WIFSTOPPED((p)->status)) #define PRUNNING(p) ((p)->running == PS_RUNNING) #define PALIVE(p) (PRUNNING(p) || PSTOPPED(p)) #define PEXITED(p) ((p)->running == PS_DONE) #if defined (RECYCLES_PIDS) # define PRECYCLED(p) ((p)->running == PS_RECYCLED) #else # define PRECYCLED(p) (0) #endif #define PDEADPROC(p) (PEXITED(p) || PRECYCLED(p)) #define get_job_by_jid(ind) (jobs[(ind)]) /* A description of a pipeline's state. */ typedef enum { JNONE = -1, JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, JMIXED = 8 } JOB_STATE; #define JOBSTATE(job) (jobs[(job)]->state) #define J_JOBSTATE(j) ((j)->state) #define STOPPED(j) (jobs[(j)]->state == JSTOPPED) #define RUNNING(j) (jobs[(j)]->state == JRUNNING) #define DEADJOB(j) (jobs[(j)]->state == JDEAD) #define INVALID_JOB(j) ((j) < 0 || (j) >= js.j_jobslots || get_job_by_jid(j) == 0) /* Values for the FLAGS field in the JOB struct below. */ #define J_FOREGROUND 0x01 /* Non-zero if this is running in the foreground. */ #define J_NOTIFIED 0x02 /* Non-zero if already notified about job state. */ #define J_JOBCONTROL 0x04 /* Non-zero if this job started under job control. */ #define J_NOHUP 0x08 /* Don't send SIGHUP to job if shell gets SIGHUP. */ #define J_STATSAVED 0x10 /* A process in this job had had status saved via $! */ #define J_ASYNC 0x20 /* Job was started asynchronously */ #define IS_FOREGROUND(j) ((jobs[j]->flags & J_FOREGROUND) != 0) #define IS_NOTIFIED(j) ((jobs[j]->flags & J_NOTIFIED) != 0) #define IS_JOBCONTROL(j) ((jobs[j]->flags & J_JOBCONTROL) != 0) #define IS_ASYNC(j) ((jobs[j]->flags & J_ASYNC) != 0) typedef struct job { char *wd; /* The working directory at time of invocation. */ PROCESS *pipe; /* The pipeline of processes that make up this job. */ pid_t pgrp; /* The process ID of the process group (necessary). */ JOB_STATE state; /* The state that this job is in. */ int flags; /* Flags word: J_NOTIFIED, J_FOREGROUND, or J_JOBCONTROL. */ #if defined (JOB_CONTROL) COMMAND *deferred; /* Commands that will execute when this job is done. */ sh_vptrfunc_t *j_cleanup; /* Cleanup function to call when job marked JDEAD */ PTR_T cleanarg; /* Argument passed to (*j_cleanup)() */ #endif /* JOB_CONTROL */ } JOB; struct jobstats { /* limits */ long c_childmax; /* child process statistics */ int c_living; /* running or stopped child processes */ int c_reaped; /* exited child processes still in jobs list */ int c_injobs; /* total number of child processes in jobs list */ /* child process totals */ int c_totforked; /* total number of children this shell has forked */ int c_totreaped; /* total number of children this shell has reaped */ /* job counters and indices */ int j_jobslots; /* total size of jobs array */ int j_lastj; /* last (newest) job allocated */ int j_firstj; /* first (oldest) job allocated */ int j_njobs; /* number of non-NULL jobs in jobs array */ int j_ndead; /* number of JDEAD jobs in jobs array */ /* */ int j_current; /* current job */ int j_previous; /* previous job */ /* */ JOB *j_lastmade; /* last job allocated by stop_pipeline */ JOB *j_lastasync; /* last async job allocated by stop_pipeline */ }; /* Revised to accommodate new hash table bgpids implementation. */ typedef pid_t ps_index_t; struct pidstat { ps_index_t bucket_next; ps_index_t bucket_prev; pid_t pid; bits16_t status; /* only 8 bits really needed */ }; struct bgpids { struct pidstat *storage; /* storage arena */ ps_index_t head; ps_index_t nalloc; int npid; }; #define NO_PIDSTAT (ps_index_t)-1 #define NO_JOB -1 /* An impossible job array index. */ #define DUP_JOB -2 /* A possible return value for get_job_spec (). */ #define BAD_JOBSPEC -3 /* Bad syntax for job spec. */ /* A value which cannot be a process ID. */ #define NO_PID (pid_t)-1 #define ANY_PID (pid_t)-1 /* System calls. */ #if !defined (HAVE_UNISTD_H) extern pid_t fork (), getpid (), getpgrp (); #endif /* !HAVE_UNISTD_H */ /* Stuff from the jobs.c file. */ extern struct jobstats js; extern pid_t original_pgrp, shell_pgrp, pipeline_pgrp; extern volatile pid_t last_made_pid, last_asynchronous_pid; extern int asynchronous_notification; extern JOB **jobs; extern void making_children __P((void)); extern void stop_making_children __P((void)); extern void cleanup_the_pipeline __P((void)); extern void discard_last_procsub_child __P((void)); extern void save_pipeline __P((int)); extern PROCESS *restore_pipeline __P((int)); extern void start_pipeline __P((void)); extern int stop_pipeline __P((int, COMMAND *)); extern int discard_pipeline __P((PROCESS *)); extern void append_process __P((char *, pid_t, int, int)); extern void delete_job __P((int, int)); extern void nohup_job __P((int)); extern void delete_all_jobs __P((int)); extern void nohup_all_jobs __P((int)); extern int count_all_jobs __P((void)); extern void terminate_current_pipeline __P((void)); extern void terminate_stopped_jobs __P((void)); extern void hangup_all_jobs __P((void)); extern void kill_current_pipeline __P((void)); #if defined (__STDC__) && defined (pid_t) extern int get_job_by_pid __P((int, int)); extern void describe_pid __P((int)); #else extern int get_job_by_pid __P((pid_t, int)); extern void describe_pid __P((pid_t)); #endif extern void list_one_job __P((JOB *, int, int, int)); extern void list_all_jobs __P((int)); extern void list_stopped_jobs __P((int)); extern void list_running_jobs __P((int)); extern pid_t make_child __P((char *, int)); extern int get_tty_state __P((void)); extern int set_tty_state __P((void)); extern int job_exit_status __P((int)); extern int job_exit_signal __P((int)); extern int wait_for_single_pid __P((pid_t, int)); extern void wait_for_background_pids __P((void)); extern int wait_for __P((pid_t)); extern int wait_for_job __P((int)); extern int wait_for_any_job __P((void)); extern void wait_sigint_cleanup __P((void)); extern void notify_and_cleanup __P((void)); extern void reap_dead_jobs __P((void)); extern int start_job __P((int, int)); extern int kill_pid __P((pid_t, int, int)); extern int initialize_job_control __P((int)); extern void initialize_job_signals __P((void)); extern int give_terminal_to __P((pid_t, int)); extern void run_sigchld_trap __P((int)); extern int freeze_jobs_list __P((void)); extern void unfreeze_jobs_list __P((void)); extern int set_job_control __P((int)); extern void without_job_control __P((void)); extern void end_job_control __P((void)); extern void restart_job_control __P((void)); extern void set_sigchld_handler __P((void)); extern void ignore_tty_job_signals __P((void)); extern void default_tty_job_signals __P((void)); extern void get_original_tty_job_signals __P((void)); extern void init_job_stats __P((void)); extern void close_pgrp_pipe __P((void)); extern void save_pgrp_pipe __P((int *, int)); extern void restore_pgrp_pipe __P((int *)); extern void set_maxchild __P((int)); extern int job_control; /* set to 0 in nojobs.c */ #endif /* _JOBS_H_ */ PKZr?66 bash/shell.hnu[/* shell.h -- The data structures used by the shell */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "bashjmp.h" #include "command.h" #include "syntax.h" #include "general.h" #include "error.h" #include "variables.h" #include "arrayfunc.h" #include "quit.h" #include "maxpath.h" #include "unwind_prot.h" #include "dispose_cmd.h" #include "make_cmd.h" #include "ocache.h" #include "subst.h" #include "sig.h" #include "pathnames.h" #include "externs.h" extern int EOF_Reached; #define NO_PIPE -1 #define REDIRECT_BOTH -2 #define NO_VARIABLE -1 /* Values that can be returned by execute_command (). */ #define EXECUTION_FAILURE 1 #define EXECUTION_SUCCESS 0 /* Usage messages by builtins result in a return status of 2. */ #define EX_BADUSAGE 2 #define EX_MISCERROR 2 /* Special exit statuses used by the shell, internally and externally. */ #define EX_RETRYFAIL 124 #define EX_WEXPCOMSUB 125 #define EX_BINARY_FILE 126 #define EX_NOEXEC 126 #define EX_NOINPUT 126 #define EX_NOTFOUND 127 #define EX_SHERRBASE 256 /* all special error values are > this. */ #define EX_BADSYNTAX 257 /* shell syntax error */ #define EX_USAGE 258 /* syntax error in usage */ #define EX_REDIRFAIL 259 /* redirection failed */ #define EX_BADASSIGN 260 /* variable assignment error */ #define EX_EXPFAIL 261 /* word expansion failed */ /* Flag values that control parameter pattern substitution. */ #define MATCH_ANY 0x000 #define MATCH_BEG 0x001 #define MATCH_END 0x002 #define MATCH_TYPEMASK 0x003 #define MATCH_GLOBREP 0x010 #define MATCH_QUOTED 0x020 #define MATCH_ASSIGNRHS 0x040 #define MATCH_STARSUB 0x080 /* Some needed external declarations. */ extern char **shell_environment; extern WORD_LIST *rest_of_args; /* Generalized global variables. */ extern int debugging_mode; extern int executing, login_shell; extern int interactive, interactive_shell; extern int startup_state; extern int subshell_environment; extern int shell_compatibility_level; extern int locale_mb_cur_max; /* Structure to pass around that holds a bitmap of file descriptors to close, and the size of that structure. Used in execute_cmd.c. */ struct fd_bitmap { int size; char *bitmap; }; #define FD_BITMAP_SIZE 32 #define CTLESC '\001' #define CTLNUL '\177' /* Information about the current user. */ struct user_info { uid_t uid, euid; gid_t gid, egid; char *user_name; char *shell; /* shell from the password file */ char *home_dir; }; extern struct user_info current_user; /* Force gcc to not clobber X on a longjmp(). Old versions of gcc mangle this badly. */ #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 8) # define USE_VAR(x) ((void) &(x)) #else # define USE_VAR(x) #endif #define HEREDOC_MAX 16 /* Structure in which to save partial parsing state when doing things like PROMPT_COMMAND and bash_execute_unix_command execution. */ typedef struct _sh_parser_state_t { /* parsing state */ int parser_state; int *token_state; char *token; int token_buffer_size; /* input line state -- line number saved elsewhere */ int input_line_terminator; int eof_encountered; #if defined (HANDLE_MULTIBYTE) /* Nothing right now for multibyte state, but might want something later. */ #endif char **prompt_string_pointer; /* history state affecting or modified by the parser */ int current_command_line_count; #if defined (HISTORY) int remember_on_history; int history_expansion_inhibited; #endif /* execution state possibly modified by the parser */ int last_command_exit_value; #if defined (ARRAY_VARS) ARRAY *pipestatus; #endif sh_builtin_func_t *last_shell_builtin, *this_shell_builtin; /* flags state affecting the parser */ int expand_aliases; int echo_input_at_read; int need_here_doc; int here_doc_first_line; /* structures affecting the parser */ REDIRECT *redir_stack[HEREDOC_MAX]; } sh_parser_state_t; typedef struct _sh_input_line_state_t { char *input_line; size_t input_line_index; size_t input_line_size; size_t input_line_len; } sh_input_line_state_t; /* Let's try declaring these here. */ extern char *parser_remaining_input __P((void)); extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *)); extern void restore_parser_state __P((sh_parser_state_t *)); extern sh_input_line_state_t *save_input_line_state __P((sh_input_line_state_t *)); extern void restore_input_line_state __P((sh_input_line_state_t *)); PKZ,Q bash/quit.hnu[/* quit.h -- How to handle SIGINT gracefully. */ /* Copyright (C) 1993-2013 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_QUIT_H_) #define _QUIT_H_ #include "sig.h" /* for sig_atomic_t */ /* Non-zero means SIGINT has already occurred. */ extern volatile sig_atomic_t interrupt_state; extern volatile sig_atomic_t terminating_signal; /* Macro to call a great deal. SIGINT just sets the interrupt_state variable. When it is safe, put QUIT in the code, and the "interrupt" will take place. The same scheme is used for terminating signals (e.g., SIGHUP) and the terminating_signal variable. That calls a function which will end up exiting the shell. */ #define QUIT \ do { \ if (terminating_signal) termsig_handler (terminating_signal); \ if (interrupt_state) throw_to_top_level (); \ } while (0) #define CHECK_ALRM \ do { \ if (sigalrm_seen) \ sh_longjmp (alrmbuf, 1); \ } while (0) #define SETINTERRUPT interrupt_state = 1 #define CLRINTERRUPT interrupt_state = 0 #define ADDINTERRUPT interrupt_state++ #define DELINTERRUPT interrupt_state-- #define ISINTERRUPT interrupt_state != 0 /* The same sort of thing, this time just for signals that would ordinarily cause the shell to terminate. */ #define CHECK_TERMSIG \ do { \ if (terminating_signal) termsig_handler (terminating_signal); \ } while (0) #define LASTSIG() \ (terminating_signal ? terminating_signal : (interrupt_state ? SIGINT : 0)) #define CHECK_WAIT_INTR \ do { \ if (wait_intr_flag && wait_signal_received && this_shell_builtin && (this_shell_builtin == wait_builtin)) \ sh_longjmp (wait_intr_buf, 1); \ } while (0) #define RESET_SIGTERM \ do { \ sigterm_received = 0; \ } while (0) #define CHECK_SIGTERM \ do { \ if (sigterm_received) termsig_handler (SIGTERM); \ } while (0) #endif /* _QUIT_H_ */ PKZnM M bash/builtins.hnu[/* builtins.h -- What a builtin looks like, and where to find them. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #include "config.h" #if defined (HAVE_UNISTD_H) # ifdef _MINIX # include # endif # include #endif #include "command.h" #include "general.h" #if defined (ALIAS) #include "alias.h" #endif /* Flags describing various things about a builtin. */ #define BUILTIN_ENABLED 0x01 /* This builtin is enabled. */ #define BUILTIN_DELETED 0x02 /* This has been deleted with enable -d. */ #define STATIC_BUILTIN 0x04 /* This builtin is not dynamically loaded. */ #define SPECIAL_BUILTIN 0x08 /* This is a Posix `special' builtin. */ #define ASSIGNMENT_BUILTIN 0x10 /* This builtin takes assignment statements. */ #define POSIX_BUILTIN 0x20 /* This builtins is special in the Posix command search order. */ #define LOCALVAR_BUILTIN 0x40 /* This builtin creates local variables */ #define REQUIRES_BUILTIN 0x80 /* This builtin requires other files. */ #define BASE_INDENT 4 /* The thing that we build the array of builtins out of. */ struct builtin { char *name; /* The name that the user types. */ sh_builtin_func_t *function; /* The address of the invoked function. */ int flags; /* One of the #defines above. */ char * const *long_doc; /* NULL terminated array of strings. */ const char *short_doc; /* Short version of documentation. */ char *handle; /* for future use */ }; /* Found in builtins.c, created by builtins/mkbuiltins. */ extern int num_shell_builtins; /* Number of shell builtins. */ extern struct builtin static_shell_builtins[]; extern struct builtin *shell_builtins; extern struct builtin *current_builtin; PKZE`CCbash/version.hnu[/* Version control for the shell. This file gets changed when you say `make version.h' to the Makefile. It is created by mkversion. */ /* The distribution version number of this shell. */ #define DISTVERSION "4.4" /* The last built version of this shell. */ #define BUILDVERSION 1 /* The release status of this shell. */ #define RELSTATUS "release" /* The default shell compatibility-level (the current version) */ #define DEFAULT_COMPAT_LEVEL 44 /* A version string for use by sccs and the what command. */ #define SCCSVERSION "@(#)Bash version 4.4.20(1) release GNU" PKZS bash/array.hnu[/* array.h -- definitions for the interface exported by array.c that allows the rest of the shell to manipulate array variables. */ /* Copyright (C) 1997-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _ARRAY_H_ #define _ARRAY_H_ #include "stdc.h" typedef intmax_t arrayind_t; enum atype {array_indexed, array_assoc}; typedef struct array { enum atype type; arrayind_t max_index; int num_elements; struct array_element *head; } ARRAY; typedef struct array_element { arrayind_t ind; char *value; struct array_element *next, *prev; } ARRAY_ELEMENT; typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *, void *)); /* Basic operations on entire arrays */ extern ARRAY *array_create __P((void)); extern void array_flush __P((ARRAY *)); extern void array_dispose __P((ARRAY *)); extern ARRAY *array_copy __P((ARRAY *)); extern ARRAY *array_slice __P((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *)); extern void array_walk __P((ARRAY *, sh_ae_map_func_t *, void *)); extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int)); extern int array_rshift __P((ARRAY *, int, char *)); extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *)); extern int array_shift_element __P((ARRAY *, char *)); extern ARRAY *array_quote __P((ARRAY *)); extern ARRAY *array_quote_escapes __P((ARRAY *)); extern ARRAY *array_dequote __P((ARRAY *)); extern ARRAY *array_dequote_escapes __P((ARRAY *)); extern ARRAY *array_remove_quoted_nulls __P((ARRAY *)); extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int)); extern char *array_patsub __P((ARRAY *, char *, char *, int)); extern char *array_modcase __P((ARRAY *, char *, int, int)); /* Basic operations on array elements. */ extern ARRAY_ELEMENT *array_create_element __P((arrayind_t, char *)); extern ARRAY_ELEMENT *array_copy_element __P((ARRAY_ELEMENT *)); extern void array_dispose_element __P((ARRAY_ELEMENT *)); extern int array_insert __P((ARRAY *, arrayind_t, char *)); extern ARRAY_ELEMENT *array_remove __P((ARRAY *, arrayind_t)); extern char *array_reference __P((ARRAY *, arrayind_t)); /* Converting to and from arrays */ extern WORD_LIST *array_to_word_list __P((ARRAY *)); extern ARRAY *array_from_word_list __P((WORD_LIST *)); extern WORD_LIST *array_keys_to_word_list __P((ARRAY *)); extern ARRAY *array_assign_list __P((ARRAY *, WORD_LIST *)); extern char **array_to_argv __P((ARRAY *)); extern char *array_to_assign __P((ARRAY *, int)); extern char *array_to_string __P((ARRAY *, char *, int)); extern ARRAY *array_from_string __P((char *, char *)); /* Flags for array_shift */ #define AS_DISPOSE 0x01 #define array_num_elements(a) ((a)->num_elements) #define array_max_index(a) ((a)->max_index) #define array_head(a) ((a)->head) #define array_empty(a) ((a)->num_elements == 0) #define element_value(ae) ((ae)->value) #define element_index(ae) ((ae)->ind) #define element_forw(ae) ((ae)->next) #define element_back(ae) ((ae)->prev) /* Convenience */ #define array_push(a,v) \ do { array_rshift ((a), 1, (v)); } while (0) #define array_pop(a) \ do { array_dispose_element (array_shift ((a), 1, 0)); } while (0) #define GET_ARRAY_FROM_VAR(n, v, a) \ do { \ (v) = find_variable (n); \ (a) = ((v) && array_p ((v))) ? array_cell (v) : (ARRAY *)0; \ } while (0) #define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*') #endif /* _ARRAY_H_ */ PKZc))bash/general.hnu[/* general.h -- defines that everybody likes to use. */ /* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_GENERAL_H_) #define _GENERAL_H_ #include "stdc.h" #include "bashtypes.h" #include "chartypes.h" #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE) # if defined (HAVE_SYS_TIME_H) # include # endif # include #endif #if defined (HAVE_STRING_H) # include #else # include #endif /* !HAVE_STRING_H */ #if defined (HAVE_LIMITS_H) # include #endif #include "xmalloc.h" /* NULL pointer type. */ #if !defined (NULL) # if defined (__STDC__) # define NULL ((void *) 0) # else # define NULL 0x0 # endif /* !__STDC__ */ #endif /* !NULL */ /* Hardly used anymore */ #define pointer_to_int(x) (int)((char *)x - (char *)0) #if defined (alpha) && defined (__GNUC__) && !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif #if !defined (strcpy) && (defined (HAVE_DECL_STRCPY) && !HAVE_DECL_STRCPY) extern char *strcpy __P((char *, const char *)); #endif #if !defined (savestring) # define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef member # define member(c, s) ((c) ? ((char *)mbschr ((s), (c)) != (char *)NULL) : 0) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifndef CHAR_MAX # ifdef __CHAR_UNSIGNED__ # define CHAR_MAX 0xff # else # define CHAR_MAX 0x7f # endif #endif #ifndef CHAR_BIT # define CHAR_BIT 8 #endif /* Nonzero if the integer type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* Bound on length of the string representing an integer value of type T. Subtract one for the sign bit if T is signed; 302 / 1000 is log10 (2) rounded up; add one for integer division truncation; add one more for a minus sign if t is signed. */ #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \ + 1 + TYPE_SIGNED (t)) /* Define exactly what a legal shell identifier consists of. */ #define legal_variable_starter(c) (ISALPHA(c) || (c == '_')) #define legal_variable_char(c) (ISALNUM(c) || c == '_') /* Definitions used in subst.c and by the `read' builtin for field splitting. */ #define spctabnl(c) ((c) == ' ' || (c) == '\t' || (c) == '\n') /* All structs which contain a `next' field should have that field as the first field in the struct. This means that functions can be written to handle the general case for linked lists. */ typedef struct g_list { struct g_list *next; } GENERIC_LIST; /* Here is a generic structure for associating character strings with integers. It is used in the parser for shell tokenization. */ typedef struct { char *word; int token; } STRING_INT_ALIST; /* A macro to avoid making an unnecessary function call. */ #define REVERSE_LIST(list, type) \ ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \ : (type)(list)) #if __GNUC__ > 1 # define FASTCOPY(s, d, n) __builtin_memcpy ((d), (s), (n)) #else /* !__GNUC__ */ # if !defined (HAVE_BCOPY) # if !defined (HAVE_MEMMOVE) # define FASTCOPY(s, d, n) memcpy ((d), (s), (n)) # else # define FASTCOPY(s, d, n) memmove ((d), (s), (n)) # endif /* !HAVE_MEMMOVE */ # else /* HAVE_BCOPY */ # define FASTCOPY(s, d, n) bcopy ((s), (d), (n)) # endif /* HAVE_BCOPY */ #endif /* !__GNUC__ */ /* String comparisons that possibly save a function call each. */ #define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0) #define STREQN(a, b, n) ((n == 0) ? (1) \ : ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)) /* More convenience definitions that possibly save system or libc calls. */ #define STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) #define FREE(s) do { if (s) free (s); } while (0) #define MEMBER(c, s) (((c) && c == (s)[0] && !(s)[1]) || (member(c, s))) /* A fairly hairy macro to check whether an allocated string has more room, and to resize it using xrealloc if it does not. STR is the string (char *) CIND is the current index into the string (int) ROOM is the amount of additional room we need in the string (int) CSIZE is the currently-allocated size of STR (int) SINCR is how much to increment CSIZE before calling xrealloc (int) */ #define RESIZE_MALLOCED_BUFFER(str, cind, room, csize, sincr) \ do { \ if ((cind) + (room) >= csize) \ { \ while ((cind) + (room) >= csize) \ csize += (sincr); \ str = xrealloc (str, csize); \ } \ } while (0) /* Function pointers can be declared as (Function *)foo. */ #if !defined (_FUNCTION_DEF) # define _FUNCTION_DEF typedef int Function (); typedef void VFunction (); typedef char *CPFunction (); /* no longer used */ typedef char **CPPFunction (); /* no longer used */ #endif /* _FUNCTION_DEF */ #ifndef SH_FUNCTION_TYPEDEF # define SH_FUNCTION_TYPEDEF /* Shell function typedefs with prototypes */ /* `Generic' function pointer typedefs */ typedef int sh_intfunc_t __P((int)); typedef int sh_ivoidfunc_t __P((void)); typedef int sh_icpfunc_t __P((char *)); typedef int sh_icppfunc_t __P((char **)); typedef int sh_iptrfunc_t __P((PTR_T)); typedef void sh_voidfunc_t __P((void)); typedef void sh_vintfunc_t __P((int)); typedef void sh_vcpfunc_t __P((char *)); typedef void sh_vcppfunc_t __P((char **)); typedef void sh_vptrfunc_t __P((PTR_T)); typedef int sh_wdesc_func_t __P((WORD_DESC *)); typedef int sh_wlist_func_t __P((WORD_LIST *)); typedef int sh_glist_func_t __P((GENERIC_LIST *)); typedef char *sh_string_func_t __P((char *)); /* like savestring, et al. */ typedef int sh_msg_func_t __P((const char *, ...)); /* printf(3)-like */ typedef void sh_vmsg_func_t __P((const char *, ...)); /* printf(3)-like */ /* Specific function pointer typedefs. Most of these could be done with #defines. */ typedef void sh_sv_func_t __P((char *)); /* sh_vcpfunc_t */ typedef void sh_free_func_t __P((PTR_T)); /* sh_vptrfunc_t */ typedef void sh_resetsig_func_t __P((int)); /* sh_vintfunc_t */ typedef int sh_ignore_func_t __P((const char *)); /* sh_icpfunc_t */ typedef int sh_assign_func_t __P((const char *)); typedef int sh_wassign_func_t __P((WORD_DESC *, int)); typedef int sh_load_func_t __P((char *)); typedef void sh_unload_func_t __P((char *)); typedef int sh_builtin_func_t __P((WORD_LIST *)); /* sh_wlist_func_t */ #endif /* SH_FUNCTION_TYPEDEF */ #define NOW ((time_t) time ((time_t *) 0)) /* Some defines for calling file status functions. */ #define FS_EXISTS 0x1 #define FS_EXECABLE 0x2 #define FS_EXEC_PREFERRED 0x4 #define FS_EXEC_ONLY 0x8 #define FS_DIRECTORY 0x10 #define FS_NODIRS 0x20 #define FS_READABLE 0x40 /* Default maximum for move_to_high_fd */ #define HIGH_FD_MAX 256 /* The type of function passed as the fourth argument to qsort(3). */ #ifdef __STDC__ typedef int QSFUNC (const void *, const void *); #else typedef int QSFUNC (); #endif /* Some useful definitions for Unix pathnames. Argument convention: x == string, c == character */ #if !defined (__CYGWIN__) # define ABSPATH(x) ((x)[0] == '/') # define RELPATH(x) ((x)[0] != '/') #else /* __CYGWIN__ */ # define ABSPATH(x) (((x)[0] && ISALPHA((unsigned char)(x)[0]) && (x)[1] == ':') || ISDIRSEP((x)[0])) # define RELPATH(x) (ABSPATH(x) == 0) #endif /* __CYGWIN__ */ #define ROOTEDPATH(x) (ABSPATH(x)) #define DIRSEP '/' #if !defined (__CYGWIN__) # define ISDIRSEP(c) ((c) == '/') #else # define ISDIRSEP(c) ((c) == '/' || (c) == '\\') #endif /* __CYGWIN__ */ #define PATHSEP(c) (ISDIRSEP(c) || (c) == 0) #if 0 /* Declarations for functions defined in xmalloc.c */ extern PTR_T xmalloc __P((size_t)); extern PTR_T xrealloc __P((void *, size_t)); extern void xfree __P((void *)); #endif /* Declarations for functions defined in general.c */ extern void posix_initialize __P((int)); #if defined (RLIMTYPE) extern RLIMTYPE string_to_rlimtype __P((char *)); extern void print_rlimtype __P((RLIMTYPE, int)); #endif extern int all_digits __P((const char *)); extern int legal_number __P((const char *, intmax_t *)); extern int legal_identifier __P((const char *)); extern int importable_function_name __P((const char *, size_t)); extern int exportable_function_name __P((const char *)); extern int check_identifier __P((WORD_DESC *, int)); extern int valid_nameref_value __P((const char *, int)); extern int check_selfref __P((const char *, char *, int)); extern int legal_alias_name __P((const char *, int)); extern int assignment __P((const char *, int)); extern int sh_unset_nodelay_mode __P((int)); extern int sh_validfd __P((int)); extern int fd_ispipe __P((int)); extern void check_dev_tty __P((void)); extern int move_to_high_fd __P((int, int, int)); extern int check_binary_file __P((const char *, int)); #ifdef _POSIXSTAT_H_ extern int same_file __P((const char *, const char *, struct stat *, struct stat *)); #endif extern int sh_openpipe __P((int *)); extern int sh_closepipe __P((int *)); extern int file_exists __P((const char *)); extern int file_isdir __P((const char *)); extern int file_iswdir __P((const char *)); extern int path_dot_or_dotdot __P((const char *)); extern int absolute_pathname __P((const char *)); extern int absolute_program __P((const char *)); extern char *make_absolute __P((const char *, const char *)); extern char *base_pathname __P((char *)); extern char *full_pathname __P((char *)); extern char *polite_directory_format __P((char *)); extern char *trim_pathname __P((char *, int)); extern char *printable_filename __P((char *, int)); extern char *extract_colon_unit __P((char *, int *)); extern void tilde_initialize __P((void)); extern char *bash_tilde_find_word __P((const char *, int, int *)); extern char *bash_tilde_expand __P((const char *, int)); extern int group_member __P((gid_t)); extern char **get_group_list __P((int *)); extern int *get_group_array __P((int *)); extern char *conf_standard_path __P((void)); #endif /* _GENERAL_H_ */ PKZ:Y5  bash/builtins/getopt.hnu[/* getopt.h - declarations for getopt. */ /* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2008,2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* XXX THIS HAS BEEN MODIFIED FOR INCORPORATION INTO BASH XXX */ #ifndef _SH_GETOPT_H #define _SH_GETOPT_H 1 #include "stdc.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *sh_optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `sh_optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int sh_optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int sh_opterr; /* Set to an option character which was unrecognized. */ extern int sh_optopt; /* Set to 1 when an unrecognized option is encountered. */ extern int sh_badopt; extern int sh_getopt __P((int, char *const *, const char *)); typedef struct sh_getopt_state { char *gs_optarg; int gs_optind; int gs_curopt; char *gs_nextchar; int gs_charindex; int gs_flags; } sh_getopt_state_t; extern void sh_getopt_restore_state __P((char **)); extern sh_getopt_state_t *sh_getopt_alloc_istate __P((void)); extern void sh_getopt_dispose_istate __P((sh_getopt_state_t *)); extern sh_getopt_state_t *sh_getopt_save_istate __P((void)); extern void sh_getopt_restore_istate __P((sh_getopt_state_t *)); #endif /* _SH_GETOPT_H */ PKZ})bash/builtins/common.hnu[/* common.h -- extern declarations for functions defined in common.c. */ /* Copyright (C) 1993-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (__COMMON_H) # define __COMMON_H #include "stdc.h" #define ISOPTION(s, c) (s[0] == '-' && !s[2] && s[1] == c) #define ISHELP(s) (STREQ ((s), "--help")) #define CHECK_HELPOPT(l) \ do { \ if ((l) && (l)->word && ISHELP((l)->word->word)) \ { \ builtin_help (); \ return (EX_USAGE); \ } \ } while (0) #define CASE_HELPOPT \ case GETOPT_HELP: \ builtin_help (); \ return (EX_USAGE) /* Flag values for parse_and_execute () */ #define SEVAL_NONINT 0x001 #define SEVAL_INTERACT 0x002 #define SEVAL_NOHIST 0x004 #define SEVAL_NOFREE 0x008 #define SEVAL_RESETLINE 0x010 #define SEVAL_PARSEONLY 0x020 #define SEVAL_NOLONGJMP 0x040 #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */ #define SEVAL_ONECMD 0x100 /* only allow a single command */ #define SEVAL_NOHISTEXP 0x200 /* inhibit history expansion */ /* Flags for describe_command, shared between type.def and command.def */ #define CDESC_ALL 0x001 /* type -a */ #define CDESC_SHORTDESC 0x002 /* command -V */ #define CDESC_REUSABLE 0x004 /* command -v */ #define CDESC_TYPE 0x008 /* type -t */ #define CDESC_PATH_ONLY 0x010 /* type -p */ #define CDESC_FORCE_PATH 0x020 /* type -ap or type -P */ #define CDESC_NOFUNCS 0x040 /* type -f */ #define CDESC_ABSPATH 0x080 /* convert to absolute path, no ./ */ #define CDESC_STDPATH 0x100 /* command -p */ /* Flags for get_job_by_name */ #define JM_PREFIX 0x01 /* prefix of job name */ #define JM_SUBSTRING 0x02 /* substring of job name */ #define JM_EXACT 0x04 /* match job name exactly */ #define JM_STOPPED 0x08 /* match stopped jobs only */ #define JM_FIRSTMATCH 0x10 /* return first matching job */ /* Flags for remember_args and value of changed_dollar_vars */ #define ARGS_NONE 0x0 #define ARGS_INVOC 0x01 #define ARGS_FUNC 0x02 #define ARGS_SETBLTIN 0x04 /* Maximum number of attribute letters */ #define MAX_ATTRIBUTES 16 /* Functions from common.c */ extern void builtin_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); extern void builtin_warning __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); extern void builtin_usage __P((void)); extern void no_args __P((WORD_LIST *)); extern int no_options __P((WORD_LIST *)); /* common error message functions */ extern void sh_needarg __P((char *)); extern void sh_neednumarg __P((char *)); extern void sh_notfound __P((char *)); extern void sh_invalidopt __P((char *)); extern void sh_invalidoptname __P((char *)); extern void sh_invalidid __P((char *)); extern void sh_invalidnum __P((char *)); extern void sh_invalidsig __P((char *)); extern void sh_erange __P((char *, char *)); extern void sh_badpid __P((char *)); extern void sh_badjob __P((char *)); extern void sh_readonly __P((const char *)); extern void sh_nojobs __P((char *)); extern void sh_restricted __P((char *)); extern void sh_notbuiltin __P((char *)); extern void sh_wrerror __P((void)); extern void sh_ttyerror __P((int)); extern int sh_chkwrite __P((int)); extern char **make_builtin_argv __P((WORD_LIST *, int *)); extern void remember_args __P((WORD_LIST *, int)); extern int dollar_vars_changed __P((void)); extern void set_dollar_vars_unchanged __P((void)); extern void set_dollar_vars_changed __P((void)); extern int get_numeric_arg __P((WORD_LIST *, int, intmax_t *)); extern int get_exitstat __P((WORD_LIST *)); extern int read_octal __P((char *)); /* Keeps track of the current working directory. */ extern char *the_current_working_directory; extern char *get_working_directory __P((char *)); extern void set_working_directory __P((char *)); #if defined (JOB_CONTROL) extern int get_job_by_name __P((const char *, int)); extern int get_job_spec __P((WORD_LIST *)); #endif extern int display_signal_list __P((WORD_LIST *, int)); /* It's OK to declare a function as returning a Function * without providing a definition of what a `Function' is. */ extern struct builtin *builtin_address_internal __P((char *, int)); extern sh_builtin_func_t *find_shell_builtin __P((char *)); extern sh_builtin_func_t *builtin_address __P((char *)); extern sh_builtin_func_t *find_special_builtin __P((char *)); extern void initialize_shell_builtins __P((void)); /* Functions from exit.def */ extern void bash_logout __P((void)); /* Functions from getopts.def */ extern void getopts_reset __P((int)); /* Functions from help.def */ extern void builtin_help __P((void)); /* Functions from read.def */ extern void read_tty_cleanup __P((void)); extern int read_tty_modified __P((void)); /* Functions from set.def */ extern int minus_o_option_value __P((char *)); extern void list_minus_o_opts __P((int, int)); extern char **get_minus_o_opts __P((void)); extern int set_minus_o_option __P((int, char *)); extern void set_shellopts __P((void)); extern void parse_shellopts __P((char *)); extern void initialize_shell_options __P((int)); extern void reset_shell_options __P((void)); extern char *get_current_options __P((void)); extern void set_current_options __P((const char *)); /* Functions from shopt.def */ extern void reset_shopt_options __P((void)); extern char **get_shopt_options __P((void)); extern int shopt_setopt __P((char *, int)); extern int shopt_listopt __P((char *, int)); extern int set_login_shell __P((char *, int)); extern void set_bashopts __P((void)); extern void parse_bashopts __P((char *)); extern void initialize_bashopts __P((int)); extern void set_compatibility_opts __P((void)); /* Functions from type.def */ extern int describe_command __P((char *, int)); /* Functions from setattr.def */ extern int set_or_show_attributes __P((WORD_LIST *, int, int)); extern int show_all_var_attributes __P((int, int)); extern int show_var_attributes __P((SHELL_VAR *, int, int)); extern int show_name_attributes __P((char *, int)); extern int show_func_attributes __P((char *, int)); extern void set_var_attribute __P((char *, int, int)); extern int var_attribute_string __P((SHELL_VAR *, int, char *)); /* Functions from pushd.def */ extern char *get_dirstack_from_string __P((char *)); extern char *get_dirstack_element __P((intmax_t, int)); extern void set_dirstack_element __P((intmax_t, int, char *)); extern WORD_LIST *get_directory_stack __P((int)); /* Functions from evalstring.c */ extern int parse_and_execute __P((char *, const char *, int)); extern int evalstring __P((char *, const char *, int)); extern void parse_and_execute_cleanup __P((void)); extern int parse_string __P((char *, const char *, int, char **)); extern int should_suppress_fork __P((COMMAND *)); extern void optimize_fork __P((COMMAND *)); /* Functions from evalfile.c */ extern int maybe_execute_file __P((const char *, int)); extern int force_execute_file __P((const char *, int)); extern int source_file __P((const char *, int)); extern int fc_execute_file __P((const char *)); #endif /* !__COMMON_H */ PKZZ0bash/builtins/bashgetopt.hnu[/* bashgetopt.h -- extern declarations for stuff defined in bashgetopt.c. */ /* Copyright (C) 1993 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* See getopt.h for the explanation of these variables. */ #if !defined (__BASH_GETOPT_H) # define __BASH_GETOPT_H #include #define GETOPT_EOF -1 #define GETOPT_HELP -99 extern char *list_optarg; extern int list_optopt; extern int list_opttype; extern WORD_LIST *lcurrent; extern WORD_LIST *loptend; extern int internal_getopt __P((WORD_LIST *, char *)); extern void reset_internal_getopt __P((void)); #endif /* !__BASH_GETOPT_H */ PKZ9;;bash/builtins/builtext.hnu[/* builtext.h - The list of builtins found in libbuiltins.a. */ #if defined (ALIAS) extern int alias_builtin __P((WORD_LIST *)); extern char * const alias_doc[]; #endif /* ALIAS */ #if defined (ALIAS) extern int unalias_builtin __P((WORD_LIST *)); extern char * const unalias_doc[]; #endif /* ALIAS */ #if defined (READLINE) extern int bind_builtin __P((WORD_LIST *)); extern char * const bind_doc[]; #endif /* READLINE */ extern int break_builtin __P((WORD_LIST *)); extern char * const break_doc[]; extern int continue_builtin __P((WORD_LIST *)); extern char * const continue_doc[]; extern int builtin_builtin __P((WORD_LIST *)); extern char * const builtin_doc[]; #if defined (DEBUGGER) extern int caller_builtin __P((WORD_LIST *)); extern char * const caller_doc[]; #endif /* DEBUGGER */ extern int cd_builtin __P((WORD_LIST *)); extern char * const cd_doc[]; extern int pwd_builtin __P((WORD_LIST *)); extern char * const pwd_doc[]; extern int colon_builtin __P((WORD_LIST *)); extern char * const colon_doc[]; extern int colon_builtin __P((WORD_LIST *)); extern char * const true_doc[]; extern int false_builtin __P((WORD_LIST *)); extern char * const false_doc[]; extern int command_builtin __P((WORD_LIST *)); extern char * const command_doc[]; extern int declare_builtin __P((WORD_LIST *)); extern char * const declare_doc[]; extern int declare_builtin __P((WORD_LIST *)); extern char * const typeset_doc[]; extern int local_builtin __P((WORD_LIST *)); extern char * const local_doc[]; #if defined (V9_ECHO) extern int echo_builtin __P((WORD_LIST *)); extern char * const echo_doc[]; #endif /* V9_ECHO */ #if !defined (V9_ECHO) extern int echo_builtin __P((WORD_LIST *)); extern char * const echo_doc[]; #endif /* !V9_ECHO */ extern int enable_builtin __P((WORD_LIST *)); extern char * const enable_doc[]; extern int eval_builtin __P((WORD_LIST *)); extern char * const eval_doc[]; extern int getopts_builtin __P((WORD_LIST *)); extern char * const getopts_doc[]; extern int exec_builtin __P((WORD_LIST *)); extern char * const exec_doc[]; extern int exit_builtin __P((WORD_LIST *)); extern char * const exit_doc[]; extern int logout_builtin __P((WORD_LIST *)); extern char * const logout_doc[]; #if defined (HISTORY) extern int fc_builtin __P((WORD_LIST *)); extern char * const fc_doc[]; #endif /* HISTORY */ #if defined (JOB_CONTROL) extern int fg_builtin __P((WORD_LIST *)); extern char * const fg_doc[]; #endif /* JOB_CONTROL */ #if defined (JOB_CONTROL) extern int bg_builtin __P((WORD_LIST *)); extern char * const bg_doc[]; #endif /* JOB_CONTROL */ extern int hash_builtin __P((WORD_LIST *)); extern char * const hash_doc[]; #if defined (HELP_BUILTIN) extern int help_builtin __P((WORD_LIST *)); extern char * const help_doc[]; #endif /* HELP_BUILTIN */ #if defined (HISTORY) extern int history_builtin __P((WORD_LIST *)); extern char * const history_doc[]; #endif /* HISTORY */ #if defined (JOB_CONTROL) extern int jobs_builtin __P((WORD_LIST *)); extern char * const jobs_doc[]; #endif /* JOB_CONTROL */ #if defined (JOB_CONTROL) extern int disown_builtin __P((WORD_LIST *)); extern char * const disown_doc[]; #endif /* JOB_CONTROL */ extern int kill_builtin __P((WORD_LIST *)); extern char * const kill_doc[]; extern int let_builtin __P((WORD_LIST *)); extern char * const let_doc[]; extern int read_builtin __P((WORD_LIST *)); extern char * const read_doc[]; extern int return_builtin __P((WORD_LIST *)); extern char * const return_doc[]; extern int set_builtin __P((WORD_LIST *)); extern char * const set_doc[]; extern int unset_builtin __P((WORD_LIST *)); extern char * const unset_doc[]; extern int export_builtin __P((WORD_LIST *)); extern char * const export_doc[]; extern int readonly_builtin __P((WORD_LIST *)); extern char * const readonly_doc[]; extern int shift_builtin __P((WORD_LIST *)); extern char * const shift_doc[]; extern int source_builtin __P((WORD_LIST *)); extern char * const source_doc[]; extern int source_builtin __P((WORD_LIST *)); extern char * const dot_doc[]; #if defined (JOB_CONTROL) extern int suspend_builtin __P((WORD_LIST *)); extern char * const suspend_doc[]; #endif /* JOB_CONTROL */ extern int test_builtin __P((WORD_LIST *)); extern char * const test_doc[]; extern int test_builtin __P((WORD_LIST *)); extern char * const test_bracket_doc[]; extern int times_builtin __P((WORD_LIST *)); extern char * const times_doc[]; extern int trap_builtin __P((WORD_LIST *)); extern char * const trap_doc[]; extern int type_builtin __P((WORD_LIST *)); extern char * const type_doc[]; #if !defined (_MINIX) extern int ulimit_builtin __P((WORD_LIST *)); extern char * const ulimit_doc[]; #endif /* !_MINIX */ extern int umask_builtin __P((WORD_LIST *)); extern char * const umask_doc[]; #if defined (JOB_CONTROL) extern int wait_builtin __P((WORD_LIST *)); extern char * const wait_doc[]; #endif /* JOB_CONTROL */ #if !defined (JOB_CONTROL) extern int wait_builtin __P((WORD_LIST *)); extern char * const wait_doc[]; #endif /* !JOB_CONTROL */ extern char * const for_doc[]; extern char * const arith_for_doc[]; extern char * const select_doc[]; extern char * const time_doc[]; extern char * const case_doc[]; extern char * const if_doc[]; extern char * const while_doc[]; extern char * const until_doc[]; extern char * const coproc_doc[]; extern char * const function_doc[]; extern char * const grouping_braces_doc[]; extern char * const fg_percent_doc[]; extern char * const arith_doc[]; extern char * const conditional_doc[]; extern char * const variable_help_doc[]; #if defined (PUSHD_AND_POPD) extern int pushd_builtin __P((WORD_LIST *)); extern char * const pushd_doc[]; #endif /* PUSHD_AND_POPD */ #if defined (PUSHD_AND_POPD) extern int popd_builtin __P((WORD_LIST *)); extern char * const popd_doc[]; #endif /* PUSHD_AND_POPD */ #if defined (PUSHD_AND_POPD) extern int dirs_builtin __P((WORD_LIST *)); extern char * const dirs_doc[]; #endif /* PUSHD_AND_POPD */ extern int shopt_builtin __P((WORD_LIST *)); extern char * const shopt_doc[]; extern int printf_builtin __P((WORD_LIST *)); extern char * const printf_doc[]; #if defined (PROGRAMMABLE_COMPLETION) extern int complete_builtin __P((WORD_LIST *)); extern char * const complete_doc[]; #endif /* PROGRAMMABLE_COMPLETION */ #if defined (PROGRAMMABLE_COMPLETION) extern int compgen_builtin __P((WORD_LIST *)); extern char * const compgen_doc[]; #endif /* PROGRAMMABLE_COMPLETION */ #if defined (PROGRAMMABLE_COMPLETION) extern int compopt_builtin __P((WORD_LIST *)); extern char * const compopt_doc[]; #endif /* PROGRAMMABLE_COMPLETION */ extern int mapfile_builtin __P((WORD_LIST *)); extern char * const mapfile_doc[]; extern int mapfile_builtin __P((WORD_LIST *)); extern char * const readarray_doc[]; PKZ bash/y.tab.hnu[/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ #ifndef YY_YY_Y_TAB_H_INCLUDED # define YY_YY_Y_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { IF = 258, THEN = 259, ELSE = 260, ELIF = 261, FI = 262, CASE = 263, ESAC = 264, FOR = 265, SELECT = 266, WHILE = 267, UNTIL = 268, DO = 269, DONE = 270, FUNCTION = 271, COPROC = 272, COND_START = 273, COND_END = 274, COND_ERROR = 275, IN = 276, BANG = 277, TIME = 278, TIMEOPT = 279, TIMEIGN = 280, WORD = 281, ASSIGNMENT_WORD = 282, REDIR_WORD = 283, NUMBER = 284, ARITH_CMD = 285, ARITH_FOR_EXPRS = 286, COND_CMD = 287, AND_AND = 288, OR_OR = 289, GREATER_GREATER = 290, LESS_LESS = 291, LESS_AND = 292, LESS_LESS_LESS = 293, GREATER_AND = 294, SEMI_SEMI = 295, SEMI_AND = 296, SEMI_SEMI_AND = 297, LESS_LESS_MINUS = 298, AND_GREATER = 299, AND_GREATER_GREATER = 300, LESS_GREATER = 301, GREATER_BAR = 302, BAR_AND = 303, yacc_EOF = 304 }; #endif /* Tokens. */ #define IF 258 #define THEN 259 #define ELSE 260 #define ELIF 261 #define FI 262 #define CASE 263 #define ESAC 264 #define FOR 265 #define SELECT 266 #define WHILE 267 #define UNTIL 268 #define DO 269 #define DONE 270 #define FUNCTION 271 #define COPROC 272 #define COND_START 273 #define COND_END 274 #define COND_ERROR 275 #define IN 276 #define BANG 277 #define TIME 278 #define TIMEOPT 279 #define TIMEIGN 280 #define WORD 281 #define ASSIGNMENT_WORD 282 #define REDIR_WORD 283 #define NUMBER 284 #define ARITH_CMD 285 #define ARITH_FOR_EXPRS 286 #define COND_CMD 287 #define AND_AND 288 #define OR_OR 289 #define GREATER_GREATER 290 #define LESS_LESS 291 #define LESS_AND 292 #define LESS_LESS_LESS 293 #define GREATER_AND 294 #define SEMI_SEMI 295 #define SEMI_AND 296 #define SEMI_SEMI_AND 297 #define LESS_LESS_MINUS 298 #define AND_GREATER 299 #define AND_GREATER_GREATER 300 #define LESS_GREATER 301 #define GREATER_BAR 302 #define BAR_AND 303 #define yacc_EOF 304 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 333 "./parse.y" /* yacc.c:1909 */ WORD_DESC *word; /* the word that we read. */ int number; /* the number that we read. */ WORD_LIST *word_list; COMMAND *command; REDIRECT *redirect; ELEMENT element; PATTERN_LIST *pattern; #line 162 "y.tab.h" /* yacc.c:1909 */ }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_Y_TAB_H_INCLUDED */ PKZNfBfBbash/variables.hnu[/* variables.h -- data structures for shell variables. */ /* Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_VARIABLES_H_) #define _VARIABLES_H_ #include "stdc.h" #include "array.h" #include "assoc.h" /* Shell variables and functions are stored in hash tables. */ #include "hashlib.h" #include "conftypes.h" /* A variable context. */ typedef struct var_context { char *name; /* empty or NULL means global context */ int scope; /* 0 means global context */ int flags; struct var_context *up; /* previous function calls */ struct var_context *down; /* down towards global context */ HASH_TABLE *table; /* variables at this scope */ } VAR_CONTEXT; /* Flags for var_context->flags */ #define VC_HASLOCAL 0x01 #define VC_HASTMPVAR 0x02 #define VC_FUNCENV 0x04 /* also function if name != NULL */ #define VC_BLTNENV 0x08 /* builtin_env */ #define VC_TEMPENV 0x10 /* temporary_env */ #define VC_TEMPFLAGS (VC_FUNCENV|VC_BLTNENV|VC_TEMPENV) /* Accessing macros */ #define vc_isfuncenv(vc) (((vc)->flags & VC_FUNCENV) != 0) #define vc_isbltnenv(vc) (((vc)->flags & VC_BLTNENV) != 0) #define vc_istempenv(vc) (((vc)->flags & (VC_TEMPFLAGS)) == VC_TEMPENV) #define vc_istempscope(vc) (((vc)->flags & (VC_TEMPENV|VC_BLTNENV)) != 0) #define vc_haslocals(vc) (((vc)->flags & VC_HASLOCAL) != 0) #define vc_hastmpvars(vc) (((vc)->flags & VC_HASTMPVAR) != 0) /* What a shell variable looks like. */ typedef struct variable *sh_var_value_func_t __P((struct variable *)); typedef struct variable *sh_var_assign_func_t __P((struct variable *, char *, arrayind_t, char *)); /* For the future */ union _value { char *s; /* string value */ intmax_t i; /* int value */ COMMAND *f; /* function */ ARRAY *a; /* array */ HASH_TABLE *h; /* associative array */ double d; /* floating point number */ #if defined (HAVE_LONG_DOUBLE) long double ld; /* long double */ #endif struct variable *v; /* possible indirect variable use */ void *opaque; /* opaque data for future use */ }; typedef struct variable { char *name; /* Symbol that the user types. */ char *value; /* Value that is returned. */ char *exportstr; /* String for the environment. */ sh_var_value_func_t *dynamic_value; /* Function called to return a `dynamic' value for a variable, like $SECONDS or $RANDOM. */ sh_var_assign_func_t *assign_func; /* Function called when this `special variable' is assigned a value in bind_variable. */ int attributes; /* export, readonly, array, invisible... */ int context; /* Which context this variable belongs to. */ } SHELL_VAR; typedef struct _vlist { SHELL_VAR **list; size_t list_size; /* allocated size */ size_t list_len; /* current number of entries */ } VARLIST; /* The various attributes that a given variable can have. */ /* First, the user-visible attributes */ #define att_exported 0x0000001 /* export to environment */ #define att_readonly 0x0000002 /* cannot change */ #define att_array 0x0000004 /* value is an array */ #define att_function 0x0000008 /* value is a function */ #define att_integer 0x0000010 /* internal representation is int */ #define att_local 0x0000020 /* variable is local to a function */ #define att_assoc 0x0000040 /* variable is an associative array */ #define att_trace 0x0000080 /* function is traced with DEBUG trap */ #define att_uppercase 0x0000100 /* word converted to uppercase on assignment */ #define att_lowercase 0x0000200 /* word converted to lowercase on assignment */ #define att_capcase 0x0000400 /* word capitalized on assignment */ #define att_nameref 0x0000800 /* word is a name reference */ #define user_attrs (att_exported|att_readonly|att_integer|att_local|att_trace|att_uppercase|att_lowercase|att_capcase|att_nameref) #define attmask_user 0x0000fff /* Internal attributes used for bookkeeping */ #define att_invisible 0x0001000 /* cannot see */ #define att_nounset 0x0002000 /* cannot unset */ #define att_noassign 0x0004000 /* assignment not allowed */ #define att_imported 0x0008000 /* came from environment */ #define att_special 0x0010000 /* requires special handling */ #define att_nofree 0x0020000 /* do not free value on unset */ #define attmask_int 0x00ff000 /* Internal attributes used for variable scoping. */ #define att_tempvar 0x0100000 /* variable came from the temp environment */ #define att_propagate 0x0200000 /* propagate to previous scope */ #define attmask_scope 0x0f00000 #define exported_p(var) ((((var)->attributes) & (att_exported))) #define readonly_p(var) ((((var)->attributes) & (att_readonly))) #define array_p(var) ((((var)->attributes) & (att_array))) #define function_p(var) ((((var)->attributes) & (att_function))) #define integer_p(var) ((((var)->attributes) & (att_integer))) #define local_p(var) ((((var)->attributes) & (att_local))) #define assoc_p(var) ((((var)->attributes) & (att_assoc))) #define trace_p(var) ((((var)->attributes) & (att_trace))) #define uppercase_p(var) ((((var)->attributes) & (att_uppercase))) #define lowercase_p(var) ((((var)->attributes) & (att_lowercase))) #define capcase_p(var) ((((var)->attributes) & (att_capcase))) #define nameref_p(var) ((((var)->attributes) & (att_nameref))) #define invisible_p(var) ((((var)->attributes) & (att_invisible))) #define non_unsettable_p(var) ((((var)->attributes) & (att_nounset))) #define noassign_p(var) ((((var)->attributes) & (att_noassign))) #define imported_p(var) ((((var)->attributes) & (att_imported))) #define specialvar_p(var) ((((var)->attributes) & (att_special))) #define nofree_p(var) ((((var)->attributes) & (att_nofree))) #define tempvar_p(var) ((((var)->attributes) & (att_tempvar))) /* Variable names: lvalues */ #define name_cell(var) ((var)->name) /* Acessing variable values: rvalues */ #define value_cell(var) ((var)->value) #define function_cell(var) (COMMAND *)((var)->value) #define array_cell(var) (ARRAY *)((var)->value) #define assoc_cell(var) (HASH_TABLE *)((var)->value) #define nameref_cell(var) ((var)->value) /* so it can change later */ #define NAMEREF_MAX 8 /* only 8 levels of nameref indirection */ #define var_isset(var) ((var)->value != 0) #define var_isunset(var) ((var)->value == 0) #define var_isnull(var) ((var)->value && *(var)->value == 0) /* Assigning variable values: lvalues */ #define var_setvalue(var, str) ((var)->value = (str)) #define var_setfunc(var, func) ((var)->value = (char *)(func)) #define var_setarray(var, arr) ((var)->value = (char *)(arr)) #define var_setassoc(var, arr) ((var)->value = (char *)(arr)) #define var_setref(var, str) ((var)->value = (str)) /* Make VAR be auto-exported. */ #define set_auto_export(var) \ do { (var)->attributes |= att_exported; array_needs_making = 1; } while (0) #define SETVARATTR(var, attr, undo) \ ((undo == 0) ? ((var)->attributes |= (attr)) \ : ((var)->attributes &= ~(attr))) #define VSETATTR(var, attr) ((var)->attributes |= (attr)) #define VUNSETATTR(var, attr) ((var)->attributes &= ~(attr)) #define VGETFLAGS(var) ((var)->attributes) #define VSETFLAGS(var, flags) ((var)->attributes = (flags)) #define VCLRFLAGS(var) ((var)->attributes = 0) /* Macros to perform various operations on `exportstr' member of a SHELL_VAR. */ #define CLEAR_EXPORTSTR(var) (var)->exportstr = (char *)NULL #define COPY_EXPORTSTR(var) ((var)->exportstr) ? savestring ((var)->exportstr) : (char *)NULL #define SET_EXPORTSTR(var, value) (var)->exportstr = (value) #define SAVE_EXPORTSTR(var, value) (var)->exportstr = (value) ? savestring (value) : (char *)NULL #define FREE_EXPORTSTR(var) \ do { if ((var)->exportstr) free ((var)->exportstr); } while (0) #define CACHE_IMPORTSTR(var, value) \ (var)->exportstr = savestring (value) #define INVALIDATE_EXPORTSTR(var) \ do { \ if ((var)->exportstr) \ { \ free ((var)->exportstr); \ (var)->exportstr = (char *)NULL; \ } \ } while (0) #define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0') /* Special value for nameref with invalid value for creation or assignment */ extern SHELL_VAR nameref_invalid_value; #define INVALID_NAMEREF_VALUE (void *)&nameref_invalid_value /* Stuff for hacking variables. */ typedef int sh_var_map_func_t __P((SHELL_VAR *)); /* Where we keep the variables and functions */ extern VAR_CONTEXT *global_variables; extern VAR_CONTEXT *shell_variables; extern HASH_TABLE *shell_functions; extern HASH_TABLE *temporary_env; extern int variable_context; extern char *dollar_vars[]; extern char **export_env; extern void initialize_shell_variables __P((char **, int)); extern SHELL_VAR *set_if_not __P((char *, char *)); extern void sh_set_lines_and_columns __P((int, int)); extern void set_pwd __P((void)); extern void set_ppid __P((void)); extern void make_funcname_visible __P((int)); extern SHELL_VAR *var_lookup __P((const char *, VAR_CONTEXT *)); extern SHELL_VAR *find_function __P((const char *)); extern FUNCTION_DEF *find_function_def __P((const char *)); extern SHELL_VAR *find_variable __P((const char *)); extern SHELL_VAR *find_variable_noref __P((const char *)); extern SHELL_VAR *find_variable_last_nameref __P((const char *, int)); extern SHELL_VAR *find_global_variable_last_nameref __P((const char *, int)); extern SHELL_VAR *find_variable_nameref __P((SHELL_VAR *)); extern SHELL_VAR *find_variable_nameref_for_create __P((const char *, int)); extern SHELL_VAR *find_variable_nameref_for_assignment __P((const char *, int)); /*extern SHELL_VAR *find_variable_internal __P((const char *, int));*/ extern SHELL_VAR *find_variable_tempenv __P((const char *)); extern SHELL_VAR *find_variable_notempenv __P((const char *)); extern SHELL_VAR *find_global_variable __P((const char *)); extern SHELL_VAR *find_global_variable_noref __P((const char *)); extern SHELL_VAR *find_shell_variable __P((const char *)); extern SHELL_VAR *find_tempenv_variable __P((const char *)); extern SHELL_VAR *find_variable_no_invisible __P((const char *)); extern SHELL_VAR *find_variable_for_assignment __P((const char *)); extern SHELL_VAR *copy_variable __P((SHELL_VAR *)); extern SHELL_VAR *make_local_variable __P((const char *)); extern SHELL_VAR *bind_variable __P((const char *, char *, int)); extern SHELL_VAR *bind_global_variable __P((const char *, char *, int)); extern SHELL_VAR *bind_function __P((const char *, COMMAND *)); extern void bind_function_def __P((const char *, FUNCTION_DEF *)); extern SHELL_VAR **map_over __P((sh_var_map_func_t *, VAR_CONTEXT *)); SHELL_VAR **map_over_funcs __P((sh_var_map_func_t *)); extern SHELL_VAR **all_shell_variables __P((void)); extern SHELL_VAR **all_shell_functions __P((void)); extern SHELL_VAR **all_visible_variables __P((void)); extern SHELL_VAR **all_visible_functions __P((void)); extern SHELL_VAR **all_exported_variables __P((void)); extern SHELL_VAR **local_exported_variables __P((void)); extern SHELL_VAR **all_local_variables __P((void)); #if defined (ARRAY_VARS) extern SHELL_VAR **all_array_variables __P((void)); #endif extern char **all_variables_matching_prefix __P((const char *)); extern char **make_var_array __P((HASH_TABLE *)); extern char **add_or_supercede_exported_var __P((char *, int)); extern char *get_variable_value __P((SHELL_VAR *)); extern char *get_string_value __P((const char *)); extern char *sh_get_env_value __P((const char *)); extern char *make_variable_value __P((SHELL_VAR *, char *, int)); extern SHELL_VAR *bind_variable_value __P((SHELL_VAR *, char *, int)); extern SHELL_VAR *bind_int_variable __P((char *, char *)); extern SHELL_VAR *bind_var_to_int __P((char *, intmax_t)); extern int assign_in_env __P((WORD_DESC *, int)); extern int unbind_variable __P((const char *)); extern int check_unbind_variable __P((const char *)); extern int unbind_nameref __P((const char *)); extern int unbind_variable_noref __P((const char *)); extern int unbind_func __P((const char *)); extern int unbind_function_def __P((const char *)); extern int delete_var __P((const char *, VAR_CONTEXT *)); extern int makunbound __P((const char *, VAR_CONTEXT *)); extern int kill_local_variable __P((const char *)); extern void delete_all_variables __P((HASH_TABLE *)); extern void delete_all_contexts __P((VAR_CONTEXT *)); extern VAR_CONTEXT *new_var_context __P((char *, int)); extern void dispose_var_context __P((VAR_CONTEXT *)); extern VAR_CONTEXT *push_var_context __P((char *, int, HASH_TABLE *)); extern void pop_var_context __P((void)); extern VAR_CONTEXT *push_scope __P((int, HASH_TABLE *)); extern void pop_scope __P((int)); extern void push_context __P((char *, int, HASH_TABLE *)); extern void pop_context __P((void)); extern void push_dollar_vars __P((void)); extern void pop_dollar_vars __P((void)); extern void dispose_saved_dollar_vars __P((void)); extern void push_args __P((WORD_LIST *)); extern void pop_args __P((void)); extern void adjust_shell_level __P((int)); extern void non_unsettable __P((char *)); extern void dispose_variable __P((SHELL_VAR *)); extern void dispose_used_env_vars __P((void)); extern void dispose_function_env __P((void)); extern void dispose_builtin_env __P((void)); extern void merge_temporary_env __P((void)); extern void flush_temporary_env __P((void)); extern void merge_builtin_env __P((void)); extern void kill_all_local_variables __P((void)); extern void set_var_read_only __P((char *)); extern void set_func_read_only __P((const char *)); extern void set_var_auto_export __P((char *)); extern void set_func_auto_export __P((const char *)); extern void sort_variables __P((SHELL_VAR **)); extern int chkexport __P((char *)); extern void maybe_make_export_env __P((void)); extern void update_export_env_inplace __P((char *, int, char *)); extern void put_command_name_into_env __P((char *)); extern void put_gnu_argv_flags_into_env __P((intmax_t, char *)); extern void print_var_list __P((SHELL_VAR **)); extern void print_func_list __P((SHELL_VAR **)); extern void print_assignment __P((SHELL_VAR *)); extern void print_var_value __P((SHELL_VAR *, int)); extern void print_var_function __P((SHELL_VAR *)); #if defined (ARRAY_VARS) extern SHELL_VAR *make_new_array_variable __P((char *)); extern SHELL_VAR *make_local_array_variable __P((char *, int)); extern SHELL_VAR *make_new_assoc_variable __P((char *)); extern SHELL_VAR *make_local_assoc_variable __P((char *)); extern void set_pipestatus_array __P((int *, int)); extern ARRAY *save_pipestatus_array __P((void)); extern void restore_pipestatus_array __P((ARRAY *)); #endif extern void set_pipestatus_from_exit __P((int)); /* The variable in NAME has just had its state changed. Check to see if it is one of the special ones where something special happens. */ extern void stupidly_hack_special_variables __P((char *)); /* Reinitialize some special variables that have external effects upon unset when the shell reinitializes itself. */ extern void reinit_special_variables __P((void)); extern int get_random_number __P((void)); /* The `special variable' functions that get called when a particular variable is set. */ extern void sv_ifs __P((char *)); extern void sv_path __P((char *)); extern void sv_mail __P((char *)); extern void sv_funcnest __P((char *)); extern void sv_execignore __P((char *)); extern void sv_globignore __P((char *)); extern void sv_ignoreeof __P((char *)); extern void sv_strict_posix __P((char *)); extern void sv_optind __P((char *)); extern void sv_opterr __P((char *)); extern void sv_locale __P((char *)); extern void sv_xtracefd __P((char *)); extern void sv_shcompat __P((char *)); #if defined (READLINE) extern void sv_comp_wordbreaks __P((char *)); extern void sv_terminal __P((char *)); extern void sv_hostfile __P((char *)); extern void sv_winsize __P((char *)); #endif #if defined (__CYGWIN__) extern void sv_home __P((char *)); #endif #if defined (HISTORY) extern void sv_histsize __P((char *)); extern void sv_histignore __P((char *)); extern void sv_history_control __P((char *)); # if defined (BANG_HISTORY) extern void sv_histchars __P((char *)); # endif extern void sv_histtimefmt __P((char *)); #endif /* HISTORY */ #if defined (HAVE_TZSET) extern void sv_tz __P((char *)); #endif #if defined (JOB_CONTROL) extern void sv_childmax __P((char *)); #endif #endif /* !_VARIABLES_H_ */ PKZߏ{;{;bash/command.hnu[/* command.h -- The structures used internally to represent commands, and the extern declarations of the functions used to create them. */ /* Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_COMMAND_H_) #define _COMMAND_H_ #include "stdc.h" /* Instructions describing what kind of thing to do for a redirection. */ enum r_instruction { r_output_direction, r_input_direction, r_inputa_direction, r_appending_to, r_reading_until, r_reading_string, r_duplicating_input, r_duplicating_output, r_deblank_reading_until, r_close_this, r_err_and_out, r_input_output, r_output_force, r_duplicating_input_word, r_duplicating_output_word, r_move_input, r_move_output, r_move_input_word, r_move_output_word, r_append_err_and_out }; /* Redirection flags; values for rflags */ #define REDIR_VARASSIGN 0x01 /* Redirection errors. */ #define AMBIGUOUS_REDIRECT -1 #define NOCLOBBER_REDIRECT -2 #define RESTRICTED_REDIRECT -3 /* can only happen in restricted shells. */ #define HEREDOC_REDIRECT -4 /* here-doc temp file can't be created */ #define BADVAR_REDIRECT -5 /* something wrong with {varname}redir */ #define CLOBBERING_REDIRECT(ri) \ (ri == r_output_direction || ri == r_err_and_out) #define OUTPUT_REDIRECT(ri) \ (ri == r_output_direction || ri == r_input_output || ri == r_err_and_out || ri == r_append_err_and_out) #define INPUT_REDIRECT(ri) \ (ri == r_input_direction || ri == r_inputa_direction || ri == r_input_output) #define WRITE_REDIRECT(ri) \ (ri == r_output_direction || \ ri == r_input_output || \ ri == r_err_and_out || \ ri == r_appending_to || \ ri == r_append_err_and_out || \ ri == r_output_force) /* redirection needs translation */ #define TRANSLATE_REDIRECT(ri) \ (ri == r_duplicating_input_word || ri == r_duplicating_output_word || \ ri == r_move_input_word || ri == r_move_output_word) /* Command Types: */ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, cm_connection, cm_function_def, cm_until, cm_group, cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc }; /* Possible values for the `flags' field of a WORD_DESC. */ #define W_HASDOLLAR 0x000001 /* Dollar sign present. */ #define W_QUOTED 0x000002 /* Some form of quote character is present. */ #define W_ASSIGNMENT 0x000004 /* This word is a variable assignment. */ #define W_SPLITSPACE 0x000008 /* Split this word on " " regardless of IFS */ #define W_NOSPLIT 0x000010 /* Do not perform word splitting on this word because ifs is empty string. */ #define W_NOGLOB 0x000020 /* Do not perform globbing on this word. */ #define W_NOSPLIT2 0x000040 /* Don't split word except for $@ expansion (using spaces) because context does not allow it. */ #define W_TILDEEXP 0x000080 /* Tilde expand this assignment word */ #define W_DOLLARAT 0x000100 /* $@ and its special handling */ #define W_DOLLARSTAR 0x000200 /* $* and its special handling */ #define W_NOCOMSUB 0x000400 /* Don't perform command substitution on this word */ #define W_ASSIGNRHS 0x000800 /* Word is rhs of an assignment statement */ #define W_NOTILDE 0x001000 /* Don't perform tilde expansion on this word */ #define W_ITILDE 0x002000 /* Internal flag for word expansion */ #define W_NOEXPAND 0x004000 /* Don't expand at all -- do quote removal */ #define W_COMPASSIGN 0x008000 /* Compound assignment */ #define W_ASSNBLTIN 0x010000 /* word is a builtin command that takes assignments */ #define W_ASSIGNARG 0x020000 /* word is assignment argument to command */ #define W_HASQUOTEDNULL 0x040000 /* word contains a quoted null character */ #define W_DQUOTE 0x080000 /* word should be treated as if double-quoted */ #define W_NOPROCSUB 0x100000 /* don't perform process substitution */ #define W_HASCTLESC 0x200000 /* word contains literal CTLESC characters */ #define W_ASSIGNASSOC 0x400000 /* word looks like associative array assignment */ #define W_ASSIGNARRAY 0x800000 /* word looks like a compound indexed array assignment */ #define W_ARRAYIND 0x1000000 /* word is an array index being expanded */ #define W_ASSNGLOBAL 0x2000000 /* word is a global assignment to declare (declare/typeset -g) */ #define W_NOBRACE 0x4000000 /* Don't perform brace expansion */ #define W_COMPLETE 0x8000000 /* word is being expanded for completion */ /* Flags for the `pflags' argument to param_expand() and various parameter_brace_expand_xxx functions; also used for string_list_dollar_at */ #define PF_NOCOMSUB 0x01 /* Do not perform command substitution */ #define PF_IGNUNBOUND 0x02 /* ignore unbound vars even if -u set */ #define PF_NOSPLIT2 0x04 /* same as W_NOSPLIT2 */ #define PF_ASSIGNRHS 0x08 /* same as W_ASSIGNRHS */ #define PF_COMPLETE 0x10 /* same as W_COMPLETE, sets SX_COMPLETE */ /* Possible values for subshell_environment */ #define SUBSHELL_ASYNC 0x01 /* subshell caused by `command &' */ #define SUBSHELL_PAREN 0x02 /* subshell caused by ( ... ) */ #define SUBSHELL_COMSUB 0x04 /* subshell caused by `command` or $(command) */ #define SUBSHELL_FORK 0x08 /* subshell caused by executing a disk command */ #define SUBSHELL_PIPE 0x10 /* subshell from a pipeline element */ #define SUBSHELL_PROCSUB 0x20 /* subshell caused by <(command) or >(command) */ #define SUBSHELL_COPROC 0x40 /* subshell from a coproc pipeline */ #define SUBSHELL_RESETTRAP 0x80 /* subshell needs to reset trap strings on first call to trap */ /* A structure which represents a word. */ typedef struct word_desc { char *word; /* Zero terminated string. */ int flags; /* Flags associated with this word. */ } WORD_DESC; /* A linked list of words. */ typedef struct word_list { struct word_list *next; WORD_DESC *word; } WORD_LIST; /* **************************************************************** */ /* */ /* Shell Command Structs */ /* */ /* **************************************************************** */ /* What a redirection descriptor looks like. If the redirection instruction is ri_duplicating_input or ri_duplicating_output, use DEST, otherwise use the file in FILENAME. Out-of-range descriptors are identified by a negative DEST. */ typedef union { int dest; /* Place to redirect REDIRECTOR to, or ... */ WORD_DESC *filename; /* filename to redirect to. */ } REDIRECTEE; /* Structure describing a redirection. If REDIRECTOR is negative, the parser (or translator in redir.c) encountered an out-of-range file descriptor. */ typedef struct redirect { struct redirect *next; /* Next element, or NULL. */ REDIRECTEE redirector; /* Descriptor or varname to be redirected. */ int rflags; /* Private flags for this redirection */ int flags; /* Flag value for `open'. */ enum r_instruction instruction; /* What to do with the information. */ REDIRECTEE redirectee; /* File descriptor or filename */ char *here_doc_eof; /* The word that appeared in <flags. */ #define CMD_WANT_SUBSHELL 0x01 /* User wants a subshell: ( command ) */ #define CMD_FORCE_SUBSHELL 0x02 /* Shell needs to force a subshell. */ #define CMD_INVERT_RETURN 0x04 /* Invert the exit value. */ #define CMD_IGNORE_RETURN 0x08 /* Ignore the exit value. For set -e. */ #define CMD_NO_FUNCTIONS 0x10 /* Ignore functions during command lookup. */ #define CMD_INHIBIT_EXPANSION 0x20 /* Do not expand the command words. */ #define CMD_NO_FORK 0x40 /* Don't fork; just call execve */ #define CMD_TIME_PIPELINE 0x80 /* Time a pipeline */ #define CMD_TIME_POSIX 0x100 /* time -p; use POSIX.2 time output spec. */ #define CMD_AMPERSAND 0x200 /* command & */ #define CMD_STDIN_REDIR 0x400 /* async command needs implicit . */ #if !defined (_ERROR_H_) #define _ERROR_H_ #include "stdc.h" /* Get the name of the shell or shell script for an error message. */ extern char *get_name_for_error __P((void)); /* Report an error having to do with FILENAME. */ extern void file_error __P((const char *)); /* Report a programmer's error, and abort. Pass REASON, and ARG1 ... ARG5. */ extern void programming_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* General error reporting. Pass FORMAT and ARG1 ... ARG5. */ extern void report_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Error messages for parts of the parser that don't call report_syntax_error */ extern void parser_error __P((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); /* Report an unrecoverable error and exit. Pass FORMAT and ARG1 ... ARG5. */ extern void fatal_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report a system error, like BSD warn(3). */ extern void sys_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal error. */ extern void internal_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal warning. */ extern void internal_warning __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Report an internal informational notice. */ extern void internal_inform __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2))); /* Debugging functions, not enabled in released version. */ extern char *strescape __P((const char *)); extern void itrace __P((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); extern void trace __P((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2))); /* Report an error having to do with command parsing or execution. */ extern void command_error __P((const char *, int, int, int)); extern char *command_errstr __P((int)); /* Specific error message functions that eventually call report_error or internal_error. */ extern void err_badarraysub __P((const char *)); extern void err_unboundvar __P((const char *)); extern void err_readonly __P((const char *)); #endif /* !_ERROR_H_ */ PKZJ}sGGbash/externs.hnu[/* externs.h -- extern function declarations which do not appear in their own header file. */ /* Copyright (C) 1993-2010 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ /* Make sure that this is included *after* config.h! */ #if !defined (_EXTERNS_H_) # define _EXTERNS_H_ #include "stdc.h" /* Functions from expr.c. */ extern intmax_t evalexp __P((char *, int *)); /* Functions from print_cmd.c. */ #define FUNC_MULTILINE 0x01 #define FUNC_EXTERNAL 0x02 extern char *make_command_string __P((COMMAND *)); extern char *named_function_string __P((char *, COMMAND *, int)); extern void print_command __P((COMMAND *)); extern void print_simple_command __P((SIMPLE_COM *)); extern void print_word_list __P((WORD_LIST *, char *)); /* debugger support */ extern void print_for_command_head __P((FOR_COM *)); #if defined (SELECT_COMMAND) extern void print_select_command_head __P((SELECT_COM *)); #endif extern void print_case_command_head __P((CASE_COM *)); #if defined (DPAREN_ARITHMETIC) extern void print_arith_command __P((WORD_LIST *)); #endif #if defined (COND_COMMAND) extern void print_cond_command __P((COND_COM *)); #endif /* set -x support */ extern void xtrace_init __P((void)); #ifdef NEED_XTRACE_SET_DECL extern void xtrace_set __P((int, FILE *)); #endif extern void xtrace_fdchk __P((int)); extern void xtrace_reset __P((void)); extern char *indirection_level_string __P((void)); extern void xtrace_print_assignment __P((char *, char *, int, int)); extern void xtrace_print_word_list __P((WORD_LIST *, int)); extern void xtrace_print_for_command_head __P((FOR_COM *)); #if defined (SELECT_COMMAND) extern void xtrace_print_select_command_head __P((SELECT_COM *)); #endif extern void xtrace_print_case_command_head __P((CASE_COM *)); #if defined (DPAREN_ARITHMETIC) extern void xtrace_print_arith_cmd __P((WORD_LIST *)); #endif #if defined (COND_COMMAND) extern void xtrace_print_cond_term __P((int, int, WORD_DESC *, char *, char *)); #endif /* Functions from shell.c. */ extern void exit_shell __P((int)) __attribute__((__noreturn__)); extern void sh_exit __P((int)) __attribute__((__noreturn__)); extern void subshell_exit __P((int)) __attribute__((__noreturn__)); extern void disable_priv_mode __P((void)); extern void unbind_args __P((void)); #if defined (RESTRICTED_SHELL) extern int shell_is_restricted __P((char *)); extern int maybe_make_restricted __P((char *)); #endif extern void unset_bash_input __P((int)); extern void get_current_user_info __P((void)); /* Functions from eval.c. */ extern int reader_loop __P((void)); extern int parse_command __P((void)); extern int read_command __P((void)); /* Functions from braces.c. */ #if defined (BRACE_EXPANSION) extern char **brace_expand __P((char *)); #endif /* Miscellaneous functions from parse.y */ extern int yyparse __P((void)); extern int return_EOF __P((void)); extern void push_token __P((int)); extern char *xparse_dolparen __P((char *, char *, int *, int)); extern void reset_parser __P((void)); extern WORD_LIST *parse_string_to_word_list __P((char *, int, const char *)); extern int parser_in_command_position __P((void)); extern void free_pushed_string_input __P((void)); extern int parser_expanding_alias __P((void)); extern void parser_save_alias __P((void)); extern void parser_restore_alias __P((void)); extern void clear_shell_input_line __P((void)); extern char *decode_prompt_string __P((char *)); extern int get_current_prompt_level __P((void)); extern void set_current_prompt_level __P((int)); #if defined (HISTORY) extern char *history_delimiting_chars __P((const char *)); #endif /* Declarations for functions defined in locale.c */ extern void set_default_locale __P((void)); extern void set_default_locale_vars __P((void)); extern int set_locale_var __P((char *, char *)); extern int set_lang __P((char *, char *)); extern void set_default_lang __P((void)); extern char *get_locale_var __P((char *)); extern char *localetrans __P((char *, int, int *)); extern char *mk_msgstr __P((char *, int *)); extern char *localeexpand __P((char *, int, int, int, int *)); /* Declarations for functions defined in list.c. */ extern void list_walk __P((GENERIC_LIST *, sh_glist_func_t *)); extern void wlist_walk __P((WORD_LIST *, sh_icpfunc_t *)); extern GENERIC_LIST *list_reverse (); extern int list_length (); extern GENERIC_LIST *list_append (); extern GENERIC_LIST *list_remove (); /* Declarations for functions defined in stringlib.c */ extern int find_string_in_alist __P((char *, STRING_INT_ALIST *, int)); extern char *find_token_in_alist __P((int, STRING_INT_ALIST *, int)); extern int find_index_in_alist __P((char *, STRING_INT_ALIST *, int)); extern char *substring __P((const char *, int, int)); extern char *strsub __P((char *, char *, char *, int)); extern char *strcreplace __P((char *, int, const char *, int)); extern void strip_leading __P((char *)); extern void strip_trailing __P((char *, int, int)); extern void xbcopy __P((char *, char *, int)); /* Functions from version.c. */ extern char *shell_version_string __P((void)); extern void show_shell_version __P((int)); /* Functions from the bash library, lib/sh/libsh.a. These should really go into a separate include file. */ /* declarations for functions defined in lib/sh/casemod.c */ extern char *sh_modcase __P((const char *, char *, int)); /* Defines for flags argument to sh_modcase. These need to agree with what's in lib/sh/casemode.c */ #define CASE_LOWER 0x0001 #define CASE_UPPER 0x0002 #define CASE_CAPITALIZE 0x0004 #define CASE_UNCAP 0x0008 #define CASE_TOGGLE 0x0010 #define CASE_TOGGLEALL 0x0020 #define CASE_UPFIRST 0x0040 #define CASE_LOWFIRST 0x0080 #define CASE_USEWORDS 0x1000 /* declarations for functions defined in lib/sh/clktck.c */ extern long get_clk_tck __P((void)); /* declarations for functions defined in lib/sh/clock.c */ extern void clock_t_to_secs (); extern void print_clock_t (); /* Declarations for functions defined in lib/sh/dprintf.c */ #if !defined (HAVE_DPRINTF) extern void dprintf __P((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3))); #endif /* Declarations for functions defined in lib/sh/fmtulong.c */ #define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */ #define FL_ADDBASE 0x02 /* add base# prefix to converted value */ #define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */ #define FL_UNSIGNED 0x08 /* don't add any sign */ extern char *fmtulong __P((unsigned long int, int, char *, size_t, int)); /* Declarations for functions defined in lib/sh/fmtulong.c */ #if defined (HAVE_LONG_LONG) extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int)); #endif /* Declarations for functions defined in lib/sh/fmtumax.c */ extern char *fmtumax __P((uintmax_t, int, char *, size_t, int)); /* Declarations for functions defined in lib/sh/fnxform.c */ extern char *fnx_fromfs __P((char *, size_t)); extern char *fnx_tofs __P((char *, size_t)); /* Declarations for functions defined in lib/sh/fpurge.c */ #if defined NEED_FPURGE_DECL #if !HAVE_DECL_FPURGE #if HAVE_FPURGE # define fpurge _bash_fpurge #endif extern int fpurge __P((FILE *stream)); #endif /* HAVE_DECL_FPURGE */ #endif /* NEED_FPURGE_DECL */ /* Declarations for functions defined in lib/sh/getcwd.c */ #if !defined (HAVE_GETCWD) extern char *getcwd __P((char *, size_t)); #endif /* Declarations for functions defined in lib/sh/input_avail.c */ extern int input_avail __P((int)); /* Declarations for functions defined in lib/sh/itos.c */ extern char *inttostr __P((intmax_t, char *, size_t)); extern char *itos __P((intmax_t)); extern char *mitos __P((intmax_t)); extern char *uinttostr __P((uintmax_t, char *, size_t)); extern char *uitos __P((uintmax_t)); /* declarations for functions defined in lib/sh/makepath.c */ #define MP_DOTILDE 0x01 #define MP_DOCWD 0x02 #define MP_RMDOT 0x04 #define MP_IGNDOT 0x08 extern char *sh_makepath __P((const char *, const char *, int)); /* declarations for functions defined in lib/sh/mbscasecmp.c */ #if !defined (HAVE_MBSCASECMP) extern char *mbscasecmp __P((const char *, const char *)); #endif /* declarations for functions defined in lib/sh/mbschr.c */ #if !defined (HAVE_MBSCHR) extern char *mbschr __P((const char *, int)); #endif /* declarations for functions defined in lib/sh/mbscmp.c */ #if !defined (HAVE_MBSCMP) extern char *mbscmp __P((const char *, const char *)); #endif /* declarations for functions defined in lib/sh/netconn.c */ extern int isnetconn __P((int)); /* declarations for functions defined in lib/sh/netopen.c */ extern int netopen __P((char *)); /* Declarations for functions defined in lib/sh/oslib.c */ #if !defined (HAVE_DUP2) || defined (DUP2_BROKEN) extern int dup2 __P((int, int)); #endif #if !defined (HAVE_GETDTABLESIZE) extern int getdtablesize __P((void)); #endif /* !HAVE_GETDTABLESIZE */ #if !defined (HAVE_GETHOSTNAME) extern int gethostname __P((char *, int)); #endif /* !HAVE_GETHOSTNAME */ extern int getmaxgroups __P((void)); extern long getmaxchild __P((void)); /* declarations for functions defined in lib/sh/pathcanon.c */ #define PATH_CHECKDOTDOT 0x0001 #define PATH_CHECKEXISTS 0x0002 #define PATH_HARDPATH 0x0004 #define PATH_NOALLOC 0x0008 extern char *sh_canonpath __P((char *, int)); /* declarations for functions defined in lib/sh/pathphys.c */ extern char *sh_physpath __P((char *, int)); extern char *sh_realpath __P((const char *, char *)); /* declarations for functions defined in lib/sh/setlinebuf.c */ #ifdef NEED_SH_SETLINEBUF_DECL extern int sh_setlinebuf __P((FILE *)); #endif /* declarations for functions defined in lib/sh/shaccess.c */ extern int sh_eaccess __P((const char *, int)); /* declarations for functions defined in lib/sh/shmatch.c */ extern int sh_regmatch __P((const char *, const char *, int)); /* defines for flags argument to sh_regmatch. */ #define SHMAT_SUBEXP 0x001 /* save subexpressions in SH_REMATCH */ #define SHMAT_PWARN 0x002 /* print a warning message on invalid regexp */ /* declarations for functions defined in lib/sh/shmbchar.c */ extern size_t mbstrlen __P((const char *)); extern char *mbsmbchar __P((const char *)); extern int sh_mbsnlen __P((const char *, size_t, int)); /* declarations for functions defined in lib/sh/shquote.c */ extern char *sh_single_quote __P((const char *)); extern char *sh_double_quote __P((const char *)); extern char *sh_mkdoublequoted __P((const char *, int, int)); extern char *sh_un_double_quote __P((char *)); extern char *sh_backslash_quote __P((char *, const char *, int)); extern char *sh_backslash_quote_for_double_quotes __P((char *)); extern char *sh_quote_reusable __P((char *, int)); extern int sh_contains_shell_metas __P((const char *)); extern int sh_contains_quotes __P((const char *)); /* declarations for functions defined in lib/sh/spell.c */ extern int spname __P((char *, char *)); extern char *dirspell __P((char *)); /* declarations for functions defined in lib/sh/strcasecmp.c */ #if !defined (HAVE_STRCASECMP) extern int strncasecmp __P((const char *, const char *, int)); extern int strcasecmp __P((const char *, const char *)); #endif /* HAVE_STRCASECMP */ /* declarations for functions defined in lib/sh/strcasestr.c */ #if ! HAVE_STRCASESTR extern char *strcasestr __P((const char *, const char *)); #endif /* declarations for functions defined in lib/sh/strchrnul.c */ #if ! HAVE_STRCHRNUL extern char *strchrnul __P((const char *, int)); #endif /* declarations for functions defined in lib/sh/strerror.c */ #if !defined (HAVE_STRERROR) && !defined (strerror) extern char *strerror __P((int)); #endif /* declarations for functions defined in lib/sh/strftime.c */ #if !defined (HAVE_STRFTIME) && defined (NEED_STRFTIME_DECL) extern size_t strftime __P((char *, size_t, const char *, const struct tm *)); #endif /* declarations for functions and structures defined in lib/sh/stringlist.c */ /* This is a general-purpose argv-style array struct. */ typedef struct _list_of_strings { char **list; int list_size; int list_len; } STRINGLIST; typedef int sh_strlist_map_func_t __P((char *)); extern STRINGLIST *strlist_create __P((int)); extern STRINGLIST *strlist_resize __P((STRINGLIST *, int)); extern void strlist_flush __P((STRINGLIST *)); extern void strlist_dispose __P((STRINGLIST *)); extern int strlist_remove __P((STRINGLIST *, char *)); extern STRINGLIST *strlist_copy __P((STRINGLIST *)); extern STRINGLIST *strlist_merge __P((STRINGLIST *, STRINGLIST *)); extern STRINGLIST *strlist_append __P((STRINGLIST *, STRINGLIST *)); extern STRINGLIST *strlist_prefix_suffix __P((STRINGLIST *, char *, char *)); extern void strlist_print __P((STRINGLIST *, char *)); extern void strlist_walk __P((STRINGLIST *, sh_strlist_map_func_t *)); extern void strlist_sort __P((STRINGLIST *)); /* declarations for functions defined in lib/sh/stringvec.c */ extern char **strvec_create __P((int)); extern char **strvec_resize __P((char **, int)); extern char **strvec_mcreate __P((int)); extern char **strvec_mresize __P((char **, int)); extern void strvec_flush __P((char **)); extern void strvec_dispose __P((char **)); extern int strvec_remove __P((char **, char *)); extern int strvec_len __P((char **)); extern int strvec_search __P((char **, char *)); extern char **strvec_copy __P((char **)); extern int strvec_strcmp __P((char **, char **)); extern void strvec_sort __P((char **)); extern char **strvec_from_word_list __P((WORD_LIST *, int, int, int *)); extern WORD_LIST *strvec_to_word_list __P((char **, int, int)); /* declarations for functions defined in lib/sh/strnlen.c */ #if !defined (HAVE_STRNLEN) extern size_t strnlen __P((const char *, size_t)); #endif /* declarations for functions defined in lib/sh/strpbrk.c */ #if !defined (HAVE_STRPBRK) extern char *strpbrk __P((const char *, const char *)); #endif /* declarations for functions defined in lib/sh/strtod.c */ #if !defined (HAVE_STRTOD) extern double strtod __P((const char *, char **)); #endif /* declarations for functions defined in lib/sh/strtol.c */ #if !HAVE_DECL_STRTOL extern long strtol __P((const char *, char **, int)); #endif /* declarations for functions defined in lib/sh/strtoll.c */ #if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOLL extern long long strtoll __P((const char *, char **, int)); #endif /* declarations for functions defined in lib/sh/strtoul.c */ #if !HAVE_DECL_STRTOUL extern unsigned long strtoul __P((const char *, char **, int)); #endif /* declarations for functions defined in lib/sh/strtoull.c */ #if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOULL extern unsigned long long strtoull __P((const char *, char **, int)); #endif /* declarations for functions defined in lib/sh/strimax.c */ #if !HAVE_DECL_STRTOIMAX extern intmax_t strtoimax __P((const char *, char **, int)); #endif /* declarations for functions defined in lib/sh/strumax.c */ #if !HAVE_DECL_STRTOUMAX extern uintmax_t strtoumax __P((const char *, char **, int)); #endif /* declarations for functions defined in lib/sh/strtrans.c */ extern char *ansicstr __P((char *, int, int, int *, int *)); extern char *ansic_quote __P((char *, int, int *)); extern int ansic_shouldquote __P((const char *)); extern char *ansiexpand __P((char *, int, int, int *)); /* declarations for functions defined in lib/sh/timeval.c. No prototypes so we don't have to count on having a definition of struct timeval in scope when this file is included. */ extern void timeval_to_secs (); extern void print_timeval (); /* declarations for functions defined in lib/sh/tmpfile.c */ #define MT_USETMPDIR 0x0001 #define MT_READWRITE 0x0002 #define MT_USERANDOM 0x0004 extern char *sh_mktmpname __P((char *, int)); extern int sh_mktmpfd __P((char *, int, char **)); /* extern FILE *sh_mktmpfp __P((char *, int, char **)); */ /* declarations for functions defined in lib/sh/uconvert.c */ extern int uconvert __P((char *, long *, long *)); /* declarations for functions defined in lib/sh/ufuncs.c */ extern unsigned int falarm __P((unsigned int, unsigned int)); extern unsigned int fsleep __P((unsigned int, unsigned int)); /* declarations for functions defined in lib/sh/unicode.c */ extern int u32cconv __P((unsigned long, char *)); extern void u32reset __P((void)); /* declarations for functions defined in lib/sh/wcsnwidth.c */ #if defined (HANDLE_MULTIBYTE) extern int wcsnwidth __P((const wchar_t *, size_t, int)); #endif /* declarations for functions defined in lib/sh/winsize.c */ extern void get_new_window_size __P((int, int *, int *)); /* declarations for functions defined in lib/sh/zcatfd.c */ extern int zcatfd __P((int, int, char *)); /* declarations for functions defined in lib/sh/zgetline.c */ extern ssize_t zgetline __P((int, char **, size_t *, int, int)); /* declarations for functions defined in lib/sh/zmapfd.c */ extern int zmapfd __P((int, char **, char *)); /* declarations for functions defined in lib/sh/zread.c */ extern ssize_t zread __P((int, char *, size_t)); extern ssize_t zreadretry __P((int, char *, size_t)); extern ssize_t zreadintr __P((int, char *, size_t)); extern ssize_t zreadc __P((int, char *)); extern ssize_t zreadcintr __P((int, char *)); extern ssize_t zreadn __P((int, char *, size_t)); extern void zreset __P((void)); extern void zsyncfd __P((int)); /* declarations for functions defined in lib/sh/zwrite.c */ extern int zwrite __P((int, char *, size_t)); /* declarations for functions defined in lib/glob/gmisc.c */ extern int match_pattern_char __P((char *, char *, int)); extern int umatchlen __P((char *, size_t)); #if defined (HANDLE_MULTIBYTE) extern int match_pattern_wchar __P((wchar_t *, wchar_t *, int)); extern int wmatchlen __P((wchar_t *, size_t)); #endif #endif /* _EXTERNS_H_ */ PKZtU/>>bash/bashtypes.hnu[/* bashtypes.h -- Bash system types. */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_BASHTYPES_H_) # define _BASHTYPES_H_ #if defined (CRAY) # define word __word #endif #include #if defined (CRAY) # undef word #endif #if defined (HAVE_INTTYPES_H) # include #endif #if HAVE_STDINT_H # include #endif #endif /* _BASHTYPES_H_ */ PKZHu;bash/siglist.hnu[/* siglist.h -- encapsulate various definitions for sys_siglist */ /* Copyright (C) 1993, 2001, 2005, 2008,2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_SIGLIST_H_) #define _SIGLIST_H_ #if !defined (SYS_SIGLIST_DECLARED) && !defined (HAVE_STRSIGNAL) #if defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_SYS_SIGLIST) && !defined (sys_siglist) # define sys_siglist _sys_siglist #endif /* HAVE_UNDER_SYS_SIGLIST && !HAVE_SYS_SIGLIST && !sys_siglist */ #if !defined (sys_siglist) extern char *sys_siglist[]; #endif /* !sys_siglist */ #endif /* !SYS_SIGLIST_DECLARED && !HAVE_STRSIGNAL */ #if !defined (strsignal) && !defined (HAVE_STRSIGNAL) # define strsignal(sig) (char *)sys_siglist[sig] #endif /* !strsignal && !HAVE_STRSIGNAL */ #if !defined (strsignal) && !HAVE_DECL_STRSIGNAL extern char *strsignal __P((int)); #endif #endif /* _SIGLIST_H */ PKZ8"gbash/pathnames.hnu[/* pathnames.h -- absolute filenames that bash wants for various defaults. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_PATHNAMES_H_) #define _PATHNAMES_H_ /* The default file for hostname completion. */ #define DEFAULT_HOSTS_FILE "/etc/hosts" /* The default login shell startup file. */ #define SYS_PROFILE "/etc/profile" /* The default location of the bash debugger initialization/startup file. */ #define DEBUGGER_START_FILE "/usr/share/bashdb/bashdb-main.inc" #endif /* _PATHNAMES_H */ PKZTbash/xmalloc.hnu[/* xmalloc.h -- defines for the `x' memory allocation functions */ /* Copyright (C) 2001-2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #if !defined (_XMALLOC_H_) #define _XMALLOC_H_ #include "stdc.h" #include "bashansi.h" /* Generic pointer type. */ #ifndef PTR_T #if defined (__STDC__) # define PTR_T void * #else # define PTR_T char * #endif #endif /* PTR_T */ /* Allocation functions in xmalloc.c */ extern PTR_T xmalloc __P((size_t)); extern PTR_T xrealloc __P((void *, size_t)); extern void xfree __P((void *)); #if defined(USING_BASH_MALLOC) && !defined (DISABLE_MALLOC_WRAPPERS) extern PTR_T sh_xmalloc __P((size_t, const char *, int)); extern PTR_T sh_xrealloc __P((void *, size_t, const char *, int)); extern void sh_xfree __P((void *, const char *, int)); #define xmalloc(x) sh_xmalloc((x), __FILE__, __LINE__) #define xrealloc(x, n) sh_xrealloc((x), (n), __FILE__, __LINE__) #define xfree(x) sh_xfree((x), __FILE__, __LINE__) #ifdef free #undef free #endif #define free(x) sh_xfree((x), __FILE__, __LINE__) #endif /* USING_BASH_MALLOC */ #endif /* _XMALLOC_H_ */ PKZ bash/assoc.hnu[/* assoc.h -- definitions for the interface exported by assoc.c that allows the rest of the shell to manipulate associative array variables. */ /* Copyright (C) 2008,2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bash. If not, see . */ #ifndef _ASSOC_H_ #define _ASSOC_H_ #include "stdc.h" #include "hashlib.h" #define assoc_empty(h) ((h)->nentries == 0) #define assoc_num_elements(h) ((h)->nentries) #define assoc_create(n) (hash_create((n))) #define assoc_copy(h) (hash_copy((h), 0)) #define assoc_walk(h, f) (hash_walk((h), (f)) extern void assoc_dispose __P((HASH_TABLE *)); extern void assoc_flush __P((HASH_TABLE *)); extern int assoc_insert __P((HASH_TABLE *, char *, char *)); extern PTR_T assoc_replace __P((HASH_TABLE *, char *, char *)); extern void assoc_remove __P((HASH_TABLE *, char *)); extern char *assoc_reference __P((HASH_TABLE *, char *)); extern char *assoc_subrange __P((HASH_TABLE *, arrayind_t, arrayind_t, int, int)); extern char *assoc_patsub __P((HASH_TABLE *, char *, char *, int)); extern char *assoc_modcase __P((HASH_TABLE *, char *, int, int)); extern HASH_TABLE *assoc_quote __P((HASH_TABLE *)); extern HASH_TABLE *assoc_quote_escapes __P((HASH_TABLE *)); extern HASH_TABLE *assoc_dequote __P((HASH_TABLE *)); extern HASH_TABLE *assoc_dequote_escapes __P((HASH_TABLE *)); extern HASH_TABLE *assoc_remove_quoted_nulls __P((HASH_TABLE *)); extern char *assoc_to_assign __P((HASH_TABLE *, int)); extern WORD_LIST *assoc_to_word_list __P((HASH_TABLE *)); extern WORD_LIST *assoc_keys_to_word_list __P((HASH_TABLE *)); extern char *assoc_to_string __P((HASH_TABLE *, char *, int)); #endif /* _ASSOC_H_ */ PKZEE langinfo.hnu[/* Access to locale-dependent parameters. Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _LANGINFO_H #define _LANGINFO_H 1 /* Get the type definition. */ #include #include /* Define the __LC_* category names. */ __BEGIN_DECLS /* Construct an `nl_item' value for `nl_langinfo' from a locale category (LC_*) and an item index within the category. Some code may depend on the item values within a category increasing monotonically with the indices. */ #define _NL_ITEM(category, index) (((category) << 16) | (index)) /* Extract the category and item index from a constructed `nl_item' value. */ #define _NL_ITEM_CATEGORY(item) ((int) (item) >> 16) #define _NL_ITEM_INDEX(item) ((int) (item) & 0xffff) /* Enumeration of locale items that can be queried with `nl_langinfo'. */ enum { /* LC_TIME category: date and time formatting. */ /* Abbreviated days of the week. */ ABDAY_1 = _NL_ITEM (__LC_TIME, 0), /* Sun */ #define ABDAY_1 ABDAY_1 ABDAY_2, #define ABDAY_2 ABDAY_2 ABDAY_3, #define ABDAY_3 ABDAY_3 ABDAY_4, #define ABDAY_4 ABDAY_4 ABDAY_5, #define ABDAY_5 ABDAY_5 ABDAY_6, #define ABDAY_6 ABDAY_6 ABDAY_7, #define ABDAY_7 ABDAY_7 /* Long-named days of the week. */ DAY_1, /* Sunday */ #define DAY_1 DAY_1 DAY_2, /* Monday */ #define DAY_2 DAY_2 DAY_3, /* Tuesday */ #define DAY_3 DAY_3 DAY_4, /* Wednesday */ #define DAY_4 DAY_4 DAY_5, /* Thursday */ #define DAY_5 DAY_5 DAY_6, /* Friday */ #define DAY_6 DAY_6 DAY_7, /* Saturday */ #define DAY_7 DAY_7 /* Abbreviated month names, in the grammatical form used when the month is a part of a complete date. */ ABMON_1, /* Jan */ #define ABMON_1 ABMON_1 ABMON_2, #define ABMON_2 ABMON_2 ABMON_3, #define ABMON_3 ABMON_3 ABMON_4, #define ABMON_4 ABMON_4 ABMON_5, #define ABMON_5 ABMON_5 ABMON_6, #define ABMON_6 ABMON_6 ABMON_7, #define ABMON_7 ABMON_7 ABMON_8, #define ABMON_8 ABMON_8 ABMON_9, #define ABMON_9 ABMON_9 ABMON_10, #define ABMON_10 ABMON_10 ABMON_11, #define ABMON_11 ABMON_11 ABMON_12, #define ABMON_12 ABMON_12 /* Long month names, in the grammatical form used when the month is a part of a complete date. */ MON_1, /* January */ #define MON_1 MON_1 MON_2, #define MON_2 MON_2 MON_3, #define MON_3 MON_3 MON_4, #define MON_4 MON_4 MON_5, #define MON_5 MON_5 MON_6, #define MON_6 MON_6 MON_7, #define MON_7 MON_7 MON_8, #define MON_8 MON_8 MON_9, #define MON_9 MON_9 MON_10, #define MON_10 MON_10 MON_11, #define MON_11 MON_11 MON_12, #define MON_12 MON_12 AM_STR, /* Ante meridiem string. */ #define AM_STR AM_STR PM_STR, /* Post meridiem string. */ #define PM_STR PM_STR D_T_FMT, /* Date and time format for strftime. */ #define D_T_FMT D_T_FMT D_FMT, /* Date format for strftime. */ #define D_FMT D_FMT T_FMT, /* Time format for strftime. */ #define T_FMT T_FMT T_FMT_AMPM, /* 12-hour time format for strftime. */ #define T_FMT_AMPM T_FMT_AMPM ERA, /* Alternate era. */ #define ERA ERA __ERA_YEAR, /* Year in alternate era format. */ #ifdef __USE_GNU # define ERA_YEAR __ERA_YEAR #endif ERA_D_FMT, /* Date in alternate era format. */ #define ERA_D_FMT ERA_D_FMT ALT_DIGITS, /* Alternate symbols for digits. */ #define ALT_DIGITS ALT_DIGITS ERA_D_T_FMT, /* Date and time in alternate era format. */ #define ERA_D_T_FMT ERA_D_T_FMT ERA_T_FMT, /* Time in alternate era format. */ #define ERA_T_FMT ERA_T_FMT _NL_TIME_ERA_NUM_ENTRIES, /* Number entries in the era arrays. */ _NL_TIME_ERA_ENTRIES, /* Structure with era entries in usable form.*/ _NL_WABDAY_1, /* Sun */ _NL_WABDAY_2, _NL_WABDAY_3, _NL_WABDAY_4, _NL_WABDAY_5, _NL_WABDAY_6, _NL_WABDAY_7, /* Long-named days of the week. */ _NL_WDAY_1, /* Sunday */ _NL_WDAY_2, /* Monday */ _NL_WDAY_3, /* Tuesday */ _NL_WDAY_4, /* Wednesday */ _NL_WDAY_5, /* Thursday */ _NL_WDAY_6, /* Friday */ _NL_WDAY_7, /* Saturday */ /* Abbreviated month names, in the grammatical form used when the month is a part of a complete date. */ _NL_WABMON_1, /* Jan */ _NL_WABMON_2, _NL_WABMON_3, _NL_WABMON_4, _NL_WABMON_5, _NL_WABMON_6, _NL_WABMON_7, _NL_WABMON_8, _NL_WABMON_9, _NL_WABMON_10, _NL_WABMON_11, _NL_WABMON_12, /* Long month names, in the grammatical form used when the month is a part of a complete date. */ _NL_WMON_1, /* January */ _NL_WMON_2, _NL_WMON_3, _NL_WMON_4, _NL_WMON_5, _NL_WMON_6, _NL_WMON_7, _NL_WMON_8, _NL_WMON_9, _NL_WMON_10, _NL_WMON_11, _NL_WMON_12, _NL_WAM_STR, /* Ante meridiem string. */ _NL_WPM_STR, /* Post meridiem string. */ _NL_WD_T_FMT, /* Date and time format for strftime. */ _NL_WD_FMT, /* Date format for strftime. */ _NL_WT_FMT, /* Time format for strftime. */ _NL_WT_FMT_AMPM, /* 12-hour time format for strftime. */ _NL_WERA_YEAR, /* Year in alternate era format. */ _NL_WERA_D_FMT, /* Date in alternate era format. */ _NL_WALT_DIGITS, /* Alternate symbols for digits. */ _NL_WERA_D_T_FMT, /* Date and time in alternate era format. */ _NL_WERA_T_FMT, /* Time in alternate era format. */ _NL_TIME_WEEK_NDAYS, _NL_TIME_WEEK_1STDAY, _NL_TIME_WEEK_1STWEEK, _NL_TIME_FIRST_WEEKDAY, _NL_TIME_FIRST_WORKDAY, _NL_TIME_CAL_DIRECTION, _NL_TIME_TIMEZONE, _DATE_FMT, /* strftime format for date. */ #define _DATE_FMT _DATE_FMT _NL_W_DATE_FMT, _NL_TIME_CODESET, /* Long month names, in the grammatical form used when the month is named by itself. */ __ALTMON_1, /* January */ __ALTMON_2, __ALTMON_3, __ALTMON_4, __ALTMON_5, __ALTMON_6, __ALTMON_7, __ALTMON_8, __ALTMON_9, __ALTMON_10, __ALTMON_11, __ALTMON_12, #ifdef __USE_GNU # define ALTMON_1 __ALTMON_1 # define ALTMON_2 __ALTMON_2 # define ALTMON_3 __ALTMON_3 # define ALTMON_4 __ALTMON_4 # define ALTMON_5 __ALTMON_5 # define ALTMON_6 __ALTMON_6 # define ALTMON_7 __ALTMON_7 # define ALTMON_8 __ALTMON_8 # define ALTMON_9 __ALTMON_9 # define ALTMON_10 __ALTMON_10 # define ALTMON_11 __ALTMON_11 # define ALTMON_12 __ALTMON_12 #endif /* Long month names, in the grammatical form used when the month is named by itself. */ _NL_WALTMON_1, /* January */ _NL_WALTMON_2, _NL_WALTMON_3, _NL_WALTMON_4, _NL_WALTMON_5, _NL_WALTMON_6, _NL_WALTMON_7, _NL_WALTMON_8, _NL_WALTMON_9, _NL_WALTMON_10, _NL_WALTMON_11, _NL_WALTMON_12, /* Abbreviated month names, in the grammatical form used when the month is named by itself. */ _NL_ABALTMON_1, /* Jan */ _NL_ABALTMON_2, _NL_ABALTMON_3, _NL_ABALTMON_4, _NL_ABALTMON_5, _NL_ABALTMON_6, _NL_ABALTMON_7, _NL_ABALTMON_8, _NL_ABALTMON_9, _NL_ABALTMON_10, _NL_ABALTMON_11, _NL_ABALTMON_12, /* Abbreviated month names, in the grammatical form used when the month is named by itself. */ _NL_WABALTMON_1, /* Jan */ _NL_WABALTMON_2, _NL_WABALTMON_3, _NL_WABALTMON_4, _NL_WABALTMON_5, _NL_WABALTMON_6, _NL_WABALTMON_7, _NL_WABALTMON_8, _NL_WABALTMON_9, _NL_WABALTMON_10, _NL_WABALTMON_11, _NL_WABALTMON_12, _NL_NUM_LC_TIME, /* Number of indices in LC_TIME category. */ /* LC_COLLATE category: text sorting. This information is accessed by the strcoll and strxfrm functions. These `nl_langinfo' names are used only internally. */ _NL_COLLATE_NRULES = _NL_ITEM (__LC_COLLATE, 0), _NL_COLLATE_RULESETS, _NL_COLLATE_TABLEMB, _NL_COLLATE_WEIGHTMB, _NL_COLLATE_EXTRAMB, _NL_COLLATE_INDIRECTMB, _NL_COLLATE_GAP1, _NL_COLLATE_GAP2, _NL_COLLATE_GAP3, _NL_COLLATE_TABLEWC, _NL_COLLATE_WEIGHTWC, _NL_COLLATE_EXTRAWC, _NL_COLLATE_INDIRECTWC, _NL_COLLATE_SYMB_HASH_SIZEMB, _NL_COLLATE_SYMB_TABLEMB, _NL_COLLATE_SYMB_EXTRAMB, _NL_COLLATE_COLLSEQMB, _NL_COLLATE_COLLSEQWC, _NL_COLLATE_CODESET, _NL_NUM_LC_COLLATE, /* LC_CTYPE category: character classification. This information is accessed by the functions in . These `nl_langinfo' names are used only internally. */ _NL_CTYPE_CLASS = _NL_ITEM (__LC_CTYPE, 0), _NL_CTYPE_TOUPPER, _NL_CTYPE_GAP1, _NL_CTYPE_TOLOWER, _NL_CTYPE_GAP2, _NL_CTYPE_CLASS32, _NL_CTYPE_GAP3, _NL_CTYPE_GAP4, _NL_CTYPE_GAP5, _NL_CTYPE_GAP6, _NL_CTYPE_CLASS_NAMES, _NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH, _NL_CTYPE_MB_CUR_MAX, _NL_CTYPE_CODESET_NAME, CODESET = _NL_CTYPE_CODESET_NAME, #define CODESET CODESET _NL_CTYPE_TOUPPER32, _NL_CTYPE_TOLOWER32, _NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET, _NL_CTYPE_INDIGITS_MB_LEN, _NL_CTYPE_INDIGITS0_MB, _NL_CTYPE_INDIGITS1_MB, _NL_CTYPE_INDIGITS2_MB, _NL_CTYPE_INDIGITS3_MB, _NL_CTYPE_INDIGITS4_MB, _NL_CTYPE_INDIGITS5_MB, _NL_CTYPE_INDIGITS6_MB, _NL_CTYPE_INDIGITS7_MB, _NL_CTYPE_INDIGITS8_MB, _NL_CTYPE_INDIGITS9_MB, _NL_CTYPE_INDIGITS_WC_LEN, _NL_CTYPE_INDIGITS0_WC, _NL_CTYPE_INDIGITS1_WC, _NL_CTYPE_INDIGITS2_WC, _NL_CTYPE_INDIGITS3_WC, _NL_CTYPE_INDIGITS4_WC, _NL_CTYPE_INDIGITS5_WC, _NL_CTYPE_INDIGITS6_WC, _NL_CTYPE_INDIGITS7_WC, _NL_CTYPE_INDIGITS8_WC, _NL_CTYPE_INDIGITS9_WC, _NL_CTYPE_OUTDIGIT0_MB, _NL_CTYPE_OUTDIGIT1_MB, _NL_CTYPE_OUTDIGIT2_MB, _NL_CTYPE_OUTDIGIT3_MB, _NL_CTYPE_OUTDIGIT4_MB, _NL_CTYPE_OUTDIGIT5_MB, _NL_CTYPE_OUTDIGIT6_MB, _NL_CTYPE_OUTDIGIT7_MB, _NL_CTYPE_OUTDIGIT8_MB, _NL_CTYPE_OUTDIGIT9_MB, _NL_CTYPE_OUTDIGIT0_WC, _NL_CTYPE_OUTDIGIT1_WC, _NL_CTYPE_OUTDIGIT2_WC, _NL_CTYPE_OUTDIGIT3_WC, _NL_CTYPE_OUTDIGIT4_WC, _NL_CTYPE_OUTDIGIT5_WC, _NL_CTYPE_OUTDIGIT6_WC, _NL_CTYPE_OUTDIGIT7_WC, _NL_CTYPE_OUTDIGIT8_WC, _NL_CTYPE_OUTDIGIT9_WC, _NL_CTYPE_TRANSLIT_TAB_SIZE, _NL_CTYPE_TRANSLIT_FROM_IDX, _NL_CTYPE_TRANSLIT_FROM_TBL, _NL_CTYPE_TRANSLIT_TO_IDX, _NL_CTYPE_TRANSLIT_TO_TBL, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING, _NL_CTYPE_TRANSLIT_IGNORE_LEN, _NL_CTYPE_TRANSLIT_IGNORE, _NL_CTYPE_MAP_TO_NONASCII, _NL_CTYPE_NONASCII_CASE, _NL_CTYPE_EXTRA_MAP_1, _NL_CTYPE_EXTRA_MAP_2, _NL_CTYPE_EXTRA_MAP_3, _NL_CTYPE_EXTRA_MAP_4, _NL_CTYPE_EXTRA_MAP_5, _NL_CTYPE_EXTRA_MAP_6, _NL_CTYPE_EXTRA_MAP_7, _NL_CTYPE_EXTRA_MAP_8, _NL_CTYPE_EXTRA_MAP_9, _NL_CTYPE_EXTRA_MAP_10, _NL_CTYPE_EXTRA_MAP_11, _NL_CTYPE_EXTRA_MAP_12, _NL_CTYPE_EXTRA_MAP_13, _NL_CTYPE_EXTRA_MAP_14, _NL_NUM_LC_CTYPE, /* LC_MONETARY category: formatting of monetary quantities. These items each correspond to a member of `struct lconv', defined in . */ __INT_CURR_SYMBOL = _NL_ITEM (__LC_MONETARY, 0), #ifdef __USE_GNU # define INT_CURR_SYMBOL __INT_CURR_SYMBOL #endif __CURRENCY_SYMBOL, #ifdef __USE_GNU # define CURRENCY_SYMBOL __CURRENCY_SYMBOL #endif __MON_DECIMAL_POINT, #ifdef __USE_GNU # define MON_DECIMAL_POINT __MON_DECIMAL_POINT #endif __MON_THOUSANDS_SEP, #ifdef __USE_GNU # define MON_THOUSANDS_SEP __MON_THOUSANDS_SEP #endif __MON_GROUPING, #ifdef __USE_GNU # define MON_GROUPING __MON_GROUPING #endif __POSITIVE_SIGN, #ifdef __USE_GNU # define POSITIVE_SIGN __POSITIVE_SIGN #endif __NEGATIVE_SIGN, #ifdef __USE_GNU # define NEGATIVE_SIGN __NEGATIVE_SIGN #endif __INT_FRAC_DIGITS, #ifdef __USE_GNU # define INT_FRAC_DIGITS __INT_FRAC_DIGITS #endif __FRAC_DIGITS, #ifdef __USE_GNU # define FRAC_DIGITS __FRAC_DIGITS #endif __P_CS_PRECEDES, #ifdef __USE_GNU # define P_CS_PRECEDES __P_CS_PRECEDES #endif __P_SEP_BY_SPACE, #ifdef __USE_GNU # define P_SEP_BY_SPACE __P_SEP_BY_SPACE #endif __N_CS_PRECEDES, #ifdef __USE_GNU # define N_CS_PRECEDES __N_CS_PRECEDES #endif __N_SEP_BY_SPACE, #ifdef __USE_GNU # define N_SEP_BY_SPACE __N_SEP_BY_SPACE #endif __P_SIGN_POSN, #ifdef __USE_GNU # define P_SIGN_POSN __P_SIGN_POSN #endif __N_SIGN_POSN, #ifdef __USE_GNU # define N_SIGN_POSN __N_SIGN_POSN #endif _NL_MONETARY_CRNCYSTR, #define CRNCYSTR _NL_MONETARY_CRNCYSTR __INT_P_CS_PRECEDES, #ifdef __USE_GNU # define INT_P_CS_PRECEDES __INT_P_CS_PRECEDES #endif __INT_P_SEP_BY_SPACE, #ifdef __USE_GNU # define INT_P_SEP_BY_SPACE __INT_P_SEP_BY_SPACE #endif __INT_N_CS_PRECEDES, #ifdef __USE_GNU # define INT_N_CS_PRECEDES __INT_N_CS_PRECEDES #endif __INT_N_SEP_BY_SPACE, #ifdef __USE_GNU # define INT_N_SEP_BY_SPACE __INT_N_SEP_BY_SPACE #endif __INT_P_SIGN_POSN, #ifdef __USE_GNU # define INT_P_SIGN_POSN __INT_P_SIGN_POSN #endif __INT_N_SIGN_POSN, #ifdef __USE_GNU # define INT_N_SIGN_POSN __INT_N_SIGN_POSN #endif _NL_MONETARY_DUO_INT_CURR_SYMBOL, _NL_MONETARY_DUO_CURRENCY_SYMBOL, _NL_MONETARY_DUO_INT_FRAC_DIGITS, _NL_MONETARY_DUO_FRAC_DIGITS, _NL_MONETARY_DUO_P_CS_PRECEDES, _NL_MONETARY_DUO_P_SEP_BY_SPACE, _NL_MONETARY_DUO_N_CS_PRECEDES, _NL_MONETARY_DUO_N_SEP_BY_SPACE, _NL_MONETARY_DUO_INT_P_CS_PRECEDES, _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, _NL_MONETARY_DUO_INT_N_CS_PRECEDES, _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, _NL_MONETARY_DUO_P_SIGN_POSN, _NL_MONETARY_DUO_N_SIGN_POSN, _NL_MONETARY_DUO_INT_P_SIGN_POSN, _NL_MONETARY_DUO_INT_N_SIGN_POSN, _NL_MONETARY_UNO_VALID_FROM, _NL_MONETARY_UNO_VALID_TO, _NL_MONETARY_DUO_VALID_FROM, _NL_MONETARY_DUO_VALID_TO, _NL_MONETARY_CONVERSION_RATE, _NL_MONETARY_DECIMAL_POINT_WC, _NL_MONETARY_THOUSANDS_SEP_WC, _NL_MONETARY_CODESET, _NL_NUM_LC_MONETARY, /* LC_NUMERIC category: formatting of numbers. These also correspond to members of `struct lconv'; see . */ __DECIMAL_POINT = _NL_ITEM (__LC_NUMERIC, 0), #ifdef __USE_GNU # define DECIMAL_POINT __DECIMAL_POINT #endif RADIXCHAR = __DECIMAL_POINT, #define RADIXCHAR RADIXCHAR __THOUSANDS_SEP, #ifdef __USE_GNU # define THOUSANDS_SEP __THOUSANDS_SEP #endif THOUSEP = __THOUSANDS_SEP, #define THOUSEP THOUSEP __GROUPING, #ifdef __USE_GNU # define GROUPING __GROUPING #endif _NL_NUMERIC_DECIMAL_POINT_WC, _NL_NUMERIC_THOUSANDS_SEP_WC, _NL_NUMERIC_CODESET, _NL_NUM_LC_NUMERIC, __YESEXPR = _NL_ITEM (__LC_MESSAGES, 0), /* Regex matching ``yes'' input. */ #define YESEXPR __YESEXPR __NOEXPR, /* Regex matching ``no'' input. */ #define NOEXPR __NOEXPR __YESSTR, /* Output string for ``yes''. */ #if defined __USE_GNU || (defined __USE_XOPEN && !defined __USE_XOPEN2K) # define YESSTR __YESSTR #endif __NOSTR, /* Output string for ``no''. */ #if defined __USE_GNU || (defined __USE_XOPEN && !defined __USE_XOPEN2K) # define NOSTR __NOSTR #endif _NL_MESSAGES_CODESET, _NL_NUM_LC_MESSAGES, _NL_PAPER_HEIGHT = _NL_ITEM (__LC_PAPER, 0), _NL_PAPER_WIDTH, _NL_PAPER_CODESET, _NL_NUM_LC_PAPER, _NL_NAME_NAME_FMT = _NL_ITEM (__LC_NAME, 0), _NL_NAME_NAME_GEN, _NL_NAME_NAME_MR, _NL_NAME_NAME_MRS, _NL_NAME_NAME_MISS, _NL_NAME_NAME_MS, _NL_NAME_CODESET, _NL_NUM_LC_NAME, _NL_ADDRESS_POSTAL_FMT = _NL_ITEM (__LC_ADDRESS, 0), _NL_ADDRESS_COUNTRY_NAME, _NL_ADDRESS_COUNTRY_POST, _NL_ADDRESS_COUNTRY_AB2, _NL_ADDRESS_COUNTRY_AB3, _NL_ADDRESS_COUNTRY_CAR, _NL_ADDRESS_COUNTRY_NUM, _NL_ADDRESS_COUNTRY_ISBN, _NL_ADDRESS_LANG_NAME, _NL_ADDRESS_LANG_AB, _NL_ADDRESS_LANG_TERM, _NL_ADDRESS_LANG_LIB, _NL_ADDRESS_CODESET, _NL_NUM_LC_ADDRESS, _NL_TELEPHONE_TEL_INT_FMT = _NL_ITEM (__LC_TELEPHONE, 0), _NL_TELEPHONE_TEL_DOM_FMT, _NL_TELEPHONE_INT_SELECT, _NL_TELEPHONE_INT_PREFIX, _NL_TELEPHONE_CODESET, _NL_NUM_LC_TELEPHONE, _NL_MEASUREMENT_MEASUREMENT = _NL_ITEM (__LC_MEASUREMENT, 0), _NL_MEASUREMENT_CODESET, _NL_NUM_LC_MEASUREMENT, _NL_IDENTIFICATION_TITLE = _NL_ITEM (__LC_IDENTIFICATION, 0), _NL_IDENTIFICATION_SOURCE, _NL_IDENTIFICATION_ADDRESS, _NL_IDENTIFICATION_CONTACT, _NL_IDENTIFICATION_EMAIL, _NL_IDENTIFICATION_TEL, _NL_IDENTIFICATION_FAX, _NL_IDENTIFICATION_LANGUAGE, _NL_IDENTIFICATION_TERRITORY, _NL_IDENTIFICATION_AUDIENCE, _NL_IDENTIFICATION_APPLICATION, _NL_IDENTIFICATION_ABBREVIATION, _NL_IDENTIFICATION_REVISION, _NL_IDENTIFICATION_DATE, _NL_IDENTIFICATION_CATEGORY, _NL_IDENTIFICATION_CODESET, _NL_NUM_LC_IDENTIFICATION, /* This marks the highest value used. */ _NL_NUM }; /* This macro produces an item you can pass to `nl_langinfo' or `nl_langinfo_l' to get the name of the locale in use for CATEGORY. */ #define _NL_LOCALE_NAME(category) _NL_ITEM ((category), \ _NL_ITEM_INDEX (-1)) #ifdef __USE_GNU # define NL_LOCALE_NAME(category) _NL_LOCALE_NAME (category) #endif /* Return the current locale's value for ITEM. If ITEM is invalid, an empty string is returned. The string returned will not change until `setlocale' is called; it is usually in read-only memory and cannot be modified. */ extern char *nl_langinfo (nl_item __item) __THROW; #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ # include /* Just like nl_langinfo but get the information from the locale object L. */ extern char *nl_langinfo_l (nl_item __item, locale_t __l); #endif __END_DECLS #endif /* langinfo.h */ PKZ^kdb.hnu[/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 1990, 1991, 2016 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may * require a specific license from the United States Government. * It is the responsibility of any person or organization contemplating * export to obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of M.I.T. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. Furthermore if you modify this software you must label * your software as modified software and not distribute it in such a * fashion that it might be confused with the original M.I.T. software. * M.I.T. makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. */ /* * Copyright (C) 1998 by the FundsXpress, INC. * * All rights reserved. * * Export of this software from the United States of America may require * a specific license from the United States Government. It is the * responsibility of any person or organization contemplating export to * obtain such a license before exporting. * * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and * distribute this software and its documentation for any purpose and * without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both that copyright notice and * this permission notice appear in supporting documentation, and that * the name of FundsXpress. not be used in advertising or publicity pertaining * to distribution of the software without specific, written prior * permission. FundsXpress makes no representations about the suitability of * this software for any purpose. It is provided "as is" without express * or implied warranty. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* KDC Database interface definitions */ /* This API is not considered as stable as the main krb5 API. * * - We may make arbitrary incompatible changes between feature * releases (e.g. from 1.7 to 1.8). * - We will make some effort to avoid making incompatible changes for * bugfix releases, but will make them if necessary. */ #ifndef KRB5_KDB5__ #define KRB5_KDB5__ #include /* This version will be incremented when incompatible changes are made to the * KDB API, and will be kept in sync with the libkdb major version. */ #define KRB5_KDB_API_VERSION 10 /* Salt types */ #define KRB5_KDB_SALTTYPE_NORMAL 0 /* #define KRB5_KDB_SALTTYPE_V4 1 */ #define KRB5_KDB_SALTTYPE_NOREALM 2 #define KRB5_KDB_SALTTYPE_ONLYREALM 3 #define KRB5_KDB_SALTTYPE_SPECIAL 4 /* #define KRB5_KDB_SALTTYPE_AFS3 5 */ #define KRB5_KDB_SALTTYPE_CERTHASH 6 /* Attributes */ #define KRB5_KDB_DISALLOW_POSTDATED 0x00000001 #define KRB5_KDB_DISALLOW_FORWARDABLE 0x00000002 #define KRB5_KDB_DISALLOW_TGT_BASED 0x00000004 #define KRB5_KDB_DISALLOW_RENEWABLE 0x00000008 #define KRB5_KDB_DISALLOW_PROXIABLE 0x00000010 #define KRB5_KDB_DISALLOW_DUP_SKEY 0x00000020 #define KRB5_KDB_DISALLOW_ALL_TIX 0x00000040 #define KRB5_KDB_REQUIRES_PRE_AUTH 0x00000080 #define KRB5_KDB_REQUIRES_HW_AUTH 0x00000100 #define KRB5_KDB_REQUIRES_PWCHANGE 0x00000200 #define KRB5_KDB_DISALLOW_SVR 0x00001000 #define KRB5_KDB_PWCHANGE_SERVICE 0x00002000 #define KRB5_KDB_SUPPORT_DESMD5 0x00004000 #define KRB5_KDB_NEW_PRINC 0x00008000 #define KRB5_KDB_OK_AS_DELEGATE 0x00100000 #define KRB5_KDB_OK_TO_AUTH_AS_DELEGATE 0x00200000 /* S4U2Self OK */ #define KRB5_KDB_NO_AUTH_DATA_REQUIRED 0x00400000 #define KRB5_KDB_LOCKDOWN_KEYS 0x00800000 /* Creation flags */ #define KRB5_KDB_CREATE_BTREE 0x00000001 #define KRB5_KDB_CREATE_HASH 0x00000002 /* Entry get flags */ /* Name canonicalization requested */ #define KRB5_KDB_FLAG_CANONICALIZE 0x00000010 /* Include authorization data generated by backend */ #define KRB5_KDB_FLAG_INCLUDE_PAC 0x00000020 /* Is AS-REQ (client referrals only) */ #define KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY 0x00000040 /* Map cross-realm principals */ #define KRB5_KDB_FLAG_MAP_PRINCIPALS 0x00000080 /* Protocol transition */ #define KRB5_KDB_FLAG_PROTOCOL_TRANSITION 0x00000100 /* Constrained delegation */ #define KRB5_KDB_FLAG_CONSTRAINED_DELEGATION 0x00000200 /* User-to-user */ #define KRB5_KDB_FLAG_USER_TO_USER 0x00000800 /* Cross-realm */ #define KRB5_KDB_FLAG_CROSS_REALM 0x00001000 /* Issuing referral */ #define KRB5_KDB_FLAG_ISSUING_REFERRAL 0x00004000 #define KRB5_KDB_FLAGS_S4U ( KRB5_KDB_FLAG_PROTOCOL_TRANSITION | \ KRB5_KDB_FLAG_CONSTRAINED_DELEGATION ) /* KDB iteration flags */ #define KRB5_DB_ITER_WRITE 0x00000001 #define KRB5_DB_ITER_REV 0x00000002 #define KRB5_DB_ITER_RECURSE 0x00000004 /* String attribute names recognized by krb5 */ #define KRB5_KDB_SK_SESSION_ENCTYPES "session_enctypes" #define KRB5_KDB_SK_REQUIRE_AUTH "require_auth" #define KRB5_KDB_SK_OPTIONAL_AD_SIGNEDPATH "optional_ad_signedpath" #if !defined(_WIN32) /* * Note --- these structures cannot be modified without changing the * database version number in libkdb.a, but should be expandable by * adding new tl_data types. */ typedef struct _krb5_tl_data { struct _krb5_tl_data* tl_data_next; /* NOT saved */ krb5_int16 tl_data_type; krb5_ui_2 tl_data_length; krb5_octet * tl_data_contents; } krb5_tl_data; /* String attributes (currently stored inside tl-data) map C string keys to * values. They can be set via kadmin and consumed by KDC plugins. */ typedef struct krb5_string_attr_st { char *key; char *value; } krb5_string_attr; /* * If this ever changes up the version number and make the arrays be as * big as necessary. * * Currently the first type is the enctype and the second is the salt type. */ typedef struct _krb5_key_data { krb5_int16 key_data_ver; /* Version */ krb5_ui_2 key_data_kvno; /* Key Version */ krb5_int16 key_data_type[2]; /* Array of types */ krb5_ui_2 key_data_length[2]; /* Array of lengths */ krb5_octet * key_data_contents[2]; /* Array of pointers */ } krb5_key_data; #define KRB5_KDB_V1_KEY_DATA_ARRAY 2 /* # of array elements */ typedef struct _krb5_keysalt { krb5_int16 type; krb5_data data; /* Length, data */ } krb5_keysalt; /* * A principal database entry. Extensions to this structure currently use the * tl_data list. The e_data and e_length fields are not used by any calling * code except kdb5_util dump and load, which marshal and unmarshal the array * in the dump record. KDB modules may use these fields internally as long as * they set e_length appropriately (non-zero if the data should be marshalled * across dump and load, zero if not) and handle null e_data values in * caller-constructed principal entries. */ typedef struct _krb5_db_entry_new { krb5_magic magic; /* NOT saved */ krb5_ui_2 len; krb5_ui_4 mask; /* members currently changed/set */ krb5_flags attributes; krb5_deltat max_life; krb5_deltat max_renewable_life; krb5_timestamp expiration; /* When the client expires */ krb5_timestamp pw_expiration; /* When its passwd expires */ krb5_timestamp last_success; /* Last successful passwd */ krb5_timestamp last_failed; /* Last failed passwd attempt */ krb5_kvno fail_auth_count; /* # of failed passwd attempt */ krb5_int16 n_tl_data; krb5_int16 n_key_data; krb5_ui_2 e_length; /* Length of extra data */ krb5_octet * e_data; /* Extra data to be saved */ krb5_principal princ; /* Length, data */ krb5_tl_data * tl_data; /* Linked list */ /* key_data must be sorted by kvno in descending order. */ krb5_key_data * key_data; /* Array */ } krb5_db_entry; typedef struct _osa_policy_ent_t { int version; char *name; krb5_ui_4 pw_min_life; krb5_ui_4 pw_max_life; krb5_ui_4 pw_min_length; krb5_ui_4 pw_min_classes; krb5_ui_4 pw_history_num; krb5_ui_4 policy_refcnt; /* no longer used */ /* Only valid if version > 1 */ krb5_ui_4 pw_max_fail; /* pwdMaxFailure */ krb5_ui_4 pw_failcnt_interval; /* pwdFailureCountInterval */ krb5_ui_4 pw_lockout_duration; /* pwdLockoutDuration */ /* Only valid if version > 2 */ krb5_ui_4 attributes; krb5_ui_4 max_life; krb5_ui_4 max_renewable_life; char * allowed_keysalts; krb5_int16 n_tl_data; krb5_tl_data * tl_data; } osa_policy_ent_rec, *osa_policy_ent_t; typedef void (*osa_adb_iter_policy_func) (void *, osa_policy_ent_t); typedef struct __krb5_key_salt_tuple { krb5_enctype ks_enctype; krb5_int32 ks_salttype; } krb5_key_salt_tuple; #define KRB5_KDB_MAGIC_NUMBER 0xdbdbdbdb #define KRB5_KDB_V1_BASE_LENGTH 38 #define KRB5_KDB_MAX_ALLOWED_KS_LEN 512 #define KRB5_TL_LAST_PWD_CHANGE 0x0001 #define KRB5_TL_MOD_PRINC 0x0002 #define KRB5_TL_KADM_DATA 0x0003 #define KRB5_TL_KADM5_E_DATA 0x0004 #define KRB5_TL_RB1_CHALLENGE 0x0005 #ifdef SECURID #define KRB5_TL_SECURID_STATE 0x0006 #endif /* SECURID */ #define KRB5_TL_USER_CERTIFICATE 0x0007 #define KRB5_TL_MKVNO 0x0008 #define KRB5_TL_ACTKVNO 0x0009 #define KRB5_TL_MKEY_AUX 0x000a /* String attributes may not always be represented in tl-data. kadmin clients * must use the get_strings and set_string RPCs. */ #define KRB5_TL_STRING_ATTRS 0x000b #define KRB5_TL_PAC_LOGON_INFO 0x0100 /* NDR encoded validation info */ #define KRB5_TL_SERVER_REFERRAL 0x0200 /* ASN.1 encoded ServerReferralInfo */ #define KRB5_TL_SVR_REFERRAL_DATA 0x0300 /* ASN.1 encoded PA-SVR-REFERRAL-DATA */ #define KRB5_TL_CONSTRAINED_DELEGATION_ACL 0x0400 /* Each entry is a permitted SPN */ #define KRB5_TL_LM_KEY 0x0500 /* LM OWF */ #define KRB5_TL_X509_SUBJECT_ISSUER_NAME 0x0600 /* IssuerDNSubjectDN */ #define KRB5_TL_LAST_ADMIN_UNLOCK 0x0700 /* Timestamp of admin unlock */ #define KRB5_TL_DB_ARGS 0x7fff /* version number for KRB5_TL_ACTKVNO data */ #define KRB5_TL_ACTKVNO_VER 1 /* version number for KRB5_TL_MKEY_AUX data */ #define KRB5_TL_MKEY_AUX_VER 1 typedef struct _krb5_actkvno_node { struct _krb5_actkvno_node *next; krb5_kvno act_kvno; krb5_timestamp act_time; } krb5_actkvno_node; typedef struct _krb5_mkey_aux_node { struct _krb5_mkey_aux_node *next; krb5_kvno mkey_kvno; /* kvno of mkey protecting the latest_mkey */ krb5_key_data latest_mkey; /* most recent mkey */ } krb5_mkey_aux_node; typedef struct _krb5_keylist_node { krb5_keyblock keyblock; krb5_kvno kvno; struct _krb5_keylist_node *next; } krb5_keylist_node; /* * Determines the number of failed KDC requests before DISALLOW_ALL_TIX is set * on the principal. */ #define KRB5_MAX_FAIL_COUNT 5 /* XXX depends on knowledge of krb5_parse_name() formats */ #define KRB5_KDB_M_NAME "K/M" /* Kerberos/Master */ /* prompts used by default when reading the KDC password from the keyboard. */ #define KRB5_KDC_MKEY_1 "Enter KDC database master key" #define KRB5_KDC_MKEY_2 "Re-enter KDC database master key to verify" extern char *krb5_mkey_pwd_prompt1; extern char *krb5_mkey_pwd_prompt2; /* * These macros specify the encoding of data within the database. * * Data encoding is little-endian. */ #ifdef _KRB5_INT_H #include "k5-platform.h" #define krb5_kdb_decode_int16(cp, i16) \ *((krb5_int16 *) &(i16)) = load_16_le(cp) #define krb5_kdb_decode_int32(cp, i32) \ *((krb5_int32 *) &(i32)) = load_32_le(cp) #define krb5_kdb_encode_int16(i16, cp) store_16_le(i16, cp) #define krb5_kdb_encode_int32(i32, cp) store_32_le(i32, cp) #endif /* _KRB5_INT_H */ #define KRB5_KDB_OPEN_RW 0 #define KRB5_KDB_OPEN_RO 1 #ifndef KRB5_KDB_SRV_TYPE_KDC #define KRB5_KDB_SRV_TYPE_KDC 0x0100 #endif #ifndef KRB5_KDB_SRV_TYPE_ADMIN #define KRB5_KDB_SRV_TYPE_ADMIN 0x0200 #endif /* 0x0300 was KRB5_KDB_SRV_TYPE_PASSWD but it is no longer used. */ #ifndef KRB5_KDB_SRV_TYPE_OTHER #define KRB5_KDB_SRV_TYPE_OTHER 0x0400 #endif #define KRB5_KDB_OPT_SET_DB_NAME 0 #define KRB5_KDB_OPT_SET_LOCK_MODE 1 #define KRB5_DB_LOCKMODE_SHARED 0x0001 #define KRB5_DB_LOCKMODE_EXCLUSIVE 0x0002 #define KRB5_DB_LOCKMODE_PERMANENT 0x0008 /* libkdb.spec */ krb5_error_code krb5_db_setup_lib_handle(krb5_context kcontext); krb5_error_code krb5_db_open( krb5_context kcontext, char **db_args, int mode ); krb5_error_code krb5_db_init ( krb5_context kcontext ); krb5_error_code krb5_db_create ( krb5_context kcontext, char **db_args ); krb5_error_code krb5_db_inited ( krb5_context kcontext ); krb5_error_code kdb5_db_create ( krb5_context kcontext, char **db_args ); krb5_error_code krb5_db_fini ( krb5_context kcontext ); const char * krb5_db_errcode2string ( krb5_context kcontext, long err_code ); krb5_error_code krb5_db_destroy ( krb5_context kcontext, char **db_args ); krb5_error_code krb5_db_promote ( krb5_context kcontext, char **db_args ); krb5_error_code krb5_db_get_age ( krb5_context kcontext, char *db_name, time_t *t ); krb5_error_code krb5_db_lock ( krb5_context kcontext, int lock_mode ); krb5_error_code krb5_db_unlock ( krb5_context kcontext ); krb5_error_code krb5_db_get_principal ( krb5_context kcontext, krb5_const_principal search_for, unsigned int flags, krb5_db_entry **entry ); void krb5_db_free_principal ( krb5_context kcontext, krb5_db_entry *entry ); krb5_error_code krb5_db_put_principal ( krb5_context kcontext, krb5_db_entry *entry ); krb5_error_code krb5_db_delete_principal ( krb5_context kcontext, krb5_principal search_for ); krb5_error_code krb5_db_rename_principal ( krb5_context kcontext, krb5_principal source, krb5_principal target ); /* * Iterate over principals in the KDB. If the callback may write to the DB, * the caller must get an exclusive lock with krb5_db_lock before iterating, * and release it with krb5_db_unlock after iterating. */ krb5_error_code krb5_db_iterate ( krb5_context kcontext, char *match_entry, int (*func) (krb5_pointer, krb5_db_entry *), krb5_pointer func_arg, krb5_flags iterflags ); krb5_error_code krb5_db_store_master_key ( krb5_context kcontext, char *keyfile, krb5_principal mname, krb5_kvno kvno, krb5_keyblock *key, char *master_pwd); krb5_error_code krb5_db_store_master_key_list ( krb5_context kcontext, char *keyfile, krb5_principal mname, char *master_pwd); krb5_error_code krb5_db_fetch_mkey ( krb5_context context, krb5_principal mname, krb5_enctype etype, krb5_boolean fromkeyboard, krb5_boolean twice, char *db_args, krb5_kvno *kvno, krb5_data *salt, krb5_keyblock *key); krb5_error_code krb5_db_fetch_mkey_list( krb5_context context, krb5_principal mname, const krb5_keyblock * mkey ); krb5_error_code krb5_dbe_find_enctype( krb5_context kcontext, krb5_db_entry *dbentp, krb5_int32 ktype, krb5_int32 stype, krb5_int32 kvno, krb5_key_data **kdatap); krb5_error_code krb5_dbe_search_enctype ( krb5_context kcontext, krb5_db_entry *dbentp, krb5_int32 *start, krb5_int32 ktype, krb5_int32 stype, krb5_int32 kvno, krb5_key_data **kdatap); krb5_error_code krb5_db_setup_mkey_name ( krb5_context context, const char *keyname, const char *realm, char **fullname, krb5_principal *principal); /** * Decrypts the key given in @@a key_data. If @a mkey is specified, that * master key is used. If @a mkey is NULL, then all master keys are tried. */ krb5_error_code krb5_dbe_decrypt_key_data( krb5_context context, const krb5_keyblock * mkey, const krb5_key_data * key_data, krb5_keyblock * dbkey, krb5_keysalt * keysalt); krb5_error_code krb5_dbe_encrypt_key_data( krb5_context context, const krb5_keyblock * mkey, const krb5_keyblock * dbkey, const krb5_keysalt * keysalt, int keyver, krb5_key_data * key_data); krb5_error_code krb5_dbe_fetch_act_key_list(krb5_context context, krb5_principal princ, krb5_actkvno_node **act_key_list); krb5_error_code krb5_dbe_find_act_mkey( krb5_context context, krb5_actkvno_node * act_mkey_list, krb5_kvno * act_kvno, krb5_keyblock ** act_mkey); krb5_error_code krb5_dbe_find_mkey( krb5_context context, krb5_db_entry * entry, krb5_keyblock ** mkey); /* Set *mkvno to mkvno in entry tl_data, or 0 if not present. */ krb5_error_code krb5_dbe_lookup_mkvno( krb5_context context, krb5_db_entry * entry, krb5_kvno * mkvno); krb5_keylist_node * krb5_db_mkey_list_alias( krb5_context kcontext ); /* Set *mkvno to mkvno in entry tl_data, or minimum value from mkey_list. */ krb5_error_code krb5_dbe_get_mkvno( krb5_context context, krb5_db_entry * entry, krb5_kvno * mkvno); krb5_error_code krb5_dbe_lookup_mod_princ_data( krb5_context context, krb5_db_entry * entry, krb5_timestamp * mod_time, krb5_principal * mod_princ); krb5_error_code krb5_dbe_lookup_mkey_aux( krb5_context context, krb5_db_entry * entry, krb5_mkey_aux_node ** mkey_aux_data_list); krb5_error_code krb5_dbe_update_mkvno( krb5_context context, krb5_db_entry * entry, krb5_kvno mkvno); krb5_error_code krb5_dbe_lookup_actkvno( krb5_context context, krb5_db_entry * entry, krb5_actkvno_node ** actkvno_list); krb5_error_code krb5_dbe_update_mkey_aux( krb5_context context, krb5_db_entry * entry, krb5_mkey_aux_node * mkey_aux_data_list); krb5_error_code krb5_dbe_update_actkvno(krb5_context context, krb5_db_entry * entry, const krb5_actkvno_node *actkvno_list); krb5_error_code krb5_dbe_update_last_pwd_change( krb5_context context, krb5_db_entry * entry, krb5_timestamp stamp); krb5_error_code krb5_dbe_update_last_admin_unlock( krb5_context context, krb5_db_entry * entry, krb5_timestamp stamp); krb5_error_code krb5_dbe_lookup_tl_data( krb5_context context, krb5_db_entry * entry, krb5_tl_data * ret_tl_data); krb5_error_code krb5_dbe_create_key_data( krb5_context context, krb5_db_entry * entry); krb5_error_code krb5_dbe_update_mod_princ_data( krb5_context context, krb5_db_entry * entry, krb5_timestamp mod_date, krb5_const_principal mod_princ); /* * These are wrappers around realloc() and free(). Applications and KDB * modules can use them when manipulating principal and policy entries to * ensure that they allocate and free memory in a manner compatible with the * library. Using libkrb5 or libkbd5 functions to construct values (such as * krb5_copy_principal() to construct the princ field of a krb5_db_entry) is * also safe. On Unix platforms, just using malloc() and free() is safe as * long as the application or module does not use a malloc replacement. */ void *krb5_db_alloc( krb5_context kcontext, void *ptr, size_t size ); void krb5_db_free( krb5_context kcontext, void *ptr); krb5_error_code krb5_dbe_lookup_last_pwd_change( krb5_context context, krb5_db_entry * entry, krb5_timestamp * stamp); krb5_error_code krb5_dbe_lookup_last_admin_unlock( krb5_context context, krb5_db_entry * entry, krb5_timestamp * stamp); /* Retrieve the set of string attributes in entry, in no particular order. * Free *strings_out with krb5_dbe_free_strings when done. */ krb5_error_code krb5_dbe_get_strings(krb5_context context, krb5_db_entry *entry, krb5_string_attr **strings_out, int *count_out); /* Retrieve a single string attribute from entry, or NULL if there is no * attribute for key. Free *value_out with krb5_dbe_free_string when done. */ krb5_error_code krb5_dbe_get_string(krb5_context context, krb5_db_entry *entry, const char *key, char **value_out); /* Change or add a string attribute in entry, or delete it if value is NULL. */ krb5_error_code krb5_dbe_set_string(krb5_context context, krb5_db_entry *entry, const char *key, const char *value); krb5_error_code krb5_dbe_delete_tl_data( krb5_context context, krb5_db_entry * entry, krb5_int16 tl_data_type); krb5_error_code krb5_db_update_tl_data(krb5_context context, krb5_int16 * n_tl_datap, krb5_tl_data **tl_datap, krb5_tl_data * new_tl_data); krb5_error_code krb5_dbe_update_tl_data( krb5_context context, krb5_db_entry * entry, krb5_tl_data * new_tl_data); /* Compute the salt for a key data entry given the corresponding principal. */ krb5_error_code krb5_dbe_compute_salt(krb5_context context, const krb5_key_data *key, krb5_const_principal princ, krb5_int16 *salttype_out, krb5_data **salt_out); /* * Modify the key data of entry to explicitly store salt values using the * KRB5_KDB_SALTTYPE_SPECIAL salt type. */ krb5_error_code krb5_dbe_specialize_salt(krb5_context context, krb5_db_entry *entry); krb5_error_code krb5_dbe_cpw( krb5_context kcontext, krb5_keyblock * master_key, krb5_key_salt_tuple * ks_tuple, int ks_tuple_count, char * passwd, int new_kvno, krb5_boolean keepold, krb5_db_entry * db_entry); krb5_error_code krb5_dbe_ark( krb5_context context, krb5_keyblock * master_key, krb5_key_salt_tuple * ks_tuple, int ks_tuple_count, krb5_db_entry * db_entry); krb5_error_code krb5_dbe_crk( krb5_context context, krb5_keyblock * master_key, krb5_key_salt_tuple * ks_tuple, int ks_tuple_count, krb5_boolean keepold, krb5_db_entry * db_entry); krb5_error_code krb5_dbe_apw( krb5_context context, krb5_keyblock * master_key, krb5_key_salt_tuple * ks_tuple, int ks_tuple_count, char * passwd, krb5_db_entry * db_entry); int krb5_db_get_key_data_kvno( krb5_context context, int count, krb5_key_data * data); krb5_error_code krb5_db_sign_authdata(krb5_context kcontext, unsigned int flags, krb5_const_principal client_princ, krb5_const_principal server_princ, krb5_db_entry *client, krb5_db_entry *server, krb5_db_entry *header_server, krb5_db_entry *local_tgt, krb5_keyblock *client_key, krb5_keyblock *server_key, krb5_keyblock *header_key, krb5_keyblock *local_tgt_key, krb5_keyblock *session_key, krb5_timestamp authtime, krb5_authdata **tgt_auth_data, void *ad_info, krb5_data ***auth_indicators, krb5_authdata ***signed_auth_data); krb5_error_code krb5_db_check_transited_realms(krb5_context kcontext, const krb5_data *tr_contents, const krb5_data *client_realm, const krb5_data *server_realm); krb5_error_code krb5_db_check_policy_as(krb5_context kcontext, krb5_kdc_req *request, krb5_db_entry *client, krb5_db_entry *server, krb5_timestamp kdc_time, const char **status, krb5_pa_data ***e_data); krb5_error_code krb5_db_check_policy_tgs(krb5_context kcontext, krb5_kdc_req *request, krb5_db_entry *server, krb5_ticket *ticket, const char **status, krb5_pa_data ***e_data); void krb5_db_audit_as_req(krb5_context kcontext, krb5_kdc_req *request, const krb5_address *local_addr, const krb5_address *remote_addr, krb5_db_entry *client, krb5_db_entry *server, krb5_timestamp authtime, krb5_error_code error_code); void krb5_db_refresh_config(krb5_context kcontext); krb5_error_code krb5_db_check_allowed_to_delegate(krb5_context kcontext, krb5_const_principal client, const krb5_db_entry *server, krb5_const_principal proxy); krb5_error_code krb5_db_get_s4u_x509_principal(krb5_context kcontext, const krb5_data *client_cert, krb5_const_principal in_princ, unsigned int flags, krb5_db_entry **entry); krb5_error_code krb5_db_allowed_to_delegate_from(krb5_context context, krb5_const_principal client, krb5_const_principal server, void *server_ad_info, const krb5_db_entry *proxy); krb5_error_code krb5_db_get_authdata_info(krb5_context context, unsigned int flags, krb5_authdata **in_authdata, krb5_const_principal client_princ, krb5_const_principal server_princ, krb5_keyblock *server_key, krb5_keyblock *krbtgt_key, krb5_db_entry *krbtgt, krb5_timestamp authtime, void **ad_info_out, krb5_principal *client_out); void krb5_db_free_authdata_info(krb5_context context, void *ad_info); /** * Sort an array of @a krb5_key_data keys in descending order by their kvno. * Key data order within a kvno is preserved. * * @param key_data * The @a krb5_key_data array to sort. This is sorted in place so the * array will be modified. * @param key_data_length * The length of @a key_data. */ void krb5_dbe_sort_key_data(krb5_key_data *key_data, size_t key_data_length); /* default functions. Should not be directly called */ /* * Default functions prototype */ krb5_error_code krb5_dbe_def_search_enctype( krb5_context kcontext, krb5_db_entry *dbentp, krb5_int32 *start, krb5_int32 ktype, krb5_int32 stype, krb5_int32 kvno, krb5_key_data **kdatap); krb5_error_code krb5_def_store_mkey_list( krb5_context context, char *keyfile, krb5_principal mname, krb5_keylist_node *keylist, char *master_pwd); krb5_error_code krb5_db_def_fetch_mkey( krb5_context context, krb5_principal mname, krb5_keyblock *key, krb5_kvno *kvno, char *db_args); krb5_error_code krb5_def_fetch_mkey_list( krb5_context context, krb5_principal mprinc, const krb5_keyblock *mkey, krb5_keylist_node **mkeys_list); krb5_error_code krb5_dbe_def_cpw( krb5_context context, krb5_keyblock * master_key, krb5_key_salt_tuple * ks_tuple, int ks_tuple_count, char * passwd, int new_kvno, krb5_boolean keepold, krb5_db_entry * db_entry); krb5_error_code krb5_dbe_def_decrypt_key_data( krb5_context context, const krb5_keyblock * mkey, const krb5_key_data * key_data, krb5_keyblock * dbkey, krb5_keysalt * keysalt); krb5_error_code krb5_dbe_def_encrypt_key_data( krb5_context context, const krb5_keyblock * mkey, const krb5_keyblock * dbkey, const krb5_keysalt * keysalt, int keyver, krb5_key_data * key_data); krb5_error_code krb5_db_def_rename_principal( krb5_context kcontext, krb5_const_principal source, krb5_const_principal target); krb5_error_code krb5_db_create_policy( krb5_context kcontext, osa_policy_ent_t policy); krb5_error_code krb5_db_get_policy ( krb5_context kcontext, char *name, osa_policy_ent_t *policy ); krb5_error_code krb5_db_put_policy( krb5_context kcontext, osa_policy_ent_t policy); krb5_error_code krb5_db_iter_policy( krb5_context kcontext, char *match_entry, osa_adb_iter_policy_func func, void *data); krb5_error_code krb5_db_delete_policy( krb5_context kcontext, char *policy); void krb5_db_free_policy( krb5_context kcontext, osa_policy_ent_t policy); krb5_error_code krb5_db_set_context(krb5_context, void *db_context); krb5_error_code krb5_db_get_context(krb5_context, void **db_context); void krb5_dbe_free_key_data_contents(krb5_context, krb5_key_data *); void krb5_dbe_free_key_list(krb5_context, krb5_keylist_node *); void krb5_dbe_free_actkvno_list(krb5_context, krb5_actkvno_node *); void krb5_dbe_free_mkey_aux_list(krb5_context, krb5_mkey_aux_node *); void krb5_dbe_free_tl_data(krb5_context, krb5_tl_data *); void krb5_dbe_free_strings(krb5_context, krb5_string_attr *, int count); void krb5_dbe_free_string(krb5_context, char *); /* * Register the KDB keytab type, allowing "KDB:" to be used as a keytab name. * For this type to work, the context used for keytab operations must have an * associated database handle (via krb5_db_open()). */ krb5_error_code krb5_db_register_keytab(krb5_context context); #define KRB5_KDB_DEF_FLAGS 0 #define KDB_MAX_DB_NAME 128 #define KDB_REALM_SECTION "realms" #define KDB_MODULE_POINTER "database_module" #define KDB_MODULE_DEF_SECTION "dbdefaults" #define KDB_MODULE_SECTION "dbmodules" #define KDB_LIB_POINTER "db_library" #define KDB_DATABASE_CONF_FILE DEFAULT_SECURE_PROFILE_PATH #define KDB_DATABASE_ENV_PROF KDC_PROFILE_ENV #define KRB5_KDB_OPEN_RW 0 #define KRB5_KDB_OPEN_RO 1 #define KRB5_KDB_OPT_SET_DB_NAME 0 #define KRB5_KDB_OPT_SET_LOCK_MODE 1 /* * This number indicates the date of the last incompatible change to the DAL. * The maj_ver field of the module's vtable structure must match this version. */ #define KRB5_KDB_DAL_MAJOR_VERSION 8 /* * A krb5_context can hold one database object. Modules should use * krb5_db_set_context and krb5_db_get_context to store state associated with * the database object. * * Some module functions are mandatory for KDC operation; others are optional * or apply only to administrative operations. If a function is optional, a * module can leave the function pointer as NULL. Alternatively, modules can * return KRB5_PLUGIN_OP_NOTSUPP when asked to perform an inapplicable action. * * Some module functions have default implementations which will call back into * the vtable interface. Leave these functions as NULL to use the default * implementations. * * The documentation in these comments describes the DAL as it is currently * implemented and used, not as it should be. So if anything seems off, that * probably means the current state of things is off. * * Modules must allocate memory for principal entries, policy entries, and * other structures using an allocator compatible with malloc() as seen by * libkdb5 and libkrb5. Modules may link against libkdb5 and call * krb5_db_alloc() to be certain that the same malloc implementation is used. */ typedef struct _kdb_vftabl { short int maj_ver; short int min_ver; /* * Mandatory: Invoked after the module library is loaded, when the first DB * using the module is opened, across all contexts. */ krb5_error_code (*init_library)(void); /* * Mandatory: Invoked before the module library is unloaded, after the last * DB using the module is closed, across all contexts. */ krb5_error_code (*fini_library)(void); /* * Mandatory: Initialize a database object. Profile settings should be * read from conf_section inside KDB_MODULE_SECTION. db_args communicates * command-line arguments for module-specific flags. mode will be one of * KRB5_KDB_OPEN_{RW,RO} or'd with one of * KRB5_KDB_SRV_TYPE_{KDC,ADMIN,PASSWD,OTHER}. */ krb5_error_code (*init_module)(krb5_context kcontext, char *conf_section, char **db_args, int mode); /* * Mandatory: Finalize the database object contained in a context. Free * any state contained in the db_context pointer and null it out. */ krb5_error_code (*fini_module)(krb5_context kcontext); /* * Optional: Initialize a database object while creating the underlying * database. conf_section and db_args have the same meaning as in * init_module. This function may return an error if the database already * exists. Used by kdb5_util create. * * If db_args contains the value "temporary", the module should create an * exclusively locked side copy of the database suitable for loading in a * propagation from master to replica. This side copy will later be * promoted with promote_db, allowing complete updates of the DB with no * loss in read availability. If the module cannot comply with this * architecture, it should return an error. */ krb5_error_code (*create)(krb5_context kcontext, char *conf_section, char **db_args); /* * Optional: Destroy a database. conf_section and db_args have the same * meaning as in init_module. Used by kdb5_util destroy. In current * usage, the database is destroyed while open, so the module should handle * that. */ krb5_error_code (*destroy)(krb5_context kcontext, char *conf_section, char **db_args); /* * Deprecated: No longer used as of krb5 1.10; can be removed in the next * DAL revision. Modules should leave as NULL. */ krb5_error_code (*get_age)(krb5_context kcontext, char *db_name, time_t *age); /* * Optional: Lock the database, with semantics depending on the mode * argument: * * KRB5_DB_LOCKMODE_SHARED: Lock may coexist with other shared locks. * KRB5_DB_LOCKMODE_EXCLUSIVE: Lock may not coexist with other locks. * KRB5_DB_LOCKMODE_PERMANENT: Exclusive lock surviving process exit. * * Used by the "kadmin lock" command, incremental propagation, and * kdb5_util dump. Incremental propagation support requires shared locks * to operate. kdb5_util dump will continue unlocked if the module returns * KRB5_PLUGIN_OP_NOTSUPP. */ krb5_error_code (*lock)(krb5_context kcontext, int mode); /* Optional: Release a lock created with db_lock. */ krb5_error_code (*unlock)(krb5_context kcontext); /* * Mandatory: Set *entry to an allocated entry for the principal * search_for. If the principal is not found, return KRB5_KDB_NOENTRY. * * The meaning of flags are as follows: * * KRB5_KDB_FLAG_CANONICALIZE: Set by the KDC when looking up entries for * an AS or TGS request with canonicalization requested. Determines * whether the module should return out-of-realm referrals. * * KRB5_KDB_FLAG_INCLUDE_PAC: Set by the KDC during an AS request when the * client requested PAC information during padata, and during most TGS * requests. Indicates that the module should include PAC information * when its sign_authdata method is invoked. * * KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY: Set by the KDC when looking up the * client entry in an AS request. Affects how the module should return * out-of-realm referrals. * * KRB5_KDB_FLAG_MAP_PRINCIPALS: Set by the KDC when looking up the client * entry during TGS requests, except for S4U TGS requests and requests * where the server entry has the KRB5_KDB_NO_AUTH_DATA_REQUIRED * attribute. Indicates that the module should map foreign principals * to local principals if it supports doing so. * * KRB5_KDB_FLAG_PROTOCOL_TRANSITION: Set by the KDC when looking up the * client entry during an S4U2Self TGS request. This affects the PAC * information which should be included when authorization data is * generated; see the Microsoft S4U specification for details. * * KRB5_KDB_FLAG_CONSTRAINED_DELEGATION: Set by the KDC when looking up the * client entry during an S4U2Proxy TGS request. Also affects PAC * generation. * * KRB5_KDB_FLAG_CROSS_REALM: Set by the KDC after looking up a server * entry during a TGS request, if the header ticket was issued by a * different realm. * * KRB5_KDB_FLAG_ISSUING_REFERRAL: Set by the KDC after looking up a server * entry during a TGS request, if the requested server principal is not * part of the realm being served, and a referral or alternate TGT will * be issued instead. * * A module may return an in-realm alias by setting (*entry)->princ to the * canonical name. The KDC will decide based on the request whether to use * the requested name or the canonical name in the issued ticket. * * A module can return a referral to another realm if * KRB5_KDB_FLAG_CANONICALIZE is set, or if * KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY is set and search_for->type is * KRB5_NT_ENTERPRISE_PRINCIPAL. If KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY is * set, the module should return a referral by simply filling in an * out-of-realm name in (*entry)->princ and setting all other fields to * NULL. Otherwise, the module should return the entry for the cross-realm * TGS of the referred-to realm. For TGS referals, the module can also * include tl-data of type KRB5_TL_SERVER_REFERRAL containing ASN.1-encoded * Windows referral data as documented in * draft-ietf-krb-wg-kerberos-referrals-11 appendix A; this will be * returned to the client as encrypted padata. */ krb5_error_code (*get_principal)(krb5_context kcontext, krb5_const_principal search_for, unsigned int flags, krb5_db_entry **entry); /* * Optional: Create or modify a principal entry. db_args communicates * command-line arguments for module-specific flags. * * The mask field of an entry indicates the changed fields. Mask values * are defined in kadmin's admin.h header. If KADM5_PRINCIPAL is set in * the mask, the entry is new; otherwise it already exists. All fields of * an entry are expected to contain correct values, regardless of whether * they are specified in the mask, so it is acceptable for a module to * ignore the mask and update the entire entry. */ krb5_error_code (*put_principal)(krb5_context kcontext, krb5_db_entry *entry, char **db_args); /* * Optional: Delete the entry for the principal search_for. If the * principal did not exist, return KRB5_KDB_NOENTRY. */ krb5_error_code (*delete_principal)(krb5_context kcontext, krb5_const_principal search_for); /* * Optional with default: Rename a principal. If the source principal does * not exist, return KRB5_KDB_NOENTRY. If the target exists, return an * error. * * NOTE: If the module chooses to implement a custom function for renaming * a principal instead of using the default, then rename operations will * fail if iprop logging is enabled. */ krb5_error_code (*rename_principal)(krb5_context kcontext, krb5_const_principal source, krb5_const_principal target); /* * Optional: For each principal entry in the database, invoke func with the * argments func_arg and the entry data. If match_entry is specified, the * module may narrow the iteration to principal names matching that regular * expression; a module may alternatively ignore match_entry. */ krb5_error_code (*iterate)(krb5_context kcontext, char *match_entry, int (*func)(krb5_pointer, krb5_db_entry *), krb5_pointer func_arg, krb5_flags iterflags); /* * Optional: Create a password policy entry. Return an error if the policy * already exists. */ krb5_error_code (*create_policy)(krb5_context kcontext, osa_policy_ent_t policy); /* * Optional: Set *policy to the policy entry of the specified name. If the * entry does not exist, return KRB5_KDB_NOENTRY. */ krb5_error_code (*get_policy)(krb5_context kcontext, char *name, osa_policy_ent_t *policy); /* * Optional: Modify an existing password policy entry to match the values * in policy. Return an error if the policy does not already exist. */ krb5_error_code (*put_policy)(krb5_context kcontext, osa_policy_ent_t policy); /* * Optional: For each password policy entry in the database, invoke func * with the argments data and the entry data. If match_entry is specified, * the module may narrow the iteration to policy names matching that * regular expression; a module may alternatively ignore match_entry. */ krb5_error_code (*iter_policy)(krb5_context kcontext, char *match_entry, osa_adb_iter_policy_func func, void *data); /* * Optional: Delete the password policy entry with the name policy. Return * an error if the entry does not exist. */ krb5_error_code (*delete_policy)(krb5_context kcontext, char *policy); /* * Optional with default: Retrieve a master keyblock from the stash file * db_args, filling in *key and *kvno. mname is the name of the master * principal for the realm. * * The default implementation reads the master keyblock from a keytab or * old-format stash file. */ krb5_error_code (*fetch_master_key)(krb5_context kcontext, krb5_principal mname, krb5_keyblock *key, krb5_kvno *kvno, char *db_args); /* * Optional with default: Given a keyblock for some version of the * database's master key, fetch the decrypted master key values from the * database and store the list into *mkeys_list. The caller will free * *mkeys_list using a libkdb5 function which uses the standard free() * function, so the module must not use a custom allocator. * * The caller may not know the version number of the master key it has, in * which case it will pass IGNORE_VNO. * * The default implementation ignores kvno and tries the key against the * current master key data and all KRB5_TL_MKEY_AUX values, which contain * copies of the master keys encrypted with old master keys. */ krb5_error_code (*fetch_master_key_list)(krb5_context kcontext, krb5_principal mname, const krb5_keyblock *key, krb5_keylist_node **mkeys_list); /* * Optional with default: Save a list of master keyblocks, obtained from * fetch_master_key_list, into the stash file db_arg. The caller will set * master_pwd to NULL, so the module should just ignore it. mname is the * name of the master principal for the realm. * * The default implementation saves the list of master keys in a * keytab-format file. */ krb5_error_code (*store_master_key_list)(krb5_context kcontext, char *db_arg, krb5_principal mname, krb5_keylist_node *keylist, char *master_pwd); /* * Optional with default: Starting at position *start, scan the key data of * a database entry for a key matching the enctype ktype, the salt type * stype, and the version kvno. Store the resulting key into *kdatap and * set *start to the position after the key found. If ktype is negative, * match any enctype. If stype is negative, match any salt type. If kvno * is zero or negative, find the most recent key version satisfying the * other constraints. */ krb5_error_code (*dbe_search_enctype)(krb5_context kcontext, krb5_db_entry *dbentp, krb5_int32 *start, krb5_int32 ktype, krb5_int32 stype, krb5_int32 kvno, krb5_key_data **kdatap); /* * Optional with default: Change the key data for db_entry to include keys * derived from the password passwd in each of the specified key-salt * types, at version new_kvno. Discard the old key data if keepold is not * set. * * The default implementation uses the keyblock master_key to encrypt each * new key, via the function encrypt_key_data. */ krb5_error_code (*change_pwd)(krb5_context context, krb5_keyblock *master_key, krb5_key_salt_tuple *ks_tuple, int ks_tuple_count, char *passwd, int new_kvno, krb5_boolean keepold, krb5_db_entry *db_entry); /* * Optional: Promote a temporary database to be the live one. context must * be initialized with an exclusively locked database created with the * "temporary" db_arg. On success, the database object contained in * context will be finalized. * * This method is used by kdb5_util load to replace the live database with * minimal loss of read availability. */ krb5_error_code (*promote_db)(krb5_context context, char *conf_section, char **db_args); /* * Optional with default: Decrypt the key in key_data with master keyblock * mkey, placing the result into dbkey. Copy the salt from key_data, if * any, into keysalt. Either dbkey or keysalt may be left unmodified on * successful return if key_data does not contain key or salt information. * * The default implementation expects the encrypted key (in krb5_c_encrypt * format) to be stored in key_data_contents[0], with length given by * key_data_length[0]. If key_data_ver is 2, it expects the salt to be * stored, unencrypted, in key_data_contents[1], with length given by * key_data_length[1]. */ krb5_error_code (*decrypt_key_data)(krb5_context kcontext, const krb5_keyblock *mkey, const krb5_key_data *key_data, krb5_keyblock *dbkey, krb5_keysalt *keysalt); /* * Optional with default: Encrypt dbkey with master keyblock mkey, placing * the result into key_data along with keysalt. * * The default implementation stores the encrypted key (in krb5_c_encrypt * format) in key_data_contents[0] and the length in key_data_length[0]. * If keysalt is specified, it sets key_data_ver to 2, and stores the salt * in key_data_contents[1] and its length in key_data_length[1]. If * keysalt is not specified, key_data_ver is set to 1. */ krb5_error_code (*encrypt_key_data)(krb5_context kcontext, const krb5_keyblock *mkey, const krb5_keyblock *dbkey, const krb5_keysalt *keysalt, int keyver, krb5_key_data *key_data); /* * Optional: Generate signed authorization data, such as a Windows PAC, for * the ticket to be returned to the client. Place the signed authorization * data, if any, in *signed_auth_data. This function will be invoked for * an AS request if the client included padata requesting a PAC. This * function will be invoked for a TGS request if there is authorization * data in the TGT, if the client is from another realm, or if the TGS * request is an S4U2Self or S4U2Proxy request. This function will not be * invoked during TGS requests if the server principal has the * no_auth_data_required attribute set. Input parameters are: * * flags: The flags used to look up the client principal. * * client_princ: For S4U2Self and S4U2Proxy TGS requests, the client * principal requested by the service; for regular TGS requests, the * possibly-canonicalized client principal. * * server_princ: The server principal in the request. * * client: The DB entry of the client if it is in the local realm, NULL * if not. For S4U2Self and S4U2Proxy TGS requests, this is the DB * entry for the client principal requested by the service. * * server: The DB entry of the service principal, or of a cross-realm * krbtgt principal in case of referral. * * header_server: For S4U2Proxy requests, the DB entry of the second * ticket server. For other TGS requests, the DB entry of the header * ticket server. For AS requests, NULL. * * local_tgt: the DB entry of the local krbtgt principal. * * client_key: The reply key for the KDC request, before any FAST armor * is applied. For AS requests, this may be the client's long-term key * or a key chosen by a preauth mechanism. For TGS requests, this may * be the subkey found in the AP-REQ or the session key of the TGT. * * server_key: The server key used to encrypt the returned ticket. * * header_key: For S4U2Proxy requests, the key used to decrypt the second * ticket. For TGS requests, the key used to decrypt the header * ticket. For AS requests, NULL. * * local_tgt_key: The decrypted first key of local_tgt. * * session_key: The session key of the ticket being granted to the * requestor. * * authtime: The timestamp of the original client authentication time. * For AS requests, this is the current time. For TGS requests, this * is the authtime of the subject ticket (TGT or S4U2Proxy evidence * ticket). * * tgt_auth_data: For TGS requests, the authorization data present in the * subject ticket. For AS requests, NULL. * * ad_info: For TGS requests, the parsed authorization data if obtained * by get_authdata_info method from the authorization data present in * the subject ticket. Otherwise NULL. * * auth_indicators: Points to NULL or a null-terminated list of krb5_data * pointers, each containing an authentication indicator (RFC 8129). * The method may modify this list, or free it and replace * *auth_indicators with NULL, to change which auth indicators will be * included in the ticket. */ krb5_error_code (*sign_authdata)(krb5_context kcontext, unsigned int flags, krb5_const_principal client_princ, krb5_const_principal server_princ, krb5_db_entry *client, krb5_db_entry *server, krb5_db_entry *header_server, krb5_db_entry *local_tgt, krb5_keyblock *client_key, krb5_keyblock *server_key, krb5_keyblock *header_key, krb5_keyblock *local_tgt_key, krb5_keyblock *session_key, krb5_timestamp authtime, krb5_authdata **tgt_auth_data, void *ad_info, krb5_data ***auth_indicators, krb5_authdata ***signed_auth_data); /* * Optional: Perform a policy check on a cross-realm ticket's transited * field. Return 0 if the check authoritatively succeeds, * KRB5_PLUGIN_NO_HANDLE to use the core transited-checking mechanisms, or * another error (other than KRB5_PLUGIN_OP_NOTSUPP) if the check fails. */ krb5_error_code (*check_transited_realms)(krb5_context kcontext, const krb5_data *tr_contents, const krb5_data *client_realm, const krb5_data *server_realm); /* * Optional: Perform a policy check on an AS request, in addition to the * standard policy checks. Return 0 if the AS request is allowed. If the * AS request is not allowed: * - Place a short string literal into *status. * - If desired, place data into e_data. Any data placed here will be * freed by the caller using the standard free function. * - Return an appropriate error (such as KRB5KDC_ERR_POLICY). */ krb5_error_code (*check_policy_as)(krb5_context kcontext, krb5_kdc_req *request, krb5_db_entry *client, krb5_db_entry *server, krb5_timestamp kdc_time, const char **status, krb5_pa_data ***e_data); /* * Optional: Perform a policy check on a TGS request, in addition to the * standard policy checks. Return 0 if the TGS request is allowed. If the * TGS request is not allowed: * - Place a short string literal into *status. * - If desired, place data into e_data. Any data placed here will be * freed by the caller using the standard free function. * - Return an appropriate error (such as KRB5KDC_ERR_POLICY). * The input parameter ticket contains the TGT used in the TGS request. */ krb5_error_code (*check_policy_tgs)(krb5_context kcontext, krb5_kdc_req *request, krb5_db_entry *server, krb5_ticket *ticket, const char **status, krb5_pa_data ***e_data); /* * Optional: This method informs the module of a successful or unsuccessful * AS request. */ void (*audit_as_req)(krb5_context kcontext, krb5_kdc_req *request, const krb5_address *local_addr, const krb5_address *remote_addr, krb5_db_entry *client, krb5_db_entry *server, krb5_timestamp authtime, krb5_error_code error_code); /* Note: there is currently no method for auditing TGS requests. */ /* * Optional: This method informs the module of a request to reload * configuration or other state (that is, the KDC received a SIGHUP). */ void (*refresh_config)(krb5_context kcontext); /* * Optional: Perform a policy check on server being allowed to obtain * tickets from client to proxy. (Note that proxy is the target of the * delegation, not the delegating service; the term "proxy" is from the * viewpoint of the delegating service asking another service to perform * some of its work in the authentication context of the client. This * terminology comes from the Microsoft S4U protocol documentation.) * Return 0 if policy allows it, or an appropriate error (such as * KRB5KDC_ERR_POLICY) if not. If this method is not implemented, all * S4U2Proxy delegation requests will be rejected. */ krb5_error_code (*check_allowed_to_delegate)(krb5_context context, krb5_const_principal client, const krb5_db_entry *server, krb5_const_principal proxy); /* * Optional: Free the e_data pointer of a database entry. If this method * is not implemented, the e_data pointer in principal entries will be * freed with free() as seen by libkdb5. */ void (*free_principal_e_data)(krb5_context kcontext, krb5_octet *e_data); /* * Optional: get a principal entry for S4U2Self based on X509 certificate. * * If flags include KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY, princ->realm * indicates the request realm, but the data components should be ignored. * The module can return an out-of-realm client referral as it would for * get_principal(). * * If flags does not include KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY, princ is * from PA-S4U-X509-USER. If it contains data components (and not just a * realm), the module should verify that it is the same as the lookup * result for client_cert. The module should not return a referral. */ krb5_error_code (*get_s4u_x509_principal)(krb5_context kcontext, const krb5_data *client_cert, krb5_const_principal princ, unsigned int flags, krb5_db_entry **entry_out); /* * Optional: Perform a policy check on server being allowed to obtain * tickets from client to proxy. This method is similar to * check_allowed_to_delegate, but it operates on the target server DB entry * (called "proxy" here as in Microsoft's protocol documentation) rather * than the intermediate server entry. server_ad_info represents the * authdata of the intermediate server, as returned by the * get_authdata_info method on the header ticket. Return 0 if policy * allows the delegation, or an appropriate error (such as * KRB5KDC_ERR_POLICY) if not. * * This method is called for S4U2Proxy requests and implements the * resource-based constrained delegation variant, which can support * cross-realm delegation. If this method is not implemented or if it * returns a policy error, the KDC will fall back to * check_allowed_to_delegate if the intermediate and target servers are in * the same realm and the evidence ticket is forwardable. */ krb5_error_code (*allowed_to_delegate_from)(krb5_context context, krb5_const_principal client, krb5_const_principal server, void *server_ad_info, const krb5_db_entry *proxy); /* * Optional: Perform verification and policy checks on authorization data, * such as a Windows PAC, based on the request client lookup flags. Return * 0 if all checks have passed. Optionally return a representation of the * authdata in *ad_info_out, to be consumed by allowed_to_delegate_from and * sign_authdata. Returning *ad_info_out is required to support * resource-based constrained delegation. * * If the KRB5_KDB_FLAG_CONSTRAINED_DELEGATION bit is set, a PAC must be * provided and verified, and an error should be returned if the client is * not allowed to delegate. If the KRB5_KDB_FLAG_CROSS_REALM bit is also * set, set *client_out to the client name in the PAC; this indicates the * requested client principal for a cross-realm S4U2Proxy request. * * This method is called for TGS requests on the authorization data from * the header ticket. For S4U2Proxy requests it is also called on the * authorization data from the evidence ticket. If the * KRB5_KDB_FLAG_PROTOCOL_TRANSITION bit is set in flags, the authdata is * from the header ticket of an S4U2Self referral request, and the supplied * client_princ is the requested client. */ krb5_error_code (*get_authdata_info)(krb5_context context, unsigned int flags, krb5_authdata **in_authdata, krb5_const_principal client_princ, krb5_const_principal server_princ, krb5_keyblock *server_key, krb5_keyblock *krbtgt_key, krb5_db_entry *krbtgt, krb5_timestamp authtime, void **ad_info_out, krb5_principal *client_out); void (*free_authdata_info)(krb5_context context, void *ad_info); /* End of minor version 0 for major version 8. */ } kdb_vftabl; #endif /* !defined(_WIN32) */ #endif /* KRB5_KDB5__ */ PKZδ))curses.hnu[/**************************************************************************** * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* $Id: curses.h.in,v 1.257 2017/11/21 00:11:37 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H #define CURSES 1 #define CURSES_H 1 /* These are defined only in curses.h, and are used for conditional compiles */ #define NCURSES_VERSION_MAJOR 6 #define NCURSES_VERSION_MINOR 1 #define NCURSES_VERSION_PATCH 20180224 /* This is defined in more than one ncurses header, for identification */ #undef NCURSES_VERSION #define NCURSES_VERSION "6.1" /* * Identify the mouse encoding version. */ #define NCURSES_MOUSE_VERSION 2 /* * Definitions to facilitate DLL's. */ #include #if 1 #include #endif /* * User-definable tweak to disable the include of . */ #ifndef NCURSES_ENABLE_STDBOOL_H #define NCURSES_ENABLE_STDBOOL_H 1 #endif /* * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses * configured using --disable-macros. */ #ifndef NCURSES_ATTR_T #define NCURSES_ATTR_T int #endif /* * Expands to 'const' if ncurses is configured using --enable-const. Note that * doing so makes it incompatible with other implementations of X/Open Curses. */ #undef NCURSES_CONST #define NCURSES_CONST const #undef NCURSES_INLINE #define NCURSES_INLINE inline /* * The standard type used for color values, and for color-pairs. The latter * allows the curses library to enumerate the combinations of foreground and * background colors used by an application, and is normally the product of the * total foreground and background colors. * * X/Open uses "short" for both of these types, ultimately because they are * numbers from the SVr4 terminal database, which uses 16-bit signed values. */ #undef NCURSES_COLOR_T #define NCURSES_COLOR_T short #undef NCURSES_PAIRS_T #define NCURSES_PAIRS_T short /* * Definitions used to make WINDOW and similar structs opaque. */ #ifndef NCURSES_INTERNALS #define NCURSES_OPAQUE 0 #define NCURSES_OPAQUE_FORM 0 #define NCURSES_OPAQUE_MENU 0 #define NCURSES_OPAQUE_PANEL 0 #endif /* * Definition used to optionally suppress wattr* macros to help with the * transition from ncurses5 to ncurses6 by allowing the header files to * be shared across development packages for ncursesw in both ABIs. */ #ifndef NCURSES_WATTR_MACROS #define NCURSES_WATTR_MACROS 0 #endif /* * The reentrant code relies on the opaque setting, but adds features. */ #ifndef NCURSES_REENTRANT #define NCURSES_REENTRANT 0 #endif /* * Control whether bindings for interop support are added. */ #undef NCURSES_INTEROP_FUNCS #define NCURSES_INTEROP_FUNCS 1 /* * The internal type used for window dimensions. */ #undef NCURSES_SIZE_T #define NCURSES_SIZE_T short /* * Control whether tparm() supports varargs or fixed-parameter list. */ #undef NCURSES_TPARM_VARARGS #define NCURSES_TPARM_VARARGS 1 /* * Control type used for tparm's arguments. While X/Open equates long and * char* values, this is not always workable for 64-bit platforms. */ #undef NCURSES_TPARM_ARG #define NCURSES_TPARM_ARG intptr_t /* * Control whether ncurses uses wcwidth() for checking width of line-drawing * characters. */ #undef NCURSES_WCWIDTH_GRAPHICS #define NCURSES_WCWIDTH_GRAPHICS 1 /* * NCURSES_CH_T is used in building the library, but not used otherwise in * this header file, since that would make the normal/wide-character versions * of the header incompatible. */ #undef NCURSES_CH_T #define NCURSES_CH_T cchar_t #if 1 && defined(_LP64) typedef unsigned chtype; typedef unsigned mmask_t; #else typedef uint32_t chtype; typedef uint32_t mmask_t; #endif /* * We need FILE, etc. Include this before checking any feature symbols. */ #include /* * With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or * conflicting) when _XOPEN_SOURCE is 500 or greater. If NCURSES_WIDECHAR is * not already defined, e.g., if the platform relies upon nonstandard feature * test macros, define it at this point if the standard feature test macros * indicate that it should be defined. */ #ifndef NCURSES_WIDECHAR #if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500)) #define NCURSES_WIDECHAR 1 #else #define NCURSES_WIDECHAR 0 #endif #endif /* NCURSES_WIDECHAR */ #include /* we need va_list */ #if NCURSES_WIDECHAR #include /* we want wchar_t */ #endif /* X/Open and SVr4 specify that curses implements 'bool'. However, C++ may also * implement it. If so, we must use the C++ compiler's type to avoid conflict * with other interfaces. * * A further complication is that may declare 'bool' to be a * different type, such as an enum which is not necessarily compatible with * C++. If we have , make 'bool' a macro, so users may #undef it. * Otherwise, let it remain a typedef to avoid conflicts with other #define's. * In either case, make a typedef for NCURSES_BOOL which can be used if needed * from either C or C++. */ #undef TRUE #define TRUE 1 #undef FALSE #define FALSE 0 typedef unsigned char NCURSES_BOOL; #if defined(__cplusplus) /* __cplusplus, etc. */ /* use the C++ compiler's bool type */ #define NCURSES_BOOL bool #else /* c89, c99, etc. */ #if NCURSES_ENABLE_STDBOOL_H #include /* use whatever the C compiler decides bool really is */ #define NCURSES_BOOL bool #else /* there is no predefined bool - use our own */ #undef bool #define bool NCURSES_BOOL #endif #endif /* !__cplusplus, etc. */ #ifdef __cplusplus extern "C" { #define NCURSES_CAST(type,value) static_cast(value) #else #define NCURSES_CAST(type,value) (type)(value) #endif #define NCURSES_OK_ADDR(p) (0 != NCURSES_CAST(const void *, (p))) /* * X/Open attributes. In the ncurses implementation, they are identical to the * A_ attributes. */ #define WA_ATTRIBUTES A_ATTRIBUTES #define WA_NORMAL A_NORMAL #define WA_STANDOUT A_STANDOUT #define WA_UNDERLINE A_UNDERLINE #define WA_REVERSE A_REVERSE #define WA_BLINK A_BLINK #define WA_DIM A_DIM #define WA_BOLD A_BOLD #define WA_ALTCHARSET A_ALTCHARSET #define WA_INVIS A_INVIS #define WA_PROTECT A_PROTECT #define WA_HORIZONTAL A_HORIZONTAL #define WA_LEFT A_LEFT #define WA_LOW A_LOW #define WA_RIGHT A_RIGHT #define WA_TOP A_TOP #define WA_VERTICAL A_VERTICAL #if 1 #define WA_ITALIC A_ITALIC /* ncurses extension */ #endif /* colors */ #define COLOR_BLACK 0 #define COLOR_RED 1 #define COLOR_GREEN 2 #define COLOR_YELLOW 3 #define COLOR_BLUE 4 #define COLOR_MAGENTA 5 #define COLOR_CYAN 6 #define COLOR_WHITE 7 /* line graphics */ #if 0 || NCURSES_REENTRANT NCURSES_WRAPPED_VAR(chtype*, acs_map); #define acs_map NCURSES_PUBLIC_VAR(acs_map()) #else extern NCURSES_EXPORT_VAR(chtype) acs_map[]; #endif #define NCURSES_ACS(c) (acs_map[NCURSES_CAST(unsigned char,(c))]) /* VT100 symbols begin here */ #define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */ #define ACS_LLCORNER NCURSES_ACS('m') /* lower left corner */ #define ACS_URCORNER NCURSES_ACS('k') /* upper right corner */ #define ACS_LRCORNER NCURSES_ACS('j') /* lower right corner */ #define ACS_LTEE NCURSES_ACS('t') /* tee pointing right */ #define ACS_RTEE NCURSES_ACS('u') /* tee pointing left */ #define ACS_BTEE NCURSES_ACS('v') /* tee pointing up */ #define ACS_TTEE NCURSES_ACS('w') /* tee pointing down */ #define ACS_HLINE NCURSES_ACS('q') /* horizontal line */ #define ACS_VLINE NCURSES_ACS('x') /* vertical line */ #define ACS_PLUS NCURSES_ACS('n') /* large plus or crossover */ #define ACS_S1 NCURSES_ACS('o') /* scan line 1 */ #define ACS_S9 NCURSES_ACS('s') /* scan line 9 */ #define ACS_DIAMOND NCURSES_ACS('`') /* diamond */ #define ACS_CKBOARD NCURSES_ACS('a') /* checker board (stipple) */ #define ACS_DEGREE NCURSES_ACS('f') /* degree symbol */ #define ACS_PLMINUS NCURSES_ACS('g') /* plus/minus */ #define ACS_BULLET NCURSES_ACS('~') /* bullet */ /* Teletype 5410v1 symbols begin here */ #define ACS_LARROW NCURSES_ACS(',') /* arrow pointing left */ #define ACS_RARROW NCURSES_ACS('+') /* arrow pointing right */ #define ACS_DARROW NCURSES_ACS('.') /* arrow pointing down */ #define ACS_UARROW NCURSES_ACS('-') /* arrow pointing up */ #define ACS_BOARD NCURSES_ACS('h') /* board of squares */ #define ACS_LANTERN NCURSES_ACS('i') /* lantern symbol */ #define ACS_BLOCK NCURSES_ACS('0') /* solid square block */ /* * These aren't documented, but a lot of System Vs have them anyway * (you can spot pprryyzz{{||}} in a lot of AT&T terminfo strings). * The ACS_names may not match AT&T's, our source didn't know them. */ #define ACS_S3 NCURSES_ACS('p') /* scan line 3 */ #define ACS_S7 NCURSES_ACS('r') /* scan line 7 */ #define ACS_LEQUAL NCURSES_ACS('y') /* less/equal */ #define ACS_GEQUAL NCURSES_ACS('z') /* greater/equal */ #define ACS_PI NCURSES_ACS('{') /* Pi */ #define ACS_NEQUAL NCURSES_ACS('|') /* not equal */ #define ACS_STERLING NCURSES_ACS('}') /* UK pound sign */ /* * Line drawing ACS names are of the form ACS_trbl, where t is the top, r * is the right, b is the bottom, and l is the left. t, r, b, and l might * be B (blank), S (single), D (double), or T (thick). The subset defined * here only uses B and S. */ #define ACS_BSSB ACS_ULCORNER #define ACS_SSBB ACS_LLCORNER #define ACS_BBSS ACS_URCORNER #define ACS_SBBS ACS_LRCORNER #define ACS_SBSS ACS_RTEE #define ACS_SSSB ACS_LTEE #define ACS_SSBS ACS_BTEE #define ACS_BSSS ACS_TTEE #define ACS_BSBS ACS_HLINE #define ACS_SBSB ACS_VLINE #define ACS_SSSS ACS_PLUS #undef ERR #define ERR (-1) #undef OK #define OK (0) /* values for the _flags member */ #define _SUBWIN 0x01 /* is this a sub-window? */ #define _ENDLINE 0x02 /* is the window flush right? */ #define _FULLWIN 0x04 /* is the window full-screen? */ #define _SCROLLWIN 0x08 /* bottom edge is at screen bottom? */ #define _ISPAD 0x10 /* is this window a pad? */ #define _HASMOVED 0x20 /* has cursor moved since last refresh? */ #define _WRAPPED 0x40 /* cursor was just wrappped */ /* * this value is used in the firstchar and lastchar fields to mark * unchanged lines */ #define _NOCHANGE -1 /* * this value is used in the oldindex field to mark lines created by insertions * and scrolls. */ #define _NEWINDEX -1 typedef struct screen SCREEN; typedef struct _win_st WINDOW; typedef chtype attr_t; /* ...must be at least as wide as chtype */ #if NCURSES_WIDECHAR #if 0 #ifdef mblen /* libutf8.h defines it w/o undefining first */ #undef mblen #endif #include #endif #if 1 #include /* ...to get mbstate_t, etc. */ #endif #if 0 typedef unsigned short wchar_t1; #endif #if 0 typedef unsigned int wint_t1; #endif /* * cchar_t stores an array of CCHARW_MAX wide characters. The first is * normally a spacing character. The others are non-spacing. If those * (spacing and nonspacing) do not fill the array, a null L'\0' follows. * Otherwise, a null is assumed to follow when extracting via getcchar(). */ #define CCHARW_MAX 5 typedef struct { attr_t attr; wchar_t chars[CCHARW_MAX]; #if 1 #undef NCURSES_EXT_COLORS #define NCURSES_EXT_COLORS 20180224 int ext_color; /* color pair, must be more than 16-bits */ #endif } cchar_t; #endif /* NCURSES_WIDECHAR */ #if !NCURSES_OPAQUE struct ldat; struct _win_st { NCURSES_SIZE_T _cury, _curx; /* current cursor position */ /* window location and size */ NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */ NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */ short _flags; /* window state flags */ /* attribute tracking */ attr_t _attrs; /* current attribute for non-space character */ chtype _bkgd; /* current background char/attribute pair */ /* option values set by user */ bool _notimeout; /* no time out on function-key entry? */ bool _clear; /* consider all data in the window invalid? */ bool _leaveok; /* OK to not reset cursor on exit? */ bool _scroll; /* OK to scroll this window? */ bool _idlok; /* OK to use insert/delete line? */ bool _idcok; /* OK to use insert/delete char? */ bool _immed; /* window in immed mode? (not yet used) */ bool _sync; /* window in sync mode? */ bool _use_keypad; /* process function keys into KEY_ symbols? */ int _delay; /* 0 = nodelay, <0 = blocking, >0 = delay */ struct ldat *_line; /* the actual line data */ /* global screen state */ NCURSES_SIZE_T _regtop; /* top line of scrolling region */ NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */ /* these are used only if this is a sub-window */ int _parx; /* x coordinate of this window in parent */ int _pary; /* y coordinate of this window in parent */ WINDOW *_parent; /* pointer to parent if a sub-window */ /* these are used only if this is a pad */ struct pdat { NCURSES_SIZE_T _pad_y, _pad_x; NCURSES_SIZE_T _pad_top, _pad_left; NCURSES_SIZE_T _pad_bottom, _pad_right; } _pad; NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */ #if NCURSES_WIDECHAR cchar_t _bkgrnd; /* current background char/attribute pair */ #if 1 int _color; /* current color-pair for non-space character */ #endif #endif }; #endif /* NCURSES_OPAQUE */ /* * This is an extension to support events... */ #if 1 #ifdef NCURSES_WGETCH_EVENTS #if !defined(__BEOS__) || defined(__HAIKU__) /* Fix _nc_timed_wait() on BEOS... */ # define NCURSES_EVENT_VERSION 1 #endif /* !defined(__BEOS__) */ /* * Bits to set in _nc_event.data.flags */ # define _NC_EVENT_TIMEOUT_MSEC 1 # define _NC_EVENT_FILE 2 # define _NC_EVENT_FILE_READABLE 2 # if 0 /* Not supported yet... */ # define _NC_EVENT_FILE_WRITABLE 4 # define _NC_EVENT_FILE_EXCEPTION 8 # endif typedef struct { int type; union { long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */ struct { unsigned int flags; int fd; unsigned int result; } fev; /* _NC_EVENT_FILE */ } data; } _nc_event; typedef struct { int count; int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */ _nc_event *events[1]; } _nc_eventlist; extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *); /* experimental */ extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *);/* experimental */ #endif /* NCURSES_WGETCH_EVENTS */ #endif /* NCURSES_EXT_FUNCS */ /* * GCC (and some other compilers) define '__attribute__'; we're using this * macro to alert the compiler to flag inconsistencies in printf/scanf-like * function calls. Just in case '__attribute__' isn't defined, make a dummy. * Old versions of G++ do not accept it anyway, at least not consistently with * GCC. */ #if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__)) #define __attribute__(p) /* nothing */ #endif /* * We cannot define these in ncurses_cfg.h, since they require parameters to be * passed (that is non-portable). If you happen to be using gcc with warnings * enabled, define * GCC_PRINTF * GCC_SCANF * to improve checking of calls to printw(), etc. */ #ifndef GCC_PRINTFLIKE #if defined(GCC_PRINTF) && !defined(printf) #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) #else #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ #endif #endif #ifndef GCC_SCANFLIKE #if defined(GCC_SCANF) && !defined(scanf) #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) #else #define GCC_SCANFLIKE(fmt,var) /*nothing*/ #endif #endif #ifndef GCC_NORETURN #define GCC_NORETURN /* nothing */ #endif #ifndef GCC_UNUSED #define GCC_UNUSED /* nothing */ #endif /* * Curses uses a helper function. Define our type for this to simplify * extending it for the sp-funcs feature. */ typedef int (*NCURSES_OUTC)(int); /* * Function prototypes. This is the complete X/Open Curses list of required * functions. Those marked `generated' will have sources generated from the * macro definitions later in this file, in order to satisfy XPG4.2 * requirements. */ extern NCURSES_EXPORT(int) addch (const chtype); /* generated */ extern NCURSES_EXPORT(int) addchnstr (const chtype *, int); /* generated */ extern NCURSES_EXPORT(int) addchstr (const chtype *); /* generated */ extern NCURSES_EXPORT(int) addnstr (const char *, int); /* generated */ extern NCURSES_EXPORT(int) addstr (const char *); /* generated */ extern NCURSES_EXPORT(int) attroff (NCURSES_ATTR_T); /* generated */ extern NCURSES_EXPORT(int) attron (NCURSES_ATTR_T); /* generated */ extern NCURSES_EXPORT(int) attrset (NCURSES_ATTR_T); /* generated */ extern NCURSES_EXPORT(int) attr_get (attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ extern NCURSES_EXPORT(int) attr_off (attr_t, void *); /* generated */ extern NCURSES_EXPORT(int) attr_on (attr_t, void *); /* generated */ extern NCURSES_EXPORT(int) attr_set (attr_t, NCURSES_PAIRS_T, void *); /* generated */ extern NCURSES_EXPORT(int) baudrate (void); /* implemented */ extern NCURSES_EXPORT(int) beep (void); /* implemented */ extern NCURSES_EXPORT(int) bkgd (chtype); /* generated */ extern NCURSES_EXPORT(void) bkgdset (chtype); /* generated */ extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* generated */ extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype); /* generated */ extern NCURSES_EXPORT(bool) can_change_color (void); /* implemented */ extern NCURSES_EXPORT(int) cbreak (void); /* implemented */ extern NCURSES_EXPORT(int) chgat (int, attr_t, NCURSES_PAIRS_T, const void *); /* generated */ extern NCURSES_EXPORT(int) clear (void); /* generated */ extern NCURSES_EXPORT(int) clearok (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(int) clrtobot (void); /* generated */ extern NCURSES_EXPORT(int) clrtoeol (void); /* generated */ extern NCURSES_EXPORT(int) color_content (NCURSES_COLOR_T,NCURSES_COLOR_T*,NCURSES_COLOR_T*,NCURSES_COLOR_T*); /* implemented */ extern NCURSES_EXPORT(int) color_set (NCURSES_PAIRS_T,void*); /* generated */ extern NCURSES_EXPORT(int) COLOR_PAIR (int); /* generated */ extern NCURSES_EXPORT(int) copywin (const WINDOW*,WINDOW*,int,int,int,int,int,int,int); /* implemented */ extern NCURSES_EXPORT(int) curs_set (int); /* implemented */ extern NCURSES_EXPORT(int) def_prog_mode (void); /* implemented */ extern NCURSES_EXPORT(int) def_shell_mode (void); /* implemented */ extern NCURSES_EXPORT(int) delay_output (int); /* implemented */ extern NCURSES_EXPORT(int) delch (void); /* generated */ extern NCURSES_EXPORT(void) delscreen (SCREEN *); /* implemented */ extern NCURSES_EXPORT(int) delwin (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) deleteln (void); /* generated */ extern NCURSES_EXPORT(WINDOW *) derwin (WINDOW *,int,int,int,int); /* implemented */ extern NCURSES_EXPORT(int) doupdate (void); /* implemented */ extern NCURSES_EXPORT(WINDOW *) dupwin (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) echo (void); /* implemented */ extern NCURSES_EXPORT(int) echochar (const chtype); /* generated */ extern NCURSES_EXPORT(int) erase (void); /* generated */ extern NCURSES_EXPORT(int) endwin (void); /* implemented */ extern NCURSES_EXPORT(char) erasechar (void); /* implemented */ extern NCURSES_EXPORT(void) filter (void); /* implemented */ extern NCURSES_EXPORT(int) flash (void); /* implemented */ extern NCURSES_EXPORT(int) flushinp (void); /* implemented */ extern NCURSES_EXPORT(chtype) getbkgd (WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getch (void); /* generated */ extern NCURSES_EXPORT(int) getnstr (char *, int); /* generated */ extern NCURSES_EXPORT(int) getstr (char *); /* generated */ extern NCURSES_EXPORT(WINDOW *) getwin (FILE *); /* implemented */ extern NCURSES_EXPORT(int) halfdelay (int); /* implemented */ extern NCURSES_EXPORT(bool) has_colors (void); /* implemented */ extern NCURSES_EXPORT(bool) has_ic (void); /* implemented */ extern NCURSES_EXPORT(bool) has_il (void); /* implemented */ extern NCURSES_EXPORT(int) hline (chtype, int); /* generated */ extern NCURSES_EXPORT(void) idcok (WINDOW *, bool); /* implemented */ extern NCURSES_EXPORT(int) idlok (WINDOW *, bool); /* implemented */ extern NCURSES_EXPORT(void) immedok (WINDOW *, bool); /* implemented */ extern NCURSES_EXPORT(chtype) inch (void); /* generated */ extern NCURSES_EXPORT(int) inchnstr (chtype *, int); /* generated */ extern NCURSES_EXPORT(int) inchstr (chtype *); /* generated */ extern NCURSES_EXPORT(WINDOW *) initscr (void); /* implemented */ extern NCURSES_EXPORT(int) init_color (NCURSES_COLOR_T,NCURSES_COLOR_T,NCURSES_COLOR_T,NCURSES_COLOR_T); /* implemented */ extern NCURSES_EXPORT(int) init_pair (NCURSES_PAIRS_T,NCURSES_COLOR_T,NCURSES_COLOR_T); /* implemented */ extern NCURSES_EXPORT(int) innstr (char *, int); /* generated */ extern NCURSES_EXPORT(int) insch (chtype); /* generated */ extern NCURSES_EXPORT(int) insdelln (int); /* generated */ extern NCURSES_EXPORT(int) insertln (void); /* generated */ extern NCURSES_EXPORT(int) insnstr (const char *, int); /* generated */ extern NCURSES_EXPORT(int) insstr (const char *); /* generated */ extern NCURSES_EXPORT(int) instr (char *); /* generated */ extern NCURSES_EXPORT(int) intrflush (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(bool) isendwin (void); /* implemented */ extern NCURSES_EXPORT(bool) is_linetouched (WINDOW *,int); /* implemented */ extern NCURSES_EXPORT(bool) is_wintouched (WINDOW *); /* implemented */ extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); /* implemented */ extern NCURSES_EXPORT(int) keypad (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(char) killchar (void); /* implemented */ extern NCURSES_EXPORT(int) leaveok (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(char *) longname (void); /* implemented */ extern NCURSES_EXPORT(int) meta (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(int) move (int, int); /* generated */ extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype); /* generated */ extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int); /* generated */ extern NCURSES_EXPORT(int) mvaddchstr (int, int, const chtype *); /* generated */ extern NCURSES_EXPORT(int) mvaddnstr (int, int, const char *, int); /* generated */ extern NCURSES_EXPORT(int) mvaddstr (int, int, const char *); /* generated */ extern NCURSES_EXPORT(int) mvchgat (int, int, int, attr_t, NCURSES_PAIRS_T, const void *); /* generated */ extern NCURSES_EXPORT(int) mvcur (int,int,int,int); /* implemented */ extern NCURSES_EXPORT(int) mvdelch (int, int); /* generated */ extern NCURSES_EXPORT(int) mvderwin (WINDOW *, int, int); /* implemented */ extern NCURSES_EXPORT(int) mvgetch (int, int); /* generated */ extern NCURSES_EXPORT(int) mvgetnstr (int, int, char *, int); /* generated */ extern NCURSES_EXPORT(int) mvgetstr (int, int, char *); /* generated */ extern NCURSES_EXPORT(int) mvhline (int, int, chtype, int); /* generated */ extern NCURSES_EXPORT(chtype) mvinch (int, int); /* generated */ extern NCURSES_EXPORT(int) mvinchnstr (int, int, chtype *, int); /* generated */ extern NCURSES_EXPORT(int) mvinchstr (int, int, chtype *); /* generated */ extern NCURSES_EXPORT(int) mvinnstr (int, int, char *, int); /* generated */ extern NCURSES_EXPORT(int) mvinsch (int, int, chtype); /* generated */ extern NCURSES_EXPORT(int) mvinsnstr (int, int, const char *, int); /* generated */ extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); /* generated */ extern NCURSES_EXPORT(int) mvinstr (int, int, char *); /* generated */ extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) /* implemented */ GCC_PRINTFLIKE(3,4); extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) /* implemented */ GCC_SCANFLIKE(3,4); extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); /* generated */ extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); /* generated */ extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int);/* generated */ extern NCURSES_EXPORT(int) mvwaddchstr (WINDOW *, int, int, const chtype *); /* generated */ extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ extern NCURSES_EXPORT(int) mvwaddstr (WINDOW *, int, int, const char *); /* generated */ extern NCURSES_EXPORT(int) mvwchgat (WINDOW *, int, int, int, attr_t, NCURSES_PAIRS_T, const void *);/* generated */ extern NCURSES_EXPORT(int) mvwdelch (WINDOW *, int, int); /* generated */ extern NCURSES_EXPORT(int) mvwgetch (WINDOW *, int, int); /* generated */ extern NCURSES_EXPORT(int) mvwgetnstr (WINDOW *, int, int, char *, int); /* generated */ extern NCURSES_EXPORT(int) mvwgetstr (WINDOW *, int, int, char *); /* generated */ extern NCURSES_EXPORT(int) mvwhline (WINDOW *, int, int, chtype, int); /* generated */ extern NCURSES_EXPORT(int) mvwin (WINDOW *,int,int); /* implemented */ extern NCURSES_EXPORT(chtype) mvwinch (WINDOW *, int, int); /* generated */ extern NCURSES_EXPORT(int) mvwinchnstr (WINDOW *, int, int, chtype *, int); /* generated */ extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *); /* generated */ extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int); /* generated */ extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype); /* generated */ extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int); /* generated */ extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); /* generated */ extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); /* generated */ extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) /* implemented */ GCC_PRINTFLIKE(4,5); extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) /* implemented */ GCC_SCANFLIKE(4,5); extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); /* generated */ extern NCURSES_EXPORT(int) napms (int); /* implemented */ extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */ extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); /* implemented */ extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */ extern NCURSES_EXPORT(int) nl (void); /* implemented */ extern NCURSES_EXPORT(int) nocbreak (void); /* implemented */ extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(int) noecho (void); /* implemented */ extern NCURSES_EXPORT(int) nonl (void); /* implemented */ extern NCURSES_EXPORT(void) noqiflush (void); /* implemented */ extern NCURSES_EXPORT(int) noraw (void); /* implemented */ extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) pair_content (NCURSES_PAIRS_T,NCURSES_COLOR_T*,NCURSES_COLOR_T*); /* implemented */ extern NCURSES_EXPORT(int) PAIR_NUMBER (int); /* generated */ extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); /* implemented */ extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);/* implemented */ extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int); /* implemented */ extern NCURSES_EXPORT(int) printw (const char *,...) /* implemented */ GCC_PRINTFLIKE(1,2); extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); /* implemented */ extern NCURSES_EXPORT(void) qiflush (void); /* implemented */ extern NCURSES_EXPORT(int) raw (void); /* implemented */ extern NCURSES_EXPORT(int) redrawwin (WINDOW *); /* generated */ extern NCURSES_EXPORT(int) refresh (void); /* generated */ extern NCURSES_EXPORT(int) resetty (void); /* implemented */ extern NCURSES_EXPORT(int) reset_prog_mode (void); /* implemented */ extern NCURSES_EXPORT(int) reset_shell_mode (void); /* implemented */ extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* implemented */ extern NCURSES_EXPORT(int) savetty (void); /* implemented */ extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) /* implemented */ GCC_SCANFLIKE(1,2); extern NCURSES_EXPORT(int) scr_dump (const char *); /* implemented */ extern NCURSES_EXPORT(int) scr_init (const char *); /* implemented */ extern NCURSES_EXPORT(int) scrl (int); /* generated */ extern NCURSES_EXPORT(int) scroll (WINDOW *); /* generated */ extern NCURSES_EXPORT(int) scrollok (WINDOW *,bool); /* implemented */ extern NCURSES_EXPORT(int) scr_restore (const char *); /* implemented */ extern NCURSES_EXPORT(int) scr_set (const char *); /* implemented */ extern NCURSES_EXPORT(int) setscrreg (int,int); /* generated */ extern NCURSES_EXPORT(SCREEN *) set_term (SCREEN *); /* implemented */ extern NCURSES_EXPORT(int) slk_attroff (const chtype); /* implemented */ extern NCURSES_EXPORT(int) slk_attr_off (const attr_t, void *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) slk_attron (const chtype); /* implemented */ extern NCURSES_EXPORT(int) slk_attr_on (attr_t,void*); /* generated:WIDEC */ extern NCURSES_EXPORT(int) slk_attrset (const chtype); /* implemented */ extern NCURSES_EXPORT(attr_t) slk_attr (void); /* implemented */ extern NCURSES_EXPORT(int) slk_attr_set (const attr_t,NCURSES_PAIRS_T,void*); /* implemented */ extern NCURSES_EXPORT(int) slk_clear (void); /* implemented */ extern NCURSES_EXPORT(int) slk_color (NCURSES_PAIRS_T); /* implemented */ extern NCURSES_EXPORT(int) slk_init (int); /* implemented */ extern NCURSES_EXPORT(char *) slk_label (int); /* implemented */ extern NCURSES_EXPORT(int) slk_noutrefresh (void); /* implemented */ extern NCURSES_EXPORT(int) slk_refresh (void); /* implemented */ extern NCURSES_EXPORT(int) slk_restore (void); /* implemented */ extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* implemented */ extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */ extern NCURSES_EXPORT(int) standout (void); /* generated */ extern NCURSES_EXPORT(int) standend (void); /* generated */ extern NCURSES_EXPORT(int) start_color (void); /* implemented */ extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); /* implemented */ extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *, int, int, int, int); /* implemented */ extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); /* implemented */ extern NCURSES_EXPORT(chtype) termattrs (void); /* implemented */ extern NCURSES_EXPORT(char *) termname (void); /* implemented */ extern NCURSES_EXPORT(void) timeout (int); /* generated */ extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); /* generated */ extern NCURSES_EXPORT(int) touchwin (WINDOW *); /* generated */ extern NCURSES_EXPORT(int) typeahead (int); /* implemented */ extern NCURSES_EXPORT(int) ungetch (int); /* implemented */ extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* generated */ extern NCURSES_EXPORT(void) use_env (bool); /* implemented */ extern NCURSES_EXPORT(void) use_tioctl (bool); /* implemented */ extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */ extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */ extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */ extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* implemented */ extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */ extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); /* implemented */ extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); /* generated */ extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */ extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */ extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */ extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int); /* implemented */ extern NCURSES_EXPORT(int) waddstr (WINDOW *,const char *); /* generated */ extern NCURSES_EXPORT(int) wattron (WINDOW *, int); /* generated */ extern NCURSES_EXPORT(int) wattroff (WINDOW *, int); /* generated */ extern NCURSES_EXPORT(int) wattrset (WINDOW *, int); /* generated */ extern NCURSES_EXPORT(int) wattr_get (WINDOW *, attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ extern NCURSES_EXPORT(int) wattr_on (WINDOW *, attr_t, void *); /* implemented */ extern NCURSES_EXPORT(int) wattr_off (WINDOW *, attr_t, void *); /* implemented */ extern NCURSES_EXPORT(int) wattr_set (WINDOW *, attr_t, NCURSES_PAIRS_T, void *); /* generated */ extern NCURSES_EXPORT(int) wbkgd (WINDOW *, chtype); /* implemented */ extern NCURSES_EXPORT(void) wbkgdset (WINDOW *,chtype); /* implemented */ extern NCURSES_EXPORT(int) wborder (WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* implemented */ extern NCURSES_EXPORT(int) wchgat (WINDOW *, int, attr_t, NCURSES_PAIRS_T, const void *);/* implemented */ extern NCURSES_EXPORT(int) wclear (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wclrtobot (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wclrtoeol (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wcolor_set (WINDOW*,NCURSES_PAIRS_T,void*); /* implemented */ extern NCURSES_EXPORT(void) wcursyncup (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wdelch (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wdeleteln (WINDOW *); /* generated */ extern NCURSES_EXPORT(int) wechochar (WINDOW *, const chtype); /* implemented */ extern NCURSES_EXPORT(int) werase (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wgetch (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wgetnstr (WINDOW *,char *,int); /* implemented */ extern NCURSES_EXPORT(int) wgetstr (WINDOW *, char *); /* generated */ extern NCURSES_EXPORT(int) whline (WINDOW *, chtype, int); /* implemented */ extern NCURSES_EXPORT(chtype) winch (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) winchnstr (WINDOW *, chtype *, int); /* implemented */ extern NCURSES_EXPORT(int) winchstr (WINDOW *, chtype *); /* generated */ extern NCURSES_EXPORT(int) winnstr (WINDOW *, char *, int); /* implemented */ extern NCURSES_EXPORT(int) winsch (WINDOW *, chtype); /* implemented */ extern NCURSES_EXPORT(int) winsdelln (WINDOW *,int); /* implemented */ extern NCURSES_EXPORT(int) winsertln (WINDOW *); /* generated */ extern NCURSES_EXPORT(int) winsnstr (WINDOW *, const char *,int); /* implemented */ extern NCURSES_EXPORT(int) winsstr (WINDOW *, const char *); /* generated */ extern NCURSES_EXPORT(int) winstr (WINDOW *, char *); /* generated */ extern NCURSES_EXPORT(int) wmove (WINDOW *,int,int); /* implemented */ extern NCURSES_EXPORT(int) wnoutrefresh (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) /* implemented */ GCC_PRINTFLIKE(2,3); extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); /* implemented */ extern NCURSES_EXPORT(int) wrefresh (WINDOW *); /* implemented */ extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) /* implemented */ GCC_SCANFLIKE(2,3); extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); /* implemented */ extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* implemented */ extern NCURSES_EXPORT(int) wstandout (WINDOW *); /* generated */ extern NCURSES_EXPORT(int) wstandend (WINDOW *); /* generated */ extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); /* implemented */ extern NCURSES_EXPORT(void) wsyncup (WINDOW *); /* implemented */ extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); /* implemented */ extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); /* implemented */ extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */ /* * These are also declared in : */ extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */ extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* implemented */ extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* implemented */ extern NCURSES_EXPORT(int) putp (const char *); /* implemented */ #if NCURSES_TPARM_VARARGS extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */ #else extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */ extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */ #endif extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */ /* * X/Open says this returns a bool; SVr4 also checked for out-of-range line. * The macro provides compatibility: */ #define is_linetouched(w,l) ((!(w) || ((l) > getmaxy(w)) || ((l) < 0)) ? ERR : (is_linetouched)((w),(l))) /* * These functions are not in X/Open, but we use them in macro definitions: */ extern NCURSES_EXPORT(int) getattrs (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getcurx (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getcury (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getbegx (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getbegy (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getmaxx (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getmaxy (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getparx (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */ /* * vid_attr() was implemented originally based on a draft of X/Open curses. */ #if !NCURSES_WIDECHAR #define vid_attr(a,pair,opts) vidattr(a) #endif /* * These functions are extensions - not in X/Open Curses. */ #if 1 #undef NCURSES_EXT_FUNCS #define NCURSES_EXT_FUNCS 20180224 typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *); typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); extern NCURSES_EXPORT(bool) is_term_resized (int, int); extern NCURSES_EXPORT(char *) keybound (int, int); extern NCURSES_EXPORT(const char *) curses_version (void); extern NCURSES_EXPORT(int) alloc_pair (int, int); extern NCURSES_EXPORT(int) assume_default_colors (int, int); extern NCURSES_EXPORT(int) define_key (const char *, int); extern NCURSES_EXPORT(int) extended_color_content(int, int *, int *, int *); extern NCURSES_EXPORT(int) extended_pair_content(int, int *, int *); extern NCURSES_EXPORT(int) extended_slk_color(int); extern NCURSES_EXPORT(int) find_pair (int, int); extern NCURSES_EXPORT(int) free_pair (int); extern NCURSES_EXPORT(int) get_escdelay (void); extern NCURSES_EXPORT(int) init_extended_color(int, int, int, int); extern NCURSES_EXPORT(int) init_extended_pair(int, int, int); extern NCURSES_EXPORT(int) key_defined (const char *); extern NCURSES_EXPORT(int) keyok (int, bool); extern NCURSES_EXPORT(void) reset_color_pairs (void); extern NCURSES_EXPORT(int) resize_term (int, int); extern NCURSES_EXPORT(int) resizeterm (int, int); extern NCURSES_EXPORT(int) set_escdelay (int); extern NCURSES_EXPORT(int) set_tabsize (int); extern NCURSES_EXPORT(int) use_default_colors (void); extern NCURSES_EXPORT(int) use_extended_names (bool); extern NCURSES_EXPORT(int) use_legacy_coding (int); extern NCURSES_EXPORT(int) use_screen (SCREEN *, NCURSES_SCREEN_CB, void *); extern NCURSES_EXPORT(int) use_window (WINDOW *, NCURSES_WINDOW_CB, void *); extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); extern NCURSES_EXPORT(void) nofilter(void); /* * These extensions provide access to information stored in the WINDOW even * when NCURSES_OPAQUE is set: */ extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_pad (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *); /* generated */ extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) wgetdelay (const WINDOW *); /* generated */ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generated */ #else #define curses_version() NCURSES_VERSION #endif /* * Extra extension-functions, which pass a SCREEN pointer rather than using * a global variable SP. */ #if 1 #undef NCURSES_SP_FUNCS #define NCURSES_SP_FUNCS 20180224 #define NCURSES_SP_NAME(name) name##_sp /* Define the sp-funcs helper function */ #define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC) typedef int (*NCURSES_SP_OUTC)(SCREEN*, int); extern NCURSES_EXPORT(SCREEN *) new_prescr (void); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(baudrate) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(beep) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(can_change_color) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(cbreak) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(curs_set) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(color_content) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T*, NCURSES_COLOR_T*, NCURSES_COLOR_T*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_prog_mode) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_shell_mode) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(delay_output) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(doupdate) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(echo) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(endwin) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(char) NCURSES_SP_NAME(erasechar) (SCREEN*);/* implemented:SP_FUNC */ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(filter) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_il) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_color) (SCREEN*, NCURSES_COLOR_T, NCURSES_COLOR_T, NCURSES_COLOR_T, NCURSES_COLOR_T); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_pair) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T, NCURSES_COLOR_T); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(intrflush) (SCREEN*, WINDOW*, bool); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(isendwin) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(keyname) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(char) NCURSES_SP_NAME(killchar) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nonl) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(noqiflush) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noraw) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(pair_content) (SCREEN*, NCURSES_PAIRS_T, NCURSES_COLOR_T*, NCURSES_COLOR_T*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(qiflush) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(raw) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resetty) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int)); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(savetty) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_set) (SCREEN*, const char *); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attron) (SCREEN*, const chtype); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attrset) (SCREEN*, const chtype); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(slk_attr) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attr_set) (SCREEN*, const attr_t, NCURSES_PAIRS_T, void*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_clear) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_color) (SCREEN*, NCURSES_PAIRS_T); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_init) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(slk_label) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_noutrefresh) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_refresh) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_restore) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_set) (SCREEN*, int, const char *, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_touch) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(start_color) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(termattrs) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(termname) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(typeahead) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetch) (SCREEN*, int); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_env) (SCREEN*, bool); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_tioctl) (SCREEN*, bool); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented:SP_FUNC */ #if 1 extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(alloc_pair) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_color_content) (SCREEN*, int, int *, int *, int *); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_pair_content) (SCREEN*, int, int *, int *); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(extended_slk_color) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(find_pair) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(free_pair) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_extended_color) (SCREEN*, int, int, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_extended_pair) (SCREEN*, int, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined) (SCREEN*, const char *); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */ /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(void) NCURSES_SP_NAME(reset_color_pairs) (SCREEN*); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_tabsize) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_default_colors) (SCREEN*); /* implemented:EXT_SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /* implemented:EXT_SP_FUNC */ #endif #else #undef NCURSES_SP_FUNCS #define NCURSES_SP_FUNCS 0 #define NCURSES_SP_NAME(name) name #define NCURSES_SP_OUTC NCURSES_OUTC #endif /* attributes */ #define NCURSES_ATTR_SHIFT 8 #define NCURSES_BITS(mask,shift) (NCURSES_CAST(chtype,(mask)) << ((shift) + NCURSES_ATTR_SHIFT)) #define A_NORMAL (1U - 1U) #define A_ATTRIBUTES NCURSES_BITS(~(1U - 1U),0) #define A_CHARTEXT (NCURSES_BITS(1U,0) - 1U) #define A_COLOR NCURSES_BITS(((1U) << 8) - 1U,0) #define A_STANDOUT NCURSES_BITS(1U,8) #define A_UNDERLINE NCURSES_BITS(1U,9) #define A_REVERSE NCURSES_BITS(1U,10) #define A_BLINK NCURSES_BITS(1U,11) #define A_DIM NCURSES_BITS(1U,12) #define A_BOLD NCURSES_BITS(1U,13) #define A_ALTCHARSET NCURSES_BITS(1U,14) #define A_INVIS NCURSES_BITS(1U,15) #define A_PROTECT NCURSES_BITS(1U,16) #define A_HORIZONTAL NCURSES_BITS(1U,17) #define A_LEFT NCURSES_BITS(1U,18) #define A_LOW NCURSES_BITS(1U,19) #define A_RIGHT NCURSES_BITS(1U,20) #define A_TOP NCURSES_BITS(1U,21) #define A_VERTICAL NCURSES_BITS(1U,22) #if 1 #define A_ITALIC NCURSES_BITS(1U,23) /* ncurses extension */ #endif /* * Most of the pseudo functions are macros that either provide compatibility * with older versions of curses, or provide inline functionality to improve * performance. */ /* * These pseudo functions are always implemented as macros: */ #define getyx(win,y,x) (y = getcury(win), x = getcurx(win)) #define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win)) #define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win)) #define getparyx(win,y,x) (y = getpary(win), x = getparx(win)) #define getsyx(y,x) do { if (newscr) { \ if (is_leaveok(newscr)) \ (y) = (x) = -1; \ else \ getyx(newscr,(y), (x)); \ } \ } while(0) #define setsyx(y,x) do { if (newscr) { \ if ((y) == -1 && (x) == -1) \ leaveok(newscr, TRUE); \ else { \ leaveok(newscr, FALSE); \ wmove(newscr, (y), (x)); \ } \ } \ } while(0) #ifndef NCURSES_NOMACROS /* * These miscellaneous pseudo functions are provided for compatibility: */ #define wgetstr(w, s) wgetnstr(w, s, -1) #define getnstr(s, n) wgetnstr(stdscr, s, (n)) #define setterm(term) setupterm(term, 1, (int *)0) #define fixterm() reset_prog_mode() #define resetterm() reset_shell_mode() #define saveterm() def_prog_mode() #define crmode() cbreak() #define nocrmode() nocbreak() #define gettmode() /* It seems older SYSV curses versions define these */ #if !NCURSES_OPAQUE #define getattrs(win) NCURSES_CAST(int, NCURSES_OK_ADDR(win) ? (win)->_attrs : A_NORMAL) #define getcurx(win) (NCURSES_OK_ADDR(win) ? (win)->_curx : ERR) #define getcury(win) (NCURSES_OK_ADDR(win) ? (win)->_cury : ERR) #define getbegx(win) (NCURSES_OK_ADDR(win) ? (win)->_begx : ERR) #define getbegy(win) (NCURSES_OK_ADDR(win) ? (win)->_begy : ERR) #define getmaxx(win) (NCURSES_OK_ADDR(win) ? ((win)->_maxx + 1) : ERR) #define getmaxy(win) (NCURSES_OK_ADDR(win) ? ((win)->_maxy + 1) : ERR) #define getparx(win) (NCURSES_OK_ADDR(win) ? (win)->_parx : ERR) #define getpary(win) (NCURSES_OK_ADDR(win) ? (win)->_pary : ERR) #endif /* NCURSES_OPAQUE */ #define wstandout(win) (wattrset(win,A_STANDOUT)) #define wstandend(win) (wattrset(win,A_NORMAL)) #define wattron(win,at) wattr_on(win, NCURSES_CAST(attr_t, at), NULL) #define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL) #if !NCURSES_OPAQUE #if NCURSES_WATTR_MACROS #if NCURSES_WIDECHAR && 1 #define wattrset(win,at) \ (NCURSES_OK_ADDR(win) \ ? ((win)->_color = NCURSES_CAST(int, PAIR_NUMBER(at)), \ (win)->_attrs = NCURSES_CAST(attr_t, at), \ OK) \ : ERR) #else #define wattrset(win,at) \ (NCURSES_OK_ADDR(win) \ ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \ OK) \ : ERR) #endif #endif /* NCURSES_WATTR_MACROS */ #endif /* NCURSES_OPAQUE */ #define scroll(win) wscrl(win,1) #define touchwin(win) wtouchln((win), 0, getmaxy(win), 1) #define touchline(win, s, c) wtouchln((win), s, c, 1) #define untouchwin(win) wtouchln((win), 0, getmaxy(win), 0) #define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0) #define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br) #define hline(ch, n) whline(stdscr, ch, (n)) #define vline(ch, n) wvline(stdscr, ch, (n)) #define winstr(w, s) winnstr(w, s, -1) #define winchstr(w, s) winchnstr(w, s, -1) #define winsstr(w, s) winsnstr(w, s, -1) #if !NCURSES_OPAQUE #define redrawwin(win) wredrawln(win, 0, (NCURSES_OK_ADDR(win) ? (win)->_maxy+1 : -1)) #endif /* NCURSES_OPAQUE */ #define waddstr(win,str) waddnstr(win,str,-1) #define waddchstr(win,str) waddchnstr(win,str,-1) /* * These apply to the first 256 color pairs. */ #define COLOR_PAIR(n) (NCURSES_BITS((n), 0) & A_COLOR) #define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,(a)) & A_COLOR) >> NCURSES_ATTR_SHIFT))) /* * pseudo functions for standard screen */ #define addch(ch) waddch(stdscr,(ch)) #define addchnstr(str,n) waddchnstr(stdscr,(str),(n)) #define addchstr(str) waddchstr(stdscr,(str)) #define addnstr(str,n) waddnstr(stdscr,(str),(n)) #define addstr(str) waddnstr(stdscr,(str),-1) #define attr_get(ap,cp,o) wattr_get(stdscr,(ap),(cp),(o)) #define attr_off(a,o) wattr_off(stdscr,(a),(o)) #define attr_on(a,o) wattr_on(stdscr,(a),(o)) #define attr_set(a,c,o) wattr_set(stdscr,(a),(c),(o)) #define attroff(at) wattroff(stdscr,(at)) #define attron(at) wattron(stdscr,(at)) #define attrset(at) wattrset(stdscr,(at)) #define bkgd(ch) wbkgd(stdscr,(ch)) #define bkgdset(ch) wbkgdset(stdscr,(ch)) #define chgat(n,a,c,o) wchgat(stdscr,(n),(a),(c),(o)) #define clear() wclear(stdscr) #define clrtobot() wclrtobot(stdscr) #define clrtoeol() wclrtoeol(stdscr) #define color_set(c,o) wcolor_set(stdscr,(c),(o)) #define delch() wdelch(stdscr) #define deleteln() winsdelln(stdscr,-1) #define echochar(c) wechochar(stdscr,(c)) #define erase() werase(stdscr) #define getch() wgetch(stdscr) #define getstr(str) wgetstr(stdscr,(str)) #define inch() winch(stdscr) #define inchnstr(s,n) winchnstr(stdscr,(s),(n)) #define inchstr(s) winchstr(stdscr,(s)) #define innstr(s,n) winnstr(stdscr,(s),(n)) #define insch(c) winsch(stdscr,(c)) #define insdelln(n) winsdelln(stdscr,(n)) #define insertln() winsdelln(stdscr,1) #define insnstr(s,n) winsnstr(stdscr,(s),(n)) #define insstr(s) winsstr(stdscr,(s)) #define instr(s) winstr(stdscr,(s)) #define move(y,x) wmove(stdscr,(y),(x)) #define refresh() wrefresh(stdscr) #define scrl(n) wscrl(stdscr,(n)) #define setscrreg(t,b) wsetscrreg(stdscr,(t),(b)) #define standend() wstandend(stdscr) #define standout() wstandout(stdscr) #define timeout(delay) wtimeout(stdscr,(delay)) #define wdeleteln(win) winsdelln(win,-1) #define winsertln(win) winsdelln(win,1) /* * mv functions */ #define mvwaddch(win,y,x,ch) (wmove((win),(y),(x)) == ERR ? ERR : waddch((win),(ch))) #define mvwaddchnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),(n))) #define mvwaddchstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddchnstr((win),(str),-1)) #define mvwaddnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),(n))) #define mvwaddstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : waddnstr((win),(str),-1)) #define mvwchgat(win,y,x,n,a,c,o) (wmove((win),(y),(x)) == ERR ? ERR : wchgat((win),(n),(a),(c),(o))) #define mvwdelch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wdelch(win)) #define mvwgetch(win,y,x) (wmove((win),(y),(x)) == ERR ? ERR : wgetch(win)) #define mvwgetnstr(win,y,x,str,n) (wmove((win),(y),(x)) == ERR ? ERR : wgetnstr((win),(str),(n))) #define mvwgetstr(win,y,x,str) (wmove((win),(y),(x)) == ERR ? ERR : wgetstr((win),(str))) #define mvwhline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : whline((win),(c),(n))) #define mvwinch(win,y,x) (wmove((win),(y),(x)) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win)) #define mvwinchnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winchnstr((win),(s),(n))) #define mvwinchstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winchstr((win),(s))) #define mvwinnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winnstr((win),(s),(n))) #define mvwinsch(win,y,x,c) (wmove((win),(y),(x)) == ERR ? ERR : winsch((win),(c))) #define mvwinsnstr(win,y,x,s,n) (wmove((win),(y),(x)) == ERR ? ERR : winsnstr((win),(s),(n))) #define mvwinsstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winsstr((win),(s))) #define mvwinstr(win,y,x,s) (wmove((win),(y),(x)) == ERR ? ERR : winstr((win),(s))) #define mvwvline(win,y,x,c,n) (wmove((win),(y),(x)) == ERR ? ERR : wvline((win),(c),(n))) #define mvaddch(y,x,ch) mvwaddch(stdscr,(y),(x),(ch)) #define mvaddchnstr(y,x,str,n) mvwaddchnstr(stdscr,(y),(x),(str),(n)) #define mvaddchstr(y,x,str) mvwaddchstr(stdscr,(y),(x),(str)) #define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,(y),(x),(str),(n)) #define mvaddstr(y,x,str) mvwaddstr(stdscr,(y),(x),(str)) #define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,(y),(x),(n),(a),(c),(o)) #define mvdelch(y,x) mvwdelch(stdscr,(y),(x)) #define mvgetch(y,x) mvwgetch(stdscr,(y),(x)) #define mvgetnstr(y,x,str,n) mvwgetnstr(stdscr,(y),(x),(str),(n)) #define mvgetstr(y,x,str) mvwgetstr(stdscr,(y),(x),(str)) #define mvhline(y,x,c,n) mvwhline(stdscr,(y),(x),(c),(n)) #define mvinch(y,x) mvwinch(stdscr,(y),(x)) #define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,(y),(x),(s),(n)) #define mvinchstr(y,x,s) mvwinchstr(stdscr,(y),(x),(s)) #define mvinnstr(y,x,s,n) mvwinnstr(stdscr,(y),(x),(s),(n)) #define mvinsch(y,x,c) mvwinsch(stdscr,(y),(x),(c)) #define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,(y),(x),(s),(n)) #define mvinsstr(y,x,s) mvwinsstr(stdscr,(y),(x),(s)) #define mvinstr(y,x,s) mvwinstr(stdscr,(y),(x),(s)) #define mvvline(y,x,c,n) mvwvline(stdscr,(y),(x),(c),(n)) /* * Some wide-character functions can be implemented without the extensions. */ #if !NCURSES_OPAQUE #define getbkgd(win) (NCURSES_OK_ADDR(win) ? ((win)->_bkgd) : 0) #endif /* NCURSES_OPAQUE */ #define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a)) #define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a)) #if !NCURSES_OPAQUE #if NCURSES_WATTR_MACROS #if NCURSES_WIDECHAR && 1 #define wattr_set(win,a,p,opts) \ (NCURSES_OK_ADDR(win) \ ? ((void)((win)->_attrs = ((a) & ~A_COLOR), \ (win)->_color = (opts) ? *(int *)(opts) : (p)), \ OK) \ : ERR) #define wattr_get(win,a,p,opts) \ (NCURSES_OK_ADDR(win) \ ? ((void)(NCURSES_OK_ADDR(a) \ ? (*(a) = (win)->_attrs) \ : OK), \ (void)(NCURSES_OK_ADDR(p) \ ? (*(p) = (NCURSES_PAIRS_T) (win)->_color) \ : OK), \ (void)(NCURSES_OK_ADDR(opts) \ ? (*(int *)(opts) = (win)->_color) \ : OK), \ OK) \ : ERR) #else /* !(NCURSES_WIDECHAR && NCURSES_EXE_COLORS) */ #define wattr_set(win,a,p,opts) \ (NCURSES_OK_ADDR(win) \ ? ((void)((win)->_attrs = (((a) & ~A_COLOR) | \ (attr_t)COLOR_PAIR(p))), \ OK) \ : ERR) #define wattr_get(win,a,p,opts) \ (NCURSES_OK_ADDR(win) \ ? ((void)(NCURSES_OK_ADDR(a) \ ? (*(a) = (win)->_attrs) \ : OK), \ (void)(NCURSES_OK_ADDR(p) \ ? (*(p) = (NCURSES_PAIRS_T) PAIR_NUMBER((win)->_attrs)) \ : OK), \ OK) \ : ERR) #endif /* (NCURSES_WIDECHAR && NCURSES_EXE_COLORS) */ #endif /* NCURSES_WATTR_MACROS */ #endif /* NCURSES_OPAQUE */ /* * X/Open curses deprecates SVr4 vwprintw/vwscanw, which are supposed to use * varargs.h. It adds new calls vw_printw/vw_scanw, which are supposed to * use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already * use stdarg.h, so... */ #define vw_printw vwprintw #define vw_scanw vwscanw /* * Export fallback function for use in C++ binding. */ #if !1 #define vsscanf(a,b,c) _nc_vsscanf(a,b,c) NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list); #endif /* * These macros are extensions - not in X/Open Curses. */ #if 1 #if !NCURSES_OPAQUE #define is_cleared(win) (NCURSES_OK_ADDR(win) ? (win)->_clear : FALSE) #define is_idcok(win) (NCURSES_OK_ADDR(win) ? (win)->_idcok : FALSE) #define is_idlok(win) (NCURSES_OK_ADDR(win) ? (win)->_idlok : FALSE) #define is_immedok(win) (NCURSES_OK_ADDR(win) ? (win)->_immed : FALSE) #define is_keypad(win) (NCURSES_OK_ADDR(win) ? (win)->_use_keypad : FALSE) #define is_leaveok(win) (NCURSES_OK_ADDR(win) ? (win)->_leaveok : FALSE) #define is_nodelay(win) (NCURSES_OK_ADDR(win) ? ((win)->_delay == 0) : FALSE) #define is_notimeout(win) (NCURSES_OK_ADDR(win) ? (win)->_notimeout : FALSE) #define is_pad(win) (NCURSES_OK_ADDR(win) ? ((win)->_flags & _ISPAD) != 0 : FALSE) #define is_scrollok(win) (NCURSES_OK_ADDR(win) ? (win)->_scroll : FALSE) #define is_subwin(win) (NCURSES_OK_ADDR(win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE) #define is_syncok(win) (NCURSES_OK_ADDR(win) ? (win)->_sync : FALSE) #define wgetdelay(win) (NCURSES_OK_ADDR(win) ? (win)->_delay : 0) #define wgetparent(win) (NCURSES_OK_ADDR(win) ? (win)->_parent : 0) #define wgetscrreg(win,t,b) (NCURSES_OK_ADDR(win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR) #endif #endif #endif /* NCURSES_NOMACROS */ /* * Public variables. * * Notes: * a. ESCDELAY was an undocumented feature under AIX curses. * It gives the ESC expire time in milliseconds. * b. ttytype is needed for backward compatibility */ #if NCURSES_REENTRANT NCURSES_WRAPPED_VAR(WINDOW *, curscr); NCURSES_WRAPPED_VAR(WINDOW *, newscr); NCURSES_WRAPPED_VAR(WINDOW *, stdscr); NCURSES_WRAPPED_VAR(char *, ttytype); NCURSES_WRAPPED_VAR(int, COLORS); NCURSES_WRAPPED_VAR(int, COLOR_PAIRS); NCURSES_WRAPPED_VAR(int, COLS); NCURSES_WRAPPED_VAR(int, ESCDELAY); NCURSES_WRAPPED_VAR(int, LINES); NCURSES_WRAPPED_VAR(int, TABSIZE); #define curscr NCURSES_PUBLIC_VAR(curscr()) #define newscr NCURSES_PUBLIC_VAR(newscr()) #define stdscr NCURSES_PUBLIC_VAR(stdscr()) #define ttytype NCURSES_PUBLIC_VAR(ttytype()) #define COLORS NCURSES_PUBLIC_VAR(COLORS()) #define COLOR_PAIRS NCURSES_PUBLIC_VAR(COLOR_PAIRS()) #define COLS NCURSES_PUBLIC_VAR(COLS()) #define ESCDELAY NCURSES_PUBLIC_VAR(ESCDELAY()) #define LINES NCURSES_PUBLIC_VAR(LINES()) #define TABSIZE NCURSES_PUBLIC_VAR(TABSIZE()) #else extern NCURSES_EXPORT_VAR(WINDOW *) curscr; extern NCURSES_EXPORT_VAR(WINDOW *) newscr; extern NCURSES_EXPORT_VAR(WINDOW *) stdscr; extern NCURSES_EXPORT_VAR(char) ttytype[]; extern NCURSES_EXPORT_VAR(int) COLORS; extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS; extern NCURSES_EXPORT_VAR(int) COLS; extern NCURSES_EXPORT_VAR(int) ESCDELAY; extern NCURSES_EXPORT_VAR(int) LINES; extern NCURSES_EXPORT_VAR(int) TABSIZE; #endif /* * Pseudo-character tokens outside ASCII range. The curses wgetch() function * will return any given one of these only if the corresponding k- capability * is defined in your terminal's terminfo entry. * * Some keys (KEY_A1, etc) are arranged like this: * a1 up a3 * left b2 right * c1 down c3 * * A few key codes do not depend upon the terminfo entry. */ #define KEY_CODE_YES 0400 /* A wchar_t contains a key code */ #define KEY_MIN 0401 /* Minimum curses key */ #define KEY_BREAK 0401 /* Break key (unreliable) */ #define KEY_SRESET 0530 /* Soft (partial) reset (unreliable) */ #define KEY_RESET 0531 /* Reset or hard reset (unreliable) */ /* * These definitions were generated by ./MKkey_defs.sh ./Caps */ #define KEY_DOWN 0402 /* down-arrow key */ #define KEY_UP 0403 /* up-arrow key */ #define KEY_LEFT 0404 /* left-arrow key */ #define KEY_RIGHT 0405 /* right-arrow key */ #define KEY_HOME 0406 /* home key */ #define KEY_BACKSPACE 0407 /* backspace key */ #define KEY_F0 0410 /* Function keys. Space for 64 */ #define KEY_F(n) (KEY_F0+(n)) /* Value of function key n */ #define KEY_DL 0510 /* delete-line key */ #define KEY_IL 0511 /* insert-line key */ #define KEY_DC 0512 /* delete-character key */ #define KEY_IC 0513 /* insert-character key */ #define KEY_EIC 0514 /* sent by rmir or smir in insert mode */ #define KEY_CLEAR 0515 /* clear-screen or erase key */ #define KEY_EOS 0516 /* clear-to-end-of-screen key */ #define KEY_EOL 0517 /* clear-to-end-of-line key */ #define KEY_SF 0520 /* scroll-forward key */ #define KEY_SR 0521 /* scroll-backward key */ #define KEY_NPAGE 0522 /* next-page key */ #define KEY_PPAGE 0523 /* previous-page key */ #define KEY_STAB 0524 /* set-tab key */ #define KEY_CTAB 0525 /* clear-tab key */ #define KEY_CATAB 0526 /* clear-all-tabs key */ #define KEY_ENTER 0527 /* enter/send key */ #define KEY_PRINT 0532 /* print key */ #define KEY_LL 0533 /* lower-left key (home down) */ #define KEY_A1 0534 /* upper left of keypad */ #define KEY_A3 0535 /* upper right of keypad */ #define KEY_B2 0536 /* center of keypad */ #define KEY_C1 0537 /* lower left of keypad */ #define KEY_C3 0540 /* lower right of keypad */ #define KEY_BTAB 0541 /* back-tab key */ #define KEY_BEG 0542 /* begin key */ #define KEY_CANCEL 0543 /* cancel key */ #define KEY_CLOSE 0544 /* close key */ #define KEY_COMMAND 0545 /* command key */ #define KEY_COPY 0546 /* copy key */ #define KEY_CREATE 0547 /* create key */ #define KEY_END 0550 /* end key */ #define KEY_EXIT 0551 /* exit key */ #define KEY_FIND 0552 /* find key */ #define KEY_HELP 0553 /* help key */ #define KEY_MARK 0554 /* mark key */ #define KEY_MESSAGE 0555 /* message key */ #define KEY_MOVE 0556 /* move key */ #define KEY_NEXT 0557 /* next key */ #define KEY_OPEN 0560 /* open key */ #define KEY_OPTIONS 0561 /* options key */ #define KEY_PREVIOUS 0562 /* previous key */ #define KEY_REDO 0563 /* redo key */ #define KEY_REFERENCE 0564 /* reference key */ #define KEY_REFRESH 0565 /* refresh key */ #define KEY_REPLACE 0566 /* replace key */ #define KEY_RESTART 0567 /* restart key */ #define KEY_RESUME 0570 /* resume key */ #define KEY_SAVE 0571 /* save key */ #define KEY_SBEG 0572 /* shifted begin key */ #define KEY_SCANCEL 0573 /* shifted cancel key */ #define KEY_SCOMMAND 0574 /* shifted command key */ #define KEY_SCOPY 0575 /* shifted copy key */ #define KEY_SCREATE 0576 /* shifted create key */ #define KEY_SDC 0577 /* shifted delete-character key */ #define KEY_SDL 0600 /* shifted delete-line key */ #define KEY_SELECT 0601 /* select key */ #define KEY_SEND 0602 /* shifted end key */ #define KEY_SEOL 0603 /* shifted clear-to-end-of-line key */ #define KEY_SEXIT 0604 /* shifted exit key */ #define KEY_SFIND 0605 /* shifted find key */ #define KEY_SHELP 0606 /* shifted help key */ #define KEY_SHOME 0607 /* shifted home key */ #define KEY_SIC 0610 /* shifted insert-character key */ #define KEY_SLEFT 0611 /* shifted left-arrow key */ #define KEY_SMESSAGE 0612 /* shifted message key */ #define KEY_SMOVE 0613 /* shifted move key */ #define KEY_SNEXT 0614 /* shifted next key */ #define KEY_SOPTIONS 0615 /* shifted options key */ #define KEY_SPREVIOUS 0616 /* shifted previous key */ #define KEY_SPRINT 0617 /* shifted print key */ #define KEY_SREDO 0620 /* shifted redo key */ #define KEY_SREPLACE 0621 /* shifted replace key */ #define KEY_SRIGHT 0622 /* shifted right-arrow key */ #define KEY_SRSUME 0623 /* shifted resume key */ #define KEY_SSAVE 0624 /* shifted save key */ #define KEY_SSUSPEND 0625 /* shifted suspend key */ #define KEY_SUNDO 0626 /* shifted undo key */ #define KEY_SUSPEND 0627 /* suspend key */ #define KEY_UNDO 0630 /* undo key */ #define KEY_MOUSE 0631 /* Mouse event has occurred */ #define KEY_RESIZE 0632 /* Terminal resize event */ #define KEY_EVENT 0633 /* We were interrupted by an event */ #define KEY_MAX 0777 /* Maximum key value is 0633 */ /* $Id: curses.wide,v 1.50 2017/03/26 16:05:21 tom Exp $ */ /* * vile:cmode: * This file is part of ncurses, designed to be appended after curses.h.in * (see that file for the relevant copyright). */ #define _XOPEN_CURSES 1 #if NCURSES_WIDECHAR extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs; #define NCURSES_WACS(c) (&_nc_wacs[NCURSES_CAST(unsigned char,(c))]) #define WACS_BSSB NCURSES_WACS('l') #define WACS_SSBB NCURSES_WACS('m') #define WACS_BBSS NCURSES_WACS('k') #define WACS_SBBS NCURSES_WACS('j') #define WACS_SBSS NCURSES_WACS('u') #define WACS_SSSB NCURSES_WACS('t') #define WACS_SSBS NCURSES_WACS('v') #define WACS_BSSS NCURSES_WACS('w') #define WACS_BSBS NCURSES_WACS('q') #define WACS_SBSB NCURSES_WACS('x') #define WACS_SSSS NCURSES_WACS('n') #define WACS_ULCORNER WACS_BSSB #define WACS_LLCORNER WACS_SSBB #define WACS_URCORNER WACS_BBSS #define WACS_LRCORNER WACS_SBBS #define WACS_RTEE WACS_SBSS #define WACS_LTEE WACS_SSSB #define WACS_BTEE WACS_SSBS #define WACS_TTEE WACS_BSSS #define WACS_HLINE WACS_BSBS #define WACS_VLINE WACS_SBSB #define WACS_PLUS WACS_SSSS #define WACS_S1 NCURSES_WACS('o') /* scan line 1 */ #define WACS_S9 NCURSES_WACS('s') /* scan line 9 */ #define WACS_DIAMOND NCURSES_WACS('`') /* diamond */ #define WACS_CKBOARD NCURSES_WACS('a') /* checker board */ #define WACS_DEGREE NCURSES_WACS('f') /* degree symbol */ #define WACS_PLMINUS NCURSES_WACS('g') /* plus/minus */ #define WACS_BULLET NCURSES_WACS('~') /* bullet */ /* Teletype 5410v1 symbols */ #define WACS_LARROW NCURSES_WACS(',') /* arrow left */ #define WACS_RARROW NCURSES_WACS('+') /* arrow right */ #define WACS_DARROW NCURSES_WACS('.') /* arrow down */ #define WACS_UARROW NCURSES_WACS('-') /* arrow up */ #define WACS_BOARD NCURSES_WACS('h') /* board of squares */ #define WACS_LANTERN NCURSES_WACS('i') /* lantern symbol */ #define WACS_BLOCK NCURSES_WACS('0') /* solid square block */ /* ncurses extensions */ #define WACS_S3 NCURSES_WACS('p') /* scan line 3 */ #define WACS_S7 NCURSES_WACS('r') /* scan line 7 */ #define WACS_LEQUAL NCURSES_WACS('y') /* less/equal */ #define WACS_GEQUAL NCURSES_WACS('z') /* greater/equal */ #define WACS_PI NCURSES_WACS('{') /* Pi */ #define WACS_NEQUAL NCURSES_WACS('|') /* not equal */ #define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */ /* double lines */ #define WACS_BDDB NCURSES_WACS('C') #define WACS_DDBB NCURSES_WACS('D') #define WACS_BBDD NCURSES_WACS('B') #define WACS_DBBD NCURSES_WACS('A') #define WACS_DBDD NCURSES_WACS('G') #define WACS_DDDB NCURSES_WACS('F') #define WACS_DDBD NCURSES_WACS('H') #define WACS_BDDD NCURSES_WACS('I') #define WACS_BDBD NCURSES_WACS('R') #define WACS_DBDB NCURSES_WACS('Y') #define WACS_DDDD NCURSES_WACS('E') #define WACS_D_ULCORNER WACS_BDDB #define WACS_D_LLCORNER WACS_DDBB #define WACS_D_URCORNER WACS_BBDD #define WACS_D_LRCORNER WACS_DBBD #define WACS_D_RTEE WACS_DBDD #define WACS_D_LTEE WACS_DDDB #define WACS_D_BTEE WACS_DDBD #define WACS_D_TTEE WACS_BDDD #define WACS_D_HLINE WACS_BDBD #define WACS_D_VLINE WACS_DBDB #define WACS_D_PLUS WACS_DDDD /* thick lines */ #define WACS_BTTB NCURSES_WACS('L') #define WACS_TTBB NCURSES_WACS('M') #define WACS_BBTT NCURSES_WACS('K') #define WACS_TBBT NCURSES_WACS('J') #define WACS_TBTT NCURSES_WACS('U') #define WACS_TTTB NCURSES_WACS('T') #define WACS_TTBT NCURSES_WACS('V') #define WACS_BTTT NCURSES_WACS('W') #define WACS_BTBT NCURSES_WACS('Q') #define WACS_TBTB NCURSES_WACS('X') #define WACS_TTTT NCURSES_WACS('N') #define WACS_T_ULCORNER WACS_BTTB #define WACS_T_LLCORNER WACS_TTBB #define WACS_T_URCORNER WACS_BBTT #define WACS_T_LRCORNER WACS_TBBT #define WACS_T_RTEE WACS_TBTT #define WACS_T_LTEE WACS_TTTB #define WACS_T_BTEE WACS_TTBT #define WACS_T_TTEE WACS_BTTT #define WACS_T_HLINE WACS_BTBT #define WACS_T_VLINE WACS_TBTB #define WACS_T_PLUS WACS_TTTT /* * Function prototypes for wide-character operations. * * "generated" comments should include ":WIDEC" to make the corresponding * functions ifdef'd in lib_gen.c * * "implemented" comments do not need this marker. */ extern NCURSES_EXPORT(int) add_wch (const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) add_wchnstr (const cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) add_wchstr (const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) addnwstr (const wchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) addwstr (const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) bkgrnd (const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* generated:WIDEC */ extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) erasewchar (wchar_t*); /* implemented */ extern NCURSES_EXPORT(int) get_wch (wint_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) get_wstr (wint_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, NCURSES_PAIRS_T*, void*); /* implemented */ extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) in_wch (cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) in_wchstr (cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) innwstr (wchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) ins_wch (const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) inwstr (wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t); /* implemented */ extern NCURSES_EXPORT(int) killwchar (wchar_t *); /* implemented */ extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int);/* generated:WIDEC */ extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvaddnwstr (int, int, const wchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvaddwstr (int, int, const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvins_wstr (int, int, const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvinwstr (int, int, wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvvline_set (int, int, const cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwadd_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwadd_wchnstr (WINDOW *, int, int, const cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwadd_wchstr (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwaddnwstr (WINDOW *, int, int, const wchar_t *, int);/* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwaddwstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int);/* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int);/* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, NCURSES_PAIRS_T, const void *); /* implemented */ extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented */ extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */ extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */ extern NCURSES_EXPORT(int) vid_attr (attr_t, NCURSES_PAIRS_T, void *); /* implemented */ extern NCURSES_EXPORT(int) vid_puts (attr_t, NCURSES_PAIRS_T, void *, NCURSES_OUTC); /* implemented */ extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); /* generated:WIDEC */ extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); /* implemented */ extern NCURSES_EXPORT(int) wadd_wchstr (WINDOW *,const cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) waddnwstr (WINDOW *,const wchar_t *,int); /* implemented */ extern NCURSES_EXPORT(int) waddwstr (WINDOW *,const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) wbkgrnd (WINDOW *,const cchar_t *); /* implemented */ extern NCURSES_EXPORT(void) wbkgrndset (WINDOW *,const cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* implemented */ extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); /* implemented */ extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *, wint_t *, int); /* implemented */ extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); /* implemented */ extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); /* implemented */ extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int); /* implemented */ extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int); /* implemented */ extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) wins_wstr (WINDOW *, const wchar_t *); /* generated:WIDEC */ extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); /* implemented */ extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); /* implemented */ extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */ #if NCURSES_SP_FUNCS extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *); /* implemented:SP_FUNC */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, NCURSES_PAIRS_T, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */ #endif #ifndef NCURSES_NOMACROS /* * XSI curses macros for XPG4 conformance. */ #define add_wch(c) wadd_wch(stdscr,(c)) #define add_wchnstr(str,n) wadd_wchnstr(stdscr,(str),(n)) #define add_wchstr(str) wadd_wchstr(stdscr,(str)) #define addnwstr(wstr,n) waddnwstr(stdscr,(wstr),(n)) #define addwstr(wstr) waddwstr(stdscr,(wstr)) #define bkgrnd(c) wbkgrnd(stdscr,(c)) #define bkgrndset(c) wbkgrndset(stdscr,(c)) #define border_set(l,r,t,b,tl,tr,bl,br) wborder_set(stdscr,(l),(r),(t),(b),tl,tr,bl,br) #define box_set(w,v,h) wborder_set((w),(v),(v),(h),(h),0,0,0,0) #define echo_wchar(c) wecho_wchar(stdscr,(c)) #define get_wch(c) wget_wch(stdscr,(c)) #define get_wstr(t) wget_wstr(stdscr,(t)) #define getbkgrnd(wch) wgetbkgrnd(stdscr,(wch)) #define getn_wstr(t,n) wgetn_wstr(stdscr,(t),(n)) #define hline_set(c,n) whline_set(stdscr,(c),(n)) #define in_wch(c) win_wch(stdscr,(c)) #define in_wchnstr(c,n) win_wchnstr(stdscr,(c),(n)) #define in_wchstr(c) win_wchstr(stdscr,(c)) #define innwstr(c,n) winnwstr(stdscr,(c),(n)) #define ins_nwstr(t,n) wins_nwstr(stdscr,(t),(n)) #define ins_wch(c) wins_wch(stdscr,(c)) #define ins_wstr(t) wins_wstr(stdscr,(t)) #define inwstr(c) winwstr(stdscr,(c)) #define vline_set(c,n) wvline_set(stdscr,(c),(n)) #define wadd_wchstr(win,str) wadd_wchnstr((win),(str),-1) #define waddwstr(win,wstr) waddnwstr((win),(wstr),-1) #define wget_wstr(w,t) wgetn_wstr((w),(t),-1) #define win_wchstr(w,c) win_wchnstr((w),(c),-1) #define wins_wstr(w,t) wins_nwstr((w),(t),-1) #if !NCURSES_OPAQUE #define wgetbkgrnd(win,wch) (NCURSES_OK_ADDR(wch) ? ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK) : ERR) #endif #define mvadd_wch(y,x,c) mvwadd_wch(stdscr,(y),(x),(c)) #define mvadd_wchnstr(y,x,s,n) mvwadd_wchnstr(stdscr,(y),(x),(s),(n)) #define mvadd_wchstr(y,x,s) mvwadd_wchstr(stdscr,(y),(x),(s)) #define mvaddnwstr(y,x,wstr,n) mvwaddnwstr(stdscr,(y),(x),(wstr),(n)) #define mvaddwstr(y,x,wstr) mvwaddwstr(stdscr,(y),(x),(wstr)) #define mvget_wch(y,x,c) mvwget_wch(stdscr,(y),(x),(c)) #define mvget_wstr(y,x,t) mvwget_wstr(stdscr,(y),(x),(t)) #define mvgetn_wstr(y,x,t,n) mvwgetn_wstr(stdscr,(y),(x),(t),(n)) #define mvhline_set(y,x,c,n) mvwhline_set(stdscr,(y),(x),(c),(n)) #define mvin_wch(y,x,c) mvwin_wch(stdscr,(y),(x),(c)) #define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,(y),(x),(c),(n)) #define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,(y),(x),(c)) #define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,(y),(x),(c),(n)) #define mvins_nwstr(y,x,t,n) mvwins_nwstr(stdscr,(y),(x),(t),(n)) #define mvins_wch(y,x,c) mvwins_wch(stdscr,(y),(x),(c)) #define mvins_wstr(y,x,t) mvwins_wstr(stdscr,(y),(x),(t)) #define mvinwstr(y,x,c) mvwinwstr(stdscr,(y),(x),(c)) #define mvvline_set(y,x,c,n) mvwvline_set(stdscr,(y),(x),(c),(n)) #define mvwadd_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wch((win),(c))) #define mvwadd_wchnstr(win,y,x,s,n) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchnstr((win),(s),(n))) #define mvwadd_wchstr(win,y,x,s) (wmove(win,(y),(x)) == ERR ? ERR : wadd_wchstr((win),(s))) #define mvwaddnwstr(win,y,x,wstr,n) (wmove(win,(y),(x)) == ERR ? ERR : waddnwstr((win),(wstr),(n))) #define mvwaddwstr(win,y,x,wstr) (wmove(win,(y),(x)) == ERR ? ERR : waddwstr((win),(wstr))) #define mvwget_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wget_wch((win),(c))) #define mvwget_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wget_wstr((win),(t))) #define mvwgetn_wstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wgetn_wstr((win),(t),(n))) #define mvwhline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : whline_set((win),(c),(n))) #define mvwin_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wch((win),(c))) #define mvwin_wchnstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : win_wchnstr((win),(c),(n))) #define mvwin_wchstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : win_wchstr((win),(c))) #define mvwinnwstr(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : winnwstr((win),(c),(n))) #define mvwins_nwstr(win,y,x,t,n) (wmove(win,(y),(x)) == ERR ? ERR : wins_nwstr((win),(t),(n))) #define mvwins_wch(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : wins_wch((win),(c))) #define mvwins_wstr(win,y,x,t) (wmove(win,(y),(x)) == ERR ? ERR : wins_wstr((win),(t))) #define mvwinwstr(win,y,x,c) (wmove(win,(y),(x)) == ERR ? ERR : winwstr((win),(c))) #define mvwvline_set(win,y,x,c,n) (wmove(win,(y),(x)) == ERR ? ERR : wvline_set((win),(c),(n))) #endif /* NCURSES_NOMACROS */ #if defined(TRACE) || defined(NCURSES_TEST) extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *); extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *); #endif #endif /* NCURSES_WIDECHAR */ /* $Id: curses.tail,v 1.23 2016/02/13 16:37:45 tom Exp $ */ /* * vile:cmode: * This file is part of ncurses, designed to be appended after curses.h.in * (see that file for the relevant copyright). */ /* mouse interface */ #if NCURSES_MOUSE_VERSION > 1 #define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 5)) #else #define NCURSES_MOUSE_MASK(b,m) ((m) << (((b) - 1) * 6)) #endif #define NCURSES_BUTTON_RELEASED 001L #define NCURSES_BUTTON_PRESSED 002L #define NCURSES_BUTTON_CLICKED 004L #define NCURSES_DOUBLE_CLICKED 010L #define NCURSES_TRIPLE_CLICKED 020L #define NCURSES_RESERVED_EVENT 040L /* event masks */ #define BUTTON1_RELEASED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED) #define BUTTON1_PRESSED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED) #define BUTTON1_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_CLICKED) #define BUTTON1_DOUBLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED) #define BUTTON1_TRIPLE_CLICKED NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED) #define BUTTON2_RELEASED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_RELEASED) #define BUTTON2_PRESSED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED) #define BUTTON2_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_CLICKED) #define BUTTON2_DOUBLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_DOUBLE_CLICKED) #define BUTTON2_TRIPLE_CLICKED NCURSES_MOUSE_MASK(2, NCURSES_TRIPLE_CLICKED) #define BUTTON3_RELEASED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_RELEASED) #define BUTTON3_PRESSED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_PRESSED) #define BUTTON3_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_CLICKED) #define BUTTON3_DOUBLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_DOUBLE_CLICKED) #define BUTTON3_TRIPLE_CLICKED NCURSES_MOUSE_MASK(3, NCURSES_TRIPLE_CLICKED) #define BUTTON4_RELEASED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_RELEASED) #define BUTTON4_PRESSED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_PRESSED) #define BUTTON4_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_CLICKED) #define BUTTON4_DOUBLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_DOUBLE_CLICKED) #define BUTTON4_TRIPLE_CLICKED NCURSES_MOUSE_MASK(4, NCURSES_TRIPLE_CLICKED) /* * In 32 bits the version-1 scheme does not provide enough space for a 5th * button, unless we choose to change the ABI by omitting the reserved-events. */ #if NCURSES_MOUSE_VERSION > 1 #define BUTTON5_RELEASED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_RELEASED) #define BUTTON5_PRESSED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_PRESSED) #define BUTTON5_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_CLICKED) #define BUTTON5_DOUBLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_DOUBLE_CLICKED) #define BUTTON5_TRIPLE_CLICKED NCURSES_MOUSE_MASK(5, NCURSES_TRIPLE_CLICKED) #define BUTTON_CTRL NCURSES_MOUSE_MASK(6, 0001L) #define BUTTON_SHIFT NCURSES_MOUSE_MASK(6, 0002L) #define BUTTON_ALT NCURSES_MOUSE_MASK(6, 0004L) #define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(6, 0010L) #else #define BUTTON1_RESERVED_EVENT NCURSES_MOUSE_MASK(1, NCURSES_RESERVED_EVENT) #define BUTTON2_RESERVED_EVENT NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT) #define BUTTON3_RESERVED_EVENT NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT) #define BUTTON4_RESERVED_EVENT NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT) #define BUTTON_CTRL NCURSES_MOUSE_MASK(5, 0001L) #define BUTTON_SHIFT NCURSES_MOUSE_MASK(5, 0002L) #define BUTTON_ALT NCURSES_MOUSE_MASK(5, 0004L) #define REPORT_MOUSE_POSITION NCURSES_MOUSE_MASK(5, 0010L) #endif #define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1) /* macros to extract single event-bits from masks */ #define BUTTON_RELEASE(e, x) ((e) & NCURSES_MOUSE_MASK(x, 001)) #define BUTTON_PRESS(e, x) ((e) & NCURSES_MOUSE_MASK(x, 002)) #define BUTTON_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 004)) #define BUTTON_DOUBLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 010)) #define BUTTON_TRIPLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 020)) #define BUTTON_RESERVED_EVENT(e, x) ((e) & NCURSES_MOUSE_MASK(x, 040)) typedef struct { short id; /* ID to distinguish multiple devices */ int x, y, z; /* event coordinates (character-cell) */ mmask_t bstate; /* button state bits */ } MEVENT; extern NCURSES_EXPORT(bool) has_mouse(void); extern NCURSES_EXPORT(int) getmouse (MEVENT *); extern NCURSES_EXPORT(int) ungetmouse (MEVENT *); extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *); extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int); extern NCURSES_EXPORT(int) mouseinterval (int); extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool); extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */ #if NCURSES_SP_FUNCS extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_mouse) (SCREEN*); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *); extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mouseinterval) (SCREEN*, int); #endif #ifndef NCURSES_NOMACROS #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen) #endif /* other non-XSI functions */ extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */ extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */ #if NCURSES_SP_FUNCS extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int); /* do we have given key? */ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* direct data to printer */ #endif /* Debugging : use with libncurses_g.a */ extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2); extern NCURSES_EXPORT(char *) _traceattr (attr_t); extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype); extern NCURSES_EXPORT(char *) _tracechar (int); extern NCURSES_EXPORT(char *) _tracechtype (chtype); extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype); #if NCURSES_WIDECHAR #define _tracech_t _tracecchar_t extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *); #define _tracech_t2 _tracecchar_t2 extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *); #else #define _tracech_t _tracechtype #define _tracech_t2 _tracechtype2 #endif extern NCURSES_EXPORT(void) trace (const unsigned int); /* trace masks */ #define TRACE_DISABLE 0x0000 /* turn off tracing */ #define TRACE_TIMES 0x0001 /* trace user and system times of updates */ #define TRACE_TPUTS 0x0002 /* trace tputs calls */ #define TRACE_UPDATE 0x0004 /* trace update actions, old & new screens */ #define TRACE_MOVE 0x0008 /* trace cursor moves and scrolls */ #define TRACE_CHARPUT 0x0010 /* trace all character outputs */ #define TRACE_ORDINARY 0x001F /* trace all update actions */ #define TRACE_CALLS 0x0020 /* trace all curses calls */ #define TRACE_VIRTPUT 0x0040 /* trace virtual character puts */ #define TRACE_IEVENT 0x0080 /* trace low-level input processing */ #define TRACE_BITS 0x0100 /* trace state of TTY control bits */ #define TRACE_ICALLS 0x0200 /* trace internal/nested calls */ #define TRACE_CCALLS 0x0400 /* trace per-character calls */ #define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data */ #define TRACE_ATTRS 0x1000 /* trace attribute updates */ #define TRACE_SHIFT 13 /* number of bits in the trace masks */ #define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */ #if defined(TRACE) || defined(NCURSES_TEST) extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable optimizations */ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *); #define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */ #define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */ #define OPTIMIZE_SCROLL 0x04 /* scroll optimization */ #define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */ #endif #include #ifdef __cplusplus #ifndef NCURSES_NOMACROS /* these names conflict with STL */ #undef box #undef clear #undef erase #undef move #undef refresh #endif /* NCURSES_NOMACROS */ } #endif #endif /* __NCURSES_H */ PKZ6mRJ J finclude/math-vector-fortran.hnu[! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- ! Copyright (C) 2019 Free Software Foundation, Inc. ! This file is part of the GNU C Library. ! ! The GNU C Library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Lesser General Public ! License as published by the Free Software Foundation; either ! version 2.1 of the License, or (at your option) any later version. ! ! The GNU C Library is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Lesser General Public License for more details. ! ! You should have received a copy of the GNU Lesser General Public ! License along with the GNU C Library; if not, see ! . !GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (log) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64') !GCC$ builtin (cos) attributes simd (notinbranch) if('x32') !GCC$ builtin (cosf) attributes simd (notinbranch) if('x32') !GCC$ builtin (sin) attributes simd (notinbranch) if('x32') !GCC$ builtin (sinf) attributes simd (notinbranch) if('x32') !GCC$ builtin (sincos) attributes simd (notinbranch) if('x32') !GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32') !GCC$ builtin (log) attributes simd (notinbranch) if('x32') !GCC$ builtin (logf) attributes simd (notinbranch) if('x32') !GCC$ builtin (exp) attributes simd (notinbranch) if('x32') !GCC$ builtin (expf) attributes simd (notinbranch) if('x32') !GCC$ builtin (pow) attributes simd (notinbranch) if('x32') !GCC$ builtin (powf) attributes simd (notinbranch) if('x32') PKZdwctype.hnu[/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.25 * Wide character classification and mapping utilities */ #ifndef _WCTYPE_H #define _WCTYPE_H 1 #include #include #include /* Constant expression of type `wint_t' whose value does not correspond to any member of the extended character set. */ #ifndef WEOF # define WEOF (0xffffffffu) #endif /* Some definitions from this header also appear in in Unix98 mode. */ #include /* * Extensible wide-character mapping functions: 7.15.3.2. */ __BEGIN_DECLS /* Scalar type that can hold values which represent locale-specific character mappings. */ typedef const __int32_t *wctrans_t; /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ extern wctrans_t wctrans (const char *__property) __THROW; /* Map the wide character WC using the mapping described by DESC. */ extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __THROW; # ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ # include /* Test for any wide character for which `iswalpha' or `iswdigit' is true. */ extern int iswalnum_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character for which `iswupper' or 'iswlower' is true, or any wide character that is one of a locale-specific set of wide-characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswalpha_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any control wide character. */ extern int iswcntrl_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character that corresponds to a decimal-digit character. */ extern int iswdigit_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character for which `iswprint' is true and `iswspace' is false. */ extern int iswgraph_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character that corresponds to a lowercase letter or is one of a locale-specific set of wide characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswlower_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any printing wide character. */ extern int iswprint_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any printing wide character that is one of a locale-specific et of wide characters for which neither `iswspace' nor `iswalnum' is true. */ extern int iswpunct_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character that corresponds to a locale-specific set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ extern int iswspace_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswupper_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described in the previous subclause. */ extern int iswxdigit_l (wint_t __wc, locale_t __locale) __THROW; /* Test for any wide character that corresponds to a standard blank wide character or a locale-specific set of wide characters for which `iswalnum' is false. */ extern int iswblank_l (wint_t __wc, locale_t __locale) __THROW; /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ extern wctype_t wctype_l (const char *__property, locale_t __locale) __THROW; /* Determine whether the wide-character WC has the property described by DESC. */ extern int iswctype_l (wint_t __wc, wctype_t __desc, locale_t __locale) __THROW; /* * Wide-character case-mapping functions. */ /* Converts an uppercase letter to the corresponding lowercase letter. */ extern wint_t towlower_l (wint_t __wc, locale_t __locale) __THROW; /* Converts an lowercase letter to the corresponding uppercase letter. */ extern wint_t towupper_l (wint_t __wc, locale_t __locale) __THROW; /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ extern wctrans_t wctrans_l (const char *__property, locale_t __locale) __THROW; /* Map the wide character WC using the mapping described by DESC. */ extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, locale_t __locale) __THROW; # endif /* Use POSIX 2008. */ __END_DECLS #endif /* wctype.h */ PKZ{$pkevrpc.hnu[/* * Copyright (c) 2000-2007 Niels Provos * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef EVENT1_EVRPC_H_INCLUDED_ #define EVENT1_EVRPC_H_INCLUDED_ /** @file evrpc.h An RPC system for Libevent. The header is deprecated in Libevent 2.0 and later; please use instead. Depending on what functionality you need, you may also want to include more of the other headers. */ #include #include #include #include #endif /* EVENT1_EVRPC_H_INCLUDED_ */ PKZӯ pcap/bpf.hnu[/*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)bpf.h 7.1 (Berkeley) 5/7/91 */ /* * This is libpcap's cut-down version of bpf.h; it includes only * the stuff needed for the code generator and the userland BPF * interpreter, and the libpcap APIs for setting filters, etc.. * * "pcap-bpf.c" will include the native OS version, as it deals with * the OS's BPF implementation. * * At least two programs found by Google Code Search explicitly includes * (even though / includes it for you), * so moving that stuff to would break the build for some * programs. */ /* * If we've already included , don't re-define this stuff. * We assume BSD-style multiple-include protection in , * which is true of all but the oldest versions of FreeBSD and NetBSD, * or Tru64 UNIX-style multiple-include protection (or, at least, * Tru64 UNIX 5.x-style; I don't have earlier versions available to check), * or AIX-style multiple-include protection (or, at least, AIX 5.x-style; * I don't have earlier versions available to check), or QNX-style * multiple-include protection (as per GitHub pull request #394). * * We do not check for BPF_MAJOR_VERSION, as that's defined by * , which is directly or indirectly included in some * programs that also include pcap.h, and doesn't * define stuff we need. * * This also provides our own multiple-include protection. */ #if !defined(_NET_BPF_H_) && !defined(_NET_BPF_H_INCLUDED) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h) #define lib_pcap_bpf_h #include #ifdef __cplusplus extern "C" { #endif /* BSD style release date */ #define BPF_RELEASE 199606 #ifdef MSDOS /* must be 32-bit */ typedef long bpf_int32; typedef unsigned long bpf_u_int32; #else typedef int bpf_int32; typedef u_int bpf_u_int32; #endif /* * Alignment macros. BPF_WORDALIGN rounds up to the next * even multiple of BPF_ALIGNMENT. * * Tcpdump's print-pflog.c uses this, so we define it here. */ #ifndef __NetBSD__ #define BPF_ALIGNMENT sizeof(bpf_int32) #else #define BPF_ALIGNMENT sizeof(long) #endif #define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) /* * Structure for "pcap_compile()", "pcap_setfilter()", etc.. */ struct bpf_program { u_int bf_len; struct bpf_insn *bf_insns; }; #include /* * The instruction encodings. * * Please inform tcpdump-workers@lists.tcpdump.org if you use any * of the reserved values, so that we can note that they're used * (and perhaps implement it in the reference BPF implementation * and encourage its implementation elsewhere). */ /* * The upper 8 bits of the opcode aren't used. BSD/OS used 0x8000. */ /* instruction classes */ #define BPF_CLASS(code) ((code) & 0x07) #define BPF_LD 0x00 #define BPF_LDX 0x01 #define BPF_ST 0x02 #define BPF_STX 0x03 #define BPF_ALU 0x04 #define BPF_JMP 0x05 #define BPF_RET 0x06 #define BPF_MISC 0x07 /* ld/ldx fields */ #define BPF_SIZE(code) ((code) & 0x18) #define BPF_W 0x00 #define BPF_H 0x08 #define BPF_B 0x10 /* 0x18 reserved; used by BSD/OS */ #define BPF_MODE(code) ((code) & 0xe0) #define BPF_IMM 0x00 #define BPF_ABS 0x20 #define BPF_IND 0x40 #define BPF_MEM 0x60 #define BPF_LEN 0x80 #define BPF_MSH 0xa0 /* 0xc0 reserved; used by BSD/OS */ /* 0xe0 reserved; used by BSD/OS */ /* alu/jmp fields */ #define BPF_OP(code) ((code) & 0xf0) #define BPF_ADD 0x00 #define BPF_SUB 0x10 #define BPF_MUL 0x20 #define BPF_DIV 0x30 #define BPF_OR 0x40 #define BPF_AND 0x50 #define BPF_LSH 0x60 #define BPF_RSH 0x70 #define BPF_NEG 0x80 #define BPF_MOD 0x90 #define BPF_XOR 0xa0 /* 0xb0 reserved */ /* 0xc0 reserved */ /* 0xd0 reserved */ /* 0xe0 reserved */ /* 0xf0 reserved */ #define BPF_JA 0x00 #define BPF_JEQ 0x10 #define BPF_JGT 0x20 #define BPF_JGE 0x30 #define BPF_JSET 0x40 /* 0x50 reserved; used on BSD/OS */ /* 0x60 reserved */ /* 0x70 reserved */ /* 0x80 reserved */ /* 0x90 reserved */ /* 0xa0 reserved */ /* 0xb0 reserved */ /* 0xc0 reserved */ /* 0xd0 reserved */ /* 0xe0 reserved */ /* 0xf0 reserved */ #define BPF_SRC(code) ((code) & 0x08) #define BPF_K 0x00 #define BPF_X 0x08 /* ret - BPF_K and BPF_X also apply */ #define BPF_RVAL(code) ((code) & 0x18) #define BPF_A 0x10 /* 0x18 reserved */ /* misc */ #define BPF_MISCOP(code) ((code) & 0xf8) #define BPF_TAX 0x00 /* 0x08 reserved */ /* 0x10 reserved */ /* 0x18 reserved */ /* #define BPF_COP 0x20 NetBSD "coprocessor" extensions */ /* 0x28 reserved */ /* 0x30 reserved */ /* 0x38 reserved */ /* #define BPF_COPX 0x40 NetBSD "coprocessor" extensions */ /* also used on BSD/OS */ /* 0x48 reserved */ /* 0x50 reserved */ /* 0x58 reserved */ /* 0x60 reserved */ /* 0x68 reserved */ /* 0x70 reserved */ /* 0x78 reserved */ #define BPF_TXA 0x80 /* 0x88 reserved */ /* 0x90 reserved */ /* 0x98 reserved */ /* 0xa0 reserved */ /* 0xa8 reserved */ /* 0xb0 reserved */ /* 0xb8 reserved */ /* 0xc0 reserved; used on BSD/OS */ /* 0xc8 reserved */ /* 0xd0 reserved */ /* 0xd8 reserved */ /* 0xe0 reserved */ /* 0xe8 reserved */ /* 0xf0 reserved */ /* 0xf8 reserved */ /* * The instruction data structure. */ struct bpf_insn { u_short code; u_char jt; u_char jf; bpf_u_int32 k; }; /* * Macros for insn array initializers. */ #define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } #define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } PCAP_API int bpf_validate(const struct bpf_insn *, int); PCAP_API u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); /* * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). */ #define BPF_MEMWORDS 16 #ifdef __cplusplus } #endif #endif /* !defined(_NET_BPF_H_) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h) */ PKZ۫ pcap/ipnet.hnu[/*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #define IPH_AF_INET 2 /* Matches Solaris's AF_INET */ #define IPH_AF_INET6 26 /* Matches Solaris's AF_INET6 */ #define IPNET_OUTBOUND 1 #define IPNET_INBOUND 2 PKZ/ pcap/usb.hnu[/* * Copyright (c) 2006 Paolo Abeni (Italy) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Basic USB data struct * By Paolo Abeni */ #ifndef lib_pcap_usb_h #define lib_pcap_usb_h #include /* * possible transfer mode */ #define URB_TRANSFER_IN 0x80 #define URB_ISOCHRONOUS 0x0 #define URB_INTERRUPT 0x1 #define URB_CONTROL 0x2 #define URB_BULK 0x3 /* * possible event type */ #define URB_SUBMIT 'S' #define URB_COMPLETE 'C' #define URB_ERROR 'E' /* * USB setup header as defined in USB specification. * Appears at the front of each Control S-type packet in DLT_USB captures. */ typedef struct _usb_setup { uint8_t bmRequestType; uint8_t bRequest; uint16_t wValue; uint16_t wIndex; uint16_t wLength; } pcap_usb_setup; /* * Information from the URB for Isochronous transfers. */ typedef struct _iso_rec { int32_t error_count; int32_t numdesc; } iso_rec; /* * Header prepended by linux kernel to each event. * Appears at the front of each packet in DLT_USB_LINUX captures. */ typedef struct _usb_header { uint64_t id; uint8_t event_type; uint8_t transfer_type; uint8_t endpoint_number; uint8_t device_address; uint16_t bus_id; char setup_flag;/*if !=0 the urb setup header is not present*/ char data_flag; /*if !=0 no urb data is present*/ int64_t ts_sec; int32_t ts_usec; int32_t status; uint32_t urb_len; uint32_t data_len; /* amount of urb data really present in this event*/ pcap_usb_setup setup; } pcap_usb_header; /* * Header prepended by linux kernel to each event for the 2.6.31 * and later kernels; for the 2.6.21 through 2.6.30 kernels, the * "iso_rec" information, and the fields starting with "interval" * are zeroed-out padding fields. * * Appears at the front of each packet in DLT_USB_LINUX_MMAPPED captures. */ typedef struct _usb_header_mmapped { uint64_t id; uint8_t event_type; uint8_t transfer_type; uint8_t endpoint_number; uint8_t device_address; uint16_t bus_id; char setup_flag;/*if !=0 the urb setup header is not present*/ char data_flag; /*if !=0 no urb data is present*/ int64_t ts_sec; int32_t ts_usec; int32_t status; uint32_t urb_len; uint32_t data_len; /* amount of urb data really present in this event*/ union { pcap_usb_setup setup; iso_rec iso; } s; int32_t interval; /* for Interrupt and Isochronous events */ int32_t start_frame; /* for Isochronous events */ uint32_t xfer_flags; /* copy of URB's transfer flags */ uint32_t ndesc; /* number of isochronous descriptors */ } pcap_usb_header_mmapped; /* * Isochronous descriptors; for isochronous transfers there might be * one or more of these at the beginning of the packet data. The * number of descriptors is given by the "ndesc" field in the header; * as indicated, in older kernels that don't put the descriptors at * the beginning of the packet, that field is zeroed out, so that field * can be trusted even in captures from older kernels. */ typedef struct _usb_isodesc { int32_t status; uint32_t offset; uint32_t len; uint8_t pad[4]; } usb_isodesc; #endif PKZॺ%% pcap/pcap.hnu[/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ /* * Copyright (c) 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Remote packet capture mechanisms and extensions from WinPcap: * * Copyright (c) 2002 - 2003 * NetGroup, Politecnico di Torino (Italy) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Politecnico di Torino nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef lib_pcap_pcap_h #define lib_pcap_pcap_h #include #include #if defined(_WIN32) #include /* u_int, u_char etc. */ #include /* _get_osfhandle() */ #elif defined(MSDOS) #include /* u_int, u_char etc. */ #include #else /* UN*X */ #include /* u_int, u_char etc. */ #include #endif /* _WIN32/MSDOS/UN*X */ #include /* for SOCKET, as the active-mode rpcap APIs use it */ #ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H #include #endif #include #ifdef __cplusplus extern "C" { #endif /* * Version number of the current version of the pcap file format. * * NOTE: this is *NOT* the version number of the libpcap library. * To fetch the version information for the version of libpcap * you're using, use pcap_lib_version(). */ #define PCAP_VERSION_MAJOR 2 #define PCAP_VERSION_MINOR 4 #define PCAP_ERRBUF_SIZE 256 /* * Compatibility for systems that have a bpf.h that * predates the bpf typedefs for 64-bit support. */ #if BPF_RELEASE - 0 < 199406 typedef int bpf_int32; typedef u_int bpf_u_int32; #endif typedef struct pcap pcap_t; typedef struct pcap_dumper pcap_dumper_t; typedef struct pcap_if pcap_if_t; typedef struct pcap_addr pcap_addr_t; /* * The first record in the file contains saved values for some * of the flags used in the printout phases of tcpdump. * Many fields here are 32 bit ints so compilers won't insert unwanted * padding; these files need to be interchangeable across architectures. * * Do not change the layout of this structure, in any way (this includes * changes that only affect the length of fields in this structure). * * Also, do not change the interpretation of any of the members of this * structure, in any way (this includes using values other than * LINKTYPE_ values, as defined in "savefile.c", in the "linktype" * field). * * Instead: * * introduce a new structure for the new format, if the layout * of the structure changed; * * send mail to "tcpdump-workers@lists.tcpdump.org", requesting * a new magic number for your new capture file format, and, when * you get the new magic number, put it in "savefile.c"; * * use that magic number for save files with the changed file * header; * * make the code in "savefile.c" capable of reading files with * the old file header as well as files with the new file header * (using the magic number to determine the header format). * * Then supply the changes by forking the branch at * * https://github.com/the-tcpdump-group/libpcap/issues * * and issuing a pull request, so that future versions of libpcap and * programs that use it (such as tcpdump) will be able to read your new * capture file format. */ struct pcap_file_header { bpf_u_int32 magic; u_short version_major; u_short version_minor; bpf_int32 thiszone; /* gmt to local correction */ bpf_u_int32 sigfigs; /* accuracy of timestamps */ bpf_u_int32 snaplen; /* max length saved portion of each pkt */ bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */ }; /* * Macros for the value returned by pcap_datalink_ext(). * * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro * gives the FCS length of packets in the capture. */ #define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000) #define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28) #define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000) typedef enum { PCAP_D_INOUT = 0, PCAP_D_IN, PCAP_D_OUT } pcap_direction_t; /* * Generic per-packet information, as supplied by libpcap. * * The time stamp can and should be a "struct timeval", regardless of * whether your system supports 32-bit tv_sec in "struct timeval", * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit * and 64-bit applications. The on-disk format of savefiles uses 32-bit * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit * and 64-bit versions of libpcap, even if they're on the same platform, * should supply the appropriate version of "struct timeval", even if * that's not what the underlying packet capture mechanism supplies. */ struct pcap_pkthdr { struct timeval ts; /* time stamp */ bpf_u_int32 caplen; /* length of portion present */ bpf_u_int32 len; /* length this packet (off wire) */ }; /* * As returned by the pcap_stats() */ struct pcap_stat { u_int ps_recv; /* number of packets received */ u_int ps_drop; /* number of packets dropped */ u_int ps_ifdrop; /* drops by interface -- only supported on some platforms */ #ifdef _WIN32 u_int ps_capt; /* number of packets that reach the application */ u_int ps_sent; /* number of packets sent by the server on the network */ u_int ps_netdrop; /* number of packets lost on the network */ #endif /* _WIN32 */ }; #ifdef MSDOS /* * As returned by the pcap_stats_ex() */ struct pcap_stat_ex { u_long rx_packets; /* total packets received */ u_long tx_packets; /* total packets transmitted */ u_long rx_bytes; /* total bytes received */ u_long tx_bytes; /* total bytes transmitted */ u_long rx_errors; /* bad packets received */ u_long tx_errors; /* packet transmit problems */ u_long rx_dropped; /* no space in Rx buffers */ u_long tx_dropped; /* no space available for Tx */ u_long multicast; /* multicast packets received */ u_long collisions; /* detailed rx_errors: */ u_long rx_length_errors; u_long rx_over_errors; /* receiver ring buff overflow */ u_long rx_crc_errors; /* recv'd pkt with crc error */ u_long rx_frame_errors; /* recv'd frame alignment error */ u_long rx_fifo_errors; /* recv'r fifo overrun */ u_long rx_missed_errors; /* recv'r missed packet */ /* detailed tx_errors */ u_long tx_aborted_errors; u_long tx_carrier_errors; u_long tx_fifo_errors; u_long tx_heartbeat_errors; u_long tx_window_errors; }; #endif /* * Item in a list of interfaces. */ struct pcap_if { struct pcap_if *next; char *name; /* name to hand to "pcap_open_live()" */ char *description; /* textual description of interface, or NULL */ struct pcap_addr *addresses; bpf_u_int32 flags; /* PCAP_IF_ interface flags */ }; #define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */ #define PCAP_IF_UP 0x00000002 /* interface is up */ #define PCAP_IF_RUNNING 0x00000004 /* interface is running */ #define PCAP_IF_WIRELESS 0x00000008 /* interface is wireless (*NOT* necessarily Wi-Fi!) */ #define PCAP_IF_CONNECTION_STATUS 0x00000030 /* connection status: */ #define PCAP_IF_CONNECTION_STATUS_UNKNOWN 0x00000000 /* unknown */ #define PCAP_IF_CONNECTION_STATUS_CONNECTED 0x00000010 /* connected */ #define PCAP_IF_CONNECTION_STATUS_DISCONNECTED 0x00000020 /* disconnected */ #define PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE 0x00000030 /* not applicable */ /* * Representation of an interface address. */ struct pcap_addr { struct pcap_addr *next; struct sockaddr *addr; /* address */ struct sockaddr *netmask; /* netmask for that address */ struct sockaddr *broadaddr; /* broadcast address for that address */ struct sockaddr *dstaddr; /* P2P destination address for that address */ }; typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, const u_char *); /* * Error codes for the pcap API. * These will all be negative, so you can check for the success or * failure of a call that returns these codes by checking for a * negative value. */ #define PCAP_ERROR -1 /* generic error code */ #define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */ #define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */ #define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */ #define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */ #define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */ #define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */ #define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */ #define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */ #define PCAP_ERROR_CANTSET_TSTAMP_TYPE -10 /* this device doesn't support setting the time stamp type */ #define PCAP_ERROR_PROMISC_PERM_DENIED -11 /* you don't have permission to capture in promiscuous mode */ #define PCAP_ERROR_TSTAMP_PRECISION_NOTSUP -12 /* the requested time stamp precision is not supported */ /* * Warning codes for the pcap API. * These will all be positive and non-zero, so they won't look like * errors. */ #define PCAP_WARNING 1 /* generic warning code */ #define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */ #define PCAP_WARNING_TSTAMP_TYPE_NOTSUP 3 /* the requested time stamp type is not supported */ /* * Value to pass to pcap_compile() as the netmask if you don't know what * the netmask is. */ #define PCAP_NETMASK_UNKNOWN 0xffffffff /* * We're deprecating pcap_lookupdev() for various reasons (not * thread-safe, can behave weirdly with WinPcap). Callers * should use pcap_findalldevs() and use the first device. */ PCAP_API char *pcap_lookupdev(char *) PCAP_DEPRECATED(pcap_lookupdev, "use 'pcap_findalldevs' and use the first device"); PCAP_API int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); PCAP_API pcap_t *pcap_create(const char *, char *); PCAP_API int pcap_set_snaplen(pcap_t *, int); PCAP_API int pcap_set_promisc(pcap_t *, int); PCAP_API int pcap_can_set_rfmon(pcap_t *); PCAP_API int pcap_set_rfmon(pcap_t *, int); PCAP_API int pcap_set_timeout(pcap_t *, int); PCAP_API int pcap_set_tstamp_type(pcap_t *, int); PCAP_API int pcap_set_immediate_mode(pcap_t *, int); PCAP_API int pcap_set_buffer_size(pcap_t *, int); PCAP_API int pcap_set_tstamp_precision(pcap_t *, int); PCAP_API int pcap_get_tstamp_precision(pcap_t *); PCAP_API int pcap_activate(pcap_t *); PCAP_API int pcap_list_tstamp_types(pcap_t *, int **); PCAP_API void pcap_free_tstamp_types(int *); PCAP_API int pcap_tstamp_type_name_to_val(const char *); PCAP_API const char *pcap_tstamp_type_val_to_name(int); PCAP_API const char *pcap_tstamp_type_val_to_description(int); #ifdef __linux__ PCAP_API int pcap_set_protocol_linux(pcap_t *, int); #endif /* * Time stamp types. * Not all systems and interfaces will necessarily support all of these. * * A system that supports PCAP_TSTAMP_HOST is offering time stamps * provided by the host machine, rather than by the capture device, * but not committing to any characteristics of the time stamp; * it will not offer any of the PCAP_TSTAMP_HOST_ subtypes. * * PCAP_TSTAMP_HOST_LOWPREC is a time stamp, provided by the host machine, * that's low-precision but relatively cheap to fetch; it's normally done * using the system clock, so it's normally synchronized with times you'd * fetch from system calls. * * PCAP_TSTAMP_HOST_HIPREC is a time stamp, provided by the host machine, * that's high-precision; it might be more expensive to fetch. It might * or might not be synchronized with the system clock, and might have * problems with time stamps for packets received on different CPUs, * depending on the platform. * * PCAP_TSTAMP_ADAPTER is a high-precision time stamp supplied by the * capture device; it's synchronized with the system clock. * * PCAP_TSTAMP_ADAPTER_UNSYNCED is a high-precision time stamp supplied by * the capture device; it's not synchronized with the system clock. * * Note that time stamps synchronized with the system clock can go * backwards, as the system clock can go backwards. If a clock is * not in sync with the system clock, that could be because the * system clock isn't keeping accurate time, because the other * clock isn't keeping accurate time, or both. * * Note that host-provided time stamps generally correspond to the * time when the time-stamping code sees the packet; this could * be some unknown amount of time after the first or last bit of * the packet is received by the network adapter, due to batching * of interrupts for packet arrival, queueing delays, etc.. */ #define PCAP_TSTAMP_HOST 0 /* host-provided, unknown characteristics */ #define PCAP_TSTAMP_HOST_LOWPREC 1 /* host-provided, low precision */ #define PCAP_TSTAMP_HOST_HIPREC 2 /* host-provided, high precision */ #define PCAP_TSTAMP_ADAPTER 3 /* device-provided, synced with the system clock */ #define PCAP_TSTAMP_ADAPTER_UNSYNCED 4 /* device-provided, not synced with the system clock */ /* * Time stamp resolution types. * Not all systems and interfaces will necessarily support all of these * resolutions when doing live captures; all of them can be requested * when reading a savefile. */ #define PCAP_TSTAMP_PRECISION_MICRO 0 /* use timestamps with microsecond precision, default */ #define PCAP_TSTAMP_PRECISION_NANO 1 /* use timestamps with nanosecond precision */ PCAP_API pcap_t *pcap_open_live(const char *, int, int, int, char *); PCAP_API pcap_t *pcap_open_dead(int, int); PCAP_API pcap_t *pcap_open_dead_with_tstamp_precision(int, int, u_int); PCAP_API pcap_t *pcap_open_offline_with_tstamp_precision(const char *, u_int, char *); PCAP_API pcap_t *pcap_open_offline(const char *, char *); #ifdef _WIN32 PCAP_API pcap_t *pcap_hopen_offline_with_tstamp_precision(intptr_t, u_int, char *); PCAP_API pcap_t *pcap_hopen_offline(intptr_t, char *); /* * If we're building libpcap, these are internal routines in savefile.c, * so we must not define them as macros. * * If we're not building libpcap, given that the version of the C runtime * with which libpcap was built might be different from the version * of the C runtime with which an application using libpcap was built, * and that a FILE structure may differ between the two versions of the * C runtime, calls to _fileno() must use the version of _fileno() in * the C runtime used to open the FILE *, not the version in the C * runtime with which libpcap was built. (Maybe once the Universal CRT * rules the world, this will cease to be a problem.) */ #ifndef BUILDING_PCAP #define pcap_fopen_offline_with_tstamp_precision(f,p,b) \ pcap_hopen_offline_with_tstamp_precision(_get_osfhandle(_fileno(f)), p, b) #define pcap_fopen_offline(f,b) \ pcap_hopen_offline(_get_osfhandle(_fileno(f)), b) #endif #else /*_WIN32*/ PCAP_API pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *); PCAP_API pcap_t *pcap_fopen_offline(FILE *, char *); #endif /*_WIN32*/ PCAP_API void pcap_close(pcap_t *); PCAP_API int pcap_loop(pcap_t *, int, pcap_handler, u_char *); PCAP_API int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); PCAP_API const u_char *pcap_next(pcap_t *, struct pcap_pkthdr *); PCAP_API int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **); PCAP_API void pcap_breakloop(pcap_t *); PCAP_API int pcap_stats(pcap_t *, struct pcap_stat *); PCAP_API int pcap_setfilter(pcap_t *, struct bpf_program *); PCAP_API int pcap_setdirection(pcap_t *, pcap_direction_t); PCAP_API int pcap_getnonblock(pcap_t *, char *); PCAP_API int pcap_setnonblock(pcap_t *, int, char *); PCAP_API int pcap_inject(pcap_t *, const void *, size_t); PCAP_API int pcap_sendpacket(pcap_t *, const u_char *, int); PCAP_API const char *pcap_statustostr(int); PCAP_API const char *pcap_strerror(int); PCAP_API char *pcap_geterr(pcap_t *); PCAP_API void pcap_perror(pcap_t *, const char *); PCAP_API int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, bpf_u_int32); PCAP_API int pcap_compile_nopcap(int, int, struct bpf_program *, const char *, int, bpf_u_int32); PCAP_API void pcap_freecode(struct bpf_program *); PCAP_API int pcap_offline_filter(const struct bpf_program *, const struct pcap_pkthdr *, const u_char *); PCAP_API int pcap_datalink(pcap_t *); PCAP_API int pcap_datalink_ext(pcap_t *); PCAP_API int pcap_list_datalinks(pcap_t *, int **); PCAP_API int pcap_set_datalink(pcap_t *, int); PCAP_API void pcap_free_datalinks(int *); PCAP_API int pcap_datalink_name_to_val(const char *); PCAP_API const char *pcap_datalink_val_to_name(int); PCAP_API const char *pcap_datalink_val_to_description(int); PCAP_API const char *pcap_datalink_val_to_description_or_dlt(int); PCAP_API int pcap_snapshot(pcap_t *); PCAP_API int pcap_is_swapped(pcap_t *); PCAP_API int pcap_major_version(pcap_t *); PCAP_API int pcap_minor_version(pcap_t *); PCAP_API int pcap_bufsize(pcap_t *); /* XXX */ PCAP_API FILE *pcap_file(pcap_t *); PCAP_API int pcap_fileno(pcap_t *); #ifdef _WIN32 PCAP_API int pcap_wsockinit(void); #endif PCAP_API pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); #ifdef _WIN32 PCAP_API pcap_dumper_t *pcap_dump_hopen(pcap_t *, intptr_t); /* * If we're building libpcap, this is an internal routine in sf-pcap.c, so * we must not define it as a macro. * * If we're not building libpcap, given that the version of the C runtime * with which libpcap was built might be different from the version * of the C runtime with which an application using libpcap was built, * and that a FILE structure may differ between the two versions of the * C runtime, calls to _fileno() must use the version of _fileno() in * the C runtime used to open the FILE *, not the version in the C * runtime with which libpcap was built. (Maybe once the Universal CRT * rules the world, this will cease to be a problem.) */ #ifndef BUILDING_PCAP #define pcap_dump_fopen(p,f) \ pcap_dump_hopen(p, _get_osfhandle(_fileno(f))) #endif #else /*_WIN32*/ PCAP_API pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); #endif /*_WIN32*/ PCAP_API pcap_dumper_t *pcap_dump_open_append(pcap_t *, const char *); PCAP_API FILE *pcap_dump_file(pcap_dumper_t *); PCAP_API long pcap_dump_ftell(pcap_dumper_t *); PCAP_API int64_t pcap_dump_ftell64(pcap_dumper_t *); PCAP_API int pcap_dump_flush(pcap_dumper_t *); PCAP_API void pcap_dump_close(pcap_dumper_t *); PCAP_API void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); PCAP_API int pcap_findalldevs(pcap_if_t **, char *); PCAP_API void pcap_freealldevs(pcap_if_t *); /* * We return a pointer to the version string, rather than exporting the * version string directly. * * On at least some UNIXes, if you import data from a shared library into * an program, the data is bound into the program binary, so if the string * in the version of the library with which the program was linked isn't * the same as the string in the version of the library with which the * program is being run, various undesirable things may happen (warnings, * the string being the one from the version of the library with which the * program was linked, or even weirder things, such as the string being the * one from the library but being truncated). * * On Windows, the string is constructed at run time. */ PCAP_API const char *pcap_lib_version(void); /* * On at least some versions of NetBSD and QNX, we don't want to declare * bpf_filter() here, as it's also be declared in , with a * different signature, but, on other BSD-flavored UN*Xes, it's not * declared in , so we *do* want to declare it here, so it's * declared when we build pcap-bpf.c. */ #if !defined(__NetBSD__) && !defined(__QNX__) PCAP_API u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); #endif PCAP_API int bpf_validate(const struct bpf_insn *f, int len); PCAP_API char *bpf_image(const struct bpf_insn *, int); PCAP_API void bpf_dump(const struct bpf_program *, int); #if defined(_WIN32) /* * Win32 definitions */ /*! \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). */ struct pcap_send_queue { u_int maxlen; /* Maximum size of the queue, in bytes. This variable contains the size of the buffer field. */ u_int len; /* Current size of the queue, in bytes. */ char *buffer; /* Buffer containing the packets to be sent. */ }; typedef struct pcap_send_queue pcap_send_queue; /*! \brief This typedef is a support for the pcap_get_airpcap_handle() function */ #if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) #define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ typedef struct _AirpcapHandle *PAirpcapHandle; #endif PCAP_API int pcap_setbuff(pcap_t *p, int dim); PCAP_API int pcap_setmode(pcap_t *p, int mode); PCAP_API int pcap_setmintocopy(pcap_t *p, int size); PCAP_API HANDLE pcap_getevent(pcap_t *p); PCAP_API int pcap_oid_get_request(pcap_t *, bpf_u_int32, void *, size_t *); PCAP_API int pcap_oid_set_request(pcap_t *, bpf_u_int32, const void *, size_t *); PCAP_API pcap_send_queue* pcap_sendqueue_alloc(u_int memsize); PCAP_API void pcap_sendqueue_destroy(pcap_send_queue* queue); PCAP_API int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data); PCAP_API u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync); PCAP_API struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size); PCAP_API int pcap_setuserbuffer(pcap_t *p, int size); PCAP_API int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks); PCAP_API int pcap_live_dump_ended(pcap_t *p, int sync); PCAP_API int pcap_start_oem(char* err_str, int flags); PCAP_API PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p); #define MODE_CAPT 0 #define MODE_STAT 1 #define MODE_MON 2 #elif defined(MSDOS) /* * MS-DOS definitions */ PCAP_API int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *); PCAP_API void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait); PCAP_API u_long pcap_mac_packets (void); #else /* UN*X */ /* * UN*X definitions */ PCAP_API int pcap_get_selectable_fd(pcap_t *); PCAP_API struct timeval *pcap_get_required_select_timeout(pcap_t *); #endif /* _WIN32/MSDOS/UN*X */ /* * Remote capture definitions. * * These routines are only present if libpcap has been configured to * include remote capture support. */ /* * The maximum buffer size in which address, port, interface names are kept. * * In case the adapter name or such is larger than this value, it is truncated. * This is not used by the user; however it must be aware that an hostname / interface * name longer than this value will be truncated. */ #define PCAP_BUF_SIZE 1024 /* * The type of input source, passed to pcap_open(). */ #define PCAP_SRC_FILE 2 /* local savefile */ #define PCAP_SRC_IFLOCAL 3 /* local network interface */ #define PCAP_SRC_IFREMOTE 4 /* interface on a remote host, using RPCAP */ /* * The formats allowed by pcap_open() are the following: * - file://path_and_filename [opens a local file] * - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol] * - rpcap://host/devicename [opens the selected device available on a remote host] * - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP] * - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged] * - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged] * * The formats allowed by the pcap_findalldevs_ex() are the following: * - file://folder/ [lists all the files in the given folder] * - rpcap:// [lists all local adapters] * - rpcap://host:port/ [lists the devices available on a remote host] * * Referring to the 'host' and 'port' parameters, they can be either numeric or literal. Since * IPv6 is fully supported, these are the allowed formats: * * - host (literal): e.g. host.foo.bar * - host (numeric IPv4): e.g. 10.11.12.13 * - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13] * - host (numeric IPv6): e.g. [1:2:3::4] * - port: can be either numeric (e.g. '80') or literal (e.g. 'http') * * Here you find some allowed examples: * - rpcap://host.foo.bar/devicename [everything literal, no port number] * - rpcap://host.foo.bar:1234/devicename [everything literal, with port number] * - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number] * - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number] * - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number] * - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number] * - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number] * - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number] */ /* * URL schemes for capture source. */ /* * This string indicates that the user wants to open a capture from a * local file. */ #define PCAP_SRC_FILE_STRING "file://" /* * This string indicates that the user wants to open a capture from a * network interface. This string does not necessarily involve the use * of the RPCAP protocol. If the interface required resides on the local * host, the RPCAP protocol is not involved and the local functions are used. */ #define PCAP_SRC_IF_STRING "rpcap://" /* * Flags to pass to pcap_open(). */ /* * Specifies whether promiscuous mode is to be used. */ #define PCAP_OPENFLAG_PROMISCUOUS 0x00000001 /* * Specifies, for an RPCAP capture, whether the data transfer (in * case of a remote capture) has to be done with UDP protocol. * * If it is '1' if you want a UDP data connection, '0' if you want * a TCP data connection; control connection is always TCP-based. * A UDP connection is much lighter, but it does not guarantee that all * the captured packets arrive to the client workstation. Moreover, * it could be harmful in case of network congestion. * This flag is meaningless if the source is not a remote interface. * In that case, it is simply ignored. */ #define PCAP_OPENFLAG_DATATX_UDP 0x00000002 /* * Specifies wheether the remote probe will capture its own generated * traffic. * * In case the remote probe uses the same interface to capture traffic * and to send data back to the caller, the captured traffic includes * the RPCAP traffic as well. If this flag is turned on, the RPCAP * traffic is excluded from the capture, so that the trace returned * back to the collector is does not include this traffic. * * Has no effect on local interfaces or savefiles. */ #define PCAP_OPENFLAG_NOCAPTURE_RPCAP 0x00000004 /* * Specifies whether the local adapter will capture its own generated traffic. * * This flag tells the underlying capture driver to drop the packets * that were sent by itself. This is useful when building applications * such as bridges that should ignore the traffic they just sent. * * Supported only on Windows. */ #define PCAP_OPENFLAG_NOCAPTURE_LOCAL 0x00000008 /* * This flag configures the adapter for maximum responsiveness. * * In presence of a large value for nbytes, WinPcap waits for the arrival * of several packets before copying the data to the user. This guarantees * a low number of system calls, i.e. lower processor usage, i.e. better * performance, which is good for applications like sniffers. If the user * sets the PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will * copy the packets as soon as the application is ready to receive them. * This is suggested for real time applications (such as, for example, * a bridge) that need the best responsiveness. * * The equivalent with pcap_create()/pcap_activate() is "immediate mode". */ #define PCAP_OPENFLAG_MAX_RESPONSIVENESS 0x00000010 /* * Remote authentication methods. * These are used in the 'type' member of the pcap_rmtauth structure. */ /* * NULL authentication. * * The 'NULL' authentication has to be equal to 'zero', so that old * applications can just put every field of struct pcap_rmtauth to zero, * and it does work. */ #define RPCAP_RMTAUTH_NULL 0 /* * Username/password authentication. * * With this type of authentication, the RPCAP protocol will use the username/ * password provided to authenticate the user on the remote machine. If the * authentication is successful (and the user has the right to open network * devices) the RPCAP connection will continue; otherwise it will be dropped. * * *******NOTE********: the username and password are sent over the network * to the capture server *IN CLEAR TEXT*. Don't use this on a network * that you don't completely control! (And be *really* careful in your * definition of "completely"!) */ #define RPCAP_RMTAUTH_PWD 1 /* * This structure keeps the information needed to autheticate the user * on a remote machine. * * The remote machine can either grant or refuse the access according * to the information provided. * In case the NULL authentication is required, both 'username' and * 'password' can be NULL pointers. * * This structure is meaningless if the source is not a remote interface; * in that case, the functions which requires such a structure can accept * a NULL pointer as well. */ struct pcap_rmtauth { /* * \brief Type of the authentication required. * * In order to provide maximum flexibility, we can support different types * of authentication based on the value of this 'type' variable. The currently * supported authentication methods are defined into the * \link remote_auth_methods Remote Authentication Methods Section\endlink. */ int type; /* * \brief Zero-terminated string containing the username that has to be * used on the remote machine for authentication. * * This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication * and it can be NULL. */ char *username; /* * \brief Zero-terminated string containing the password that has to be * used on the remote machine for authentication. * * This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication * and it can be NULL. */ char *password; }; /* * This routine can open a savefile, a local device, or a device on * a remote machine running an RPCAP server. * * For opening a savefile, the pcap_open_offline routines can be used, * and will work just as well; code using them will work on more * platforms than code using pcap_open() to open savefiles. * * For opening a local device, pcap_open_live() can be used; it supports * most of the capabilities that pcap_open() supports, and code using it * will work on more platforms than code using pcap_open(). pcap_create() * and pcap_activate() can also be used; they support all capabilities * that pcap_open() supports, except for the Windows-only * PCAP_OPENFLAG_NOCAPTURE_LOCAL, and support additional capabilities. * * For opening a remote capture, pcap_open() is currently the only * API available. */ PCAP_API pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf); PCAP_API int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf); PCAP_API int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf); /* * This routine can scan a directory for savefiles, list local capture * devices, or list capture devices on a remote machine running an RPCAP * server. * * For scanning for savefiles, it can be used on both UN*X systems and * Windows systems; for each directory entry it sees, it tries to open * the file as a savefile using pcap_open_offline(), and only includes * it in the list of files if the open succeeds, so it filters out * files for which the user doesn't have read permission, as well as * files that aren't valid savefiles readable by libpcap. * * For listing local capture devices, it's just a wrapper around * pcap_findalldevs(); code using pcap_findalldevs() will work on more * platforms than code using pcap_findalldevs_ex(). * * For listing remote capture devices, pcap_findalldevs_ex() is currently * the only API available. */ PCAP_API int pcap_findalldevs_ex(const char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf); /* * Sampling methods. * * These allow pcap_loop(), pcap_dispatch(), pcap_next(), and pcap_next_ex() * to see only a sample of packets, rather than all packets. * * Currently, they work only on Windows local captures. */ /* * Specifies that no sampling is to be done on the current capture. * * In this case, no sampling algorithms are applied to the current capture. */ #define PCAP_SAMP_NOSAMP 0 /* * Specifies that only 1 out of N packets must be returned to the user. * * In this case, the 'value' field of the 'pcap_samp' structure indicates the * number of packets (minus 1) that must be discarded before one packet got * accepted. * In other words, if 'value = 10', the first packet is returned to the * caller, while the following 9 are discarded. */ #define PCAP_SAMP_1_EVERY_N 1 /* * Specifies that we have to return 1 packet every N milliseconds. * * In this case, the 'value' field of the 'pcap_samp' structure indicates * the 'waiting time' in milliseconds before one packet got accepted. * In other words, if 'value = 10', the first packet is returned to the * caller; the next returned one will be the first packet that arrives * when 10ms have elapsed. */ #define PCAP_SAMP_FIRST_AFTER_N_MS 2 /* * This structure defines the information related to sampling. * * In case the sampling is requested, the capturing device should read * only a subset of the packets coming from the source. The returned packets * depend on the sampling parameters. * * WARNING: The sampling process is applied *after* the filtering process. * In other words, packets are filtered first, then the sampling process * selects a subset of the 'filtered' packets and it returns them to the * caller. */ struct pcap_samp { /* * Method used for sampling; see above. */ int method; /* * This value depends on the sampling method defined. * For its meaning, see above. */ int value; }; /* * New functions. */ PCAP_API struct pcap_samp *pcap_setsampling(pcap_t *p); /* * RPCAP active mode. */ /* Maximum length of an host name (needed for the RPCAP active mode) */ #define RPCAP_HOSTLIST_SIZE 1024 PCAP_API SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf); PCAP_API int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf); PCAP_API int pcap_remoteact_close(const char *host, char *errbuf); PCAP_API void pcap_remoteact_cleanup(void); #ifdef __cplusplus } #endif #endif /* lib_pcap_pcap_h */ PKZZ !!pcap/compiler-tests.hnu[/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ /* * Copyright (c) 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lib_pcap_compiler_tests_h #define lib_pcap_compiler_tests_h /* * This was introduced by Clang: * * http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute * * in some version (which version?); it has been picked up by GCC 5.0. */ #ifndef __has_attribute /* * It's a macro, so you can check whether it's defined to check * whether it's supported. * * If it's not, define it to always return 0, so that we move on to * the fallback checks. */ #define __has_attribute(x) 0 #endif /* * Note that the C90 spec's "6.8.1 Conditional inclusion" and the * C99 spec's and C11 spec's "6.10.1 Conditional inclusion" say: * * Prior to evaluation, macro invocations in the list of preprocessing * tokens that will become the controlling constant expression are * replaced (except for those macro names modified by the defined unary * operator), just as in normal text. If the token "defined" is * generated as a result of this replacement process or use of the * "defined" unary operator does not match one of the two specified * forms prior to macro replacement, the behavior is undefined. * * so you shouldn't use defined() in a #define that's used in #if or * #elif. Some versions of Clang, for example, will warn about this. * * Instead, we check whether the pre-defined macros for particular * compilers are defined and, if not, define the "is this version XXX * or a later version of this compiler" macros as 0. */ /* * Check whether this is GCC major.minor or a later release, or some * compiler that claims to be "just like GCC" of that version or a * later release. */ #if ! defined(__GNUC__) #define PCAP_IS_AT_LEAST_GNUC_VERSION(major, minor) 0 #else #define PCAP_IS_AT_LEAST_GNUC_VERSION(major, minor) \ (__GNUC__ > (major) || \ (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) #endif /* * Check whether this is Clang major.minor or a later release. */ #if !defined(__clang__) #define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) 0 #else #define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) \ (__clang_major__ > (major) || \ (__clang_major__ == (major) && __clang_minor__ >= (minor))) #endif /* * Check whether this is Sun C/SunPro C/Oracle Studio major.minor * or a later release. * * The version number in __SUNPRO_C is encoded in hex BCD, with the * uppermost hex digit being the major version number, the next * one or two hex digits being the minor version number, and * the last digit being the patch version. * * It represents the *compiler* version, not the product version; * see * * https://sourceforge.net/p/predef/wiki/Compilers/ * * for a partial mapping, which we assume continues for later * 12.x product releases. */ #if ! defined(__SUNPRO_C) #define PCAP_IS_AT_LEAST_SUNC_VERSION(major,minor) 0 #else #define PCAP_SUNPRO_VERSION_TO_BCD(major, minor) \ (((minor) >= 10) ? \ (((major) << 12) | (((minor)/10) << 8) | (((minor)%10) << 4)) : \ (((major) << 8) | ((minor) << 4))) #define PCAP_IS_AT_LEAST_SUNC_VERSION(major,minor) \ (__SUNPRO_C >= PCAP_SUNPRO_VERSION_TO_BCD((major), (minor))) #endif /* * Check whether this is IBM XL C major.minor or a later release. * * The version number in __xlC__ has the major version in the * upper 8 bits and the minor version in the lower 8 bits. */ #if ! defined(__xlC__) #define PCAP_IS_AT_LEAST_XL_C_VERSION(major,minor) 0 #else #define PCAP_IS_AT_LEAST_XL_C_VERSION(major, minor) \ (__xlC__ >= (((major) << 8) | (minor))) #endif /* * Check whether this is HP aC++/HP C major.minor or a later release. * * The version number in __HP_aCC is encoded in zero-padded decimal BCD, * with the "A." stripped off, the uppermost two decimal digits being * the major version number, the next two decimal digits being the minor * version number, and the last two decimal digits being the patch version. * (Strip off the A., remove the . between the major and minor version * number, and add two digits of patch.) */ #if ! defined(__HP_aCC) #define PCAP_IS_AT_LEAST_HP_C_VERSION(major,minor) 0 #else #define PCAP_IS_AT_LEAST_HP_C_VERSION(major,minor) \ (__HP_aCC >= ((major)*10000 + (minor)*100)) #endif #endif /* lib_pcap_compiler_tests_h */ PKZ15 pcap/socket.hnu[/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ /* * Copyright (c) 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lib_pcap_socket_h #define lib_pcap_socket_h /* * Some minor differences between sockets on various platforms. * We include whatever sockets are needed for Internet-protocol * socket access on UN*X and Windows. */ #ifdef _WIN32 /* Need windef.h for defines used in winsock2.h under MingW32 */ #ifdef __MINGW32__ #include #endif #include #include /* * Winsock doesn't have this UN*X type; it's used in the UN*X * sockets API. * * XXX - do we need to worry about UN*Xes so old that *they* * don't have it, either? */ typedef int socklen_t; /* * Winsock doesn't have this POSIX type; it's used for the * tv_usec value of struct timeval. */ typedef long suseconds_t; #else /* _WIN32 */ #include #include #include /* for struct addrinfo/getaddrinfo() */ #include /* for sockaddr_in, in BSD at least */ #include /*! * \brief In Winsock, a socket handle is of type SOCKET; in UN*X, it's * a file descriptor, and therefore a signed integer. * We define SOCKET to be a signed integer on UN*X, so that it can * be used on both platforms. */ #ifndef SOCKET #define SOCKET int #endif /*! * \brief In Winsock, the error return if socket() fails is INVALID_SOCKET; * in UN*X, it's -1. * We define INVALID_SOCKET to be -1 on UN*X, so that it can be used on * both platforms. */ #ifndef INVALID_SOCKET #define INVALID_SOCKET -1 #endif #endif /* _WIN32 */ #endif /* lib_pcap_socket_h */ PKZŸ pcap/nflog.hnu[/* * Copyright (c) 2013, Petar Alilovic, * Faculty of Electrical Engineering and Computing, University of Zagreb * All rights reserved * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ #ifndef lib_pcap_nflog_h #define lib_pcap_nflog_h #include /* * Structure of an NFLOG header and TLV parts, as described at * https://www.tcpdump.org/linktypes/LINKTYPE_NFLOG.html * * The NFLOG header is big-endian. * * The TLV length and type are in host byte order. The value is either * big-endian or is an array of bytes in some externally-specified byte * order (text string, link-layer address, link-layer header, packet * data, etc.). */ typedef struct nflog_hdr { uint8_t nflog_family; /* address family */ uint8_t nflog_version; /* version */ uint16_t nflog_rid; /* resource ID */ } nflog_hdr_t; typedef struct nflog_tlv { uint16_t tlv_length; /* tlv length */ uint16_t tlv_type; /* tlv type */ /* value follows this */ } nflog_tlv_t; typedef struct nflog_packet_hdr { uint16_t hw_protocol; /* hw protocol */ uint8_t hook; /* netfilter hook */ uint8_t pad; /* padding to 32 bits */ } nflog_packet_hdr_t; typedef struct nflog_hwaddr { uint16_t hw_addrlen; /* address length */ uint16_t pad; /* padding to 32-bit boundary */ uint8_t hw_addr[8]; /* address, up to 8 bytes */ } nflog_hwaddr_t; typedef struct nflog_timestamp { uint64_t sec; uint64_t usec; } nflog_timestamp_t; /* * TLV types. */ #define NFULA_PACKET_HDR 1 /* nflog_packet_hdr_t */ #define NFULA_MARK 2 /* packet mark from skbuff */ #define NFULA_TIMESTAMP 3 /* nflog_timestamp_t for skbuff's time stamp */ #define NFULA_IFINDEX_INDEV 4 /* ifindex of device on which packet received (possibly bridge group) */ #define NFULA_IFINDEX_OUTDEV 5 /* ifindex of device on which packet transmitted (possibly bridge group) */ #define NFULA_IFINDEX_PHYSINDEV 6 /* ifindex of physical device on which packet received (not bridge group) */ #define NFULA_IFINDEX_PHYSOUTDEV 7 /* ifindex of physical device on which packet transmitted (not bridge group) */ #define NFULA_HWADDR 8 /* nflog_hwaddr_t for hardware address */ #define NFULA_PAYLOAD 9 /* packet payload */ #define NFULA_PREFIX 10 /* text string - null-terminated, count includes NUL */ #define NFULA_UID 11 /* UID owning socket on which packet was sent/received */ #define NFULA_SEQ 12 /* sequence number of packets on this NFLOG socket */ #define NFULA_SEQ_GLOBAL 13 /* sequence number of pakets on all NFLOG sockets */ #define NFULA_GID 14 /* GID owning socket on which packet was sent/received */ #define NFULA_HWTYPE 15 /* ARPHRD_ type of skbuff's device */ #define NFULA_HWHEADER 16 /* skbuff's MAC-layer header */ #define NFULA_HWLEN 17 /* length of skbuff's MAC-layer header */ #endif PKZk>DD pcap/dlt.hnu[/*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)bpf.h 7.1 (Berkeley) 5/7/91 */ #ifndef lib_pcap_dlt_h #define lib_pcap_dlt_h /* * Link-layer header type codes. * * Do *NOT* add new values to this list without asking * "tcpdump-workers@lists.tcpdump.org" for a value. Otherwise, you run * the risk of using a value that's already being used for some other * purpose, and of having tools that read libpcap-format captures not * being able to handle captures with your new DLT_ value, with no hope * that they will ever be changed to do so (as that would destroy their * ability to read captures using that value for that other purpose). * * See * * https://www.tcpdump.org/linktypes.html * * for detailed descriptions of some of these link-layer header types. */ /* * These are the types that are the same on all platforms, and that * have been defined by for ages. */ #define DLT_NULL 0 /* BSD loopback encapsulation */ #define DLT_EN10MB 1 /* Ethernet (10Mb) */ #define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ #define DLT_AX25 3 /* Amateur Radio AX.25 */ #define DLT_PRONET 4 /* Proteon ProNET Token Ring */ #define DLT_CHAOS 5 /* Chaos */ #define DLT_IEEE802 6 /* 802.5 Token Ring */ #define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ #define DLT_SLIP 8 /* Serial Line IP */ #define DLT_PPP 9 /* Point-to-point Protocol */ #define DLT_FDDI 10 /* FDDI */ /* * These are types that are different on some platforms, and that * have been defined by for ages. We use #ifdefs to * detect the BSDs that define them differently from the traditional * libpcap * * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS, * but I don't know what the right #define is for BSD/OS. */ #define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */ #ifdef __OpenBSD__ #define DLT_RAW 14 /* raw IP */ #else #define DLT_RAW 12 /* raw IP */ #endif /* * Given that the only OS that currently generates BSD/OS SLIP or PPP * is, well, BSD/OS, arguably everybody should have chosen its values * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they * didn't. So it goes. */ #if defined(__NetBSD__) || defined(__FreeBSD__) #ifndef DLT_SLIP_BSDOS #define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ #define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ #endif #else #define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ #define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ #endif /* * 17 was used for DLT_PFLOG in OpenBSD; it no longer is. * * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG * as 117 so that pflog captures would use a link-layer header type * value that didn't collide with any other values. On all * platforms other than OpenBSD, we defined DLT_PFLOG as 117, * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG. * * OpenBSD eventually switched to using 117 for DLT_PFLOG as well. * * Don't use 17 for anything else. */ /* * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and * macOS; don't use it for anything else. (FreeBSD uses 121, which * collides with DLT_HHDLC, even though it doesn't use 18 for * anything and doesn't appear to have ever used it for anything.) * * We define it as 18 on those platforms; it is, unfortunately, used * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC * in general. As the packet format for it, like that for * DLT_PFLOG, is not only OS-dependent but OS-version-dependent, * we don't support printing it in tcpdump except on OSes that * have the relevant header files, so it's not that useful on * other platforms. */ #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__) #define DLT_PFSYNC 18 #endif #define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ /* * Apparently Redback uses this for its SmartEdge 400/800. I hope * nobody else decided to use it, too. */ #define DLT_REDBACK_SMARTEDGE 32 /* * These values are defined by NetBSD; other platforms should refrain from * using them for other purposes, so that NetBSD savefiles with link * types of 50 or 51 can be read as this type on all platforms. */ #define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ #define DLT_PPP_ETHER 51 /* PPP over Ethernet */ /* * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses * a link-layer type of 99 for the tcpdump it supplies. The link-layer * header has 6 bytes of unknown data, something that appears to be an * Ethernet type, and 36 bytes that appear to be 0 in at least one capture * I've seen. */ #define DLT_SYMANTEC_FIREWALL 99 /* * Values between 100 and 103 are used in capture file headers as * link-layer header type LINKTYPE_ values corresponding to DLT_ types * that differ between platforms; don't use those values for new DLT_ * new types. */ /* * Values starting with 104 are used for newly-assigned link-layer * header type values; for those link-layer header types, the DLT_ * value returned by pcap_datalink() and passed to pcap_open_dead(), * and the LINKTYPE_ value that appears in capture files, are the * same. * * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is * the highest such value. */ #define DLT_MATCHING_MIN 104 /* * This value was defined by libpcap 0.5; platforms that have defined * it with a different value should define it here with that value - * a link type of 104 in a save file will be mapped to DLT_C_HDLC, * whatever value that happens to be, so programs will correctly * handle files with that link type regardless of the value of * DLT_C_HDLC. * * The name DLT_C_HDLC was used by BSD/OS; we use that name for source * compatibility with programs written for BSD/OS. * * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, * for source compatibility with programs written for libpcap 0.5. */ #define DLT_C_HDLC 104 /* Cisco HDLC */ #define DLT_CHDLC DLT_C_HDLC #define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ /* * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW, * except when it isn't. (I.e., sometimes it's just raw IP, and * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL, * so that we don't have to worry about the link-layer header.) */ /* * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides * with other values. * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header * (DLCI, etc.). */ #define DLT_FRELAY 107 /* * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except * that the AF_ type in the link-layer header is in network byte order. * * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so * we don't use 12 for it in OSes other than OpenBSD. */ #ifdef __OpenBSD__ #define DLT_LOOP 12 #else #define DLT_LOOP 108 #endif /* * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other * than OpenBSD. */ #ifdef __OpenBSD__ #define DLT_ENC 13 #else #define DLT_ENC 109 #endif /* * Values between 110 and 112 are reserved for use in capture file headers * as link-layer types corresponding to DLT_ types that might differ * between platforms; don't use those values for new DLT_ types * other than the corresponding DLT_ types. */ /* * Linux cooked sockets. */ #define DLT_LINUX_SLL 113 /* * Apple LocalTalk hardware. */ #define DLT_LTALK 114 /* * Acorn Econet. */ #define DLT_ECONET 115 /* * Reserved for use with OpenBSD ipfilter. */ #define DLT_IPFILTER 116 /* * OpenBSD DLT_PFLOG. */ #define DLT_PFLOG 117 /* * Registered for Cisco-internal use. */ #define DLT_CISCO_IOS 118 /* * For 802.11 cards using the Prism II chips, with a link-layer * header including Prism monitor mode information plus an 802.11 * header. */ #define DLT_PRISM_HEADER 119 /* * Reserved for Aironet 802.11 cards, with an Aironet link-layer header * (see Doug Ambrisko's FreeBSD patches). */ #define DLT_AIRONET_HEADER 120 /* * Sigh. * * 121 was reserved for Siemens HiPath HDLC on 2002-01-25, as * requested by Tomas Kukosa. * * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that * assigned 121 as DLT_PFSYNC. In current versions, its libpcap * does DLT_ <-> LINKTYPE_ mapping, mapping DLT_PFSYNC to a * LINKTYPE_PFSYNC value of 246, so it should write out DLT_PFSYNC * dump files with 246 as the link-layer header type. (Earlier * versions might not have done mapping, in which case they would * have written them out with a link-layer header type of 121.) * * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC; * its libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would * write out DLT_PFSYNC dump files with use 18 as the link-layer * header type. * * NetBSD, DragonFly BSD, and Darwin also use 18 for DLT_PFSYNC; in * current versions, their libpcaps do DLT_ <-> LINKTYPE_ mapping, * mapping DLT_PFSYNC to a LINKTYPE_PFSYNC value of 246, so they * should write out DLT_PFSYNC dump files with 246 as the link-layer * header type. (Earlier versions might not have done mapping, * in which case they'd work the same way OpenBSD does, writing * them out with a link-layer header type of 18.) * * We'll define DLT_PFSYNC as: * * 18 on NetBSD, OpenBSD, DragonFly BSD, and Darwin; * * 121 on FreeBSD; * * 246 everywhere else. * * We'll define DLT_HHDLC as 121 on everything except for FreeBSD; * anybody who wants to compile, on FreeBSD, code that uses DLT_HHDLC * is out of luck. * * We'll define LINKTYPE_PFSYNC as 246 on *all* platforms, so that * savefiles written using *this* code won't use 18 or 121 for PFSYNC, * they'll all use 246. * * Code that uses pcap_datalink() to determine the link-layer header * type of a savefile won't, when built and run on FreeBSD, be able * to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC capture * files, as pcap_datalink() will give 121 for both of them. Code * that doesn't, such as the code in Wireshark, will be able to * distinguish between them. * * FreeBSD's libpcap won't map a link-layer header type of 18 - i.e., * DLT_PFSYNC files from OpenBSD and possibly older versions of NetBSD, * DragonFly BSD, and macOS - to DLT_PFSYNC, so code built with FreeBSD's * libpcap won't treat those files as DLT_PFSYNC files. * * Other libpcaps won't map a link-layer header type of 121 to DLT_PFSYNC; * this means they can read DLT_HHDLC files, if any exist, but won't * treat pcap files written by any older versions of FreeBSD libpcap that * didn't map to 246 as DLT_PFSYNC files. */ #ifdef __FreeBSD__ #define DLT_PFSYNC 121 #else #define DLT_HHDLC 121 #endif /* * This is for RFC 2625 IP-over-Fibre Channel. * * This is not for use with raw Fibre Channel, where the link-layer * header starts with a Fibre Channel frame header; it's for IP-over-FC, * where the link-layer header starts with an RFC 2625 Network_Header * field. */ #define DLT_IP_OVER_FC 122 /* * This is for Full Frontal ATM on Solaris with SunATM, with a * pseudo-header followed by an AALn PDU. * * There may be other forms of Full Frontal ATM on other OSes, * with different pseudo-headers. * * If ATM software returns a pseudo-header with VPI/VCI information * (and, ideally, packet type information, e.g. signalling, ILMI, * LANE, LLC-multiplexed traffic, etc.), it should not use * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump * and the like don't have to infer the presence or absence of a * pseudo-header and the form of the pseudo-header. */ #define DLT_SUNATM 123 /* Solaris+SunATM */ /* * Reserved as per request from Kent Dahlgren * for private use. */ #define DLT_RIO 124 /* RapidIO */ #define DLT_PCI_EXP 125 /* PCI Express */ #define DLT_AURORA 126 /* Xilinx Aurora link layer */ /* * Header for 802.11 plus a number of bits of link-layer information * including radio information, used by some recent BSD drivers as * well as the madwifi Atheros driver for Linux. */ #define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */ /* * Reserved for the TZSP encapsulation, as per request from * Chris Waters * TZSP is a generic encapsulation for any other link type, * which includes a means to include meta-information * with the packet, e.g. signal strength and channel * for 802.11 packets. */ #define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ /* * BSD's ARCNET headers have the source host, destination host, * and type at the beginning of the packet; that's what's handed * up to userland via BPF. * * Linux's ARCNET headers, however, have a 2-byte offset field * between the host IDs and the type; that's what's handed up * to userland via PF_PACKET sockets. * * We therefore have to have separate DLT_ values for them. */ #define DLT_ARCNET_LINUX 129 /* ARCNET */ /* * Juniper-private data link types, as per request from * Hannes Gredler . The DLT_s are used * for passing on chassis-internal metainformation such as * QOS profiles, etc.. */ #define DLT_JUNIPER_MLPPP 130 #define DLT_JUNIPER_MLFR 131 #define DLT_JUNIPER_ES 132 #define DLT_JUNIPER_GGSN 133 #define DLT_JUNIPER_MFR 134 #define DLT_JUNIPER_ATM2 135 #define DLT_JUNIPER_SERVICES 136 #define DLT_JUNIPER_ATM1 137 /* * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund * . The header that's presented is an Ethernet-like * header: * * #define FIREWIRE_EUI64_LEN 8 * struct firewire_header { * u_char firewire_dhost[FIREWIRE_EUI64_LEN]; * u_char firewire_shost[FIREWIRE_EUI64_LEN]; * u_short firewire_type; * }; * * with "firewire_type" being an Ethernet type value, rather than, * for example, raw GASP frames being handed up. */ #define DLT_APPLE_IP_OVER_IEEE1394 138 /* * Various SS7 encapsulations, as per a request from Jeff Morriss * and subsequent discussions. */ #define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */ #define DLT_MTP2 140 /* MTP2, without pseudo-header */ #define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */ #define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */ /* * DOCSIS MAC frames. */ #define DLT_DOCSIS 143 /* * Linux-IrDA packets. Protocol defined at http://www.irda.org. * Those packets include IrLAP headers and above (IrLMP...), but * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy * framing can be handled by the hardware and depend on the bitrate. * This is exactly the format you would get capturing on a Linux-IrDA * interface (irdaX), but not on a raw serial port. * Note the capture is done in "Linux-cooked" mode, so each packet include * a fake packet header (struct sll_header). This is because IrDA packet * decoding is dependant on the direction of the packet (incomming or * outgoing). * When/if other platform implement IrDA capture, we may revisit the * issue and define a real DLT_IRDA... * Jean II */ #define DLT_LINUX_IRDA 144 /* * Reserved for IBM SP switch and IBM Next Federation switch. */ #define DLT_IBM_SP 145 #define DLT_IBM_SN 146 /* * Reserved for private use. If you have some link-layer header type * that you want to use within your organization, with the capture files * using that link-layer header type not ever be sent outside your * organization, you can use these values. * * No libpcap release will use these for any purpose, nor will any * tcpdump release use them, either. * * Do *NOT* use these in capture files that you expect anybody not using * your private versions of capture-file-reading tools to read; in * particular, do *NOT* use them in products, otherwise you may find that * people won't be able to use tcpdump, or snort, or Ethereal, or... to * read capture files from your firewall/intrusion detection/traffic * monitoring/etc. appliance, or whatever product uses that DLT_ value, * and you may also find that the developers of those applications will * not accept patches to let them read those files. * * Also, do not use them if somebody might send you a capture using them * for *their* private type and tools using them for *your* private type * would have to read them. * * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value, * as per the comment above, and use the type you're given. */ #define DLT_USER0 147 #define DLT_USER1 148 #define DLT_USER2 149 #define DLT_USER3 150 #define DLT_USER4 151 #define DLT_USER5 152 #define DLT_USER6 153 #define DLT_USER7 154 #define DLT_USER8 155 #define DLT_USER9 156 #define DLT_USER10 157 #define DLT_USER11 158 #define DLT_USER12 159 #define DLT_USER13 160 #define DLT_USER14 161 #define DLT_USER15 162 /* * For future use with 802.11 captures - defined by AbsoluteValue * Systems to store a number of bits of link-layer information * including radio information: * * http://www.shaftnet.org/~pizza/software/capturefrm.txt * * but it might be used by some non-AVS drivers now or in the * future. */ #define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ /* * Juniper-private data link type, as per request from * Hannes Gredler . The DLT_s are used * for passing on chassis-internal metainformation such as * QOS profiles, etc.. */ #define DLT_JUNIPER_MONITOR 164 /* * BACnet MS/TP frames. */ #define DLT_BACNET_MS_TP 165 /* * Another PPP variant as per request from Karsten Keil . * * This is used in some OSes to allow a kernel socket filter to distinguish * between incoming and outgoing packets, on a socket intended to * supply pppd with outgoing packets so it can do dial-on-demand and * hangup-on-lack-of-demand; incoming packets are filtered out so they * don't cause pppd to hold the connection up (you don't want random * input packets such as port scans, packets from old lost connections, * etc. to force the connection to stay up). * * The first byte of the PPP header (0xff03) is modified to accomodate * the direction - 0x00 = IN, 0x01 = OUT. */ #define DLT_PPP_PPPD 166 /* * Names for backwards compatibility with older versions of some PPP * software; new software should use DLT_PPP_PPPD. */ #define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD #define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD /* * Juniper-private data link type, as per request from * Hannes Gredler . The DLT_s are used * for passing on chassis-internal metainformation such as * QOS profiles, cookies, etc.. */ #define DLT_JUNIPER_PPPOE 167 #define DLT_JUNIPER_PPPOE_ATM 168 #define DLT_GPRS_LLC 169 /* GPRS LLC */ #define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ #define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ /* * Requested by Oolan Zimmer for use in Gcom's T1/E1 line * monitoring equipment. */ #define DLT_GCOM_T1E1 172 #define DLT_GCOM_SERIAL 173 /* * Juniper-private data link type, as per request from * Hannes Gredler . The DLT_ is used * for internal communication to Physical Interface Cards (PIC) */ #define DLT_JUNIPER_PIC_PEER 174 /* * Link types requested by Gregor Maier of Endace * Measurement Systems. They add an ERF header (see * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of * the link-layer header. */ #define DLT_ERF_ETH 175 /* Ethernet */ #define DLT_ERF_POS 176 /* Packet-over-SONET */ /* * Requested by Daniele Orlandi for raw LAPD * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header * includes additional information before the LAPD header, so it's * not necessarily a generic LAPD header. */ #define DLT_LINUX_LAPD 177 /* * Juniper-private data link type, as per request from * Hannes Gredler . * The DLT_ are used for prepending meta-information * like interface index, interface name * before standard Ethernet, PPP, Frelay & C-HDLC Frames */ #define DLT_JUNIPER_ETHER 178 #define DLT_JUNIPER_PPP 179 #define DLT_JUNIPER_FRELAY 180 #define DLT_JUNIPER_CHDLC 181 /* * Multi Link Frame Relay (FRF.16) */ #define DLT_MFR 182 /* * Juniper-private data link type, as per request from * Hannes Gredler . * The DLT_ is used for internal communication with a * voice Adapter Card (PIC) */ #define DLT_JUNIPER_VP 183 /* * Arinc 429 frames. * DLT_ requested by Gianluca Varenni . * Every frame contains a 32bit A429 label. * More documentation on Arinc 429 can be found at * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf */ #define DLT_A429 184 /* * Arinc 653 Interpartition Communication messages. * DLT_ requested by Gianluca Varenni . * Please refer to the A653-1 standard for more information. */ #define DLT_A653_ICM 185 /* * This used to be "USB packets, beginning with a USB setup header; * requested by Paolo Abeni ." * * However, that header didn't work all that well - it left out some * useful information - and was abandoned in favor of the DLT_USB_LINUX * header. * * This is now used by FreeBSD for its BPF taps for USB; that has its * own headers. So it is written, so it is done. * * For source-code compatibility, we also define DLT_USB to have this * value. We do it numerically so that, if code that includes this * file (directly or indirectly) also includes an OS header that also * defines DLT_USB as 186, we don't get a redefinition warning. * (NetBSD 7 does that.) */ #define DLT_USB_FREEBSD 186 #define DLT_USB 186 /* * Bluetooth HCI UART transport layer (part H:4); requested by * Paolo Abeni. */ #define DLT_BLUETOOTH_HCI_H4 187 /* * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz * . */ #define DLT_IEEE802_16_MAC_CPS 188 /* * USB packets, beginning with a Linux USB header; requested by * Paolo Abeni . */ #define DLT_USB_LINUX 189 /* * Controller Area Network (CAN) v. 2.0B packets. * DLT_ requested by Gianluca Varenni . * Used to dump CAN packets coming from a CAN Vector board. * More documentation on the CAN v2.0B frames can be found at * http://www.can-cia.org/downloads/?269 */ #define DLT_CAN20B 190 /* * IEEE 802.15.4, with address fields padded, as is done by Linux * drivers; requested by Juergen Schimmer. */ #define DLT_IEEE802_15_4_LINUX 191 /* * Per Packet Information encapsulated packets. * DLT_ requested by Gianluca Varenni . */ #define DLT_PPI 192 /* * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; * requested by Charles Clancy. */ #define DLT_IEEE802_16_MAC_CPS_RADIO 193 /* * Juniper-private data link type, as per request from * Hannes Gredler . * The DLT_ is used for internal communication with a * integrated service module (ISM). */ #define DLT_JUNIPER_ISM 194 /* * IEEE 802.15.4, exactly as it appears in the spec (no padding, no * nothing); requested by Mikko Saarnivala . * For this one, we expect the FCS to be present at the end of the frame; * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used. * * We keep the name DLT_IEEE802_15_4 as an alias for backwards * compatibility, but, again, this should *only* be used for 802.15.4 * frames that include the FCS. */ #define DLT_IEEE802_15_4_WITHFCS 195 #define DLT_IEEE802_15_4 DLT_IEEE802_15_4_WITHFCS /* * Various link-layer types, with a pseudo-header, for SITA * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com). */ #define DLT_SITA 196 /* * Various link-layer types, with a pseudo-header, for Endace DAG cards; * encapsulates Endace ERF records. Requested by Stephen Donnelly * . */ #define DLT_ERF 197 /* * Special header prepended to Ethernet packets when capturing from a * u10 Networks board. Requested by Phil Mulholland * . */ #define DLT_RAIF1 198 /* * IPMB packet for IPMI, beginning with a 2-byte header, followed by * the I2C slave address, followed by the netFn and LUN, etc.. * Requested by Chanthy Toeung . * * XXX - this used to be called DLT_IPMB, back when we got the * impression from the email thread requesting it that the packet * had no extra 2-byte header. We've renamed it; if anybody used * DLT_IPMB and assumed no 2-byte header, this will cause the compile * to fail, at which point we'll have to figure out what to do about * the two header types using the same DLT_/LINKTYPE_ value. If that * doesn't happen, we'll assume nobody used it and that the redefinition * is safe. */ #define DLT_IPMB_KONTRON 199 /* * Juniper-private data link type, as per request from * Hannes Gredler . * The DLT_ is used for capturing data on a secure tunnel interface. */ #define DLT_JUNIPER_ST 200 /* * Bluetooth HCI UART transport layer (part H:4), with pseudo-header * that includes direction information; requested by Paolo Abeni. */ #define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 /* * AX.25 packet with a 1-byte KISS header; see * * http://www.ax25.net/kiss.htm * * as per Richard Stearn . */ #define DLT_AX25_KISS 202 /* * LAPD packets from an ISDN channel, starting with the address field, * with no pseudo-header. * Requested by Varuna De Silva . */ #define DLT_LAPD 203 /* * PPP, with a one-byte direction pseudo-header prepended - zero means * "received by this host", non-zero (any non-zero value) means "sent by * this host" - as per Will Barker . */ #define DLT_PPP_WITH_DIR 204 /* Don't confuse with DLT_PPP_WITH_DIRECTION */ /* * Cisco HDLC, with a one-byte direction pseudo-header prepended - zero * means "received by this host", non-zero (any non-zero value) means * "sent by this host" - as per Will Barker . */ #define DLT_C_HDLC_WITH_DIR 205 /* * Frame Relay, with a one-byte direction pseudo-header prepended - zero * means "received by this host" (DCE -> DTE), non-zero (any non-zero * value) means "sent by this host" (DTE -> DCE) - as per Will Barker * . */ #define DLT_FRELAY_WITH_DIR 206 /* * LAPB, with a one-byte direction pseudo-header prepended - zero means * "received by this host" (DCE -> DTE), non-zero (any non-zero value) * means "sent by this host" (DTE -> DCE)- as per Will Barker * . */ #define DLT_LAPB_WITH_DIR 207 /* * 208 is reserved for an as-yet-unspecified proprietary link-layer * type, as requested by Will Barker. */ /* * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman * . */ #define DLT_IPMB_LINUX 209 /* * FlexRay automotive bus - http://www.flexray.com/ - as requested * by Hannes Kaelber . */ #define DLT_FLEXRAY 210 /* * Media Oriented Systems Transport (MOST) bus for multimedia * transport - http://www.mostcooperation.com/ - as requested * by Hannes Kaelber . */ #define DLT_MOST 211 /* * Local Interconnect Network (LIN) bus for vehicle networks - * http://www.lin-subbus.org/ - as requested by Hannes Kaelber * . */ #define DLT_LIN 212 /* * X2E-private data link type used for serial line capture, * as requested by Hannes Kaelber . */ #define DLT_X2E_SERIAL 213 /* * X2E-private data link type used for the Xoraya data logger * family, as requested by Hannes Kaelber . */ #define DLT_X2E_XORAYA 214 /* * IEEE 802.15.4, exactly as it appears in the spec (no padding, no * nothing), but with the PHY-level data for non-ASK PHYs (4 octets * of 0 as preamble, one octet of SFD, one octet of frame length+ * reserved bit, and then the MAC-layer data, starting with the * frame control field). * * Requested by Max Filippov . */ #define DLT_IEEE802_15_4_NONASK_PHY 215 /* * David Gibson requested this for * captures from the Linux kernel /dev/input/eventN devices. This * is used to communicate keystrokes and mouse movements from the * Linux kernel to display systems, such as Xorg. */ #define DLT_LINUX_EVDEV 216 /* * GSM Um and Abis interfaces, preceded by a "gsmtap" header. * * Requested by Harald Welte . */ #define DLT_GSMTAP_UM 217 #define DLT_GSMTAP_ABIS 218 /* * MPLS, with an MPLS label as the link-layer header. * Requested by Michele Marchetto on behalf * of OpenBSD. */ #define DLT_MPLS 219 /* * USB packets, beginning with a Linux USB header, with the USB header * padded to 64 bytes; required for memory-mapped access. */ #define DLT_USB_LINUX_MMAPPED 220 /* * DECT packets, with a pseudo-header; requested by * Matthias Wenzel . */ #define DLT_DECT 221 /* * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" * Date: Mon, 11 May 2009 11:18:30 -0500 * * DLT_AOS. We need it for AOS Space Data Link Protocol. * I have already written dissectors for but need an OK from * legal before I can submit a patch. * */ #define DLT_AOS 222 /* * Wireless HART (Highway Addressable Remote Transducer) * From the HART Communication Foundation * IES/PAS 62591 * * Requested by Sam Roberts . */ #define DLT_WIHART 223 /* * Fibre Channel FC-2 frames, beginning with a Frame_Header. * Requested by Kahou Lei . */ #define DLT_FC_2 224 /* * Fibre Channel FC-2 frames, beginning with an encoding of the * SOF, and ending with an encoding of the EOF. * * The encodings represent the frame delimiters as 4-byte sequences * representing the corresponding ordered sets, with K28.5 * represented as 0xBC, and the D symbols as the corresponding * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2, * is represented as 0xBC 0xB5 0x55 0x55. * * Requested by Kahou Lei . */ #define DLT_FC_2_WITH_FRAME_DELIMS 225 /* * Solaris ipnet pseudo-header; requested by Darren Reed . * * The pseudo-header starts with a one-byte version number; for version 2, * the pseudo-header is: * * struct dl_ipnetinfo { * uint8_t dli_version; * uint8_t dli_family; * uint16_t dli_htype; * uint32_t dli_pktlen; * uint32_t dli_ifindex; * uint32_t dli_grifindex; * uint32_t dli_zsrc; * uint32_t dli_zdst; * }; * * dli_version is 2 for the current version of the pseudo-header. * * dli_family is a Solaris address family value, so it's 2 for IPv4 * and 26 for IPv6. * * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing * packets, and 2 for packets arriving from another zone on the same * machine. * * dli_pktlen is the length of the packet data following the pseudo-header * (so the captured length minus dli_pktlen is the length of the * pseudo-header, assuming the entire pseudo-header was captured). * * dli_ifindex is the interface index of the interface on which the * packet arrived. * * dli_grifindex is the group interface index number (for IPMP interfaces). * * dli_zsrc is the zone identifier for the source of the packet. * * dli_zdst is the zone identifier for the destination of the packet. * * A zone number of 0 is the global zone; a zone number of 0xffffffff * means that the packet arrived from another host on the network, not * from another zone on the same machine. * * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates * which of those it is. */ #define DLT_IPNET 226 /* * CAN (Controller Area Network) frames, with a pseudo-header as supplied * by Linux SocketCAN, and with multi-byte numerical fields in that header * in big-endian byte order. * * See Documentation/networking/can.txt in the Linux source. * * Requested by Felix Obenhuber . */ #define DLT_CAN_SOCKETCAN 227 /* * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies * whether it's v4 or v6. Requested by Darren Reed . */ #define DLT_IPV4 228 #define DLT_IPV6 229 /* * IEEE 802.15.4, exactly as it appears in the spec (no padding, no * nothing), and with no FCS at the end of the frame; requested by * Jon Smirl . */ #define DLT_IEEE802_15_4_NOFCS 230 /* * Raw D-Bus: * * http://www.freedesktop.org/wiki/Software/dbus * * messages: * * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages * * starting with the endianness flag, followed by the message type, etc., * but without the authentication handshake before the message sequence: * * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol * * Requested by Martin Vidner . */ #define DLT_DBUS 231 /* * Juniper-private data link type, as per request from * Hannes Gredler . */ #define DLT_JUNIPER_VS 232 #define DLT_JUNIPER_SRX_E2E 233 #define DLT_JUNIPER_FIBRECHANNEL 234 /* * DVB-CI (DVB Common Interface for communication between a PC Card * module and a DVB receiver). See * * http://www.kaiser.cx/pcap-dvbci.html * * for the specification. * * Requested by Martin Kaiser . */ #define DLT_DVB_CI 235 /* * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but * *not* the same as, 27.010). Requested by Hans-Christoph Schemmel * . */ #define DLT_MUX27010 236 /* * STANAG 5066 D_PDUs. Requested by M. Baris Demiray * . */ #define DLT_STANAG_5066_D_PDU 237 /* * Juniper-private data link type, as per request from * Hannes Gredler . */ #define DLT_JUNIPER_ATM_CEMIC 238 /* * NetFilter LOG messages * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets) * * Requested by Jakub Zawadzki */ #define DLT_NFLOG 239 /* * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type * for Ethernet packets with a 4-byte pseudo-header and always * with the payload including the FCS, as supplied by their * netANALYZER hardware and software. * * Requested by Holger P. Frommer */ #define DLT_NETANALYZER 240 /* * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type * for Ethernet packets with a 4-byte pseudo-header and FCS and * with the Ethernet header preceded by 7 bytes of preamble and * 1 byte of SFD, as supplied by their netANALYZER hardware and * software. * * Requested by Holger P. Frommer */ #define DLT_NETANALYZER_TRANSPARENT 241 /* * IP-over-InfiniBand, as specified by RFC 4391. * * Requested by Petr Sumbera . */ #define DLT_IPOIB 242 /* * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0). * * Requested by Guy Martin . */ #define DLT_MPEG_2_TS 243 /* * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as * used by their ng40 protocol tester. * * Requested by Jens Grimmer . */ #define DLT_NG40 244 /* * Pseudo-header giving adapter number and flags, followed by an NFC * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU, * as specified by NFC Forum Logical Link Control Protocol Technical * Specification LLCP 1.1. * * Requested by Mike Wakerly . */ #define DLT_NFC_LLCP 245 /* * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose. * * DLT_PFSYNC has different values on different platforms, and all of * them collide with something used elsewhere. On platforms that * don't already define it, define it as 246. */ #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__) #define DLT_PFSYNC 246 #endif /* * Raw InfiniBand packets, starting with the Local Routing Header. * * Requested by Oren Kladnitsky . */ #define DLT_INFINIBAND 247 /* * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6). * * Requested by Michael Tuexen . */ #define DLT_SCTP 248 /* * USB packets, beginning with a USBPcap header. * * Requested by Tomasz Mon */ #define DLT_USBPCAP 249 /* * Schweitzer Engineering Laboratories "RTAC" product serial-line * packets. * * Requested by Chris Bontje . */ #define DLT_RTAC_SERIAL 250 /* * Bluetooth Low Energy air interface link-layer packets. * * Requested by Mike Kershaw . */ #define DLT_BLUETOOTH_LE_LL 251 /* * DLT type for upper-protocol layer PDU saves from wireshark. * * the actual contents are determined by two TAGs stored with each * packet: * EXP_PDU_TAG_LINKTYPE the link type (LINKTYPE_ value) of the * original packet. * * EXP_PDU_TAG_PROTO_NAME the name of the wireshark dissector * that can make sense of the data stored. */ #define DLT_WIRESHARK_UPPER_PDU 252 /* * DLT type for the netlink protocol (nlmon devices). */ #define DLT_NETLINK 253 /* * Bluetooth Linux Monitor headers for the BlueZ stack. */ #define DLT_BLUETOOTH_LINUX_MONITOR 254 /* * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as * captured by Ubertooth. */ #define DLT_BLUETOOTH_BREDR_BB 255 /* * Bluetooth Low Energy link layer packets, as captured by Ubertooth. */ #define DLT_BLUETOOTH_LE_LL_WITH_PHDR 256 /* * PROFIBUS data link layer. */ #define DLT_PROFIBUS_DL 257 /* * Apple's DLT_PKTAP headers. * * Sadly, the folks at Apple either had no clue that the DLT_USERn values * are for internal use within an organization and partners only, and * didn't know that the right way to get a link-layer header type is to * ask tcpdump.org for one, or knew and didn't care, so they just * used DLT_USER2, which causes problems for everything except for * their version of tcpdump. * * So I'll just give them one; hopefully this will show up in a * libpcap release in time for them to get this into 10.10 Big Sur * or whatever Mavericks' successor is called. LINKTYPE_PKTAP * will be 258 *even on macOS*; that is *intentional*, so that * PKTAP files look the same on *all* OSes (different OSes can have * different numerical values for a given DLT_, but *MUST NOT* have * different values for what goes in a file, as files can be moved * between OSes!). * * When capturing, on a system with a Darwin-based OS, on a device * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this * version of libpcap, the DLT_ value for the pcap_t will be DLT_PKTAP, * and that will continue to be DLT_USER2 on Darwin-based OSes. That way, * binary compatibility with Mavericks is preserved for programs using * this version of libpcap. This does mean that if you were using * DLT_USER2 for some capture device on macOS, you can't do so with * this version of libpcap, just as you can't with Apple's libpcap - * on macOS, they define DLT_PKTAP to be DLT_USER2, so programs won't * be able to distinguish between PKTAP and whatever you were using * DLT_USER2 for. * * If the program saves the capture to a file using this version of * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes. * That way, the file will *not* be a DLT_USER2 file. That means * that the latest version of tcpdump, when built with this version * of libpcap, and sufficiently recent versions of Wireshark will * be able to read those files and interpret them correctly; however, * Apple's version of tcpdump in OS X 10.9 won't be able to handle * them. (Hopefully, Apple will pick up this version of libpcap, * and the corresponding version of tcpdump, so that tcpdump will * be able to handle the old LINKTYPE_USER2 captures *and* the new * LINKTYPE_PKTAP captures.) */ #ifdef __APPLE__ #define DLT_PKTAP DLT_USER2 #else #define DLT_PKTAP 258 #endif /* * Ethernet packets preceded by a header giving the last 6 octets * of the preamble specified by 802.3-2012 Clause 65, section * 65.1.3.2 "Transmit". */ #define DLT_EPON 259 /* * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format" * in the PICMG HPM.2 specification. */ #define DLT_IPMI_HPM_2 260 /* * per Joshua Wright , formats for Zwave captures. */ #define DLT_ZWAVE_R1_R2 261 #define DLT_ZWAVE_R3 262 /* * per Steve Karg , formats for Wattstopper * Digital Lighting Management room bus serial protocol captures. */ #define DLT_WATTSTOPPER_DLM 263 /* * ISO 14443 contactless smart card messages. */ #define DLT_ISO_14443 264 /* * Radio data system (RDS) groups. IEC 62106. * Per Jonathan Brucker . */ #define DLT_RDS 265 /* * USB packets, beginning with a Darwin (macOS, etc.) header. */ #define DLT_USB_DARWIN 266 /* * OpenBSD DLT_OPENFLOW. */ #define DLT_OPENFLOW 267 /* * SDLC frames containing SNA PDUs. */ #define DLT_SDLC 268 /* * per "Selvig, Bjorn" used for * TI protocol sniffer. */ #define DLT_TI_LLN_SNIFFER 269 /* * per: Erik de Jong for * https://github.com/eriknl/LoRaTap/releases/tag/v0.1 */ #define DLT_LORATAP 270 /* * per: Stefanha at gmail.com for * http://lists.sandelman.ca/pipermail/tcpdump-workers/2017-May/000772.html * and: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vsockmon.h * for: http://qemu-project.org/Features/VirtioVsock */ #define DLT_VSOCK 271 /* * Nordic Semiconductor Bluetooth LE sniffer. */ #define DLT_NORDIC_BLE 272 /* * Excentis DOCSIS 3.1 RF sniffer (XRA-31) * per: bruno.verstuyft at excentis.com * http://www.xra31.com/xra-header */ #define DLT_DOCSIS31_XRA31 273 /* * mPackets, as specified by IEEE 802.3br Figure 99-4, starting * with the preamble and always ending with a CRC field. */ #define DLT_ETHERNET_MPACKET 274 /* * DisplayPort AUX channel monitoring data as specified by VESA * DisplayPort(DP) Standard preceeded by a pseudo-header. * per dirk.eibach at gdsys.cc */ #define DLT_DISPLAYPORT_AUX 275 /* * Linux cooked sockets v2. */ #define DLT_LINUX_SLL2 276 /* * In case the code that includes this file (directly or indirectly) * has also included OS files that happen to define DLT_MATCHING_MAX, * with a different value (perhaps because that OS hasn't picked up * the latest version of our DLT definitions), we undefine the * previous value of DLT_MATCHING_MAX. */ #ifdef DLT_MATCHING_MAX #undef DLT_MATCHING_MAX #endif #define DLT_MATCHING_MAX 276 /* highest value in the "matching" range */ /* * DLT and savefile link type values are split into a class and * a member of that class. A class value of 0 indicates a regular * DLT_/LINKTYPE_ value. */ #define DLT_CLASS(x) ((x) & 0x03ff0000) /* * NetBSD-specific generic "raw" link type. The class value indicates * that this is the generic raw type, and the lower 16 bits are the * address family we're dealing with. Those values are NetBSD-specific; * do not assume that they correspond to AF_ values for your operating * system. */ #define DLT_CLASS_NETBSD_RAWAF 0x02240000 #define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af)) #define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff) #define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF) #endif /* !defined(lib_pcap_dlt_h) */ PKZCD? pcap/can_socketcan.hnu[/*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lib_pcap_can_socketcan_h #define lib_pcap_can_socketcan_h #include /* * SocketCAN header, as per Documentation/networking/can.txt in the * Linux source. */ typedef struct { uint32_t can_id; uint8_t payload_length; uint8_t pad; uint8_t reserved1; uint8_t reserved2; } pcap_can_socketcan_hdr; #endif PKZ_@$$pcap/funcattrs.hnu[/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ /* * Copyright (c) 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lib_pcap_funcattrs_h #define lib_pcap_funcattrs_h #include /* * Attributes to apply to functions and their arguments, using various * compiler-specific extensions. */ /* * PCAP_API_DEF must be used when defining *data* exported from * libpcap. It can be used when defining *functions* exported * from libpcap, but it doesn't have to be used there. It * should not be used in declarations in headers. * * PCAP_API must be used when *declaring* data or functions * exported from libpcap; PCAP_API_DEF won't work on all platforms. */ #if defined(_WIN32) /* * For Windows: * * when building libpcap: * * if we're building it as a DLL, we have to declare API * functions with __declspec(dllexport); * * if we're building it as a static library, we don't want * to do so. * * when using libpcap: * * if we're using the DLL, calls to its functions are a * little more efficient if they're declared with * __declspec(dllimport); * * if we're not using the dll, we don't want to declare * them that way. * * So: * * if pcap_EXPORTS is defined, we define PCAP_API_DEF as * __declspec(dllexport); * * if PCAP_DLL is defined, we define PCAP_API_DEF as * __declspec(dllimport); * * otherwise, we define PCAP_API_DEF as nothing. */ #if defined(pcap_EXPORTS) /* * We're compiling libpcap as a DLL, so we should export functions * in our API. */ #define PCAP_API_DEF __declspec(dllexport) #elif defined(PCAP_DLL) /* * We're using libpcap as a DLL, so the calls will be a little more * efficient if we explicitly import the functions. */ #define PCAP_API_DEF __declspec(dllimport) #else /* * Either we're building libpcap as a static library, or we're using * it as a static library, or we don't know for certain that we're * using it as a dynamic library, so neither import nor export the * functions explicitly. */ #define PCAP_API_DEF #endif #elif defined(MSDOS) /* XXX - does this need special treatment? */ #define PCAP_API_DEF #else /* UN*X */ #ifdef pcap_EXPORTS /* * We're compiling libpcap as a (dynamic) shared library, so we should * export functions in our API. The compiler might be configured not * to export functions from a shared library by default, so we might * have to explicitly mark functions as exported. */ #if PCAP_IS_AT_LEAST_GNUC_VERSION(3,4) \ || PCAP_IS_AT_LEAST_XL_C_VERSION(12,0) /* * GCC 3.4 or later, or some compiler asserting compatibility with * GCC 3.4 or later, or XL C 13.0 or later, so we have * __attribute__((visibility()). */ #define PCAP_API_DEF __attribute__((visibility("default"))) #elif PCAP_IS_AT_LEAST_SUNC_VERSION(5,5) /* * Sun C 5.5 or later, so we have __global. * (Sun C 5.9 and later also have __attribute__((visibility()), * but there's no reason to prefer it with Sun C.) */ #define PCAP_API_DEF __global #else /* * We don't have anything to say. */ #define PCAP_API_DEF #endif #else /* * We're not building libpcap. */ #define PCAP_API_DEF #endif #endif /* _WIN32/MSDOS/UN*X */ #define PCAP_API PCAP_API_DEF extern /* * PCAP_NORETURN, before a function declaration, means "this function * never returns". (It must go before the function declaration, e.g. * "extern PCAP_NORETURN func(...)" rather than after the function * declaration, as the MSVC version has to go before the declaration.) * * PCAP_NORETURN_DEF, before a function *definition*, means "this * function never returns"; it would be used only for static functions * that are defined before any use, and thus have no declaration. * (MSVC doesn't support that; I guess the "decl" in "__declspec" * means "declaration", and __declspec doesn't work with definitions.) */ #if __has_attribute(noreturn) \ || PCAP_IS_AT_LEAST_GNUC_VERSION(2,5) \ || PCAP_IS_AT_LEAST_SUNC_VERSION(5,9) \ || PCAP_IS_AT_LEAST_XL_C_VERSION(10,1) \ || PCAP_IS_AT_LEAST_HP_C_VERSION(6,10) /* * Compiler with support for __attribute((noreturn)), or GCC 2.5 or * later, or some compiler asserting compatibility with GCC 2.5 or * later, or Solaris Studio 12 (Sun C 5.9) or later, or IBM XL C 10.1 * or later (do any earlier versions of XL C support this?), or HP aCC * A.06.10 or later. */ #define PCAP_NORETURN __attribute((noreturn)) #define PCAP_NORETURN_DEF __attribute((noreturn)) #elif defined(_MSC_VER) /* * MSVC. */ #define PCAP_NORETURN __declspec(noreturn) #define PCAP_NORETURN_DEF #else #define PCAP_NORETURN #define PCAP_NORETURN_DEF #endif /* * PCAP_PRINTFLIKE(x,y), after a function declaration, means "this function * does printf-style formatting, with the xth argument being the format * string and the yth argument being the first argument for the format * string". */ #if __has_attribute(__format__) \ || PCAP_IS_AT_LEAST_GNUC_VERSION(2,3) \ || PCAP_IS_AT_LEAST_XL_C_VERSION(10,1) \ || PCAP_IS_AT_LEAST_HP_C_VERSION(6,10) /* * Compiler with support for it, or GCC 2.3 or later, or some compiler * asserting compatibility with GCC 2.3 or later, or IBM XL C 10.1 * and later (do any earlier versions of XL C support this?), * or HP aCC A.06.10 and later. */ #define PCAP_PRINTFLIKE(x,y) __attribute__((__format__(__printf__,x,y))) #else #define PCAP_PRINTFLIKE(x,y) #endif /* * PCAP_DEPRECATED(func, msg), after a function declaration, marks the * function as deprecated. * * The first argument is the name of the function; the second argument is * a string giving the warning message to use if the compiler supports that. * * (Thank you, Microsoft, for requiring the function name.) */ #if __has_attribute(deprecated) \ || PCAP_IS_AT_LEAST_GNUC_VERSION(4,5) \ || PCAP_IS_AT_LEAST_SUNC_VERSION(5,13) /* * Compiler that supports __has_attribute and __attribute__((deprecated)), * or GCC 4.5 or later, or Sun/Oracle C 12.4 (Sun C 5.13) or later. * * Those support __attribute__((deprecated(msg))) (we assume, perhaps * incorrectly, that anything that supports __has_attribute() is * recent enough to support __attribute__((deprecated(msg)))). */ #define PCAP_DEPRECATED(func, msg) __attribute__((deprecated(msg))) #elif PCAP_IS_AT_LEAST_GNUC_VERSION(3,1) /* * GCC 3.1 through 4.4. * * Those support __attribute__((deprecated)) but not * __attribute__((deprecated(msg))). */ #define PCAP_DEPRECATED(func, msg) __attribute__((deprecated)) #elif (defined(_MSC_VER) && (_MSC_VER >= 1500)) && !defined(BUILDING_PCAP) /* * MSVC from Visual Studio 2008 or later, and we're not building * libpcap itself. * * If we *are* building libpcap, we don't want this, as it'll warn * us even if we *define* the function. */ #define PCAP_DEPRECATED(func, msg) __pragma(deprecated(func)) #else #define PCAP_DEPRECATED(func, msg) #endif /* * For flagging arguments as format strings in MSVC. */ #ifdef _MSC_VER #include #if _MSC_VER > 1400 #define PCAP_FORMAT_STRING(p) _Printf_format_string_ p #else #define PCAP_FORMAT_STRING(p) __format_string p #endif #else #define PCAP_FORMAT_STRING(p) p #endif #endif /* lib_pcap_funcattrs_h */ PKZl-*pcap/bluetooth.hnu[/* * Copyright (c) 2006 Paolo Abeni (Italy) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * bluetooth data struct * By Paolo Abeni */ #ifndef lib_pcap_bluetooth_h #define lib_pcap_bluetooth_h #include /* * Header prepended libpcap to each bluetooth h4 frame, * fields are in network byte order */ typedef struct _pcap_bluetooth_h4_header { uint32_t direction; /* if first bit is set direction is incoming */ } pcap_bluetooth_h4_header; /* * Header prepended libpcap to each bluetooth linux monitor frame, * fields are in network byte order */ typedef struct _pcap_bluetooth_linux_monitor_header { uint16_t adapter_id; uint16_t opcode; } pcap_bluetooth_linux_monitor_header; #endif PKZC^pcap/pcap-inttypes.hnu[/* * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy) * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Politecnico di Torino nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef pcap_pcap_inttypes_h #define pcap_pcap_inttypes_h /* * Get the integer types and PRi[doux]64 values from C99 * defined, by hook or by crook. */ #if defined(_MSC_VER) /* * Compiler is MSVC. */ #if _MSC_VER >= 1800 /* * VS 2013 or newer; we have . */ #include #else /* * Earlier VS; we have to define this stuff ourselves. */ typedef unsigned char uint8_t; typedef signed char int8_t; typedef unsigned short uint16_t; typedef signed short int16_t; typedef unsigned int uint32_t; typedef signed int int32_t; #ifdef _MSC_EXTENSIONS typedef unsigned _int64 uint64_t; typedef _int64 int64_t; #else /* _MSC_EXTENSIONS */ typedef unsigned long long uint64_t; typedef long long int64_t; #endif #endif /* * These may be defined by . * * XXX - for MSVC, we always want the _MSC_EXTENSIONS versions. * What about other compilers? If, as the MinGW Web site says MinGW * does, the other compilers just use Microsoft's run-time library, * then they should probably use the _MSC_EXTENSIONS even if the * compiler doesn't define _MSC_EXTENSIONS. * * XXX - we currently aren't using any of these, but this allows * their use in the future. */ #ifndef PRId64 #ifdef _MSC_EXTENSIONS #define PRId64 "I64d" #else #define PRId64 "lld" #endif #endif /* PRId64 */ #ifndef PRIo64 #ifdef _MSC_EXTENSIONS #define PRIo64 "I64o" #else #define PRIo64 "llo" #endif #endif /* PRIo64 */ #ifndef PRIx64 #ifdef _MSC_EXTENSIONS #define PRIx64 "I64x" #else #define PRIx64 "llx" #endif #endif #ifndef PRIu64 #ifdef _MSC_EXTENSIONS #define PRIu64 "I64u" #else #define PRIu64 "llu" #endif #endif /* * MSVC's support library doesn't support %zu to print a size_t until * Visual Studio 2017, but supports %Iu earlier, so use that. */ #define PRIsize "Iu" #elif defined(__MINGW32__) || !defined(_WIN32) /* * Compiler is MinGW or target is UN*X or MS-DOS. Just use * . */ #include /* * Assume the support library supports %zu; it's required by C99. */ #define PRIsize "zu" #endif #endif /* pcap/pcap-inttypes.h */ PKZ? r]2 2 pcap/namedb.hnu[/* * Copyright (c) 1994, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Computer Systems * Engineering Group at Lawrence Berkeley Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lib_pcap_namedb_h #define lib_pcap_namedb_h #ifdef __cplusplus extern "C" { #endif /* * As returned by the pcap_next_etherent() * XXX this stuff doesn't belong in this interface, but this * library already must do name to address translation, so * on systems that don't have support for /etc/ethers, we * export these hooks since they're already being used by * some applications (such as tcpdump) and already being * marked as exported in some OSes offering libpcap (such * as Debian). */ struct pcap_etherent { u_char addr[6]; char name[122]; }; #ifndef PCAP_ETHERS_FILE #define PCAP_ETHERS_FILE "/etc/ethers" #endif PCAP_API struct pcap_etherent *pcap_next_etherent(FILE *); PCAP_API u_char *pcap_ether_hostton(const char*); PCAP_API u_char *pcap_ether_aton(const char *); PCAP_API bpf_u_int32 **pcap_nametoaddr(const char *); PCAP_API struct addrinfo *pcap_nametoaddrinfo(const char *); PCAP_API bpf_u_int32 pcap_nametonetaddr(const char *); PCAP_API int pcap_nametoport(const char *, int *, int *); PCAP_API int pcap_nametoportrange(const char *, int *, int *, int *); PCAP_API int pcap_nametoproto(const char *); PCAP_API int pcap_nametoeproto(const char *); PCAP_API int pcap_nametollc(const char *); /* * If a protocol is unknown, PROTO_UNDEF is returned. * Also, pcap_nametoport() returns the protocol along with the port number. * If there are ambiguous entried in /etc/services (i.e. domain * can be either tcp or udp) PROTO_UNDEF is returned. */ #define PROTO_UNDEF -1 #ifdef __cplusplus } #endif #endif PKZF,** pcap/vlan.hnu[/*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef lib_pcap_vlan_h #define lib_pcap_vlan_h #include struct vlan_tag { uint16_t vlan_tpid; /* ETH_P_8021Q */ uint16_t vlan_tci; /* VLAN TCI */ }; #define VLAN_TAG_LEN 4 #endif PKZ  pcap/sll.hnu[/*- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * For captures on Linux cooked sockets, we construct a fake header * that includes: * * a 2-byte "packet type" which is one of: * * LINUX_SLL_HOST packet was sent to us * LINUX_SLL_BROADCAST packet was broadcast * LINUX_SLL_MULTICAST packet was multicast * LINUX_SLL_OTHERHOST packet was sent to somebody else * LINUX_SLL_OUTGOING packet was sent *by* us; * * a 2-byte Ethernet protocol field; * * a 2-byte link-layer type; * * a 2-byte link-layer address length; * * an 8-byte source link-layer address, whose actual length is * specified by the previous value. * * All fields except for the link-layer address are in network byte order. * * DO NOT change the layout of this structure, or change any of the * LINUX_SLL_ values below. If you must change the link-layer header * for a "cooked" Linux capture, introduce a new DLT_ type (ask * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it * a value that collides with a value already being used), and use the * new header in captures of that type, so that programs that can * handle DLT_LINUX_SLL captures will continue to handle them correctly * without any change, and so that capture files with different headers * can be told apart and programs that read them can dissect the * packets in them. */ #ifndef lib_pcap_sll_h #define lib_pcap_sll_h #include /* * A DLT_LINUX_SLL fake link-layer header. */ #define SLL_HDR_LEN 16 /* total header length */ #define SLL_ADDRLEN 8 /* length of address field */ struct sll_header { uint16_t sll_pkttype; /* packet type */ uint16_t sll_hatype; /* link-layer address type */ uint16_t sll_halen; /* link-layer address length */ uint8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */ uint16_t sll_protocol; /* protocol */ }; /* * A DLT_LINUX_SLL2 fake link-layer header. */ #define SLL2_HDR_LEN 20 /* total header length */ struct sll2_header { uint16_t sll2_protocol; /* protocol */ uint16_t sll2_reserved_mbz; /* reserved - must be zero */ uint32_t sll2_if_index; /* 1-based interface index */ uint16_t sll2_hatype; /* link-layer address type */ uint8_t sll2_pkttype; /* packet type */ uint8_t sll2_halen; /* link-layer address length */ uint8_t sll2_addr[SLL_ADDRLEN]; /* link-layer address */ }; /* * The LINUX_SLL_ values for "sll_pkttype" and LINUX_SLL2_ values for * "sll2_pkttype"; these correspond to the PACKET_ values on Linux, * which are defined by a header under include/uapi in the current * kernel source, and are thus not going to change on Linux. We * define them here so that they're available even on systems other * than Linux. */ #define LINUX_SLL_HOST 0 #define LINUX_SLL_BROADCAST 1 #define LINUX_SLL_MULTICAST 2 #define LINUX_SLL_OTHERHOST 3 #define LINUX_SLL_OUTGOING 4 /* * The LINUX_SLL_ values for "sll_protocol" and LINUX_SLL2_ values for * "sll2_protocol"; these correspond to the ETH_P_ values on Linux, but * are defined here so that they're available even on systems other than * Linux. We assume, for now, that the ETH_P_ values won't change in * Linux; if they do, then: * * if we don't translate them in "pcap-linux.c", capture files * won't necessarily be readable if captured on a system that * defines ETH_P_ values that don't match these values; * * if we do translate them in "pcap-linux.c", that makes life * unpleasant for the BPF code generator, as the values you test * for in the kernel aren't the values that you test for when * reading a capture file, so the fixup code run on BPF programs * handed to the kernel ends up having to do more work. * * Add other values here as necessary, for handling packet types that * might show up on non-Ethernet, non-802.x networks. (Not all the ones * in the Linux "if_ether.h" will, I suspect, actually show up in * captures.) */ #define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */ #define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */ #define LINUX_SLL_P_CAN 0x000C /* CAN frames, with SocketCAN pseudo-headers */ #define LINUX_SLL_P_CANFD 0x000D /* CAN FD frames, with SocketCAN pseudo-headers */ #endif PKZterm.hnu[/**************************************************************************** * Copyright (c) 1998-2013,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * * "Software"), to deal in the Software without restriction, including * * without limitation the rights to use, copy, modify, merge, publish, * * distribute, distribute with modifications, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included * * in all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * * Except as contained in this notice, the name(s) of the above copyright * * holders shall not be used in advertising or otherwise to promote the * * sale, use or other dealings in this Software without prior written * * authorization. * ****************************************************************************/ /****************************************************************************/ /* Author: Zeyd M. Ben-Halim 1992,1995 */ /* and: Eric S. Raymond */ /* and: Thomas E. Dickey 1995-on */ /****************************************************************************/ /* $Id: MKterm.h.awk.in,v 1.67 2017/04/06 00:19:26 tom Exp $ */ /* ** term.h -- Definition of struct term */ #ifndef NCURSES_TERM_H_incl #define NCURSES_TERM_H_incl 1 #undef NCURSES_VERSION #define NCURSES_VERSION "6.1" #include #ifdef __cplusplus extern "C" { #endif /* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H * definition (based on the system for which this was configured). */ #undef NCURSES_CONST #define NCURSES_CONST const #undef NCURSES_SBOOL #define NCURSES_SBOOL char #undef NCURSES_USE_DATABASE #define NCURSES_USE_DATABASE 1 #undef NCURSES_USE_TERMCAP #define NCURSES_USE_TERMCAP 0 #undef NCURSES_XNAMES #define NCURSES_XNAMES 1 /* We will use these symbols to hide differences between * termios/termio/sgttyb interfaces. */ #undef TTY #undef SET_TTY #undef GET_TTY /* Assume POSIX termio if we have the header and function */ /* #if HAVE_TERMIOS_H && HAVE_TCGETATTR */ #if 1 && 1 #undef TERMIOS #define TERMIOS 1 #include #define TTY struct termios #else /* !HAVE_TERMIOS_H */ /* #if HAVE_TERMIO_H */ #if 1 #undef TERMIOS #define TERMIOS 1 #include #define TTY struct termio #else /* !HAVE_TERMIO_H */ #if __MINGW32__ # include # define TTY struct termios #else #undef TERMIOS #include #include #define TTY struct sgttyb #endif /* MINGW32 */ #endif /* HAVE_TERMIO_H */ #endif /* HAVE_TERMIOS_H */ #ifdef TERMIOS #define GET_TTY(fd, buf) tcgetattr(fd, buf) #define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf) #else #define GET_TTY(fd, buf) gtty(fd, buf) #define SET_TTY(fd, buf) stty(fd, buf) #endif #define NAMESIZE 256 /* The cast works because TERMTYPE is the first data in TERMINAL */ #define CUR ((TERMTYPE *)(cur_term))-> #define auto_left_margin CUR Booleans[0] #define auto_right_margin CUR Booleans[1] #define no_esc_ctlc CUR Booleans[2] #define ceol_standout_glitch CUR Booleans[3] #define eat_newline_glitch CUR Booleans[4] #define erase_overstrike CUR Booleans[5] #define generic_type CUR Booleans[6] #define hard_copy CUR Booleans[7] #define has_meta_key CUR Booleans[8] #define has_status_line CUR Booleans[9] #define insert_null_glitch CUR Booleans[10] #define memory_above CUR Booleans[11] #define memory_below CUR Booleans[12] #define move_insert_mode CUR Booleans[13] #define move_standout_mode CUR Booleans[14] #define over_strike CUR Booleans[15] #define status_line_esc_ok CUR Booleans[16] #define dest_tabs_magic_smso CUR Booleans[17] #define tilde_glitch CUR Booleans[18] #define transparent_underline CUR Booleans[19] #define xon_xoff CUR Booleans[20] #define needs_xon_xoff CUR Booleans[21] #define prtr_silent CUR Booleans[22] #define hard_cursor CUR Booleans[23] #define non_rev_rmcup CUR Booleans[24] #define no_pad_char CUR Booleans[25] #define non_dest_scroll_region CUR Booleans[26] #define can_change CUR Booleans[27] #define back_color_erase CUR Booleans[28] #define hue_lightness_saturation CUR Booleans[29] #define col_addr_glitch CUR Booleans[30] #define cr_cancels_micro_mode CUR Booleans[31] #define has_print_wheel CUR Booleans[32] #define row_addr_glitch CUR Booleans[33] #define semi_auto_right_margin CUR Booleans[34] #define cpi_changes_res CUR Booleans[35] #define lpi_changes_res CUR Booleans[36] #define columns CUR Numbers[0] #define init_tabs CUR Numbers[1] #define lines CUR Numbers[2] #define lines_of_memory CUR Numbers[3] #define magic_cookie_glitch CUR Numbers[4] #define padding_baud_rate CUR Numbers[5] #define virtual_terminal CUR Numbers[6] #define width_status_line CUR Numbers[7] #define num_labels CUR Numbers[8] #define label_height CUR Numbers[9] #define label_width CUR Numbers[10] #define max_attributes CUR Numbers[11] #define maximum_windows CUR Numbers[12] #define max_colors CUR Numbers[13] #define max_pairs CUR Numbers[14] #define no_color_video CUR Numbers[15] #define buffer_capacity CUR Numbers[16] #define dot_vert_spacing CUR Numbers[17] #define dot_horz_spacing CUR Numbers[18] #define max_micro_address CUR Numbers[19] #define max_micro_jump CUR Numbers[20] #define micro_col_size CUR Numbers[21] #define micro_line_size CUR Numbers[22] #define number_of_pins CUR Numbers[23] #define output_res_char CUR Numbers[24] #define output_res_line CUR Numbers[25] #define output_res_horz_inch CUR Numbers[26] #define output_res_vert_inch CUR Numbers[27] #define print_rate CUR Numbers[28] #define wide_char_size CUR Numbers[29] #define buttons CUR Numbers[30] #define bit_image_entwining CUR Numbers[31] #define bit_image_type CUR Numbers[32] #define back_tab CUR Strings[0] #define bell CUR Strings[1] #define carriage_return CUR Strings[2] #define change_scroll_region CUR Strings[3] #define clear_all_tabs CUR Strings[4] #define clear_screen CUR Strings[5] #define clr_eol CUR Strings[6] #define clr_eos CUR Strings[7] #define column_address CUR Strings[8] #define command_character CUR Strings[9] #define cursor_address CUR Strings[10] #define cursor_down CUR Strings[11] #define cursor_home CUR Strings[12] #define cursor_invisible CUR Strings[13] #define cursor_left CUR Strings[14] #define cursor_mem_address CUR Strings[15] #define cursor_normal CUR Strings[16] #define cursor_right CUR Strings[17] #define cursor_to_ll CUR Strings[18] #define cursor_up CUR Strings[19] #define cursor_visible CUR Strings[20] #define delete_character CUR Strings[21] #define delete_line CUR Strings[22] #define dis_status_line CUR Strings[23] #define down_half_line CUR Strings[24] #define enter_alt_charset_mode CUR Strings[25] #define enter_blink_mode CUR Strings[26] #define enter_bold_mode CUR Strings[27] #define enter_ca_mode CUR Strings[28] #define enter_delete_mode CUR Strings[29] #define enter_dim_mode CUR Strings[30] #define enter_insert_mode CUR Strings[31] #define enter_secure_mode CUR Strings[32] #define enter_protected_mode CUR Strings[33] #define enter_reverse_mode CUR Strings[34] #define enter_standout_mode CUR Strings[35] #define enter_underline_mode CUR Strings[36] #define erase_chars CUR Strings[37] #define exit_alt_charset_mode CUR Strings[38] #define exit_attribute_mode CUR Strings[39] #define exit_ca_mode CUR Strings[40] #define exit_delete_mode CUR Strings[41] #define exit_insert_mode CUR Strings[42] #define exit_standout_mode CUR Strings[43] #define exit_underline_mode CUR Strings[44] #define flash_screen CUR Strings[45] #define form_feed CUR Strings[46] #define from_status_line CUR Strings[47] #define init_1string CUR Strings[48] #define init_2string CUR Strings[49] #define init_3string CUR Strings[50] #define init_file CUR Strings[51] #define insert_character CUR Strings[52] #define insert_line CUR Strings[53] #define insert_padding CUR Strings[54] #define key_backspace CUR Strings[55] #define key_catab CUR Strings[56] #define key_clear CUR Strings[57] #define key_ctab CUR Strings[58] #define key_dc CUR Strings[59] #define key_dl CUR Strings[60] #define key_down CUR Strings[61] #define key_eic CUR Strings[62] #define key_eol CUR Strings[63] #define key_eos CUR Strings[64] #define key_f0 CUR Strings[65] #define key_f1 CUR Strings[66] #define key_f10 CUR Strings[67] #define key_f2 CUR Strings[68] #define key_f3 CUR Strings[69] #define key_f4 CUR Strings[70] #define key_f5 CUR Strings[71] #define key_f6 CUR Strings[72] #define key_f7 CUR Strings[73] #define key_f8 CUR Strings[74] #define key_f9 CUR Strings[75] #define key_home CUR Strings[76] #define key_ic CUR Strings[77] #define key_il CUR Strings[78] #define key_left CUR Strings[79] #define key_ll CUR Strings[80] #define key_npage CUR Strings[81] #define key_ppage CUR Strings[82] #define key_right CUR Strings[83] #define key_sf CUR Strings[84] #define key_sr CUR Strings[85] #define key_stab CUR Strings[86] #define key_up CUR Strings[87] #define keypad_local CUR Strings[88] #define keypad_xmit CUR Strings[89] #define lab_f0 CUR Strings[90] #define lab_f1 CUR Strings[91] #define lab_f10 CUR Strings[92] #define lab_f2 CUR Strings[93] #define lab_f3 CUR Strings[94] #define lab_f4 CUR Strings[95] #define lab_f5 CUR Strings[96] #define lab_f6 CUR Strings[97] #define lab_f7 CUR Strings[98] #define lab_f8 CUR Strings[99] #define lab_f9 CUR Strings[100] #define meta_off CUR Strings[101] #define meta_on CUR Strings[102] #define newline CUR Strings[103] #define pad_char CUR Strings[104] #define parm_dch CUR Strings[105] #define parm_delete_line CUR Strings[106] #define parm_down_cursor CUR Strings[107] #define parm_ich CUR Strings[108] #define parm_index CUR Strings[109] #define parm_insert_line CUR Strings[110] #define parm_left_cursor CUR Strings[111] #define parm_right_cursor CUR Strings[112] #define parm_rindex CUR Strings[113] #define parm_up_cursor CUR Strings[114] #define pkey_key CUR Strings[115] #define pkey_local CUR Strings[116] #define pkey_xmit CUR Strings[117] #define print_screen CUR Strings[118] #define prtr_off CUR Strings[119] #define prtr_on CUR Strings[120] #define repeat_char CUR Strings[121] #define reset_1string CUR Strings[122] #define reset_2string CUR Strings[123] #define reset_3string CUR Strings[124] #define reset_file CUR Strings[125] #define restore_cursor CUR Strings[126] #define row_address CUR Strings[127] #define save_cursor CUR Strings[128] #define scroll_forward CUR Strings[129] #define scroll_reverse CUR Strings[130] #define set_attributes CUR Strings[131] #define set_tab CUR Strings[132] #define set_window CUR Strings[133] #define tab CUR Strings[134] #define to_status_line CUR Strings[135] #define underline_char CUR Strings[136] #define up_half_line CUR Strings[137] #define init_prog CUR Strings[138] #define key_a1 CUR Strings[139] #define key_a3 CUR Strings[140] #define key_b2 CUR Strings[141] #define key_c1 CUR Strings[142] #define key_c3 CUR Strings[143] #define prtr_non CUR Strings[144] #define char_padding CUR Strings[145] #define acs_chars CUR Strings[146] #define plab_norm CUR Strings[147] #define key_btab CUR Strings[148] #define enter_xon_mode CUR Strings[149] #define exit_xon_mode CUR Strings[150] #define enter_am_mode CUR Strings[151] #define exit_am_mode CUR Strings[152] #define xon_character CUR Strings[153] #define xoff_character CUR Strings[154] #define ena_acs CUR Strings[155] #define label_on CUR Strings[156] #define label_off CUR Strings[157] #define key_beg CUR Strings[158] #define key_cancel CUR Strings[159] #define key_close CUR Strings[160] #define key_command CUR Strings[161] #define key_copy CUR Strings[162] #define key_create CUR Strings[163] #define key_end CUR Strings[164] #define key_enter CUR Strings[165] #define key_exit CUR Strings[166] #define key_find CUR Strings[167] #define key_help CUR Strings[168] #define key_mark CUR Strings[169] #define key_message CUR Strings[170] #define key_move CUR Strings[171] #define key_next CUR Strings[172] #define key_open CUR Strings[173] #define key_options CUR Strings[174] #define key_previous CUR Strings[175] #define key_print CUR Strings[176] #define key_redo CUR Strings[177] #define key_reference CUR Strings[178] #define key_refresh CUR Strings[179] #define key_replace CUR Strings[180] #define key_restart CUR Strings[181] #define key_resume CUR Strings[182] #define key_save CUR Strings[183] #define key_suspend CUR Strings[184] #define key_undo CUR Strings[185] #define key_sbeg CUR Strings[186] #define key_scancel CUR Strings[187] #define key_scommand CUR Strings[188] #define key_scopy CUR Strings[189] #define key_screate CUR Strings[190] #define key_sdc CUR Strings[191] #define key_sdl CUR Strings[192] #define key_select CUR Strings[193] #define key_send CUR Strings[194] #define key_seol CUR Strings[195] #define key_sexit CUR Strings[196] #define key_sfind CUR Strings[197] #define key_shelp CUR Strings[198] #define key_shome CUR Strings[199] #define key_sic CUR Strings[200] #define key_sleft CUR Strings[201] #define key_smessage CUR Strings[202] #define key_smove CUR Strings[203] #define key_snext CUR Strings[204] #define key_soptions CUR Strings[205] #define key_sprevious CUR Strings[206] #define key_sprint CUR Strings[207] #define key_sredo CUR Strings[208] #define key_sreplace CUR Strings[209] #define key_sright CUR Strings[210] #define key_srsume CUR Strings[211] #define key_ssave CUR Strings[212] #define key_ssuspend CUR Strings[213] #define key_sundo CUR Strings[214] #define req_for_input CUR Strings[215] #define key_f11 CUR Strings[216] #define key_f12 CUR Strings[217] #define key_f13 CUR Strings[218] #define key_f14 CUR Strings[219] #define key_f15 CUR Strings[220] #define key_f16 CUR Strings[221] #define key_f17 CUR Strings[222] #define key_f18 CUR Strings[223] #define key_f19 CUR Strings[224] #define key_f20 CUR Strings[225] #define key_f21 CUR Strings[226] #define key_f22 CUR Strings[227] #define key_f23 CUR Strings[228] #define key_f24 CUR Strings[229] #define key_f25 CUR Strings[230] #define key_f26 CUR Strings[231] #define key_f27 CUR Strings[232] #define key_f28 CUR Strings[233] #define key_f29 CUR Strings[234] #define key_f30 CUR Strings[235] #define key_f31 CUR Strings[236] #define key_f32 CUR Strings[237] #define key_f33 CUR Strings[238] #define key_f34 CUR Strings[239] #define key_f35 CUR Strings[240] #define key_f36 CUR Strings[241] #define key_f37 CUR Strings[242] #define key_f38 CUR Strings[243] #define key_f39 CUR Strings[244] #define key_f40 CUR Strings[245] #define key_f41 CUR Strings[246] #define key_f42 CUR Strings[247] #define key_f43 CUR Strings[248] #define key_f44 CUR Strings[249] #define key_f45 CUR Strings[250] #define key_f46 CUR Strings[251] #define key_f47 CUR Strings[252] #define key_f48 CUR Strings[253] #define key_f49 CUR Strings[254] #define key_f50 CUR Strings[255] #define key_f51 CUR Strings[256] #define key_f52 CUR Strings[257] #define key_f53 CUR Strings[258] #define key_f54 CUR Strings[259] #define key_f55 CUR Strings[260] #define key_f56 CUR Strings[261] #define key_f57 CUR Strings[262] #define key_f58 CUR Strings[263] #define key_f59 CUR Strings[264] #define key_f60 CUR Strings[265] #define key_f61 CUR Strings[266] #define key_f62 CUR Strings[267] #define key_f63 CUR Strings[268] #define clr_bol CUR Strings[269] #define clear_margins CUR Strings[270] #define set_left_margin CUR Strings[271] #define set_right_margin CUR Strings[272] #define label_format CUR Strings[273] #define set_clock CUR Strings[274] #define display_clock CUR Strings[275] #define remove_clock CUR Strings[276] #define create_window CUR Strings[277] #define goto_window CUR Strings[278] #define hangup CUR Strings[279] #define dial_phone CUR Strings[280] #define quick_dial CUR Strings[281] #define tone CUR Strings[282] #define pulse CUR Strings[283] #define flash_hook CUR Strings[284] #define fixed_pause CUR Strings[285] #define wait_tone CUR Strings[286] #define user0 CUR Strings[287] #define user1 CUR Strings[288] #define user2 CUR Strings[289] #define user3 CUR Strings[290] #define user4 CUR Strings[291] #define user5 CUR Strings[292] #define user6 CUR Strings[293] #define user7 CUR Strings[294] #define user8 CUR Strings[295] #define user9 CUR Strings[296] #define orig_pair CUR Strings[297] #define orig_colors CUR Strings[298] #define initialize_color CUR Strings[299] #define initialize_pair CUR Strings[300] #define set_color_pair CUR Strings[301] #define set_foreground CUR Strings[302] #define set_background CUR Strings[303] #define change_char_pitch CUR Strings[304] #define change_line_pitch CUR Strings[305] #define change_res_horz CUR Strings[306] #define change_res_vert CUR Strings[307] #define define_char CUR Strings[308] #define enter_doublewide_mode CUR Strings[309] #define enter_draft_quality CUR Strings[310] #define enter_italics_mode CUR Strings[311] #define enter_leftward_mode CUR Strings[312] #define enter_micro_mode CUR Strings[313] #define enter_near_letter_quality CUR Strings[314] #define enter_normal_quality CUR Strings[315] #define enter_shadow_mode CUR Strings[316] #define enter_subscript_mode CUR Strings[317] #define enter_superscript_mode CUR Strings[318] #define enter_upward_mode CUR Strings[319] #define exit_doublewide_mode CUR Strings[320] #define exit_italics_mode CUR Strings[321] #define exit_leftward_mode CUR Strings[322] #define exit_micro_mode CUR Strings[323] #define exit_shadow_mode CUR Strings[324] #define exit_subscript_mode CUR Strings[325] #define exit_superscript_mode CUR Strings[326] #define exit_upward_mode CUR Strings[327] #define micro_column_address CUR Strings[328] #define micro_down CUR Strings[329] #define micro_left CUR Strings[330] #define micro_right CUR Strings[331] #define micro_row_address CUR Strings[332] #define micro_up CUR Strings[333] #define order_of_pins CUR Strings[334] #define parm_down_micro CUR Strings[335] #define parm_left_micro CUR Strings[336] #define parm_right_micro CUR Strings[337] #define parm_up_micro CUR Strings[338] #define select_char_set CUR Strings[339] #define set_bottom_margin CUR Strings[340] #define set_bottom_margin_parm CUR Strings[341] #define set_left_margin_parm CUR Strings[342] #define set_right_margin_parm CUR Strings[343] #define set_top_margin CUR Strings[344] #define set_top_margin_parm CUR Strings[345] #define start_bit_image CUR Strings[346] #define start_char_set_def CUR Strings[347] #define stop_bit_image CUR Strings[348] #define stop_char_set_def CUR Strings[349] #define subscript_characters CUR Strings[350] #define superscript_characters CUR Strings[351] #define these_cause_cr CUR Strings[352] #define zero_motion CUR Strings[353] #define char_set_names CUR Strings[354] #define key_mouse CUR Strings[355] #define mouse_info CUR Strings[356] #define req_mouse_pos CUR Strings[357] #define get_mouse CUR Strings[358] #define set_a_foreground CUR Strings[359] #define set_a_background CUR Strings[360] #define pkey_plab CUR Strings[361] #define device_type CUR Strings[362] #define code_set_init CUR Strings[363] #define set0_des_seq CUR Strings[364] #define set1_des_seq CUR Strings[365] #define set2_des_seq CUR Strings[366] #define set3_des_seq CUR Strings[367] #define set_lr_margin CUR Strings[368] #define set_tb_margin CUR Strings[369] #define bit_image_repeat CUR Strings[370] #define bit_image_newline CUR Strings[371] #define bit_image_carriage_return CUR Strings[372] #define color_names CUR Strings[373] #define define_bit_image_region CUR Strings[374] #define end_bit_image_region CUR Strings[375] #define set_color_band CUR Strings[376] #define set_page_length CUR Strings[377] #define display_pc_char CUR Strings[378] #define enter_pc_charset_mode CUR Strings[379] #define exit_pc_charset_mode CUR Strings[380] #define enter_scancode_mode CUR Strings[381] #define exit_scancode_mode CUR Strings[382] #define pc_term_options CUR Strings[383] #define scancode_escape CUR Strings[384] #define alt_scancode_esc CUR Strings[385] #define enter_horizontal_hl_mode CUR Strings[386] #define enter_left_hl_mode CUR Strings[387] #define enter_low_hl_mode CUR Strings[388] #define enter_right_hl_mode CUR Strings[389] #define enter_top_hl_mode CUR Strings[390] #define enter_vertical_hl_mode CUR Strings[391] #define set_a_attributes CUR Strings[392] #define set_pglen_inch CUR Strings[393] #define BOOLWRITE 37 #define NUMWRITE 33 #define STRWRITE 394 /* older synonyms for some capabilities */ #define beehive_glitch no_esc_ctlc #define teleray_glitch dest_tabs_magic_smso #define micro_char_size micro_col_size #ifdef __INTERNAL_CAPS_VISIBLE #define termcap_init2 CUR Strings[394] #define termcap_reset CUR Strings[395] #define magic_cookie_glitch_ul CUR Numbers[33] #define backspaces_with_bs CUR Booleans[37] #define crt_no_scrolling CUR Booleans[38] #define no_correctly_working_cr CUR Booleans[39] #define carriage_return_delay CUR Numbers[34] #define new_line_delay CUR Numbers[35] #define linefeed_if_not_lf CUR Strings[396] #define backspace_if_not_bs CUR Strings[397] #define gnu_has_meta_key CUR Booleans[40] #define linefeed_is_newline CUR Booleans[41] #define backspace_delay CUR Numbers[36] #define horizontal_tab_delay CUR Numbers[37] #define number_of_function_keys CUR Numbers[38] #define other_non_function_keys CUR Strings[398] #define arrow_key_map CUR Strings[399] #define has_hardware_tabs CUR Booleans[42] #define return_does_clr_eol CUR Booleans[43] #define acs_ulcorner CUR Strings[400] #define acs_llcorner CUR Strings[401] #define acs_urcorner CUR Strings[402] #define acs_lrcorner CUR Strings[403] #define acs_ltee CUR Strings[404] #define acs_rtee CUR Strings[405] #define acs_btee CUR Strings[406] #define acs_ttee CUR Strings[407] #define acs_hline CUR Strings[408] #define acs_vline CUR Strings[409] #define acs_plus CUR Strings[410] #define memory_lock CUR Strings[411] #define memory_unlock CUR Strings[412] #define box_chars_1 CUR Strings[413] #endif /* __INTERNAL_CAPS_VISIBLE */ /* * Predefined terminfo array sizes */ #define BOOLCOUNT 44 #define NUMCOUNT 39 #define STRCOUNT 414 /* used by code for comparing entries */ #define acs_chars_index 146 typedef struct termtype { /* in-core form of terminfo data */ char *term_names; /* str_table offset of term names */ char *str_table; /* pointer to string table */ NCURSES_SBOOL *Booleans; /* array of boolean values */ short *Numbers; /* array of integer values */ char **Strings; /* array of string offsets */ #if NCURSES_XNAMES char *ext_str_table; /* pointer to extended string table */ char **ext_Names; /* corresponding names */ unsigned short num_Booleans;/* count total Booleans */ unsigned short num_Numbers; /* count total Numbers */ unsigned short num_Strings; /* count total Strings */ unsigned short ext_Booleans;/* count extensions to Booleans */ unsigned short ext_Numbers; /* count extensions to Numbers */ unsigned short ext_Strings; /* count extensions to Strings */ #endif /* NCURSES_XNAMES */ } TERMTYPE; /* * The only reason these structures are visible is for read-only use. * Programs which modify the data are not, never were, portable across * curses implementations. */ #ifdef NCURSES_INTERNALS typedef struct termtype2 { /* in-core form of terminfo data */ char *term_names; /* str_table offset of term names */ char *str_table; /* pointer to string table */ NCURSES_SBOOL *Booleans; /* array of boolean values */ int *Numbers; /* array of integer values */ char **Strings; /* array of string offsets */ #if NCURSES_XNAMES char *ext_str_table; /* pointer to extended string table */ char **ext_Names; /* corresponding names */ unsigned short num_Booleans;/* count total Booleans */ unsigned short num_Numbers; /* count total Numbers */ unsigned short num_Strings; /* count total Strings */ unsigned short ext_Booleans;/* count extensions to Booleans */ unsigned short ext_Numbers; /* count extensions to Numbers */ unsigned short ext_Strings; /* count extensions to Strings */ #endif /* NCURSES_XNAMES */ } TERMTYPE2; typedef struct term { /* describe an actual terminal */ TERMTYPE type; /* terminal type description */ short Filedes; /* file description being written to */ TTY Ottyb; /* original state of the terminal */ TTY Nttyb; /* current state of the terminal */ int _baudrate; /* used to compute padding */ char * _termname; /* used for termname() */ TERMTYPE2 type2; /* extended terminal type description */ } TERMINAL; #else typedef struct term TERMINAL; #endif /* NCURSES_INTERNALS */ #if 0 && !0 extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term; #elif 0 NCURSES_WRAPPED_VAR(TERMINAL *, cur_term); #define cur_term NCURSES_PUBLIC_VAR(cur_term()) #else extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term; #endif #if 0 || 0 NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numnames); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numcodes); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, numfnames); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strnames); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes); NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames); #define boolnames NCURSES_PUBLIC_VAR(boolnames()) #define boolcodes NCURSES_PUBLIC_VAR(boolcodes()) #define boolfnames NCURSES_PUBLIC_VAR(boolfnames()) #define numnames NCURSES_PUBLIC_VAR(numnames()) #define numcodes NCURSES_PUBLIC_VAR(numcodes()) #define numfnames NCURSES_PUBLIC_VAR(numfnames()) #define strnames NCURSES_PUBLIC_VAR(strnames()) #define strcodes NCURSES_PUBLIC_VAR(strcodes()) #define strfnames NCURSES_PUBLIC_VAR(strfnames()) #else extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[]; extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[]; #endif /* * These entrypoints are used only by the ncurses utilities such as tic. */ #ifdef NCURSES_INTERNALS extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf); extern NCURSES_EXPORT(int) _nc_read_entry2 (const char * const, char * const, TERMTYPE2 *const); extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE2 *); extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int); extern NCURSES_EXPORT(char *) _nc_first_name (const char *const); extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const); #endif /* NCURSES_INTERNALS */ /* * These entrypoints are used by tack. */ extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *); extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const); /* Normal entry points */ extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *); extern NCURSES_EXPORT(int) del_curterm (TERMINAL *); /* miscellaneous entry points */ extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *); extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *); /* terminfo entry points, also declared in curses.h */ #if !defined(__NCURSES_H) extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); extern NCURSES_EXPORT_VAR(char) ttytype[]; extern NCURSES_EXPORT(int) putp (const char *); extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); #if 1 /* NCURSES_TPARM_VARARGS */ extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* special */ #else extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */ extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */ #endif extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */ #endif /* __NCURSES_H */ /* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */ #if !defined(NCURSES_TERMCAP_H_incl) extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **); extern NCURSES_EXPORT(char *) tgoto (const char *, int, int); extern NCURSES_EXPORT(int) tgetent (char *, const char *); extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *); extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *); extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int)); #endif /* NCURSES_TERMCAP_H_incl */ /* * Include curses.h before term.h to enable these extensions. */ #if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0) extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *); #if 1 /* NCURSES_TPARM_VARARGS */ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...); /* special */ #else extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...); /* special */ #endif /* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */ extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **); extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC); extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *); extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *); #endif /* NCURSES_SP_FUNCS */ #ifdef __cplusplus } #endif #endif /* NCURSES_TERM_H_incl */ PKZ*,pr??zconf.hnu[/* zconf.h -- configuration of the zlib compression library * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ #ifndef ZCONF_H #define ZCONF_H /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. * Even better than compiling with -DZ_PREFIX would be to use configure to set * this permanently in zconf.h using "./configure --zprefix". */ #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ # define Z_PREFIX_SET /* all linked symbols and init macros */ # define _dist_code z__dist_code # define _length_code z__length_code # define _tr_align z__tr_align # define _tr_flush_bits z__tr_flush_bits # define _tr_flush_block z__tr_flush_block # define _tr_init z__tr_init # define _tr_stored_block z__tr_stored_block # define _tr_tally z__tr_tally # define adler32 z_adler32 # define adler32_combine z_adler32_combine # define adler32_combine64 z_adler32_combine64 # define adler32_z z_adler32_z # ifndef Z_SOLO # define compress z_compress # define compress2 z_compress2 # define compressBound z_compressBound # endif # define crc32 z_crc32 # define crc32_combine z_crc32_combine # define crc32_combine64 z_crc32_combine64 # define crc32_z z_crc32_z # define deflate z_deflate # define deflateBound z_deflateBound # define deflateCopy z_deflateCopy # define deflateEnd z_deflateEnd # define deflateGetDictionary z_deflateGetDictionary # define deflateInit z_deflateInit # define deflateInit2 z_deflateInit2 # define deflateInit2_ z_deflateInit2_ # define deflateInit_ z_deflateInit_ # define deflateParams z_deflateParams # define deflatePending z_deflatePending # define deflatePrime z_deflatePrime # define deflateReset z_deflateReset # define deflateResetKeep z_deflateResetKeep # define deflateSetDictionary z_deflateSetDictionary # define deflateSetHeader z_deflateSetHeader # define deflateTune z_deflateTune # define deflate_copyright z_deflate_copyright # define get_crc_table z_get_crc_table # ifndef Z_SOLO # define gz_error z_gz_error # define gz_intmax z_gz_intmax # define gz_strwinerror z_gz_strwinerror # define gzbuffer z_gzbuffer # define gzclearerr z_gzclearerr # define gzclose z_gzclose # define gzclose_r z_gzclose_r # define gzclose_w z_gzclose_w # define gzdirect z_gzdirect # define gzdopen z_gzdopen # define gzeof z_gzeof # define gzerror z_gzerror # define gzflush z_gzflush # define gzfread z_gzfread # define gzfwrite z_gzfwrite # define gzgetc z_gzgetc # define gzgetc_ z_gzgetc_ # define gzgets z_gzgets # define gzoffset z_gzoffset # define gzoffset64 z_gzoffset64 # define gzopen z_gzopen # define gzopen64 z_gzopen64 # ifdef _WIN32 # define gzopen_w z_gzopen_w # endif # define gzprintf z_gzprintf # define gzputc z_gzputc # define gzputs z_gzputs # define gzread z_gzread # define gzrewind z_gzrewind # define gzseek z_gzseek # define gzseek64 z_gzseek64 # define gzsetparams z_gzsetparams # define gztell z_gztell # define gztell64 z_gztell64 # define gzungetc z_gzungetc # define gzvprintf z_gzvprintf # define gzwrite z_gzwrite # endif # define inflate z_inflate # define inflateBack z_inflateBack # define inflateBackEnd z_inflateBackEnd # define inflateBackInit z_inflateBackInit # define inflateBackInit_ z_inflateBackInit_ # define inflateCodesUsed z_inflateCodesUsed # define inflateCopy z_inflateCopy # define inflateEnd z_inflateEnd # define inflateGetDictionary z_inflateGetDictionary # define inflateGetHeader z_inflateGetHeader # define inflateInit z_inflateInit # define inflateInit2 z_inflateInit2 # define inflateInit2_ z_inflateInit2_ # define inflateInit_ z_inflateInit_ # define inflateMark z_inflateMark # define inflatePrime z_inflatePrime # define inflateReset z_inflateReset # define inflateReset2 z_inflateReset2 # define inflateResetKeep z_inflateResetKeep # define inflateSetDictionary z_inflateSetDictionary # define inflateSync z_inflateSync # define inflateSyncPoint z_inflateSyncPoint # define inflateUndermine z_inflateUndermine # define inflateValidate z_inflateValidate # define inflate_copyright z_inflate_copyright # define inflate_fast z_inflate_fast # define inflate_table z_inflate_table # ifndef Z_SOLO # define uncompress z_uncompress # define uncompress2 z_uncompress2 # endif # define zError z_zError # ifndef Z_SOLO # define zcalloc z_zcalloc # define zcfree z_zcfree # endif # define zlibCompileFlags z_zlibCompileFlags # define zlibVersion z_zlibVersion /* all zlib typedefs in zlib.h and zconf.h */ # define Byte z_Byte # define Bytef z_Bytef # define alloc_func z_alloc_func # define charf z_charf # define free_func z_free_func # ifndef Z_SOLO # define gzFile z_gzFile # endif # define gz_header z_gz_header # define gz_headerp z_gz_headerp # define in_func z_in_func # define intf z_intf # define out_func z_out_func # define uInt z_uInt # define uIntf z_uIntf # define uLong z_uLong # define uLongf z_uLongf # define voidp z_voidp # define voidpc z_voidpc # define voidpf z_voidpf /* all zlib structs in zlib.h and zconf.h */ # define gz_header_s z_gz_header_s # define internal_state z_internal_state #endif #if defined(__MSDOS__) && !defined(MSDOS) # define MSDOS #endif #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) # define OS2 #endif #if defined(_WINDOWS) && !defined(WINDOWS) # define WINDOWS #endif #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) # ifndef WIN32 # define WIN32 # endif #endif #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) # ifndef SYS16BIT # define SYS16BIT # endif # endif #endif /* * Compile with -DMAXSEG_64K if the alloc function cannot allocate more * than 64k bytes at a time (needed on systems with 16-bit int). */ #ifdef SYS16BIT # define MAXSEG_64K #endif #ifdef MSDOS # define UNALIGNED_OK #endif #ifdef __STDC_VERSION__ # ifndef STDC # define STDC # endif # if __STDC_VERSION__ >= 199901L # ifndef STDC99 # define STDC99 # endif # endif #endif #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) # define STDC #endif #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) # define STDC #endif #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) # define STDC #endif #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) # define STDC #endif #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ # define STDC #endif #ifndef STDC # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ # define const /* note: need a more gentle solution here */ # endif #endif #if defined(ZLIB_CONST) && !defined(z_const) # define z_const const #else # define z_const #endif #ifdef Z_SOLO typedef unsigned long z_size_t; #else # define z_longlong long long # if defined(NO_SIZE_T) typedef unsigned NO_SIZE_T z_size_t; # elif defined(STDC) # include typedef size_t z_size_t; # else typedef unsigned long z_size_t; # endif # undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # ifdef MAXSEG_64K # define MAX_MEM_LEVEL 8 # else # define MAX_MEM_LEVEL 9 # endif #endif /* Maximum value for windowBits in deflateInit2 and inflateInit2. * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files * created by gzip. (Files created by minigzip can still be extracted by * gzip.) */ #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ #endif /* The memory requirements for deflate are (in bytes): (1 << (windowBits+2)) + (1 << (memLevel+9)) that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) plus a few kilobytes for small objects. For example, if you want to reduce the default memory requirements from 256K to 128K, compile with make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" Of course this will generally degrade compression (there's no free lunch). The memory requirements for inflate are (in bytes) 1 << windowBits that is, 32K for windowBits=15 (default value) plus about 7 kilobytes for small objects. */ /* Type declarations */ #ifndef OF /* function prototypes */ # ifdef STDC # define OF(args) args # else # define OF(args) () # endif #endif #ifndef Z_ARG /* function prototypes for stdarg */ # if defined(STDC) || defined(Z_HAVE_STDARG_H) # define Z_ARG(args) args # else # define Z_ARG(args) () # endif #endif /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, * just define FAR to be empty. */ #ifdef SYS16BIT # if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */ # define SMALL_MEDIUM # ifdef _MSC_VER # define FAR _far # else # define FAR far # endif # endif # if (defined(__SMALL__) || defined(__MEDIUM__)) /* Turbo C small or medium model */ # define SMALL_MEDIUM # ifdef __BORLANDC__ # define FAR _far # else # define FAR far # endif # endif #endif #if defined(WINDOWS) || defined(WIN32) /* If building or using zlib as a DLL, define ZLIB_DLL. * This is not mandatory, but it offers a little performance increase. */ # ifdef ZLIB_DLL # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) # ifdef ZLIB_INTERNAL # define ZEXTERN extern __declspec(dllexport) # else # define ZEXTERN extern __declspec(dllimport) # endif # endif # endif /* ZLIB_DLL */ /* If building or using zlib with the WINAPI/WINAPIV calling convention, * define ZLIB_WINAPI. * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. */ # ifdef ZLIB_WINAPI # ifdef FAR # undef FAR # endif # include /* No need for _export, use ZLIB.DEF instead. */ /* For complete Windows compatibility, use WINAPI, not __stdcall. */ # define ZEXPORT WINAPI # ifdef WIN32 # define ZEXPORTVA WINAPIV # else # define ZEXPORTVA FAR CDECL # endif # endif #endif #if defined (__BEOS__) # ifdef ZLIB_DLL # ifdef ZLIB_INTERNAL # define ZEXPORT __declspec(dllexport) # define ZEXPORTVA __declspec(dllexport) # else # define ZEXPORT __declspec(dllimport) # define ZEXPORTVA __declspec(dllimport) # endif # endif #endif #ifndef ZEXTERN # define ZEXTERN extern #endif #ifndef ZEXPORT # define ZEXPORT #endif #ifndef ZEXPORTVA # define ZEXPORTVA #endif #ifndef FAR # define FAR #endif #if !defined(__MACTYPES__) typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ #ifdef SMALL_MEDIUM /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ # define Bytef Byte FAR #else typedef Byte FAR Bytef; #endif typedef char FAR charf; typedef int FAR intf; typedef uInt FAR uIntf; typedef uLong FAR uLongf; #ifdef STDC typedef void const *voidpc; typedef void FAR *voidpf; typedef void *voidp; #else typedef Byte const *voidpc; typedef Byte FAR *voidpf; typedef Byte *voidp; #endif #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) # include # if (UINT_MAX == 0xffffffffUL) # define Z_U4 unsigned # elif (ULONG_MAX == 0xffffffffUL) # define Z_U4 unsigned long # elif (USHRT_MAX == 0xffffffffUL) # define Z_U4 unsigned short # endif #endif #ifdef Z_U4 typedef Z_U4 z_crc_t; #else typedef unsigned long z_crc_t; #endif #if 1 /* was set to #if 1 by ./configure */ # define Z_HAVE_UNISTD_H #endif #if 1 /* was set to #if 1 by ./configure */ # define Z_HAVE_STDARG_H #endif #ifdef STDC # ifndef Z_SOLO # include /* for off_t */ # endif #endif #if defined(STDC) || defined(Z_HAVE_STDARG_H) # ifndef Z_SOLO # include /* for va_list */ # endif #endif #ifdef _WIN32 # ifndef Z_SOLO # include /* for wchar_t */ # endif #endif /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even * though the former does not conform to the LFS document), but considering * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as * equivalently requesting no 64-bit operations */ #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 # undef _LARGEFILE64_SOURCE #endif #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) # define Z_HAVE_UNISTD_H #endif #ifndef Z_SOLO # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ # ifdef VMS # include /* for off_t */ # endif # ifndef z_off_t # define z_off_t off_t # endif # endif #endif #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 # define Z_LFS64 #endif #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) # define Z_LARGE64 #endif #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) # define Z_WANT64 #endif #if !defined(SEEK_SET) && !defined(Z_SOLO) # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif #ifndef z_off_t # define z_off_t long #endif #if !defined(_WIN32) && defined(Z_LARGE64) # define z_off64_t off64_t #else # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) # define z_off64_t __int64 # else # define z_off64_t z_off_t # endif #endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) #pragma map(deflateInit_,"DEIN") #pragma map(deflateInit2_,"DEIN2") #pragma map(deflateEnd,"DEEND") #pragma map(deflateBound,"DEBND") #pragma map(inflateInit_,"ININ") #pragma map(inflateInit2_,"ININ2") #pragma map(inflateEnd,"INEND") #pragma map(inflateSync,"INSY") #pragma map(inflateSetDictionary,"INSEDI") #pragma map(compressBound,"CMBND") #pragma map(inflate_table,"INTABL") #pragma map(inflate_fast,"INFA") #pragma map(inflate_copyright,"INCOPY") #endif #endif /* ZCONF_H */ PKZƼ""asm/amd_hsmp.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_AMD_HSMP_H_ #define _ASM_X86_AMD_HSMP_H_ #include #pragma pack(4) #define HSMP_MAX_MSG_LEN 8 /* * HSMP Messages supported */ enum hsmp_message_ids { HSMP_TEST = 1, /* 01h Increments input value by 1 */ HSMP_GET_SMU_VER, /* 02h SMU FW version */ HSMP_GET_PROTO_VER, /* 03h HSMP interface version */ HSMP_GET_SOCKET_POWER, /* 04h average package power consumption */ HSMP_SET_SOCKET_POWER_LIMIT, /* 05h Set the socket power limit */ HSMP_GET_SOCKET_POWER_LIMIT, /* 06h Get current socket power limit */ HSMP_GET_SOCKET_POWER_LIMIT_MAX,/* 07h Get maximum socket power value */ HSMP_SET_BOOST_LIMIT, /* 08h Set a core maximum frequency limit */ HSMP_SET_BOOST_LIMIT_SOCKET, /* 09h Set socket maximum frequency level */ HSMP_GET_BOOST_LIMIT, /* 0Ah Get current frequency limit */ HSMP_GET_PROC_HOT, /* 0Bh Get PROCHOT status */ HSMP_SET_XGMI_LINK_WIDTH, /* 0Ch Set max and min width of xGMI Link */ HSMP_SET_DF_PSTATE, /* 0Dh Alter APEnable/Disable messages behavior */ HSMP_SET_AUTO_DF_PSTATE, /* 0Eh Enable DF P-State Performance Boost algorithm */ HSMP_GET_FCLK_MCLK, /* 0Fh Get FCLK and MEMCLK for current socket */ HSMP_GET_CCLK_THROTTLE_LIMIT, /* 10h Get CCLK frequency limit in socket */ HSMP_GET_C0_PERCENT, /* 11h Get average C0 residency in socket */ HSMP_SET_NBIO_DPM_LEVEL, /* 12h Set max/min LCLK DPM Level for a given NBIO */ HSMP_GET_NBIO_DPM_LEVEL, /* 13h Get LCLK DPM level min and max for a given NBIO */ HSMP_GET_DDR_BANDWIDTH, /* 14h Get theoretical maximum and current DDR Bandwidth */ HSMP_GET_TEMP_MONITOR, /* 15h Get socket temperature */ HSMP_GET_DIMM_TEMP_RANGE, /* 16h Get per-DIMM temperature range and refresh rate */ HSMP_GET_DIMM_POWER, /* 17h Get per-DIMM power consumption */ HSMP_GET_DIMM_THERMAL, /* 18h Get per-DIMM thermal sensors */ HSMP_GET_SOCKET_FREQ_LIMIT, /* 19h Get current active frequency per socket */ HSMP_GET_CCLK_CORE_LIMIT, /* 1Ah Get CCLK frequency limit per core */ HSMP_GET_RAILS_SVI, /* 1Bh Get SVI-based Telemetry for all rails */ HSMP_GET_SOCKET_FMAX_FMIN, /* 1Ch Get Fmax and Fmin per socket */ HSMP_GET_IOLINK_BANDWITH, /* 1Dh Get current bandwidth on IO Link */ HSMP_GET_XGMI_BANDWITH, /* 1Eh Get current bandwidth on xGMI Link */ HSMP_SET_GMI3_WIDTH, /* 1Fh Set max and min GMI3 Link width */ HSMP_SET_PCI_RATE, /* 20h Control link rate on PCIe devices */ HSMP_SET_POWER_MODE, /* 21h Select power efficiency profile policy */ HSMP_SET_PSTATE_MAX_MIN, /* 22h Set the max and min DF P-State */ HSMP_MSG_ID_MAX, }; struct hsmp_message { __u32 msg_id; /* Message ID */ __u16 num_args; /* Number of input argument words in message */ __u16 response_sz; /* Number of expected output/response words */ __u32 args[HSMP_MAX_MSG_LEN]; /* argument/response buffer */ __u16 sock_ind; /* socket number */ }; enum hsmp_msg_type { HSMP_RSVD = -1, HSMP_SET = 0, HSMP_GET = 1, }; struct hsmp_msg_desc { int num_args; int response_sz; enum hsmp_msg_type type; }; /* * User may use these comments as reference, please find the * supported list of messages and message definition in the * HSMP chapter of respective family/model PPR. * * Not supported messages would return -ENOMSG. */ static const struct hsmp_msg_desc hsmp_msg_desc_table[] = { /* RESERVED */ {0, 0, HSMP_RSVD}, /* * HSMP_TEST, num_args = 1, response_sz = 1 * input: args[0] = xx * output: args[0] = xx + 1 */ {1, 1, HSMP_GET}, /* * HSMP_GET_SMU_VER, num_args = 0, response_sz = 1 * output: args[0] = smu fw ver */ {0, 1, HSMP_GET}, /* * HSMP_GET_PROTO_VER, num_args = 0, response_sz = 1 * output: args[0] = proto version */ {0, 1, HSMP_GET}, /* * HSMP_GET_SOCKET_POWER, num_args = 0, response_sz = 1 * output: args[0] = socket power in mWatts */ {0, 1, HSMP_GET}, /* * HSMP_SET_SOCKET_POWER_LIMIT, num_args = 1, response_sz = 0 * input: args[0] = power limit value in mWatts */ {1, 0, HSMP_SET}, /* * HSMP_GET_SOCKET_POWER_LIMIT, num_args = 0, response_sz = 1 * output: args[0] = socket power limit value in mWatts */ {0, 1, HSMP_GET}, /* * HSMP_GET_SOCKET_POWER_LIMIT_MAX, num_args = 0, response_sz = 1 * output: args[0] = maximuam socket power limit in mWatts */ {0, 1, HSMP_GET}, /* * HSMP_SET_BOOST_LIMIT, num_args = 1, response_sz = 0 * input: args[0] = apic id[31:16] + boost limit value in MHz[15:0] */ {1, 0, HSMP_SET}, /* * HSMP_SET_BOOST_LIMIT_SOCKET, num_args = 1, response_sz = 0 * input: args[0] = boost limit value in MHz */ {1, 0, HSMP_SET}, /* * HSMP_GET_BOOST_LIMIT, num_args = 1, response_sz = 1 * input: args[0] = apic id * output: args[0] = boost limit value in MHz */ {1, 1, HSMP_GET}, /* * HSMP_GET_PROC_HOT, num_args = 0, response_sz = 1 * output: args[0] = proc hot status */ {0, 1, HSMP_GET}, /* * HSMP_SET_XGMI_LINK_WIDTH, num_args = 1, response_sz = 0 * input: args[0] = min link width[15:8] + max link width[7:0] */ {1, 0, HSMP_SET}, /* * HSMP_SET_DF_PSTATE, num_args = 1, response_sz = 0 * input: args[0] = df pstate[7:0] */ {1, 0, HSMP_SET}, /* HSMP_SET_AUTO_DF_PSTATE, num_args = 0, response_sz = 0 */ {0, 0, HSMP_SET}, /* * HSMP_GET_FCLK_MCLK, num_args = 0, response_sz = 2 * output: args[0] = fclk in MHz, args[1] = mclk in MHz */ {0, 2, HSMP_GET}, /* * HSMP_GET_CCLK_THROTTLE_LIMIT, num_args = 0, response_sz = 1 * output: args[0] = core clock in MHz */ {0, 1, HSMP_GET}, /* * HSMP_GET_C0_PERCENT, num_args = 0, response_sz = 1 * output: args[0] = average c0 residency */ {0, 1, HSMP_GET}, /* * HSMP_SET_NBIO_DPM_LEVEL, num_args = 1, response_sz = 0 * input: args[0] = nbioid[23:16] + max dpm level[15:8] + min dpm level[7:0] */ {1, 0, HSMP_SET}, /* * HSMP_GET_NBIO_DPM_LEVEL, num_args = 1, response_sz = 1 * input: args[0] = nbioid[23:16] * output: args[0] = max dpm level[15:8] + min dpm level[7:0] */ {1, 1, HSMP_GET}, /* * HSMP_GET_DDR_BANDWIDTH, num_args = 0, response_sz = 1 * output: args[0] = max bw in Gbps[31:20] + utilised bw in Gbps[19:8] + * bw in percentage[7:0] */ {0, 1, HSMP_GET}, /* * HSMP_GET_TEMP_MONITOR, num_args = 0, response_sz = 1 * output: args[0] = temperature in degree celsius. [15:8] integer part + * [7:5] fractional part */ {0, 1, HSMP_GET}, /* * HSMP_GET_DIMM_TEMP_RANGE, num_args = 1, response_sz = 1 * input: args[0] = DIMM address[7:0] * output: args[0] = refresh rate[3] + temperature range[2:0] */ {1, 1, HSMP_GET}, /* * HSMP_GET_DIMM_POWER, num_args = 1, response_sz = 1 * input: args[0] = DIMM address[7:0] * output: args[0] = DIMM power in mW[31:17] + update rate in ms[16:8] + * DIMM address[7:0] */ {1, 1, HSMP_GET}, /* * HSMP_GET_DIMM_THERMAL, num_args = 1, response_sz = 1 * input: args[0] = DIMM address[7:0] * output: args[0] = temperature in degree celcius[31:21] + update rate in ms[16:8] + * DIMM address[7:0] */ {1, 1, HSMP_GET}, /* * HSMP_GET_SOCKET_FREQ_LIMIT, num_args = 0, response_sz = 1 * output: args[0] = frequency in MHz[31:16] + frequency source[15:0] */ {0, 1, HSMP_GET}, /* * HSMP_GET_CCLK_CORE_LIMIT, num_args = 1, response_sz = 1 * input: args[0] = apic id [31:0] * output: args[0] = frequency in MHz[31:0] */ {1, 1, HSMP_GET}, /* * HSMP_GET_RAILS_SVI, num_args = 0, response_sz = 1 * output: args[0] = power in mW[31:0] */ {0, 1, HSMP_GET}, /* * HSMP_GET_SOCKET_FMAX_FMIN, num_args = 0, response_sz = 1 * output: args[0] = fmax in MHz[31:16] + fmin in MHz[15:0] */ {0, 1, HSMP_GET}, /* * HSMP_GET_IOLINK_BANDWITH, num_args = 1, response_sz = 1 * input: args[0] = link id[15:8] + bw type[2:0] * output: args[0] = io bandwidth in Mbps[31:0] */ {1, 1, HSMP_GET}, /* * HSMP_GET_XGMI_BANDWITH, num_args = 1, response_sz = 1 * input: args[0] = link id[15:8] + bw type[2:0] * output: args[0] = xgmi bandwidth in Mbps[31:0] */ {1, 1, HSMP_GET}, /* * HSMP_SET_GMI3_WIDTH, num_args = 1, response_sz = 0 * input: args[0] = min link width[15:8] + max link width[7:0] */ {1, 0, HSMP_SET}, /* * HSMP_SET_PCI_RATE, num_args = 1, response_sz = 1 * input: args[0] = link rate control value * output: args[0] = previous link rate control value */ {1, 1, HSMP_SET}, /* * HSMP_SET_POWER_MODE, num_args = 1, response_sz = 0 * input: args[0] = power efficiency mode[2:0] */ {1, 0, HSMP_SET}, /* * HSMP_SET_PSTATE_MAX_MIN, num_args = 1, response_sz = 0 * input: args[0] = min df pstate[15:8] + max df pstate[7:0] */ {1, 0, HSMP_SET}, }; /* Reset to default packing */ #pragma pack() /* Define unique ioctl command for hsmp msgs using generic _IOWR */ #define HSMP_BASE_IOCTL_NR 0xF8 #define HSMP_IOCTL_CMD _IOWR(HSMP_BASE_IOCTL_NR, 0, struct hsmp_message) #endif /*_ASM_X86_AMD_HSMP_H_*/ PKZE6 asm/mtrr.hnu[/* SPDX-License-Identifier: LGPL-2.0+ WITH Linux-syscall-note */ /* Generic MTRR (Memory Type Range Register) ioctls. Copyright (C) 1997-1999 Richard Gooch This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Richard Gooch may be reached by email at rgooch@atnf.csiro.au The postal address is: Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. */ #ifndef _ASM_X86_MTRR_H #define _ASM_X86_MTRR_H #include #include #include #define MTRR_IOCTL_BASE 'M' /* Warning: this structure has a different order from i386 on x86-64. The 32bit emulation code takes care of that. But you need to use this for 64bit, otherwise your X server will break. */ #ifdef __i386__ struct mtrr_sentry { unsigned long base; /* Base address */ unsigned int size; /* Size of region */ unsigned int type; /* Type of region */ }; struct mtrr_gentry { unsigned int regnum; /* Register number */ unsigned long base; /* Base address */ unsigned int size; /* Size of region */ unsigned int type; /* Type of region */ }; #else /* __i386__ */ struct mtrr_sentry { __u64 base; /* Base address */ __u32 size; /* Size of region */ __u32 type; /* Type of region */ }; struct mtrr_gentry { __u64 base; /* Base address */ __u32 size; /* Size of region */ __u32 regnum; /* Register number */ __u32 type; /* Type of region */ __u32 _pad; /* Unused */ }; #endif /* !__i386__ */ struct mtrr_var_range { __u32 base_lo; __u32 base_hi; __u32 mask_lo; __u32 mask_hi; }; /* In the Intel processor's MTRR interface, the MTRR type is always held in an 8 bit field: */ typedef __u8 mtrr_type; #define MTRR_NUM_FIXED_RANGES 88 #define MTRR_MAX_VAR_RANGES 256 struct mtrr_state_type { struct mtrr_var_range var_ranges[MTRR_MAX_VAR_RANGES]; mtrr_type fixed_ranges[MTRR_NUM_FIXED_RANGES]; unsigned char enabled; unsigned char have_fixed; mtrr_type def_type; }; #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg)) #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1) /* These are the various ioctls */ #define MTRRIOC_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry) #define MTRRIOC_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry) #define MTRRIOC_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry) #define MTRRIOC_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry) #define MTRRIOC_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry) #define MTRRIOC_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry) #define MTRRIOC_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry) #define MTRRIOC_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry) #define MTRRIOC_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry) #define MTRRIOC_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry) /* MTRR memory types, which are defined in SDM */ #define MTRR_TYPE_UNCACHABLE 0 #define MTRR_TYPE_WRCOMB 1 /*#define MTRR_TYPE_ 2*/ /*#define MTRR_TYPE_ 3*/ #define MTRR_TYPE_WRTHROUGH 4 #define MTRR_TYPE_WRPROT 5 #define MTRR_TYPE_WRBACK 6 #define MTRR_NUM_TYPES 7 /* * Invalid MTRR memory type. mtrr_type_lookup() returns this value when * MTRRs are disabled. Note, this value is allocated from the reserved * values (0x7-0xff) of the MTRR memory types. */ #define MTRR_TYPE_INVALID 0xff #endif /* _ASM_X86_MTRR_H */ PKZG2 asm/vmx.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * vmx.h: VMX Architecture related definitions * Copyright (c) 2004, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307 USA. * * A few random additions are: * Copyright (C) 2006 Qumranet * Avi Kivity * Yaniv Kamay * */ #ifndef VMX_H #define VMX_H #define VMX_EXIT_REASONS_FAILED_VMENTRY 0x80000000 #define VMX_EXIT_REASONS_SGX_ENCLAVE_MODE 0x08000000 #define EXIT_REASON_EXCEPTION_NMI 0 #define EXIT_REASON_EXTERNAL_INTERRUPT 1 #define EXIT_REASON_TRIPLE_FAULT 2 #define EXIT_REASON_INIT_SIGNAL 3 #define EXIT_REASON_SIPI_SIGNAL 4 #define EXIT_REASON_INTERRUPT_WINDOW 7 #define EXIT_REASON_NMI_WINDOW 8 #define EXIT_REASON_TASK_SWITCH 9 #define EXIT_REASON_CPUID 10 #define EXIT_REASON_HLT 12 #define EXIT_REASON_INVD 13 #define EXIT_REASON_INVLPG 14 #define EXIT_REASON_RDPMC 15 #define EXIT_REASON_RDTSC 16 #define EXIT_REASON_VMCALL 18 #define EXIT_REASON_VMCLEAR 19 #define EXIT_REASON_VMLAUNCH 20 #define EXIT_REASON_VMPTRLD 21 #define EXIT_REASON_VMPTRST 22 #define EXIT_REASON_VMREAD 23 #define EXIT_REASON_VMRESUME 24 #define EXIT_REASON_VMWRITE 25 #define EXIT_REASON_VMOFF 26 #define EXIT_REASON_VMON 27 #define EXIT_REASON_CR_ACCESS 28 #define EXIT_REASON_DR_ACCESS 29 #define EXIT_REASON_IO_INSTRUCTION 30 #define EXIT_REASON_MSR_READ 31 #define EXIT_REASON_MSR_WRITE 32 #define EXIT_REASON_INVALID_STATE 33 #define EXIT_REASON_MSR_LOAD_FAIL 34 #define EXIT_REASON_MWAIT_INSTRUCTION 36 #define EXIT_REASON_MONITOR_TRAP_FLAG 37 #define EXIT_REASON_MONITOR_INSTRUCTION 39 #define EXIT_REASON_PAUSE_INSTRUCTION 40 #define EXIT_REASON_MCE_DURING_VMENTRY 41 #define EXIT_REASON_TPR_BELOW_THRESHOLD 43 #define EXIT_REASON_APIC_ACCESS 44 #define EXIT_REASON_EOI_INDUCED 45 #define EXIT_REASON_GDTR_IDTR 46 #define EXIT_REASON_LDTR_TR 47 #define EXIT_REASON_EPT_VIOLATION 48 #define EXIT_REASON_EPT_MISCONFIG 49 #define EXIT_REASON_INVEPT 50 #define EXIT_REASON_RDTSCP 51 #define EXIT_REASON_PREEMPTION_TIMER 52 #define EXIT_REASON_INVVPID 53 #define EXIT_REASON_WBINVD 54 #define EXIT_REASON_XSETBV 55 #define EXIT_REASON_APIC_WRITE 56 #define EXIT_REASON_RDRAND 57 #define EXIT_REASON_INVPCID 58 #define EXIT_REASON_VMFUNC 59 #define EXIT_REASON_ENCLS 60 #define EXIT_REASON_RDSEED 61 #define EXIT_REASON_PML_FULL 62 #define EXIT_REASON_XSAVES 63 #define EXIT_REASON_XRSTORS 64 #define EXIT_REASON_UMWAIT 67 #define EXIT_REASON_TPAUSE 68 #define EXIT_REASON_BUS_LOCK 74 #define VMX_EXIT_REASONS \ { EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, \ { EXIT_REASON_EXTERNAL_INTERRUPT, "EXTERNAL_INTERRUPT" }, \ { EXIT_REASON_TRIPLE_FAULT, "TRIPLE_FAULT" }, \ { EXIT_REASON_INIT_SIGNAL, "INIT_SIGNAL" }, \ { EXIT_REASON_SIPI_SIGNAL, "SIPI_SIGNAL" }, \ { EXIT_REASON_INTERRUPT_WINDOW, "INTERRUPT_WINDOW" }, \ { EXIT_REASON_NMI_WINDOW, "NMI_WINDOW" }, \ { EXIT_REASON_TASK_SWITCH, "TASK_SWITCH" }, \ { EXIT_REASON_CPUID, "CPUID" }, \ { EXIT_REASON_HLT, "HLT" }, \ { EXIT_REASON_INVD, "INVD" }, \ { EXIT_REASON_INVLPG, "INVLPG" }, \ { EXIT_REASON_RDPMC, "RDPMC" }, \ { EXIT_REASON_RDTSC, "RDTSC" }, \ { EXIT_REASON_VMCALL, "VMCALL" }, \ { EXIT_REASON_VMCLEAR, "VMCLEAR" }, \ { EXIT_REASON_VMLAUNCH, "VMLAUNCH" }, \ { EXIT_REASON_VMPTRLD, "VMPTRLD" }, \ { EXIT_REASON_VMPTRST, "VMPTRST" }, \ { EXIT_REASON_VMREAD, "VMREAD" }, \ { EXIT_REASON_VMRESUME, "VMRESUME" }, \ { EXIT_REASON_VMWRITE, "VMWRITE" }, \ { EXIT_REASON_VMOFF, "VMOFF" }, \ { EXIT_REASON_VMON, "VMON" }, \ { EXIT_REASON_CR_ACCESS, "CR_ACCESS" }, \ { EXIT_REASON_DR_ACCESS, "DR_ACCESS" }, \ { EXIT_REASON_IO_INSTRUCTION, "IO_INSTRUCTION" }, \ { EXIT_REASON_MSR_READ, "MSR_READ" }, \ { EXIT_REASON_MSR_WRITE, "MSR_WRITE" }, \ { EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, \ { EXIT_REASON_MSR_LOAD_FAIL, "MSR_LOAD_FAIL" }, \ { EXIT_REASON_MWAIT_INSTRUCTION, "MWAIT_INSTRUCTION" }, \ { EXIT_REASON_MONITOR_TRAP_FLAG, "MONITOR_TRAP_FLAG" }, \ { EXIT_REASON_MONITOR_INSTRUCTION, "MONITOR_INSTRUCTION" }, \ { EXIT_REASON_PAUSE_INSTRUCTION, "PAUSE_INSTRUCTION" }, \ { EXIT_REASON_MCE_DURING_VMENTRY, "MCE_DURING_VMENTRY" }, \ { EXIT_REASON_TPR_BELOW_THRESHOLD, "TPR_BELOW_THRESHOLD" }, \ { EXIT_REASON_APIC_ACCESS, "APIC_ACCESS" }, \ { EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, \ { EXIT_REASON_GDTR_IDTR, "GDTR_IDTR" }, \ { EXIT_REASON_LDTR_TR, "LDTR_TR" }, \ { EXIT_REASON_EPT_VIOLATION, "EPT_VIOLATION" }, \ { EXIT_REASON_EPT_MISCONFIG, "EPT_MISCONFIG" }, \ { EXIT_REASON_INVEPT, "INVEPT" }, \ { EXIT_REASON_RDTSCP, "RDTSCP" }, \ { EXIT_REASON_PREEMPTION_TIMER, "PREEMPTION_TIMER" }, \ { EXIT_REASON_INVVPID, "INVVPID" }, \ { EXIT_REASON_WBINVD, "WBINVD" }, \ { EXIT_REASON_XSETBV, "XSETBV" }, \ { EXIT_REASON_APIC_WRITE, "APIC_WRITE" }, \ { EXIT_REASON_RDRAND, "RDRAND" }, \ { EXIT_REASON_INVPCID, "INVPCID" }, \ { EXIT_REASON_VMFUNC, "VMFUNC" }, \ { EXIT_REASON_ENCLS, "ENCLS" }, \ { EXIT_REASON_RDSEED, "RDSEED" }, \ { EXIT_REASON_PML_FULL, "PML_FULL" }, \ { EXIT_REASON_XSAVES, "XSAVES" }, \ { EXIT_REASON_XRSTORS, "XRSTORS" }, \ { EXIT_REASON_UMWAIT, "UMWAIT" }, \ { EXIT_REASON_TPAUSE, "TPAUSE" }, \ { EXIT_REASON_BUS_LOCK, "BUS_LOCK" } #define VMX_EXIT_REASON_FLAGS \ { VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" } #define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1 #define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2 #define VMX_ABORT_LOAD_HOST_MSR_FAIL 4 #endif /* VMX_H */ PKZPasm/kvm_perf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_KVM_PERF_H #define _ASM_X86_KVM_PERF_H #include #include #include #define DECODE_STR_LEN 20 #define VCPU_ID "vcpu_id" #define KVM_ENTRY_TRACE "kvm:kvm_entry" #define KVM_EXIT_TRACE "kvm:kvm_exit" #define KVM_EXIT_REASON "exit_reason" #endif /* _ASM_X86_KVM_PERF_H */ PKZ, asm/fcntl.hnu[#include PKZy, asm/ldt.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * ldt.h * * Definitions of structures used with the modify_ldt system call. */ #ifndef _ASM_X86_LDT_H #define _ASM_X86_LDT_H /* Maximum number of LDT entries supported. */ #define LDT_ENTRIES 8192 /* The size of each LDT entry. */ #define LDT_ENTRY_SIZE 8 #ifndef __ASSEMBLY__ /* * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS * not to the default values if you still want to do syscalls. This * call is more for 32bit mode therefore. */ struct user_desc { unsigned int entry_number; unsigned int base_addr; unsigned int limit; unsigned int seg_32bit:1; unsigned int contents:2; unsigned int read_exec_only:1; unsigned int limit_in_pages:1; unsigned int seg_not_present:1; unsigned int useable:1; #ifdef __x86_64__ /* * Because this bit is not present in 32-bit user code, user * programs can pass uninitialized values here. Therefore, in * any context in which a user_desc comes from a 32-bit program, * the kernel must act as though lm == 0, regardless of the * actual value. */ unsigned int lm:1; #endif }; #define MODIFY_LDT_CONTENTS_DATA 0 #define MODIFY_LDT_CONTENTS_STACK 1 #define MODIFY_LDT_CONTENTS_CODE 2 #endif /* !__ASSEMBLY__ */ #endif /* _ASM_X86_LDT_H */ PKZepd$d$asm/unistd_64.hnu[#ifndef _ASM_X86_UNISTD_64_H #define _ASM_X86_UNISTD_64_H 1 #define __NR_read 0 #define __NR_write 1 #define __NR_open 2 #define __NR_close 3 #define __NR_stat 4 #define __NR_fstat 5 #define __NR_lstat 6 #define __NR_poll 7 #define __NR_lseek 8 #define __NR_mmap 9 #define __NR_mprotect 10 #define __NR_munmap 11 #define __NR_brk 12 #define __NR_rt_sigaction 13 #define __NR_rt_sigprocmask 14 #define __NR_rt_sigreturn 15 #define __NR_ioctl 16 #define __NR_pread64 17 #define __NR_pwrite64 18 #define __NR_readv 19 #define __NR_writev 20 #define __NR_access 21 #define __NR_pipe 22 #define __NR_select 23 #define __NR_sched_yield 24 #define __NR_mremap 25 #define __NR_msync 26 #define __NR_mincore 27 #define __NR_madvise 28 #define __NR_shmget 29 #define __NR_shmat 30 #define __NR_shmctl 31 #define __NR_dup 32 #define __NR_dup2 33 #define __NR_pause 34 #define __NR_nanosleep 35 #define __NR_getitimer 36 #define __NR_alarm 37 #define __NR_setitimer 38 #define __NR_getpid 39 #define __NR_sendfile 40 #define __NR_socket 41 #define __NR_connect 42 #define __NR_accept 43 #define __NR_sendto 44 #define __NR_recvfrom 45 #define __NR_sendmsg 46 #define __NR_recvmsg 47 #define __NR_shutdown 48 #define __NR_bind 49 #define __NR_listen 50 #define __NR_getsockname 51 #define __NR_getpeername 52 #define __NR_socketpair 53 #define __NR_setsockopt 54 #define __NR_getsockopt 55 #define __NR_clone 56 #define __NR_fork 57 #define __NR_vfork 58 #define __NR_execve 59 #define __NR_exit 60 #define __NR_wait4 61 #define __NR_kill 62 #define __NR_uname 63 #define __NR_semget 64 #define __NR_semop 65 #define __NR_semctl 66 #define __NR_shmdt 67 #define __NR_msgget 68 #define __NR_msgsnd 69 #define __NR_msgrcv 70 #define __NR_msgctl 71 #define __NR_fcntl 72 #define __NR_flock 73 #define __NR_fsync 74 #define __NR_fdatasync 75 #define __NR_truncate 76 #define __NR_ftruncate 77 #define __NR_getdents 78 #define __NR_getcwd 79 #define __NR_chdir 80 #define __NR_fchdir 81 #define __NR_rename 82 #define __NR_mkdir 83 #define __NR_rmdir 84 #define __NR_creat 85 #define __NR_link 86 #define __NR_unlink 87 #define __NR_symlink 88 #define __NR_readlink 89 #define __NR_chmod 90 #define __NR_fchmod 91 #define __NR_chown 92 #define __NR_fchown 93 #define __NR_lchown 94 #define __NR_umask 95 #define __NR_gettimeofday 96 #define __NR_getrlimit 97 #define __NR_getrusage 98 #define __NR_sysinfo 99 #define __NR_times 100 #define __NR_ptrace 101 #define __NR_getuid 102 #define __NR_syslog 103 #define __NR_getgid 104 #define __NR_setuid 105 #define __NR_setgid 106 #define __NR_geteuid 107 #define __NR_getegid 108 #define __NR_setpgid 109 #define __NR_getppid 110 #define __NR_getpgrp 111 #define __NR_setsid 112 #define __NR_setreuid 113 #define __NR_setregid 114 #define __NR_getgroups 115 #define __NR_setgroups 116 #define __NR_setresuid 117 #define __NR_getresuid 118 #define __NR_setresgid 119 #define __NR_getresgid 120 #define __NR_getpgid 121 #define __NR_setfsuid 122 #define __NR_setfsgid 123 #define __NR_getsid 124 #define __NR_capget 125 #define __NR_capset 126 #define __NR_rt_sigpending 127 #define __NR_rt_sigtimedwait 128 #define __NR_rt_sigqueueinfo 129 #define __NR_rt_sigsuspend 130 #define __NR_sigaltstack 131 #define __NR_utime 132 #define __NR_mknod 133 #define __NR_uselib 134 #define __NR_personality 135 #define __NR_ustat 136 #define __NR_statfs 137 #define __NR_fstatfs 138 #define __NR_sysfs 139 #define __NR_getpriority 140 #define __NR_setpriority 141 #define __NR_sched_setparam 142 #define __NR_sched_getparam 143 #define __NR_sched_setscheduler 144 #define __NR_sched_getscheduler 145 #define __NR_sched_get_priority_max 146 #define __NR_sched_get_priority_min 147 #define __NR_sched_rr_get_interval 148 #define __NR_mlock 149 #define __NR_munlock 150 #define __NR_mlockall 151 #define __NR_munlockall 152 #define __NR_vhangup 153 #define __NR_modify_ldt 154 #define __NR_pivot_root 155 #define __NR__sysctl 156 #define __NR_prctl 157 #define __NR_arch_prctl 158 #define __NR_adjtimex 159 #define __NR_setrlimit 160 #define __NR_chroot 161 #define __NR_sync 162 #define __NR_acct 163 #define __NR_settimeofday 164 #define __NR_mount 165 #define __NR_umount2 166 #define __NR_swapon 167 #define __NR_swapoff 168 #define __NR_reboot 169 #define __NR_sethostname 170 #define __NR_setdomainname 171 #define __NR_iopl 172 #define __NR_ioperm 173 #define __NR_create_module 174 #define __NR_init_module 175 #define __NR_delete_module 176 #define __NR_get_kernel_syms 177 #define __NR_query_module 178 #define __NR_quotactl 179 #define __NR_nfsservctl 180 #define __NR_getpmsg 181 #define __NR_putpmsg 182 #define __NR_afs_syscall 183 #define __NR_tuxcall 184 #define __NR_security 185 #define __NR_gettid 186 #define __NR_readahead 187 #define __NR_setxattr 188 #define __NR_lsetxattr 189 #define __NR_fsetxattr 190 #define __NR_getxattr 191 #define __NR_lgetxattr 192 #define __NR_fgetxattr 193 #define __NR_listxattr 194 #define __NR_llistxattr 195 #define __NR_flistxattr 196 #define __NR_removexattr 197 #define __NR_lremovexattr 198 #define __NR_fremovexattr 199 #define __NR_tkill 200 #define __NR_time 201 #define __NR_futex 202 #define __NR_sched_setaffinity 203 #define __NR_sched_getaffinity 204 #define __NR_set_thread_area 205 #define __NR_io_setup 206 #define __NR_io_destroy 207 #define __NR_io_getevents 208 #define __NR_io_submit 209 #define __NR_io_cancel 210 #define __NR_get_thread_area 211 #define __NR_lookup_dcookie 212 #define __NR_epoll_create 213 #define __NR_epoll_ctl_old 214 #define __NR_epoll_wait_old 215 #define __NR_remap_file_pages 216 #define __NR_getdents64 217 #define __NR_set_tid_address 218 #define __NR_restart_syscall 219 #define __NR_semtimedop 220 #define __NR_fadvise64 221 #define __NR_timer_create 222 #define __NR_timer_settime 223 #define __NR_timer_gettime 224 #define __NR_timer_getoverrun 225 #define __NR_timer_delete 226 #define __NR_clock_settime 227 #define __NR_clock_gettime 228 #define __NR_clock_getres 229 #define __NR_clock_nanosleep 230 #define __NR_exit_group 231 #define __NR_epoll_wait 232 #define __NR_epoll_ctl 233 #define __NR_tgkill 234 #define __NR_utimes 235 #define __NR_vserver 236 #define __NR_mbind 237 #define __NR_set_mempolicy 238 #define __NR_get_mempolicy 239 #define __NR_mq_open 240 #define __NR_mq_unlink 241 #define __NR_mq_timedsend 242 #define __NR_mq_timedreceive 243 #define __NR_mq_notify 244 #define __NR_mq_getsetattr 245 #define __NR_kexec_load 246 #define __NR_waitid 247 #define __NR_add_key 248 #define __NR_request_key 249 #define __NR_keyctl 250 #define __NR_ioprio_set 251 #define __NR_ioprio_get 252 #define __NR_inotify_init 253 #define __NR_inotify_add_watch 254 #define __NR_inotify_rm_watch 255 #define __NR_migrate_pages 256 #define __NR_openat 257 #define __NR_mkdirat 258 #define __NR_mknodat 259 #define __NR_fchownat 260 #define __NR_futimesat 261 #define __NR_newfstatat 262 #define __NR_unlinkat 263 #define __NR_renameat 264 #define __NR_linkat 265 #define __NR_symlinkat 266 #define __NR_readlinkat 267 #define __NR_fchmodat 268 #define __NR_faccessat 269 #define __NR_pselect6 270 #define __NR_ppoll 271 #define __NR_unshare 272 #define __NR_set_robust_list 273 #define __NR_get_robust_list 274 #define __NR_splice 275 #define __NR_tee 276 #define __NR_sync_file_range 277 #define __NR_vmsplice 278 #define __NR_move_pages 279 #define __NR_utimensat 280 #define __NR_epoll_pwait 281 #define __NR_signalfd 282 #define __NR_timerfd_create 283 #define __NR_eventfd 284 #define __NR_fallocate 285 #define __NR_timerfd_settime 286 #define __NR_timerfd_gettime 287 #define __NR_accept4 288 #define __NR_signalfd4 289 #define __NR_eventfd2 290 #define __NR_epoll_create1 291 #define __NR_dup3 292 #define __NR_pipe2 293 #define __NR_inotify_init1 294 #define __NR_preadv 295 #define __NR_pwritev 296 #define __NR_rt_tgsigqueueinfo 297 #define __NR_perf_event_open 298 #define __NR_recvmmsg 299 #define __NR_fanotify_init 300 #define __NR_fanotify_mark 301 #define __NR_prlimit64 302 #define __NR_name_to_handle_at 303 #define __NR_open_by_handle_at 304 #define __NR_clock_adjtime 305 #define __NR_syncfs 306 #define __NR_sendmmsg 307 #define __NR_setns 308 #define __NR_getcpu 309 #define __NR_process_vm_readv 310 #define __NR_process_vm_writev 311 #define __NR_kcmp 312 #define __NR_finit_module 313 #define __NR_sched_setattr 314 #define __NR_sched_getattr 315 #define __NR_renameat2 316 #define __NR_seccomp 317 #define __NR_getrandom 318 #define __NR_memfd_create 319 #define __NR_kexec_file_load 320 #define __NR_bpf 321 #define __NR_execveat 322 #define __NR_userfaultfd 323 #define __NR_membarrier 324 #define __NR_mlock2 325 #define __NR_copy_file_range 326 #define __NR_preadv2 327 #define __NR_pwritev2 328 #define __NR_pkey_mprotect 329 #define __NR_pkey_alloc 330 #define __NR_pkey_free 331 #define __NR_statx 332 #define __NR_io_pgetevents 333 #define __NR_rseq 334 #define __NR_pidfd_send_signal 424 #define __NR_io_uring_setup 425 #define __NR_io_uring_enter 426 #define __NR_io_uring_register 427 #define __NR_open_tree 428 #define __NR_move_mount 429 #define __NR_fsopen 430 #define __NR_fsconfig 431 #define __NR_fsmount 432 #define __NR_fspick 433 #define __NR_close_range 436 #define __NR_openat2 437 #define __NR_faccessat2 439 #endif /* _ASM_X86_UNISTD_64_H */ PKZrU8 asm/ioctl.hnu[#include PKZ!! asm/sockios.hnu[#include PKZu asm/sembuf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_SEMBUF_H #define _ASM_X86_SEMBUF_H /* * The semid64_ds structure for x86 architecture. * Note extra padding because this structure is passed back and forth * between kernel and user space. * * Pad space is left for: * - 2 miscellaneous 32-bit values * * x86_64 and x32 incorrectly added padding here, so the structures * are still incompatible with the padding on x86. */ struct semid64_ds { struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ #ifdef __i386__ unsigned long sem_otime; /* last semop time */ unsigned long sem_otime_high; unsigned long sem_ctime; /* last change time */ unsigned long sem_ctime_high; #else __kernel_time_t sem_otime; /* last semop time */ __kernel_ulong_t __unused1; __kernel_time_t sem_ctime; /* last change time */ __kernel_ulong_t __unused2; #endif __kernel_ulong_t sem_nsems; /* no. of semaphores in array */ __kernel_ulong_t __unused3; __kernel_ulong_t __unused4; }; #endif /* _ASM_X86_SEMBUF_H */ PKZat asm/siginfo.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_SIGINFO_H #define _ASM_X86_SIGINFO_H #ifdef __x86_64__ # ifdef __ILP32__ /* x32 */ typedef long long __kernel_si_clock_t __attribute__((aligned(4))); # define __ARCH_SI_CLOCK_T __kernel_si_clock_t # define __ARCH_SI_ATTRIBUTES __attribute__((aligned(8))) # endif #endif #include #endif /* _ASM_X86_SIGINFO_H */ PKZ{CEEasm/hw_breakpoint.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* */ PKZyjj asm/prctl.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_PRCTL_H #define _ASM_X86_PRCTL_H #define ARCH_SET_GS 0x1001 #define ARCH_SET_FS 0x1002 #define ARCH_GET_FS 0x1003 #define ARCH_GET_GS 0x1004 #define ARCH_GET_CPUID 0x1011 #define ARCH_SET_CPUID 0x1012 #define ARCH_GET_XCOMP_SUPP 0x1021 #define ARCH_GET_XCOMP_PERM 0x1022 #define ARCH_REQ_XCOMP_PERM 0x1023 #define ARCH_GET_XCOMP_GUEST_PERM 0x1024 #define ARCH_REQ_XCOMP_GUEST_PERM 0x1025 #define ARCH_MAP_VDSO_X32 0x2001 #define ARCH_MAP_VDSO_32 0x2002 #define ARCH_MAP_VDSO_64 0x2003 #endif /* _ASM_X86_PRCTL_H */ PKZH9v  asm/debugreg.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_DEBUGREG_H #define _ASM_X86_DEBUGREG_H /* Indicate the register numbers for a number of the specific debug registers. Registers 0-3 contain the addresses we wish to trap on */ #define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */ #define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */ #define DR_STATUS 6 /* u_debugreg[DR_STATUS] */ #define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */ /* Define a few things for the status register. We can use this to determine which debugging register was responsible for the trap. The other bits are either reserved or not of interest to us. */ /* Define reserved bits in DR6 which are always set to 1 */ #define DR6_RESERVED (0xFFFF0FF0) #define DR_TRAP0 (0x1) /* db0 */ #define DR_TRAP1 (0x2) /* db1 */ #define DR_TRAP2 (0x4) /* db2 */ #define DR_TRAP3 (0x8) /* db3 */ #define DR_TRAP_BITS (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3) #define DR_BUS_LOCK (0x800) /* bus_lock */ #define DR_STEP (0x4000) /* single-step */ #define DR_SWITCH (0x8000) /* task switch */ /* Now define a bunch of things for manipulating the control register. The top two bytes of the control register consist of 4 fields of 4 bits - each field corresponds to one of the four debug registers, and indicates what types of access we trap on, and how large the data field is that we are looking at */ #define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */ #define DR_CONTROL_SIZE 4 /* 4 control bits per register */ #define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */ #define DR_RW_WRITE (0x1) #define DR_RW_READ (0x3) #define DR_LEN_1 (0x0) /* Settings for data length to trap on */ #define DR_LEN_2 (0x4) #define DR_LEN_4 (0xC) #define DR_LEN_8 (0x8) /* The low byte to the control register determine which registers are enabled. There are 4 fields of two bits. One bit is "local", meaning that the processor will reset the bit after a task switch and the other is global meaning that we have to explicitly reset the bit. With linux, you can use either one, since we explicitly zero the register when we enter kernel mode. */ #define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */ #define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */ #define DR_LOCAL_ENABLE (0x1) /* Local enable for reg 0 */ #define DR_GLOBAL_ENABLE (0x2) /* Global enable for reg 0 */ #define DR_ENABLE_SIZE 2 /* 2 enable bits per register */ #define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */ #define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */ /* The second byte to the control register has a few special things. We can slow the instruction pipeline for instructions coming via the gdt or the ldt if we want to. I am not sure why this is an advantage */ #ifdef __i386__ #define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */ #else #define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL) /* Reserved */ #endif #define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ #define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ /* * HW breakpoint additions */ #endif /* _ASM_X86_DEBUGREG_H */ PKZ2 asm/a.out.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_A_OUT_H #define _ASM_X86_A_OUT_H struct exec { unsigned int a_info; /* Use macros N_MAGIC, etc for access */ unsigned a_text; /* length of text, in bytes */ unsigned a_data; /* length of data, in bytes */ unsigned a_bss; /* length of uninitialized data area for file, in bytes */ unsigned a_syms; /* length of symbol table data in file, in bytes */ unsigned a_entry; /* start address */ unsigned a_trsize; /* length of relocation info for text, in bytes */ unsigned a_drsize; /* length of relocation info for data, in bytes */ }; #define N_TRSIZE(a) ((a).a_trsize) #define N_DRSIZE(a) ((a).a_drsize) #define N_SYMSIZE(a) ((a).a_syms) #endif /* _ASM_X86_A_OUT_H */ PKZHaaasm/posix_types_64.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_POSIX_TYPES_64_H #define _ASM_X86_POSIX_TYPES_64_H /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot * assume GCC is being used. */ typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; #define __kernel_old_uid_t __kernel_old_uid_t typedef unsigned long __kernel_old_dev_t; #define __kernel_old_dev_t __kernel_old_dev_t #include #endif /* _ASM_X86_POSIX_TYPES_64_H */ PKZ!i|  asm/e820.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_E820_H #define _ASM_X86_E820_H #define E820MAP 0x2d0 /* our map */ #define E820MAX 128 /* number of entries in E820MAP */ /* * Legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the * constrained space in the zeropage. If we have more nodes than * that, and if we've booted off EFI firmware, then the EFI tables * passed us from the EFI firmware can list more nodes. Size our * internal memory map tables to have room for these additional * nodes, based on up to three entries per node for which the * kernel was built: MAX_NUMNODES == (1 << CONFIG_NODES_SHIFT), * plus E820MAX, allowing space for the possible duplicate E820 * entries that might need room in the same arrays, prior to the * call to sanitize_e820_map() to remove duplicates. The allowance * of three memory map entries per node is "enough" entries for * the initial hardware platform motivating this mechanism to make * use of additional EFI map entries. Future platforms may want * to allow more than three entries per node or otherwise refine * this size. */ #define E820_X_MAX E820MAX #define E820NR 0x1e8 /* # entries in E820MAP */ #define E820_RAM 1 #define E820_RESERVED 2 #define E820_ACPI 3 #define E820_NVS 4 #define E820_UNUSABLE 5 #define E820_PMEM 7 /* * This is a non-standardized way to represent ADR or NVDIMM regions that * persist over a reboot. The kernel will ignore their special capabilities * unless the CONFIG_X86_PMEM_LEGACY option is set. * * ( Note that older platforms also used 6 for the same type of memory, * but newer versions switched to 12 as 6 was assigned differently. Some * time they will learn... ) */ #define E820_PRAM 12 /* * reserved RAM used by kernel itself * if CONFIG_INTEL_TXT is enabled, memory of this type will be * included in the S3 integrity calculation and so should not include * any memory that BIOS might alter over the S3 transition */ #define E820_RESERVED_KERN 128 #ifndef __ASSEMBLY__ #include struct e820entry { __u64 addr; /* start of memory segment */ __u64 size; /* size of memory segment */ __u32 type; /* type of memory segment */ } __attribute__((packed)); struct e820map { __u32 nr_map; struct e820entry map[E820_X_MAX]; }; #define ISA_START_ADDRESS 0xa0000 #define ISA_END_ADDRESS 0x100000 #define BIOS_BEGIN 0x000a0000 #define BIOS_END 0x00100000 #define BIOS_ROM_BASE 0xffe00000 #define BIOS_ROM_END 0xffffffff #endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_E820_H */ PKZFVV asm/ist.hnu[/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ /* * Include file for the interface to IST BIOS * Copyright 2002 Andy Grover * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. */ #ifndef _ASM_X86_IST_H #define _ASM_X86_IST_H #include struct ist_info { __u32 signature; __u32 command; __u32 event; __u32 perf_level; }; #endif /* _ASM_X86_IST_H */ PKZڬ asm/swab.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_SWAB_H #define _ASM_X86_SWAB_H #include static __inline__ __u32 __arch_swab32(__u32 val) { __asm__("bswapl %0" : "=r" (val) : "0" (val)); return val; } #define __arch_swab32 __arch_swab32 static __inline__ __u64 __arch_swab64(__u64 val) { #ifdef __i386__ union { struct { __u32 a; __u32 b; } s; __u64 u; } v; v.u = val; __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b)); return v.u; #else /* __i386__ */ __asm__("bswapq %0" : "=r" (val) : "0" (val)); return val; #endif } #define __arch_swab64 __arch_swab64 #endif /* _ASM_X86_SWAB_H */ PKZ d asm/msgbuf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_X64_MSGBUF_H #define __ASM_X64_MSGBUF_H #if !defined(__x86_64__) || !defined(__ILP32__) #include #else /* * The msqid64_ds structure for x86 architecture with x32 ABI. * * On x86-32 and x86-64 we can just use the generic definition, but * x32 uses the same binary layout as x86_64, which is differnet * from other 32-bit architectures. */ struct msqid64_ds { struct ipc64_perm msg_perm; __kernel_time_t msg_stime; /* last msgsnd time */ __kernel_time_t msg_rtime; /* last msgrcv time */ __kernel_time_t msg_ctime; /* last change time */ __kernel_ulong_t msg_cbytes; /* current number of bytes on queue */ __kernel_ulong_t msg_qnum; /* number of messages in queue */ __kernel_ulong_t msg_qbytes; /* max number of bytes on queue */ __kernel_pid_t msg_lspid; /* pid of last msgsnd */ __kernel_pid_t msg_lrpid; /* last receive pid */ __kernel_ulong_t __unused4; __kernel_ulong_t __unused5; }; #endif #endif /* __ASM_GENERIC_MSGBUF_H */ PKZ{{asm/perf_regs.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_PERF_REGS_H #define _ASM_X86_PERF_REGS_H enum perf_event_x86_regs { PERF_REG_X86_AX, PERF_REG_X86_BX, PERF_REG_X86_CX, PERF_REG_X86_DX, PERF_REG_X86_SI, PERF_REG_X86_DI, PERF_REG_X86_BP, PERF_REG_X86_SP, PERF_REG_X86_IP, PERF_REG_X86_FLAGS, PERF_REG_X86_CS, PERF_REG_X86_SS, PERF_REG_X86_DS, PERF_REG_X86_ES, PERF_REG_X86_FS, PERF_REG_X86_GS, PERF_REG_X86_R8, PERF_REG_X86_R9, PERF_REG_X86_R10, PERF_REG_X86_R11, PERF_REG_X86_R12, PERF_REG_X86_R13, PERF_REG_X86_R14, PERF_REG_X86_R15, /* These are the limits for the GPRs. */ PERF_REG_X86_32_MAX = PERF_REG_X86_GS + 1, PERF_REG_X86_64_MAX = PERF_REG_X86_R15 + 1, /* These all need two bits set because they are 128bit */ PERF_REG_X86_XMM0 = 32, PERF_REG_X86_XMM1 = 34, PERF_REG_X86_XMM2 = 36, PERF_REG_X86_XMM3 = 38, PERF_REG_X86_XMM4 = 40, PERF_REG_X86_XMM5 = 42, PERF_REG_X86_XMM6 = 44, PERF_REG_X86_XMM7 = 46, PERF_REG_X86_XMM8 = 48, PERF_REG_X86_XMM9 = 50, PERF_REG_X86_XMM10 = 52, PERF_REG_X86_XMM11 = 54, PERF_REG_X86_XMM12 = 56, PERF_REG_X86_XMM13 = 58, PERF_REG_X86_XMM14 = 60, PERF_REG_X86_XMM15 = 62, /* These include both GPRs and XMMX registers */ PERF_REG_X86_XMM_MAX = PERF_REG_X86_XMM15 + 2, }; #define PERF_REG_EXTENDED_MASK (~((1ULL << PERF_REG_X86_XMM0) - 1)) #endif /* _ASM_X86_PERF_REGS_H */ PKZasm/posix_types_32.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_POSIX_TYPES_32_H #define _ASM_X86_POSIX_TYPES_32_H /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot * assume GCC is being used. */ typedef unsigned short __kernel_mode_t; #define __kernel_mode_t __kernel_mode_t typedef unsigned short __kernel_ipc_pid_t; #define __kernel_ipc_pid_t __kernel_ipc_pid_t typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; #define __kernel_uid_t __kernel_uid_t typedef unsigned short __kernel_old_dev_t; #define __kernel_old_dev_t __kernel_old_dev_t #include #endif /* _ASM_X86_POSIX_TYPES_32_H */ PKZ 8{+{+asm/unistd_32.hnu[#ifndef _ASM_X86_UNISTD_32_H #define _ASM_X86_UNISTD_32_H 1 #define __NR_restart_syscall 0 #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 #define __NR_write 4 #define __NR_open 5 #define __NR_close 6 #define __NR_waitpid 7 #define __NR_creat 8 #define __NR_link 9 #define __NR_unlink 10 #define __NR_execve 11 #define __NR_chdir 12 #define __NR_time 13 #define __NR_mknod 14 #define __NR_chmod 15 #define __NR_lchown 16 #define __NR_break 17 #define __NR_oldstat 18 #define __NR_lseek 19 #define __NR_getpid 20 #define __NR_mount 21 #define __NR_umount 22 #define __NR_setuid 23 #define __NR_getuid 24 #define __NR_stime 25 #define __NR_ptrace 26 #define __NR_alarm 27 #define __NR_oldfstat 28 #define __NR_pause 29 #define __NR_utime 30 #define __NR_stty 31 #define __NR_gtty 32 #define __NR_access 33 #define __NR_nice 34 #define __NR_ftime 35 #define __NR_sync 36 #define __NR_kill 37 #define __NR_rename 38 #define __NR_mkdir 39 #define __NR_rmdir 40 #define __NR_dup 41 #define __NR_pipe 42 #define __NR_times 43 #define __NR_prof 44 #define __NR_brk 45 #define __NR_setgid 46 #define __NR_getgid 47 #define __NR_signal 48 #define __NR_geteuid 49 #define __NR_getegid 50 #define __NR_acct 51 #define __NR_umount2 52 #define __NR_lock 53 #define __NR_ioctl 54 #define __NR_fcntl 55 #define __NR_mpx 56 #define __NR_setpgid 57 #define __NR_ulimit 58 #define __NR_oldolduname 59 #define __NR_umask 60 #define __NR_chroot 61 #define __NR_ustat 62 #define __NR_dup2 63 #define __NR_getppid 64 #define __NR_getpgrp 65 #define __NR_setsid 66 #define __NR_sigaction 67 #define __NR_sgetmask 68 #define __NR_ssetmask 69 #define __NR_setreuid 70 #define __NR_setregid 71 #define __NR_sigsuspend 72 #define __NR_sigpending 73 #define __NR_sethostname 74 #define __NR_setrlimit 75 #define __NR_getrlimit 76 #define __NR_getrusage 77 #define __NR_gettimeofday 78 #define __NR_settimeofday 79 #define __NR_getgroups 80 #define __NR_setgroups 81 #define __NR_select 82 #define __NR_symlink 83 #define __NR_oldlstat 84 #define __NR_readlink 85 #define __NR_uselib 86 #define __NR_swapon 87 #define __NR_reboot 88 #define __NR_readdir 89 #define __NR_mmap 90 #define __NR_munmap 91 #define __NR_truncate 92 #define __NR_ftruncate 93 #define __NR_fchmod 94 #define __NR_fchown 95 #define __NR_getpriority 96 #define __NR_setpriority 97 #define __NR_profil 98 #define __NR_statfs 99 #define __NR_fstatfs 100 #define __NR_ioperm 101 #define __NR_socketcall 102 #define __NR_syslog 103 #define __NR_setitimer 104 #define __NR_getitimer 105 #define __NR_stat 106 #define __NR_lstat 107 #define __NR_fstat 108 #define __NR_olduname 109 #define __NR_iopl 110 #define __NR_vhangup 111 #define __NR_idle 112 #define __NR_vm86old 113 #define __NR_wait4 114 #define __NR_swapoff 115 #define __NR_sysinfo 116 #define __NR_ipc 117 #define __NR_fsync 118 #define __NR_sigreturn 119 #define __NR_clone 120 #define __NR_setdomainname 121 #define __NR_uname 122 #define __NR_modify_ldt 123 #define __NR_adjtimex 124 #define __NR_mprotect 125 #define __NR_sigprocmask 126 #define __NR_create_module 127 #define __NR_init_module 128 #define __NR_delete_module 129 #define __NR_get_kernel_syms 130 #define __NR_quotactl 131 #define __NR_getpgid 132 #define __NR_fchdir 133 #define __NR_bdflush 134 #define __NR_sysfs 135 #define __NR_personality 136 #define __NR_afs_syscall 137 #define __NR_setfsuid 138 #define __NR_setfsgid 139 #define __NR__llseek 140 #define __NR_getdents 141 #define __NR__newselect 142 #define __NR_flock 143 #define __NR_msync 144 #define __NR_readv 145 #define __NR_writev 146 #define __NR_getsid 147 #define __NR_fdatasync 148 #define __NR__sysctl 149 #define __NR_mlock 150 #define __NR_munlock 151 #define __NR_mlockall 152 #define __NR_munlockall 153 #define __NR_sched_setparam 154 #define __NR_sched_getparam 155 #define __NR_sched_setscheduler 156 #define __NR_sched_getscheduler 157 #define __NR_sched_yield 158 #define __NR_sched_get_priority_max 159 #define __NR_sched_get_priority_min 160 #define __NR_sched_rr_get_interval 161 #define __NR_nanosleep 162 #define __NR_mremap 163 #define __NR_setresuid 164 #define __NR_getresuid 165 #define __NR_vm86 166 #define __NR_query_module 167 #define __NR_poll 168 #define __NR_nfsservctl 169 #define __NR_setresgid 170 #define __NR_getresgid 171 #define __NR_prctl 172 #define __NR_rt_sigreturn 173 #define __NR_rt_sigaction 174 #define __NR_rt_sigprocmask 175 #define __NR_rt_sigpending 176 #define __NR_rt_sigtimedwait 177 #define __NR_rt_sigqueueinfo 178 #define __NR_rt_sigsuspend 179 #define __NR_pread64 180 #define __NR_pwrite64 181 #define __NR_chown 182 #define __NR_getcwd 183 #define __NR_capget 184 #define __NR_capset 185 #define __NR_sigaltstack 186 #define __NR_sendfile 187 #define __NR_getpmsg 188 #define __NR_putpmsg 189 #define __NR_vfork 190 #define __NR_ugetrlimit 191 #define __NR_mmap2 192 #define __NR_truncate64 193 #define __NR_ftruncate64 194 #define __NR_stat64 195 #define __NR_lstat64 196 #define __NR_fstat64 197 #define __NR_lchown32 198 #define __NR_getuid32 199 #define __NR_getgid32 200 #define __NR_geteuid32 201 #define __NR_getegid32 202 #define __NR_setreuid32 203 #define __NR_setregid32 204 #define __NR_getgroups32 205 #define __NR_setgroups32 206 #define __NR_fchown32 207 #define __NR_setresuid32 208 #define __NR_getresuid32 209 #define __NR_setresgid32 210 #define __NR_getresgid32 211 #define __NR_chown32 212 #define __NR_setuid32 213 #define __NR_setgid32 214 #define __NR_setfsuid32 215 #define __NR_setfsgid32 216 #define __NR_pivot_root 217 #define __NR_mincore 218 #define __NR_madvise 219 #define __NR_getdents64 220 #define __NR_fcntl64 221 #define __NR_gettid 224 #define __NR_readahead 225 #define __NR_setxattr 226 #define __NR_lsetxattr 227 #define __NR_fsetxattr 228 #define __NR_getxattr 229 #define __NR_lgetxattr 230 #define __NR_fgetxattr 231 #define __NR_listxattr 232 #define __NR_llistxattr 233 #define __NR_flistxattr 234 #define __NR_removexattr 235 #define __NR_lremovexattr 236 #define __NR_fremovexattr 237 #define __NR_tkill 238 #define __NR_sendfile64 239 #define __NR_futex 240 #define __NR_sched_setaffinity 241 #define __NR_sched_getaffinity 242 #define __NR_set_thread_area 243 #define __NR_get_thread_area 244 #define __NR_io_setup 245 #define __NR_io_destroy 246 #define __NR_io_getevents 247 #define __NR_io_submit 248 #define __NR_io_cancel 249 #define __NR_fadvise64 250 #define __NR_exit_group 252 #define __NR_lookup_dcookie 253 #define __NR_epoll_create 254 #define __NR_epoll_ctl 255 #define __NR_epoll_wait 256 #define __NR_remap_file_pages 257 #define __NR_set_tid_address 258 #define __NR_timer_create 259 #define __NR_timer_settime 260 #define __NR_timer_gettime 261 #define __NR_timer_getoverrun 262 #define __NR_timer_delete 263 #define __NR_clock_settime 264 #define __NR_clock_gettime 265 #define __NR_clock_getres 266 #define __NR_clock_nanosleep 267 #define __NR_statfs64 268 #define __NR_fstatfs64 269 #define __NR_tgkill 270 #define __NR_utimes 271 #define __NR_fadvise64_64 272 #define __NR_vserver 273 #define __NR_mbind 274 #define __NR_get_mempolicy 275 #define __NR_set_mempolicy 276 #define __NR_mq_open 277 #define __NR_mq_unlink 278 #define __NR_mq_timedsend 279 #define __NR_mq_timedreceive 280 #define __NR_mq_notify 281 #define __NR_mq_getsetattr 282 #define __NR_kexec_load 283 #define __NR_waitid 284 #define __NR_add_key 286 #define __NR_request_key 287 #define __NR_keyctl 288 #define __NR_ioprio_set 289 #define __NR_ioprio_get 290 #define __NR_inotify_init 291 #define __NR_inotify_add_watch 292 #define __NR_inotify_rm_watch 293 #define __NR_migrate_pages 294 #define __NR_openat 295 #define __NR_mkdirat 296 #define __NR_mknodat 297 #define __NR_fchownat 298 #define __NR_futimesat 299 #define __NR_fstatat64 300 #define __NR_unlinkat 301 #define __NR_renameat 302 #define __NR_linkat 303 #define __NR_symlinkat 304 #define __NR_readlinkat 305 #define __NR_fchmodat 306 #define __NR_faccessat 307 #define __NR_pselect6 308 #define __NR_ppoll 309 #define __NR_unshare 310 #define __NR_set_robust_list 311 #define __NR_get_robust_list 312 #define __NR_splice 313 #define __NR_sync_file_range 314 #define __NR_tee 315 #define __NR_vmsplice 316 #define __NR_move_pages 317 #define __NR_getcpu 318 #define __NR_epoll_pwait 319 #define __NR_utimensat 320 #define __NR_signalfd 321 #define __NR_timerfd_create 322 #define __NR_eventfd 323 #define __NR_fallocate 324 #define __NR_timerfd_settime 325 #define __NR_timerfd_gettime 326 #define __NR_signalfd4 327 #define __NR_eventfd2 328 #define __NR_epoll_create1 329 #define __NR_dup3 330 #define __NR_pipe2 331 #define __NR_inotify_init1 332 #define __NR_preadv 333 #define __NR_pwritev 334 #define __NR_rt_tgsigqueueinfo 335 #define __NR_perf_event_open 336 #define __NR_recvmmsg 337 #define __NR_fanotify_init 338 #define __NR_fanotify_mark 339 #define __NR_prlimit64 340 #define __NR_name_to_handle_at 341 #define __NR_open_by_handle_at 342 #define __NR_clock_adjtime 343 #define __NR_syncfs 344 #define __NR_sendmmsg 345 #define __NR_setns 346 #define __NR_process_vm_readv 347 #define __NR_process_vm_writev 348 #define __NR_kcmp 349 #define __NR_finit_module 350 #define __NR_sched_setattr 351 #define __NR_sched_getattr 352 #define __NR_renameat2 353 #define __NR_seccomp 354 #define __NR_getrandom 355 #define __NR_memfd_create 356 #define __NR_bpf 357 #define __NR_execveat 358 #define __NR_socket 359 #define __NR_socketpair 360 #define __NR_bind 361 #define __NR_connect 362 #define __NR_listen 363 #define __NR_accept4 364 #define __NR_getsockopt 365 #define __NR_setsockopt 366 #define __NR_getsockname 367 #define __NR_getpeername 368 #define __NR_sendto 369 #define __NR_sendmsg 370 #define __NR_recvfrom 371 #define __NR_recvmsg 372 #define __NR_shutdown 373 #define __NR_userfaultfd 374 #define __NR_membarrier 375 #define __NR_mlock2 376 #define __NR_copy_file_range 377 #define __NR_preadv2 378 #define __NR_pwritev2 379 #define __NR_pkey_mprotect 380 #define __NR_pkey_alloc 381 #define __NR_pkey_free 382 #define __NR_statx 383 #define __NR_arch_prctl 384 #define __NR_io_pgetevents 385 #define __NR_rseq 386 #define __NR_clock_gettime64 403 #define __NR_clock_settime64 404 #define __NR_clock_adjtime64 405 #define __NR_clock_getres_time64 406 #define __NR_clock_nanosleep_time64 407 #define __NR_timer_gettime64 408 #define __NR_timer_settime64 409 #define __NR_timerfd_gettime64 410 #define __NR_timerfd_settime64 411 #define __NR_utimensat_time64 412 #define __NR_io_pgetevents_time64 416 #define __NR_mq_timedsend_time64 418 #define __NR_mq_timedreceive_time64 419 #define __NR_semtimedop_time64 420 #define __NR_futex_time64 422 #define __NR_sched_rr_get_interval_time64 423 #define __NR_pidfd_send_signal 424 #define __NR_io_uring_setup 425 #define __NR_io_uring_enter 426 #define __NR_io_uring_register 427 #define __NR_open_tree 428 #define __NR_move_mount 429 #define __NR_fsopen 430 #define __NR_fsconfig 431 #define __NR_fsmount 432 #define __NR_fspick 433 #define __NR_close_range 436 #define __NR_openat2 437 #define __NR_faccessat2 439 #endif /* _ASM_X86_UNISTD_32_H */ PKZPm-- asm/kvm.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_KVM_H #define _ASM_X86_KVM_H /* * KVM x86 specific structures and definitions * */ #include #include #define KVM_PIO_PAGE_OFFSET 1 #define KVM_COALESCED_MMIO_PAGE_OFFSET 2 #define KVM_DIRTY_LOG_PAGE_OFFSET 64 #define DE_VECTOR 0 #define DB_VECTOR 1 #define BP_VECTOR 3 #define OF_VECTOR 4 #define BR_VECTOR 5 #define UD_VECTOR 6 #define NM_VECTOR 7 #define DF_VECTOR 8 #define TS_VECTOR 10 #define NP_VECTOR 11 #define SS_VECTOR 12 #define GP_VECTOR 13 #define PF_VECTOR 14 #define MF_VECTOR 16 #define AC_VECTOR 17 #define MC_VECTOR 18 #define XM_VECTOR 19 #define VE_VECTOR 20 /* Select x86 specific features in */ #define __KVM_HAVE_PIT #define __KVM_HAVE_IOAPIC #define __KVM_HAVE_IRQ_LINE #define __KVM_HAVE_MSI #define __KVM_HAVE_USER_NMI #define __KVM_HAVE_GUEST_DEBUG #define __KVM_HAVE_MSIX #define __KVM_HAVE_MCE #define __KVM_HAVE_PIT_STATE2 #define __KVM_HAVE_XEN_HVM #define __KVM_HAVE_VCPU_EVENTS #define __KVM_HAVE_DEBUGREGS #define __KVM_HAVE_XSAVE #define __KVM_HAVE_XCRS #define __KVM_HAVE_READONLY_MEM /* Architectural interrupt line count. */ #define KVM_NR_INTERRUPTS 256 struct kvm_memory_alias { __u32 slot; /* this has a different namespace than memory slots */ __u32 flags; __u64 guest_phys_addr; __u64 memory_size; __u64 target_phys_addr; }; /* for KVM_GET_IRQCHIP and KVM_SET_IRQCHIP */ struct kvm_pic_state { __u8 last_irr; /* edge detection */ __u8 irr; /* interrupt request register */ __u8 imr; /* interrupt mask register */ __u8 isr; /* interrupt service register */ __u8 priority_add; /* highest irq priority */ __u8 irq_base; __u8 read_reg_select; __u8 poll; __u8 special_mask; __u8 init_state; __u8 auto_eoi; __u8 rotate_on_auto_eoi; __u8 special_fully_nested_mode; __u8 init4; /* true if 4 byte init */ __u8 elcr; /* PIIX edge/trigger selection */ __u8 elcr_mask; }; #define KVM_IOAPIC_NUM_PINS 24 struct kvm_ioapic_state { __u64 base_address; __u32 ioregsel; __u32 id; __u32 irr; __u32 pad; union { __u64 bits; struct { __u8 vector; __u8 delivery_mode:3; __u8 dest_mode:1; __u8 delivery_status:1; __u8 polarity:1; __u8 remote_irr:1; __u8 trig_mode:1; __u8 mask:1; __u8 reserve:7; __u8 reserved[4]; __u8 dest_id; } fields; } redirtbl[KVM_IOAPIC_NUM_PINS]; }; #define KVM_IRQCHIP_PIC_MASTER 0 #define KVM_IRQCHIP_PIC_SLAVE 1 #define KVM_IRQCHIP_IOAPIC 2 #define KVM_NR_IRQCHIPS 3 #define KVM_RUN_X86_SMM (1 << 0) #define KVM_RUN_X86_BUS_LOCK (1 << 1) /* for KVM_GET_REGS and KVM_SET_REGS */ struct kvm_regs { /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */ __u64 rax, rbx, rcx, rdx; __u64 rsi, rdi, rsp, rbp; __u64 r8, r9, r10, r11; __u64 r12, r13, r14, r15; __u64 rip, rflags; }; /* for KVM_GET_LAPIC and KVM_SET_LAPIC */ #define KVM_APIC_REG_SIZE 0x400 struct kvm_lapic_state { char regs[KVM_APIC_REG_SIZE]; }; struct kvm_segment { __u64 base; __u32 limit; __u16 selector; __u8 type; __u8 present, dpl, db, s, l, g, avl; __u8 unusable; __u8 padding; }; struct kvm_dtable { __u64 base; __u16 limit; __u16 padding[3]; }; /* for KVM_GET_SREGS and KVM_SET_SREGS */ struct kvm_sregs { /* out (KVM_GET_SREGS) / in (KVM_SET_SREGS) */ struct kvm_segment cs, ds, es, fs, gs, ss; struct kvm_segment tr, ldt; struct kvm_dtable gdt, idt; __u64 cr0, cr2, cr3, cr4, cr8; __u64 efer; __u64 apic_base; __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64]; }; struct kvm_sregs2 { /* out (KVM_GET_SREGS2) / in (KVM_SET_SREGS2) */ struct kvm_segment cs, ds, es, fs, gs, ss; struct kvm_segment tr, ldt; struct kvm_dtable gdt, idt; __u64 cr0, cr2, cr3, cr4, cr8; __u64 efer; __u64 apic_base; __u64 flags; __u64 pdptrs[4]; }; #define KVM_SREGS2_FLAGS_PDPTRS_VALID 1 /* for KVM_GET_FPU and KVM_SET_FPU */ struct kvm_fpu { __u8 fpr[8][16]; __u16 fcw; __u16 fsw; __u8 ftwx; /* in fxsave format */ __u8 pad1; __u16 last_opcode; __u64 last_ip; __u64 last_dp; __u8 xmm[16][16]; __u32 mxcsr; __u32 pad2; }; struct kvm_msr_entry { __u32 index; __u32 reserved; __u64 data; }; /* for KVM_GET_MSRS and KVM_SET_MSRS */ struct kvm_msrs { __u32 nmsrs; /* number of msrs in entries */ __u32 pad; struct kvm_msr_entry entries[0]; }; /* for KVM_GET_MSR_INDEX_LIST */ struct kvm_msr_list { __u32 nmsrs; /* number of msrs in entries */ __u32 indices[0]; }; /* Maximum size of any access bitmap in bytes */ #define KVM_MSR_FILTER_MAX_BITMAP_SIZE 0x600 /* for KVM_X86_SET_MSR_FILTER */ struct kvm_msr_filter_range { #define KVM_MSR_FILTER_READ (1 << 0) #define KVM_MSR_FILTER_WRITE (1 << 1) __u32 flags; __u32 nmsrs; /* number of msrs in bitmap */ __u32 base; /* MSR index the bitmap starts at */ __u8 *bitmap; /* a 1 bit allows the operations in flags, 0 denies */ }; #define KVM_MSR_FILTER_MAX_RANGES 16 struct kvm_msr_filter { #define KVM_MSR_FILTER_DEFAULT_ALLOW (0 << 0) #define KVM_MSR_FILTER_DEFAULT_DENY (1 << 0) __u32 flags; struct kvm_msr_filter_range ranges[KVM_MSR_FILTER_MAX_RANGES]; }; struct kvm_cpuid_entry { __u32 function; __u32 eax; __u32 ebx; __u32 ecx; __u32 edx; __u32 padding; }; /* for KVM_SET_CPUID */ struct kvm_cpuid { __u32 nent; __u32 padding; struct kvm_cpuid_entry entries[0]; }; struct kvm_cpuid_entry2 { __u32 function; __u32 index; __u32 flags; __u32 eax; __u32 ebx; __u32 ecx; __u32 edx; __u32 padding[3]; }; #define KVM_CPUID_FLAG_SIGNIFCANT_INDEX (1 << 0) #define KVM_CPUID_FLAG_STATEFUL_FUNC (1 << 1) #define KVM_CPUID_FLAG_STATE_READ_NEXT (1 << 2) /* for KVM_SET_CPUID2 */ struct kvm_cpuid2 { __u32 nent; __u32 padding; struct kvm_cpuid_entry2 entries[0]; }; /* for KVM_GET_PIT and KVM_SET_PIT */ struct kvm_pit_channel_state { __u32 count; /* can be 65536 */ __u16 latched_count; __u8 count_latched; __u8 status_latched; __u8 status; __u8 read_state; __u8 write_state; __u8 write_latch; __u8 rw_mode; __u8 mode; __u8 bcd; __u8 gate; __s64 count_load_time; }; struct kvm_debug_exit_arch { __u32 exception; __u32 pad; __u64 pc; __u64 dr6; __u64 dr7; }; #define KVM_GUESTDBG_USE_SW_BP 0x00010000 #define KVM_GUESTDBG_USE_HW_BP 0x00020000 #define KVM_GUESTDBG_INJECT_DB 0x00040000 #define KVM_GUESTDBG_INJECT_BP 0x00080000 #define KVM_GUESTDBG_BLOCKIRQ 0x00100000 /* for KVM_SET_GUEST_DEBUG */ struct kvm_guest_debug_arch { __u64 debugreg[8]; }; struct kvm_pit_state { struct kvm_pit_channel_state channels[3]; }; #define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001 struct kvm_pit_state2 { struct kvm_pit_channel_state channels[3]; __u32 flags; __u32 reserved[9]; }; struct kvm_reinject_control { __u8 pit_reinject; __u8 reserved[31]; }; /* When set in flags, include corresponding fields on KVM_SET_VCPU_EVENTS */ #define KVM_VCPUEVENT_VALID_NMI_PENDING 0x00000001 #define KVM_VCPUEVENT_VALID_SIPI_VECTOR 0x00000002 #define KVM_VCPUEVENT_VALID_SHADOW 0x00000004 #define KVM_VCPUEVENT_VALID_SMM 0x00000008 #define KVM_VCPUEVENT_VALID_PAYLOAD 0x00000010 /* Interrupt shadow states */ #define KVM_X86_SHADOW_INT_MOV_SS 0x01 #define KVM_X86_SHADOW_INT_STI 0x02 /* for KVM_GET/SET_VCPU_EVENTS */ struct kvm_vcpu_events { struct { __u8 injected; __u8 nr; __u8 has_error_code; __u8 pending; __u32 error_code; } exception; struct { __u8 injected; __u8 nr; __u8 soft; __u8 shadow; } interrupt; struct { __u8 injected; __u8 pending; __u8 masked; __u8 pad; } nmi; __u32 sipi_vector; __u32 flags; struct { __u8 smm; __u8 pending; __u8 smm_inside_nmi; __u8 latched_init; } smi; __u8 reserved[27]; __u8 exception_has_payload; __u64 exception_payload; }; /* for KVM_GET/SET_DEBUGREGS */ struct kvm_debugregs { __u64 db[4]; __u64 dr6; __u64 dr7; __u64 flags; __u64 reserved[9]; }; /* for KVM_CAP_XSAVE and KVM_CAP_XSAVE2 */ struct kvm_xsave { /* * KVM_GET_XSAVE2 and KVM_SET_XSAVE write and read as many bytes * as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) * respectively, when invoked on the vm file descriptor. * * The size value returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) * will always be at least 4096. Currently, it is only greater * than 4096 if a dynamic feature has been enabled with * ``arch_prctl()``, but this may change in the future. * * The offsets of the state save areas in struct kvm_xsave follow * the contents of CPUID leaf 0xD on the host. */ __u32 region[1024]; __u32 extra[0]; }; #define KVM_MAX_XCRS 16 struct kvm_xcr { __u32 xcr; __u32 reserved; __u64 value; }; struct kvm_xcrs { __u32 nr_xcrs; __u32 flags; struct kvm_xcr xcrs[KVM_MAX_XCRS]; __u64 padding[16]; }; #define KVM_SYNC_X86_REGS (1UL << 0) #define KVM_SYNC_X86_SREGS (1UL << 1) #define KVM_SYNC_X86_EVENTS (1UL << 2) #define KVM_SYNC_X86_VALID_FIELDS \ (KVM_SYNC_X86_REGS| \ KVM_SYNC_X86_SREGS| \ KVM_SYNC_X86_EVENTS) /* kvm_sync_regs struct included by kvm_run struct */ struct kvm_sync_regs { /* Members of this structure are potentially malicious. * Care must be taken by code reading, esp. interpreting, * data fields from them inside KVM to prevent TOCTOU and * double-fetch types of vulnerabilities. */ struct kvm_regs regs; struct kvm_sregs sregs; struct kvm_vcpu_events events; }; #define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) #define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) #define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2) #define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3) #define KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT (1 << 4) #define KVM_STATE_NESTED_FORMAT_VMX 0 #define KVM_STATE_NESTED_FORMAT_SVM 1 #define KVM_STATE_NESTED_GUEST_MODE 0x00000001 #define KVM_STATE_NESTED_RUN_PENDING 0x00000002 #define KVM_STATE_NESTED_EVMCS 0x00000004 #define KVM_STATE_NESTED_MTF_PENDING 0x00000008 #define KVM_STATE_NESTED_GIF_SET 0x00000100 #define KVM_STATE_NESTED_SMM_GUEST_MODE 0x00000001 #define KVM_STATE_NESTED_SMM_VMXON 0x00000002 #define KVM_STATE_NESTED_VMX_VMCS_SIZE 0x1000 #define KVM_STATE_NESTED_SVM_VMCB_SIZE 0x1000 #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001 /* attributes for system fd (group 0) */ #define KVM_X86_XCOMP_GUEST_SUPP 0 struct kvm_vmx_nested_state_data { __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; __u8 shadow_vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; }; struct kvm_vmx_nested_state_hdr { __u64 vmxon_pa; __u64 vmcs12_pa; struct { __u16 flags; } smm; __u16 pad; __u32 flags; __u64 preemption_timer_deadline; }; struct kvm_svm_nested_state_data { /* Save area only used if KVM_STATE_NESTED_RUN_PENDING. */ __u8 vmcb12[KVM_STATE_NESTED_SVM_VMCB_SIZE]; }; struct kvm_svm_nested_state_hdr { __u64 vmcb_pa; }; /* for KVM_CAP_NESTED_STATE */ struct kvm_nested_state { __u16 flags; __u16 format; __u32 size; union { struct kvm_vmx_nested_state_hdr vmx; struct kvm_svm_nested_state_hdr svm; /* Pad the header to 128 bytes. */ __u8 pad[120]; } hdr; /* * Define data region as 0 bytes to preserve backwards-compatability * to old definition of kvm_nested_state in order to avoid changing * KVM_{GET,PUT}_NESTED_STATE ioctl values. */ union { struct kvm_vmx_nested_state_data vmx[0]; struct kvm_svm_nested_state_data svm[0]; } data; }; /* for KVM_CAP_PMU_EVENT_FILTER */ struct kvm_pmu_event_filter { __u32 action; __u32 nevents; __u32 fixed_counter_bitmap; __u32 flags; __u32 pad[4]; __u64 events[0]; }; #define KVM_PMU_EVENT_ALLOW 0 #define KVM_PMU_EVENT_DENY 1 /* for KVM_{GET,SET,HAS}_DEVICE_ATTR */ #define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */ #define KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */ #endif /* _ASM_X86_KVM_H */ PKZx""asm/resource.hnu[#include PKZcasm/processor-flags.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_PROCESSOR_FLAGS_H #define _ASM_X86_PROCESSOR_FLAGS_H /* Various flags defined: can be included from assembler. */ #include /* * EFLAGS bits */ #define X86_EFLAGS_CF_BIT 0 /* Carry Flag */ #define X86_EFLAGS_CF _BITUL(X86_EFLAGS_CF_BIT) #define X86_EFLAGS_FIXED_BIT 1 /* Bit 1 - always on */ #define X86_EFLAGS_FIXED _BITUL(X86_EFLAGS_FIXED_BIT) #define X86_EFLAGS_PF_BIT 2 /* Parity Flag */ #define X86_EFLAGS_PF _BITUL(X86_EFLAGS_PF_BIT) #define X86_EFLAGS_AF_BIT 4 /* Auxiliary carry Flag */ #define X86_EFLAGS_AF _BITUL(X86_EFLAGS_AF_BIT) #define X86_EFLAGS_ZF_BIT 6 /* Zero Flag */ #define X86_EFLAGS_ZF _BITUL(X86_EFLAGS_ZF_BIT) #define X86_EFLAGS_SF_BIT 7 /* Sign Flag */ #define X86_EFLAGS_SF _BITUL(X86_EFLAGS_SF_BIT) #define X86_EFLAGS_TF_BIT 8 /* Trap Flag */ #define X86_EFLAGS_TF _BITUL(X86_EFLAGS_TF_BIT) #define X86_EFLAGS_IF_BIT 9 /* Interrupt Flag */ #define X86_EFLAGS_IF _BITUL(X86_EFLAGS_IF_BIT) #define X86_EFLAGS_DF_BIT 10 /* Direction Flag */ #define X86_EFLAGS_DF _BITUL(X86_EFLAGS_DF_BIT) #define X86_EFLAGS_OF_BIT 11 /* Overflow Flag */ #define X86_EFLAGS_OF _BITUL(X86_EFLAGS_OF_BIT) #define X86_EFLAGS_IOPL_BIT 12 /* I/O Privilege Level (2 bits) */ #define X86_EFLAGS_IOPL (_AC(3,UL) << X86_EFLAGS_IOPL_BIT) #define X86_EFLAGS_NT_BIT 14 /* Nested Task */ #define X86_EFLAGS_NT _BITUL(X86_EFLAGS_NT_BIT) #define X86_EFLAGS_RF_BIT 16 /* Resume Flag */ #define X86_EFLAGS_RF _BITUL(X86_EFLAGS_RF_BIT) #define X86_EFLAGS_VM_BIT 17 /* Virtual Mode */ #define X86_EFLAGS_VM _BITUL(X86_EFLAGS_VM_BIT) #define X86_EFLAGS_AC_BIT 18 /* Alignment Check/Access Control */ #define X86_EFLAGS_AC _BITUL(X86_EFLAGS_AC_BIT) #define X86_EFLAGS_VIF_BIT 19 /* Virtual Interrupt Flag */ #define X86_EFLAGS_VIF _BITUL(X86_EFLAGS_VIF_BIT) #define X86_EFLAGS_VIP_BIT 20 /* Virtual Interrupt Pending */ #define X86_EFLAGS_VIP _BITUL(X86_EFLAGS_VIP_BIT) #define X86_EFLAGS_ID_BIT 21 /* CPUID detection */ #define X86_EFLAGS_ID _BITUL(X86_EFLAGS_ID_BIT) /* * Basic CPU control in CR0 */ #define X86_CR0_PE_BIT 0 /* Protection Enable */ #define X86_CR0_PE _BITUL(X86_CR0_PE_BIT) #define X86_CR0_MP_BIT 1 /* Monitor Coprocessor */ #define X86_CR0_MP _BITUL(X86_CR0_MP_BIT) #define X86_CR0_EM_BIT 2 /* Emulation */ #define X86_CR0_EM _BITUL(X86_CR0_EM_BIT) #define X86_CR0_TS_BIT 3 /* Task Switched */ #define X86_CR0_TS _BITUL(X86_CR0_TS_BIT) #define X86_CR0_ET_BIT 4 /* Extension Type */ #define X86_CR0_ET _BITUL(X86_CR0_ET_BIT) #define X86_CR0_NE_BIT 5 /* Numeric Error */ #define X86_CR0_NE _BITUL(X86_CR0_NE_BIT) #define X86_CR0_WP_BIT 16 /* Write Protect */ #define X86_CR0_WP _BITUL(X86_CR0_WP_BIT) #define X86_CR0_AM_BIT 18 /* Alignment Mask */ #define X86_CR0_AM _BITUL(X86_CR0_AM_BIT) #define X86_CR0_NW_BIT 29 /* Not Write-through */ #define X86_CR0_NW _BITUL(X86_CR0_NW_BIT) #define X86_CR0_CD_BIT 30 /* Cache Disable */ #define X86_CR0_CD _BITUL(X86_CR0_CD_BIT) #define X86_CR0_PG_BIT 31 /* Paging */ #define X86_CR0_PG _BITUL(X86_CR0_PG_BIT) /* * Paging options in CR3 */ #define X86_CR3_PWT_BIT 3 /* Page Write Through */ #define X86_CR3_PWT _BITUL(X86_CR3_PWT_BIT) #define X86_CR3_PCD_BIT 4 /* Page Cache Disable */ #define X86_CR3_PCD _BITUL(X86_CR3_PCD_BIT) #define X86_CR3_PCID_BITS 12 #define X86_CR3_PCID_MASK (_AC((1UL << X86_CR3_PCID_BITS) - 1, UL)) #define X86_CR3_PCID_NOFLUSH_BIT 63 /* Preserve old PCID */ #define X86_CR3_PCID_NOFLUSH _BITULL(X86_CR3_PCID_NOFLUSH_BIT) /* * Intel CPU features in CR4 */ #define X86_CR4_VME_BIT 0 /* enable vm86 extensions */ #define X86_CR4_VME _BITUL(X86_CR4_VME_BIT) #define X86_CR4_PVI_BIT 1 /* virtual interrupts flag enable */ #define X86_CR4_PVI _BITUL(X86_CR4_PVI_BIT) #define X86_CR4_TSD_BIT 2 /* disable time stamp at ipl 3 */ #define X86_CR4_TSD _BITUL(X86_CR4_TSD_BIT) #define X86_CR4_DE_BIT 3 /* enable debugging extensions */ #define X86_CR4_DE _BITUL(X86_CR4_DE_BIT) #define X86_CR4_PSE_BIT 4 /* enable page size extensions */ #define X86_CR4_PSE _BITUL(X86_CR4_PSE_BIT) #define X86_CR4_PAE_BIT 5 /* enable physical address extensions */ #define X86_CR4_PAE _BITUL(X86_CR4_PAE_BIT) #define X86_CR4_MCE_BIT 6 /* Machine check enable */ #define X86_CR4_MCE _BITUL(X86_CR4_MCE_BIT) #define X86_CR4_PGE_BIT 7 /* enable global pages */ #define X86_CR4_PGE _BITUL(X86_CR4_PGE_BIT) #define X86_CR4_PCE_BIT 8 /* enable performance counters at ipl 3 */ #define X86_CR4_PCE _BITUL(X86_CR4_PCE_BIT) #define X86_CR4_OSFXSR_BIT 9 /* enable fast FPU save and restore */ #define X86_CR4_OSFXSR _BITUL(X86_CR4_OSFXSR_BIT) #define X86_CR4_OSXMMEXCPT_BIT 10 /* enable unmasked SSE exceptions */ #define X86_CR4_OSXMMEXCPT _BITUL(X86_CR4_OSXMMEXCPT_BIT) #define X86_CR4_UMIP_BIT 11 /* enable UMIP support */ #define X86_CR4_UMIP _BITUL(X86_CR4_UMIP_BIT) #define X86_CR4_LA57_BIT 12 /* enable 5-level page tables */ #define X86_CR4_LA57 _BITUL(X86_CR4_LA57_BIT) #define X86_CR4_VMXE_BIT 13 /* enable VMX virtualization */ #define X86_CR4_VMXE _BITUL(X86_CR4_VMXE_BIT) #define X86_CR4_SMXE_BIT 14 /* enable safer mode (TXT) */ #define X86_CR4_SMXE _BITUL(X86_CR4_SMXE_BIT) #define X86_CR4_FSGSBASE_BIT 16 /* enable RDWRFSGS support */ #define X86_CR4_FSGSBASE _BITUL(X86_CR4_FSGSBASE_BIT) #define X86_CR4_PCIDE_BIT 17 /* enable PCID support */ #define X86_CR4_PCIDE _BITUL(X86_CR4_PCIDE_BIT) #define X86_CR4_OSXSAVE_BIT 18 /* enable xsave and xrestore */ #define X86_CR4_OSXSAVE _BITUL(X86_CR4_OSXSAVE_BIT) #define X86_CR4_SMEP_BIT 20 /* enable SMEP support */ #define X86_CR4_SMEP _BITUL(X86_CR4_SMEP_BIT) #define X86_CR4_SMAP_BIT 21 /* enable SMAP support */ #define X86_CR4_SMAP _BITUL(X86_CR4_SMAP_BIT) #define X86_CR4_PKE_BIT 22 /* enable Protection Keys support */ #define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT) /* * x86-64 Task Priority Register, CR8 */ #define X86_CR8_TPR _AC(0x0000000f,UL) /* task priority register */ /* * AMD and Transmeta use MSRs for configuration; see */ /* * NSC/Cyrix CPU configuration register indexes */ #define CX86_PCR0 0x20 #define CX86_GCR 0xb8 #define CX86_CCR0 0xc0 #define CX86_CCR1 0xc1 #define CX86_CCR2 0xc2 #define CX86_CCR3 0xc3 #define CX86_CCR4 0xe8 #define CX86_CCR5 0xe9 #define CX86_CCR6 0xea #define CX86_CCR7 0xeb #define CX86_PCR1 0xf0 #define CX86_DIR0 0xfe #define CX86_DIR1 0xff #define CX86_ARR_BASE 0xc4 #define CX86_RCR_BASE 0xdc #define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | \ X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | \ X86_CR0_PG) #endif /* _ASM_X86_PROCESSOR_FLAGS_H */ PKZBc asm/mce.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_MCE_H #define _ASM_X86_MCE_H #include #include /* * Fields are zero when not available. Also, this struct is shared with * userspace mcelog and thus must keep existing fields at current offsets. * Only add new fields to the end of the structure */ struct mce { __u64 status; /* Bank's MCi_STATUS MSR */ __u64 misc; /* Bank's MCi_MISC MSR */ __u64 addr; /* Bank's MCi_ADDR MSR */ __u64 mcgstatus; /* Machine Check Global Status MSR */ __u64 ip; /* Instruction Pointer when the error happened */ __u64 tsc; /* CPU time stamp counter */ __u64 time; /* Wall time_t when error was detected */ __u8 cpuvendor; /* Kernel's X86_VENDOR enum */ __u8 inject_flags; /* Software inject flags */ __u8 severity; /* Error severity */ __u8 pad; __u32 cpuid; /* CPUID 1 EAX */ __u8 cs; /* Code segment */ __u8 bank; /* Machine check bank reporting the error */ __u8 cpu; /* CPU number; obsoleted by extcpu */ __u8 finished; /* Entry is valid */ __u32 extcpu; /* Linux CPU number that detected the error */ __u32 socketid; /* CPU socket ID */ __u32 apicid; /* CPU initial APIC ID */ __u64 mcgcap; /* MCGCAP MSR: machine check capabilities of CPU */ __u64 synd; /* MCA_SYND MSR: only valid on SMCA systems */ __u64 ipid; /* MCA_IPID MSR: only valid on SMCA systems */ __u64 ppin; /* Protected Processor Inventory Number */ __u32 microcode; /* Microcode revision */ }; #define MCE_GET_RECORD_LEN _IOR('M', 1, int) #define MCE_GET_LOG_LEN _IOR('M', 2, int) #define MCE_GETCLEAR_FLAGS _IOR('M', 3, int) #endif /* _ASM_X86_MCE_H */ PKZ&6 asm/socket.hnu[#include PKZasm/sigcontext32.hnu[/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_SIGCONTEXT32_H #define _ASM_X86_SIGCONTEXT32_H /* This is a legacy file - all the type definitions are in sigcontext.h: */ #include #endif /* _ASM_X86_SIGCONTEXT32_H */ PKZƲ0CC asm/boot.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_BOOT_H #define _ASM_X86_BOOT_H /* Internal svga startup constants */ #define NORMAL_VGA 0xffff /* 80x25 mode */ #define EXTENDED_VGA 0xfffe /* 80x50 mode */ #define ASK_VGA 0xfffd /* ask for it at bootup */ #endif /* _ASM_X86_BOOT_H */ PKZn asm/param.hnu[#include PKZ>7. . asm/vm86.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_VM86_H #define _ASM_X86_VM86_H /* * I'm guessing at the VIF/VIP flag usage, but hope that this is how * the Pentium uses them. Linux will return from vm86 mode when both * VIF and VIP is set. * * On a Pentium, we could probably optimize the virtual flags directly * in the eflags register instead of doing it "by hand" in vflags... * * Linus */ #include #define BIOSSEG 0x0f000 #define CPU_086 0 #define CPU_186 1 #define CPU_286 2 #define CPU_386 3 #define CPU_486 4 #define CPU_586 5 /* * Return values for the 'vm86()' system call */ #define VM86_TYPE(retval) ((retval) & 0xff) #define VM86_ARG(retval) ((retval) >> 8) #define VM86_SIGNAL 0 /* return due to signal */ #define VM86_UNKNOWN 1 /* unhandled GP fault - IO-instruction or similar */ #define VM86_INTx 2 /* int3/int x instruction (ARG = x) */ #define VM86_STI 3 /* sti/popf/iret instruction enabled virtual interrupts */ /* * Additional return values when invoking new vm86() */ #define VM86_PICRETURN 4 /* return due to pending PIC request */ #define VM86_TRAP 6 /* return due to DOS-debugger request */ /* * function codes when invoking new vm86() */ #define VM86_PLUS_INSTALL_CHECK 0 #define VM86_ENTER 1 #define VM86_ENTER_NO_BYPASS 2 #define VM86_REQUEST_IRQ 3 #define VM86_FREE_IRQ 4 #define VM86_GET_IRQ_BITS 5 #define VM86_GET_AND_RESET_IRQ 6 /* * This is the stack-layout seen by the user space program when we have * done a translation of "SAVE_ALL" from vm86 mode. The real kernel layout * is 'kernel_vm86_regs' (see below). */ struct vm86_regs { /* * normal regs, with special meaning for the segment descriptors.. */ long ebx; long ecx; long edx; long esi; long edi; long ebp; long eax; long __null_ds; long __null_es; long __null_fs; long __null_gs; long orig_eax; long eip; unsigned short cs, __csh; long eflags; long esp; unsigned short ss, __ssh; /* * these are specific to v86 mode: */ unsigned short es, __esh; unsigned short ds, __dsh; unsigned short fs, __fsh; unsigned short gs, __gsh; }; struct revectored_struct { unsigned long __map[8]; /* 256 bits */ }; struct vm86_struct { struct vm86_regs regs; unsigned long flags; unsigned long screen_bitmap; unsigned long cpu_type; struct revectored_struct int_revectored; struct revectored_struct int21_revectored; }; /* * flags masks */ #define VM86_SCREEN_BITMAP 0x0001 struct vm86plus_info_struct { unsigned long force_return_for_pic:1; unsigned long vm86dbg_active:1; /* for debugger */ unsigned long vm86dbg_TFpendig:1; /* for debugger */ unsigned long unused:28; unsigned long is_vm86pus:1; /* for vm86 internal use */ unsigned char vm86dbg_intxxtab[32]; /* for debugger */ }; struct vm86plus_struct { struct vm86_regs regs; unsigned long flags; unsigned long screen_bitmap; unsigned long cpu_type; struct revectored_struct int_revectored; struct revectored_struct int21_revectored; struct vm86plus_info_struct vm86plus; }; #endif /* _ASM_X86_VM86_H */ PKZVEEasm/posix_types_x32.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_POSIX_TYPES_X32_H #define _ASM_X86_POSIX_TYPES_X32_H /* * This file is only used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot * assume GCC is being used. * * These types should generally match the ones used by the 64-bit kernel, * */ typedef long long __kernel_long_t; typedef unsigned long long __kernel_ulong_t; #define __kernel_long_t __kernel_long_t #include #endif /* _ASM_X86_POSIX_TYPES_X32_H */ PKZ` asm/ptrace.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_PTRACE_H #define _ASM_X86_PTRACE_H /* For */ #include #include #ifndef __ASSEMBLY__ #ifdef __i386__ /* this struct defines the way the registers are stored on the stack during a system call. */ struct pt_regs { long ebx; long ecx; long edx; long esi; long edi; long ebp; long eax; int xds; int xes; int xfs; int xgs; long orig_eax; long eip; int xcs; long eflags; long esp; int xss; }; #else /* __i386__ */ struct pt_regs { /* * C ABI says these regs are callee-preserved. They aren't saved on kernel entry * unless syscall needs a complete, fully filled "struct pt_regs". */ unsigned long r15; unsigned long r14; unsigned long r13; unsigned long r12; unsigned long rbp; unsigned long rbx; /* These regs are callee-clobbered. Always saved on kernel entry. */ unsigned long r11; unsigned long r10; unsigned long r9; unsigned long r8; unsigned long rax; unsigned long rcx; unsigned long rdx; unsigned long rsi; unsigned long rdi; /* * On syscall entry, this is syscall#. On CPU exception, this is error code. * On hw interrupt, it's IRQ number: */ unsigned long orig_rax; /* Return frame for iretq */ unsigned long rip; unsigned long cs; unsigned long eflags; unsigned long rsp; unsigned long ss; /* top of stack page */ }; #endif /* !__i386__ */ #endif /* !__ASSEMBLY__ */ #endif /* _ASM_X86_PTRACE_H */ PKZ asm/poll.hnu[#include PKZ4 asm/shmbuf.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_X86_SHMBUF_H #define __ASM_X86_SHMBUF_H #if !defined(__x86_64__) || !defined(__ILP32__) #include #else /* * The shmid64_ds structure for x86 architecture with x32 ABI. * * On x86-32 and x86-64 we can just use the generic definition, but * x32 uses the same binary layout as x86_64, which is differnet * from other 32-bit architectures. */ struct shmid64_ds { struct ipc64_perm shm_perm; /* operation perms */ size_t shm_segsz; /* size of segment (bytes) */ __kernel_time_t shm_atime; /* last attach time */ __kernel_time_t shm_dtime; /* last detach time */ __kernel_time_t shm_ctime; /* last change time */ __kernel_pid_t shm_cpid; /* pid of creator */ __kernel_pid_t shm_lpid; /* pid of last operator */ __kernel_ulong_t shm_nattch; /* no. of current attaches */ __kernel_ulong_t __unused4; __kernel_ulong_t __unused5; }; struct shminfo64 { __kernel_ulong_t shmmax; __kernel_ulong_t shmmin; __kernel_ulong_t shmmni; __kernel_ulong_t shmseg; __kernel_ulong_t shmall; __kernel_ulong_t __unused1; __kernel_ulong_t __unused2; __kernel_ulong_t __unused3; __kernel_ulong_t __unused4; }; #endif #endif /* __ASM_X86_SHMBUF_H */ PKZ asm/ipcbuf.hnu[#include PKZZ!AAasm/bitsperlong.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __ASM_X86_BITSPERLONG_H #define __ASM_X86_BITSPERLONG_H #if defined(__x86_64__) && !defined(__ILP32__) # define __BITS_PER_LONG 64 #else # define __BITS_PER_LONG 32 #endif #include #endif /* __ASM_X86_BITSPERLONG_H */ PKZEEasm/ucontext.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_UCONTEXT_H #define _ASM_X86_UCONTEXT_H /* * Indicates the presence of extended state information in the memory * layout pointed by the fpstate pointer in the ucontext's sigcontext * struct (uc_mcontext). */ #define UC_FP_XSTATE 0x1 #ifdef __x86_64__ /* * UC_SIGCONTEXT_SS will be set when delivering 64-bit or x32 signals on * kernels that save SS in the sigcontext. All kernels that set * UC_SIGCONTEXT_SS will correctly restore at least the low 32 bits of esp * regardless of SS (i.e. they implement espfix). * * Kernels that set UC_SIGCONTEXT_SS will also set UC_STRICT_RESTORE_SS * when delivering a signal that came from 64-bit code. * * Sigreturn restores SS as follows: * * if (saved SS is valid || UC_STRICT_RESTORE_SS is set || * saved CS is not 64-bit) * new SS = saved SS (will fail IRET and signal if invalid) * else * new SS = a flat 32-bit data segment * * This behavior serves three purposes: * * - Legacy programs that construct a 64-bit sigcontext from scratch * with zero or garbage in the SS slot (e.g. old CRIU) and call * sigreturn will still work. * * - Old DOSEMU versions sometimes catch a signal from a segmented * context, delete the old SS segment (with modify_ldt), and change * the saved CS to a 64-bit segment. These DOSEMU versions expect * sigreturn to send them back to 64-bit mode without killing them, * despite the fact that the SS selector when the signal was raised is * no longer valid. UC_STRICT_RESTORE_SS will be clear, so the kernel * will fix up SS for these DOSEMU versions. * * - Old and new programs that catch a signal and return without * modifying the saved context will end up in exactly the state they * started in, even if they were running in a segmented context when * the signal was raised.. Old kernels would lose track of the * previous SS value. */ #define UC_SIGCONTEXT_SS 0x2 #define UC_STRICT_RESTORE_SS 0x4 #endif #include #endif /* _ASM_X86_UCONTEXT_H */ PKZj asm/types.hnu[/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_TYPES_H #define _ASM_X86_TYPES_H #include #endif /* _ASM_X86_TYPES_H */ PKZO((asm/bpf_perf_event.hnu[#include PKZldT%%asm/sigcontext.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_SIGCONTEXT_H #define _ASM_X86_SIGCONTEXT_H /* * Linux signal context definitions. The sigcontext includes a complex * hierarchy of CPU and FPU state, available to user-space (on the stack) when * a signal handler is executed. * * As over the years this ABI grew from its very simple roots towards * supporting more and more CPU state organically, some of the details (which * were rather clever hacks back in the days) became a bit quirky by today. * * The current ABI includes flexible provisions for future extensions, so we * won't have to grow new quirks for quite some time. Promise! */ #include #define FP_XSTATE_MAGIC1 0x46505853U #define FP_XSTATE_MAGIC2 0x46505845U #define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) /* * Bytes 464..511 in the current 512-byte layout of the FXSAVE/FXRSTOR frame * are reserved for SW usage. On CPUs supporting XSAVE/XRSTOR, these bytes are * used to extend the fpstate pointer in the sigcontext, which now includes the * extended state information along with fpstate information. * * If sw_reserved.magic1 == FP_XSTATE_MAGIC1 then there's a * sw_reserved.extended_size bytes large extended context area present. (The * last 32-bit word of this extended area (at the * fpstate+extended_size-FP_XSTATE_MAGIC2_SIZE address) is set to * FP_XSTATE_MAGIC2 so that you can sanity check your size calculations.) * * This extended area typically grows with newer CPUs that have larger and * larger XSAVE areas. */ struct _fpx_sw_bytes { /* * If set to FP_XSTATE_MAGIC1 then this is an xstate context. * 0 if a legacy frame. */ __u32 magic1; /* * Total size of the fpstate area: * * - if magic1 == 0 then it's sizeof(struct _fpstate) * - if magic1 == FP_XSTATE_MAGIC1 then it's sizeof(struct _xstate) * plus extensions (if any) */ __u32 extended_size; /* * Feature bit mask (including FP/SSE/extended state) that is present * in the memory layout: */ __u64 xfeatures; /* * Actual XSAVE state size, based on the xfeatures saved in the layout. * 'extended_size' is greater than 'xstate_size': */ __u32 xstate_size; /* For future use: */ __u32 padding[7]; }; /* * As documented in the iBCS2 standard: * * The first part of "struct _fpstate" is just the normal i387 hardware setup, * the extra "status" word is used to save the coprocessor status word before * entering the handler. * * The FPU state data structure has had to grow to accommodate the extended FPU * state required by the Streaming SIMD Extensions. There is no documented * standard to accomplish this at the moment. */ /* 10-byte legacy floating point register: */ struct _fpreg { __u16 significand[4]; __u16 exponent; }; /* 16-byte floating point register: */ struct _fpxreg { __u16 significand[4]; __u16 exponent; __u16 padding[3]; }; /* 16-byte XMM register: */ struct _xmmreg { __u32 element[4]; }; #define X86_FXSR_MAGIC 0x0000 /* * The 32-bit FPU frame: */ struct _fpstate_32 { /* Legacy FPU environment: */ __u32 cw; __u32 sw; __u32 tag; __u32 ipoff; __u32 cssel; __u32 dataoff; __u32 datasel; struct _fpreg _st[8]; __u16 status; __u16 magic; /* 0xffff: regular FPU data only */ /* 0x0000: FXSR FPU data */ /* FXSR FPU environment */ __u32 _fxsr_env[6]; /* FXSR FPU env is ignored */ __u32 mxcsr; __u32 reserved; struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ struct _xmmreg _xmm[8]; /* First 8 XMM registers */ union { __u32 padding1[44]; /* Second 8 XMM registers plus padding */ __u32 padding[44]; /* Alias name for old user-space */ }; union { __u32 padding2[12]; struct _fpx_sw_bytes sw_reserved; /* Potential extended state is encoded here */ }; }; /* * The 64-bit FPU frame. (FXSAVE format and later) * * Note1: If sw_reserved.magic1 == FP_XSTATE_MAGIC1 then the structure is * larger: 'struct _xstate'. Note that 'struct _xstate' embedds * 'struct _fpstate' so that you can always assume the _fpstate portion * exists so that you can check the magic value. * * Note2: Reserved fields may someday contain valuable data. Always * save/restore them when you change signal frames. */ struct _fpstate_64 { __u16 cwd; __u16 swd; /* Note this is not the same as the 32-bit/x87/FSAVE twd: */ __u16 twd; __u16 fop; __u64 rip; __u64 rdp; __u32 mxcsr; __u32 mxcsr_mask; __u32 st_space[32]; /* 8x FP registers, 16 bytes each */ __u32 xmm_space[64]; /* 16x XMM registers, 16 bytes each */ __u32 reserved2[12]; union { __u32 reserved3[12]; struct _fpx_sw_bytes sw_reserved; /* Potential extended state is encoded here */ }; }; #ifdef __i386__ # define _fpstate _fpstate_32 #else # define _fpstate _fpstate_64 #endif struct _header { __u64 xfeatures; __u64 reserved1[2]; __u64 reserved2[5]; }; struct _ymmh_state { /* 16x YMM registers, 16 bytes each: */ __u32 ymmh_space[64]; }; /* * Extended state pointed to by sigcontext::fpstate. * * In addition to the fpstate, information encoded in _xstate::xstate_hdr * indicates the presence of other extended state information supported * by the CPU and kernel: */ struct _xstate { struct _fpstate fpstate; struct _header xstate_hdr; struct _ymmh_state ymmh; /* New processor state extensions go here: */ }; /* * The 32-bit signal frame: */ struct sigcontext_32 { __u16 gs, __gsh; __u16 fs, __fsh; __u16 es, __esh; __u16 ds, __dsh; __u32 di; __u32 si; __u32 bp; __u32 sp; __u32 bx; __u32 dx; __u32 cx; __u32 ax; __u32 trapno; __u32 err; __u32 ip; __u16 cs, __csh; __u32 flags; __u32 sp_at_signal; __u16 ss, __ssh; /* * fpstate is really (struct _fpstate *) or (struct _xstate *) * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end * of extended memory layout. See comments at the definition of * (struct _fpx_sw_bytes) */ __u32 fpstate; /* Zero when no FPU/extended context */ __u32 oldmask; __u32 cr2; }; /* * The 64-bit signal frame: */ struct sigcontext_64 { __u64 r8; __u64 r9; __u64 r10; __u64 r11; __u64 r12; __u64 r13; __u64 r14; __u64 r15; __u64 di; __u64 si; __u64 bp; __u64 bx; __u64 dx; __u64 ax; __u64 cx; __u64 sp; __u64 ip; __u64 flags; __u16 cs; __u16 gs; __u16 fs; __u16 ss; __u64 err; __u64 trapno; __u64 oldmask; __u64 cr2; /* * fpstate is really (struct _fpstate *) or (struct _xstate *) * depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved * bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end * of extended memory layout. See comments at the definition of * (struct _fpx_sw_bytes) */ __u64 fpstate; /* Zero when no FPU/extended context */ __u64 reserved1[8]; }; /* * Create the real 'struct sigcontext' type: */ /* * The old user-space sigcontext definition, just in case user-space still * relies on it. The kernel definition (in asm/sigcontext.h) has unified * field names but otherwise the same layout. */ #define _fpstate_ia32 _fpstate_32 #define sigcontext_ia32 sigcontext_32 # ifdef __i386__ struct sigcontext { __u16 gs, __gsh; __u16 fs, __fsh; __u16 es, __esh; __u16 ds, __dsh; __u32 edi; __u32 esi; __u32 ebp; __u32 esp; __u32 ebx; __u32 edx; __u32 ecx; __u32 eax; __u32 trapno; __u32 err; __u32 eip; __u16 cs, __csh; __u32 eflags; __u32 esp_at_signal; __u16 ss, __ssh; struct _fpstate *fpstate; __u32 oldmask; __u32 cr2; }; # else /* __x86_64__: */ struct sigcontext { __u64 r8; __u64 r9; __u64 r10; __u64 r11; __u64 r12; __u64 r13; __u64 r14; __u64 r15; __u64 rdi; __u64 rsi; __u64 rbp; __u64 rbx; __u64 rdx; __u64 rax; __u64 rcx; __u64 rsp; __u64 rip; __u64 eflags; /* RFLAGS */ __u16 cs; /* * Prior to 2.5.64 ("[PATCH] x86-64 updates for 2.5.64-bk3"), * Linux saved and restored fs and gs in these slots. This * was counterproductive, as fsbase and gsbase were never * saved, so arch_prctl was presumably unreliable. * * These slots should never be reused without extreme caution: * * - Some DOSEMU versions stash fs and gs in these slots manually, * thus overwriting anything the kernel expects to be preserved * in these slots. * * - If these slots are ever needed for any other purpose, * there is some risk that very old 64-bit binaries could get * confused. I doubt that many such binaries still work, * though, since the same patch in 2.5.64 also removed the * 64-bit set_thread_area syscall, so it appears that there * is no TLS API beyond modify_ldt that works in both pre- * and post-2.5.64 kernels. * * If the kernel ever adds explicit fs, gs, fsbase, and gsbase * save/restore, it will most likely need to be opt-in and use * different context slots. */ __u16 gs; __u16 fs; union { __u16 ss; /* If UC_SIGCONTEXT_SS */ __u16 __pad0; /* Alias name for old (!UC_SIGCONTEXT_SS) user-space */ }; __u64 err; __u64 trapno; __u64 oldmask; __u64 cr2; struct _fpstate *fpstate; /* Zero when no FPU context */ # ifdef __ILP32__ __u32 __fpstate_pad; # endif __u64 reserved1[8]; }; # endif /* __x86_64__ */ #endif /* _ASM_X86_SIGCONTEXT_H */ PKZKN asm/sgx.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * Copyright(c) 2016-20 Intel Corporation. */ #ifndef _ASM_X86_SGX_H #define _ASM_X86_SGX_H #include #include /** * enum sgx_page_flags - page control flags * %SGX_PAGE_MEASURE: Measure the page contents with a sequence of * ENCLS[EEXTEND] operations. */ enum sgx_page_flags { SGX_PAGE_MEASURE = 0x01, }; #define SGX_MAGIC 0xA4 #define SGX_IOC_ENCLAVE_CREATE \ _IOW(SGX_MAGIC, 0x00, struct sgx_enclave_create) #define SGX_IOC_ENCLAVE_ADD_PAGES \ _IOWR(SGX_MAGIC, 0x01, struct sgx_enclave_add_pages) #define SGX_IOC_ENCLAVE_INIT \ _IOW(SGX_MAGIC, 0x02, struct sgx_enclave_init) #define SGX_IOC_ENCLAVE_PROVISION \ _IOW(SGX_MAGIC, 0x03, struct sgx_enclave_provision) #define SGX_IOC_VEPC_REMOVE_ALL \ _IO(SGX_MAGIC, 0x04) #define SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS \ _IOWR(SGX_MAGIC, 0x05, struct sgx_enclave_restrict_permissions) #define SGX_IOC_ENCLAVE_MODIFY_TYPES \ _IOWR(SGX_MAGIC, 0x06, struct sgx_enclave_modify_types) #define SGX_IOC_ENCLAVE_REMOVE_PAGES \ _IOWR(SGX_MAGIC, 0x07, struct sgx_enclave_remove_pages) /** * struct sgx_enclave_create - parameter structure for the * %SGX_IOC_ENCLAVE_CREATE ioctl * @src: address for the SECS page data */ struct sgx_enclave_create { __u64 src; }; /** * struct sgx_enclave_add_pages - parameter structure for the * %SGX_IOC_ENCLAVE_ADD_PAGE ioctl * @src: start address for the page data * @offset: starting page offset * @length: length of the data (multiple of the page size) * @secinfo: address for the SECINFO data * @flags: page control flags * @count: number of bytes added (multiple of the page size) */ struct sgx_enclave_add_pages { __u64 src; __u64 offset; __u64 length; __u64 secinfo; __u64 flags; __u64 count; }; /** * struct sgx_enclave_init - parameter structure for the * %SGX_IOC_ENCLAVE_INIT ioctl * @sigstruct: address for the SIGSTRUCT data */ struct sgx_enclave_init { __u64 sigstruct; }; /** * struct sgx_enclave_provision - parameter structure for the * %SGX_IOC_ENCLAVE_PROVISION ioctl * @fd: file handle of /dev/sgx_provision */ struct sgx_enclave_provision { __u64 fd; }; /** * struct sgx_enclave_restrict_permissions - parameters for ioctl * %SGX_IOC_ENCLAVE_RESTRICT_PERMISSIONS * @offset: starting page offset (page aligned relative to enclave base * address defined in SECS) * @length: length of memory (multiple of the page size) * @permissions:new permission bits for pages in range described by @offset * and @length * @result: (output) SGX result code of ENCLS[EMODPR] function * @count: (output) bytes successfully changed (multiple of page size) */ struct sgx_enclave_restrict_permissions { __u64 offset; __u64 length; __u64 permissions; __u64 result; __u64 count; }; /** * struct sgx_enclave_modify_types - parameters for ioctl * %SGX_IOC_ENCLAVE_MODIFY_TYPES * @offset: starting page offset (page aligned relative to enclave base * address defined in SECS) * @length: length of memory (multiple of the page size) * @page_type: new type for pages in range described by @offset and @length * @result: (output) SGX result code of ENCLS[EMODT] function * @count: (output) bytes successfully changed (multiple of page size) */ struct sgx_enclave_modify_types { __u64 offset; __u64 length; __u64 page_type; __u64 result; __u64 count; }; /** * struct sgx_enclave_remove_pages - %SGX_IOC_ENCLAVE_REMOVE_PAGES parameters * @offset: starting page offset (page aligned relative to enclave base * address defined in SECS) * @length: length of memory (multiple of the page size) * @count: (output) bytes successfully changed (multiple of page size) * * Regular (PT_REG) or TCS (PT_TCS) can be removed from an initialized * enclave if the system supports SGX2. First, the %SGX_IOC_ENCLAVE_MODIFY_TYPES * ioctl() should be used to change the page type to PT_TRIM. After that * succeeds ENCLU[EACCEPT] should be run from within the enclave and then * %SGX_IOC_ENCLAVE_REMOVE_PAGES can be used to complete the page removal. */ struct sgx_enclave_remove_pages { __u64 offset; __u64 length; __u64 count; }; struct sgx_enclave_run; /** * typedef sgx_enclave_user_handler_t - Exit handler function accepted by * __vdso_sgx_enter_enclave() * @run: The run instance given by the caller * * The register parameters contain the snapshot of their values at enclave * exit. An invalid ENCLU function number will cause -EINVAL to be returned * to the caller. * * Return: * - <= 0: The given value is returned back to the caller. * - > 0: ENCLU function to invoke, either EENTER or ERESUME. */ typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx, long rsp, long r8, long r9, struct sgx_enclave_run *run); /** * struct sgx_enclave_run - the execution context of __vdso_sgx_enter_enclave() * @tcs: TCS used to enter the enclave * @function: The last seen ENCLU function (EENTER, ERESUME or EEXIT) * @exception_vector: The interrupt vector of the exception * @exception_error_code: The exception error code pulled out of the stack * @exception_addr: The address that triggered the exception * @user_handler: User provided callback run on exception * @user_data: Data passed to the user handler * @reserved Reserved for future extensions * * If @user_handler is provided, the handler will be invoked on all return paths * of the normal flow. The user handler may transfer control, e.g. via a * longjmp() call or a C++ exception, without returning to * __vdso_sgx_enter_enclave(). */ struct sgx_enclave_run { __u64 tcs; __u32 function; __u16 exception_vector; __u16 exception_error_code; __u64 exception_addr; __u64 user_handler; __u64 user_data; __u8 reserved[216]; }; /** * typedef vdso_sgx_enter_enclave_t - Prototype for __vdso_sgx_enter_enclave(), * a vDSO function to enter an SGX enclave. * @rdi: Pass-through value for RDI * @rsi: Pass-through value for RSI * @rdx: Pass-through value for RDX * @function: ENCLU function, must be EENTER or ERESUME * @r8: Pass-through value for R8 * @r9: Pass-through value for R9 * @run: struct sgx_enclave_run, must be non-NULL * * NOTE: __vdso_sgx_enter_enclave() does not ensure full compliance with the * x86-64 ABI, e.g. doesn't handle XSAVE state. Except for non-volatile * general purpose registers, EFLAGS.DF, and RSP alignment, preserving/setting * state in accordance with the x86-64 ABI is the responsibility of the enclave * and its runtime, i.e. __vdso_sgx_enter_enclave() cannot be called from C * code without careful consideration by both the enclave and its runtime. * * All general purpose registers except RAX, RBX and RCX are passed as-is to the * enclave. RAX, RBX and RCX are consumed by EENTER and ERESUME and are loaded * with @function, asynchronous exit pointer, and @run.tcs respectively. * * RBP and the stack are used to anchor __vdso_sgx_enter_enclave() to the * pre-enclave state, e.g. to retrieve @run.exception and @run.user_handler * after an enclave exit. All other registers are available for use by the * enclave and its runtime, e.g. an enclave can push additional data onto the * stack (and modify RSP) to pass information to the optional user handler (see * below). * * Most exceptions reported on ENCLU, including those that occur within the * enclave, are fixed up and reported synchronously instead of being delivered * via a standard signal. Debug Exceptions (#DB) and Breakpoints (#BP) are * never fixed up and are always delivered via standard signals. On synchrously * reported exceptions, -EFAULT is returned and details about the exception are * recorded in @run.exception, the optional sgx_enclave_exception struct. * * Return: * - 0: ENCLU function was successfully executed. * - -EINVAL: Invalid ENCL number (neither EENTER nor ERESUME). */ typedef int (*vdso_sgx_enter_enclave_t)(unsigned long rdi, unsigned long rsi, unsigned long rdx, unsigned int function, unsigned long r8, unsigned long r9, struct sgx_enclave_run *run); #endif /* _ASM_X86_SGX_H */ PKZE|asm/ptrace-abi.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_PTRACE_ABI_H #define _ASM_X86_PTRACE_ABI_H #ifdef __i386__ #define EBX 0 #define ECX 1 #define EDX 2 #define ESI 3 #define EDI 4 #define EBP 5 #define EAX 6 #define DS 7 #define ES 8 #define FS 9 #define GS 10 #define ORIG_EAX 11 #define EIP 12 #define CS 13 #define EFL 14 #define UESP 15 #define SS 16 #define FRAME_SIZE 17 #else /* __i386__ */ #if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS) /* * C ABI says these regs are callee-preserved. They aren't saved on kernel entry * unless syscall needs a complete, fully filled "struct pt_regs". */ #define R15 0 #define R14 8 #define R13 16 #define R12 24 #define RBP 32 #define RBX 40 /* These regs are callee-clobbered. Always saved on kernel entry. */ #define R11 48 #define R10 56 #define R9 64 #define R8 72 #define RAX 80 #define RCX 88 #define RDX 96 #define RSI 104 #define RDI 112 /* * On syscall entry, this is syscall#. On CPU exception, this is error code. * On hw interrupt, it's IRQ number: */ #define ORIG_RAX 120 /* Return frame for iretq */ #define RIP 128 #define CS 136 #define EFLAGS 144 #define RSP 152 #define SS 160 #endif /* __ASSEMBLY__ */ /* top of stack page */ #define FRAME_SIZE 168 #endif /* !__i386__ */ /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ #define PTRACE_GETREGS 12 #define PTRACE_SETREGS 13 #define PTRACE_GETFPREGS 14 #define PTRACE_SETFPREGS 15 #define PTRACE_GETFPXREGS 18 #define PTRACE_SETFPXREGS 19 #define PTRACE_OLDSETOPTIONS 21 /* only useful for access 32bit programs / kernels */ #define PTRACE_GET_THREAD_AREA 25 #define PTRACE_SET_THREAD_AREA 26 #ifdef __x86_64__ # define PTRACE_ARCH_PRCTL 30 #endif #define PTRACE_SYSEMU 31 #define PTRACE_SYSEMU_SINGLESTEP 32 #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ #ifndef __ASSEMBLY__ #include #endif #endif /* _ASM_X86_PTRACE_ABI_H */ PKZ]-&-& asm/svm.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef __SVM_H #define __SVM_H #define SVM_EXIT_READ_CR0 0x000 #define SVM_EXIT_READ_CR2 0x002 #define SVM_EXIT_READ_CR3 0x003 #define SVM_EXIT_READ_CR4 0x004 #define SVM_EXIT_READ_CR8 0x008 #define SVM_EXIT_WRITE_CR0 0x010 #define SVM_EXIT_WRITE_CR2 0x012 #define SVM_EXIT_WRITE_CR3 0x013 #define SVM_EXIT_WRITE_CR4 0x014 #define SVM_EXIT_WRITE_CR8 0x018 #define SVM_EXIT_READ_DR0 0x020 #define SVM_EXIT_READ_DR1 0x021 #define SVM_EXIT_READ_DR2 0x022 #define SVM_EXIT_READ_DR3 0x023 #define SVM_EXIT_READ_DR4 0x024 #define SVM_EXIT_READ_DR5 0x025 #define SVM_EXIT_READ_DR6 0x026 #define SVM_EXIT_READ_DR7 0x027 #define SVM_EXIT_WRITE_DR0 0x030 #define SVM_EXIT_WRITE_DR1 0x031 #define SVM_EXIT_WRITE_DR2 0x032 #define SVM_EXIT_WRITE_DR3 0x033 #define SVM_EXIT_WRITE_DR4 0x034 #define SVM_EXIT_WRITE_DR5 0x035 #define SVM_EXIT_WRITE_DR6 0x036 #define SVM_EXIT_WRITE_DR7 0x037 #define SVM_EXIT_EXCP_BASE 0x040 #define SVM_EXIT_LAST_EXCP 0x05f #define SVM_EXIT_INTR 0x060 #define SVM_EXIT_NMI 0x061 #define SVM_EXIT_SMI 0x062 #define SVM_EXIT_INIT 0x063 #define SVM_EXIT_VINTR 0x064 #define SVM_EXIT_CR0_SEL_WRITE 0x065 #define SVM_EXIT_IDTR_READ 0x066 #define SVM_EXIT_GDTR_READ 0x067 #define SVM_EXIT_LDTR_READ 0x068 #define SVM_EXIT_TR_READ 0x069 #define SVM_EXIT_IDTR_WRITE 0x06a #define SVM_EXIT_GDTR_WRITE 0x06b #define SVM_EXIT_LDTR_WRITE 0x06c #define SVM_EXIT_TR_WRITE 0x06d #define SVM_EXIT_RDTSC 0x06e #define SVM_EXIT_RDPMC 0x06f #define SVM_EXIT_PUSHF 0x070 #define SVM_EXIT_POPF 0x071 #define SVM_EXIT_CPUID 0x072 #define SVM_EXIT_RSM 0x073 #define SVM_EXIT_IRET 0x074 #define SVM_EXIT_SWINT 0x075 #define SVM_EXIT_INVD 0x076 #define SVM_EXIT_PAUSE 0x077 #define SVM_EXIT_HLT 0x078 #define SVM_EXIT_INVLPG 0x079 #define SVM_EXIT_INVLPGA 0x07a #define SVM_EXIT_IOIO 0x07b #define SVM_EXIT_MSR 0x07c #define SVM_EXIT_TASK_SWITCH 0x07d #define SVM_EXIT_FERR_FREEZE 0x07e #define SVM_EXIT_SHUTDOWN 0x07f #define SVM_EXIT_VMRUN 0x080 #define SVM_EXIT_VMMCALL 0x081 #define SVM_EXIT_VMLOAD 0x082 #define SVM_EXIT_VMSAVE 0x083 #define SVM_EXIT_STGI 0x084 #define SVM_EXIT_CLGI 0x085 #define SVM_EXIT_SKINIT 0x086 #define SVM_EXIT_RDTSCP 0x087 #define SVM_EXIT_ICEBP 0x088 #define SVM_EXIT_WBINVD 0x089 #define SVM_EXIT_MONITOR 0x08a #define SVM_EXIT_MWAIT 0x08b #define SVM_EXIT_MWAIT_COND 0x08c #define SVM_EXIT_XSETBV 0x08d #define SVM_EXIT_RDPRU 0x08e #define SVM_EXIT_EFER_WRITE_TRAP 0x08f #define SVM_EXIT_CR0_WRITE_TRAP 0x090 #define SVM_EXIT_CR1_WRITE_TRAP 0x091 #define SVM_EXIT_CR2_WRITE_TRAP 0x092 #define SVM_EXIT_CR3_WRITE_TRAP 0x093 #define SVM_EXIT_CR4_WRITE_TRAP 0x094 #define SVM_EXIT_CR5_WRITE_TRAP 0x095 #define SVM_EXIT_CR6_WRITE_TRAP 0x096 #define SVM_EXIT_CR7_WRITE_TRAP 0x097 #define SVM_EXIT_CR8_WRITE_TRAP 0x098 #define SVM_EXIT_CR9_WRITE_TRAP 0x099 #define SVM_EXIT_CR10_WRITE_TRAP 0x09a #define SVM_EXIT_CR11_WRITE_TRAP 0x09b #define SVM_EXIT_CR12_WRITE_TRAP 0x09c #define SVM_EXIT_CR13_WRITE_TRAP 0x09d #define SVM_EXIT_CR14_WRITE_TRAP 0x09e #define SVM_EXIT_CR15_WRITE_TRAP 0x09f #define SVM_EXIT_INVPCID 0x0a2 #define SVM_EXIT_NPF 0x400 #define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401 #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402 #define SVM_EXIT_VMGEXIT 0x403 /* SEV-ES software-defined VMGEXIT events */ #define SVM_VMGEXIT_MMIO_READ 0x80000001 #define SVM_VMGEXIT_MMIO_WRITE 0x80000002 #define SVM_VMGEXIT_NMI_COMPLETE 0x80000003 #define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004 #define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005 #define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0 #define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1 #define SVM_VMGEXIT_PSC 0x80000010 #define SVM_VMGEXIT_GUEST_REQUEST 0x80000011 #define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012 #define SVM_VMGEXIT_AP_CREATION 0x80000013 #define SVM_VMGEXIT_AP_CREATE_ON_INIT 0 #define SVM_VMGEXIT_AP_CREATE 1 #define SVM_VMGEXIT_AP_DESTROY 2 #define SVM_VMGEXIT_HV_FEATURES 0x8000fffd #define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe #define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \ /* SW_EXITINFO1[3:0] */ \ (((((u64)reason_set) & 0xf)) | \ /* SW_EXITINFO1[11:4] */ \ ((((u64)reason_code) & 0xff) << 4)) #define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff /* Exit code reserved for hypervisor/software use */ #define SVM_EXIT_SW 0xf0000000 #define SVM_EXIT_ERR -1 #define SVM_EXIT_REASONS \ { SVM_EXIT_READ_CR0, "read_cr0" }, \ { SVM_EXIT_READ_CR2, "read_cr2" }, \ { SVM_EXIT_READ_CR3, "read_cr3" }, \ { SVM_EXIT_READ_CR4, "read_cr4" }, \ { SVM_EXIT_READ_CR8, "read_cr8" }, \ { SVM_EXIT_WRITE_CR0, "write_cr0" }, \ { SVM_EXIT_WRITE_CR2, "write_cr2" }, \ { SVM_EXIT_WRITE_CR3, "write_cr3" }, \ { SVM_EXIT_WRITE_CR4, "write_cr4" }, \ { SVM_EXIT_WRITE_CR8, "write_cr8" }, \ { SVM_EXIT_READ_DR0, "read_dr0" }, \ { SVM_EXIT_READ_DR1, "read_dr1" }, \ { SVM_EXIT_READ_DR2, "read_dr2" }, \ { SVM_EXIT_READ_DR3, "read_dr3" }, \ { SVM_EXIT_READ_DR4, "read_dr4" }, \ { SVM_EXIT_READ_DR5, "read_dr5" }, \ { SVM_EXIT_READ_DR6, "read_dr6" }, \ { SVM_EXIT_READ_DR7, "read_dr7" }, \ { SVM_EXIT_WRITE_DR0, "write_dr0" }, \ { SVM_EXIT_WRITE_DR1, "write_dr1" }, \ { SVM_EXIT_WRITE_DR2, "write_dr2" }, \ { SVM_EXIT_WRITE_DR3, "write_dr3" }, \ { SVM_EXIT_WRITE_DR4, "write_dr4" }, \ { SVM_EXIT_WRITE_DR5, "write_dr5" }, \ { SVM_EXIT_WRITE_DR6, "write_dr6" }, \ { SVM_EXIT_WRITE_DR7, "write_dr7" }, \ { SVM_EXIT_EXCP_BASE + DE_VECTOR, "DE excp" }, \ { SVM_EXIT_EXCP_BASE + DB_VECTOR, "DB excp" }, \ { SVM_EXIT_EXCP_BASE + BP_VECTOR, "BP excp" }, \ { SVM_EXIT_EXCP_BASE + OF_VECTOR, "OF excp" }, \ { SVM_EXIT_EXCP_BASE + BR_VECTOR, "BR excp" }, \ { SVM_EXIT_EXCP_BASE + UD_VECTOR, "UD excp" }, \ { SVM_EXIT_EXCP_BASE + NM_VECTOR, "NM excp" }, \ { SVM_EXIT_EXCP_BASE + DF_VECTOR, "DF excp" }, \ { SVM_EXIT_EXCP_BASE + TS_VECTOR, "TS excp" }, \ { SVM_EXIT_EXCP_BASE + NP_VECTOR, "NP excp" }, \ { SVM_EXIT_EXCP_BASE + SS_VECTOR, "SS excp" }, \ { SVM_EXIT_EXCP_BASE + GP_VECTOR, "GP excp" }, \ { SVM_EXIT_EXCP_BASE + PF_VECTOR, "PF excp" }, \ { SVM_EXIT_EXCP_BASE + MF_VECTOR, "MF excp" }, \ { SVM_EXIT_EXCP_BASE + AC_VECTOR, "AC excp" }, \ { SVM_EXIT_EXCP_BASE + MC_VECTOR, "MC excp" }, \ { SVM_EXIT_EXCP_BASE + XM_VECTOR, "XF excp" }, \ { SVM_EXIT_INTR, "interrupt" }, \ { SVM_EXIT_NMI, "nmi" }, \ { SVM_EXIT_SMI, "smi" }, \ { SVM_EXIT_INIT, "init" }, \ { SVM_EXIT_VINTR, "vintr" }, \ { SVM_EXIT_CR0_SEL_WRITE, "cr0_sel_write" }, \ { SVM_EXIT_IDTR_READ, "read_idtr" }, \ { SVM_EXIT_GDTR_READ, "read_gdtr" }, \ { SVM_EXIT_LDTR_READ, "read_ldtr" }, \ { SVM_EXIT_TR_READ, "read_rt" }, \ { SVM_EXIT_IDTR_WRITE, "write_idtr" }, \ { SVM_EXIT_GDTR_WRITE, "write_gdtr" }, \ { SVM_EXIT_LDTR_WRITE, "write_ldtr" }, \ { SVM_EXIT_TR_WRITE, "write_rt" }, \ { SVM_EXIT_RDTSC, "rdtsc" }, \ { SVM_EXIT_RDPMC, "rdpmc" }, \ { SVM_EXIT_PUSHF, "pushf" }, \ { SVM_EXIT_POPF, "popf" }, \ { SVM_EXIT_CPUID, "cpuid" }, \ { SVM_EXIT_RSM, "rsm" }, \ { SVM_EXIT_IRET, "iret" }, \ { SVM_EXIT_SWINT, "swint" }, \ { SVM_EXIT_INVD, "invd" }, \ { SVM_EXIT_PAUSE, "pause" }, \ { SVM_EXIT_HLT, "hlt" }, \ { SVM_EXIT_INVLPG, "invlpg" }, \ { SVM_EXIT_INVLPGA, "invlpga" }, \ { SVM_EXIT_IOIO, "io" }, \ { SVM_EXIT_MSR, "msr" }, \ { SVM_EXIT_TASK_SWITCH, "task_switch" }, \ { SVM_EXIT_FERR_FREEZE, "ferr_freeze" }, \ { SVM_EXIT_SHUTDOWN, "shutdown" }, \ { SVM_EXIT_VMRUN, "vmrun" }, \ { SVM_EXIT_VMMCALL, "hypercall" }, \ { SVM_EXIT_VMLOAD, "vmload" }, \ { SVM_EXIT_VMSAVE, "vmsave" }, \ { SVM_EXIT_STGI, "stgi" }, \ { SVM_EXIT_CLGI, "clgi" }, \ { SVM_EXIT_SKINIT, "skinit" }, \ { SVM_EXIT_RDTSCP, "rdtscp" }, \ { SVM_EXIT_ICEBP, "icebp" }, \ { SVM_EXIT_WBINVD, "wbinvd" }, \ { SVM_EXIT_MONITOR, "monitor" }, \ { SVM_EXIT_MWAIT, "mwait" }, \ { SVM_EXIT_XSETBV, "xsetbv" }, \ { SVM_EXIT_EFER_WRITE_TRAP, "write_efer_trap" }, \ { SVM_EXIT_CR0_WRITE_TRAP, "write_cr0_trap" }, \ { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \ { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \ { SVM_EXIT_INVPCID, "invpcid" }, \ { SVM_EXIT_NPF, "npf" }, \ { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \ { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \ { SVM_EXIT_VMGEXIT, "vmgexit" }, \ { SVM_VMGEXIT_MMIO_READ, "vmgexit_mmio_read" }, \ { SVM_VMGEXIT_MMIO_WRITE, "vmgexit_mmio_write" }, \ { SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, \ { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \ { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \ { SVM_VMGEXIT_PSC, "vmgexit_page_state_change" }, \ { SVM_VMGEXIT_GUEST_REQUEST, "vmgexit_guest_request" }, \ { SVM_VMGEXIT_EXT_GUEST_REQUEST, "vmgexit_ext_guest_request" }, \ { SVM_VMGEXIT_AP_CREATION, "vmgexit_ap_creation" }, \ { SVM_VMGEXIT_HV_FEATURES, "vmgexit_hypervisor_feature" }, \ { SVM_EXIT_ERR, "invalid_guest_state" } #endif /* __SVM_H */ PKZ asm/vsyscall.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_VSYSCALL_H #define _ASM_X86_VSYSCALL_H enum vsyscall_num { __NR_vgettimeofday, __NR_vtime, __NR_vgetcpu, }; #define VSYSCALL_ADDR (-10UL << 20) #endif /* _ASM_X86_VSYSCALL_H */ PKZ asm/errno.hnu[#include PKZXl] asm/hwcap2.hnu[/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_HWCAP2_H #define _ASM_X86_HWCAP2_H /* MONITOR/MWAIT enabled in Ring 3 */ #define HWCAP2_RING3MWAIT (1 << 0) /* Kernel allows FSGSBASE instructions available in Ring 3 */ #define HWCAP2_FSGSBASE BIT(1) #endif PKZ! asm/ioctls.hnu[#include PKZelCOOasm/bootparam.hnu[/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_BOOTPARAM_H #define _ASM_X86_BOOTPARAM_H /* setup_data types */ #define SETUP_NONE 0 #define SETUP_E820_EXT 1 #define SETUP_DTB 2 #define SETUP_PCI 3 #define SETUP_EFI 4 #define SETUP_APPLE_PROPERTIES 5 #define SETUP_JAILHOUSE 6 #define SETUP_CC_BLOB 7 /* ram_size flags */ #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 /* loadflags */ #define LOADED_HIGH (1<<0) #define KASLR_FLAG (1<<1) #define QUIET_FLAG (1<<5) #define KEEP_SEGMENTS (1<<6) #define CAN_USE_HEAP (1<<7) /* xloadflags */ #define XLF_KERNEL_64 (1<<0) #define XLF_CAN_BE_LOADED_ABOVE_4G (1<<1) #define XLF_EFI_HANDOVER_32 (1<<2) #define XLF_EFI_HANDOVER_64 (1<<3) #define XLF_EFI_KEXEC (1<<4) #ifndef __ASSEMBLY__ #include #include #include #include #include #include